From dd1cd02f5911dcddec3fde704b9043d7ca90717f Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 26 Sep 2024 00:04:38 +0000 Subject: [PATCH 1/5] feat: Client library for the backupvault api is added feat: Add backupplan proto feat: Add backupplanassociation proto feat: Add backupvault_ba proto feat: Add backupvault_gce proto docs: A comment for field `oauth2_client_id` in message `.google.cloud.backupdr.v1.ManagementServer` is changed docs: A comment for field `parent` in message `.google.cloud.backupdr.v1.ListManagementServersRequest` is changed docs: A comment for field `management_servers` in message `.google.cloud.backupdr.v1.ListManagementServersResponse` is changed docs: A comment for field `name` in message `.google.cloud.backupdr.v1.GetManagementServerRequest` is changed docs: A comment for field `parent` in message `.google.cloud.backupdr.v1.CreateManagementServerRequest` is changed docs: A comment for field `requested_cancellation` in message `.google.cloud.backupdr.v1.OperationMetadata` is changed PiperOrigin-RevId: 678800741 Source-Link: https://github.com/googleapis/googleapis/commit/d36e288fc56ace0443c96ee1e385529c4ec4198c Source-Link: https://github.com/googleapis/googleapis-gen/commit/fba9d225b43dcf7361006491810485cdf1b57cdb Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhY2t1cGRyLy5Pd2xCb3QueWFtbCIsImgiOiJmYmE5ZDIyNWI0M2RjZjczNjEwMDY0OTE4MTA0ODVjZGYxYjU3Y2RiIn0= --- .../google-cloud-backupdr/v1/.eslintignore | 7 + .../google-cloud-backupdr/v1/.eslintrc.json | 3 + .../google-cloud-backupdr/v1/.gitignore | 14 + .../google-cloud-backupdr/v1/.jsdoc.js | 55 + .../google-cloud-backupdr/v1/.mocharc.js | 33 + .../google-cloud-backupdr/v1/.prettierrc.js | 22 + .../google-cloud-backupdr/v1/README.md | 1 + .../google-cloud-backupdr/v1/package.json | 58 + .../google/cloud/backupdr/v1/backupdr.proto | 776 + .../google/cloud/backupdr/v1/backupplan.proto | 438 + .../backupdr/v1/backupplanassociation.proto | 313 + .../cloud/backupdr/v1/backupvault.proto | 1378 + .../cloud/backupdr/v1/backupvault_ba.proto | 49 + .../cloud/backupdr/v1/backupvault_gce.proto | 949 + .../v1/protos/protos.d.ts | 23288 ++++++ .../google-cloud-backupdr/v1/protos/protos.js | 61858 ++++++++++++++++ .../v1/protos/protos.json | 7871 ++ .../generated/v1/backup_d_r.abandon_backup.js | 77 + .../v1/backup_d_r.create_backup_plan.js | 91 + ...ckup_d_r.create_backup_plan_association.js | 89 + .../v1/backup_d_r.create_backup_vault.js | 93 + .../v1/backup_d_r.create_management_server.js | 90 + .../generated/v1/backup_d_r.delete_backup.js | 76 + .../v1/backup_d_r.delete_backup_plan.js | 77 + ...ckup_d_r.delete_backup_plan_association.js | 77 + .../v1/backup_d_r.delete_backup_vault.js | 97 + .../v1/backup_d_r.delete_management_server.js | 76 + .../v1/backup_d_r.fetch_access_token.js | 69 + .../backup_d_r.fetch_usable_backup_vaults.js | 85 + .../v1/backup_d_r.finalize_backup.js | 109 + .../generated/v1/backup_d_r.get_backup.js | 67 + .../v1/backup_d_r.get_backup_plan.js | 62 + .../backup_d_r.get_backup_plan_association.js | 62 + .../v1/backup_d_r.get_backup_vault.js | 67 + .../v1/backup_d_r.get_data_source.js | 62 + .../v1/backup_d_r.get_management_server.js | 62 + .../v1/backup_d_r.initiate_backup.js | 81 + ...ackup_d_r.list_backup_plan_associations.js | 81 + .../v1/backup_d_r.list_backup_plans.js | 93 + .../v1/backup_d_r.list_backup_vaults.js | 90 + .../generated/v1/backup_d_r.list_backups.js | 90 + .../v1/backup_d_r.list_data_sources.js | 85 + .../v1/backup_d_r.list_management_servers.js | 85 + .../v1/backup_d_r.remove_data_source.js | 76 + .../generated/v1/backup_d_r.restore_backup.js | 85 + .../v1/backup_d_r.set_internal_status.js | 87 + .../v1/backup_d_r.test_iam_permissions.js | 70 + .../generated/v1/backup_d_r.trigger_backup.js | 82 + .../generated/v1/backup_d_r.update_backup.js | 85 + .../v1/backup_d_r.update_backup_vault.js | 95 + .../v1/backup_d_r.update_data_source.js | 89 + ...pet_metadata_google.cloud.backupdr.v1.json | 1707 + .../google-cloud-backupdr/v1/src/index.ts | 25 + .../v1/src/v1/backup_d_r_client.ts | 5426 ++ .../v1/src/v1/backup_d_r_client_config.json | 191 + .../v1/src/v1/backup_d_r_proto_list.json | 8 + .../v1/src/v1/gapic_metadata.json | 391 + .../google-cloud-backupdr/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_backup_d_r_v1.ts | 6816 ++ .../google-cloud-backupdr/v1/tsconfig.json | 19 + .../v1/webpack.config.js | 64 + 64 files changed, 114649 insertions(+) create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.eslintignore create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.prettierrc.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/README.md create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/package.json create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplan.proto create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplanassociation.proto create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault.proto create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_ba.proto create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_gce.proto create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.abandon_backup.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan_association.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_vault.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan_association.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_vault.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_access_token.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.finalize_backup.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan_association.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_vault.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_data_source.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.initiate_backup.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plan_associations.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plans.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_vaults.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backups.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_data_sources.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.remove_data_source.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.restore_backup.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.set_internal_status.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.test_iam_permissions.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.trigger_backup.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup_vault.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_data_source.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/index.ts create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client_config.json create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/test/gapic_backup_d_r_v1.ts create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/webpack.config.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.eslintignore b/owl-bot-staging/google-cloud-backupdr/v1/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.eslintrc.json b/owl-bot-staging/google-cloud-backupdr/v1/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.gitignore b/owl-bot-staging/google-cloud-backupdr/v1/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.jsdoc.js b/owl-bot-staging/google-cloud-backupdr/v1/.jsdoc.js new file mode 100644 index 00000000000..7b9ce99a79c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/.jsdoc.js @@ -0,0 +1,55 @@ +// 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 +// +// 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 2024 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/backupdr', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js b/owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js new file mode 100644 index 00000000000..13b67c34edc --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js @@ -0,0 +1,33 @@ +// 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 +// +// 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-backupdr/v1/.prettierrc.js b/owl-bot-staging/google-cloud-backupdr/v1/.prettierrc.js new file mode 100644 index 00000000000..9a8fd690982 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/.prettierrc.js @@ -0,0 +1,22 @@ +// 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 +// +// 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-backupdr/v1/README.md b/owl-bot-staging/google-cloud-backupdr/v1/README.md new file mode 100644 index 00000000000..a01e3b46ff3 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/README.md @@ -0,0 +1 @@ +Backupdr: Nodejs Client diff --git a/owl-bot-staging/google-cloud-backupdr/v1/package.json b/owl-bot-staging/google-cloud-backupdr/v1/package.json new file mode 100644 index 00000000000..0bb72fdc884 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/package.json @@ -0,0 +1,58 @@ +{ + "name": "@google-cloud/backupdr", + "version": "0.1.0", + "description": "Backupdr client for Node.js", + "repository": "googleapis/nodejs-backupdr", + "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 backupdr", + "backupdr", + "backup d r" + ], + "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-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto new file mode 100644 index 00000000000..eff6b77e762 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto @@ -0,0 +1,776 @@ +// 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.backupdr.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/backupdr/v1/backupplan.proto"; +import "google/cloud/backupdr/v1/backupplanassociation.proto"; +import "google/cloud/backupdr/v1/backupvault.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1"; +option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupDRProto"; +option java_package = "com.google.cloud.backupdr.v1"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1"; +option ruby_package = "Google::Cloud::BackupDR::V1"; + +// The BackupDR Service +service BackupDR { + option (google.api.default_host) = "backupdr.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists ManagementServers in a given project and location. + rpc ListManagementServers(ListManagementServersRequest) + returns (ListManagementServersResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/managementServers" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single ManagementServer. + rpc GetManagementServer(GetManagementServerRequest) + returns (ManagementServer) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/managementServers/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new ManagementServer in a given project and location. + rpc CreateManagementServer(CreateManagementServerRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/managementServers" + body: "management_server" + }; + option (google.api.method_signature) = + "parent,management_server,management_server_id"; + option (google.longrunning.operation_info) = { + response_type: "ManagementServer" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single ManagementServer. + rpc DeleteManagementServer(DeleteManagementServerRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/managementServers/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Creates a new BackupVault in a given project and location. + rpc CreateBackupVault(CreateBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/backupVaults" + body: "backup_vault" + }; + option (google.api.method_signature) = + "parent,backup_vault,backup_vault_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupVault" + metadata_type: "OperationMetadata" + }; + } + + // Lists BackupVaults in a given project and location. + rpc ListBackupVaults(ListBackupVaultsRequest) + returns (ListBackupVaultsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupVaults" + }; + option (google.api.method_signature) = "parent"; + } + + // FetchUsableBackupVaults lists usable BackupVaults in a given project and + // location. Usable BackupVault are the ones that user has + // backupdr.backupVaults.get permission. + rpc FetchUsableBackupVaults(FetchUsableBackupVaultsRequest) + returns (FetchUsableBackupVaultsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a BackupVault. + rpc GetBackupVault(GetBackupVaultRequest) returns (BackupVault) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupVaults/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings of a BackupVault. + rpc UpdateBackupVault(UpdateBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}" + body: "backup_vault" + }; + option (google.api.method_signature) = "backup_vault,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "BackupVault" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a BackupVault. + rpc DeleteBackupVault(DeleteBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupVaults/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Returns the caller's permissions on a BackupVault resource. + // + // A caller is not required to have Google IAM permission to make this + // request. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/backupVaults/*}:testIamPermissions" + body: "*" + }; + option (google.api.method_signature) = "resource, permissions"; + } + + // Lists DataSources in a given project and location. + rpc ListDataSources(ListDataSourcesRequest) + returns (ListDataSourcesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a DataSource. + rpc GetDataSource(GetDataSourceRequest) returns (DataSource) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings of a DataSource. + rpc UpdateDataSource(UpdateDataSourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}" + body: "data_source" + }; + option (google.api.method_signature) = "data_source,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DataSource" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a DataSource. This is a custom method instead of a standard delete + // method because external clients will not delete DataSources except for + // BackupDR backup appliances. + rpc RemoveDataSource(RemoveDataSourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:remove" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Sets the internal status of a DataSource. + rpc SetInternalStatus(SetInternalStatusRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:setInternalStatus" + body: "*" + }; + option (google.api.method_signature) = "data_source"; + option (google.longrunning.operation_info) = { + response_type: "SetInternalStatusResponse" + metadata_type: "OperationMetadata" + }; + } + + // Internal only. + // Initiates a backup. + rpc InitiateBackup(InitiateBackupRequest) returns (InitiateBackupResponse) { + option (google.api.http) = { + post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:initiateBackup" + body: "*" + }; + option (google.api.method_signature) = "data_source"; + } + + // Internal only. + // Abandons a backup. + rpc AbandonBackup(AbandonBackupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:abandonBackup" + body: "*" + }; + option (google.api.method_signature) = "data_source"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Internal only. + // Finalize a backup that was started by a call to InitiateBackup. + rpc FinalizeBackup(FinalizeBackupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:finalizeBackup" + body: "*" + }; + option (google.api.method_signature) = "data_source"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Internal only. + // Fetch access token for a given data source. + rpc FetchAccessToken(FetchAccessTokenRequest) + returns (FetchAccessTokenResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Backups in a given project and location. + rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a Backup. + rpc GetBackup(GetBackupRequest) returns (Backup) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings of a Backup. + rpc UpdateBackup(UpdateBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + body: "backup" + }; + option (google.api.method_signature) = "backup,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a Backup. + rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Restore from a Backup + rpc RestoreBackup(RestoreBackupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "RestoreBackupResponse" + metadata_type: "OperationMetadata" + }; + } + + // Create a BackupPlan + rpc CreateBackupPlan(CreateBackupPlanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/backupPlans" + body: "backup_plan" + }; + option (google.api.method_signature) = "parent,backup_plan,backup_plan_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlan" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single BackupPlan. + rpc GetBackupPlan(GetBackupPlanRequest) returns (BackupPlan) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupPlans/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists BackupPlans in a given project and location. + rpc ListBackupPlans(ListBackupPlansRequest) + returns (ListBackupPlansResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupPlans" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a single BackupPlan. + rpc DeleteBackupPlan(DeleteBackupPlanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupPlans/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Create a BackupPlanAssociation + rpc CreateBackupPlanAssociation(CreateBackupPlanAssociationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" + body: "backup_plan_association" + }; + option (google.api.method_signature) = + "parent,backup_plan_association,backup_plan_association_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlanAssociation" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single BackupPlanAssociation. + rpc GetBackupPlanAssociation(GetBackupPlanAssociationRequest) + returns (BackupPlanAssociation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists BackupPlanAssociations in a given project and location. + rpc ListBackupPlanAssociations(ListBackupPlanAssociationsRequest) + returns (ListBackupPlanAssociationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a single BackupPlanAssociation. + rpc DeleteBackupPlanAssociation(DeleteBackupPlanAssociationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Triggers a new Backup. + rpc TriggerBackup(TriggerBackupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup" + body: "*" + }; + option (google.api.method_signature) = "name,rule_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlanAssociation" + metadata_type: "OperationMetadata" + }; + } +} + +// Network configuration for ManagementServer instance. +message NetworkConfig { + // VPC peering modes supported by Cloud BackupDR. + enum PeeringMode { + // Peering mode not set. + PEERING_MODE_UNSPECIFIED = 0; + + // Connect using Private Service Access to the Management Server. Private + // services access provides an IP address range for multiple Google Cloud + // services, including Cloud BackupDR. + PRIVATE_SERVICE_ACCESS = 1; + } + + // Optional. The resource name of the Google Compute Engine VPC network to + // which the ManagementServer instance is connected. + string network = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The network connect mode of the ManagementServer instance. For + // this version, only PRIVATE_SERVICE_ACCESS is supported. + PeeringMode peering_mode = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// ManagementURI for the Management Server resource. +message ManagementURI { + // Output only. The ManagementServer AGM/RD WebUI URL. + string web_ui = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ManagementServer AGM/RD API URL. + string api = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ManagementURI depending on the Workforce Identity i.e. either 1p or 3p. +message WorkforceIdentityBasedManagementURI { + // Output only. First party Management URI for Google Identities. + string first_party_management_uri = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Third party Management URI for External Identity Providers. + string third_party_management_uri = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// OAuth Client ID depending on the Workforce Identity i.e. either 1p or 3p, +message WorkforceIdentityBasedOAuth2ClientID { + // Output only. First party OAuth Client ID for Google Identities. + string first_party_oauth2_client_id = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Third party OAuth Client ID for External Identity Providers. + string third_party_oauth2_client_id = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ManagementServer describes a single BackupDR ManagementServer instance. +message ManagementServer { + option (google.api.resource) = { + type: "backupdr.googleapis.com/ManagementServer" + pattern: "projects/{project}/locations/{location}/managementServers/{managementserver}" + plural: "managementServers" + singular: "managementServer" + }; + + // Type of backup service resource. + enum InstanceType { + // Instance type is not mentioned. + INSTANCE_TYPE_UNSPECIFIED = 0; + + // Instance for backup and restore management (i.e., AGM). + BACKUP_RESTORE = 1; + } + + // State of Management server instance. + enum InstanceState { + // State not set. + INSTANCE_STATE_UNSPECIFIED = 0; + + // The instance is being created. + CREATING = 1; + + // The instance has been created and is fully usable. + READY = 2; + + // The instance configuration is being updated. Certain kinds of updates + // may cause the instance to become unusable while the update is in + // progress. + UPDATING = 3; + + // The instance is being deleted. + DELETING = 4; + + // The instance is being repaired and may be unstable. + REPAIRING = 5; + + // Maintenance is being performed on this instance. + MAINTENANCE = 6; + + // The instance is experiencing an issue and might be unusable. You can get + // further details from the statusMessage field of Instance resource. + ERROR = 7; + } + + // Output only. Identifier. The resource name. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Optional. The description of the ManagementServer instance (2048 characters + // or less). + string description = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource labels to represent user provided metadata. + // Labels currently defined: + // 1. migrate_from_go= + // If set to true, the MS is created in migration ready mode. + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the instance was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The type of the ManagementServer resource. + InstanceType type = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The hostname or ip address of the exposed AGM endpoints, used + // by clients to connect to AGM/RD graphical user interface and APIs. + ManagementURI management_uri = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The hostnames of the exposed AGM endpoints for both types of + // user i.e. 1p and 3p, used to connect AGM/RM UI. + WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = + 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ManagementServer state. + InstanceState state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. VPC networks to which the ManagementServer instance is connected. + // For this version, only a single network is supported. + repeated NetworkConfig networks = 8 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Server specified ETag for the ManagementServer resource to + // prevent simultaneous updates from overwiting each other. + string etag = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The OAuth 2.0 client id is required to make API calls to the + // BackupDR instance API of this ManagementServer. This is the value that + // should be provided in the 'aud' field of the OIDC ID Token (see openid + // specification + // https://openid.net/specs/openid-connect-core-1_0.html#IDToken). + string oauth2_client_id = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The OAuth client IDs for both types of user i.e. 1p and 3p. + WorkforceIdentityBasedOAuth2ClientID + workforce_identity_based_oauth2_client_id = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The hostname or ip address of the exposed AGM endpoints, used + // by BAs to connect to BA proxy. + repeated string ba_proxy_uri = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + google.protobuf.BoolValue satisfies_pzs = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + bool satisfies_pzi = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for listing management servers. +message ListManagementServersRequest { + // Required. The project and location for which to retrieve management servers + // information, in the format 'projects/{project_id}/locations/{location}'. In + // Cloud BackupDR, locations map to Google Cloud regions, for example + // **us-central1**. To retrieve management servers for all locations, use "-" + // for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/ManagementServer" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + optional string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + optional string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing management servers. +message ListManagementServersResponse { + // The list of ManagementServer instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return management servers in reachable locations and + // the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated ManagementServer management_servers = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for getting a management server instance. +message GetManagementServerRequest { + // Required. Name of the management server resource name, in the format + // 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/ManagementServer" + } + ]; +} + +// Request message for creating a management server instance. +message CreateManagementServerRequest { + // Required. The management server project and location in the format + // 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR + // locations map to Google Cloud regions, for example **us-central1**. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/ManagementServer" + } + ]; + + // Required. The name of the management server to create. The name must be + // unique for the specified project and location. + string management_server_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A [management server + // resource][google.cloud.backupdr.v1.ManagementServer] + ManagementServer management_server = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional 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]; +} + +// Request message for deleting a management server instance. +message DeleteManagementServerRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/ManagementServer" + } + ]; + + // Optional. An optional 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. AdditionalInfo contains additional Info related to backup plan + // association resource. + map additional_info = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplan.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplan.proto new file mode 100644 index 00000000000..c64986bf364 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplan.proto @@ -0,0 +1,438 @@ +// 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.backupdr.v1; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/dayofweek.proto"; +import "google/type/month.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1"; +option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupPlanProto"; +option java_package = "com.google.cloud.backupdr.v1"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1"; +option ruby_package = "Google::Cloud::BackupDR::V1"; + +// A `BackupPlan` specifies some common fields, such as `description` as well +// as one or more `BackupRule` messages. Each `BackupRule` has a retention +// policy and defines a schedule by which the system is to perform backup +// workloads. +message BackupPlan { + option (google.api.resource) = { + type: "backupdr.googleapis.com/BackupPlan" + pattern: "projects/{project}/locations/{location}/backupPlans/{backup_plan}" + plural: "backupPlans" + singular: "backupPlan" + }; + + // `State` enumerates the possible states for a `BackupPlan`. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The resource is being created. + CREATING = 1; + + // The resource has been created and is fully usable. + ACTIVE = 2; + + // The resource is being deleted. + DELETING = 3; + + // The resource has been created but is not usable. + INACTIVE = 4; + } + + // Output only. Identifier. The resource name of the `BackupPlan`. + // + // Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Optional. The description of the `BackupPlan` resource. + // + // The description allows for additional details about `BackupPlan` and its + // use cases to be provided. An example description is the following: "This + // is a backup plan that performs a daily backup at 6pm and retains data for 3 + // months". The description must be at most 2048 characters. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This collection of key/value pairs allows for custom labels to be + // supplied by the user. Example, {"tag": "Weekly"}. + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. When the `BackupPlan` was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the `BackupPlan` was last updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The backup rules for this `BackupPlan`. There must be at least + // one `BackupRule` message. + repeated BackupRule backup_rules = 6 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The `State` for the `BackupPlan`. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The resource type to which the `BackupPlan` will be applied. + // Examples include, "compute.googleapis.com/Instance" and + // "storage.googleapis.com/Bucket". + string resource_type = 8 [(google.api.field_behavior) = REQUIRED]; + + // Optional. `etag` is returned from the service in the response. As a user of + // the service, you may provide an etag value in this field to prevent stale + // resources. + string etag = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Resource name of backup vault which will be used as storage + // location for backups. Format: + // projects/{project}/locations/{location}/backupVaults/{backupvault} + string backup_vault = 10 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Output only. The Google Cloud Platform Service Account to be used by the + // BackupVault for taking backups. Specify the email address of the Backup + // Vault Service Account. + string backup_vault_service_account = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `BackupRule` binds the backup schedule to a retention policy. +message BackupRule { + // Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is + // unique per `BackupPlan`.The `rule_id` must start with a lowercase letter + // followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, + // /[a-z][a-z0-9-]{,62}/. + string rule_id = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Configures the duration for which backup data will be kept. It is + // defined in “days”. The value should be greater than or equal to minimum + // enforced retention of the backup vault. + int32 backup_retention_days = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. + // + // The schedule that defines the automated backup workloads for this + // `BackupRule`. + oneof backup_schedule_oneof { + // Required. Defines a schedule that runs within the confines of a defined + // window of time. + StandardSchedule standard_schedule = 5 + [(google.api.field_behavior) = REQUIRED]; + } +} + +// `StandardSchedule` defines a schedule that run within the confines of a +// defined window of days. We can define recurrence type for schedule as +// HOURLY, DAILY, WEEKLY, MONTHLY or YEARLY. +message StandardSchedule { + // `RecurrenceTypes` enumerates the applicable periodicity for the schedule. + enum RecurrenceType { + // recurrence type not set + RECURRENCE_TYPE_UNSPECIFIED = 0; + + // The `BackupRule` is to be applied hourly. + HOURLY = 1; + + // The `BackupRule` is to be applied daily. + DAILY = 2; + + // The `BackupRule` is to be applied weekly. + WEEKLY = 3; + + // The `BackupRule` is to be applied monthly. + MONTHLY = 4; + + // The `BackupRule` is to be applied yearly. + YEARLY = 5; + } + + // Required. Specifies the `RecurrenceType` for the schedule. + RecurrenceType recurrence_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Specifies frequency for hourly backups. A hourly frequency of 2 + // means jobs will run every 2 hours from start time till end time defined. + // + // This is required for `recurrence_type`, `HOURLY` and is not applicable + // otherwise. A validation error will occur if a value is supplied and + // `recurrence_type` is not `HOURLY`. + // + // Value of hourly frequency should be between 6 and 23. + // + // Reason for limit : We found that there is bandwidth limitation of 3GB/S for + // GMI while taking a backup and 5GB/S while doing a restore. Given the amount + // of parallel backups and restore we are targeting, this will potentially + // take the backup time to mins and hours (in worst case scenario). + int32 hourly_frequency = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs + // will run. + // + // This is required for `recurrence_type`, `WEEKLY` and is not applicable + // otherwise. A validation error will occur if a value is supplied and + // `recurrence_type` is not `WEEKLY`. + repeated google.type.DayOfWeek days_of_week = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies days of months like 1, 5, or 14 on which jobs will run. + // + // Values for `days_of_month` are only applicable for `recurrence_type`, + // `MONTHLY` and `YEARLY`. A validation error will occur if other values are + // supplied. + repeated int32 days_of_month = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST + // MONDAY, on which jobs will run. This will be specified by two fields in + // `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week, + // e.g. `LAST`. + // + // This field is only applicable for `recurrence_type`, `MONTHLY` and + // `YEARLY`. A validation error will occur if other values are supplied. + WeekDayOfMonth week_day_of_month = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on + // which jobs will run. + // + // This field is only applicable when `recurrence_type` is `YEARLY`. A + // validation error will occur if other values are supplied. + repeated google.type.Month months = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. A BackupWindow defines the window of day during which backup jobs + // will run. Jobs are queued at the beginning of the window and will be marked + // as `NOT_RUN` if they do not start by the end of the window. + // + // Note: running jobs will not be cancelled at the end of the window. + BackupWindow backup_window = 7 [(google.api.field_behavior) = REQUIRED]; + + // Required. The time zone to be used when interpreting the schedule. + // The value of this field must be a time zone name from the IANA tz database. + // See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the + // list of valid timezone names. For e.g., Europe/Paris. + string time_zone = 8 [(google.api.field_behavior) = REQUIRED]; +} + +// `BackupWindow` defines a window of the day during which backup jobs will run. +message BackupWindow { + // Required. The hour of day (0-23) when the window starts for e.g. if value + // of start hour of day is 6 that mean backup window start at 6:00. + int32 start_hour_of_day = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The hour of day (1-24) when the window end for e.g. if value of + // end hour of day is 10 that mean backup window end time is 10:00. + // + // End hour of day should be greater than start hour of day. + // 0 <= start_hour_of_day < end_hour_of_day <= 24 + // + // End hour of day is not include in backup window that mean if + // end_hour_of_day= 10 jobs should start before 10:00. + int32 end_hour_of_day = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `WeekDayOfMonth` defines the week day of the month on which the backups will +// run. The message combines a `WeekOfMonth` and `DayOfWeek` to produce values +// like `FIRST`/`MONDAY` or `LAST`/`FRIDAY`. +message WeekDayOfMonth { + // `WeekOfMonth` enumerates possible weeks in the month, e.g. the first, + // third, or last week of the month. + enum WeekOfMonth { + // The zero value. Do not use. + WEEK_OF_MONTH_UNSPECIFIED = 0; + + // The first week of the month. + FIRST = 1; + + // The second week of the month. + SECOND = 2; + + // The third week of the month. + THIRD = 3; + + // The fourth week of the month. + FOURTH = 4; + + // The last week of the month. + LAST = 5; + } + + // Required. Specifies the week of the month. + WeekOfMonth week_of_month = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Specifies the day of the week. + google.type.DayOfWeek day_of_week = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for creating a `BackupPlan`. +message CreateBackupPlanRequest { + // Required. The `BackupPlan` project and location in the format + // `projects/{project}/locations/{location}`. In Cloud BackupDR locations + // map to GCP regions, for example **us-central1**. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlan" + } + ]; + + // Required. The name of the `BackupPlan` to create. The name must be unique + // for the specified project and location.The name must start with a lowercase + // letter followed by up to 62 lowercase letters, numbers, or hyphens. + // Pattern, /[a-z][a-z0-9-]{,62}/. + string backup_plan_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `BackupPlan` resource object to create. + BackupPlan backup_plan = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional 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 t + // he 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// The request message for getting a list `BackupPlan`. +message ListBackupPlansRequest { + // Required. The project and location for which to retrieve `BackupPlans` + // information. Format: `projects/{project}/locations/{location}`. In Cloud + // BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + // retrieve backup plans for all locations, use "-" for the + // `{location}` value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlan" + } + ]; + + // Optional. The maximum number of `BackupPlans` to return in a single + // response. If not specified, a default value will be chosen by the service. + // Note that the response may include a partial list and a caller should + // only rely on the response's + // [next_page_token][google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token] + // to determine if there are more instances left to be queried. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value of + // [next_page_token][google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token] + // received from a previous `ListBackupPlans` call. + // Provide this to retrieve the subsequent page in a multi-page list of + // results. When paginating, all other parameters provided to + // `ListBackupPlans` must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field match expression used to filter the results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field by which to sort the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for getting a list of `BackupPlan`. +message ListBackupPlansResponse { + // The list of `BackupPlans` in the project for the specified + // location. + // + // If the `{location}` value in the request is "-", the response contains a + // list of resources from all locations. In case any location is unreachable, + // the response will only return backup plans in reachable locations and + // the 'unreachable' field will be populated with a list of unreachable + // locations. + // BackupPlan + repeated BackupPlan backup_plans = 1; + + // A token which may be sent as + // [page_token][google.cloud.backupdr.v1.ListBackupPlansRequest.page_token] in + // a subsequent `ListBackupPlans` call to retrieve the next page of results. + // If this field is omitted or empty, then there are no more results to + // return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request message for getting a `BackupPlan`. +message GetBackupPlanRequest { + // Required. The resource name of the `BackupPlan` to retrieve. + // + // Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + } + ]; +} + +// The request message for deleting a `BackupPlan`. +message DeleteBackupPlanRequest { + // Required. The resource name of the `BackupPlan` to delete. + // + // Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + } + ]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplanassociation.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplanassociation.proto new file mode 100644 index 00000000000..b807a2b916c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplanassociation.proto @@ -0,0 +1,313 @@ +// 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.backupdr.v1; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1"; +option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupPlanAssociationProto"; +option java_package = "com.google.cloud.backupdr.v1"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1"; +option ruby_package = "Google::Cloud::BackupDR::V1"; + +// A BackupPlanAssociation represents a single BackupPlanAssociation which +// contains details like workload, backup plan etc +message BackupPlanAssociation { + option (google.api.resource) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + pattern: "projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}" + plural: "backupPlanAssociations" + singular: "backupPlanAssociation" + }; + + // Enum for State of BackupPlan Association + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The resource is being created. + CREATING = 1; + + // The resource has been created and is fully usable. + ACTIVE = 2; + + // The resource is being deleted. + DELETING = 3; + + // The resource has been created but is not usable. + INACTIVE = 4; + } + + // Output only. Identifier. The resource name of BackupPlanAssociation in + // below format Format : + // projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId} + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. Resource type of workload on which backupplan is applied + string resource_type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Immutable. Resource name of workload on which backupplan is + // applied + string resource = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Required. Resource name of backup plan which needs to be applied on + // workload. Format: + // projects/{project}/locations/{location}/backupPlans/{backupPlanId} + string backup_plan = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + } + ]; + + // Output only. The time when the instance was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The BackupPlanAssociation resource state. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The config info related to backup rules. + repeated RuleConfigInfo rules_config_info = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Output Only. + // + // Resource name of data source which will be used as storage location for + // backups taken. + // Format : + // projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource} + string data_source = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Message for rules config info. +message RuleConfigInfo { + // Enum for LastBackupState + enum LastBackupState { + // State not set. + LAST_BACKUP_STATE_UNSPECIFIED = 0; + + // The first backup is pending. + FIRST_BACKUP_PENDING = 1; + + // The most recent backup could not be run/failed because of the lack of + // permissions. + PERMISSION_DENIED = 2; + + // The last backup operation succeeded. + SUCCEEDED = 3; + + // The last backup operation failed. + FAILED = 4; + } + + // Output only. Output Only. + // + // Backup Rule id fetched from backup plan. + string rule_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last backup state for rule. + LastBackupState last_backup_state = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Output Only. + // + // google.rpc.Status object to store the last backup error. + google.rpc.Status last_backup_error = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The point in time when the last successful backup was captured + // from the source. + google.protobuf.Timestamp last_successful_backup_consistency_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for creating a backup plan. +message CreateBackupPlanAssociationRequest { + // Required. The backup plan association project and location in the format + // `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations + // map to GCP regions, for example **us-central1**. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Required. The name of the backup plan association to create. The name must + // be unique for the specified project and location. + string backup_plan_association_id = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created + BackupPlanAssociation backup_plan_association = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional 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 t + // he 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for List BackupPlanAssociation +message ListBackupPlanAssociationsRequest { + // Required. The project and location for which to retrieve backup Plan + // Associations information, in the format + // `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + // map to GCP regions, for example **us-central1**. To retrieve backup plan + // associations for all locations, use "-" for the + // `{location}` value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for List BackupPlanAssociation +message ListBackupPlanAssociationsResponse { + // The list of Backup Plan Associations in the project for the specified + // location. + // + // If the `{location}` value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return backup plan associations in reachable + // locations and the 'unreachable' field will be populated with a list of + // unreachable locations. + repeated BackupPlanAssociation backup_plan_associations = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for getting a BackupPlanAssociation resource. +message GetBackupPlanAssociationRequest { + // Required. Name of the backup plan association resource, in the format + // `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; +} + +// Request message for deleting a backup plan association. +message DeleteBackupPlanAssociationRequest { + // Required. Name of the backup plan association resource, in the format + // `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for triggering a backup. +message TriggerBackupRequest { + // Required. Name of the backup plan association resource, in the format + // `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Required. backup rule_id for which a backup needs to be triggered. + string rule_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional 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 = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault.proto new file mode 100644 index 00000000000..f50ee7ecc4e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault.proto @@ -0,0 +1,1378 @@ +// 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.backupdr.v1; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/backupdr/v1/backupvault_ba.proto"; +import "google/cloud/backupdr/v1/backupvault_gce.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1"; +option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupVaultProto"; +option java_package = "com.google.cloud.backupdr.v1"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1"; +option ruby_package = "Google::Cloud::BackupDR::V1"; + +// Message describing a BackupVault object. +message BackupVault { + option (google.api.resource) = { + type: "backupdr.googleapis.com/BackupVault" + pattern: "projects/{project}/locations/{location}/backupVaults/{backupvault}" + plural: "backupVaults" + singular: "backupVault" + }; + + // Holds the state of the backup vault resource. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The backup vault is being created. + CREATING = 1; + + // The backup vault has been created and is fully usable. + ACTIVE = 2; + + // The backup vault is being deleted. + DELETING = 3; + + // The backup vault is experiencing an issue and might be unusable. + ERROR = 4; + } + + // Holds the access restriction for the backup vault. + enum AccessRestriction { + // Access restriction not set. + ACCESS_RESTRICTION_UNSPECIFIED = 0; + + // Access to or from resources outside your current project will be denied. + WITHIN_PROJECT = 1; + + // Access to or from resources outside your current organization will be + // denied. + WITHIN_ORGANIZATION = 2; + + // No access restriction. + UNRESTRICTED = 3; + } + + // Output only. Identifier. Name of the backup vault to create. It must have + // the + // format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`. + // `{backupvault}` cannot be changed after creation. It must be between 3-63 + // characters long and must be unique within the project and location. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Optional. The description of the BackupVault instance (2048 characters or + // less). + optional string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource labels to represent user provided metadata. + // No labels currently defined: + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the instance was created. + optional google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + optional google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The default and minimum enforced retention for each backup within + // the backup vault. The enforced retention for each backup can be extended. + optional google.protobuf.Duration backup_minimum_enforced_retention_duration = + 20 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Set to true when there are no backups nested under this + // resource. + optional bool deletable = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Server specified ETag for the backup vault resource to + // prevent simultaneous updates from overwiting each other. + optional string etag = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The BackupVault resource instance state. + State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Time after which the BackupVault resource is locked. + optional google.protobuf.Timestamp effective_time = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The number of backups in this backup vault. + int64 backup_count = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Service account used by the BackupVault Service for this + // BackupVault. The user should grant this account permissions in their + // workload project to enable the service to run backups and restores there. + string service_account = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Total size of the storage used by all backup resources. + int64 total_stored_bytes = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Output only + // Immutable after resource creation until resource deletion. + string uid = 21 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. User annotations. See https://google.aip.dev/128#annotations + // Stores small amounts of arbitrary data. + map annotations = 22 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Note: This field is added for future use case and will not be + // supported in the current release. + // + // Optional. + // + // Access restriction for the backup vault. + // Default value is WITHIN_ORGANIZATION if not provided during creation. + AccessRestriction access_restriction = 24 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Message describing a DataSource object. +// Datasource object used to represent Datasource details for both admin and +// basic view. +message DataSource { + option (google.api.resource) = { + type: "backupdr.googleapis.com/DataSource" + pattern: "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}" + plural: "dataSources" + singular: "dataSource" + }; + + // Holds the state of the data source resource. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The data source is being created. + CREATING = 1; + + // The data source has been created and is fully usable. + ACTIVE = 2; + + // The data source is being deleted. + DELETING = 3; + + // The data source is experiencing an issue and might be unusable. + ERROR = 4; + } + + // Output only. Identifier. Name of the datasource to create. + // It must have the + // format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`. + // `{datasource}` cannot be changed after creation. It must be between 3-63 + // characters long and must be unique within the backup vault. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Output only. The DataSource resource instance state. + State state = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Resource labels to represent user provided metadata. + // No labels currently defined: + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the instance was created. + optional google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + optional google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Number of backups in the data source. + optional int64 backup_count = 7; + + // Server specified ETag for the ManagementServer resource to prevent + // simultaneous updates from overwiting each other. + optional string etag = 14; + + // The number of bytes (metadata and data) stored in this datasource. + optional int64 total_stored_bytes = 23; + + // Output only. The backup configuration state. + BackupConfigState config_state = 24 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Details of how the resource is configured for backup. + BackupConfigInfo backup_config_info = 25 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The source resource that is represented by this DataSource. It can be a + // Google Cloud resource, or one backed up by a Backup Appliance. + oneof source_resource { + // The backed up resource is a Google Cloud resource. + // The word 'DataSource' was included in the names to indicate that this is + // the representation of the Google Cloud resource used within the + // DataSource object. + DataSourceGcpResource data_source_gcp_resource = 26; + + // The backed up resource is a backup appliance application. + DataSourceBackupApplianceApplication + data_source_backup_appliance_application = 27; + } +} + +// BackupConfigInfo has information about how the resource is configured +// for Backup and about the most recent backup to this vault. +message BackupConfigInfo { + // LastBackupstate tracks whether the last backup was not yet started, + // successful, failed, or could not be run because of the lack of permissions. + enum LastBackupState { + // Status not set. + LAST_BACKUP_STATE_UNSPECIFIED = 0; + + // The first backup has not yet completed + FIRST_BACKUP_PENDING = 1; + + // The most recent backup was successful + SUCCEEDED = 2; + + // The most recent backup failed + FAILED = 3; + + // The most recent backup could not be run/failed because of the lack of + // permissions + PERMISSION_DENIED = 4; + } + + // Output only. The status of the last backup to this BackupVault + LastBackupState last_backup_state = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If the last backup were successful, this field has the + // consistency date. + google.protobuf.Timestamp last_successful_backup_consistency_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If the last backup failed, this field has the error message. + google.rpc.Status last_backup_error = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Configuration Info has the resource format-specific configuration. + oneof backup_config { + // Configuration for a Google Cloud resource. + GcpBackupConfig gcp_backup_config = 4; + + // Configuration for an application backed up by a Backup Appliance. + BackupApplianceBackupConfig backup_appliance_backup_config = 5; + } +} + +// GcpBackupConfig captures the Backup configuration details for Google Cloud +// resources. All Google Cloud resources regardless of type are protected with +// backup plan associations. +message GcpBackupConfig { + // The name of the backup plan. + string backup_plan = 1 [(google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + }]; + + // The description of the backup plan. + string backup_plan_description = 2; + + // The name of the backup plan association. + string backup_plan_association = 3 [(google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + }]; + + // The names of the backup plan rules which point to this backupvault + repeated string backup_plan_rules = 4; +} + +// BackupApplianceBackupConfig captures the backup configuration for +// applications that are protected by Backup Appliances. +message BackupApplianceBackupConfig { + // The name of the backup appliance. + string backup_appliance_name = 1; + + // The ID of the backup appliance. + int64 backup_appliance_id = 2; + + // The ID of the SLA of this application. + int64 sla_id = 3; + + // The name of the application. + string application_name = 4; + + // The name of the host where the application is running. + string host_name = 5; + + // The name of the SLT associated with the application. + string slt_name = 6; + + // The name of the SLP associated with the application. + string slp_name = 7; +} + +// DataSourceGcpResource is used for protected resources that are Google Cloud +// Resources. This name is easeier to understand than GcpResourceDataSource or +// GcpDataSourceResource +message DataSourceGcpResource { + // Output only. Full resource pathname URL of the source Google Cloud + // resource. + string gcp_resourcename = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Location of the resource: //"global"/"unspecified". + string location = 2; + + // The type of the Google Cloud resource. Use the Unified Resource Type, + // eg. compute.googleapis.com/Instance. + string type = 3; + + // gcp_Properties has properties of the Google Cloud Resource. + oneof gcp_resource_properties { + // ComputeInstanceDataSourceProperties has a subset of Compute Instance + // properties that are useful at the Datasource level. + ComputeInstanceDataSourceProperties compute_instance_datasource_properties = + 4; + } +} + +// BackupApplianceApplication describes a Source Resource when it is an +// application backed up by a BackupAppliance. +message DataSourceBackupApplianceApplication { + // The name of the Application as known to the Backup Appliance. + string application_name = 1; + + // Appliance name. + string backup_appliance = 2; + + // Appliance Id of the Backup Appliance. + int64 appliance_id = 3; + + // The type of the application. e.g. VMBackup + string type = 4; + + // The appid field of the application within the Backup Appliance. + int64 application_id = 8; + + // Hostname of the host where the application is running. + string hostname = 6; + + // Hostid of the application host. + int64 host_id = 7; +} + +// ServiceLockInfo represents the details of a lock taken by the service on a +// Backup resource. +message ServiceLockInfo { + // Output only. The name of the operation that created this lock. + // The lock will automatically be released when the operation completes. + string operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// BackupApplianceLockInfo contains metadata about the backupappliance that +// created the lock. +message BackupApplianceLockInfo { + // Required. The ID of the backup/recovery appliance that created this lock. + int64 backup_appliance_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the backup/recovery appliance that created this lock. + string backup_appliance_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc. The + // value of this string is only meaningful to the client and it is not + // interpreted by the BackupVault service. + string lock_reason = 5 [(google.api.field_behavior) = REQUIRED]; + + // The information about this lock. + oneof lock_source { + // The job name on the backup/recovery appliance that created this lock. + string job_name = 6; + + // The image name that depends on this Backup. + string backup_image = 7; + + // The SLA on the backup/recovery appliance that owns the lock. + int64 sla_id = 8; + } +} + +// BackupLock represents a single lock on a Backup resource. An unexpired +// lock on a Backup prevents the Backup from being deleted. +message BackupLock { + // Required. The time after which this lock is not considered valid and will + // no longer protect the Backup from deletion. + google.protobuf.Timestamp lock_until_time = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Metadata about the owner and reason for the lock. + oneof ClientLockInfo { + // If the client is a backup and recovery appliance, this + // contains metadata about why the lock exists. + BackupApplianceLockInfo backup_appliance_lock_info = 3; + + // Output only. Contains metadata about the lock exist for Google Cloud + // native backups. + ServiceLockInfo service_lock_info = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// Message describing a Backup object. +message Backup { + option (google.api.resource) = { + type: "backupdr.googleapis.com/Backup" + pattern: "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}" + plural: "backups" + singular: "backup" + }; + + // Holds the state of the backup resource. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The backup is being created. + CREATING = 1; + + // The backup has been created and is fully usable. + ACTIVE = 2; + + // The backup is being deleted. + DELETING = 3; + + // The backup is experiencing an issue and might be unusable. + ERROR = 4; + } + + // Type of the backup, scheduled or ondemand. + enum BackupType { + // Backup type is unspecified. + BACKUP_TYPE_UNSPECIFIED = 0; + + // Scheduled backup. + SCHEDULED = 1; + + // On demand backup. + ON_DEMAND = 2; + } + + // GCPBackupPlanInfo captures the plan configuration details of Google Cloud + // resources at the time of backup. + message GCPBackupPlanInfo { + // Resource name of backup plan by which workload is protected at the time + // of the backup. + // Format: + // projects/{project}/locations/{location}/backupPlans/{backupPlanId} + string backup_plan = 1 [(google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + }]; + + // The rule id of the backup plan which triggered this backup in case of + // scheduled backup or used for + string backup_plan_rule_id = 2; + } + + // Output only. Identifier. Name of the backup to create. It must have the + // format`"projects//locations//backupVaults//dataSources/{datasource}/backups/{backup}"`. + // `{backup}` cannot be changed after creation. It must be between 3-63 + // characters long and must be unique within the datasource. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Output only. The description of the Backup instance (2048 characters or + // less). + optional string description = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was created. + optional google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + optional google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Resource labels to represent user provided metadata. + // No labels currently defined. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The backup can not be deleted before this time. + optional google.protobuf.Timestamp enforced_retention_end_time = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When this backup is automatically expired. + optional google.protobuf.Timestamp expire_time = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The point in time when this backup was captured from the + // source. + optional google.protobuf.Timestamp consistency_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Server specified ETag to prevent updates from overwriting each + // other. + optional string etag = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The Backup resource instance state. + State state = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The list of BackupLocks taken by the service to prevent the + // deletion of the backup. + repeated BackupLock service_locks = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The list of BackupLocks taken by the accessor Backup Appliance. + repeated BackupLock backup_appliance_locks = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Workload specific backup properties. + oneof backup_properties { + // Output only. Compute Engine specific backup properties. + ComputeInstanceBackupProperties compute_instance_backup_properties = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Backup Appliance specific backup properties. + BackupApplianceBackupProperties backup_appliance_backup_properties = 21 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Type of the backup, unspecified, scheduled or ondemand. + BackupType backup_type = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Configuration Info has the resource format-specific configuration. + oneof plan_info { + // Output only. Configuration for a Google Cloud resource. + GCPBackupPlanInfo gcp_backup_plan_info = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. source resource size in bytes at the time of the backup. + int64 resource_size_bytes = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Message for creating a BackupVault. +message CreateBackupVaultRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Required. ID of the requesting object + // If auto-generating ID server-side, remove this field and + // backup_vault_id from the method_signature of Create RPC + string backup_vault_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created + BackupVault backup_vault = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is 'false'. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for listing backupvault stores. +message ListBackupVaultsRequest { + // Required. The project and location for which to retrieve backupvault stores + // information, in the format 'projects/{project_id}/locations/{location}'. In + // Cloud Backup and DR, locations map to Google Cloud regions, for example + // **us-central1**. + // To retrieve backupvault stores for all locations, use "-" for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Reserved for future use to provide a BASIC & FULL view of Backup + // Vault. + BackupVaultView view = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing BackupVaults. +message ListBackupVaultsResponse { + // The list of BackupVault instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return backup vaults in reachable locations and + // the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated BackupVault backup_vaults = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for fetching usable BackupVaults. +message FetchUsableBackupVaultsRequest { + // Required. The project and location for which to retrieve backupvault stores + // information, in the format 'projects/{project_id}/locations/{location}'. In + // Cloud Backup and DR, locations map to Google Cloud regions, for example + // **us-central1**. + // To retrieve backupvault stores for all locations, use "-" for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for fetching usable BackupVaults. +message FetchUsableBackupVaultsResponse { + // The list of BackupVault instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return backup vaults in reachable locations and + // the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated BackupVault backup_vaults = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for getting a BackupVault. +message GetBackupVaultRequest { + // Required. Name of the backupvault store resource name, in the format + // 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Optional. Reserved for future use to provide a BASIC & FULL view of Backup + // Vault + BackupVaultView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for updating a BackupVault. +message UpdateBackupVaultRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // BackupVault 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 the request will fail. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated + BackupVault backup_vault = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is 'false'. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, will not check plan duration against backup vault + // enforcement duration. + bool force = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for deleting a BackupVault. +message DeleteBackupVaultRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. If set to true, any data source from this backup vault will also + // be deleted. + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; + + // The current etag of the backup vault. + // If an etag is provided and does not match the current etag of the + // connection, deletion will be blocked. + string etag = 4; + + // Optional. Only validate the request, but do not perform mutations. + // The default is 'false'. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true and the BackupVault is not found, the request will + // succeed but no action will be taken. + bool allow_missing = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for listing DataSources. +message ListDataSourcesRequest { + // Required. The project and location for which to retrieve data + // sources information, in the format + // 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + // locations map to Google Cloud regions, for example **us-central1**. + // To retrieve data sources for all locations, use "-" for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/DataSource" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing DataSources. +message ListDataSourcesResponse { + // The list of DataSource instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return data sources in reachable locations + // and the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated DataSource data_sources = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for getting a DataSource instance. +message GetDataSourceRequest { + // Required. Name of the data source resource name, in the format + // 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/DataSource" + } + ]; +} + +// Request message for updating a data source instance. +message UpdateDataSourceRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // DataSource 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 the request will fail. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated + DataSource data_source = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Enable upsert. + bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for deleting a DataSource. +message RemoveDataSourceRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/DataSource" + } + ]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for SetStatusInternal method. +message SetInternalStatusRequest { + // Required. The resource name of the instance, in the format + // 'projects/*/locations/*/backupVaults/*/dataSources/'. + string data_source = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/DataSource" + } + ]; + + // Required. The value required for this method to work. This field must be + // the 32-byte SHA256 hash of the DataSourceID. The DataSourceID used here is + // only the final piece of the fully qualified resource path for this + // DataSource (i.e. the part after '.../dataSources/'). This field exists to + // make this method difficult to call since it is intended for use only by + // Backup Appliances. + bytes value = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Output only. The new BackupConfigState to set for the DataSource. + BackupConfigState backup_config_state = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. An optional 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. 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Response message from SetStatusInternal method. +message SetInternalStatusResponse {} + +// request message for InitiateBackup. +message InitiateBackupRequest { + // Required. The resource name of the instance, in the format + // 'projects/*/locations/*/backupVaults/*/dataSources/'. + string data_source = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/DataSource" + } + ]; + + // Optional. An optional 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 = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Required. Resource ID of the Backup resource. + string backup_id = 5 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for InitiateBackup. +message InitiateBackupResponse { + // The name of the backup that was created. + string backup = 1; + + // The generation id of the new backup. + int32 new_backup_generation_id = 2; + + // The generation id of the base backup. It is needed for the incremental + // backups. + int32 base_backup_generation_id = 3; +} + +// request message for AbandonBackup. +message AbandonBackupRequest { + // Required. The resource name of the instance, in the format + // 'projects/*/locations/*/backupVaults/*/dataSources/'. + string data_source = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/DataSource" + } + ]; + + // Optional. An optional 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 = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for finalizing a Backup. +message FinalizeBackupRequest { + // Required. The resource name of the instance, in the format + // 'projects/*/locations/*/backupVaults/*/dataSources/'. + string data_source = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/DataSource" + } + ]; + + // This will be assigned to the description field of the newly created Backup. + optional string description = 2; + + // The point in time when this backup was captured from the source. This will + // be assigned to the consistency_time field of the newly created Backup. + optional google.protobuf.Timestamp consistency_time = 3; + + // Optional. An optional 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 = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Required. Resource ID of the Backup resource to be finalized. This must be + // the same backup_id that was used in the InitiateBackupRequest. + string backup_id = 5 [(google.api.field_behavior) = REQUIRED]; + + // The earliest timestamp of data available in this Backup. This will set on + // the newly created Backup. + optional google.protobuf.Timestamp recovery_range_start_time = 6; + + // The latest timestamp of data available in this Backup. This will be set on + // the newly created Backup. + optional google.protobuf.Timestamp recovery_range_end_time = 7; + + // The ExpireTime on the backup will be set to FinalizeTime plus this + // duration. If the resulting ExpireTime is less than + // EnforcedRetentionEndTime, then ExpireTime is set to + // EnforcedRetentionEndTime. + optional google.protobuf.Duration retention_duration = 9; +} + +// Request message for FetchAccessToken. +message FetchAccessTokenRequest { + // Required. The resource name for the location for which static IPs should be + // returned. + // Must be in the format + // 'projects/*/locations/*/backupVaults/*/dataSources'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/DataSource" + } + ]; + + // Required. The generation of the backup to update. + int32 generation_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for FetchAccessToken. +message FetchAccessTokenResponse { + // The location in bucket that can be used for reading. + string read_location = 1; + + // The location in bucket that can be used for writing. + string write_location = 2; + + // The downscoped token that was created. + string token = 3; + + // The token is valid until this time. + google.protobuf.Timestamp expire_time = 4; +} + +// Request message for listing Backups. +message ListBackupsRequest { + // Required. The project and location for which to retrieve backup + // information, in the format + // 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + // locations map to Google Cloud regions, for example **us-central1**. + // To retrieve data sources for all locations, use "-" for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/Backup" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Reserved for future use to provide a BASIC & FULL view of Backup + // resource. + BackupView view = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing Backups. +message ListBackupsResponse { + // The list of Backup instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return data sources in reachable locations + // and the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated Backup backups = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for getting a Backup. +message GetBackupRequest { + // Required. Name of the data source resource name, in the format + // 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "backupdr.googleapis.com/Backup" } + ]; + + // Optional. Reserved for future use to provide a BASIC & FULL view of Backup + // resource. + BackupView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for updating a Backup. +message UpdateBackupRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Backup 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 the request will fail. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated + Backup backup = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for deleting a Backup. +message DeleteBackupRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "backupdr.googleapis.com/Backup" } + ]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for restoring from a Backup. +message RestoreBackupRequest { + // Required. The resource name of the Backup instance, in the format + // 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "backupdr.googleapis.com/Backup" } + ]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // The target environment for the restore operation. + oneof target_environment { + // Compute Engine target environment to be used during restore. + ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + } + + // The property overrides for the instance being restored. + oneof instance_properties { + // Compute Engine instance properties to be overridden during restore. + ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + } +} + +// Response message for restoring from a Backup. +message RestoreBackupResponse { + // Details of the target resource created/modified as part of restore. + TargetResource target_resource = 1; +} + +// Details of the target resource created/modified as part of restore. +message TargetResource { + // Minimum details to identify the restored resource. + oneof target_resource_info { + // Details of the native Google Cloud resource created as part of restore. + GcpResource gcp_resource = 1; + } +} + +// Minimum details to identify a Google Cloud resource +message GcpResource { + // Name of the Google Cloud resource. + string gcp_resourcename = 1; + + // Location of the resource: //"global"/"unspecified". + string location = 2; + + // Type of the resource. Use the Unified Resource Type, + // eg. compute.googleapis.com/Instance. + string type = 3; +} + +// Backup configuration state. Is the resource configured for backup? +enum BackupConfigState { + // The possible states of backup configuration. + // Status not set. + BACKUP_CONFIG_STATE_UNSPECIFIED = 0; + + // The data source is actively protected (i.e. there is a + // BackupPlanAssociation or Appliance SLA pointing to it) + ACTIVE = 1; + + // The data source is no longer protected (but may have backups under it) + PASSIVE = 2; +} + +// BackupView contains enum options for Partial and Full view. +enum BackupView { + // If the value is not set, the default 'FULL' view is used. + BACKUP_VIEW_UNSPECIFIED = 0; + + // Includes basic data about the Backup, but not the full contents. + BACKUP_VIEW_BASIC = 1; + + // Includes all data about the Backup. + // This is the default value (for both ListBackups and GetBackup). + BACKUP_VIEW_FULL = 2; +} + +// BackupVaultView contains enum options for Partial and Full view. +enum BackupVaultView { + // If the value is not set, the default 'FULL' view is used. + BACKUP_VAULT_VIEW_UNSPECIFIED = 0; + + // Includes basic data about the Backup Vault, but not the full contents. + BACKUP_VAULT_VIEW_BASIC = 1; + + // Includes all data about the Backup Vault. + // This is the default value (for both ListBackupVaults and GetBackupVault). + BACKUP_VAULT_VIEW_FULL = 2; +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_ba.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_ba.proto new file mode 100644 index 00000000000..619b7a34290 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_ba.proto @@ -0,0 +1,49 @@ +// 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.backupdr.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1"; +option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupvaultBaProto"; +option java_package = "com.google.cloud.backupdr.v1"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1"; +option ruby_package = "Google::Cloud::BackupDR::V1"; + +// BackupApplianceBackupProperties represents BackupDR backup appliance's +// properties. +message BackupApplianceBackupProperties { + // Output only. The numeric generation ID of the backup (monotonically + // increasing). + optional int32 generation_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when this backup object was finalized (if none, + // backup is not finalized). + optional google.protobuf.Timestamp finalize_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The earliest timestamp of data available in this Backup. + optional google.protobuf.Timestamp recovery_range_start_time = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The latest timestamp of data available in this Backup. + optional google.protobuf.Timestamp recovery_range_end_time = 4 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_gce.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_gce.proto new file mode 100644 index 00000000000..cab0c0a7dc5 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_gce.proto @@ -0,0 +1,949 @@ +// 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.backupdr.v1; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1"; +option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupvaultGceProto"; +option java_package = "com.google.cloud.backupdr.v1"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1"; +option ruby_package = "Google::Cloud::BackupDR::V1"; + +// ComputeInstanceBackupProperties represents Compute Engine instance backup +// properties. +message ComputeInstanceBackupProperties { + // An optional text description for the instances that are created from these + // properties. + optional string description = 1; + + // A list of tags to apply to the instances that are created from these + // properties. The tags identify valid sources or targets for network + // firewalls. The setTags method can modify this list of tags. Each tag within + // the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt). + optional Tags tags = 2; + + // The machine type to use for instances that are created from these + // properties. + optional string machine_type = 3; + + // Enables instances created based on these properties to send packets with + // source IP addresses other than their own and receive packets with + // destination IP addresses other than their own. If these instances will be + // used as an IP gateway or it will be set as the next-hop in a Route + // resource, specify `true`. If unsure, leave this set to `false`. See the + // https://cloud.google.com/vpc/docs/using-routes#canipforward + // documentation for more information. + optional bool can_ip_forward = 4; + + // An array of network access configurations for this interface. + repeated NetworkInterface network_interface = 5; + + // An array of disks that are associated with the instances that are created + // from these properties. + repeated AttachedDisk disk = 6; + + // The metadata key/value pairs to assign to instances that are created from + // these properties. These pairs can consist of custom metadata or predefined + // keys. See https://cloud.google.com/compute/docs/metadata/overview for more + // information. + optional Metadata metadata = 7; + + // A list of service accounts with specified scopes. Access tokens for these + // service accounts are available to the instances that are created from + // these properties. Use metadata queries to obtain the access tokens for + // these instances. + repeated ServiceAccount service_account = 8; + + // Specifies the scheduling options for the instances that are created from + // these properties. + optional Scheduling scheduling = 9; + + // A list of guest accelerator cards' type and count to use for instances + // created from these properties. + repeated AcceleratorConfig guest_accelerator = 10; + + // Minimum cpu/platform to be used by instances. The instance may be + // scheduled on the specified or newer cpu/platform. Applicable values are the + // friendly names of CPU platforms, such as + // `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`. + // For more information, read + // https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + optional string min_cpu_platform = 11; + + // KeyRevocationActionType of the instance. Supported options are "STOP" and + // "NONE". The default value is "NONE" if it is not specified. + optional KeyRevocationActionType key_revocation_action_type = 12; + + // The source instance used to create this backup. This can be a partial or + // full URL to the resource. For example, the following are valid values: + // -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance + // -projects/project/zones/zone/instances/instance + optional string source_instance = 13; + + // Labels to apply to instances that are created from these properties. + map labels = 14; +} + +// ComputeInstanceRestoreProperties represents Compute Engine instance +// properties to be overridden during restore. +message ComputeInstanceRestoreProperties { + // The private IPv6 google access type for the VMs. + enum InstancePrivateIpv6GoogleAccess { + // Default value. This value is unused. + INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; + + // Each network interface inherits PrivateIpv6GoogleAccess from its + // subnetwork. + INHERIT_FROM_SUBNETWORK = 1; + + // Outbound private IPv6 access from VMs in this subnet to Google services. + // If specified, the subnetwork who is attached to the instance's default + // network interface will be assigned an internal IPv6 prefix if it doesn't + // have before. + ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2; + + // Bidirectional private IPv6 access to/from Google services. If + // specified, the subnetwork who is attached to the instance's default + // network interface will be assigned an internal IPv6 prefix if it doesn't + // have before. + ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3; + } + + // Required. Name of the compute instance. + optional string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Controls for advanced machine-related behavior features. + optional AdvancedMachineFeatures advanced_machine_features = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Allows this instance to send and receive packets with + // non-matching destination or source IPs. + optional bool can_ip_forward = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Controls Confidential compute options on the instance + optional ConfidentialInstanceConfig confidential_instance_config = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether the resource should be protected against deletion. + optional bool deletion_protection = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional description of this resource. Provide this property + // when you create the resource. + optional string description = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Array of disks associated with this instance. Persistent disks + // must be created before you can assign them. + repeated AttachedDisk disks = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Enables display device for the instance. + optional DisplayDevice display_device = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of the type and count of accelerator cards attached to the + // instance. + repeated AcceleratorConfig guest_accelerators = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the hostname of the instance. The specified hostname + // must be RFC1035 compliant. If hostname is not specified, the default + // hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global + // DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal + // DNS. + optional string hostname = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Encrypts suspended data for an instance with a + // customer-managed encryption key. + optional CustomerEncryptionKey instance_encryption_key = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. KeyRevocationActionType of the instance. + optional KeyRevocationActionType key_revocation_action_type = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels to apply to this instance. + map labels = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Full or partial URL of the machine type resource to use for this + // instance. + optional string machine_type = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This includes custom metadata and predefined keys. + optional Metadata metadata = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Minimum CPU platform to use for this instance. + optional string min_cpu_platform = 16 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An array of network configurations for this instance. These + // specify how interfaces are configured to interact with other network + // services, such as connecting to the internet. Multiple interfaces are + // supported per instance. + repeated NetworkInterface network_interfaces = 17 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configure network performance such as egress bandwidth tier. + optional NetworkPerformanceConfig network_performance_config = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Input only. Additional params passed with the request, but not persisted + // as part of resource payload. + optional InstanceParams params = 19 + [(google.api.field_behavior) = INPUT_ONLY]; + + // Optional. The private IPv6 google access type for the VM. + // If not specified, use INHERIT_FROM_SUBNETWORK as default. + optional InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the reservations that this instance can consume from. + optional AllocationAffinity allocation_affinity = 21 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource policies applied to this instance. + repeated string resource_policies = 22 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Sets the scheduling options for this instance. + optional Scheduling scheduling = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of service accounts, with their specified scopes, + // authorized for this instance. Only one service account per VM instance is + // supported. + repeated ServiceAccount service_accounts = 24 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Tags to apply to this instance. Tags are used to identify valid + // sources or targets for network firewalls and are specified by the client + // during instance creation. + optional Tags tags = 26 [(google.api.field_behavior) = OPTIONAL]; +} + +// ComputeInstanceTargetEnvironment represents Compute Engine target +// environment to be used during restore. +message ComputeInstanceTargetEnvironment { + // Required. Target project for the Compute Engine instance. + string project = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The zone of the Compute Engine instance. + string zone = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// ComputeInstanceDataSourceProperties represents the properties of a +// ComputeEngine resource that are stored in the DataSource. +message ComputeInstanceDataSourceProperties { + // Name of the compute instance backed up by the datasource. + string name = 1; + + // The description of the Compute Engine instance. + string description = 2; + + // The machine type of the instance. + string machine_type = 3; + + // The total number of disks attached to the Instance. + int64 total_disk_count = 4; + + // The sum of all the disk sizes. + int64 total_disk_size_gb = 5; +} + +// Specifies options for controlling advanced machine features. +message AdvancedMachineFeatures { + // Optional. Whether to enable nested virtualization or not (default is + // false). + optional bool enable_nested_virtualization = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of threads per physical core. To disable simultaneous + // multithreading (SMT) set this to 1. If unset, the maximum number + // of threads supported per core by the underlying processor is + // assumed. + optional int32 threads_per_core = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of physical cores to expose to an instance. Multiply + // by the number of threads per core to compute the total number of virtual + // CPUs to expose to the instance. If unset, the number of cores is + // inferred from the instance's nominal CPU count and the underlying + // platform's SMT width. + optional int32 visible_core_count = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to enable UEFI networking for instance creation. + optional bool enable_uefi_networking = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A set of Confidential Instance options. +message ConfidentialInstanceConfig { + // Optional. Defines whether the instance should have confidential compute + // enabled. + optional bool enable_confidential_compute = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A set of Display Device options +message DisplayDevice { + // Optional. Enables display for the Compute Engine VM + optional bool enable_display = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// A specification of the type and number of accelerator cards attached to the +// instance. +message AcceleratorConfig { + // Optional. Full or partial URL of the accelerator type resource to attach to + // this instance. + optional string accelerator_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of the guest accelerator cards exposed to this + // instance. + optional int32 accelerator_count = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A customer-supplied encryption key. +message CustomerEncryptionKey { + // The key to use for encryption. + oneof key { + // Optional. Specifies a 256-bit customer-supplied + // encryption key. + string raw_key = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. RSA-wrapped 2048-bit + // customer-supplied encryption key to either encrypt or decrypt this + // resource. + string rsa_encrypted_key = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the encryption key that is stored in Google Cloud + // KMS. + string kms_key_name = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The service account being used for the encryption request for the + // given KMS key. If absent, the Compute Engine default service account is + // used. + optional string kms_key_service_account = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A key/value pair to be used for storing metadata. +message Entry { + // Optional. Key for the metadata entry. + optional string key = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Value for the metadata entry. These are free-form strings, and + // only have meaning as interpreted by the image running in the instance. The + // only restriction placed on values is that their size must be less than + // or equal to 262144 bytes (256 KiB). + optional string value = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A metadata key/value entry. +message Metadata { + // Optional. Array of key/value pairs. The total size of all keys and values + // must be less than 512 KB. + repeated Entry items = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// A network interface resource attached to an instance. +// s +message NetworkInterface { + // Stack type for this network interface. + enum StackType { + // Default should be STACK_TYPE_UNSPECIFIED. + STACK_TYPE_UNSPECIFIED = 0; + + // The network interface will be assigned IPv4 address. + IPV4_ONLY = 1; + + // The network interface can have both IPv4 and IPv6 addresses. + IPV4_IPV6 = 2; + } + + // IPv6 access type for this network interface. + enum Ipv6AccessType { + // IPv6 access type not set. Means this network interface hasn't been + // turned on IPv6 yet. + UNSPECIFIED_IPV6_ACCESS_TYPE = 0; + + // This network interface can have internal IPv6. + INTERNAL = 1; + + // This network interface can have external IPv6. + EXTERNAL = 2; + } + + // Nic type for this network interface. + enum NicType { + // Default should be NIC_TYPE_UNSPECIFIED. + NIC_TYPE_UNSPECIFIED = 0; + + // VIRTIO + VIRTIO_NET = 1; + + // GVNIC + GVNIC = 2; + } + + // Optional. URL of the VPC network resource for this instance. + optional string network = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The URL of the Subnetwork resource for this instance. + optional string subnetwork = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An IPv4 internal IP address to assign to the instance for this + // network interface. If not specified by the user, an unused internal IP is + // assigned by the system. + optional string ip_address = 3 [ + (google.api.field_info).format = IPV4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. An IPv6 internal network address for this network interface. To + // use a static internal IP address, it must be unused and in the same region + // as the instance's zone. If not specified, Google Cloud will automatically + // assign an internal IPv6 address from the instance's subnetwork. + optional string ipv6_address = 4 [ + (google.api.field_info).format = IPV6, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. The prefix length of the primary internal IPv6 range. + optional int32 internal_ipv6_prefix_length = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. [Output Only] The name of the network interface, which is + // generated by the server. + optional string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. An array of configurations for this interface. Currently, only + // one access config,ONE_TO_ONE_NAT is supported. If there are no + // accessConfigs specified, then this instance will have + // no external internet access. + repeated AccessConfig access_configs = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An array of IPv6 access configurations for this interface. + // Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there + // is no ipv6AccessConfig specified, then this instance will + // have no external IPv6 Internet access. + repeated AccessConfig ipv6_access_configs = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An array of alias IP ranges for this network interface. + // You can only specify this field for network interfaces in VPC networks. + repeated AliasIpRange alias_ip_ranges = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // The stack type for this network interface. + optional StackType stack_type = 10; + + // Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the + // IP can be accessed from the Internet. This field is always inherited from + // its subnetwork. + optional Ipv6AccessType ipv6_access_type = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The networking queue count that's specified by users for the + // network interface. Both Rx and Tx queues will be set to this number. It'll + // be empty if not specified by the users. + optional int32 queue_count = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of vNIC to be used on this interface. This may be gVNIC + // or VirtioNet. + optional NicType nic_type = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The URL of the network attachment that this interface should + // connect to in the following format: + // projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}. + optional string network_attachment = 14 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Network performance configuration. +message NetworkPerformanceConfig { + // Network performance tier. + enum Tier { + // This value is unused. + TIER_UNSPECIFIED = 0; + + // Default network performance config. + DEFAULT = 1; + + // Tier 1 network performance config. + TIER_1 = 2; + } + + // Optional. The tier of the total egress bandwidth. + optional Tier total_egress_bandwidth_tier = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// An access configuration attached to an instance's network interface. +// Only one access config per instance is supported. +message AccessConfig { + // The type of configuration. + enum AccessType { + // Default value. This value is unused. + ACCESS_TYPE_UNSPECIFIED = 0; + + // ONE_TO_ONE_NAT + ONE_TO_ONE_NAT = 1; + + // Direct IPv6 access. + DIRECT_IPV6 = 2; + } + + // Network tier property used by addresses, instances and forwarding rules. + enum NetworkTier { + // Default value. This value is unused. + NETWORK_TIER_UNSPECIFIED = 0; + + // High quality, Google-grade network tier, support for all networking + // products. + PREMIUM = 1; + + // Public internet quality, only limited support for other networking + // products. + STANDARD = 2; + } + + // Optional. In accessConfigs (IPv4), the + // default and only option is ONE_TO_ONE_NAT. In + // ipv6AccessConfigs, the default and only option is + // DIRECT_IPV6. + optional AccessType type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of this access configuration. + optional string name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The external IP address of this access configuration. + optional string external_ip = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The external IPv6 address of this access configuration. + optional string external_ipv6 = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The prefix length of the external IPv6 range. + optional int32 external_ipv6_prefix_length = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies whether a public DNS 'PTR' record should be created to + // map the external IP address of the instance to a DNS domain name. + optional bool set_public_ptr = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The DNS domain name for the public PTR record. + optional string public_ptr_domain_name = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This signifies the networking tier used for configuring this + // access + optional NetworkTier network_tier = 8 + [(google.api.field_behavior) = OPTIONAL]; +} + +// An alias IP range attached to an instance's network interface. +message AliasIpRange { + // Optional. The IP alias ranges to allocate for this interface. + optional string ip_cidr_range = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of a subnetwork secondary IP range from which to + // allocate an IP alias range. If not specified, the primary range of the + // subnetwork is used. + optional string subnetwork_range_name = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Additional instance params. +message InstanceParams { + // Optional. Resource manager tags to be bound to the instance. + map resource_manager_tags = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Specifies the reservations that this instance can consume from. +message AllocationAffinity { + // Indicates whether to consume from a reservation or not. + enum Type { + // Default value. This value is unused. + TYPE_UNSPECIFIED = 0; + + // Do not consume from any allocated capacity. + NO_RESERVATION = 1; + + // Consume any allocation available. + ANY_RESERVATION = 2; + + // Must consume from a specific reservation. Must specify key value fields + // for specifying the reservations. + SPECIFIC_RESERVATION = 3; + } + + // Optional. Specifies the type of reservation from which this instance can + // consume + optional Type consume_allocation_type = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Corresponds to the label key of a reservation resource. + optional string key = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Corresponds to the label values of a reservation resource. + repeated string values = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Sets the scheduling options for an Instance. +message Scheduling { + // Defines the maintenance behavior for this instance= + enum OnHostMaintenance { + // Default value. This value is unused. + ON_HOST_MAINTENANCE_UNSPECIFIED = 0; + + // Tells Compute Engine to terminate and (optionally) restart the instance + // away from the maintenance activity. + TERMINATE = 1; + + // Default, Allows Compute Engine to automatically migrate instances + // out of the way of maintenance events. + MIGRATE = 1000; + } + + // Node Affinity: the configuration of desired nodes onto which this Instance + // could be scheduled. + message NodeAffinity { + // Defines the type of node selections. + enum Operator { + // Default value. This value is unused. + OPERATOR_UNSPECIFIED = 0; + + // Requires Compute Engine to seek for matched nodes. + IN = 1; + + // Requires Compute Engine to avoid certain nodes. + NOT_IN = 2; + } + + // Optional. Corresponds to the label key of Node resource. + optional string key = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defines the operation of node selection. + optional Operator operator = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Corresponds to the label values of Node resource. + repeated string values = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Defines the provisioning model for an instance. + enum ProvisioningModel { + // Default value. This value is not used. + PROVISIONING_MODEL_UNSPECIFIED = 0; + + // Standard provisioning with user controlled runtime, no discounts. + STANDARD = 1; + + // Heavily discounted, no guaranteed runtime. + SPOT = 2; + } + + // Defines the supported termination actions for an instance. + enum InstanceTerminationAction { + // Default value. This value is unused. + INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0; + + // Delete the VM. + DELETE = 1; + + // Stop the VM without storing in-memory content. default action. + STOP = 2; + } + + // Optional. Defines the maintenance behavior for this instance. + optional OnHostMaintenance on_host_maintenance = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies whether the instance should be automatically restarted + // if it is terminated by Compute Engine (not terminated by a user). + optional bool automatic_restart = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defines whether the instance is preemptible. + optional bool preemptible = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A set of node affinity and anti-affinity configurations. + // Overrides reservationAffinity. + repeated NodeAffinity node_affinities = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The minimum number of virtual CPUs this instance will consume + // when running on a sole-tenant node. + optional int32 min_node_cpus = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the provisioning model of the instance. + optional ProvisioningModel provisioning_model = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the termination action for the instance. + optional InstanceTerminationAction instance_termination_action = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the maximum amount of time a Local Ssd Vm should wait + // while recovery of the Local Ssd state is attempted. Its value should be in + // between 0 and 168 hours with hour granularity and the default value being 1 + // hour. + optional SchedulingDuration local_ssd_recovery_timeout = 10 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A SchedulingDuration represents a fixed-length span of time represented +// as a count of seconds and fractions of seconds at nanosecond +// resolution. It is independent of any calendar and concepts like "day" +// or "month". Range is approximately 10,000 years. +message SchedulingDuration { + // Optional. Span of time at a resolution of a second. + optional int64 seconds = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Span of time that's a fraction of a second at nanosecond + // resolution. + optional int32 nanos = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A service account. +message ServiceAccount { + // Optional. Email address of the service account. + optional string email = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of scopes to be made available for this service account. + repeated string scopes = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A set of instance tags. +message Tags { + // Optional. An array of tags. Each tag must be 1-63 characters long, and + // comply with RFC1035. + repeated string items = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// An instance-attached disk resource. +message AttachedDisk { + // Specifies the parameters to initialize this disk. + message InitializeParams { + // Optional. Specifies the disk name. If not specified, the default is to + // use the name of the instance. + optional string disk_name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. URL of the zone where the disk should be created. + // Required for each regional disk associated with the instance. + repeated string replica_zones = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // List of the Disk Types. + enum DiskType { + // Default value, which is unused. + DISK_TYPE_UNSPECIFIED = 0; + + // A scratch disk type. + SCRATCH = 1; + + // A persistent disk type. + PERSISTENT = 2; + } + + // List of the Disk Modes. + enum DiskMode { + // Default value, which is unused. + DISK_MODE_UNSPECIFIED = 0; + + // Attaches this disk in read-write mode. Only one + // virtual machine at a time can be attached to a disk in read-write mode. + READ_WRITE = 1; + + // Attaches this disk in read-only mode. Multiple virtual machines can use + // a disk in read-only mode at a time. + READ_ONLY = 2; + + // The disk is locked for administrative reasons. Nobody else + // can use the disk. This mode is used (for example) when taking + // a snapshot of a disk to prevent mounting the disk while it is + // being snapshotted. + LOCKED = 3; + } + + // List of the Disk Interfaces. + enum DiskInterface { + // Default value, which is unused. + DISK_INTERFACE_UNSPECIFIED = 0; + + // SCSI Disk Interface. + SCSI = 1; + + // NVME Disk Interface. + NVME = 2; + + // NVDIMM Disk Interface. + NVDIMM = 3; + + // ISCSI Disk Interface. + ISCSI = 4; + } + + // List of the states of the Disk. + enum DiskSavedState { + // Default Disk state has not been preserved. + DISK_SAVED_STATE_UNSPECIFIED = 0; + + // Disk state has been preserved. + PRESERVED = 1; + } + + // Optional. Specifies the parameters to initialize this disk. + optional InitializeParams initialize_params = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This is used as an identifier for the disks. This is the unique + // name has to provided to modify disk parameters like disk_name and + // replica_zones (in case of RePDs) + optional string device_name = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Type of the resource. + optional string kind = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Specifies the type of the disk. + optional DiskType disk_type_deprecated = 6 [deprecated = true]; + + // Optional. The mode in which to attach this disk. + optional DiskMode mode = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies a valid partial or full URL to an existing Persistent + // Disk resource. + optional string source = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A zero-based index to this disk, where 0 is reserved for the + // boot disk. + optional int64 index = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates that this is a boot disk. The virtual machine will use + // the first partition of the disk for its root filesystem. + optional bool boot = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies whether the disk will be auto-deleted when the instance + // is deleted (but not when the disk is detached from the instance). + optional bool auto_delete = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Any valid publicly visible licenses. + repeated string license = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the disk interface to use for attaching this disk. + optional DiskInterface disk_interface = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of features to enable on the guest operating system. + // Applicable only for bootable images. + repeated GuestOsFeature guest_os_feature = 14 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Encrypts or decrypts a disk using a customer-supplied + // encryption key. + optional CustomerEncryptionKey disk_encryption_key = 15 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The size of the disk in GB. + optional int64 disk_size_gb = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Output only. The state of the disk. + optional DiskSavedState saved_state = 17 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. Output only. The URI of the disk type resource. For example: + // projects/project/zones/zone/diskTypes/pd-standard or pd-ssd + optional string disk_type = 18 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. Specifies the type of the disk. + optional DiskType type = 19 [(google.api.field_behavior) = OPTIONAL]; +} + +// Feature type of the Guest OS. +message GuestOsFeature { + // List of the Feature Types. + enum FeatureType { + // Default value, which is unused. + FEATURE_TYPE_UNSPECIFIED = 0; + + // VIRTIO_SCSI_MULTIQUEUE feature type. + VIRTIO_SCSI_MULTIQUEUE = 1; + + // WINDOWS feature type. + WINDOWS = 2; + + // MULTI_IP_SUBNET feature type. + MULTI_IP_SUBNET = 3; + + // UEFI_COMPATIBLE feature type. + UEFI_COMPATIBLE = 4; + + // SECURE_BOOT feature type. + SECURE_BOOT = 5; + + // GVNIC feature type. + GVNIC = 6; + + // SEV_CAPABLE feature type. + SEV_CAPABLE = 7; + + // BARE_METAL_LINUX_COMPATIBLE feature type. + BARE_METAL_LINUX_COMPATIBLE = 8; + + // SUSPEND_RESUME_COMPATIBLE feature type. + SUSPEND_RESUME_COMPATIBLE = 9; + + // SEV_LIVE_MIGRATABLE feature type. + SEV_LIVE_MIGRATABLE = 10; + + // SEV_SNP_CAPABLE feature type. + SEV_SNP_CAPABLE = 11; + + // TDX_CAPABLE feature type. + TDX_CAPABLE = 12; + + // IDPF feature type. + IDPF = 13; + + // SEV_LIVE_MIGRATABLE_V2 feature type. + SEV_LIVE_MIGRATABLE_V2 = 14; + } + + // The ID of a supported feature. + optional FeatureType type = 1; +} + +// Specifies whether the virtual machine instance will be shut down on key +// revocation. It is currently used in instance, instance properties and GMI +// protos +enum KeyRevocationActionType { + // Default value. This value is unused. + KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0; + + // Indicates user chose no operation. + NONE = 1; + + // Indicates user chose to opt for VM shutdown on key revocation. + STOP = 2; +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts new file mode 100644 index 00000000000..3edeaca2872 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts @@ -0,0 +1,23288 @@ +// 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. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace backupdr. */ + namespace backupdr { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a BackupDR */ + class BackupDR extends $protobuf.rpc.Service { + + /** + * Constructs a new BackupDR 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 BackupDR 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): BackupDR; + + /** + * Calls ListManagementServers. + * @param request ListManagementServersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListManagementServersResponse + */ + public listManagementServers(request: google.cloud.backupdr.v1.IListManagementServersRequest, callback: google.cloud.backupdr.v1.BackupDR.ListManagementServersCallback): void; + + /** + * Calls ListManagementServers. + * @param request ListManagementServersRequest message or plain object + * @returns Promise + */ + public listManagementServers(request: google.cloud.backupdr.v1.IListManagementServersRequest): Promise; + + /** + * Calls GetManagementServer. + * @param request GetManagementServerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ManagementServer + */ + public getManagementServer(request: google.cloud.backupdr.v1.IGetManagementServerRequest, callback: google.cloud.backupdr.v1.BackupDR.GetManagementServerCallback): void; + + /** + * Calls GetManagementServer. + * @param request GetManagementServerRequest message or plain object + * @returns Promise + */ + public getManagementServer(request: google.cloud.backupdr.v1.IGetManagementServerRequest): Promise; + + /** + * Calls CreateManagementServer. + * @param request CreateManagementServerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createManagementServer(request: google.cloud.backupdr.v1.ICreateManagementServerRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateManagementServerCallback): void; + + /** + * Calls CreateManagementServer. + * @param request CreateManagementServerRequest message or plain object + * @returns Promise + */ + public createManagementServer(request: google.cloud.backupdr.v1.ICreateManagementServerRequest): Promise; + + /** + * Calls DeleteManagementServer. + * @param request DeleteManagementServerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteManagementServer(request: google.cloud.backupdr.v1.IDeleteManagementServerRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteManagementServerCallback): void; + + /** + * Calls DeleteManagementServer. + * @param request DeleteManagementServerRequest message or plain object + * @returns Promise + */ + public deleteManagementServer(request: google.cloud.backupdr.v1.IDeleteManagementServerRequest): Promise; + + /** + * Calls CreateBackupVault. + * @param request CreateBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createBackupVault(request: google.cloud.backupdr.v1.ICreateBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupVaultCallback): void; + + /** + * Calls CreateBackupVault. + * @param request CreateBackupVaultRequest message or plain object + * @returns Promise + */ + public createBackupVault(request: google.cloud.backupdr.v1.ICreateBackupVaultRequest): Promise; + + /** + * Calls ListBackupVaults. + * @param request ListBackupVaultsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupVaultsResponse + */ + public listBackupVaults(request: google.cloud.backupdr.v1.IListBackupVaultsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupVaultsCallback): void; + + /** + * Calls ListBackupVaults. + * @param request ListBackupVaultsRequest message or plain object + * @returns Promise + */ + public listBackupVaults(request: google.cloud.backupdr.v1.IListBackupVaultsRequest): Promise; + + /** + * Calls FetchUsableBackupVaults. + * @param request FetchUsableBackupVaultsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchUsableBackupVaultsResponse + */ + public fetchUsableBackupVaults(request: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, callback: google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaultsCallback): void; + + /** + * Calls FetchUsableBackupVaults. + * @param request FetchUsableBackupVaultsRequest message or plain object + * @returns Promise + */ + public fetchUsableBackupVaults(request: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest): Promise; + + /** + * Calls GetBackupVault. + * @param request GetBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BackupVault + */ + public getBackupVault(request: google.cloud.backupdr.v1.IGetBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupVaultCallback): void; + + /** + * Calls GetBackupVault. + * @param request GetBackupVaultRequest message or plain object + * @returns Promise + */ + public getBackupVault(request: google.cloud.backupdr.v1.IGetBackupVaultRequest): Promise; + + /** + * Calls UpdateBackupVault. + * @param request UpdateBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateBackupVault(request: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateBackupVaultCallback): void; + + /** + * Calls UpdateBackupVault. + * @param request UpdateBackupVaultRequest message or plain object + * @returns Promise + */ + public updateBackupVault(request: google.cloud.backupdr.v1.IUpdateBackupVaultRequest): Promise; + + /** + * Calls DeleteBackupVault. + * @param request DeleteBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteBackupVault(request: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupVaultCallback): void; + + /** + * Calls DeleteBackupVault. + * @param request DeleteBackupVaultRequest message or plain object + * @returns Promise + */ + public deleteBackupVault(request: google.cloud.backupdr.v1.IDeleteBackupVaultRequest): Promise; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.backupdr.v1.BackupDR.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + + /** + * Calls ListDataSources. + * @param request ListDataSourcesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataSourcesResponse + */ + public listDataSources(request: google.cloud.backupdr.v1.IListDataSourcesRequest, callback: google.cloud.backupdr.v1.BackupDR.ListDataSourcesCallback): void; + + /** + * Calls ListDataSources. + * @param request ListDataSourcesRequest message or plain object + * @returns Promise + */ + public listDataSources(request: google.cloud.backupdr.v1.IListDataSourcesRequest): Promise; + + /** + * Calls GetDataSource. + * @param request GetDataSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataSource + */ + public getDataSource(request: google.cloud.backupdr.v1.IGetDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.GetDataSourceCallback): void; + + /** + * Calls GetDataSource. + * @param request GetDataSourceRequest message or plain object + * @returns Promise + */ + public getDataSource(request: google.cloud.backupdr.v1.IGetDataSourceRequest): Promise; + + /** + * Calls UpdateDataSource. + * @param request UpdateDataSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDataSource(request: google.cloud.backupdr.v1.IUpdateDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateDataSourceCallback): void; + + /** + * Calls UpdateDataSource. + * @param request UpdateDataSourceRequest message or plain object + * @returns Promise + */ + public updateDataSource(request: google.cloud.backupdr.v1.IUpdateDataSourceRequest): Promise; + + /** + * Calls RemoveDataSource. + * @param request RemoveDataSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public removeDataSource(request: google.cloud.backupdr.v1.IRemoveDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.RemoveDataSourceCallback): void; + + /** + * Calls RemoveDataSource. + * @param request RemoveDataSourceRequest message or plain object + * @returns Promise + */ + public removeDataSource(request: google.cloud.backupdr.v1.IRemoveDataSourceRequest): Promise; + + /** + * Calls SetInternalStatus. + * @param request SetInternalStatusRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setInternalStatus(request: google.cloud.backupdr.v1.ISetInternalStatusRequest, callback: google.cloud.backupdr.v1.BackupDR.SetInternalStatusCallback): void; + + /** + * Calls SetInternalStatus. + * @param request SetInternalStatusRequest message or plain object + * @returns Promise + */ + public setInternalStatus(request: google.cloud.backupdr.v1.ISetInternalStatusRequest): Promise; + + /** + * Calls InitiateBackup. + * @param request InitiateBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and InitiateBackupResponse + */ + public initiateBackup(request: google.cloud.backupdr.v1.IInitiateBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.InitiateBackupCallback): void; + + /** + * Calls InitiateBackup. + * @param request InitiateBackupRequest message or plain object + * @returns Promise + */ + public initiateBackup(request: google.cloud.backupdr.v1.IInitiateBackupRequest): Promise; + + /** + * Calls AbandonBackup. + * @param request AbandonBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public abandonBackup(request: google.cloud.backupdr.v1.IAbandonBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.AbandonBackupCallback): void; + + /** + * Calls AbandonBackup. + * @param request AbandonBackupRequest message or plain object + * @returns Promise + */ + public abandonBackup(request: google.cloud.backupdr.v1.IAbandonBackupRequest): Promise; + + /** + * Calls FinalizeBackup. + * @param request FinalizeBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public finalizeBackup(request: google.cloud.backupdr.v1.IFinalizeBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.FinalizeBackupCallback): void; + + /** + * Calls FinalizeBackup. + * @param request FinalizeBackupRequest message or plain object + * @returns Promise + */ + public finalizeBackup(request: google.cloud.backupdr.v1.IFinalizeBackupRequest): Promise; + + /** + * Calls FetchAccessToken. + * @param request FetchAccessTokenRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchAccessTokenResponse + */ + public fetchAccessToken(request: google.cloud.backupdr.v1.IFetchAccessTokenRequest, callback: google.cloud.backupdr.v1.BackupDR.FetchAccessTokenCallback): void; + + /** + * Calls FetchAccessToken. + * @param request FetchAccessTokenRequest message or plain object + * @returns Promise + */ + public fetchAccessToken(request: google.cloud.backupdr.v1.IFetchAccessTokenRequest): Promise; + + /** + * Calls ListBackups. + * @param request ListBackupsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupsResponse + */ + public listBackups(request: google.cloud.backupdr.v1.IListBackupsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupsCallback): void; + + /** + * Calls ListBackups. + * @param request ListBackupsRequest message or plain object + * @returns Promise + */ + public listBackups(request: google.cloud.backupdr.v1.IListBackupsRequest): Promise; + + /** + * Calls GetBackup. + * @param request GetBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Backup + */ + public getBackup(request: google.cloud.backupdr.v1.IGetBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupCallback): void; + + /** + * Calls GetBackup. + * @param request GetBackupRequest message or plain object + * @returns Promise + */ + public getBackup(request: google.cloud.backupdr.v1.IGetBackupRequest): Promise; + + /** + * Calls UpdateBackup. + * @param request UpdateBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateBackup(request: google.cloud.backupdr.v1.IUpdateBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateBackupCallback): void; + + /** + * Calls UpdateBackup. + * @param request UpdateBackupRequest message or plain object + * @returns Promise + */ + public updateBackup(request: google.cloud.backupdr.v1.IUpdateBackupRequest): Promise; + + /** + * Calls DeleteBackup. + * @param request DeleteBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteBackup(request: google.cloud.backupdr.v1.IDeleteBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupCallback): void; + + /** + * Calls DeleteBackup. + * @param request DeleteBackupRequest message or plain object + * @returns Promise + */ + public deleteBackup(request: google.cloud.backupdr.v1.IDeleteBackupRequest): Promise; + + /** + * Calls RestoreBackup. + * @param request RestoreBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public restoreBackup(request: google.cloud.backupdr.v1.IRestoreBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.RestoreBackupCallback): void; + + /** + * Calls RestoreBackup. + * @param request RestoreBackupRequest message or plain object + * @returns Promise + */ + public restoreBackup(request: google.cloud.backupdr.v1.IRestoreBackupRequest): Promise; + + /** + * Calls CreateBackupPlan. + * @param request CreateBackupPlanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createBackupPlan(request: google.cloud.backupdr.v1.ICreateBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupPlanCallback): void; + + /** + * Calls CreateBackupPlan. + * @param request CreateBackupPlanRequest message or plain object + * @returns Promise + */ + public createBackupPlan(request: google.cloud.backupdr.v1.ICreateBackupPlanRequest): Promise; + + /** + * Calls GetBackupPlan. + * @param request GetBackupPlanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BackupPlan + */ + public getBackupPlan(request: google.cloud.backupdr.v1.IGetBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupPlanCallback): void; + + /** + * Calls GetBackupPlan. + * @param request GetBackupPlanRequest message or plain object + * @returns Promise + */ + public getBackupPlan(request: google.cloud.backupdr.v1.IGetBackupPlanRequest): Promise; + + /** + * Calls ListBackupPlans. + * @param request ListBackupPlansRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupPlansResponse + */ + public listBackupPlans(request: google.cloud.backupdr.v1.IListBackupPlansRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupPlansCallback): void; + + /** + * Calls ListBackupPlans. + * @param request ListBackupPlansRequest message or plain object + * @returns Promise + */ + public listBackupPlans(request: google.cloud.backupdr.v1.IListBackupPlansRequest): Promise; + + /** + * Calls DeleteBackupPlan. + * @param request DeleteBackupPlanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteBackupPlan(request: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanCallback): void; + + /** + * Calls DeleteBackupPlan. + * @param request DeleteBackupPlanRequest message or plain object + * @returns Promise + */ + public deleteBackupPlan(request: google.cloud.backupdr.v1.IDeleteBackupPlanRequest): Promise; + + /** + * Calls CreateBackupPlanAssociation. + * @param request CreateBackupPlanAssociationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createBackupPlanAssociation(request: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociationCallback): void; + + /** + * Calls CreateBackupPlanAssociation. + * @param request CreateBackupPlanAssociationRequest message or plain object + * @returns Promise + */ + public createBackupPlanAssociation(request: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest): Promise; + + /** + * Calls GetBackupPlanAssociation. + * @param request GetBackupPlanAssociationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BackupPlanAssociation + */ + public getBackupPlanAssociation(request: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociationCallback): void; + + /** + * Calls GetBackupPlanAssociation. + * @param request GetBackupPlanAssociationRequest message or plain object + * @returns Promise + */ + public getBackupPlanAssociation(request: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest): Promise; + + /** + * Calls ListBackupPlanAssociations. + * @param request ListBackupPlanAssociationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupPlanAssociationsResponse + */ + public listBackupPlanAssociations(request: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociationsCallback): void; + + /** + * Calls ListBackupPlanAssociations. + * @param request ListBackupPlanAssociationsRequest message or plain object + * @returns Promise + */ + public listBackupPlanAssociations(request: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest): Promise; + + /** + * Calls DeleteBackupPlanAssociation. + * @param request DeleteBackupPlanAssociationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteBackupPlanAssociation(request: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociationCallback): void; + + /** + * Calls DeleteBackupPlanAssociation. + * @param request DeleteBackupPlanAssociationRequest message or plain object + * @returns Promise + */ + public deleteBackupPlanAssociation(request: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest): Promise; + + /** + * Calls TriggerBackup. + * @param request TriggerBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public triggerBackup(request: google.cloud.backupdr.v1.ITriggerBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.TriggerBackupCallback): void; + + /** + * Calls TriggerBackup. + * @param request TriggerBackupRequest message or plain object + * @returns Promise + */ + public triggerBackup(request: google.cloud.backupdr.v1.ITriggerBackupRequest): Promise; + } + + namespace BackupDR { + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listManagementServers}. + * @param error Error, if any + * @param [response] ListManagementServersResponse + */ + type ListManagementServersCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListManagementServersResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getManagementServer}. + * @param error Error, if any + * @param [response] ManagementServer + */ + type GetManagementServerCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ManagementServer) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createManagementServer}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteManagementServer}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupVault}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupVaults}. + * @param error Error, if any + * @param [response] ListBackupVaultsResponse + */ + type ListBackupVaultsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupVaultsResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchUsableBackupVaults}. + * @param error Error, if any + * @param [response] FetchUsableBackupVaultsResponse + */ + type FetchUsableBackupVaultsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupVault}. + * @param error Error, if any + * @param [response] BackupVault + */ + type GetBackupVaultCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupVault) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackupVault}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupVault}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listDataSources}. + * @param error Error, if any + * @param [response] ListDataSourcesResponse + */ + type ListDataSourcesCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListDataSourcesResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getDataSource}. + * @param error Error, if any + * @param [response] DataSource + */ + type GetDataSourceCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.DataSource) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateDataSource}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDataSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|removeDataSource}. + * @param error Error, if any + * @param [response] Operation + */ + type RemoveDataSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|setInternalStatus}. + * @param error Error, if any + * @param [response] Operation + */ + type SetInternalStatusCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|initiateBackup}. + * @param error Error, if any + * @param [response] InitiateBackupResponse + */ + type InitiateBackupCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.InitiateBackupResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|abandonBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type AbandonBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|finalizeBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type FinalizeBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchAccessToken}. + * @param error Error, if any + * @param [response] FetchAccessTokenResponse + */ + type FetchAccessTokenCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.FetchAccessTokenResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackups}. + * @param error Error, if any + * @param [response] ListBackupsResponse + */ + type ListBackupsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupsResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackup}. + * @param error Error, if any + * @param [response] Backup + */ + type GetBackupCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.Backup) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|restoreBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type RestoreBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlan}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBackupPlanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlan}. + * @param error Error, if any + * @param [response] BackupPlan + */ + type GetBackupPlanCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupPlan) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlans}. + * @param error Error, if any + * @param [response] ListBackupPlansResponse + */ + type ListBackupPlansCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupPlansResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlan}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteBackupPlanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlanAssociation}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBackupPlanAssociationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlanAssociation}. + * @param error Error, if any + * @param [response] BackupPlanAssociation + */ + type GetBackupPlanAssociationCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupPlanAssociation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlanAssociations}. + * @param error Error, if any + * @param [response] ListBackupPlanAssociationsResponse + */ + type ListBackupPlanAssociationsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlanAssociation}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteBackupPlanAssociationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|triggerBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type TriggerBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a NetworkConfig. */ + interface INetworkConfig { + + /** NetworkConfig network */ + network?: (string|null); + + /** NetworkConfig peeringMode */ + peeringMode?: (google.cloud.backupdr.v1.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1.NetworkConfig.PeeringMode|null); + } + + /** Represents a NetworkConfig. */ + class NetworkConfig implements INetworkConfig { + + /** + * Constructs a new NetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.INetworkConfig); + + /** NetworkConfig network. */ + public network: string; + + /** NetworkConfig peeringMode. */ + public peeringMode: (google.cloud.backupdr.v1.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1.NetworkConfig.PeeringMode); + + /** + * Creates a new NetworkConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.INetworkConfig): google.cloud.backupdr.v1.NetworkConfig; + + /** + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkConfig; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkConfig; + + /** + * Verifies a NetworkConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkConfig; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @param message NetworkConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkConfig { + + /** PeeringMode enum. */ + enum PeeringMode { + PEERING_MODE_UNSPECIFIED = 0, + PRIVATE_SERVICE_ACCESS = 1 + } + } + + /** Properties of a ManagementURI. */ + interface IManagementURI { + + /** ManagementURI webUi */ + webUi?: (string|null); + + /** ManagementURI api */ + api?: (string|null); + } + + /** Represents a ManagementURI. */ + class ManagementURI implements IManagementURI { + + /** + * Constructs a new ManagementURI. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IManagementURI); + + /** ManagementURI webUi. */ + public webUi: string; + + /** ManagementURI api. */ + public api: string; + + /** + * Creates a new ManagementURI instance using the specified properties. + * @param [properties] Properties to set + * @returns ManagementURI instance + */ + public static create(properties?: google.cloud.backupdr.v1.IManagementURI): google.cloud.backupdr.v1.ManagementURI; + + /** + * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. + * @param message ManagementURI message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. + * @param message ManagementURI message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ManagementURI message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ManagementURI; + + /** + * Decodes a ManagementURI message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ManagementURI; + + /** + * Verifies a ManagementURI message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ManagementURI + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ManagementURI; + + /** + * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. + * @param message ManagementURI + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ManagementURI to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ManagementURI + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkforceIdentityBasedManagementURI. */ + interface IWorkforceIdentityBasedManagementURI { + + /** WorkforceIdentityBasedManagementURI firstPartyManagementUri */ + firstPartyManagementUri?: (string|null); + + /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri */ + thirdPartyManagementUri?: (string|null); + } + + /** Represents a WorkforceIdentityBasedManagementURI. */ + class WorkforceIdentityBasedManagementURI implements IWorkforceIdentityBasedManagementURI { + + /** + * Constructs a new WorkforceIdentityBasedManagementURI. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI); + + /** WorkforceIdentityBasedManagementURI firstPartyManagementUri. */ + public firstPartyManagementUri: string; + + /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri. */ + public thirdPartyManagementUri: string; + + /** + * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkforceIdentityBasedManagementURI instance + */ + public static create(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; + + /** + * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * @param message WorkforceIdentityBasedManagementURI message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * @param message WorkforceIdentityBasedManagementURI message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkforceIdentityBasedManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; + + /** + * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkforceIdentityBasedManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; + + /** + * Verifies a WorkforceIdentityBasedManagementURI message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkforceIdentityBasedManagementURI + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; + + /** + * Creates a plain object from a WorkforceIdentityBasedManagementURI message. Also converts values to other types if specified. + * @param message WorkforceIdentityBasedManagementURI + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkforceIdentityBasedManagementURI to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkforceIdentityBasedManagementURI + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkforceIdentityBasedOAuth2ClientID. */ + interface IWorkforceIdentityBasedOAuth2ClientID { + + /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId */ + firstPartyOauth2ClientId?: (string|null); + + /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId */ + thirdPartyOauth2ClientId?: (string|null); + } + + /** Represents a WorkforceIdentityBasedOAuth2ClientID. */ + class WorkforceIdentityBasedOAuth2ClientID implements IWorkforceIdentityBasedOAuth2ClientID { + + /** + * Constructs a new WorkforceIdentityBasedOAuth2ClientID. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID); + + /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId. */ + public firstPartyOauth2ClientId: string; + + /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId. */ + public thirdPartyOauth2ClientId: string; + + /** + * Creates a new WorkforceIdentityBasedOAuth2ClientID instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkforceIdentityBasedOAuth2ClientID instance + */ + public static create(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; + + /** + * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. + * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. + * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkforceIdentityBasedOAuth2ClientID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; + + /** + * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkforceIdentityBasedOAuth2ClientID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; + + /** + * Verifies a WorkforceIdentityBasedOAuth2ClientID message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkforceIdentityBasedOAuth2ClientID message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkforceIdentityBasedOAuth2ClientID + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; + + /** + * Creates a plain object from a WorkforceIdentityBasedOAuth2ClientID message. Also converts values to other types if specified. + * @param message WorkforceIdentityBasedOAuth2ClientID + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkforceIdentityBasedOAuth2ClientID to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkforceIdentityBasedOAuth2ClientID + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ManagementServer. */ + interface IManagementServer { + + /** ManagementServer name */ + name?: (string|null); + + /** ManagementServer description */ + description?: (string|null); + + /** ManagementServer labels */ + labels?: ({ [k: string]: string }|null); + + /** ManagementServer createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ManagementServer updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ManagementServer type */ + type?: (google.cloud.backupdr.v1.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceType|null); + + /** ManagementServer managementUri */ + managementUri?: (google.cloud.backupdr.v1.IManagementURI|null); + + /** ManagementServer workforceIdentityBasedManagementUri */ + workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null); + + /** ManagementServer state */ + state?: (google.cloud.backupdr.v1.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceState|null); + + /** ManagementServer networks */ + networks?: (google.cloud.backupdr.v1.INetworkConfig[]|null); + + /** ManagementServer etag */ + etag?: (string|null); + + /** ManagementServer oauth2ClientId */ + oauth2ClientId?: (string|null); + + /** ManagementServer workforceIdentityBasedOauth2ClientId */ + workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null); + + /** ManagementServer baProxyUri */ + baProxyUri?: (string[]|null); + + /** ManagementServer satisfiesPzs */ + satisfiesPzs?: (google.protobuf.IBoolValue|null); + + /** ManagementServer satisfiesPzi */ + satisfiesPzi?: (boolean|null); + } + + /** Represents a ManagementServer. */ + class ManagementServer implements IManagementServer { + + /** + * Constructs a new ManagementServer. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IManagementServer); + + /** ManagementServer name. */ + public name: string; + + /** ManagementServer description. */ + public description: string; + + /** ManagementServer labels. */ + public labels: { [k: string]: string }; + + /** ManagementServer createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ManagementServer updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ManagementServer type. */ + public type: (google.cloud.backupdr.v1.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceType); + + /** ManagementServer managementUri. */ + public managementUri?: (google.cloud.backupdr.v1.IManagementURI|null); + + /** ManagementServer workforceIdentityBasedManagementUri. */ + public workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null); + + /** ManagementServer state. */ + public state: (google.cloud.backupdr.v1.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceState); + + /** ManagementServer networks. */ + public networks: google.cloud.backupdr.v1.INetworkConfig[]; + + /** ManagementServer etag. */ + public etag: string; + + /** ManagementServer oauth2ClientId. */ + public oauth2ClientId: string; + + /** ManagementServer workforceIdentityBasedOauth2ClientId. */ + public workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null); + + /** ManagementServer baProxyUri. */ + public baProxyUri: string[]; + + /** ManagementServer satisfiesPzs. */ + public satisfiesPzs?: (google.protobuf.IBoolValue|null); + + /** ManagementServer satisfiesPzi. */ + public satisfiesPzi: boolean; + + /** + * Creates a new ManagementServer instance using the specified properties. + * @param [properties] Properties to set + * @returns ManagementServer instance + */ + public static create(properties?: google.cloud.backupdr.v1.IManagementServer): google.cloud.backupdr.v1.ManagementServer; + + /** + * Encodes the specified ManagementServer message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. + * @param message ManagementServer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ManagementServer message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. + * @param message ManagementServer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ManagementServer message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ManagementServer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ManagementServer; + + /** + * Decodes a ManagementServer message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ManagementServer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ManagementServer; + + /** + * Verifies a ManagementServer message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ManagementServer message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ManagementServer + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ManagementServer; + + /** + * Creates a plain object from a ManagementServer message. Also converts values to other types if specified. + * @param message ManagementServer + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ManagementServer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ManagementServer to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ManagementServer + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ManagementServer { + + /** InstanceType enum. */ + enum InstanceType { + INSTANCE_TYPE_UNSPECIFIED = 0, + BACKUP_RESTORE = 1 + } + + /** InstanceState enum. */ + enum InstanceState { + INSTANCE_STATE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2, + UPDATING = 3, + DELETING = 4, + REPAIRING = 5, + MAINTENANCE = 6, + ERROR = 7 + } + } + + /** Properties of a ListManagementServersRequest. */ + interface IListManagementServersRequest { + + /** ListManagementServersRequest parent */ + parent?: (string|null); + + /** ListManagementServersRequest pageSize */ + pageSize?: (number|null); + + /** ListManagementServersRequest pageToken */ + pageToken?: (string|null); + + /** ListManagementServersRequest filter */ + filter?: (string|null); + + /** ListManagementServersRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListManagementServersRequest. */ + class ListManagementServersRequest implements IListManagementServersRequest { + + /** + * Constructs a new ListManagementServersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListManagementServersRequest); + + /** ListManagementServersRequest parent. */ + public parent: string; + + /** ListManagementServersRequest pageSize. */ + public pageSize: number; + + /** ListManagementServersRequest pageToken. */ + public pageToken: string; + + /** ListManagementServersRequest filter. */ + public filter?: (string|null); + + /** ListManagementServersRequest orderBy. */ + public orderBy?: (string|null); + + /** ListManagementServersRequest _filter. */ + public _filter?: "filter"; + + /** ListManagementServersRequest _orderBy. */ + public _orderBy?: "orderBy"; + + /** + * Creates a new ListManagementServersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListManagementServersRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListManagementServersRequest): google.cloud.backupdr.v1.ListManagementServersRequest; + + /** + * Encodes the specified ListManagementServersRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. + * @param message ListManagementServersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListManagementServersRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. + * @param message ListManagementServersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListManagementServersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListManagementServersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListManagementServersRequest; + + /** + * Decodes a ListManagementServersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListManagementServersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListManagementServersRequest; + + /** + * Verifies a ListManagementServersRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListManagementServersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListManagementServersRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListManagementServersRequest; + + /** + * Creates a plain object from a ListManagementServersRequest message. Also converts values to other types if specified. + * @param message ListManagementServersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListManagementServersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListManagementServersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListManagementServersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListManagementServersResponse. */ + interface IListManagementServersResponse { + + /** ListManagementServersResponse managementServers */ + managementServers?: (google.cloud.backupdr.v1.IManagementServer[]|null); + + /** ListManagementServersResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListManagementServersResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListManagementServersResponse. */ + class ListManagementServersResponse implements IListManagementServersResponse { + + /** + * Constructs a new ListManagementServersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListManagementServersResponse); + + /** ListManagementServersResponse managementServers. */ + public managementServers: google.cloud.backupdr.v1.IManagementServer[]; + + /** ListManagementServersResponse nextPageToken. */ + public nextPageToken: string; + + /** ListManagementServersResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListManagementServersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListManagementServersResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListManagementServersResponse): google.cloud.backupdr.v1.ListManagementServersResponse; + + /** + * Encodes the specified ListManagementServersResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. + * @param message ListManagementServersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListManagementServersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListManagementServersResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. + * @param message ListManagementServersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListManagementServersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListManagementServersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListManagementServersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListManagementServersResponse; + + /** + * Decodes a ListManagementServersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListManagementServersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListManagementServersResponse; + + /** + * Verifies a ListManagementServersResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListManagementServersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListManagementServersResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListManagementServersResponse; + + /** + * Creates a plain object from a ListManagementServersResponse message. Also converts values to other types if specified. + * @param message ListManagementServersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListManagementServersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListManagementServersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListManagementServersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetManagementServerRequest. */ + interface IGetManagementServerRequest { + + /** GetManagementServerRequest name */ + name?: (string|null); + } + + /** Represents a GetManagementServerRequest. */ + class GetManagementServerRequest implements IGetManagementServerRequest { + + /** + * Constructs a new GetManagementServerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetManagementServerRequest); + + /** GetManagementServerRequest name. */ + public name: string; + + /** + * Creates a new GetManagementServerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetManagementServerRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetManagementServerRequest): google.cloud.backupdr.v1.GetManagementServerRequest; + + /** + * Encodes the specified GetManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. + * @param message GetManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. + * @param message GetManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetManagementServerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetManagementServerRequest; + + /** + * Decodes a GetManagementServerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetManagementServerRequest; + + /** + * Verifies a GetManagementServerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetManagementServerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetManagementServerRequest; + + /** + * Creates a plain object from a GetManagementServerRequest message. Also converts values to other types if specified. + * @param message GetManagementServerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetManagementServerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetManagementServerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateManagementServerRequest. */ + interface ICreateManagementServerRequest { + + /** CreateManagementServerRequest parent */ + parent?: (string|null); + + /** CreateManagementServerRequest managementServerId */ + managementServerId?: (string|null); + + /** CreateManagementServerRequest managementServer */ + managementServer?: (google.cloud.backupdr.v1.IManagementServer|null); + + /** CreateManagementServerRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateManagementServerRequest. */ + class CreateManagementServerRequest implements ICreateManagementServerRequest { + + /** + * Constructs a new CreateManagementServerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICreateManagementServerRequest); + + /** CreateManagementServerRequest parent. */ + public parent: string; + + /** CreateManagementServerRequest managementServerId. */ + public managementServerId: string; + + /** CreateManagementServerRequest managementServer. */ + public managementServer?: (google.cloud.backupdr.v1.IManagementServer|null); + + /** CreateManagementServerRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateManagementServerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateManagementServerRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICreateManagementServerRequest): google.cloud.backupdr.v1.CreateManagementServerRequest; + + /** + * Encodes the specified CreateManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. + * @param message CreateManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. + * @param message CreateManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateManagementServerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateManagementServerRequest; + + /** + * Decodes a CreateManagementServerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateManagementServerRequest; + + /** + * Verifies a CreateManagementServerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateManagementServerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateManagementServerRequest; + + /** + * Creates a plain object from a CreateManagementServerRequest message. Also converts values to other types if specified. + * @param message CreateManagementServerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CreateManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateManagementServerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateManagementServerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteManagementServerRequest. */ + interface IDeleteManagementServerRequest { + + /** DeleteManagementServerRequest name */ + name?: (string|null); + + /** DeleteManagementServerRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteManagementServerRequest. */ + class DeleteManagementServerRequest implements IDeleteManagementServerRequest { + + /** + * Constructs a new DeleteManagementServerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteManagementServerRequest); + + /** DeleteManagementServerRequest name. */ + public name: string; + + /** DeleteManagementServerRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteManagementServerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteManagementServerRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteManagementServerRequest): google.cloud.backupdr.v1.DeleteManagementServerRequest; + + /** + * Encodes the specified DeleteManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. + * @param message DeleteManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. + * @param message DeleteManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteManagementServerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteManagementServerRequest; + + /** + * Decodes a DeleteManagementServerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteManagementServerRequest; + + /** + * Verifies a DeleteManagementServerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteManagementServerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteManagementServerRequest; + + /** + * Creates a plain object from a DeleteManagementServerRequest message. Also converts values to other types if specified. + * @param message DeleteManagementServerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteManagementServerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteManagementServerRequest + * @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 additionalInfo */ + additionalInfo?: ({ [k: string]: string }|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.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 additionalInfo. */ + public additionalInfo: { [k: string]: string }; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.backupdr.v1.IOperationMetadata): google.cloud.backupdr.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.backupdr.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.backupdr.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.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.backupdr.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.backupdr.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.backupdr.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.backupdr.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.backupdr.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 BackupPlan. */ + interface IBackupPlan { + + /** BackupPlan name */ + name?: (string|null); + + /** BackupPlan description */ + description?: (string|null); + + /** BackupPlan labels */ + labels?: ({ [k: string]: string }|null); + + /** BackupPlan createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan backupRules */ + backupRules?: (google.cloud.backupdr.v1.IBackupRule[]|null); + + /** BackupPlan state */ + state?: (google.cloud.backupdr.v1.BackupPlan.State|keyof typeof google.cloud.backupdr.v1.BackupPlan.State|null); + + /** BackupPlan resourceType */ + resourceType?: (string|null); + + /** BackupPlan etag */ + etag?: (string|null); + + /** BackupPlan backupVault */ + backupVault?: (string|null); + + /** BackupPlan backupVaultServiceAccount */ + backupVaultServiceAccount?: (string|null); + } + + /** Represents a BackupPlan. */ + class BackupPlan implements IBackupPlan { + + /** + * Constructs a new BackupPlan. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupPlan); + + /** BackupPlan name. */ + public name: string; + + /** BackupPlan description. */ + public description: string; + + /** BackupPlan labels. */ + public labels: { [k: string]: string }; + + /** BackupPlan createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan backupRules. */ + public backupRules: google.cloud.backupdr.v1.IBackupRule[]; + + /** BackupPlan state. */ + public state: (google.cloud.backupdr.v1.BackupPlan.State|keyof typeof google.cloud.backupdr.v1.BackupPlan.State); + + /** BackupPlan resourceType. */ + public resourceType: string; + + /** BackupPlan etag. */ + public etag: string; + + /** BackupPlan backupVault. */ + public backupVault: string; + + /** BackupPlan backupVaultServiceAccount. */ + public backupVaultServiceAccount: string; + + /** + * Creates a new BackupPlan instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupPlan instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupPlan): google.cloud.backupdr.v1.BackupPlan; + + /** + * Encodes the specified BackupPlan message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. + * @param message BackupPlan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupPlan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupPlan message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. + * @param message BackupPlan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupPlan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupPlan message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupPlan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupPlan; + + /** + * Decodes a BackupPlan message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupPlan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupPlan; + + /** + * Verifies a BackupPlan message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupPlan message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupPlan + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupPlan; + + /** + * Creates a plain object from a BackupPlan message. Also converts values to other types if specified. + * @param message BackupPlan + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupPlan, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupPlan to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupPlan + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupPlan { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + INACTIVE = 4 + } + } + + /** Properties of a BackupRule. */ + interface IBackupRule { + + /** BackupRule ruleId */ + ruleId?: (string|null); + + /** BackupRule backupRetentionDays */ + backupRetentionDays?: (number|null); + + /** BackupRule standardSchedule */ + standardSchedule?: (google.cloud.backupdr.v1.IStandardSchedule|null); + } + + /** Represents a BackupRule. */ + class BackupRule implements IBackupRule { + + /** + * Constructs a new BackupRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupRule); + + /** BackupRule ruleId. */ + public ruleId: string; + + /** BackupRule backupRetentionDays. */ + public backupRetentionDays: number; + + /** BackupRule standardSchedule. */ + public standardSchedule?: (google.cloud.backupdr.v1.IStandardSchedule|null); + + /** BackupRule backupScheduleOneof. */ + public backupScheduleOneof?: "standardSchedule"; + + /** + * Creates a new BackupRule instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupRule instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupRule): google.cloud.backupdr.v1.BackupRule; + + /** + * Encodes the specified BackupRule message. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. + * @param message BackupRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupRule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. + * @param message BackupRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupRule; + + /** + * Decodes a BackupRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupRule; + + /** + * Verifies a BackupRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupRule; + + /** + * Creates a plain object from a BackupRule message. Also converts values to other types if specified. + * @param message BackupRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StandardSchedule. */ + interface IStandardSchedule { + + /** StandardSchedule recurrenceType */ + recurrenceType?: (google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|keyof typeof google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|null); + + /** StandardSchedule hourlyFrequency */ + hourlyFrequency?: (number|null); + + /** StandardSchedule daysOfWeek */ + daysOfWeek?: (google.type.DayOfWeek[]|null); + + /** StandardSchedule daysOfMonth */ + daysOfMonth?: (number[]|null); + + /** StandardSchedule weekDayOfMonth */ + weekDayOfMonth?: (google.cloud.backupdr.v1.IWeekDayOfMonth|null); + + /** StandardSchedule months */ + months?: (google.type.Month[]|null); + + /** StandardSchedule backupWindow */ + backupWindow?: (google.cloud.backupdr.v1.IBackupWindow|null); + + /** StandardSchedule timeZone */ + timeZone?: (string|null); + } + + /** Represents a StandardSchedule. */ + class StandardSchedule implements IStandardSchedule { + + /** + * Constructs a new StandardSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IStandardSchedule); + + /** StandardSchedule recurrenceType. */ + public recurrenceType: (google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|keyof typeof google.cloud.backupdr.v1.StandardSchedule.RecurrenceType); + + /** StandardSchedule hourlyFrequency. */ + public hourlyFrequency: number; + + /** StandardSchedule daysOfWeek. */ + public daysOfWeek: google.type.DayOfWeek[]; + + /** StandardSchedule daysOfMonth. */ + public daysOfMonth: number[]; + + /** StandardSchedule weekDayOfMonth. */ + public weekDayOfMonth?: (google.cloud.backupdr.v1.IWeekDayOfMonth|null); + + /** StandardSchedule months. */ + public months: google.type.Month[]; + + /** StandardSchedule backupWindow. */ + public backupWindow?: (google.cloud.backupdr.v1.IBackupWindow|null); + + /** StandardSchedule timeZone. */ + public timeZone: string; + + /** + * Creates a new StandardSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns StandardSchedule instance + */ + public static create(properties?: google.cloud.backupdr.v1.IStandardSchedule): google.cloud.backupdr.v1.StandardSchedule; + + /** + * Encodes the specified StandardSchedule message. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. + * @param message StandardSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IStandardSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StandardSchedule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. + * @param message StandardSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IStandardSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StandardSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StandardSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.StandardSchedule; + + /** + * Decodes a StandardSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StandardSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.StandardSchedule; + + /** + * Verifies a StandardSchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StandardSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StandardSchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.StandardSchedule; + + /** + * Creates a plain object from a StandardSchedule message. Also converts values to other types if specified. + * @param message StandardSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.StandardSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StandardSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StandardSchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StandardSchedule { + + /** RecurrenceType enum. */ + enum RecurrenceType { + RECURRENCE_TYPE_UNSPECIFIED = 0, + HOURLY = 1, + DAILY = 2, + WEEKLY = 3, + MONTHLY = 4, + YEARLY = 5 + } + } + + /** Properties of a BackupWindow. */ + interface IBackupWindow { + + /** BackupWindow startHourOfDay */ + startHourOfDay?: (number|null); + + /** BackupWindow endHourOfDay */ + endHourOfDay?: (number|null); + } + + /** Represents a BackupWindow. */ + class BackupWindow implements IBackupWindow { + + /** + * Constructs a new BackupWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupWindow); + + /** BackupWindow startHourOfDay. */ + public startHourOfDay: number; + + /** BackupWindow endHourOfDay. */ + public endHourOfDay: number; + + /** + * Creates a new BackupWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupWindow instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupWindow): google.cloud.backupdr.v1.BackupWindow; + + /** + * Encodes the specified BackupWindow message. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. + * @param message BackupWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupWindow message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. + * @param message BackupWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupWindow; + + /** + * Decodes a BackupWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupWindow; + + /** + * Verifies a BackupWindow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupWindow + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupWindow; + + /** + * Creates a plain object from a BackupWindow message. Also converts values to other types if specified. + * @param message BackupWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupWindow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WeekDayOfMonth. */ + interface IWeekDayOfMonth { + + /** WeekDayOfMonth weekOfMonth */ + weekOfMonth?: (google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|keyof typeof google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|null); + + /** WeekDayOfMonth dayOfWeek */ + dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + } + + /** Represents a WeekDayOfMonth. */ + class WeekDayOfMonth implements IWeekDayOfMonth { + + /** + * Constructs a new WeekDayOfMonth. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IWeekDayOfMonth); + + /** WeekDayOfMonth weekOfMonth. */ + public weekOfMonth: (google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|keyof typeof google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth); + + /** WeekDayOfMonth dayOfWeek. */ + public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); + + /** + * Creates a new WeekDayOfMonth instance using the specified properties. + * @param [properties] Properties to set + * @returns WeekDayOfMonth instance + */ + public static create(properties?: google.cloud.backupdr.v1.IWeekDayOfMonth): google.cloud.backupdr.v1.WeekDayOfMonth; + + /** + * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. + * @param message WeekDayOfMonth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. + * @param message WeekDayOfMonth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WeekDayOfMonth; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WeekDayOfMonth; + + /** + * Verifies a WeekDayOfMonth message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WeekDayOfMonth + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WeekDayOfMonth; + + /** + * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. + * @param message WeekDayOfMonth + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.WeekDayOfMonth, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WeekDayOfMonth to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WeekDayOfMonth + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WeekDayOfMonth { + + /** WeekOfMonth enum. */ + enum WeekOfMonth { + WEEK_OF_MONTH_UNSPECIFIED = 0, + FIRST = 1, + SECOND = 2, + THIRD = 3, + FOURTH = 4, + LAST = 5 + } + } + + /** Properties of a CreateBackupPlanRequest. */ + interface ICreateBackupPlanRequest { + + /** CreateBackupPlanRequest parent */ + parent?: (string|null); + + /** CreateBackupPlanRequest backupPlanId */ + backupPlanId?: (string|null); + + /** CreateBackupPlanRequest backupPlan */ + backupPlan?: (google.cloud.backupdr.v1.IBackupPlan|null); + + /** CreateBackupPlanRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateBackupPlanRequest. */ + class CreateBackupPlanRequest implements ICreateBackupPlanRequest { + + /** + * Constructs a new CreateBackupPlanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICreateBackupPlanRequest); + + /** CreateBackupPlanRequest parent. */ + public parent: string; + + /** CreateBackupPlanRequest backupPlanId. */ + public backupPlanId: string; + + /** CreateBackupPlanRequest backupPlan. */ + public backupPlan?: (google.cloud.backupdr.v1.IBackupPlan|null); + + /** CreateBackupPlanRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateBackupPlanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupPlanRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICreateBackupPlanRequest): google.cloud.backupdr.v1.CreateBackupPlanRequest; + + /** + * Encodes the specified CreateBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. + * @param message CreateBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICreateBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. + * @param message CreateBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupPlanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupPlanRequest; + + /** + * Decodes a CreateBackupPlanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupPlanRequest; + + /** + * Verifies a CreateBackupPlanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupPlanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupPlanRequest; + + /** + * Creates a plain object from a CreateBackupPlanRequest message. Also converts values to other types if specified. + * @param message CreateBackupPlanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CreateBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupPlanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupPlanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlansRequest. */ + interface IListBackupPlansRequest { + + /** ListBackupPlansRequest parent */ + parent?: (string|null); + + /** ListBackupPlansRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupPlansRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupPlansRequest filter */ + filter?: (string|null); + + /** ListBackupPlansRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListBackupPlansRequest. */ + class ListBackupPlansRequest implements IListBackupPlansRequest { + + /** + * Constructs a new ListBackupPlansRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupPlansRequest); + + /** ListBackupPlansRequest parent. */ + public parent: string; + + /** ListBackupPlansRequest pageSize. */ + public pageSize: number; + + /** ListBackupPlansRequest pageToken. */ + public pageToken: string; + + /** ListBackupPlansRequest filter. */ + public filter: string; + + /** ListBackupPlansRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListBackupPlansRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlansRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupPlansRequest): google.cloud.backupdr.v1.ListBackupPlansRequest; + + /** + * Encodes the specified ListBackupPlansRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. + * @param message ListBackupPlansRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupPlansRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlansRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. + * @param message ListBackupPlansRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlansRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlansRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlansRequest; + + /** + * Decodes a ListBackupPlansRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlansRequest; + + /** + * Verifies a ListBackupPlansRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlansRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlansRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlansRequest; + + /** + * Creates a plain object from a ListBackupPlansRequest message. Also converts values to other types if specified. + * @param message ListBackupPlansRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupPlansRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlansRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlansRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlansResponse. */ + interface IListBackupPlansResponse { + + /** ListBackupPlansResponse backupPlans */ + backupPlans?: (google.cloud.backupdr.v1.IBackupPlan[]|null); + + /** ListBackupPlansResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupPlansResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupPlansResponse. */ + class ListBackupPlansResponse implements IListBackupPlansResponse { + + /** + * Constructs a new ListBackupPlansResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupPlansResponse); + + /** ListBackupPlansResponse backupPlans. */ + public backupPlans: google.cloud.backupdr.v1.IBackupPlan[]; + + /** ListBackupPlansResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupPlansResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupPlansResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlansResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupPlansResponse): google.cloud.backupdr.v1.ListBackupPlansResponse; + + /** + * Encodes the specified ListBackupPlansResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. + * @param message ListBackupPlansResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupPlansResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlansResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. + * @param message ListBackupPlansResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlansResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlansResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlansResponse; + + /** + * Decodes a ListBackupPlansResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlansResponse; + + /** + * Verifies a ListBackupPlansResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlansResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlansResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlansResponse; + + /** + * Creates a plain object from a ListBackupPlansResponse message. Also converts values to other types if specified. + * @param message ListBackupPlansResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupPlansResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlansResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlansResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupPlanRequest. */ + interface IGetBackupPlanRequest { + + /** GetBackupPlanRequest name */ + name?: (string|null); + } + + /** Represents a GetBackupPlanRequest. */ + class GetBackupPlanRequest implements IGetBackupPlanRequest { + + /** + * Constructs a new GetBackupPlanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetBackupPlanRequest); + + /** GetBackupPlanRequest name. */ + public name: string; + + /** + * Creates a new GetBackupPlanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupPlanRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetBackupPlanRequest): google.cloud.backupdr.v1.GetBackupPlanRequest; + + /** + * Encodes the specified GetBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. + * @param message GetBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. + * @param message GetBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupPlanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupPlanRequest; + + /** + * Decodes a GetBackupPlanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupPlanRequest; + + /** + * Verifies a GetBackupPlanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupPlanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupPlanRequest; + + /** + * Creates a plain object from a GetBackupPlanRequest message. Also converts values to other types if specified. + * @param message GetBackupPlanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupPlanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupPlanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupPlanRequest. */ + interface IDeleteBackupPlanRequest { + + /** DeleteBackupPlanRequest name */ + name?: (string|null); + + /** DeleteBackupPlanRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteBackupPlanRequest. */ + class DeleteBackupPlanRequest implements IDeleteBackupPlanRequest { + + /** + * Constructs a new DeleteBackupPlanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanRequest); + + /** DeleteBackupPlanRequest name. */ + public name: string; + + /** DeleteBackupPlanRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteBackupPlanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupPlanRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanRequest): google.cloud.backupdr.v1.DeleteBackupPlanRequest; + + /** + * Encodes the specified DeleteBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. + * @param message DeleteBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. + * @param message DeleteBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupPlanRequest; + + /** + * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupPlanRequest; + + /** + * Verifies a DeleteBackupPlanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupPlanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupPlanRequest; + + /** + * Creates a plain object from a DeleteBackupPlanRequest message. Also converts values to other types if specified. + * @param message DeleteBackupPlanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupPlanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupPlanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupPlanAssociation. */ + interface IBackupPlanAssociation { + + /** BackupPlanAssociation name */ + name?: (string|null); + + /** BackupPlanAssociation resourceType */ + resourceType?: (string|null); + + /** BackupPlanAssociation resource */ + resource?: (string|null); + + /** BackupPlanAssociation backupPlan */ + backupPlan?: (string|null); + + /** BackupPlanAssociation createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation state */ + state?: (google.cloud.backupdr.v1.BackupPlanAssociation.State|keyof typeof google.cloud.backupdr.v1.BackupPlanAssociation.State|null); + + /** BackupPlanAssociation rulesConfigInfo */ + rulesConfigInfo?: (google.cloud.backupdr.v1.IRuleConfigInfo[]|null); + + /** BackupPlanAssociation dataSource */ + dataSource?: (string|null); + } + + /** Represents a BackupPlanAssociation. */ + class BackupPlanAssociation implements IBackupPlanAssociation { + + /** + * Constructs a new BackupPlanAssociation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupPlanAssociation); + + /** BackupPlanAssociation name. */ + public name: string; + + /** BackupPlanAssociation resourceType. */ + public resourceType: string; + + /** BackupPlanAssociation resource. */ + public resource: string; + + /** BackupPlanAssociation backupPlan. */ + public backupPlan: string; + + /** BackupPlanAssociation createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation state. */ + public state: (google.cloud.backupdr.v1.BackupPlanAssociation.State|keyof typeof google.cloud.backupdr.v1.BackupPlanAssociation.State); + + /** BackupPlanAssociation rulesConfigInfo. */ + public rulesConfigInfo: google.cloud.backupdr.v1.IRuleConfigInfo[]; + + /** BackupPlanAssociation dataSource. */ + public dataSource: string; + + /** + * Creates a new BackupPlanAssociation instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupPlanAssociation instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupPlanAssociation): google.cloud.backupdr.v1.BackupPlanAssociation; + + /** + * Encodes the specified BackupPlanAssociation message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. + * @param message BackupPlanAssociation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupPlanAssociation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupPlanAssociation message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. + * @param message BackupPlanAssociation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupPlanAssociation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupPlanAssociation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupPlanAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupPlanAssociation; + + /** + * Decodes a BackupPlanAssociation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupPlanAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupPlanAssociation; + + /** + * Verifies a BackupPlanAssociation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupPlanAssociation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupPlanAssociation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupPlanAssociation; + + /** + * Creates a plain object from a BackupPlanAssociation message. Also converts values to other types if specified. + * @param message BackupPlanAssociation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupPlanAssociation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupPlanAssociation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupPlanAssociation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupPlanAssociation { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + INACTIVE = 4 + } + } + + /** Properties of a RuleConfigInfo. */ + interface IRuleConfigInfo { + + /** RuleConfigInfo ruleId */ + ruleId?: (string|null); + + /** RuleConfigInfo lastBackupState */ + lastBackupState?: (google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|null); + + /** RuleConfigInfo lastBackupError */ + lastBackupError?: (google.rpc.IStatus|null); + + /** RuleConfigInfo lastSuccessfulBackupConsistencyTime */ + lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a RuleConfigInfo. */ + class RuleConfigInfo implements IRuleConfigInfo { + + /** + * Constructs a new RuleConfigInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IRuleConfigInfo); + + /** RuleConfigInfo ruleId. */ + public ruleId: string; + + /** RuleConfigInfo lastBackupState. */ + public lastBackupState: (google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState); + + /** RuleConfigInfo lastBackupError. */ + public lastBackupError?: (google.rpc.IStatus|null); + + /** RuleConfigInfo lastSuccessfulBackupConsistencyTime. */ + public lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new RuleConfigInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RuleConfigInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.IRuleConfigInfo): google.cloud.backupdr.v1.RuleConfigInfo; + + /** + * Encodes the specified RuleConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. + * @param message RuleConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IRuleConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RuleConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. + * @param message RuleConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IRuleConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RuleConfigInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RuleConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RuleConfigInfo; + + /** + * Decodes a RuleConfigInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RuleConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RuleConfigInfo; + + /** + * Verifies a RuleConfigInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RuleConfigInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RuleConfigInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RuleConfigInfo; + + /** + * Creates a plain object from a RuleConfigInfo message. Also converts values to other types if specified. + * @param message RuleConfigInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.RuleConfigInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RuleConfigInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RuleConfigInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RuleConfigInfo { + + /** LastBackupState enum. */ + enum LastBackupState { + LAST_BACKUP_STATE_UNSPECIFIED = 0, + FIRST_BACKUP_PENDING = 1, + PERMISSION_DENIED = 2, + SUCCEEDED = 3, + FAILED = 4 + } + } + + /** Properties of a CreateBackupPlanAssociationRequest. */ + interface ICreateBackupPlanAssociationRequest { + + /** CreateBackupPlanAssociationRequest parent */ + parent?: (string|null); + + /** CreateBackupPlanAssociationRequest backupPlanAssociationId */ + backupPlanAssociationId?: (string|null); + + /** CreateBackupPlanAssociationRequest backupPlanAssociation */ + backupPlanAssociation?: (google.cloud.backupdr.v1.IBackupPlanAssociation|null); + + /** CreateBackupPlanAssociationRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateBackupPlanAssociationRequest. */ + class CreateBackupPlanAssociationRequest implements ICreateBackupPlanAssociationRequest { + + /** + * Constructs a new CreateBackupPlanAssociationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest); + + /** CreateBackupPlanAssociationRequest parent. */ + public parent: string; + + /** CreateBackupPlanAssociationRequest backupPlanAssociationId. */ + public backupPlanAssociationId: string; + + /** CreateBackupPlanAssociationRequest backupPlanAssociation. */ + public backupPlanAssociation?: (google.cloud.backupdr.v1.IBackupPlanAssociation|null); + + /** CreateBackupPlanAssociationRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateBackupPlanAssociationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupPlanAssociationRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; + + /** + * Encodes the specified CreateBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. + * @param message CreateBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. + * @param message CreateBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; + + /** + * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; + + /** + * Verifies a CreateBackupPlanAssociationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupPlanAssociationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; + + /** + * Creates a plain object from a CreateBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @param message CreateBackupPlanAssociationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupPlanAssociationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupPlanAssociationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlanAssociationsRequest. */ + interface IListBackupPlanAssociationsRequest { + + /** ListBackupPlanAssociationsRequest parent */ + parent?: (string|null); + + /** ListBackupPlanAssociationsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupPlanAssociationsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupPlanAssociationsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListBackupPlanAssociationsRequest. */ + class ListBackupPlanAssociationsRequest implements IListBackupPlanAssociationsRequest { + + /** + * Constructs a new ListBackupPlanAssociationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest); + + /** ListBackupPlanAssociationsRequest parent. */ + public parent: string; + + /** ListBackupPlanAssociationsRequest pageSize. */ + public pageSize: number; + + /** ListBackupPlanAssociationsRequest pageToken. */ + public pageToken: string; + + /** ListBackupPlanAssociationsRequest filter. */ + public filter: string; + + /** + * Creates a new ListBackupPlanAssociationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlanAssociationsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; + + /** + * Encodes the specified ListBackupPlanAssociationsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. + * @param message ListBackupPlanAssociationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlanAssociationsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. + * @param message ListBackupPlanAssociationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlanAssociationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; + + /** + * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlanAssociationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; + + /** + * Verifies a ListBackupPlanAssociationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlanAssociationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlanAssociationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; + + /** + * Creates a plain object from a ListBackupPlanAssociationsRequest message. Also converts values to other types if specified. + * @param message ListBackupPlanAssociationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlanAssociationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlanAssociationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlanAssociationsResponse. */ + interface IListBackupPlanAssociationsResponse { + + /** ListBackupPlanAssociationsResponse backupPlanAssociations */ + backupPlanAssociations?: (google.cloud.backupdr.v1.IBackupPlanAssociation[]|null); + + /** ListBackupPlanAssociationsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupPlanAssociationsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupPlanAssociationsResponse. */ + class ListBackupPlanAssociationsResponse implements IListBackupPlanAssociationsResponse { + + /** + * Constructs a new ListBackupPlanAssociationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse); + + /** ListBackupPlanAssociationsResponse backupPlanAssociations. */ + public backupPlanAssociations: google.cloud.backupdr.v1.IBackupPlanAssociation[]; + + /** ListBackupPlanAssociationsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupPlanAssociationsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupPlanAssociationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlanAssociationsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; + + /** + * Encodes the specified ListBackupPlanAssociationsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. + * @param message ListBackupPlanAssociationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlanAssociationsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. + * @param message ListBackupPlanAssociationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlanAssociationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; + + /** + * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlanAssociationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; + + /** + * Verifies a ListBackupPlanAssociationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlanAssociationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlanAssociationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; + + /** + * Creates a plain object from a ListBackupPlanAssociationsResponse message. Also converts values to other types if specified. + * @param message ListBackupPlanAssociationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlanAssociationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlanAssociationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupPlanAssociationRequest. */ + interface IGetBackupPlanAssociationRequest { + + /** GetBackupPlanAssociationRequest name */ + name?: (string|null); + } + + /** Represents a GetBackupPlanAssociationRequest. */ + class GetBackupPlanAssociationRequest implements IGetBackupPlanAssociationRequest { + + /** + * Constructs a new GetBackupPlanAssociationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest); + + /** GetBackupPlanAssociationRequest name. */ + public name: string; + + /** + * Creates a new GetBackupPlanAssociationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupPlanAssociationRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; + + /** + * Encodes the specified GetBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. + * @param message GetBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. + * @param message GetBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; + + /** + * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; + + /** + * Verifies a GetBackupPlanAssociationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupPlanAssociationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; + + /** + * Creates a plain object from a GetBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @param message GetBackupPlanAssociationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupPlanAssociationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupPlanAssociationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupPlanAssociationRequest. */ + interface IDeleteBackupPlanAssociationRequest { + + /** DeleteBackupPlanAssociationRequest name */ + name?: (string|null); + + /** DeleteBackupPlanAssociationRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteBackupPlanAssociationRequest. */ + class DeleteBackupPlanAssociationRequest implements IDeleteBackupPlanAssociationRequest { + + /** + * Constructs a new DeleteBackupPlanAssociationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest); + + /** DeleteBackupPlanAssociationRequest name. */ + public name: string; + + /** DeleteBackupPlanAssociationRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteBackupPlanAssociationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupPlanAssociationRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; + + /** + * Encodes the specified DeleteBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. + * @param message DeleteBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. + * @param message DeleteBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; + + /** + * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; + + /** + * Verifies a DeleteBackupPlanAssociationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupPlanAssociationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; + + /** + * Creates a plain object from a DeleteBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @param message DeleteBackupPlanAssociationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupPlanAssociationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupPlanAssociationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TriggerBackupRequest. */ + interface ITriggerBackupRequest { + + /** TriggerBackupRequest name */ + name?: (string|null); + + /** TriggerBackupRequest ruleId */ + ruleId?: (string|null); + + /** TriggerBackupRequest requestId */ + requestId?: (string|null); + } + + /** Represents a TriggerBackupRequest. */ + class TriggerBackupRequest implements ITriggerBackupRequest { + + /** + * Constructs a new TriggerBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ITriggerBackupRequest); + + /** TriggerBackupRequest name. */ + public name: string; + + /** TriggerBackupRequest ruleId. */ + public ruleId: string; + + /** TriggerBackupRequest requestId. */ + public requestId: string; + + /** + * Creates a new TriggerBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TriggerBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ITriggerBackupRequest): google.cloud.backupdr.v1.TriggerBackupRequest; + + /** + * Encodes the specified TriggerBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. + * @param message TriggerBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ITriggerBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TriggerBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. + * @param message TriggerBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ITriggerBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TriggerBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TriggerBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.TriggerBackupRequest; + + /** + * Decodes a TriggerBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TriggerBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.TriggerBackupRequest; + + /** + * Verifies a TriggerBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TriggerBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TriggerBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.TriggerBackupRequest; + + /** + * Creates a plain object from a TriggerBackupRequest message. Also converts values to other types if specified. + * @param message TriggerBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.TriggerBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TriggerBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TriggerBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupVault. */ + interface IBackupVault { + + /** BackupVault name */ + name?: (string|null); + + /** BackupVault description */ + description?: (string|null); + + /** BackupVault labels */ + labels?: ({ [k: string]: string }|null); + + /** BackupVault createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupMinimumEnforcedRetentionDuration */ + backupMinimumEnforcedRetentionDuration?: (google.protobuf.IDuration|null); + + /** BackupVault deletable */ + deletable?: (boolean|null); + + /** BackupVault etag */ + etag?: (string|null); + + /** BackupVault state */ + state?: (google.cloud.backupdr.v1.BackupVault.State|keyof typeof google.cloud.backupdr.v1.BackupVault.State|null); + + /** BackupVault effectiveTime */ + effectiveTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupCount */ + backupCount?: (number|Long|string|null); + + /** BackupVault serviceAccount */ + serviceAccount?: (string|null); + + /** BackupVault totalStoredBytes */ + totalStoredBytes?: (number|Long|string|null); + + /** BackupVault uid */ + uid?: (string|null); + + /** BackupVault annotations */ + annotations?: ({ [k: string]: string }|null); + + /** BackupVault accessRestriction */ + accessRestriction?: (google.cloud.backupdr.v1.BackupVault.AccessRestriction|keyof typeof google.cloud.backupdr.v1.BackupVault.AccessRestriction|null); + } + + /** Represents a BackupVault. */ + class BackupVault implements IBackupVault { + + /** + * Constructs a new BackupVault. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupVault); + + /** BackupVault name. */ + public name: string; + + /** BackupVault description. */ + public description?: (string|null); + + /** BackupVault labels. */ + public labels: { [k: string]: string }; + + /** BackupVault createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupMinimumEnforcedRetentionDuration. */ + public backupMinimumEnforcedRetentionDuration?: (google.protobuf.IDuration|null); + + /** BackupVault deletable. */ + public deletable?: (boolean|null); + + /** BackupVault etag. */ + public etag?: (string|null); + + /** BackupVault state. */ + public state: (google.cloud.backupdr.v1.BackupVault.State|keyof typeof google.cloud.backupdr.v1.BackupVault.State); + + /** BackupVault effectiveTime. */ + public effectiveTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupCount. */ + public backupCount: (number|Long|string); + + /** BackupVault serviceAccount. */ + public serviceAccount: string; + + /** BackupVault totalStoredBytes. */ + public totalStoredBytes: (number|Long|string); + + /** BackupVault uid. */ + public uid: string; + + /** BackupVault annotations. */ + public annotations: { [k: string]: string }; + + /** BackupVault accessRestriction. */ + public accessRestriction: (google.cloud.backupdr.v1.BackupVault.AccessRestriction|keyof typeof google.cloud.backupdr.v1.BackupVault.AccessRestriction); + + /** BackupVault _description. */ + public _description?: "description"; + + /** BackupVault _createTime. */ + public _createTime?: "createTime"; + + /** BackupVault _updateTime. */ + public _updateTime?: "updateTime"; + + /** BackupVault _backupMinimumEnforcedRetentionDuration. */ + public _backupMinimumEnforcedRetentionDuration?: "backupMinimumEnforcedRetentionDuration"; + + /** BackupVault _deletable. */ + public _deletable?: "deletable"; + + /** BackupVault _etag. */ + public _etag?: "etag"; + + /** BackupVault _effectiveTime. */ + public _effectiveTime?: "effectiveTime"; + + /** + * Creates a new BackupVault instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupVault instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupVault): google.cloud.backupdr.v1.BackupVault; + + /** + * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. + * @param message BackupVault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupVault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. + * @param message BackupVault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupVault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupVault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupVault; + + /** + * Decodes a BackupVault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupVault; + + /** + * Verifies a BackupVault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupVault + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupVault; + + /** + * Creates a plain object from a BackupVault message. Also converts values to other types if specified. + * @param message BackupVault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupVault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupVault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupVault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupVault { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + ERROR = 4 + } + + /** AccessRestriction enum. */ + enum AccessRestriction { + ACCESS_RESTRICTION_UNSPECIFIED = 0, + WITHIN_PROJECT = 1, + WITHIN_ORGANIZATION = 2, + UNRESTRICTED = 3 + } + } + + /** Properties of a DataSource. */ + interface IDataSource { + + /** DataSource name */ + name?: (string|null); + + /** DataSource state */ + state?: (google.cloud.backupdr.v1.DataSource.State|keyof typeof google.cloud.backupdr.v1.DataSource.State|null); + + /** DataSource labels */ + labels?: ({ [k: string]: string }|null); + + /** DataSource createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataSource updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DataSource backupCount */ + backupCount?: (number|Long|string|null); + + /** DataSource etag */ + etag?: (string|null); + + /** DataSource totalStoredBytes */ + totalStoredBytes?: (number|Long|string|null); + + /** DataSource configState */ + configState?: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState|null); + + /** DataSource backupConfigInfo */ + backupConfigInfo?: (google.cloud.backupdr.v1.IBackupConfigInfo|null); + + /** DataSource dataSourceGcpResource */ + dataSourceGcpResource?: (google.cloud.backupdr.v1.IDataSourceGcpResource|null); + + /** DataSource dataSourceBackupApplianceApplication */ + dataSourceBackupApplianceApplication?: (google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null); + } + + /** Represents a DataSource. */ + class DataSource implements IDataSource { + + /** + * Constructs a new DataSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDataSource); + + /** DataSource name. */ + public name: string; + + /** DataSource state. */ + public state: (google.cloud.backupdr.v1.DataSource.State|keyof typeof google.cloud.backupdr.v1.DataSource.State); + + /** DataSource labels. */ + public labels: { [k: string]: string }; + + /** DataSource createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataSource updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DataSource backupCount. */ + public backupCount?: (number|Long|string|null); + + /** DataSource etag. */ + public etag?: (string|null); + + /** DataSource totalStoredBytes. */ + public totalStoredBytes?: (number|Long|string|null); + + /** DataSource configState. */ + public configState: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState); + + /** DataSource backupConfigInfo. */ + public backupConfigInfo?: (google.cloud.backupdr.v1.IBackupConfigInfo|null); + + /** DataSource dataSourceGcpResource. */ + public dataSourceGcpResource?: (google.cloud.backupdr.v1.IDataSourceGcpResource|null); + + /** DataSource dataSourceBackupApplianceApplication. */ + public dataSourceBackupApplianceApplication?: (google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null); + + /** DataSource _createTime. */ + public _createTime?: "createTime"; + + /** DataSource _updateTime. */ + public _updateTime?: "updateTime"; + + /** DataSource _backupCount. */ + public _backupCount?: "backupCount"; + + /** DataSource _etag. */ + public _etag?: "etag"; + + /** DataSource _totalStoredBytes. */ + public _totalStoredBytes?: "totalStoredBytes"; + + /** DataSource sourceResource. */ + public sourceResource?: ("dataSourceGcpResource"|"dataSourceBackupApplianceApplication"); + + /** + * Creates a new DataSource instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSource instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDataSource): google.cloud.backupdr.v1.DataSource; + + /** + * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. + * @param message DataSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. + * @param message DataSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSource; + + /** + * Decodes a DataSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSource; + + /** + * Verifies a DataSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSource; + + /** + * Creates a plain object from a DataSource message. Also converts values to other types if specified. + * @param message DataSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DataSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataSource { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + ERROR = 4 + } + } + + /** Properties of a BackupConfigInfo. */ + interface IBackupConfigInfo { + + /** BackupConfigInfo lastBackupState */ + lastBackupState?: (google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|null); + + /** BackupConfigInfo lastSuccessfulBackupConsistencyTime */ + lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + + /** BackupConfigInfo lastBackupError */ + lastBackupError?: (google.rpc.IStatus|null); + + /** BackupConfigInfo gcpBackupConfig */ + gcpBackupConfig?: (google.cloud.backupdr.v1.IGcpBackupConfig|null); + + /** BackupConfigInfo backupApplianceBackupConfig */ + backupApplianceBackupConfig?: (google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null); + } + + /** Represents a BackupConfigInfo. */ + class BackupConfigInfo implements IBackupConfigInfo { + + /** + * Constructs a new BackupConfigInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupConfigInfo); + + /** BackupConfigInfo lastBackupState. */ + public lastBackupState: (google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState); + + /** BackupConfigInfo lastSuccessfulBackupConsistencyTime. */ + public lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + + /** BackupConfigInfo lastBackupError. */ + public lastBackupError?: (google.rpc.IStatus|null); + + /** BackupConfigInfo gcpBackupConfig. */ + public gcpBackupConfig?: (google.cloud.backupdr.v1.IGcpBackupConfig|null); + + /** BackupConfigInfo backupApplianceBackupConfig. */ + public backupApplianceBackupConfig?: (google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null); + + /** BackupConfigInfo backupConfig. */ + public backupConfig?: ("gcpBackupConfig"|"backupApplianceBackupConfig"); + + /** + * Creates a new BackupConfigInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupConfigInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupConfigInfo): google.cloud.backupdr.v1.BackupConfigInfo; + + /** + * Encodes the specified BackupConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. + * @param message BackupConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. + * @param message BackupConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupConfigInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupConfigInfo; + + /** + * Decodes a BackupConfigInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupConfigInfo; + + /** + * Verifies a BackupConfigInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupConfigInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupConfigInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupConfigInfo; + + /** + * Creates a plain object from a BackupConfigInfo message. Also converts values to other types if specified. + * @param message BackupConfigInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupConfigInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupConfigInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupConfigInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupConfigInfo { + + /** LastBackupState enum. */ + enum LastBackupState { + LAST_BACKUP_STATE_UNSPECIFIED = 0, + FIRST_BACKUP_PENDING = 1, + SUCCEEDED = 2, + FAILED = 3, + PERMISSION_DENIED = 4 + } + } + + /** Properties of a GcpBackupConfig. */ + interface IGcpBackupConfig { + + /** GcpBackupConfig backupPlan */ + backupPlan?: (string|null); + + /** GcpBackupConfig backupPlanDescription */ + backupPlanDescription?: (string|null); + + /** GcpBackupConfig backupPlanAssociation */ + backupPlanAssociation?: (string|null); + + /** GcpBackupConfig backupPlanRules */ + backupPlanRules?: (string[]|null); + } + + /** Represents a GcpBackupConfig. */ + class GcpBackupConfig implements IGcpBackupConfig { + + /** + * Constructs a new GcpBackupConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGcpBackupConfig); + + /** GcpBackupConfig backupPlan. */ + public backupPlan: string; + + /** GcpBackupConfig backupPlanDescription. */ + public backupPlanDescription: string; + + /** GcpBackupConfig backupPlanAssociation. */ + public backupPlanAssociation: string; + + /** GcpBackupConfig backupPlanRules. */ + public backupPlanRules: string[]; + + /** + * Creates a new GcpBackupConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GcpBackupConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGcpBackupConfig): google.cloud.backupdr.v1.GcpBackupConfig; + + /** + * Encodes the specified GcpBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * @param message GcpBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGcpBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcpBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * @param message GcpBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGcpBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcpBackupConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcpBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GcpBackupConfig; + + /** + * Decodes a GcpBackupConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcpBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GcpBackupConfig; + + /** + * Verifies a GcpBackupConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcpBackupConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcpBackupConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GcpBackupConfig; + + /** + * Creates a plain object from a GcpBackupConfig message. Also converts values to other types if specified. + * @param message GcpBackupConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GcpBackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcpBackupConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcpBackupConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupApplianceBackupConfig. */ + interface IBackupApplianceBackupConfig { + + /** BackupApplianceBackupConfig backupApplianceName */ + backupApplianceName?: (string|null); + + /** BackupApplianceBackupConfig backupApplianceId */ + backupApplianceId?: (number|Long|string|null); + + /** BackupApplianceBackupConfig slaId */ + slaId?: (number|Long|string|null); + + /** BackupApplianceBackupConfig applicationName */ + applicationName?: (string|null); + + /** BackupApplianceBackupConfig hostName */ + hostName?: (string|null); + + /** BackupApplianceBackupConfig sltName */ + sltName?: (string|null); + + /** BackupApplianceBackupConfig slpName */ + slpName?: (string|null); + } + + /** Represents a BackupApplianceBackupConfig. */ + class BackupApplianceBackupConfig implements IBackupApplianceBackupConfig { + + /** + * Constructs a new BackupApplianceBackupConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupConfig); + + /** BackupApplianceBackupConfig backupApplianceName. */ + public backupApplianceName: string; + + /** BackupApplianceBackupConfig backupApplianceId. */ + public backupApplianceId: (number|Long|string); + + /** BackupApplianceBackupConfig slaId. */ + public slaId: (number|Long|string); + + /** BackupApplianceBackupConfig applicationName. */ + public applicationName: string; + + /** BackupApplianceBackupConfig hostName. */ + public hostName: string; + + /** BackupApplianceBackupConfig sltName. */ + public sltName: string; + + /** BackupApplianceBackupConfig slpName. */ + public slpName: string; + + /** + * Creates a new BackupApplianceBackupConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupApplianceBackupConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupConfig): google.cloud.backupdr.v1.BackupApplianceBackupConfig; + + /** + * Encodes the specified BackupApplianceBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. + * @param message BackupApplianceBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupApplianceBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupApplianceBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. + * @param message BackupApplianceBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupApplianceBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceBackupConfig; + + /** + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupApplianceBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceBackupConfig; + + /** + * Verifies a BackupApplianceBackupConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupApplianceBackupConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupApplianceBackupConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceBackupConfig; + + /** + * Creates a plain object from a BackupApplianceBackupConfig message. Also converts values to other types if specified. + * @param message BackupApplianceBackupConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupApplianceBackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupApplianceBackupConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupApplianceBackupConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataSourceGcpResource. */ + interface IDataSourceGcpResource { + + /** DataSourceGcpResource gcpResourcename */ + gcpResourcename?: (string|null); + + /** DataSourceGcpResource location */ + location?: (string|null); + + /** DataSourceGcpResource type */ + type?: (string|null); + + /** DataSourceGcpResource computeInstanceDatasourceProperties */ + computeInstanceDatasourceProperties?: (google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null); + } + + /** Represents a DataSourceGcpResource. */ + class DataSourceGcpResource implements IDataSourceGcpResource { + + /** + * Constructs a new DataSourceGcpResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDataSourceGcpResource); + + /** DataSourceGcpResource gcpResourcename. */ + public gcpResourcename: string; + + /** DataSourceGcpResource location. */ + public location: string; + + /** DataSourceGcpResource type. */ + public type: string; + + /** DataSourceGcpResource computeInstanceDatasourceProperties. */ + public computeInstanceDatasourceProperties?: (google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null); + + /** DataSourceGcpResource gcpResourceProperties. */ + public gcpResourceProperties?: "computeInstanceDatasourceProperties"; + + /** + * Creates a new DataSourceGcpResource instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSourceGcpResource instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDataSourceGcpResource): google.cloud.backupdr.v1.DataSourceGcpResource; + + /** + * Encodes the specified DataSourceGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * @param message DataSourceGcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDataSourceGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSourceGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * @param message DataSourceGcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSourceGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSourceGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSourceGcpResource; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSourceGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSourceGcpResource; + + /** + * Verifies a DataSourceGcpResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSourceGcpResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSourceGcpResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSourceGcpResource; + + /** + * Creates a plain object from a DataSourceGcpResource message. Also converts values to other types if specified. + * @param message DataSourceGcpResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DataSourceGcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSourceGcpResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSourceGcpResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataSourceBackupApplianceApplication. */ + interface IDataSourceBackupApplianceApplication { + + /** DataSourceBackupApplianceApplication applicationName */ + applicationName?: (string|null); + + /** DataSourceBackupApplianceApplication backupAppliance */ + backupAppliance?: (string|null); + + /** DataSourceBackupApplianceApplication applianceId */ + applianceId?: (number|Long|string|null); + + /** DataSourceBackupApplianceApplication type */ + type?: (string|null); + + /** DataSourceBackupApplianceApplication applicationId */ + applicationId?: (number|Long|string|null); + + /** DataSourceBackupApplianceApplication hostname */ + hostname?: (string|null); + + /** DataSourceBackupApplianceApplication hostId */ + hostId?: (number|Long|string|null); + } + + /** Represents a DataSourceBackupApplianceApplication. */ + class DataSourceBackupApplianceApplication implements IDataSourceBackupApplianceApplication { + + /** + * Constructs a new DataSourceBackupApplianceApplication. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication); + + /** DataSourceBackupApplianceApplication applicationName. */ + public applicationName: string; + + /** DataSourceBackupApplianceApplication backupAppliance. */ + public backupAppliance: string; + + /** DataSourceBackupApplianceApplication applianceId. */ + public applianceId: (number|Long|string); + + /** DataSourceBackupApplianceApplication type. */ + public type: string; + + /** DataSourceBackupApplianceApplication applicationId. */ + public applicationId: (number|Long|string); + + /** DataSourceBackupApplianceApplication hostname. */ + public hostname: string; + + /** DataSourceBackupApplianceApplication hostId. */ + public hostId: (number|Long|string); + + /** + * Creates a new DataSourceBackupApplianceApplication instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSourceBackupApplianceApplication instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; + + /** + * Encodes the specified DataSourceBackupApplianceApplication message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. + * @param message DataSourceBackupApplianceApplication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSourceBackupApplianceApplication message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. + * @param message DataSourceBackupApplianceApplication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSourceBackupApplianceApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; + + /** + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSourceBackupApplianceApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; + + /** + * Verifies a DataSourceBackupApplianceApplication message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSourceBackupApplianceApplication message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSourceBackupApplianceApplication + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; + + /** + * Creates a plain object from a DataSourceBackupApplianceApplication message. Also converts values to other types if specified. + * @param message DataSourceBackupApplianceApplication + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DataSourceBackupApplianceApplication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSourceBackupApplianceApplication to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSourceBackupApplianceApplication + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceLockInfo. */ + interface IServiceLockInfo { + + /** ServiceLockInfo operation */ + operation?: (string|null); + } + + /** Represents a ServiceLockInfo. */ + class ServiceLockInfo implements IServiceLockInfo { + + /** + * Constructs a new ServiceLockInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IServiceLockInfo); + + /** ServiceLockInfo operation. */ + public operation: string; + + /** + * Creates a new ServiceLockInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceLockInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.IServiceLockInfo): google.cloud.backupdr.v1.ServiceLockInfo; + + /** + * Encodes the specified ServiceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. + * @param message ServiceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IServiceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. + * @param message ServiceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IServiceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceLockInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ServiceLockInfo; + + /** + * Decodes a ServiceLockInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ServiceLockInfo; + + /** + * Verifies a ServiceLockInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceLockInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceLockInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ServiceLockInfo; + + /** + * Creates a plain object from a ServiceLockInfo message. Also converts values to other types if specified. + * @param message ServiceLockInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ServiceLockInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceLockInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceLockInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupApplianceLockInfo. */ + interface IBackupApplianceLockInfo { + + /** BackupApplianceLockInfo backupApplianceId */ + backupApplianceId?: (number|Long|string|null); + + /** BackupApplianceLockInfo backupApplianceName */ + backupApplianceName?: (string|null); + + /** BackupApplianceLockInfo lockReason */ + lockReason?: (string|null); + + /** BackupApplianceLockInfo jobName */ + jobName?: (string|null); + + /** BackupApplianceLockInfo backupImage */ + backupImage?: (string|null); + + /** BackupApplianceLockInfo slaId */ + slaId?: (number|Long|string|null); + } + + /** Represents a BackupApplianceLockInfo. */ + class BackupApplianceLockInfo implements IBackupApplianceLockInfo { + + /** + * Constructs a new BackupApplianceLockInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceLockInfo); + + /** BackupApplianceLockInfo backupApplianceId. */ + public backupApplianceId: (number|Long|string); + + /** BackupApplianceLockInfo backupApplianceName. */ + public backupApplianceName: string; + + /** BackupApplianceLockInfo lockReason. */ + public lockReason: string; + + /** BackupApplianceLockInfo jobName. */ + public jobName?: (string|null); + + /** BackupApplianceLockInfo backupImage. */ + public backupImage?: (string|null); + + /** BackupApplianceLockInfo slaId. */ + public slaId?: (number|Long|string|null); + + /** BackupApplianceLockInfo lockSource. */ + public lockSource?: ("jobName"|"backupImage"|"slaId"); + + /** + * Creates a new BackupApplianceLockInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupApplianceLockInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceLockInfo): google.cloud.backupdr.v1.BackupApplianceLockInfo; + + /** + * Encodes the specified BackupApplianceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * @param message BackupApplianceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupApplianceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupApplianceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * @param message BackupApplianceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupApplianceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceLockInfo; + + /** + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupApplianceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceLockInfo; + + /** + * Verifies a BackupApplianceLockInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupApplianceLockInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupApplianceLockInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceLockInfo; + + /** + * Creates a plain object from a BackupApplianceLockInfo message. Also converts values to other types if specified. + * @param message BackupApplianceLockInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupApplianceLockInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupApplianceLockInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupApplianceLockInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupLock. */ + interface IBackupLock { + + /** BackupLock lockUntilTime */ + lockUntilTime?: (google.protobuf.ITimestamp|null); + + /** BackupLock backupApplianceLockInfo */ + backupApplianceLockInfo?: (google.cloud.backupdr.v1.IBackupApplianceLockInfo|null); + + /** BackupLock serviceLockInfo */ + serviceLockInfo?: (google.cloud.backupdr.v1.IServiceLockInfo|null); + } + + /** Represents a BackupLock. */ + class BackupLock implements IBackupLock { + + /** + * Constructs a new BackupLock. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupLock); + + /** BackupLock lockUntilTime. */ + public lockUntilTime?: (google.protobuf.ITimestamp|null); + + /** BackupLock backupApplianceLockInfo. */ + public backupApplianceLockInfo?: (google.cloud.backupdr.v1.IBackupApplianceLockInfo|null); + + /** BackupLock serviceLockInfo. */ + public serviceLockInfo?: (google.cloud.backupdr.v1.IServiceLockInfo|null); + + /** BackupLock ClientLockInfo. */ + public ClientLockInfo?: ("backupApplianceLockInfo"|"serviceLockInfo"); + + /** + * Creates a new BackupLock instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupLock instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupLock): google.cloud.backupdr.v1.BackupLock; + + /** + * Encodes the specified BackupLock message. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. + * @param message BackupLock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupLock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupLock message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. + * @param message BackupLock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupLock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupLock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupLock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupLock; + + /** + * Decodes a BackupLock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupLock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupLock; + + /** + * Verifies a BackupLock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupLock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupLock + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupLock; + + /** + * Creates a plain object from a BackupLock message. Also converts values to other types if specified. + * @param message BackupLock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupLock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupLock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupLock + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Backup. */ + interface IBackup { + + /** Backup name */ + name?: (string|null); + + /** Backup description */ + description?: (string|null); + + /** Backup createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Backup updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Backup labels */ + labels?: ({ [k: string]: string }|null); + + /** Backup enforcedRetentionEndTime */ + enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); + + /** Backup expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + + /** Backup consistencyTime */ + consistencyTime?: (google.protobuf.ITimestamp|null); + + /** Backup etag */ + etag?: (string|null); + + /** Backup state */ + state?: (google.cloud.backupdr.v1.Backup.State|keyof typeof google.cloud.backupdr.v1.Backup.State|null); + + /** Backup serviceLocks */ + serviceLocks?: (google.cloud.backupdr.v1.IBackupLock[]|null); + + /** Backup backupApplianceLocks */ + backupApplianceLocks?: (google.cloud.backupdr.v1.IBackupLock[]|null); + + /** Backup computeInstanceBackupProperties */ + computeInstanceBackupProperties?: (google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null); + + /** Backup backupApplianceBackupProperties */ + backupApplianceBackupProperties?: (google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null); + + /** Backup backupType */ + backupType?: (google.cloud.backupdr.v1.Backup.BackupType|keyof typeof google.cloud.backupdr.v1.Backup.BackupType|null); + + /** Backup gcpBackupPlanInfo */ + gcpBackupPlanInfo?: (google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null); + + /** Backup resourceSizeBytes */ + resourceSizeBytes?: (number|Long|string|null); + } + + /** Represents a Backup. */ + class Backup implements IBackup { + + /** + * Constructs a new Backup. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackup); + + /** Backup name. */ + public name: string; + + /** Backup description. */ + public description?: (string|null); + + /** Backup createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Backup updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Backup labels. */ + public labels: { [k: string]: string }; + + /** Backup enforcedRetentionEndTime. */ + public enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); + + /** Backup expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** Backup consistencyTime. */ + public consistencyTime?: (google.protobuf.ITimestamp|null); + + /** Backup etag. */ + public etag?: (string|null); + + /** Backup state. */ + public state: (google.cloud.backupdr.v1.Backup.State|keyof typeof google.cloud.backupdr.v1.Backup.State); + + /** Backup serviceLocks. */ + public serviceLocks: google.cloud.backupdr.v1.IBackupLock[]; + + /** Backup backupApplianceLocks. */ + public backupApplianceLocks: google.cloud.backupdr.v1.IBackupLock[]; + + /** Backup computeInstanceBackupProperties. */ + public computeInstanceBackupProperties?: (google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null); + + /** Backup backupApplianceBackupProperties. */ + public backupApplianceBackupProperties?: (google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null); + + /** Backup backupType. */ + public backupType: (google.cloud.backupdr.v1.Backup.BackupType|keyof typeof google.cloud.backupdr.v1.Backup.BackupType); + + /** Backup gcpBackupPlanInfo. */ + public gcpBackupPlanInfo?: (google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null); + + /** Backup resourceSizeBytes. */ + public resourceSizeBytes: (number|Long|string); + + /** Backup _description. */ + public _description?: "description"; + + /** Backup _createTime. */ + public _createTime?: "createTime"; + + /** Backup _updateTime. */ + public _updateTime?: "updateTime"; + + /** Backup _enforcedRetentionEndTime. */ + public _enforcedRetentionEndTime?: "enforcedRetentionEndTime"; + + /** Backup _expireTime. */ + public _expireTime?: "expireTime"; + + /** Backup _consistencyTime. */ + public _consistencyTime?: "consistencyTime"; + + /** Backup _etag. */ + public _etag?: "etag"; + + /** Backup backupProperties. */ + public backupProperties?: ("computeInstanceBackupProperties"|"backupApplianceBackupProperties"); + + /** Backup planInfo. */ + public planInfo?: "gcpBackupPlanInfo"; + + /** + * Creates a new Backup instance using the specified properties. + * @param [properties] Properties to set + * @returns Backup instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackup): google.cloud.backupdr.v1.Backup; + + /** + * Encodes the specified Backup message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Backup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Backup; + + /** + * Decodes a Backup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Backup; + + /** + * Verifies a Backup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Backup + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Backup; + + /** + * Creates a plain object from a Backup message. Also converts values to other types if specified. + * @param message Backup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Backup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Backup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Backup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Backup { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + ERROR = 4 + } + + /** BackupType enum. */ + enum BackupType { + BACKUP_TYPE_UNSPECIFIED = 0, + SCHEDULED = 1, + ON_DEMAND = 2 + } + + /** Properties of a GCPBackupPlanInfo. */ + interface IGCPBackupPlanInfo { + + /** GCPBackupPlanInfo backupPlan */ + backupPlan?: (string|null); + + /** GCPBackupPlanInfo backupPlanRuleId */ + backupPlanRuleId?: (string|null); + } + + /** Represents a GCPBackupPlanInfo. */ + class GCPBackupPlanInfo implements IGCPBackupPlanInfo { + + /** + * Constructs a new GCPBackupPlanInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo); + + /** GCPBackupPlanInfo backupPlan. */ + public backupPlan: string; + + /** GCPBackupPlanInfo backupPlanRuleId. */ + public backupPlanRuleId: string; + + /** + * Creates a new GCPBackupPlanInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GCPBackupPlanInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; + + /** + * Encodes the specified GCPBackupPlanInfo message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @param message GCPBackupPlanInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GCPBackupPlanInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @param message GCPBackupPlanInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GCPBackupPlanInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; + + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GCPBackupPlanInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; + + /** + * Verifies a GCPBackupPlanInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GCPBackupPlanInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GCPBackupPlanInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; + + /** + * Creates a plain object from a GCPBackupPlanInfo message. Also converts values to other types if specified. + * @param message GCPBackupPlanInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GCPBackupPlanInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GCPBackupPlanInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateBackupVaultRequest. */ + interface ICreateBackupVaultRequest { + + /** CreateBackupVaultRequest parent */ + parent?: (string|null); + + /** CreateBackupVaultRequest backupVaultId */ + backupVaultId?: (string|null); + + /** CreateBackupVaultRequest backupVault */ + backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); + + /** CreateBackupVaultRequest requestId */ + requestId?: (string|null); + + /** CreateBackupVaultRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateBackupVaultRequest. */ + class CreateBackupVaultRequest implements ICreateBackupVaultRequest { + + /** + * Constructs a new CreateBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICreateBackupVaultRequest); + + /** CreateBackupVaultRequest parent. */ + public parent: string; + + /** CreateBackupVaultRequest backupVaultId. */ + public backupVaultId: string; + + /** CreateBackupVaultRequest backupVault. */ + public backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); + + /** CreateBackupVaultRequest requestId. */ + public requestId: string; + + /** CreateBackupVaultRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICreateBackupVaultRequest): google.cloud.backupdr.v1.CreateBackupVaultRequest; + + /** + * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. + * @param message CreateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICreateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. + * @param message CreateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupVaultRequest; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupVaultRequest; + + /** + * Verifies a CreateBackupVaultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupVaultRequest; + + /** + * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. + * @param message CreateBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CreateBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupVaultsRequest. */ + interface IListBackupVaultsRequest { + + /** ListBackupVaultsRequest parent */ + parent?: (string|null); + + /** ListBackupVaultsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupVaultsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupVaultsRequest filter */ + filter?: (string|null); + + /** ListBackupVaultsRequest orderBy */ + orderBy?: (string|null); + + /** ListBackupVaultsRequest view */ + view?: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView|null); + } + + /** Represents a ListBackupVaultsRequest. */ + class ListBackupVaultsRequest implements IListBackupVaultsRequest { + + /** + * Constructs a new ListBackupVaultsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupVaultsRequest); + + /** ListBackupVaultsRequest parent. */ + public parent: string; + + /** ListBackupVaultsRequest pageSize. */ + public pageSize: number; + + /** ListBackupVaultsRequest pageToken. */ + public pageToken: string; + + /** ListBackupVaultsRequest filter. */ + public filter: string; + + /** ListBackupVaultsRequest orderBy. */ + public orderBy: string; + + /** ListBackupVaultsRequest view. */ + public view: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView); + + /** + * Creates a new ListBackupVaultsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupVaultsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupVaultsRequest): google.cloud.backupdr.v1.ListBackupVaultsRequest; + + /** + * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. + * @param message ListBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. + * @param message ListBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupVaultsRequest; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupVaultsRequest; + + /** + * Verifies a ListBackupVaultsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupVaultsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupVaultsRequest; + + /** + * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. + * @param message ListBackupVaultsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupVaultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupVaultsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupVaultsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupVaultsResponse. */ + interface IListBackupVaultsResponse { + + /** ListBackupVaultsResponse backupVaults */ + backupVaults?: (google.cloud.backupdr.v1.IBackupVault[]|null); + + /** ListBackupVaultsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupVaultsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupVaultsResponse. */ + class ListBackupVaultsResponse implements IListBackupVaultsResponse { + + /** + * Constructs a new ListBackupVaultsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupVaultsResponse); + + /** ListBackupVaultsResponse backupVaults. */ + public backupVaults: google.cloud.backupdr.v1.IBackupVault[]; + + /** ListBackupVaultsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupVaultsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupVaultsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupVaultsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupVaultsResponse): google.cloud.backupdr.v1.ListBackupVaultsResponse; + + /** + * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. + * @param message ListBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. + * @param message ListBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupVaultsResponse; + + /** + * Decodes a ListBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupVaultsResponse; + + /** + * Verifies a ListBackupVaultsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupVaultsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupVaultsResponse; + + /** + * Creates a plain object from a ListBackupVaultsResponse message. Also converts values to other types if specified. + * @param message ListBackupVaultsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupVaultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupVaultsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupVaultsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchUsableBackupVaultsRequest. */ + interface IFetchUsableBackupVaultsRequest { + + /** FetchUsableBackupVaultsRequest parent */ + parent?: (string|null); + + /** FetchUsableBackupVaultsRequest pageSize */ + pageSize?: (number|null); + + /** FetchUsableBackupVaultsRequest pageToken */ + pageToken?: (string|null); + + /** FetchUsableBackupVaultsRequest filter */ + filter?: (string|null); + + /** FetchUsableBackupVaultsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a FetchUsableBackupVaultsRequest. */ + class FetchUsableBackupVaultsRequest implements IFetchUsableBackupVaultsRequest { + + /** + * Constructs a new FetchUsableBackupVaultsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest); + + /** FetchUsableBackupVaultsRequest parent. */ + public parent: string; + + /** FetchUsableBackupVaultsRequest pageSize. */ + public pageSize: number; + + /** FetchUsableBackupVaultsRequest pageToken. */ + public pageToken: string; + + /** FetchUsableBackupVaultsRequest filter. */ + public filter: string; + + /** FetchUsableBackupVaultsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new FetchUsableBackupVaultsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchUsableBackupVaultsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; + + /** + * Encodes the specified FetchUsableBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. + * @param message FetchUsableBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchUsableBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. + * @param message FetchUsableBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchUsableBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; + + /** + * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchUsableBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; + + /** + * Verifies a FetchUsableBackupVaultsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchUsableBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchUsableBackupVaultsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; + + /** + * Creates a plain object from a FetchUsableBackupVaultsRequest message. Also converts values to other types if specified. + * @param message FetchUsableBackupVaultsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchUsableBackupVaultsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchUsableBackupVaultsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchUsableBackupVaultsResponse. */ + interface IFetchUsableBackupVaultsResponse { + + /** FetchUsableBackupVaultsResponse backupVaults */ + backupVaults?: (google.cloud.backupdr.v1.IBackupVault[]|null); + + /** FetchUsableBackupVaultsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** FetchUsableBackupVaultsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a FetchUsableBackupVaultsResponse. */ + class FetchUsableBackupVaultsResponse implements IFetchUsableBackupVaultsResponse { + + /** + * Constructs a new FetchUsableBackupVaultsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse); + + /** FetchUsableBackupVaultsResponse backupVaults. */ + public backupVaults: google.cloud.backupdr.v1.IBackupVault[]; + + /** FetchUsableBackupVaultsResponse nextPageToken. */ + public nextPageToken: string; + + /** FetchUsableBackupVaultsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new FetchUsableBackupVaultsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchUsableBackupVaultsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; + + /** + * Encodes the specified FetchUsableBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. + * @param message FetchUsableBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchUsableBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. + * @param message FetchUsableBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchUsableBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; + + /** + * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchUsableBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; + + /** + * Verifies a FetchUsableBackupVaultsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchUsableBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchUsableBackupVaultsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; + + /** + * Creates a plain object from a FetchUsableBackupVaultsResponse message. Also converts values to other types if specified. + * @param message FetchUsableBackupVaultsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchUsableBackupVaultsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchUsableBackupVaultsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupVaultRequest. */ + interface IGetBackupVaultRequest { + + /** GetBackupVaultRequest name */ + name?: (string|null); + + /** GetBackupVaultRequest view */ + view?: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView|null); + } + + /** Represents a GetBackupVaultRequest. */ + class GetBackupVaultRequest implements IGetBackupVaultRequest { + + /** + * Constructs a new GetBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetBackupVaultRequest); + + /** GetBackupVaultRequest name. */ + public name: string; + + /** GetBackupVaultRequest view. */ + public view: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView); + + /** + * Creates a new GetBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetBackupVaultRequest): google.cloud.backupdr.v1.GetBackupVaultRequest; + + /** + * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. + * @param message GetBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. + * @param message GetBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupVaultRequest; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupVaultRequest; + + /** + * Verifies a GetBackupVaultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupVaultRequest; + + /** + * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. + * @param message GetBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateBackupVaultRequest. */ + interface IUpdateBackupVaultRequest { + + /** UpdateBackupVaultRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupVaultRequest backupVault */ + backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); + + /** UpdateBackupVaultRequest requestId */ + requestId?: (string|null); + + /** UpdateBackupVaultRequest validateOnly */ + validateOnly?: (boolean|null); + + /** UpdateBackupVaultRequest force */ + force?: (boolean|null); + } + + /** Represents an UpdateBackupVaultRequest. */ + class UpdateBackupVaultRequest implements IUpdateBackupVaultRequest { + + /** + * Constructs a new UpdateBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IUpdateBackupVaultRequest); + + /** UpdateBackupVaultRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupVaultRequest backupVault. */ + public backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); + + /** UpdateBackupVaultRequest requestId. */ + public requestId: string; + + /** UpdateBackupVaultRequest validateOnly. */ + public validateOnly: boolean; + + /** UpdateBackupVaultRequest force. */ + public force: boolean; + + /** + * Creates a new UpdateBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IUpdateBackupVaultRequest): google.cloud.backupdr.v1.UpdateBackupVaultRequest; + + /** + * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. + * @param message UpdateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. + * @param message UpdateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateBackupVaultRequest; + + /** + * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateBackupVaultRequest; + + /** + * Verifies an UpdateBackupVaultRequest message. + * @param message Plain 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 UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateBackupVaultRequest; + + /** + * Creates a plain object from an UpdateBackupVaultRequest message. Also converts values to other types if specified. + * @param message UpdateBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.UpdateBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupVaultRequest. */ + interface IDeleteBackupVaultRequest { + + /** DeleteBackupVaultRequest name */ + name?: (string|null); + + /** DeleteBackupVaultRequest requestId */ + requestId?: (string|null); + + /** DeleteBackupVaultRequest force */ + force?: (boolean|null); + + /** DeleteBackupVaultRequest etag */ + etag?: (string|null); + + /** DeleteBackupVaultRequest validateOnly */ + validateOnly?: (boolean|null); + + /** DeleteBackupVaultRequest allowMissing */ + allowMissing?: (boolean|null); + } + + /** Represents a DeleteBackupVaultRequest. */ + class DeleteBackupVaultRequest implements IDeleteBackupVaultRequest { + + /** + * Constructs a new DeleteBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupVaultRequest); + + /** DeleteBackupVaultRequest name. */ + public name: string; + + /** DeleteBackupVaultRequest requestId. */ + public requestId: string; + + /** DeleteBackupVaultRequest force. */ + public force: boolean; + + /** DeleteBackupVaultRequest etag. */ + public etag: string; + + /** DeleteBackupVaultRequest validateOnly. */ + public validateOnly: boolean; + + /** DeleteBackupVaultRequest allowMissing. */ + public allowMissing: boolean; + + /** + * Creates a new DeleteBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupVaultRequest): google.cloud.backupdr.v1.DeleteBackupVaultRequest; + + /** + * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. + * @param message DeleteBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. + * @param message DeleteBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupVaultRequest; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupVaultRequest; + + /** + * Verifies a DeleteBackupVaultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupVaultRequest; + + /** + * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. + * @param message DeleteBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataSourcesRequest. */ + interface IListDataSourcesRequest { + + /** ListDataSourcesRequest parent */ + parent?: (string|null); + + /** ListDataSourcesRequest pageSize */ + pageSize?: (number|null); + + /** ListDataSourcesRequest pageToken */ + pageToken?: (string|null); + + /** ListDataSourcesRequest filter */ + filter?: (string|null); + + /** ListDataSourcesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListDataSourcesRequest. */ + class ListDataSourcesRequest implements IListDataSourcesRequest { + + /** + * Constructs a new ListDataSourcesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListDataSourcesRequest); + + /** ListDataSourcesRequest parent. */ + public parent: string; + + /** ListDataSourcesRequest pageSize. */ + public pageSize: number; + + /** ListDataSourcesRequest pageToken. */ + public pageToken: string; + + /** ListDataSourcesRequest filter. */ + public filter: string; + + /** ListDataSourcesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListDataSourcesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataSourcesRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListDataSourcesRequest): google.cloud.backupdr.v1.ListDataSourcesRequest; + + /** + * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. + * @param message ListDataSourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListDataSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. + * @param message ListDataSourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListDataSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataSourcesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListDataSourcesRequest; + + /** + * Decodes a ListDataSourcesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListDataSourcesRequest; + + /** + * Verifies a ListDataSourcesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataSourcesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListDataSourcesRequest; + + /** + * Creates a plain object from a ListDataSourcesRequest message. Also converts values to other types if specified. + * @param message ListDataSourcesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListDataSourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataSourcesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataSourcesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataSourcesResponse. */ + interface IListDataSourcesResponse { + + /** ListDataSourcesResponse dataSources */ + dataSources?: (google.cloud.backupdr.v1.IDataSource[]|null); + + /** ListDataSourcesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListDataSourcesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListDataSourcesResponse. */ + class ListDataSourcesResponse implements IListDataSourcesResponse { + + /** + * Constructs a new ListDataSourcesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListDataSourcesResponse); + + /** ListDataSourcesResponse dataSources. */ + public dataSources: google.cloud.backupdr.v1.IDataSource[]; + + /** ListDataSourcesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListDataSourcesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListDataSourcesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataSourcesResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListDataSourcesResponse): google.cloud.backupdr.v1.ListDataSourcesResponse; + + /** + * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. + * @param message ListDataSourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListDataSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. + * @param message ListDataSourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListDataSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataSourcesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListDataSourcesResponse; + + /** + * Decodes a ListDataSourcesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListDataSourcesResponse; + + /** + * Verifies a ListDataSourcesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataSourcesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListDataSourcesResponse; + + /** + * Creates a plain object from a ListDataSourcesResponse message. Also converts values to other types if specified. + * @param message ListDataSourcesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListDataSourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataSourcesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataSourcesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataSourceRequest. */ + interface IGetDataSourceRequest { + + /** GetDataSourceRequest name */ + name?: (string|null); + } + + /** Represents a GetDataSourceRequest. */ + class GetDataSourceRequest implements IGetDataSourceRequest { + + /** + * Constructs a new GetDataSourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetDataSourceRequest); + + /** GetDataSourceRequest name. */ + public name: string; + + /** + * Creates a new GetDataSourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataSourceRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetDataSourceRequest): google.cloud.backupdr.v1.GetDataSourceRequest; + + /** + * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. + * @param message GetDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. + * @param message GetDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataSourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetDataSourceRequest; + + /** + * Decodes a GetDataSourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetDataSourceRequest; + + /** + * Verifies a GetDataSourceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataSourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetDataSourceRequest; + + /** + * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. + * @param message GetDataSourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataSourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataSourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataSourceRequest. */ + interface IUpdateDataSourceRequest { + + /** UpdateDataSourceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataSourceRequest dataSource */ + dataSource?: (google.cloud.backupdr.v1.IDataSource|null); + + /** UpdateDataSourceRequest requestId */ + requestId?: (string|null); + + /** UpdateDataSourceRequest allowMissing */ + allowMissing?: (boolean|null); + } + + /** Represents an UpdateDataSourceRequest. */ + class UpdateDataSourceRequest implements IUpdateDataSourceRequest { + + /** + * Constructs a new UpdateDataSourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IUpdateDataSourceRequest); + + /** UpdateDataSourceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataSourceRequest dataSource. */ + public dataSource?: (google.cloud.backupdr.v1.IDataSource|null); + + /** UpdateDataSourceRequest requestId. */ + public requestId: string; + + /** UpdateDataSourceRequest allowMissing. */ + public allowMissing: boolean; + + /** + * Creates a new UpdateDataSourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataSourceRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IUpdateDataSourceRequest): google.cloud.backupdr.v1.UpdateDataSourceRequest; + + /** + * Encodes the specified UpdateDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. + * @param message UpdateDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IUpdateDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. + * @param message UpdateDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateDataSourceRequest; + + /** + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateDataSourceRequest; + + /** + * Verifies an UpdateDataSourceRequest message. + * @param message Plain 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 UpdateDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataSourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateDataSourceRequest; + + /** + * Creates a plain object from an UpdateDataSourceRequest message. Also converts values to other types if specified. + * @param message UpdateDataSourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.UpdateDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataSourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataSourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemoveDataSourceRequest. */ + interface IRemoveDataSourceRequest { + + /** RemoveDataSourceRequest name */ + name?: (string|null); + + /** RemoveDataSourceRequest requestId */ + requestId?: (string|null); + } + + /** Represents a RemoveDataSourceRequest. */ + class RemoveDataSourceRequest implements IRemoveDataSourceRequest { + + /** + * Constructs a new RemoveDataSourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IRemoveDataSourceRequest); + + /** RemoveDataSourceRequest name. */ + public name: string; + + /** RemoveDataSourceRequest requestId. */ + public requestId: string; + + /** + * Creates a new RemoveDataSourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveDataSourceRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IRemoveDataSourceRequest): google.cloud.backupdr.v1.RemoveDataSourceRequest; + + /** + * Encodes the specified RemoveDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. + * @param message RemoveDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IRemoveDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. + * @param message RemoveDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IRemoveDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveDataSourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RemoveDataSourceRequest; + + /** + * Decodes a RemoveDataSourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RemoveDataSourceRequest; + + /** + * Verifies a RemoveDataSourceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemoveDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveDataSourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RemoveDataSourceRequest; + + /** + * Creates a plain object from a RemoveDataSourceRequest message. Also converts values to other types if specified. + * @param message RemoveDataSourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.RemoveDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveDataSourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveDataSourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetInternalStatusRequest. */ + interface ISetInternalStatusRequest { + + /** SetInternalStatusRequest dataSource */ + dataSource?: (string|null); + + /** SetInternalStatusRequest value */ + value?: (Uint8Array|string|null); + + /** SetInternalStatusRequest backupConfigState */ + backupConfigState?: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState|null); + + /** SetInternalStatusRequest requestId */ + requestId?: (string|null); + } + + /** Represents a SetInternalStatusRequest. */ + class SetInternalStatusRequest implements ISetInternalStatusRequest { + + /** + * Constructs a new SetInternalStatusRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ISetInternalStatusRequest); + + /** SetInternalStatusRequest dataSource. */ + public dataSource: string; + + /** SetInternalStatusRequest value. */ + public value: (Uint8Array|string); + + /** SetInternalStatusRequest backupConfigState. */ + public backupConfigState: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState); + + /** SetInternalStatusRequest requestId. */ + public requestId: string; + + /** + * Creates a new SetInternalStatusRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetInternalStatusRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ISetInternalStatusRequest): google.cloud.backupdr.v1.SetInternalStatusRequest; + + /** + * Encodes the specified SetInternalStatusRequest message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. + * @param message SetInternalStatusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ISetInternalStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetInternalStatusRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. + * @param message SetInternalStatusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ISetInternalStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetInternalStatusRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetInternalStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SetInternalStatusRequest; + + /** + * Decodes a SetInternalStatusRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetInternalStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SetInternalStatusRequest; + + /** + * Verifies a SetInternalStatusRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetInternalStatusRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetInternalStatusRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SetInternalStatusRequest; + + /** + * Creates a plain object from a SetInternalStatusRequest message. Also converts values to other types if specified. + * @param message SetInternalStatusRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.SetInternalStatusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetInternalStatusRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetInternalStatusRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetInternalStatusResponse. */ + interface ISetInternalStatusResponse { + } + + /** Represents a SetInternalStatusResponse. */ + class SetInternalStatusResponse implements ISetInternalStatusResponse { + + /** + * Constructs a new SetInternalStatusResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ISetInternalStatusResponse); + + /** + * Creates a new SetInternalStatusResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SetInternalStatusResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.ISetInternalStatusResponse): google.cloud.backupdr.v1.SetInternalStatusResponse; + + /** + * Encodes the specified SetInternalStatusResponse message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. + * @param message SetInternalStatusResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ISetInternalStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetInternalStatusResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. + * @param message SetInternalStatusResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ISetInternalStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetInternalStatusResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetInternalStatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SetInternalStatusResponse; + + /** + * Decodes a SetInternalStatusResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetInternalStatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SetInternalStatusResponse; + + /** + * Verifies a SetInternalStatusResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetInternalStatusResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetInternalStatusResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SetInternalStatusResponse; + + /** + * Creates a plain object from a SetInternalStatusResponse message. Also converts values to other types if specified. + * @param message SetInternalStatusResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.SetInternalStatusResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetInternalStatusResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetInternalStatusResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InitiateBackupRequest. */ + interface IInitiateBackupRequest { + + /** InitiateBackupRequest dataSource */ + dataSource?: (string|null); + + /** InitiateBackupRequest requestId */ + requestId?: (string|null); + + /** InitiateBackupRequest backupId */ + backupId?: (string|null); + } + + /** Represents an InitiateBackupRequest. */ + class InitiateBackupRequest implements IInitiateBackupRequest { + + /** + * Constructs a new InitiateBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IInitiateBackupRequest); + + /** InitiateBackupRequest dataSource. */ + public dataSource: string; + + /** InitiateBackupRequest requestId. */ + public requestId: string; + + /** InitiateBackupRequest backupId. */ + public backupId: string; + + /** + * Creates a new InitiateBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns InitiateBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IInitiateBackupRequest): google.cloud.backupdr.v1.InitiateBackupRequest; + + /** + * Encodes the specified InitiateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. + * @param message InitiateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IInitiateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InitiateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. + * @param message InitiateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IInitiateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InitiateBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InitiateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InitiateBackupRequest; + + /** + * Decodes an InitiateBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InitiateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InitiateBackupRequest; + + /** + * Verifies an InitiateBackupRequest message. + * @param message Plain 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 InitiateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InitiateBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InitiateBackupRequest; + + /** + * Creates a plain object from an InitiateBackupRequest message. Also converts values to other types if specified. + * @param message InitiateBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.InitiateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InitiateBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InitiateBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InitiateBackupResponse. */ + interface IInitiateBackupResponse { + + /** InitiateBackupResponse backup */ + backup?: (string|null); + + /** InitiateBackupResponse newBackupGenerationId */ + newBackupGenerationId?: (number|null); + + /** InitiateBackupResponse baseBackupGenerationId */ + baseBackupGenerationId?: (number|null); + } + + /** Represents an InitiateBackupResponse. */ + class InitiateBackupResponse implements IInitiateBackupResponse { + + /** + * Constructs a new InitiateBackupResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IInitiateBackupResponse); + + /** InitiateBackupResponse backup. */ + public backup: string; + + /** InitiateBackupResponse newBackupGenerationId. */ + public newBackupGenerationId: number; + + /** InitiateBackupResponse baseBackupGenerationId. */ + public baseBackupGenerationId: number; + + /** + * Creates a new InitiateBackupResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns InitiateBackupResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IInitiateBackupResponse): google.cloud.backupdr.v1.InitiateBackupResponse; + + /** + * Encodes the specified InitiateBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. + * @param message InitiateBackupResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IInitiateBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InitiateBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. + * @param message InitiateBackupResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IInitiateBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InitiateBackupResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InitiateBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InitiateBackupResponse; + + /** + * Decodes an InitiateBackupResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InitiateBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InitiateBackupResponse; + + /** + * Verifies an InitiateBackupResponse message. + * @param message Plain 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 InitiateBackupResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InitiateBackupResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InitiateBackupResponse; + + /** + * Creates a plain object from an InitiateBackupResponse message. Also converts values to other types if specified. + * @param message InitiateBackupResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.InitiateBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InitiateBackupResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InitiateBackupResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AbandonBackupRequest. */ + interface IAbandonBackupRequest { + + /** AbandonBackupRequest dataSource */ + dataSource?: (string|null); + + /** AbandonBackupRequest requestId */ + requestId?: (string|null); + } + + /** Represents an AbandonBackupRequest. */ + class AbandonBackupRequest implements IAbandonBackupRequest { + + /** + * Constructs a new AbandonBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAbandonBackupRequest); + + /** AbandonBackupRequest dataSource. */ + public dataSource: string; + + /** AbandonBackupRequest requestId. */ + public requestId: string; + + /** + * Creates a new AbandonBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AbandonBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAbandonBackupRequest): google.cloud.backupdr.v1.AbandonBackupRequest; + + /** + * Encodes the specified AbandonBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. + * @param message AbandonBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAbandonBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AbandonBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. + * @param message AbandonBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAbandonBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AbandonBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AbandonBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AbandonBackupRequest; + + /** + * Decodes an AbandonBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AbandonBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AbandonBackupRequest; + + /** + * Verifies an AbandonBackupRequest message. + * @param message Plain 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 AbandonBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AbandonBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AbandonBackupRequest; + + /** + * Creates a plain object from an AbandonBackupRequest message. Also converts values to other types if specified. + * @param message AbandonBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AbandonBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AbandonBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AbandonBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FinalizeBackupRequest. */ + interface IFinalizeBackupRequest { + + /** FinalizeBackupRequest dataSource */ + dataSource?: (string|null); + + /** FinalizeBackupRequest description */ + description?: (string|null); + + /** FinalizeBackupRequest consistencyTime */ + consistencyTime?: (google.protobuf.ITimestamp|null); + + /** FinalizeBackupRequest requestId */ + requestId?: (string|null); + + /** FinalizeBackupRequest backupId */ + backupId?: (string|null); + + /** FinalizeBackupRequest recoveryRangeStartTime */ + recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); + + /** FinalizeBackupRequest recoveryRangeEndTime */ + recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); + + /** FinalizeBackupRequest retentionDuration */ + retentionDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a FinalizeBackupRequest. */ + class FinalizeBackupRequest implements IFinalizeBackupRequest { + + /** + * Constructs a new FinalizeBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFinalizeBackupRequest); + + /** FinalizeBackupRequest dataSource. */ + public dataSource: string; + + /** FinalizeBackupRequest description. */ + public description?: (string|null); + + /** FinalizeBackupRequest consistencyTime. */ + public consistencyTime?: (google.protobuf.ITimestamp|null); + + /** FinalizeBackupRequest requestId. */ + public requestId: string; + + /** FinalizeBackupRequest backupId. */ + public backupId: string; + + /** FinalizeBackupRequest recoveryRangeStartTime. */ + public recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); + + /** FinalizeBackupRequest recoveryRangeEndTime. */ + public recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); + + /** FinalizeBackupRequest retentionDuration. */ + public retentionDuration?: (google.protobuf.IDuration|null); + + /** FinalizeBackupRequest _description. */ + public _description?: "description"; + + /** FinalizeBackupRequest _consistencyTime. */ + public _consistencyTime?: "consistencyTime"; + + /** FinalizeBackupRequest _recoveryRangeStartTime. */ + public _recoveryRangeStartTime?: "recoveryRangeStartTime"; + + /** FinalizeBackupRequest _recoveryRangeEndTime. */ + public _recoveryRangeEndTime?: "recoveryRangeEndTime"; + + /** FinalizeBackupRequest _retentionDuration. */ + public _retentionDuration?: "retentionDuration"; + + /** + * Creates a new FinalizeBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FinalizeBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFinalizeBackupRequest): google.cloud.backupdr.v1.FinalizeBackupRequest; + + /** + * Encodes the specified FinalizeBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. + * @param message FinalizeBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFinalizeBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FinalizeBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. + * @param message FinalizeBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFinalizeBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FinalizeBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FinalizeBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FinalizeBackupRequest; + + /** + * Decodes a FinalizeBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FinalizeBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FinalizeBackupRequest; + + /** + * Verifies a FinalizeBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FinalizeBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FinalizeBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FinalizeBackupRequest; + + /** + * Creates a plain object from a FinalizeBackupRequest message. Also converts values to other types if specified. + * @param message FinalizeBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FinalizeBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FinalizeBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FinalizeBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchAccessTokenRequest. */ + interface IFetchAccessTokenRequest { + + /** FetchAccessTokenRequest name */ + name?: (string|null); + + /** FetchAccessTokenRequest generationId */ + generationId?: (number|null); + } + + /** Represents a FetchAccessTokenRequest. */ + class FetchAccessTokenRequest implements IFetchAccessTokenRequest { + + /** + * Constructs a new FetchAccessTokenRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFetchAccessTokenRequest); + + /** FetchAccessTokenRequest name. */ + public name: string; + + /** FetchAccessTokenRequest generationId. */ + public generationId: number; + + /** + * Creates a new FetchAccessTokenRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchAccessTokenRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFetchAccessTokenRequest): google.cloud.backupdr.v1.FetchAccessTokenRequest; + + /** + * Encodes the specified FetchAccessTokenRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. + * @param message FetchAccessTokenRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFetchAccessTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchAccessTokenRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. + * @param message FetchAccessTokenRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchAccessTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchAccessTokenRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchAccessTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchAccessTokenRequest; + + /** + * Decodes a FetchAccessTokenRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchAccessTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchAccessTokenRequest; + + /** + * Verifies a FetchAccessTokenRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchAccessTokenRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchAccessTokenRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchAccessTokenRequest; + + /** + * Creates a plain object from a FetchAccessTokenRequest message. Also converts values to other types if specified. + * @param message FetchAccessTokenRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FetchAccessTokenRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchAccessTokenRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchAccessTokenRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchAccessTokenResponse. */ + interface IFetchAccessTokenResponse { + + /** FetchAccessTokenResponse readLocation */ + readLocation?: (string|null); + + /** FetchAccessTokenResponse writeLocation */ + writeLocation?: (string|null); + + /** FetchAccessTokenResponse token */ + token?: (string|null); + + /** FetchAccessTokenResponse expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a FetchAccessTokenResponse. */ + class FetchAccessTokenResponse implements IFetchAccessTokenResponse { + + /** + * Constructs a new FetchAccessTokenResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFetchAccessTokenResponse); + + /** FetchAccessTokenResponse readLocation. */ + public readLocation: string; + + /** FetchAccessTokenResponse writeLocation. */ + public writeLocation: string; + + /** FetchAccessTokenResponse token. */ + public token: string; + + /** FetchAccessTokenResponse expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new FetchAccessTokenResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchAccessTokenResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFetchAccessTokenResponse): google.cloud.backupdr.v1.FetchAccessTokenResponse; + + /** + * Encodes the specified FetchAccessTokenResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. + * @param message FetchAccessTokenResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFetchAccessTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchAccessTokenResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. + * @param message FetchAccessTokenResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchAccessTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchAccessTokenResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchAccessTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchAccessTokenResponse; + + /** + * Decodes a FetchAccessTokenResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchAccessTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchAccessTokenResponse; + + /** + * Verifies a FetchAccessTokenResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchAccessTokenResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchAccessTokenResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchAccessTokenResponse; + + /** + * Creates a plain object from a FetchAccessTokenResponse message. Also converts values to other types if specified. + * @param message FetchAccessTokenResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FetchAccessTokenResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchAccessTokenResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchAccessTokenResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupsRequest. */ + interface IListBackupsRequest { + + /** ListBackupsRequest parent */ + parent?: (string|null); + + /** ListBackupsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupsRequest filter */ + filter?: (string|null); + + /** ListBackupsRequest orderBy */ + orderBy?: (string|null); + + /** ListBackupsRequest view */ + view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); + } + + /** Represents a ListBackupsRequest. */ + class ListBackupsRequest implements IListBackupsRequest { + + /** + * Constructs a new ListBackupsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupsRequest); + + /** ListBackupsRequest parent. */ + public parent: string; + + /** ListBackupsRequest pageSize. */ + public pageSize: number; + + /** ListBackupsRequest pageToken. */ + public pageToken: string; + + /** ListBackupsRequest filter. */ + public filter: string; + + /** ListBackupsRequest orderBy. */ + public orderBy: string; + + /** ListBackupsRequest view. */ + public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); + + /** + * Creates a new ListBackupsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupsRequest): google.cloud.backupdr.v1.ListBackupsRequest; + + /** + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupsRequest; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupsRequest; + + /** + * Verifies a ListBackupsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupsRequest; + + /** + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * @param message ListBackupsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupsResponse. */ + interface IListBackupsResponse { + + /** ListBackupsResponse backups */ + backups?: (google.cloud.backupdr.v1.IBackup[]|null); + + /** ListBackupsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupsResponse. */ + class ListBackupsResponse implements IListBackupsResponse { + + /** + * Constructs a new ListBackupsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupsResponse); + + /** ListBackupsResponse backups. */ + public backups: google.cloud.backupdr.v1.IBackup[]; + + /** ListBackupsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupsResponse): google.cloud.backupdr.v1.ListBackupsResponse; + + /** + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupsResponse; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupsResponse; + + /** + * Verifies a ListBackupsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupsResponse; + + /** + * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. + * @param message ListBackupsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupRequest. */ + interface IGetBackupRequest { + + /** GetBackupRequest name */ + name?: (string|null); + + /** GetBackupRequest view */ + view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); + } + + /** Represents a GetBackupRequest. */ + class GetBackupRequest implements IGetBackupRequest { + + /** + * Constructs a new GetBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetBackupRequest); + + /** GetBackupRequest name. */ + public name: string; + + /** GetBackupRequest view. */ + public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); + + /** + * Creates a new GetBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetBackupRequest): google.cloud.backupdr.v1.GetBackupRequest; + + /** + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupRequest; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupRequest; + + /** + * Verifies a GetBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupRequest; + + /** + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * @param message GetBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateBackupRequest. */ + interface IUpdateBackupRequest { + + /** UpdateBackupRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupRequest backup */ + backup?: (google.cloud.backupdr.v1.IBackup|null); + + /** UpdateBackupRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateBackupRequest. */ + class UpdateBackupRequest implements IUpdateBackupRequest { + + /** + * Constructs a new UpdateBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IUpdateBackupRequest); + + /** UpdateBackupRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupRequest backup. */ + public backup?: (google.cloud.backupdr.v1.IBackup|null); + + /** UpdateBackupRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IUpdateBackupRequest): google.cloud.backupdr.v1.UpdateBackupRequest; + + /** + * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * @param message UpdateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * @param message UpdateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateBackupRequest; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateBackupRequest; + + /** + * Verifies an UpdateBackupRequest message. + * @param message Plain 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 UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateBackupRequest; + + /** + * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. + * @param message UpdateBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.UpdateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupRequest. */ + interface IDeleteBackupRequest { + + /** DeleteBackupRequest name */ + name?: (string|null); + + /** DeleteBackupRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteBackupRequest. */ + class DeleteBackupRequest implements IDeleteBackupRequest { + + /** + * Constructs a new DeleteBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupRequest); + + /** DeleteBackupRequest name. */ + public name: string; + + /** DeleteBackupRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupRequest): google.cloud.backupdr.v1.DeleteBackupRequest; + + /** + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupRequest; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupRequest; + + /** + * Verifies a DeleteBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupRequest; + + /** + * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. + * @param message DeleteBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestoreBackupRequest. */ + interface IRestoreBackupRequest { + + /** RestoreBackupRequest name */ + name?: (string|null); + + /** RestoreBackupRequest requestId */ + requestId?: (string|null); + + /** RestoreBackupRequest computeInstanceTargetEnvironment */ + computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null); + + /** RestoreBackupRequest computeInstanceRestoreProperties */ + computeInstanceRestoreProperties?: (google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null); + } + + /** Represents a RestoreBackupRequest. */ + class RestoreBackupRequest implements IRestoreBackupRequest { + + /** + * Constructs a new RestoreBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IRestoreBackupRequest); + + /** RestoreBackupRequest name. */ + public name: string; + + /** RestoreBackupRequest requestId. */ + public requestId: string; + + /** RestoreBackupRequest computeInstanceTargetEnvironment. */ + public computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null); + + /** RestoreBackupRequest computeInstanceRestoreProperties. */ + public computeInstanceRestoreProperties?: (google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null); + + /** RestoreBackupRequest targetEnvironment. */ + public targetEnvironment?: "computeInstanceTargetEnvironment"; + + /** RestoreBackupRequest instanceProperties. */ + public instanceProperties?: "computeInstanceRestoreProperties"; + + /** + * Creates a new RestoreBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IRestoreBackupRequest): google.cloud.backupdr.v1.RestoreBackupRequest; + + /** + * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * @param message RestoreBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * @param message RestoreBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RestoreBackupRequest; + + /** + * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RestoreBackupRequest; + + /** + * Verifies a RestoreBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RestoreBackupRequest; + + /** + * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. + * @param message RestoreBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.RestoreBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestoreBackupResponse. */ + interface IRestoreBackupResponse { + + /** RestoreBackupResponse targetResource */ + targetResource?: (google.cloud.backupdr.v1.ITargetResource|null); + } + + /** Represents a RestoreBackupResponse. */ + class RestoreBackupResponse implements IRestoreBackupResponse { + + /** + * Constructs a new RestoreBackupResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IRestoreBackupResponse); + + /** RestoreBackupResponse targetResource. */ + public targetResource?: (google.cloud.backupdr.v1.ITargetResource|null); + + /** + * Creates a new RestoreBackupResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreBackupResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IRestoreBackupResponse): google.cloud.backupdr.v1.RestoreBackupResponse; + + /** + * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * @param message RestoreBackupResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * @param message RestoreBackupResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreBackupResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RestoreBackupResponse; + + /** + * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RestoreBackupResponse; + + /** + * Verifies a RestoreBackupResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreBackupResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RestoreBackupResponse; + + /** + * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. + * @param message RestoreBackupResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.RestoreBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreBackupResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreBackupResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TargetResource. */ + interface ITargetResource { + + /** TargetResource gcpResource */ + gcpResource?: (google.cloud.backupdr.v1.IGcpResource|null); + } + + /** Represents a TargetResource. */ + class TargetResource implements ITargetResource { + + /** + * Constructs a new TargetResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ITargetResource); + + /** TargetResource gcpResource. */ + public gcpResource?: (google.cloud.backupdr.v1.IGcpResource|null); + + /** TargetResource targetResourceInfo. */ + public targetResourceInfo?: "gcpResource"; + + /** + * Creates a new TargetResource instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetResource instance + */ + public static create(properties?: google.cloud.backupdr.v1.ITargetResource): google.cloud.backupdr.v1.TargetResource; + + /** + * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * @param message TargetResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * @param message TargetResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.TargetResource; + + /** + * Decodes a TargetResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.TargetResource; + + /** + * Verifies a TargetResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.TargetResource; + + /** + * Creates a plain object from a TargetResource message. Also converts values to other types if specified. + * @param message TargetResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.TargetResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcpResource. */ + interface IGcpResource { + + /** GcpResource gcpResourcename */ + gcpResourcename?: (string|null); + + /** GcpResource location */ + location?: (string|null); + + /** GcpResource type */ + type?: (string|null); + } + + /** Represents a GcpResource. */ + class GcpResource implements IGcpResource { + + /** + * Constructs a new GcpResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGcpResource); + + /** GcpResource gcpResourcename. */ + public gcpResourcename: string; + + /** GcpResource location. */ + public location: string; + + /** GcpResource type. */ + public type: string; + + /** + * Creates a new GcpResource instance using the specified properties. + * @param [properties] Properties to set + * @returns GcpResource instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGcpResource): google.cloud.backupdr.v1.GcpResource; + + /** + * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * @param message GcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * @param message GcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcpResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GcpResource; + + /** + * Decodes a GcpResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GcpResource; + + /** + * Verifies a GcpResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcpResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GcpResource; + + /** + * Creates a plain object from a GcpResource message. Also converts values to other types if specified. + * @param message GcpResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcpResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcpResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** BackupConfigState enum. */ + enum BackupConfigState { + BACKUP_CONFIG_STATE_UNSPECIFIED = 0, + ACTIVE = 1, + PASSIVE = 2 + } + + /** BackupView enum. */ + enum BackupView { + BACKUP_VIEW_UNSPECIFIED = 0, + BACKUP_VIEW_BASIC = 1, + BACKUP_VIEW_FULL = 2 + } + + /** BackupVaultView enum. */ + enum BackupVaultView { + BACKUP_VAULT_VIEW_UNSPECIFIED = 0, + BACKUP_VAULT_VIEW_BASIC = 1, + BACKUP_VAULT_VIEW_FULL = 2 + } + + /** Properties of a BackupApplianceBackupProperties. */ + interface IBackupApplianceBackupProperties { + + /** BackupApplianceBackupProperties generationId */ + generationId?: (number|null); + + /** BackupApplianceBackupProperties finalizeTime */ + finalizeTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeStartTime */ + recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeEndTime */ + recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a BackupApplianceBackupProperties. */ + class BackupApplianceBackupProperties implements IBackupApplianceBackupProperties { + + /** + * Constructs a new BackupApplianceBackupProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupProperties); + + /** BackupApplianceBackupProperties generationId. */ + public generationId?: (number|null); + + /** BackupApplianceBackupProperties finalizeTime. */ + public finalizeTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeStartTime. */ + public recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeEndTime. */ + public recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties _generationId. */ + public _generationId?: "generationId"; + + /** BackupApplianceBackupProperties _finalizeTime. */ + public _finalizeTime?: "finalizeTime"; + + /** BackupApplianceBackupProperties _recoveryRangeStartTime. */ + public _recoveryRangeStartTime?: "recoveryRangeStartTime"; + + /** BackupApplianceBackupProperties _recoveryRangeEndTime. */ + public _recoveryRangeEndTime?: "recoveryRangeEndTime"; + + /** + * Creates a new BackupApplianceBackupProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupApplianceBackupProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupProperties): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + + /** + * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * @param message BackupApplianceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * @param message BackupApplianceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupApplianceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + + /** + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupApplianceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + + /** + * Verifies a BackupApplianceBackupProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupApplianceBackupProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + + /** + * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. + * @param message BackupApplianceBackupProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupApplianceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupApplianceBackupProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupApplianceBackupProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ComputeInstanceBackupProperties. */ + interface IComputeInstanceBackupProperties { + + /** ComputeInstanceBackupProperties description */ + description?: (string|null); + + /** ComputeInstanceBackupProperties tags */ + tags?: (google.cloud.backupdr.v1.ITags|null); + + /** ComputeInstanceBackupProperties machineType */ + machineType?: (string|null); + + /** ComputeInstanceBackupProperties canIpForward */ + canIpForward?: (boolean|null); + + /** ComputeInstanceBackupProperties networkInterface */ + networkInterface?: (google.cloud.backupdr.v1.INetworkInterface[]|null); + + /** ComputeInstanceBackupProperties disk */ + disk?: (google.cloud.backupdr.v1.IAttachedDisk[]|null); + + /** ComputeInstanceBackupProperties metadata */ + metadata?: (google.cloud.backupdr.v1.IMetadata|null); + + /** ComputeInstanceBackupProperties serviceAccount */ + serviceAccount?: (google.cloud.backupdr.v1.IServiceAccount[]|null); + + /** ComputeInstanceBackupProperties scheduling */ + scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + + /** ComputeInstanceBackupProperties guestAccelerator */ + guestAccelerator?: (google.cloud.backupdr.v1.IAcceleratorConfig[]|null); + + /** ComputeInstanceBackupProperties minCpuPlatform */ + minCpuPlatform?: (string|null); + + /** ComputeInstanceBackupProperties keyRevocationActionType */ + keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + + /** ComputeInstanceBackupProperties sourceInstance */ + sourceInstance?: (string|null); + + /** ComputeInstanceBackupProperties labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a ComputeInstanceBackupProperties. */ + class ComputeInstanceBackupProperties implements IComputeInstanceBackupProperties { + + /** + * Constructs a new ComputeInstanceBackupProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceBackupProperties); + + /** ComputeInstanceBackupProperties description. */ + public description?: (string|null); + + /** ComputeInstanceBackupProperties tags. */ + public tags?: (google.cloud.backupdr.v1.ITags|null); + + /** ComputeInstanceBackupProperties machineType. */ + public machineType?: (string|null); + + /** ComputeInstanceBackupProperties canIpForward. */ + public canIpForward?: (boolean|null); + + /** ComputeInstanceBackupProperties networkInterface. */ + public networkInterface: google.cloud.backupdr.v1.INetworkInterface[]; + + /** ComputeInstanceBackupProperties disk. */ + public disk: google.cloud.backupdr.v1.IAttachedDisk[]; + + /** ComputeInstanceBackupProperties metadata. */ + public metadata?: (google.cloud.backupdr.v1.IMetadata|null); + + /** ComputeInstanceBackupProperties serviceAccount. */ + public serviceAccount: google.cloud.backupdr.v1.IServiceAccount[]; + + /** ComputeInstanceBackupProperties scheduling. */ + public scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + + /** ComputeInstanceBackupProperties guestAccelerator. */ + public guestAccelerator: google.cloud.backupdr.v1.IAcceleratorConfig[]; + + /** ComputeInstanceBackupProperties minCpuPlatform. */ + public minCpuPlatform?: (string|null); + + /** ComputeInstanceBackupProperties keyRevocationActionType. */ + public keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + + /** ComputeInstanceBackupProperties sourceInstance. */ + public sourceInstance?: (string|null); + + /** ComputeInstanceBackupProperties labels. */ + public labels: { [k: string]: string }; + + /** ComputeInstanceBackupProperties _description. */ + public _description?: "description"; + + /** ComputeInstanceBackupProperties _tags. */ + public _tags?: "tags"; + + /** ComputeInstanceBackupProperties _machineType. */ + public _machineType?: "machineType"; + + /** ComputeInstanceBackupProperties _canIpForward. */ + public _canIpForward?: "canIpForward"; + + /** ComputeInstanceBackupProperties _metadata. */ + public _metadata?: "metadata"; + + /** ComputeInstanceBackupProperties _scheduling. */ + public _scheduling?: "scheduling"; + + /** ComputeInstanceBackupProperties _minCpuPlatform. */ + public _minCpuPlatform?: "minCpuPlatform"; + + /** ComputeInstanceBackupProperties _keyRevocationActionType. */ + public _keyRevocationActionType?: "keyRevocationActionType"; + + /** ComputeInstanceBackupProperties _sourceInstance. */ + public _sourceInstance?: "sourceInstance"; + + /** + * Creates a new ComputeInstanceBackupProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceBackupProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceBackupProperties): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + + /** + * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * @param message ComputeInstanceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * @param message ComputeInstanceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + + /** + * Verifies a ComputeInstanceBackupProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceBackupProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + + /** + * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceBackupProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceBackupProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceBackupProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ComputeInstanceRestoreProperties. */ + interface IComputeInstanceRestoreProperties { + + /** ComputeInstanceRestoreProperties name */ + name?: (string|null); + + /** ComputeInstanceRestoreProperties advancedMachineFeatures */ + advancedMachineFeatures?: (google.cloud.backupdr.v1.IAdvancedMachineFeatures|null); + + /** ComputeInstanceRestoreProperties canIpForward */ + canIpForward?: (boolean|null); + + /** ComputeInstanceRestoreProperties confidentialInstanceConfig */ + confidentialInstanceConfig?: (google.cloud.backupdr.v1.IConfidentialInstanceConfig|null); + + /** ComputeInstanceRestoreProperties deletionProtection */ + deletionProtection?: (boolean|null); + + /** ComputeInstanceRestoreProperties description */ + description?: (string|null); + + /** ComputeInstanceRestoreProperties disks */ + disks?: (google.cloud.backupdr.v1.IAttachedDisk[]|null); + + /** ComputeInstanceRestoreProperties displayDevice */ + displayDevice?: (google.cloud.backupdr.v1.IDisplayDevice|null); + + /** ComputeInstanceRestoreProperties guestAccelerators */ + guestAccelerators?: (google.cloud.backupdr.v1.IAcceleratorConfig[]|null); + + /** ComputeInstanceRestoreProperties hostname */ + hostname?: (string|null); + + /** ComputeInstanceRestoreProperties instanceEncryptionKey */ + instanceEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** ComputeInstanceRestoreProperties keyRevocationActionType */ + keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + + /** ComputeInstanceRestoreProperties labels */ + labels?: ({ [k: string]: string }|null); + + /** ComputeInstanceRestoreProperties machineType */ + machineType?: (string|null); + + /** ComputeInstanceRestoreProperties metadata */ + metadata?: (google.cloud.backupdr.v1.IMetadata|null); + + /** ComputeInstanceRestoreProperties minCpuPlatform */ + minCpuPlatform?: (string|null); + + /** ComputeInstanceRestoreProperties networkInterfaces */ + networkInterfaces?: (google.cloud.backupdr.v1.INetworkInterface[]|null); + + /** ComputeInstanceRestoreProperties networkPerformanceConfig */ + networkPerformanceConfig?: (google.cloud.backupdr.v1.INetworkPerformanceConfig|null); + + /** ComputeInstanceRestoreProperties params */ + params?: (google.cloud.backupdr.v1.IInstanceParams|null); + + /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess */ + privateIpv6GoogleAccess?: (google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); + + /** ComputeInstanceRestoreProperties allocationAffinity */ + allocationAffinity?: (google.cloud.backupdr.v1.IAllocationAffinity|null); + + /** ComputeInstanceRestoreProperties resourcePolicies */ + resourcePolicies?: (string[]|null); + + /** ComputeInstanceRestoreProperties scheduling */ + scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + + /** ComputeInstanceRestoreProperties serviceAccounts */ + serviceAccounts?: (google.cloud.backupdr.v1.IServiceAccount[]|null); + + /** ComputeInstanceRestoreProperties tags */ + tags?: (google.cloud.backupdr.v1.ITags|null); + } + + /** Represents a ComputeInstanceRestoreProperties. */ + class ComputeInstanceRestoreProperties implements IComputeInstanceRestoreProperties { + + /** + * Constructs a new ComputeInstanceRestoreProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties); + + /** ComputeInstanceRestoreProperties name. */ + public name?: (string|null); + + /** ComputeInstanceRestoreProperties advancedMachineFeatures. */ + public advancedMachineFeatures?: (google.cloud.backupdr.v1.IAdvancedMachineFeatures|null); + + /** ComputeInstanceRestoreProperties canIpForward. */ + public canIpForward?: (boolean|null); + + /** ComputeInstanceRestoreProperties confidentialInstanceConfig. */ + public confidentialInstanceConfig?: (google.cloud.backupdr.v1.IConfidentialInstanceConfig|null); + + /** ComputeInstanceRestoreProperties deletionProtection. */ + public deletionProtection?: (boolean|null); + + /** ComputeInstanceRestoreProperties description. */ + public description?: (string|null); + + /** ComputeInstanceRestoreProperties disks. */ + public disks: google.cloud.backupdr.v1.IAttachedDisk[]; + + /** ComputeInstanceRestoreProperties displayDevice. */ + public displayDevice?: (google.cloud.backupdr.v1.IDisplayDevice|null); + + /** ComputeInstanceRestoreProperties guestAccelerators. */ + public guestAccelerators: google.cloud.backupdr.v1.IAcceleratorConfig[]; + + /** ComputeInstanceRestoreProperties hostname. */ + public hostname?: (string|null); + + /** ComputeInstanceRestoreProperties instanceEncryptionKey. */ + public instanceEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** ComputeInstanceRestoreProperties keyRevocationActionType. */ + public keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + + /** ComputeInstanceRestoreProperties labels. */ + public labels: { [k: string]: string }; + + /** ComputeInstanceRestoreProperties machineType. */ + public machineType?: (string|null); + + /** ComputeInstanceRestoreProperties metadata. */ + public metadata?: (google.cloud.backupdr.v1.IMetadata|null); + + /** ComputeInstanceRestoreProperties minCpuPlatform. */ + public minCpuPlatform?: (string|null); + + /** ComputeInstanceRestoreProperties networkInterfaces. */ + public networkInterfaces: google.cloud.backupdr.v1.INetworkInterface[]; + + /** ComputeInstanceRestoreProperties networkPerformanceConfig. */ + public networkPerformanceConfig?: (google.cloud.backupdr.v1.INetworkPerformanceConfig|null); + + /** ComputeInstanceRestoreProperties params. */ + public params?: (google.cloud.backupdr.v1.IInstanceParams|null); + + /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess. */ + public privateIpv6GoogleAccess?: (google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); + + /** ComputeInstanceRestoreProperties allocationAffinity. */ + public allocationAffinity?: (google.cloud.backupdr.v1.IAllocationAffinity|null); + + /** ComputeInstanceRestoreProperties resourcePolicies. */ + public resourcePolicies: string[]; + + /** ComputeInstanceRestoreProperties scheduling. */ + public scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + + /** ComputeInstanceRestoreProperties serviceAccounts. */ + public serviceAccounts: google.cloud.backupdr.v1.IServiceAccount[]; + + /** ComputeInstanceRestoreProperties tags. */ + public tags?: (google.cloud.backupdr.v1.ITags|null); + + /** ComputeInstanceRestoreProperties _name. */ + public _name?: "name"; + + /** ComputeInstanceRestoreProperties _advancedMachineFeatures. */ + public _advancedMachineFeatures?: "advancedMachineFeatures"; + + /** ComputeInstanceRestoreProperties _canIpForward. */ + public _canIpForward?: "canIpForward"; + + /** ComputeInstanceRestoreProperties _confidentialInstanceConfig. */ + public _confidentialInstanceConfig?: "confidentialInstanceConfig"; + + /** ComputeInstanceRestoreProperties _deletionProtection. */ + public _deletionProtection?: "deletionProtection"; + + /** ComputeInstanceRestoreProperties _description. */ + public _description?: "description"; + + /** ComputeInstanceRestoreProperties _displayDevice. */ + public _displayDevice?: "displayDevice"; + + /** ComputeInstanceRestoreProperties _hostname. */ + public _hostname?: "hostname"; + + /** ComputeInstanceRestoreProperties _instanceEncryptionKey. */ + public _instanceEncryptionKey?: "instanceEncryptionKey"; + + /** ComputeInstanceRestoreProperties _keyRevocationActionType. */ + public _keyRevocationActionType?: "keyRevocationActionType"; + + /** ComputeInstanceRestoreProperties _machineType. */ + public _machineType?: "machineType"; + + /** ComputeInstanceRestoreProperties _metadata. */ + public _metadata?: "metadata"; + + /** ComputeInstanceRestoreProperties _minCpuPlatform. */ + public _minCpuPlatform?: "minCpuPlatform"; + + /** ComputeInstanceRestoreProperties _networkPerformanceConfig. */ + public _networkPerformanceConfig?: "networkPerformanceConfig"; + + /** ComputeInstanceRestoreProperties _params. */ + public _params?: "params"; + + /** ComputeInstanceRestoreProperties _privateIpv6GoogleAccess. */ + public _privateIpv6GoogleAccess?: "privateIpv6GoogleAccess"; + + /** ComputeInstanceRestoreProperties _allocationAffinity. */ + public _allocationAffinity?: "allocationAffinity"; + + /** ComputeInstanceRestoreProperties _scheduling. */ + public _scheduling?: "scheduling"; + + /** ComputeInstanceRestoreProperties _tags. */ + public _tags?: "tags"; + + /** + * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceRestoreProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * @param message ComputeInstanceRestoreProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * @param message ComputeInstanceRestoreProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceRestoreProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + + /** + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceRestoreProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + + /** + * Verifies a ComputeInstanceRestoreProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceRestoreProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + + /** + * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceRestoreProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceRestoreProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceRestoreProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceRestoreProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ComputeInstanceRestoreProperties { + + /** InstancePrivateIpv6GoogleAccess enum. */ + enum InstancePrivateIpv6GoogleAccess { + INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0, + INHERIT_FROM_SUBNETWORK = 1, + ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2, + ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3 + } + } + + /** Properties of a ComputeInstanceTargetEnvironment. */ + interface IComputeInstanceTargetEnvironment { + + /** ComputeInstanceTargetEnvironment project */ + project?: (string|null); + + /** ComputeInstanceTargetEnvironment zone */ + zone?: (string|null); + } + + /** Represents a ComputeInstanceTargetEnvironment. */ + class ComputeInstanceTargetEnvironment implements IComputeInstanceTargetEnvironment { + + /** + * Constructs a new ComputeInstanceTargetEnvironment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment); + + /** ComputeInstanceTargetEnvironment project. */ + public project: string; + + /** ComputeInstanceTargetEnvironment zone. */ + public zone: string; + + /** + * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceTargetEnvironment instance + */ + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + + /** + * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @param message ComputeInstanceTargetEnvironment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @param message ComputeInstanceTargetEnvironment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceTargetEnvironment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + + /** + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceTargetEnvironment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + + /** + * Verifies a ComputeInstanceTargetEnvironment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceTargetEnvironment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + + /** + * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. + * @param message ComputeInstanceTargetEnvironment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceTargetEnvironment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceTargetEnvironment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ComputeInstanceDataSourceProperties. */ + interface IComputeInstanceDataSourceProperties { + + /** ComputeInstanceDataSourceProperties name */ + name?: (string|null); + + /** ComputeInstanceDataSourceProperties description */ + description?: (string|null); + + /** ComputeInstanceDataSourceProperties machineType */ + machineType?: (string|null); + + /** ComputeInstanceDataSourceProperties totalDiskCount */ + totalDiskCount?: (number|Long|string|null); + + /** ComputeInstanceDataSourceProperties totalDiskSizeGb */ + totalDiskSizeGb?: (number|Long|string|null); + } + + /** Represents a ComputeInstanceDataSourceProperties. */ + class ComputeInstanceDataSourceProperties implements IComputeInstanceDataSourceProperties { + + /** + * Constructs a new ComputeInstanceDataSourceProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties); + + /** ComputeInstanceDataSourceProperties name. */ + public name: string; + + /** ComputeInstanceDataSourceProperties description. */ + public description: string; + + /** ComputeInstanceDataSourceProperties machineType. */ + public machineType: string; + + /** ComputeInstanceDataSourceProperties totalDiskCount. */ + public totalDiskCount: (number|Long|string); + + /** ComputeInstanceDataSourceProperties totalDiskSizeGb. */ + public totalDiskSizeGb: (number|Long|string); + + /** + * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceDataSourceProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + + /** + * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @param message ComputeInstanceDataSourceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @param message ComputeInstanceDataSourceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceDataSourceProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + + /** + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceDataSourceProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + + /** + * Verifies a ComputeInstanceDataSourceProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceDataSourceProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + + /** + * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceDataSourceProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceDataSourceProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceDataSourceProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdvancedMachineFeatures. */ + interface IAdvancedMachineFeatures { + + /** AdvancedMachineFeatures enableNestedVirtualization */ + enableNestedVirtualization?: (boolean|null); + + /** AdvancedMachineFeatures threadsPerCore */ + threadsPerCore?: (number|null); + + /** AdvancedMachineFeatures visibleCoreCount */ + visibleCoreCount?: (number|null); + + /** AdvancedMachineFeatures enableUefiNetworking */ + enableUefiNetworking?: (boolean|null); + } + + /** Represents an AdvancedMachineFeatures. */ + class AdvancedMachineFeatures implements IAdvancedMachineFeatures { + + /** + * Constructs a new AdvancedMachineFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAdvancedMachineFeatures); + + /** AdvancedMachineFeatures enableNestedVirtualization. */ + public enableNestedVirtualization?: (boolean|null); + + /** AdvancedMachineFeatures threadsPerCore. */ + public threadsPerCore?: (number|null); + + /** AdvancedMachineFeatures visibleCoreCount. */ + public visibleCoreCount?: (number|null); + + /** AdvancedMachineFeatures enableUefiNetworking. */ + public enableUefiNetworking?: (boolean|null); + + /** AdvancedMachineFeatures _enableNestedVirtualization. */ + public _enableNestedVirtualization?: "enableNestedVirtualization"; + + /** AdvancedMachineFeatures _threadsPerCore. */ + public _threadsPerCore?: "threadsPerCore"; + + /** AdvancedMachineFeatures _visibleCoreCount. */ + public _visibleCoreCount?: "visibleCoreCount"; + + /** AdvancedMachineFeatures _enableUefiNetworking. */ + public _enableUefiNetworking?: "enableUefiNetworking"; + + /** + * Creates a new AdvancedMachineFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns AdvancedMachineFeatures instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAdvancedMachineFeatures): google.cloud.backupdr.v1.AdvancedMachineFeatures; + + /** + * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @param message AdvancedMachineFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @param message AdvancedMachineFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AdvancedMachineFeatures; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AdvancedMachineFeatures; + + /** + * Verifies an AdvancedMachineFeatures message. + * @param message Plain 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 AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdvancedMachineFeatures + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AdvancedMachineFeatures; + + /** + * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. + * @param message AdvancedMachineFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AdvancedMachineFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdvancedMachineFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdvancedMachineFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConfidentialInstanceConfig. */ + interface IConfidentialInstanceConfig { + + /** ConfidentialInstanceConfig enableConfidentialCompute */ + enableConfidentialCompute?: (boolean|null); + } + + /** Represents a ConfidentialInstanceConfig. */ + class ConfidentialInstanceConfig implements IConfidentialInstanceConfig { + + /** + * Constructs a new ConfidentialInstanceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IConfidentialInstanceConfig); + + /** ConfidentialInstanceConfig enableConfidentialCompute. */ + public enableConfidentialCompute?: (boolean|null); + + /** ConfidentialInstanceConfig _enableConfidentialCompute. */ + public _enableConfidentialCompute?: "enableConfidentialCompute"; + + /** + * Creates a new ConfidentialInstanceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfidentialInstanceConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IConfidentialInstanceConfig): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + + /** + * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * @param message ConfidentialInstanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * @param message ConfidentialInstanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfidentialInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + + /** + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfidentialInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + + /** + * Verifies a ConfidentialInstanceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfidentialInstanceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + + /** + * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. + * @param message ConfidentialInstanceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ConfidentialInstanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfidentialInstanceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfidentialInstanceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DisplayDevice. */ + interface IDisplayDevice { + + /** DisplayDevice enableDisplay */ + enableDisplay?: (boolean|null); + } + + /** Represents a DisplayDevice. */ + class DisplayDevice implements IDisplayDevice { + + /** + * Constructs a new DisplayDevice. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDisplayDevice); + + /** DisplayDevice enableDisplay. */ + public enableDisplay?: (boolean|null); + + /** DisplayDevice _enableDisplay. */ + public _enableDisplay?: "enableDisplay"; + + /** + * Creates a new DisplayDevice instance using the specified properties. + * @param [properties] Properties to set + * @returns DisplayDevice instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDisplayDevice): google.cloud.backupdr.v1.DisplayDevice; + + /** + * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @param message DisplayDevice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @param message DisplayDevice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DisplayDevice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DisplayDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DisplayDevice; + + /** + * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DisplayDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DisplayDevice; + + /** + * Verifies a DisplayDevice message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DisplayDevice + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DisplayDevice; + + /** + * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. + * @param message DisplayDevice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DisplayDevice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DisplayDevice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DisplayDevice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcceleratorConfig. */ + interface IAcceleratorConfig { + + /** AcceleratorConfig acceleratorType */ + acceleratorType?: (string|null); + + /** AcceleratorConfig acceleratorCount */ + acceleratorCount?: (number|null); + } + + /** Represents an AcceleratorConfig. */ + class AcceleratorConfig implements IAcceleratorConfig { + + /** + * Constructs a new AcceleratorConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAcceleratorConfig); + + /** AcceleratorConfig acceleratorType. */ + public acceleratorType?: (string|null); + + /** AcceleratorConfig acceleratorCount. */ + public acceleratorCount?: (number|null); + + /** AcceleratorConfig _acceleratorType. */ + public _acceleratorType?: "acceleratorType"; + + /** AcceleratorConfig _acceleratorCount. */ + public _acceleratorCount?: "acceleratorCount"; + + /** + * Creates a new AcceleratorConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AcceleratorConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAcceleratorConfig): google.cloud.backupdr.v1.AcceleratorConfig; + + /** + * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * @param message AcceleratorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * @param message AcceleratorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AcceleratorConfig; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AcceleratorConfig; + + /** + * Verifies an AcceleratorConfig message. + * @param message Plain 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 AcceleratorConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcceleratorConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AcceleratorConfig; + + /** + * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. + * @param message AcceleratorConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AcceleratorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcceleratorConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcceleratorConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomerEncryptionKey. */ + interface ICustomerEncryptionKey { + + /** CustomerEncryptionKey rawKey */ + rawKey?: (string|null); + + /** CustomerEncryptionKey rsaEncryptedKey */ + rsaEncryptedKey?: (string|null); + + /** CustomerEncryptionKey kmsKeyName */ + kmsKeyName?: (string|null); + + /** CustomerEncryptionKey kmsKeyServiceAccount */ + kmsKeyServiceAccount?: (string|null); + } + + /** Represents a CustomerEncryptionKey. */ + class CustomerEncryptionKey implements ICustomerEncryptionKey { + + /** + * Constructs a new CustomerEncryptionKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICustomerEncryptionKey); + + /** CustomerEncryptionKey rawKey. */ + public rawKey?: (string|null); + + /** CustomerEncryptionKey rsaEncryptedKey. */ + public rsaEncryptedKey?: (string|null); + + /** CustomerEncryptionKey kmsKeyName. */ + public kmsKeyName?: (string|null); + + /** CustomerEncryptionKey kmsKeyServiceAccount. */ + public kmsKeyServiceAccount?: (string|null); + + /** CustomerEncryptionKey key. */ + public key?: ("rawKey"|"rsaEncryptedKey"|"kmsKeyName"); + + /** CustomerEncryptionKey _kmsKeyServiceAccount. */ + public _kmsKeyServiceAccount?: "kmsKeyServiceAccount"; + + /** + * Creates a new CustomerEncryptionKey instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomerEncryptionKey instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICustomerEncryptionKey): google.cloud.backupdr.v1.CustomerEncryptionKey; + + /** + * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @param message CustomerEncryptionKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @param message CustomerEncryptionKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomerEncryptionKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomerEncryptionKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CustomerEncryptionKey; + + /** + * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomerEncryptionKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CustomerEncryptionKey; + + /** + * Verifies a CustomerEncryptionKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomerEncryptionKey + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CustomerEncryptionKey; + + /** + * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. + * @param message CustomerEncryptionKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CustomerEncryptionKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomerEncryptionKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomerEncryptionKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Entry. */ + interface IEntry { + + /** Entry key */ + key?: (string|null); + + /** Entry value */ + value?: (string|null); + } + + /** Represents an Entry. */ + class Entry implements IEntry { + + /** + * Constructs a new Entry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IEntry); + + /** Entry key. */ + public key?: (string|null); + + /** Entry value. */ + public value?: (string|null); + + /** Entry _key. */ + public _key?: "key"; + + /** Entry _value. */ + public _value?: "value"; + + /** + * Creates a new Entry instance using the specified properties. + * @param [properties] Properties to set + * @returns Entry instance + */ + public static create(properties?: google.cloud.backupdr.v1.IEntry): google.cloud.backupdr.v1.Entry; + + /** + * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Entry; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Entry; + + /** + * Verifies an Entry message. + * @param message Plain 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 Entry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Entry; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @param message Entry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Entry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Metadata. */ + interface IMetadata { + + /** Metadata items */ + items?: (google.cloud.backupdr.v1.IEntry[]|null); + } + + /** Represents a Metadata. */ + class Metadata implements IMetadata { + + /** + * Constructs a new Metadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IMetadata); + + /** Metadata items. */ + public items: google.cloud.backupdr.v1.IEntry[]; + + /** + * Creates a new Metadata instance using the specified properties. + * @param [properties] Properties to set + * @returns Metadata instance + */ + public static create(properties?: google.cloud.backupdr.v1.IMetadata): google.cloud.backupdr.v1.Metadata; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Metadata; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Metadata; + + /** + * Verifies a Metadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Metadata; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @param message Metadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkInterface. */ + interface INetworkInterface { + + /** NetworkInterface network */ + network?: (string|null); + + /** NetworkInterface subnetwork */ + subnetwork?: (string|null); + + /** NetworkInterface ipAddress */ + ipAddress?: (string|null); + + /** NetworkInterface ipv6Address */ + ipv6Address?: (string|null); + + /** NetworkInterface internalIpv6PrefixLength */ + internalIpv6PrefixLength?: (number|null); + + /** NetworkInterface name */ + name?: (string|null); + + /** NetworkInterface accessConfigs */ + accessConfigs?: (google.cloud.backupdr.v1.IAccessConfig[]|null); + + /** NetworkInterface ipv6AccessConfigs */ + ipv6AccessConfigs?: (google.cloud.backupdr.v1.IAccessConfig[]|null); + + /** NetworkInterface aliasIpRanges */ + aliasIpRanges?: (google.cloud.backupdr.v1.IAliasIpRange[]|null); + + /** NetworkInterface stackType */ + stackType?: (google.cloud.backupdr.v1.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.StackType|null); + + /** NetworkInterface ipv6AccessType */ + ipv6AccessType?: (google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null); + + /** NetworkInterface queueCount */ + queueCount?: (number|null); + + /** NetworkInterface nicType */ + nicType?: (google.cloud.backupdr.v1.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.NicType|null); + + /** NetworkInterface networkAttachment */ + networkAttachment?: (string|null); + } + + /** Represents a NetworkInterface. */ + class NetworkInterface implements INetworkInterface { + + /** + * Constructs a new NetworkInterface. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.INetworkInterface); + + /** NetworkInterface network. */ + public network?: (string|null); + + /** NetworkInterface subnetwork. */ + public subnetwork?: (string|null); + + /** NetworkInterface ipAddress. */ + public ipAddress?: (string|null); + + /** NetworkInterface ipv6Address. */ + public ipv6Address?: (string|null); + + /** NetworkInterface internalIpv6PrefixLength. */ + public internalIpv6PrefixLength?: (number|null); + + /** NetworkInterface name. */ + public name?: (string|null); + + /** NetworkInterface accessConfigs. */ + public accessConfigs: google.cloud.backupdr.v1.IAccessConfig[]; + + /** NetworkInterface ipv6AccessConfigs. */ + public ipv6AccessConfigs: google.cloud.backupdr.v1.IAccessConfig[]; + + /** NetworkInterface aliasIpRanges. */ + public aliasIpRanges: google.cloud.backupdr.v1.IAliasIpRange[]; + + /** NetworkInterface stackType. */ + public stackType?: (google.cloud.backupdr.v1.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.StackType|null); + + /** NetworkInterface ipv6AccessType. */ + public ipv6AccessType?: (google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null); + + /** NetworkInterface queueCount. */ + public queueCount?: (number|null); + + /** NetworkInterface nicType. */ + public nicType?: (google.cloud.backupdr.v1.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.NicType|null); + + /** NetworkInterface networkAttachment. */ + public networkAttachment?: (string|null); + + /** NetworkInterface _network. */ + public _network?: "network"; + + /** NetworkInterface _subnetwork. */ + public _subnetwork?: "subnetwork"; + + /** NetworkInterface _ipAddress. */ + public _ipAddress?: "ipAddress"; + + /** NetworkInterface _ipv6Address. */ + public _ipv6Address?: "ipv6Address"; + + /** NetworkInterface _internalIpv6PrefixLength. */ + public _internalIpv6PrefixLength?: "internalIpv6PrefixLength"; + + /** NetworkInterface _name. */ + public _name?: "name"; + + /** NetworkInterface _stackType. */ + public _stackType?: "stackType"; + + /** NetworkInterface _ipv6AccessType. */ + public _ipv6AccessType?: "ipv6AccessType"; + + /** NetworkInterface _queueCount. */ + public _queueCount?: "queueCount"; + + /** NetworkInterface _nicType. */ + public _nicType?: "nicType"; + + /** NetworkInterface _networkAttachment. */ + public _networkAttachment?: "networkAttachment"; + + /** + * Creates a new NetworkInterface instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkInterface instance + */ + public static create(properties?: google.cloud.backupdr.v1.INetworkInterface): google.cloud.backupdr.v1.NetworkInterface; + + /** + * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * @param message NetworkInterface message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * @param message NetworkInterface message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkInterface message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkInterface + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkInterface; + + /** + * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkInterface + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkInterface; + + /** + * Verifies a NetworkInterface message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkInterface + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkInterface; + + /** + * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. + * @param message NetworkInterface + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.NetworkInterface, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkInterface to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkInterface + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkInterface { + + /** StackType enum. */ + enum StackType { + STACK_TYPE_UNSPECIFIED = 0, + IPV4_ONLY = 1, + IPV4_IPV6 = 2 + } + + /** Ipv6AccessType enum. */ + enum Ipv6AccessType { + UNSPECIFIED_IPV6_ACCESS_TYPE = 0, + INTERNAL = 1, + EXTERNAL = 2 + } + + /** NicType enum. */ + enum NicType { + NIC_TYPE_UNSPECIFIED = 0, + VIRTIO_NET = 1, + GVNIC = 2 + } + } + + /** Properties of a NetworkPerformanceConfig. */ + interface INetworkPerformanceConfig { + + /** NetworkPerformanceConfig totalEgressBandwidthTier */ + totalEgressBandwidthTier?: (google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null); + } + + /** Represents a NetworkPerformanceConfig. */ + class NetworkPerformanceConfig implements INetworkPerformanceConfig { + + /** + * Constructs a new NetworkPerformanceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.INetworkPerformanceConfig); + + /** NetworkPerformanceConfig totalEgressBandwidthTier. */ + public totalEgressBandwidthTier?: (google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null); + + /** NetworkPerformanceConfig _totalEgressBandwidthTier. */ + public _totalEgressBandwidthTier?: "totalEgressBandwidthTier"; + + /** + * Creates a new NetworkPerformanceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkPerformanceConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.INetworkPerformanceConfig): google.cloud.backupdr.v1.NetworkPerformanceConfig; + + /** + * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * @param message NetworkPerformanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * @param message NetworkPerformanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkPerformanceConfig; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkPerformanceConfig; + + /** + * Verifies a NetworkPerformanceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkPerformanceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkPerformanceConfig; + + /** + * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. + * @param message NetworkPerformanceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.NetworkPerformanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkPerformanceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkPerformanceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkPerformanceConfig { + + /** Tier enum. */ + enum Tier { + TIER_UNSPECIFIED = 0, + DEFAULT = 1, + TIER_1 = 2 + } + } + + /** Properties of an AccessConfig. */ + interface IAccessConfig { + + /** AccessConfig type */ + type?: (google.cloud.backupdr.v1.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1.AccessConfig.AccessType|null); + + /** AccessConfig name */ + name?: (string|null); + + /** AccessConfig externalIp */ + externalIp?: (string|null); + + /** AccessConfig externalIpv6 */ + externalIpv6?: (string|null); + + /** AccessConfig externalIpv6PrefixLength */ + externalIpv6PrefixLength?: (number|null); + + /** AccessConfig setPublicPtr */ + setPublicPtr?: (boolean|null); + + /** AccessConfig publicPtrDomainName */ + publicPtrDomainName?: (string|null); + + /** AccessConfig networkTier */ + networkTier?: (google.cloud.backupdr.v1.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1.AccessConfig.NetworkTier|null); + } + + /** Represents an AccessConfig. */ + class AccessConfig implements IAccessConfig { + + /** + * Constructs a new AccessConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAccessConfig); + + /** AccessConfig type. */ + public type?: (google.cloud.backupdr.v1.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1.AccessConfig.AccessType|null); + + /** AccessConfig name. */ + public name?: (string|null); + + /** AccessConfig externalIp. */ + public externalIp?: (string|null); + + /** AccessConfig externalIpv6. */ + public externalIpv6?: (string|null); + + /** AccessConfig externalIpv6PrefixLength. */ + public externalIpv6PrefixLength?: (number|null); + + /** AccessConfig setPublicPtr. */ + public setPublicPtr?: (boolean|null); + + /** AccessConfig publicPtrDomainName. */ + public publicPtrDomainName?: (string|null); + + /** AccessConfig networkTier. */ + public networkTier?: (google.cloud.backupdr.v1.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1.AccessConfig.NetworkTier|null); + + /** AccessConfig _type. */ + public _type?: "type"; + + /** AccessConfig _name. */ + public _name?: "name"; + + /** AccessConfig _externalIp. */ + public _externalIp?: "externalIp"; + + /** AccessConfig _externalIpv6. */ + public _externalIpv6?: "externalIpv6"; + + /** AccessConfig _externalIpv6PrefixLength. */ + public _externalIpv6PrefixLength?: "externalIpv6PrefixLength"; + + /** AccessConfig _setPublicPtr. */ + public _setPublicPtr?: "setPublicPtr"; + + /** AccessConfig _publicPtrDomainName. */ + public _publicPtrDomainName?: "publicPtrDomainName"; + + /** AccessConfig _networkTier. */ + public _networkTier?: "networkTier"; + + /** + * Creates a new AccessConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAccessConfig): google.cloud.backupdr.v1.AccessConfig; + + /** + * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * @param message AccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * @param message AccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AccessConfig; + + /** + * Decodes an AccessConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AccessConfig; + + /** + * Verifies an AccessConfig message. + * @param message Plain 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 AccessConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AccessConfig; + + /** + * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. + * @param message AccessConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AccessConfig { + + /** AccessType enum. */ + enum AccessType { + ACCESS_TYPE_UNSPECIFIED = 0, + ONE_TO_ONE_NAT = 1, + DIRECT_IPV6 = 2 + } + + /** NetworkTier enum. */ + enum NetworkTier { + NETWORK_TIER_UNSPECIFIED = 0, + PREMIUM = 1, + STANDARD = 2 + } + } + + /** Properties of an AliasIpRange. */ + interface IAliasIpRange { + + /** AliasIpRange ipCidrRange */ + ipCidrRange?: (string|null); + + /** AliasIpRange subnetworkRangeName */ + subnetworkRangeName?: (string|null); + } + + /** Represents an AliasIpRange. */ + class AliasIpRange implements IAliasIpRange { + + /** + * Constructs a new AliasIpRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAliasIpRange); + + /** AliasIpRange ipCidrRange. */ + public ipCidrRange?: (string|null); + + /** AliasIpRange subnetworkRangeName. */ + public subnetworkRangeName?: (string|null); + + /** AliasIpRange _ipCidrRange. */ + public _ipCidrRange?: "ipCidrRange"; + + /** AliasIpRange _subnetworkRangeName. */ + public _subnetworkRangeName?: "subnetworkRangeName"; + + /** + * Creates a new AliasIpRange instance using the specified properties. + * @param [properties] Properties to set + * @returns AliasIpRange instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAliasIpRange): google.cloud.backupdr.v1.AliasIpRange; + + /** + * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. + * @param message AliasIpRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. + * @param message AliasIpRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AliasIpRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AliasIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AliasIpRange; + + /** + * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AliasIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AliasIpRange; + + /** + * Verifies an AliasIpRange message. + * @param message Plain 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 AliasIpRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AliasIpRange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AliasIpRange; + + /** + * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. + * @param message AliasIpRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AliasIpRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AliasIpRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AliasIpRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InstanceParams. */ + interface IInstanceParams { + + /** InstanceParams resourceManagerTags */ + resourceManagerTags?: ({ [k: string]: string }|null); + } + + /** Represents an InstanceParams. */ + class InstanceParams implements IInstanceParams { + + /** + * Constructs a new InstanceParams. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IInstanceParams); + + /** InstanceParams resourceManagerTags. */ + public resourceManagerTags: { [k: string]: string }; + + /** + * Creates a new InstanceParams instance using the specified properties. + * @param [properties] Properties to set + * @returns InstanceParams instance + */ + public static create(properties?: google.cloud.backupdr.v1.IInstanceParams): google.cloud.backupdr.v1.InstanceParams; + + /** + * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @param message InstanceParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @param message InstanceParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstanceParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstanceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InstanceParams; + + /** + * Decodes an InstanceParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstanceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InstanceParams; + + /** + * Verifies an InstanceParams message. + * @param message Plain 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 InstanceParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstanceParams + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InstanceParams; + + /** + * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. + * @param message InstanceParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.InstanceParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstanceParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstanceParams + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AllocationAffinity. */ + interface IAllocationAffinity { + + /** AllocationAffinity consumeAllocationType */ + consumeAllocationType?: (google.cloud.backupdr.v1.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1.AllocationAffinity.Type|null); + + /** AllocationAffinity key */ + key?: (string|null); + + /** AllocationAffinity values */ + values?: (string[]|null); + } + + /** Represents an AllocationAffinity. */ + class AllocationAffinity implements IAllocationAffinity { + + /** + * Constructs a new AllocationAffinity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAllocationAffinity); + + /** AllocationAffinity consumeAllocationType. */ + public consumeAllocationType?: (google.cloud.backupdr.v1.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1.AllocationAffinity.Type|null); + + /** AllocationAffinity key. */ + public key?: (string|null); + + /** AllocationAffinity values. */ + public values: string[]; + + /** AllocationAffinity _consumeAllocationType. */ + public _consumeAllocationType?: "consumeAllocationType"; + + /** AllocationAffinity _key. */ + public _key?: "key"; + + /** + * Creates a new AllocationAffinity instance using the specified properties. + * @param [properties] Properties to set + * @returns AllocationAffinity instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAllocationAffinity): google.cloud.backupdr.v1.AllocationAffinity; + + /** + * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. + * @param message AllocationAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. + * @param message AllocationAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllocationAffinity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllocationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AllocationAffinity; + + /** + * Decodes an AllocationAffinity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllocationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AllocationAffinity; + + /** + * Verifies an AllocationAffinity message. + * @param message Plain 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 AllocationAffinity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllocationAffinity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AllocationAffinity; + + /** + * Creates a plain object from an AllocationAffinity message. Also converts values to other types if specified. + * @param message AllocationAffinity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AllocationAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllocationAffinity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllocationAffinity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AllocationAffinity { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + NO_RESERVATION = 1, + ANY_RESERVATION = 2, + SPECIFIC_RESERVATION = 3 + } + } + + /** Properties of a Scheduling. */ + interface IScheduling { + + /** Scheduling onHostMaintenance */ + onHostMaintenance?: (google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null); + + /** Scheduling automaticRestart */ + automaticRestart?: (boolean|null); + + /** Scheduling preemptible */ + preemptible?: (boolean|null); + + /** Scheduling nodeAffinities */ + nodeAffinities?: (google.cloud.backupdr.v1.Scheduling.INodeAffinity[]|null); + + /** Scheduling minNodeCpus */ + minNodeCpus?: (number|null); + + /** Scheduling provisioningModel */ + provisioningModel?: (google.cloud.backupdr.v1.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null); + + /** Scheduling instanceTerminationAction */ + instanceTerminationAction?: (google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null); + + /** Scheduling localSsdRecoveryTimeout */ + localSsdRecoveryTimeout?: (google.cloud.backupdr.v1.ISchedulingDuration|null); + } + + /** Represents a Scheduling. */ + class Scheduling implements IScheduling { + + /** + * Constructs a new Scheduling. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IScheduling); + + /** Scheduling onHostMaintenance. */ + public onHostMaintenance?: (google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null); + + /** Scheduling automaticRestart. */ + public automaticRestart?: (boolean|null); + + /** Scheduling preemptible. */ + public preemptible?: (boolean|null); + + /** Scheduling nodeAffinities. */ + public nodeAffinities: google.cloud.backupdr.v1.Scheduling.INodeAffinity[]; + + /** Scheduling minNodeCpus. */ + public minNodeCpus?: (number|null); + + /** Scheduling provisioningModel. */ + public provisioningModel?: (google.cloud.backupdr.v1.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null); + + /** Scheduling instanceTerminationAction. */ + public instanceTerminationAction?: (google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null); + + /** Scheduling localSsdRecoveryTimeout. */ + public localSsdRecoveryTimeout?: (google.cloud.backupdr.v1.ISchedulingDuration|null); + + /** Scheduling _onHostMaintenance. */ + public _onHostMaintenance?: "onHostMaintenance"; + + /** Scheduling _automaticRestart. */ + public _automaticRestart?: "automaticRestart"; + + /** Scheduling _preemptible. */ + public _preemptible?: "preemptible"; + + /** Scheduling _minNodeCpus. */ + public _minNodeCpus?: "minNodeCpus"; + + /** Scheduling _provisioningModel. */ + public _provisioningModel?: "provisioningModel"; + + /** Scheduling _instanceTerminationAction. */ + public _instanceTerminationAction?: "instanceTerminationAction"; + + /** Scheduling _localSsdRecoveryTimeout. */ + public _localSsdRecoveryTimeout?: "localSsdRecoveryTimeout"; + + /** + * Creates a new Scheduling instance using the specified properties. + * @param [properties] Properties to set + * @returns Scheduling instance + */ + public static create(properties?: google.cloud.backupdr.v1.IScheduling): google.cloud.backupdr.v1.Scheduling; + + /** + * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. + * @param message Scheduling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. + * @param message Scheduling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Scheduling message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Scheduling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Scheduling; + + /** + * Decodes a Scheduling message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Scheduling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Scheduling; + + /** + * Verifies a Scheduling message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Scheduling + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Scheduling; + + /** + * Creates a plain object from a Scheduling message. Also converts values to other types if specified. + * @param message Scheduling + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Scheduling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Scheduling to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Scheduling + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Scheduling { + + /** OnHostMaintenance enum. */ + enum OnHostMaintenance { + ON_HOST_MAINTENANCE_UNSPECIFIED = 0, + TERMINATE = 1, + MIGRATE = 1000 + } + + /** Properties of a NodeAffinity. */ + interface INodeAffinity { + + /** NodeAffinity key */ + key?: (string|null); + + /** NodeAffinity operator */ + operator?: (google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null); + + /** NodeAffinity values */ + values?: (string[]|null); + } + + /** Represents a NodeAffinity. */ + class NodeAffinity implements INodeAffinity { + + /** + * Constructs a new NodeAffinity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.Scheduling.INodeAffinity); + + /** NodeAffinity key. */ + public key?: (string|null); + + /** NodeAffinity operator. */ + public operator?: (google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null); + + /** NodeAffinity values. */ + public values: string[]; + + /** NodeAffinity _key. */ + public _key?: "key"; + + /** NodeAffinity _operator. */ + public _operator?: "operator"; + + /** + * Creates a new NodeAffinity instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeAffinity instance + */ + public static create(properties?: google.cloud.backupdr.v1.Scheduling.INodeAffinity): google.cloud.backupdr.v1.Scheduling.NodeAffinity; + + /** + * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @param message NodeAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @param message NodeAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Scheduling.NodeAffinity; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Scheduling.NodeAffinity; + + /** + * Verifies a NodeAffinity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeAffinity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Scheduling.NodeAffinity; + + /** + * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. + * @param message NodeAffinity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Scheduling.NodeAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeAffinity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeAffinity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NodeAffinity { + + /** Operator enum. */ + enum Operator { + OPERATOR_UNSPECIFIED = 0, + IN = 1, + NOT_IN = 2 + } + } + + /** ProvisioningModel enum. */ + enum ProvisioningModel { + PROVISIONING_MODEL_UNSPECIFIED = 0, + STANDARD = 1, + SPOT = 2 + } + + /** InstanceTerminationAction enum. */ + enum InstanceTerminationAction { + INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0, + DELETE = 1, + STOP = 2 + } + } + + /** Properties of a SchedulingDuration. */ + interface ISchedulingDuration { + + /** SchedulingDuration seconds */ + seconds?: (number|Long|string|null); + + /** SchedulingDuration nanos */ + nanos?: (number|null); + } + + /** Represents a SchedulingDuration. */ + class SchedulingDuration implements ISchedulingDuration { + + /** + * Constructs a new SchedulingDuration. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ISchedulingDuration); + + /** SchedulingDuration seconds. */ + public seconds?: (number|Long|string|null); + + /** SchedulingDuration nanos. */ + public nanos?: (number|null); + + /** SchedulingDuration _seconds. */ + public _seconds?: "seconds"; + + /** SchedulingDuration _nanos. */ + public _nanos?: "nanos"; + + /** + * Creates a new SchedulingDuration instance using the specified properties. + * @param [properties] Properties to set + * @returns SchedulingDuration instance + */ + public static create(properties?: google.cloud.backupdr.v1.ISchedulingDuration): google.cloud.backupdr.v1.SchedulingDuration; + + /** + * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. + * @param message SchedulingDuration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. + * @param message SchedulingDuration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchedulingDuration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchedulingDuration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SchedulingDuration; + + /** + * Decodes a SchedulingDuration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchedulingDuration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SchedulingDuration; + + /** + * Verifies a SchedulingDuration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchedulingDuration + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SchedulingDuration; + + /** + * Creates a plain object from a SchedulingDuration message. Also converts values to other types if specified. + * @param message SchedulingDuration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.SchedulingDuration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchedulingDuration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchedulingDuration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceAccount. */ + interface IServiceAccount { + + /** ServiceAccount email */ + email?: (string|null); + + /** ServiceAccount scopes */ + scopes?: (string[]|null); + } + + /** Represents a ServiceAccount. */ + class ServiceAccount implements IServiceAccount { + + /** + * Constructs a new ServiceAccount. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IServiceAccount); + + /** ServiceAccount email. */ + public email?: (string|null); + + /** ServiceAccount scopes. */ + public scopes: string[]; + + /** ServiceAccount _email. */ + public _email?: "email"; + + /** + * Creates a new ServiceAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceAccount instance + */ + public static create(properties?: google.cloud.backupdr.v1.IServiceAccount): google.cloud.backupdr.v1.ServiceAccount; + + /** + * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. + * @param message ServiceAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. + * @param message ServiceAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ServiceAccount; + + /** + * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ServiceAccount; + + /** + * Verifies a ServiceAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceAccount + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ServiceAccount; + + /** + * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. + * @param message ServiceAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ServiceAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceAccount + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Tags. */ + interface ITags { + + /** Tags items */ + items?: (string[]|null); + } + + /** Represents a Tags. */ + class Tags implements ITags { + + /** + * Constructs a new Tags. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ITags); + + /** Tags items. */ + public items: string[]; + + /** + * Creates a new Tags instance using the specified properties. + * @param [properties] Properties to set + * @returns Tags instance + */ + public static create(properties?: google.cloud.backupdr.v1.ITags): google.cloud.backupdr.v1.Tags; + + /** + * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. + * @param message Tags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ITags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. + * @param message Tags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ITags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Tags message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Tags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Tags; + + /** + * Decodes a Tags message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Tags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Tags; + + /** + * Verifies a Tags message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Tags message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Tags + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Tags; + + /** + * Creates a plain object from a Tags message. Also converts values to other types if specified. + * @param message Tags + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Tags, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Tags to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Tags + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AttachedDisk. */ + interface IAttachedDisk { + + /** AttachedDisk initializeParams */ + initializeParams?: (google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null); + + /** AttachedDisk deviceName */ + deviceName?: (string|null); + + /** AttachedDisk kind */ + kind?: (string|null); + + /** AttachedDisk diskTypeDeprecated */ + diskTypeDeprecated?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); + + /** AttachedDisk mode */ + mode?: (google.cloud.backupdr.v1.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskMode|null); + + /** AttachedDisk source */ + source?: (string|null); + + /** AttachedDisk index */ + index?: (number|Long|string|null); + + /** AttachedDisk boot */ + boot?: (boolean|null); + + /** AttachedDisk autoDelete */ + autoDelete?: (boolean|null); + + /** AttachedDisk license */ + license?: (string[]|null); + + /** AttachedDisk diskInterface */ + diskInterface?: (google.cloud.backupdr.v1.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null); + + /** AttachedDisk guestOsFeature */ + guestOsFeature?: (google.cloud.backupdr.v1.IGuestOsFeature[]|null); + + /** AttachedDisk diskEncryptionKey */ + diskEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** AttachedDisk diskSizeGb */ + diskSizeGb?: (number|Long|string|null); + + /** AttachedDisk savedState */ + savedState?: (google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null); + + /** AttachedDisk diskType */ + diskType?: (string|null); + + /** AttachedDisk type */ + type?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); + } + + /** Represents an AttachedDisk. */ + class AttachedDisk implements IAttachedDisk { + + /** + * Constructs a new AttachedDisk. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAttachedDisk); + + /** AttachedDisk initializeParams. */ + public initializeParams?: (google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null); + + /** AttachedDisk deviceName. */ + public deviceName?: (string|null); + + /** AttachedDisk kind. */ + public kind?: (string|null); + + /** AttachedDisk diskTypeDeprecated. */ + public diskTypeDeprecated?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); + + /** AttachedDisk mode. */ + public mode?: (google.cloud.backupdr.v1.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskMode|null); + + /** AttachedDisk source. */ + public source?: (string|null); + + /** AttachedDisk index. */ + public index?: (number|Long|string|null); + + /** AttachedDisk boot. */ + public boot?: (boolean|null); + + /** AttachedDisk autoDelete. */ + public autoDelete?: (boolean|null); + + /** AttachedDisk license. */ + public license: string[]; + + /** AttachedDisk diskInterface. */ + public diskInterface?: (google.cloud.backupdr.v1.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null); + + /** AttachedDisk guestOsFeature. */ + public guestOsFeature: google.cloud.backupdr.v1.IGuestOsFeature[]; + + /** AttachedDisk diskEncryptionKey. */ + public diskEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** AttachedDisk diskSizeGb. */ + public diskSizeGb?: (number|Long|string|null); + + /** AttachedDisk savedState. */ + public savedState?: (google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null); + + /** AttachedDisk diskType. */ + public diskType?: (string|null); + + /** AttachedDisk type. */ + public type?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); + + /** AttachedDisk _initializeParams. */ + public _initializeParams?: "initializeParams"; + + /** AttachedDisk _deviceName. */ + public _deviceName?: "deviceName"; + + /** AttachedDisk _kind. */ + public _kind?: "kind"; + + /** AttachedDisk _diskTypeDeprecated. */ + public _diskTypeDeprecated?: "diskTypeDeprecated"; + + /** AttachedDisk _mode. */ + public _mode?: "mode"; + + /** AttachedDisk _source. */ + public _source?: "source"; + + /** AttachedDisk _index. */ + public _index?: "index"; + + /** AttachedDisk _boot. */ + public _boot?: "boot"; + + /** AttachedDisk _autoDelete. */ + public _autoDelete?: "autoDelete"; + + /** AttachedDisk _diskInterface. */ + public _diskInterface?: "diskInterface"; + + /** AttachedDisk _diskEncryptionKey. */ + public _diskEncryptionKey?: "diskEncryptionKey"; + + /** AttachedDisk _diskSizeGb. */ + public _diskSizeGb?: "diskSizeGb"; + + /** AttachedDisk _savedState. */ + public _savedState?: "savedState"; + + /** AttachedDisk _diskType. */ + public _diskType?: "diskType"; + + /** AttachedDisk _type. */ + public _type?: "type"; + + /** + * Creates a new AttachedDisk instance using the specified properties. + * @param [properties] Properties to set + * @returns AttachedDisk instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAttachedDisk): google.cloud.backupdr.v1.AttachedDisk; + + /** + * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. + * @param message AttachedDisk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. + * @param message AttachedDisk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AttachedDisk message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AttachedDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AttachedDisk; + + /** + * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AttachedDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AttachedDisk; + + /** + * Verifies an AttachedDisk message. + * @param message Plain 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 AttachedDisk message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AttachedDisk + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AttachedDisk; + + /** + * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. + * @param message AttachedDisk + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AttachedDisk, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AttachedDisk to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AttachedDisk + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AttachedDisk { + + /** Properties of an InitializeParams. */ + interface IInitializeParams { + + /** InitializeParams diskName */ + diskName?: (string|null); + + /** InitializeParams replicaZones */ + replicaZones?: (string[]|null); + } + + /** Represents an InitializeParams. */ + class InitializeParams implements IInitializeParams { + + /** + * Constructs a new InitializeParams. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams); + + /** InitializeParams diskName. */ + public diskName?: (string|null); + + /** InitializeParams replicaZones. */ + public replicaZones: string[]; + + /** InitializeParams _diskName. */ + public _diskName?: "diskName"; + + /** + * Creates a new InitializeParams instance using the specified properties. + * @param [properties] Properties to set + * @returns InitializeParams instance + */ + public static create(properties?: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Encodes the specified InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @param message InitializeParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @param message InitializeParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InitializeParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Decodes an InitializeParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Verifies an InitializeParams message. + * @param message Plain 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 InitializeParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InitializeParams + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. + * @param message InitializeParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AttachedDisk.InitializeParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InitializeParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InitializeParams + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** DiskType enum. */ + enum DiskType { + DISK_TYPE_UNSPECIFIED = 0, + SCRATCH = 1, + PERSISTENT = 2 + } + + /** DiskMode enum. */ + enum DiskMode { + DISK_MODE_UNSPECIFIED = 0, + READ_WRITE = 1, + READ_ONLY = 2, + LOCKED = 3 + } + + /** DiskInterface enum. */ + enum DiskInterface { + DISK_INTERFACE_UNSPECIFIED = 0, + SCSI = 1, + NVME = 2, + NVDIMM = 3, + ISCSI = 4 + } + + /** DiskSavedState enum. */ + enum DiskSavedState { + DISK_SAVED_STATE_UNSPECIFIED = 0, + PRESERVED = 1 + } + } + + /** Properties of a GuestOsFeature. */ + interface IGuestOsFeature { + + /** GuestOsFeature type */ + type?: (google.cloud.backupdr.v1.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null); + } + + /** Represents a GuestOsFeature. */ + class GuestOsFeature implements IGuestOsFeature { + + /** + * Constructs a new GuestOsFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGuestOsFeature); + + /** GuestOsFeature type. */ + public type?: (google.cloud.backupdr.v1.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null); + + /** GuestOsFeature _type. */ + public _type?: "type"; + + /** + * Creates a new GuestOsFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns GuestOsFeature instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGuestOsFeature): google.cloud.backupdr.v1.GuestOsFeature; + + /** + * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @param message GuestOsFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @param message GuestOsFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GuestOsFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GuestOsFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GuestOsFeature; + + /** + * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GuestOsFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GuestOsFeature; + + /** + * Verifies a GuestOsFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GuestOsFeature + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GuestOsFeature; + + /** + * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. + * @param message GuestOsFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GuestOsFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GuestOsFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GuestOsFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GuestOsFeature { + + /** FeatureType enum. */ + enum FeatureType { + FEATURE_TYPE_UNSPECIFIED = 0, + VIRTIO_SCSI_MULTIQUEUE = 1, + WINDOWS = 2, + MULTI_IP_SUBNET = 3, + UEFI_COMPATIBLE = 4, + SECURE_BOOT = 5, + GVNIC = 6, + SEV_CAPABLE = 7, + BARE_METAL_LINUX_COMPATIBLE = 8, + SUSPEND_RESUME_COMPATIBLE = 9, + SEV_LIVE_MIGRATABLE = 10, + SEV_SNP_CAPABLE = 11, + TDX_CAPABLE = 12, + IDPF = 13, + SEV_LIVE_MIGRATABLE_V2 = 14 + } + } + + /** KeyRevocationActionType enum. */ + enum KeyRevocationActionType { + KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0, + NONE = 1, + STOP = 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 FieldInfo. */ + interface IFieldInfo { + + /** FieldInfo format */ + format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); + } + + /** Represents a FieldInfo. */ + class FieldInfo implements IFieldInfo { + + /** + * Constructs a new FieldInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IFieldInfo); + + /** FieldInfo format. */ + public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); + + /** + * Creates a new FieldInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldInfo instance + */ + public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldInfo + * @throws {Error} If the payload is not 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.FieldInfo; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldInfo + * @throws {Error} If the payload 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.FieldInfo; + + /** + * Verifies a FieldInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldInfo + */ + public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @param message FieldInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldInfo { + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + UUID4 = 1, + IPV4 = 2, + IPV6 = 3, + IPV4_OR_IPV6 = 4 + } + } + + /** 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.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|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 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; + } + + /** 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 DoubleValue. */ + interface IDoubleValue { + + /** DoubleValue value */ + value?: (number|null); + } + + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { + + /** + * Constructs a new DoubleValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDoubleValue); + + /** DoubleValue value. */ + public value: number; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DoubleValue instance + */ + public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DoubleValue + * @throws {Error} If the payload is not 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.DoubleValue; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DoubleValue + * @throws {Error} If the payload 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.DoubleValue; + + /** + * Verifies a DoubleValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DoubleValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DoubleValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FloatValue. */ + interface IFloatValue { + + /** FloatValue value */ + value?: (number|null); + } + + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { + + /** + * Constructs a new FloatValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFloatValue); + + /** FloatValue value. */ + public value: number; + + /** + * Creates a new FloatValue instance using the specified properties. + * @param [properties] Properties to set + * @returns FloatValue instance + */ + public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FloatValue + * @throws {Error} If the payload is not 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.FloatValue; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FloatValue + * @throws {Error} If the payload 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.FloatValue; + + /** + * Verifies a FloatValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FloatValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FloatValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FloatValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Int64Value. */ + interface IInt64Value { + + /** Int64Value value */ + value?: (number|Long|string|null); + } + + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { + + /** + * Constructs a new Int64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt64Value); + + /** Int64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new Int64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int64Value instance + */ + public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int64Value + * @throws {Error} If the payload is not 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.Int64Value; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int64Value + * @throws {Error} If the payload 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.Int64Value; + + /** + * Verifies an Int64Value message. + * @param message Plain 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 Int64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt64Value. */ + interface IUInt64Value { + + /** UInt64Value value */ + value?: (number|Long|string|null); + } + + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { + + /** + * Constructs a new UInt64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt64Value); + + /** UInt64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new UInt64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt64Value instance + */ + public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt64Value + * @throws {Error} If the payload is not 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.UInt64Value; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt64Value + * @throws {Error} If the payload 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.UInt64Value; + + /** + * Verifies a UInt64Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Int32Value. */ + interface IInt32Value { + + /** Int32Value value */ + value?: (number|null); + } + + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { + + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); + + /** Int32Value value. */ + public value: number; + + /** + * Creates a new Int32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int32Value instance + */ + public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int32Value + * @throws {Error} If the payload is not 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.Int32Value; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int32Value + * @throws {Error} If the payload 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.Int32Value; + + /** + * Verifies an Int32Value message. + * @param message Plain 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 Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt32Value. */ + interface IUInt32Value { + + /** UInt32Value value */ + value?: (number|null); + } + + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { + + /** + * Constructs a new UInt32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt32Value); + + /** UInt32Value value. */ + public value: number; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt32Value instance + */ + public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt32Value + * @throws {Error} If the payload is not 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.UInt32Value; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt32Value + * @throws {Error} If the payload 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.UInt32Value; + + /** + * Verifies a UInt32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BoolValue. */ + interface IBoolValue { + + /** BoolValue value */ + value?: (boolean|null); + } + + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { + + /** + * Constructs a new BoolValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBoolValue); + + /** BoolValue value. */ + public value: boolean; + + /** + * Creates a new BoolValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BoolValue instance + */ + public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoolValue + * @throws {Error} If the payload is not 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.BoolValue; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoolValue + * @throws {Error} If the payload 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.BoolValue; + + /** + * Verifies a BoolValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoolValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoolValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BoolValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringValue. */ + interface IStringValue { + + /** StringValue value */ + value?: (string|null); + } + + /** Represents a StringValue. */ + class StringValue implements IStringValue { + + /** + * Constructs a new StringValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStringValue); + + /** StringValue value. */ + public value: string; + + /** + * Creates a new StringValue instance using the specified properties. + * @param [properties] Properties to set + * @returns StringValue instance + */ + public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringValue + * @throws {Error} If the payload is not 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.StringValue; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringValue + * @throws {Error} If the payload 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.StringValue; + + /** + * Verifies a StringValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BytesValue. */ + interface IBytesValue { + + /** BytesValue value */ + value?: (Uint8Array|string|null); + } + + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { + + /** + * Constructs a new BytesValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBytesValue); + + /** BytesValue value. */ + public value: (Uint8Array|string); + + /** + * Creates a new BytesValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BytesValue instance + */ + public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BytesValue + * @throws {Error} If the payload is not 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.BytesValue; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BytesValue + * @throws {Error} If the payload 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.BytesValue; + + /** + * Verifies a BytesValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BytesValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BytesValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BytesValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace type. */ + namespace type { + + /** DayOfWeek enum. */ + enum DayOfWeek { + DAY_OF_WEEK_UNSPECIFIED = 0, + MONDAY = 1, + TUESDAY = 2, + WEDNESDAY = 3, + THURSDAY = 4, + FRIDAY = 5, + SATURDAY = 6, + SUNDAY = 7 + } + + /** Month enum. */ + enum Month { + MONTH_UNSPECIFIED = 0, + JANUARY = 1, + FEBRUARY = 2, + MARCH = 3, + APRIL = 4, + MAY = 5, + JUNE = 6, + JULY = 7, + AUGUST = 8, + SEPTEMBER = 9, + OCTOBER = 10, + NOVEMBER = 11, + DECEMBER = 12 + } + + /** Properties of an Expr. */ + interface IExpr { + + /** Expr expression */ + expression?: (string|null); + + /** Expr title */ + title?: (string|null); + + /** Expr description */ + description?: (string|null); + + /** Expr location */ + location?: (string|null); + } + + /** Represents an Expr. */ + class Expr implements IExpr { + + /** + * Constructs a new Expr. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IExpr); + + /** Expr expression. */ + public expression: string; + + /** Expr title. */ + public title: string; + + /** Expr description. */ + public description: string; + + /** Expr location. */ + public location: string; + + /** + * Creates a new Expr instance using the specified properties. + * @param [properties] Properties to set + * @returns Expr instance + */ + public static create(properties?: google.type.IExpr): google.type.Expr; + + /** + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Expr message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Expr; + + /** + * Decodes an Expr message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Expr; + + /** + * Verifies an Expr message. + * @param message Plain 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 Expr message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Expr + */ + public static fromObject(object: { [k: string]: any }): google.type.Expr; + + /** + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @param message Expr + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Expr, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Expr to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Expr + * @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; + } + } + + /** Namespace iam. */ + namespace iam { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a IAMPolicy */ + class IAMPolicy extends $protobuf.rpc.Service { + + /** + * Constructs a new IAMPolicy 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 IAMPolicy 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): IAMPolicy; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.SetIamPolicyCallback): void; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.GetIamPolicyCallback): void; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.iam.v1.IAMPolicy.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + } + + namespace IAMPolicy { + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + } + + /** Properties of a SetIamPolicyRequest. */ + interface ISetIamPolicyRequest { + + /** SetIamPolicyRequest resource */ + resource?: (string|null); + + /** SetIamPolicyRequest policy */ + policy?: (google.iam.v1.IPolicy|null); + + /** SetIamPolicyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a SetIamPolicyRequest. */ + class SetIamPolicyRequest implements ISetIamPolicyRequest { + + /** + * Constructs a new SetIamPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ISetIamPolicyRequest); + + /** SetIamPolicyRequest resource. */ + public resource: string; + + /** SetIamPolicyRequest policy. */ + public policy?: (google.iam.v1.IPolicy|null); + + /** SetIamPolicyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new SetIamPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetIamPolicyRequest instance + */ + public static create(properties?: google.iam.v1.ISetIamPolicyRequest): google.iam.v1.SetIamPolicyRequest; + + /** + * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @param message SetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @param message SetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.SetIamPolicyRequest; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.SetIamPolicyRequest; + + /** + * Verifies a SetIamPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetIamPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.SetIamPolicyRequest; + + /** + * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. + * @param message SetIamPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.SetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetIamPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetIamPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetIamPolicyRequest. */ + interface IGetIamPolicyRequest { + + /** GetIamPolicyRequest resource */ + resource?: (string|null); + + /** GetIamPolicyRequest options */ + options?: (google.iam.v1.IGetPolicyOptions|null); + } + + /** Represents a GetIamPolicyRequest. */ + class GetIamPolicyRequest implements IGetIamPolicyRequest { + + /** + * Constructs a new GetIamPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IGetIamPolicyRequest); + + /** GetIamPolicyRequest resource. */ + public resource: string; + + /** GetIamPolicyRequest options. */ + public options?: (google.iam.v1.IGetPolicyOptions|null); + + /** + * Creates a new GetIamPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetIamPolicyRequest instance + */ + public static create(properties?: google.iam.v1.IGetIamPolicyRequest): google.iam.v1.GetIamPolicyRequest; + + /** + * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @param message GetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @param message GetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetIamPolicyRequest; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetIamPolicyRequest; + + /** + * Verifies a GetIamPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetIamPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.GetIamPolicyRequest; + + /** + * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. + * @param message GetIamPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.GetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetIamPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetIamPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TestIamPermissionsRequest. */ + interface ITestIamPermissionsRequest { + + /** TestIamPermissionsRequest resource */ + resource?: (string|null); + + /** TestIamPermissionsRequest permissions */ + permissions?: (string[]|null); + } + + /** Represents a TestIamPermissionsRequest. */ + class TestIamPermissionsRequest implements ITestIamPermissionsRequest { + + /** + * Constructs a new TestIamPermissionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ITestIamPermissionsRequest); + + /** TestIamPermissionsRequest resource. */ + public resource: string; + + /** TestIamPermissionsRequest permissions. */ + public permissions: string[]; + + /** + * Creates a new TestIamPermissionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TestIamPermissionsRequest instance + */ + public static create(properties?: google.iam.v1.ITestIamPermissionsRequest): google.iam.v1.TestIamPermissionsRequest; + + /** + * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @param message TestIamPermissionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @param message TestIamPermissionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsRequest; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsRequest; + + /** + * Verifies a TestIamPermissionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TestIamPermissionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsRequest; + + /** + * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. + * @param message TestIamPermissionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.TestIamPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TestIamPermissionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TestIamPermissionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TestIamPermissionsResponse. */ + interface ITestIamPermissionsResponse { + + /** TestIamPermissionsResponse permissions */ + permissions?: (string[]|null); + } + + /** Represents a TestIamPermissionsResponse. */ + class TestIamPermissionsResponse implements ITestIamPermissionsResponse { + + /** + * Constructs a new TestIamPermissionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ITestIamPermissionsResponse); + + /** TestIamPermissionsResponse permissions. */ + public permissions: string[]; + + /** + * Creates a new TestIamPermissionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns TestIamPermissionsResponse instance + */ + public static create(properties?: google.iam.v1.ITestIamPermissionsResponse): google.iam.v1.TestIamPermissionsResponse; + + /** + * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @param message TestIamPermissionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @param message TestIamPermissionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsResponse; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsResponse; + + /** + * Verifies a TestIamPermissionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TestIamPermissionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsResponse; + + /** + * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. + * @param message TestIamPermissionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.TestIamPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TestIamPermissionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TestIamPermissionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPolicyOptions. */ + interface IGetPolicyOptions { + + /** GetPolicyOptions requestedPolicyVersion */ + requestedPolicyVersion?: (number|null); + } + + /** Represents a GetPolicyOptions. */ + class GetPolicyOptions implements IGetPolicyOptions { + + /** + * Constructs a new GetPolicyOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IGetPolicyOptions); + + /** GetPolicyOptions requestedPolicyVersion. */ + public requestedPolicyVersion: number; + + /** + * Creates a new GetPolicyOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPolicyOptions instance + */ + public static create(properties?: google.iam.v1.IGetPolicyOptions): google.iam.v1.GetPolicyOptions; + + /** + * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @param message GetPolicyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @param message GetPolicyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetPolicyOptions; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetPolicyOptions; + + /** + * Verifies a GetPolicyOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPolicyOptions + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.GetPolicyOptions; + + /** + * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. + * @param message GetPolicyOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.GetPolicyOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPolicyOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPolicyOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Policy. */ + interface IPolicy { + + /** Policy version */ + version?: (number|null); + + /** Policy bindings */ + bindings?: (google.iam.v1.IBinding[]|null); + + /** Policy auditConfigs */ + auditConfigs?: (google.iam.v1.IAuditConfig[]|null); + + /** Policy etag */ + etag?: (Uint8Array|string|null); + } + + /** Represents a Policy. */ + class Policy implements IPolicy { + + /** + * Constructs a new Policy. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicy); + + /** Policy version. */ + public version: number; + + /** Policy bindings. */ + public bindings: google.iam.v1.IBinding[]; + + /** Policy auditConfigs. */ + public auditConfigs: google.iam.v1.IAuditConfig[]; + + /** Policy etag. */ + public etag: (Uint8Array|string); + + /** + * Creates a new Policy instance using the specified properties. + * @param [properties] Properties to set + * @returns Policy instance + */ + public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy; + + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Policy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy; + + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy; + + /** + * Verifies a Policy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Policy + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy; + + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @param message Policy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Policy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Policy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Binding. */ + interface IBinding { + + /** Binding role */ + role?: (string|null); + + /** Binding members */ + members?: (string[]|null); + + /** Binding condition */ + condition?: (google.type.IExpr|null); + } + + /** Represents a Binding. */ + class Binding implements IBinding { + + /** + * Constructs a new Binding. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBinding); + + /** Binding role. */ + public role: string; + + /** Binding members. */ + public members: string[]; + + /** Binding condition. */ + public condition?: (google.type.IExpr|null); + + /** + * Creates a new Binding instance using the specified properties. + * @param [properties] Properties to set + * @returns Binding instance + */ + public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Binding; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Binding; + + /** + * Verifies a Binding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Binding + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @param message Binding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Binding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Binding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditConfig. */ + interface IAuditConfig { + + /** AuditConfig service */ + service?: (string|null); + + /** AuditConfig auditLogConfigs */ + auditLogConfigs?: (google.iam.v1.IAuditLogConfig[]|null); + } + + /** Represents an AuditConfig. */ + class AuditConfig implements IAuditConfig { + + /** + * Constructs a new AuditConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfig); + + /** AuditConfig service. */ + public service: string; + + /** AuditConfig auditLogConfigs. */ + public auditLogConfigs: google.iam.v1.IAuditLogConfig[]; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfig instance + */ + public static create(properties?: google.iam.v1.IAuditConfig): google.iam.v1.AuditConfig; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfig; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfig; + + /** + * Verifies an AuditConfig message. + * @param message Plain 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 AuditConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfig; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @param message AuditConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditLogConfig. */ + interface IAuditLogConfig { + + /** AuditLogConfig logType */ + logType?: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType|null); + + /** AuditLogConfig exemptedMembers */ + exemptedMembers?: (string[]|null); + } + + /** Represents an AuditLogConfig. */ + class AuditLogConfig implements IAuditLogConfig { + + /** + * Constructs a new AuditLogConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditLogConfig); + + /** AuditLogConfig logType. */ + public logType: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType); + + /** AuditLogConfig exemptedMembers. */ + public exemptedMembers: string[]; + + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditLogConfig instance + */ + public static create(properties?: google.iam.v1.IAuditLogConfig): google.iam.v1.AuditLogConfig; + + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditLogConfig; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditLogConfig; + + /** + * Verifies an AuditLogConfig message. + * @param message Plain 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 AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditLogConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditLogConfig; + + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @param message AuditLogConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditLogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditLogConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditLogConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuditLogConfig { + + /** LogType enum. */ + enum LogType { + LOG_TYPE_UNSPECIFIED = 0, + ADMIN_READ = 1, + DATA_WRITE = 2, + DATA_READ = 3 + } + } + + /** Properties of a PolicyDelta. */ + interface IPolicyDelta { + + /** PolicyDelta bindingDeltas */ + bindingDeltas?: (google.iam.v1.IBindingDelta[]|null); + + /** PolicyDelta auditConfigDeltas */ + auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null); + } + + /** Represents a PolicyDelta. */ + class PolicyDelta implements IPolicyDelta { + + /** + * Constructs a new PolicyDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicyDelta); + + /** PolicyDelta bindingDeltas. */ + public bindingDeltas: google.iam.v1.IBindingDelta[]; + + /** PolicyDelta auditConfigDeltas. */ + public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[]; + + /** + * Creates a new PolicyDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns PolicyDelta instance + */ + public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta; + + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.PolicyDelta; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.PolicyDelta; + + /** + * Verifies a PolicyDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PolicyDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta; + + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @param message PolicyDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PolicyDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PolicyDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BindingDelta. */ + interface IBindingDelta { + + /** BindingDelta action */ + action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null); + + /** BindingDelta role */ + role?: (string|null); + + /** BindingDelta member */ + member?: (string|null); + + /** BindingDelta condition */ + condition?: (google.type.IExpr|null); + } + + /** Represents a BindingDelta. */ + class BindingDelta implements IBindingDelta { + + /** + * Constructs a new BindingDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBindingDelta); + + /** BindingDelta action. */ + public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action); + + /** BindingDelta role. */ + public role: string; + + /** BindingDelta member. */ + public member: string; + + /** BindingDelta condition. */ + public condition?: (google.type.IExpr|null); + + /** + * Creates a new BindingDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns BindingDelta instance + */ + public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta; + + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.BindingDelta; + + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.BindingDelta; + + /** + * Verifies a BindingDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BindingDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta; + + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @param message BindingDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BindingDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BindingDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BindingDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } + + /** Properties of an AuditConfigDelta. */ + interface IAuditConfigDelta { + + /** AuditConfigDelta action */ + action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null); + + /** AuditConfigDelta service */ + service?: (string|null); + + /** AuditConfigDelta exemptedMember */ + exemptedMember?: (string|null); + + /** AuditConfigDelta logType */ + logType?: (string|null); + } + + /** Represents an AuditConfigDelta. */ + class AuditConfigDelta implements IAuditConfigDelta { + + /** + * Constructs a new AuditConfigDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfigDelta); + + /** AuditConfigDelta action. */ + public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action); + + /** AuditConfigDelta service. */ + public service: string; + + /** AuditConfigDelta exemptedMember. */ + public exemptedMember: string; + + /** AuditConfigDelta logType. */ + public logType: string; + + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfigDelta instance + */ + public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta; + + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfigDelta; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfigDelta; + + /** + * Verifies an AuditConfigDelta message. + * @param message Plain 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 AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfigDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta; + + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @param message AuditConfigDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfigDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditConfigDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuditConfigDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } + } + } + + /** 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; + } + } +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js new file mode 100644 index 00000000000..f97790dd10a --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js @@ -0,0 +1,61858 @@ +// 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. + +/*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_backupdr_protos || ($protobuf.roots._google_cloud_backupdr_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.backupdr = (function() { + + /** + * Namespace backupdr. + * @memberof google.cloud + * @namespace + */ + var backupdr = {}; + + backupdr.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.backupdr + * @namespace + */ + var v1 = {}; + + v1.BackupDR = (function() { + + /** + * Constructs a new BackupDR service. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupDR + * @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 BackupDR(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (BackupDR.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = BackupDR; + + /** + * Creates new BackupDR service using the specified rpc implementation. + * @function create + * @memberof google.cloud.backupdr.v1.BackupDR + * @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 {BackupDR} RPC service. Useful where requests and/or responses are streamed. + */ + BackupDR.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listManagementServers}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListManagementServersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListManagementServersResponse} [response] ListManagementServersResponse + */ + + /** + * Calls ListManagementServers. + * @function listManagementServers + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListManagementServersRequest} request ListManagementServersRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListManagementServersCallback} callback Node-style callback called with the error, if any, and ListManagementServersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listManagementServers = function listManagementServers(request, callback) { + return this.rpcCall(listManagementServers, $root.google.cloud.backupdr.v1.ListManagementServersRequest, $root.google.cloud.backupdr.v1.ListManagementServersResponse, request, callback); + }, "name", { value: "ListManagementServers" }); + + /** + * Calls ListManagementServers. + * @function listManagementServers + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListManagementServersRequest} request ListManagementServersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getManagementServer}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetManagementServerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ManagementServer} [response] ManagementServer + */ + + /** + * Calls GetManagementServer. + * @function getManagementServer + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} request GetManagementServerRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetManagementServerCallback} callback Node-style callback called with the error, if any, and ManagementServer + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.getManagementServer = function getManagementServer(request, callback) { + return this.rpcCall(getManagementServer, $root.google.cloud.backupdr.v1.GetManagementServerRequest, $root.google.cloud.backupdr.v1.ManagementServer, request, callback); + }, "name", { value: "GetManagementServer" }); + + /** + * Calls GetManagementServer. + * @function getManagementServer + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} request GetManagementServerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createManagementServer}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef CreateManagementServerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateManagementServer. + * @function createManagementServer + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} request CreateManagementServerRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.CreateManagementServerCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.createManagementServer = function createManagementServer(request, callback) { + return this.rpcCall(createManagementServer, $root.google.cloud.backupdr.v1.CreateManagementServerRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateManagementServer" }); + + /** + * Calls CreateManagementServer. + * @function createManagementServer + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} request CreateManagementServerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteManagementServer}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef DeleteManagementServerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteManagementServer. + * @function deleteManagementServer + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} request DeleteManagementServerRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.DeleteManagementServerCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.deleteManagementServer = function deleteManagementServer(request, callback) { + return this.rpcCall(deleteManagementServer, $root.google.cloud.backupdr.v1.DeleteManagementServerRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteManagementServer" }); + + /** + * Calls DeleteManagementServer. + * @function deleteManagementServer + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} request DeleteManagementServerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupVault}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef CreateBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateBackupVault. + * @function createBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} request CreateBackupVaultRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.createBackupVault = function createBackupVault(request, callback) { + return this.rpcCall(createBackupVault, $root.google.cloud.backupdr.v1.CreateBackupVaultRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBackupVault" }); + + /** + * Calls CreateBackupVault. + * @function createBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} request CreateBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupVaults}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListBackupVaultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListBackupVaultsResponse} [response] ListBackupVaultsResponse + */ + + /** + * Calls ListBackupVaults. + * @function listBackupVaults + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} request ListBackupVaultsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListBackupVaultsCallback} callback Node-style callback called with the error, if any, and ListBackupVaultsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listBackupVaults = function listBackupVaults(request, callback) { + return this.rpcCall(listBackupVaults, $root.google.cloud.backupdr.v1.ListBackupVaultsRequest, $root.google.cloud.backupdr.v1.ListBackupVaultsResponse, request, callback); + }, "name", { value: "ListBackupVaults" }); + + /** + * Calls ListBackupVaults. + * @function listBackupVaults + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} request ListBackupVaultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchUsableBackupVaults}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef FetchUsableBackupVaultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} [response] FetchUsableBackupVaultsResponse + */ + + /** + * Calls FetchUsableBackupVaults. + * @function fetchUsableBackupVaults + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} request FetchUsableBackupVaultsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaultsCallback} callback Node-style callback called with the error, if any, and FetchUsableBackupVaultsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.fetchUsableBackupVaults = function fetchUsableBackupVaults(request, callback) { + return this.rpcCall(fetchUsableBackupVaults, $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest, $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse, request, callback); + }, "name", { value: "FetchUsableBackupVaults" }); + + /** + * Calls FetchUsableBackupVaults. + * @function fetchUsableBackupVaults + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} request FetchUsableBackupVaultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupVault}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.BackupVault} [response] BackupVault + */ + + /** + * Calls GetBackupVault. + * @function getBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} request GetBackupVaultRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetBackupVaultCallback} callback Node-style callback called with the error, if any, and BackupVault + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.getBackupVault = function getBackupVault(request, callback) { + return this.rpcCall(getBackupVault, $root.google.cloud.backupdr.v1.GetBackupVaultRequest, $root.google.cloud.backupdr.v1.BackupVault, request, callback); + }, "name", { value: "GetBackupVault" }); + + /** + * Calls GetBackupVault. + * @function getBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} request GetBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackupVault}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef UpdateBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateBackupVault. + * @function updateBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} request UpdateBackupVaultRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.UpdateBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.updateBackupVault = function updateBackupVault(request, callback) { + return this.rpcCall(updateBackupVault, $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateBackupVault" }); + + /** + * Calls UpdateBackupVault. + * @function updateBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} request UpdateBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupVault}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef DeleteBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteBackupVault. + * @function deleteBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} request DeleteBackupVaultRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.deleteBackupVault = function deleteBackupVault(request, callback) { + return this.rpcCall(deleteBackupVault, $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackupVault" }); + + /** + * Calls DeleteBackupVault. + * @function deleteBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} request DeleteBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|testIamPermissions}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listDataSources}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListDataSourcesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListDataSourcesResponse} [response] ListDataSourcesResponse + */ + + /** + * Calls ListDataSources. + * @function listDataSources + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} request ListDataSourcesRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListDataSourcesCallback} callback Node-style callback called with the error, if any, and ListDataSourcesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listDataSources = function listDataSources(request, callback) { + return this.rpcCall(listDataSources, $root.google.cloud.backupdr.v1.ListDataSourcesRequest, $root.google.cloud.backupdr.v1.ListDataSourcesResponse, request, callback); + }, "name", { value: "ListDataSources" }); + + /** + * Calls ListDataSources. + * @function listDataSources + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} request ListDataSourcesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getDataSource}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetDataSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.DataSource} [response] DataSource + */ + + /** + * Calls GetDataSource. + * @function getDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} request GetDataSourceRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetDataSourceCallback} callback Node-style callback called with the error, if any, and DataSource + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.getDataSource = function getDataSource(request, callback) { + return this.rpcCall(getDataSource, $root.google.cloud.backupdr.v1.GetDataSourceRequest, $root.google.cloud.backupdr.v1.DataSource, request, callback); + }, "name", { value: "GetDataSource" }); + + /** + * Calls GetDataSource. + * @function getDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} request GetDataSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateDataSource}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef UpdateDataSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateDataSource. + * @function updateDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} request UpdateDataSourceRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.UpdateDataSourceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.updateDataSource = function updateDataSource(request, callback) { + return this.rpcCall(updateDataSource, $root.google.cloud.backupdr.v1.UpdateDataSourceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateDataSource" }); + + /** + * Calls UpdateDataSource. + * @function updateDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} request UpdateDataSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|removeDataSource}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef RemoveDataSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RemoveDataSource. + * @function removeDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} request RemoveDataSourceRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.RemoveDataSourceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.removeDataSource = function removeDataSource(request, callback) { + return this.rpcCall(removeDataSource, $root.google.cloud.backupdr.v1.RemoveDataSourceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RemoveDataSource" }); + + /** + * Calls RemoveDataSource. + * @function removeDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} request RemoveDataSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|setInternalStatus}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef SetInternalStatusCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls SetInternalStatus. + * @function setInternalStatus + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} request SetInternalStatusRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.SetInternalStatusCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.setInternalStatus = function setInternalStatus(request, callback) { + return this.rpcCall(setInternalStatus, $root.google.cloud.backupdr.v1.SetInternalStatusRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "SetInternalStatus" }); + + /** + * Calls SetInternalStatus. + * @function setInternalStatus + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} request SetInternalStatusRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|initiateBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef InitiateBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.InitiateBackupResponse} [response] InitiateBackupResponse + */ + + /** + * Calls InitiateBackup. + * @function initiateBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} request InitiateBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.InitiateBackupCallback} callback Node-style callback called with the error, if any, and InitiateBackupResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.initiateBackup = function initiateBackup(request, callback) { + return this.rpcCall(initiateBackup, $root.google.cloud.backupdr.v1.InitiateBackupRequest, $root.google.cloud.backupdr.v1.InitiateBackupResponse, request, callback); + }, "name", { value: "InitiateBackup" }); + + /** + * Calls InitiateBackup. + * @function initiateBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} request InitiateBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|abandonBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef AbandonBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls AbandonBackup. + * @function abandonBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} request AbandonBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.AbandonBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.abandonBackup = function abandonBackup(request, callback) { + return this.rpcCall(abandonBackup, $root.google.cloud.backupdr.v1.AbandonBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "AbandonBackup" }); + + /** + * Calls AbandonBackup. + * @function abandonBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} request AbandonBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|finalizeBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef FinalizeBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls FinalizeBackup. + * @function finalizeBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} request FinalizeBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.FinalizeBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.finalizeBackup = function finalizeBackup(request, callback) { + return this.rpcCall(finalizeBackup, $root.google.cloud.backupdr.v1.FinalizeBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "FinalizeBackup" }); + + /** + * Calls FinalizeBackup. + * @function finalizeBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} request FinalizeBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchAccessToken}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef FetchAccessTokenCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.FetchAccessTokenResponse} [response] FetchAccessTokenResponse + */ + + /** + * Calls FetchAccessToken. + * @function fetchAccessToken + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} request FetchAccessTokenRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.FetchAccessTokenCallback} callback Node-style callback called with the error, if any, and FetchAccessTokenResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.fetchAccessToken = function fetchAccessToken(request, callback) { + return this.rpcCall(fetchAccessToken, $root.google.cloud.backupdr.v1.FetchAccessTokenRequest, $root.google.cloud.backupdr.v1.FetchAccessTokenResponse, request, callback); + }, "name", { value: "FetchAccessToken" }); + + /** + * Calls FetchAccessToken. + * @function fetchAccessToken + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} request FetchAccessTokenRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackups}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListBackupsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListBackupsResponse} [response] ListBackupsResponse + */ + + /** + * Calls ListBackups. + * @function listBackups + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupsRequest} request ListBackupsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListBackupsCallback} callback Node-style callback called with the error, if any, and ListBackupsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listBackups = function listBackups(request, callback) { + return this.rpcCall(listBackups, $root.google.cloud.backupdr.v1.ListBackupsRequest, $root.google.cloud.backupdr.v1.ListBackupsResponse, request, callback); + }, "name", { value: "ListBackups" }); + + /** + * Calls ListBackups. + * @function listBackups + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupsRequest} request ListBackupsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.Backup} [response] Backup + */ + + /** + * Calls GetBackup. + * @function getBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupRequest} request GetBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetBackupCallback} callback Node-style callback called with the error, if any, and Backup + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.getBackup = function getBackup(request, callback) { + return this.rpcCall(getBackup, $root.google.cloud.backupdr.v1.GetBackupRequest, $root.google.cloud.backupdr.v1.Backup, request, callback); + }, "name", { value: "GetBackup" }); + + /** + * Calls GetBackup. + * @function getBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupRequest} request GetBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef UpdateBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateBackup. + * @function updateBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} request UpdateBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.UpdateBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.updateBackup = function updateBackup(request, callback) { + return this.rpcCall(updateBackup, $root.google.cloud.backupdr.v1.UpdateBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateBackup" }); + + /** + * Calls UpdateBackup. + * @function updateBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} request UpdateBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef DeleteBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteBackup. + * @function deleteBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} request DeleteBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.deleteBackup = function deleteBackup(request, callback) { + return this.rpcCall(deleteBackup, $root.google.cloud.backupdr.v1.DeleteBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackup" }); + + /** + * Calls DeleteBackup. + * @function deleteBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} request DeleteBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|restoreBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef RestoreBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RestoreBackup. + * @function restoreBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} request RestoreBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.RestoreBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.restoreBackup = function restoreBackup(request, callback) { + return this.rpcCall(restoreBackup, $root.google.cloud.backupdr.v1.RestoreBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RestoreBackup" }); + + /** + * Calls RestoreBackup. + * @function restoreBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} request RestoreBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlan}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef CreateBackupPlanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateBackupPlan. + * @function createBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} request CreateBackupPlanRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupPlanCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.createBackupPlan = function createBackupPlan(request, callback) { + return this.rpcCall(createBackupPlan, $root.google.cloud.backupdr.v1.CreateBackupPlanRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBackupPlan" }); + + /** + * Calls CreateBackupPlan. + * @function createBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} request CreateBackupPlanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlan}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetBackupPlanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.BackupPlan} [response] BackupPlan + */ + + /** + * Calls GetBackupPlan. + * @function getBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} request GetBackupPlanRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetBackupPlanCallback} callback Node-style callback called with the error, if any, and BackupPlan + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.getBackupPlan = function getBackupPlan(request, callback) { + return this.rpcCall(getBackupPlan, $root.google.cloud.backupdr.v1.GetBackupPlanRequest, $root.google.cloud.backupdr.v1.BackupPlan, request, callback); + }, "name", { value: "GetBackupPlan" }); + + /** + * Calls GetBackupPlan. + * @function getBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} request GetBackupPlanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlans}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListBackupPlansCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListBackupPlansResponse} [response] ListBackupPlansResponse + */ + + /** + * Calls ListBackupPlans. + * @function listBackupPlans + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} request ListBackupPlansRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListBackupPlansCallback} callback Node-style callback called with the error, if any, and ListBackupPlansResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listBackupPlans = function listBackupPlans(request, callback) { + return this.rpcCall(listBackupPlans, $root.google.cloud.backupdr.v1.ListBackupPlansRequest, $root.google.cloud.backupdr.v1.ListBackupPlansResponse, request, callback); + }, "name", { value: "ListBackupPlans" }); + + /** + * Calls ListBackupPlans. + * @function listBackupPlans + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} request ListBackupPlansRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlan}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef DeleteBackupPlanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteBackupPlan. + * @function deleteBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} request DeleteBackupPlanRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.deleteBackupPlan = function deleteBackupPlan(request, callback) { + return this.rpcCall(deleteBackupPlan, $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackupPlan" }); + + /** + * Calls DeleteBackupPlan. + * @function deleteBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} request DeleteBackupPlanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlanAssociation}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef CreateBackupPlanAssociationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateBackupPlanAssociation. + * @function createBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} request CreateBackupPlanAssociationRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.createBackupPlanAssociation = function createBackupPlanAssociation(request, callback) { + return this.rpcCall(createBackupPlanAssociation, $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBackupPlanAssociation" }); + + /** + * Calls CreateBackupPlanAssociation. + * @function createBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} request CreateBackupPlanAssociationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlanAssociation}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetBackupPlanAssociationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.BackupPlanAssociation} [response] BackupPlanAssociation + */ + + /** + * Calls GetBackupPlanAssociation. + * @function getBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} request GetBackupPlanAssociationRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and BackupPlanAssociation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.getBackupPlanAssociation = function getBackupPlanAssociation(request, callback) { + return this.rpcCall(getBackupPlanAssociation, $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest, $root.google.cloud.backupdr.v1.BackupPlanAssociation, request, callback); + }, "name", { value: "GetBackupPlanAssociation" }); + + /** + * Calls GetBackupPlanAssociation. + * @function getBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} request GetBackupPlanAssociationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlanAssociations}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListBackupPlanAssociationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} [response] ListBackupPlanAssociationsResponse + */ + + /** + * Calls ListBackupPlanAssociations. + * @function listBackupPlanAssociations + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} request ListBackupPlanAssociationsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociationsCallback} callback Node-style callback called with the error, if any, and ListBackupPlanAssociationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listBackupPlanAssociations = function listBackupPlanAssociations(request, callback) { + return this.rpcCall(listBackupPlanAssociations, $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest, $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse, request, callback); + }, "name", { value: "ListBackupPlanAssociations" }); + + /** + * Calls ListBackupPlanAssociations. + * @function listBackupPlanAssociations + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} request ListBackupPlanAssociationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlanAssociation}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef DeleteBackupPlanAssociationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteBackupPlanAssociation. + * @function deleteBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} request DeleteBackupPlanAssociationRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.deleteBackupPlanAssociation = function deleteBackupPlanAssociation(request, callback) { + return this.rpcCall(deleteBackupPlanAssociation, $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackupPlanAssociation" }); + + /** + * Calls DeleteBackupPlanAssociation. + * @function deleteBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} request DeleteBackupPlanAssociationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|triggerBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef TriggerBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls TriggerBackup. + * @function triggerBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} request TriggerBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.TriggerBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.triggerBackup = function triggerBackup(request, callback) { + return this.rpcCall(triggerBackup, $root.google.cloud.backupdr.v1.TriggerBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "TriggerBackup" }); + + /** + * Calls TriggerBackup. + * @function triggerBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} request TriggerBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return BackupDR; + })(); + + v1.NetworkConfig = (function() { + + /** + * Properties of a NetworkConfig. + * @memberof google.cloud.backupdr.v1 + * @interface INetworkConfig + * @property {string|null} [network] NetworkConfig network + * @property {google.cloud.backupdr.v1.NetworkConfig.PeeringMode|null} [peeringMode] NetworkConfig peeringMode + */ + + /** + * Constructs a new NetworkConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a NetworkConfig. + * @implements INetworkConfig + * @constructor + * @param {google.cloud.backupdr.v1.INetworkConfig=} [properties] Properties to set + */ + function NetworkConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkConfig network. + * @member {string} network + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.network = ""; + + /** + * NetworkConfig peeringMode. + * @member {google.cloud.backupdr.v1.NetworkConfig.PeeringMode} peeringMode + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.peeringMode = 0; + + /** + * Creates a new NetworkConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {google.cloud.backupdr.v1.INetworkConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig instance + */ + NetworkConfig.create = function create(properties) { + return new NetworkConfig(properties); + }; + + /** + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {google.cloud.backupdr.v1.INetworkConfig} message NetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); + if (message.peeringMode != null && Object.hasOwnProperty.call(message, "peeringMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.peeringMode); + return writer; + }; + + /** + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {google.cloud.backupdr.v1.INetworkConfig} message NetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkConfig.decode = function 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.backupdr.v1.NetworkConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.network = reader.string(); + break; + } + case 2: { + message.peeringMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.peeringMode != null && message.hasOwnProperty("peeringMode")) + switch (message.peeringMode) { + default: + return "peeringMode: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig + */ + NetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.NetworkConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.NetworkConfig(); + if (object.network != null) + message.network = String(object.network); + switch (object.peeringMode) { + default: + if (typeof object.peeringMode === "number") { + message.peeringMode = object.peeringMode; + break; + } + break; + case "PEERING_MODE_UNSPECIFIED": + case 0: + message.peeringMode = 0; + break; + case "PRIVATE_SERVICE_ACCESS": + case 1: + message.peeringMode = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {google.cloud.backupdr.v1.NetworkConfig} message NetworkConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.network = ""; + object.peeringMode = options.enums === String ? "PEERING_MODE_UNSPECIFIED" : 0; + } + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.peeringMode != null && message.hasOwnProperty("peeringMode")) + object.peeringMode = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode] === undefined ? message.peeringMode : $root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode] : message.peeringMode; + return object; + }; + + /** + * Converts this NetworkConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkConfig"; + }; + + /** + * PeeringMode enum. + * @name google.cloud.backupdr.v1.NetworkConfig.PeeringMode + * @enum {number} + * @property {number} PEERING_MODE_UNSPECIFIED=0 PEERING_MODE_UNSPECIFIED value + * @property {number} PRIVATE_SERVICE_ACCESS=1 PRIVATE_SERVICE_ACCESS value + */ + NetworkConfig.PeeringMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PEERING_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRIVATE_SERVICE_ACCESS"] = 1; + return values; + })(); + + return NetworkConfig; + })(); + + v1.ManagementURI = (function() { + + /** + * Properties of a ManagementURI. + * @memberof google.cloud.backupdr.v1 + * @interface IManagementURI + * @property {string|null} [webUi] ManagementURI webUi + * @property {string|null} [api] ManagementURI api + */ + + /** + * Constructs a new ManagementURI. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ManagementURI. + * @implements IManagementURI + * @constructor + * @param {google.cloud.backupdr.v1.IManagementURI=} [properties] Properties to set + */ + function ManagementURI(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ManagementURI webUi. + * @member {string} webUi + * @memberof google.cloud.backupdr.v1.ManagementURI + * @instance + */ + ManagementURI.prototype.webUi = ""; + + /** + * ManagementURI api. + * @member {string} api + * @memberof google.cloud.backupdr.v1.ManagementURI + * @instance + */ + ManagementURI.prototype.api = ""; + + /** + * Creates a new ManagementURI instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {google.cloud.backupdr.v1.IManagementURI=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI instance + */ + ManagementURI.create = function create(properties) { + return new ManagementURI(properties); + }; + + /** + * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {google.cloud.backupdr.v1.IManagementURI} message ManagementURI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagementURI.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.webUi != null && Object.hasOwnProperty.call(message, "webUi")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.webUi); + if (message.api != null && Object.hasOwnProperty.call(message, "api")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.api); + return writer; + }; + + /** + * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {google.cloud.backupdr.v1.IManagementURI} message ManagementURI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagementURI.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ManagementURI message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagementURI.decode = function 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.backupdr.v1.ManagementURI(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.webUi = reader.string(); + break; + } + case 2: { + message.api = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ManagementURI message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagementURI.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ManagementURI message. + * @function verify + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ManagementURI.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.webUi != null && message.hasOwnProperty("webUi")) + if (!$util.isString(message.webUi)) + return "webUi: string expected"; + if (message.api != null && message.hasOwnProperty("api")) + if (!$util.isString(message.api)) + return "api: string expected"; + return null; + }; + + /** + * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI + */ + ManagementURI.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ManagementURI) + return object; + var message = new $root.google.cloud.backupdr.v1.ManagementURI(); + if (object.webUi != null) + message.webUi = String(object.webUi); + if (object.api != null) + message.api = String(object.api); + return message; + }; + + /** + * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {google.cloud.backupdr.v1.ManagementURI} message ManagementURI + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ManagementURI.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.webUi = ""; + object.api = ""; + } + if (message.webUi != null && message.hasOwnProperty("webUi")) + object.webUi = message.webUi; + if (message.api != null && message.hasOwnProperty("api")) + object.api = message.api; + return object; + }; + + /** + * Converts this ManagementURI to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ManagementURI + * @instance + * @returns {Object.} JSON object + */ + ManagementURI.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ManagementURI + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ManagementURI.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ManagementURI"; + }; + + return ManagementURI; + })(); + + v1.WorkforceIdentityBasedManagementURI = (function() { + + /** + * Properties of a WorkforceIdentityBasedManagementURI. + * @memberof google.cloud.backupdr.v1 + * @interface IWorkforceIdentityBasedManagementURI + * @property {string|null} [firstPartyManagementUri] WorkforceIdentityBasedManagementURI firstPartyManagementUri + * @property {string|null} [thirdPartyManagementUri] WorkforceIdentityBasedManagementURI thirdPartyManagementUri + */ + + /** + * Constructs a new WorkforceIdentityBasedManagementURI. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a WorkforceIdentityBasedManagementURI. + * @implements IWorkforceIdentityBasedManagementURI + * @constructor + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI=} [properties] Properties to set + */ + function WorkforceIdentityBasedManagementURI(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkforceIdentityBasedManagementURI firstPartyManagementUri. + * @member {string} firstPartyManagementUri + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @instance + */ + WorkforceIdentityBasedManagementURI.prototype.firstPartyManagementUri = ""; + + /** + * WorkforceIdentityBasedManagementURI thirdPartyManagementUri. + * @member {string} thirdPartyManagementUri + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @instance + */ + WorkforceIdentityBasedManagementURI.prototype.thirdPartyManagementUri = ""; + + /** + * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI instance + */ + WorkforceIdentityBasedManagementURI.create = function create(properties) { + return new WorkforceIdentityBasedManagementURI(properties); + }; + + /** + * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkforceIdentityBasedManagementURI.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.firstPartyManagementUri != null && Object.hasOwnProperty.call(message, "firstPartyManagementUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.firstPartyManagementUri); + if (message.thirdPartyManagementUri != null && Object.hasOwnProperty.call(message, "thirdPartyManagementUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.thirdPartyManagementUri); + return writer; + }; + + /** + * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkforceIdentityBasedManagementURI.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkforceIdentityBasedManagementURI.decode = function 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.backupdr.v1.WorkforceIdentityBasedManagementURI(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.firstPartyManagementUri = reader.string(); + break; + } + case 2: { + message.thirdPartyManagementUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkforceIdentityBasedManagementURI.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkforceIdentityBasedManagementURI message. + * @function verify + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkforceIdentityBasedManagementURI.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.firstPartyManagementUri != null && message.hasOwnProperty("firstPartyManagementUri")) + if (!$util.isString(message.firstPartyManagementUri)) + return "firstPartyManagementUri: string expected"; + if (message.thirdPartyManagementUri != null && message.hasOwnProperty("thirdPartyManagementUri")) + if (!$util.isString(message.thirdPartyManagementUri)) + return "thirdPartyManagementUri: string expected"; + return null; + }; + + /** + * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI + */ + WorkforceIdentityBasedManagementURI.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI) + return object; + var message = new $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI(); + if (object.firstPartyManagementUri != null) + message.firstPartyManagementUri = String(object.firstPartyManagementUri); + if (object.thirdPartyManagementUri != null) + message.thirdPartyManagementUri = String(object.thirdPartyManagementUri); + return message; + }; + + /** + * Creates a plain object from a WorkforceIdentityBasedManagementURI message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkforceIdentityBasedManagementURI.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.firstPartyManagementUri = ""; + object.thirdPartyManagementUri = ""; + } + if (message.firstPartyManagementUri != null && message.hasOwnProperty("firstPartyManagementUri")) + object.firstPartyManagementUri = message.firstPartyManagementUri; + if (message.thirdPartyManagementUri != null && message.hasOwnProperty("thirdPartyManagementUri")) + object.thirdPartyManagementUri = message.thirdPartyManagementUri; + return object; + }; + + /** + * Converts this WorkforceIdentityBasedManagementURI to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @instance + * @returns {Object.} JSON object + */ + WorkforceIdentityBasedManagementURI.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkforceIdentityBasedManagementURI + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkforceIdentityBasedManagementURI.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI"; + }; + + return WorkforceIdentityBasedManagementURI; + })(); + + v1.WorkforceIdentityBasedOAuth2ClientID = (function() { + + /** + * Properties of a WorkforceIdentityBasedOAuth2ClientID. + * @memberof google.cloud.backupdr.v1 + * @interface IWorkforceIdentityBasedOAuth2ClientID + * @property {string|null} [firstPartyOauth2ClientId] WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId + * @property {string|null} [thirdPartyOauth2ClientId] WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId + */ + + /** + * Constructs a new WorkforceIdentityBasedOAuth2ClientID. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a WorkforceIdentityBasedOAuth2ClientID. + * @implements IWorkforceIdentityBasedOAuth2ClientID + * @constructor + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID=} [properties] Properties to set + */ + function WorkforceIdentityBasedOAuth2ClientID(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId. + * @member {string} firstPartyOauth2ClientId + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @instance + */ + WorkforceIdentityBasedOAuth2ClientID.prototype.firstPartyOauth2ClientId = ""; + + /** + * WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId. + * @member {string} thirdPartyOauth2ClientId + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @instance + */ + WorkforceIdentityBasedOAuth2ClientID.prototype.thirdPartyOauth2ClientId = ""; + + /** + * Creates a new WorkforceIdentityBasedOAuth2ClientID instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @static + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID instance + */ + WorkforceIdentityBasedOAuth2ClientID.create = function create(properties) { + return new WorkforceIdentityBasedOAuth2ClientID(properties); + }; + + /** + * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @static + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID} message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkforceIdentityBasedOAuth2ClientID.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.firstPartyOauth2ClientId != null && Object.hasOwnProperty.call(message, "firstPartyOauth2ClientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.firstPartyOauth2ClientId); + if (message.thirdPartyOauth2ClientId != null && Object.hasOwnProperty.call(message, "thirdPartyOauth2ClientId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.thirdPartyOauth2ClientId); + return writer; + }; + + /** + * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @static + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID} message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkforceIdentityBasedOAuth2ClientID.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkforceIdentityBasedOAuth2ClientID.decode = function 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.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.firstPartyOauth2ClientId = reader.string(); + break; + } + case 2: { + message.thirdPartyOauth2ClientId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkforceIdentityBasedOAuth2ClientID.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkforceIdentityBasedOAuth2ClientID message. + * @function verify + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkforceIdentityBasedOAuth2ClientID.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.firstPartyOauth2ClientId != null && message.hasOwnProperty("firstPartyOauth2ClientId")) + if (!$util.isString(message.firstPartyOauth2ClientId)) + return "firstPartyOauth2ClientId: string expected"; + if (message.thirdPartyOauth2ClientId != null && message.hasOwnProperty("thirdPartyOauth2ClientId")) + if (!$util.isString(message.thirdPartyOauth2ClientId)) + return "thirdPartyOauth2ClientId: string expected"; + return null; + }; + + /** + * Creates a WorkforceIdentityBasedOAuth2ClientID message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID + */ + WorkforceIdentityBasedOAuth2ClientID.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID) + return object; + var message = new $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID(); + if (object.firstPartyOauth2ClientId != null) + message.firstPartyOauth2ClientId = String(object.firstPartyOauth2ClientId); + if (object.thirdPartyOauth2ClientId != null) + message.thirdPartyOauth2ClientId = String(object.thirdPartyOauth2ClientId); + return message; + }; + + /** + * Creates a plain object from a WorkforceIdentityBasedOAuth2ClientID message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @static + * @param {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} message WorkforceIdentityBasedOAuth2ClientID + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkforceIdentityBasedOAuth2ClientID.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.firstPartyOauth2ClientId = ""; + object.thirdPartyOauth2ClientId = ""; + } + if (message.firstPartyOauth2ClientId != null && message.hasOwnProperty("firstPartyOauth2ClientId")) + object.firstPartyOauth2ClientId = message.firstPartyOauth2ClientId; + if (message.thirdPartyOauth2ClientId != null && message.hasOwnProperty("thirdPartyOauth2ClientId")) + object.thirdPartyOauth2ClientId = message.thirdPartyOauth2ClientId; + return object; + }; + + /** + * Converts this WorkforceIdentityBasedOAuth2ClientID to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @instance + * @returns {Object.} JSON object + */ + WorkforceIdentityBasedOAuth2ClientID.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkforceIdentityBasedOAuth2ClientID + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkforceIdentityBasedOAuth2ClientID.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID"; + }; + + return WorkforceIdentityBasedOAuth2ClientID; + })(); + + v1.ManagementServer = (function() { + + /** + * Properties of a ManagementServer. + * @memberof google.cloud.backupdr.v1 + * @interface IManagementServer + * @property {string|null} [name] ManagementServer name + * @property {string|null} [description] ManagementServer description + * @property {Object.|null} [labels] ManagementServer labels + * @property {google.protobuf.ITimestamp|null} [createTime] ManagementServer createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ManagementServer updateTime + * @property {google.cloud.backupdr.v1.ManagementServer.InstanceType|null} [type] ManagementServer type + * @property {google.cloud.backupdr.v1.IManagementURI|null} [managementUri] ManagementServer managementUri + * @property {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null} [workforceIdentityBasedManagementUri] ManagementServer workforceIdentityBasedManagementUri + * @property {google.cloud.backupdr.v1.ManagementServer.InstanceState|null} [state] ManagementServer state + * @property {Array.|null} [networks] ManagementServer networks + * @property {string|null} [etag] ManagementServer etag + * @property {string|null} [oauth2ClientId] ManagementServer oauth2ClientId + * @property {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null} [workforceIdentityBasedOauth2ClientId] ManagementServer workforceIdentityBasedOauth2ClientId + * @property {Array.|null} [baProxyUri] ManagementServer baProxyUri + * @property {google.protobuf.IBoolValue|null} [satisfiesPzs] ManagementServer satisfiesPzs + * @property {boolean|null} [satisfiesPzi] ManagementServer satisfiesPzi + */ + + /** + * Constructs a new ManagementServer. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ManagementServer. + * @implements IManagementServer + * @constructor + * @param {google.cloud.backupdr.v1.IManagementServer=} [properties] Properties to set + */ + function ManagementServer(properties) { + this.labels = {}; + this.networks = []; + this.baProxyUri = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ManagementServer name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.name = ""; + + /** + * ManagementServer description. + * @member {string} description + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.description = ""; + + /** + * ManagementServer labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.labels = $util.emptyObject; + + /** + * ManagementServer createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.createTime = null; + + /** + * ManagementServer updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.updateTime = null; + + /** + * ManagementServer type. + * @member {google.cloud.backupdr.v1.ManagementServer.InstanceType} type + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.type = 0; + + /** + * ManagementServer managementUri. + * @member {google.cloud.backupdr.v1.IManagementURI|null|undefined} managementUri + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.managementUri = null; + + /** + * ManagementServer workforceIdentityBasedManagementUri. + * @member {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null|undefined} workforceIdentityBasedManagementUri + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.workforceIdentityBasedManagementUri = null; + + /** + * ManagementServer state. + * @member {google.cloud.backupdr.v1.ManagementServer.InstanceState} state + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.state = 0; + + /** + * ManagementServer networks. + * @member {Array.} networks + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.networks = $util.emptyArray; + + /** + * ManagementServer etag. + * @member {string} etag + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.etag = ""; + + /** + * ManagementServer oauth2ClientId. + * @member {string} oauth2ClientId + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.oauth2ClientId = ""; + + /** + * ManagementServer workforceIdentityBasedOauth2ClientId. + * @member {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null|undefined} workforceIdentityBasedOauth2ClientId + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.workforceIdentityBasedOauth2ClientId = null; + + /** + * ManagementServer baProxyUri. + * @member {Array.} baProxyUri + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.baProxyUri = $util.emptyArray; + + /** + * ManagementServer satisfiesPzs. + * @member {google.protobuf.IBoolValue|null|undefined} satisfiesPzs + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.satisfiesPzs = null; + + /** + * ManagementServer satisfiesPzi. + * @member {boolean} satisfiesPzi + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.satisfiesPzi = false; + + /** + * Creates a new ManagementServer instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ManagementServer + * @static + * @param {google.cloud.backupdr.v1.IManagementServer=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer instance + */ + ManagementServer.create = function create(properties) { + return new ManagementServer(properties); + }; + + /** + * Encodes the specified ManagementServer message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ManagementServer + * @static + * @param {google.cloud.backupdr.v1.IManagementServer} message ManagementServer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagementServer.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.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.networks != null && message.networks.length) + for (var i = 0; i < message.networks.length; ++i) + $root.google.cloud.backupdr.v1.NetworkConfig.encode(message.networks[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.description); + if (message.managementUri != null && Object.hasOwnProperty.call(message, "managementUri")) + $root.google.cloud.backupdr.v1.ManagementURI.encode(message.managementUri, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.etag); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.type); + if (message.oauth2ClientId != null && Object.hasOwnProperty.call(message, "oauth2ClientId")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.oauth2ClientId); + if (message.workforceIdentityBasedManagementUri != null && Object.hasOwnProperty.call(message, "workforceIdentityBasedManagementUri")) + $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.encode(message.workforceIdentityBasedManagementUri, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.workforceIdentityBasedOauth2ClientId != null && Object.hasOwnProperty.call(message, "workforceIdentityBasedOauth2ClientId")) + $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.encode(message.workforceIdentityBasedOauth2ClientId, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.baProxyUri != null && message.baProxyUri.length) + for (var i = 0; i < message.baProxyUri.length; ++i) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.baProxyUri[i]); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + $root.google.protobuf.BoolValue.encode(message.satisfiesPzs, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.satisfiesPzi); + return writer; + }; + + /** + * Encodes the specified ManagementServer message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ManagementServer + * @static + * @param {google.cloud.backupdr.v1.IManagementServer} message ManagementServer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagementServer.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ManagementServer message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ManagementServer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagementServer.decode = function 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.backupdr.v1.ManagementServer(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 9: { + message.description = reader.string(); + 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 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 14: { + message.type = reader.int32(); + break; + } + case 11: { + message.managementUri = $root.google.cloud.backupdr.v1.ManagementURI.decode(reader, reader.uint32()); + break; + } + case 16: { + message.workforceIdentityBasedManagementUri = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.decode(reader, reader.uint32()); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 8: { + if (!(message.networks && message.networks.length)) + message.networks = []; + message.networks.push($root.google.cloud.backupdr.v1.NetworkConfig.decode(reader, reader.uint32())); + break; + } + case 13: { + message.etag = reader.string(); + break; + } + case 15: { + message.oauth2ClientId = reader.string(); + break; + } + case 17: { + message.workforceIdentityBasedOauth2ClientId = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.decode(reader, reader.uint32()); + break; + } + case 18: { + if (!(message.baProxyUri && message.baProxyUri.length)) + message.baProxyUri = []; + message.baProxyUri.push(reader.string()); + break; + } + case 19: { + message.satisfiesPzs = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 20: { + message.satisfiesPzi = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ManagementServer message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ManagementServer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagementServer.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ManagementServer message. + * @function verify + * @memberof google.cloud.backupdr.v1.ManagementServer + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ManagementServer.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + 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.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + if (message.managementUri != null && message.hasOwnProperty("managementUri")) { + var error = $root.google.cloud.backupdr.v1.ManagementURI.verify(message.managementUri); + if (error) + return "managementUri." + error; + } + if (message.workforceIdentityBasedManagementUri != null && message.hasOwnProperty("workforceIdentityBasedManagementUri")) { + var error = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify(message.workforceIdentityBasedManagementUri); + if (error) + return "workforceIdentityBasedManagementUri." + 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: + break; + } + if (message.networks != null && message.hasOwnProperty("networks")) { + if (!Array.isArray(message.networks)) + return "networks: array expected"; + for (var i = 0; i < message.networks.length; ++i) { + var error = $root.google.cloud.backupdr.v1.NetworkConfig.verify(message.networks[i]); + if (error) + return "networks." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.oauth2ClientId != null && message.hasOwnProperty("oauth2ClientId")) + if (!$util.isString(message.oauth2ClientId)) + return "oauth2ClientId: string expected"; + if (message.workforceIdentityBasedOauth2ClientId != null && message.hasOwnProperty("workforceIdentityBasedOauth2ClientId")) { + var error = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify(message.workforceIdentityBasedOauth2ClientId); + if (error) + return "workforceIdentityBasedOauth2ClientId." + error; + } + if (message.baProxyUri != null && message.hasOwnProperty("baProxyUri")) { + if (!Array.isArray(message.baProxyUri)) + return "baProxyUri: array expected"; + for (var i = 0; i < message.baProxyUri.length; ++i) + if (!$util.isString(message.baProxyUri[i])) + return "baProxyUri: string[] expected"; + } + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { + var error = $root.google.protobuf.BoolValue.verify(message.satisfiesPzs); + if (error) + return "satisfiesPzs." + error; + } + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + if (typeof message.satisfiesPzi !== "boolean") + return "satisfiesPzi: boolean expected"; + return null; + }; + + /** + * Creates a ManagementServer message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ManagementServer + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer + */ + ManagementServer.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ManagementServer) + return object; + var message = new $root.google.cloud.backupdr.v1.ManagementServer(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.ManagementServer.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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.ManagementServer.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.backupdr.v1.ManagementServer.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "INSTANCE_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "BACKUP_RESTORE": + case 1: + message.type = 1; + break; + } + if (object.managementUri != null) { + if (typeof object.managementUri !== "object") + throw TypeError(".google.cloud.backupdr.v1.ManagementServer.managementUri: object expected"); + message.managementUri = $root.google.cloud.backupdr.v1.ManagementURI.fromObject(object.managementUri); + } + if (object.workforceIdentityBasedManagementUri != null) { + if (typeof object.workforceIdentityBasedManagementUri !== "object") + throw TypeError(".google.cloud.backupdr.v1.ManagementServer.workforceIdentityBasedManagementUri: object expected"); + message.workforceIdentityBasedManagementUri = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.fromObject(object.workforceIdentityBasedManagementUri); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "INSTANCE_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "READY": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "DELETING": + case 4: + message.state = 4; + break; + case "REPAIRING": + case 5: + message.state = 5; + break; + case "MAINTENANCE": + case 6: + message.state = 6; + break; + case "ERROR": + case 7: + message.state = 7; + break; + } + if (object.networks) { + if (!Array.isArray(object.networks)) + throw TypeError(".google.cloud.backupdr.v1.ManagementServer.networks: array expected"); + message.networks = []; + for (var i = 0; i < object.networks.length; ++i) { + if (typeof object.networks[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ManagementServer.networks: object expected"); + message.networks[i] = $root.google.cloud.backupdr.v1.NetworkConfig.fromObject(object.networks[i]); + } + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.oauth2ClientId != null) + message.oauth2ClientId = String(object.oauth2ClientId); + if (object.workforceIdentityBasedOauth2ClientId != null) { + if (typeof object.workforceIdentityBasedOauth2ClientId !== "object") + throw TypeError(".google.cloud.backupdr.v1.ManagementServer.workforceIdentityBasedOauth2ClientId: object expected"); + message.workforceIdentityBasedOauth2ClientId = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.fromObject(object.workforceIdentityBasedOauth2ClientId); + } + if (object.baProxyUri) { + if (!Array.isArray(object.baProxyUri)) + throw TypeError(".google.cloud.backupdr.v1.ManagementServer.baProxyUri: array expected"); + message.baProxyUri = []; + for (var i = 0; i < object.baProxyUri.length; ++i) + message.baProxyUri[i] = String(object.baProxyUri[i]); + } + if (object.satisfiesPzs != null) { + if (typeof object.satisfiesPzs !== "object") + throw TypeError(".google.cloud.backupdr.v1.ManagementServer.satisfiesPzs: object expected"); + message.satisfiesPzs = $root.google.protobuf.BoolValue.fromObject(object.satisfiesPzs); + } + if (object.satisfiesPzi != null) + message.satisfiesPzi = Boolean(object.satisfiesPzi); + return message; + }; + + /** + * Creates a plain object from a ManagementServer message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ManagementServer + * @static + * @param {google.cloud.backupdr.v1.ManagementServer} message ManagementServer + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ManagementServer.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.networks = []; + object.baProxyUri = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "INSTANCE_STATE_UNSPECIFIED" : 0; + object.description = ""; + object.managementUri = null; + object.etag = ""; + object.type = options.enums === String ? "INSTANCE_TYPE_UNSPECIFIED" : 0; + object.oauth2ClientId = ""; + object.workforceIdentityBasedManagementUri = null; + object.workforceIdentityBasedOauth2ClientId = null; + object.satisfiesPzs = null; + object.satisfiesPzi = false; + } + 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.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.ManagementServer.InstanceState[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.ManagementServer.InstanceState[message.state] : message.state; + if (message.networks && message.networks.length) { + object.networks = []; + for (var j = 0; j < message.networks.length; ++j) + object.networks[j] = $root.google.cloud.backupdr.v1.NetworkConfig.toObject(message.networks[j], options); + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.managementUri != null && message.hasOwnProperty("managementUri")) + object.managementUri = $root.google.cloud.backupdr.v1.ManagementURI.toObject(message.managementUri, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.backupdr.v1.ManagementServer.InstanceType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.ManagementServer.InstanceType[message.type] : message.type; + if (message.oauth2ClientId != null && message.hasOwnProperty("oauth2ClientId")) + object.oauth2ClientId = message.oauth2ClientId; + if (message.workforceIdentityBasedManagementUri != null && message.hasOwnProperty("workforceIdentityBasedManagementUri")) + object.workforceIdentityBasedManagementUri = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.toObject(message.workforceIdentityBasedManagementUri, options); + if (message.workforceIdentityBasedOauth2ClientId != null && message.hasOwnProperty("workforceIdentityBasedOauth2ClientId")) + object.workforceIdentityBasedOauth2ClientId = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.toObject(message.workforceIdentityBasedOauth2ClientId, options); + if (message.baProxyUri && message.baProxyUri.length) { + object.baProxyUri = []; + for (var j = 0; j < message.baProxyUri.length; ++j) + object.baProxyUri[j] = message.baProxyUri[j]; + } + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + object.satisfiesPzs = $root.google.protobuf.BoolValue.toObject(message.satisfiesPzs, options); + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + object.satisfiesPzi = message.satisfiesPzi; + return object; + }; + + /** + * Converts this ManagementServer to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + * @returns {Object.} JSON object + */ + ManagementServer.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ManagementServer + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ManagementServer + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ManagementServer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ManagementServer"; + }; + + /** + * InstanceType enum. + * @name google.cloud.backupdr.v1.ManagementServer.InstanceType + * @enum {number} + * @property {number} INSTANCE_TYPE_UNSPECIFIED=0 INSTANCE_TYPE_UNSPECIFIED value + * @property {number} BACKUP_RESTORE=1 BACKUP_RESTORE value + */ + ManagementServer.InstanceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INSTANCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKUP_RESTORE"] = 1; + return values; + })(); + + /** + * InstanceState enum. + * @name google.cloud.backupdr.v1.ManagementServer.InstanceState + * @enum {number} + * @property {number} INSTANCE_STATE_UNSPECIFIED=0 INSTANCE_STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value + * @property {number} UPDATING=3 UPDATING value + * @property {number} DELETING=4 DELETING value + * @property {number} REPAIRING=5 REPAIRING value + * @property {number} MAINTENANCE=6 MAINTENANCE value + * @property {number} ERROR=7 ERROR value + */ + ManagementServer.InstanceState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INSTANCE_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "DELETING"] = 4; + values[valuesById[5] = "REPAIRING"] = 5; + values[valuesById[6] = "MAINTENANCE"] = 6; + values[valuesById[7] = "ERROR"] = 7; + return values; + })(); + + return ManagementServer; + })(); + + v1.ListManagementServersRequest = (function() { + + /** + * Properties of a ListManagementServersRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListManagementServersRequest + * @property {string|null} [parent] ListManagementServersRequest parent + * @property {number|null} [pageSize] ListManagementServersRequest pageSize + * @property {string|null} [pageToken] ListManagementServersRequest pageToken + * @property {string|null} [filter] ListManagementServersRequest filter + * @property {string|null} [orderBy] ListManagementServersRequest orderBy + */ + + /** + * Constructs a new ListManagementServersRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListManagementServersRequest. + * @implements IListManagementServersRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListManagementServersRequest=} [properties] Properties to set + */ + function ListManagementServersRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListManagementServersRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @instance + */ + ListManagementServersRequest.prototype.parent = ""; + + /** + * ListManagementServersRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @instance + */ + ListManagementServersRequest.prototype.pageSize = 0; + + /** + * ListManagementServersRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @instance + */ + ListManagementServersRequest.prototype.pageToken = ""; + + /** + * ListManagementServersRequest filter. + * @member {string|null|undefined} filter + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @instance + */ + ListManagementServersRequest.prototype.filter = null; + + /** + * ListManagementServersRequest orderBy. + * @member {string|null|undefined} orderBy + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @instance + */ + ListManagementServersRequest.prototype.orderBy = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ListManagementServersRequest _filter. + * @member {"filter"|undefined} _filter + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @instance + */ + Object.defineProperty(ListManagementServersRequest.prototype, "_filter", { + get: $util.oneOfGetter($oneOfFields = ["filter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ListManagementServersRequest _orderBy. + * @member {"orderBy"|undefined} _orderBy + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @instance + */ + Object.defineProperty(ListManagementServersRequest.prototype, "_orderBy", { + get: $util.oneOfGetter($oneOfFields = ["orderBy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListManagementServersRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @static + * @param {google.cloud.backupdr.v1.IListManagementServersRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest instance + */ + ListManagementServersRequest.create = function create(properties) { + return new ListManagementServersRequest(properties); + }; + + /** + * Encodes the specified ListManagementServersRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @static + * @param {google.cloud.backupdr.v1.IListManagementServersRequest} message ListManagementServersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListManagementServersRequest.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 ListManagementServersRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @static + * @param {google.cloud.backupdr.v1.IListManagementServersRequest} message ListManagementServersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListManagementServersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListManagementServersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListManagementServersRequest.decode = function 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.backupdr.v1.ListManagementServersRequest(); + 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 ListManagementServersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListManagementServersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListManagementServersRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListManagementServersRequest.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.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")) { + properties._filter = 1; + if (!$util.isString(message.filter)) + return "filter: string expected"; + } + if (message.orderBy != null && message.hasOwnProperty("orderBy")) { + properties._orderBy = 1; + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + } + return null; + }; + + /** + * Creates a ListManagementServersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest + */ + ListManagementServersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListManagementServersRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListManagementServersRequest(); + 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 ListManagementServersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @static + * @param {google.cloud.backupdr.v1.ListManagementServersRequest} message ListManagementServersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListManagementServersRequest.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; + if (message.filter != null && message.hasOwnProperty("filter")) { + object.filter = message.filter; + if (options.oneofs) + object._filter = "filter"; + } + if (message.orderBy != null && message.hasOwnProperty("orderBy")) { + object.orderBy = message.orderBy; + if (options.oneofs) + object._orderBy = "orderBy"; + } + return object; + }; + + /** + * Converts this ListManagementServersRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @instance + * @returns {Object.} JSON object + */ + ListManagementServersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListManagementServersRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListManagementServersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListManagementServersRequest"; + }; + + return ListManagementServersRequest; + })(); + + v1.ListManagementServersResponse = (function() { + + /** + * Properties of a ListManagementServersResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListManagementServersResponse + * @property {Array.|null} [managementServers] ListManagementServersResponse managementServers + * @property {string|null} [nextPageToken] ListManagementServersResponse nextPageToken + * @property {Array.|null} [unreachable] ListManagementServersResponse unreachable + */ + + /** + * Constructs a new ListManagementServersResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListManagementServersResponse. + * @implements IListManagementServersResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListManagementServersResponse=} [properties] Properties to set + */ + function ListManagementServersResponse(properties) { + this.managementServers = []; + 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]]; + } + + /** + * ListManagementServersResponse managementServers. + * @member {Array.} managementServers + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @instance + */ + ListManagementServersResponse.prototype.managementServers = $util.emptyArray; + + /** + * ListManagementServersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @instance + */ + ListManagementServersResponse.prototype.nextPageToken = ""; + + /** + * ListManagementServersResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @instance + */ + ListManagementServersResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListManagementServersResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @static + * @param {google.cloud.backupdr.v1.IListManagementServersResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse instance + */ + ListManagementServersResponse.create = function create(properties) { + return new ListManagementServersResponse(properties); + }; + + /** + * Encodes the specified ListManagementServersResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @static + * @param {google.cloud.backupdr.v1.IListManagementServersResponse} message ListManagementServersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListManagementServersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.managementServers != null && message.managementServers.length) + for (var i = 0; i < message.managementServers.length; ++i) + $root.google.cloud.backupdr.v1.ManagementServer.encode(message.managementServers[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 ListManagementServersResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @static + * @param {google.cloud.backupdr.v1.IListManagementServersResponse} message ListManagementServersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListManagementServersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListManagementServersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListManagementServersResponse.decode = function 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.backupdr.v1.ListManagementServersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.managementServers && message.managementServers.length)) + message.managementServers = []; + message.managementServers.push($root.google.cloud.backupdr.v1.ManagementServer.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 ListManagementServersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListManagementServersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListManagementServersResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListManagementServersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.managementServers != null && message.hasOwnProperty("managementServers")) { + if (!Array.isArray(message.managementServers)) + return "managementServers: array expected"; + for (var i = 0; i < message.managementServers.length; ++i) { + var error = $root.google.cloud.backupdr.v1.ManagementServer.verify(message.managementServers[i]); + if (error) + return "managementServers." + 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 ListManagementServersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse + */ + ListManagementServersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListManagementServersResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListManagementServersResponse(); + if (object.managementServers) { + if (!Array.isArray(object.managementServers)) + throw TypeError(".google.cloud.backupdr.v1.ListManagementServersResponse.managementServers: array expected"); + message.managementServers = []; + for (var i = 0; i < object.managementServers.length; ++i) { + if (typeof object.managementServers[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListManagementServersResponse.managementServers: object expected"); + message.managementServers[i] = $root.google.cloud.backupdr.v1.ManagementServer.fromObject(object.managementServers[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListManagementServersResponse.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 ListManagementServersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @static + * @param {google.cloud.backupdr.v1.ListManagementServersResponse} message ListManagementServersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListManagementServersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.managementServers = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.managementServers && message.managementServers.length) { + object.managementServers = []; + for (var j = 0; j < message.managementServers.length; ++j) + object.managementServers[j] = $root.google.cloud.backupdr.v1.ManagementServer.toObject(message.managementServers[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 ListManagementServersResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @instance + * @returns {Object.} JSON object + */ + ListManagementServersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListManagementServersResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListManagementServersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListManagementServersResponse"; + }; + + return ListManagementServersResponse; + })(); + + v1.GetManagementServerRequest = (function() { + + /** + * Properties of a GetManagementServerRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetManagementServerRequest + * @property {string|null} [name] GetManagementServerRequest name + */ + + /** + * Constructs a new GetManagementServerRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetManagementServerRequest. + * @implements IGetManagementServerRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetManagementServerRequest=} [properties] Properties to set + */ + function GetManagementServerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetManagementServerRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @instance + */ + GetManagementServerRequest.prototype.name = ""; + + /** + * Creates a new GetManagementServerRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.IGetManagementServerRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest instance + */ + GetManagementServerRequest.create = function create(properties) { + return new GetManagementServerRequest(properties); + }; + + /** + * Encodes the specified GetManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} message GetManagementServerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetManagementServerRequest.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 GetManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} message GetManagementServerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetManagementServerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetManagementServerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetManagementServerRequest.decode = function 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.backupdr.v1.GetManagementServerRequest(); + 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 GetManagementServerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetManagementServerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetManagementServerRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetManagementServerRequest.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 GetManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest + */ + GetManagementServerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetManagementServerRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetManagementServerRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetManagementServerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.GetManagementServerRequest} message GetManagementServerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetManagementServerRequest.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 GetManagementServerRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @instance + * @returns {Object.} JSON object + */ + GetManagementServerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetManagementServerRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetManagementServerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetManagementServerRequest"; + }; + + return GetManagementServerRequest; + })(); + + v1.CreateManagementServerRequest = (function() { + + /** + * Properties of a CreateManagementServerRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ICreateManagementServerRequest + * @property {string|null} [parent] CreateManagementServerRequest parent + * @property {string|null} [managementServerId] CreateManagementServerRequest managementServerId + * @property {google.cloud.backupdr.v1.IManagementServer|null} [managementServer] CreateManagementServerRequest managementServer + * @property {string|null} [requestId] CreateManagementServerRequest requestId + */ + + /** + * Constructs a new CreateManagementServerRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CreateManagementServerRequest. + * @implements ICreateManagementServerRequest + * @constructor + * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest=} [properties] Properties to set + */ + function CreateManagementServerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateManagementServerRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @instance + */ + CreateManagementServerRequest.prototype.parent = ""; + + /** + * CreateManagementServerRequest managementServerId. + * @member {string} managementServerId + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @instance + */ + CreateManagementServerRequest.prototype.managementServerId = ""; + + /** + * CreateManagementServerRequest managementServer. + * @member {google.cloud.backupdr.v1.IManagementServer|null|undefined} managementServer + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @instance + */ + CreateManagementServerRequest.prototype.managementServer = null; + + /** + * CreateManagementServerRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @instance + */ + CreateManagementServerRequest.prototype.requestId = ""; + + /** + * Creates a new CreateManagementServerRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest instance + */ + CreateManagementServerRequest.create = function create(properties) { + return new CreateManagementServerRequest(properties); + }; + + /** + * Encodes the specified CreateManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} message CreateManagementServerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateManagementServerRequest.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.managementServerId != null && Object.hasOwnProperty.call(message, "managementServerId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.managementServerId); + if (message.managementServer != null && Object.hasOwnProperty.call(message, "managementServer")) + $root.google.cloud.backupdr.v1.ManagementServer.encode(message.managementServer, 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 CreateManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} message CreateManagementServerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateManagementServerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateManagementServerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateManagementServerRequest.decode = function 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.backupdr.v1.CreateManagementServerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.managementServerId = reader.string(); + break; + } + case 3: { + message.managementServer = $root.google.cloud.backupdr.v1.ManagementServer.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateManagementServerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateManagementServerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateManagementServerRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateManagementServerRequest.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.managementServerId != null && message.hasOwnProperty("managementServerId")) + if (!$util.isString(message.managementServerId)) + return "managementServerId: string expected"; + if (message.managementServer != null && message.hasOwnProperty("managementServer")) { + var error = $root.google.cloud.backupdr.v1.ManagementServer.verify(message.managementServer); + if (error) + return "managementServer." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest + */ + CreateManagementServerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CreateManagementServerRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.CreateManagementServerRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.managementServerId != null) + message.managementServerId = String(object.managementServerId); + if (object.managementServer != null) { + if (typeof object.managementServer !== "object") + throw TypeError(".google.cloud.backupdr.v1.CreateManagementServerRequest.managementServer: object expected"); + message.managementServer = $root.google.cloud.backupdr.v1.ManagementServer.fromObject(object.managementServer); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateManagementServerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.CreateManagementServerRequest} message CreateManagementServerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateManagementServerRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.managementServerId = ""; + object.managementServer = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.managementServerId != null && message.hasOwnProperty("managementServerId")) + object.managementServerId = message.managementServerId; + if (message.managementServer != null && message.hasOwnProperty("managementServer")) + object.managementServer = $root.google.cloud.backupdr.v1.ManagementServer.toObject(message.managementServer, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateManagementServerRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @instance + * @returns {Object.} JSON object + */ + CreateManagementServerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateManagementServerRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateManagementServerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateManagementServerRequest"; + }; + + return CreateManagementServerRequest; + })(); + + v1.DeleteManagementServerRequest = (function() { + + /** + * Properties of a DeleteManagementServerRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IDeleteManagementServerRequest + * @property {string|null} [name] DeleteManagementServerRequest name + * @property {string|null} [requestId] DeleteManagementServerRequest requestId + */ + + /** + * Constructs a new DeleteManagementServerRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DeleteManagementServerRequest. + * @implements IDeleteManagementServerRequest + * @constructor + * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest=} [properties] Properties to set + */ + function DeleteManagementServerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteManagementServerRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @instance + */ + DeleteManagementServerRequest.prototype.name = ""; + + /** + * DeleteManagementServerRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @instance + */ + DeleteManagementServerRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteManagementServerRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest instance + */ + DeleteManagementServerRequest.create = function create(properties) { + return new DeleteManagementServerRequest(properties); + }; + + /** + * Encodes the specified DeleteManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} message DeleteManagementServerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteManagementServerRequest.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 DeleteManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} message DeleteManagementServerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteManagementServerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteManagementServerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteManagementServerRequest.decode = function 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.backupdr.v1.DeleteManagementServerRequest(); + 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 DeleteManagementServerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteManagementServerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteManagementServerRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteManagementServerRequest.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 DeleteManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest + */ + DeleteManagementServerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteManagementServerRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.DeleteManagementServerRequest(); + 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 DeleteManagementServerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.DeleteManagementServerRequest} message DeleteManagementServerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteManagementServerRequest.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 DeleteManagementServerRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteManagementServerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteManagementServerRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteManagementServerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteManagementServerRequest"; + }; + + return DeleteManagementServerRequest; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.backupdr.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 {Object.|null} [additionalInfo] OperationMetadata additionalInfo + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.backupdr.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + this.additionalInfo = {}; + if (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.backupdr.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * OperationMetadata additionalInfo. + * @member {Object.} additionalInfo + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.additionalInfo = $util.emptyObject; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @static + * @param {google.cloud.backupdr.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.backupdr.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @static + * @param {google.cloud.backupdr.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.additionalInfo != null && Object.hasOwnProperty.call(message, "additionalInfo")) + for (var keys = Object.keys(message.additionalInfo), i = 0; i < keys.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.additionalInfo[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @static + * @param {google.cloud.backupdr.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.backupdr.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.backupdr.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.backupdr.v1.OperationMetadata(), key, value; + 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: { + if (message.additionalInfo === $util.emptyObject) + message.additionalInfo = {}; + 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.additionalInfo[key] = value; + 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.backupdr.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.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.backupdr.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.additionalInfo != null && message.hasOwnProperty("additionalInfo")) { + if (!$util.isObject(message.additionalInfo)) + return "additionalInfo: object expected"; + var key = Object.keys(message.additionalInfo); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.additionalInfo[key[i]])) + return "additionalInfo: string{k:string} expected"; + } + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.backupdr.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.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.backupdr.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.additionalInfo) { + if (typeof object.additionalInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.OperationMetadata.additionalInfo: object expected"); + message.additionalInfo = {}; + for (var keys = Object.keys(object.additionalInfo), i = 0; i < keys.length; ++i) + message.additionalInfo[keys[i]] = String(object.additionalInfo[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @static + * @param {google.cloud.backupdr.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.objects || options.defaults) + object.additionalInfo = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + } + 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; + var keys2; + if (message.additionalInfo && (keys2 = Object.keys(message.additionalInfo)).length) { + object.additionalInfo = {}; + for (var j = 0; j < keys2.length; ++j) + object.additionalInfo[keys2[j]] = message.additionalInfo[keys2[j]]; + } + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.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.backupdr.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.backupdr.v1.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + v1.BackupPlan = (function() { + + /** + * Properties of a BackupPlan. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupPlan + * @property {string|null} [name] BackupPlan name + * @property {string|null} [description] BackupPlan description + * @property {Object.|null} [labels] BackupPlan labels + * @property {google.protobuf.ITimestamp|null} [createTime] BackupPlan createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] BackupPlan updateTime + * @property {Array.|null} [backupRules] BackupPlan backupRules + * @property {google.cloud.backupdr.v1.BackupPlan.State|null} [state] BackupPlan state + * @property {string|null} [resourceType] BackupPlan resourceType + * @property {string|null} [etag] BackupPlan etag + * @property {string|null} [backupVault] BackupPlan backupVault + * @property {string|null} [backupVaultServiceAccount] BackupPlan backupVaultServiceAccount + */ + + /** + * Constructs a new BackupPlan. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupPlan. + * @implements IBackupPlan + * @constructor + * @param {google.cloud.backupdr.v1.IBackupPlan=} [properties] Properties to set + */ + function BackupPlan(properties) { + this.labels = {}; + this.backupRules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupPlan name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.name = ""; + + /** + * BackupPlan description. + * @member {string} description + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.description = ""; + + /** + * BackupPlan labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.labels = $util.emptyObject; + + /** + * BackupPlan createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.createTime = null; + + /** + * BackupPlan updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.updateTime = null; + + /** + * BackupPlan backupRules. + * @member {Array.} backupRules + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.backupRules = $util.emptyArray; + + /** + * BackupPlan state. + * @member {google.cloud.backupdr.v1.BackupPlan.State} state + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.state = 0; + + /** + * BackupPlan resourceType. + * @member {string} resourceType + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.resourceType = ""; + + /** + * BackupPlan etag. + * @member {string} etag + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.etag = ""; + + /** + * BackupPlan backupVault. + * @member {string} backupVault + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.backupVault = ""; + + /** + * BackupPlan backupVaultServiceAccount. + * @member {string} backupVaultServiceAccount + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.backupVaultServiceAccount = ""; + + /** + * Creates a new BackupPlan instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {google.cloud.backupdr.v1.IBackupPlan=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan instance + */ + BackupPlan.create = function create(properties) { + return new BackupPlan(properties); + }; + + /** + * Encodes the specified BackupPlan message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {google.cloud.backupdr.v1.IBackupPlan} message BackupPlan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupPlan.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + 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 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.backupRules != null && message.backupRules.length) + for (var i = 0; i < message.backupRules.length; ++i) + $root.google.cloud.backupdr.v1.BackupRule.encode(message.backupRules[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceType); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.etag); + if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.backupVault); + if (message.backupVaultServiceAccount != null && Object.hasOwnProperty.call(message, "backupVaultServiceAccount")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.backupVaultServiceAccount); + return writer; + }; + + /** + * Encodes the specified BackupPlan message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {google.cloud.backupdr.v1.IBackupPlan} message BackupPlan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupPlan.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupPlan message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupPlan.decode = function 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.backupdr.v1.BackupPlan(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + 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 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.backupRules && message.backupRules.length)) + message.backupRules = []; + message.backupRules.push($root.google.cloud.backupdr.v1.BackupRule.decode(reader, reader.uint32())); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 8: { + message.resourceType = reader.string(); + break; + } + case 9: { + message.etag = reader.string(); + break; + } + case 10: { + message.backupVault = reader.string(); + break; + } + case 11: { + message.backupVaultServiceAccount = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupPlan message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupPlan.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupPlan message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupPlan.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + 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.backupRules != null && message.hasOwnProperty("backupRules")) { + if (!Array.isArray(message.backupRules)) + return "backupRules: array expected"; + for (var i = 0; i < message.backupRules.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupRule.verify(message.backupRules[i]); + if (error) + return "backupRules." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) + if (!$util.isString(message.backupVault)) + return "backupVault: string expected"; + if (message.backupVaultServiceAccount != null && message.hasOwnProperty("backupVaultServiceAccount")) + if (!$util.isString(message.backupVaultServiceAccount)) + return "backupVaultServiceAccount: string expected"; + return null; + }; + + /** + * Creates a BackupPlan message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan + */ + BackupPlan.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupPlan) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupPlan(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlan.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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlan.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.backupdr.v1.BackupPlan.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.backupRules) { + if (!Array.isArray(object.backupRules)) + throw TypeError(".google.cloud.backupdr.v1.BackupPlan.backupRules: array expected"); + message.backupRules = []; + for (var i = 0; i < object.backupRules.length; ++i) { + if (typeof object.backupRules[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlan.backupRules: object expected"); + message.backupRules[i] = $root.google.cloud.backupdr.v1.BackupRule.fromObject(object.backupRules[i]); + } + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "INACTIVE": + case 4: + message.state = 4; + break; + } + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.etag != null) + message.etag = String(object.etag); + if (object.backupVault != null) + message.backupVault = String(object.backupVault); + if (object.backupVaultServiceAccount != null) + message.backupVaultServiceAccount = String(object.backupVaultServiceAccount); + return message; + }; + + /** + * Creates a plain object from a BackupPlan message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {google.cloud.backupdr.v1.BackupPlan} message BackupPlan + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupPlan.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.backupRules = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.resourceType = ""; + object.etag = ""; + object.backupVault = ""; + object.backupVaultServiceAccount = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + 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.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.backupRules && message.backupRules.length) { + object.backupRules = []; + for (var j = 0; j < message.backupRules.length; ++j) + object.backupRules[j] = $root.google.cloud.backupdr.v1.BackupRule.toObject(message.backupRules[j], options); + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupPlan.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupPlan.State[message.state] : message.state; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) + object.backupVault = message.backupVault; + if (message.backupVaultServiceAccount != null && message.hasOwnProperty("backupVaultServiceAccount")) + object.backupVaultServiceAccount = message.backupVaultServiceAccount; + return object; + }; + + /** + * Converts this BackupPlan to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + * @returns {Object.} JSON object + */ + BackupPlan.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupPlan + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupPlan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupPlan"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.BackupPlan.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} INACTIVE=4 INACTIVE value + */ + BackupPlan.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "INACTIVE"] = 4; + return values; + })(); + + return BackupPlan; + })(); + + v1.BackupRule = (function() { + + /** + * Properties of a BackupRule. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupRule + * @property {string|null} [ruleId] BackupRule ruleId + * @property {number|null} [backupRetentionDays] BackupRule backupRetentionDays + * @property {google.cloud.backupdr.v1.IStandardSchedule|null} [standardSchedule] BackupRule standardSchedule + */ + + /** + * Constructs a new BackupRule. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupRule. + * @implements IBackupRule + * @constructor + * @param {google.cloud.backupdr.v1.IBackupRule=} [properties] Properties to set + */ + function BackupRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupRule ruleId. + * @member {string} ruleId + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + */ + BackupRule.prototype.ruleId = ""; + + /** + * BackupRule backupRetentionDays. + * @member {number} backupRetentionDays + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + */ + BackupRule.prototype.backupRetentionDays = 0; + + /** + * BackupRule standardSchedule. + * @member {google.cloud.backupdr.v1.IStandardSchedule|null|undefined} standardSchedule + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + */ + BackupRule.prototype.standardSchedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupRule backupScheduleOneof. + * @member {"standardSchedule"|undefined} backupScheduleOneof + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + */ + Object.defineProperty(BackupRule.prototype, "backupScheduleOneof", { + get: $util.oneOfGetter($oneOfFields = ["standardSchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupRule instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {google.cloud.backupdr.v1.IBackupRule=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule instance + */ + BackupRule.create = function create(properties) { + return new BackupRule(properties); + }; + + /** + * Encodes the specified BackupRule message. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {google.cloud.backupdr.v1.IBackupRule} message BackupRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ruleId); + if (message.backupRetentionDays != null && Object.hasOwnProperty.call(message, "backupRetentionDays")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.backupRetentionDays); + if (message.standardSchedule != null && Object.hasOwnProperty.call(message, "standardSchedule")) + $root.google.cloud.backupdr.v1.StandardSchedule.encode(message.standardSchedule, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BackupRule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {google.cloud.backupdr.v1.IBackupRule} message BackupRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupRule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupRule.decode = function 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.backupdr.v1.BackupRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ruleId = reader.string(); + break; + } + case 4: { + message.backupRetentionDays = reader.int32(); + break; + } + case 5: { + message.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupRule message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + if (!$util.isString(message.ruleId)) + return "ruleId: string expected"; + if (message.backupRetentionDays != null && message.hasOwnProperty("backupRetentionDays")) + if (!$util.isInteger(message.backupRetentionDays)) + return "backupRetentionDays: integer expected"; + if (message.standardSchedule != null && message.hasOwnProperty("standardSchedule")) { + properties.backupScheduleOneof = 1; + { + var error = $root.google.cloud.backupdr.v1.StandardSchedule.verify(message.standardSchedule); + if (error) + return "standardSchedule." + error; + } + } + return null; + }; + + /** + * Creates a BackupRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule + */ + BackupRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupRule) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupRule(); + if (object.ruleId != null) + message.ruleId = String(object.ruleId); + if (object.backupRetentionDays != null) + message.backupRetentionDays = object.backupRetentionDays | 0; + if (object.standardSchedule != null) { + if (typeof object.standardSchedule !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupRule.standardSchedule: object expected"); + message.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.fromObject(object.standardSchedule); + } + return message; + }; + + /** + * Creates a plain object from a BackupRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {google.cloud.backupdr.v1.BackupRule} message BackupRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.ruleId = ""; + object.backupRetentionDays = 0; + } + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + object.ruleId = message.ruleId; + if (message.backupRetentionDays != null && message.hasOwnProperty("backupRetentionDays")) + object.backupRetentionDays = message.backupRetentionDays; + if (message.standardSchedule != null && message.hasOwnProperty("standardSchedule")) { + object.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.toObject(message.standardSchedule, options); + if (options.oneofs) + object.backupScheduleOneof = "standardSchedule"; + } + return object; + }; + + /** + * Converts this BackupRule to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + * @returns {Object.} JSON object + */ + BackupRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupRule + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupRule"; + }; + + return BackupRule; + })(); + + v1.StandardSchedule = (function() { + + /** + * Properties of a StandardSchedule. + * @memberof google.cloud.backupdr.v1 + * @interface IStandardSchedule + * @property {google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|null} [recurrenceType] StandardSchedule recurrenceType + * @property {number|null} [hourlyFrequency] StandardSchedule hourlyFrequency + * @property {Array.|null} [daysOfWeek] StandardSchedule daysOfWeek + * @property {Array.|null} [daysOfMonth] StandardSchedule daysOfMonth + * @property {google.cloud.backupdr.v1.IWeekDayOfMonth|null} [weekDayOfMonth] StandardSchedule weekDayOfMonth + * @property {Array.|null} [months] StandardSchedule months + * @property {google.cloud.backupdr.v1.IBackupWindow|null} [backupWindow] StandardSchedule backupWindow + * @property {string|null} [timeZone] StandardSchedule timeZone + */ + + /** + * Constructs a new StandardSchedule. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a StandardSchedule. + * @implements IStandardSchedule + * @constructor + * @param {google.cloud.backupdr.v1.IStandardSchedule=} [properties] Properties to set + */ + function StandardSchedule(properties) { + this.daysOfWeek = []; + this.daysOfMonth = []; + this.months = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StandardSchedule recurrenceType. + * @member {google.cloud.backupdr.v1.StandardSchedule.RecurrenceType} recurrenceType + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.recurrenceType = 0; + + /** + * StandardSchedule hourlyFrequency. + * @member {number} hourlyFrequency + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.hourlyFrequency = 0; + + /** + * StandardSchedule daysOfWeek. + * @member {Array.} daysOfWeek + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.daysOfWeek = $util.emptyArray; + + /** + * StandardSchedule daysOfMonth. + * @member {Array.} daysOfMonth + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.daysOfMonth = $util.emptyArray; + + /** + * StandardSchedule weekDayOfMonth. + * @member {google.cloud.backupdr.v1.IWeekDayOfMonth|null|undefined} weekDayOfMonth + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.weekDayOfMonth = null; + + /** + * StandardSchedule months. + * @member {Array.} months + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.months = $util.emptyArray; + + /** + * StandardSchedule backupWindow. + * @member {google.cloud.backupdr.v1.IBackupWindow|null|undefined} backupWindow + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.backupWindow = null; + + /** + * StandardSchedule timeZone. + * @member {string} timeZone + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.timeZone = ""; + + /** + * Creates a new StandardSchedule instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {google.cloud.backupdr.v1.IStandardSchedule=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule instance + */ + StandardSchedule.create = function create(properties) { + return new StandardSchedule(properties); + }; + + /** + * Encodes the specified StandardSchedule message. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {google.cloud.backupdr.v1.IStandardSchedule} message StandardSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StandardSchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recurrenceType != null && Object.hasOwnProperty.call(message, "recurrenceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.recurrenceType); + if (message.hourlyFrequency != null && Object.hasOwnProperty.call(message, "hourlyFrequency")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hourlyFrequency); + if (message.daysOfWeek != null && message.daysOfWeek.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.daysOfWeek.length; ++i) + writer.int32(message.daysOfWeek[i]); + writer.ldelim(); + } + if (message.daysOfMonth != null && message.daysOfMonth.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (var i = 0; i < message.daysOfMonth.length; ++i) + writer.int32(message.daysOfMonth[i]); + writer.ldelim(); + } + if (message.weekDayOfMonth != null && Object.hasOwnProperty.call(message, "weekDayOfMonth")) + $root.google.cloud.backupdr.v1.WeekDayOfMonth.encode(message.weekDayOfMonth, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.months != null && message.months.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (var i = 0; i < message.months.length; ++i) + writer.int32(message.months[i]); + writer.ldelim(); + } + if (message.backupWindow != null && Object.hasOwnProperty.call(message, "backupWindow")) + $root.google.cloud.backupdr.v1.BackupWindow.encode(message.backupWindow, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.timeZone); + return writer; + }; + + /** + * Encodes the specified StandardSchedule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {google.cloud.backupdr.v1.IStandardSchedule} message StandardSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StandardSchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StandardSchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StandardSchedule.decode = function 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.backupdr.v1.StandardSchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.recurrenceType = reader.int32(); + break; + } + case 2: { + message.hourlyFrequency = reader.int32(); + break; + } + case 3: { + if (!(message.daysOfWeek && message.daysOfWeek.length)) + message.daysOfWeek = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.daysOfWeek.push(reader.int32()); + } else + message.daysOfWeek.push(reader.int32()); + break; + } + case 4: { + if (!(message.daysOfMonth && message.daysOfMonth.length)) + message.daysOfMonth = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.daysOfMonth.push(reader.int32()); + } else + message.daysOfMonth.push(reader.int32()); + break; + } + case 5: { + message.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.months && message.months.length)) + message.months = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.months.push(reader.int32()); + } else + message.months.push(reader.int32()); + break; + } + case 7: { + message.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.decode(reader, reader.uint32()); + break; + } + case 8: { + message.timeZone = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StandardSchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StandardSchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StandardSchedule message. + * @function verify + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StandardSchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recurrenceType != null && message.hasOwnProperty("recurrenceType")) + switch (message.recurrenceType) { + default: + return "recurrenceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.hourlyFrequency != null && message.hasOwnProperty("hourlyFrequency")) + if (!$util.isInteger(message.hourlyFrequency)) + return "hourlyFrequency: integer expected"; + if (message.daysOfWeek != null && message.hasOwnProperty("daysOfWeek")) { + if (!Array.isArray(message.daysOfWeek)) + return "daysOfWeek: array expected"; + for (var i = 0; i < message.daysOfWeek.length; ++i) + switch (message.daysOfWeek[i]) { + default: + return "daysOfWeek: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + if (message.daysOfMonth != null && message.hasOwnProperty("daysOfMonth")) { + if (!Array.isArray(message.daysOfMonth)) + return "daysOfMonth: array expected"; + for (var i = 0; i < message.daysOfMonth.length; ++i) + if (!$util.isInteger(message.daysOfMonth[i])) + return "daysOfMonth: integer[] expected"; + } + if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) { + var error = $root.google.cloud.backupdr.v1.WeekDayOfMonth.verify(message.weekDayOfMonth); + if (error) + return "weekDayOfMonth." + error; + } + if (message.months != null && message.hasOwnProperty("months")) { + if (!Array.isArray(message.months)) + return "months: array expected"; + for (var i = 0; i < message.months.length; ++i) + switch (message.months[i]) { + default: + return "months: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + } + if (message.backupWindow != null && message.hasOwnProperty("backupWindow")) { + var error = $root.google.cloud.backupdr.v1.BackupWindow.verify(message.backupWindow); + if (error) + return "backupWindow." + error; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + return null; + }; + + /** + * Creates a StandardSchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule + */ + StandardSchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.StandardSchedule) + return object; + var message = new $root.google.cloud.backupdr.v1.StandardSchedule(); + switch (object.recurrenceType) { + default: + if (typeof object.recurrenceType === "number") { + message.recurrenceType = object.recurrenceType; + break; + } + break; + case "RECURRENCE_TYPE_UNSPECIFIED": + case 0: + message.recurrenceType = 0; + break; + case "HOURLY": + case 1: + message.recurrenceType = 1; + break; + case "DAILY": + case 2: + message.recurrenceType = 2; + break; + case "WEEKLY": + case 3: + message.recurrenceType = 3; + break; + case "MONTHLY": + case 4: + message.recurrenceType = 4; + break; + case "YEARLY": + case 5: + message.recurrenceType = 5; + break; + } + if (object.hourlyFrequency != null) + message.hourlyFrequency = object.hourlyFrequency | 0; + if (object.daysOfWeek) { + if (!Array.isArray(object.daysOfWeek)) + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.daysOfWeek: array expected"); + message.daysOfWeek = []; + for (var i = 0; i < object.daysOfWeek.length; ++i) + switch (object.daysOfWeek[i]) { + default: + if (typeof object.daysOfWeek[i] === "number") { + message.daysOfWeek[i] = object.daysOfWeek[i]; + break; + } + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.daysOfWeek[i] = 0; + break; + case "MONDAY": + case 1: + message.daysOfWeek[i] = 1; + break; + case "TUESDAY": + case 2: + message.daysOfWeek[i] = 2; + break; + case "WEDNESDAY": + case 3: + message.daysOfWeek[i] = 3; + break; + case "THURSDAY": + case 4: + message.daysOfWeek[i] = 4; + break; + case "FRIDAY": + case 5: + message.daysOfWeek[i] = 5; + break; + case "SATURDAY": + case 6: + message.daysOfWeek[i] = 6; + break; + case "SUNDAY": + case 7: + message.daysOfWeek[i] = 7; + break; + } + } + if (object.daysOfMonth) { + if (!Array.isArray(object.daysOfMonth)) + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.daysOfMonth: array expected"); + message.daysOfMonth = []; + for (var i = 0; i < object.daysOfMonth.length; ++i) + message.daysOfMonth[i] = object.daysOfMonth[i] | 0; + } + if (object.weekDayOfMonth != null) { + if (typeof object.weekDayOfMonth !== "object") + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.weekDayOfMonth: object expected"); + message.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.fromObject(object.weekDayOfMonth); + } + if (object.months) { + if (!Array.isArray(object.months)) + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.months: array expected"); + message.months = []; + for (var i = 0; i < object.months.length; ++i) + switch (object.months[i]) { + default: + if (typeof object.months[i] === "number") { + message.months[i] = object.months[i]; + break; + } + case "MONTH_UNSPECIFIED": + case 0: + message.months[i] = 0; + break; + case "JANUARY": + case 1: + message.months[i] = 1; + break; + case "FEBRUARY": + case 2: + message.months[i] = 2; + break; + case "MARCH": + case 3: + message.months[i] = 3; + break; + case "APRIL": + case 4: + message.months[i] = 4; + break; + case "MAY": + case 5: + message.months[i] = 5; + break; + case "JUNE": + case 6: + message.months[i] = 6; + break; + case "JULY": + case 7: + message.months[i] = 7; + break; + case "AUGUST": + case 8: + message.months[i] = 8; + break; + case "SEPTEMBER": + case 9: + message.months[i] = 9; + break; + case "OCTOBER": + case 10: + message.months[i] = 10; + break; + case "NOVEMBER": + case 11: + message.months[i] = 11; + break; + case "DECEMBER": + case 12: + message.months[i] = 12; + break; + } + } + if (object.backupWindow != null) { + if (typeof object.backupWindow !== "object") + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.backupWindow: object expected"); + message.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.fromObject(object.backupWindow); + } + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + return message; + }; + + /** + * Creates a plain object from a StandardSchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {google.cloud.backupdr.v1.StandardSchedule} message StandardSchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StandardSchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.daysOfWeek = []; + object.daysOfMonth = []; + object.months = []; + } + if (options.defaults) { + object.recurrenceType = options.enums === String ? "RECURRENCE_TYPE_UNSPECIFIED" : 0; + object.hourlyFrequency = 0; + object.weekDayOfMonth = null; + object.backupWindow = null; + object.timeZone = ""; + } + if (message.recurrenceType != null && message.hasOwnProperty("recurrenceType")) + object.recurrenceType = options.enums === String ? $root.google.cloud.backupdr.v1.StandardSchedule.RecurrenceType[message.recurrenceType] === undefined ? message.recurrenceType : $root.google.cloud.backupdr.v1.StandardSchedule.RecurrenceType[message.recurrenceType] : message.recurrenceType; + if (message.hourlyFrequency != null && message.hasOwnProperty("hourlyFrequency")) + object.hourlyFrequency = message.hourlyFrequency; + if (message.daysOfWeek && message.daysOfWeek.length) { + object.daysOfWeek = []; + for (var j = 0; j < message.daysOfWeek.length; ++j) + object.daysOfWeek[j] = options.enums === String ? $root.google.type.DayOfWeek[message.daysOfWeek[j]] === undefined ? message.daysOfWeek[j] : $root.google.type.DayOfWeek[message.daysOfWeek[j]] : message.daysOfWeek[j]; + } + if (message.daysOfMonth && message.daysOfMonth.length) { + object.daysOfMonth = []; + for (var j = 0; j < message.daysOfMonth.length; ++j) + object.daysOfMonth[j] = message.daysOfMonth[j]; + } + if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) + object.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.toObject(message.weekDayOfMonth, options); + if (message.months && message.months.length) { + object.months = []; + for (var j = 0; j < message.months.length; ++j) + object.months[j] = options.enums === String ? $root.google.type.Month[message.months[j]] === undefined ? message.months[j] : $root.google.type.Month[message.months[j]] : message.months[j]; + } + if (message.backupWindow != null && message.hasOwnProperty("backupWindow")) + object.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.toObject(message.backupWindow, options); + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + return object; + }; + + /** + * Converts this StandardSchedule to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + * @returns {Object.} JSON object + */ + StandardSchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StandardSchedule + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StandardSchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.StandardSchedule"; + }; + + /** + * RecurrenceType enum. + * @name google.cloud.backupdr.v1.StandardSchedule.RecurrenceType + * @enum {number} + * @property {number} RECURRENCE_TYPE_UNSPECIFIED=0 RECURRENCE_TYPE_UNSPECIFIED value + * @property {number} HOURLY=1 HOURLY value + * @property {number} DAILY=2 DAILY value + * @property {number} WEEKLY=3 WEEKLY value + * @property {number} MONTHLY=4 MONTHLY value + * @property {number} YEARLY=5 YEARLY value + */ + StandardSchedule.RecurrenceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RECURRENCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HOURLY"] = 1; + values[valuesById[2] = "DAILY"] = 2; + values[valuesById[3] = "WEEKLY"] = 3; + values[valuesById[4] = "MONTHLY"] = 4; + values[valuesById[5] = "YEARLY"] = 5; + return values; + })(); + + return StandardSchedule; + })(); + + v1.BackupWindow = (function() { + + /** + * Properties of a BackupWindow. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupWindow + * @property {number|null} [startHourOfDay] BackupWindow startHourOfDay + * @property {number|null} [endHourOfDay] BackupWindow endHourOfDay + */ + + /** + * Constructs a new BackupWindow. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupWindow. + * @implements IBackupWindow + * @constructor + * @param {google.cloud.backupdr.v1.IBackupWindow=} [properties] Properties to set + */ + function BackupWindow(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupWindow startHourOfDay. + * @member {number} startHourOfDay + * @memberof google.cloud.backupdr.v1.BackupWindow + * @instance + */ + BackupWindow.prototype.startHourOfDay = 0; + + /** + * BackupWindow endHourOfDay. + * @member {number} endHourOfDay + * @memberof google.cloud.backupdr.v1.BackupWindow + * @instance + */ + BackupWindow.prototype.endHourOfDay = 0; + + /** + * Creates a new BackupWindow instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {google.cloud.backupdr.v1.IBackupWindow=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow instance + */ + BackupWindow.create = function create(properties) { + return new BackupWindow(properties); + }; + + /** + * Encodes the specified BackupWindow message. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {google.cloud.backupdr.v1.IBackupWindow} message BackupWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupWindow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startHourOfDay != null && Object.hasOwnProperty.call(message, "startHourOfDay")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startHourOfDay); + if (message.endHourOfDay != null && Object.hasOwnProperty.call(message, "endHourOfDay")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endHourOfDay); + return writer; + }; + + /** + * Encodes the specified BackupWindow message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {google.cloud.backupdr.v1.IBackupWindow} message BackupWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupWindow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupWindow message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupWindow.decode = function 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.backupdr.v1.BackupWindow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startHourOfDay = reader.int32(); + break; + } + case 2: { + message.endHourOfDay = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupWindow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupWindow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupWindow message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupWindow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startHourOfDay != null && message.hasOwnProperty("startHourOfDay")) + if (!$util.isInteger(message.startHourOfDay)) + return "startHourOfDay: integer expected"; + if (message.endHourOfDay != null && message.hasOwnProperty("endHourOfDay")) + if (!$util.isInteger(message.endHourOfDay)) + return "endHourOfDay: integer expected"; + return null; + }; + + /** + * Creates a BackupWindow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow + */ + BackupWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupWindow) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupWindow(); + if (object.startHourOfDay != null) + message.startHourOfDay = object.startHourOfDay | 0; + if (object.endHourOfDay != null) + message.endHourOfDay = object.endHourOfDay | 0; + return message; + }; + + /** + * Creates a plain object from a BackupWindow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {google.cloud.backupdr.v1.BackupWindow} message BackupWindow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupWindow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startHourOfDay = 0; + object.endHourOfDay = 0; + } + if (message.startHourOfDay != null && message.hasOwnProperty("startHourOfDay")) + object.startHourOfDay = message.startHourOfDay; + if (message.endHourOfDay != null && message.hasOwnProperty("endHourOfDay")) + object.endHourOfDay = message.endHourOfDay; + return object; + }; + + /** + * Converts this BackupWindow to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupWindow + * @instance + * @returns {Object.} JSON object + */ + BackupWindow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupWindow + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupWindow"; + }; + + return BackupWindow; + })(); + + v1.WeekDayOfMonth = (function() { + + /** + * Properties of a WeekDayOfMonth. + * @memberof google.cloud.backupdr.v1 + * @interface IWeekDayOfMonth + * @property {google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|null} [weekOfMonth] WeekDayOfMonth weekOfMonth + * @property {google.type.DayOfWeek|null} [dayOfWeek] WeekDayOfMonth dayOfWeek + */ + + /** + * Constructs a new WeekDayOfMonth. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a WeekDayOfMonth. + * @implements IWeekDayOfMonth + * @constructor + * @param {google.cloud.backupdr.v1.IWeekDayOfMonth=} [properties] Properties to set + */ + function WeekDayOfMonth(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WeekDayOfMonth weekOfMonth. + * @member {google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth} weekOfMonth + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @instance + */ + WeekDayOfMonth.prototype.weekOfMonth = 0; + + /** + * WeekDayOfMonth dayOfWeek. + * @member {google.type.DayOfWeek} dayOfWeek + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @instance + */ + WeekDayOfMonth.prototype.dayOfWeek = 0; + + /** + * Creates a new WeekDayOfMonth instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {google.cloud.backupdr.v1.IWeekDayOfMonth=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth instance + */ + WeekDayOfMonth.create = function create(properties) { + return new WeekDayOfMonth(properties); + }; + + /** + * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {google.cloud.backupdr.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeekDayOfMonth.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weekOfMonth != null && Object.hasOwnProperty.call(message, "weekOfMonth")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.weekOfMonth); + if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dayOfWeek); + return writer; + }; + + /** + * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {google.cloud.backupdr.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeekDayOfMonth.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeekDayOfMonth.decode = function 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.backupdr.v1.WeekDayOfMonth(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.weekOfMonth = reader.int32(); + break; + } + case 2: { + message.dayOfWeek = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeekDayOfMonth.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WeekDayOfMonth message. + * @function verify + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WeekDayOfMonth.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weekOfMonth != null && message.hasOwnProperty("weekOfMonth")) + switch (message.weekOfMonth) { + default: + return "weekOfMonth: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + switch (message.dayOfWeek) { + default: + return "dayOfWeek: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + return null; + }; + + /** + * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth + */ + WeekDayOfMonth.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.WeekDayOfMonth) + return object; + var message = new $root.google.cloud.backupdr.v1.WeekDayOfMonth(); + switch (object.weekOfMonth) { + default: + if (typeof object.weekOfMonth === "number") { + message.weekOfMonth = object.weekOfMonth; + break; + } + break; + case "WEEK_OF_MONTH_UNSPECIFIED": + case 0: + message.weekOfMonth = 0; + break; + case "FIRST": + case 1: + message.weekOfMonth = 1; + break; + case "SECOND": + case 2: + message.weekOfMonth = 2; + break; + case "THIRD": + case 3: + message.weekOfMonth = 3; + break; + case "FOURTH": + case 4: + message.weekOfMonth = 4; + break; + case "LAST": + case 5: + message.weekOfMonth = 5; + break; + } + switch (object.dayOfWeek) { + default: + if (typeof object.dayOfWeek === "number") { + message.dayOfWeek = object.dayOfWeek; + break; + } + break; + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.dayOfWeek = 0; + break; + case "MONDAY": + case 1: + message.dayOfWeek = 1; + break; + case "TUESDAY": + case 2: + message.dayOfWeek = 2; + break; + case "WEDNESDAY": + case 3: + message.dayOfWeek = 3; + break; + case "THURSDAY": + case 4: + message.dayOfWeek = 4; + break; + case "FRIDAY": + case 5: + message.dayOfWeek = 5; + break; + case "SATURDAY": + case 6: + message.dayOfWeek = 6; + break; + case "SUNDAY": + case 7: + message.dayOfWeek = 7; + break; + } + return message; + }; + + /** + * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {google.cloud.backupdr.v1.WeekDayOfMonth} message WeekDayOfMonth + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WeekDayOfMonth.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.weekOfMonth = options.enums === String ? "WEEK_OF_MONTH_UNSPECIFIED" : 0; + object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; + } + if (message.weekOfMonth != null && message.hasOwnProperty("weekOfMonth")) + object.weekOfMonth = options.enums === String ? $root.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth] === undefined ? message.weekOfMonth : $root.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth] : message.weekOfMonth; + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] === undefined ? message.dayOfWeek : $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; + return object; + }; + + /** + * Converts this WeekDayOfMonth to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @instance + * @returns {Object.} JSON object + */ + WeekDayOfMonth.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WeekDayOfMonth + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WeekDayOfMonth.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.WeekDayOfMonth"; + }; + + /** + * WeekOfMonth enum. + * @name google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth + * @enum {number} + * @property {number} WEEK_OF_MONTH_UNSPECIFIED=0 WEEK_OF_MONTH_UNSPECIFIED value + * @property {number} FIRST=1 FIRST value + * @property {number} SECOND=2 SECOND value + * @property {number} THIRD=3 THIRD value + * @property {number} FOURTH=4 FOURTH value + * @property {number} LAST=5 LAST value + */ + WeekDayOfMonth.WeekOfMonth = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "WEEK_OF_MONTH_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIRST"] = 1; + values[valuesById[2] = "SECOND"] = 2; + values[valuesById[3] = "THIRD"] = 3; + values[valuesById[4] = "FOURTH"] = 4; + values[valuesById[5] = "LAST"] = 5; + return values; + })(); + + return WeekDayOfMonth; + })(); + + v1.CreateBackupPlanRequest = (function() { + + /** + * Properties of a CreateBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ICreateBackupPlanRequest + * @property {string|null} [parent] CreateBackupPlanRequest parent + * @property {string|null} [backupPlanId] CreateBackupPlanRequest backupPlanId + * @property {google.cloud.backupdr.v1.IBackupPlan|null} [backupPlan] CreateBackupPlanRequest backupPlan + * @property {string|null} [requestId] CreateBackupPlanRequest requestId + */ + + /** + * Constructs a new CreateBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CreateBackupPlanRequest. + * @implements ICreateBackupPlanRequest + * @constructor + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest=} [properties] Properties to set + */ + function CreateBackupPlanRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBackupPlanRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + */ + CreateBackupPlanRequest.prototype.parent = ""; + + /** + * CreateBackupPlanRequest backupPlanId. + * @member {string} backupPlanId + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + */ + CreateBackupPlanRequest.prototype.backupPlanId = ""; + + /** + * CreateBackupPlanRequest backupPlan. + * @member {google.cloud.backupdr.v1.IBackupPlan|null|undefined} backupPlan + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + */ + CreateBackupPlanRequest.prototype.backupPlan = null; + + /** + * CreateBackupPlanRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + */ + CreateBackupPlanRequest.prototype.requestId = ""; + + /** + * Creates a new CreateBackupPlanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest instance + */ + CreateBackupPlanRequest.create = function create(properties) { + return new CreateBackupPlanRequest(properties); + }; + + /** + * Encodes the specified CreateBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} message CreateBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupPlanRequest.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.backupPlanId != null && Object.hasOwnProperty.call(message, "backupPlanId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanId); + if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) + $root.google.cloud.backupdr.v1.BackupPlan.encode(message.backupPlan, 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 CreateBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} message CreateBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBackupPlanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupPlanRequest.decode = function 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.backupdr.v1.CreateBackupPlanRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.backupPlanId = reader.string(); + break; + } + case 3: { + message.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBackupPlanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBackupPlanRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBackupPlanRequest.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.backupPlanId != null && message.hasOwnProperty("backupPlanId")) + if (!$util.isString(message.backupPlanId)) + return "backupPlanId: string expected"; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) { + var error = $root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlan); + if (error) + return "backupPlan." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest + */ + CreateBackupPlanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupPlanRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.CreateBackupPlanRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupPlanId != null) + message.backupPlanId = String(object.backupPlanId); + if (object.backupPlan != null) { + if (typeof object.backupPlan !== "object") + throw TypeError(".google.cloud.backupdr.v1.CreateBackupPlanRequest.backupPlan: object expected"); + message.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlan); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateBackupPlanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.CreateBackupPlanRequest} message CreateBackupPlanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBackupPlanRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupPlanId = ""; + object.backupPlan = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupPlanId != null && message.hasOwnProperty("backupPlanId")) + object.backupPlanId = message.backupPlanId; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + object.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlan, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateBackupPlanRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBackupPlanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateBackupPlanRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupPlanRequest"; + }; + + return CreateBackupPlanRequest; + })(); + + v1.ListBackupPlansRequest = (function() { + + /** + * Properties of a ListBackupPlansRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupPlansRequest + * @property {string|null} [parent] ListBackupPlansRequest parent + * @property {number|null} [pageSize] ListBackupPlansRequest pageSize + * @property {string|null} [pageToken] ListBackupPlansRequest pageToken + * @property {string|null} [filter] ListBackupPlansRequest filter + * @property {string|null} [orderBy] ListBackupPlansRequest orderBy + */ + + /** + * Constructs a new ListBackupPlansRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupPlansRequest. + * @implements IListBackupPlansRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest=} [properties] Properties to set + */ + function ListBackupPlansRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupPlansRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.parent = ""; + + /** + * ListBackupPlansRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.pageSize = 0; + + /** + * ListBackupPlansRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.pageToken = ""; + + /** + * ListBackupPlansRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.filter = ""; + + /** + * ListBackupPlansRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.orderBy = ""; + + /** + * Creates a new ListBackupPlansRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest instance + */ + ListBackupPlansRequest.create = function create(properties) { + return new ListBackupPlansRequest(properties); + }; + + /** + * Encodes the specified ListBackupPlansRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} message ListBackupPlansRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlansRequest.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 ListBackupPlansRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} message ListBackupPlansRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlansRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupPlansRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlansRequest.decode = function 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.backupdr.v1.ListBackupPlansRequest(); + 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 ListBackupPlansRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlansRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupPlansRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupPlansRequest.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 ListBackupPlansRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest + */ + ListBackupPlansRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlansRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupPlansRequest(); + 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 ListBackupPlansRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {google.cloud.backupdr.v1.ListBackupPlansRequest} message ListBackupPlansRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupPlansRequest.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 ListBackupPlansRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupPlansRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupPlansRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupPlansRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlansRequest"; + }; + + return ListBackupPlansRequest; + })(); + + v1.ListBackupPlansResponse = (function() { + + /** + * Properties of a ListBackupPlansResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupPlansResponse + * @property {Array.|null} [backupPlans] ListBackupPlansResponse backupPlans + * @property {string|null} [nextPageToken] ListBackupPlansResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupPlansResponse unreachable + */ + + /** + * Constructs a new ListBackupPlansResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupPlansResponse. + * @implements IListBackupPlansResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupPlansResponse=} [properties] Properties to set + */ + function ListBackupPlansResponse(properties) { + this.backupPlans = []; + 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]]; + } + + /** + * ListBackupPlansResponse backupPlans. + * @member {Array.} backupPlans + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @instance + */ + ListBackupPlansResponse.prototype.backupPlans = $util.emptyArray; + + /** + * ListBackupPlansResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @instance + */ + ListBackupPlansResponse.prototype.nextPageToken = ""; + + /** + * ListBackupPlansResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @instance + */ + ListBackupPlansResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupPlansResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse instance + */ + ListBackupPlansResponse.create = function create(properties) { + return new ListBackupPlansResponse(properties); + }; + + /** + * Encodes the specified ListBackupPlansResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansResponse} message ListBackupPlansResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlansResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPlans != null && message.backupPlans.length) + for (var i = 0; i < message.backupPlans.length; ++i) + $root.google.cloud.backupdr.v1.BackupPlan.encode(message.backupPlans[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 ListBackupPlansResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansResponse} message ListBackupPlansResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlansResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupPlansResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlansResponse.decode = function 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.backupdr.v1.ListBackupPlansResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backupPlans && message.backupPlans.length)) + message.backupPlans = []; + message.backupPlans.push($root.google.cloud.backupdr.v1.BackupPlan.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 ListBackupPlansResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlansResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupPlansResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupPlansResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupPlans != null && message.hasOwnProperty("backupPlans")) { + if (!Array.isArray(message.backupPlans)) + return "backupPlans: array expected"; + for (var i = 0; i < message.backupPlans.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlans[i]); + if (error) + return "backupPlans." + 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 ListBackupPlansResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse + */ + ListBackupPlansResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlansResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupPlansResponse(); + if (object.backupPlans) { + if (!Array.isArray(object.backupPlans)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.backupPlans: array expected"); + message.backupPlans = []; + for (var i = 0; i < object.backupPlans.length; ++i) { + if (typeof object.backupPlans[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.backupPlans: object expected"); + message.backupPlans[i] = $root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlans[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.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 ListBackupPlansResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {google.cloud.backupdr.v1.ListBackupPlansResponse} message ListBackupPlansResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupPlansResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupPlans = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backupPlans && message.backupPlans.length) { + object.backupPlans = []; + for (var j = 0; j < message.backupPlans.length; ++j) + object.backupPlans[j] = $root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlans[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 ListBackupPlansResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupPlansResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupPlansResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupPlansResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlansResponse"; + }; + + return ListBackupPlansResponse; + })(); + + v1.GetBackupPlanRequest = (function() { + + /** + * Properties of a GetBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetBackupPlanRequest + * @property {string|null} [name] GetBackupPlanRequest name + */ + + /** + * Constructs a new GetBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetBackupPlanRequest. + * @implements IGetBackupPlanRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest=} [properties] Properties to set + */ + function GetBackupPlanRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupPlanRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @instance + */ + GetBackupPlanRequest.prototype.name = ""; + + /** + * Creates a new GetBackupPlanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest instance + */ + GetBackupPlanRequest.create = function create(properties) { + return new GetBackupPlanRequest(properties); + }; + + /** + * Encodes the specified GetBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} message GetBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupPlanRequest.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 GetBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} message GetBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupPlanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupPlanRequest.decode = function 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.backupdr.v1.GetBackupPlanRequest(); + 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 GetBackupPlanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupPlanRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupPlanRequest.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 GetBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest + */ + GetBackupPlanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetBackupPlanRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetBackupPlanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.GetBackupPlanRequest} message GetBackupPlanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupPlanRequest.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 GetBackupPlanRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupPlanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupPlanRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupPlanRequest"; + }; + + return GetBackupPlanRequest; + })(); + + v1.DeleteBackupPlanRequest = (function() { + + /** + * Properties of a DeleteBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IDeleteBackupPlanRequest + * @property {string|null} [name] DeleteBackupPlanRequest name + * @property {string|null} [requestId] DeleteBackupPlanRequest requestId + */ + + /** + * Constructs a new DeleteBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DeleteBackupPlanRequest. + * @implements IDeleteBackupPlanRequest + * @constructor + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest=} [properties] Properties to set + */ + function DeleteBackupPlanRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupPlanRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @instance + */ + DeleteBackupPlanRequest.prototype.name = ""; + + /** + * DeleteBackupPlanRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @instance + */ + DeleteBackupPlanRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteBackupPlanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest instance + */ + DeleteBackupPlanRequest.create = function create(properties) { + return new DeleteBackupPlanRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} message DeleteBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupPlanRequest.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 DeleteBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} message DeleteBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupPlanRequest.decode = function 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.backupdr.v1.DeleteBackupPlanRequest(); + 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 DeleteBackupPlanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupPlanRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupPlanRequest.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 DeleteBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest + */ + DeleteBackupPlanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest(); + 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 DeleteBackupPlanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.DeleteBackupPlanRequest} message DeleteBackupPlanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupPlanRequest.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 DeleteBackupPlanRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupPlanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupPlanRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupPlanRequest"; + }; + + return DeleteBackupPlanRequest; + })(); + + v1.BackupPlanAssociation = (function() { + + /** + * Properties of a BackupPlanAssociation. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupPlanAssociation + * @property {string|null} [name] BackupPlanAssociation name + * @property {string|null} [resourceType] BackupPlanAssociation resourceType + * @property {string|null} [resource] BackupPlanAssociation resource + * @property {string|null} [backupPlan] BackupPlanAssociation backupPlan + * @property {google.protobuf.ITimestamp|null} [createTime] BackupPlanAssociation createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] BackupPlanAssociation updateTime + * @property {google.cloud.backupdr.v1.BackupPlanAssociation.State|null} [state] BackupPlanAssociation state + * @property {Array.|null} [rulesConfigInfo] BackupPlanAssociation rulesConfigInfo + * @property {string|null} [dataSource] BackupPlanAssociation dataSource + */ + + /** + * Constructs a new BackupPlanAssociation. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupPlanAssociation. + * @implements IBackupPlanAssociation + * @constructor + * @param {google.cloud.backupdr.v1.IBackupPlanAssociation=} [properties] Properties to set + */ + function BackupPlanAssociation(properties) { + this.rulesConfigInfo = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupPlanAssociation name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.name = ""; + + /** + * BackupPlanAssociation resourceType. + * @member {string} resourceType + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.resourceType = ""; + + /** + * BackupPlanAssociation resource. + * @member {string} resource + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.resource = ""; + + /** + * BackupPlanAssociation backupPlan. + * @member {string} backupPlan + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.backupPlan = ""; + + /** + * BackupPlanAssociation createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.createTime = null; + + /** + * BackupPlanAssociation updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.updateTime = null; + + /** + * BackupPlanAssociation state. + * @member {google.cloud.backupdr.v1.BackupPlanAssociation.State} state + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.state = 0; + + /** + * BackupPlanAssociation rulesConfigInfo. + * @member {Array.} rulesConfigInfo + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.rulesConfigInfo = $util.emptyArray; + + /** + * BackupPlanAssociation dataSource. + * @member {string} dataSource + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.dataSource = ""; + + /** + * Creates a new BackupPlanAssociation instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {google.cloud.backupdr.v1.IBackupPlanAssociation=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation instance + */ + BackupPlanAssociation.create = function create(properties) { + return new BackupPlanAssociation(properties); + }; + + /** + * Encodes the specified BackupPlanAssociation message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {google.cloud.backupdr.v1.IBackupPlanAssociation} message BackupPlanAssociation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupPlanAssociation.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.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceType); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); + if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.backupPlan); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.rulesConfigInfo != null && message.rulesConfigInfo.length) + for (var i = 0; i < message.rulesConfigInfo.length; ++i) + $root.google.cloud.backupdr.v1.RuleConfigInfo.encode(message.rulesConfigInfo[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.dataSource); + return writer; + }; + + /** + * Encodes the specified BackupPlanAssociation message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {google.cloud.backupdr.v1.IBackupPlanAssociation} message BackupPlanAssociation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupPlanAssociation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupPlanAssociation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupPlanAssociation.decode = function 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.backupdr.v1.BackupPlanAssociation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.resourceType = reader.string(); + break; + } + case 3: { + message.resource = reader.string(); + break; + } + case 4: { + message.backupPlan = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 8: { + if (!(message.rulesConfigInfo && message.rulesConfigInfo.length)) + message.rulesConfigInfo = []; + message.rulesConfigInfo.push($root.google.cloud.backupdr.v1.RuleConfigInfo.decode(reader, reader.uint32())); + break; + } + case 9: { + message.dataSource = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupPlanAssociation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupPlanAssociation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupPlanAssociation message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupPlanAssociation.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.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + if (!$util.isString(message.backupPlan)) + return "backupPlan: 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.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.rulesConfigInfo != null && message.hasOwnProperty("rulesConfigInfo")) { + if (!Array.isArray(message.rulesConfigInfo)) + return "rulesConfigInfo: array expected"; + for (var i = 0; i < message.rulesConfigInfo.length; ++i) { + var error = $root.google.cloud.backupdr.v1.RuleConfigInfo.verify(message.rulesConfigInfo[i]); + if (error) + return "rulesConfigInfo." + error; + } + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + return null; + }; + + /** + * Creates a BackupPlanAssociation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation + */ + BackupPlanAssociation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupPlanAssociation) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupPlanAssociation(); + if (object.name != null) + message.name = String(object.name); + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.resource != null) + message.resource = String(object.resource); + if (object.backupPlan != null) + message.backupPlan = String(object.backupPlan); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.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.backupdr.v1.BackupPlanAssociation.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + 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 "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "INACTIVE": + case 4: + message.state = 4; + break; + } + if (object.rulesConfigInfo) { + if (!Array.isArray(object.rulesConfigInfo)) + throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.rulesConfigInfo: array expected"); + message.rulesConfigInfo = []; + for (var i = 0; i < object.rulesConfigInfo.length; ++i) { + if (typeof object.rulesConfigInfo[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.rulesConfigInfo: object expected"); + message.rulesConfigInfo[i] = $root.google.cloud.backupdr.v1.RuleConfigInfo.fromObject(object.rulesConfigInfo[i]); + } + } + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + return message; + }; + + /** + * Creates a plain object from a BackupPlanAssociation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {google.cloud.backupdr.v1.BackupPlanAssociation} message BackupPlanAssociation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupPlanAssociation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rulesConfigInfo = []; + if (options.defaults) { + object.name = ""; + object.resourceType = ""; + object.resource = ""; + object.backupPlan = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.dataSource = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + object.backupPlan = message.backupPlan; + 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.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupPlanAssociation.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupPlanAssociation.State[message.state] : message.state; + if (message.rulesConfigInfo && message.rulesConfigInfo.length) { + object.rulesConfigInfo = []; + for (var j = 0; j < message.rulesConfigInfo.length; ++j) + object.rulesConfigInfo[j] = $root.google.cloud.backupdr.v1.RuleConfigInfo.toObject(message.rulesConfigInfo[j], options); + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + return object; + }; + + /** + * Converts this BackupPlanAssociation to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + * @returns {Object.} JSON object + */ + BackupPlanAssociation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupPlanAssociation + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupPlanAssociation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupPlanAssociation"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.BackupPlanAssociation.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} INACTIVE=4 INACTIVE value + */ + BackupPlanAssociation.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "INACTIVE"] = 4; + return values; + })(); + + return BackupPlanAssociation; + })(); + + v1.RuleConfigInfo = (function() { + + /** + * Properties of a RuleConfigInfo. + * @memberof google.cloud.backupdr.v1 + * @interface IRuleConfigInfo + * @property {string|null} [ruleId] RuleConfigInfo ruleId + * @property {google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|null} [lastBackupState] RuleConfigInfo lastBackupState + * @property {google.rpc.IStatus|null} [lastBackupError] RuleConfigInfo lastBackupError + * @property {google.protobuf.ITimestamp|null} [lastSuccessfulBackupConsistencyTime] RuleConfigInfo lastSuccessfulBackupConsistencyTime + */ + + /** + * Constructs a new RuleConfigInfo. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a RuleConfigInfo. + * @implements IRuleConfigInfo + * @constructor + * @param {google.cloud.backupdr.v1.IRuleConfigInfo=} [properties] Properties to set + */ + function RuleConfigInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RuleConfigInfo ruleId. + * @member {string} ruleId + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + */ + RuleConfigInfo.prototype.ruleId = ""; + + /** + * RuleConfigInfo lastBackupState. + * @member {google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState} lastBackupState + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + */ + RuleConfigInfo.prototype.lastBackupState = 0; + + /** + * RuleConfigInfo lastBackupError. + * @member {google.rpc.IStatus|null|undefined} lastBackupError + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + */ + RuleConfigInfo.prototype.lastBackupError = null; + + /** + * RuleConfigInfo lastSuccessfulBackupConsistencyTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastSuccessfulBackupConsistencyTime + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + */ + RuleConfigInfo.prototype.lastSuccessfulBackupConsistencyTime = null; + + /** + * Creates a new RuleConfigInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IRuleConfigInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo instance + */ + RuleConfigInfo.create = function create(properties) { + return new RuleConfigInfo(properties); + }; + + /** + * Encodes the specified RuleConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IRuleConfigInfo} message RuleConfigInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RuleConfigInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ruleId); + if (message.lastBackupState != null && Object.hasOwnProperty.call(message, "lastBackupState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.lastBackupState); + if (message.lastBackupError != null && Object.hasOwnProperty.call(message, "lastBackupError")) + $root.google.rpc.Status.encode(message.lastBackupError, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.lastSuccessfulBackupConsistencyTime != null && Object.hasOwnProperty.call(message, "lastSuccessfulBackupConsistencyTime")) + $root.google.protobuf.Timestamp.encode(message.lastSuccessfulBackupConsistencyTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RuleConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IRuleConfigInfo} message RuleConfigInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RuleConfigInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RuleConfigInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RuleConfigInfo.decode = function 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.backupdr.v1.RuleConfigInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ruleId = reader.string(); + break; + } + case 3: { + message.lastBackupState = reader.int32(); + break; + } + case 4: { + message.lastBackupError = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RuleConfigInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RuleConfigInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RuleConfigInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RuleConfigInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + if (!$util.isString(message.ruleId)) + return "ruleId: string expected"; + if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) + switch (message.lastBackupState) { + default: + return "lastBackupState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) { + var error = $root.google.rpc.Status.verify(message.lastBackupError); + if (error) + return "lastBackupError." + error; + } + if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime); + if (error) + return "lastSuccessfulBackupConsistencyTime." + error; + } + return null; + }; + + /** + * Creates a RuleConfigInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo + */ + RuleConfigInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RuleConfigInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.RuleConfigInfo(); + if (object.ruleId != null) + message.ruleId = String(object.ruleId); + switch (object.lastBackupState) { + default: + if (typeof object.lastBackupState === "number") { + message.lastBackupState = object.lastBackupState; + break; + } + break; + case "LAST_BACKUP_STATE_UNSPECIFIED": + case 0: + message.lastBackupState = 0; + break; + case "FIRST_BACKUP_PENDING": + case 1: + message.lastBackupState = 1; + break; + case "PERMISSION_DENIED": + case 2: + message.lastBackupState = 2; + break; + case "SUCCEEDED": + case 3: + message.lastBackupState = 3; + break; + case "FAILED": + case 4: + message.lastBackupState = 4; + break; + } + if (object.lastBackupError != null) { + if (typeof object.lastBackupError !== "object") + throw TypeError(".google.cloud.backupdr.v1.RuleConfigInfo.lastBackupError: object expected"); + message.lastBackupError = $root.google.rpc.Status.fromObject(object.lastBackupError); + } + if (object.lastSuccessfulBackupConsistencyTime != null) { + if (typeof object.lastSuccessfulBackupConsistencyTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.RuleConfigInfo.lastSuccessfulBackupConsistencyTime: object expected"); + message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime); + } + return message; + }; + + /** + * Creates a plain object from a RuleConfigInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {google.cloud.backupdr.v1.RuleConfigInfo} message RuleConfigInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RuleConfigInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.ruleId = ""; + object.lastBackupState = options.enums === String ? "LAST_BACKUP_STATE_UNSPECIFIED" : 0; + object.lastBackupError = null; + object.lastSuccessfulBackupConsistencyTime = null; + } + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + object.ruleId = message.ruleId; + if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) + object.lastBackupState = options.enums === String ? $root.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState[message.lastBackupState] === undefined ? message.lastBackupState : $root.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState[message.lastBackupState] : message.lastBackupState; + if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) + object.lastBackupError = $root.google.rpc.Status.toObject(message.lastBackupError, options); + if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) + object.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime, options); + return object; + }; + + /** + * Converts this RuleConfigInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + * @returns {Object.} JSON object + */ + RuleConfigInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RuleConfigInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RuleConfigInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.RuleConfigInfo"; + }; + + /** + * LastBackupState enum. + * @name google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState + * @enum {number} + * @property {number} LAST_BACKUP_STATE_UNSPECIFIED=0 LAST_BACKUP_STATE_UNSPECIFIED value + * @property {number} FIRST_BACKUP_PENDING=1 FIRST_BACKUP_PENDING value + * @property {number} PERMISSION_DENIED=2 PERMISSION_DENIED value + * @property {number} SUCCEEDED=3 SUCCEEDED value + * @property {number} FAILED=4 FAILED value + */ + RuleConfigInfo.LastBackupState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAST_BACKUP_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIRST_BACKUP_PENDING"] = 1; + values[valuesById[2] = "PERMISSION_DENIED"] = 2; + values[valuesById[3] = "SUCCEEDED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + return values; + })(); + + return RuleConfigInfo; + })(); + + v1.CreateBackupPlanAssociationRequest = (function() { + + /** + * Properties of a CreateBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ICreateBackupPlanAssociationRequest + * @property {string|null} [parent] CreateBackupPlanAssociationRequest parent + * @property {string|null} [backupPlanAssociationId] CreateBackupPlanAssociationRequest backupPlanAssociationId + * @property {google.cloud.backupdr.v1.IBackupPlanAssociation|null} [backupPlanAssociation] CreateBackupPlanAssociationRequest backupPlanAssociation + * @property {string|null} [requestId] CreateBackupPlanAssociationRequest requestId + */ + + /** + * Constructs a new CreateBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CreateBackupPlanAssociationRequest. + * @implements ICreateBackupPlanAssociationRequest + * @constructor + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest=} [properties] Properties to set + */ + function CreateBackupPlanAssociationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBackupPlanAssociationRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + */ + CreateBackupPlanAssociationRequest.prototype.parent = ""; + + /** + * CreateBackupPlanAssociationRequest backupPlanAssociationId. + * @member {string} backupPlanAssociationId + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + */ + CreateBackupPlanAssociationRequest.prototype.backupPlanAssociationId = ""; + + /** + * CreateBackupPlanAssociationRequest backupPlanAssociation. + * @member {google.cloud.backupdr.v1.IBackupPlanAssociation|null|undefined} backupPlanAssociation + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + */ + CreateBackupPlanAssociationRequest.prototype.backupPlanAssociation = null; + + /** + * CreateBackupPlanAssociationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + */ + CreateBackupPlanAssociationRequest.prototype.requestId = ""; + + /** + * Creates a new CreateBackupPlanAssociationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest instance + */ + CreateBackupPlanAssociationRequest.create = function create(properties) { + return new CreateBackupPlanAssociationRequest(properties); + }; + + /** + * Encodes the specified CreateBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupPlanAssociationRequest.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.backupPlanAssociationId != null && Object.hasOwnProperty.call(message, "backupPlanAssociationId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanAssociationId); + if (message.backupPlanAssociation != null && Object.hasOwnProperty.call(message, "backupPlanAssociation")) + $root.google.cloud.backupdr.v1.BackupPlanAssociation.encode(message.backupPlanAssociation, 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 CreateBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupPlanAssociationRequest.decode = function 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.backupdr.v1.CreateBackupPlanAssociationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.backupPlanAssociationId = reader.string(); + break; + } + case 3: { + message.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBackupPlanAssociationRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBackupPlanAssociationRequest.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.backupPlanAssociationId != null && message.hasOwnProperty("backupPlanAssociationId")) + if (!$util.isString(message.backupPlanAssociationId)) + return "backupPlanAssociationId: string expected"; + if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) { + var error = $root.google.cloud.backupdr.v1.BackupPlanAssociation.verify(message.backupPlanAssociation); + if (error) + return "backupPlanAssociation." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest + */ + CreateBackupPlanAssociationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupPlanAssociationId != null) + message.backupPlanAssociationId = String(object.backupPlanAssociationId); + if (object.backupPlanAssociation != null) { + if (typeof object.backupPlanAssociation !== "object") + throw TypeError(".google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.backupPlanAssociation: object expected"); + message.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.fromObject(object.backupPlanAssociation); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBackupPlanAssociationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupPlanAssociationId = ""; + object.backupPlanAssociation = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupPlanAssociationId != null && message.hasOwnProperty("backupPlanAssociationId")) + object.backupPlanAssociationId = message.backupPlanAssociationId; + if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) + object.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.toObject(message.backupPlanAssociation, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateBackupPlanAssociationRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateBackupPlanAssociationRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest"; + }; + + return CreateBackupPlanAssociationRequest; + })(); + + v1.ListBackupPlanAssociationsRequest = (function() { + + /** + * Properties of a ListBackupPlanAssociationsRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupPlanAssociationsRequest + * @property {string|null} [parent] ListBackupPlanAssociationsRequest parent + * @property {number|null} [pageSize] ListBackupPlanAssociationsRequest pageSize + * @property {string|null} [pageToken] ListBackupPlanAssociationsRequest pageToken + * @property {string|null} [filter] ListBackupPlanAssociationsRequest filter + */ + + /** + * Constructs a new ListBackupPlanAssociationsRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupPlanAssociationsRequest. + * @implements IListBackupPlanAssociationsRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest=} [properties] Properties to set + */ + function ListBackupPlanAssociationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupPlanAssociationsRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + */ + ListBackupPlanAssociationsRequest.prototype.parent = ""; + + /** + * ListBackupPlanAssociationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + */ + ListBackupPlanAssociationsRequest.prototype.pageSize = 0; + + /** + * ListBackupPlanAssociationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + */ + ListBackupPlanAssociationsRequest.prototype.pageToken = ""; + + /** + * ListBackupPlanAssociationsRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + */ + ListBackupPlanAssociationsRequest.prototype.filter = ""; + + /** + * Creates a new ListBackupPlanAssociationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest instance + */ + ListBackupPlanAssociationsRequest.create = function create(properties) { + return new ListBackupPlanAssociationsRequest(properties); + }; + + /** + * Encodes the specified ListBackupPlanAssociationsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlanAssociationsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListBackupPlanAssociationsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlanAssociationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlanAssociationsRequest.decode = function 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.backupdr.v1.ListBackupPlanAssociationsRequest(); + 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlanAssociationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupPlanAssociationsRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupPlanAssociationsRequest.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"; + return null; + }; + + /** + * Creates a ListBackupPlanAssociationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest + */ + ListBackupPlanAssociationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest(); + 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); + return message; + }; + + /** + * Creates a plain object from a ListBackupPlanAssociationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupPlanAssociationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + 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; + return object; + }; + + /** + * Converts this ListBackupPlanAssociationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupPlanAssociationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupPlanAssociationsRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupPlanAssociationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest"; + }; + + return ListBackupPlanAssociationsRequest; + })(); + + v1.ListBackupPlanAssociationsResponse = (function() { + + /** + * Properties of a ListBackupPlanAssociationsResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupPlanAssociationsResponse + * @property {Array.|null} [backupPlanAssociations] ListBackupPlanAssociationsResponse backupPlanAssociations + * @property {string|null} [nextPageToken] ListBackupPlanAssociationsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupPlanAssociationsResponse unreachable + */ + + /** + * Constructs a new ListBackupPlanAssociationsResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupPlanAssociationsResponse. + * @implements IListBackupPlanAssociationsResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse=} [properties] Properties to set + */ + function ListBackupPlanAssociationsResponse(properties) { + this.backupPlanAssociations = []; + 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]]; + } + + /** + * ListBackupPlanAssociationsResponse backupPlanAssociations. + * @member {Array.} backupPlanAssociations + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @instance + */ + ListBackupPlanAssociationsResponse.prototype.backupPlanAssociations = $util.emptyArray; + + /** + * ListBackupPlanAssociationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @instance + */ + ListBackupPlanAssociationsResponse.prototype.nextPageToken = ""; + + /** + * ListBackupPlanAssociationsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @instance + */ + ListBackupPlanAssociationsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupPlanAssociationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse instance + */ + ListBackupPlanAssociationsResponse.create = function create(properties) { + return new ListBackupPlanAssociationsResponse(properties); + }; + + /** + * Encodes the specified ListBackupPlanAssociationsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlanAssociationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPlanAssociations != null && message.backupPlanAssociations.length) + for (var i = 0; i < message.backupPlanAssociations.length; ++i) + $root.google.cloud.backupdr.v1.BackupPlanAssociation.encode(message.backupPlanAssociations[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 ListBackupPlanAssociationsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlanAssociationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlanAssociationsResponse.decode = function 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.backupdr.v1.ListBackupPlanAssociationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backupPlanAssociations && message.backupPlanAssociations.length)) + message.backupPlanAssociations = []; + message.backupPlanAssociations.push($root.google.cloud.backupdr.v1.BackupPlanAssociation.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 ListBackupPlanAssociationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlanAssociationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupPlanAssociationsResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupPlanAssociationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupPlanAssociations != null && message.hasOwnProperty("backupPlanAssociations")) { + if (!Array.isArray(message.backupPlanAssociations)) + return "backupPlanAssociations: array expected"; + for (var i = 0; i < message.backupPlanAssociations.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupPlanAssociation.verify(message.backupPlanAssociations[i]); + if (error) + return "backupPlanAssociations." + 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 ListBackupPlanAssociationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse + */ + ListBackupPlanAssociationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse(); + if (object.backupPlanAssociations) { + if (!Array.isArray(object.backupPlanAssociations)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.backupPlanAssociations: array expected"); + message.backupPlanAssociations = []; + for (var i = 0; i < object.backupPlanAssociations.length; ++i) { + if (typeof object.backupPlanAssociations[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.backupPlanAssociations: object expected"); + message.backupPlanAssociations[i] = $root.google.cloud.backupdr.v1.BackupPlanAssociation.fromObject(object.backupPlanAssociations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.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 ListBackupPlanAssociationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupPlanAssociationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupPlanAssociations = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backupPlanAssociations && message.backupPlanAssociations.length) { + object.backupPlanAssociations = []; + for (var j = 0; j < message.backupPlanAssociations.length; ++j) + object.backupPlanAssociations[j] = $root.google.cloud.backupdr.v1.BackupPlanAssociation.toObject(message.backupPlanAssociations[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 ListBackupPlanAssociationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupPlanAssociationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupPlanAssociationsResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupPlanAssociationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse"; + }; + + return ListBackupPlanAssociationsResponse; + })(); + + v1.GetBackupPlanAssociationRequest = (function() { + + /** + * Properties of a GetBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetBackupPlanAssociationRequest + * @property {string|null} [name] GetBackupPlanAssociationRequest name + */ + + /** + * Constructs a new GetBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetBackupPlanAssociationRequest. + * @implements IGetBackupPlanAssociationRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest=} [properties] Properties to set + */ + function GetBackupPlanAssociationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupPlanAssociationRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @instance + */ + GetBackupPlanAssociationRequest.prototype.name = ""; + + /** + * Creates a new GetBackupPlanAssociationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest instance + */ + GetBackupPlanAssociationRequest.create = function create(properties) { + return new GetBackupPlanAssociationRequest(properties); + }; + + /** + * Encodes the specified GetBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupPlanAssociationRequest.decode = function 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.backupdr.v1.GetBackupPlanAssociationRequest(); + 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 GetBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupPlanAssociationRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest + */ + GetBackupPlanAssociationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupPlanAssociationRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupPlanAssociationRequest"; + }; + + return GetBackupPlanAssociationRequest; + })(); + + v1.DeleteBackupPlanAssociationRequest = (function() { + + /** + * Properties of a DeleteBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IDeleteBackupPlanAssociationRequest + * @property {string|null} [name] DeleteBackupPlanAssociationRequest name + * @property {string|null} [requestId] DeleteBackupPlanAssociationRequest requestId + */ + + /** + * Constructs a new DeleteBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DeleteBackupPlanAssociationRequest. + * @implements IDeleteBackupPlanAssociationRequest + * @constructor + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest=} [properties] Properties to set + */ + function DeleteBackupPlanAssociationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupPlanAssociationRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @instance + */ + DeleteBackupPlanAssociationRequest.prototype.name = ""; + + /** + * DeleteBackupPlanAssociationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @instance + */ + DeleteBackupPlanAssociationRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteBackupPlanAssociationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest instance + */ + DeleteBackupPlanAssociationRequest.create = function create(properties) { + return new DeleteBackupPlanAssociationRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupPlanAssociationRequest.decode = function 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.backupdr.v1.DeleteBackupPlanAssociationRequest(); + 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 DeleteBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupPlanAssociationRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest + */ + DeleteBackupPlanAssociationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest(); + 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 DeleteBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupPlanAssociationRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest"; + }; + + return DeleteBackupPlanAssociationRequest; + })(); + + v1.TriggerBackupRequest = (function() { + + /** + * Properties of a TriggerBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ITriggerBackupRequest + * @property {string|null} [name] TriggerBackupRequest name + * @property {string|null} [ruleId] TriggerBackupRequest ruleId + * @property {string|null} [requestId] TriggerBackupRequest requestId + */ + + /** + * Constructs a new TriggerBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a TriggerBackupRequest. + * @implements ITriggerBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest=} [properties] Properties to set + */ + function TriggerBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TriggerBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @instance + */ + TriggerBackupRequest.prototype.name = ""; + + /** + * TriggerBackupRequest ruleId. + * @member {string} ruleId + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @instance + */ + TriggerBackupRequest.prototype.ruleId = ""; + + /** + * TriggerBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @instance + */ + TriggerBackupRequest.prototype.requestId = ""; + + /** + * Creates a new TriggerBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest instance + */ + TriggerBackupRequest.create = function create(properties) { + return new TriggerBackupRequest(properties); + }; + + /** + * Encodes the specified TriggerBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} message TriggerBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerBackupRequest.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.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ruleId); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified TriggerBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} message TriggerBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TriggerBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerBackupRequest.decode = function 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.backupdr.v1.TriggerBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.ruleId = reader.string(); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TriggerBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TriggerBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TriggerBackupRequest.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.ruleId != null && message.hasOwnProperty("ruleId")) + if (!$util.isString(message.ruleId)) + return "ruleId: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a TriggerBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest + */ + TriggerBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.TriggerBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.TriggerBackupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.ruleId != null) + message.ruleId = String(object.ruleId); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a TriggerBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {google.cloud.backupdr.v1.TriggerBackupRequest} message TriggerBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TriggerBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.ruleId = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + object.ruleId = message.ruleId; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this TriggerBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @instance + * @returns {Object.} JSON object + */ + TriggerBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TriggerBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TriggerBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.TriggerBackupRequest"; + }; + + return TriggerBackupRequest; + })(); + + v1.BackupVault = (function() { + + /** + * Properties of a BackupVault. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupVault + * @property {string|null} [name] BackupVault name + * @property {string|null} [description] BackupVault description + * @property {Object.|null} [labels] BackupVault labels + * @property {google.protobuf.ITimestamp|null} [createTime] BackupVault createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] BackupVault updateTime + * @property {google.protobuf.IDuration|null} [backupMinimumEnforcedRetentionDuration] BackupVault backupMinimumEnforcedRetentionDuration + * @property {boolean|null} [deletable] BackupVault deletable + * @property {string|null} [etag] BackupVault etag + * @property {google.cloud.backupdr.v1.BackupVault.State|null} [state] BackupVault state + * @property {google.protobuf.ITimestamp|null} [effectiveTime] BackupVault effectiveTime + * @property {number|Long|null} [backupCount] BackupVault backupCount + * @property {string|null} [serviceAccount] BackupVault serviceAccount + * @property {number|Long|null} [totalStoredBytes] BackupVault totalStoredBytes + * @property {string|null} [uid] BackupVault uid + * @property {Object.|null} [annotations] BackupVault annotations + * @property {google.cloud.backupdr.v1.BackupVault.AccessRestriction|null} [accessRestriction] BackupVault accessRestriction + */ + + /** + * Constructs a new BackupVault. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupVault. + * @implements IBackupVault + * @constructor + * @param {google.cloud.backupdr.v1.IBackupVault=} [properties] Properties to set + */ + function BackupVault(properties) { + this.labels = {}; + this.annotations = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupVault name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.name = ""; + + /** + * BackupVault description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.description = null; + + /** + * BackupVault labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.labels = $util.emptyObject; + + /** + * BackupVault createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.createTime = null; + + /** + * BackupVault updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.updateTime = null; + + /** + * BackupVault backupMinimumEnforcedRetentionDuration. + * @member {google.protobuf.IDuration|null|undefined} backupMinimumEnforcedRetentionDuration + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.backupMinimumEnforcedRetentionDuration = null; + + /** + * BackupVault deletable. + * @member {boolean|null|undefined} deletable + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.deletable = null; + + /** + * BackupVault etag. + * @member {string|null|undefined} etag + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.etag = null; + + /** + * BackupVault state. + * @member {google.cloud.backupdr.v1.BackupVault.State} state + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.state = 0; + + /** + * BackupVault effectiveTime. + * @member {google.protobuf.ITimestamp|null|undefined} effectiveTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.effectiveTime = null; + + /** + * BackupVault backupCount. + * @member {number|Long} backupCount + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.backupCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupVault serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.serviceAccount = ""; + + /** + * BackupVault totalStoredBytes. + * @member {number|Long} totalStoredBytes + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.totalStoredBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupVault uid. + * @member {string} uid + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.uid = ""; + + /** + * BackupVault annotations. + * @member {Object.} annotations + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.annotations = $util.emptyObject; + + /** + * BackupVault accessRestriction. + * @member {google.cloud.backupdr.v1.BackupVault.AccessRestriction} accessRestriction + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.accessRestriction = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupVault _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _createTime. + * @member {"createTime"|undefined} _createTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_createTime", { + get: $util.oneOfGetter($oneOfFields = ["createTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _updateTime. + * @member {"updateTime"|undefined} _updateTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _backupMinimumEnforcedRetentionDuration. + * @member {"backupMinimumEnforcedRetentionDuration"|undefined} _backupMinimumEnforcedRetentionDuration + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_backupMinimumEnforcedRetentionDuration", { + get: $util.oneOfGetter($oneOfFields = ["backupMinimumEnforcedRetentionDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _deletable. + * @member {"deletable"|undefined} _deletable + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_deletable", { + get: $util.oneOfGetter($oneOfFields = ["deletable"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _etag. + * @member {"etag"|undefined} _etag + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_etag", { + get: $util.oneOfGetter($oneOfFields = ["etag"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _effectiveTime. + * @member {"effectiveTime"|undefined} _effectiveTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_effectiveTime", { + get: $util.oneOfGetter($oneOfFields = ["effectiveTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupVault instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {google.cloud.backupdr.v1.IBackupVault=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault instance + */ + BackupVault.create = function create(properties) { + return new BackupVault(properties); + }; + + /** + * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {google.cloud.backupdr.v1.IBackupVault} message BackupVault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupVault.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + 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 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.deletable != null && Object.hasOwnProperty.call(message, "deletable")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.deletable); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.etag); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); + if (message.effectiveTime != null && Object.hasOwnProperty.call(message, "effectiveTime")) + $root.google.protobuf.Timestamp.encode(message.effectiveTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.backupCount != null && Object.hasOwnProperty.call(message, "backupCount")) + writer.uint32(/* id 17, wireType 0 =*/136).int64(message.backupCount); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.serviceAccount); + if (message.totalStoredBytes != null && Object.hasOwnProperty.call(message, "totalStoredBytes")) + writer.uint32(/* id 19, wireType 0 =*/152).int64(message.totalStoredBytes); + if (message.backupMinimumEnforcedRetentionDuration != null && Object.hasOwnProperty.call(message, "backupMinimumEnforcedRetentionDuration")) + $root.google.protobuf.Duration.encode(message.backupMinimumEnforcedRetentionDuration, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.uid); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.accessRestriction != null && Object.hasOwnProperty.call(message, "accessRestriction")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.accessRestriction); + return writer; + }; + + /** + * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {google.cloud.backupdr.v1.IBackupVault} message BackupVault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupVault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupVault message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupVault.decode = function 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.backupdr.v1.BackupVault(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + 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 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 20: { + message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 8: { + message.deletable = reader.bool(); + break; + } + case 9: { + message.etag = reader.string(); + break; + } + case 10: { + message.state = reader.int32(); + break; + } + case 12: { + message.effectiveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 17: { + message.backupCount = reader.int64(); + break; + } + case 18: { + message.serviceAccount = reader.string(); + break; + } + case 19: { + message.totalStoredBytes = reader.int64(); + break; + } + case 21: { + message.uid = reader.string(); + break; + } + case 22: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + 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.annotations[key] = value; + break; + } + case 24: { + message.accessRestriction = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupVault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupVault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupVault message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupVault.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.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + properties._createTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + } + if (message.backupMinimumEnforcedRetentionDuration != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDuration")) { + properties._backupMinimumEnforcedRetentionDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.backupMinimumEnforcedRetentionDuration); + if (error) + return "backupMinimumEnforcedRetentionDuration." + error; + } + } + if (message.deletable != null && message.hasOwnProperty("deletable")) { + properties._deletable = 1; + if (typeof message.deletable !== "boolean") + return "deletable: boolean expected"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + properties._etag = 1; + if (!$util.isString(message.etag)) + return "etag: 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.effectiveTime != null && message.hasOwnProperty("effectiveTime")) { + properties._effectiveTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.effectiveTime); + if (error) + return "effectiveTime." + error; + } + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) + if (!$util.isInteger(message.backupCount) && !(message.backupCount && $util.isInteger(message.backupCount.low) && $util.isInteger(message.backupCount.high))) + return "backupCount: integer|Long expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) + if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) + return "totalStoredBytes: integer|Long expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) + switch (message.accessRestriction) { + default: + return "accessRestriction: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault + */ + BackupVault.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupVault) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupVault(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.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.backupdr.v1.BackupVault.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.backupMinimumEnforcedRetentionDuration != null) { + if (typeof object.backupMinimumEnforcedRetentionDuration !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.backupMinimumEnforcedRetentionDuration: object expected"); + message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.fromObject(object.backupMinimumEnforcedRetentionDuration); + } + if (object.deletable != null) + message.deletable = Boolean(object.deletable); + if (object.etag != null) + message.etag = String(object.etag); + 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 "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.effectiveTime != null) { + if (typeof object.effectiveTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.effectiveTime: object expected"); + message.effectiveTime = $root.google.protobuf.Timestamp.fromObject(object.effectiveTime); + } + if (object.backupCount != null) + if ($util.Long) + (message.backupCount = $util.Long.fromValue(object.backupCount)).unsigned = false; + else if (typeof object.backupCount === "string") + message.backupCount = parseInt(object.backupCount, 10); + else if (typeof object.backupCount === "number") + message.backupCount = object.backupCount; + else if (typeof object.backupCount === "object") + message.backupCount = new $util.LongBits(object.backupCount.low >>> 0, object.backupCount.high >>> 0).toNumber(); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.totalStoredBytes != null) + if ($util.Long) + (message.totalStoredBytes = $util.Long.fromValue(object.totalStoredBytes)).unsigned = false; + else if (typeof object.totalStoredBytes === "string") + message.totalStoredBytes = parseInt(object.totalStoredBytes, 10); + else if (typeof object.totalStoredBytes === "number") + message.totalStoredBytes = object.totalStoredBytes; + else if (typeof object.totalStoredBytes === "object") + message.totalStoredBytes = new $util.LongBits(object.totalStoredBytes.low >>> 0, object.totalStoredBytes.high >>> 0).toNumber(); + if (object.uid != null) + message.uid = String(object.uid); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + switch (object.accessRestriction) { + default: + if (typeof object.accessRestriction === "number") { + message.accessRestriction = object.accessRestriction; + break; + } + break; + case "ACCESS_RESTRICTION_UNSPECIFIED": + case 0: + message.accessRestriction = 0; + break; + case "WITHIN_PROJECT": + case 1: + message.accessRestriction = 1; + break; + case "WITHIN_ORGANIZATION": + case 2: + message.accessRestriction = 2; + break; + case "UNRESTRICTED": + case 3: + message.accessRestriction = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a BackupVault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {google.cloud.backupdr.v1.BackupVault} message BackupVault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupVault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.labels = {}; + object.annotations = {}; + } + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.backupCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.backupCount = options.longs === String ? "0" : 0; + object.serviceAccount = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalStoredBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalStoredBytes = options.longs === String ? "0" : 0; + object.uid = ""; + object.accessRestriction = options.enums === String ? "ACCESS_RESTRICTION_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + 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.createTime != null && message.hasOwnProperty("createTime")) { + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (options.oneofs) + object._createTime = "createTime"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + if (message.deletable != null && message.hasOwnProperty("deletable")) { + object.deletable = message.deletable; + if (options.oneofs) + object._deletable = "deletable"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + object.etag = message.etag; + if (options.oneofs) + object._etag = "etag"; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupVault.State[message.state] : message.state; + if (message.effectiveTime != null && message.hasOwnProperty("effectiveTime")) { + object.effectiveTime = $root.google.protobuf.Timestamp.toObject(message.effectiveTime, options); + if (options.oneofs) + object._effectiveTime = "effectiveTime"; + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) + if (typeof message.backupCount === "number") + object.backupCount = options.longs === String ? String(message.backupCount) : message.backupCount; + else + object.backupCount = options.longs === String ? $util.Long.prototype.toString.call(message.backupCount) : options.longs === Number ? new $util.LongBits(message.backupCount.low >>> 0, message.backupCount.high >>> 0).toNumber() : message.backupCount; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) + if (typeof message.totalStoredBytes === "number") + object.totalStoredBytes = options.longs === String ? String(message.totalStoredBytes) : message.totalStoredBytes; + else + object.totalStoredBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStoredBytes) : options.longs === Number ? new $util.LongBits(message.totalStoredBytes.low >>> 0, message.totalStoredBytes.high >>> 0).toNumber() : message.totalStoredBytes; + if (message.backupMinimumEnforcedRetentionDuration != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDuration")) { + object.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.toObject(message.backupMinimumEnforcedRetentionDuration, options); + if (options.oneofs) + object._backupMinimumEnforcedRetentionDuration = "backupMinimumEnforcedRetentionDuration"; + } + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) + object.accessRestriction = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] === undefined ? message.accessRestriction : $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] : message.accessRestriction; + return object; + }; + + /** + * Converts this BackupVault to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + * @returns {Object.} JSON object + */ + BackupVault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupVault + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupVault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupVault"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.BackupVault.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} ERROR=4 ERROR value + */ + BackupVault.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + /** + * AccessRestriction enum. + * @name google.cloud.backupdr.v1.BackupVault.AccessRestriction + * @enum {number} + * @property {number} ACCESS_RESTRICTION_UNSPECIFIED=0 ACCESS_RESTRICTION_UNSPECIFIED value + * @property {number} WITHIN_PROJECT=1 WITHIN_PROJECT value + * @property {number} WITHIN_ORGANIZATION=2 WITHIN_ORGANIZATION value + * @property {number} UNRESTRICTED=3 UNRESTRICTED value + */ + BackupVault.AccessRestriction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_RESTRICTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "WITHIN_PROJECT"] = 1; + values[valuesById[2] = "WITHIN_ORGANIZATION"] = 2; + values[valuesById[3] = "UNRESTRICTED"] = 3; + return values; + })(); + + return BackupVault; + })(); + + v1.DataSource = (function() { + + /** + * Properties of a DataSource. + * @memberof google.cloud.backupdr.v1 + * @interface IDataSource + * @property {string|null} [name] DataSource name + * @property {google.cloud.backupdr.v1.DataSource.State|null} [state] DataSource state + * @property {Object.|null} [labels] DataSource labels + * @property {google.protobuf.ITimestamp|null} [createTime] DataSource createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DataSource updateTime + * @property {number|Long|null} [backupCount] DataSource backupCount + * @property {string|null} [etag] DataSource etag + * @property {number|Long|null} [totalStoredBytes] DataSource totalStoredBytes + * @property {google.cloud.backupdr.v1.BackupConfigState|null} [configState] DataSource configState + * @property {google.cloud.backupdr.v1.IBackupConfigInfo|null} [backupConfigInfo] DataSource backupConfigInfo + * @property {google.cloud.backupdr.v1.IDataSourceGcpResource|null} [dataSourceGcpResource] DataSource dataSourceGcpResource + * @property {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null} [dataSourceBackupApplianceApplication] DataSource dataSourceBackupApplianceApplication + */ + + /** + * Constructs a new DataSource. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DataSource. + * @implements IDataSource + * @constructor + * @param {google.cloud.backupdr.v1.IDataSource=} [properties] Properties to set + */ + function DataSource(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]]; + } + + /** + * DataSource name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.name = ""; + + /** + * DataSource state. + * @member {google.cloud.backupdr.v1.DataSource.State} state + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.state = 0; + + /** + * DataSource labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.labels = $util.emptyObject; + + /** + * DataSource createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.createTime = null; + + /** + * DataSource updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.updateTime = null; + + /** + * DataSource backupCount. + * @member {number|Long|null|undefined} backupCount + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.backupCount = null; + + /** + * DataSource etag. + * @member {string|null|undefined} etag + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.etag = null; + + /** + * DataSource totalStoredBytes. + * @member {number|Long|null|undefined} totalStoredBytes + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.totalStoredBytes = null; + + /** + * DataSource configState. + * @member {google.cloud.backupdr.v1.BackupConfigState} configState + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.configState = 0; + + /** + * DataSource backupConfigInfo. + * @member {google.cloud.backupdr.v1.IBackupConfigInfo|null|undefined} backupConfigInfo + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.backupConfigInfo = null; + + /** + * DataSource dataSourceGcpResource. + * @member {google.cloud.backupdr.v1.IDataSourceGcpResource|null|undefined} dataSourceGcpResource + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.dataSourceGcpResource = null; + + /** + * DataSource dataSourceBackupApplianceApplication. + * @member {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null|undefined} dataSourceBackupApplianceApplication + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.dataSourceBackupApplianceApplication = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataSource _createTime. + * @member {"createTime"|undefined} _createTime + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_createTime", { + get: $util.oneOfGetter($oneOfFields = ["createTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource _updateTime. + * @member {"updateTime"|undefined} _updateTime + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource _backupCount. + * @member {"backupCount"|undefined} _backupCount + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_backupCount", { + get: $util.oneOfGetter($oneOfFields = ["backupCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource _etag. + * @member {"etag"|undefined} _etag + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_etag", { + get: $util.oneOfGetter($oneOfFields = ["etag"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource _totalStoredBytes. + * @member {"totalStoredBytes"|undefined} _totalStoredBytes + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_totalStoredBytes", { + get: $util.oneOfGetter($oneOfFields = ["totalStoredBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource sourceResource. + * @member {"dataSourceGcpResource"|"dataSourceBackupApplianceApplication"|undefined} sourceResource + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "sourceResource", { + get: $util.oneOfGetter($oneOfFields = ["dataSourceGcpResource", "dataSourceBackupApplianceApplication"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataSource instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {google.cloud.backupdr.v1.IDataSource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DataSource} DataSource instance + */ + DataSource.create = function create(properties) { + return new DataSource(properties); + }; + + /** + * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {google.cloud.backupdr.v1.IDataSource} message DataSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.labels != null && 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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.backupCount != null && Object.hasOwnProperty.call(message, "backupCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.backupCount); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.etag); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.state); + if (message.totalStoredBytes != null && Object.hasOwnProperty.call(message, "totalStoredBytes")) + writer.uint32(/* id 23, wireType 0 =*/184).int64(message.totalStoredBytes); + if (message.configState != null && Object.hasOwnProperty.call(message, "configState")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.configState); + if (message.backupConfigInfo != null && Object.hasOwnProperty.call(message, "backupConfigInfo")) + $root.google.cloud.backupdr.v1.BackupConfigInfo.encode(message.backupConfigInfo, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dataSourceGcpResource != null && Object.hasOwnProperty.call(message, "dataSourceGcpResource")) + $root.google.cloud.backupdr.v1.DataSourceGcpResource.encode(message.dataSourceGcpResource, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.dataSourceBackupApplianceApplication != null && Object.hasOwnProperty.call(message, "dataSourceBackupApplianceApplication")) + $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.encode(message.dataSourceBackupApplianceApplication, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {google.cloud.backupdr.v1.IDataSource} message DataSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DataSource} DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSource.decode = function 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.backupdr.v1.DataSource(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 21: { + message.state = reader.int32(); + 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.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.backupCount = reader.int64(); + break; + } + case 14: { + message.etag = reader.string(); + break; + } + case 23: { + message.totalStoredBytes = reader.int64(); + break; + } + case 24: { + message.configState = reader.int32(); + break; + } + case 25: { + message.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.decode(reader, reader.uint32()); + break; + } + case 27: { + message.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DataSource} DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSource message. + * @function verify + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSource.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.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.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.createTime != null && message.hasOwnProperty("createTime")) { + properties._createTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) { + properties._backupCount = 1; + if (!$util.isInteger(message.backupCount) && !(message.backupCount && $util.isInteger(message.backupCount.low) && $util.isInteger(message.backupCount.high))) + return "backupCount: integer|Long expected"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + properties._etag = 1; + if (!$util.isString(message.etag)) + return "etag: string expected"; + } + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { + properties._totalStoredBytes = 1; + if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) + return "totalStoredBytes: integer|Long expected"; + } + if (message.configState != null && message.hasOwnProperty("configState")) + switch (message.configState) { + default: + return "configState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.backupConfigInfo != null && message.hasOwnProperty("backupConfigInfo")) { + var error = $root.google.cloud.backupdr.v1.BackupConfigInfo.verify(message.backupConfigInfo); + if (error) + return "backupConfigInfo." + error; + } + if (message.dataSourceGcpResource != null && message.hasOwnProperty("dataSourceGcpResource")) { + properties.sourceResource = 1; + { + var error = $root.google.cloud.backupdr.v1.DataSourceGcpResource.verify(message.dataSourceGcpResource); + if (error) + return "dataSourceGcpResource." + error; + } + } + if (message.dataSourceBackupApplianceApplication != null && message.hasOwnProperty("dataSourceBackupApplianceApplication")) { + if (properties.sourceResource === 1) + return "sourceResource: multiple values"; + properties.sourceResource = 1; + { + var error = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify(message.dataSourceBackupApplianceApplication); + if (error) + return "dataSourceBackupApplianceApplication." + error; + } + } + return null; + }; + + /** + * Creates a DataSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DataSource} DataSource + */ + DataSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DataSource) + return object; + var message = new $root.google.cloud.backupdr.v1.DataSource(); + if (object.name != null) + message.name = String(object.name); + 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 "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.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.backupdr.v1.DataSource.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.backupCount != null) + if ($util.Long) + (message.backupCount = $util.Long.fromValue(object.backupCount)).unsigned = false; + else if (typeof object.backupCount === "string") + message.backupCount = parseInt(object.backupCount, 10); + else if (typeof object.backupCount === "number") + message.backupCount = object.backupCount; + else if (typeof object.backupCount === "object") + message.backupCount = new $util.LongBits(object.backupCount.low >>> 0, object.backupCount.high >>> 0).toNumber(); + if (object.etag != null) + message.etag = String(object.etag); + if (object.totalStoredBytes != null) + if ($util.Long) + (message.totalStoredBytes = $util.Long.fromValue(object.totalStoredBytes)).unsigned = false; + else if (typeof object.totalStoredBytes === "string") + message.totalStoredBytes = parseInt(object.totalStoredBytes, 10); + else if (typeof object.totalStoredBytes === "number") + message.totalStoredBytes = object.totalStoredBytes; + else if (typeof object.totalStoredBytes === "object") + message.totalStoredBytes = new $util.LongBits(object.totalStoredBytes.low >>> 0, object.totalStoredBytes.high >>> 0).toNumber(); + switch (object.configState) { + default: + if (typeof object.configState === "number") { + message.configState = object.configState; + break; + } + break; + case "BACKUP_CONFIG_STATE_UNSPECIFIED": + case 0: + message.configState = 0; + break; + case "ACTIVE": + case 1: + message.configState = 1; + break; + case "PASSIVE": + case 2: + message.configState = 2; + break; + } + if (object.backupConfigInfo != null) { + if (typeof object.backupConfigInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.backupConfigInfo: object expected"); + message.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.fromObject(object.backupConfigInfo); + } + if (object.dataSourceGcpResource != null) { + if (typeof object.dataSourceGcpResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.dataSourceGcpResource: object expected"); + message.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.fromObject(object.dataSourceGcpResource); + } + if (object.dataSourceBackupApplianceApplication != null) { + if (typeof object.dataSourceBackupApplianceApplication !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.dataSourceBackupApplianceApplication: object expected"); + message.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.fromObject(object.dataSourceBackupApplianceApplication); + } + return message; + }; + + /** + * Creates a plain object from a DataSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {google.cloud.backupdr.v1.DataSource} message DataSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.configState = options.enums === String ? "BACKUP_CONFIG_STATE_UNSPECIFIED" : 0; + object.backupConfigInfo = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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.createTime != null && message.hasOwnProperty("createTime")) { + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (options.oneofs) + object._createTime = "createTime"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) { + if (typeof message.backupCount === "number") + object.backupCount = options.longs === String ? String(message.backupCount) : message.backupCount; + else + object.backupCount = options.longs === String ? $util.Long.prototype.toString.call(message.backupCount) : options.longs === Number ? new $util.LongBits(message.backupCount.low >>> 0, message.backupCount.high >>> 0).toNumber() : message.backupCount; + if (options.oneofs) + object._backupCount = "backupCount"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + object.etag = message.etag; + if (options.oneofs) + object._etag = "etag"; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.DataSource.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.DataSource.State[message.state] : message.state; + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { + if (typeof message.totalStoredBytes === "number") + object.totalStoredBytes = options.longs === String ? String(message.totalStoredBytes) : message.totalStoredBytes; + else + object.totalStoredBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStoredBytes) : options.longs === Number ? new $util.LongBits(message.totalStoredBytes.low >>> 0, message.totalStoredBytes.high >>> 0).toNumber() : message.totalStoredBytes; + if (options.oneofs) + object._totalStoredBytes = "totalStoredBytes"; + } + if (message.configState != null && message.hasOwnProperty("configState")) + object.configState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigState[message.configState] === undefined ? message.configState : $root.google.cloud.backupdr.v1.BackupConfigState[message.configState] : message.configState; + if (message.backupConfigInfo != null && message.hasOwnProperty("backupConfigInfo")) + object.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.toObject(message.backupConfigInfo, options); + if (message.dataSourceGcpResource != null && message.hasOwnProperty("dataSourceGcpResource")) { + object.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.toObject(message.dataSourceGcpResource, options); + if (options.oneofs) + object.sourceResource = "dataSourceGcpResource"; + } + if (message.dataSourceBackupApplianceApplication != null && message.hasOwnProperty("dataSourceBackupApplianceApplication")) { + object.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.toObject(message.dataSourceBackupApplianceApplication, options); + if (options.oneofs) + object.sourceResource = "dataSourceBackupApplianceApplication"; + } + return object; + }; + + /** + * Converts this DataSource to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + * @returns {Object.} JSON object + */ + DataSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataSource + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSource"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.DataSource.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} ERROR=4 ERROR value + */ + DataSource.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + return DataSource; + })(); + + v1.BackupConfigInfo = (function() { + + /** + * Properties of a BackupConfigInfo. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupConfigInfo + * @property {google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|null} [lastBackupState] BackupConfigInfo lastBackupState + * @property {google.protobuf.ITimestamp|null} [lastSuccessfulBackupConsistencyTime] BackupConfigInfo lastSuccessfulBackupConsistencyTime + * @property {google.rpc.IStatus|null} [lastBackupError] BackupConfigInfo lastBackupError + * @property {google.cloud.backupdr.v1.IGcpBackupConfig|null} [gcpBackupConfig] BackupConfigInfo gcpBackupConfig + * @property {google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null} [backupApplianceBackupConfig] BackupConfigInfo backupApplianceBackupConfig + */ + + /** + * Constructs a new BackupConfigInfo. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupConfigInfo. + * @implements IBackupConfigInfo + * @constructor + * @param {google.cloud.backupdr.v1.IBackupConfigInfo=} [properties] Properties to set + */ + function BackupConfigInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupConfigInfo lastBackupState. + * @member {google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState} lastBackupState + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.lastBackupState = 0; + + /** + * BackupConfigInfo lastSuccessfulBackupConsistencyTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastSuccessfulBackupConsistencyTime + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.lastSuccessfulBackupConsistencyTime = null; + + /** + * BackupConfigInfo lastBackupError. + * @member {google.rpc.IStatus|null|undefined} lastBackupError + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.lastBackupError = null; + + /** + * BackupConfigInfo gcpBackupConfig. + * @member {google.cloud.backupdr.v1.IGcpBackupConfig|null|undefined} gcpBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.gcpBackupConfig = null; + + /** + * BackupConfigInfo backupApplianceBackupConfig. + * @member {google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null|undefined} backupApplianceBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.backupApplianceBackupConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupConfigInfo backupConfig. + * @member {"gcpBackupConfig"|"backupApplianceBackupConfig"|undefined} backupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + Object.defineProperty(BackupConfigInfo.prototype, "backupConfig", { + get: $util.oneOfGetter($oneOfFields = ["gcpBackupConfig", "backupApplianceBackupConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupConfigInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupConfigInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo instance + */ + BackupConfigInfo.create = function create(properties) { + return new BackupConfigInfo(properties); + }; + + /** + * Encodes the specified BackupConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupConfigInfo} message BackupConfigInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupConfigInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lastBackupState != null && Object.hasOwnProperty.call(message, "lastBackupState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.lastBackupState); + if (message.lastSuccessfulBackupConsistencyTime != null && Object.hasOwnProperty.call(message, "lastSuccessfulBackupConsistencyTime")) + $root.google.protobuf.Timestamp.encode(message.lastSuccessfulBackupConsistencyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.lastBackupError != null && Object.hasOwnProperty.call(message, "lastBackupError")) + $root.google.rpc.Status.encode(message.lastBackupError, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.gcpBackupConfig != null && Object.hasOwnProperty.call(message, "gcpBackupConfig")) + $root.google.cloud.backupdr.v1.GcpBackupConfig.encode(message.gcpBackupConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.backupApplianceBackupConfig != null && Object.hasOwnProperty.call(message, "backupApplianceBackupConfig")) + $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.encode(message.backupApplianceBackupConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BackupConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupConfigInfo} message BackupConfigInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupConfigInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupConfigInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupConfigInfo.decode = function 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.backupdr.v1.BackupConfigInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.lastBackupState = reader.int32(); + break; + } + case 2: { + message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.lastBackupError = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 4: { + message.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupConfigInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupConfigInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupConfigInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupConfigInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) + switch (message.lastBackupState) { + default: + return "lastBackupState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime); + if (error) + return "lastSuccessfulBackupConsistencyTime." + error; + } + if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) { + var error = $root.google.rpc.Status.verify(message.lastBackupError); + if (error) + return "lastBackupError." + error; + } + if (message.gcpBackupConfig != null && message.hasOwnProperty("gcpBackupConfig")) { + properties.backupConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.GcpBackupConfig.verify(message.gcpBackupConfig); + if (error) + return "gcpBackupConfig." + error; + } + } + if (message.backupApplianceBackupConfig != null && message.hasOwnProperty("backupApplianceBackupConfig")) { + if (properties.backupConfig === 1) + return "backupConfig: multiple values"; + properties.backupConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify(message.backupApplianceBackupConfig); + if (error) + return "backupApplianceBackupConfig." + error; + } + } + return null; + }; + + /** + * Creates a BackupConfigInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo + */ + BackupConfigInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupConfigInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupConfigInfo(); + switch (object.lastBackupState) { + default: + if (typeof object.lastBackupState === "number") { + message.lastBackupState = object.lastBackupState; + break; + } + break; + case "LAST_BACKUP_STATE_UNSPECIFIED": + case 0: + message.lastBackupState = 0; + break; + case "FIRST_BACKUP_PENDING": + case 1: + message.lastBackupState = 1; + break; + case "SUCCEEDED": + case 2: + message.lastBackupState = 2; + break; + case "FAILED": + case 3: + message.lastBackupState = 3; + break; + case "PERMISSION_DENIED": + case 4: + message.lastBackupState = 4; + break; + } + if (object.lastSuccessfulBackupConsistencyTime != null) { + if (typeof object.lastSuccessfulBackupConsistencyTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.lastSuccessfulBackupConsistencyTime: object expected"); + message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime); + } + if (object.lastBackupError != null) { + if (typeof object.lastBackupError !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.lastBackupError: object expected"); + message.lastBackupError = $root.google.rpc.Status.fromObject(object.lastBackupError); + } + if (object.gcpBackupConfig != null) { + if (typeof object.gcpBackupConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.gcpBackupConfig: object expected"); + message.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.fromObject(object.gcpBackupConfig); + } + if (object.backupApplianceBackupConfig != null) { + if (typeof object.backupApplianceBackupConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.backupApplianceBackupConfig: object expected"); + message.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.fromObject(object.backupApplianceBackupConfig); + } + return message; + }; + + /** + * Creates a plain object from a BackupConfigInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {google.cloud.backupdr.v1.BackupConfigInfo} message BackupConfigInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupConfigInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lastBackupState = options.enums === String ? "LAST_BACKUP_STATE_UNSPECIFIED" : 0; + object.lastSuccessfulBackupConsistencyTime = null; + object.lastBackupError = null; + } + if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) + object.lastBackupState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState[message.lastBackupState] === undefined ? message.lastBackupState : $root.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState[message.lastBackupState] : message.lastBackupState; + if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) + object.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime, options); + if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) + object.lastBackupError = $root.google.rpc.Status.toObject(message.lastBackupError, options); + if (message.gcpBackupConfig != null && message.hasOwnProperty("gcpBackupConfig")) { + object.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.toObject(message.gcpBackupConfig, options); + if (options.oneofs) + object.backupConfig = "gcpBackupConfig"; + } + if (message.backupApplianceBackupConfig != null && message.hasOwnProperty("backupApplianceBackupConfig")) { + object.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.toObject(message.backupApplianceBackupConfig, options); + if (options.oneofs) + object.backupConfig = "backupApplianceBackupConfig"; + } + return object; + }; + + /** + * Converts this BackupConfigInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + * @returns {Object.} JSON object + */ + BackupConfigInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupConfigInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupConfigInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupConfigInfo"; + }; + + /** + * LastBackupState enum. + * @name google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState + * @enum {number} + * @property {number} LAST_BACKUP_STATE_UNSPECIFIED=0 LAST_BACKUP_STATE_UNSPECIFIED value + * @property {number} FIRST_BACKUP_PENDING=1 FIRST_BACKUP_PENDING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + * @property {number} PERMISSION_DENIED=4 PERMISSION_DENIED value + */ + BackupConfigInfo.LastBackupState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAST_BACKUP_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIRST_BACKUP_PENDING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "PERMISSION_DENIED"] = 4; + return values; + })(); + + return BackupConfigInfo; + })(); + + v1.GcpBackupConfig = (function() { + + /** + * Properties of a GcpBackupConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IGcpBackupConfig + * @property {string|null} [backupPlan] GcpBackupConfig backupPlan + * @property {string|null} [backupPlanDescription] GcpBackupConfig backupPlanDescription + * @property {string|null} [backupPlanAssociation] GcpBackupConfig backupPlanAssociation + * @property {Array.|null} [backupPlanRules] GcpBackupConfig backupPlanRules + */ + + /** + * Constructs a new GcpBackupConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GcpBackupConfig. + * @implements IGcpBackupConfig + * @constructor + * @param {google.cloud.backupdr.v1.IGcpBackupConfig=} [properties] Properties to set + */ + function GcpBackupConfig(properties) { + this.backupPlanRules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcpBackupConfig backupPlan. + * @member {string} backupPlan + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + */ + GcpBackupConfig.prototype.backupPlan = ""; + + /** + * GcpBackupConfig backupPlanDescription. + * @member {string} backupPlanDescription + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + */ + GcpBackupConfig.prototype.backupPlanDescription = ""; + + /** + * GcpBackupConfig backupPlanAssociation. + * @member {string} backupPlanAssociation + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + */ + GcpBackupConfig.prototype.backupPlanAssociation = ""; + + /** + * GcpBackupConfig backupPlanRules. + * @member {Array.} backupPlanRules + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + */ + GcpBackupConfig.prototype.backupPlanRules = $util.emptyArray; + + /** + * Creates a new GcpBackupConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IGcpBackupConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig instance + */ + GcpBackupConfig.create = function create(properties) { + return new GcpBackupConfig(properties); + }; + + /** + * Encodes the specified GcpBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IGcpBackupConfig} message GcpBackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpBackupConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPlan); + if (message.backupPlanDescription != null && Object.hasOwnProperty.call(message, "backupPlanDescription")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanDescription); + if (message.backupPlanAssociation != null && Object.hasOwnProperty.call(message, "backupPlanAssociation")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.backupPlanAssociation); + if (message.backupPlanRules != null && message.backupPlanRules.length) + for (var i = 0; i < message.backupPlanRules.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.backupPlanRules[i]); + return writer; + }; + + /** + * Encodes the specified GcpBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IGcpBackupConfig} message GcpBackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpBackupConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcpBackupConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpBackupConfig.decode = function 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.backupdr.v1.GcpBackupConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backupPlan = reader.string(); + break; + } + case 2: { + message.backupPlanDescription = reader.string(); + break; + } + case 3: { + message.backupPlanAssociation = reader.string(); + break; + } + case 4: { + if (!(message.backupPlanRules && message.backupPlanRules.length)) + message.backupPlanRules = []; + message.backupPlanRules.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcpBackupConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpBackupConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcpBackupConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcpBackupConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + if (!$util.isString(message.backupPlan)) + return "backupPlan: string expected"; + if (message.backupPlanDescription != null && message.hasOwnProperty("backupPlanDescription")) + if (!$util.isString(message.backupPlanDescription)) + return "backupPlanDescription: string expected"; + if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) + if (!$util.isString(message.backupPlanAssociation)) + return "backupPlanAssociation: string expected"; + if (message.backupPlanRules != null && message.hasOwnProperty("backupPlanRules")) { + if (!Array.isArray(message.backupPlanRules)) + return "backupPlanRules: array expected"; + for (var i = 0; i < message.backupPlanRules.length; ++i) + if (!$util.isString(message.backupPlanRules[i])) + return "backupPlanRules: string[] expected"; + } + return null; + }; + + /** + * Creates a GcpBackupConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig + */ + GcpBackupConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GcpBackupConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.GcpBackupConfig(); + if (object.backupPlan != null) + message.backupPlan = String(object.backupPlan); + if (object.backupPlanDescription != null) + message.backupPlanDescription = String(object.backupPlanDescription); + if (object.backupPlanAssociation != null) + message.backupPlanAssociation = String(object.backupPlanAssociation); + if (object.backupPlanRules) { + if (!Array.isArray(object.backupPlanRules)) + throw TypeError(".google.cloud.backupdr.v1.GcpBackupConfig.backupPlanRules: array expected"); + message.backupPlanRules = []; + for (var i = 0; i < object.backupPlanRules.length; ++i) + message.backupPlanRules[i] = String(object.backupPlanRules[i]); + } + return message; + }; + + /** + * Creates a plain object from a GcpBackupConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {google.cloud.backupdr.v1.GcpBackupConfig} message GcpBackupConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcpBackupConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.backupPlanRules = []; + if (options.defaults) { + object.backupPlan = ""; + object.backupPlanDescription = ""; + object.backupPlanAssociation = ""; + } + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + object.backupPlan = message.backupPlan; + if (message.backupPlanDescription != null && message.hasOwnProperty("backupPlanDescription")) + object.backupPlanDescription = message.backupPlanDescription; + if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) + object.backupPlanAssociation = message.backupPlanAssociation; + if (message.backupPlanRules && message.backupPlanRules.length) { + object.backupPlanRules = []; + for (var j = 0; j < message.backupPlanRules.length; ++j) + object.backupPlanRules[j] = message.backupPlanRules[j]; + } + return object; + }; + + /** + * Converts this GcpBackupConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + * @returns {Object.} JSON object + */ + GcpBackupConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcpBackupConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcpBackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpBackupConfig"; + }; + + return GcpBackupConfig; + })(); + + v1.BackupApplianceBackupConfig = (function() { + + /** + * Properties of a BackupApplianceBackupConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupApplianceBackupConfig + * @property {string|null} [backupApplianceName] BackupApplianceBackupConfig backupApplianceName + * @property {number|Long|null} [backupApplianceId] BackupApplianceBackupConfig backupApplianceId + * @property {number|Long|null} [slaId] BackupApplianceBackupConfig slaId + * @property {string|null} [applicationName] BackupApplianceBackupConfig applicationName + * @property {string|null} [hostName] BackupApplianceBackupConfig hostName + * @property {string|null} [sltName] BackupApplianceBackupConfig sltName + * @property {string|null} [slpName] BackupApplianceBackupConfig slpName + */ + + /** + * Constructs a new BackupApplianceBackupConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupApplianceBackupConfig. + * @implements IBackupApplianceBackupConfig + * @constructor + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig=} [properties] Properties to set + */ + function BackupApplianceBackupConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupApplianceBackupConfig backupApplianceName. + * @member {string} backupApplianceName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.backupApplianceName = ""; + + /** + * BackupApplianceBackupConfig backupApplianceId. + * @member {number|Long} backupApplianceId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.backupApplianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupApplianceBackupConfig slaId. + * @member {number|Long} slaId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.slaId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupApplianceBackupConfig applicationName. + * @member {string} applicationName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.applicationName = ""; + + /** + * BackupApplianceBackupConfig hostName. + * @member {string} hostName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.hostName = ""; + + /** + * BackupApplianceBackupConfig sltName. + * @member {string} sltName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.sltName = ""; + + /** + * BackupApplianceBackupConfig slpName. + * @member {string} slpName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.slpName = ""; + + /** + * Creates a new BackupApplianceBackupConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig instance + */ + BackupApplianceBackupConfig.create = function create(properties) { + return new BackupApplianceBackupConfig(properties); + }; + + /** + * Encodes the specified BackupApplianceBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig} message BackupApplianceBackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceBackupConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupApplianceName != null && Object.hasOwnProperty.call(message, "backupApplianceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupApplianceName); + if (message.backupApplianceId != null && Object.hasOwnProperty.call(message, "backupApplianceId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.backupApplianceId); + if (message.slaId != null && Object.hasOwnProperty.call(message, "slaId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.slaId); + if (message.applicationName != null && Object.hasOwnProperty.call(message, "applicationName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.applicationName); + if (message.hostName != null && Object.hasOwnProperty.call(message, "hostName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.hostName); + if (message.sltName != null && Object.hasOwnProperty.call(message, "sltName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sltName); + if (message.slpName != null && Object.hasOwnProperty.call(message, "slpName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.slpName); + return writer; + }; + + /** + * Encodes the specified BackupApplianceBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig} message BackupApplianceBackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceBackupConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceBackupConfig.decode = function 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.backupdr.v1.BackupApplianceBackupConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backupApplianceName = reader.string(); + break; + } + case 2: { + message.backupApplianceId = reader.int64(); + break; + } + case 3: { + message.slaId = reader.int64(); + break; + } + case 4: { + message.applicationName = reader.string(); + break; + } + case 5: { + message.hostName = reader.string(); + break; + } + case 6: { + message.sltName = reader.string(); + break; + } + case 7: { + message.slpName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceBackupConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupApplianceBackupConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupApplianceBackupConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + if (!$util.isString(message.backupApplianceName)) + return "backupApplianceName: string expected"; + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (!$util.isInteger(message.backupApplianceId) && !(message.backupApplianceId && $util.isInteger(message.backupApplianceId.low) && $util.isInteger(message.backupApplianceId.high))) + return "backupApplianceId: integer|Long expected"; + if (message.slaId != null && message.hasOwnProperty("slaId")) + if (!$util.isInteger(message.slaId) && !(message.slaId && $util.isInteger(message.slaId.low) && $util.isInteger(message.slaId.high))) + return "slaId: integer|Long expected"; + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + if (!$util.isString(message.applicationName)) + return "applicationName: string expected"; + if (message.hostName != null && message.hasOwnProperty("hostName")) + if (!$util.isString(message.hostName)) + return "hostName: string expected"; + if (message.sltName != null && message.hasOwnProperty("sltName")) + if (!$util.isString(message.sltName)) + return "sltName: string expected"; + if (message.slpName != null && message.hasOwnProperty("slpName")) + if (!$util.isString(message.slpName)) + return "slpName: string expected"; + return null; + }; + + /** + * Creates a BackupApplianceBackupConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig + */ + BackupApplianceBackupConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig(); + if (object.backupApplianceName != null) + message.backupApplianceName = String(object.backupApplianceName); + if (object.backupApplianceId != null) + if ($util.Long) + (message.backupApplianceId = $util.Long.fromValue(object.backupApplianceId)).unsigned = false; + else if (typeof object.backupApplianceId === "string") + message.backupApplianceId = parseInt(object.backupApplianceId, 10); + else if (typeof object.backupApplianceId === "number") + message.backupApplianceId = object.backupApplianceId; + else if (typeof object.backupApplianceId === "object") + message.backupApplianceId = new $util.LongBits(object.backupApplianceId.low >>> 0, object.backupApplianceId.high >>> 0).toNumber(); + if (object.slaId != null) + if ($util.Long) + (message.slaId = $util.Long.fromValue(object.slaId)).unsigned = false; + else if (typeof object.slaId === "string") + message.slaId = parseInt(object.slaId, 10); + else if (typeof object.slaId === "number") + message.slaId = object.slaId; + else if (typeof object.slaId === "object") + message.slaId = new $util.LongBits(object.slaId.low >>> 0, object.slaId.high >>> 0).toNumber(); + if (object.applicationName != null) + message.applicationName = String(object.applicationName); + if (object.hostName != null) + message.hostName = String(object.hostName); + if (object.sltName != null) + message.sltName = String(object.sltName); + if (object.slpName != null) + message.slpName = String(object.slpName); + return message; + }; + + /** + * Creates a plain object from a BackupApplianceBackupConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {google.cloud.backupdr.v1.BackupApplianceBackupConfig} message BackupApplianceBackupConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupApplianceBackupConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.backupApplianceName = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.backupApplianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.backupApplianceId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.slaId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.slaId = options.longs === String ? "0" : 0; + object.applicationName = ""; + object.hostName = ""; + object.sltName = ""; + object.slpName = ""; + } + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + object.backupApplianceName = message.backupApplianceName; + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (typeof message.backupApplianceId === "number") + object.backupApplianceId = options.longs === String ? String(message.backupApplianceId) : message.backupApplianceId; + else + object.backupApplianceId = options.longs === String ? $util.Long.prototype.toString.call(message.backupApplianceId) : options.longs === Number ? new $util.LongBits(message.backupApplianceId.low >>> 0, message.backupApplianceId.high >>> 0).toNumber() : message.backupApplianceId; + if (message.slaId != null && message.hasOwnProperty("slaId")) + if (typeof message.slaId === "number") + object.slaId = options.longs === String ? String(message.slaId) : message.slaId; + else + object.slaId = options.longs === String ? $util.Long.prototype.toString.call(message.slaId) : options.longs === Number ? new $util.LongBits(message.slaId.low >>> 0, message.slaId.high >>> 0).toNumber() : message.slaId; + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + object.applicationName = message.applicationName; + if (message.hostName != null && message.hasOwnProperty("hostName")) + object.hostName = message.hostName; + if (message.sltName != null && message.hasOwnProperty("sltName")) + object.sltName = message.sltName; + if (message.slpName != null && message.hasOwnProperty("slpName")) + object.slpName = message.slpName; + return object; + }; + + /** + * Converts this BackupApplianceBackupConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + * @returns {Object.} JSON object + */ + BackupApplianceBackupConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupApplianceBackupConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupApplianceBackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceBackupConfig"; + }; + + return BackupApplianceBackupConfig; + })(); + + v1.DataSourceGcpResource = (function() { + + /** + * Properties of a DataSourceGcpResource. + * @memberof google.cloud.backupdr.v1 + * @interface IDataSourceGcpResource + * @property {string|null} [gcpResourcename] DataSourceGcpResource gcpResourcename + * @property {string|null} [location] DataSourceGcpResource location + * @property {string|null} [type] DataSourceGcpResource type + * @property {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null} [computeInstanceDatasourceProperties] DataSourceGcpResource computeInstanceDatasourceProperties + */ + + /** + * Constructs a new DataSourceGcpResource. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DataSourceGcpResource. + * @implements IDataSourceGcpResource + * @constructor + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource=} [properties] Properties to set + */ + function DataSourceGcpResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataSourceGcpResource gcpResourcename. + * @member {string} gcpResourcename + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + DataSourceGcpResource.prototype.gcpResourcename = ""; + + /** + * DataSourceGcpResource location. + * @member {string} location + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + DataSourceGcpResource.prototype.location = ""; + + /** + * DataSourceGcpResource type. + * @member {string} type + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + DataSourceGcpResource.prototype.type = ""; + + /** + * DataSourceGcpResource computeInstanceDatasourceProperties. + * @member {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null|undefined} computeInstanceDatasourceProperties + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + DataSourceGcpResource.prototype.computeInstanceDatasourceProperties = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataSourceGcpResource gcpResourceProperties. + * @member {"computeInstanceDatasourceProperties"|undefined} gcpResourceProperties + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + Object.defineProperty(DataSourceGcpResource.prototype, "gcpResourceProperties", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceDatasourceProperties"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataSourceGcpResource instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource instance + */ + DataSourceGcpResource.create = function create(properties) { + return new DataSourceGcpResource(properties); + }; + + /** + * Encodes the specified DataSourceGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource} message DataSourceGcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceGcpResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.computeInstanceDatasourceProperties != null && Object.hasOwnProperty.call(message, "computeInstanceDatasourceProperties")) + $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.encode(message.computeInstanceDatasourceProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataSourceGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource} message DataSourceGcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceGcpResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceGcpResource.decode = function 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.backupdr.v1.DataSourceGcpResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcpResourcename = reader.string(); + break; + } + case 2: { + message.location = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 4: { + message.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceGcpResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSourceGcpResource message. + * @function verify + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSourceGcpResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + if (!$util.isString(message.gcpResourcename)) + return "gcpResourcename: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.computeInstanceDatasourceProperties != null && message.hasOwnProperty("computeInstanceDatasourceProperties")) { + properties.gcpResourceProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify(message.computeInstanceDatasourceProperties); + if (error) + return "computeInstanceDatasourceProperties." + error; + } + } + return null; + }; + + /** + * Creates a DataSourceGcpResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource + */ + DataSourceGcpResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DataSourceGcpResource) + return object; + var message = new $root.google.cloud.backupdr.v1.DataSourceGcpResource(); + if (object.gcpResourcename != null) + message.gcpResourcename = String(object.gcpResourcename); + if (object.location != null) + message.location = String(object.location); + if (object.type != null) + message.type = String(object.type); + if (object.computeInstanceDatasourceProperties != null) { + if (typeof object.computeInstanceDatasourceProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSourceGcpResource.computeInstanceDatasourceProperties: object expected"); + message.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.fromObject(object.computeInstanceDatasourceProperties); + } + return message; + }; + + /** + * Creates a plain object from a DataSourceGcpResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.DataSourceGcpResource} message DataSourceGcpResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSourceGcpResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gcpResourcename = ""; + object.location = ""; + object.type = ""; + } + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + object.gcpResourcename = message.gcpResourcename; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.computeInstanceDatasourceProperties != null && message.hasOwnProperty("computeInstanceDatasourceProperties")) { + object.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.toObject(message.computeInstanceDatasourceProperties, options); + if (options.oneofs) + object.gcpResourceProperties = "computeInstanceDatasourceProperties"; + } + return object; + }; + + /** + * Converts this DataSourceGcpResource to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + * @returns {Object.} JSON object + */ + DataSourceGcpResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataSourceGcpResource + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSourceGcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSourceGcpResource"; + }; + + return DataSourceGcpResource; + })(); + + v1.DataSourceBackupApplianceApplication = (function() { + + /** + * Properties of a DataSourceBackupApplianceApplication. + * @memberof google.cloud.backupdr.v1 + * @interface IDataSourceBackupApplianceApplication + * @property {string|null} [applicationName] DataSourceBackupApplianceApplication applicationName + * @property {string|null} [backupAppliance] DataSourceBackupApplianceApplication backupAppliance + * @property {number|Long|null} [applianceId] DataSourceBackupApplianceApplication applianceId + * @property {string|null} [type] DataSourceBackupApplianceApplication type + * @property {number|Long|null} [applicationId] DataSourceBackupApplianceApplication applicationId + * @property {string|null} [hostname] DataSourceBackupApplianceApplication hostname + * @property {number|Long|null} [hostId] DataSourceBackupApplianceApplication hostId + */ + + /** + * Constructs a new DataSourceBackupApplianceApplication. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DataSourceBackupApplianceApplication. + * @implements IDataSourceBackupApplianceApplication + * @constructor + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication=} [properties] Properties to set + */ + function DataSourceBackupApplianceApplication(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataSourceBackupApplianceApplication applicationName. + * @member {string} applicationName + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.applicationName = ""; + + /** + * DataSourceBackupApplianceApplication backupAppliance. + * @member {string} backupAppliance + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.backupAppliance = ""; + + /** + * DataSourceBackupApplianceApplication applianceId. + * @member {number|Long} applianceId + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.applianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataSourceBackupApplianceApplication type. + * @member {string} type + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.type = ""; + + /** + * DataSourceBackupApplianceApplication applicationId. + * @member {number|Long} applicationId + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.applicationId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataSourceBackupApplianceApplication hostname. + * @member {string} hostname + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.hostname = ""; + + /** + * DataSourceBackupApplianceApplication hostId. + * @member {number|Long} hostId + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.hostId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new DataSourceBackupApplianceApplication instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication instance + */ + DataSourceBackupApplianceApplication.create = function create(properties) { + return new DataSourceBackupApplianceApplication(properties); + }; + + /** + * Encodes the specified DataSourceBackupApplianceApplication message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceBackupApplianceApplication.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.applicationName != null && Object.hasOwnProperty.call(message, "applicationName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.applicationName); + if (message.backupAppliance != null && Object.hasOwnProperty.call(message, "backupAppliance")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupAppliance); + if (message.applianceId != null && Object.hasOwnProperty.call(message, "applianceId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.applianceId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.type); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.hostname); + if (message.hostId != null && Object.hasOwnProperty.call(message, "hostId")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.hostId); + if (message.applicationId != null && Object.hasOwnProperty.call(message, "applicationId")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.applicationId); + return writer; + }; + + /** + * Encodes the specified DataSourceBackupApplianceApplication message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceBackupApplianceApplication.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceBackupApplianceApplication.decode = function 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.backupdr.v1.DataSourceBackupApplianceApplication(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.applicationName = reader.string(); + break; + } + case 2: { + message.backupAppliance = reader.string(); + break; + } + case 3: { + message.applianceId = reader.int64(); + break; + } + case 4: { + message.type = reader.string(); + break; + } + case 8: { + message.applicationId = reader.int64(); + break; + } + case 6: { + message.hostname = reader.string(); + break; + } + case 7: { + message.hostId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceBackupApplianceApplication.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSourceBackupApplianceApplication message. + * @function verify + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSourceBackupApplianceApplication.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + if (!$util.isString(message.applicationName)) + return "applicationName: string expected"; + if (message.backupAppliance != null && message.hasOwnProperty("backupAppliance")) + if (!$util.isString(message.backupAppliance)) + return "backupAppliance: string expected"; + if (message.applianceId != null && message.hasOwnProperty("applianceId")) + if (!$util.isInteger(message.applianceId) && !(message.applianceId && $util.isInteger(message.applianceId.low) && $util.isInteger(message.applianceId.high))) + return "applianceId: integer|Long expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.applicationId != null && message.hasOwnProperty("applicationId")) + if (!$util.isInteger(message.applicationId) && !(message.applicationId && $util.isInteger(message.applicationId.low) && $util.isInteger(message.applicationId.high))) + return "applicationId: integer|Long expected"; + if (message.hostname != null && message.hasOwnProperty("hostname")) + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + if (message.hostId != null && message.hasOwnProperty("hostId")) + if (!$util.isInteger(message.hostId) && !(message.hostId && $util.isInteger(message.hostId.low) && $util.isInteger(message.hostId.high))) + return "hostId: integer|Long expected"; + return null; + }; + + /** + * Creates a DataSourceBackupApplianceApplication message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication + */ + DataSourceBackupApplianceApplication.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication) + return object; + var message = new $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication(); + if (object.applicationName != null) + message.applicationName = String(object.applicationName); + if (object.backupAppliance != null) + message.backupAppliance = String(object.backupAppliance); + if (object.applianceId != null) + if ($util.Long) + (message.applianceId = $util.Long.fromValue(object.applianceId)).unsigned = false; + else if (typeof object.applianceId === "string") + message.applianceId = parseInt(object.applianceId, 10); + else if (typeof object.applianceId === "number") + message.applianceId = object.applianceId; + else if (typeof object.applianceId === "object") + message.applianceId = new $util.LongBits(object.applianceId.low >>> 0, object.applianceId.high >>> 0).toNumber(); + if (object.type != null) + message.type = String(object.type); + if (object.applicationId != null) + if ($util.Long) + (message.applicationId = $util.Long.fromValue(object.applicationId)).unsigned = false; + else if (typeof object.applicationId === "string") + message.applicationId = parseInt(object.applicationId, 10); + else if (typeof object.applicationId === "number") + message.applicationId = object.applicationId; + else if (typeof object.applicationId === "object") + message.applicationId = new $util.LongBits(object.applicationId.low >>> 0, object.applicationId.high >>> 0).toNumber(); + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.hostId != null) + if ($util.Long) + (message.hostId = $util.Long.fromValue(object.hostId)).unsigned = false; + else if (typeof object.hostId === "string") + message.hostId = parseInt(object.hostId, 10); + else if (typeof object.hostId === "number") + message.hostId = object.hostId; + else if (typeof object.hostId === "object") + message.hostId = new $util.LongBits(object.hostId.low >>> 0, object.hostId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a DataSourceBackupApplianceApplication message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSourceBackupApplianceApplication.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.applicationName = ""; + object.backupAppliance = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.applianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.applianceId = options.longs === String ? "0" : 0; + object.type = ""; + object.hostname = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.hostId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.hostId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.applicationId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.applicationId = options.longs === String ? "0" : 0; + } + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + object.applicationName = message.applicationName; + if (message.backupAppliance != null && message.hasOwnProperty("backupAppliance")) + object.backupAppliance = message.backupAppliance; + if (message.applianceId != null && message.hasOwnProperty("applianceId")) + if (typeof message.applianceId === "number") + object.applianceId = options.longs === String ? String(message.applianceId) : message.applianceId; + else + object.applianceId = options.longs === String ? $util.Long.prototype.toString.call(message.applianceId) : options.longs === Number ? new $util.LongBits(message.applianceId.low >>> 0, message.applianceId.high >>> 0).toNumber() : message.applianceId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.hostname != null && message.hasOwnProperty("hostname")) + object.hostname = message.hostname; + if (message.hostId != null && message.hasOwnProperty("hostId")) + if (typeof message.hostId === "number") + object.hostId = options.longs === String ? String(message.hostId) : message.hostId; + else + object.hostId = options.longs === String ? $util.Long.prototype.toString.call(message.hostId) : options.longs === Number ? new $util.LongBits(message.hostId.low >>> 0, message.hostId.high >>> 0).toNumber() : message.hostId; + if (message.applicationId != null && message.hasOwnProperty("applicationId")) + if (typeof message.applicationId === "number") + object.applicationId = options.longs === String ? String(message.applicationId) : message.applicationId; + else + object.applicationId = options.longs === String ? $util.Long.prototype.toString.call(message.applicationId) : options.longs === Number ? new $util.LongBits(message.applicationId.low >>> 0, message.applicationId.high >>> 0).toNumber() : message.applicationId; + return object; + }; + + /** + * Converts this DataSourceBackupApplianceApplication to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + * @returns {Object.} JSON object + */ + DataSourceBackupApplianceApplication.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataSourceBackupApplianceApplication + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSourceBackupApplianceApplication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSourceBackupApplianceApplication"; + }; + + return DataSourceBackupApplianceApplication; + })(); + + v1.ServiceLockInfo = (function() { + + /** + * Properties of a ServiceLockInfo. + * @memberof google.cloud.backupdr.v1 + * @interface IServiceLockInfo + * @property {string|null} [operation] ServiceLockInfo operation + */ + + /** + * Constructs a new ServiceLockInfo. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ServiceLockInfo. + * @implements IServiceLockInfo + * @constructor + * @param {google.cloud.backupdr.v1.IServiceLockInfo=} [properties] Properties to set + */ + function ServiceLockInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceLockInfo operation. + * @member {string} operation + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @instance + */ + ServiceLockInfo.prototype.operation = ""; + + /** + * Creates a new ServiceLockInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IServiceLockInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo instance + */ + ServiceLockInfo.create = function create(properties) { + return new ServiceLockInfo(properties); + }; + + /** + * Encodes the specified ServiceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IServiceLockInfo} message ServiceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceLockInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.operation); + return writer; + }; + + /** + * Encodes the specified ServiceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IServiceLockInfo} message ServiceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceLockInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceLockInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceLockInfo.decode = function 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.backupdr.v1.ServiceLockInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.operation = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceLockInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceLockInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceLockInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceLockInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) + if (!$util.isString(message.operation)) + return "operation: string expected"; + return null; + }; + + /** + * Creates a ServiceLockInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo + */ + ServiceLockInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ServiceLockInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.ServiceLockInfo(); + if (object.operation != null) + message.operation = String(object.operation); + return message; + }; + + /** + * Creates a plain object from a ServiceLockInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {google.cloud.backupdr.v1.ServiceLockInfo} message ServiceLockInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceLockInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.operation = ""; + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = message.operation; + return object; + }; + + /** + * Converts this ServiceLockInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @instance + * @returns {Object.} JSON object + */ + ServiceLockInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceLockInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceLockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ServiceLockInfo"; + }; + + return ServiceLockInfo; + })(); + + v1.BackupApplianceLockInfo = (function() { + + /** + * Properties of a BackupApplianceLockInfo. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupApplianceLockInfo + * @property {number|Long|null} [backupApplianceId] BackupApplianceLockInfo backupApplianceId + * @property {string|null} [backupApplianceName] BackupApplianceLockInfo backupApplianceName + * @property {string|null} [lockReason] BackupApplianceLockInfo lockReason + * @property {string|null} [jobName] BackupApplianceLockInfo jobName + * @property {string|null} [backupImage] BackupApplianceLockInfo backupImage + * @property {number|Long|null} [slaId] BackupApplianceLockInfo slaId + */ + + /** + * Constructs a new BackupApplianceLockInfo. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupApplianceLockInfo. + * @implements IBackupApplianceLockInfo + * @constructor + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo=} [properties] Properties to set + */ + function BackupApplianceLockInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupApplianceLockInfo backupApplianceId. + * @member {number|Long} backupApplianceId + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.backupApplianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupApplianceLockInfo backupApplianceName. + * @member {string} backupApplianceName + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.backupApplianceName = ""; + + /** + * BackupApplianceLockInfo lockReason. + * @member {string} lockReason + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.lockReason = ""; + + /** + * BackupApplianceLockInfo jobName. + * @member {string|null|undefined} jobName + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.jobName = null; + + /** + * BackupApplianceLockInfo backupImage. + * @member {string|null|undefined} backupImage + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.backupImage = null; + + /** + * BackupApplianceLockInfo slaId. + * @member {number|Long|null|undefined} slaId + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.slaId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupApplianceLockInfo lockSource. + * @member {"jobName"|"backupImage"|"slaId"|undefined} lockSource + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + Object.defineProperty(BackupApplianceLockInfo.prototype, "lockSource", { + get: $util.oneOfGetter($oneOfFields = ["jobName", "backupImage", "slaId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupApplianceLockInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo instance + */ + BackupApplianceLockInfo.create = function create(properties) { + return new BackupApplianceLockInfo(properties); + }; + + /** + * Encodes the specified BackupApplianceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo} message BackupApplianceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceLockInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupApplianceId != null && Object.hasOwnProperty.call(message, "backupApplianceId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.backupApplianceId); + if (message.backupApplianceName != null && Object.hasOwnProperty.call(message, "backupApplianceName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupApplianceName); + if (message.lockReason != null && Object.hasOwnProperty.call(message, "lockReason")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.lockReason); + if (message.jobName != null && Object.hasOwnProperty.call(message, "jobName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.jobName); + if (message.backupImage != null && Object.hasOwnProperty.call(message, "backupImage")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.backupImage); + if (message.slaId != null && Object.hasOwnProperty.call(message, "slaId")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.slaId); + return writer; + }; + + /** + * Encodes the specified BackupApplianceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo} message BackupApplianceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceLockInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceLockInfo.decode = function 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.backupdr.v1.BackupApplianceLockInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backupApplianceId = reader.int64(); + break; + } + case 2: { + message.backupApplianceName = reader.string(); + break; + } + case 5: { + message.lockReason = reader.string(); + break; + } + case 6: { + message.jobName = reader.string(); + break; + } + case 7: { + message.backupImage = reader.string(); + break; + } + case 8: { + message.slaId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceLockInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupApplianceLockInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupApplianceLockInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (!$util.isInteger(message.backupApplianceId) && !(message.backupApplianceId && $util.isInteger(message.backupApplianceId.low) && $util.isInteger(message.backupApplianceId.high))) + return "backupApplianceId: integer|Long expected"; + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + if (!$util.isString(message.backupApplianceName)) + return "backupApplianceName: string expected"; + if (message.lockReason != null && message.hasOwnProperty("lockReason")) + if (!$util.isString(message.lockReason)) + return "lockReason: string expected"; + if (message.jobName != null && message.hasOwnProperty("jobName")) { + properties.lockSource = 1; + if (!$util.isString(message.jobName)) + return "jobName: string expected"; + } + if (message.backupImage != null && message.hasOwnProperty("backupImage")) { + if (properties.lockSource === 1) + return "lockSource: multiple values"; + properties.lockSource = 1; + if (!$util.isString(message.backupImage)) + return "backupImage: string expected"; + } + if (message.slaId != null && message.hasOwnProperty("slaId")) { + if (properties.lockSource === 1) + return "lockSource: multiple values"; + properties.lockSource = 1; + if (!$util.isInteger(message.slaId) && !(message.slaId && $util.isInteger(message.slaId.low) && $util.isInteger(message.slaId.high))) + return "slaId: integer|Long expected"; + } + return null; + }; + + /** + * Creates a BackupApplianceLockInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo + */ + BackupApplianceLockInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceLockInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupApplianceLockInfo(); + if (object.backupApplianceId != null) + if ($util.Long) + (message.backupApplianceId = $util.Long.fromValue(object.backupApplianceId)).unsigned = false; + else if (typeof object.backupApplianceId === "string") + message.backupApplianceId = parseInt(object.backupApplianceId, 10); + else if (typeof object.backupApplianceId === "number") + message.backupApplianceId = object.backupApplianceId; + else if (typeof object.backupApplianceId === "object") + message.backupApplianceId = new $util.LongBits(object.backupApplianceId.low >>> 0, object.backupApplianceId.high >>> 0).toNumber(); + if (object.backupApplianceName != null) + message.backupApplianceName = String(object.backupApplianceName); + if (object.lockReason != null) + message.lockReason = String(object.lockReason); + if (object.jobName != null) + message.jobName = String(object.jobName); + if (object.backupImage != null) + message.backupImage = String(object.backupImage); + if (object.slaId != null) + if ($util.Long) + (message.slaId = $util.Long.fromValue(object.slaId)).unsigned = false; + else if (typeof object.slaId === "string") + message.slaId = parseInt(object.slaId, 10); + else if (typeof object.slaId === "number") + message.slaId = object.slaId; + else if (typeof object.slaId === "object") + message.slaId = new $util.LongBits(object.slaId.low >>> 0, object.slaId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BackupApplianceLockInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.BackupApplianceLockInfo} message BackupApplianceLockInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupApplianceLockInfo.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.backupApplianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.backupApplianceId = options.longs === String ? "0" : 0; + object.backupApplianceName = ""; + object.lockReason = ""; + } + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (typeof message.backupApplianceId === "number") + object.backupApplianceId = options.longs === String ? String(message.backupApplianceId) : message.backupApplianceId; + else + object.backupApplianceId = options.longs === String ? $util.Long.prototype.toString.call(message.backupApplianceId) : options.longs === Number ? new $util.LongBits(message.backupApplianceId.low >>> 0, message.backupApplianceId.high >>> 0).toNumber() : message.backupApplianceId; + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + object.backupApplianceName = message.backupApplianceName; + if (message.lockReason != null && message.hasOwnProperty("lockReason")) + object.lockReason = message.lockReason; + if (message.jobName != null && message.hasOwnProperty("jobName")) { + object.jobName = message.jobName; + if (options.oneofs) + object.lockSource = "jobName"; + } + if (message.backupImage != null && message.hasOwnProperty("backupImage")) { + object.backupImage = message.backupImage; + if (options.oneofs) + object.lockSource = "backupImage"; + } + if (message.slaId != null && message.hasOwnProperty("slaId")) { + if (typeof message.slaId === "number") + object.slaId = options.longs === String ? String(message.slaId) : message.slaId; + else + object.slaId = options.longs === String ? $util.Long.prototype.toString.call(message.slaId) : options.longs === Number ? new $util.LongBits(message.slaId.low >>> 0, message.slaId.high >>> 0).toNumber() : message.slaId; + if (options.oneofs) + object.lockSource = "slaId"; + } + return object; + }; + + /** + * Converts this BackupApplianceLockInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + * @returns {Object.} JSON object + */ + BackupApplianceLockInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupApplianceLockInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupApplianceLockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceLockInfo"; + }; + + return BackupApplianceLockInfo; + })(); + + v1.BackupLock = (function() { + + /** + * Properties of a BackupLock. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupLock + * @property {google.protobuf.ITimestamp|null} [lockUntilTime] BackupLock lockUntilTime + * @property {google.cloud.backupdr.v1.IBackupApplianceLockInfo|null} [backupApplianceLockInfo] BackupLock backupApplianceLockInfo + * @property {google.cloud.backupdr.v1.IServiceLockInfo|null} [serviceLockInfo] BackupLock serviceLockInfo + */ + + /** + * Constructs a new BackupLock. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupLock. + * @implements IBackupLock + * @constructor + * @param {google.cloud.backupdr.v1.IBackupLock=} [properties] Properties to set + */ + function BackupLock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupLock lockUntilTime. + * @member {google.protobuf.ITimestamp|null|undefined} lockUntilTime + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + */ + BackupLock.prototype.lockUntilTime = null; + + /** + * BackupLock backupApplianceLockInfo. + * @member {google.cloud.backupdr.v1.IBackupApplianceLockInfo|null|undefined} backupApplianceLockInfo + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + */ + BackupLock.prototype.backupApplianceLockInfo = null; + + /** + * BackupLock serviceLockInfo. + * @member {google.cloud.backupdr.v1.IServiceLockInfo|null|undefined} serviceLockInfo + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + */ + BackupLock.prototype.serviceLockInfo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupLock ClientLockInfo. + * @member {"backupApplianceLockInfo"|"serviceLockInfo"|undefined} ClientLockInfo + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + */ + Object.defineProperty(BackupLock.prototype, "ClientLockInfo", { + get: $util.oneOfGetter($oneOfFields = ["backupApplianceLockInfo", "serviceLockInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupLock instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.IBackupLock=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock instance + */ + BackupLock.create = function create(properties) { + return new BackupLock(properties); + }; + + /** + * Encodes the specified BackupLock message. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.IBackupLock} message BackupLock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupLock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lockUntilTime != null && Object.hasOwnProperty.call(message, "lockUntilTime")) + $root.google.protobuf.Timestamp.encode(message.lockUntilTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.backupApplianceLockInfo != null && Object.hasOwnProperty.call(message, "backupApplianceLockInfo")) + $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.encode(message.backupApplianceLockInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.serviceLockInfo != null && Object.hasOwnProperty.call(message, "serviceLockInfo")) + $root.google.cloud.backupdr.v1.ServiceLockInfo.encode(message.serviceLockInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BackupLock message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.IBackupLock} message BackupLock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupLock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupLock message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupLock.decode = function 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.backupdr.v1.BackupLock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.lockUntilTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.decode(reader, reader.uint32()); + break; + } + case 4: { + message.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupLock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupLock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupLock message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupLock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.lockUntilTime != null && message.hasOwnProperty("lockUntilTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lockUntilTime); + if (error) + return "lockUntilTime." + error; + } + if (message.backupApplianceLockInfo != null && message.hasOwnProperty("backupApplianceLockInfo")) { + properties.ClientLockInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.verify(message.backupApplianceLockInfo); + if (error) + return "backupApplianceLockInfo." + error; + } + } + if (message.serviceLockInfo != null && message.hasOwnProperty("serviceLockInfo")) { + if (properties.ClientLockInfo === 1) + return "ClientLockInfo: multiple values"; + properties.ClientLockInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.ServiceLockInfo.verify(message.serviceLockInfo); + if (error) + return "serviceLockInfo." + error; + } + } + return null; + }; + + /** + * Creates a BackupLock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock + */ + BackupLock.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupLock) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupLock(); + if (object.lockUntilTime != null) { + if (typeof object.lockUntilTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupLock.lockUntilTime: object expected"); + message.lockUntilTime = $root.google.protobuf.Timestamp.fromObject(object.lockUntilTime); + } + if (object.backupApplianceLockInfo != null) { + if (typeof object.backupApplianceLockInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupLock.backupApplianceLockInfo: object expected"); + message.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.fromObject(object.backupApplianceLockInfo); + } + if (object.serviceLockInfo != null) { + if (typeof object.serviceLockInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupLock.serviceLockInfo: object expected"); + message.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.fromObject(object.serviceLockInfo); + } + return message; + }; + + /** + * Creates a plain object from a BackupLock message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.BackupLock} message BackupLock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupLock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.lockUntilTime = null; + if (message.lockUntilTime != null && message.hasOwnProperty("lockUntilTime")) + object.lockUntilTime = $root.google.protobuf.Timestamp.toObject(message.lockUntilTime, options); + if (message.backupApplianceLockInfo != null && message.hasOwnProperty("backupApplianceLockInfo")) { + object.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.toObject(message.backupApplianceLockInfo, options); + if (options.oneofs) + object.ClientLockInfo = "backupApplianceLockInfo"; + } + if (message.serviceLockInfo != null && message.hasOwnProperty("serviceLockInfo")) { + object.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.toObject(message.serviceLockInfo, options); + if (options.oneofs) + object.ClientLockInfo = "serviceLockInfo"; + } + return object; + }; + + /** + * Converts this BackupLock to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + * @returns {Object.} JSON object + */ + BackupLock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupLock + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupLock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupLock"; + }; + + return BackupLock; + })(); + + v1.Backup = (function() { + + /** + * Properties of a Backup. + * @memberof google.cloud.backupdr.v1 + * @interface IBackup + * @property {string|null} [name] Backup name + * @property {string|null} [description] Backup description + * @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Backup updateTime + * @property {Object.|null} [labels] Backup labels + * @property {google.protobuf.ITimestamp|null} [enforcedRetentionEndTime] Backup enforcedRetentionEndTime + * @property {google.protobuf.ITimestamp|null} [expireTime] Backup expireTime + * @property {google.protobuf.ITimestamp|null} [consistencyTime] Backup consistencyTime + * @property {string|null} [etag] Backup etag + * @property {google.cloud.backupdr.v1.Backup.State|null} [state] Backup state + * @property {Array.|null} [serviceLocks] Backup serviceLocks + * @property {Array.|null} [backupApplianceLocks] Backup backupApplianceLocks + * @property {google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null} [computeInstanceBackupProperties] Backup computeInstanceBackupProperties + * @property {google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null} [backupApplianceBackupProperties] Backup backupApplianceBackupProperties + * @property {google.cloud.backupdr.v1.Backup.BackupType|null} [backupType] Backup backupType + * @property {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null} [gcpBackupPlanInfo] Backup gcpBackupPlanInfo + * @property {number|Long|null} [resourceSizeBytes] Backup resourceSizeBytes + */ + + /** + * Constructs a new Backup. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Backup. + * @implements IBackup + * @constructor + * @param {google.cloud.backupdr.v1.IBackup=} [properties] Properties to set + */ + function Backup(properties) { + this.labels = {}; + this.serviceLocks = []; + this.backupApplianceLocks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Backup name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.name = ""; + + /** + * Backup description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.description = null; + + /** + * Backup createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.createTime = null; + + /** + * Backup updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.updateTime = null; + + /** + * Backup labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.labels = $util.emptyObject; + + /** + * Backup enforcedRetentionEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} enforcedRetentionEndTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.enforcedRetentionEndTime = null; + + /** + * Backup expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.expireTime = null; + + /** + * Backup consistencyTime. + * @member {google.protobuf.ITimestamp|null|undefined} consistencyTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.consistencyTime = null; + + /** + * Backup etag. + * @member {string|null|undefined} etag + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.etag = null; + + /** + * Backup state. + * @member {google.cloud.backupdr.v1.Backup.State} state + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.state = 0; + + /** + * Backup serviceLocks. + * @member {Array.} serviceLocks + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.serviceLocks = $util.emptyArray; + + /** + * Backup backupApplianceLocks. + * @member {Array.} backupApplianceLocks + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.backupApplianceLocks = $util.emptyArray; + + /** + * Backup computeInstanceBackupProperties. + * @member {google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null|undefined} computeInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.computeInstanceBackupProperties = null; + + /** + * Backup backupApplianceBackupProperties. + * @member {google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null|undefined} backupApplianceBackupProperties + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.backupApplianceBackupProperties = null; + + /** + * Backup backupType. + * @member {google.cloud.backupdr.v1.Backup.BackupType} backupType + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.backupType = 0; + + /** + * Backup gcpBackupPlanInfo. + * @member {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null|undefined} gcpBackupPlanInfo + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.gcpBackupPlanInfo = null; + + /** + * Backup resourceSizeBytes. + * @member {number|Long} resourceSizeBytes + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.resourceSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Backup _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _createTime. + * @member {"createTime"|undefined} _createTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_createTime", { + get: $util.oneOfGetter($oneOfFields = ["createTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _updateTime. + * @member {"updateTime"|undefined} _updateTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _enforcedRetentionEndTime. + * @member {"enforcedRetentionEndTime"|undefined} _enforcedRetentionEndTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_enforcedRetentionEndTime", { + get: $util.oneOfGetter($oneOfFields = ["enforcedRetentionEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _expireTime. + * @member {"expireTime"|undefined} _expireTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_expireTime", { + get: $util.oneOfGetter($oneOfFields = ["expireTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _consistencyTime. + * @member {"consistencyTime"|undefined} _consistencyTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_consistencyTime", { + get: $util.oneOfGetter($oneOfFields = ["consistencyTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _etag. + * @member {"etag"|undefined} _etag + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_etag", { + get: $util.oneOfGetter($oneOfFields = ["etag"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup backupProperties. + * @member {"computeInstanceBackupProperties"|"backupApplianceBackupProperties"|undefined} backupProperties + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "backupProperties", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceBackupProperties", "backupApplianceBackupProperties"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup planInfo. + * @member {"gcpBackupPlanInfo"|undefined} planInfo + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "planInfo", { + get: $util.oneOfGetter($oneOfFields = ["gcpBackupPlanInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Backup instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.IBackup=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Backup} Backup instance + */ + Backup.create = function create(properties) { + return new Backup(properties); + }; + + /** + * Encodes the specified Backup message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.IBackup} message Backup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Backup.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).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 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.enforcedRetentionEndTime != null && Object.hasOwnProperty.call(message, "enforcedRetentionEndTime")) + $root.google.protobuf.Timestamp.encode(message.enforcedRetentionEndTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.consistencyTime != null && Object.hasOwnProperty.call(message, "consistencyTime")) + $root.google.protobuf.Timestamp.encode(message.consistencyTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.state); + if (message.serviceLocks != null && message.serviceLocks.length) + for (var i = 0; i < message.serviceLocks.length; ++i) + $root.google.cloud.backupdr.v1.BackupLock.encode(message.serviceLocks[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.backupApplianceLocks != null && message.backupApplianceLocks.length) + for (var i = 0; i < message.backupApplianceLocks.length; ++i) + $root.google.cloud.backupdr.v1.BackupLock.encode(message.backupApplianceLocks[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.computeInstanceBackupProperties != null && Object.hasOwnProperty.call(message, "computeInstanceBackupProperties")) + $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.encode(message.computeInstanceBackupProperties, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.backupType); + if (message.backupApplianceBackupProperties != null && Object.hasOwnProperty.call(message, "backupApplianceBackupProperties")) + $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.encode(message.backupApplianceBackupProperties, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.gcpBackupPlanInfo != null && Object.hasOwnProperty.call(message, "gcpBackupPlanInfo")) + $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.encode(message.gcpBackupPlanInfo, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.resourceSizeBytes != null && Object.hasOwnProperty.call(message, "resourceSizeBytes")) + writer.uint32(/* id 23, wireType 0 =*/184).int64(message.resourceSizeBytes); + return writer; + }; + + /** + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.IBackup} message Backup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Backup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Backup message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Backup} Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Backup.decode = function 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.backupdr.v1.Backup(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + 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 6: { + message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.consistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.etag = reader.string(); + break; + } + case 15: { + message.state = reader.int32(); + break; + } + case 17: { + if (!(message.serviceLocks && message.serviceLocks.length)) + message.serviceLocks = []; + message.serviceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader, reader.uint32())); + break; + } + case 18: { + if (!(message.backupApplianceLocks && message.backupApplianceLocks.length)) + message.backupApplianceLocks = []; + message.backupApplianceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader, reader.uint32())); + break; + } + case 19: { + message.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.decode(reader, reader.uint32()); + break; + } + case 21: { + message.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.decode(reader, reader.uint32()); + break; + } + case 20: { + message.backupType = reader.int32(); + break; + } + case 22: { + message.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.decode(reader, reader.uint32()); + break; + } + case 23: { + message.resourceSizeBytes = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Backup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Backup} Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Backup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Backup message. + * @function verify + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Backup.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.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + properties._createTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + 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.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { + properties._enforcedRetentionEndTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.enforcedRetentionEndTime); + if (error) + return "enforcedRetentionEndTime." + error; + } + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + properties._expireTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + } + if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { + properties._consistencyTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.consistencyTime); + if (error) + return "consistencyTime." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) { + properties._etag = 1; + if (!$util.isString(message.etag)) + return "etag: 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.serviceLocks != null && message.hasOwnProperty("serviceLocks")) { + if (!Array.isArray(message.serviceLocks)) + return "serviceLocks: array expected"; + for (var i = 0; i < message.serviceLocks.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupLock.verify(message.serviceLocks[i]); + if (error) + return "serviceLocks." + error; + } + } + if (message.backupApplianceLocks != null && message.hasOwnProperty("backupApplianceLocks")) { + if (!Array.isArray(message.backupApplianceLocks)) + return "backupApplianceLocks: array expected"; + for (var i = 0; i < message.backupApplianceLocks.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupLock.verify(message.backupApplianceLocks[i]); + if (error) + return "backupApplianceLocks." + error; + } + } + if (message.computeInstanceBackupProperties != null && message.hasOwnProperty("computeInstanceBackupProperties")) { + properties.backupProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify(message.computeInstanceBackupProperties); + if (error) + return "computeInstanceBackupProperties." + error; + } + } + if (message.backupApplianceBackupProperties != null && message.hasOwnProperty("backupApplianceBackupProperties")) { + if (properties.backupProperties === 1) + return "backupProperties: multiple values"; + properties.backupProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify(message.backupApplianceBackupProperties); + if (error) + return "backupApplianceBackupProperties." + error; + } + } + if (message.backupType != null && message.hasOwnProperty("backupType")) + switch (message.backupType) { + default: + return "backupType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.gcpBackupPlanInfo != null && message.hasOwnProperty("gcpBackupPlanInfo")) { + properties.planInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify(message.gcpBackupPlanInfo); + if (error) + return "gcpBackupPlanInfo." + error; + } + } + if (message.resourceSizeBytes != null && message.hasOwnProperty("resourceSizeBytes")) + if (!$util.isInteger(message.resourceSizeBytes) && !(message.resourceSizeBytes && $util.isInteger(message.resourceSizeBytes.low) && $util.isInteger(message.resourceSizeBytes.high))) + return "resourceSizeBytes: integer|Long expected"; + return null; + }; + + /** + * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Backup} Backup + */ + Backup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Backup) + return object; + var message = new $root.google.cloud.backupdr.v1.Backup(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.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.backupdr.v1.Backup.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.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.enforcedRetentionEndTime != null) { + if (typeof object.enforcedRetentionEndTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.enforcedRetentionEndTime: object expected"); + message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.fromObject(object.enforcedRetentionEndTime); + } + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + if (object.consistencyTime != null) { + if (typeof object.consistencyTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.consistencyTime: object expected"); + message.consistencyTime = $root.google.protobuf.Timestamp.fromObject(object.consistencyTime); + } + if (object.etag != null) + message.etag = String(object.etag); + 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 "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.serviceLocks) { + if (!Array.isArray(object.serviceLocks)) + throw TypeError(".google.cloud.backupdr.v1.Backup.serviceLocks: array expected"); + message.serviceLocks = []; + for (var i = 0; i < object.serviceLocks.length; ++i) { + if (typeof object.serviceLocks[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.serviceLocks: object expected"); + message.serviceLocks[i] = $root.google.cloud.backupdr.v1.BackupLock.fromObject(object.serviceLocks[i]); + } + } + if (object.backupApplianceLocks) { + if (!Array.isArray(object.backupApplianceLocks)) + throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceLocks: array expected"); + message.backupApplianceLocks = []; + for (var i = 0; i < object.backupApplianceLocks.length; ++i) { + if (typeof object.backupApplianceLocks[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceLocks: object expected"); + message.backupApplianceLocks[i] = $root.google.cloud.backupdr.v1.BackupLock.fromObject(object.backupApplianceLocks[i]); + } + } + if (object.computeInstanceBackupProperties != null) { + if (typeof object.computeInstanceBackupProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.computeInstanceBackupProperties: object expected"); + message.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.fromObject(object.computeInstanceBackupProperties); + } + if (object.backupApplianceBackupProperties != null) { + if (typeof object.backupApplianceBackupProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceBackupProperties: object expected"); + message.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.fromObject(object.backupApplianceBackupProperties); + } + switch (object.backupType) { + default: + if (typeof object.backupType === "number") { + message.backupType = object.backupType; + break; + } + break; + case "BACKUP_TYPE_UNSPECIFIED": + case 0: + message.backupType = 0; + break; + case "SCHEDULED": + case 1: + message.backupType = 1; + break; + case "ON_DEMAND": + case 2: + message.backupType = 2; + break; + } + if (object.gcpBackupPlanInfo != null) { + if (typeof object.gcpBackupPlanInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.gcpBackupPlanInfo: object expected"); + message.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.fromObject(object.gcpBackupPlanInfo); + } + if (object.resourceSizeBytes != null) + if ($util.Long) + (message.resourceSizeBytes = $util.Long.fromValue(object.resourceSizeBytes)).unsigned = false; + else if (typeof object.resourceSizeBytes === "string") + message.resourceSizeBytes = parseInt(object.resourceSizeBytes, 10); + else if (typeof object.resourceSizeBytes === "number") + message.resourceSizeBytes = object.resourceSizeBytes; + else if (typeof object.resourceSizeBytes === "object") + message.resourceSizeBytes = new $util.LongBits(object.resourceSizeBytes.low >>> 0, object.resourceSizeBytes.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Backup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.Backup} message Backup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Backup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.serviceLocks = []; + object.backupApplianceLocks = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.backupType = options.enums === String ? "BACKUP_TYPE_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.resourceSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.resourceSizeBytes = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (options.oneofs) + object._createTime = "createTime"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + 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.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { + object.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.toObject(message.enforcedRetentionEndTime, options); + if (options.oneofs) + object._enforcedRetentionEndTime = "enforcedRetentionEndTime"; + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (options.oneofs) + object._expireTime = "expireTime"; + } + if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { + object.consistencyTime = $root.google.protobuf.Timestamp.toObject(message.consistencyTime, options); + if (options.oneofs) + object._consistencyTime = "consistencyTime"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + object.etag = message.etag; + if (options.oneofs) + object._etag = "etag"; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.Backup.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.Backup.State[message.state] : message.state; + if (message.serviceLocks && message.serviceLocks.length) { + object.serviceLocks = []; + for (var j = 0; j < message.serviceLocks.length; ++j) + object.serviceLocks[j] = $root.google.cloud.backupdr.v1.BackupLock.toObject(message.serviceLocks[j], options); + } + if (message.backupApplianceLocks && message.backupApplianceLocks.length) { + object.backupApplianceLocks = []; + for (var j = 0; j < message.backupApplianceLocks.length; ++j) + object.backupApplianceLocks[j] = $root.google.cloud.backupdr.v1.BackupLock.toObject(message.backupApplianceLocks[j], options); + } + if (message.computeInstanceBackupProperties != null && message.hasOwnProperty("computeInstanceBackupProperties")) { + object.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.toObject(message.computeInstanceBackupProperties, options); + if (options.oneofs) + object.backupProperties = "computeInstanceBackupProperties"; + } + if (message.backupType != null && message.hasOwnProperty("backupType")) + object.backupType = options.enums === String ? $root.google.cloud.backupdr.v1.Backup.BackupType[message.backupType] === undefined ? message.backupType : $root.google.cloud.backupdr.v1.Backup.BackupType[message.backupType] : message.backupType; + if (message.backupApplianceBackupProperties != null && message.hasOwnProperty("backupApplianceBackupProperties")) { + object.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.toObject(message.backupApplianceBackupProperties, options); + if (options.oneofs) + object.backupProperties = "backupApplianceBackupProperties"; + } + if (message.gcpBackupPlanInfo != null && message.hasOwnProperty("gcpBackupPlanInfo")) { + object.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.toObject(message.gcpBackupPlanInfo, options); + if (options.oneofs) + object.planInfo = "gcpBackupPlanInfo"; + } + if (message.resourceSizeBytes != null && message.hasOwnProperty("resourceSizeBytes")) + if (typeof message.resourceSizeBytes === "number") + object.resourceSizeBytes = options.longs === String ? String(message.resourceSizeBytes) : message.resourceSizeBytes; + else + object.resourceSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resourceSizeBytes) : options.longs === Number ? new $util.LongBits(message.resourceSizeBytes.low >>> 0, message.resourceSizeBytes.high >>> 0).toNumber() : message.resourceSizeBytes; + return object; + }; + + /** + * Converts this Backup to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Backup + * @instance + * @returns {Object.} JSON object + */ + Backup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Backup + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Backup"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.Backup.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} ERROR=4 ERROR value + */ + Backup.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + /** + * BackupType enum. + * @name google.cloud.backupdr.v1.Backup.BackupType + * @enum {number} + * @property {number} BACKUP_TYPE_UNSPECIFIED=0 BACKUP_TYPE_UNSPECIFIED value + * @property {number} SCHEDULED=1 SCHEDULED value + * @property {number} ON_DEMAND=2 ON_DEMAND value + */ + Backup.BackupType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCHEDULED"] = 1; + values[valuesById[2] = "ON_DEMAND"] = 2; + return values; + })(); + + Backup.GCPBackupPlanInfo = (function() { + + /** + * Properties of a GCPBackupPlanInfo. + * @memberof google.cloud.backupdr.v1.Backup + * @interface IGCPBackupPlanInfo + * @property {string|null} [backupPlan] GCPBackupPlanInfo backupPlan + * @property {string|null} [backupPlanRuleId] GCPBackupPlanInfo backupPlanRuleId + */ + + /** + * Constructs a new GCPBackupPlanInfo. + * @memberof google.cloud.backupdr.v1.Backup + * @classdesc Represents a GCPBackupPlanInfo. + * @implements IGCPBackupPlanInfo + * @constructor + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo=} [properties] Properties to set + */ + function GCPBackupPlanInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GCPBackupPlanInfo backupPlan. + * @member {string} backupPlan + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @instance + */ + GCPBackupPlanInfo.prototype.backupPlan = ""; + + /** + * GCPBackupPlanInfo backupPlanRuleId. + * @member {string} backupPlanRuleId + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @instance + */ + GCPBackupPlanInfo.prototype.backupPlanRuleId = ""; + + /** + * Creates a new GCPBackupPlanInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo instance + */ + GCPBackupPlanInfo.create = function create(properties) { + return new GCPBackupPlanInfo(properties); + }; + + /** + * Encodes the specified GCPBackupPlanInfo message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo} message GCPBackupPlanInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GCPBackupPlanInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPlan); + if (message.backupPlanRuleId != null && Object.hasOwnProperty.call(message, "backupPlanRuleId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanRuleId); + return writer; + }; + + /** + * Encodes the specified GCPBackupPlanInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo} message GCPBackupPlanInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GCPBackupPlanInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GCPBackupPlanInfo.decode = function 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.backupdr.v1.Backup.GCPBackupPlanInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backupPlan = reader.string(); + break; + } + case 2: { + message.backupPlanRuleId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GCPBackupPlanInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GCPBackupPlanInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GCPBackupPlanInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + if (!$util.isString(message.backupPlan)) + return "backupPlan: string expected"; + if (message.backupPlanRuleId != null && message.hasOwnProperty("backupPlanRuleId")) + if (!$util.isString(message.backupPlanRuleId)) + return "backupPlanRuleId: string expected"; + return null; + }; + + /** + * Creates a GCPBackupPlanInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo + */ + GCPBackupPlanInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo(); + if (object.backupPlan != null) + message.backupPlan = String(object.backupPlan); + if (object.backupPlanRuleId != null) + message.backupPlanRuleId = String(object.backupPlanRuleId); + return message; + }; + + /** + * Creates a plain object from a GCPBackupPlanInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} message GCPBackupPlanInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GCPBackupPlanInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.backupPlan = ""; + object.backupPlanRuleId = ""; + } + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + object.backupPlan = message.backupPlan; + if (message.backupPlanRuleId != null && message.hasOwnProperty("backupPlanRuleId")) + object.backupPlanRuleId = message.backupPlanRuleId; + return object; + }; + + /** + * Converts this GCPBackupPlanInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @instance + * @returns {Object.} JSON object + */ + GCPBackupPlanInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GCPBackupPlanInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GCPBackupPlanInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo"; + }; + + return GCPBackupPlanInfo; + })(); + + return Backup; + })(); + + v1.CreateBackupVaultRequest = (function() { + + /** + * Properties of a CreateBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ICreateBackupVaultRequest + * @property {string|null} [parent] CreateBackupVaultRequest parent + * @property {string|null} [backupVaultId] CreateBackupVaultRequest backupVaultId + * @property {google.cloud.backupdr.v1.IBackupVault|null} [backupVault] CreateBackupVaultRequest backupVault + * @property {string|null} [requestId] CreateBackupVaultRequest requestId + * @property {boolean|null} [validateOnly] CreateBackupVaultRequest validateOnly + */ + + /** + * Constructs a new CreateBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CreateBackupVaultRequest. + * @implements ICreateBackupVaultRequest + * @constructor + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest=} [properties] Properties to set + */ + function CreateBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBackupVaultRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.parent = ""; + + /** + * CreateBackupVaultRequest backupVaultId. + * @member {string} backupVaultId + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.backupVaultId = ""; + + /** + * CreateBackupVaultRequest backupVault. + * @member {google.cloud.backupdr.v1.IBackupVault|null|undefined} backupVault + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.backupVault = null; + + /** + * CreateBackupVaultRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.requestId = ""; + + /** + * CreateBackupVaultRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest instance + */ + CreateBackupVaultRequest.create = function create(properties) { + return new CreateBackupVaultRequest(properties); + }; + + /** + * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupVaultRequest.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.backupVaultId != null && Object.hasOwnProperty.call(message, "backupVaultId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupVaultId); + if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVault, 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); + return writer; + }; + + /** + * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupVaultRequest.decode = function 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.backupdr.v1.CreateBackupVaultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.backupVaultId = reader.string(); + break; + } + case 3: { + message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBackupVaultRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBackupVaultRequest.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.backupVaultId != null && message.hasOwnProperty("backupVaultId")) + if (!$util.isString(message.backupVaultId)) + return "backupVaultId: string expected"; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault); + if (error) + return "backupVault." + 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"; + return null; + }; + + /** + * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest + */ + CreateBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupVaultRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.CreateBackupVaultRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupVaultId != null) + message.backupVaultId = String(object.backupVaultId); + if (object.backupVault != null) { + if (typeof object.backupVault !== "object") + throw TypeError(".google.cloud.backupdr.v1.CreateBackupVaultRequest.backupVault: object expected"); + message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVault); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.CreateBackupVaultRequest} message CreateBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupVaultId = ""; + object.backupVault = null; + object.requestId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupVaultId != null && message.hasOwnProperty("backupVaultId")) + object.backupVaultId = message.backupVaultId; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) + object.backupVault = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVault, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupVaultRequest"; + }; + + return CreateBackupVaultRequest; + })(); + + v1.ListBackupVaultsRequest = (function() { + + /** + * Properties of a ListBackupVaultsRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupVaultsRequest + * @property {string|null} [parent] ListBackupVaultsRequest parent + * @property {number|null} [pageSize] ListBackupVaultsRequest pageSize + * @property {string|null} [pageToken] ListBackupVaultsRequest pageToken + * @property {string|null} [filter] ListBackupVaultsRequest filter + * @property {string|null} [orderBy] ListBackupVaultsRequest orderBy + * @property {google.cloud.backupdr.v1.BackupVaultView|null} [view] ListBackupVaultsRequest view + */ + + /** + * Constructs a new ListBackupVaultsRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupVaultsRequest. + * @implements IListBackupVaultsRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest=} [properties] Properties to set + */ + function ListBackupVaultsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupVaultsRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.parent = ""; + + /** + * ListBackupVaultsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.pageSize = 0; + + /** + * ListBackupVaultsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.pageToken = ""; + + /** + * ListBackupVaultsRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.filter = ""; + + /** + * ListBackupVaultsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.orderBy = ""; + + /** + * ListBackupVaultsRequest view. + * @member {google.cloud.backupdr.v1.BackupVaultView} view + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.view = 0; + + /** + * Creates a new ListBackupVaultsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest instance + */ + ListBackupVaultsRequest.create = function create(properties) { + return new ListBackupVaultsRequest(properties); + }; + + /** + * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsRequest.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); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); + return writer; + }; + + /** + * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsRequest.decode = function 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.backupdr.v1.ListBackupVaultsRequest(); + 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; + } + case 6: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupVaultsRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupVaultsRequest.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"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest + */ + ListBackupVaultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupVaultsRequest(); + 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); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VAULT_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VAULT_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VAULT_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.ListBackupVaultsRequest} message ListBackupVaultsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupVaultsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.view = options.enums === String ? "BACKUP_VAULT_VIEW_UNSPECIFIED" : 0; + } + 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; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVaultView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupVaultView[message.view] : message.view; + return object; + }; + + /** + * Converts this ListBackupVaultsRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupVaultsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupVaultsRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupVaultsRequest"; + }; + + return ListBackupVaultsRequest; + })(); + + v1.ListBackupVaultsResponse = (function() { + + /** + * Properties of a ListBackupVaultsResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupVaultsResponse + * @property {Array.|null} [backupVaults] ListBackupVaultsResponse backupVaults + * @property {string|null} [nextPageToken] ListBackupVaultsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupVaultsResponse unreachable + */ + + /** + * Constructs a new ListBackupVaultsResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupVaultsResponse. + * @implements IListBackupVaultsResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse=} [properties] Properties to set + */ + function ListBackupVaultsResponse(properties) { + this.backupVaults = []; + 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]]; + } + + /** + * ListBackupVaultsResponse backupVaults. + * @member {Array.} backupVaults + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @instance + */ + ListBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; + + /** + * ListBackupVaultsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @instance + */ + ListBackupVaultsResponse.prototype.nextPageToken = ""; + + /** + * ListBackupVaultsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @instance + */ + ListBackupVaultsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupVaultsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse instance + */ + ListBackupVaultsResponse.create = function create(properties) { + return new ListBackupVaultsResponse(properties); + }; + + /** + * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupVaults != null && message.backupVaults.length) + for (var i = 0; i < message.backupVaults.length; ++i) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVaults[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 ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsResponse.decode = function 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.backupdr.v1.ListBackupVaultsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backupVaults && message.backupVaults.length)) + message.backupVaults = []; + message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.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 ListBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupVaultsResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupVaultsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { + if (!Array.isArray(message.backupVaults)) + return "backupVaults: array expected"; + for (var i = 0; i < message.backupVaults.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVaults[i]); + if (error) + return "backupVaults." + 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 ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse + */ + ListBackupVaultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupVaultsResponse(); + if (object.backupVaults) { + if (!Array.isArray(object.backupVaults)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.backupVaults: array expected"); + message.backupVaults = []; + for (var i = 0; i < object.backupVaults.length; ++i) { + if (typeof object.backupVaults[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.backupVaults: object expected"); + message.backupVaults[i] = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVaults[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.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 ListBackupVaultsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.ListBackupVaultsResponse} message ListBackupVaultsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupVaultsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupVaults = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backupVaults && message.backupVaults.length) { + object.backupVaults = []; + for (var j = 0; j < message.backupVaults.length; ++j) + object.backupVaults[j] = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVaults[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 ListBackupVaultsResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupVaultsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupVaultsResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupVaultsResponse"; + }; + + return ListBackupVaultsResponse; + })(); + + v1.FetchUsableBackupVaultsRequest = (function() { + + /** + * Properties of a FetchUsableBackupVaultsRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IFetchUsableBackupVaultsRequest + * @property {string|null} [parent] FetchUsableBackupVaultsRequest parent + * @property {number|null} [pageSize] FetchUsableBackupVaultsRequest pageSize + * @property {string|null} [pageToken] FetchUsableBackupVaultsRequest pageToken + * @property {string|null} [filter] FetchUsableBackupVaultsRequest filter + * @property {string|null} [orderBy] FetchUsableBackupVaultsRequest orderBy + */ + + /** + * Constructs a new FetchUsableBackupVaultsRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FetchUsableBackupVaultsRequest. + * @implements IFetchUsableBackupVaultsRequest + * @constructor + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest=} [properties] Properties to set + */ + function FetchUsableBackupVaultsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchUsableBackupVaultsRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.parent = ""; + + /** + * FetchUsableBackupVaultsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.pageSize = 0; + + /** + * FetchUsableBackupVaultsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.pageToken = ""; + + /** + * FetchUsableBackupVaultsRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.filter = ""; + + /** + * FetchUsableBackupVaultsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.orderBy = ""; + + /** + * Creates a new FetchUsableBackupVaultsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest instance + */ + FetchUsableBackupVaultsRequest.create = function create(properties) { + return new FetchUsableBackupVaultsRequest(properties); + }; + + /** + * Encodes the specified FetchUsableBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchUsableBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchUsableBackupVaultsRequest.decode = function 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.backupdr.v1.FetchUsableBackupVaultsRequest(); + 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 FetchUsableBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchUsableBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchUsableBackupVaultsRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest + */ + FetchUsableBackupVaultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest(); + 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 FetchUsableBackupVaultsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + * @returns {Object.} JSON object + */ + FetchUsableBackupVaultsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchUsableBackupVaultsRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchUsableBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest"; + }; + + return FetchUsableBackupVaultsRequest; + })(); + + v1.FetchUsableBackupVaultsResponse = (function() { + + /** + * Properties of a FetchUsableBackupVaultsResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IFetchUsableBackupVaultsResponse + * @property {Array.|null} [backupVaults] FetchUsableBackupVaultsResponse backupVaults + * @property {string|null} [nextPageToken] FetchUsableBackupVaultsResponse nextPageToken + * @property {Array.|null} [unreachable] FetchUsableBackupVaultsResponse unreachable + */ + + /** + * Constructs a new FetchUsableBackupVaultsResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FetchUsableBackupVaultsResponse. + * @implements IFetchUsableBackupVaultsResponse + * @constructor + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse=} [properties] Properties to set + */ + function FetchUsableBackupVaultsResponse(properties) { + this.backupVaults = []; + 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]]; + } + + /** + * FetchUsableBackupVaultsResponse backupVaults. + * @member {Array.} backupVaults + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @instance + */ + FetchUsableBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; + + /** + * FetchUsableBackupVaultsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @instance + */ + FetchUsableBackupVaultsResponse.prototype.nextPageToken = ""; + + /** + * FetchUsableBackupVaultsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @instance + */ + FetchUsableBackupVaultsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new FetchUsableBackupVaultsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse instance + */ + FetchUsableBackupVaultsResponse.create = function create(properties) { + return new FetchUsableBackupVaultsResponse(properties); + }; + + /** + * Encodes the specified FetchUsableBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchUsableBackupVaultsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupVaults != null && message.backupVaults.length) + for (var i = 0; i < message.backupVaults.length; ++i) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVaults[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 FetchUsableBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchUsableBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchUsableBackupVaultsResponse.decode = function 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.backupdr.v1.FetchUsableBackupVaultsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backupVaults && message.backupVaults.length)) + message.backupVaults = []; + message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.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 FetchUsableBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchUsableBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchUsableBackupVaultsResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchUsableBackupVaultsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { + if (!Array.isArray(message.backupVaults)) + return "backupVaults: array expected"; + for (var i = 0; i < message.backupVaults.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVaults[i]); + if (error) + return "backupVaults." + 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 FetchUsableBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse + */ + FetchUsableBackupVaultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse(); + if (object.backupVaults) { + if (!Array.isArray(object.backupVaults)) + throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.backupVaults: array expected"); + message.backupVaults = []; + for (var i = 0; i < object.backupVaults.length; ++i) { + if (typeof object.backupVaults[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.backupVaults: object expected"); + message.backupVaults[i] = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVaults[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.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 FetchUsableBackupVaultsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchUsableBackupVaultsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupVaults = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backupVaults && message.backupVaults.length) { + object.backupVaults = []; + for (var j = 0; j < message.backupVaults.length; ++j) + object.backupVaults[j] = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVaults[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 FetchUsableBackupVaultsResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @instance + * @returns {Object.} JSON object + */ + FetchUsableBackupVaultsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchUsableBackupVaultsResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchUsableBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse"; + }; + + return FetchUsableBackupVaultsResponse; + })(); + + v1.GetBackupVaultRequest = (function() { + + /** + * Properties of a GetBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetBackupVaultRequest + * @property {string|null} [name] GetBackupVaultRequest name + * @property {google.cloud.backupdr.v1.BackupVaultView|null} [view] GetBackupVaultRequest view + */ + + /** + * Constructs a new GetBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetBackupVaultRequest. + * @implements IGetBackupVaultRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest=} [properties] Properties to set + */ + function GetBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupVaultRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @instance + */ + GetBackupVaultRequest.prototype.name = ""; + + /** + * GetBackupVaultRequest view. + * @member {google.cloud.backupdr.v1.BackupVaultView} view + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @instance + */ + GetBackupVaultRequest.prototype.view = 0; + + /** + * Creates a new GetBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest instance + */ + GetBackupVaultRequest.create = function create(properties) { + return new GetBackupVaultRequest(properties); + }; + + /** + * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupVaultRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupVaultRequest.decode = function 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.backupdr.v1.GetBackupVaultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupVaultRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupVaultRequest.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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest + */ + GetBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupVaultRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetBackupVaultRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VAULT_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VAULT_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VAULT_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.GetBackupVaultRequest} message GetBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "BACKUP_VAULT_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVaultView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupVaultView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupVaultRequest"; + }; + + return GetBackupVaultRequest; + })(); + + v1.UpdateBackupVaultRequest = (function() { + + /** + * Properties of an UpdateBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IUpdateBackupVaultRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupVaultRequest updateMask + * @property {google.cloud.backupdr.v1.IBackupVault|null} [backupVault] UpdateBackupVaultRequest backupVault + * @property {string|null} [requestId] UpdateBackupVaultRequest requestId + * @property {boolean|null} [validateOnly] UpdateBackupVaultRequest validateOnly + * @property {boolean|null} [force] UpdateBackupVaultRequest force + */ + + /** + * Constructs a new UpdateBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an UpdateBackupVaultRequest. + * @implements IUpdateBackupVaultRequest + * @constructor + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest=} [properties] Properties to set + */ + function UpdateBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateBackupVaultRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.updateMask = null; + + /** + * UpdateBackupVaultRequest backupVault. + * @member {google.cloud.backupdr.v1.IBackupVault|null|undefined} backupVault + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.backupVault = null; + + /** + * UpdateBackupVaultRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.requestId = ""; + + /** + * UpdateBackupVaultRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.validateOnly = false; + + /** + * UpdateBackupVaultRequest force. + * @member {boolean} force + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.force = false; + + /** + * Creates a new UpdateBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest instance + */ + UpdateBackupVaultRequest.create = function create(properties) { + return new UpdateBackupVaultRequest(properties); + }; + + /** + * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupVaultRequest.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.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVault, 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 UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupVaultRequest.decode = function 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.backupdr.v1.UpdateBackupVaultRequest(); + 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.backupVault = $root.google.cloud.backupdr.v1.BackupVault.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 UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateBackupVaultRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateBackupVaultRequest.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.backupVault != null && message.hasOwnProperty("backupVault")) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault); + if (error) + return "backupVault." + 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 UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest + */ + UpdateBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupVaultRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.backupVault != null) { + if (typeof object.backupVault !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupVaultRequest.backupVault: object expected"); + message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVault); + } + 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 UpdateBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.UpdateBackupVaultRequest} message UpdateBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.backupVault = 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.backupVault != null && message.hasOwnProperty("backupVault")) + object.backupVault = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVault, 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 UpdateBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupVaultRequest"; + }; + + return UpdateBackupVaultRequest; + })(); + + v1.DeleteBackupVaultRequest = (function() { + + /** + * Properties of a DeleteBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IDeleteBackupVaultRequest + * @property {string|null} [name] DeleteBackupVaultRequest name + * @property {string|null} [requestId] DeleteBackupVaultRequest requestId + * @property {boolean|null} [force] DeleteBackupVaultRequest force + * @property {string|null} [etag] DeleteBackupVaultRequest etag + * @property {boolean|null} [validateOnly] DeleteBackupVaultRequest validateOnly + * @property {boolean|null} [allowMissing] DeleteBackupVaultRequest allowMissing + */ + + /** + * Constructs a new DeleteBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DeleteBackupVaultRequest. + * @implements IDeleteBackupVaultRequest + * @constructor + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest=} [properties] Properties to set + */ + function DeleteBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupVaultRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.name = ""; + + /** + * DeleteBackupVaultRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.requestId = ""; + + /** + * DeleteBackupVaultRequest force. + * @member {boolean} force + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.force = false; + + /** + * DeleteBackupVaultRequest etag. + * @member {string} etag + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.etag = ""; + + /** + * DeleteBackupVaultRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.validateOnly = false; + + /** + * DeleteBackupVaultRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.allowMissing = false; + + /** + * Creates a new DeleteBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest instance + */ + DeleteBackupVaultRequest.create = function create(properties) { + return new DeleteBackupVaultRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupVaultRequest.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); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.allowMissing); + return writer; + }; + + /** + * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupVaultRequest.decode = function 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.backupdr.v1.DeleteBackupVaultRequest(); + 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; + } + case 4: { + message.etag = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } + case 6: { + message.allowMissing = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupVaultRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupVaultRequest.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"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + return null; + }; + + /** + * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest + */ + DeleteBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest(); + 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); + if (object.etag != null) + message.etag = String(object.etag); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + return message; + }; + + /** + * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.DeleteBackupVaultRequest} message DeleteBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + object.force = false; + object.etag = ""; + object.validateOnly = false; + object.allowMissing = 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; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + return object; + }; + + /** + * Converts this DeleteBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupVaultRequest"; + }; + + return DeleteBackupVaultRequest; + })(); + + v1.ListDataSourcesRequest = (function() { + + /** + * Properties of a ListDataSourcesRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListDataSourcesRequest + * @property {string|null} [parent] ListDataSourcesRequest parent + * @property {number|null} [pageSize] ListDataSourcesRequest pageSize + * @property {string|null} [pageToken] ListDataSourcesRequest pageToken + * @property {string|null} [filter] ListDataSourcesRequest filter + * @property {string|null} [orderBy] ListDataSourcesRequest orderBy + */ + + /** + * Constructs a new ListDataSourcesRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListDataSourcesRequest. + * @implements IListDataSourcesRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest=} [properties] Properties to set + */ + function ListDataSourcesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataSourcesRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.parent = ""; + + /** + * ListDataSourcesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.pageSize = 0; + + /** + * ListDataSourcesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.pageToken = ""; + + /** + * ListDataSourcesRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.filter = ""; + + /** + * ListDataSourcesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListDataSourcesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest instance + */ + ListDataSourcesRequest.create = function create(properties) { + return new ListDataSourcesRequest(properties); + }; + + /** + * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesRequest.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 ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataSourcesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesRequest.decode = function 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.backupdr.v1.ListDataSourcesRequest(); + 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 ListDataSourcesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataSourcesRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataSourcesRequest.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 ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest + */ + ListDataSourcesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListDataSourcesRequest(); + 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 ListDataSourcesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.backupdr.v1.ListDataSourcesRequest} message ListDataSourcesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataSourcesRequest.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 ListDataSourcesRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataSourcesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataSourcesRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataSourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourcesRequest"; + }; + + return ListDataSourcesRequest; + })(); + + v1.ListDataSourcesResponse = (function() { + + /** + * Properties of a ListDataSourcesResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListDataSourcesResponse + * @property {Array.|null} [dataSources] ListDataSourcesResponse dataSources + * @property {string|null} [nextPageToken] ListDataSourcesResponse nextPageToken + * @property {Array.|null} [unreachable] ListDataSourcesResponse unreachable + */ + + /** + * Constructs a new ListDataSourcesResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListDataSourcesResponse. + * @implements IListDataSourcesResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse=} [properties] Properties to set + */ + function ListDataSourcesResponse(properties) { + this.dataSources = []; + 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]]; + } + + /** + * ListDataSourcesResponse dataSources. + * @member {Array.} dataSources + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @instance + */ + ListDataSourcesResponse.prototype.dataSources = $util.emptyArray; + + /** + * ListDataSourcesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @instance + */ + ListDataSourcesResponse.prototype.nextPageToken = ""; + + /** + * ListDataSourcesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @instance + */ + ListDataSourcesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListDataSourcesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse instance + */ + ListDataSourcesResponse.create = function create(properties) { + return new ListDataSourcesResponse(properties); + }; + + /** + * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSources != null && message.dataSources.length) + for (var i = 0; i < message.dataSources.length; ++i) + $root.google.cloud.backupdr.v1.DataSource.encode(message.dataSources[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 ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataSourcesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesResponse.decode = function 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.backupdr.v1.ListDataSourcesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataSources && message.dataSources.length)) + message.dataSources = []; + message.dataSources.push($root.google.cloud.backupdr.v1.DataSource.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 ListDataSourcesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataSourcesResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataSourcesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSources != null && message.hasOwnProperty("dataSources")) { + if (!Array.isArray(message.dataSources)) + return "dataSources: array expected"; + for (var i = 0; i < message.dataSources.length; ++i) { + var error = $root.google.cloud.backupdr.v1.DataSource.verify(message.dataSources[i]); + if (error) + return "dataSources." + 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 ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse + */ + ListDataSourcesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListDataSourcesResponse(); + if (object.dataSources) { + if (!Array.isArray(object.dataSources)) + throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.dataSources: array expected"); + message.dataSources = []; + for (var i = 0; i < object.dataSources.length; ++i) { + if (typeof object.dataSources[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.dataSources: object expected"); + message.dataSources[i] = $root.google.cloud.backupdr.v1.DataSource.fromObject(object.dataSources[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.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 ListDataSourcesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.backupdr.v1.ListDataSourcesResponse} message ListDataSourcesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataSourcesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataSources = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.dataSources && message.dataSources.length) { + object.dataSources = []; + for (var j = 0; j < message.dataSources.length; ++j) + object.dataSources[j] = $root.google.cloud.backupdr.v1.DataSource.toObject(message.dataSources[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 ListDataSourcesResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataSourcesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataSourcesResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataSourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourcesResponse"; + }; + + return ListDataSourcesResponse; + })(); + + v1.GetDataSourceRequest = (function() { + + /** + * Properties of a GetDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetDataSourceRequest + * @property {string|null} [name] GetDataSourceRequest name + */ + + /** + * Constructs a new GetDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetDataSourceRequest. + * @implements IGetDataSourceRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest=} [properties] Properties to set + */ + function GetDataSourceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataSourceRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @instance + */ + GetDataSourceRequest.prototype.name = ""; + + /** + * Creates a new GetDataSourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest instance + */ + GetDataSourceRequest.create = function create(properties) { + return new GetDataSourceRequest(properties); + }; + + /** + * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataSourceRequest.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 GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataSourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataSourceRequest.decode = function 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.backupdr.v1.GetDataSourceRequest(); + 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 GetDataSourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataSourceRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataSourceRequest.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 GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest + */ + GetDataSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetDataSourceRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetDataSourceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.GetDataSourceRequest} message GetDataSourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataSourceRequest.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 GetDataSourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataSourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataSourceRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetDataSourceRequest"; + }; + + return GetDataSourceRequest; + })(); + + v1.UpdateDataSourceRequest = (function() { + + /** + * Properties of an UpdateDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IUpdateDataSourceRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataSourceRequest updateMask + * @property {google.cloud.backupdr.v1.IDataSource|null} [dataSource] UpdateDataSourceRequest dataSource + * @property {string|null} [requestId] UpdateDataSourceRequest requestId + * @property {boolean|null} [allowMissing] UpdateDataSourceRequest allowMissing + */ + + /** + * Constructs a new UpdateDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an UpdateDataSourceRequest. + * @implements IUpdateDataSourceRequest + * @constructor + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest=} [properties] Properties to set + */ + function UpdateDataSourceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDataSourceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + */ + UpdateDataSourceRequest.prototype.updateMask = null; + + /** + * UpdateDataSourceRequest dataSource. + * @member {google.cloud.backupdr.v1.IDataSource|null|undefined} dataSource + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + */ + UpdateDataSourceRequest.prototype.dataSource = null; + + /** + * UpdateDataSourceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + */ + UpdateDataSourceRequest.prototype.requestId = ""; + + /** + * UpdateDataSourceRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + */ + UpdateDataSourceRequest.prototype.allowMissing = false; + + /** + * Creates a new UpdateDataSourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest instance + */ + UpdateDataSourceRequest.create = function create(properties) { + return new UpdateDataSourceRequest(properties); + }; + + /** + * Encodes the specified UpdateDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} message UpdateDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataSourceRequest.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.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + $root.google.cloud.backupdr.v1.DataSource.encode(message.dataSource, 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.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowMissing); + return writer; + }; + + /** + * Encodes the specified UpdateDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} message UpdateDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataSourceRequest.decode = function 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.backupdr.v1.UpdateDataSourceRequest(); + 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.dataSource = $root.google.cloud.backupdr.v1.DataSource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + case 4: { + message.allowMissing = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDataSourceRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDataSourceRequest.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.dataSource != null && message.hasOwnProperty("dataSource")) { + var error = $root.google.cloud.backupdr.v1.DataSource.verify(message.dataSource); + if (error) + return "dataSource." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + return null; + }; + + /** + * Creates an UpdateDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest + */ + UpdateDataSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.UpdateDataSourceRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.UpdateDataSourceRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateDataSourceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.dataSource != null) { + if (typeof object.dataSource !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateDataSourceRequest.dataSource: object expected"); + message.dataSource = $root.google.cloud.backupdr.v1.DataSource.fromObject(object.dataSource); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + return message; + }; + + /** + * Creates a plain object from an UpdateDataSourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.UpdateDataSourceRequest} message UpdateDataSourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDataSourceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.dataSource = null; + object.requestId = ""; + object.allowMissing = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = $root.google.cloud.backupdr.v1.DataSource.toObject(message.dataSource, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + return object; + }; + + /** + * Converts this UpdateDataSourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDataSourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDataSourceRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateDataSourceRequest"; + }; + + return UpdateDataSourceRequest; + })(); + + v1.RemoveDataSourceRequest = (function() { + + /** + * Properties of a RemoveDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IRemoveDataSourceRequest + * @property {string|null} [name] RemoveDataSourceRequest name + * @property {string|null} [requestId] RemoveDataSourceRequest requestId + */ + + /** + * Constructs a new RemoveDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a RemoveDataSourceRequest. + * @implements IRemoveDataSourceRequest + * @constructor + * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest=} [properties] Properties to set + */ + function RemoveDataSourceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemoveDataSourceRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @instance + */ + RemoveDataSourceRequest.prototype.name = ""; + + /** + * RemoveDataSourceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @instance + */ + RemoveDataSourceRequest.prototype.requestId = ""; + + /** + * Creates a new RemoveDataSourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest instance + */ + RemoveDataSourceRequest.create = function create(properties) { + return new RemoveDataSourceRequest(properties); + }; + + /** + * Encodes the specified RemoveDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} message RemoveDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveDataSourceRequest.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 RemoveDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} message RemoveDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveDataSourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveDataSourceRequest.decode = function 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.backupdr.v1.RemoveDataSourceRequest(); + 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 RemoveDataSourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveDataSourceRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveDataSourceRequest.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 RemoveDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest + */ + RemoveDataSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RemoveDataSourceRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.RemoveDataSourceRequest(); + 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 RemoveDataSourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.RemoveDataSourceRequest} message RemoveDataSourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveDataSourceRequest.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 RemoveDataSourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @instance + * @returns {Object.} JSON object + */ + RemoveDataSourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemoveDataSourceRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.RemoveDataSourceRequest"; + }; + + return RemoveDataSourceRequest; + })(); + + v1.SetInternalStatusRequest = (function() { + + /** + * Properties of a SetInternalStatusRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ISetInternalStatusRequest + * @property {string|null} [dataSource] SetInternalStatusRequest dataSource + * @property {Uint8Array|null} [value] SetInternalStatusRequest value + * @property {google.cloud.backupdr.v1.BackupConfigState|null} [backupConfigState] SetInternalStatusRequest backupConfigState + * @property {string|null} [requestId] SetInternalStatusRequest requestId + */ + + /** + * Constructs a new SetInternalStatusRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a SetInternalStatusRequest. + * @implements ISetInternalStatusRequest + * @constructor + * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest=} [properties] Properties to set + */ + function SetInternalStatusRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetInternalStatusRequest dataSource. + * @member {string} dataSource + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @instance + */ + SetInternalStatusRequest.prototype.dataSource = ""; + + /** + * SetInternalStatusRequest value. + * @member {Uint8Array} value + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @instance + */ + SetInternalStatusRequest.prototype.value = $util.newBuffer([]); + + /** + * SetInternalStatusRequest backupConfigState. + * @member {google.cloud.backupdr.v1.BackupConfigState} backupConfigState + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @instance + */ + SetInternalStatusRequest.prototype.backupConfigState = 0; + + /** + * SetInternalStatusRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @instance + */ + SetInternalStatusRequest.prototype.requestId = ""; + + /** + * Creates a new SetInternalStatusRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest instance + */ + SetInternalStatusRequest.create = function create(properties) { + return new SetInternalStatusRequest(properties); + }; + + /** + * Encodes the specified SetInternalStatusRequest message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} message SetInternalStatusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetInternalStatusRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.backupConfigState != null && Object.hasOwnProperty.call(message, "backupConfigState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.backupConfigState); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified SetInternalStatusRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} message SetInternalStatusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetInternalStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetInternalStatusRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetInternalStatusRequest.decode = function 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.backupdr.v1.SetInternalStatusRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataSource = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + case 3: { + message.backupConfigState = reader.int32(); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetInternalStatusRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetInternalStatusRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetInternalStatusRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetInternalStatusRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: 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"; + if (message.backupConfigState != null && message.hasOwnProperty("backupConfigState")) + switch (message.backupConfigState) { + default: + return "backupConfigState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a SetInternalStatusRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest + */ + SetInternalStatusRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.SetInternalStatusRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.SetInternalStatusRequest(); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + 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; + switch (object.backupConfigState) { + default: + if (typeof object.backupConfigState === "number") { + message.backupConfigState = object.backupConfigState; + break; + } + break; + case "BACKUP_CONFIG_STATE_UNSPECIFIED": + case 0: + message.backupConfigState = 0; + break; + case "ACTIVE": + case 1: + message.backupConfigState = 1; + break; + case "PASSIVE": + case 2: + message.backupConfigState = 2; + break; + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a SetInternalStatusRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {google.cloud.backupdr.v1.SetInternalStatusRequest} message SetInternalStatusRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetInternalStatusRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataSource = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + object.backupConfigState = options.enums === String ? "BACKUP_CONFIG_STATE_UNSPECIFIED" : 0; + object.requestId = ""; + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + 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; + if (message.backupConfigState != null && message.hasOwnProperty("backupConfigState")) + object.backupConfigState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigState[message.backupConfigState] === undefined ? message.backupConfigState : $root.google.cloud.backupdr.v1.BackupConfigState[message.backupConfigState] : message.backupConfigState; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this SetInternalStatusRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @instance + * @returns {Object.} JSON object + */ + SetInternalStatusRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetInternalStatusRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetInternalStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.SetInternalStatusRequest"; + }; + + return SetInternalStatusRequest; + })(); + + v1.SetInternalStatusResponse = (function() { + + /** + * Properties of a SetInternalStatusResponse. + * @memberof google.cloud.backupdr.v1 + * @interface ISetInternalStatusResponse + */ + + /** + * Constructs a new SetInternalStatusResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a SetInternalStatusResponse. + * @implements ISetInternalStatusResponse + * @constructor + * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse=} [properties] Properties to set + */ + function SetInternalStatusResponse(properties) { + if (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 SetInternalStatusResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse instance + */ + SetInternalStatusResponse.create = function create(properties) { + return new SetInternalStatusResponse(properties); + }; + + /** + * Encodes the specified SetInternalStatusResponse message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse} message SetInternalStatusResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetInternalStatusResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified SetInternalStatusResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse} message SetInternalStatusResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetInternalStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetInternalStatusResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetInternalStatusResponse.decode = function 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.backupdr.v1.SetInternalStatusResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetInternalStatusResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetInternalStatusResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetInternalStatusResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetInternalStatusResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a SetInternalStatusResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse + */ + SetInternalStatusResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.SetInternalStatusResponse) + return object; + return new $root.google.cloud.backupdr.v1.SetInternalStatusResponse(); + }; + + /** + * Creates a plain object from a SetInternalStatusResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {google.cloud.backupdr.v1.SetInternalStatusResponse} message SetInternalStatusResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetInternalStatusResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SetInternalStatusResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @instance + * @returns {Object.} JSON object + */ + SetInternalStatusResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetInternalStatusResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetInternalStatusResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.SetInternalStatusResponse"; + }; + + return SetInternalStatusResponse; + })(); + + v1.InitiateBackupRequest = (function() { + + /** + * Properties of an InitiateBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IInitiateBackupRequest + * @property {string|null} [dataSource] InitiateBackupRequest dataSource + * @property {string|null} [requestId] InitiateBackupRequest requestId + * @property {string|null} [backupId] InitiateBackupRequest backupId + */ + + /** + * Constructs a new InitiateBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an InitiateBackupRequest. + * @implements IInitiateBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IInitiateBackupRequest=} [properties] Properties to set + */ + function InitiateBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InitiateBackupRequest dataSource. + * @member {string} dataSource + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @instance + */ + InitiateBackupRequest.prototype.dataSource = ""; + + /** + * InitiateBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @instance + */ + InitiateBackupRequest.prototype.requestId = ""; + + /** + * InitiateBackupRequest backupId. + * @member {string} backupId + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @instance + */ + InitiateBackupRequest.prototype.backupId = ""; + + /** + * Creates a new InitiateBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IInitiateBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest instance + */ + InitiateBackupRequest.create = function create(properties) { + return new InitiateBackupRequest(properties); + }; + + /** + * Encodes the specified InitiateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} message InitiateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitiateBackupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.backupId); + return writer; + }; + + /** + * Encodes the specified InitiateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} message InitiateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitiateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InitiateBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitiateBackupRequest.decode = function 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.backupdr.v1.InitiateBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataSource = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + case 5: { + message.backupId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InitiateBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitiateBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InitiateBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InitiateBackupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.backupId != null && message.hasOwnProperty("backupId")) + if (!$util.isString(message.backupId)) + return "backupId: string expected"; + return null; + }; + + /** + * Creates an InitiateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest + */ + InitiateBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.InitiateBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.InitiateBackupRequest(); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.backupId != null) + message.backupId = String(object.backupId); + return message; + }; + + /** + * Creates a plain object from an InitiateBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.InitiateBackupRequest} message InitiateBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InitiateBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataSource = ""; + object.requestId = ""; + object.backupId = ""; + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.backupId != null && message.hasOwnProperty("backupId")) + object.backupId = message.backupId; + return object; + }; + + /** + * Converts this InitiateBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @instance + * @returns {Object.} JSON object + */ + InitiateBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InitiateBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InitiateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.InitiateBackupRequest"; + }; + + return InitiateBackupRequest; + })(); + + v1.InitiateBackupResponse = (function() { + + /** + * Properties of an InitiateBackupResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IInitiateBackupResponse + * @property {string|null} [backup] InitiateBackupResponse backup + * @property {number|null} [newBackupGenerationId] InitiateBackupResponse newBackupGenerationId + * @property {number|null} [baseBackupGenerationId] InitiateBackupResponse baseBackupGenerationId + */ + + /** + * Constructs a new InitiateBackupResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an InitiateBackupResponse. + * @implements IInitiateBackupResponse + * @constructor + * @param {google.cloud.backupdr.v1.IInitiateBackupResponse=} [properties] Properties to set + */ + function InitiateBackupResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InitiateBackupResponse backup. + * @member {string} backup + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @instance + */ + InitiateBackupResponse.prototype.backup = ""; + + /** + * InitiateBackupResponse newBackupGenerationId. + * @member {number} newBackupGenerationId + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @instance + */ + InitiateBackupResponse.prototype.newBackupGenerationId = 0; + + /** + * InitiateBackupResponse baseBackupGenerationId. + * @member {number} baseBackupGenerationId + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @instance + */ + InitiateBackupResponse.prototype.baseBackupGenerationId = 0; + + /** + * Creates a new InitiateBackupResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IInitiateBackupResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse instance + */ + InitiateBackupResponse.create = function create(properties) { + return new InitiateBackupResponse(properties); + }; + + /** + * Encodes the specified InitiateBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IInitiateBackupResponse} message InitiateBackupResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitiateBackupResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backup); + if (message.newBackupGenerationId != null && Object.hasOwnProperty.call(message, "newBackupGenerationId")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.newBackupGenerationId); + if (message.baseBackupGenerationId != null && Object.hasOwnProperty.call(message, "baseBackupGenerationId")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.baseBackupGenerationId); + return writer; + }; + + /** + * Encodes the specified InitiateBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IInitiateBackupResponse} message InitiateBackupResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitiateBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InitiateBackupResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitiateBackupResponse.decode = function 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.backupdr.v1.InitiateBackupResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backup = reader.string(); + break; + } + case 2: { + message.newBackupGenerationId = reader.int32(); + break; + } + case 3: { + message.baseBackupGenerationId = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InitiateBackupResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitiateBackupResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InitiateBackupResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InitiateBackupResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backup != null && message.hasOwnProperty("backup")) + if (!$util.isString(message.backup)) + return "backup: string expected"; + if (message.newBackupGenerationId != null && message.hasOwnProperty("newBackupGenerationId")) + if (!$util.isInteger(message.newBackupGenerationId)) + return "newBackupGenerationId: integer expected"; + if (message.baseBackupGenerationId != null && message.hasOwnProperty("baseBackupGenerationId")) + if (!$util.isInteger(message.baseBackupGenerationId)) + return "baseBackupGenerationId: integer expected"; + return null; + }; + + /** + * Creates an InitiateBackupResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse + */ + InitiateBackupResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.InitiateBackupResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.InitiateBackupResponse(); + if (object.backup != null) + message.backup = String(object.backup); + if (object.newBackupGenerationId != null) + message.newBackupGenerationId = object.newBackupGenerationId | 0; + if (object.baseBackupGenerationId != null) + message.baseBackupGenerationId = object.baseBackupGenerationId | 0; + return message; + }; + + /** + * Creates a plain object from an InitiateBackupResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {google.cloud.backupdr.v1.InitiateBackupResponse} message InitiateBackupResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InitiateBackupResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.backup = ""; + object.newBackupGenerationId = 0; + object.baseBackupGenerationId = 0; + } + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = message.backup; + if (message.newBackupGenerationId != null && message.hasOwnProperty("newBackupGenerationId")) + object.newBackupGenerationId = message.newBackupGenerationId; + if (message.baseBackupGenerationId != null && message.hasOwnProperty("baseBackupGenerationId")) + object.baseBackupGenerationId = message.baseBackupGenerationId; + return object; + }; + + /** + * Converts this InitiateBackupResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @instance + * @returns {Object.} JSON object + */ + InitiateBackupResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InitiateBackupResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InitiateBackupResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.InitiateBackupResponse"; + }; + + return InitiateBackupResponse; + })(); + + v1.AbandonBackupRequest = (function() { + + /** + * Properties of an AbandonBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IAbandonBackupRequest + * @property {string|null} [dataSource] AbandonBackupRequest dataSource + * @property {string|null} [requestId] AbandonBackupRequest requestId + */ + + /** + * Constructs a new AbandonBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AbandonBackupRequest. + * @implements IAbandonBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IAbandonBackupRequest=} [properties] Properties to set + */ + function AbandonBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AbandonBackupRequest dataSource. + * @member {string} dataSource + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @instance + */ + AbandonBackupRequest.prototype.dataSource = ""; + + /** + * AbandonBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @instance + */ + AbandonBackupRequest.prototype.requestId = ""; + + /** + * Creates a new AbandonBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IAbandonBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest instance + */ + AbandonBackupRequest.create = function create(properties) { + return new AbandonBackupRequest(properties); + }; + + /** + * Encodes the specified AbandonBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} message AbandonBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AbandonBackupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified AbandonBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} message AbandonBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AbandonBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AbandonBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AbandonBackupRequest.decode = function 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.backupdr.v1.AbandonBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataSource = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AbandonBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AbandonBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AbandonBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AbandonBackupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an AbandonBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest + */ + AbandonBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AbandonBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.AbandonBackupRequest(); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an AbandonBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {google.cloud.backupdr.v1.AbandonBackupRequest} message AbandonBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AbandonBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataSource = ""; + object.requestId = ""; + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this AbandonBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @instance + * @returns {Object.} JSON object + */ + AbandonBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AbandonBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AbandonBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AbandonBackupRequest"; + }; + + return AbandonBackupRequest; + })(); + + v1.FinalizeBackupRequest = (function() { + + /** + * Properties of a FinalizeBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IFinalizeBackupRequest + * @property {string|null} [dataSource] FinalizeBackupRequest dataSource + * @property {string|null} [description] FinalizeBackupRequest description + * @property {google.protobuf.ITimestamp|null} [consistencyTime] FinalizeBackupRequest consistencyTime + * @property {string|null} [requestId] FinalizeBackupRequest requestId + * @property {string|null} [backupId] FinalizeBackupRequest backupId + * @property {google.protobuf.ITimestamp|null} [recoveryRangeStartTime] FinalizeBackupRequest recoveryRangeStartTime + * @property {google.protobuf.ITimestamp|null} [recoveryRangeEndTime] FinalizeBackupRequest recoveryRangeEndTime + * @property {google.protobuf.IDuration|null} [retentionDuration] FinalizeBackupRequest retentionDuration + */ + + /** + * Constructs a new FinalizeBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FinalizeBackupRequest. + * @implements IFinalizeBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest=} [properties] Properties to set + */ + function FinalizeBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FinalizeBackupRequest dataSource. + * @member {string} dataSource + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.dataSource = ""; + + /** + * FinalizeBackupRequest description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.description = null; + + /** + * FinalizeBackupRequest consistencyTime. + * @member {google.protobuf.ITimestamp|null|undefined} consistencyTime + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.consistencyTime = null; + + /** + * FinalizeBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.requestId = ""; + + /** + * FinalizeBackupRequest backupId. + * @member {string} backupId + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.backupId = ""; + + /** + * FinalizeBackupRequest recoveryRangeStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeStartTime + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.recoveryRangeStartTime = null; + + /** + * FinalizeBackupRequest recoveryRangeEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeEndTime + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.recoveryRangeEndTime = null; + + /** + * FinalizeBackupRequest retentionDuration. + * @member {google.protobuf.IDuration|null|undefined} retentionDuration + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.retentionDuration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FinalizeBackupRequest _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + Object.defineProperty(FinalizeBackupRequest.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FinalizeBackupRequest _consistencyTime. + * @member {"consistencyTime"|undefined} _consistencyTime + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + Object.defineProperty(FinalizeBackupRequest.prototype, "_consistencyTime", { + get: $util.oneOfGetter($oneOfFields = ["consistencyTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FinalizeBackupRequest _recoveryRangeStartTime. + * @member {"recoveryRangeStartTime"|undefined} _recoveryRangeStartTime + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + Object.defineProperty(FinalizeBackupRequest.prototype, "_recoveryRangeStartTime", { + get: $util.oneOfGetter($oneOfFields = ["recoveryRangeStartTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FinalizeBackupRequest _recoveryRangeEndTime. + * @member {"recoveryRangeEndTime"|undefined} _recoveryRangeEndTime + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + Object.defineProperty(FinalizeBackupRequest.prototype, "_recoveryRangeEndTime", { + get: $util.oneOfGetter($oneOfFields = ["recoveryRangeEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FinalizeBackupRequest _retentionDuration. + * @member {"retentionDuration"|undefined} _retentionDuration + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + Object.defineProperty(FinalizeBackupRequest.prototype, "_retentionDuration", { + get: $util.oneOfGetter($oneOfFields = ["retentionDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FinalizeBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest instance + */ + FinalizeBackupRequest.create = function create(properties) { + return new FinalizeBackupRequest(properties); + }; + + /** + * Encodes the specified FinalizeBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} message FinalizeBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FinalizeBackupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.consistencyTime != null && Object.hasOwnProperty.call(message, "consistencyTime")) + $root.google.protobuf.Timestamp.encode(message.consistencyTime, 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.backupId != null && Object.hasOwnProperty.call(message, "backupId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.backupId); + if (message.recoveryRangeStartTime != null && Object.hasOwnProperty.call(message, "recoveryRangeStartTime")) + $root.google.protobuf.Timestamp.encode(message.recoveryRangeStartTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.recoveryRangeEndTime != null && Object.hasOwnProperty.call(message, "recoveryRangeEndTime")) + $root.google.protobuf.Timestamp.encode(message.recoveryRangeEndTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.retentionDuration != null && Object.hasOwnProperty.call(message, "retentionDuration")) + $root.google.protobuf.Duration.encode(message.retentionDuration, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FinalizeBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} message FinalizeBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FinalizeBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FinalizeBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FinalizeBackupRequest.decode = function 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.backupdr.v1.FinalizeBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataSource = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.consistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.backupId = reader.string(); + break; + } + case 6: { + message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.retentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FinalizeBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FinalizeBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FinalizeBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FinalizeBackupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { + properties._consistencyTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.consistencyTime); + if (error) + return "consistencyTime." + error; + } + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.backupId != null && message.hasOwnProperty("backupId")) + if (!$util.isString(message.backupId)) + return "backupId: string expected"; + if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { + properties._recoveryRangeStartTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeStartTime); + if (error) + return "recoveryRangeStartTime." + error; + } + } + if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { + properties._recoveryRangeEndTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeEndTime); + if (error) + return "recoveryRangeEndTime." + error; + } + } + if (message.retentionDuration != null && message.hasOwnProperty("retentionDuration")) { + properties._retentionDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.retentionDuration); + if (error) + return "retentionDuration." + error; + } + } + return null; + }; + + /** + * Creates a FinalizeBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest + */ + FinalizeBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FinalizeBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.FinalizeBackupRequest(); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + if (object.description != null) + message.description = String(object.description); + if (object.consistencyTime != null) { + if (typeof object.consistencyTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.consistencyTime: object expected"); + message.consistencyTime = $root.google.protobuf.Timestamp.fromObject(object.consistencyTime); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.backupId != null) + message.backupId = String(object.backupId); + if (object.recoveryRangeStartTime != null) { + if (typeof object.recoveryRangeStartTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.recoveryRangeStartTime: object expected"); + message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeStartTime); + } + if (object.recoveryRangeEndTime != null) { + if (typeof object.recoveryRangeEndTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.recoveryRangeEndTime: object expected"); + message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeEndTime); + } + if (object.retentionDuration != null) { + if (typeof object.retentionDuration !== "object") + throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.retentionDuration: object expected"); + message.retentionDuration = $root.google.protobuf.Duration.fromObject(object.retentionDuration); + } + return message; + }; + + /** + * Creates a plain object from a FinalizeBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {google.cloud.backupdr.v1.FinalizeBackupRequest} message FinalizeBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FinalizeBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataSource = ""; + object.requestId = ""; + object.backupId = ""; + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { + object.consistencyTime = $root.google.protobuf.Timestamp.toObject(message.consistencyTime, options); + if (options.oneofs) + object._consistencyTime = "consistencyTime"; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.backupId != null && message.hasOwnProperty("backupId")) + object.backupId = message.backupId; + if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { + object.recoveryRangeStartTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeStartTime, options); + if (options.oneofs) + object._recoveryRangeStartTime = "recoveryRangeStartTime"; + } + if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { + object.recoveryRangeEndTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeEndTime, options); + if (options.oneofs) + object._recoveryRangeEndTime = "recoveryRangeEndTime"; + } + if (message.retentionDuration != null && message.hasOwnProperty("retentionDuration")) { + object.retentionDuration = $root.google.protobuf.Duration.toObject(message.retentionDuration, options); + if (options.oneofs) + object._retentionDuration = "retentionDuration"; + } + return object; + }; + + /** + * Converts this FinalizeBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + * @returns {Object.} JSON object + */ + FinalizeBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FinalizeBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FinalizeBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FinalizeBackupRequest"; + }; + + return FinalizeBackupRequest; + })(); + + v1.FetchAccessTokenRequest = (function() { + + /** + * Properties of a FetchAccessTokenRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IFetchAccessTokenRequest + * @property {string|null} [name] FetchAccessTokenRequest name + * @property {number|null} [generationId] FetchAccessTokenRequest generationId + */ + + /** + * Constructs a new FetchAccessTokenRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FetchAccessTokenRequest. + * @implements IFetchAccessTokenRequest + * @constructor + * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest=} [properties] Properties to set + */ + function FetchAccessTokenRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchAccessTokenRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @instance + */ + FetchAccessTokenRequest.prototype.name = ""; + + /** + * FetchAccessTokenRequest generationId. + * @member {number} generationId + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @instance + */ + FetchAccessTokenRequest.prototype.generationId = 0; + + /** + * Creates a new FetchAccessTokenRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest instance + */ + FetchAccessTokenRequest.create = function create(properties) { + return new FetchAccessTokenRequest(properties); + }; + + /** + * Encodes the specified FetchAccessTokenRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} message FetchAccessTokenRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchAccessTokenRequest.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.generationId != null && Object.hasOwnProperty.call(message, "generationId")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.generationId); + return writer; + }; + + /** + * Encodes the specified FetchAccessTokenRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} message FetchAccessTokenRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchAccessTokenRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchAccessTokenRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchAccessTokenRequest.decode = function 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.backupdr.v1.FetchAccessTokenRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.generationId = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchAccessTokenRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchAccessTokenRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchAccessTokenRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchAccessTokenRequest.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.generationId != null && message.hasOwnProperty("generationId")) + if (!$util.isInteger(message.generationId)) + return "generationId: integer expected"; + return null; + }; + + /** + * Creates a FetchAccessTokenRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest + */ + FetchAccessTokenRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchAccessTokenRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.FetchAccessTokenRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.generationId != null) + message.generationId = object.generationId | 0; + return message; + }; + + /** + * Creates a plain object from a FetchAccessTokenRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {google.cloud.backupdr.v1.FetchAccessTokenRequest} message FetchAccessTokenRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchAccessTokenRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.generationId = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.generationId != null && message.hasOwnProperty("generationId")) + object.generationId = message.generationId; + return object; + }; + + /** + * Converts this FetchAccessTokenRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @instance + * @returns {Object.} JSON object + */ + FetchAccessTokenRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchAccessTokenRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchAccessTokenRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchAccessTokenRequest"; + }; + + return FetchAccessTokenRequest; + })(); + + v1.FetchAccessTokenResponse = (function() { + + /** + * Properties of a FetchAccessTokenResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IFetchAccessTokenResponse + * @property {string|null} [readLocation] FetchAccessTokenResponse readLocation + * @property {string|null} [writeLocation] FetchAccessTokenResponse writeLocation + * @property {string|null} [token] FetchAccessTokenResponse token + * @property {google.protobuf.ITimestamp|null} [expireTime] FetchAccessTokenResponse expireTime + */ + + /** + * Constructs a new FetchAccessTokenResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FetchAccessTokenResponse. + * @implements IFetchAccessTokenResponse + * @constructor + * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse=} [properties] Properties to set + */ + function FetchAccessTokenResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchAccessTokenResponse readLocation. + * @member {string} readLocation + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @instance + */ + FetchAccessTokenResponse.prototype.readLocation = ""; + + /** + * FetchAccessTokenResponse writeLocation. + * @member {string} writeLocation + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @instance + */ + FetchAccessTokenResponse.prototype.writeLocation = ""; + + /** + * FetchAccessTokenResponse token. + * @member {string} token + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @instance + */ + FetchAccessTokenResponse.prototype.token = ""; + + /** + * FetchAccessTokenResponse expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @instance + */ + FetchAccessTokenResponse.prototype.expireTime = null; + + /** + * Creates a new FetchAccessTokenResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse instance + */ + FetchAccessTokenResponse.create = function create(properties) { + return new FetchAccessTokenResponse(properties); + }; + + /** + * Encodes the specified FetchAccessTokenResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse} message FetchAccessTokenResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchAccessTokenResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.readLocation != null && Object.hasOwnProperty.call(message, "readLocation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.readLocation); + if (message.writeLocation != null && Object.hasOwnProperty.call(message, "writeLocation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.writeLocation); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.token); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FetchAccessTokenResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse} message FetchAccessTokenResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchAccessTokenResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchAccessTokenResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchAccessTokenResponse.decode = function 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.backupdr.v1.FetchAccessTokenResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.readLocation = reader.string(); + break; + } + case 2: { + message.writeLocation = reader.string(); + break; + } + case 3: { + message.token = reader.string(); + break; + } + case 4: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchAccessTokenResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchAccessTokenResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchAccessTokenResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchAccessTokenResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.readLocation != null && message.hasOwnProperty("readLocation")) + if (!$util.isString(message.readLocation)) + return "readLocation: string expected"; + if (message.writeLocation != null && message.hasOwnProperty("writeLocation")) + if (!$util.isString(message.writeLocation)) + return "writeLocation: string expected"; + if (message.token != null && message.hasOwnProperty("token")) + if (!$util.isString(message.token)) + return "token: string expected"; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + return null; + }; + + /** + * Creates a FetchAccessTokenResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse + */ + FetchAccessTokenResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchAccessTokenResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.FetchAccessTokenResponse(); + if (object.readLocation != null) + message.readLocation = String(object.readLocation); + if (object.writeLocation != null) + message.writeLocation = String(object.writeLocation); + if (object.token != null) + message.token = String(object.token); + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.FetchAccessTokenResponse.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + return message; + }; + + /** + * Creates a plain object from a FetchAccessTokenResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {google.cloud.backupdr.v1.FetchAccessTokenResponse} message FetchAccessTokenResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchAccessTokenResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.readLocation = ""; + object.writeLocation = ""; + object.token = ""; + object.expireTime = null; + } + if (message.readLocation != null && message.hasOwnProperty("readLocation")) + object.readLocation = message.readLocation; + if (message.writeLocation != null && message.hasOwnProperty("writeLocation")) + object.writeLocation = message.writeLocation; + if (message.token != null && message.hasOwnProperty("token")) + object.token = message.token; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + return object; + }; + + /** + * Converts this FetchAccessTokenResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @instance + * @returns {Object.} JSON object + */ + FetchAccessTokenResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchAccessTokenResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchAccessTokenResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchAccessTokenResponse"; + }; + + return FetchAccessTokenResponse; + })(); + + v1.ListBackupsRequest = (function() { + + /** + * Properties of a ListBackupsRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupsRequest + * @property {string|null} [parent] ListBackupsRequest parent + * @property {number|null} [pageSize] ListBackupsRequest pageSize + * @property {string|null} [pageToken] ListBackupsRequest pageToken + * @property {string|null} [filter] ListBackupsRequest filter + * @property {string|null} [orderBy] ListBackupsRequest orderBy + * @property {google.cloud.backupdr.v1.BackupView|null} [view] ListBackupsRequest view + */ + + /** + * Constructs a new ListBackupsRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupsRequest. + * @implements IListBackupsRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set + */ + function ListBackupsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupsRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.parent = ""; + + /** + * ListBackupsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.pageSize = 0; + + /** + * ListBackupsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.pageToken = ""; + + /** + * ListBackupsRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.filter = ""; + + /** + * ListBackupsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.orderBy = ""; + + /** + * ListBackupsRequest view. + * @member {google.cloud.backupdr.v1.BackupView} view + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.view = 0; + + /** + * Creates a new ListBackupsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest instance + */ + ListBackupsRequest.create = function create(properties) { + return new ListBackupsRequest(properties); + }; + + /** + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsRequest.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); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); + return writer; + }; + + /** + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsRequest.decode = function 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.backupdr.v1.ListBackupsRequest(); + 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; + } + case 6: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupsRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupsRequest.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"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest + */ + ListBackupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupsRequest(); + 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); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {google.cloud.backupdr.v1.ListBackupsRequest} message ListBackupsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; + } + 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; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; + return object; + }; + + /** + * Converts this ListBackupsRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupsRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsRequest"; + }; + + return ListBackupsRequest; + })(); + + v1.ListBackupsResponse = (function() { + + /** + * Properties of a ListBackupsResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupsResponse + * @property {Array.|null} [backups] ListBackupsResponse backups + * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupsResponse unreachable + */ + + /** + * Constructs a new ListBackupsResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupsResponse. + * @implements IListBackupsResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set + */ + function ListBackupsResponse(properties) { + this.backups = []; + 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]]; + } + + /** + * ListBackupsResponse backups. + * @member {Array.} backups + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.backups = $util.emptyArray; + + /** + * ListBackupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.nextPageToken = ""; + + /** + * ListBackupsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse instance + */ + ListBackupsResponse.create = function create(properties) { + return new ListBackupsResponse(properties); + }; + + /** + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backups != null && message.backups.length) + for (var i = 0; i < message.backups.length; ++i) + $root.google.cloud.backupdr.v1.Backup.encode(message.backups[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 ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsResponse.decode = function 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.backupdr.v1.ListBackupsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backups && message.backups.length)) + message.backups = []; + message.backups.push($root.google.cloud.backupdr.v1.Backup.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 ListBackupsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupsResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backups != null && message.hasOwnProperty("backups")) { + if (!Array.isArray(message.backups)) + return "backups: array expected"; + for (var i = 0; i < message.backups.length; ++i) { + var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backups[i]); + if (error) + return "backups." + 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 ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse + */ + ListBackupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupsResponse(); + if (object.backups) { + if (!Array.isArray(object.backups)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: array expected"); + message.backups = []; + for (var i = 0; i < object.backups.length; ++i) { + if (typeof object.backups[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: object expected"); + message.backups[i] = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backups[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.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 ListBackupsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {google.cloud.backupdr.v1.ListBackupsResponse} message ListBackupsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backups = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backups && message.backups.length) { + object.backups = []; + for (var j = 0; j < message.backups.length; ++j) + object.backups[j] = $root.google.cloud.backupdr.v1.Backup.toObject(message.backups[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 ListBackupsResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupsResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsResponse"; + }; + + return ListBackupsResponse; + })(); + + v1.GetBackupRequest = (function() { + + /** + * Properties of a GetBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetBackupRequest + * @property {string|null} [name] GetBackupRequest name + * @property {google.cloud.backupdr.v1.BackupView|null} [view] GetBackupRequest view + */ + + /** + * Constructs a new GetBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetBackupRequest. + * @implements IGetBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set + */ + function GetBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @instance + */ + GetBackupRequest.prototype.name = ""; + + /** + * GetBackupRequest view. + * @member {google.cloud.backupdr.v1.BackupView} view + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @instance + */ + GetBackupRequest.prototype.view = 0; + + /** + * Creates a new GetBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest instance + */ + GetBackupRequest.create = function create(properties) { + return new GetBackupRequest(properties); + }; + + /** + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupRequest.decode = function 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.backupdr.v1.GetBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupRequest.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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest + */ + GetBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetBackupRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {google.cloud.backupdr.v1.GetBackupRequest} message GetBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupRequest"; + }; + + return GetBackupRequest; + })(); + + v1.UpdateBackupRequest = (function() { + + /** + * Properties of an UpdateBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IUpdateBackupRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupRequest updateMask + * @property {google.cloud.backupdr.v1.IBackup|null} [backup] UpdateBackupRequest backup + * @property {string|null} [requestId] UpdateBackupRequest requestId + */ + + /** + * Constructs a new UpdateBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an UpdateBackupRequest. + * @implements IUpdateBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set + */ + function UpdateBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateBackupRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @instance + */ + UpdateBackupRequest.prototype.updateMask = null; + + /** + * UpdateBackupRequest backup. + * @member {google.cloud.backupdr.v1.IBackup|null|undefined} backup + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @instance + */ + UpdateBackupRequest.prototype.backup = null; + + /** + * UpdateBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @instance + */ + UpdateBackupRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest instance + */ + UpdateBackupRequest.create = function create(properties) { + return new UpdateBackupRequest(properties); + }; + + /** + * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupRequest.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.backup != null && Object.hasOwnProperty.call(message, "backup")) + $root.google.cloud.backupdr.v1.Backup.encode(message.backup, 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 UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupRequest.decode = function 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.backupdr.v1.UpdateBackupRequest(); + 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.backup = $root.google.cloud.backupdr.v1.Backup.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateBackupRequest.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.backup != null && message.hasOwnProperty("backup")) { + var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backup); + if (error) + return "backup." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest + */ + UpdateBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.UpdateBackupRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.backup != null) { + if (typeof object.backup !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.backup: object expected"); + message.backup = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backup); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.UpdateBackupRequest} message UpdateBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.backup = null; + object.requestId = ""; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = $root.google.cloud.backupdr.v1.Backup.toObject(message.backup, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupRequest"; + }; + + return UpdateBackupRequest; + })(); + + v1.DeleteBackupRequest = (function() { + + /** + * Properties of a DeleteBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IDeleteBackupRequest + * @property {string|null} [name] DeleteBackupRequest name + * @property {string|null} [requestId] DeleteBackupRequest requestId + */ + + /** + * Constructs a new DeleteBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DeleteBackupRequest. + * @implements IDeleteBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set + */ + function DeleteBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @instance + */ + DeleteBackupRequest.prototype.name = ""; + + /** + * DeleteBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @instance + */ + DeleteBackupRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest instance + */ + DeleteBackupRequest.create = function create(properties) { + return new DeleteBackupRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupRequest.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 DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupRequest.decode = function 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.backupdr.v1.DeleteBackupRequest(); + 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 DeleteBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupRequest.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 DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest + */ + DeleteBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.DeleteBackupRequest(); + 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 DeleteBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {google.cloud.backupdr.v1.DeleteBackupRequest} message DeleteBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupRequest.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 DeleteBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupRequest"; + }; + + return DeleteBackupRequest; + })(); + + v1.RestoreBackupRequest = (function() { + + /** + * Properties of a RestoreBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IRestoreBackupRequest + * @property {string|null} [name] RestoreBackupRequest name + * @property {string|null} [requestId] RestoreBackupRequest requestId + * @property {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null} [computeInstanceTargetEnvironment] RestoreBackupRequest computeInstanceTargetEnvironment + * @property {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null} [computeInstanceRestoreProperties] RestoreBackupRequest computeInstanceRestoreProperties + */ + + /** + * Constructs a new RestoreBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a RestoreBackupRequest. + * @implements IRestoreBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set + */ + function RestoreBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestoreBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.name = ""; + + /** + * RestoreBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.requestId = ""; + + /** + * RestoreBackupRequest computeInstanceTargetEnvironment. + * @member {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null|undefined} computeInstanceTargetEnvironment + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.computeInstanceTargetEnvironment = null; + + /** + * RestoreBackupRequest computeInstanceRestoreProperties. + * @member {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null|undefined} computeInstanceRestoreProperties + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.computeInstanceRestoreProperties = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RestoreBackupRequest targetEnvironment. + * @member {"computeInstanceTargetEnvironment"|undefined} targetEnvironment + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + Object.defineProperty(RestoreBackupRequest.prototype, "targetEnvironment", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceTargetEnvironment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RestoreBackupRequest instanceProperties. + * @member {"computeInstanceRestoreProperties"|undefined} instanceProperties + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + Object.defineProperty(RestoreBackupRequest.prototype, "instanceProperties", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceRestoreProperties"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RestoreBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest instance + */ + RestoreBackupRequest.create = function create(properties) { + return new RestoreBackupRequest(properties); + }; + + /** + * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupRequest.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.computeInstanceTargetEnvironment != null && Object.hasOwnProperty.call(message, "computeInstanceTargetEnvironment")) + $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.encode(message.computeInstanceTargetEnvironment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.computeInstanceRestoreProperties != null && Object.hasOwnProperty.call(message, "computeInstanceRestoreProperties")) + $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.encode(message.computeInstanceRestoreProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestoreBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupRequest.decode = function 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.backupdr.v1.RestoreBackupRequest(); + 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.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestoreBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreBackupRequest.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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { + properties.targetEnvironment = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify(message.computeInstanceTargetEnvironment); + if (error) + return "computeInstanceTargetEnvironment." + error; + } + } + if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { + properties.instanceProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify(message.computeInstanceRestoreProperties); + if (error) + return "computeInstanceRestoreProperties." + error; + } + } + return null; + }; + + /** + * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest + */ + RestoreBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.RestoreBackupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.computeInstanceTargetEnvironment != null) { + if (typeof object.computeInstanceTargetEnvironment !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceTargetEnvironment: object expected"); + message.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.fromObject(object.computeInstanceTargetEnvironment); + } + if (object.computeInstanceRestoreProperties != null) { + if (typeof object.computeInstanceRestoreProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceRestoreProperties: object expected"); + message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.fromObject(object.computeInstanceRestoreProperties); + } + return message; + }; + + /** + * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {google.cloud.backupdr.v1.RestoreBackupRequest} message RestoreBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestoreBackupRequest.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; + if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { + object.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.toObject(message.computeInstanceTargetEnvironment, options); + if (options.oneofs) + object.targetEnvironment = "computeInstanceTargetEnvironment"; + } + if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { + object.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.toObject(message.computeInstanceRestoreProperties, options); + if (options.oneofs) + object.instanceProperties = "computeInstanceRestoreProperties"; + } + return object; + }; + + /** + * Converts this RestoreBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + * @returns {Object.} JSON object + */ + RestoreBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestoreBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestoreBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupRequest"; + }; + + return RestoreBackupRequest; + })(); + + v1.RestoreBackupResponse = (function() { + + /** + * Properties of a RestoreBackupResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IRestoreBackupResponse + * @property {google.cloud.backupdr.v1.ITargetResource|null} [targetResource] RestoreBackupResponse targetResource + */ + + /** + * Constructs a new RestoreBackupResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a RestoreBackupResponse. + * @implements IRestoreBackupResponse + * @constructor + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set + */ + function RestoreBackupResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestoreBackupResponse targetResource. + * @member {google.cloud.backupdr.v1.ITargetResource|null|undefined} targetResource + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @instance + */ + RestoreBackupResponse.prototype.targetResource = null; + + /** + * Creates a new RestoreBackupResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse instance + */ + RestoreBackupResponse.create = function create(properties) { + return new RestoreBackupResponse(properties); + }; + + /** + * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetResource != null && Object.hasOwnProperty.call(message, "targetResource")) + $root.google.cloud.backupdr.v1.TargetResource.encode(message.targetResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestoreBackupResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupResponse.decode = function 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.backupdr.v1.RestoreBackupResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestoreBackupResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreBackupResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetResource != null && message.hasOwnProperty("targetResource")) { + var error = $root.google.cloud.backupdr.v1.TargetResource.verify(message.targetResource); + if (error) + return "targetResource." + error; + } + return null; + }; + + /** + * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse + */ + RestoreBackupResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.RestoreBackupResponse(); + if (object.targetResource != null) { + if (typeof object.targetResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupResponse.targetResource: object expected"); + message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.fromObject(object.targetResource); + } + return message; + }; + + /** + * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {google.cloud.backupdr.v1.RestoreBackupResponse} message RestoreBackupResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestoreBackupResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.targetResource = null; + if (message.targetResource != null && message.hasOwnProperty("targetResource")) + object.targetResource = $root.google.cloud.backupdr.v1.TargetResource.toObject(message.targetResource, options); + return object; + }; + + /** + * Converts this RestoreBackupResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @instance + * @returns {Object.} JSON object + */ + RestoreBackupResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestoreBackupResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestoreBackupResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupResponse"; + }; + + return RestoreBackupResponse; + })(); + + v1.TargetResource = (function() { + + /** + * Properties of a TargetResource. + * @memberof google.cloud.backupdr.v1 + * @interface ITargetResource + * @property {google.cloud.backupdr.v1.IGcpResource|null} [gcpResource] TargetResource gcpResource + */ + + /** + * Constructs a new TargetResource. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a TargetResource. + * @implements ITargetResource + * @constructor + * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set + */ + function TargetResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TargetResource gcpResource. + * @member {google.cloud.backupdr.v1.IGcpResource|null|undefined} gcpResource + * @memberof google.cloud.backupdr.v1.TargetResource + * @instance + */ + TargetResource.prototype.gcpResource = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TargetResource targetResourceInfo. + * @member {"gcpResource"|undefined} targetResourceInfo + * @memberof google.cloud.backupdr.v1.TargetResource + * @instance + */ + Object.defineProperty(TargetResource.prototype, "targetResourceInfo", { + get: $util.oneOfGetter($oneOfFields = ["gcpResource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TargetResource instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource instance + */ + TargetResource.create = function create(properties) { + return new TargetResource(properties); + }; + + /** + * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcpResource != null && Object.hasOwnProperty.call(message, "gcpResource")) + $root.google.cloud.backupdr.v1.GcpResource.encode(message.gcpResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetResource.decode = function 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.backupdr.v1.TargetResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TargetResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetResource message. + * @function verify + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { + properties.targetResourceInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.GcpResource.verify(message.gcpResource); + if (error) + return "gcpResource." + error; + } + } + return null; + }; + + /** + * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource + */ + TargetResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.TargetResource) + return object; + var message = new $root.google.cloud.backupdr.v1.TargetResource(); + if (object.gcpResource != null) { + if (typeof object.gcpResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.TargetResource.gcpResource: object expected"); + message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.fromObject(object.gcpResource); + } + return message; + }; + + /** + * Creates a plain object from a TargetResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {google.cloud.backupdr.v1.TargetResource} message TargetResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { + object.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.toObject(message.gcpResource, options); + if (options.oneofs) + object.targetResourceInfo = "gcpResource"; + } + return object; + }; + + /** + * Converts this TargetResource to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.TargetResource + * @instance + * @returns {Object.} JSON object + */ + TargetResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TargetResource + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.TargetResource"; + }; + + return TargetResource; + })(); + + v1.GcpResource = (function() { + + /** + * Properties of a GcpResource. + * @memberof google.cloud.backupdr.v1 + * @interface IGcpResource + * @property {string|null} [gcpResourcename] GcpResource gcpResourcename + * @property {string|null} [location] GcpResource location + * @property {string|null} [type] GcpResource type + */ + + /** + * Constructs a new GcpResource. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GcpResource. + * @implements IGcpResource + * @constructor + * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set + */ + function GcpResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcpResource gcpResourcename. + * @member {string} gcpResourcename + * @memberof google.cloud.backupdr.v1.GcpResource + * @instance + */ + GcpResource.prototype.gcpResourcename = ""; + + /** + * GcpResource location. + * @member {string} location + * @memberof google.cloud.backupdr.v1.GcpResource + * @instance + */ + GcpResource.prototype.location = ""; + + /** + * GcpResource type. + * @member {string} type + * @memberof google.cloud.backupdr.v1.GcpResource + * @instance + */ + GcpResource.prototype.type = ""; + + /** + * Creates a new GcpResource instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource instance + */ + GcpResource.create = function create(properties) { + return new GcpResource(properties); + }; + + /** + * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + return writer; + }; + + /** + * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcpResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpResource.decode = function 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.backupdr.v1.GcpResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcpResourcename = reader.string(); + break; + } + case 2: { + message.location = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcpResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcpResource message. + * @function verify + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcpResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + if (!$util.isString(message.gcpResourcename)) + return "gcpResourcename: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + return null; + }; + + /** + * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource + */ + GcpResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GcpResource) + return object; + var message = new $root.google.cloud.backupdr.v1.GcpResource(); + if (object.gcpResourcename != null) + message.gcpResourcename = String(object.gcpResourcename); + if (object.location != null) + message.location = String(object.location); + if (object.type != null) + message.type = String(object.type); + return message; + }; + + /** + * Creates a plain object from a GcpResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {google.cloud.backupdr.v1.GcpResource} message GcpResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcpResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gcpResourcename = ""; + object.location = ""; + object.type = ""; + } + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + object.gcpResourcename = message.gcpResourcename; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; + + /** + * Converts this GcpResource to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GcpResource + * @instance + * @returns {Object.} JSON object + */ + GcpResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcpResource + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpResource"; + }; + + return GcpResource; + })(); + + /** + * BackupConfigState enum. + * @name google.cloud.backupdr.v1.BackupConfigState + * @enum {number} + * @property {number} BACKUP_CONFIG_STATE_UNSPECIFIED=0 BACKUP_CONFIG_STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} PASSIVE=2 PASSIVE value + */ + v1.BackupConfigState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_CONFIG_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "PASSIVE"] = 2; + return values; + })(); + + /** + * BackupView enum. + * @name google.cloud.backupdr.v1.BackupView + * @enum {number} + * @property {number} BACKUP_VIEW_UNSPECIFIED=0 BACKUP_VIEW_UNSPECIFIED value + * @property {number} BACKUP_VIEW_BASIC=1 BACKUP_VIEW_BASIC value + * @property {number} BACKUP_VIEW_FULL=2 BACKUP_VIEW_FULL value + */ + v1.BackupView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKUP_VIEW_BASIC"] = 1; + values[valuesById[2] = "BACKUP_VIEW_FULL"] = 2; + return values; + })(); + + /** + * BackupVaultView enum. + * @name google.cloud.backupdr.v1.BackupVaultView + * @enum {number} + * @property {number} BACKUP_VAULT_VIEW_UNSPECIFIED=0 BACKUP_VAULT_VIEW_UNSPECIFIED value + * @property {number} BACKUP_VAULT_VIEW_BASIC=1 BACKUP_VAULT_VIEW_BASIC value + * @property {number} BACKUP_VAULT_VIEW_FULL=2 BACKUP_VAULT_VIEW_FULL value + */ + v1.BackupVaultView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_VAULT_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKUP_VAULT_VIEW_BASIC"] = 1; + values[valuesById[2] = "BACKUP_VAULT_VIEW_FULL"] = 2; + return values; + })(); + + v1.BackupApplianceBackupProperties = (function() { + + /** + * Properties of a BackupApplianceBackupProperties. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupApplianceBackupProperties + * @property {number|null} [generationId] BackupApplianceBackupProperties generationId + * @property {google.protobuf.ITimestamp|null} [finalizeTime] BackupApplianceBackupProperties finalizeTime + * @property {google.protobuf.ITimestamp|null} [recoveryRangeStartTime] BackupApplianceBackupProperties recoveryRangeStartTime + * @property {google.protobuf.ITimestamp|null} [recoveryRangeEndTime] BackupApplianceBackupProperties recoveryRangeEndTime + */ + + /** + * Constructs a new BackupApplianceBackupProperties. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupApplianceBackupProperties. + * @implements IBackupApplianceBackupProperties + * @constructor + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties=} [properties] Properties to set + */ + function BackupApplianceBackupProperties(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupApplianceBackupProperties generationId. + * @member {number|null|undefined} generationId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + BackupApplianceBackupProperties.prototype.generationId = null; + + /** + * BackupApplianceBackupProperties finalizeTime. + * @member {google.protobuf.ITimestamp|null|undefined} finalizeTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + BackupApplianceBackupProperties.prototype.finalizeTime = null; + + /** + * BackupApplianceBackupProperties recoveryRangeStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeStartTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + BackupApplianceBackupProperties.prototype.recoveryRangeStartTime = null; + + /** + * BackupApplianceBackupProperties recoveryRangeEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeEndTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + BackupApplianceBackupProperties.prototype.recoveryRangeEndTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupApplianceBackupProperties _generationId. + * @member {"generationId"|undefined} _generationId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_generationId", { + get: $util.oneOfGetter($oneOfFields = ["generationId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupApplianceBackupProperties _finalizeTime. + * @member {"finalizeTime"|undefined} _finalizeTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_finalizeTime", { + get: $util.oneOfGetter($oneOfFields = ["finalizeTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupApplianceBackupProperties _recoveryRangeStartTime. + * @member {"recoveryRangeStartTime"|undefined} _recoveryRangeStartTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_recoveryRangeStartTime", { + get: $util.oneOfGetter($oneOfFields = ["recoveryRangeStartTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupApplianceBackupProperties _recoveryRangeEndTime. + * @member {"recoveryRangeEndTime"|undefined} _recoveryRangeEndTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_recoveryRangeEndTime", { + get: $util.oneOfGetter($oneOfFields = ["recoveryRangeEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupApplianceBackupProperties instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties instance + */ + BackupApplianceBackupProperties.create = function create(properties) { + return new BackupApplianceBackupProperties(properties); + }; + + /** + * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties} message BackupApplianceBackupProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceBackupProperties.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.generationId != null && Object.hasOwnProperty.call(message, "generationId")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.generationId); + if (message.finalizeTime != null && Object.hasOwnProperty.call(message, "finalizeTime")) + $root.google.protobuf.Timestamp.encode(message.finalizeTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.recoveryRangeStartTime != null && Object.hasOwnProperty.call(message, "recoveryRangeStartTime")) + $root.google.protobuf.Timestamp.encode(message.recoveryRangeStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.recoveryRangeEndTime != null && Object.hasOwnProperty.call(message, "recoveryRangeEndTime")) + $root.google.protobuf.Timestamp.encode(message.recoveryRangeEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties} message BackupApplianceBackupProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceBackupProperties.decode = function 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.backupdr.v1.BackupApplianceBackupProperties(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.generationId = reader.int32(); + break; + } + case 2: { + message.finalizeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceBackupProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupApplianceBackupProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupApplianceBackupProperties.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.generationId != null && message.hasOwnProperty("generationId")) { + properties._generationId = 1; + if (!$util.isInteger(message.generationId)) + return "generationId: integer expected"; + } + if (message.finalizeTime != null && message.hasOwnProperty("finalizeTime")) { + properties._finalizeTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.finalizeTime); + if (error) + return "finalizeTime." + error; + } + } + if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { + properties._recoveryRangeStartTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeStartTime); + if (error) + return "recoveryRangeStartTime." + error; + } + } + if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { + properties._recoveryRangeEndTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeEndTime); + if (error) + return "recoveryRangeEndTime." + error; + } + } + return null; + }; + + /** + * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties + */ + BackupApplianceBackupProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties(); + if (object.generationId != null) + message.generationId = object.generationId | 0; + if (object.finalizeTime != null) { + if (typeof object.finalizeTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.finalizeTime: object expected"); + message.finalizeTime = $root.google.protobuf.Timestamp.fromObject(object.finalizeTime); + } + if (object.recoveryRangeStartTime != null) { + if (typeof object.recoveryRangeStartTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeStartTime: object expected"); + message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeStartTime); + } + if (object.recoveryRangeEndTime != null) { + if (typeof object.recoveryRangeEndTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeEndTime: object expected"); + message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeEndTime); + } + return message; + }; + + /** + * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.BackupApplianceBackupProperties} message BackupApplianceBackupProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupApplianceBackupProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.generationId != null && message.hasOwnProperty("generationId")) { + object.generationId = message.generationId; + if (options.oneofs) + object._generationId = "generationId"; + } + if (message.finalizeTime != null && message.hasOwnProperty("finalizeTime")) { + object.finalizeTime = $root.google.protobuf.Timestamp.toObject(message.finalizeTime, options); + if (options.oneofs) + object._finalizeTime = "finalizeTime"; + } + if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { + object.recoveryRangeStartTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeStartTime, options); + if (options.oneofs) + object._recoveryRangeStartTime = "recoveryRangeStartTime"; + } + if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { + object.recoveryRangeEndTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeEndTime, options); + if (options.oneofs) + object._recoveryRangeEndTime = "recoveryRangeEndTime"; + } + return object; + }; + + /** + * Converts this BackupApplianceBackupProperties to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + * @returns {Object.} JSON object + */ + BackupApplianceBackupProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupApplianceBackupProperties + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupApplianceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceBackupProperties"; + }; + + return BackupApplianceBackupProperties; + })(); + + v1.ComputeInstanceBackupProperties = (function() { + + /** + * Properties of a ComputeInstanceBackupProperties. + * @memberof google.cloud.backupdr.v1 + * @interface IComputeInstanceBackupProperties + * @property {string|null} [description] ComputeInstanceBackupProperties description + * @property {google.cloud.backupdr.v1.ITags|null} [tags] ComputeInstanceBackupProperties tags + * @property {string|null} [machineType] ComputeInstanceBackupProperties machineType + * @property {boolean|null} [canIpForward] ComputeInstanceBackupProperties canIpForward + * @property {Array.|null} [networkInterface] ComputeInstanceBackupProperties networkInterface + * @property {Array.|null} [disk] ComputeInstanceBackupProperties disk + * @property {google.cloud.backupdr.v1.IMetadata|null} [metadata] ComputeInstanceBackupProperties metadata + * @property {Array.|null} [serviceAccount] ComputeInstanceBackupProperties serviceAccount + * @property {google.cloud.backupdr.v1.IScheduling|null} [scheduling] ComputeInstanceBackupProperties scheduling + * @property {Array.|null} [guestAccelerator] ComputeInstanceBackupProperties guestAccelerator + * @property {string|null} [minCpuPlatform] ComputeInstanceBackupProperties minCpuPlatform + * @property {google.cloud.backupdr.v1.KeyRevocationActionType|null} [keyRevocationActionType] ComputeInstanceBackupProperties keyRevocationActionType + * @property {string|null} [sourceInstance] ComputeInstanceBackupProperties sourceInstance + * @property {Object.|null} [labels] ComputeInstanceBackupProperties labels + */ + + /** + * Constructs a new ComputeInstanceBackupProperties. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ComputeInstanceBackupProperties. + * @implements IComputeInstanceBackupProperties + * @constructor + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties=} [properties] Properties to set + */ + function ComputeInstanceBackupProperties(properties) { + this.networkInterface = []; + this.disk = []; + this.serviceAccount = []; + this.guestAccelerator = []; + 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]]; + } + + /** + * ComputeInstanceBackupProperties description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.description = null; + + /** + * ComputeInstanceBackupProperties tags. + * @member {google.cloud.backupdr.v1.ITags|null|undefined} tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.tags = null; + + /** + * ComputeInstanceBackupProperties machineType. + * @member {string|null|undefined} machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.machineType = null; + + /** + * ComputeInstanceBackupProperties canIpForward. + * @member {boolean|null|undefined} canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.canIpForward = null; + + /** + * ComputeInstanceBackupProperties networkInterface. + * @member {Array.} networkInterface + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.networkInterface = $util.emptyArray; + + /** + * ComputeInstanceBackupProperties disk. + * @member {Array.} disk + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.disk = $util.emptyArray; + + /** + * ComputeInstanceBackupProperties metadata. + * @member {google.cloud.backupdr.v1.IMetadata|null|undefined} metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.metadata = null; + + /** + * ComputeInstanceBackupProperties serviceAccount. + * @member {Array.} serviceAccount + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.serviceAccount = $util.emptyArray; + + /** + * ComputeInstanceBackupProperties scheduling. + * @member {google.cloud.backupdr.v1.IScheduling|null|undefined} scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.scheduling = null; + + /** + * ComputeInstanceBackupProperties guestAccelerator. + * @member {Array.} guestAccelerator + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.guestAccelerator = $util.emptyArray; + + /** + * ComputeInstanceBackupProperties minCpuPlatform. + * @member {string|null|undefined} minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.minCpuPlatform = null; + + /** + * ComputeInstanceBackupProperties keyRevocationActionType. + * @member {google.cloud.backupdr.v1.KeyRevocationActionType|null|undefined} keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.keyRevocationActionType = null; + + /** + * ComputeInstanceBackupProperties sourceInstance. + * @member {string|null|undefined} sourceInstance + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.sourceInstance = null; + + /** + * ComputeInstanceBackupProperties labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.labels = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ComputeInstanceBackupProperties _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _tags. + * @member {"tags"|undefined} _tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_tags", { + get: $util.oneOfGetter($oneOfFields = ["tags"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _machineType. + * @member {"machineType"|undefined} _machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_machineType", { + get: $util.oneOfGetter($oneOfFields = ["machineType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _canIpForward. + * @member {"canIpForward"|undefined} _canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_canIpForward", { + get: $util.oneOfGetter($oneOfFields = ["canIpForward"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _scheduling. + * @member {"scheduling"|undefined} _scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_scheduling", { + get: $util.oneOfGetter($oneOfFields = ["scheduling"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _minCpuPlatform. + * @member {"minCpuPlatform"|undefined} _minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_minCpuPlatform", { + get: $util.oneOfGetter($oneOfFields = ["minCpuPlatform"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _keyRevocationActionType. + * @member {"keyRevocationActionType"|undefined} _keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_keyRevocationActionType", { + get: $util.oneOfGetter($oneOfFields = ["keyRevocationActionType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _sourceInstance. + * @member {"sourceInstance"|undefined} _sourceInstance + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_sourceInstance", { + get: $util.oneOfGetter($oneOfFields = ["sourceInstance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ComputeInstanceBackupProperties instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties instance + */ + ComputeInstanceBackupProperties.create = function create(properties) { + return new ComputeInstanceBackupProperties(properties); + }; + + /** + * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties} message ComputeInstanceBackupProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceBackupProperties.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.tags != null && Object.hasOwnProperty.call(message, "tags")) + $root.google.cloud.backupdr.v1.Tags.encode(message.tags, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.machineType); + if (message.canIpForward != null && Object.hasOwnProperty.call(message, "canIpForward")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.canIpForward); + if (message.networkInterface != null && message.networkInterface.length) + for (var i = 0; i < message.networkInterface.length; ++i) + $root.google.cloud.backupdr.v1.NetworkInterface.encode(message.networkInterface[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.disk != null && message.disk.length) + for (var i = 0; i < message.disk.length; ++i) + $root.google.cloud.backupdr.v1.AttachedDisk.encode(message.disk[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.cloud.backupdr.v1.Metadata.encode(message.metadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.serviceAccount != null && message.serviceAccount.length) + for (var i = 0; i < message.serviceAccount.length; ++i) + $root.google.cloud.backupdr.v1.ServiceAccount.encode(message.serviceAccount[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) + $root.google.cloud.backupdr.v1.Scheduling.encode(message.scheduling, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.guestAccelerator != null && message.guestAccelerator.length) + for (var i = 0; i < message.guestAccelerator.length; ++i) + $root.google.cloud.backupdr.v1.AcceleratorConfig.encode(message.guestAccelerator[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.minCpuPlatform); + if (message.keyRevocationActionType != null && Object.hasOwnProperty.call(message, "keyRevocationActionType")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.keyRevocationActionType); + if (message.sourceInstance != null && Object.hasOwnProperty.call(message, "sourceInstance")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.sourceInstance); + 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 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties} message ComputeInstanceBackupProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceBackupProperties.decode = function 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.backupdr.v1.ComputeInstanceBackupProperties(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.description = reader.string(); + break; + } + case 2: { + message.tags = $root.google.cloud.backupdr.v1.Tags.decode(reader, reader.uint32()); + break; + } + case 3: { + message.machineType = reader.string(); + break; + } + case 4: { + message.canIpForward = reader.bool(); + break; + } + case 5: { + if (!(message.networkInterface && message.networkInterface.length)) + message.networkInterface = []; + message.networkInterface.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.disk && message.disk.length)) + message.disk = []; + message.disk.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader, reader.uint32())); + break; + } + case 7: { + message.metadata = $root.google.cloud.backupdr.v1.Metadata.decode(reader, reader.uint32()); + break; + } + case 8: { + if (!(message.serviceAccount && message.serviceAccount.length)) + message.serviceAccount = []; + message.serviceAccount.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader, reader.uint32())); + break; + } + case 9: { + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.decode(reader, reader.uint32()); + break; + } + case 10: { + if (!(message.guestAccelerator && message.guestAccelerator.length)) + message.guestAccelerator = []; + message.guestAccelerator.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader, reader.uint32())); + break; + } + case 11: { + message.minCpuPlatform = reader.string(); + break; + } + case 12: { + message.keyRevocationActionType = reader.int32(); + break; + } + case 13: { + message.sourceInstance = reader.string(); + break; + } + case 14: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceBackupProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputeInstanceBackupProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeInstanceBackupProperties.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + properties._tags = 1; + { + var error = $root.google.cloud.backupdr.v1.Tags.verify(message.tags); + if (error) + return "tags." + error; + } + } + if (message.machineType != null && message.hasOwnProperty("machineType")) { + properties._machineType = 1; + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + properties._canIpForward = 1; + if (typeof message.canIpForward !== "boolean") + return "canIpForward: boolean expected"; + } + if (message.networkInterface != null && message.hasOwnProperty("networkInterface")) { + if (!Array.isArray(message.networkInterface)) + return "networkInterface: array expected"; + for (var i = 0; i < message.networkInterface.length; ++i) { + var error = $root.google.cloud.backupdr.v1.NetworkInterface.verify(message.networkInterface[i]); + if (error) + return "networkInterface." + error; + } + } + if (message.disk != null && message.hasOwnProperty("disk")) { + if (!Array.isArray(message.disk)) + return "disk: array expected"; + for (var i = 0; i < message.disk.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AttachedDisk.verify(message.disk[i]); + if (error) + return "disk." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + { + var error = $root.google.cloud.backupdr.v1.Metadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) { + if (!Array.isArray(message.serviceAccount)) + return "serviceAccount: array expected"; + for (var i = 0; i < message.serviceAccount.length; ++i) { + var error = $root.google.cloud.backupdr.v1.ServiceAccount.verify(message.serviceAccount[i]); + if (error) + return "serviceAccount." + error; + } + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + properties._scheduling = 1; + { + var error = $root.google.cloud.backupdr.v1.Scheduling.verify(message.scheduling); + if (error) + return "scheduling." + error; + } + } + if (message.guestAccelerator != null && message.hasOwnProperty("guestAccelerator")) { + if (!Array.isArray(message.guestAccelerator)) + return "guestAccelerator: array expected"; + for (var i = 0; i < message.guestAccelerator.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AcceleratorConfig.verify(message.guestAccelerator[i]); + if (error) + return "guestAccelerator." + error; + } + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + properties._minCpuPlatform = 1; + if (!$util.isString(message.minCpuPlatform)) + return "minCpuPlatform: string expected"; + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + properties._keyRevocationActionType = 1; + switch (message.keyRevocationActionType) { + default: + return "keyRevocationActionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) { + properties._sourceInstance = 1; + if (!$util.isString(message.sourceInstance)) + return "sourceInstance: string expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties + */ + ComputeInstanceBackupProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties(); + if (object.description != null) + message.description = String(object.description); + if (object.tags != null) { + if (typeof object.tags !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.tags: object expected"); + message.tags = $root.google.cloud.backupdr.v1.Tags.fromObject(object.tags); + } + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.canIpForward != null) + message.canIpForward = Boolean(object.canIpForward); + if (object.networkInterface) { + if (!Array.isArray(object.networkInterface)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: array expected"); + message.networkInterface = []; + for (var i = 0; i < object.networkInterface.length; ++i) { + if (typeof object.networkInterface[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: object expected"); + message.networkInterface[i] = $root.google.cloud.backupdr.v1.NetworkInterface.fromObject(object.networkInterface[i]); + } + } + if (object.disk) { + if (!Array.isArray(object.disk)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.disk: array expected"); + message.disk = []; + for (var i = 0; i < object.disk.length; ++i) { + if (typeof object.disk[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.disk: object expected"); + message.disk[i] = $root.google.cloud.backupdr.v1.AttachedDisk.fromObject(object.disk[i]); + } + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.metadata: object expected"); + message.metadata = $root.google.cloud.backupdr.v1.Metadata.fromObject(object.metadata); + } + if (object.serviceAccount) { + if (!Array.isArray(object.serviceAccount)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.serviceAccount: array expected"); + message.serviceAccount = []; + for (var i = 0; i < object.serviceAccount.length; ++i) { + if (typeof object.serviceAccount[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.serviceAccount: object expected"); + message.serviceAccount[i] = $root.google.cloud.backupdr.v1.ServiceAccount.fromObject(object.serviceAccount[i]); + } + } + if (object.scheduling != null) { + if (typeof object.scheduling !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.scheduling: object expected"); + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.fromObject(object.scheduling); + } + if (object.guestAccelerator) { + if (!Array.isArray(object.guestAccelerator)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.guestAccelerator: array expected"); + message.guestAccelerator = []; + for (var i = 0; i < object.guestAccelerator.length; ++i) { + if (typeof object.guestAccelerator[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.guestAccelerator: object expected"); + message.guestAccelerator[i] = $root.google.cloud.backupdr.v1.AcceleratorConfig.fromObject(object.guestAccelerator[i]); + } + } + if (object.minCpuPlatform != null) + message.minCpuPlatform = String(object.minCpuPlatform); + switch (object.keyRevocationActionType) { + default: + if (typeof object.keyRevocationActionType === "number") { + message.keyRevocationActionType = object.keyRevocationActionType; + break; + } + break; + case "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": + case 0: + message.keyRevocationActionType = 0; + break; + case "NONE": + case 1: + message.keyRevocationActionType = 1; + break; + case "STOP": + case 2: + message.keyRevocationActionType = 2; + break; + } + if (object.sourceInstance != null) + message.sourceInstance = String(object.sourceInstance); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} message ComputeInstanceBackupProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeInstanceBackupProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.networkInterface = []; + object.disk = []; + object.serviceAccount = []; + object.guestAccelerator = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + object.tags = $root.google.cloud.backupdr.v1.Tags.toObject(message.tags, options); + if (options.oneofs) + object._tags = "tags"; + } + if (message.machineType != null && message.hasOwnProperty("machineType")) { + object.machineType = message.machineType; + if (options.oneofs) + object._machineType = "machineType"; + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + object.canIpForward = message.canIpForward; + if (options.oneofs) + object._canIpForward = "canIpForward"; + } + if (message.networkInterface && message.networkInterface.length) { + object.networkInterface = []; + for (var j = 0; j < message.networkInterface.length; ++j) + object.networkInterface[j] = $root.google.cloud.backupdr.v1.NetworkInterface.toObject(message.networkInterface[j], options); + } + if (message.disk && message.disk.length) { + object.disk = []; + for (var j = 0; j < message.disk.length; ++j) + object.disk[j] = $root.google.cloud.backupdr.v1.AttachedDisk.toObject(message.disk[j], options); + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = $root.google.cloud.backupdr.v1.Metadata.toObject(message.metadata, options); + if (options.oneofs) + object._metadata = "metadata"; + } + if (message.serviceAccount && message.serviceAccount.length) { + object.serviceAccount = []; + for (var j = 0; j < message.serviceAccount.length; ++j) + object.serviceAccount[j] = $root.google.cloud.backupdr.v1.ServiceAccount.toObject(message.serviceAccount[j], options); + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + object.scheduling = $root.google.cloud.backupdr.v1.Scheduling.toObject(message.scheduling, options); + if (options.oneofs) + object._scheduling = "scheduling"; + } + if (message.guestAccelerator && message.guestAccelerator.length) { + object.guestAccelerator = []; + for (var j = 0; j < message.guestAccelerator.length; ++j) + object.guestAccelerator[j] = $root.google.cloud.backupdr.v1.AcceleratorConfig.toObject(message.guestAccelerator[j], options); + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + object.minCpuPlatform = message.minCpuPlatform; + if (options.oneofs) + object._minCpuPlatform = "minCpuPlatform"; + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + object.keyRevocationActionType = options.enums === String ? $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] === undefined ? message.keyRevocationActionType : $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] : message.keyRevocationActionType; + if (options.oneofs) + object._keyRevocationActionType = "keyRevocationActionType"; + } + if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) { + object.sourceInstance = message.sourceInstance; + if (options.oneofs) + object._sourceInstance = "sourceInstance"; + } + 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]]; + } + return object; + }; + + /** + * Converts this ComputeInstanceBackupProperties to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + * @returns {Object.} JSON object + */ + ComputeInstanceBackupProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComputeInstanceBackupProperties + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputeInstanceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceBackupProperties"; + }; + + return ComputeInstanceBackupProperties; + })(); + + v1.ComputeInstanceRestoreProperties = (function() { + + /** + * Properties of a ComputeInstanceRestoreProperties. + * @memberof google.cloud.backupdr.v1 + * @interface IComputeInstanceRestoreProperties + * @property {string|null} [name] ComputeInstanceRestoreProperties name + * @property {google.cloud.backupdr.v1.IAdvancedMachineFeatures|null} [advancedMachineFeatures] ComputeInstanceRestoreProperties advancedMachineFeatures + * @property {boolean|null} [canIpForward] ComputeInstanceRestoreProperties canIpForward + * @property {google.cloud.backupdr.v1.IConfidentialInstanceConfig|null} [confidentialInstanceConfig] ComputeInstanceRestoreProperties confidentialInstanceConfig + * @property {boolean|null} [deletionProtection] ComputeInstanceRestoreProperties deletionProtection + * @property {string|null} [description] ComputeInstanceRestoreProperties description + * @property {Array.|null} [disks] ComputeInstanceRestoreProperties disks + * @property {google.cloud.backupdr.v1.IDisplayDevice|null} [displayDevice] ComputeInstanceRestoreProperties displayDevice + * @property {Array.|null} [guestAccelerators] ComputeInstanceRestoreProperties guestAccelerators + * @property {string|null} [hostname] ComputeInstanceRestoreProperties hostname + * @property {google.cloud.backupdr.v1.ICustomerEncryptionKey|null} [instanceEncryptionKey] ComputeInstanceRestoreProperties instanceEncryptionKey + * @property {google.cloud.backupdr.v1.KeyRevocationActionType|null} [keyRevocationActionType] ComputeInstanceRestoreProperties keyRevocationActionType + * @property {Object.|null} [labels] ComputeInstanceRestoreProperties labels + * @property {string|null} [machineType] ComputeInstanceRestoreProperties machineType + * @property {google.cloud.backupdr.v1.IMetadata|null} [metadata] ComputeInstanceRestoreProperties metadata + * @property {string|null} [minCpuPlatform] ComputeInstanceRestoreProperties minCpuPlatform + * @property {Array.|null} [networkInterfaces] ComputeInstanceRestoreProperties networkInterfaces + * @property {google.cloud.backupdr.v1.INetworkPerformanceConfig|null} [networkPerformanceConfig] ComputeInstanceRestoreProperties networkPerformanceConfig + * @property {google.cloud.backupdr.v1.IInstanceParams|null} [params] ComputeInstanceRestoreProperties params + * @property {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null} [privateIpv6GoogleAccess] ComputeInstanceRestoreProperties privateIpv6GoogleAccess + * @property {google.cloud.backupdr.v1.IAllocationAffinity|null} [allocationAffinity] ComputeInstanceRestoreProperties allocationAffinity + * @property {Array.|null} [resourcePolicies] ComputeInstanceRestoreProperties resourcePolicies + * @property {google.cloud.backupdr.v1.IScheduling|null} [scheduling] ComputeInstanceRestoreProperties scheduling + * @property {Array.|null} [serviceAccounts] ComputeInstanceRestoreProperties serviceAccounts + * @property {google.cloud.backupdr.v1.ITags|null} [tags] ComputeInstanceRestoreProperties tags + */ + + /** + * Constructs a new ComputeInstanceRestoreProperties. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ComputeInstanceRestoreProperties. + * @implements IComputeInstanceRestoreProperties + * @constructor + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties=} [properties] Properties to set + */ + function ComputeInstanceRestoreProperties(properties) { + this.disks = []; + this.guestAccelerators = []; + this.labels = {}; + this.networkInterfaces = []; + this.resourcePolicies = []; + this.serviceAccounts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComputeInstanceRestoreProperties name. + * @member {string|null|undefined} name + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.name = null; + + /** + * ComputeInstanceRestoreProperties advancedMachineFeatures. + * @member {google.cloud.backupdr.v1.IAdvancedMachineFeatures|null|undefined} advancedMachineFeatures + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.advancedMachineFeatures = null; + + /** + * ComputeInstanceRestoreProperties canIpForward. + * @member {boolean|null|undefined} canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.canIpForward = null; + + /** + * ComputeInstanceRestoreProperties confidentialInstanceConfig. + * @member {google.cloud.backupdr.v1.IConfidentialInstanceConfig|null|undefined} confidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.confidentialInstanceConfig = null; + + /** + * ComputeInstanceRestoreProperties deletionProtection. + * @member {boolean|null|undefined} deletionProtection + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.deletionProtection = null; + + /** + * ComputeInstanceRestoreProperties description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.description = null; + + /** + * ComputeInstanceRestoreProperties disks. + * @member {Array.} disks + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.disks = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties displayDevice. + * @member {google.cloud.backupdr.v1.IDisplayDevice|null|undefined} displayDevice + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.displayDevice = null; + + /** + * ComputeInstanceRestoreProperties guestAccelerators. + * @member {Array.} guestAccelerators + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.guestAccelerators = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties hostname. + * @member {string|null|undefined} hostname + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.hostname = null; + + /** + * ComputeInstanceRestoreProperties instanceEncryptionKey. + * @member {google.cloud.backupdr.v1.ICustomerEncryptionKey|null|undefined} instanceEncryptionKey + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.instanceEncryptionKey = null; + + /** + * ComputeInstanceRestoreProperties keyRevocationActionType. + * @member {google.cloud.backupdr.v1.KeyRevocationActionType|null|undefined} keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.keyRevocationActionType = null; + + /** + * ComputeInstanceRestoreProperties labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.labels = $util.emptyObject; + + /** + * ComputeInstanceRestoreProperties machineType. + * @member {string|null|undefined} machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.machineType = null; + + /** + * ComputeInstanceRestoreProperties metadata. + * @member {google.cloud.backupdr.v1.IMetadata|null|undefined} metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.metadata = null; + + /** + * ComputeInstanceRestoreProperties minCpuPlatform. + * @member {string|null|undefined} minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.minCpuPlatform = null; + + /** + * ComputeInstanceRestoreProperties networkInterfaces. + * @member {Array.} networkInterfaces + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.networkInterfaces = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties networkPerformanceConfig. + * @member {google.cloud.backupdr.v1.INetworkPerformanceConfig|null|undefined} networkPerformanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.networkPerformanceConfig = null; + + /** + * ComputeInstanceRestoreProperties params. + * @member {google.cloud.backupdr.v1.IInstanceParams|null|undefined} params + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.params = null; + + /** + * ComputeInstanceRestoreProperties privateIpv6GoogleAccess. + * @member {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null|undefined} privateIpv6GoogleAccess + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.privateIpv6GoogleAccess = null; + + /** + * ComputeInstanceRestoreProperties allocationAffinity. + * @member {google.cloud.backupdr.v1.IAllocationAffinity|null|undefined} allocationAffinity + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.allocationAffinity = null; + + /** + * ComputeInstanceRestoreProperties resourcePolicies. + * @member {Array.} resourcePolicies + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.resourcePolicies = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties scheduling. + * @member {google.cloud.backupdr.v1.IScheduling|null|undefined} scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.scheduling = null; + + /** + * ComputeInstanceRestoreProperties serviceAccounts. + * @member {Array.} serviceAccounts + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.serviceAccounts = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties tags. + * @member {google.cloud.backupdr.v1.ITags|null|undefined} tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.tags = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ComputeInstanceRestoreProperties _name. + * @member {"name"|undefined} _name + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _advancedMachineFeatures. + * @member {"advancedMachineFeatures"|undefined} _advancedMachineFeatures + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_advancedMachineFeatures", { + get: $util.oneOfGetter($oneOfFields = ["advancedMachineFeatures"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _canIpForward. + * @member {"canIpForward"|undefined} _canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_canIpForward", { + get: $util.oneOfGetter($oneOfFields = ["canIpForward"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _confidentialInstanceConfig. + * @member {"confidentialInstanceConfig"|undefined} _confidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_confidentialInstanceConfig", { + get: $util.oneOfGetter($oneOfFields = ["confidentialInstanceConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _deletionProtection. + * @member {"deletionProtection"|undefined} _deletionProtection + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_deletionProtection", { + get: $util.oneOfGetter($oneOfFields = ["deletionProtection"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _displayDevice. + * @member {"displayDevice"|undefined} _displayDevice + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_displayDevice", { + get: $util.oneOfGetter($oneOfFields = ["displayDevice"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _hostname. + * @member {"hostname"|undefined} _hostname + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_hostname", { + get: $util.oneOfGetter($oneOfFields = ["hostname"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _instanceEncryptionKey. + * @member {"instanceEncryptionKey"|undefined} _instanceEncryptionKey + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_instanceEncryptionKey", { + get: $util.oneOfGetter($oneOfFields = ["instanceEncryptionKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _keyRevocationActionType. + * @member {"keyRevocationActionType"|undefined} _keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_keyRevocationActionType", { + get: $util.oneOfGetter($oneOfFields = ["keyRevocationActionType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _machineType. + * @member {"machineType"|undefined} _machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_machineType", { + get: $util.oneOfGetter($oneOfFields = ["machineType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _minCpuPlatform. + * @member {"minCpuPlatform"|undefined} _minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_minCpuPlatform", { + get: $util.oneOfGetter($oneOfFields = ["minCpuPlatform"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _networkPerformanceConfig. + * @member {"networkPerformanceConfig"|undefined} _networkPerformanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_networkPerformanceConfig", { + get: $util.oneOfGetter($oneOfFields = ["networkPerformanceConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _params. + * @member {"params"|undefined} _params + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_params", { + get: $util.oneOfGetter($oneOfFields = ["params"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _privateIpv6GoogleAccess. + * @member {"privateIpv6GoogleAccess"|undefined} _privateIpv6GoogleAccess + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_privateIpv6GoogleAccess", { + get: $util.oneOfGetter($oneOfFields = ["privateIpv6GoogleAccess"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _allocationAffinity. + * @member {"allocationAffinity"|undefined} _allocationAffinity + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_allocationAffinity", { + get: $util.oneOfGetter($oneOfFields = ["allocationAffinity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _scheduling. + * @member {"scheduling"|undefined} _scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_scheduling", { + get: $util.oneOfGetter($oneOfFields = ["scheduling"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _tags. + * @member {"tags"|undefined} _tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_tags", { + get: $util.oneOfGetter($oneOfFields = ["tags"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties instance + */ + ComputeInstanceRestoreProperties.create = function create(properties) { + return new ComputeInstanceRestoreProperties(properties); + }; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceRestoreProperties.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.advancedMachineFeatures != null && Object.hasOwnProperty.call(message, "advancedMachineFeatures")) + $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.encode(message.advancedMachineFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.canIpForward != null && Object.hasOwnProperty.call(message, "canIpForward")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.canIpForward); + if (message.confidentialInstanceConfig != null && Object.hasOwnProperty.call(message, "confidentialInstanceConfig")) + $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.encode(message.confidentialInstanceConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.deletionProtection); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.disks != null && message.disks.length) + for (var i = 0; i < message.disks.length; ++i) + $root.google.cloud.backupdr.v1.AttachedDisk.encode(message.disks[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.displayDevice != null && Object.hasOwnProperty.call(message, "displayDevice")) + $root.google.cloud.backupdr.v1.DisplayDevice.encode(message.displayDevice, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.guestAccelerators != null && message.guestAccelerators.length) + for (var i = 0; i < message.guestAccelerators.length; ++i) + $root.google.cloud.backupdr.v1.AcceleratorConfig.encode(message.guestAccelerators[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.hostname); + if (message.instanceEncryptionKey != null && Object.hasOwnProperty.call(message, "instanceEncryptionKey")) + $root.google.cloud.backupdr.v1.CustomerEncryptionKey.encode(message.instanceEncryptionKey, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.keyRevocationActionType != null && Object.hasOwnProperty.call(message, "keyRevocationActionType")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.keyRevocationActionType); + 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 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.machineType); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.cloud.backupdr.v1.Metadata.encode(message.metadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.minCpuPlatform); + if (message.networkInterfaces != null && message.networkInterfaces.length) + for (var i = 0; i < message.networkInterfaces.length; ++i) + $root.google.cloud.backupdr.v1.NetworkInterface.encode(message.networkInterfaces[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.networkPerformanceConfig != null && Object.hasOwnProperty.call(message, "networkPerformanceConfig")) + $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.encode(message.networkPerformanceConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.google.cloud.backupdr.v1.InstanceParams.encode(message.params, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.privateIpv6GoogleAccess != null && Object.hasOwnProperty.call(message, "privateIpv6GoogleAccess")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.privateIpv6GoogleAccess); + if (message.allocationAffinity != null && Object.hasOwnProperty.call(message, "allocationAffinity")) + $root.google.cloud.backupdr.v1.AllocationAffinity.encode(message.allocationAffinity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.resourcePolicies != null && message.resourcePolicies.length) + for (var i = 0; i < message.resourcePolicies.length; ++i) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.resourcePolicies[i]); + if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) + $root.google.cloud.backupdr.v1.Scheduling.encode(message.scheduling, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.serviceAccounts != null && message.serviceAccounts.length) + for (var i = 0; i < message.serviceAccounts.length; ++i) + $root.google.cloud.backupdr.v1.ServiceAccount.encode(message.serviceAccounts[i], writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + $root.google.cloud.backupdr.v1.Tags.encode(message.tags, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceRestoreProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceRestoreProperties.decode = function 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.backupdr.v1.ComputeInstanceRestoreProperties(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.decode(reader, reader.uint32()); + break; + } + case 3: { + message.canIpForward = reader.bool(); + break; + } + case 4: { + message.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.deletionProtection = reader.bool(); + break; + } + case 6: { + message.description = reader.string(); + break; + } + case 7: { + if (!(message.disks && message.disks.length)) + message.disks = []; + message.disks.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader, reader.uint32())); + break; + } + case 8: { + message.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.guestAccelerators && message.guestAccelerators.length)) + message.guestAccelerators = []; + message.guestAccelerators.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader, reader.uint32())); + break; + } + case 10: { + message.hostname = reader.string(); + break; + } + case 11: { + message.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader, reader.uint32()); + break; + } + case 12: { + message.keyRevocationActionType = reader.int32(); + break; + } + case 13: { + 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 14: { + message.machineType = reader.string(); + break; + } + case 15: { + message.metadata = $root.google.cloud.backupdr.v1.Metadata.decode(reader, reader.uint32()); + break; + } + case 16: { + message.minCpuPlatform = reader.string(); + break; + } + case 17: { + if (!(message.networkInterfaces && message.networkInterfaces.length)) + message.networkInterfaces = []; + message.networkInterfaces.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader, reader.uint32())); + break; + } + case 18: { + message.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.decode(reader, reader.uint32()); + break; + } + case 19: { + message.params = $root.google.cloud.backupdr.v1.InstanceParams.decode(reader, reader.uint32()); + break; + } + case 20: { + message.privateIpv6GoogleAccess = reader.int32(); + break; + } + case 21: { + message.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.decode(reader, reader.uint32()); + break; + } + case 22: { + if (!(message.resourcePolicies && message.resourcePolicies.length)) + message.resourcePolicies = []; + message.resourcePolicies.push(reader.string()); + break; + } + case 23: { + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.decode(reader, reader.uint32()); + break; + } + case 24: { + if (!(message.serviceAccounts && message.serviceAccounts.length)) + message.serviceAccounts = []; + message.serviceAccounts.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader, reader.uint32())); + break; + } + case 26: { + message.tags = $root.google.cloud.backupdr.v1.Tags.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceRestoreProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputeInstanceRestoreProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeInstanceRestoreProperties.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { + properties._advancedMachineFeatures = 1; + { + var error = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.verify(message.advancedMachineFeatures); + if (error) + return "advancedMachineFeatures." + error; + } + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + properties._canIpForward = 1; + if (typeof message.canIpForward !== "boolean") + return "canIpForward: boolean expected"; + } + if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) { + properties._confidentialInstanceConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify(message.confidentialInstanceConfig); + if (error) + return "confidentialInstanceConfig." + error; + } + } + if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) { + properties._deletionProtection = 1; + if (typeof message.deletionProtection !== "boolean") + return "deletionProtection: boolean expected"; + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.disks != null && message.hasOwnProperty("disks")) { + if (!Array.isArray(message.disks)) + return "disks: array expected"; + for (var i = 0; i < message.disks.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AttachedDisk.verify(message.disks[i]); + if (error) + return "disks." + error; + } + } + if (message.displayDevice != null && message.hasOwnProperty("displayDevice")) { + properties._displayDevice = 1; + { + var error = $root.google.cloud.backupdr.v1.DisplayDevice.verify(message.displayDevice); + if (error) + return "displayDevice." + error; + } + } + if (message.guestAccelerators != null && message.hasOwnProperty("guestAccelerators")) { + if (!Array.isArray(message.guestAccelerators)) + return "guestAccelerators: array expected"; + for (var i = 0; i < message.guestAccelerators.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AcceleratorConfig.verify(message.guestAccelerators[i]); + if (error) + return "guestAccelerators." + error; + } + } + if (message.hostname != null && message.hasOwnProperty("hostname")) { + properties._hostname = 1; + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + } + if (message.instanceEncryptionKey != null && message.hasOwnProperty("instanceEncryptionKey")) { + properties._instanceEncryptionKey = 1; + { + var error = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.verify(message.instanceEncryptionKey); + if (error) + return "instanceEncryptionKey." + error; + } + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + properties._keyRevocationActionType = 1; + switch (message.keyRevocationActionType) { + default: + return "keyRevocationActionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + 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.machineType != null && message.hasOwnProperty("machineType")) { + properties._machineType = 1; + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + { + var error = $root.google.cloud.backupdr.v1.Metadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + properties._minCpuPlatform = 1; + if (!$util.isString(message.minCpuPlatform)) + return "minCpuPlatform: string expected"; + } + if (message.networkInterfaces != null && message.hasOwnProperty("networkInterfaces")) { + if (!Array.isArray(message.networkInterfaces)) + return "networkInterfaces: array expected"; + for (var i = 0; i < message.networkInterfaces.length; ++i) { + var error = $root.google.cloud.backupdr.v1.NetworkInterface.verify(message.networkInterfaces[i]); + if (error) + return "networkInterfaces." + error; + } + } + if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { + properties._networkPerformanceConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.verify(message.networkPerformanceConfig); + if (error) + return "networkPerformanceConfig." + error; + } + } + if (message.params != null && message.hasOwnProperty("params")) { + properties._params = 1; + { + var error = $root.google.cloud.backupdr.v1.InstanceParams.verify(message.params); + if (error) + return "params." + error; + } + } + if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) { + properties._privateIpv6GoogleAccess = 1; + switch (message.privateIpv6GoogleAccess) { + default: + return "privateIpv6GoogleAccess: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.allocationAffinity != null && message.hasOwnProperty("allocationAffinity")) { + properties._allocationAffinity = 1; + { + var error = $root.google.cloud.backupdr.v1.AllocationAffinity.verify(message.allocationAffinity); + if (error) + return "allocationAffinity." + error; + } + } + if (message.resourcePolicies != null && message.hasOwnProperty("resourcePolicies")) { + if (!Array.isArray(message.resourcePolicies)) + return "resourcePolicies: array expected"; + for (var i = 0; i < message.resourcePolicies.length; ++i) + if (!$util.isString(message.resourcePolicies[i])) + return "resourcePolicies: string[] expected"; + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + properties._scheduling = 1; + { + var error = $root.google.cloud.backupdr.v1.Scheduling.verify(message.scheduling); + if (error) + return "scheduling." + error; + } + } + if (message.serviceAccounts != null && message.hasOwnProperty("serviceAccounts")) { + if (!Array.isArray(message.serviceAccounts)) + return "serviceAccounts: array expected"; + for (var i = 0; i < message.serviceAccounts.length; ++i) { + var error = $root.google.cloud.backupdr.v1.ServiceAccount.verify(message.serviceAccounts[i]); + if (error) + return "serviceAccounts." + error; + } + } + if (message.tags != null && message.hasOwnProperty("tags")) { + properties._tags = 1; + { + var error = $root.google.cloud.backupdr.v1.Tags.verify(message.tags); + if (error) + return "tags." + error; + } + } + return null; + }; + + /** + * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties + */ + ComputeInstanceRestoreProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties(); + if (object.name != null) + message.name = String(object.name); + if (object.advancedMachineFeatures != null) { + if (typeof object.advancedMachineFeatures !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.advancedMachineFeatures: object expected"); + message.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.fromObject(object.advancedMachineFeatures); + } + if (object.canIpForward != null) + message.canIpForward = Boolean(object.canIpForward); + if (object.confidentialInstanceConfig != null) { + if (typeof object.confidentialInstanceConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.confidentialInstanceConfig: object expected"); + message.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.fromObject(object.confidentialInstanceConfig); + } + if (object.deletionProtection != null) + message.deletionProtection = Boolean(object.deletionProtection); + if (object.description != null) + message.description = String(object.description); + if (object.disks) { + if (!Array.isArray(object.disks)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: array expected"); + message.disks = []; + for (var i = 0; i < object.disks.length; ++i) { + if (typeof object.disks[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: object expected"); + message.disks[i] = $root.google.cloud.backupdr.v1.AttachedDisk.fromObject(object.disks[i]); + } + } + if (object.displayDevice != null) { + if (typeof object.displayDevice !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.displayDevice: object expected"); + message.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.fromObject(object.displayDevice); + } + if (object.guestAccelerators) { + if (!Array.isArray(object.guestAccelerators)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.guestAccelerators: array expected"); + message.guestAccelerators = []; + for (var i = 0; i < object.guestAccelerators.length; ++i) { + if (typeof object.guestAccelerators[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.guestAccelerators: object expected"); + message.guestAccelerators[i] = $root.google.cloud.backupdr.v1.AcceleratorConfig.fromObject(object.guestAccelerators[i]); + } + } + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.instanceEncryptionKey != null) { + if (typeof object.instanceEncryptionKey !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.instanceEncryptionKey: object expected"); + message.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.fromObject(object.instanceEncryptionKey); + } + switch (object.keyRevocationActionType) { + default: + if (typeof object.keyRevocationActionType === "number") { + message.keyRevocationActionType = object.keyRevocationActionType; + break; + } + break; + case "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": + case 0: + message.keyRevocationActionType = 0; + break; + case "NONE": + case 1: + message.keyRevocationActionType = 1; + break; + case "STOP": + case 2: + message.keyRevocationActionType = 2; + break; + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.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.machineType != null) + message.machineType = String(object.machineType); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.metadata: object expected"); + message.metadata = $root.google.cloud.backupdr.v1.Metadata.fromObject(object.metadata); + } + if (object.minCpuPlatform != null) + message.minCpuPlatform = String(object.minCpuPlatform); + if (object.networkInterfaces) { + if (!Array.isArray(object.networkInterfaces)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkInterfaces: array expected"); + message.networkInterfaces = []; + for (var i = 0; i < object.networkInterfaces.length; ++i) { + if (typeof object.networkInterfaces[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkInterfaces: object expected"); + message.networkInterfaces[i] = $root.google.cloud.backupdr.v1.NetworkInterface.fromObject(object.networkInterfaces[i]); + } + } + if (object.networkPerformanceConfig != null) { + if (typeof object.networkPerformanceConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkPerformanceConfig: object expected"); + message.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.fromObject(object.networkPerformanceConfig); + } + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.params: object expected"); + message.params = $root.google.cloud.backupdr.v1.InstanceParams.fromObject(object.params); + } + switch (object.privateIpv6GoogleAccess) { + default: + if (typeof object.privateIpv6GoogleAccess === "number") { + message.privateIpv6GoogleAccess = object.privateIpv6GoogleAccess; + break; + } + break; + case "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": + case 0: + message.privateIpv6GoogleAccess = 0; + break; + case "INHERIT_FROM_SUBNETWORK": + case 1: + message.privateIpv6GoogleAccess = 1; + break; + case "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE": + case 2: + message.privateIpv6GoogleAccess = 2; + break; + case "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE": + case 3: + message.privateIpv6GoogleAccess = 3; + break; + } + if (object.allocationAffinity != null) { + if (typeof object.allocationAffinity !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.allocationAffinity: object expected"); + message.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.fromObject(object.allocationAffinity); + } + if (object.resourcePolicies) { + if (!Array.isArray(object.resourcePolicies)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.resourcePolicies: array expected"); + message.resourcePolicies = []; + for (var i = 0; i < object.resourcePolicies.length; ++i) + message.resourcePolicies[i] = String(object.resourcePolicies[i]); + } + if (object.scheduling != null) { + if (typeof object.scheduling !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.scheduling: object expected"); + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.fromObject(object.scheduling); + } + if (object.serviceAccounts) { + if (!Array.isArray(object.serviceAccounts)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.serviceAccounts: array expected"); + message.serviceAccounts = []; + for (var i = 0; i < object.serviceAccounts.length; ++i) { + if (typeof object.serviceAccounts[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.serviceAccounts: object expected"); + message.serviceAccounts[i] = $root.google.cloud.backupdr.v1.ServiceAccount.fromObject(object.serviceAccounts[i]); + } + } + if (object.tags != null) { + if (typeof object.tags !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.tags: object expected"); + message.tags = $root.google.cloud.backupdr.v1.Tags.fromObject(object.tags); + } + return message; + }; + + /** + * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeInstanceRestoreProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.disks = []; + object.guestAccelerators = []; + object.networkInterfaces = []; + object.resourcePolicies = []; + object.serviceAccounts = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { + object.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.toObject(message.advancedMachineFeatures, options); + if (options.oneofs) + object._advancedMachineFeatures = "advancedMachineFeatures"; + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + object.canIpForward = message.canIpForward; + if (options.oneofs) + object._canIpForward = "canIpForward"; + } + if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) { + object.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.toObject(message.confidentialInstanceConfig, options); + if (options.oneofs) + object._confidentialInstanceConfig = "confidentialInstanceConfig"; + } + if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) { + object.deletionProtection = message.deletionProtection; + if (options.oneofs) + object._deletionProtection = "deletionProtection"; + } + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.disks && message.disks.length) { + object.disks = []; + for (var j = 0; j < message.disks.length; ++j) + object.disks[j] = $root.google.cloud.backupdr.v1.AttachedDisk.toObject(message.disks[j], options); + } + if (message.displayDevice != null && message.hasOwnProperty("displayDevice")) { + object.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.toObject(message.displayDevice, options); + if (options.oneofs) + object._displayDevice = "displayDevice"; + } + if (message.guestAccelerators && message.guestAccelerators.length) { + object.guestAccelerators = []; + for (var j = 0; j < message.guestAccelerators.length; ++j) + object.guestAccelerators[j] = $root.google.cloud.backupdr.v1.AcceleratorConfig.toObject(message.guestAccelerators[j], options); + } + if (message.hostname != null && message.hasOwnProperty("hostname")) { + object.hostname = message.hostname; + if (options.oneofs) + object._hostname = "hostname"; + } + if (message.instanceEncryptionKey != null && message.hasOwnProperty("instanceEncryptionKey")) { + object.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.toObject(message.instanceEncryptionKey, options); + if (options.oneofs) + object._instanceEncryptionKey = "instanceEncryptionKey"; + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + object.keyRevocationActionType = options.enums === String ? $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] === undefined ? message.keyRevocationActionType : $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] : message.keyRevocationActionType; + if (options.oneofs) + object._keyRevocationActionType = "keyRevocationActionType"; + } + 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.machineType != null && message.hasOwnProperty("machineType")) { + object.machineType = message.machineType; + if (options.oneofs) + object._machineType = "machineType"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = $root.google.cloud.backupdr.v1.Metadata.toObject(message.metadata, options); + if (options.oneofs) + object._metadata = "metadata"; + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + object.minCpuPlatform = message.minCpuPlatform; + if (options.oneofs) + object._minCpuPlatform = "minCpuPlatform"; + } + if (message.networkInterfaces && message.networkInterfaces.length) { + object.networkInterfaces = []; + for (var j = 0; j < message.networkInterfaces.length; ++j) + object.networkInterfaces[j] = $root.google.cloud.backupdr.v1.NetworkInterface.toObject(message.networkInterfaces[j], options); + } + if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { + object.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.toObject(message.networkPerformanceConfig, options); + if (options.oneofs) + object._networkPerformanceConfig = "networkPerformanceConfig"; + } + if (message.params != null && message.hasOwnProperty("params")) { + object.params = $root.google.cloud.backupdr.v1.InstanceParams.toObject(message.params, options); + if (options.oneofs) + object._params = "params"; + } + if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) { + object.privateIpv6GoogleAccess = options.enums === String ? $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess[message.privateIpv6GoogleAccess] === undefined ? message.privateIpv6GoogleAccess : $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess[message.privateIpv6GoogleAccess] : message.privateIpv6GoogleAccess; + if (options.oneofs) + object._privateIpv6GoogleAccess = "privateIpv6GoogleAccess"; + } + if (message.allocationAffinity != null && message.hasOwnProperty("allocationAffinity")) { + object.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.toObject(message.allocationAffinity, options); + if (options.oneofs) + object._allocationAffinity = "allocationAffinity"; + } + if (message.resourcePolicies && message.resourcePolicies.length) { + object.resourcePolicies = []; + for (var j = 0; j < message.resourcePolicies.length; ++j) + object.resourcePolicies[j] = message.resourcePolicies[j]; + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + object.scheduling = $root.google.cloud.backupdr.v1.Scheduling.toObject(message.scheduling, options); + if (options.oneofs) + object._scheduling = "scheduling"; + } + if (message.serviceAccounts && message.serviceAccounts.length) { + object.serviceAccounts = []; + for (var j = 0; j < message.serviceAccounts.length; ++j) + object.serviceAccounts[j] = $root.google.cloud.backupdr.v1.ServiceAccount.toObject(message.serviceAccounts[j], options); + } + if (message.tags != null && message.hasOwnProperty("tags")) { + object.tags = $root.google.cloud.backupdr.v1.Tags.toObject(message.tags, options); + if (options.oneofs) + object._tags = "tags"; + } + return object; + }; + + /** + * Converts this ComputeInstanceRestoreProperties to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + * @returns {Object.} JSON object + */ + ComputeInstanceRestoreProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComputeInstanceRestoreProperties + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputeInstanceRestoreProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceRestoreProperties"; + }; + + /** + * InstancePrivateIpv6GoogleAccess enum. + * @name google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess + * @enum {number} + * @property {number} INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED=0 INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED value + * @property {number} INHERIT_FROM_SUBNETWORK=1 INHERIT_FROM_SUBNETWORK value + * @property {number} ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE=2 ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE value + * @property {number} ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE=3 ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE value + */ + ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED"] = 0; + values[valuesById[1] = "INHERIT_FROM_SUBNETWORK"] = 1; + values[valuesById[2] = "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE"] = 2; + values[valuesById[3] = "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE"] = 3; + return values; + })(); + + return ComputeInstanceRestoreProperties; + })(); + + v1.ComputeInstanceTargetEnvironment = (function() { + + /** + * Properties of a ComputeInstanceTargetEnvironment. + * @memberof google.cloud.backupdr.v1 + * @interface IComputeInstanceTargetEnvironment + * @property {string|null} [project] ComputeInstanceTargetEnvironment project + * @property {string|null} [zone] ComputeInstanceTargetEnvironment zone + */ + + /** + * Constructs a new ComputeInstanceTargetEnvironment. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ComputeInstanceTargetEnvironment. + * @implements IComputeInstanceTargetEnvironment + * @constructor + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment=} [properties] Properties to set + */ + function ComputeInstanceTargetEnvironment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComputeInstanceTargetEnvironment project. + * @member {string} project + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @instance + */ + ComputeInstanceTargetEnvironment.prototype.project = ""; + + /** + * ComputeInstanceTargetEnvironment zone. + * @member {string} zone + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @instance + */ + ComputeInstanceTargetEnvironment.prototype.zone = ""; + + /** + * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment instance + */ + ComputeInstanceTargetEnvironment.create = function create(properties) { + return new ComputeInstanceTargetEnvironment(properties); + }; + + /** + * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceTargetEnvironment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + return writer; + }; + + /** + * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceTargetEnvironment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceTargetEnvironment.decode = function 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.backupdr.v1.ComputeInstanceTargetEnvironment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.project = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceTargetEnvironment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputeInstanceTargetEnvironment message. + * @function verify + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeInstanceTargetEnvironment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + return null; + }; + + /** + * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment + */ + ComputeInstanceTargetEnvironment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment) + return object; + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment(); + if (object.project != null) + message.project = String(object.project); + if (object.zone != null) + message.zone = String(object.zone); + return message; + }; + + /** + * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeInstanceTargetEnvironment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.project = ""; + object.zone = ""; + } + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + return object; + }; + + /** + * Converts this ComputeInstanceTargetEnvironment to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @instance + * @returns {Object.} JSON object + */ + ComputeInstanceTargetEnvironment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComputeInstanceTargetEnvironment + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputeInstanceTargetEnvironment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment"; + }; + + return ComputeInstanceTargetEnvironment; + })(); + + v1.ComputeInstanceDataSourceProperties = (function() { + + /** + * Properties of a ComputeInstanceDataSourceProperties. + * @memberof google.cloud.backupdr.v1 + * @interface IComputeInstanceDataSourceProperties + * @property {string|null} [name] ComputeInstanceDataSourceProperties name + * @property {string|null} [description] ComputeInstanceDataSourceProperties description + * @property {string|null} [machineType] ComputeInstanceDataSourceProperties machineType + * @property {number|Long|null} [totalDiskCount] ComputeInstanceDataSourceProperties totalDiskCount + * @property {number|Long|null} [totalDiskSizeGb] ComputeInstanceDataSourceProperties totalDiskSizeGb + */ + + /** + * Constructs a new ComputeInstanceDataSourceProperties. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ComputeInstanceDataSourceProperties. + * @implements IComputeInstanceDataSourceProperties + * @constructor + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties=} [properties] Properties to set + */ + function ComputeInstanceDataSourceProperties(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComputeInstanceDataSourceProperties name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.name = ""; + + /** + * ComputeInstanceDataSourceProperties description. + * @member {string} description + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.description = ""; + + /** + * ComputeInstanceDataSourceProperties machineType. + * @member {string} machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.machineType = ""; + + /** + * ComputeInstanceDataSourceProperties totalDiskCount. + * @member {number|Long} totalDiskCount + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.totalDiskCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ComputeInstanceDataSourceProperties totalDiskSizeGb. + * @member {number|Long} totalDiskSizeGb + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.totalDiskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties instance + */ + ComputeInstanceDataSourceProperties.create = function create(properties) { + return new ComputeInstanceDataSourceProperties(properties); + }; + + /** + * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceDataSourceProperties.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.machineType); + if (message.totalDiskCount != null && Object.hasOwnProperty.call(message, "totalDiskCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.totalDiskCount); + if (message.totalDiskSizeGb != null && Object.hasOwnProperty.call(message, "totalDiskSizeGb")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.totalDiskSizeGb); + return writer; + }; + + /** + * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceDataSourceProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceDataSourceProperties.decode = function 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.backupdr.v1.ComputeInstanceDataSourceProperties(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.machineType = reader.string(); + break; + } + case 4: { + message.totalDiskCount = reader.int64(); + break; + } + case 5: { + message.totalDiskSizeGb = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceDataSourceProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputeInstanceDataSourceProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeInstanceDataSourceProperties.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + if (message.totalDiskCount != null && message.hasOwnProperty("totalDiskCount")) + if (!$util.isInteger(message.totalDiskCount) && !(message.totalDiskCount && $util.isInteger(message.totalDiskCount.low) && $util.isInteger(message.totalDiskCount.high))) + return "totalDiskCount: integer|Long expected"; + if (message.totalDiskSizeGb != null && message.hasOwnProperty("totalDiskSizeGb")) + if (!$util.isInteger(message.totalDiskSizeGb) && !(message.totalDiskSizeGb && $util.isInteger(message.totalDiskSizeGb.low) && $util.isInteger(message.totalDiskSizeGb.high))) + return "totalDiskSizeGb: integer|Long expected"; + return null; + }; + + /** + * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties + */ + ComputeInstanceDataSourceProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.totalDiskCount != null) + if ($util.Long) + (message.totalDiskCount = $util.Long.fromValue(object.totalDiskCount)).unsigned = false; + else if (typeof object.totalDiskCount === "string") + message.totalDiskCount = parseInt(object.totalDiskCount, 10); + else if (typeof object.totalDiskCount === "number") + message.totalDiskCount = object.totalDiskCount; + else if (typeof object.totalDiskCount === "object") + message.totalDiskCount = new $util.LongBits(object.totalDiskCount.low >>> 0, object.totalDiskCount.high >>> 0).toNumber(); + if (object.totalDiskSizeGb != null) + if ($util.Long) + (message.totalDiskSizeGb = $util.Long.fromValue(object.totalDiskSizeGb)).unsigned = false; + else if (typeof object.totalDiskSizeGb === "string") + message.totalDiskSizeGb = parseInt(object.totalDiskSizeGb, 10); + else if (typeof object.totalDiskSizeGb === "number") + message.totalDiskSizeGb = object.totalDiskSizeGb; + else if (typeof object.totalDiskSizeGb === "object") + message.totalDiskSizeGb = new $util.LongBits(object.totalDiskSizeGb.low >>> 0, object.totalDiskSizeGb.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeInstanceDataSourceProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.machineType = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalDiskCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalDiskCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalDiskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalDiskSizeGb = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + if (message.totalDiskCount != null && message.hasOwnProperty("totalDiskCount")) + if (typeof message.totalDiskCount === "number") + object.totalDiskCount = options.longs === String ? String(message.totalDiskCount) : message.totalDiskCount; + else + object.totalDiskCount = options.longs === String ? $util.Long.prototype.toString.call(message.totalDiskCount) : options.longs === Number ? new $util.LongBits(message.totalDiskCount.low >>> 0, message.totalDiskCount.high >>> 0).toNumber() : message.totalDiskCount; + if (message.totalDiskSizeGb != null && message.hasOwnProperty("totalDiskSizeGb")) + if (typeof message.totalDiskSizeGb === "number") + object.totalDiskSizeGb = options.longs === String ? String(message.totalDiskSizeGb) : message.totalDiskSizeGb; + else + object.totalDiskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.totalDiskSizeGb) : options.longs === Number ? new $util.LongBits(message.totalDiskSizeGb.low >>> 0, message.totalDiskSizeGb.high >>> 0).toNumber() : message.totalDiskSizeGb; + return object; + }; + + /** + * Converts this ComputeInstanceDataSourceProperties to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + * @returns {Object.} JSON object + */ + ComputeInstanceDataSourceProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComputeInstanceDataSourceProperties + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputeInstanceDataSourceProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties"; + }; + + return ComputeInstanceDataSourceProperties; + })(); + + v1.AdvancedMachineFeatures = (function() { + + /** + * Properties of an AdvancedMachineFeatures. + * @memberof google.cloud.backupdr.v1 + * @interface IAdvancedMachineFeatures + * @property {boolean|null} [enableNestedVirtualization] AdvancedMachineFeatures enableNestedVirtualization + * @property {number|null} [threadsPerCore] AdvancedMachineFeatures threadsPerCore + * @property {number|null} [visibleCoreCount] AdvancedMachineFeatures visibleCoreCount + * @property {boolean|null} [enableUefiNetworking] AdvancedMachineFeatures enableUefiNetworking + */ + + /** + * Constructs a new AdvancedMachineFeatures. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AdvancedMachineFeatures. + * @implements IAdvancedMachineFeatures + * @constructor + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures=} [properties] Properties to set + */ + function AdvancedMachineFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdvancedMachineFeatures enableNestedVirtualization. + * @member {boolean|null|undefined} enableNestedVirtualization + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.enableNestedVirtualization = null; + + /** + * AdvancedMachineFeatures threadsPerCore. + * @member {number|null|undefined} threadsPerCore + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.threadsPerCore = null; + + /** + * AdvancedMachineFeatures visibleCoreCount. + * @member {number|null|undefined} visibleCoreCount + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.visibleCoreCount = null; + + /** + * AdvancedMachineFeatures enableUefiNetworking. + * @member {boolean|null|undefined} enableUefiNetworking + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.enableUefiNetworking = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AdvancedMachineFeatures _enableNestedVirtualization. + * @member {"enableNestedVirtualization"|undefined} _enableNestedVirtualization + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableNestedVirtualization", { + get: $util.oneOfGetter($oneOfFields = ["enableNestedVirtualization"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AdvancedMachineFeatures _threadsPerCore. + * @member {"threadsPerCore"|undefined} _threadsPerCore + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_threadsPerCore", { + get: $util.oneOfGetter($oneOfFields = ["threadsPerCore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AdvancedMachineFeatures _visibleCoreCount. + * @member {"visibleCoreCount"|undefined} _visibleCoreCount + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_visibleCoreCount", { + get: $util.oneOfGetter($oneOfFields = ["visibleCoreCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AdvancedMachineFeatures _enableUefiNetworking. + * @member {"enableUefiNetworking"|undefined} _enableUefiNetworking + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableUefiNetworking", { + get: $util.oneOfGetter($oneOfFields = ["enableUefiNetworking"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AdvancedMachineFeatures instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures instance + */ + AdvancedMachineFeatures.create = function create(properties) { + return new AdvancedMachineFeatures(properties); + }; + + /** + * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvancedMachineFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableNestedVirtualization != null && Object.hasOwnProperty.call(message, "enableNestedVirtualization")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableNestedVirtualization); + if (message.threadsPerCore != null && Object.hasOwnProperty.call(message, "threadsPerCore")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.threadsPerCore); + if (message.visibleCoreCount != null && Object.hasOwnProperty.call(message, "visibleCoreCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.visibleCoreCount); + if (message.enableUefiNetworking != null && Object.hasOwnProperty.call(message, "enableUefiNetworking")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enableUefiNetworking); + return writer; + }; + + /** + * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvancedMachineFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdvancedMachineFeatures.decode = function 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.backupdr.v1.AdvancedMachineFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableNestedVirtualization = reader.bool(); + break; + } + case 2: { + message.threadsPerCore = reader.int32(); + break; + } + case 3: { + message.visibleCoreCount = reader.int32(); + break; + } + case 4: { + message.enableUefiNetworking = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdvancedMachineFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdvancedMachineFeatures message. + * @function verify + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdvancedMachineFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { + properties._enableNestedVirtualization = 1; + if (typeof message.enableNestedVirtualization !== "boolean") + return "enableNestedVirtualization: boolean expected"; + } + if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { + properties._threadsPerCore = 1; + if (!$util.isInteger(message.threadsPerCore)) + return "threadsPerCore: integer expected"; + } + if (message.visibleCoreCount != null && message.hasOwnProperty("visibleCoreCount")) { + properties._visibleCoreCount = 1; + if (!$util.isInteger(message.visibleCoreCount)) + return "visibleCoreCount: integer expected"; + } + if (message.enableUefiNetworking != null && message.hasOwnProperty("enableUefiNetworking")) { + properties._enableUefiNetworking = 1; + if (typeof message.enableUefiNetworking !== "boolean") + return "enableUefiNetworking: boolean expected"; + } + return null; + }; + + /** + * Creates an AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures + */ + AdvancedMachineFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AdvancedMachineFeatures) + return object; + var message = new $root.google.cloud.backupdr.v1.AdvancedMachineFeatures(); + if (object.enableNestedVirtualization != null) + message.enableNestedVirtualization = Boolean(object.enableNestedVirtualization); + if (object.threadsPerCore != null) + message.threadsPerCore = object.threadsPerCore | 0; + if (object.visibleCoreCount != null) + message.visibleCoreCount = object.visibleCoreCount | 0; + if (object.enableUefiNetworking != null) + message.enableUefiNetworking = Boolean(object.enableUefiNetworking); + return message; + }; + + /** + * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.AdvancedMachineFeatures} message AdvancedMachineFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdvancedMachineFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { + object.enableNestedVirtualization = message.enableNestedVirtualization; + if (options.oneofs) + object._enableNestedVirtualization = "enableNestedVirtualization"; + } + if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { + object.threadsPerCore = message.threadsPerCore; + if (options.oneofs) + object._threadsPerCore = "threadsPerCore"; + } + if (message.visibleCoreCount != null && message.hasOwnProperty("visibleCoreCount")) { + object.visibleCoreCount = message.visibleCoreCount; + if (options.oneofs) + object._visibleCoreCount = "visibleCoreCount"; + } + if (message.enableUefiNetworking != null && message.hasOwnProperty("enableUefiNetworking")) { + object.enableUefiNetworking = message.enableUefiNetworking; + if (options.oneofs) + object._enableUefiNetworking = "enableUefiNetworking"; + } + return object; + }; + + /** + * Converts this AdvancedMachineFeatures to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + * @returns {Object.} JSON object + */ + AdvancedMachineFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdvancedMachineFeatures + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdvancedMachineFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AdvancedMachineFeatures"; + }; + + return AdvancedMachineFeatures; + })(); + + v1.ConfidentialInstanceConfig = (function() { + + /** + * Properties of a ConfidentialInstanceConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IConfidentialInstanceConfig + * @property {boolean|null} [enableConfidentialCompute] ConfidentialInstanceConfig enableConfidentialCompute + */ + + /** + * Constructs a new ConfidentialInstanceConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ConfidentialInstanceConfig. + * @implements IConfidentialInstanceConfig + * @constructor + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig=} [properties] Properties to set + */ + function ConfidentialInstanceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConfidentialInstanceConfig enableConfidentialCompute. + * @member {boolean|null|undefined} enableConfidentialCompute + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @instance + */ + ConfidentialInstanceConfig.prototype.enableConfidentialCompute = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConfidentialInstanceConfig _enableConfidentialCompute. + * @member {"enableConfidentialCompute"|undefined} _enableConfidentialCompute + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @instance + */ + Object.defineProperty(ConfidentialInstanceConfig.prototype, "_enableConfidentialCompute", { + get: $util.oneOfGetter($oneOfFields = ["enableConfidentialCompute"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConfidentialInstanceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig instance + */ + ConfidentialInstanceConfig.create = function create(properties) { + return new ConfidentialInstanceConfig(properties); + }; + + /** + * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig} message ConfidentialInstanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidentialInstanceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableConfidentialCompute != null && Object.hasOwnProperty.call(message, "enableConfidentialCompute")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableConfidentialCompute); + return writer; + }; + + /** + * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig} message ConfidentialInstanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidentialInstanceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidentialInstanceConfig.decode = function 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.backupdr.v1.ConfidentialInstanceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableConfidentialCompute = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidentialInstanceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfidentialInstanceConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfidentialInstanceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enableConfidentialCompute != null && message.hasOwnProperty("enableConfidentialCompute")) { + properties._enableConfidentialCompute = 1; + if (typeof message.enableConfidentialCompute !== "boolean") + return "enableConfidentialCompute: boolean expected"; + } + return null; + }; + + /** + * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig + */ + ConfidentialInstanceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig(); + if (object.enableConfidentialCompute != null) + message.enableConfidentialCompute = Boolean(object.enableConfidentialCompute); + return message; + }; + + /** + * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {google.cloud.backupdr.v1.ConfidentialInstanceConfig} message ConfidentialInstanceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfidentialInstanceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enableConfidentialCompute != null && message.hasOwnProperty("enableConfidentialCompute")) { + object.enableConfidentialCompute = message.enableConfidentialCompute; + if (options.oneofs) + object._enableConfidentialCompute = "enableConfidentialCompute"; + } + return object; + }; + + /** + * Converts this ConfidentialInstanceConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @instance + * @returns {Object.} JSON object + */ + ConfidentialInstanceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConfidentialInstanceConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfidentialInstanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ConfidentialInstanceConfig"; + }; + + return ConfidentialInstanceConfig; + })(); + + v1.DisplayDevice = (function() { + + /** + * Properties of a DisplayDevice. + * @memberof google.cloud.backupdr.v1 + * @interface IDisplayDevice + * @property {boolean|null} [enableDisplay] DisplayDevice enableDisplay + */ + + /** + * Constructs a new DisplayDevice. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DisplayDevice. + * @implements IDisplayDevice + * @constructor + * @param {google.cloud.backupdr.v1.IDisplayDevice=} [properties] Properties to set + */ + function DisplayDevice(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DisplayDevice enableDisplay. + * @member {boolean|null|undefined} enableDisplay + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @instance + */ + DisplayDevice.prototype.enableDisplay = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DisplayDevice _enableDisplay. + * @member {"enableDisplay"|undefined} _enableDisplay + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @instance + */ + Object.defineProperty(DisplayDevice.prototype, "_enableDisplay", { + get: $util.oneOfGetter($oneOfFields = ["enableDisplay"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DisplayDevice instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.IDisplayDevice=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice instance + */ + DisplayDevice.create = function create(properties) { + return new DisplayDevice(properties); + }; + + /** + * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.IDisplayDevice} message DisplayDevice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisplayDevice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableDisplay != null && Object.hasOwnProperty.call(message, "enableDisplay")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableDisplay); + return writer; + }; + + /** + * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.IDisplayDevice} message DisplayDevice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisplayDevice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DisplayDevice message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisplayDevice.decode = function 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.backupdr.v1.DisplayDevice(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableDisplay = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisplayDevice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DisplayDevice message. + * @function verify + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DisplayDevice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enableDisplay != null && message.hasOwnProperty("enableDisplay")) { + properties._enableDisplay = 1; + if (typeof message.enableDisplay !== "boolean") + return "enableDisplay: boolean expected"; + } + return null; + }; + + /** + * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice + */ + DisplayDevice.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DisplayDevice) + return object; + var message = new $root.google.cloud.backupdr.v1.DisplayDevice(); + if (object.enableDisplay != null) + message.enableDisplay = Boolean(object.enableDisplay); + return message; + }; + + /** + * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.DisplayDevice} message DisplayDevice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DisplayDevice.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enableDisplay != null && message.hasOwnProperty("enableDisplay")) { + object.enableDisplay = message.enableDisplay; + if (options.oneofs) + object._enableDisplay = "enableDisplay"; + } + return object; + }; + + /** + * Converts this DisplayDevice to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @instance + * @returns {Object.} JSON object + */ + DisplayDevice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DisplayDevice + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DisplayDevice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DisplayDevice"; + }; + + return DisplayDevice; + })(); + + v1.AcceleratorConfig = (function() { + + /** + * Properties of an AcceleratorConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IAcceleratorConfig + * @property {string|null} [acceleratorType] AcceleratorConfig acceleratorType + * @property {number|null} [acceleratorCount] AcceleratorConfig acceleratorCount + */ + + /** + * Constructs a new AcceleratorConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AcceleratorConfig. + * @implements IAcceleratorConfig + * @constructor + * @param {google.cloud.backupdr.v1.IAcceleratorConfig=} [properties] Properties to set + */ + function AcceleratorConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcceleratorConfig acceleratorType. + * @member {string|null|undefined} acceleratorType + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.acceleratorType = null; + + /** + * AcceleratorConfig acceleratorCount. + * @member {number|null|undefined} acceleratorCount + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.acceleratorCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AcceleratorConfig _acceleratorType. + * @member {"acceleratorType"|undefined} _acceleratorType + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + */ + Object.defineProperty(AcceleratorConfig.prototype, "_acceleratorType", { + get: $util.oneOfGetter($oneOfFields = ["acceleratorType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AcceleratorConfig _acceleratorCount. + * @member {"acceleratorCount"|undefined} _acceleratorCount + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + */ + Object.defineProperty(AcceleratorConfig.prototype, "_acceleratorCount", { + get: $util.oneOfGetter($oneOfFields = ["acceleratorCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AcceleratorConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {google.cloud.backupdr.v1.IAcceleratorConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig instance + */ + AcceleratorConfig.create = function create(properties) { + return new AcceleratorConfig(properties); + }; + + /** + * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {google.cloud.backupdr.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcceleratorConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.acceleratorType != null && Object.hasOwnProperty.call(message, "acceleratorType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.acceleratorType); + if (message.acceleratorCount != null && Object.hasOwnProperty.call(message, "acceleratorCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.acceleratorCount); + return writer; + }; + + /** + * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {google.cloud.backupdr.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcceleratorConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcceleratorConfig.decode = function 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.backupdr.v1.AcceleratorConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.acceleratorType = reader.string(); + break; + } + case 2: { + message.acceleratorCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcceleratorConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcceleratorConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcceleratorConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) { + properties._acceleratorType = 1; + if (!$util.isString(message.acceleratorType)) + return "acceleratorType: string expected"; + } + if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) { + properties._acceleratorCount = 1; + if (!$util.isInteger(message.acceleratorCount)) + return "acceleratorCount: integer expected"; + } + return null; + }; + + /** + * Creates an AcceleratorConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig + */ + AcceleratorConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AcceleratorConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.AcceleratorConfig(); + if (object.acceleratorType != null) + message.acceleratorType = String(object.acceleratorType); + if (object.acceleratorCount != null) + message.acceleratorCount = object.acceleratorCount | 0; + return message; + }; + + /** + * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {google.cloud.backupdr.v1.AcceleratorConfig} message AcceleratorConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcceleratorConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) { + object.acceleratorType = message.acceleratorType; + if (options.oneofs) + object._acceleratorType = "acceleratorType"; + } + if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) { + object.acceleratorCount = message.acceleratorCount; + if (options.oneofs) + object._acceleratorCount = "acceleratorCount"; + } + return object; + }; + + /** + * Converts this AcceleratorConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + * @returns {Object.} JSON object + */ + AcceleratorConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcceleratorConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcceleratorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AcceleratorConfig"; + }; + + return AcceleratorConfig; + })(); + + v1.CustomerEncryptionKey = (function() { + + /** + * Properties of a CustomerEncryptionKey. + * @memberof google.cloud.backupdr.v1 + * @interface ICustomerEncryptionKey + * @property {string|null} [rawKey] CustomerEncryptionKey rawKey + * @property {string|null} [rsaEncryptedKey] CustomerEncryptionKey rsaEncryptedKey + * @property {string|null} [kmsKeyName] CustomerEncryptionKey kmsKeyName + * @property {string|null} [kmsKeyServiceAccount] CustomerEncryptionKey kmsKeyServiceAccount + */ + + /** + * Constructs a new CustomerEncryptionKey. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CustomerEncryptionKey. + * @implements ICustomerEncryptionKey + * @constructor + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey=} [properties] Properties to set + */ + function CustomerEncryptionKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomerEncryptionKey rawKey. + * @member {string|null|undefined} rawKey + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + CustomerEncryptionKey.prototype.rawKey = null; + + /** + * CustomerEncryptionKey rsaEncryptedKey. + * @member {string|null|undefined} rsaEncryptedKey + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + CustomerEncryptionKey.prototype.rsaEncryptedKey = null; + + /** + * CustomerEncryptionKey kmsKeyName. + * @member {string|null|undefined} kmsKeyName + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + CustomerEncryptionKey.prototype.kmsKeyName = null; + + /** + * CustomerEncryptionKey kmsKeyServiceAccount. + * @member {string|null|undefined} kmsKeyServiceAccount + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + CustomerEncryptionKey.prototype.kmsKeyServiceAccount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CustomerEncryptionKey key. + * @member {"rawKey"|"rsaEncryptedKey"|"kmsKeyName"|undefined} key + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + Object.defineProperty(CustomerEncryptionKey.prototype, "key", { + get: $util.oneOfGetter($oneOfFields = ["rawKey", "rsaEncryptedKey", "kmsKeyName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * CustomerEncryptionKey _kmsKeyServiceAccount. + * @member {"kmsKeyServiceAccount"|undefined} _kmsKeyServiceAccount + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + Object.defineProperty(CustomerEncryptionKey.prototype, "_kmsKeyServiceAccount", { + get: $util.oneOfGetter($oneOfFields = ["kmsKeyServiceAccount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CustomerEncryptionKey instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey instance + */ + CustomerEncryptionKey.create = function create(properties) { + return new CustomerEncryptionKey(properties); + }; + + /** + * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey} message CustomerEncryptionKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomerEncryptionKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rawKey != null && Object.hasOwnProperty.call(message, "rawKey")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rawKey); + if (message.rsaEncryptedKey != null && Object.hasOwnProperty.call(message, "rsaEncryptedKey")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rsaEncryptedKey); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyName); + if (message.kmsKeyServiceAccount != null && Object.hasOwnProperty.call(message, "kmsKeyServiceAccount")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kmsKeyServiceAccount); + return writer; + }; + + /** + * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey} message CustomerEncryptionKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomerEncryptionKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomerEncryptionKey message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomerEncryptionKey.decode = function 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.backupdr.v1.CustomerEncryptionKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rawKey = reader.string(); + break; + } + case 2: { + message.rsaEncryptedKey = reader.string(); + break; + } + case 3: { + message.kmsKeyName = reader.string(); + break; + } + case 4: { + message.kmsKeyServiceAccount = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomerEncryptionKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomerEncryptionKey message. + * @function verify + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomerEncryptionKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rawKey != null && message.hasOwnProperty("rawKey")) { + properties.key = 1; + if (!$util.isString(message.rawKey)) + return "rawKey: string expected"; + } + if (message.rsaEncryptedKey != null && message.hasOwnProperty("rsaEncryptedKey")) { + if (properties.key === 1) + return "key: multiple values"; + properties.key = 1; + if (!$util.isString(message.rsaEncryptedKey)) + return "rsaEncryptedKey: string expected"; + } + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { + if (properties.key === 1) + return "key: multiple values"; + properties.key = 1; + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + } + if (message.kmsKeyServiceAccount != null && message.hasOwnProperty("kmsKeyServiceAccount")) { + properties._kmsKeyServiceAccount = 1; + if (!$util.isString(message.kmsKeyServiceAccount)) + return "kmsKeyServiceAccount: string expected"; + } + return null; + }; + + /** + * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey + */ + CustomerEncryptionKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CustomerEncryptionKey) + return object; + var message = new $root.google.cloud.backupdr.v1.CustomerEncryptionKey(); + if (object.rawKey != null) + message.rawKey = String(object.rawKey); + if (object.rsaEncryptedKey != null) + message.rsaEncryptedKey = String(object.rsaEncryptedKey); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + if (object.kmsKeyServiceAccount != null) + message.kmsKeyServiceAccount = String(object.kmsKeyServiceAccount); + return message; + }; + + /** + * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.CustomerEncryptionKey} message CustomerEncryptionKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomerEncryptionKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.rawKey != null && message.hasOwnProperty("rawKey")) { + object.rawKey = message.rawKey; + if (options.oneofs) + object.key = "rawKey"; + } + if (message.rsaEncryptedKey != null && message.hasOwnProperty("rsaEncryptedKey")) { + object.rsaEncryptedKey = message.rsaEncryptedKey; + if (options.oneofs) + object.key = "rsaEncryptedKey"; + } + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { + object.kmsKeyName = message.kmsKeyName; + if (options.oneofs) + object.key = "kmsKeyName"; + } + if (message.kmsKeyServiceAccount != null && message.hasOwnProperty("kmsKeyServiceAccount")) { + object.kmsKeyServiceAccount = message.kmsKeyServiceAccount; + if (options.oneofs) + object._kmsKeyServiceAccount = "kmsKeyServiceAccount"; + } + return object; + }; + + /** + * Converts this CustomerEncryptionKey to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + * @returns {Object.} JSON object + */ + CustomerEncryptionKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomerEncryptionKey + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomerEncryptionKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CustomerEncryptionKey"; + }; + + return CustomerEncryptionKey; + })(); + + v1.Entry = (function() { + + /** + * Properties of an Entry. + * @memberof google.cloud.backupdr.v1 + * @interface IEntry + * @property {string|null} [key] Entry key + * @property {string|null} [value] Entry value + */ + + /** + * Constructs a new Entry. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an Entry. + * @implements IEntry + * @constructor + * @param {google.cloud.backupdr.v1.IEntry=} [properties] Properties to set + */ + function Entry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entry key. + * @member {string|null|undefined} key + * @memberof google.cloud.backupdr.v1.Entry + * @instance + */ + Entry.prototype.key = null; + + /** + * Entry value. + * @member {string|null|undefined} value + * @memberof google.cloud.backupdr.v1.Entry + * @instance + */ + Entry.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Entry _key. + * @member {"key"|undefined} _key + * @memberof google.cloud.backupdr.v1.Entry + * @instance + */ + Object.defineProperty(Entry.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Entry _value. + * @member {"value"|undefined} _value + * @memberof google.cloud.backupdr.v1.Entry + * @instance + */ + Object.defineProperty(Entry.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Entry instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.IEntry=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Entry} Entry instance + */ + Entry.create = function create(properties) { + return new Entry(properties); + }; + + /** + * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decode = function 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.backupdr.v1.Entry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entry message. + * @function verify + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; + } + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Entry} Entry + */ + Entry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Entry) + return object; + var message = new $root.google.cloud.backupdr.v1.Entry(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.Entry} message Entry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) + object._key = "key"; + } + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object._value = "value"; + } + return object; + }; + + /** + * Converts this Entry to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Entry + * @instance + * @returns {Object.} JSON object + */ + Entry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Entry + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Entry"; + }; + + return Entry; + })(); + + v1.Metadata = (function() { + + /** + * Properties of a Metadata. + * @memberof google.cloud.backupdr.v1 + * @interface IMetadata + * @property {Array.|null} [items] Metadata items + */ + + /** + * Constructs a new Metadata. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {google.cloud.backupdr.v1.IMetadata=} [properties] Properties to set + */ + function Metadata(properties) { + this.items = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metadata items. + * @member {Array.} items + * @memberof google.cloud.backupdr.v1.Metadata + * @instance + */ + Metadata.prototype.items = $util.emptyArray; + + /** + * Creates a new Metadata instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {google.cloud.backupdr.v1.IMetadata=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Metadata} Metadata instance + */ + Metadata.create = function create(properties) { + return new Metadata(properties); + }; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {google.cloud.backupdr.v1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + $root.google.cloud.backupdr.v1.Entry.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {google.cloud.backupdr.v1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decode = function 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.backupdr.v1.Metadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.google.cloud.backupdr.v1.Entry.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metadata message. + * @function verify + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) { + var error = $root.google.cloud.backupdr.v1.Entry.verify(message.items[i]); + if (error) + return "items." + error; + } + } + return null; + }; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Metadata} Metadata + */ + Metadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Metadata) + return object; + var message = new $root.google.cloud.backupdr.v1.Metadata(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".google.cloud.backupdr.v1.Metadata.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Metadata.items: object expected"); + message.items[i] = $root.google.cloud.backupdr.v1.Entry.fromObject(object.items[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {google.cloud.backupdr.v1.Metadata} message Metadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = $root.google.cloud.backupdr.v1.Entry.toObject(message.items[j], options); + } + return object; + }; + + /** + * Converts this Metadata to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Metadata + * @instance + * @returns {Object.} JSON object + */ + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metadata + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Metadata"; + }; + + return Metadata; + })(); + + v1.NetworkInterface = (function() { + + /** + * Properties of a NetworkInterface. + * @memberof google.cloud.backupdr.v1 + * @interface INetworkInterface + * @property {string|null} [network] NetworkInterface network + * @property {string|null} [subnetwork] NetworkInterface subnetwork + * @property {string|null} [ipAddress] NetworkInterface ipAddress + * @property {string|null} [ipv6Address] NetworkInterface ipv6Address + * @property {number|null} [internalIpv6PrefixLength] NetworkInterface internalIpv6PrefixLength + * @property {string|null} [name] NetworkInterface name + * @property {Array.|null} [accessConfigs] NetworkInterface accessConfigs + * @property {Array.|null} [ipv6AccessConfigs] NetworkInterface ipv6AccessConfigs + * @property {Array.|null} [aliasIpRanges] NetworkInterface aliasIpRanges + * @property {google.cloud.backupdr.v1.NetworkInterface.StackType|null} [stackType] NetworkInterface stackType + * @property {google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null} [ipv6AccessType] NetworkInterface ipv6AccessType + * @property {number|null} [queueCount] NetworkInterface queueCount + * @property {google.cloud.backupdr.v1.NetworkInterface.NicType|null} [nicType] NetworkInterface nicType + * @property {string|null} [networkAttachment] NetworkInterface networkAttachment + */ + + /** + * Constructs a new NetworkInterface. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a NetworkInterface. + * @implements INetworkInterface + * @constructor + * @param {google.cloud.backupdr.v1.INetworkInterface=} [properties] Properties to set + */ + function NetworkInterface(properties) { + this.accessConfigs = []; + this.ipv6AccessConfigs = []; + this.aliasIpRanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkInterface network. + * @member {string|null|undefined} network + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.network = null; + + /** + * NetworkInterface subnetwork. + * @member {string|null|undefined} subnetwork + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.subnetwork = null; + + /** + * NetworkInterface ipAddress. + * @member {string|null|undefined} ipAddress + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.ipAddress = null; + + /** + * NetworkInterface ipv6Address. + * @member {string|null|undefined} ipv6Address + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.ipv6Address = null; + + /** + * NetworkInterface internalIpv6PrefixLength. + * @member {number|null|undefined} internalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.internalIpv6PrefixLength = null; + + /** + * NetworkInterface name. + * @member {string|null|undefined} name + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.name = null; + + /** + * NetworkInterface accessConfigs. + * @member {Array.} accessConfigs + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.accessConfigs = $util.emptyArray; + + /** + * NetworkInterface ipv6AccessConfigs. + * @member {Array.} ipv6AccessConfigs + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.ipv6AccessConfigs = $util.emptyArray; + + /** + * NetworkInterface aliasIpRanges. + * @member {Array.} aliasIpRanges + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.aliasIpRanges = $util.emptyArray; + + /** + * NetworkInterface stackType. + * @member {google.cloud.backupdr.v1.NetworkInterface.StackType|null|undefined} stackType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.stackType = null; + + /** + * NetworkInterface ipv6AccessType. + * @member {google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null|undefined} ipv6AccessType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.ipv6AccessType = null; + + /** + * NetworkInterface queueCount. + * @member {number|null|undefined} queueCount + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.queueCount = null; + + /** + * NetworkInterface nicType. + * @member {google.cloud.backupdr.v1.NetworkInterface.NicType|null|undefined} nicType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.nicType = null; + + /** + * NetworkInterface networkAttachment. + * @member {string|null|undefined} networkAttachment + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.networkAttachment = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NetworkInterface _network. + * @member {"network"|undefined} _network + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_network", { + get: $util.oneOfGetter($oneOfFields = ["network"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _subnetwork. + * @member {"subnetwork"|undefined} _subnetwork + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_subnetwork", { + get: $util.oneOfGetter($oneOfFields = ["subnetwork"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _ipAddress. + * @member {"ipAddress"|undefined} _ipAddress + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_ipAddress", { + get: $util.oneOfGetter($oneOfFields = ["ipAddress"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _ipv6Address. + * @member {"ipv6Address"|undefined} _ipv6Address + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_ipv6Address", { + get: $util.oneOfGetter($oneOfFields = ["ipv6Address"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _internalIpv6PrefixLength. + * @member {"internalIpv6PrefixLength"|undefined} _internalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_internalIpv6PrefixLength", { + get: $util.oneOfGetter($oneOfFields = ["internalIpv6PrefixLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _name. + * @member {"name"|undefined} _name + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _stackType. + * @member {"stackType"|undefined} _stackType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_stackType", { + get: $util.oneOfGetter($oneOfFields = ["stackType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _ipv6AccessType. + * @member {"ipv6AccessType"|undefined} _ipv6AccessType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_ipv6AccessType", { + get: $util.oneOfGetter($oneOfFields = ["ipv6AccessType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _queueCount. + * @member {"queueCount"|undefined} _queueCount + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_queueCount", { + get: $util.oneOfGetter($oneOfFields = ["queueCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _nicType. + * @member {"nicType"|undefined} _nicType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_nicType", { + get: $util.oneOfGetter($oneOfFields = ["nicType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _networkAttachment. + * @member {"networkAttachment"|undefined} _networkAttachment + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_networkAttachment", { + get: $util.oneOfGetter($oneOfFields = ["networkAttachment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NetworkInterface instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {google.cloud.backupdr.v1.INetworkInterface=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface instance + */ + NetworkInterface.create = function create(properties) { + return new NetworkInterface(properties); + }; + + /** + * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {google.cloud.backupdr.v1.INetworkInterface} message NetworkInterface message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkInterface.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetwork); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); + if (message.ipv6Address != null && Object.hasOwnProperty.call(message, "ipv6Address")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipv6Address); + if (message.internalIpv6PrefixLength != null && Object.hasOwnProperty.call(message, "internalIpv6PrefixLength")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.internalIpv6PrefixLength); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.accessConfigs != null && message.accessConfigs.length) + for (var i = 0; i < message.accessConfigs.length; ++i) + $root.google.cloud.backupdr.v1.AccessConfig.encode(message.accessConfigs[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.ipv6AccessConfigs != null && message.ipv6AccessConfigs.length) + for (var i = 0; i < message.ipv6AccessConfigs.length; ++i) + $root.google.cloud.backupdr.v1.AccessConfig.encode(message.ipv6AccessConfigs[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.aliasIpRanges != null && message.aliasIpRanges.length) + for (var i = 0; i < message.aliasIpRanges.length; ++i) + $root.google.cloud.backupdr.v1.AliasIpRange.encode(message.aliasIpRanges[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.stackType != null && Object.hasOwnProperty.call(message, "stackType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.stackType); + if (message.ipv6AccessType != null && Object.hasOwnProperty.call(message, "ipv6AccessType")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.ipv6AccessType); + if (message.queueCount != null && Object.hasOwnProperty.call(message, "queueCount")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.queueCount); + if (message.nicType != null && Object.hasOwnProperty.call(message, "nicType")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.nicType); + if (message.networkAttachment != null && Object.hasOwnProperty.call(message, "networkAttachment")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.networkAttachment); + return writer; + }; + + /** + * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {google.cloud.backupdr.v1.INetworkInterface} message NetworkInterface message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkInterface.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkInterface message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkInterface.decode = function 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.backupdr.v1.NetworkInterface(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.network = reader.string(); + break; + } + case 2: { + message.subnetwork = reader.string(); + break; + } + case 3: { + message.ipAddress = reader.string(); + break; + } + case 4: { + message.ipv6Address = reader.string(); + break; + } + case 5: { + message.internalIpv6PrefixLength = reader.int32(); + break; + } + case 6: { + message.name = reader.string(); + break; + } + case 7: { + if (!(message.accessConfigs && message.accessConfigs.length)) + message.accessConfigs = []; + message.accessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.ipv6AccessConfigs && message.ipv6AccessConfigs.length)) + message.ipv6AccessConfigs = []; + message.ipv6AccessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader, reader.uint32())); + break; + } + case 9: { + if (!(message.aliasIpRanges && message.aliasIpRanges.length)) + message.aliasIpRanges = []; + message.aliasIpRanges.push($root.google.cloud.backupdr.v1.AliasIpRange.decode(reader, reader.uint32())); + break; + } + case 10: { + message.stackType = reader.int32(); + break; + } + case 11: { + message.ipv6AccessType = reader.int32(); + break; + } + case 12: { + message.queueCount = reader.int32(); + break; + } + case 13: { + message.nicType = reader.int32(); + break; + } + case 14: { + message.networkAttachment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkInterface.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkInterface message. + * @function verify + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkInterface.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.network != null && message.hasOwnProperty("network")) { + properties._network = 1; + if (!$util.isString(message.network)) + return "network: string expected"; + } + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { + properties._subnetwork = 1; + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + } + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) { + properties._ipAddress = 1; + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + } + if (message.ipv6Address != null && message.hasOwnProperty("ipv6Address")) { + properties._ipv6Address = 1; + if (!$util.isString(message.ipv6Address)) + return "ipv6Address: string expected"; + } + if (message.internalIpv6PrefixLength != null && message.hasOwnProperty("internalIpv6PrefixLength")) { + properties._internalIpv6PrefixLength = 1; + if (!$util.isInteger(message.internalIpv6PrefixLength)) + return "internalIpv6PrefixLength: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.accessConfigs != null && message.hasOwnProperty("accessConfigs")) { + if (!Array.isArray(message.accessConfigs)) + return "accessConfigs: array expected"; + for (var i = 0; i < message.accessConfigs.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AccessConfig.verify(message.accessConfigs[i]); + if (error) + return "accessConfigs." + error; + } + } + if (message.ipv6AccessConfigs != null && message.hasOwnProperty("ipv6AccessConfigs")) { + if (!Array.isArray(message.ipv6AccessConfigs)) + return "ipv6AccessConfigs: array expected"; + for (var i = 0; i < message.ipv6AccessConfigs.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AccessConfig.verify(message.ipv6AccessConfigs[i]); + if (error) + return "ipv6AccessConfigs." + error; + } + } + if (message.aliasIpRanges != null && message.hasOwnProperty("aliasIpRanges")) { + if (!Array.isArray(message.aliasIpRanges)) + return "aliasIpRanges: array expected"; + for (var i = 0; i < message.aliasIpRanges.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AliasIpRange.verify(message.aliasIpRanges[i]); + if (error) + return "aliasIpRanges." + error; + } + } + if (message.stackType != null && message.hasOwnProperty("stackType")) { + properties._stackType = 1; + switch (message.stackType) { + default: + return "stackType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { + properties._ipv6AccessType = 1; + switch (message.ipv6AccessType) { + default: + return "ipv6AccessType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.queueCount != null && message.hasOwnProperty("queueCount")) { + properties._queueCount = 1; + if (!$util.isInteger(message.queueCount)) + return "queueCount: integer expected"; + } + if (message.nicType != null && message.hasOwnProperty("nicType")) { + properties._nicType = 1; + switch (message.nicType) { + default: + return "nicType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) { + properties._networkAttachment = 1; + if (!$util.isString(message.networkAttachment)) + return "networkAttachment: string expected"; + } + return null; + }; + + /** + * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface + */ + NetworkInterface.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.NetworkInterface) + return object; + var message = new $root.google.cloud.backupdr.v1.NetworkInterface(); + if (object.network != null) + message.network = String(object.network); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.ipv6Address != null) + message.ipv6Address = String(object.ipv6Address); + if (object.internalIpv6PrefixLength != null) + message.internalIpv6PrefixLength = object.internalIpv6PrefixLength | 0; + if (object.name != null) + message.name = String(object.name); + if (object.accessConfigs) { + if (!Array.isArray(object.accessConfigs)) + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: array expected"); + message.accessConfigs = []; + for (var i = 0; i < object.accessConfigs.length; ++i) { + if (typeof object.accessConfigs[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: object expected"); + message.accessConfigs[i] = $root.google.cloud.backupdr.v1.AccessConfig.fromObject(object.accessConfigs[i]); + } + } + if (object.ipv6AccessConfigs) { + if (!Array.isArray(object.ipv6AccessConfigs)) + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.ipv6AccessConfigs: array expected"); + message.ipv6AccessConfigs = []; + for (var i = 0; i < object.ipv6AccessConfigs.length; ++i) { + if (typeof object.ipv6AccessConfigs[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.ipv6AccessConfigs: object expected"); + message.ipv6AccessConfigs[i] = $root.google.cloud.backupdr.v1.AccessConfig.fromObject(object.ipv6AccessConfigs[i]); + } + } + if (object.aliasIpRanges) { + if (!Array.isArray(object.aliasIpRanges)) + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.aliasIpRanges: array expected"); + message.aliasIpRanges = []; + for (var i = 0; i < object.aliasIpRanges.length; ++i) { + if (typeof object.aliasIpRanges[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.aliasIpRanges: object expected"); + message.aliasIpRanges[i] = $root.google.cloud.backupdr.v1.AliasIpRange.fromObject(object.aliasIpRanges[i]); + } + } + switch (object.stackType) { + default: + if (typeof object.stackType === "number") { + message.stackType = object.stackType; + break; + } + break; + case "STACK_TYPE_UNSPECIFIED": + case 0: + message.stackType = 0; + break; + case "IPV4_ONLY": + case 1: + message.stackType = 1; + break; + case "IPV4_IPV6": + case 2: + message.stackType = 2; + break; + } + switch (object.ipv6AccessType) { + default: + if (typeof object.ipv6AccessType === "number") { + message.ipv6AccessType = object.ipv6AccessType; + break; + } + break; + case "UNSPECIFIED_IPV6_ACCESS_TYPE": + case 0: + message.ipv6AccessType = 0; + break; + case "INTERNAL": + case 1: + message.ipv6AccessType = 1; + break; + case "EXTERNAL": + case 2: + message.ipv6AccessType = 2; + break; + } + if (object.queueCount != null) + message.queueCount = object.queueCount | 0; + switch (object.nicType) { + default: + if (typeof object.nicType === "number") { + message.nicType = object.nicType; + break; + } + break; + case "NIC_TYPE_UNSPECIFIED": + case 0: + message.nicType = 0; + break; + case "VIRTIO_NET": + case 1: + message.nicType = 1; + break; + case "GVNIC": + case 2: + message.nicType = 2; + break; + } + if (object.networkAttachment != null) + message.networkAttachment = String(object.networkAttachment); + return message; + }; + + /** + * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {google.cloud.backupdr.v1.NetworkInterface} message NetworkInterface + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkInterface.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.accessConfigs = []; + object.ipv6AccessConfigs = []; + object.aliasIpRanges = []; + } + if (message.network != null && message.hasOwnProperty("network")) { + object.network = message.network; + if (options.oneofs) + object._network = "network"; + } + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { + object.subnetwork = message.subnetwork; + if (options.oneofs) + object._subnetwork = "subnetwork"; + } + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) { + object.ipAddress = message.ipAddress; + if (options.oneofs) + object._ipAddress = "ipAddress"; + } + if (message.ipv6Address != null && message.hasOwnProperty("ipv6Address")) { + object.ipv6Address = message.ipv6Address; + if (options.oneofs) + object._ipv6Address = "ipv6Address"; + } + if (message.internalIpv6PrefixLength != null && message.hasOwnProperty("internalIpv6PrefixLength")) { + object.internalIpv6PrefixLength = message.internalIpv6PrefixLength; + if (options.oneofs) + object._internalIpv6PrefixLength = "internalIpv6PrefixLength"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.accessConfigs && message.accessConfigs.length) { + object.accessConfigs = []; + for (var j = 0; j < message.accessConfigs.length; ++j) + object.accessConfigs[j] = $root.google.cloud.backupdr.v1.AccessConfig.toObject(message.accessConfigs[j], options); + } + if (message.ipv6AccessConfigs && message.ipv6AccessConfigs.length) { + object.ipv6AccessConfigs = []; + for (var j = 0; j < message.ipv6AccessConfigs.length; ++j) + object.ipv6AccessConfigs[j] = $root.google.cloud.backupdr.v1.AccessConfig.toObject(message.ipv6AccessConfigs[j], options); + } + if (message.aliasIpRanges && message.aliasIpRanges.length) { + object.aliasIpRanges = []; + for (var j = 0; j < message.aliasIpRanges.length; ++j) + object.aliasIpRanges[j] = $root.google.cloud.backupdr.v1.AliasIpRange.toObject(message.aliasIpRanges[j], options); + } + if (message.stackType != null && message.hasOwnProperty("stackType")) { + object.stackType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.StackType[message.stackType] === undefined ? message.stackType : $root.google.cloud.backupdr.v1.NetworkInterface.StackType[message.stackType] : message.stackType; + if (options.oneofs) + object._stackType = "stackType"; + } + if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { + object.ipv6AccessType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType[message.ipv6AccessType] === undefined ? message.ipv6AccessType : $root.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType[message.ipv6AccessType] : message.ipv6AccessType; + if (options.oneofs) + object._ipv6AccessType = "ipv6AccessType"; + } + if (message.queueCount != null && message.hasOwnProperty("queueCount")) { + object.queueCount = message.queueCount; + if (options.oneofs) + object._queueCount = "queueCount"; + } + if (message.nicType != null && message.hasOwnProperty("nicType")) { + object.nicType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.NicType[message.nicType] === undefined ? message.nicType : $root.google.cloud.backupdr.v1.NetworkInterface.NicType[message.nicType] : message.nicType; + if (options.oneofs) + object._nicType = "nicType"; + } + if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) { + object.networkAttachment = message.networkAttachment; + if (options.oneofs) + object._networkAttachment = "networkAttachment"; + } + return object; + }; + + /** + * Converts this NetworkInterface to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + * @returns {Object.} JSON object + */ + NetworkInterface.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkInterface + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkInterface.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkInterface"; + }; + + /** + * StackType enum. + * @name google.cloud.backupdr.v1.NetworkInterface.StackType + * @enum {number} + * @property {number} STACK_TYPE_UNSPECIFIED=0 STACK_TYPE_UNSPECIFIED value + * @property {number} IPV4_ONLY=1 IPV4_ONLY value + * @property {number} IPV4_IPV6=2 IPV4_IPV6 value + */ + NetworkInterface.StackType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STACK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IPV4_ONLY"] = 1; + values[valuesById[2] = "IPV4_IPV6"] = 2; + return values; + })(); + + /** + * Ipv6AccessType enum. + * @name google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType + * @enum {number} + * @property {number} UNSPECIFIED_IPV6_ACCESS_TYPE=0 UNSPECIFIED_IPV6_ACCESS_TYPE value + * @property {number} INTERNAL=1 INTERNAL value + * @property {number} EXTERNAL=2 EXTERNAL value + */ + NetworkInterface.Ipv6AccessType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED_IPV6_ACCESS_TYPE"] = 0; + values[valuesById[1] = "INTERNAL"] = 1; + values[valuesById[2] = "EXTERNAL"] = 2; + return values; + })(); + + /** + * NicType enum. + * @name google.cloud.backupdr.v1.NetworkInterface.NicType + * @enum {number} + * @property {number} NIC_TYPE_UNSPECIFIED=0 NIC_TYPE_UNSPECIFIED value + * @property {number} VIRTIO_NET=1 VIRTIO_NET value + * @property {number} GVNIC=2 GVNIC value + */ + NetworkInterface.NicType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VIRTIO_NET"] = 1; + values[valuesById[2] = "GVNIC"] = 2; + return values; + })(); + + return NetworkInterface; + })(); + + v1.NetworkPerformanceConfig = (function() { + + /** + * Properties of a NetworkPerformanceConfig. + * @memberof google.cloud.backupdr.v1 + * @interface INetworkPerformanceConfig + * @property {google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null} [totalEgressBandwidthTier] NetworkPerformanceConfig totalEgressBandwidthTier + */ + + /** + * Constructs a new NetworkPerformanceConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a NetworkPerformanceConfig. + * @implements INetworkPerformanceConfig + * @constructor + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig=} [properties] Properties to set + */ + function NetworkPerformanceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkPerformanceConfig totalEgressBandwidthTier. + * @member {google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null|undefined} totalEgressBandwidthTier + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @instance + */ + NetworkPerformanceConfig.prototype.totalEgressBandwidthTier = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NetworkPerformanceConfig _totalEgressBandwidthTier. + * @member {"totalEgressBandwidthTier"|undefined} _totalEgressBandwidthTier + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @instance + */ + Object.defineProperty(NetworkPerformanceConfig.prototype, "_totalEgressBandwidthTier", { + get: $util.oneOfGetter($oneOfFields = ["totalEgressBandwidthTier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NetworkPerformanceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig instance + */ + NetworkPerformanceConfig.create = function create(properties) { + return new NetworkPerformanceConfig(properties); + }; + + /** + * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPerformanceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.totalEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "totalEgressBandwidthTier")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalEgressBandwidthTier); + return writer; + }; + + /** + * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPerformanceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPerformanceConfig.decode = function 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.backupdr.v1.NetworkPerformanceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.totalEgressBandwidthTier = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPerformanceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkPerformanceConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkPerformanceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { + properties._totalEgressBandwidthTier = 1; + switch (message.totalEgressBandwidthTier) { + default: + return "totalEgressBandwidthTier: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig + */ + NetworkPerformanceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.NetworkPerformanceConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.NetworkPerformanceConfig(); + switch (object.totalEgressBandwidthTier) { + default: + if (typeof object.totalEgressBandwidthTier === "number") { + message.totalEgressBandwidthTier = object.totalEgressBandwidthTier; + break; + } + break; + case "TIER_UNSPECIFIED": + case 0: + message.totalEgressBandwidthTier = 0; + break; + case "DEFAULT": + case 1: + message.totalEgressBandwidthTier = 1; + break; + case "TIER_1": + case 2: + message.totalEgressBandwidthTier = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {google.cloud.backupdr.v1.NetworkPerformanceConfig} message NetworkPerformanceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkPerformanceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { + object.totalEgressBandwidthTier = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] === undefined ? message.totalEgressBandwidthTier : $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] : message.totalEgressBandwidthTier; + if (options.oneofs) + object._totalEgressBandwidthTier = "totalEgressBandwidthTier"; + } + return object; + }; + + /** + * Converts this NetworkPerformanceConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkPerformanceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkPerformanceConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkPerformanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkPerformanceConfig"; + }; + + /** + * Tier enum. + * @name google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier + * @enum {number} + * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value + * @property {number} DEFAULT=1 DEFAULT value + * @property {number} TIER_1=2 TIER_1 value + */ + NetworkPerformanceConfig.Tier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEFAULT"] = 1; + values[valuesById[2] = "TIER_1"] = 2; + return values; + })(); + + return NetworkPerformanceConfig; + })(); + + v1.AccessConfig = (function() { + + /** + * Properties of an AccessConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IAccessConfig + * @property {google.cloud.backupdr.v1.AccessConfig.AccessType|null} [type] AccessConfig type + * @property {string|null} [name] AccessConfig name + * @property {string|null} [externalIp] AccessConfig externalIp + * @property {string|null} [externalIpv6] AccessConfig externalIpv6 + * @property {number|null} [externalIpv6PrefixLength] AccessConfig externalIpv6PrefixLength + * @property {boolean|null} [setPublicPtr] AccessConfig setPublicPtr + * @property {string|null} [publicPtrDomainName] AccessConfig publicPtrDomainName + * @property {google.cloud.backupdr.v1.AccessConfig.NetworkTier|null} [networkTier] AccessConfig networkTier + */ + + /** + * Constructs a new AccessConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AccessConfig. + * @implements IAccessConfig + * @constructor + * @param {google.cloud.backupdr.v1.IAccessConfig=} [properties] Properties to set + */ + function AccessConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessConfig type. + * @member {google.cloud.backupdr.v1.AccessConfig.AccessType|null|undefined} type + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.type = null; + + /** + * AccessConfig name. + * @member {string|null|undefined} name + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.name = null; + + /** + * AccessConfig externalIp. + * @member {string|null|undefined} externalIp + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.externalIp = null; + + /** + * AccessConfig externalIpv6. + * @member {string|null|undefined} externalIpv6 + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.externalIpv6 = null; + + /** + * AccessConfig externalIpv6PrefixLength. + * @member {number|null|undefined} externalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.externalIpv6PrefixLength = null; + + /** + * AccessConfig setPublicPtr. + * @member {boolean|null|undefined} setPublicPtr + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.setPublicPtr = null; + + /** + * AccessConfig publicPtrDomainName. + * @member {string|null|undefined} publicPtrDomainName + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.publicPtrDomainName = null; + + /** + * AccessConfig networkTier. + * @member {google.cloud.backupdr.v1.AccessConfig.NetworkTier|null|undefined} networkTier + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.networkTier = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AccessConfig _type. + * @member {"type"|undefined} _type + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _name. + * @member {"name"|undefined} _name + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _externalIp. + * @member {"externalIp"|undefined} _externalIp + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_externalIp", { + get: $util.oneOfGetter($oneOfFields = ["externalIp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _externalIpv6. + * @member {"externalIpv6"|undefined} _externalIpv6 + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_externalIpv6", { + get: $util.oneOfGetter($oneOfFields = ["externalIpv6"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _externalIpv6PrefixLength. + * @member {"externalIpv6PrefixLength"|undefined} _externalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_externalIpv6PrefixLength", { + get: $util.oneOfGetter($oneOfFields = ["externalIpv6PrefixLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _setPublicPtr. + * @member {"setPublicPtr"|undefined} _setPublicPtr + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_setPublicPtr", { + get: $util.oneOfGetter($oneOfFields = ["setPublicPtr"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _publicPtrDomainName. + * @member {"publicPtrDomainName"|undefined} _publicPtrDomainName + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_publicPtrDomainName", { + get: $util.oneOfGetter($oneOfFields = ["publicPtrDomainName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _networkTier. + * @member {"networkTier"|undefined} _networkTier + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_networkTier", { + get: $util.oneOfGetter($oneOfFields = ["networkTier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AccessConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {google.cloud.backupdr.v1.IAccessConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig instance + */ + AccessConfig.create = function create(properties) { + return new AccessConfig(properties); + }; + + /** + * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {google.cloud.backupdr.v1.IAccessConfig} message AccessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.externalIp); + if (message.externalIpv6 != null && Object.hasOwnProperty.call(message, "externalIpv6")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.externalIpv6); + if (message.externalIpv6PrefixLength != null && Object.hasOwnProperty.call(message, "externalIpv6PrefixLength")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.externalIpv6PrefixLength); + if (message.setPublicPtr != null && Object.hasOwnProperty.call(message, "setPublicPtr")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.setPublicPtr); + if (message.publicPtrDomainName != null && Object.hasOwnProperty.call(message, "publicPtrDomainName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.publicPtrDomainName); + if (message.networkTier != null && Object.hasOwnProperty.call(message, "networkTier")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.networkTier); + return writer; + }; + + /** + * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {google.cloud.backupdr.v1.IAccessConfig} message AccessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessConfig.decode = function 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.backupdr.v1.AccessConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + message.externalIp = reader.string(); + break; + } + case 4: { + message.externalIpv6 = reader.string(); + break; + } + case 5: { + message.externalIpv6PrefixLength = reader.int32(); + break; + } + case 6: { + message.setPublicPtr = reader.bool(); + break; + } + case 7: { + message.publicPtrDomainName = reader.string(); + break; + } + case 8: { + message.networkTier = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.externalIp != null && message.hasOwnProperty("externalIp")) { + properties._externalIp = 1; + if (!$util.isString(message.externalIp)) + return "externalIp: string expected"; + } + if (message.externalIpv6 != null && message.hasOwnProperty("externalIpv6")) { + properties._externalIpv6 = 1; + if (!$util.isString(message.externalIpv6)) + return "externalIpv6: string expected"; + } + if (message.externalIpv6PrefixLength != null && message.hasOwnProperty("externalIpv6PrefixLength")) { + properties._externalIpv6PrefixLength = 1; + if (!$util.isInteger(message.externalIpv6PrefixLength)) + return "externalIpv6PrefixLength: integer expected"; + } + if (message.setPublicPtr != null && message.hasOwnProperty("setPublicPtr")) { + properties._setPublicPtr = 1; + if (typeof message.setPublicPtr !== "boolean") + return "setPublicPtr: boolean expected"; + } + if (message.publicPtrDomainName != null && message.hasOwnProperty("publicPtrDomainName")) { + properties._publicPtrDomainName = 1; + if (!$util.isString(message.publicPtrDomainName)) + return "publicPtrDomainName: string expected"; + } + if (message.networkTier != null && message.hasOwnProperty("networkTier")) { + properties._networkTier = 1; + switch (message.networkTier) { + default: + return "networkTier: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates an AccessConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig + */ + AccessConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AccessConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.AccessConfig(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "ACCESS_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ONE_TO_ONE_NAT": + case 1: + message.type = 1; + break; + case "DIRECT_IPV6": + case 2: + message.type = 2; + break; + } + if (object.name != null) + message.name = String(object.name); + if (object.externalIp != null) + message.externalIp = String(object.externalIp); + if (object.externalIpv6 != null) + message.externalIpv6 = String(object.externalIpv6); + if (object.externalIpv6PrefixLength != null) + message.externalIpv6PrefixLength = object.externalIpv6PrefixLength | 0; + if (object.setPublicPtr != null) + message.setPublicPtr = Boolean(object.setPublicPtr); + if (object.publicPtrDomainName != null) + message.publicPtrDomainName = String(object.publicPtrDomainName); + switch (object.networkTier) { + default: + if (typeof object.networkTier === "number") { + message.networkTier = object.networkTier; + break; + } + break; + case "NETWORK_TIER_UNSPECIFIED": + case 0: + message.networkTier = 0; + break; + case "PREMIUM": + case 1: + message.networkTier = 1; + break; + case "STANDARD": + case 2: + message.networkTier = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {google.cloud.backupdr.v1.AccessConfig} message AccessConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.externalIp != null && message.hasOwnProperty("externalIp")) { + object.externalIp = message.externalIp; + if (options.oneofs) + object._externalIp = "externalIp"; + } + if (message.externalIpv6 != null && message.hasOwnProperty("externalIpv6")) { + object.externalIpv6 = message.externalIpv6; + if (options.oneofs) + object._externalIpv6 = "externalIpv6"; + } + if (message.externalIpv6PrefixLength != null && message.hasOwnProperty("externalIpv6PrefixLength")) { + object.externalIpv6PrefixLength = message.externalIpv6PrefixLength; + if (options.oneofs) + object._externalIpv6PrefixLength = "externalIpv6PrefixLength"; + } + if (message.setPublicPtr != null && message.hasOwnProperty("setPublicPtr")) { + object.setPublicPtr = message.setPublicPtr; + if (options.oneofs) + object._setPublicPtr = "setPublicPtr"; + } + if (message.publicPtrDomainName != null && message.hasOwnProperty("publicPtrDomainName")) { + object.publicPtrDomainName = message.publicPtrDomainName; + if (options.oneofs) + object._publicPtrDomainName = "publicPtrDomainName"; + } + if (message.networkTier != null && message.hasOwnProperty("networkTier")) { + object.networkTier = options.enums === String ? $root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier] === undefined ? message.networkTier : $root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier] : message.networkTier; + if (options.oneofs) + object._networkTier = "networkTier"; + } + return object; + }; + + /** + * Converts this AccessConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + * @returns {Object.} JSON object + */ + AccessConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AccessConfig"; + }; + + /** + * AccessType enum. + * @name google.cloud.backupdr.v1.AccessConfig.AccessType + * @enum {number} + * @property {number} ACCESS_TYPE_UNSPECIFIED=0 ACCESS_TYPE_UNSPECIFIED value + * @property {number} ONE_TO_ONE_NAT=1 ONE_TO_ONE_NAT value + * @property {number} DIRECT_IPV6=2 DIRECT_IPV6 value + */ + AccessConfig.AccessType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ONE_TO_ONE_NAT"] = 1; + values[valuesById[2] = "DIRECT_IPV6"] = 2; + return values; + })(); + + /** + * NetworkTier enum. + * @name google.cloud.backupdr.v1.AccessConfig.NetworkTier + * @enum {number} + * @property {number} NETWORK_TIER_UNSPECIFIED=0 NETWORK_TIER_UNSPECIFIED value + * @property {number} PREMIUM=1 PREMIUM value + * @property {number} STANDARD=2 STANDARD value + */ + AccessConfig.NetworkTier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NETWORK_TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "PREMIUM"] = 1; + values[valuesById[2] = "STANDARD"] = 2; + return values; + })(); + + return AccessConfig; + })(); + + v1.AliasIpRange = (function() { + + /** + * Properties of an AliasIpRange. + * @memberof google.cloud.backupdr.v1 + * @interface IAliasIpRange + * @property {string|null} [ipCidrRange] AliasIpRange ipCidrRange + * @property {string|null} [subnetworkRangeName] AliasIpRange subnetworkRangeName + */ + + /** + * Constructs a new AliasIpRange. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AliasIpRange. + * @implements IAliasIpRange + * @constructor + * @param {google.cloud.backupdr.v1.IAliasIpRange=} [properties] Properties to set + */ + function AliasIpRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AliasIpRange ipCidrRange. + * @member {string|null|undefined} ipCidrRange + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + */ + AliasIpRange.prototype.ipCidrRange = null; + + /** + * AliasIpRange subnetworkRangeName. + * @member {string|null|undefined} subnetworkRangeName + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + */ + AliasIpRange.prototype.subnetworkRangeName = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AliasIpRange _ipCidrRange. + * @member {"ipCidrRange"|undefined} _ipCidrRange + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + */ + Object.defineProperty(AliasIpRange.prototype, "_ipCidrRange", { + get: $util.oneOfGetter($oneOfFields = ["ipCidrRange"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AliasIpRange _subnetworkRangeName. + * @member {"subnetworkRangeName"|undefined} _subnetworkRangeName + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + */ + Object.defineProperty(AliasIpRange.prototype, "_subnetworkRangeName", { + get: $util.oneOfGetter($oneOfFields = ["subnetworkRangeName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AliasIpRange instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {google.cloud.backupdr.v1.IAliasIpRange=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange instance + */ + AliasIpRange.create = function create(properties) { + return new AliasIpRange(properties); + }; + + /** + * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {google.cloud.backupdr.v1.IAliasIpRange} message AliasIpRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AliasIpRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ipCidrRange != null && Object.hasOwnProperty.call(message, "ipCidrRange")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipCidrRange); + if (message.subnetworkRangeName != null && Object.hasOwnProperty.call(message, "subnetworkRangeName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetworkRangeName); + return writer; + }; + + /** + * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {google.cloud.backupdr.v1.IAliasIpRange} message AliasIpRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AliasIpRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AliasIpRange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AliasIpRange.decode = function 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.backupdr.v1.AliasIpRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ipCidrRange = reader.string(); + break; + } + case 2: { + message.subnetworkRangeName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AliasIpRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AliasIpRange message. + * @function verify + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AliasIpRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) { + properties._ipCidrRange = 1; + if (!$util.isString(message.ipCidrRange)) + return "ipCidrRange: string expected"; + } + if (message.subnetworkRangeName != null && message.hasOwnProperty("subnetworkRangeName")) { + properties._subnetworkRangeName = 1; + if (!$util.isString(message.subnetworkRangeName)) + return "subnetworkRangeName: string expected"; + } + return null; + }; + + /** + * Creates an AliasIpRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange + */ + AliasIpRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AliasIpRange) + return object; + var message = new $root.google.cloud.backupdr.v1.AliasIpRange(); + if (object.ipCidrRange != null) + message.ipCidrRange = String(object.ipCidrRange); + if (object.subnetworkRangeName != null) + message.subnetworkRangeName = String(object.subnetworkRangeName); + return message; + }; + + /** + * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {google.cloud.backupdr.v1.AliasIpRange} message AliasIpRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AliasIpRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) { + object.ipCidrRange = message.ipCidrRange; + if (options.oneofs) + object._ipCidrRange = "ipCidrRange"; + } + if (message.subnetworkRangeName != null && message.hasOwnProperty("subnetworkRangeName")) { + object.subnetworkRangeName = message.subnetworkRangeName; + if (options.oneofs) + object._subnetworkRangeName = "subnetworkRangeName"; + } + return object; + }; + + /** + * Converts this AliasIpRange to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + * @returns {Object.} JSON object + */ + AliasIpRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AliasIpRange + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AliasIpRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AliasIpRange"; + }; + + return AliasIpRange; + })(); + + v1.InstanceParams = (function() { + + /** + * Properties of an InstanceParams. + * @memberof google.cloud.backupdr.v1 + * @interface IInstanceParams + * @property {Object.|null} [resourceManagerTags] InstanceParams resourceManagerTags + */ + + /** + * Constructs a new InstanceParams. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an InstanceParams. + * @implements IInstanceParams + * @constructor + * @param {google.cloud.backupdr.v1.IInstanceParams=} [properties] Properties to set + */ + function InstanceParams(properties) { + this.resourceManagerTags = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstanceParams resourceManagerTags. + * @member {Object.} resourceManagerTags + * @memberof google.cloud.backupdr.v1.InstanceParams + * @instance + */ + InstanceParams.prototype.resourceManagerTags = $util.emptyObject; + + /** + * Creates a new InstanceParams instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {google.cloud.backupdr.v1.IInstanceParams=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams instance + */ + InstanceParams.create = function create(properties) { + return new InstanceParams(properties); + }; + + /** + * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {google.cloud.backupdr.v1.IInstanceParams} message InstanceParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) + for (var keys = Object.keys(message.resourceManagerTags), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceManagerTags[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {google.cloud.backupdr.v1.IInstanceParams} message InstanceParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstanceParams message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceParams.decode = function 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.backupdr.v1.InstanceParams(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.resourceManagerTags === $util.emptyObject) + message.resourceManagerTags = {}; + 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.resourceManagerTags[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstanceParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstanceParams message. + * @function verify + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstanceParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { + if (!$util.isObject(message.resourceManagerTags)) + return "resourceManagerTags: object expected"; + var key = Object.keys(message.resourceManagerTags); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.resourceManagerTags[key[i]])) + return "resourceManagerTags: string{k:string} expected"; + } + return null; + }; + + /** + * Creates an InstanceParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams + */ + InstanceParams.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.InstanceParams) + return object; + var message = new $root.google.cloud.backupdr.v1.InstanceParams(); + if (object.resourceManagerTags) { + if (typeof object.resourceManagerTags !== "object") + throw TypeError(".google.cloud.backupdr.v1.InstanceParams.resourceManagerTags: object expected"); + message.resourceManagerTags = {}; + for (var keys = Object.keys(object.resourceManagerTags), i = 0; i < keys.length; ++i) + message.resourceManagerTags[keys[i]] = String(object.resourceManagerTags[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {google.cloud.backupdr.v1.InstanceParams} message InstanceParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstanceParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.resourceManagerTags = {}; + var keys2; + if (message.resourceManagerTags && (keys2 = Object.keys(message.resourceManagerTags)).length) { + object.resourceManagerTags = {}; + for (var j = 0; j < keys2.length; ++j) + object.resourceManagerTags[keys2[j]] = message.resourceManagerTags[keys2[j]]; + } + return object; + }; + + /** + * Converts this InstanceParams to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.InstanceParams + * @instance + * @returns {Object.} JSON object + */ + InstanceParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InstanceParams + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstanceParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.InstanceParams"; + }; + + return InstanceParams; + })(); + + v1.AllocationAffinity = (function() { + + /** + * Properties of an AllocationAffinity. + * @memberof google.cloud.backupdr.v1 + * @interface IAllocationAffinity + * @property {google.cloud.backupdr.v1.AllocationAffinity.Type|null} [consumeAllocationType] AllocationAffinity consumeAllocationType + * @property {string|null} [key] AllocationAffinity key + * @property {Array.|null} [values] AllocationAffinity values + */ + + /** + * Constructs a new AllocationAffinity. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AllocationAffinity. + * @implements IAllocationAffinity + * @constructor + * @param {google.cloud.backupdr.v1.IAllocationAffinity=} [properties] Properties to set + */ + function AllocationAffinity(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AllocationAffinity consumeAllocationType. + * @member {google.cloud.backupdr.v1.AllocationAffinity.Type|null|undefined} consumeAllocationType + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + AllocationAffinity.prototype.consumeAllocationType = null; + + /** + * AllocationAffinity key. + * @member {string|null|undefined} key + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + AllocationAffinity.prototype.key = null; + + /** + * AllocationAffinity values. + * @member {Array.} values + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + AllocationAffinity.prototype.values = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AllocationAffinity _consumeAllocationType. + * @member {"consumeAllocationType"|undefined} _consumeAllocationType + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + Object.defineProperty(AllocationAffinity.prototype, "_consumeAllocationType", { + get: $util.oneOfGetter($oneOfFields = ["consumeAllocationType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AllocationAffinity _key. + * @member {"key"|undefined} _key + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + Object.defineProperty(AllocationAffinity.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AllocationAffinity instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {google.cloud.backupdr.v1.IAllocationAffinity=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity instance + */ + AllocationAffinity.create = function create(properties) { + return new AllocationAffinity(properties); + }; + + /** + * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {google.cloud.backupdr.v1.IAllocationAffinity} message AllocationAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllocationAffinity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consumeAllocationType != null && Object.hasOwnProperty.call(message, "consumeAllocationType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumeAllocationType); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {google.cloud.backupdr.v1.IAllocationAffinity} message AllocationAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllocationAffinity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllocationAffinity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllocationAffinity.decode = function 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.backupdr.v1.AllocationAffinity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.consumeAllocationType = reader.int32(); + break; + } + case 2: { + message.key = reader.string(); + break; + } + case 3: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AllocationAffinity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllocationAffinity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllocationAffinity message. + * @function verify + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllocationAffinity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.consumeAllocationType != null && message.hasOwnProperty("consumeAllocationType")) { + properties._consumeAllocationType = 1; + switch (message.consumeAllocationType) { + default: + return "consumeAllocationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; + } + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates an AllocationAffinity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity + */ + AllocationAffinity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AllocationAffinity) + return object; + var message = new $root.google.cloud.backupdr.v1.AllocationAffinity(); + switch (object.consumeAllocationType) { + default: + if (typeof object.consumeAllocationType === "number") { + message.consumeAllocationType = object.consumeAllocationType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.consumeAllocationType = 0; + break; + case "NO_RESERVATION": + case 1: + message.consumeAllocationType = 1; + break; + case "ANY_RESERVATION": + case 2: + message.consumeAllocationType = 2; + break; + case "SPECIFIC_RESERVATION": + case 3: + message.consumeAllocationType = 3; + break; + } + if (object.key != null) + message.key = String(object.key); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.backupdr.v1.AllocationAffinity.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from an AllocationAffinity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {google.cloud.backupdr.v1.AllocationAffinity} message AllocationAffinity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllocationAffinity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.consumeAllocationType != null && message.hasOwnProperty("consumeAllocationType")) { + object.consumeAllocationType = options.enums === String ? $root.google.cloud.backupdr.v1.AllocationAffinity.Type[message.consumeAllocationType] === undefined ? message.consumeAllocationType : $root.google.cloud.backupdr.v1.AllocationAffinity.Type[message.consumeAllocationType] : message.consumeAllocationType; + if (options.oneofs) + object._consumeAllocationType = "consumeAllocationType"; + } + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) + object._key = "key"; + } + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + return object; + }; + + /** + * Converts this AllocationAffinity to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + * @returns {Object.} JSON object + */ + AllocationAffinity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AllocationAffinity + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllocationAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AllocationAffinity"; + }; + + /** + * Type enum. + * @name google.cloud.backupdr.v1.AllocationAffinity.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} NO_RESERVATION=1 NO_RESERVATION value + * @property {number} ANY_RESERVATION=2 ANY_RESERVATION value + * @property {number} SPECIFIC_RESERVATION=3 SPECIFIC_RESERVATION value + */ + AllocationAffinity.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NO_RESERVATION"] = 1; + values[valuesById[2] = "ANY_RESERVATION"] = 2; + values[valuesById[3] = "SPECIFIC_RESERVATION"] = 3; + return values; + })(); + + return AllocationAffinity; + })(); + + v1.Scheduling = (function() { + + /** + * Properties of a Scheduling. + * @memberof google.cloud.backupdr.v1 + * @interface IScheduling + * @property {google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null} [onHostMaintenance] Scheduling onHostMaintenance + * @property {boolean|null} [automaticRestart] Scheduling automaticRestart + * @property {boolean|null} [preemptible] Scheduling preemptible + * @property {Array.|null} [nodeAffinities] Scheduling nodeAffinities + * @property {number|null} [minNodeCpus] Scheduling minNodeCpus + * @property {google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null} [provisioningModel] Scheduling provisioningModel + * @property {google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null} [instanceTerminationAction] Scheduling instanceTerminationAction + * @property {google.cloud.backupdr.v1.ISchedulingDuration|null} [localSsdRecoveryTimeout] Scheduling localSsdRecoveryTimeout + */ + + /** + * Constructs a new Scheduling. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Scheduling. + * @implements IScheduling + * @constructor + * @param {google.cloud.backupdr.v1.IScheduling=} [properties] Properties to set + */ + function Scheduling(properties) { + this.nodeAffinities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Scheduling onHostMaintenance. + * @member {google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null|undefined} onHostMaintenance + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.onHostMaintenance = null; + + /** + * Scheduling automaticRestart. + * @member {boolean|null|undefined} automaticRestart + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.automaticRestart = null; + + /** + * Scheduling preemptible. + * @member {boolean|null|undefined} preemptible + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.preemptible = null; + + /** + * Scheduling nodeAffinities. + * @member {Array.} nodeAffinities + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.nodeAffinities = $util.emptyArray; + + /** + * Scheduling minNodeCpus. + * @member {number|null|undefined} minNodeCpus + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.minNodeCpus = null; + + /** + * Scheduling provisioningModel. + * @member {google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null|undefined} provisioningModel + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.provisioningModel = null; + + /** + * Scheduling instanceTerminationAction. + * @member {google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null|undefined} instanceTerminationAction + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.instanceTerminationAction = null; + + /** + * Scheduling localSsdRecoveryTimeout. + * @member {google.cloud.backupdr.v1.ISchedulingDuration|null|undefined} localSsdRecoveryTimeout + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.localSsdRecoveryTimeout = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Scheduling _onHostMaintenance. + * @member {"onHostMaintenance"|undefined} _onHostMaintenance + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_onHostMaintenance", { + get: $util.oneOfGetter($oneOfFields = ["onHostMaintenance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _automaticRestart. + * @member {"automaticRestart"|undefined} _automaticRestart + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_automaticRestart", { + get: $util.oneOfGetter($oneOfFields = ["automaticRestart"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _preemptible. + * @member {"preemptible"|undefined} _preemptible + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_preemptible", { + get: $util.oneOfGetter($oneOfFields = ["preemptible"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _minNodeCpus. + * @member {"minNodeCpus"|undefined} _minNodeCpus + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_minNodeCpus", { + get: $util.oneOfGetter($oneOfFields = ["minNodeCpus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _provisioningModel. + * @member {"provisioningModel"|undefined} _provisioningModel + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_provisioningModel", { + get: $util.oneOfGetter($oneOfFields = ["provisioningModel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _instanceTerminationAction. + * @member {"instanceTerminationAction"|undefined} _instanceTerminationAction + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_instanceTerminationAction", { + get: $util.oneOfGetter($oneOfFields = ["instanceTerminationAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _localSsdRecoveryTimeout. + * @member {"localSsdRecoveryTimeout"|undefined} _localSsdRecoveryTimeout + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_localSsdRecoveryTimeout", { + get: $util.oneOfGetter($oneOfFields = ["localSsdRecoveryTimeout"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Scheduling instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {google.cloud.backupdr.v1.IScheduling=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling instance + */ + Scheduling.create = function create(properties) { + return new Scheduling(properties); + }; + + /** + * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {google.cloud.backupdr.v1.IScheduling} message Scheduling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Scheduling.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.onHostMaintenance != null && Object.hasOwnProperty.call(message, "onHostMaintenance")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.onHostMaintenance); + if (message.automaticRestart != null && Object.hasOwnProperty.call(message, "automaticRestart")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.automaticRestart); + if (message.preemptible != null && Object.hasOwnProperty.call(message, "preemptible")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preemptible); + if (message.nodeAffinities != null && message.nodeAffinities.length) + for (var i = 0; i < message.nodeAffinities.length; ++i) + $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.encode(message.nodeAffinities[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.minNodeCpus != null && Object.hasOwnProperty.call(message, "minNodeCpus")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.minNodeCpus); + if (message.provisioningModel != null && Object.hasOwnProperty.call(message, "provisioningModel")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.provisioningModel); + if (message.instanceTerminationAction != null && Object.hasOwnProperty.call(message, "instanceTerminationAction")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.instanceTerminationAction); + if (message.localSsdRecoveryTimeout != null && Object.hasOwnProperty.call(message, "localSsdRecoveryTimeout")) + $root.google.cloud.backupdr.v1.SchedulingDuration.encode(message.localSsdRecoveryTimeout, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {google.cloud.backupdr.v1.IScheduling} message Scheduling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Scheduling.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Scheduling message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Scheduling.decode = function 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.backupdr.v1.Scheduling(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.onHostMaintenance = reader.int32(); + break; + } + case 2: { + message.automaticRestart = reader.bool(); + break; + } + case 3: { + message.preemptible = reader.bool(); + break; + } + case 4: { + if (!(message.nodeAffinities && message.nodeAffinities.length)) + message.nodeAffinities = []; + message.nodeAffinities.push($root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.decode(reader, reader.uint32())); + break; + } + case 5: { + message.minNodeCpus = reader.int32(); + break; + } + case 6: { + message.provisioningModel = reader.int32(); + break; + } + case 7: { + message.instanceTerminationAction = reader.int32(); + break; + } + case 10: { + message.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Scheduling message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Scheduling.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Scheduling message. + * @function verify + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Scheduling.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.onHostMaintenance != null && message.hasOwnProperty("onHostMaintenance")) { + properties._onHostMaintenance = 1; + switch (message.onHostMaintenance) { + default: + return "onHostMaintenance: enum value expected"; + case 0: + case 1: + case 1000: + break; + } + } + if (message.automaticRestart != null && message.hasOwnProperty("automaticRestart")) { + properties._automaticRestart = 1; + if (typeof message.automaticRestart !== "boolean") + return "automaticRestart: boolean expected"; + } + if (message.preemptible != null && message.hasOwnProperty("preemptible")) { + properties._preemptible = 1; + if (typeof message.preemptible !== "boolean") + return "preemptible: boolean expected"; + } + if (message.nodeAffinities != null && message.hasOwnProperty("nodeAffinities")) { + if (!Array.isArray(message.nodeAffinities)) + return "nodeAffinities: array expected"; + for (var i = 0; i < message.nodeAffinities.length; ++i) { + var error = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify(message.nodeAffinities[i]); + if (error) + return "nodeAffinities." + error; + } + } + if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { + properties._minNodeCpus = 1; + if (!$util.isInteger(message.minNodeCpus)) + return "minNodeCpus: integer expected"; + } + if (message.provisioningModel != null && message.hasOwnProperty("provisioningModel")) { + properties._provisioningModel = 1; + switch (message.provisioningModel) { + default: + return "provisioningModel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.instanceTerminationAction != null && message.hasOwnProperty("instanceTerminationAction")) { + properties._instanceTerminationAction = 1; + switch (message.instanceTerminationAction) { + default: + return "instanceTerminationAction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.localSsdRecoveryTimeout != null && message.hasOwnProperty("localSsdRecoveryTimeout")) { + properties._localSsdRecoveryTimeout = 1; + { + var error = $root.google.cloud.backupdr.v1.SchedulingDuration.verify(message.localSsdRecoveryTimeout); + if (error) + return "localSsdRecoveryTimeout." + error; + } + } + return null; + }; + + /** + * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling + */ + Scheduling.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Scheduling) + return object; + var message = new $root.google.cloud.backupdr.v1.Scheduling(); + switch (object.onHostMaintenance) { + default: + if (typeof object.onHostMaintenance === "number") { + message.onHostMaintenance = object.onHostMaintenance; + break; + } + break; + case "ON_HOST_MAINTENANCE_UNSPECIFIED": + case 0: + message.onHostMaintenance = 0; + break; + case "TERMINATE": + case 1: + message.onHostMaintenance = 1; + break; + case "MIGRATE": + case 1000: + message.onHostMaintenance = 1000; + break; + } + if (object.automaticRestart != null) + message.automaticRestart = Boolean(object.automaticRestart); + if (object.preemptible != null) + message.preemptible = Boolean(object.preemptible); + if (object.nodeAffinities) { + if (!Array.isArray(object.nodeAffinities)) + throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: array expected"); + message.nodeAffinities = []; + for (var i = 0; i < object.nodeAffinities.length; ++i) { + if (typeof object.nodeAffinities[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: object expected"); + message.nodeAffinities[i] = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.fromObject(object.nodeAffinities[i]); + } + } + if (object.minNodeCpus != null) + message.minNodeCpus = object.minNodeCpus | 0; + switch (object.provisioningModel) { + default: + if (typeof object.provisioningModel === "number") { + message.provisioningModel = object.provisioningModel; + break; + } + break; + case "PROVISIONING_MODEL_UNSPECIFIED": + case 0: + message.provisioningModel = 0; + break; + case "STANDARD": + case 1: + message.provisioningModel = 1; + break; + case "SPOT": + case 2: + message.provisioningModel = 2; + break; + } + switch (object.instanceTerminationAction) { + default: + if (typeof object.instanceTerminationAction === "number") { + message.instanceTerminationAction = object.instanceTerminationAction; + break; + } + break; + case "INSTANCE_TERMINATION_ACTION_UNSPECIFIED": + case 0: + message.instanceTerminationAction = 0; + break; + case "DELETE": + case 1: + message.instanceTerminationAction = 1; + break; + case "STOP": + case 2: + message.instanceTerminationAction = 2; + break; + } + if (object.localSsdRecoveryTimeout != null) { + if (typeof object.localSsdRecoveryTimeout !== "object") + throw TypeError(".google.cloud.backupdr.v1.Scheduling.localSsdRecoveryTimeout: object expected"); + message.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.fromObject(object.localSsdRecoveryTimeout); + } + return message; + }; + + /** + * Creates a plain object from a Scheduling message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {google.cloud.backupdr.v1.Scheduling} message Scheduling + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Scheduling.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.nodeAffinities = []; + if (message.onHostMaintenance != null && message.hasOwnProperty("onHostMaintenance")) { + object.onHostMaintenance = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.OnHostMaintenance[message.onHostMaintenance] === undefined ? message.onHostMaintenance : $root.google.cloud.backupdr.v1.Scheduling.OnHostMaintenance[message.onHostMaintenance] : message.onHostMaintenance; + if (options.oneofs) + object._onHostMaintenance = "onHostMaintenance"; + } + if (message.automaticRestart != null && message.hasOwnProperty("automaticRestart")) { + object.automaticRestart = message.automaticRestart; + if (options.oneofs) + object._automaticRestart = "automaticRestart"; + } + if (message.preemptible != null && message.hasOwnProperty("preemptible")) { + object.preemptible = message.preemptible; + if (options.oneofs) + object._preemptible = "preemptible"; + } + if (message.nodeAffinities && message.nodeAffinities.length) { + object.nodeAffinities = []; + for (var j = 0; j < message.nodeAffinities.length; ++j) + object.nodeAffinities[j] = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.toObject(message.nodeAffinities[j], options); + } + if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { + object.minNodeCpus = message.minNodeCpus; + if (options.oneofs) + object._minNodeCpus = "minNodeCpus"; + } + if (message.provisioningModel != null && message.hasOwnProperty("provisioningModel")) { + object.provisioningModel = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.ProvisioningModel[message.provisioningModel] === undefined ? message.provisioningModel : $root.google.cloud.backupdr.v1.Scheduling.ProvisioningModel[message.provisioningModel] : message.provisioningModel; + if (options.oneofs) + object._provisioningModel = "provisioningModel"; + } + if (message.instanceTerminationAction != null && message.hasOwnProperty("instanceTerminationAction")) { + object.instanceTerminationAction = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction[message.instanceTerminationAction] === undefined ? message.instanceTerminationAction : $root.google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction[message.instanceTerminationAction] : message.instanceTerminationAction; + if (options.oneofs) + object._instanceTerminationAction = "instanceTerminationAction"; + } + if (message.localSsdRecoveryTimeout != null && message.hasOwnProperty("localSsdRecoveryTimeout")) { + object.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.toObject(message.localSsdRecoveryTimeout, options); + if (options.oneofs) + object._localSsdRecoveryTimeout = "localSsdRecoveryTimeout"; + } + return object; + }; + + /** + * Converts this Scheduling to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + * @returns {Object.} JSON object + */ + Scheduling.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Scheduling + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Scheduling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Scheduling"; + }; + + /** + * OnHostMaintenance enum. + * @name google.cloud.backupdr.v1.Scheduling.OnHostMaintenance + * @enum {number} + * @property {number} ON_HOST_MAINTENANCE_UNSPECIFIED=0 ON_HOST_MAINTENANCE_UNSPECIFIED value + * @property {number} TERMINATE=1 TERMINATE value + * @property {number} MIGRATE=1000 MIGRATE value + */ + Scheduling.OnHostMaintenance = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ON_HOST_MAINTENANCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TERMINATE"] = 1; + values[valuesById[1000] = "MIGRATE"] = 1000; + return values; + })(); + + Scheduling.NodeAffinity = (function() { + + /** + * Properties of a NodeAffinity. + * @memberof google.cloud.backupdr.v1.Scheduling + * @interface INodeAffinity + * @property {string|null} [key] NodeAffinity key + * @property {google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null} [operator] NodeAffinity operator + * @property {Array.|null} [values] NodeAffinity values + */ + + /** + * Constructs a new NodeAffinity. + * @memberof google.cloud.backupdr.v1.Scheduling + * @classdesc Represents a NodeAffinity. + * @implements INodeAffinity + * @constructor + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity=} [properties] Properties to set + */ + function NodeAffinity(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeAffinity key. + * @member {string|null|undefined} key + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + NodeAffinity.prototype.key = null; + + /** + * NodeAffinity operator. + * @member {google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null|undefined} operator + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + NodeAffinity.prototype.operator = null; + + /** + * NodeAffinity values. + * @member {Array.} values + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + NodeAffinity.prototype.values = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NodeAffinity _key. + * @member {"key"|undefined} _key + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + Object.defineProperty(NodeAffinity.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NodeAffinity _operator. + * @member {"operator"|undefined} _operator + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + Object.defineProperty(NodeAffinity.prototype, "_operator", { + get: $util.oneOfGetter($oneOfFields = ["operator"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NodeAffinity instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity instance + */ + NodeAffinity.create = function create(properties) { + return new NodeAffinity(properties); + }; + + /** + * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity} message NodeAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeAffinity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.operator != null && Object.hasOwnProperty.call(message, "operator")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operator); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity} message NodeAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeAffinity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeAffinity.decode = function 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.backupdr.v1.Scheduling.NodeAffinity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.operator = reader.int32(); + break; + } + case 3: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeAffinity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeAffinity message. + * @function verify + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeAffinity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; + } + if (message.operator != null && message.hasOwnProperty("operator")) { + properties._operator = 1; + switch (message.operator) { + default: + return "operator: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity + */ + NodeAffinity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity) + return object; + var message = new $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity(); + if (object.key != null) + message.key = String(object.key); + switch (object.operator) { + default: + if (typeof object.operator === "number") { + message.operator = object.operator; + break; + } + break; + case "OPERATOR_UNSPECIFIED": + case 0: + message.operator = 0; + break; + case "IN": + case 1: + message.operator = 1; + break; + case "NOT_IN": + case 2: + message.operator = 2; + break; + } + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.backupdr.v1.Scheduling.NodeAffinity.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.NodeAffinity} message NodeAffinity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeAffinity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) + object._key = "key"; + } + if (message.operator != null && message.hasOwnProperty("operator")) { + object.operator = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator[message.operator] === undefined ? message.operator : $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator[message.operator] : message.operator; + if (options.oneofs) + object._operator = "operator"; + } + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + return object; + }; + + /** + * Converts this NodeAffinity to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + * @returns {Object.} JSON object + */ + NodeAffinity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeAffinity + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Scheduling.NodeAffinity"; + }; + + /** + * Operator enum. + * @name google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator + * @enum {number} + * @property {number} OPERATOR_UNSPECIFIED=0 OPERATOR_UNSPECIFIED value + * @property {number} IN=1 IN value + * @property {number} NOT_IN=2 NOT_IN value + */ + NodeAffinity.Operator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN"] = 1; + values[valuesById[2] = "NOT_IN"] = 2; + return values; + })(); + + return NodeAffinity; + })(); + + /** + * ProvisioningModel enum. + * @name google.cloud.backupdr.v1.Scheduling.ProvisioningModel + * @enum {number} + * @property {number} PROVISIONING_MODEL_UNSPECIFIED=0 PROVISIONING_MODEL_UNSPECIFIED value + * @property {number} STANDARD=1 STANDARD value + * @property {number} SPOT=2 SPOT value + */ + Scheduling.ProvisioningModel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROVISIONING_MODEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD"] = 1; + values[valuesById[2] = "SPOT"] = 2; + return values; + })(); + + /** + * InstanceTerminationAction enum. + * @name google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction + * @enum {number} + * @property {number} INSTANCE_TERMINATION_ACTION_UNSPECIFIED=0 INSTANCE_TERMINATION_ACTION_UNSPECIFIED value + * @property {number} DELETE=1 DELETE value + * @property {number} STOP=2 STOP value + */ + Scheduling.InstanceTerminationAction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INSTANCE_TERMINATION_ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "DELETE"] = 1; + values[valuesById[2] = "STOP"] = 2; + return values; + })(); + + return Scheduling; + })(); + + v1.SchedulingDuration = (function() { + + /** + * Properties of a SchedulingDuration. + * @memberof google.cloud.backupdr.v1 + * @interface ISchedulingDuration + * @property {number|Long|null} [seconds] SchedulingDuration seconds + * @property {number|null} [nanos] SchedulingDuration nanos + */ + + /** + * Constructs a new SchedulingDuration. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a SchedulingDuration. + * @implements ISchedulingDuration + * @constructor + * @param {google.cloud.backupdr.v1.ISchedulingDuration=} [properties] Properties to set + */ + function SchedulingDuration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchedulingDuration seconds. + * @member {number|Long|null|undefined} seconds + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + SchedulingDuration.prototype.seconds = null; + + /** + * SchedulingDuration nanos. + * @member {number|null|undefined} nanos + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + SchedulingDuration.prototype.nanos = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SchedulingDuration _seconds. + * @member {"seconds"|undefined} _seconds + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + Object.defineProperty(SchedulingDuration.prototype, "_seconds", { + get: $util.oneOfGetter($oneOfFields = ["seconds"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SchedulingDuration _nanos. + * @member {"nanos"|undefined} _nanos + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + Object.defineProperty(SchedulingDuration.prototype, "_nanos", { + get: $util.oneOfGetter($oneOfFields = ["nanos"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SchedulingDuration instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {google.cloud.backupdr.v1.ISchedulingDuration=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration instance + */ + SchedulingDuration.create = function create(properties) { + return new SchedulingDuration(properties); + }; + + /** + * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {google.cloud.backupdr.v1.ISchedulingDuration} message SchedulingDuration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchedulingDuration.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 SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {google.cloud.backupdr.v1.ISchedulingDuration} message SchedulingDuration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchedulingDuration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchedulingDuration message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchedulingDuration.decode = function 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.backupdr.v1.SchedulingDuration(); + 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 SchedulingDuration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchedulingDuration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchedulingDuration message. + * @function verify + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchedulingDuration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.seconds != null && message.hasOwnProperty("seconds")) { + properties._seconds = 1; + 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")) { + properties._nanos = 1; + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + } + return null; + }; + + /** + * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration + */ + SchedulingDuration.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.SchedulingDuration) + return object; + var message = new $root.google.cloud.backupdr.v1.SchedulingDuration(); + 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 SchedulingDuration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {google.cloud.backupdr.v1.SchedulingDuration} message SchedulingDuration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchedulingDuration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 (options.oneofs) + object._seconds = "seconds"; + } + if (message.nanos != null && message.hasOwnProperty("nanos")) { + object.nanos = message.nanos; + if (options.oneofs) + object._nanos = "nanos"; + } + return object; + }; + + /** + * Converts this SchedulingDuration to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + * @returns {Object.} JSON object + */ + SchedulingDuration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchedulingDuration + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchedulingDuration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.SchedulingDuration"; + }; + + return SchedulingDuration; + })(); + + v1.ServiceAccount = (function() { + + /** + * Properties of a ServiceAccount. + * @memberof google.cloud.backupdr.v1 + * @interface IServiceAccount + * @property {string|null} [email] ServiceAccount email + * @property {Array.|null} [scopes] ServiceAccount scopes + */ + + /** + * Constructs a new ServiceAccount. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ServiceAccount. + * @implements IServiceAccount + * @constructor + * @param {google.cloud.backupdr.v1.IServiceAccount=} [properties] Properties to set + */ + function ServiceAccount(properties) { + this.scopes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceAccount email. + * @member {string|null|undefined} email + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @instance + */ + ServiceAccount.prototype.email = null; + + /** + * ServiceAccount scopes. + * @member {Array.} scopes + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @instance + */ + ServiceAccount.prototype.scopes = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ServiceAccount _email. + * @member {"email"|undefined} _email + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @instance + */ + Object.defineProperty(ServiceAccount.prototype, "_email", { + get: $util.oneOfGetter($oneOfFields = ["email"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ServiceAccount instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {google.cloud.backupdr.v1.IServiceAccount=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount instance + */ + ServiceAccount.create = function create(properties) { + return new ServiceAccount(properties); + }; + + /** + * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {google.cloud.backupdr.v1.IServiceAccount} message ServiceAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.email != null && Object.hasOwnProperty.call(message, "email")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.email); + if (message.scopes != null && message.scopes.length) + for (var i = 0; i < message.scopes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.scopes[i]); + return writer; + }; + + /** + * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {google.cloud.backupdr.v1.IServiceAccount} message ServiceAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceAccount message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceAccount.decode = function 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.backupdr.v1.ServiceAccount(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.email = reader.string(); + break; + } + case 2: { + if (!(message.scopes && message.scopes.length)) + message.scopes = []; + message.scopes.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceAccount message. + * @function verify + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.email != null && message.hasOwnProperty("email")) { + properties._email = 1; + if (!$util.isString(message.email)) + return "email: string expected"; + } + if (message.scopes != null && message.hasOwnProperty("scopes")) { + if (!Array.isArray(message.scopes)) + return "scopes: array expected"; + for (var i = 0; i < message.scopes.length; ++i) + if (!$util.isString(message.scopes[i])) + return "scopes: string[] expected"; + } + return null; + }; + + /** + * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount + */ + ServiceAccount.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ServiceAccount) + return object; + var message = new $root.google.cloud.backupdr.v1.ServiceAccount(); + if (object.email != null) + message.email = String(object.email); + if (object.scopes) { + if (!Array.isArray(object.scopes)) + throw TypeError(".google.cloud.backupdr.v1.ServiceAccount.scopes: array expected"); + message.scopes = []; + for (var i = 0; i < object.scopes.length; ++i) + message.scopes[i] = String(object.scopes[i]); + } + return message; + }; + + /** + * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {google.cloud.backupdr.v1.ServiceAccount} message ServiceAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.scopes = []; + if (message.email != null && message.hasOwnProperty("email")) { + object.email = message.email; + if (options.oneofs) + object._email = "email"; + } + if (message.scopes && message.scopes.length) { + object.scopes = []; + for (var j = 0; j < message.scopes.length; ++j) + object.scopes[j] = message.scopes[j]; + } + return object; + }; + + /** + * Converts this ServiceAccount to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @instance + * @returns {Object.} JSON object + */ + ServiceAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceAccount + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceAccount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ServiceAccount"; + }; + + return ServiceAccount; + })(); + + v1.Tags = (function() { + + /** + * Properties of a Tags. + * @memberof google.cloud.backupdr.v1 + * @interface ITags + * @property {Array.|null} [items] Tags items + */ + + /** + * Constructs a new Tags. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Tags. + * @implements ITags + * @constructor + * @param {google.cloud.backupdr.v1.ITags=} [properties] Properties to set + */ + function Tags(properties) { + this.items = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Tags items. + * @member {Array.} items + * @memberof google.cloud.backupdr.v1.Tags + * @instance + */ + Tags.prototype.items = $util.emptyArray; + + /** + * Creates a new Tags instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {google.cloud.backupdr.v1.ITags=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Tags} Tags instance + */ + Tags.create = function create(properties) { + return new Tags(properties); + }; + + /** + * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {google.cloud.backupdr.v1.ITags} message Tags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tags.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.items[i]); + return writer; + }; + + /** + * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {google.cloud.backupdr.v1.ITags} message Tags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tags.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Tags message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Tags} Tags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tags.decode = function 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.backupdr.v1.Tags(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.items && message.items.length)) + message.items = []; + message.items.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Tags message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Tags} Tags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tags.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Tags message. + * @function verify + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Tags.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) + if (!$util.isString(message.items[i])) + return "items: string[] expected"; + } + return null; + }; + + /** + * Creates a Tags message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Tags} Tags + */ + Tags.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Tags) + return object; + var message = new $root.google.cloud.backupdr.v1.Tags(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".google.cloud.backupdr.v1.Tags.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) + message.items[i] = String(object.items[i]); + } + return message; + }; + + /** + * Creates a plain object from a Tags message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {google.cloud.backupdr.v1.Tags} message Tags + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Tags.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = message.items[j]; + } + return object; + }; + + /** + * Converts this Tags to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Tags + * @instance + * @returns {Object.} JSON object + */ + Tags.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Tags + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Tags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Tags"; + }; + + return Tags; + })(); + + v1.AttachedDisk = (function() { + + /** + * Properties of an AttachedDisk. + * @memberof google.cloud.backupdr.v1 + * @interface IAttachedDisk + * @property {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null} [initializeParams] AttachedDisk initializeParams + * @property {string|null} [deviceName] AttachedDisk deviceName + * @property {string|null} [kind] AttachedDisk kind + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskType|null} [diskTypeDeprecated] AttachedDisk diskTypeDeprecated + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskMode|null} [mode] AttachedDisk mode + * @property {string|null} [source] AttachedDisk source + * @property {number|Long|null} [index] AttachedDisk index + * @property {boolean|null} [boot] AttachedDisk boot + * @property {boolean|null} [autoDelete] AttachedDisk autoDelete + * @property {Array.|null} [license] AttachedDisk license + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null} [diskInterface] AttachedDisk diskInterface + * @property {Array.|null} [guestOsFeature] AttachedDisk guestOsFeature + * @property {google.cloud.backupdr.v1.ICustomerEncryptionKey|null} [diskEncryptionKey] AttachedDisk diskEncryptionKey + * @property {number|Long|null} [diskSizeGb] AttachedDisk diskSizeGb + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null} [savedState] AttachedDisk savedState + * @property {string|null} [diskType] AttachedDisk diskType + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskType|null} [type] AttachedDisk type + */ + + /** + * Constructs a new AttachedDisk. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AttachedDisk. + * @implements IAttachedDisk + * @constructor + * @param {google.cloud.backupdr.v1.IAttachedDisk=} [properties] Properties to set + */ + function AttachedDisk(properties) { + this.license = []; + this.guestOsFeature = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AttachedDisk initializeParams. + * @member {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null|undefined} initializeParams + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.initializeParams = null; + + /** + * AttachedDisk deviceName. + * @member {string|null|undefined} deviceName + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.deviceName = null; + + /** + * AttachedDisk kind. + * @member {string|null|undefined} kind + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.kind = null; + + /** + * AttachedDisk diskTypeDeprecated. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskType|null|undefined} diskTypeDeprecated + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskTypeDeprecated = null; + + /** + * AttachedDisk mode. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskMode|null|undefined} mode + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.mode = null; + + /** + * AttachedDisk source. + * @member {string|null|undefined} source + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.source = null; + + /** + * AttachedDisk index. + * @member {number|Long|null|undefined} index + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.index = null; + + /** + * AttachedDisk boot. + * @member {boolean|null|undefined} boot + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.boot = null; + + /** + * AttachedDisk autoDelete. + * @member {boolean|null|undefined} autoDelete + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.autoDelete = null; + + /** + * AttachedDisk license. + * @member {Array.} license + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.license = $util.emptyArray; + + /** + * AttachedDisk diskInterface. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null|undefined} diskInterface + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskInterface = null; + + /** + * AttachedDisk guestOsFeature. + * @member {Array.} guestOsFeature + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.guestOsFeature = $util.emptyArray; + + /** + * AttachedDisk diskEncryptionKey. + * @member {google.cloud.backupdr.v1.ICustomerEncryptionKey|null|undefined} diskEncryptionKey + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskEncryptionKey = null; + + /** + * AttachedDisk diskSizeGb. + * @member {number|Long|null|undefined} diskSizeGb + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskSizeGb = null; + + /** + * AttachedDisk savedState. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null|undefined} savedState + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.savedState = null; + + /** + * AttachedDisk diskType. + * @member {string|null|undefined} diskType + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskType = null; + + /** + * AttachedDisk type. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskType|null|undefined} type + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.type = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AttachedDisk _initializeParams. + * @member {"initializeParams"|undefined} _initializeParams + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_initializeParams", { + get: $util.oneOfGetter($oneOfFields = ["initializeParams"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _deviceName. + * @member {"deviceName"|undefined} _deviceName + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_deviceName", { + get: $util.oneOfGetter($oneOfFields = ["deviceName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _kind. + * @member {"kind"|undefined} _kind + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_kind", { + get: $util.oneOfGetter($oneOfFields = ["kind"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskTypeDeprecated. + * @member {"diskTypeDeprecated"|undefined} _diskTypeDeprecated + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskTypeDeprecated", { + get: $util.oneOfGetter($oneOfFields = ["diskTypeDeprecated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _mode. + * @member {"mode"|undefined} _mode + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_mode", { + get: $util.oneOfGetter($oneOfFields = ["mode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _source. + * @member {"source"|undefined} _source + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_source", { + get: $util.oneOfGetter($oneOfFields = ["source"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _index. + * @member {"index"|undefined} _index + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_index", { + get: $util.oneOfGetter($oneOfFields = ["index"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _boot. + * @member {"boot"|undefined} _boot + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_boot", { + get: $util.oneOfGetter($oneOfFields = ["boot"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _autoDelete. + * @member {"autoDelete"|undefined} _autoDelete + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_autoDelete", { + get: $util.oneOfGetter($oneOfFields = ["autoDelete"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskInterface. + * @member {"diskInterface"|undefined} _diskInterface + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskInterface", { + get: $util.oneOfGetter($oneOfFields = ["diskInterface"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskEncryptionKey. + * @member {"diskEncryptionKey"|undefined} _diskEncryptionKey + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskEncryptionKey", { + get: $util.oneOfGetter($oneOfFields = ["diskEncryptionKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskSizeGb. + * @member {"diskSizeGb"|undefined} _diskSizeGb + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskSizeGb", { + get: $util.oneOfGetter($oneOfFields = ["diskSizeGb"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _savedState. + * @member {"savedState"|undefined} _savedState + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_savedState", { + get: $util.oneOfGetter($oneOfFields = ["savedState"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskType. + * @member {"diskType"|undefined} _diskType + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskType", { + get: $util.oneOfGetter($oneOfFields = ["diskType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _type. + * @member {"type"|undefined} _type + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AttachedDisk instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {google.cloud.backupdr.v1.IAttachedDisk=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk instance + */ + AttachedDisk.create = function create(properties) { + return new AttachedDisk(properties); + }; + + /** + * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {google.cloud.backupdr.v1.IAttachedDisk} message AttachedDisk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttachedDisk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initializeParams != null && Object.hasOwnProperty.call(message, "initializeParams")) + $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.encode(message.initializeParams, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.deviceName); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.kind); + if (message.diskTypeDeprecated != null && Object.hasOwnProperty.call(message, "diskTypeDeprecated")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.diskTypeDeprecated); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.mode); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.source); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.index); + if (message.boot != null && Object.hasOwnProperty.call(message, "boot")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.boot); + if (message.autoDelete != null && Object.hasOwnProperty.call(message, "autoDelete")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.autoDelete); + if (message.license != null && message.license.length) + for (var i = 0; i < message.license.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.license[i]); + if (message.diskInterface != null && Object.hasOwnProperty.call(message, "diskInterface")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.diskInterface); + if (message.guestOsFeature != null && message.guestOsFeature.length) + for (var i = 0; i < message.guestOsFeature.length; ++i) + $root.google.cloud.backupdr.v1.GuestOsFeature.encode(message.guestOsFeature[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.diskEncryptionKey != null && Object.hasOwnProperty.call(message, "diskEncryptionKey")) + $root.google.cloud.backupdr.v1.CustomerEncryptionKey.encode(message.diskEncryptionKey, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 16, wireType 0 =*/128).int64(message.diskSizeGb); + if (message.savedState != null && Object.hasOwnProperty.call(message, "savedState")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.savedState); + if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.diskType); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.type); + return writer; + }; + + /** + * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {google.cloud.backupdr.v1.IAttachedDisk} message AttachedDisk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttachedDisk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AttachedDisk message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttachedDisk.decode = function 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.backupdr.v1.AttachedDisk(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.decode(reader, reader.uint32()); + break; + } + case 4: { + message.deviceName = reader.string(); + break; + } + case 5: { + message.kind = reader.string(); + break; + } + case 6: { + message.diskTypeDeprecated = reader.int32(); + break; + } + case 7: { + message.mode = reader.int32(); + break; + } + case 8: { + message.source = reader.string(); + break; + } + case 9: { + message.index = reader.int64(); + break; + } + case 10: { + message.boot = reader.bool(); + break; + } + case 11: { + message.autoDelete = reader.bool(); + break; + } + case 12: { + if (!(message.license && message.license.length)) + message.license = []; + message.license.push(reader.string()); + break; + } + case 13: { + message.diskInterface = reader.int32(); + break; + } + case 14: { + if (!(message.guestOsFeature && message.guestOsFeature.length)) + message.guestOsFeature = []; + message.guestOsFeature.push($root.google.cloud.backupdr.v1.GuestOsFeature.decode(reader, reader.uint32())); + break; + } + case 15: { + message.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader, reader.uint32()); + break; + } + case 16: { + message.diskSizeGb = reader.int64(); + break; + } + case 17: { + message.savedState = reader.int32(); + break; + } + case 18: { + message.diskType = reader.string(); + break; + } + case 19: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttachedDisk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AttachedDisk message. + * @function verify + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AttachedDisk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.initializeParams != null && message.hasOwnProperty("initializeParams")) { + properties._initializeParams = 1; + { + var error = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify(message.initializeParams); + if (error) + return "initializeParams." + error; + } + } + if (message.deviceName != null && message.hasOwnProperty("deviceName")) { + properties._deviceName = 1; + if (!$util.isString(message.deviceName)) + return "deviceName: string expected"; + } + if (message.kind != null && message.hasOwnProperty("kind")) { + properties._kind = 1; + if (!$util.isString(message.kind)) + return "kind: string expected"; + } + if (message.diskTypeDeprecated != null && message.hasOwnProperty("diskTypeDeprecated")) { + properties._diskTypeDeprecated = 1; + switch (message.diskTypeDeprecated) { + default: + return "diskTypeDeprecated: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.mode != null && message.hasOwnProperty("mode")) { + properties._mode = 1; + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.source != null && message.hasOwnProperty("source")) { + properties._source = 1; + if (!$util.isString(message.source)) + return "source: string expected"; + } + if (message.index != null && message.hasOwnProperty("index")) { + properties._index = 1; + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; + } + if (message.boot != null && message.hasOwnProperty("boot")) { + properties._boot = 1; + if (typeof message.boot !== "boolean") + return "boot: boolean expected"; + } + if (message.autoDelete != null && message.hasOwnProperty("autoDelete")) { + properties._autoDelete = 1; + if (typeof message.autoDelete !== "boolean") + return "autoDelete: boolean expected"; + } + if (message.license != null && message.hasOwnProperty("license")) { + if (!Array.isArray(message.license)) + return "license: array expected"; + for (var i = 0; i < message.license.length; ++i) + if (!$util.isString(message.license[i])) + return "license: string[] expected"; + } + if (message.diskInterface != null && message.hasOwnProperty("diskInterface")) { + properties._diskInterface = 1; + switch (message.diskInterface) { + default: + return "diskInterface: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.guestOsFeature != null && message.hasOwnProperty("guestOsFeature")) { + if (!Array.isArray(message.guestOsFeature)) + return "guestOsFeature: array expected"; + for (var i = 0; i < message.guestOsFeature.length; ++i) { + var error = $root.google.cloud.backupdr.v1.GuestOsFeature.verify(message.guestOsFeature[i]); + if (error) + return "guestOsFeature." + error; + } + } + if (message.diskEncryptionKey != null && message.hasOwnProperty("diskEncryptionKey")) { + properties._diskEncryptionKey = 1; + { + var error = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.verify(message.diskEncryptionKey); + if (error) + return "diskEncryptionKey." + error; + } + } + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) { + properties._diskSizeGb = 1; + if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) + return "diskSizeGb: integer|Long expected"; + } + if (message.savedState != null && message.hasOwnProperty("savedState")) { + properties._savedState = 1; + switch (message.savedState) { + default: + return "savedState: enum value expected"; + case 0: + case 1: + break; + } + } + if (message.diskType != null && message.hasOwnProperty("diskType")) { + properties._diskType = 1; + if (!$util.isString(message.diskType)) + return "diskType: string expected"; + } + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates an AttachedDisk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk + */ + AttachedDisk.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AttachedDisk) + return object; + var message = new $root.google.cloud.backupdr.v1.AttachedDisk(); + if (object.initializeParams != null) { + if (typeof object.initializeParams !== "object") + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.initializeParams: object expected"); + message.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.fromObject(object.initializeParams); + } + if (object.deviceName != null) + message.deviceName = String(object.deviceName); + if (object.kind != null) + message.kind = String(object.kind); + switch (object.diskTypeDeprecated) { + default: + if (typeof object.diskTypeDeprecated === "number") { + message.diskTypeDeprecated = object.diskTypeDeprecated; + break; + } + break; + case "DISK_TYPE_UNSPECIFIED": + case 0: + message.diskTypeDeprecated = 0; + break; + case "SCRATCH": + case 1: + message.diskTypeDeprecated = 1; + break; + case "PERSISTENT": + case 2: + message.diskTypeDeprecated = 2; + break; + } + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "DISK_MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "READ_WRITE": + case 1: + message.mode = 1; + break; + case "READ_ONLY": + case 2: + message.mode = 2; + break; + case "LOCKED": + case 3: + message.mode = 3; + break; + } + if (object.source != null) + message.source = String(object.source); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = false; + else if (typeof object.index === "string") + message.index = parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); + if (object.boot != null) + message.boot = Boolean(object.boot); + if (object.autoDelete != null) + message.autoDelete = Boolean(object.autoDelete); + if (object.license) { + if (!Array.isArray(object.license)) + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.license: array expected"); + message.license = []; + for (var i = 0; i < object.license.length; ++i) + message.license[i] = String(object.license[i]); + } + switch (object.diskInterface) { + default: + if (typeof object.diskInterface === "number") { + message.diskInterface = object.diskInterface; + break; + } + break; + case "DISK_INTERFACE_UNSPECIFIED": + case 0: + message.diskInterface = 0; + break; + case "SCSI": + case 1: + message.diskInterface = 1; + break; + case "NVME": + case 2: + message.diskInterface = 2; + break; + case "NVDIMM": + case 3: + message.diskInterface = 3; + break; + case "ISCSI": + case 4: + message.diskInterface = 4; + break; + } + if (object.guestOsFeature) { + if (!Array.isArray(object.guestOsFeature)) + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.guestOsFeature: array expected"); + message.guestOsFeature = []; + for (var i = 0; i < object.guestOsFeature.length; ++i) { + if (typeof object.guestOsFeature[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.guestOsFeature: object expected"); + message.guestOsFeature[i] = $root.google.cloud.backupdr.v1.GuestOsFeature.fromObject(object.guestOsFeature[i]); + } + } + if (object.diskEncryptionKey != null) { + if (typeof object.diskEncryptionKey !== "object") + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.diskEncryptionKey: object expected"); + message.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.fromObject(object.diskEncryptionKey); + } + if (object.diskSizeGb != null) + if ($util.Long) + (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; + else if (typeof object.diskSizeGb === "string") + message.diskSizeGb = parseInt(object.diskSizeGb, 10); + else if (typeof object.diskSizeGb === "number") + message.diskSizeGb = object.diskSizeGb; + else if (typeof object.diskSizeGb === "object") + message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); + switch (object.savedState) { + default: + if (typeof object.savedState === "number") { + message.savedState = object.savedState; + break; + } + break; + case "DISK_SAVED_STATE_UNSPECIFIED": + case 0: + message.savedState = 0; + break; + case "PRESERVED": + case 1: + message.savedState = 1; + break; + } + if (object.diskType != null) + message.diskType = String(object.diskType); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DISK_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "SCRATCH": + case 1: + message.type = 1; + break; + case "PERSISTENT": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk} message AttachedDisk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AttachedDisk.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.license = []; + object.guestOsFeature = []; + } + if (message.initializeParams != null && message.hasOwnProperty("initializeParams")) { + object.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.toObject(message.initializeParams, options); + if (options.oneofs) + object._initializeParams = "initializeParams"; + } + if (message.deviceName != null && message.hasOwnProperty("deviceName")) { + object.deviceName = message.deviceName; + if (options.oneofs) + object._deviceName = "deviceName"; + } + if (message.kind != null && message.hasOwnProperty("kind")) { + object.kind = message.kind; + if (options.oneofs) + object._kind = "kind"; + } + if (message.diskTypeDeprecated != null && message.hasOwnProperty("diskTypeDeprecated")) { + object.diskTypeDeprecated = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated] === undefined ? message.diskTypeDeprecated : $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated] : message.diskTypeDeprecated; + if (options.oneofs) + object._diskTypeDeprecated = "diskTypeDeprecated"; + } + if (message.mode != null && message.hasOwnProperty("mode")) { + object.mode = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode] === undefined ? message.mode : $root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode] : message.mode; + if (options.oneofs) + object._mode = "mode"; + } + if (message.source != null && message.hasOwnProperty("source")) { + object.source = message.source; + if (options.oneofs) + object._source = "source"; + } + if (message.index != null && message.hasOwnProperty("index")) { + if (typeof message.index === "number") + object.index = options.longs === String ? String(message.index) : message.index; + else + object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; + if (options.oneofs) + object._index = "index"; + } + if (message.boot != null && message.hasOwnProperty("boot")) { + object.boot = message.boot; + if (options.oneofs) + object._boot = "boot"; + } + if (message.autoDelete != null && message.hasOwnProperty("autoDelete")) { + object.autoDelete = message.autoDelete; + if (options.oneofs) + object._autoDelete = "autoDelete"; + } + if (message.license && message.license.length) { + object.license = []; + for (var j = 0; j < message.license.length; ++j) + object.license[j] = message.license[j]; + } + if (message.diskInterface != null && message.hasOwnProperty("diskInterface")) { + object.diskInterface = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskInterface[message.diskInterface] === undefined ? message.diskInterface : $root.google.cloud.backupdr.v1.AttachedDisk.DiskInterface[message.diskInterface] : message.diskInterface; + if (options.oneofs) + object._diskInterface = "diskInterface"; + } + if (message.guestOsFeature && message.guestOsFeature.length) { + object.guestOsFeature = []; + for (var j = 0; j < message.guestOsFeature.length; ++j) + object.guestOsFeature[j] = $root.google.cloud.backupdr.v1.GuestOsFeature.toObject(message.guestOsFeature[j], options); + } + if (message.diskEncryptionKey != null && message.hasOwnProperty("diskEncryptionKey")) { + object.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.toObject(message.diskEncryptionKey, options); + if (options.oneofs) + object._diskEncryptionKey = "diskEncryptionKey"; + } + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) { + if (typeof message.diskSizeGb === "number") + object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; + else + object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; + if (options.oneofs) + object._diskSizeGb = "diskSizeGb"; + } + if (message.savedState != null && message.hasOwnProperty("savedState")) { + object.savedState = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState] === undefined ? message.savedState : $root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState] : message.savedState; + if (options.oneofs) + object._savedState = "savedState"; + } + if (message.diskType != null && message.hasOwnProperty("diskType")) { + object.diskType = message.diskType; + if (options.oneofs) + object._diskType = "diskType"; + } + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + return object; + }; + + /** + * Converts this AttachedDisk to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + * @returns {Object.} JSON object + */ + AttachedDisk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AttachedDisk + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AttachedDisk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AttachedDisk"; + }; + + AttachedDisk.InitializeParams = (function() { + + /** + * Properties of an InitializeParams. + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @interface IInitializeParams + * @property {string|null} [diskName] InitializeParams diskName + * @property {Array.|null} [replicaZones] InitializeParams replicaZones + */ + + /** + * Constructs a new InitializeParams. + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @classdesc Represents an InitializeParams. + * @implements IInitializeParams + * @constructor + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams=} [properties] Properties to set + */ + function InitializeParams(properties) { + this.replicaZones = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InitializeParams diskName. + * @member {string|null|undefined} diskName + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + */ + InitializeParams.prototype.diskName = null; + + /** + * InitializeParams replicaZones. + * @member {Array.} replicaZones + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + */ + InitializeParams.prototype.replicaZones = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InitializeParams _diskName. + * @member {"diskName"|undefined} _diskName + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + */ + Object.defineProperty(InitializeParams.prototype, "_diskName", { + get: $util.oneOfGetter($oneOfFields = ["diskName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InitializeParams instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams instance + */ + InitializeParams.create = function create(properties) { + return new InitializeParams(properties); + }; + + /** + * Encodes the specified InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams} message InitializeParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitializeParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.diskName != null && Object.hasOwnProperty.call(message, "diskName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.diskName); + if (message.replicaZones != null && message.replicaZones.length) + for (var i = 0; i < message.replicaZones.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.replicaZones[i]); + return writer; + }; + + /** + * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams} message InitializeParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitializeParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InitializeParams message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitializeParams.decode = function 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.backupdr.v1.AttachedDisk.InitializeParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.diskName = reader.string(); + break; + } + case 2: { + if (!(message.replicaZones && message.replicaZones.length)) + message.replicaZones = []; + message.replicaZones.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InitializeParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitializeParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InitializeParams message. + * @function verify + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InitializeParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.diskName != null && message.hasOwnProperty("diskName")) { + properties._diskName = 1; + if (!$util.isString(message.diskName)) + return "diskName: string expected"; + } + if (message.replicaZones != null && message.hasOwnProperty("replicaZones")) { + if (!Array.isArray(message.replicaZones)) + return "replicaZones: array expected"; + for (var i = 0; i < message.replicaZones.length; ++i) + if (!$util.isString(message.replicaZones[i])) + return "replicaZones: string[] expected"; + } + return null; + }; + + /** + * Creates an InitializeParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams + */ + InitializeParams.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams) + return object; + var message = new $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams(); + if (object.diskName != null) + message.diskName = String(object.diskName); + if (object.replicaZones) { + if (!Array.isArray(object.replicaZones)) + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.InitializeParams.replicaZones: array expected"); + message.replicaZones = []; + for (var i = 0; i < object.replicaZones.length; ++i) + message.replicaZones[i] = String(object.replicaZones[i]); + } + return message; + }; + + /** + * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} message InitializeParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InitializeParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.replicaZones = []; + if (message.diskName != null && message.hasOwnProperty("diskName")) { + object.diskName = message.diskName; + if (options.oneofs) + object._diskName = "diskName"; + } + if (message.replicaZones && message.replicaZones.length) { + object.replicaZones = []; + for (var j = 0; j < message.replicaZones.length; ++j) + object.replicaZones[j] = message.replicaZones[j]; + } + return object; + }; + + /** + * Converts this InitializeParams to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + * @returns {Object.} JSON object + */ + InitializeParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InitializeParams + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InitializeParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AttachedDisk.InitializeParams"; + }; + + return InitializeParams; + })(); + + /** + * DiskType enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskType + * @enum {number} + * @property {number} DISK_TYPE_UNSPECIFIED=0 DISK_TYPE_UNSPECIFIED value + * @property {number} SCRATCH=1 SCRATCH value + * @property {number} PERSISTENT=2 PERSISTENT value + */ + AttachedDisk.DiskType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCRATCH"] = 1; + values[valuesById[2] = "PERSISTENT"] = 2; + return values; + })(); + + /** + * DiskMode enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskMode + * @enum {number} + * @property {number} DISK_MODE_UNSPECIFIED=0 DISK_MODE_UNSPECIFIED value + * @property {number} READ_WRITE=1 READ_WRITE value + * @property {number} READ_ONLY=2 READ_ONLY value + * @property {number} LOCKED=3 LOCKED value + */ + AttachedDisk.DiskMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READ_WRITE"] = 1; + values[valuesById[2] = "READ_ONLY"] = 2; + values[valuesById[3] = "LOCKED"] = 3; + return values; + })(); + + /** + * DiskInterface enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskInterface + * @enum {number} + * @property {number} DISK_INTERFACE_UNSPECIFIED=0 DISK_INTERFACE_UNSPECIFIED value + * @property {number} SCSI=1 SCSI value + * @property {number} NVME=2 NVME value + * @property {number} NVDIMM=3 NVDIMM value + * @property {number} ISCSI=4 ISCSI value + */ + AttachedDisk.DiskInterface = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_INTERFACE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCSI"] = 1; + values[valuesById[2] = "NVME"] = 2; + values[valuesById[3] = "NVDIMM"] = 3; + values[valuesById[4] = "ISCSI"] = 4; + return values; + })(); + + /** + * DiskSavedState enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskSavedState + * @enum {number} + * @property {number} DISK_SAVED_STATE_UNSPECIFIED=0 DISK_SAVED_STATE_UNSPECIFIED value + * @property {number} PRESERVED=1 PRESERVED value + */ + AttachedDisk.DiskSavedState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_SAVED_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRESERVED"] = 1; + return values; + })(); + + return AttachedDisk; + })(); + + v1.GuestOsFeature = (function() { + + /** + * Properties of a GuestOsFeature. + * @memberof google.cloud.backupdr.v1 + * @interface IGuestOsFeature + * @property {google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null} [type] GuestOsFeature type + */ + + /** + * Constructs a new GuestOsFeature. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GuestOsFeature. + * @implements IGuestOsFeature + * @constructor + * @param {google.cloud.backupdr.v1.IGuestOsFeature=} [properties] Properties to set + */ + function GuestOsFeature(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GuestOsFeature type. + * @member {google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null|undefined} type + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @instance + */ + GuestOsFeature.prototype.type = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GuestOsFeature _type. + * @member {"type"|undefined} _type + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @instance + */ + Object.defineProperty(GuestOsFeature.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GuestOsFeature instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.IGuestOsFeature=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature instance + */ + GuestOsFeature.create = function create(properties) { + return new GuestOsFeature(properties); + }; + + /** + * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.IGuestOsFeature} message GuestOsFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GuestOsFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + return writer; + }; + + /** + * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.IGuestOsFeature} message GuestOsFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GuestOsFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GuestOsFeature message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GuestOsFeature.decode = function 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.backupdr.v1.GuestOsFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GuestOsFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GuestOsFeature message. + * @function verify + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GuestOsFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + break; + } + } + return null; + }; + + /** + * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature + */ + GuestOsFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GuestOsFeature) + return object; + var message = new $root.google.cloud.backupdr.v1.GuestOsFeature(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "FEATURE_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "VIRTIO_SCSI_MULTIQUEUE": + case 1: + message.type = 1; + break; + case "WINDOWS": + case 2: + message.type = 2; + break; + case "MULTI_IP_SUBNET": + case 3: + message.type = 3; + break; + case "UEFI_COMPATIBLE": + case 4: + message.type = 4; + break; + case "SECURE_BOOT": + case 5: + message.type = 5; + break; + case "GVNIC": + case 6: + message.type = 6; + break; + case "SEV_CAPABLE": + case 7: + message.type = 7; + break; + case "BARE_METAL_LINUX_COMPATIBLE": + case 8: + message.type = 8; + break; + case "SUSPEND_RESUME_COMPATIBLE": + case 9: + message.type = 9; + break; + case "SEV_LIVE_MIGRATABLE": + case 10: + message.type = 10; + break; + case "SEV_SNP_CAPABLE": + case 11: + message.type = 11; + break; + case "TDX_CAPABLE": + case 12: + message.type = 12; + break; + case "IDPF": + case 13: + message.type = 13; + break; + case "SEV_LIVE_MIGRATABLE_V2": + case 14: + message.type = 14; + break; + } + return message; + }; + + /** + * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.GuestOsFeature} message GuestOsFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GuestOsFeature.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + return object; + }; + + /** + * Converts this GuestOsFeature to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @instance + * @returns {Object.} JSON object + */ + GuestOsFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GuestOsFeature + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GuestOsFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GuestOsFeature"; + }; + + /** + * FeatureType enum. + * @name google.cloud.backupdr.v1.GuestOsFeature.FeatureType + * @enum {number} + * @property {number} FEATURE_TYPE_UNSPECIFIED=0 FEATURE_TYPE_UNSPECIFIED value + * @property {number} VIRTIO_SCSI_MULTIQUEUE=1 VIRTIO_SCSI_MULTIQUEUE value + * @property {number} WINDOWS=2 WINDOWS value + * @property {number} MULTI_IP_SUBNET=3 MULTI_IP_SUBNET value + * @property {number} UEFI_COMPATIBLE=4 UEFI_COMPATIBLE value + * @property {number} SECURE_BOOT=5 SECURE_BOOT value + * @property {number} GVNIC=6 GVNIC value + * @property {number} SEV_CAPABLE=7 SEV_CAPABLE value + * @property {number} BARE_METAL_LINUX_COMPATIBLE=8 BARE_METAL_LINUX_COMPATIBLE value + * @property {number} SUSPEND_RESUME_COMPATIBLE=9 SUSPEND_RESUME_COMPATIBLE value + * @property {number} SEV_LIVE_MIGRATABLE=10 SEV_LIVE_MIGRATABLE value + * @property {number} SEV_SNP_CAPABLE=11 SEV_SNP_CAPABLE value + * @property {number} TDX_CAPABLE=12 TDX_CAPABLE value + * @property {number} IDPF=13 IDPF value + * @property {number} SEV_LIVE_MIGRATABLE_V2=14 SEV_LIVE_MIGRATABLE_V2 value + */ + GuestOsFeature.FeatureType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FEATURE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VIRTIO_SCSI_MULTIQUEUE"] = 1; + values[valuesById[2] = "WINDOWS"] = 2; + values[valuesById[3] = "MULTI_IP_SUBNET"] = 3; + values[valuesById[4] = "UEFI_COMPATIBLE"] = 4; + values[valuesById[5] = "SECURE_BOOT"] = 5; + values[valuesById[6] = "GVNIC"] = 6; + values[valuesById[7] = "SEV_CAPABLE"] = 7; + values[valuesById[8] = "BARE_METAL_LINUX_COMPATIBLE"] = 8; + values[valuesById[9] = "SUSPEND_RESUME_COMPATIBLE"] = 9; + values[valuesById[10] = "SEV_LIVE_MIGRATABLE"] = 10; + values[valuesById[11] = "SEV_SNP_CAPABLE"] = 11; + values[valuesById[12] = "TDX_CAPABLE"] = 12; + values[valuesById[13] = "IDPF"] = 13; + values[valuesById[14] = "SEV_LIVE_MIGRATABLE_V2"] = 14; + return values; + })(); + + return GuestOsFeature; + })(); + + /** + * KeyRevocationActionType enum. + * @name google.cloud.backupdr.v1.KeyRevocationActionType + * @enum {number} + * @property {number} KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED=0 KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} STOP=2 STOP value + */ + v1.KeyRevocationActionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "STOP"] = 2; + return values; + })(); + + return v1; + })(); + + return backupdr; + })(); + + 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.FieldInfo = (function() { + + /** + * Properties of a FieldInfo. + * @memberof google.api + * @interface IFieldInfo + * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format + */ + + /** + * Constructs a new FieldInfo. + * @memberof google.api + * @classdesc Represents a FieldInfo. + * @implements IFieldInfo + * @constructor + * @param {google.api.IFieldInfo=} [properties] Properties to set + */ + function FieldInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldInfo format. + * @member {google.api.FieldInfo.Format} format + * @memberof google.api.FieldInfo + * @instance + */ + FieldInfo.prototype.format = 0; + + /** + * Creates a new FieldInfo instance using the specified properties. + * @function create + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo=} [properties] Properties to set + * @returns {google.api.FieldInfo} FieldInfo instance + */ + FieldInfo.create = function create(properties) { + return new FieldInfo(properties); + }; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encode + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + return writer; + }; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @function decode + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decode = function 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.FieldInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.format = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldInfo message. + * @function verify + * @memberof google.api.FieldInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.FieldInfo + * @static + * @param {Object.} object Plain object + * @returns {google.api.FieldInfo} FieldInfo + */ + FieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.FieldInfo) + return object; + var message = new $root.google.api.FieldInfo(); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "UUID4": + case 1: + message.format = 1; + break; + case "IPV4": + case 2: + message.format = 2; + break; + case "IPV6": + case 3: + message.format = 3; + break; + case "IPV4_OR_IPV6": + case 4: + message.format = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.FieldInfo + * @static + * @param {google.api.FieldInfo} message FieldInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; + return object; + }; + + /** + * Converts this FieldInfo to JSON. + * @function toJSON + * @memberof google.api.FieldInfo + * @instance + * @returns {Object.} JSON object + */ + FieldInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldInfo + * @function getTypeUrl + * @memberof google.api.FieldInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.FieldInfo"; + }; + + /** + * Format enum. + * @name google.api.FieldInfo.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} UUID4=1 UUID4 value + * @property {number} IPV4=2 IPV4 value + * @property {number} IPV6=3 IPV6 value + * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value + */ + FieldInfo.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "UUID4"] = 1; + values[valuesById[2] = "IPV4"] = 2; + values[valuesById[3] = "IPV6"] = 3; + values[valuesById[4] = "IPV4_OR_IPV6"] = 4; + return values; + })(); + + return FieldInfo; + })(); + + 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.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo + * @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.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = null; + + /** + * 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(); + if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) + $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).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 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + 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.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { + var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); + if (error) + return ".google.api.fieldInfo." + error; + } + 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.fieldInfo"] != null) { + if (typeof object[".google.api.fieldInfo"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); + } + 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; + object[".google.api.fieldInfo"] = 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); + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) + object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], 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.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; + })(); + + 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.DoubleValue = (function() { + + /** + * Properties of a DoubleValue. + * @memberof google.protobuf + * @interface IDoubleValue + * @property {number|null} [value] DoubleValue value + */ + + /** + * Constructs a new DoubleValue. + * @memberof google.protobuf + * @classdesc Represents a DoubleValue. + * @implements IDoubleValue + * @constructor + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + */ + function DoubleValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DoubleValue value. + * @member {number} value + * @memberof google.protobuf.DoubleValue + * @instance + */ + DoubleValue.prototype.value = 0; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @function create + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * @returns {google.protobuf.DoubleValue} DoubleValue instance + */ + DoubleValue.create = function create(properties) { + return new DoubleValue(properties); + }; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + return writer; + }; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decode = function 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.DoubleValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DoubleValue message. + * @function verify + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DoubleValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DoubleValue} DoubleValue + */ + DoubleValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DoubleValue) + return object; + var message = new $root.google.protobuf.DoubleValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DoubleValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this DoubleValue to JSON. + * @function toJSON + * @memberof google.protobuf.DoubleValue + * @instance + * @returns {Object.} JSON object + */ + DoubleValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DoubleValue + * @function getTypeUrl + * @memberof google.protobuf.DoubleValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DoubleValue"; + }; + + return DoubleValue; + })(); + + protobuf.FloatValue = (function() { + + /** + * Properties of a FloatValue. + * @memberof google.protobuf + * @interface IFloatValue + * @property {number|null} [value] FloatValue value + */ + + /** + * Constructs a new FloatValue. + * @memberof google.protobuf + * @classdesc Represents a FloatValue. + * @implements IFloatValue + * @constructor + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + */ + function FloatValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FloatValue value. + * @member {number} value + * @memberof google.protobuf.FloatValue + * @instance + */ + FloatValue.prototype.value = 0; + + /** + * Creates a new FloatValue instance using the specified properties. + * @function create + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @returns {google.protobuf.FloatValue} FloatValue instance + */ + FloatValue.create = function create(properties) { + return new FloatValue(properties); + }; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); + return writer; + }; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decode = function 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.FloatValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FloatValue message. + * @function verify + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FloatValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FloatValue} FloatValue + */ + FloatValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FloatValue) + return object; + var message = new $root.google.protobuf.FloatValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.FloatValue} message FloatValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FloatValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this FloatValue to JSON. + * @function toJSON + * @memberof google.protobuf.FloatValue + * @instance + * @returns {Object.} JSON object + */ + FloatValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FloatValue + * @function getTypeUrl + * @memberof google.protobuf.FloatValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FloatValue"; + }; + + return FloatValue; + })(); + + protobuf.Int64Value = (function() { + + /** + * Properties of an Int64Value. + * @memberof google.protobuf + * @interface IInt64Value + * @property {number|Long|null} [value] Int64Value value + */ + + /** + * Constructs a new Int64Value. + * @memberof google.protobuf + * @classdesc Represents an Int64Value. + * @implements IInt64Value + * @constructor + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + */ + function Int64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int64Value value. + * @member {number|Long} value + * @memberof google.protobuf.Int64Value + * @instance + */ + Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Int64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + * @returns {google.protobuf.Int64Value} Int64Value instance + */ + Int64Value.create = function create(properties) { + return new Int64Value(properties); + }; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); + return writer; + }; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decode = function 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.Int64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int64Value message. + * @function verify + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int64Value} Int64Value + */ + Int64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int64Value) + return object; + var message = new $root.google.protobuf.Int64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.Int64Value} message Int64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int64Value.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.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + return object; + }; + + /** + * Converts this Int64Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int64Value + * @instance + * @returns {Object.} JSON object + */ + Int64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int64Value + * @function getTypeUrl + * @memberof google.protobuf.Int64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int64Value"; + }; + + return Int64Value; + })(); + + protobuf.UInt64Value = (function() { + + /** + * Properties of a UInt64Value. + * @memberof google.protobuf + * @interface IUInt64Value + * @property {number|Long|null} [value] UInt64Value value + */ + + /** + * Constructs a new UInt64Value. + * @memberof google.protobuf + * @classdesc Represents a UInt64Value. + * @implements IUInt64Value + * @constructor + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + */ + function UInt64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt64Value value. + * @member {number|Long} value + * @memberof google.protobuf.UInt64Value + * @instance + */ + UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new UInt64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @returns {google.protobuf.UInt64Value} UInt64Value instance + */ + UInt64Value.create = function create(properties) { + return new UInt64Value(properties); + }; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); + return writer; + }; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decode = function 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.UInt64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt64Value message. + * @function verify + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt64Value} UInt64Value + */ + UInt64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt64Value) + return object; + var message = new $root.google.protobuf.UInt64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = true; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.UInt64Value} message UInt64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt64Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + return object; + }; + + /** + * Converts this UInt64Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt64Value + * @instance + * @returns {Object.} JSON object + */ + UInt64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UInt64Value + * @function getTypeUrl + * @memberof google.protobuf.UInt64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt64Value"; + }; + + return UInt64Value; + })(); + + protobuf.Int32Value = (function() { + + /** + * Properties of an Int32Value. + * @memberof google.protobuf + * @interface IInt32Value + * @property {number|null} [value] Int32Value value + */ + + /** + * Constructs a new Int32Value. + * @memberof google.protobuf + * @classdesc Represents an Int32Value. + * @implements IInt32Value + * @constructor + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + */ + function Int32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int32Value value. + * @member {number} value + * @memberof google.protobuf.Int32Value + * @instance + */ + Int32Value.prototype.value = 0; + + /** + * Creates a new Int32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @returns {google.protobuf.Int32Value} Int32Value instance + */ + Int32Value.create = function create(properties) { + return new Int32Value(properties); + }; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); + return writer; + }; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decode = function 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.Int32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int32Value message. + * @function verify + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int32Value} Int32Value + */ + Int32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int32Value) + return object; + var message = new $root.google.protobuf.Int32Value(); + if (object.value != null) + message.value = object.value | 0; + return message; + }; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.Int32Value} message Int32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this Int32Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int32Value + * @instance + * @returns {Object.} JSON object + */ + Int32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int32Value + * @function getTypeUrl + * @memberof google.protobuf.Int32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int32Value"; + }; + + return Int32Value; + })(); + + protobuf.UInt32Value = (function() { + + /** + * Properties of a UInt32Value. + * @memberof google.protobuf + * @interface IUInt32Value + * @property {number|null} [value] UInt32Value value + */ + + /** + * Constructs a new UInt32Value. + * @memberof google.protobuf + * @classdesc Represents a UInt32Value. + * @implements IUInt32Value + * @constructor + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + */ + function UInt32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt32Value value. + * @member {number} value + * @memberof google.protobuf.UInt32Value + * @instance + */ + UInt32Value.prototype.value = 0; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * @returns {google.protobuf.UInt32Value} UInt32Value instance + */ + UInt32Value.create = function create(properties) { + return new UInt32Value(properties); + }; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); + return writer; + }; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decode = function 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.UInt32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt32Value message. + * @function verify + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt32Value} UInt32Value + */ + UInt32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt32Value) + return object; + var message = new $root.google.protobuf.UInt32Value(); + if (object.value != null) + message.value = object.value >>> 0; + return message; + }; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this UInt32Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt32Value + * @instance + * @returns {Object.} JSON object + */ + UInt32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UInt32Value + * @function getTypeUrl + * @memberof google.protobuf.UInt32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt32Value"; + }; + + return UInt32Value; + })(); + + protobuf.BoolValue = (function() { + + /** + * Properties of a BoolValue. + * @memberof google.protobuf + * @interface IBoolValue + * @property {boolean|null} [value] BoolValue value + */ + + /** + * Constructs a new BoolValue. + * @memberof google.protobuf + * @classdesc Represents a BoolValue. + * @implements IBoolValue + * @constructor + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + */ + function BoolValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BoolValue value. + * @member {boolean} value + * @memberof google.protobuf.BoolValue + * @instance + */ + BoolValue.prototype.value = false; + + /** + * Creates a new BoolValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @returns {google.protobuf.BoolValue} BoolValue instance + */ + BoolValue.create = function create(properties) { + return new BoolValue(properties); + }; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); + return writer; + }; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decode = function 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.BoolValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoolValue message. + * @function verify + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BoolValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "boolean") + return "value: boolean expected"; + return null; + }; + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BoolValue} BoolValue + */ + BoolValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BoolValue) + return object; + var message = new $root.google.protobuf.BoolValue(); + if (object.value != null) + message.value = Boolean(object.value); + return message; + }; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.BoolValue} message BoolValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BoolValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = false; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this BoolValue to JSON. + * @function toJSON + * @memberof google.protobuf.BoolValue + * @instance + * @returns {Object.} JSON object + */ + BoolValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BoolValue + * @function getTypeUrl + * @memberof google.protobuf.BoolValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BoolValue"; + }; + + return BoolValue; + })(); + + protobuf.StringValue = (function() { + + /** + * Properties of a StringValue. + * @memberof google.protobuf + * @interface IStringValue + * @property {string|null} [value] StringValue value + */ + + /** + * Constructs a new StringValue. + * @memberof google.protobuf + * @classdesc Represents a StringValue. + * @implements IStringValue + * @constructor + * @param {google.protobuf.IStringValue=} [properties] Properties to set + */ + function StringValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringValue value. + * @member {string} value + * @memberof google.protobuf.StringValue + * @instance + */ + StringValue.prototype.value = ""; + + /** + * Creates a new StringValue instance using the specified properties. + * @function create + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @returns {google.protobuf.StringValue} StringValue instance + */ + StringValue.create = function create(properties) { + return new StringValue(properties); + }; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decode = function 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.StringValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringValue message. + * @function verify + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.StringValue} StringValue + */ + StringValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.StringValue) + return object; + var message = new $root.google.protobuf.StringValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.StringValue} message StringValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this StringValue to JSON. + * @function toJSON + * @memberof google.protobuf.StringValue + * @instance + * @returns {Object.} JSON object + */ + StringValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringValue + * @function getTypeUrl + * @memberof google.protobuf.StringValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.StringValue"; + }; + + return StringValue; + })(); + + protobuf.BytesValue = (function() { + + /** + * Properties of a BytesValue. + * @memberof google.protobuf + * @interface IBytesValue + * @property {Uint8Array|null} [value] BytesValue value + */ + + /** + * Constructs a new BytesValue. + * @memberof google.protobuf + * @classdesc Represents a BytesValue. + * @implements IBytesValue + * @constructor + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + */ + function BytesValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BytesValue value. + * @member {Uint8Array} value + * @memberof google.protobuf.BytesValue + * @instance + */ + BytesValue.prototype.value = $util.newBuffer([]); + + /** + * Creates a new BytesValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * @returns {google.protobuf.BytesValue} BytesValue instance + */ + BytesValue.create = function create(properties) { + return new BytesValue(properties); + }; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decode = function 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.BytesValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BytesValue message. + * @function verify + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BytesValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 a BytesValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BytesValue} BytesValue + */ + BytesValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BytesValue) + return object; + var message = new $root.google.protobuf.BytesValue(); + 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 a BytesValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.BytesValue} message BytesValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BytesValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + 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 BytesValue to JSON. + * @function toJSON + * @memberof google.protobuf.BytesValue + * @instance + * @returns {Object.} JSON object + */ + BytesValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BytesValue + * @function getTypeUrl + * @memberof google.protobuf.BytesValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BytesValue"; + }; + + return BytesValue; + })(); + + return protobuf; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + /** + * DayOfWeek enum. + * @name google.type.DayOfWeek + * @enum {number} + * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value + * @property {number} MONDAY=1 MONDAY value + * @property {number} TUESDAY=2 TUESDAY value + * @property {number} WEDNESDAY=3 WEDNESDAY value + * @property {number} THURSDAY=4 THURSDAY value + * @property {number} FRIDAY=5 FRIDAY value + * @property {number} SATURDAY=6 SATURDAY value + * @property {number} SUNDAY=7 SUNDAY value + */ + type.DayOfWeek = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; + values[valuesById[1] = "MONDAY"] = 1; + values[valuesById[2] = "TUESDAY"] = 2; + values[valuesById[3] = "WEDNESDAY"] = 3; + values[valuesById[4] = "THURSDAY"] = 4; + values[valuesById[5] = "FRIDAY"] = 5; + values[valuesById[6] = "SATURDAY"] = 6; + values[valuesById[7] = "SUNDAY"] = 7; + return values; + })(); + + /** + * Month enum. + * @name google.type.Month + * @enum {number} + * @property {number} MONTH_UNSPECIFIED=0 MONTH_UNSPECIFIED value + * @property {number} JANUARY=1 JANUARY value + * @property {number} FEBRUARY=2 FEBRUARY value + * @property {number} MARCH=3 MARCH value + * @property {number} APRIL=4 APRIL value + * @property {number} MAY=5 MAY value + * @property {number} JUNE=6 JUNE value + * @property {number} JULY=7 JULY value + * @property {number} AUGUST=8 AUGUST value + * @property {number} SEPTEMBER=9 SEPTEMBER value + * @property {number} OCTOBER=10 OCTOBER value + * @property {number} NOVEMBER=11 NOVEMBER value + * @property {number} DECEMBER=12 DECEMBER value + */ + type.Month = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MONTH_UNSPECIFIED"] = 0; + values[valuesById[1] = "JANUARY"] = 1; + values[valuesById[2] = "FEBRUARY"] = 2; + values[valuesById[3] = "MARCH"] = 3; + values[valuesById[4] = "APRIL"] = 4; + values[valuesById[5] = "MAY"] = 5; + values[valuesById[6] = "JUNE"] = 6; + values[valuesById[7] = "JULY"] = 7; + values[valuesById[8] = "AUGUST"] = 8; + values[valuesById[9] = "SEPTEMBER"] = 9; + values[valuesById[10] = "OCTOBER"] = 10; + values[valuesById[11] = "NOVEMBER"] = 11; + values[valuesById[12] = "DECEMBER"] = 12; + return values; + })(); + + type.Expr = (function() { + + /** + * Properties of an Expr. + * @memberof google.type + * @interface IExpr + * @property {string|null} [expression] Expr expression + * @property {string|null} [title] Expr title + * @property {string|null} [description] Expr description + * @property {string|null} [location] Expr location + */ + + /** + * Constructs a new Expr. + * @memberof google.type + * @classdesc Represents an Expr. + * @implements IExpr + * @constructor + * @param {google.type.IExpr=} [properties] Properties to set + */ + function Expr(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Expr expression. + * @member {string} expression + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.expression = ""; + + /** + * Expr title. + * @member {string} title + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.title = ""; + + /** + * Expr description. + * @member {string} description + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.description = ""; + + /** + * Expr location. + * @member {string} location + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.location = ""; + + /** + * Creates a new Expr instance using the specified properties. + * @function create + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr=} [properties] Properties to set + * @returns {google.type.Expr} Expr instance + */ + Expr.create = function create(properties) { + return new Expr(properties); + }; + + /** + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @function encode + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr} message Expr message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Expr.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); + return writer; + }; + + /** + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Expr + * @static + * @param {google.type.IExpr} message Expr message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Expr.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Expr message from the specified reader or buffer. + * @function decode + * @memberof google.type.Expr + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Expr} Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Expr.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Expr(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.expression = reader.string(); + break; + } + case 2: { + message.title = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.location = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Expr message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Expr + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Expr} Expr + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Expr.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Expr message. + * @function verify + * @memberof google.type.Expr + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Expr.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates an Expr message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Expr + * @static + * @param {Object.} object Plain object + * @returns {google.type.Expr} Expr + */ + Expr.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Expr) + return object; + var message = new $root.google.type.Expr(); + if (object.expression != null) + message.expression = String(object.expression); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Expr + * @static + * @param {google.type.Expr} message Expr + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Expr.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.expression = ""; + object.title = ""; + object.description = ""; + object.location = ""; + } + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + return object; + }; + + /** + * Converts this Expr to JSON. + * @function toJSON + * @memberof google.type.Expr + * @instance + * @returns {Object.} JSON object + */ + Expr.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Expr + * @function getTypeUrl + * @memberof google.type.Expr + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Expr.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Expr"; + }; + + return Expr; + })(); + + return type; + })(); + + 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; + })(); + + google.iam = (function() { + + /** + * Namespace iam. + * @memberof google + * @namespace + */ + var iam = {}; + + iam.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.iam + * @namespace + */ + var v1 = {}; + + v1.IAMPolicy = (function() { + + /** + * Constructs a new IAMPolicy service. + * @memberof google.iam.v1 + * @classdesc Represents a IAMPolicy + * @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 IAMPolicy(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (IAMPolicy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IAMPolicy; + + /** + * Creates new IAMPolicy service using the specified rpc implementation. + * @function create + * @memberof google.iam.v1.IAMPolicy + * @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 {IAMPolicy} RPC service. Useful where requests and/or responses are streamed. + */ + IAMPolicy.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. + * @memberof google.iam.v1.IAMPolicy + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.iam.v1.IAMPolicy.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. + * @memberof google.iam.v1.IAMPolicy + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.iam.v1.IAMPolicy.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. + * @memberof google.iam.v1.IAMPolicy + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.iam.v1.IAMPolicy.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return IAMPolicy; + })(); + + v1.SetIamPolicyRequest = (function() { + + /** + * Properties of a SetIamPolicyRequest. + * @memberof google.iam.v1 + * @interface ISetIamPolicyRequest + * @property {string|null} [resource] SetIamPolicyRequest resource + * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy + * @property {google.protobuf.IFieldMask|null} [updateMask] SetIamPolicyRequest updateMask + */ + + /** + * Constructs a new SetIamPolicyRequest. + * @memberof google.iam.v1 + * @classdesc Represents a SetIamPolicyRequest. + * @implements ISetIamPolicyRequest + * @constructor + * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set + */ + function SetIamPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetIamPolicyRequest resource. + * @member {string} resource + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.resource = ""; + + /** + * SetIamPolicyRequest policy. + * @member {google.iam.v1.IPolicy|null|undefined} policy + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.policy = null; + + /** + * SetIamPolicyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.updateMask = null; + + /** + * Creates a new SetIamPolicyRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest instance + */ + SetIamPolicyRequest.create = function create(properties) { + return new SetIamPolicyRequest(properties); + }; + + /** + * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetIamPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) + $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetIamPolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.SetIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetIamPolicyRequest message. + * @function verify + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetIamPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.policy != null && message.hasOwnProperty("policy")) { + var error = $root.google.iam.v1.Policy.verify(message.policy); + if (error) + return "policy." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + */ + SetIamPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.SetIamPolicyRequest) + return object; + var message = new $root.google.iam.v1.SetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.policy != null) { + if (typeof object.policy !== "object") + throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); + message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.SetIamPolicyRequest} message SetIamPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetIamPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.policy = null; + object.updateMask = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.policy != null && message.hasOwnProperty("policy")) + object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this SetIamPolicyRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + SetIamPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetIamPolicyRequest + * @function getTypeUrl + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.SetIamPolicyRequest"; + }; + + return SetIamPolicyRequest; + })(); + + v1.GetIamPolicyRequest = (function() { + + /** + * Properties of a GetIamPolicyRequest. + * @memberof google.iam.v1 + * @interface IGetIamPolicyRequest + * @property {string|null} [resource] GetIamPolicyRequest resource + * @property {google.iam.v1.IGetPolicyOptions|null} [options] GetIamPolicyRequest options + */ + + /** + * Constructs a new GetIamPolicyRequest. + * @memberof google.iam.v1 + * @classdesc Represents a GetIamPolicyRequest. + * @implements IGetIamPolicyRequest + * @constructor + * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set + */ + function GetIamPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetIamPolicyRequest resource. + * @member {string} resource + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + */ + GetIamPolicyRequest.prototype.resource = ""; + + /** + * GetIamPolicyRequest options. + * @member {google.iam.v1.IGetPolicyOptions|null|undefined} options + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + */ + GetIamPolicyRequest.prototype.options = null; + + /** + * Creates a new GetIamPolicyRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest instance + */ + GetIamPolicyRequest.create = function create(properties) { + return new GetIamPolicyRequest(properties); + }; + + /** + * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIamPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIamPolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIamPolicyRequest message. + * @function verify + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIamPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + */ + GetIamPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.GetIamPolicyRequest) + return object; + var message = new $root.google.iam.v1.GetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected"); + message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.GetIamPolicyRequest} message GetIamPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIamPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.options = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this GetIamPolicyRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + GetIamPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetIamPolicyRequest + * @function getTypeUrl + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.GetIamPolicyRequest"; + }; + + return GetIamPolicyRequest; + })(); + + v1.TestIamPermissionsRequest = (function() { + + /** + * Properties of a TestIamPermissionsRequest. + * @memberof google.iam.v1 + * @interface ITestIamPermissionsRequest + * @property {string|null} [resource] TestIamPermissionsRequest resource + * @property {Array.|null} [permissions] TestIamPermissionsRequest permissions + */ + + /** + * Constructs a new TestIamPermissionsRequest. + * @memberof google.iam.v1 + * @classdesc Represents a TestIamPermissionsRequest. + * @implements ITestIamPermissionsRequest + * @constructor + * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set + */ + function TestIamPermissionsRequest(properties) { + this.permissions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestIamPermissionsRequest resource. + * @member {string} resource + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + */ + TestIamPermissionsRequest.prototype.resource = ""; + + /** + * TestIamPermissionsRequest permissions. + * @member {Array.} permissions + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + */ + TestIamPermissionsRequest.prototype.permissions = $util.emptyArray; + + /** + * Creates a new TestIamPermissionsRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest instance + */ + TestIamPermissionsRequest.create = function create(properties) { + return new TestIamPermissionsRequest(properties); + }; + + /** + * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.permissions[i]); + return writer; + }; + + /** + * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestIamPermissionsRequest message. + * @function verify + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestIamPermissionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] expected"; + } + return null; + }; + + /** + * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + */ + TestIamPermissionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest) + return object; + var message = new $root.google.iam.v1.TestIamPermissionsRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".google.iam.v1.TestIamPermissionsRequest.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); + } + return message; + }; + + /** + * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.TestIamPermissionsRequest} message TestIamPermissionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestIamPermissionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (options.defaults) + object.resource = ""; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; + } + return object; + }; + + /** + * Converts this TestIamPermissionsRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + * @returns {Object.} JSON object + */ + TestIamPermissionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TestIamPermissionsRequest + * @function getTypeUrl + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestIamPermissionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsRequest"; + }; + + return TestIamPermissionsRequest; + })(); + + v1.TestIamPermissionsResponse = (function() { + + /** + * Properties of a TestIamPermissionsResponse. + * @memberof google.iam.v1 + * @interface ITestIamPermissionsResponse + * @property {Array.|null} [permissions] TestIamPermissionsResponse permissions + */ + + /** + * Constructs a new TestIamPermissionsResponse. + * @memberof google.iam.v1 + * @classdesc Represents a TestIamPermissionsResponse. + * @implements ITestIamPermissionsResponse + * @constructor + * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set + */ + function TestIamPermissionsResponse(properties) { + this.permissions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TestIamPermissionsResponse permissions. + * @member {Array.} permissions + * @memberof google.iam.v1.TestIamPermissionsResponse + * @instance + */ + TestIamPermissionsResponse.prototype.permissions = $util.emptyArray; + + /** + * Creates a new TestIamPermissionsResponse instance using the specified properties. + * @function create + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse instance + */ + TestIamPermissionsResponse.create = function create(properties) { + return new TestIamPermissionsResponse(properties); + }; + + /** + * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.permissions[i]); + return writer; + }; + + /** + * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TestIamPermissionsResponse message. + * @function verify + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestIamPermissionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] expected"; + } + return null; + }; + + /** + * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + */ + TestIamPermissionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse) + return object; + var message = new $root.google.iam.v1.TestIamPermissionsResponse(); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".google.iam.v1.TestIamPermissionsResponse.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); + } + return message; + }; + + /** + * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.TestIamPermissionsResponse} message TestIamPermissionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestIamPermissionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; + } + return object; + }; + + /** + * Converts this TestIamPermissionsResponse to JSON. + * @function toJSON + * @memberof google.iam.v1.TestIamPermissionsResponse + * @instance + * @returns {Object.} JSON object + */ + TestIamPermissionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TestIamPermissionsResponse + * @function getTypeUrl + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestIamPermissionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsResponse"; + }; + + return TestIamPermissionsResponse; + })(); + + v1.GetPolicyOptions = (function() { + + /** + * Properties of a GetPolicyOptions. + * @memberof google.iam.v1 + * @interface IGetPolicyOptions + * @property {number|null} [requestedPolicyVersion] GetPolicyOptions requestedPolicyVersion + */ + + /** + * Constructs a new GetPolicyOptions. + * @memberof google.iam.v1 + * @classdesc Represents a GetPolicyOptions. + * @implements IGetPolicyOptions + * @constructor + * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set + */ + function GetPolicyOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPolicyOptions requestedPolicyVersion. + * @member {number} requestedPolicyVersion + * @memberof google.iam.v1.GetPolicyOptions + * @instance + */ + GetPolicyOptions.prototype.requestedPolicyVersion = 0; + + /** + * Creates a new GetPolicyOptions instance using the specified properties. + * @function create + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions instance + */ + GetPolicyOptions.create = function create(properties) { + return new GetPolicyOptions(properties); + }; + + /** + * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPolicyOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.requestedPolicyVersion); + return writer; + }; + + /** + * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPolicyOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPolicyOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetPolicyOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.requestedPolicyVersion = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPolicyOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPolicyOptions message. + * @function verify + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPolicyOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + if (!$util.isInteger(message.requestedPolicyVersion)) + return "requestedPolicyVersion: integer expected"; + return null; + }; + + /** + * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + */ + GetPolicyOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.GetPolicyOptions) + return object; + var message = new $root.google.iam.v1.GetPolicyOptions(); + if (object.requestedPolicyVersion != null) + message.requestedPolicyVersion = object.requestedPolicyVersion | 0; + return message; + }; + + /** + * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.GetPolicyOptions} message GetPolicyOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPolicyOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.requestedPolicyVersion = 0; + if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + object.requestedPolicyVersion = message.requestedPolicyVersion; + return object; + }; + + /** + * Converts this GetPolicyOptions to JSON. + * @function toJSON + * @memberof google.iam.v1.GetPolicyOptions + * @instance + * @returns {Object.} JSON object + */ + GetPolicyOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPolicyOptions + * @function getTypeUrl + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPolicyOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.GetPolicyOptions"; + }; + + return GetPolicyOptions; + })(); + + v1.Policy = (function() { + + /** + * Properties of a Policy. + * @memberof google.iam.v1 + * @interface IPolicy + * @property {number|null} [version] Policy version + * @property {Array.|null} [bindings] Policy bindings + * @property {Array.|null} [auditConfigs] Policy auditConfigs + * @property {Uint8Array|null} [etag] Policy etag + */ + + /** + * Constructs a new Policy. + * @memberof google.iam.v1 + * @classdesc Represents a Policy. + * @implements IPolicy + * @constructor + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + */ + function Policy(properties) { + this.bindings = []; + this.auditConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Policy version. + * @member {number} version + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.version = 0; + + /** + * Policy bindings. + * @member {Array.} bindings + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.bindings = $util.emptyArray; + + /** + * Policy auditConfigs. + * @member {Array.} auditConfigs + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.auditConfigs = $util.emptyArray; + + /** + * Policy etag. + * @member {Uint8Array} etag + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.etag = $util.newBuffer([]); + + /** + * Creates a new Policy instance using the specified properties. + * @function create + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + * @returns {google.iam.v1.Policy} Policy instance + */ + Policy.create = function create(properties) { + return new Policy(properties); + }; + + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); + if (message.bindings != null && message.bindings.length) + for (var i = 0; i < message.bindings.length; ++i) + $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.auditConfigs != null && message.auditConfigs.length) + for (var i = 0; i < message.auditConfigs.length; ++i) + $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Policy message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.int32(); + break; + } + case 4: { + if (!(message.bindings && message.bindings.length)) + message.bindings = []; + message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.auditConfigs && message.auditConfigs.length)) + message.auditConfigs = []; + message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32())); + break; + } + case 3: { + message.etag = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Policy message. + * @function verify + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Policy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + if (message.bindings != null && message.hasOwnProperty("bindings")) { + if (!Array.isArray(message.bindings)) + return "bindings: array expected"; + for (var i = 0; i < message.bindings.length; ++i) { + var error = $root.google.iam.v1.Binding.verify(message.bindings[i]); + if (error) + return "bindings." + error; + } + } + if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) { + if (!Array.isArray(message.auditConfigs)) + return "auditConfigs: array expected"; + for (var i = 0; i < message.auditConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]); + if (error) + return "auditConfigs." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) + return "etag: buffer expected"; + return null; + }; + + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Policy} Policy + */ + Policy.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Policy) + return object; + var message = new $root.google.iam.v1.Policy(); + if (object.version != null) + message.version = object.version | 0; + if (object.bindings) { + if (!Array.isArray(object.bindings)) + throw TypeError(".google.iam.v1.Policy.bindings: array expected"); + message.bindings = []; + for (var i = 0; i < object.bindings.length; ++i) { + if (typeof object.bindings[i] !== "object") + throw TypeError(".google.iam.v1.Policy.bindings: object expected"); + message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); + } + } + if (object.auditConfigs) { + if (!Array.isArray(object.auditConfigs)) + throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected"); + message.auditConfigs = []; + for (var i = 0; i < object.auditConfigs.length; ++i) { + if (typeof object.auditConfigs[i] !== "object") + throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); + message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]); + } + } + if (object.etag != null) + if (typeof object.etag === "string") + $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); + else if (object.etag.length >= 0) + message.etag = object.etag; + return message; + }; + + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.Policy} message Policy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Policy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bindings = []; + object.auditConfigs = []; + } + if (options.defaults) { + object.version = 0; + if (options.bytes === String) + object.etag = ""; + else { + object.etag = []; + if (options.bytes !== Array) + object.etag = $util.newBuffer(object.etag); + } + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; + if (message.bindings && message.bindings.length) { + object.bindings = []; + for (var j = 0; j < message.bindings.length; ++j) + object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); + } + if (message.auditConfigs && message.auditConfigs.length) { + object.auditConfigs = []; + for (var j = 0; j < message.auditConfigs.length; ++j) + object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options); + } + return object; + }; + + /** + * Converts this Policy to JSON. + * @function toJSON + * @memberof google.iam.v1.Policy + * @instance + * @returns {Object.} JSON object + */ + Policy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Policy + * @function getTypeUrl + * @memberof google.iam.v1.Policy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Policy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Policy"; + }; + + return Policy; + })(); + + v1.Binding = (function() { + + /** + * Properties of a Binding. + * @memberof google.iam.v1 + * @interface IBinding + * @property {string|null} [role] Binding role + * @property {Array.|null} [members] Binding members + * @property {google.type.IExpr|null} [condition] Binding condition + */ + + /** + * Constructs a new Binding. + * @memberof google.iam.v1 + * @classdesc Represents a Binding. + * @implements IBinding + * @constructor + * @param {google.iam.v1.IBinding=} [properties] Properties to set + */ + function Binding(properties) { + this.members = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Binding role. + * @member {string} role + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.role = ""; + + /** + * Binding members. + * @member {Array.} members + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.members = $util.emptyArray; + + /** + * Binding condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.condition = null; + + /** + * Creates a new Binding instance using the specified properties. + * @function create + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding=} [properties] Properties to set + * @returns {google.iam.v1.Binding} Binding instance + */ + Binding.create = function create(properties) { + return new Binding(properties); + }; + + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); + if (message.members != null && message.members.length) + for (var i = 0; i < message.members.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.role = reader.string(); + break; + } + case 2: { + if (!(message.members && message.members.length)) + message.members = []; + message.members.push(reader.string()); + break; + } + case 3: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Binding message. + * @function verify + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Binding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.members != null && message.hasOwnProperty("members")) { + if (!Array.isArray(message.members)) + return "members: array expected"; + for (var i = 0; i < message.members.length; ++i) + if (!$util.isString(message.members[i])) + return "members: string[] expected"; + } + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Binding} Binding + */ + Binding.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Binding) + return object; + var message = new $root.google.iam.v1.Binding(); + if (object.role != null) + message.role = String(object.role); + if (object.members) { + if (!Array.isArray(object.members)) + throw TypeError(".google.iam.v1.Binding.members: array expected"); + message.members = []; + for (var i = 0; i < object.members.length; ++i) + message.members[i] = String(object.members[i]); + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.Binding.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; + + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.Binding} message Binding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Binding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.members = []; + if (options.defaults) { + object.role = ""; + object.condition = null; + } + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.members && message.members.length) { + object.members = []; + for (var j = 0; j < message.members.length; ++j) + object.members[j] = message.members[j]; + } + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; + + /** + * Converts this Binding to JSON. + * @function toJSON + * @memberof google.iam.v1.Binding + * @instance + * @returns {Object.} JSON object + */ + Binding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Binding + * @function getTypeUrl + * @memberof google.iam.v1.Binding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Binding"; + }; + + return Binding; + })(); + + v1.AuditConfig = (function() { + + /** + * Properties of an AuditConfig. + * @memberof google.iam.v1 + * @interface IAuditConfig + * @property {string|null} [service] AuditConfig service + * @property {Array.|null} [auditLogConfigs] AuditConfig auditLogConfigs + */ + + /** + * Constructs a new AuditConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfig. + * @implements IAuditConfig + * @constructor + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + */ + function AuditConfig(properties) { + this.auditLogConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditConfig service. + * @member {string} service + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.service = ""; + + /** + * AuditConfig auditLogConfigs. + * @member {Array.} auditLogConfigs + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.auditLogConfigs = $util.emptyArray; + + /** + * Creates a new AuditConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfig} AuditConfig instance + */ + AuditConfig.create = function create(properties) { + return new AuditConfig(properties); + }; + + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.auditLogConfigs != null && message.auditLogConfigs.length) + for (var i = 0; i < message.auditLogConfigs.length; ++i) + $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + case 3: { + if (!(message.auditLogConfigs && message.auditLogConfigs.length)) + message.auditLogConfigs = []; + message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfig message. + * @function verify + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) { + if (!Array.isArray(message.auditLogConfigs)) + return "auditLogConfigs: array expected"; + for (var i = 0; i < message.auditLogConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]); + if (error) + return "auditLogConfigs." + error; + } + } + return null; + }; + + /** + * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfig} AuditConfig + */ + AuditConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfig) + return object; + var message = new $root.google.iam.v1.AuditConfig(); + if (object.service != null) + message.service = String(object.service); + if (object.auditLogConfigs) { + if (!Array.isArray(object.auditLogConfigs)) + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected"); + message.auditLogConfigs = []; + for (var i = 0; i < object.auditLogConfigs.length; ++i) { + if (typeof object.auditLogConfigs[i] !== "object") + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); + message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.AuditConfig} message AuditConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.auditLogConfigs = []; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.auditLogConfigs && message.auditLogConfigs.length) { + object.auditLogConfigs = []; + for (var j = 0; j < message.auditLogConfigs.length; ++j) + object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options); + } + return object; + }; + + /** + * Converts this AuditConfig to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfig + * @instance + * @returns {Object.} JSON object + */ + AuditConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditConfig"; + }; + + return AuditConfig; + })(); + + v1.AuditLogConfig = (function() { + + /** + * Properties of an AuditLogConfig. + * @memberof google.iam.v1 + * @interface IAuditLogConfig + * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType + * @property {Array.|null} [exemptedMembers] AuditLogConfig exemptedMembers + */ + + /** + * Constructs a new AuditLogConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditLogConfig. + * @implements IAuditLogConfig + * @constructor + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + */ + function AuditLogConfig(properties) { + this.exemptedMembers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditLogConfig logType. + * @member {google.iam.v1.AuditLogConfig.LogType} logType + * @memberof google.iam.v1.AuditLogConfig + * @instance + */ + AuditLogConfig.prototype.logType = 0; + + /** + * AuditLogConfig exemptedMembers. + * @member {Array.} exemptedMembers + * @memberof google.iam.v1.AuditLogConfig + * @instance + */ + AuditLogConfig.prototype.exemptedMembers = $util.emptyArray; + + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance + */ + AuditLogConfig.create = function create(properties) { + return new AuditLogConfig(properties); + }; + + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditLogConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType); + if (message.exemptedMembers != null && message.exemptedMembers.length) + for (var i = 0; i < message.exemptedMembers.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]); + return writer; + }; + + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditLogConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.logType = reader.int32(); + break; + } + case 2: { + if (!(message.exemptedMembers && message.exemptedMembers.length)) + message.exemptedMembers = []; + message.exemptedMembers.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditLogConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditLogConfig message. + * @function verify + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditLogConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + switch (message.logType) { + default: + return "logType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) { + if (!Array.isArray(message.exemptedMembers)) + return "exemptedMembers: array expected"; + for (var i = 0; i < message.exemptedMembers.length; ++i) + if (!$util.isString(message.exemptedMembers[i])) + return "exemptedMembers: string[] expected"; + } + return null; + }; + + /** + * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + */ + AuditLogConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditLogConfig) + return object; + var message = new $root.google.iam.v1.AuditLogConfig(); + switch (object.logType) { + default: + if (typeof object.logType === "number") { + message.logType = object.logType; + break; + } + break; + case "LOG_TYPE_UNSPECIFIED": + case 0: + message.logType = 0; + break; + case "ADMIN_READ": + case 1: + message.logType = 1; + break; + case "DATA_WRITE": + case 2: + message.logType = 2; + break; + case "DATA_READ": + case 3: + message.logType = 3; + break; + } + if (object.exemptedMembers) { + if (!Array.isArray(object.exemptedMembers)) + throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected"); + message.exemptedMembers = []; + for (var i = 0; i < object.exemptedMembers.length; ++i) + message.exemptedMembers[i] = String(object.exemptedMembers[i]); + } + return message; + }; + + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditLogConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exemptedMembers = []; + if (options.defaults) + object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] === undefined ? message.logType : $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; + if (message.exemptedMembers && message.exemptedMembers.length) { + object.exemptedMembers = []; + for (var j = 0; j < message.exemptedMembers.length; ++j) + object.exemptedMembers[j] = message.exemptedMembers[j]; + } + return object; + }; + + /** + * Converts this AuditLogConfig to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditLogConfig + * @instance + * @returns {Object.} JSON object + */ + AuditLogConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditLogConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditLogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditLogConfig"; + }; + + /** + * LogType enum. + * @name google.iam.v1.AuditLogConfig.LogType + * @enum {number} + * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value + * @property {number} ADMIN_READ=1 ADMIN_READ value + * @property {number} DATA_WRITE=2 DATA_WRITE value + * @property {number} DATA_READ=3 DATA_READ value + */ + AuditLogConfig.LogType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADMIN_READ"] = 1; + values[valuesById[2] = "DATA_WRITE"] = 2; + values[valuesById[3] = "DATA_READ"] = 3; + return values; + })(); + + return AuditLogConfig; + })(); + + v1.PolicyDelta = (function() { + + /** + * Properties of a PolicyDelta. + * @memberof google.iam.v1 + * @interface IPolicyDelta + * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas + * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas + */ + + /** + * Constructs a new PolicyDelta. + * @memberof google.iam.v1 + * @classdesc Represents a PolicyDelta. + * @implements IPolicyDelta + * @constructor + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + */ + function PolicyDelta(properties) { + this.bindingDeltas = []; + this.auditConfigDeltas = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PolicyDelta bindingDeltas. + * @member {Array.} bindingDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.bindingDeltas = $util.emptyArray; + + /** + * PolicyDelta auditConfigDeltas. + * @member {Array.} auditConfigDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray; + + /** + * Creates a new PolicyDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance + */ + PolicyDelta.create = function create(properties) { + return new PolicyDelta(properties); + }; + + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bindingDeltas != null && message.bindingDeltas.length) + for (var i = 0; i < message.bindingDeltas.length; ++i) + $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) + for (var i = 0; i < message.auditConfigDeltas.length; ++i) + $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.bindingDeltas && message.bindingDeltas.length)) + message.bindingDeltas = []; + message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) + message.auditConfigDeltas = []; + message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PolicyDelta message. + * @function verify + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PolicyDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) { + if (!Array.isArray(message.bindingDeltas)) + return "bindingDeltas: array expected"; + for (var i = 0; i < message.bindingDeltas.length; ++i) { + var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i]); + if (error) + return "bindingDeltas." + error; + } + } + if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) { + if (!Array.isArray(message.auditConfigDeltas)) + return "auditConfigDeltas: array expected"; + for (var i = 0; i < message.auditConfigDeltas.length; ++i) { + var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i]); + if (error) + return "auditConfigDeltas." + error; + } + } + return null; + }; + + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + */ + PolicyDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.PolicyDelta) + return object; + var message = new $root.google.iam.v1.PolicyDelta(); + if (object.bindingDeltas) { + if (!Array.isArray(object.bindingDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); + message.bindingDeltas = []; + for (var i = 0; i < object.bindingDeltas.length; ++i) { + if (typeof object.bindingDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); + message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); + } + } + if (object.auditConfigDeltas) { + if (!Array.isArray(object.auditConfigDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); + message.auditConfigDeltas = []; + for (var i = 0; i < object.auditConfigDeltas.length; ++i) { + if (typeof object.auditConfigDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); + message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.PolicyDelta} message PolicyDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PolicyDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bindingDeltas = []; + object.auditConfigDeltas = []; + } + if (message.bindingDeltas && message.bindingDeltas.length) { + object.bindingDeltas = []; + for (var j = 0; j < message.bindingDeltas.length; ++j) + object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options); + } + if (message.auditConfigDeltas && message.auditConfigDeltas.length) { + object.auditConfigDeltas = []; + for (var j = 0; j < message.auditConfigDeltas.length; ++j) + object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options); + } + return object; + }; + + /** + * Converts this PolicyDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.PolicyDelta + * @instance + * @returns {Object.} JSON object + */ + PolicyDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PolicyDelta + * @function getTypeUrl + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PolicyDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.PolicyDelta"; + }; + + return PolicyDelta; + })(); + + v1.BindingDelta = (function() { + + /** + * Properties of a BindingDelta. + * @memberof google.iam.v1 + * @interface IBindingDelta + * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action + * @property {string|null} [role] BindingDelta role + * @property {string|null} [member] BindingDelta member + * @property {google.type.IExpr|null} [condition] BindingDelta condition + */ + + /** + * Constructs a new BindingDelta. + * @memberof google.iam.v1 + * @classdesc Represents a BindingDelta. + * @implements IBindingDelta + * @constructor + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + */ + function BindingDelta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BindingDelta action. + * @member {google.iam.v1.BindingDelta.Action} action + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.action = 0; + + /** + * BindingDelta role. + * @member {string} role + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.role = ""; + + /** + * BindingDelta member. + * @member {string} member + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.member = ""; + + /** + * BindingDelta condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.condition = null; + + /** + * Creates a new BindingDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + * @returns {google.iam.v1.BindingDelta} BindingDelta instance + */ + BindingDelta.create = function create(properties) { + return new BindingDelta(properties); + }; + + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); + if (message.member != null && Object.hasOwnProperty.call(message, "member")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.role = reader.string(); + break; + } + case 3: { + message.member = reader.string(); + break; + } + case 4: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BindingDelta message. + * @function verify + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BindingDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.member != null && message.hasOwnProperty("member")) + if (!$util.isString(message.member)) + return "member: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.BindingDelta} BindingDelta + */ + BindingDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.BindingDelta) + return object; + var message = new $root.google.iam.v1.BindingDelta(); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.role != null) + message.role = String(object.role); + if (object.member != null) + message.member = String(object.member); + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; + + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.BindingDelta} message BindingDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BindingDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.role = ""; + object.member = ""; + object.condition = null; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.member != null && message.hasOwnProperty("member")) + object.member = message.member; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; + + /** + * Converts this BindingDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.BindingDelta + * @instance + * @returns {Object.} JSON object + */ + BindingDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BindingDelta + * @function getTypeUrl + * @memberof google.iam.v1.BindingDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BindingDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.BindingDelta"; + }; + + /** + * Action enum. + * @name google.iam.v1.BindingDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + BindingDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return BindingDelta; + })(); + + v1.AuditConfigDelta = (function() { + + /** + * Properties of an AuditConfigDelta. + * @memberof google.iam.v1 + * @interface IAuditConfigDelta + * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action + * @property {string|null} [service] AuditConfigDelta service + * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember + * @property {string|null} [logType] AuditConfigDelta logType + */ + + /** + * Constructs a new AuditConfigDelta. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfigDelta. + * @implements IAuditConfigDelta + * @constructor + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + */ + function AuditConfigDelta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditConfigDelta action. + * @member {google.iam.v1.AuditConfigDelta.Action} action + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.action = 0; + + /** + * AuditConfigDelta service. + * @member {string} service + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.service = ""; + + /** + * AuditConfigDelta exemptedMember. + * @member {string} exemptedMember + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.exemptedMember = ""; + + /** + * AuditConfigDelta logType. + * @member {string} logType + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.logType = ""; + + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance + */ + AuditConfigDelta.create = function create(properties) { + return new AuditConfigDelta(properties); + }; + + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); + if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); + return writer; + }; + + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.service = reader.string(); + break; + } + case 3: { + message.exemptedMember = reader.string(); + break; + } + case 4: { + message.logType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfigDelta message. + * @function verify + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfigDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + if (!$util.isString(message.exemptedMember)) + return "exemptedMember: string expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + if (!$util.isString(message.logType)) + return "logType: string expected"; + return null; + }; + + /** + * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + */ + AuditConfigDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfigDelta) + return object; + var message = new $root.google.iam.v1.AuditConfigDelta(); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; + break; + } + if (object.service != null) + message.service = String(object.service); + if (object.exemptedMember != null) + message.exemptedMember = String(object.exemptedMember); + if (object.logType != null) + message.logType = String(object.logType); + return message; + }; + + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfigDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.service = ""; + object.exemptedMember = ""; + object.logType = ""; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + object.exemptedMember = message.exemptedMember; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = message.logType; + return object; + }; + + /** + * Converts this AuditConfigDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfigDelta + * @instance + * @returns {Object.} JSON object + */ + AuditConfigDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditConfigDelta + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditConfigDelta"; + }; + + /** + * Action enum. + * @name google.iam.v1.AuditConfigDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + AuditConfigDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); + + return AuditConfigDelta; + })(); + + return v1; + })(); + + return iam; + })(); + + 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; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json new file mode 100644 index 00000000000..cf4a8cc6cff --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json @@ -0,0 +1,7871 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "backupdr": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.BackupDR.V1", + "go_package": "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb", + "java_multiple_files": true, + "java_outer_classname": "BackupvaultGceProto", + "java_package": "com.google.cloud.backupdr.v1", + "php_namespace": "Google\\Cloud\\BackupDR\\V1", + "ruby_package": "Google::Cloud::BackupDR::V1" + }, + "nested": { + "BackupDR": { + "options": { + "(google.api.default_host)": "backupdr.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListManagementServers": { + "requestType": "ListManagementServersRequest", + "responseType": "ListManagementServersResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/managementServers", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/managementServers" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetManagementServer": { + "requestType": "GetManagementServerRequest", + "responseType": "ManagementServer", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/managementServers/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/managementServers/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateManagementServer": { + "requestType": "CreateManagementServerRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/managementServers", + "(google.api.http).body": "management_server", + "(google.api.method_signature)": "parent,management_server,management_server_id", + "(google.longrunning.operation_info).response_type": "ManagementServer", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/managementServers", + "body": "management_server" + } + }, + { + "(google.api.method_signature)": "parent,management_server,management_server_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ManagementServer", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteManagementServer": { + "requestType": "DeleteManagementServerRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/managementServers/*}", + "(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/*/managementServers/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateBackupVault": { + "requestType": "CreateBackupVaultRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupVaults", + "(google.api.http).body": "backup_vault", + "(google.api.method_signature)": "parent,backup_vault,backup_vault_id", + "(google.longrunning.operation_info).response_type": "BackupVault", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/backupVaults", + "body": "backup_vault" + } + }, + { + "(google.api.method_signature)": "parent,backup_vault,backup_vault_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupVault", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListBackupVaults": { + "requestType": "ListBackupVaultsRequest", + "responseType": "ListBackupVaultsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupVaults", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/backupVaults" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "FetchUsableBackupVaults": { + "requestType": "FetchUsableBackupVaultsRequest", + "responseType": "FetchUsableBackupVaultsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetBackupVault": { + "requestType": "GetBackupVaultRequest", + "responseType": "BackupVault", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupVaults/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateBackupVault": { + "requestType": "UpdateBackupVaultRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}", + "(google.api.http).body": "backup_vault", + "(google.api.method_signature)": "backup_vault,update_mask", + "(google.longrunning.operation_info).response_type": "BackupVault", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}", + "body": "backup_vault" + } + }, + { + "(google.api.method_signature)": "backup_vault,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupVault", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteBackupVault": { + "requestType": "DeleteBackupVaultRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupVaults/*}", + "(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/*/backupVaults/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "TestIamPermissions": { + "requestType": "google.iam.v1.TestIamPermissionsRequest", + "responseType": "google.iam.v1.TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/locations/*/backupVaults/*}:testIamPermissions", + "(google.api.http).body": "*", + "(google.api.method_signature)": "resource, permissions" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=projects/*/locations/*/backupVaults/*}:testIamPermissions", + "body": "*" + } + }, + { + "(google.api.method_signature)": "resource, permissions" + } + ] + }, + "ListDataSources": { + "requestType": "ListDataSourcesRequest", + "responseType": "ListDataSourcesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDataSource": { + "requestType": "GetDataSourceRequest", + "responseType": "DataSource", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateDataSource": { + "requestType": "UpdateDataSourceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}", + "(google.api.http).body": "data_source", + "(google.api.method_signature)": "data_source,update_mask", + "(google.longrunning.operation_info).response_type": "DataSource", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}", + "body": "data_source" + } + }, + { + "(google.api.method_signature)": "data_source,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataSource", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "RemoveDataSource": { + "requestType": "RemoveDataSourceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:remove", + "(google.api.http).body": "*", + "(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)": { + "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:remove", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "SetInternalStatus": { + "requestType": "SetInternalStatusRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:setInternalStatus", + "(google.api.http).body": "*", + "(google.api.method_signature)": "data_source", + "(google.longrunning.operation_info).response_type": "SetInternalStatusResponse", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:setInternalStatus", + "body": "*" + } + }, + { + "(google.api.method_signature)": "data_source" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "SetInternalStatusResponse", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "InitiateBackup": { + "requestType": "InitiateBackupRequest", + "responseType": "InitiateBackupResponse", + "options": { + "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:initiateBackup", + "(google.api.http).body": "*", + "(google.api.method_signature)": "data_source" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:initiateBackup", + "body": "*" + } + }, + { + "(google.api.method_signature)": "data_source" + } + ] + }, + "AbandonBackup": { + "requestType": "AbandonBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:abandonBackup", + "(google.api.http).body": "*", + "(google.api.method_signature)": "data_source", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:abandonBackup", + "body": "*" + } + }, + { + "(google.api.method_signature)": "data_source" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "FinalizeBackup": { + "requestType": "FinalizeBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:finalizeBackup", + "(google.api.http).body": "*", + "(google.api.method_signature)": "data_source", + "(google.longrunning.operation_info).response_type": "Backup", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:finalizeBackup", + "body": "*" + } + }, + { + "(google.api.method_signature)": "data_source" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Backup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "FetchAccessToken": { + "requestType": "FetchAccessTokenRequest", + "responseType": "FetchAccessTokenResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBackups": { + "requestType": "ListBackupsRequest", + "responseType": "ListBackupsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetBackup": { + "requestType": "GetBackupRequest", + "responseType": "Backup", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateBackup": { + "requestType": "UpdateBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "(google.api.http).body": "backup", + "(google.api.method_signature)": "backup,update_mask", + "(google.longrunning.operation_info).response_type": "Backup", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "body": "backup" + } + }, + { + "(google.api.method_signature)": "backup,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Backup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteBackup": { + "requestType": "DeleteBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "Backup", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Backup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "RestoreBackup": { + "requestType": "RestoreBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "RestoreBackupResponse", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "RestoreBackupResponse", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateBackupPlan": { + "requestType": "CreateBackupPlanRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupPlans", + "(google.api.http).body": "backup_plan", + "(google.api.method_signature)": "parent,backup_plan,backup_plan_id", + "(google.longrunning.operation_info).response_type": "BackupPlan", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/backupPlans", + "body": "backup_plan" + } + }, + { + "(google.api.method_signature)": "parent,backup_plan,backup_plan_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPlan", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetBackupPlan": { + "requestType": "GetBackupPlanRequest", + "responseType": "BackupPlan", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupPlans/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupPlans/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBackupPlans": { + "requestType": "ListBackupPlansRequest", + "responseType": "ListBackupPlansResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupPlans", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/backupPlans" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteBackupPlan": { + "requestType": "DeleteBackupPlanRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupPlans/*}", + "(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/*/backupPlans/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateBackupPlanAssociation": { + "requestType": "CreateBackupPlanAssociationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", + "(google.api.http).body": "backup_plan_association", + "(google.api.method_signature)": "parent,backup_plan_association,backup_plan_association_id", + "(google.longrunning.operation_info).response_type": "BackupPlanAssociation", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", + "body": "backup_plan_association" + } + }, + { + "(google.api.method_signature)": "parent,backup_plan_association,backup_plan_association_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPlanAssociation", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetBackupPlanAssociation": { + "requestType": "GetBackupPlanAssociationRequest", + "responseType": "BackupPlanAssociation", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBackupPlanAssociations": { + "requestType": "ListBackupPlanAssociationsRequest", + "responseType": "ListBackupPlanAssociationsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteBackupPlanAssociation": { + "requestType": "DeleteBackupPlanAssociationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}", + "(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/*/backupPlanAssociations/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "TriggerBackup": { + "requestType": "TriggerBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,rule_id", + "(google.longrunning.operation_info).response_type": "BackupPlanAssociation", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name,rule_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPlanAssociation", + "metadata_type": "OperationMetadata" + } + } + ] + } + } + }, + "NetworkConfig": { + "fields": { + "network": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "peeringMode": { + "type": "PeeringMode", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "PeeringMode": { + "values": { + "PEERING_MODE_UNSPECIFIED": 0, + "PRIVATE_SERVICE_ACCESS": 1 + } + } + } + }, + "ManagementURI": { + "fields": { + "webUi": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "api": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "WorkforceIdentityBasedManagementURI": { + "fields": { + "firstPartyManagementUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "thirdPartyManagementUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "WorkforceIdentityBasedOAuth2ClientID": { + "fields": { + "firstPartyOauth2ClientId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "thirdPartyOauth2ClientId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ManagementServer": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/ManagementServer", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/managementServers/{managementserver}", + "(google.api.resource).plural": "managementServers", + "(google.api.resource).singular": "managementServer" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "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" + } + }, + "type": { + "type": "InstanceType", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "managementUri": { + "type": "ManagementURI", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "workforceIdentityBasedManagementUri": { + "type": "WorkforceIdentityBasedManagementURI", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "InstanceState", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "networks": { + "rule": "repeated", + "type": "NetworkConfig", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "etag": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "oauth2ClientId": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "workforceIdentityBasedOauth2ClientId": { + "type": "WorkforceIdentityBasedOAuth2ClientID", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "baProxyUri": { + "rule": "repeated", + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzs": { + "type": "google.protobuf.BoolValue", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzi": { + "type": "bool", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "InstanceType": { + "values": { + "INSTANCE_TYPE_UNSPECIFIED": 0, + "BACKUP_RESTORE": 1 + } + }, + "InstanceState": { + "values": { + "INSTANCE_STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "UPDATING": 3, + "DELETING": 4, + "REPAIRING": 5, + "MAINTENANCE": 6, + "ERROR": 7 + } + } + } + }, + "ListManagementServersRequest": { + "oneofs": { + "_filter": { + "oneof": [ + "filter" + ] + }, + "_orderBy": { + "oneof": [ + "orderBy" + ] + } + }, + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ListManagementServersResponse": { + "fields": { + "managementServers": { + "rule": "repeated", + "type": "ManagementServer", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetManagementServerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" + } + } + } + }, + "CreateManagementServerRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" + } + }, + "managementServerId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "managementServer": { + "type": "ManagementServer", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteManagementServerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" + } + }, + "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" + } + }, + "additionalInfo": { + "keyType": "string", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "BackupPlan": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/BackupPlan", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPlans/{backup_plan}", + "(google.api.resource).plural": "backupPlans", + "(google.api.resource).singular": "backupPlan" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupRules": { + "rule": "repeated", + "type": "BackupRule", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceType": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "etag": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupVault": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" + } + }, + "backupVaultServiceAccount": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "INACTIVE": 4 + } + } + } + }, + "BackupRule": { + "oneofs": { + "backupScheduleOneof": { + "oneof": [ + "standardSchedule" + ] + } + }, + "fields": { + "ruleId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "backupRetentionDays": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "standardSchedule": { + "type": "StandardSchedule", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "StandardSchedule": { + "fields": { + "recurrenceType": { + "type": "RecurrenceType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "hourlyFrequency": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "daysOfWeek": { + "rule": "repeated", + "type": "google.type.DayOfWeek", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "daysOfMonth": { + "rule": "repeated", + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "weekDayOfMonth": { + "type": "WeekDayOfMonth", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "months": { + "rule": "repeated", + "type": "google.type.Month", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupWindow": { + "type": "BackupWindow", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "timeZone": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "RecurrenceType": { + "values": { + "RECURRENCE_TYPE_UNSPECIFIED": 0, + "HOURLY": 1, + "DAILY": 2, + "WEEKLY": 3, + "MONTHLY": 4, + "YEARLY": 5 + } + } + } + }, + "BackupWindow": { + "fields": { + "startHourOfDay": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "endHourOfDay": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "WeekDayOfMonth": { + "fields": { + "weekOfMonth": { + "type": "WeekOfMonth", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dayOfWeek": { + "type": "google.type.DayOfWeek", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "WeekOfMonth": { + "values": { + "WEEK_OF_MONTH_UNSPECIFIED": 0, + "FIRST": 1, + "SECOND": 2, + "THIRD": 3, + "FOURTH": 4, + "LAST": 5 + } + } + } + }, + "CreateBackupPlanRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlan" + } + }, + "backupPlanId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupPlan": { + "type": "BackupPlan", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlansRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlan" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlansResponse": { + "fields": { + "backupPlans": { + "rule": "repeated", + "type": "BackupPlan", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetBackupPlanRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + } + } + }, + "DeleteBackupPlanRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "BackupPlanAssociation": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/BackupPlanAssociation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}", + "(google.api.resource).plural": "backupPlanAssociations", + "(google.api.resource).singular": "backupPlanAssociation" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceType": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "resource": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupPlan": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rulesConfigInfo": { + "rule": "repeated", + "type": "RuleConfigInfo", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataSource": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "INACTIVE": 4 + } + } + } + }, + "RuleConfigInfo": { + "fields": { + "ruleId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastBackupState": { + "type": "LastBackupState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastBackupError": { + "type": "google.rpc.Status", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastSuccessfulBackupConsistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "LastBackupState": { + "values": { + "LAST_BACKUP_STATE_UNSPECIFIED": 0, + "FIRST_BACKUP_PENDING": 1, + "PERMISSION_DENIED": 2, + "SUCCEEDED": 3, + "FAILED": 4 + } + } + } + }, + "CreateBackupPlanAssociationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "backupPlanAssociationId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupPlanAssociation": { + "type": "BackupPlanAssociation", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlanAssociationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlanAssociationsResponse": { + "fields": { + "backupPlanAssociations": { + "rule": "repeated", + "type": "BackupPlanAssociation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetBackupPlanAssociationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + } + } + }, + "DeleteBackupPlanAssociationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "TriggerBackupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "ruleId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "BackupVault": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/BackupVault", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}", + "(google.api.resource).plural": "backupVaults", + "(google.api.resource).singular": "backupVault" + }, + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_createTime": { + "oneof": [ + "createTime" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + }, + "_backupMinimumEnforcedRetentionDuration": { + "oneof": [ + "backupMinimumEnforcedRetentionDuration" + ] + }, + "_deletable": { + "oneof": [ + "deletable" + ] + }, + "_etag": { + "oneof": [ + "etag" + ] + }, + "_effectiveTime": { + "oneof": [ + "effectiveTime" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "backupMinimumEnforcedRetentionDuration": { + "type": "google.protobuf.Duration", + "id": 20, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "deletable": { + "type": "bool", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "etag": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "state": { + "type": "State", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "effectiveTime": { + "type": "google.protobuf.Timestamp", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "backupCount": { + "type": "int64", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceAccount": { + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "totalStoredBytes": { + "type": "int64", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uid": { + "type": "string", + "id": 21, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "accessRestriction": { + "type": "AccessRestriction", + "id": 24, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "ERROR": 4 + } + }, + "AccessRestriction": { + "values": { + "ACCESS_RESTRICTION_UNSPECIFIED": 0, + "WITHIN_PROJECT": 1, + "WITHIN_ORGANIZATION": 2, + "UNRESTRICTED": 3 + } + } + } + }, + "DataSource": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/DataSource", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}", + "(google.api.resource).plural": "dataSources", + "(google.api.resource).singular": "dataSource" + }, + "oneofs": { + "_createTime": { + "oneof": [ + "createTime" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + }, + "_backupCount": { + "oneof": [ + "backupCount" + ] + }, + "_etag": { + "oneof": [ + "etag" + ] + }, + "_totalStoredBytes": { + "oneof": [ + "totalStoredBytes" + ] + }, + "sourceResource": { + "oneof": [ + "dataSourceGcpResource", + "dataSourceBackupApplianceApplication" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "state": { + "type": "State", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "backupCount": { + "type": "int64", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "etag": { + "type": "string", + "id": 14, + "options": { + "proto3_optional": true + } + }, + "totalStoredBytes": { + "type": "int64", + "id": 23, + "options": { + "proto3_optional": true + } + }, + "configState": { + "type": "BackupConfigState", + "id": 24, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupConfigInfo": { + "type": "BackupConfigInfo", + "id": 25, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataSourceGcpResource": { + "type": "DataSourceGcpResource", + "id": 26 + }, + "dataSourceBackupApplianceApplication": { + "type": "DataSourceBackupApplianceApplication", + "id": 27 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "ERROR": 4 + } + } + } + }, + "BackupConfigInfo": { + "oneofs": { + "backupConfig": { + "oneof": [ + "gcpBackupConfig", + "backupApplianceBackupConfig" + ] + } + }, + "fields": { + "lastBackupState": { + "type": "LastBackupState", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastSuccessfulBackupConsistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastBackupError": { + "type": "google.rpc.Status", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gcpBackupConfig": { + "type": "GcpBackupConfig", + "id": 4 + }, + "backupApplianceBackupConfig": { + "type": "BackupApplianceBackupConfig", + "id": 5 + } + }, + "nested": { + "LastBackupState": { + "values": { + "LAST_BACKUP_STATE_UNSPECIFIED": 0, + "FIRST_BACKUP_PENDING": 1, + "SUCCEEDED": 2, + "FAILED": 3, + "PERMISSION_DENIED": 4 + } + } + } + }, + "GcpBackupConfig": { + "fields": { + "backupPlan": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "backupPlanDescription": { + "type": "string", + "id": 2 + }, + "backupPlanAssociation": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "backupPlanRules": { + "rule": "repeated", + "type": "string", + "id": 4 + } + } + }, + "BackupApplianceBackupConfig": { + "fields": { + "backupApplianceName": { + "type": "string", + "id": 1 + }, + "backupApplianceId": { + "type": "int64", + "id": 2 + }, + "slaId": { + "type": "int64", + "id": 3 + }, + "applicationName": { + "type": "string", + "id": 4 + }, + "hostName": { + "type": "string", + "id": 5 + }, + "sltName": { + "type": "string", + "id": 6 + }, + "slpName": { + "type": "string", + "id": 7 + } + } + }, + "DataSourceGcpResource": { + "oneofs": { + "gcpResourceProperties": { + "oneof": [ + "computeInstanceDatasourceProperties" + ] + } + }, + "fields": { + "gcpResourcename": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "location": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "computeInstanceDatasourceProperties": { + "type": "ComputeInstanceDataSourceProperties", + "id": 4 + } + } + }, + "DataSourceBackupApplianceApplication": { + "fields": { + "applicationName": { + "type": "string", + "id": 1 + }, + "backupAppliance": { + "type": "string", + "id": 2 + }, + "applianceId": { + "type": "int64", + "id": 3 + }, + "type": { + "type": "string", + "id": 4 + }, + "applicationId": { + "type": "int64", + "id": 8 + }, + "hostname": { + "type": "string", + "id": 6 + }, + "hostId": { + "type": "int64", + "id": 7 + } + } + }, + "ServiceLockInfo": { + "fields": { + "operation": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "BackupApplianceLockInfo": { + "oneofs": { + "lockSource": { + "oneof": [ + "jobName", + "backupImage", + "slaId" + ] + } + }, + "fields": { + "backupApplianceId": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupApplianceName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "lockReason": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "jobName": { + "type": "string", + "id": 6 + }, + "backupImage": { + "type": "string", + "id": 7 + }, + "slaId": { + "type": "int64", + "id": 8 + } + } + }, + "BackupLock": { + "oneofs": { + "ClientLockInfo": { + "oneof": [ + "backupApplianceLockInfo", + "serviceLockInfo" + ] + } + }, + "fields": { + "lockUntilTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupApplianceLockInfo": { + "type": "BackupApplianceLockInfo", + "id": 3 + }, + "serviceLockInfo": { + "type": "ServiceLockInfo", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Backup": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/Backup", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}", + "(google.api.resource).plural": "backups", + "(google.api.resource).singular": "backup" + }, + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_createTime": { + "oneof": [ + "createTime" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + }, + "_enforcedRetentionEndTime": { + "oneof": [ + "enforcedRetentionEndTime" + ] + }, + "_expireTime": { + "oneof": [ + "expireTime" + ] + }, + "_consistencyTime": { + "oneof": [ + "consistencyTime" + ] + }, + "_etag": { + "oneof": [ + "etag" + ] + }, + "backupProperties": { + "oneof": [ + "computeInstanceBackupProperties", + "backupApplianceBackupProperties" + ] + }, + "planInfo": { + "oneof": [ + "gcpBackupPlanInfo" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "enforcedRetentionEndTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "consistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "etag": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "state": { + "type": "State", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceLocks": { + "rule": "repeated", + "type": "BackupLock", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupApplianceLocks": { + "rule": "repeated", + "type": "BackupLock", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "computeInstanceBackupProperties": { + "type": "ComputeInstanceBackupProperties", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupApplianceBackupProperties": { + "type": "BackupApplianceBackupProperties", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupType": { + "type": "BackupType", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gcpBackupPlanInfo": { + "type": "GCPBackupPlanInfo", + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceSizeBytes": { + "type": "int64", + "id": 23, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "ERROR": 4 + } + }, + "BackupType": { + "values": { + "BACKUP_TYPE_UNSPECIFIED": 0, + "SCHEDULED": 1, + "ON_DEMAND": 2 + } + }, + "GCPBackupPlanInfo": { + "fields": { + "backupPlan": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "backupPlanRuleId": { + "type": "string", + "id": 2 + } + } + } + } + }, + "CreateBackupVaultRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" + } + }, + "backupVaultId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupVault": { + "type": "BackupVault", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupVaultsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "view": { + "type": "BackupVaultView", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupVaultsResponse": { + "fields": { + "backupVaults": { + "rule": "repeated", + "type": "BackupVault", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "FetchUsableBackupVaultsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchUsableBackupVaultsResponse": { + "fields": { + "backupVaults": { + "rule": "repeated", + "type": "BackupVault", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetBackupVaultRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" + } + }, + "view": { + "type": "BackupVaultView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateBackupVaultRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupVault": { + "type": "BackupVault", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(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" + } + } + } + }, + "DeleteBackupVaultRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "force": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "etag": { + "type": "string", + "id": 4 + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataSourcesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/DataSource" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataSourcesResponse": { + "fields": { + "dataSources": { + "rule": "repeated", + "type": "DataSource", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetDataSourceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + } + } + }, + "UpdateDataSourceRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataSource": { + "type": "DataSource", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RemoveDataSourceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SetInternalStatusRequest": { + "fields": { + "dataSource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "value": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupConfigState": { + "type": "BackupConfigState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SetInternalStatusResponse": { + "fields": {} + }, + "InitiateBackupRequest": { + "fields": { + "dataSource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupId": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "InitiateBackupResponse": { + "fields": { + "backup": { + "type": "string", + "id": 1 + }, + "newBackupGenerationId": { + "type": "int32", + "id": 2 + }, + "baseBackupGenerationId": { + "type": "int32", + "id": 3 + } + } + }, + "AbandonBackupRequest": { + "fields": { + "dataSource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FinalizeBackupRequest": { + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_consistencyTime": { + "oneof": [ + "consistencyTime" + ] + }, + "_recoveryRangeStartTime": { + "oneof": [ + "recoveryRangeStartTime" + ] + }, + "_recoveryRangeEndTime": { + "oneof": [ + "recoveryRangeEndTime" + ] + }, + "_retentionDuration": { + "oneof": [ + "retentionDuration" + ] + } + }, + "fields": { + "dataSource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "consistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupId": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "recoveryRangeStartTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "recoveryRangeEndTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "retentionDuration": { + "type": "google.protobuf.Duration", + "id": 9, + "options": { + "proto3_optional": true + } + } + } + }, + "FetchAccessTokenRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "generationId": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "FetchAccessTokenResponse": { + "fields": { + "readLocation": { + "type": "string", + "id": 1 + }, + "writeLocation": { + "type": "string", + "id": 2 + }, + "token": { + "type": "string", + "id": 3 + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + } + } + }, + "ListBackupsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/Backup" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "view": { + "type": "BackupView", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupsResponse": { + "fields": { + "backups": { + "rule": "repeated", + "type": "Backup", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetBackupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" + } + }, + "view": { + "type": "BackupView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateBackupRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backup": { + "type": "Backup", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteBackupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RestoreBackupRequest": { + "oneofs": { + "targetEnvironment": { + "oneof": [ + "computeInstanceTargetEnvironment" + ] + }, + "instanceProperties": { + "oneof": [ + "computeInstanceRestoreProperties" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "computeInstanceTargetEnvironment": { + "type": "ComputeInstanceTargetEnvironment", + "id": 3 + }, + "computeInstanceRestoreProperties": { + "type": "ComputeInstanceRestoreProperties", + "id": 4 + } + } + }, + "RestoreBackupResponse": { + "fields": { + "targetResource": { + "type": "TargetResource", + "id": 1 + } + } + }, + "TargetResource": { + "oneofs": { + "targetResourceInfo": { + "oneof": [ + "gcpResource" + ] + } + }, + "fields": { + "gcpResource": { + "type": "GcpResource", + "id": 1 + } + } + }, + "GcpResource": { + "fields": { + "gcpResourcename": { + "type": "string", + "id": 1 + }, + "location": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + } + } + }, + "BackupConfigState": { + "values": { + "BACKUP_CONFIG_STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "PASSIVE": 2 + } + }, + "BackupView": { + "values": { + "BACKUP_VIEW_UNSPECIFIED": 0, + "BACKUP_VIEW_BASIC": 1, + "BACKUP_VIEW_FULL": 2 + } + }, + "BackupVaultView": { + "values": { + "BACKUP_VAULT_VIEW_UNSPECIFIED": 0, + "BACKUP_VAULT_VIEW_BASIC": 1, + "BACKUP_VAULT_VIEW_FULL": 2 + } + }, + "BackupApplianceBackupProperties": { + "oneofs": { + "_generationId": { + "oneof": [ + "generationId" + ] + }, + "_finalizeTime": { + "oneof": [ + "finalizeTime" + ] + }, + "_recoveryRangeStartTime": { + "oneof": [ + "recoveryRangeStartTime" + ] + }, + "_recoveryRangeEndTime": { + "oneof": [ + "recoveryRangeEndTime" + ] + } + }, + "fields": { + "generationId": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "finalizeTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "recoveryRangeStartTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "recoveryRangeEndTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ComputeInstanceBackupProperties": { + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_tags": { + "oneof": [ + "tags" + ] + }, + "_machineType": { + "oneof": [ + "machineType" + ] + }, + "_canIpForward": { + "oneof": [ + "canIpForward" + ] + }, + "_metadata": { + "oneof": [ + "metadata" + ] + }, + "_scheduling": { + "oneof": [ + "scheduling" + ] + }, + "_minCpuPlatform": { + "oneof": [ + "minCpuPlatform" + ] + }, + "_keyRevocationActionType": { + "oneof": [ + "keyRevocationActionType" + ] + }, + "_sourceInstance": { + "oneof": [ + "sourceInstance" + ] + } + }, + "fields": { + "description": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "tags": { + "type": "Tags", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "machineType": { + "type": "string", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "canIpForward": { + "type": "bool", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "networkInterface": { + "rule": "repeated", + "type": "NetworkInterface", + "id": 5 + }, + "disk": { + "rule": "repeated", + "type": "AttachedDisk", + "id": 6 + }, + "metadata": { + "type": "Metadata", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "serviceAccount": { + "rule": "repeated", + "type": "ServiceAccount", + "id": 8 + }, + "scheduling": { + "type": "Scheduling", + "id": 9, + "options": { + "proto3_optional": true + } + }, + "guestAccelerator": { + "rule": "repeated", + "type": "AcceleratorConfig", + "id": 10 + }, + "minCpuPlatform": { + "type": "string", + "id": 11, + "options": { + "proto3_optional": true + } + }, + "keyRevocationActionType": { + "type": "KeyRevocationActionType", + "id": 12, + "options": { + "proto3_optional": true + } + }, + "sourceInstance": { + "type": "string", + "id": 13, + "options": { + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 14 + } + } + }, + "ComputeInstanceRestoreProperties": { + "oneofs": { + "_name": { + "oneof": [ + "name" + ] + }, + "_advancedMachineFeatures": { + "oneof": [ + "advancedMachineFeatures" + ] + }, + "_canIpForward": { + "oneof": [ + "canIpForward" + ] + }, + "_confidentialInstanceConfig": { + "oneof": [ + "confidentialInstanceConfig" + ] + }, + "_deletionProtection": { + "oneof": [ + "deletionProtection" + ] + }, + "_description": { + "oneof": [ + "description" + ] + }, + "_displayDevice": { + "oneof": [ + "displayDevice" + ] + }, + "_hostname": { + "oneof": [ + "hostname" + ] + }, + "_instanceEncryptionKey": { + "oneof": [ + "instanceEncryptionKey" + ] + }, + "_keyRevocationActionType": { + "oneof": [ + "keyRevocationActionType" + ] + }, + "_machineType": { + "oneof": [ + "machineType" + ] + }, + "_metadata": { + "oneof": [ + "metadata" + ] + }, + "_minCpuPlatform": { + "oneof": [ + "minCpuPlatform" + ] + }, + "_networkPerformanceConfig": { + "oneof": [ + "networkPerformanceConfig" + ] + }, + "_params": { + "oneof": [ + "params" + ] + }, + "_privateIpv6GoogleAccess": { + "oneof": [ + "privateIpv6GoogleAccess" + ] + }, + "_allocationAffinity": { + "oneof": [ + "allocationAffinity" + ] + }, + "_scheduling": { + "oneof": [ + "scheduling" + ] + }, + "_tags": { + "oneof": [ + "tags" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "advancedMachineFeatures": { + "type": "AdvancedMachineFeatures", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "canIpForward": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "confidentialInstanceConfig": { + "type": "ConfidentialInstanceConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "deletionProtection": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "description": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "disks": { + "rule": "repeated", + "type": "AttachedDisk", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayDevice": { + "type": "DisplayDevice", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "guestAccelerators": { + "rule": "repeated", + "type": "AcceleratorConfig", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "hostname": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "instanceEncryptionKey": { + "type": "CustomerEncryptionKey", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "keyRevocationActionType": { + "type": "KeyRevocationActionType", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "machineType": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "metadata": { + "type": "Metadata", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "minCpuPlatform": { + "type": "string", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "networkInterfaces": { + "rule": "repeated", + "type": "NetworkInterface", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "networkPerformanceConfig": { + "type": "NetworkPerformanceConfig", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "params": { + "type": "InstanceParams", + "id": 19, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY", + "proto3_optional": true + } + }, + "privateIpv6GoogleAccess": { + "type": "InstancePrivateIpv6GoogleAccess", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "allocationAffinity": { + "type": "AllocationAffinity", + "id": 21, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "resourcePolicies": { + "rule": "repeated", + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "scheduling": { + "type": "Scheduling", + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "serviceAccounts": { + "rule": "repeated", + "type": "ServiceAccount", + "id": 24, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tags": { + "type": "Tags", + "id": 26, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "InstancePrivateIpv6GoogleAccess": { + "values": { + "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": 0, + "INHERIT_FROM_SUBNETWORK": 1, + "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE": 2, + "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE": 3 + } + } + } + }, + "ComputeInstanceTargetEnvironment": { + "fields": { + "project": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ComputeInstanceDataSourceProperties": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "machineType": { + "type": "string", + "id": 3 + }, + "totalDiskCount": { + "type": "int64", + "id": 4 + }, + "totalDiskSizeGb": { + "type": "int64", + "id": 5 + } + } + }, + "AdvancedMachineFeatures": { + "oneofs": { + "_enableNestedVirtualization": { + "oneof": [ + "enableNestedVirtualization" + ] + }, + "_threadsPerCore": { + "oneof": [ + "threadsPerCore" + ] + }, + "_visibleCoreCount": { + "oneof": [ + "visibleCoreCount" + ] + }, + "_enableUefiNetworking": { + "oneof": [ + "enableUefiNetworking" + ] + } + }, + "fields": { + "enableNestedVirtualization": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "threadsPerCore": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "visibleCoreCount": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "enableUefiNetworking": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ConfidentialInstanceConfig": { + "oneofs": { + "_enableConfidentialCompute": { + "oneof": [ + "enableConfidentialCompute" + ] + } + }, + "fields": { + "enableConfidentialCompute": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "DisplayDevice": { + "oneofs": { + "_enableDisplay": { + "oneof": [ + "enableDisplay" + ] + } + }, + "fields": { + "enableDisplay": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "AcceleratorConfig": { + "oneofs": { + "_acceleratorType": { + "oneof": [ + "acceleratorType" + ] + }, + "_acceleratorCount": { + "oneof": [ + "acceleratorCount" + ] + } + }, + "fields": { + "acceleratorType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "acceleratorCount": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "CustomerEncryptionKey": { + "oneofs": { + "key": { + "oneof": [ + "rawKey", + "rsaEncryptedKey", + "kmsKeyName" + ] + }, + "_kmsKeyServiceAccount": { + "oneof": [ + "kmsKeyServiceAccount" + ] + } + }, + "fields": { + "rawKey": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "rsaEncryptedKey": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kmsKeyName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kmsKeyServiceAccount": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "Entry": { + "oneofs": { + "_key": { + "oneof": [ + "key" + ] + }, + "_value": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "Metadata": { + "fields": { + "items": { + "rule": "repeated", + "type": "Entry", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "NetworkInterface": { + "oneofs": { + "_network": { + "oneof": [ + "network" + ] + }, + "_subnetwork": { + "oneof": [ + "subnetwork" + ] + }, + "_ipAddress": { + "oneof": [ + "ipAddress" + ] + }, + "_ipv6Address": { + "oneof": [ + "ipv6Address" + ] + }, + "_internalIpv6PrefixLength": { + "oneof": [ + "internalIpv6PrefixLength" + ] + }, + "_name": { + "oneof": [ + "name" + ] + }, + "_stackType": { + "oneof": [ + "stackType" + ] + }, + "_ipv6AccessType": { + "oneof": [ + "ipv6AccessType" + ] + }, + "_queueCount": { + "oneof": [ + "queueCount" + ] + }, + "_nicType": { + "oneof": [ + "nicType" + ] + }, + "_networkAttachment": { + "oneof": [ + "networkAttachment" + ] + } + }, + "fields": { + "network": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "subnetwork": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "ipAddress": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "IPV4", + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "ipv6Address": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "IPV6", + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "internalIpv6PrefixLength": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "name": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "accessConfigs": { + "rule": "repeated", + "type": "AccessConfig", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ipv6AccessConfigs": { + "rule": "repeated", + "type": "AccessConfig", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "aliasIpRanges": { + "rule": "repeated", + "type": "AliasIpRange", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "stackType": { + "type": "StackType", + "id": 10, + "options": { + "proto3_optional": true + } + }, + "ipv6AccessType": { + "type": "Ipv6AccessType", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "queueCount": { + "type": "int32", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "nicType": { + "type": "NicType", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "networkAttachment": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "StackType": { + "values": { + "STACK_TYPE_UNSPECIFIED": 0, + "IPV4_ONLY": 1, + "IPV4_IPV6": 2 + } + }, + "Ipv6AccessType": { + "values": { + "UNSPECIFIED_IPV6_ACCESS_TYPE": 0, + "INTERNAL": 1, + "EXTERNAL": 2 + } + }, + "NicType": { + "values": { + "NIC_TYPE_UNSPECIFIED": 0, + "VIRTIO_NET": 1, + "GVNIC": 2 + } + } + } + }, + "NetworkPerformanceConfig": { + "oneofs": { + "_totalEgressBandwidthTier": { + "oneof": [ + "totalEgressBandwidthTier" + ] + } + }, + "fields": { + "totalEgressBandwidthTier": { + "type": "Tier", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "Tier": { + "values": { + "TIER_UNSPECIFIED": 0, + "DEFAULT": 1, + "TIER_1": 2 + } + } + } + }, + "AccessConfig": { + "oneofs": { + "_type": { + "oneof": [ + "type" + ] + }, + "_name": { + "oneof": [ + "name" + ] + }, + "_externalIp": { + "oneof": [ + "externalIp" + ] + }, + "_externalIpv6": { + "oneof": [ + "externalIpv6" + ] + }, + "_externalIpv6PrefixLength": { + "oneof": [ + "externalIpv6PrefixLength" + ] + }, + "_setPublicPtr": { + "oneof": [ + "setPublicPtr" + ] + }, + "_publicPtrDomainName": { + "oneof": [ + "publicPtrDomainName" + ] + }, + "_networkTier": { + "oneof": [ + "networkTier" + ] + } + }, + "fields": { + "type": { + "type": "AccessType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "name": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "externalIp": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "externalIpv6": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "externalIpv6PrefixLength": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "setPublicPtr": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "publicPtrDomainName": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "networkTier": { + "type": "NetworkTier", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "AccessType": { + "values": { + "ACCESS_TYPE_UNSPECIFIED": 0, + "ONE_TO_ONE_NAT": 1, + "DIRECT_IPV6": 2 + } + }, + "NetworkTier": { + "values": { + "NETWORK_TIER_UNSPECIFIED": 0, + "PREMIUM": 1, + "STANDARD": 2 + } + } + } + }, + "AliasIpRange": { + "oneofs": { + "_ipCidrRange": { + "oneof": [ + "ipCidrRange" + ] + }, + "_subnetworkRangeName": { + "oneof": [ + "subnetworkRangeName" + ] + } + }, + "fields": { + "ipCidrRange": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "subnetworkRangeName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "InstanceParams": { + "fields": { + "resourceManagerTags": { + "keyType": "string", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AllocationAffinity": { + "oneofs": { + "_consumeAllocationType": { + "oneof": [ + "consumeAllocationType" + ] + }, + "_key": { + "oneof": [ + "key" + ] + } + }, + "fields": { + "consumeAllocationType": { + "type": "Type", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "key": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "values": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "NO_RESERVATION": 1, + "ANY_RESERVATION": 2, + "SPECIFIC_RESERVATION": 3 + } + } + } + }, + "Scheduling": { + "oneofs": { + "_onHostMaintenance": { + "oneof": [ + "onHostMaintenance" + ] + }, + "_automaticRestart": { + "oneof": [ + "automaticRestart" + ] + }, + "_preemptible": { + "oneof": [ + "preemptible" + ] + }, + "_minNodeCpus": { + "oneof": [ + "minNodeCpus" + ] + }, + "_provisioningModel": { + "oneof": [ + "provisioningModel" + ] + }, + "_instanceTerminationAction": { + "oneof": [ + "instanceTerminationAction" + ] + }, + "_localSsdRecoveryTimeout": { + "oneof": [ + "localSsdRecoveryTimeout" + ] + } + }, + "fields": { + "onHostMaintenance": { + "type": "OnHostMaintenance", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "automaticRestart": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "preemptible": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "nodeAffinities": { + "rule": "repeated", + "type": "NodeAffinity", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "minNodeCpus": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "provisioningModel": { + "type": "ProvisioningModel", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "instanceTerminationAction": { + "type": "InstanceTerminationAction", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "localSsdRecoveryTimeout": { + "type": "SchedulingDuration", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "OnHostMaintenance": { + "values": { + "ON_HOST_MAINTENANCE_UNSPECIFIED": 0, + "TERMINATE": 1, + "MIGRATE": 1000 + } + }, + "NodeAffinity": { + "oneofs": { + "_key": { + "oneof": [ + "key" + ] + }, + "_operator": { + "oneof": [ + "operator" + ] + } + }, + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "operator": { + "type": "Operator", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "values": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Operator": { + "values": { + "OPERATOR_UNSPECIFIED": 0, + "IN": 1, + "NOT_IN": 2 + } + } + } + }, + "ProvisioningModel": { + "values": { + "PROVISIONING_MODEL_UNSPECIFIED": 0, + "STANDARD": 1, + "SPOT": 2 + } + }, + "InstanceTerminationAction": { + "values": { + "INSTANCE_TERMINATION_ACTION_UNSPECIFIED": 0, + "DELETE": 1, + "STOP": 2 + } + } + } + }, + "SchedulingDuration": { + "oneofs": { + "_seconds": { + "oneof": [ + "seconds" + ] + }, + "_nanos": { + "oneof": [ + "nanos" + ] + } + }, + "fields": { + "seconds": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "nanos": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ServiceAccount": { + "oneofs": { + "_email": { + "oneof": [ + "email" + ] + } + }, + "fields": { + "email": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "scopes": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Tags": { + "fields": { + "items": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AttachedDisk": { + "oneofs": { + "_initializeParams": { + "oneof": [ + "initializeParams" + ] + }, + "_deviceName": { + "oneof": [ + "deviceName" + ] + }, + "_kind": { + "oneof": [ + "kind" + ] + }, + "_diskTypeDeprecated": { + "oneof": [ + "diskTypeDeprecated" + ] + }, + "_mode": { + "oneof": [ + "mode" + ] + }, + "_source": { + "oneof": [ + "source" + ] + }, + "_index": { + "oneof": [ + "index" + ] + }, + "_boot": { + "oneof": [ + "boot" + ] + }, + "_autoDelete": { + "oneof": [ + "autoDelete" + ] + }, + "_diskInterface": { + "oneof": [ + "diskInterface" + ] + }, + "_diskEncryptionKey": { + "oneof": [ + "diskEncryptionKey" + ] + }, + "_diskSizeGb": { + "oneof": [ + "diskSizeGb" + ] + }, + "_savedState": { + "oneof": [ + "savedState" + ] + }, + "_diskType": { + "oneof": [ + "diskType" + ] + }, + "_type": { + "oneof": [ + "type" + ] + } + }, + "fields": { + "initializeParams": { + "type": "InitializeParams", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "deviceName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "kind": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "diskTypeDeprecated": { + "type": "DiskType", + "id": 6, + "options": { + "deprecated": true, + "proto3_optional": true + } + }, + "mode": { + "type": "DiskMode", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "source": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "index": { + "type": "int64", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "boot": { + "type": "bool", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "autoDelete": { + "type": "bool", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "license": { + "rule": "repeated", + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "diskInterface": { + "type": "DiskInterface", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "guestOsFeature": { + "rule": "repeated", + "type": "GuestOsFeature", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "diskEncryptionKey": { + "type": "CustomerEncryptionKey", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "diskSizeGb": { + "type": "int64", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "savedState": { + "type": "DiskSavedState", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "diskType": { + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "type": { + "type": "DiskType", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "InitializeParams": { + "oneofs": { + "_diskName": { + "oneof": [ + "diskName" + ] + } + }, + "fields": { + "diskName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "replicaZones": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DiskType": { + "values": { + "DISK_TYPE_UNSPECIFIED": 0, + "SCRATCH": 1, + "PERSISTENT": 2 + } + }, + "DiskMode": { + "values": { + "DISK_MODE_UNSPECIFIED": 0, + "READ_WRITE": 1, + "READ_ONLY": 2, + "LOCKED": 3 + } + }, + "DiskInterface": { + "values": { + "DISK_INTERFACE_UNSPECIFIED": 0, + "SCSI": 1, + "NVME": 2, + "NVDIMM": 3, + "ISCSI": 4 + } + }, + "DiskSavedState": { + "values": { + "DISK_SAVED_STATE_UNSPECIFIED": 0, + "PRESERVED": 1 + } + } + } + }, + "GuestOsFeature": { + "oneofs": { + "_type": { + "oneof": [ + "type" + ] + } + }, + "fields": { + "type": { + "type": "FeatureType", + "id": 1, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "FeatureType": { + "values": { + "FEATURE_TYPE_UNSPECIFIED": 0, + "VIRTIO_SCSI_MULTIQUEUE": 1, + "WINDOWS": 2, + "MULTI_IP_SUBNET": 3, + "UEFI_COMPATIBLE": 4, + "SECURE_BOOT": 5, + "GVNIC": 6, + "SEV_CAPABLE": 7, + "BARE_METAL_LINUX_COMPATIBLE": 8, + "SUSPEND_RESUME_COMPATIBLE": 9, + "SEV_LIVE_MIGRATABLE": 10, + "SEV_SNP_CAPABLE": 11, + "TDX_CAPABLE": 12, + "IDPF": 13, + "SEV_LIVE_MIGRATABLE_V2": 14 + } + } + } + }, + "KeyRevocationActionType": { + "values": { + "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": 0, + "NONE": 1, + "STOP": 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 + } + }, + "fieldInfo": { + "type": "google.api.FieldInfo", + "id": 291403980, + "extend": "google.protobuf.FieldOptions" + }, + "FieldInfo": { + "fields": { + "format": { + "type": "Format", + "id": 1 + } + }, + "nested": { + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "UUID4": 1, + "IPV4": 2, + "IPV6": 3, + "IPV4_OR_IPV6": 4 + } + } + } + }, + "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 + } + } + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Empty": { + "fields": {} + }, + "DoubleValue": { + "fields": { + "value": { + "type": "double", + "id": 1 + } + } + }, + "FloatValue": { + "fields": { + "value": { + "type": "float", + "id": 1 + } + } + }, + "Int64Value": { + "fields": { + "value": { + "type": "int64", + "id": 1 + } + } + }, + "UInt64Value": { + "fields": { + "value": { + "type": "uint64", + "id": 1 + } + } + }, + "Int32Value": { + "fields": { + "value": { + "type": "int32", + "id": 1 + } + } + }, + "UInt32Value": { + "fields": { + "value": { + "type": "uint32", + "id": 1 + } + } + }, + "BoolValue": { + "fields": { + "value": { + "type": "bool", + "id": 1 + } + } + }, + "StringValue": { + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "BytesValue": { + "fields": { + "value": { + "type": "bytes", + "id": 1 + } + } + } + } + }, + "type": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/type/expr;expr", + "java_multiple_files": true, + "java_outer_classname": "ExprProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "DayOfWeek": { + "values": { + "DAY_OF_WEEK_UNSPECIFIED": 0, + "MONDAY": 1, + "TUESDAY": 2, + "WEDNESDAY": 3, + "THURSDAY": 4, + "FRIDAY": 5, + "SATURDAY": 6, + "SUNDAY": 7 + } + }, + "Month": { + "values": { + "MONTH_UNSPECIFIED": 0, + "JANUARY": 1, + "FEBRUARY": 2, + "MARCH": 3, + "APRIL": 4, + "MAY": 5, + "JUNE": 6, + "JULY": 7, + "AUGUST": 8, + "SEPTEMBER": 9, + "OCTOBER": 10, + "NOVEMBER": 11, + "DECEMBER": 12 + } + }, + "Expr": { + "fields": { + "expression": { + "type": "string", + "id": 1 + }, + "title": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "location": { + "type": "string", + "id": 4 + } + } + } + } + }, + "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 + } + } + } + } + }, + "iam": { + "nested": { + "v1": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Cloud.Iam.V1", + "go_package": "cloud.google.com/go/iam/apiv1/iampb;iampb", + "java_multiple_files": true, + "java_outer_classname": "PolicyProto", + "java_package": "com.google.iam.v1", + "php_namespace": "Google\\Cloud\\Iam\\V1" + }, + "nested": { + "IAMPolicy": { + "options": { + "(google.api.default_host)": "iam-meta-api.googleapis.com" + }, + "methods": { + "SetIamPolicy": { + "requestType": "SetIamPolicyRequest", + "responseType": "Policy", + "options": { + "(google.api.http).post": "/v1/{resource=**}:setIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:setIamPolicy", + "body": "*" + } + } + ] + }, + "GetIamPolicy": { + "requestType": "GetIamPolicyRequest", + "responseType": "Policy", + "options": { + "(google.api.http).post": "/v1/{resource=**}:getIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:getIamPolicy", + "body": "*" + } + } + ] + }, + "TestIamPermissions": { + "requestType": "TestIamPermissionsRequest", + "responseType": "TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=**}:testIamPermissions", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:testIamPermissions", + "body": "*" + } + } + ] + } + } + }, + "SetIamPolicyRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "policy": { + "type": "Policy", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "GetIamPolicyRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "options": { + "type": "GetPolicyOptions", + "id": 2 + } + } + }, + "TestIamPermissionsRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "permissions": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "TestIamPermissionsResponse": { + "fields": { + "permissions": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "GetPolicyOptions": { + "fields": { + "requestedPolicyVersion": { + "type": "int32", + "id": 1 + } + } + }, + "Policy": { + "fields": { + "version": { + "type": "int32", + "id": 1 + }, + "bindings": { + "rule": "repeated", + "type": "Binding", + "id": 4 + }, + "auditConfigs": { + "rule": "repeated", + "type": "AuditConfig", + "id": 6 + }, + "etag": { + "type": "bytes", + "id": 3 + } + } + }, + "Binding": { + "fields": { + "role": { + "type": "string", + "id": 1 + }, + "members": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "condition": { + "type": "google.type.Expr", + "id": 3 + } + } + }, + "AuditConfig": { + "fields": { + "service": { + "type": "string", + "id": 1 + }, + "auditLogConfigs": { + "rule": "repeated", + "type": "AuditLogConfig", + "id": 3 + } + } + }, + "AuditLogConfig": { + "fields": { + "logType": { + "type": "LogType", + "id": 1 + }, + "exemptedMembers": { + "rule": "repeated", + "type": "string", + "id": 2 + } + }, + "nested": { + "LogType": { + "values": { + "LOG_TYPE_UNSPECIFIED": 0, + "ADMIN_READ": 1, + "DATA_WRITE": 2, + "DATA_READ": 3 + } + } + } + }, + "PolicyDelta": { + "fields": { + "bindingDeltas": { + "rule": "repeated", + "type": "BindingDelta", + "id": 1 + }, + "auditConfigDeltas": { + "rule": "repeated", + "type": "AuditConfigDelta", + "id": 2 + } + } + }, + "BindingDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "role": { + "type": "string", + "id": 2 + }, + "member": { + "type": "string", + "id": 3 + }, + "condition": { + "type": "google.type.Expr", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + }, + "AuditConfigDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "service": { + "type": "string", + "id": 2 + }, + "exemptedMember": { + "type": "string", + "id": 3 + }, + "logType": { + "type": "string", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + } + } + } + } + }, + "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 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.abandon_backup.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.abandon_backup.js new file mode 100644 index 00000000000..a0918427786 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.abandon_backup.js @@ -0,0 +1,77 @@ +// 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 +// +// 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(dataSource) { + // [START backupdr_v1_generated_BackupDR_AbandonBackup_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 of the instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/'. + */ + // const dataSource = 'abc123' + /** + * Optional. An optional 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callAbandonBackup() { + // Construct request + const request = { + dataSource, + }; + + // Run request + const [operation] = await backupdrClient.abandonBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callAbandonBackup(); + // [END backupdr_v1_generated_BackupDR_AbandonBackup_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-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan.js new file mode 100644 index 00000000000..e64200d286e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan.js @@ -0,0 +1,91 @@ +// 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 +// +// 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, backupPlanId, backupPlan) { + // [START backupdr_v1_generated_BackupDR_CreateBackupPlan_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 `BackupPlan` project and location in the format + * `projects/{project}/locations/{location}`. In Cloud BackupDR locations + * map to GCP regions, for example **us-central1**. + */ + // const parent = 'abc123' + /** + * Required. The name of the `BackupPlan` to create. The name must be unique + * for the specified project and location.The name must start with a lowercase + * letter followed by up to 62 lowercase letters, numbers, or hyphens. + * Pattern, /[a-z][a-z0-9-]{,62}/. + */ + // const backupPlanId = 'abc123' + /** + * Required. The `BackupPlan` resource object to create. + */ + // const backupPlan = {} + /** + * Optional. An optional 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 t + * he 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callCreateBackupPlan() { + // Construct request + const request = { + parent, + backupPlanId, + backupPlan, + }; + + // Run request + const [operation] = await backupdrClient.createBackupPlan(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateBackupPlan(); + // [END backupdr_v1_generated_BackupDR_CreateBackupPlan_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-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan_association.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan_association.js new file mode 100644 index 00000000000..11a85b7c441 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan_association.js @@ -0,0 +1,89 @@ +// 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 +// +// 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, backupPlanAssociationId, backupPlanAssociation) { + // [START backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_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 backup plan association project and location in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations + * map to GCP regions, for example **us-central1**. + */ + // const parent = 'abc123' + /** + * Required. The name of the backup plan association to create. The name must + * be unique for the specified project and location. + */ + // const backupPlanAssociationId = 'abc123' + /** + * Required. The resource being created + */ + // const backupPlanAssociation = {} + /** + * Optional. An optional 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 t + * he 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callCreateBackupPlanAssociation() { + // Construct request + const request = { + parent, + backupPlanAssociationId, + backupPlanAssociation, + }; + + // Run request + const [operation] = await backupdrClient.createBackupPlanAssociation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateBackupPlanAssociation(); + // [END backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_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-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_vault.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_vault.js new file mode 100644 index 00000000000..2fe111a58f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_vault.js @@ -0,0 +1,93 @@ +// 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 +// +// 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, backupVaultId, backupVault) { + // [START backupdr_v1_generated_BackupDR_CreateBackupVault_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. Value for parent. + */ + // const parent = 'abc123' + /** + * Required. ID of the requesting object + * If auto-generating ID server-side, remove this field and + * backup_vault_id from the method_signature of Create RPC + */ + // const backupVaultId = 'abc123' + /** + * Required. The resource being created + */ + // const backupVault = {} + /** + * Optional. An optional 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 request, but do not perform mutations. + * The default is 'false'. + */ + // const validateOnly = true + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callCreateBackupVault() { + // Construct request + const request = { + parent, + backupVaultId, + backupVault, + }; + + // Run request + const [operation] = await backupdrClient.createBackupVault(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateBackupVault(); + // [END backupdr_v1_generated_BackupDR_CreateBackupVault_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-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js new file mode 100644 index 00000000000..f14ca310e86 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js @@ -0,0 +1,90 @@ +// 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 +// +// 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, managementServerId, managementServer) { + // [START backupdr_v1_generated_BackupDR_CreateManagementServer_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 management server project and location in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR + * locations map to Google Cloud regions, for example **us-central1**. + */ + // const parent = 'abc123' + /** + * Required. The name of the management server to create. The name must be + * unique for the specified project and location. + */ + // const managementServerId = 'abc123' + /** + * Required. A management server + * resource google.cloud.backupdr.v1.ManagementServer + */ + // const managementServer = {} + /** + * Optional. An optional 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callCreateManagementServer() { + // Construct request + const request = { + parent, + managementServerId, + managementServer, + }; + + // Run request + const [operation] = await backupdrClient.createManagementServer(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateManagementServer(); + // [END backupdr_v1_generated_BackupDR_CreateManagementServer_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-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup.js new file mode 100644 index 00000000000..fc987c807df --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup.js @@ -0,0 +1,76 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_DeleteBackup_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 resource. + */ + // const name = 'abc123' + /** + * Optional. An optional 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callDeleteBackup() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.deleteBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteBackup(); + // [END backupdr_v1_generated_BackupDR_DeleteBackup_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-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan.js new file mode 100644 index 00000000000..808b705c69b --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan.js @@ -0,0 +1,77 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_DeleteBackupPlan_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 of the `BackupPlan` to delete. + * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + */ + // const name = 'abc123' + /** + * Optional. An optional 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callDeleteBackupPlan() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.deleteBackupPlan(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteBackupPlan(); + // [END backupdr_v1_generated_BackupDR_DeleteBackupPlan_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-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan_association.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan_association.js new file mode 100644 index 00000000000..50f03c1829e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan_association.js @@ -0,0 +1,77 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_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 backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + */ + // const name = 'abc123' + /** + * Optional. An optional 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callDeleteBackupPlanAssociation() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.deleteBackupPlanAssociation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteBackupPlanAssociation(); + // [END backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_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-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_vault.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_vault.js new file mode 100644 index 00000000000..6252bf9d7cf --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_vault.js @@ -0,0 +1,97 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_DeleteBackupVault_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 resource. + */ + // const name = 'abc123' + /** + * Optional. An optional 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 data source from this backup vault will also + * be deleted. + */ + // const force = true + /** + * The current etag of the backup vault. + * If an etag is provided and does not match the current etag of the + * connection, deletion will be blocked. + */ + // const etag = 'abc123' + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is 'false'. + */ + // const validateOnly = true + /** + * Optional. If true and the BackupVault is not found, the request will + * succeed but no action will be taken. + */ + // const allowMissing = true + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callDeleteBackupVault() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.deleteBackupVault(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteBackupVault(); + // [END backupdr_v1_generated_BackupDR_DeleteBackupVault_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-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js new file mode 100644 index 00000000000..c27febd63fd --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js @@ -0,0 +1,76 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_DeleteManagementServer_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 resource + */ + // const name = 'abc123' + /** + * Optional. An optional 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callDeleteManagementServer() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.deleteManagementServer(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteManagementServer(); + // [END backupdr_v1_generated_BackupDR_DeleteManagementServer_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-backupdr/v1/samples/generated/v1/backup_d_r.fetch_access_token.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_access_token.js new file mode 100644 index 00000000000..f322b28083c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_access_token.js @@ -0,0 +1,69 @@ +// 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 +// +// 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, generationId) { + // [START backupdr_v1_generated_BackupDR_FetchAccessToken_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/* /backupVaults/* /dataSources'. + */ + // const name = 'abc123' + /** + * Required. The generation of the backup to update. + */ + // const generationId = 1234 + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callFetchAccessToken() { + // Construct request + const request = { + name, + generationId, + }; + + // Run request + const response = await backupdrClient.fetchAccessToken(request); + console.log(response); + } + + callFetchAccessToken(); + // [END backupdr_v1_generated_BackupDR_FetchAccessToken_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-backupdr/v1/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js new file mode 100644 index 00000000000..6b32fe8b894 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js @@ -0,0 +1,85 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results. + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callFetchUsableBackupVaults() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.fetchUsableBackupVaultsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callFetchUsableBackupVaults(); + // [END backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_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-backupdr/v1/samples/generated/v1/backup_d_r.finalize_backup.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.finalize_backup.js new file mode 100644 index 00000000000..458004f5820 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.finalize_backup.js @@ -0,0 +1,109 @@ +// 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 +// +// 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(dataSource, backupId) { + // [START backupdr_v1_generated_BackupDR_FinalizeBackup_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 of the instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/'. + */ + // const dataSource = 'abc123' + /** + * This will be assigned to the description field of the newly created Backup. + */ + // const description = 'abc123' + /** + * The point in time when this backup was captured from the source. This will + * be assigned to the consistency_time field of the newly created Backup. + */ + // const consistencyTime = {} + /** + * Optional. An optional 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' + /** + * Required. Resource ID of the Backup resource to be finalized. This must be + * the same backup_id that was used in the InitiateBackupRequest. + */ + // const backupId = 'abc123' + /** + * The earliest timestamp of data available in this Backup. This will set on + * the newly created Backup. + */ + // const recoveryRangeStartTime = {} + /** + * The latest timestamp of data available in this Backup. This will be set on + * the newly created Backup. + */ + // const recoveryRangeEndTime = {} + /** + * The ExpireTime on the backup will be set to FinalizeTime plus this + * duration. If the resulting ExpireTime is less than + * EnforcedRetentionEndTime, then ExpireTime is set to + * EnforcedRetentionEndTime. + */ + // const retentionDuration = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callFinalizeBackup() { + // Construct request + const request = { + dataSource, + backupId, + }; + + // Run request + const [operation] = await backupdrClient.finalizeBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callFinalizeBackup(); + // [END backupdr_v1_generated_BackupDR_FinalizeBackup_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-backupdr/v1/samples/generated/v1/backup_d_r.get_backup.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup.js new file mode 100644 index 00000000000..25d41ba5f59 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup.js @@ -0,0 +1,67 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_GetBackup_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 data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' + */ + // const name = 'abc123' + /** + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + */ + // const view = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetBackup() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getBackup(request); + console.log(response); + } + + callGetBackup(); + // [END backupdr_v1_generated_BackupDR_GetBackup_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-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan.js new file mode 100644 index 00000000000..f7fa54ebe7c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan.js @@ -0,0 +1,62 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_GetBackupPlan_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 of the `BackupPlan` to retrieve. + * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + */ + // const name = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetBackupPlan() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getBackupPlan(request); + console.log(response); + } + + callGetBackupPlan(); + // [END backupdr_v1_generated_BackupDR_GetBackupPlan_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-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan_association.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan_association.js new file mode 100644 index 00000000000..92f8a9b7ff3 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan_association.js @@ -0,0 +1,62 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_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 backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + */ + // const name = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetBackupPlanAssociation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getBackupPlanAssociation(request); + console.log(response); + } + + callGetBackupPlanAssociation(); + // [END backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_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-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_vault.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_vault.js new file mode 100644 index 00000000000..1f000c8433e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_vault.js @@ -0,0 +1,67 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_GetBackupVault_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 backupvault store resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' + */ + // const name = 'abc123' + /** + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault + */ + // const view = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetBackupVault() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getBackupVault(request); + console.log(response); + } + + callGetBackupVault(); + // [END backupdr_v1_generated_BackupDR_GetBackupVault_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-backupdr/v1/samples/generated/v1/backup_d_r.get_data_source.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_data_source.js new file mode 100644 index 00000000000..7500e457572 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_data_source.js @@ -0,0 +1,62 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_GetDataSource_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 data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' + */ + // const name = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetDataSource() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getDataSource(request); + console.log(response); + } + + callGetDataSource(); + // [END backupdr_v1_generated_BackupDR_GetDataSource_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-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js new file mode 100644 index 00000000000..11cc5ae277f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js @@ -0,0 +1,62 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_GetManagementServer_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 management server resource name, in the format + * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' + */ + // const name = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetManagementServer() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getManagementServer(request); + console.log(response); + } + + callGetManagementServer(); + // [END backupdr_v1_generated_BackupDR_GetManagementServer_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-backupdr/v1/samples/generated/v1/backup_d_r.initiate_backup.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.initiate_backup.js new file mode 100644 index 00000000000..3074e90ead4 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.initiate_backup.js @@ -0,0 +1,81 @@ +// 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 +// +// 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(dataSource, backupId) { + // [START backupdr_v1_generated_BackupDR_InitiateBackup_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 of the instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/'. + */ + // const dataSource = 'abc123' + /** + * Optional. An optional 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' + /** + * Required. Resource ID of the Backup resource. + */ + // const backupId = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callInitiateBackup() { + // Construct request + const request = { + dataSource, + backupId, + }; + + // Run request + const response = await backupdrClient.initiateBackup(request); + console.log(response); + } + + callInitiateBackup(); + // [END backupdr_v1_generated_BackupDR_InitiateBackup_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-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plan_associations.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plan_associations.js new file mode 100644 index 00000000000..0f2b5ee7e12 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plan_associations.js @@ -0,0 +1,81 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve backup Plan + * Associations information, in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + * map to GCP regions, for example **us-central1**. To retrieve backup plan + * associations for all locations, use "-" for the + * `{location}` value. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results + */ + // const filter = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListBackupPlanAssociations() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listBackupPlanAssociationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBackupPlanAssociations(); + // [END backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_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-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plans.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plans.js new file mode 100644 index 00000000000..2118748eca9 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plans.js @@ -0,0 +1,93 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_ListBackupPlans_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Cloud + * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + * retrieve backup plans for all locations, use "-" for the + * `{location}` value. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * next_page_token google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token + * to determine if there are more instances left to be queried. + */ + // const pageSize = 1234 + /** + * Optional. The value of + * next_page_token google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Field match expression used to filter the results. + */ + // const filter = 'abc123' + /** + * Optional. Field by which to sort the results. + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListBackupPlans() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listBackupPlansAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBackupPlans(); + // [END backupdr_v1_generated_BackupDR_ListBackupPlans_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-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_vaults.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_vaults.js new file mode 100644 index 00000000000..dca6928eade --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_vaults.js @@ -0,0 +1,90 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_ListBackupVaults_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results. + */ + // const orderBy = 'abc123' + /** + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault. + */ + // const view = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListBackupVaults() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listBackupVaultsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBackupVaults(); + // [END backupdr_v1_generated_BackupDR_ListBackupVaults_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-backupdr/v1/samples/generated/v1/backup_d_r.list_backups.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backups.js new file mode 100644 index 00000000000..d72a8fd2d9f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backups.js @@ -0,0 +1,90 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_ListBackups_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve backup + * information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results. + */ + // const orderBy = 'abc123' + /** + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + */ + // const view = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListBackups() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listBackupsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBackups(); + // [END backupdr_v1_generated_BackupDR_ListBackups_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-backupdr/v1/samples/generated/v1/backup_d_r.list_data_sources.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_data_sources.js new file mode 100644 index 00000000000..3858f996f71 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_data_sources.js @@ -0,0 +1,85 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_ListDataSources_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve data + * sources information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results. + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListDataSources() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listDataSourcesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataSources(); + // [END backupdr_v1_generated_BackupDR_ListDataSources_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-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js new file mode 100644 index 00000000000..262d1a29e3c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js @@ -0,0 +1,85 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_ListManagementServers_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud BackupDR, locations map to Google Cloud regions, for example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results. + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListManagementServers() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listManagementServersAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListManagementServers(); + // [END backupdr_v1_generated_BackupDR_ListManagementServers_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-backupdr/v1/samples/generated/v1/backup_d_r.remove_data_source.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.remove_data_source.js new file mode 100644 index 00000000000..0dee36fae52 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.remove_data_source.js @@ -0,0 +1,76 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_RemoveDataSource_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 resource. + */ + // const name = 'abc123' + /** + * Optional. An optional 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callRemoveDataSource() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.removeDataSource(request); + const [response] = await operation.promise(); + console.log(response); + } + + callRemoveDataSource(); + // [END backupdr_v1_generated_BackupDR_RemoveDataSource_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-backupdr/v1/samples/generated/v1/backup_d_r.restore_backup.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.restore_backup.js new file mode 100644 index 00000000000..3b156cdc818 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.restore_backup.js @@ -0,0 +1,85 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_RestoreBackup_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 of the Backup instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/* /backups/'. + */ + // const name = 'abc123' + /** + * Optional. An optional 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' + /** + * Compute Engine target environment to be used during restore. + */ + // const computeInstanceTargetEnvironment = {} + /** + * Compute Engine instance properties to be overridden during restore. + */ + // const computeInstanceRestoreProperties = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callRestoreBackup() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.restoreBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callRestoreBackup(); + // [END backupdr_v1_generated_BackupDR_RestoreBackup_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-backupdr/v1/samples/generated/v1/backup_d_r.set_internal_status.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.set_internal_status.js new file mode 100644 index 00000000000..fdc8f37cd03 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.set_internal_status.js @@ -0,0 +1,87 @@ +// 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 +// +// 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(dataSource, value, backupConfigState) { + // [START backupdr_v1_generated_BackupDR_SetInternalStatus_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 of the instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/'. + */ + // const dataSource = 'abc123' + /** + * Required. The value required for this method to work. This field must be + * the 32-byte SHA256 hash of the DataSourceID. The DataSourceID used here is + * only the final piece of the fully qualified resource path for this + * DataSource (i.e. the part after '.../dataSources/'). This field exists to + * make this method difficult to call since it is intended for use only by + * Backup Appliances. + */ + // const value = Buffer.from('string') + /** + * Required. Output only. The new BackupConfigState to set for the DataSource. + */ + // const backupConfigState = {} + /** + * Optional. An optional 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. 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callSetInternalStatus() { + // Construct request + const request = { + dataSource, + value, + backupConfigState, + }; + + // Run request + const [operation] = await backupdrClient.setInternalStatus(request); + const [response] = await operation.promise(); + console.log(response); + } + + callSetInternalStatus(); + // [END backupdr_v1_generated_BackupDR_SetInternalStatus_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-backupdr/v1/samples/generated/v1/backup_d_r.test_iam_permissions.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.test_iam_permissions.js new file mode 100644 index 00000000000..e2905be7ced --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.test_iam_permissions.js @@ -0,0 +1,70 @@ +// 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 +// +// 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(resource, permissions) { + // [START backupdr_v1_generated_BackupDR_TestIamPermissions_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 for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * IAM Overview (https://cloud.google.com/iam/docs/overview#permissions). + */ + // const permissions = ['abc','def'] + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callTestIamPermissions() { + // Construct request + const request = { + resource, + permissions, + }; + + // Run request + const response = await backupdrClient.testIamPermissions(request); + console.log(response); + } + + callTestIamPermissions(); + // [END backupdr_v1_generated_BackupDR_TestIamPermissions_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-backupdr/v1/samples/generated/v1/backup_d_r.trigger_backup.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.trigger_backup.js new file mode 100644 index 00000000000..4d212d1ced7 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.trigger_backup.js @@ -0,0 +1,82 @@ +// 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 +// +// 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, ruleId) { + // [START backupdr_v1_generated_BackupDR_TriggerBackup_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 backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + */ + // const name = 'abc123' + /** + * Required. backup rule_id for which a backup needs to be triggered. + */ + // const ruleId = 'abc123' + /** + * Optional. An optional 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callTriggerBackup() { + // Construct request + const request = { + name, + ruleId, + }; + + // Run request + const [operation] = await backupdrClient.triggerBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callTriggerBackup(); + // [END backupdr_v1_generated_BackupDR_TriggerBackup_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-backupdr/v1/samples/generated/v1/backup_d_r.update_backup.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup.js new file mode 100644 index 00000000000..06b0a51edd7 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup.js @@ -0,0 +1,85 @@ +// 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 +// +// 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(updateMask, backup) { + // [START backupdr_v1_generated_BackupDR_UpdateBackup_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. Field mask is used to specify the fields to be overwritten in the + * Backup 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 the request will fail. + */ + // const updateMask = {} + /** + * Required. The resource being updated + */ + // const backup = {} + /** + * Optional. An optional 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callUpdateBackup() { + // Construct request + const request = { + updateMask, + backup, + }; + + // Run request + const [operation] = await backupdrClient.updateBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateBackup(); + // [END backupdr_v1_generated_BackupDR_UpdateBackup_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-backupdr/v1/samples/generated/v1/backup_d_r.update_backup_vault.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup_vault.js new file mode 100644 index 00000000000..62444645da6 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup_vault.js @@ -0,0 +1,95 @@ +// 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 +// +// 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(updateMask, backupVault) { + // [START backupdr_v1_generated_BackupDR_UpdateBackupVault_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. Field mask is used to specify the fields to be overwritten in the + * BackupVault 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 the request will fail. + */ + // const updateMask = {} + /** + * Required. The resource being updated + */ + // const backupVault = {} + /** + * Optional. An optional 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 request, but do not perform mutations. + * The default is 'false'. + */ + // const validateOnly = true + /** + * Optional. If set to true, will not check plan duration against backup vault + * enforcement duration. + */ + // const force = true + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callUpdateBackupVault() { + // Construct request + const request = { + updateMask, + backupVault, + }; + + // Run request + const [operation] = await backupdrClient.updateBackupVault(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateBackupVault(); + // [END backupdr_v1_generated_BackupDR_UpdateBackupVault_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-backupdr/v1/samples/generated/v1/backup_d_r.update_data_source.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_data_source.js new file mode 100644 index 00000000000..707ff65f27d --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_data_source.js @@ -0,0 +1,89 @@ +// 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 +// +// 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(updateMask, dataSource) { + // [START backupdr_v1_generated_BackupDR_UpdateDataSource_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. Field mask is used to specify the fields to be overwritten in the + * DataSource 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 the request will fail. + */ + // const updateMask = {} + /** + * Required. The resource being updated + */ + // const dataSource = {} + /** + * Optional. An optional 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. Enable upsert. + */ + // const allowMissing = true + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callUpdateDataSource() { + // Construct request + const request = { + updateMask, + dataSource, + }; + + // Run request + const [operation] = await backupdrClient.updateDataSource(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateDataSource(); + // [END backupdr_v1_generated_BackupDR_UpdateDataSource_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-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json new file mode 100644 index 00000000000..9a1269e985f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json @@ -0,0 +1,1707 @@ +{ + "clientLibrary": { + "name": "nodejs-backupdr", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.backupdr.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "backupdr_v1_generated_BackupDR_ListManagementServers_async", + "title": "BackupDR listManagementServers Sample", + "origin": "API_DEFINITION", + "description": " Lists ManagementServers in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_management_servers.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListManagementServers", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListManagementServers", + "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.backupdr.v1.ListManagementServersResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListManagementServers", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListManagementServers", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetManagementServer_async", + "title": "BackupDR getManagementServer Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single ManagementServer.", + "canonical": true, + "file": "backup_d_r.get_management_server.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetManagementServer", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetManagementServer", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.backupdr.v1.ManagementServer", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetManagementServer", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetManagementServer", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_CreateManagementServer_async", + "title": "BackupDR createManagementServer Sample", + "origin": "API_DEFINITION", + "description": " Creates a new ManagementServer in a given project and location.", + "canonical": true, + "file": "backup_d_r.create_management_server.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateManagementServer", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateManagementServer", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "management_server_id", + "type": "TYPE_STRING" + }, + { + "name": "management_server", + "type": ".google.cloud.backupdr.v1.ManagementServer" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "CreateManagementServer", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateManagementServer", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_DeleteManagementServer_async", + "title": "BackupDR deleteManagementServer Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single ManagementServer.", + "canonical": true, + "file": "backup_d_r.delete_management_server.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteManagementServer", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteManagementServer", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "DeleteManagementServer", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteManagementServer", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupVault_async", + "title": "BackupDR createBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Creates a new BackupVault in a given project and location.", + "canonical": true, + "file": "backup_d_r.create_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "backup_vault_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_vault", + "type": ".google.cloud.backupdr.v1.BackupVault" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "CreateBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListBackupVaults_async", + "title": "BackupDR listBackupVaults Sample", + "origin": "API_DEFINITION", + "description": " Lists BackupVaults in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_backup_vaults.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackupVaults", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", + "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" + }, + { + "name": "view", + "type": ".google.cloud.backupdr.v1.BackupVaultView" + } + ], + "resultType": ".google.cloud.backupdr.v1.ListBackupVaultsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListBackupVaults", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_async", + "title": "BackupDR fetchUsableBackupVaults Sample", + "origin": "API_DEFINITION", + "description": " FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.", + "canonical": true, + "file": "backup_d_r.fetch_usable_backup_vaults.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchUsableBackupVaults", + "fullName": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", + "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.backupdr.v1.FetchUsableBackupVaultsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "FetchUsableBackupVaults", + "fullName": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetBackupVault_async", + "title": "BackupDR getBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a BackupVault.", + "canonical": true, + "file": "backup_d_r.get_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.backupdr.v1.BackupVaultView" + } + ], + "resultType": ".google.cloud.backupdr.v1.BackupVault", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_UpdateBackupVault_async", + "title": "BackupDR updateBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings of a BackupVault.", + "canonical": true, + "file": "backup_d_r.update_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "backup_vault", + "type": ".google.cloud.backupdr.v1.BackupVault" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "UpdateBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupVault_async", + "title": "BackupDR deleteBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Deletes a BackupVault.", + "canonical": true, + "file": "backup_d_r.delete_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 89, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + }, + { + "name": "etag", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "DeleteBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_TestIamPermissions_async", + "title": "BackupDR testIamPermissions Sample", + "origin": "API_DEFINITION", + "description": " Returns the caller's permissions on a BackupVault resource. A caller is not required to have Google IAM permission to make this request.", + "canonical": true, + "file": "backup_d_r.test_iam_permissions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.backupdr.v1.BackupDR.TestIamPermissions", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "permissions", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.iam.v1.TestIamPermissionsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.backupdr.v1.BackupDR.TestIamPermissions", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListDataSources_async", + "title": "BackupDR listDataSources Sample", + "origin": "API_DEFINITION", + "description": " Lists DataSources in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_data_sources.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataSources", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListDataSources", + "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.backupdr.v1.ListDataSourcesResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListDataSources", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListDataSources", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetDataSource_async", + "title": "BackupDR getDataSource Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a DataSource.", + "canonical": true, + "file": "backup_d_r.get_data_source.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetDataSource", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.backupdr.v1.DataSource", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetDataSource", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_UpdateDataSource_async", + "title": "BackupDR updateDataSource Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings of a DataSource.", + "canonical": true, + "file": "backup_d_r.update_data_source.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "data_source", + "type": ".google.cloud.backupdr.v1.DataSource" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "UpdateDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_RemoveDataSource_async", + "title": "BackupDR removeDataSource Sample", + "origin": "API_DEFINITION", + "description": " Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.", + "canonical": true, + "file": "backup_d_r.remove_data_source.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RemoveDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.RemoveDataSource", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "RemoveDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.RemoveDataSource", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_SetInternalStatus_async", + "title": "BackupDR setInternalStatus Sample", + "origin": "API_DEFINITION", + "description": " Sets the internal status of a DataSource.", + "canonical": true, + "file": "backup_d_r.set_internal_status.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetInternalStatus", + "fullName": "google.cloud.backupdr.v1.BackupDR.SetInternalStatus", + "async": true, + "parameters": [ + { + "name": "data_source", + "type": "TYPE_STRING" + }, + { + "name": "value", + "type": "TYPE_BYTES" + }, + { + "name": "backup_config_state", + "type": ".google.cloud.backupdr.v1.BackupConfigState" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "SetInternalStatus", + "fullName": "google.cloud.backupdr.v1.BackupDR.SetInternalStatus", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_InitiateBackup_async", + "title": "BackupDR initiateBackup Sample", + "origin": "API_DEFINITION", + "description": " Internal only. Initiates a backup.", + "canonical": true, + "file": "backup_d_r.initiate_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "InitiateBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.InitiateBackup", + "async": true, + "parameters": [ + { + "name": "data_source", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.backupdr.v1.InitiateBackupResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "InitiateBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.InitiateBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_AbandonBackup_async", + "title": "BackupDR abandonBackup Sample", + "origin": "API_DEFINITION", + "description": " Internal only. Abandons a backup.", + "canonical": true, + "file": "backup_d_r.abandon_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AbandonBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.AbandonBackup", + "async": true, + "parameters": [ + { + "name": "data_source", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "AbandonBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.AbandonBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_FinalizeBackup_async", + "title": "BackupDR finalizeBackup Sample", + "origin": "API_DEFINITION", + "description": " Internal only. Finalize a backup that was started by a call to InitiateBackup.", + "canonical": true, + "file": "backup_d_r.finalize_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 101, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FinalizeBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.FinalizeBackup", + "async": true, + "parameters": [ + { + "name": "data_source", + "type": "TYPE_STRING" + }, + { + "name": "description", + "type": "TYPE_STRING" + }, + { + "name": "consistency_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_id", + "type": "TYPE_STRING" + }, + { + "name": "recovery_range_start_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "recovery_range_end_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "retention_duration", + "type": ".google.protobuf.Duration" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "FinalizeBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.FinalizeBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_FetchAccessToken_async", + "title": "BackupDR fetchAccessToken Sample", + "origin": "API_DEFINITION", + "description": " Internal only. Fetch access token for a given data source.", + "canonical": true, + "file": "backup_d_r.fetch_access_token.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchAccessToken", + "fullName": "google.cloud.backupdr.v1.BackupDR.FetchAccessToken", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "generation_id", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.cloud.backupdr.v1.FetchAccessTokenResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "FetchAccessToken", + "fullName": "google.cloud.backupdr.v1.BackupDR.FetchAccessToken", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListBackups_async", + "title": "BackupDR listBackups Sample", + "origin": "API_DEFINITION", + "description": " Lists Backups in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_backups.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackups", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackups", + "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" + }, + { + "name": "view", + "type": ".google.cloud.backupdr.v1.BackupView" + } + ], + "resultType": ".google.cloud.backupdr.v1.ListBackupsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListBackups", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackups", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetBackup_async", + "title": "BackupDR getBackup Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a Backup.", + "canonical": true, + "file": "backup_d_r.get_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.backupdr.v1.BackupView" + } + ], + "resultType": ".google.cloud.backupdr.v1.Backup", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_UpdateBackup_async", + "title": "BackupDR updateBackup Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings of a Backup.", + "canonical": true, + "file": "backup_d_r.update_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "backup", + "type": ".google.cloud.backupdr.v1.Backup" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "UpdateBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackup_async", + "title": "BackupDR deleteBackup Sample", + "origin": "API_DEFINITION", + "description": " Deletes a Backup.", + "canonical": true, + "file": "backup_d_r.delete_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "DeleteBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_RestoreBackup_async", + "title": "BackupDR restoreBackup Sample", + "origin": "API_DEFINITION", + "description": " Restore from a Backup", + "canonical": true, + "file": "backup_d_r.restore_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RestoreBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "compute_instance_target_environment", + "type": ".google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment" + }, + { + "name": "compute_instance_restore_properties", + "type": ".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "RestoreBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupPlan_async", + "title": "BackupDR createBackupPlan Sample", + "origin": "API_DEFINITION", + "description": " Create a BackupPlan", + "canonical": true, + "file": "backup_d_r.create_backup_plan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 83, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "backup_plan_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_plan", + "type": ".google.cloud.backupdr.v1.BackupPlan" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "CreateBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetBackupPlan_async", + "title": "BackupDR getBackupPlan Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single BackupPlan.", + "canonical": true, + "file": "backup_d_r.get_backup_plan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.backupdr.v1.BackupPlan", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListBackupPlans_async", + "title": "BackupDR listBackupPlans Sample", + "origin": "API_DEFINITION", + "description": " Lists BackupPlans in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_backup_plans.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackupPlans", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", + "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.backupdr.v1.ListBackupPlansResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListBackupPlans", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupPlan_async", + "title": "BackupDR deleteBackupPlan Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single BackupPlan.", + "canonical": true, + "file": "backup_d_r.delete_backup_plan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "DeleteBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async", + "title": "BackupDR createBackupPlanAssociation Sample", + "origin": "API_DEFINITION", + "description": " Create a BackupPlanAssociation", + "canonical": true, + "file": "backup_d_r.create_backup_plan_association.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "backup_plan_association_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_plan_association", + "type": ".google.cloud.backupdr.v1.BackupPlanAssociation" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "CreateBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_async", + "title": "BackupDR getBackupPlanAssociation Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single BackupPlanAssociation.", + "canonical": true, + "file": "backup_d_r.get_backup_plan_association.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.backupdr.v1.BackupPlanAssociation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_async", + "title": "BackupDR listBackupPlanAssociations Sample", + "origin": "API_DEFINITION", + "description": " Lists BackupPlanAssociations in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_backup_plan_associations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackupPlanAssociations", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", + "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" + } + ], + "resultType": ".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListBackupPlanAssociations", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async", + "title": "BackupDR deleteBackupPlanAssociation Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single BackupPlanAssociation.", + "canonical": true, + "file": "backup_d_r.delete_backup_plan_association.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "DeleteBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_TriggerBackup_async", + "title": "BackupDR triggerBackup Sample", + "origin": "API_DEFINITION", + "description": " Triggers a new Backup.", + "canonical": true, + "file": "backup_d_r.trigger_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TriggerBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "rule_id", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "TriggerBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/index.ts b/owl-bot-staging/google-cloud-backupdr/v1/src/index.ts new file mode 100644 index 00000000000..025ea882aeb --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/src/index.ts @@ -0,0 +1,25 @@ +// 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 +// +// 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 BackupDRClient = v1.BackupDRClient; +type BackupDRClient = v1.BackupDRClient; +export {v1, BackupDRClient}; +export default {v1, BackupDRClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts new file mode 100644 index 00000000000..97cd950b4c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts @@ -0,0 +1,5426 @@ +// 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 +// +// 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/backup_d_r_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './backup_d_r_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The BackupDR Service + * @class + * @memberof v1 + */ +export class BackupDRClient { + 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; + backupDRStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of BackupDRClient. + * + * @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 BackupDRClient({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 BackupDRClient; + 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 = 'backupdr.' + 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 = { + backupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}' + ), + backupPlanPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupPlans/{backup_plan}' + ), + backupPlanAssociationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}' + ), + backupVaultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backupvault}' + ), + dataSourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + managementServerPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/managementServers/{managementserver}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + }; + + // 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 = { + listManagementServers: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'managementServers'), + listBackupVaults: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupVaults'), + fetchUsableBackupVaults: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupVaults'), + listDataSources: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataSources'), + listBackups: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backups'), + listBackupPlans: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupPlans'), + listBackupPlanAssociations: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupPlanAssociations') + }; + + 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.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/managementServers/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/managementServers/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/managementServers/*}:testIamPermissions',body: '*',},{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 createManagementServerResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.ManagementServer') as gax.protobuf.Type; + const createManagementServerMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const deleteManagementServerResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteManagementServerMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const createBackupVaultResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupVault') as gax.protobuf.Type; + const createBackupVaultMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const updateBackupVaultResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupVault') as gax.protobuf.Type; + const updateBackupVaultMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const deleteBackupVaultResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteBackupVaultMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const updateDataSourceResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.DataSource') as gax.protobuf.Type; + const updateDataSourceMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const removeDataSourceResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const removeDataSourceMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const setInternalStatusResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.SetInternalStatusResponse') as gax.protobuf.Type; + const setInternalStatusMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const abandonBackupResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const abandonBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const finalizeBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.Backup') as gax.protobuf.Type; + const finalizeBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const updateBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.Backup') as gax.protobuf.Type; + const updateBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const deleteBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.Backup') as gax.protobuf.Type; + const deleteBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const restoreBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.RestoreBackupResponse') as gax.protobuf.Type; + const restoreBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const createBackupPlanResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupPlan') as gax.protobuf.Type; + const createBackupPlanMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const deleteBackupPlanResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteBackupPlanMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const createBackupPlanAssociationResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupPlanAssociation') as gax.protobuf.Type; + const createBackupPlanAssociationMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const deleteBackupPlanAssociationResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteBackupPlanAssociationMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const triggerBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupPlanAssociation') as gax.protobuf.Type; + const triggerBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createManagementServer: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createManagementServerResponse.decode.bind(createManagementServerResponse), + createManagementServerMetadata.decode.bind(createManagementServerMetadata)), + deleteManagementServer: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteManagementServerResponse.decode.bind(deleteManagementServerResponse), + deleteManagementServerMetadata.decode.bind(deleteManagementServerMetadata)), + createBackupVault: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBackupVaultResponse.decode.bind(createBackupVaultResponse), + createBackupVaultMetadata.decode.bind(createBackupVaultMetadata)), + updateBackupVault: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateBackupVaultResponse.decode.bind(updateBackupVaultResponse), + updateBackupVaultMetadata.decode.bind(updateBackupVaultMetadata)), + deleteBackupVault: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupVaultResponse.decode.bind(deleteBackupVaultResponse), + deleteBackupVaultMetadata.decode.bind(deleteBackupVaultMetadata)), + updateDataSource: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateDataSourceResponse.decode.bind(updateDataSourceResponse), + updateDataSourceMetadata.decode.bind(updateDataSourceMetadata)), + removeDataSource: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + removeDataSourceResponse.decode.bind(removeDataSourceResponse), + removeDataSourceMetadata.decode.bind(removeDataSourceMetadata)), + setInternalStatus: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + setInternalStatusResponse.decode.bind(setInternalStatusResponse), + setInternalStatusMetadata.decode.bind(setInternalStatusMetadata)), + abandonBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + abandonBackupResponse.decode.bind(abandonBackupResponse), + abandonBackupMetadata.decode.bind(abandonBackupMetadata)), + finalizeBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + finalizeBackupResponse.decode.bind(finalizeBackupResponse), + finalizeBackupMetadata.decode.bind(finalizeBackupMetadata)), + updateBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateBackupResponse.decode.bind(updateBackupResponse), + updateBackupMetadata.decode.bind(updateBackupMetadata)), + deleteBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupResponse.decode.bind(deleteBackupResponse), + deleteBackupMetadata.decode.bind(deleteBackupMetadata)), + restoreBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + restoreBackupResponse.decode.bind(restoreBackupResponse), + restoreBackupMetadata.decode.bind(restoreBackupMetadata)), + createBackupPlan: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBackupPlanResponse.decode.bind(createBackupPlanResponse), + createBackupPlanMetadata.decode.bind(createBackupPlanMetadata)), + deleteBackupPlan: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupPlanResponse.decode.bind(deleteBackupPlanResponse), + deleteBackupPlanMetadata.decode.bind(deleteBackupPlanMetadata)), + createBackupPlanAssociation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBackupPlanAssociationResponse.decode.bind(createBackupPlanAssociationResponse), + createBackupPlanAssociationMetadata.decode.bind(createBackupPlanAssociationMetadata)), + deleteBackupPlanAssociation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupPlanAssociationResponse.decode.bind(deleteBackupPlanAssociationResponse), + deleteBackupPlanAssociationMetadata.decode.bind(deleteBackupPlanAssociationMetadata)), + triggerBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + triggerBackupResponse.decode.bind(triggerBackupResponse), + triggerBackupMetadata.decode.bind(triggerBackupMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.backupdr.v1.BackupDR', 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.backupDRStub) { + return this.backupDRStub; + } + + // Put together the "service stub" for + // google.cloud.backupdr.v1.BackupDR. + this.backupDRStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.backupdr.v1.BackupDR') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.backupdr.v1.BackupDR, + 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 backupDRStubMethods = + ['listManagementServers', 'getManagementServer', 'createManagementServer', 'deleteManagementServer', 'createBackupVault', 'listBackupVaults', 'fetchUsableBackupVaults', 'getBackupVault', 'updateBackupVault', 'deleteBackupVault', 'testIamPermissions', 'listDataSources', 'getDataSource', 'updateDataSource', 'removeDataSource', 'setInternalStatus', 'initiateBackup', 'abandonBackup', 'finalizeBackup', 'fetchAccessToken', 'listBackups', 'getBackup', 'updateBackup', 'deleteBackup', 'restoreBackup', 'createBackupPlan', 'getBackupPlan', 'listBackupPlans', 'deleteBackupPlan', 'createBackupPlanAssociation', 'getBackupPlanAssociation', 'listBackupPlanAssociations', 'deleteBackupPlanAssociation', 'triggerBackup']; + for (const methodName of backupDRStubMethods) { + const callPromise = this.backupDRStub.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.backupDRStub; + } + + /** + * 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 'backupdr.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 'backupdr.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 -- + // ------------------- +/** + * Gets details of a single ManagementServer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the management server resource name, in the format + * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' + * @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.backupdr.v1.ManagementServer|ManagementServer}. + * 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/backup_d_r.get_management_server.js + * region_tag:backupdr_v1_generated_BackupDR_GetManagementServer_async + */ + getManagementServer( + request?: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IGetManagementServerRequest|undefined, {}|undefined + ]>; + getManagementServer( + request: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, + {}|null|undefined>): void; + getManagementServer( + request: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, + {}|null|undefined>): void; + getManagementServer( + request?: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IGetManagementServerRequest|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.getManagementServer(request, options, callback); + } +/** + * Gets details of a BackupVault. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backupvault store resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' + * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault + * @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.backupdr.v1.BackupVault|BackupVault}. + * 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/backup_d_r.get_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_GetBackupVault_async + */ + getBackupVault( + request?: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|undefined, {}|undefined + ]>; + getBackupVault( + request: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, + {}|null|undefined>): void; + getBackupVault( + request: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, + {}|null|undefined>): void; + getBackupVault( + request?: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|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.getBackupVault(request, options, callback); + } +/** + * Returns the caller's permissions on a BackupVault resource. + * + * A caller is not required to have Google IAM permission to make this + * request. + * + * @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 + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @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.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. + * 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/backup_d_r.test_iam_permissions.js + * region_tag:backupdr_v1_generated_BackupDR_TestIamPermissions_async + */ + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, + options?: CallOptions): + Promise<[ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|undefined, {}|undefined + ]>; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>): void; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>): void; + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|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({ + 'resource': request.resource ?? '', + }); + this.initialize(); + return this.innerApiCalls.testIamPermissions(request, options, callback); + } +/** + * Gets details of a DataSource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' + * @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.backupdr.v1.DataSource|DataSource}. + * 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/backup_d_r.get_data_source.js + * region_tag:backupdr_v1_generated_BackupDR_GetDataSource_async + */ + getDataSource( + request?: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest|undefined, {}|undefined + ]>; + getDataSource( + request: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, + {}|null|undefined>): void; + getDataSource( + request: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, + {}|null|undefined>): void; + getDataSource( + request?: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest|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.getDataSource(request, options, callback); + } +/** + * Internal only. + * Initiates a backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.dataSource + * Required. The resource name of the instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/'. + * @param {string} [request.requestId] + * Optional. An optional 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 {string} request.backupId + * Required. Resource ID of the Backup resource. + * @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.backupdr.v1.InitiateBackupResponse|InitiateBackupResponse}. + * 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/backup_d_r.initiate_backup.js + * region_tag:backupdr_v1_generated_BackupDR_InitiateBackup_async + */ + initiateBackup( + request?: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IInitiateBackupResponse, + protos.google.cloud.backupdr.v1.IInitiateBackupRequest|undefined, {}|undefined + ]>; + initiateBackup( + request: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IInitiateBackupResponse, + protos.google.cloud.backupdr.v1.IInitiateBackupRequest|null|undefined, + {}|null|undefined>): void; + initiateBackup( + request: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IInitiateBackupResponse, + protos.google.cloud.backupdr.v1.IInitiateBackupRequest|null|undefined, + {}|null|undefined>): void; + initiateBackup( + request?: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.backupdr.v1.IInitiateBackupResponse, + protos.google.cloud.backupdr.v1.IInitiateBackupRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.backupdr.v1.IInitiateBackupResponse, + protos.google.cloud.backupdr.v1.IInitiateBackupRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.backupdr.v1.IInitiateBackupResponse, + protos.google.cloud.backupdr.v1.IInitiateBackupRequest|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({ + 'data_source': request.dataSource ?? '', + }); + this.initialize(); + return this.innerApiCalls.initiateBackup(request, options, callback); + } +/** + * Internal only. + * Fetch access token for a given data source. + * + * @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/* /backupVaults/* /dataSources'. + * @param {number} request.generationId + * Required. The generation of the backup to update. + * @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.backupdr.v1.FetchAccessTokenResponse|FetchAccessTokenResponse}. + * 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/backup_d_r.fetch_access_token.js + * region_tag:backupdr_v1_generated_BackupDR_FetchAccessToken_async + */ + fetchAccessToken( + request?: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, + protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest|undefined, {}|undefined + ]>; + fetchAccessToken( + request: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, + protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest|null|undefined, + {}|null|undefined>): void; + fetchAccessToken( + request: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, + protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest|null|undefined, + {}|null|undefined>): void; + fetchAccessToken( + request?: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, + protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, + protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, + protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest|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.fetchAccessToken(request, options, callback); + } +/** + * Gets details of a Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @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.backupdr.v1.Backup|Backup}. + * 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/backup_d_r.get_backup.js + * region_tag:backupdr_v1_generated_BackupDR_GetBackup_async + */ + getBackup( + request?: protos.google.cloud.backupdr.v1.IGetBackupRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest|undefined, {}|undefined + ]>; + getBackup( + request: protos.google.cloud.backupdr.v1.IGetBackupRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, + {}|null|undefined>): void; + getBackup( + request: protos.google.cloud.backupdr.v1.IGetBackupRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, + {}|null|undefined>): void; + getBackup( + request?: protos.google.cloud.backupdr.v1.IGetBackupRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest|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.getBackup(request, options, callback); + } +/** + * Gets details of a single BackupPlan. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the `BackupPlan` to retrieve. + * + * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + * @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.backupdr.v1.BackupPlan|BackupPlan}. + * 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/backup_d_r.get_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_GetBackupPlan_async + */ + getBackupPlan( + request?: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|undefined, {}|undefined + ]>; + getBackupPlan( + request: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, + {}|null|undefined>): void; + getBackupPlan( + request: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, + {}|null|undefined>): void; + getBackupPlan( + request?: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|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.getBackupPlan(request, options, callback); + } +/** + * Gets details of a single BackupPlanAssociation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. + * 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/backup_d_r.get_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_async + */ + getBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|undefined, {}|undefined + ]>; + getBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, + {}|null|undefined>): void; + getBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, + {}|null|undefined>): void; + getBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|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.getBackupPlanAssociation(request, options, callback); + } + +/** + * Creates a new ManagementServer in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The management server project and location in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR + * locations map to Google Cloud regions, for example **us-central1**. + * @param {string} request.managementServerId + * Required. The name of the management server to create. The name must be + * unique for the specified project and location. + * @param {google.cloud.backupdr.v1.ManagementServer} request.managementServer + * Required. A [management server + * resource][google.cloud.backupdr.v1.ManagementServer] + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.create_management_server.js + * region_tag:backupdr_v1_generated_BackupDR_CreateManagementServer_async + */ + createManagementServer( + request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createManagementServer( + request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createManagementServer( + request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createManagementServer( + request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + 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.createManagementServer(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createManagementServer()`. + * @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/backup_d_r.create_management_server.js + * region_tag:backupdr_v1_generated_BackupDR_CreateManagementServer_async + */ + async checkCreateManagementServerProgress(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.createManagementServer, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a single ManagementServer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.delete_management_server.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteManagementServer_async + */ + deleteManagementServer( + request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteManagementServer( + request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteManagementServer( + request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteManagementServer( + request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + 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.deleteManagementServer(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteManagementServer()`. + * @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/backup_d_r.delete_management_server.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteManagementServer_async + */ + async checkDeleteManagementServerProgress(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.deleteManagementServer, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a new BackupVault in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Value for parent. + * @param {string} request.backupVaultId + * Required. ID of the requesting object + * If auto-generating ID server-side, remove this field and + * backup_vault_id from the method_signature of Create RPC + * @param {google.cloud.backupdr.v1.BackupVault} request.backupVault + * Required. The resource being created + * @param {string} [request.requestId] + * Optional. An optional 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 request, but do not perform mutations. + * The default is 'false'. + * @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/backup_d_r.create_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupVault_async + */ + createBackupVault( + request?: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createBackupVault( + request: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackupVault( + request: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackupVault( + request?: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, + 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.createBackupVault(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createBackupVault()`. + * @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/backup_d_r.create_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupVault_async + */ + async checkCreateBackupVaultProgress(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.createBackupVault, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the settings of a BackupVault. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * BackupVault 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 the request will fail. + * @param {google.cloud.backupdr.v1.BackupVault} request.backupVault + * Required. The resource being updated + * @param {string} [request.requestId] + * Optional. An optional 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 request, but do not perform mutations. + * The default is 'false'. + * @param {boolean} [request.force] + * Optional. If set to true, will not check plan duration against backup vault + * enforcement duration. + * @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/backup_d_r.update_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateBackupVault_async + */ + updateBackupVault( + request?: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateBackupVault( + request: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateBackupVault( + request: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateBackupVault( + request?: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, + 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({ + 'backup_vault.name': request.backupVault!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateBackupVault(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateBackupVault()`. + * @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/backup_d_r.update_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateBackupVault_async + */ + async checkUpdateBackupVaultProgress(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.updateBackupVault, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a BackupVault. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {string} [request.requestId] + * Optional. An optional 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 data source from this backup vault will also + * be deleted. + * @param {string} request.etag + * The current etag of the backup vault. + * If an etag is provided and does not match the current etag of the + * connection, deletion will be blocked. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is 'false'. + * @param {boolean} [request.allowMissing] + * Optional. If true and the BackupVault is not found, the request will + * succeed but no action will be taken. + * @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/backup_d_r.delete_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupVault_async + */ + deleteBackupVault( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteBackupVault( + request: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackupVault( + request: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackupVault( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, + 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.deleteBackupVault(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteBackupVault()`. + * @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/backup_d_r.delete_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupVault_async + */ + async checkDeleteBackupVaultProgress(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.deleteBackupVault, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the settings of a DataSource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * DataSource 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 the request will fail. + * @param {google.cloud.backupdr.v1.DataSource} request.dataSource + * Required. The resource being updated + * @param {string} [request.requestId] + * Optional. An optional 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.allowMissing] + * Optional. Enable upsert. + * @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/backup_d_r.update_data_source.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateDataSource_async + */ + updateDataSource( + request?: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateDataSource( + request: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDataSource( + request: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDataSource( + request?: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, + 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({ + 'data_source.name': request.dataSource!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateDataSource(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateDataSource()`. + * @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/backup_d_r.update_data_source.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateDataSource_async + */ + async checkUpdateDataSourceProgress(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.updateDataSource, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a DataSource. This is a custom method instead of a standard delete + * method because external clients will not delete DataSources except for + * BackupDR backup appliances. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.remove_data_source.js + * region_tag:backupdr_v1_generated_BackupDR_RemoveDataSource_async + */ + removeDataSource( + request?: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + removeDataSource( + request: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + removeDataSource( + request: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + removeDataSource( + request?: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, + 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.removeDataSource(request, options, callback); + } +/** + * Check the status of the long running operation returned by `removeDataSource()`. + * @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/backup_d_r.remove_data_source.js + * region_tag:backupdr_v1_generated_BackupDR_RemoveDataSource_async + */ + async checkRemoveDataSourceProgress(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.removeDataSource, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Sets the internal status of a DataSource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.dataSource + * Required. The resource name of the instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/'. + * @param {Buffer} request.value + * Required. The value required for this method to work. This field must be + * the 32-byte SHA256 hash of the DataSourceID. The DataSourceID used here is + * only the final piece of the fully qualified resource path for this + * DataSource (i.e. the part after '.../dataSources/'). This field exists to + * make this method difficult to call since it is intended for use only by + * Backup Appliances. + * @param {google.cloud.backupdr.v1.BackupConfigState} request.backupConfigState + * Required. Output only. The new BackupConfigState to set for the DataSource. + * @param {string} [request.requestId] + * Optional. An optional 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. 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/backup_d_r.set_internal_status.js + * region_tag:backupdr_v1_generated_BackupDR_SetInternalStatus_async + */ + setInternalStatus( + request?: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + setInternalStatus( + request: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + setInternalStatus( + request: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + setInternalStatus( + request?: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, + 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({ + 'data_source': request.dataSource ?? '', + }); + this.initialize(); + return this.innerApiCalls.setInternalStatus(request, options, callback); + } +/** + * Check the status of the long running operation returned by `setInternalStatus()`. + * @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/backup_d_r.set_internal_status.js + * region_tag:backupdr_v1_generated_BackupDR_SetInternalStatus_async + */ + async checkSetInternalStatusProgress(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.setInternalStatus, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Internal only. + * Abandons a backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.dataSource + * Required. The resource name of the instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/'. + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.abandon_backup.js + * region_tag:backupdr_v1_generated_BackupDR_AbandonBackup_async + */ + abandonBackup( + request?: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + abandonBackup( + request: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + abandonBackup( + request: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + abandonBackup( + request?: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, + 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({ + 'data_source': request.dataSource ?? '', + }); + this.initialize(); + return this.innerApiCalls.abandonBackup(request, options, callback); + } +/** + * Check the status of the long running operation returned by `abandonBackup()`. + * @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/backup_d_r.abandon_backup.js + * region_tag:backupdr_v1_generated_BackupDR_AbandonBackup_async + */ + async checkAbandonBackupProgress(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.abandonBackup, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Internal only. + * Finalize a backup that was started by a call to InitiateBackup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.dataSource + * Required. The resource name of the instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/'. + * @param {string} request.description + * This will be assigned to the description field of the newly created Backup. + * @param {google.protobuf.Timestamp} request.consistencyTime + * The point in time when this backup was captured from the source. This will + * be assigned to the consistency_time field of the newly created Backup. + * @param {string} [request.requestId] + * Optional. An optional 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 {string} request.backupId + * Required. Resource ID of the Backup resource to be finalized. This must be + * the same backup_id that was used in the InitiateBackupRequest. + * @param {google.protobuf.Timestamp} request.recoveryRangeStartTime + * The earliest timestamp of data available in this Backup. This will set on + * the newly created Backup. + * @param {google.protobuf.Timestamp} request.recoveryRangeEndTime + * The latest timestamp of data available in this Backup. This will be set on + * the newly created Backup. + * @param {google.protobuf.Duration} request.retentionDuration + * The ExpireTime on the backup will be set to FinalizeTime plus this + * duration. If the resulting ExpireTime is less than + * EnforcedRetentionEndTime, then ExpireTime is set to + * EnforcedRetentionEndTime. + * @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/backup_d_r.finalize_backup.js + * region_tag:backupdr_v1_generated_BackupDR_FinalizeBackup_async + */ + finalizeBackup( + request?: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + finalizeBackup( + request: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + finalizeBackup( + request: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + finalizeBackup( + request?: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, + 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({ + 'data_source': request.dataSource ?? '', + }); + this.initialize(); + return this.innerApiCalls.finalizeBackup(request, options, callback); + } +/** + * Check the status of the long running operation returned by `finalizeBackup()`. + * @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/backup_d_r.finalize_backup.js + * region_tag:backupdr_v1_generated_BackupDR_FinalizeBackup_async + */ + async checkFinalizeBackupProgress(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.finalizeBackup, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the settings of a Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup 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 the request will fail. + * @param {google.cloud.backupdr.v1.Backup} request.backup + * Required. The resource being updated + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.update_backup.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateBackup_async + */ + updateBackup( + request?: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateBackup( + request: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateBackup( + request: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateBackup( + request?: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, + 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({ + 'backup.name': request.backup!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateBackup(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateBackup()`. + * @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/backup_d_r.update_backup.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateBackup_async + */ + async checkUpdateBackupProgress(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.updateBackup, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.delete_backup.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackup_async + */ + deleteBackup( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteBackup( + request: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackup( + request: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackup( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, + 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.deleteBackup(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteBackup()`. + * @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/backup_d_r.delete_backup.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackup_async + */ + async checkDeleteBackupProgress(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.deleteBackup, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Restore from a Backup + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Backup instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/* /backups/'. + * @param {string} [request.requestId] + * Optional. An optional 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 {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} request.computeInstanceTargetEnvironment + * Compute Engine target environment to be used during restore. + * @param {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} request.computeInstanceRestoreProperties + * Compute Engine instance properties to be overridden during restore. + * @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/backup_d_r.restore_backup.js + * region_tag:backupdr_v1_generated_BackupDR_RestoreBackup_async + */ + restoreBackup( + request?: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + restoreBackup( + request: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + restoreBackup( + request: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + restoreBackup( + request?: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, + 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.restoreBackup(request, options, callback); + } +/** + * Check the status of the long running operation returned by `restoreBackup()`. + * @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/backup_d_r.restore_backup.js + * region_tag:backupdr_v1_generated_BackupDR_RestoreBackup_async + */ + async checkRestoreBackupProgress(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.restoreBackup, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Create a BackupPlan + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The `BackupPlan` project and location in the format + * `projects/{project}/locations/{location}`. In Cloud BackupDR locations + * map to GCP regions, for example **us-central1**. + * @param {string} request.backupPlanId + * Required. The name of the `BackupPlan` to create. The name must be unique + * for the specified project and location.The name must start with a lowercase + * letter followed by up to 62 lowercase letters, numbers, or hyphens. + * Pattern, /{@link protos.a-z0-9-|a-z}{,62}/. + * @param {google.cloud.backupdr.v1.BackupPlan} request.backupPlan + * Required. The `BackupPlan` resource object to create. + * @param {string} [request.requestId] + * Optional. An optional 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 t + * he 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/backup_d_r.create_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlan_async + */ + createBackupPlan( + request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createBackupPlan( + request: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackupPlan( + request: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackupPlan( + request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, + 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.createBackupPlan(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createBackupPlan()`. + * @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/backup_d_r.create_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlan_async + */ + async checkCreateBackupPlanProgress(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.createBackupPlan, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a single BackupPlan. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the `BackupPlan` to delete. + * + * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.delete_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlan_async + */ + deleteBackupPlan( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteBackupPlan( + request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackupPlan( + request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackupPlan( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, + 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.deleteBackupPlan(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteBackupPlan()`. + * @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/backup_d_r.delete_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlan_async + */ + async checkDeleteBackupPlanProgress(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.deleteBackupPlan, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Create a BackupPlanAssociation + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The backup plan association project and location in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations + * map to GCP regions, for example **us-central1**. + * @param {string} request.backupPlanAssociationId + * Required. The name of the backup plan association to create. The name must + * be unique for the specified project and location. + * @param {google.cloud.backupdr.v1.BackupPlanAssociation} request.backupPlanAssociation + * Required. The resource being created + * @param {string} [request.requestId] + * Optional. An optional 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 t + * he 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/backup_d_r.create_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async + */ + createBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, + 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.createBackupPlanAssociation(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createBackupPlanAssociation()`. + * @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/backup_d_r.create_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async + */ + async checkCreateBackupPlanAssociationProgress(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.createBackupPlanAssociation, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a single BackupPlanAssociation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.delete_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async + */ + deleteBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, + 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.deleteBackupPlanAssociation(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteBackupPlanAssociation()`. + * @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/backup_d_r.delete_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async + */ + async checkDeleteBackupPlanAssociationProgress(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.deleteBackupPlanAssociation, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Triggers a new Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @param {string} request.ruleId + * Required. backup rule_id for which a backup needs to be triggered. + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.trigger_backup.js + * region_tag:backupdr_v1_generated_BackupDR_TriggerBackup_async + */ + triggerBackup( + request?: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + triggerBackup( + request: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + triggerBackup( + request: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + triggerBackup( + request?: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, + 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.triggerBackup(request, options, callback); + } +/** + * Check the status of the long running operation returned by `triggerBackup()`. + * @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/backup_d_r.trigger_backup.js + * region_tag:backupdr_v1_generated_BackupDR_TriggerBackup_async + */ + async checkTriggerBackupProgress(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.triggerBackup, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists ManagementServers in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud BackupDR, locations map to Google Cloud regions, for example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.ManagementServer|ManagementServer}. + * 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 `listManagementServersAsync()` + * 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. + */ + listManagementServers( + request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IManagementServer[], + protos.google.cloud.backupdr.v1.IListManagementServersRequest|null, + protos.google.cloud.backupdr.v1.IListManagementServersResponse + ]>; + listManagementServers( + request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListManagementServersRequest, + protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, + protos.google.cloud.backupdr.v1.IManagementServer>): void; + listManagementServers( + request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListManagementServersRequest, + protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, + protos.google.cloud.backupdr.v1.IManagementServer>): void; + listManagementServers( + request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.backupdr.v1.IListManagementServersRequest, + protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, + protos.google.cloud.backupdr.v1.IManagementServer>, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListManagementServersRequest, + protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, + protos.google.cloud.backupdr.v1.IManagementServer>): + Promise<[ + protos.google.cloud.backupdr.v1.IManagementServer[], + protos.google.cloud.backupdr.v1.IListManagementServersRequest|null, + protos.google.cloud.backupdr.v1.IListManagementServersResponse + ]>|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.listManagementServers(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 project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud BackupDR, locations map to Google Cloud regions, for example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.ManagementServer|ManagementServer} 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 `listManagementServersAsync()` + * 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. + */ + listManagementServersStream( + request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + 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['listManagementServers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listManagementServers.createStream( + this.innerApiCalls.listManagementServers as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listManagementServers`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud BackupDR, locations map to Google Cloud regions, for example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.ManagementServer|ManagementServer}. 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/backup_d_r.list_management_servers.js + * region_tag:backupdr_v1_generated_BackupDR_ListManagementServers_async + */ + listManagementServersAsync( + request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + 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['listManagementServers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listManagementServers.asyncIterate( + this.innerApiCalls['listManagementServers'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists BackupVaults in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault. + * @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.backupdr.v1.BackupVault|BackupVault}. + * 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 `listBackupVaultsAsync()` + * 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. + */ + listBackupVaults( + request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupVault[], + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest|null, + protos.google.cloud.backupdr.v1.IListBackupVaultsResponse + ]>; + listBackupVaults( + request: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupVault>): void; + listBackupVaults( + request: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupVault>): void; + listBackupVaults( + request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupVault>, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupVault>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupVault[], + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest|null, + protos.google.cloud.backupdr.v1.IListBackupVaultsResponse + ]>|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.listBackupVaults(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 project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault. + * @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.backupdr.v1.BackupVault|BackupVault} 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 `listBackupVaultsAsync()` + * 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. + */ + listBackupVaultsStream( + request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + 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['listBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupVaults.createStream( + this.innerApiCalls.listBackupVaults as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listBackupVaults`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault. + * @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.backupdr.v1.BackupVault|BackupVault}. 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/backup_d_r.list_backup_vaults.js + * region_tag:backupdr_v1_generated_BackupDR_ListBackupVaults_async + */ + listBackupVaultsAsync( + request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + 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['listBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupVaults.asyncIterate( + this.innerApiCalls['listBackupVaults'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * FetchUsableBackupVaults lists usable BackupVaults in a given project and + * location. Usable BackupVault are the ones that user has + * backupdr.backupVaults.get permission. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.BackupVault|BackupVault}. + * 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 `fetchUsableBackupVaultsAsync()` + * 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. + */ + fetchUsableBackupVaults( + request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupVault[], + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest|null, + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse + ]>; + fetchUsableBackupVaults( + request: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupVault>): void; + fetchUsableBackupVaults( + request: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupVault>): void; + fetchUsableBackupVaults( + request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupVault>, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupVault>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupVault[], + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest|null, + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse + ]>|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.fetchUsableBackupVaults(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 project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.BackupVault|BackupVault} 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 `fetchUsableBackupVaultsAsync()` + * 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. + */ + fetchUsableBackupVaultsStream( + request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + 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['fetchUsableBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.fetchUsableBackupVaults.createStream( + this.innerApiCalls.fetchUsableBackupVaults as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `fetchUsableBackupVaults`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.BackupVault|BackupVault}. 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/backup_d_r.fetch_usable_backup_vaults.js + * region_tag:backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_async + */ + fetchUsableBackupVaultsAsync( + request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + 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['fetchUsableBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.fetchUsableBackupVaults.asyncIterate( + this.innerApiCalls['fetchUsableBackupVaults'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists DataSources in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve data + * sources information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.DataSource|DataSource}. + * 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 `listDataSourcesAsync()` + * 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. + */ + listDataSources( + request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IDataSource[], + protos.google.cloud.backupdr.v1.IListDataSourcesRequest|null, + protos.google.cloud.backupdr.v1.IListDataSourcesResponse + ]>; + listDataSources( + request: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, + protos.google.cloud.backupdr.v1.IDataSource>): void; + listDataSources( + request: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, + protos.google.cloud.backupdr.v1.IDataSource>): void; + listDataSources( + request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, + protos.google.cloud.backupdr.v1.IDataSource>, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, + protos.google.cloud.backupdr.v1.IDataSource>): + Promise<[ + protos.google.cloud.backupdr.v1.IDataSource[], + protos.google.cloud.backupdr.v1.IListDataSourcesRequest|null, + protos.google.cloud.backupdr.v1.IListDataSourcesResponse + ]>|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.listDataSources(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 project and location for which to retrieve data + * sources information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.DataSource|DataSource} 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 `listDataSourcesAsync()` + * 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. + */ + listDataSourcesStream( + request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + 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['listDataSources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataSources.createStream( + this.innerApiCalls.listDataSources as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDataSources`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve data + * sources information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.DataSource|DataSource}. 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/backup_d_r.list_data_sources.js + * region_tag:backupdr_v1_generated_BackupDR_ListDataSources_async + */ + listDataSourcesAsync( + request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + 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['listDataSources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataSources.asyncIterate( + this.innerApiCalls['listDataSources'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Backups in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backup + * information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @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.backupdr.v1.Backup|Backup}. + * 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 `listBackupsAsync()` + * 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. + */ + listBackups( + request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackup[], + protos.google.cloud.backupdr.v1.IListBackupsRequest|null, + protos.google.cloud.backupdr.v1.IListBackupsResponse + ]>; + listBackups( + request: protos.google.cloud.backupdr.v1.IListBackupsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupsRequest, + protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackup>): void; + listBackups( + request: protos.google.cloud.backupdr.v1.IListBackupsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupsRequest, + protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackup>): void; + listBackups( + request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupsRequest, + protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackup>, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupsRequest, + protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackup>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackup[], + protos.google.cloud.backupdr.v1.IListBackupsRequest|null, + protos.google.cloud.backupdr.v1.IListBackupsResponse + ]>|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.listBackups(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 project and location for which to retrieve backup + * information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @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.backupdr.v1.Backup|Backup} 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 `listBackupsAsync()` + * 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. + */ + listBackupsStream( + request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, + 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['listBackups']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackups.createStream( + this.innerApiCalls.listBackups as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listBackups`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backup + * information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @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.backupdr.v1.Backup|Backup}. 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/backup_d_r.list_backups.js + * region_tag:backupdr_v1_generated_BackupDR_ListBackups_async + */ + listBackupsAsync( + request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, + 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['listBackups']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackups.asyncIterate( + this.innerApiCalls['listBackups'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists BackupPlans in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Cloud + * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + * retrieve backup plans for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Field match expression used to filter the results. + * @param {string} [request.orderBy] + * Optional. Field by which to sort the results. + * @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.backupdr.v1.BackupPlan|BackupPlan}. + * 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 `listBackupPlansAsync()` + * 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. + */ + listBackupPlans( + request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupPlan[], + protos.google.cloud.backupdr.v1.IListBackupPlansRequest|null, + protos.google.cloud.backupdr.v1.IListBackupPlansResponse + ]>; + listBackupPlans( + request: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupPlan>): void; + listBackupPlans( + request: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupPlan>): void; + listBackupPlans( + request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupPlan>, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupPlan>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupPlan[], + protos.google.cloud.backupdr.v1.IListBackupPlansRequest|null, + protos.google.cloud.backupdr.v1.IListBackupPlansResponse + ]>|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.listBackupPlans(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 project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Cloud + * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + * retrieve backup plans for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Field match expression used to filter the results. + * @param {string} [request.orderBy] + * Optional. Field by which to sort the results. + * @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.backupdr.v1.BackupPlan|BackupPlan} 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 `listBackupPlansAsync()` + * 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. + */ + listBackupPlansStream( + request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + 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['listBackupPlans']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupPlans.createStream( + this.innerApiCalls.listBackupPlans as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listBackupPlans`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Cloud + * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + * retrieve backup plans for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Field match expression used to filter the results. + * @param {string} [request.orderBy] + * Optional. Field by which to sort the results. + * @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.backupdr.v1.BackupPlan|BackupPlan}. 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/backup_d_r.list_backup_plans.js + * region_tag:backupdr_v1_generated_BackupDR_ListBackupPlans_async + */ + listBackupPlansAsync( + request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + 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['listBackupPlans']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupPlans.asyncIterate( + this.innerApiCalls['listBackupPlans'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists BackupPlanAssociations in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backup Plan + * Associations information, in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + * map to GCP regions, for example **us-central1**. To retrieve backup plan + * associations for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. + * 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 `listBackupPlanAssociationsAsync()` + * 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. + */ + listBackupPlanAssociations( + request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupPlanAssociation[], + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest|null, + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse + ]>; + listBackupPlanAssociations( + request: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): void; + listBackupPlanAssociations( + request: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): void; + listBackupPlanAssociations( + request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupPlanAssociation>, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupPlanAssociation[], + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest|null, + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse + ]>|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.listBackupPlanAssociations(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 project and location for which to retrieve backup Plan + * Associations information, in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + * map to GCP regions, for example **us-central1**. To retrieve backup plan + * associations for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation} 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 `listBackupPlanAssociationsAsync()` + * 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. + */ + listBackupPlanAssociationsStream( + request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + 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['listBackupPlanAssociations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupPlanAssociations.createStream( + this.innerApiCalls.listBackupPlanAssociations as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listBackupPlanAssociations`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backup Plan + * Associations information, in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + * map to GCP regions, for example **us-central1**. To retrieve backup plan + * associations for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. 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/backup_d_r.list_backup_plan_associations.js + * region_tag:backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_async + */ + listBackupPlanAssociationsAsync( + request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + 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['listBackupPlanAssociations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupPlanAssociations.asyncIterate( + this.innerApiCalls['listBackupPlanAssociations'] 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 backup resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backupvault + * @param {string} datasource + * @param {string} backup + * @returns {string} Resource name string. + */ + backupPath(project:string,location:string,backupvault:string,datasource:string,backup:string) { + return this.pathTemplates.backupPathTemplate.render({ + project: project, + location: location, + backupvault: backupvault, + datasource: datasource, + backup: backup, + }); + } + + /** + * Parse the project from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).project; + } + + /** + * Parse the location from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).location; + } + + /** + * Parse the backupvault from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the backupvault. + */ + matchBackupvaultFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).backupvault; + } + + /** + * Parse the datasource from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the datasource. + */ + matchDatasourceFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).datasource; + } + + /** + * Parse the backup from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the backup. + */ + matchBackupFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).backup; + } + + /** + * Return a fully-qualified backupPlan resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backup_plan + * @returns {string} Resource name string. + */ + backupPlanPath(project:string,location:string,backupPlan:string) { + return this.pathTemplates.backupPlanPathTemplate.render({ + project: project, + location: location, + backup_plan: backupPlan, + }); + } + + /** + * Parse the project from BackupPlan resource. + * + * @param {string} backupPlanName + * A fully-qualified path representing BackupPlan resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupPlanName(backupPlanName: string) { + return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName).project; + } + + /** + * Parse the location from BackupPlan resource. + * + * @param {string} backupPlanName + * A fully-qualified path representing BackupPlan resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupPlanName(backupPlanName: string) { + return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName).location; + } + + /** + * Parse the backup_plan from BackupPlan resource. + * + * @param {string} backupPlanName + * A fully-qualified path representing BackupPlan resource. + * @returns {string} A string representing the backup_plan. + */ + matchBackupPlanFromBackupPlanName(backupPlanName: string) { + return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName).backup_plan; + } + + /** + * Return a fully-qualified backupPlanAssociation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backup_plan_association + * @returns {string} Resource name string. + */ + backupPlanAssociationPath(project:string,location:string,backupPlanAssociation:string) { + return this.pathTemplates.backupPlanAssociationPathTemplate.render({ + project: project, + location: location, + backup_plan_association: backupPlanAssociation, + }); + } + + /** + * Parse the project from BackupPlanAssociation resource. + * + * @param {string} backupPlanAssociationName + * A fully-qualified path representing BackupPlanAssociation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupPlanAssociationName(backupPlanAssociationName: string) { + return this.pathTemplates.backupPlanAssociationPathTemplate.match(backupPlanAssociationName).project; + } + + /** + * Parse the location from BackupPlanAssociation resource. + * + * @param {string} backupPlanAssociationName + * A fully-qualified path representing BackupPlanAssociation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupPlanAssociationName(backupPlanAssociationName: string) { + return this.pathTemplates.backupPlanAssociationPathTemplate.match(backupPlanAssociationName).location; + } + + /** + * Parse the backup_plan_association from BackupPlanAssociation resource. + * + * @param {string} backupPlanAssociationName + * A fully-qualified path representing BackupPlanAssociation resource. + * @returns {string} A string representing the backup_plan_association. + */ + matchBackupPlanAssociationFromBackupPlanAssociationName(backupPlanAssociationName: string) { + return this.pathTemplates.backupPlanAssociationPathTemplate.match(backupPlanAssociationName).backup_plan_association; + } + + /** + * Return a fully-qualified backupVault resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backupvault + * @returns {string} Resource name string. + */ + backupVaultPath(project:string,location:string,backupvault:string) { + return this.pathTemplates.backupVaultPathTemplate.render({ + project: project, + location: location, + backupvault: backupvault, + }); + } + + /** + * Parse the project from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName).project; + } + + /** + * Parse the location from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName).location; + } + + /** + * Parse the backupvault from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the backupvault. + */ + matchBackupvaultFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName).backupvault; + } + + /** + * Return a fully-qualified dataSource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backupvault + * @param {string} datasource + * @returns {string} Resource name string. + */ + dataSourcePath(project:string,location:string,backupvault:string,datasource:string) { + return this.pathTemplates.dataSourcePathTemplate.render({ + project: project, + location: location, + backupvault: backupvault, + datasource: datasource, + }); + } + + /** + * Parse the project from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).project; + } + + /** + * Parse the location from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).location; + } + + /** + * Parse the backupvault from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the backupvault. + */ + matchBackupvaultFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).backupvault; + } + + /** + * Parse the datasource from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the datasource. + */ + matchDatasourceFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).datasource; + } + + /** + * 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 managementServer resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} managementserver + * @returns {string} Resource name string. + */ + managementServerPath(project:string,location:string,managementserver:string) { + return this.pathTemplates.managementServerPathTemplate.render({ + project: project, + location: location, + managementserver: managementserver, + }); + } + + /** + * Parse the project from ManagementServer resource. + * + * @param {string} managementServerName + * A fully-qualified path representing ManagementServer resource. + * @returns {string} A string representing the project. + */ + matchProjectFromManagementServerName(managementServerName: string) { + return this.pathTemplates.managementServerPathTemplate.match(managementServerName).project; + } + + /** + * Parse the location from ManagementServer resource. + * + * @param {string} managementServerName + * A fully-qualified path representing ManagementServer resource. + * @returns {string} A string representing the location. + */ + matchLocationFromManagementServerName(managementServerName: string) { + return this.pathTemplates.managementServerPathTemplate.match(managementServerName).location; + } + + /** + * Parse the managementserver from ManagementServer resource. + * + * @param {string} managementServerName + * A fully-qualified path representing ManagementServer resource. + * @returns {string} A string representing the managementserver. + */ + matchManagementserverFromManagementServerName(managementServerName: string) { + return this.pathTemplates.managementServerPathTemplate.match(managementServerName).managementserver; + } + + /** + * 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; + } + + /** + * 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.backupDRStub && !this._terminated) { + return this.backupDRStub.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-backupdr/v1/src/v1/backup_d_r_client_config.json b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client_config.json new file mode 100644 index 00000000000..8b29881f031 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client_config.json @@ -0,0 +1,191 @@ +{ + "interfaces": { + "google.cloud.backupdr.v1.BackupDR": { + "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": { + "ListManagementServers": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetManagementServer": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateManagementServer": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteManagementServer": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListBackupVaults": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "FetchUsableBackupVaults": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "TestIamPermissions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListDataSources": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetDataSource": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateDataSource": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RemoveDataSource": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetInternalStatus": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "InitiateBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "AbandonBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FinalizeBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchAccessToken": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBackups": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetBackup": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RestoreBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBackupPlan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBackupPlan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBackupPlans": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackupPlan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBackupPlanAssociation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBackupPlanAssociation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBackupPlanAssociations": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackupPlanAssociation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "TriggerBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json new file mode 100644 index 00000000000..79496ec85e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json @@ -0,0 +1,8 @@ +[ + "../../protos/google/cloud/backupdr/v1/backupdr.proto", + "../../protos/google/cloud/backupdr/v1/backupplan.proto", + "../../protos/google/cloud/backupdr/v1/backupplanassociation.proto", + "../../protos/google/cloud/backupdr/v1/backupvault.proto", + "../../protos/google/cloud/backupdr/v1/backupvault_ba.proto", + "../../protos/google/cloud/backupdr/v1/backupvault_gce.proto" +] diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..0407284a357 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json @@ -0,0 +1,391 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.backupdr.v1", + "libraryPackage": "@google-cloud/backupdr", + "services": { + "BackupDR": { + "clients": { + "grpc": { + "libraryClient": "BackupDRClient", + "rpcs": { + "GetManagementServer": { + "methods": [ + "getManagementServer" + ] + }, + "GetBackupVault": { + "methods": [ + "getBackupVault" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "GetDataSource": { + "methods": [ + "getDataSource" + ] + }, + "InitiateBackup": { + "methods": [ + "initiateBackup" + ] + }, + "FetchAccessToken": { + "methods": [ + "fetchAccessToken" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupPlan": { + "methods": [ + "getBackupPlan" + ] + }, + "GetBackupPlanAssociation": { + "methods": [ + "getBackupPlanAssociation" + ] + }, + "CreateManagementServer": { + "methods": [ + "createManagementServer" + ] + }, + "DeleteManagementServer": { + "methods": [ + "deleteManagementServer" + ] + }, + "CreateBackupVault": { + "methods": [ + "createBackupVault" + ] + }, + "UpdateBackupVault": { + "methods": [ + "updateBackupVault" + ] + }, + "DeleteBackupVault": { + "methods": [ + "deleteBackupVault" + ] + }, + "UpdateDataSource": { + "methods": [ + "updateDataSource" + ] + }, + "RemoveDataSource": { + "methods": [ + "removeDataSource" + ] + }, + "SetInternalStatus": { + "methods": [ + "setInternalStatus" + ] + }, + "AbandonBackup": { + "methods": [ + "abandonBackup" + ] + }, + "FinalizeBackup": { + "methods": [ + "finalizeBackup" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "RestoreBackup": { + "methods": [ + "restoreBackup" + ] + }, + "CreateBackupPlan": { + "methods": [ + "createBackupPlan" + ] + }, + "DeleteBackupPlan": { + "methods": [ + "deleteBackupPlan" + ] + }, + "CreateBackupPlanAssociation": { + "methods": [ + "createBackupPlanAssociation" + ] + }, + "DeleteBackupPlanAssociation": { + "methods": [ + "deleteBackupPlanAssociation" + ] + }, + "TriggerBackup": { + "methods": [ + "triggerBackup" + ] + }, + "ListManagementServers": { + "methods": [ + "listManagementServers", + "listManagementServersStream", + "listManagementServersAsync" + ] + }, + "ListBackupVaults": { + "methods": [ + "listBackupVaults", + "listBackupVaultsStream", + "listBackupVaultsAsync" + ] + }, + "FetchUsableBackupVaults": { + "methods": [ + "fetchUsableBackupVaults", + "fetchUsableBackupVaultsStream", + "fetchUsableBackupVaultsAsync" + ] + }, + "ListDataSources": { + "methods": [ + "listDataSources", + "listDataSourcesStream", + "listDataSourcesAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + }, + "ListBackupPlans": { + "methods": [ + "listBackupPlans", + "listBackupPlansStream", + "listBackupPlansAsync" + ] + }, + "ListBackupPlanAssociations": { + "methods": [ + "listBackupPlanAssociations", + "listBackupPlanAssociationsStream", + "listBackupPlanAssociationsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "BackupDRClient", + "rpcs": { + "GetManagementServer": { + "methods": [ + "getManagementServer" + ] + }, + "GetBackupVault": { + "methods": [ + "getBackupVault" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "GetDataSource": { + "methods": [ + "getDataSource" + ] + }, + "InitiateBackup": { + "methods": [ + "initiateBackup" + ] + }, + "FetchAccessToken": { + "methods": [ + "fetchAccessToken" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupPlan": { + "methods": [ + "getBackupPlan" + ] + }, + "GetBackupPlanAssociation": { + "methods": [ + "getBackupPlanAssociation" + ] + }, + "CreateManagementServer": { + "methods": [ + "createManagementServer" + ] + }, + "DeleteManagementServer": { + "methods": [ + "deleteManagementServer" + ] + }, + "CreateBackupVault": { + "methods": [ + "createBackupVault" + ] + }, + "UpdateBackupVault": { + "methods": [ + "updateBackupVault" + ] + }, + "DeleteBackupVault": { + "methods": [ + "deleteBackupVault" + ] + }, + "UpdateDataSource": { + "methods": [ + "updateDataSource" + ] + }, + "RemoveDataSource": { + "methods": [ + "removeDataSource" + ] + }, + "SetInternalStatus": { + "methods": [ + "setInternalStatus" + ] + }, + "AbandonBackup": { + "methods": [ + "abandonBackup" + ] + }, + "FinalizeBackup": { + "methods": [ + "finalizeBackup" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "RestoreBackup": { + "methods": [ + "restoreBackup" + ] + }, + "CreateBackupPlan": { + "methods": [ + "createBackupPlan" + ] + }, + "DeleteBackupPlan": { + "methods": [ + "deleteBackupPlan" + ] + }, + "CreateBackupPlanAssociation": { + "methods": [ + "createBackupPlanAssociation" + ] + }, + "DeleteBackupPlanAssociation": { + "methods": [ + "deleteBackupPlanAssociation" + ] + }, + "TriggerBackup": { + "methods": [ + "triggerBackup" + ] + }, + "ListManagementServers": { + "methods": [ + "listManagementServers", + "listManagementServersStream", + "listManagementServersAsync" + ] + }, + "ListBackupVaults": { + "methods": [ + "listBackupVaults", + "listBackupVaultsStream", + "listBackupVaultsAsync" + ] + }, + "FetchUsableBackupVaults": { + "methods": [ + "fetchUsableBackupVaults", + "fetchUsableBackupVaultsStream", + "fetchUsableBackupVaultsAsync" + ] + }, + "ListDataSources": { + "methods": [ + "listDataSources", + "listDataSourcesStream", + "listDataSourcesAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + }, + "ListBackupPlans": { + "methods": [ + "listBackupPlans", + "listBackupPlansStream", + "listBackupPlansAsync" + ] + }, + "ListBackupPlanAssociations": { + "methods": [ + "listBackupPlanAssociations", + "listBackupPlanAssociationsStream", + "listBackupPlanAssociationsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts new file mode 100644 index 00000000000..ba4dc25d2f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts @@ -0,0 +1,19 @@ +// 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 +// +// 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 {BackupDRClient} from './backup_d_r_client'; diff --git a/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..5c5ec9c7cf0 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// 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 +// +// 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 backupdr = require('@google-cloud/backupdr'); + +function main() { + const backupDRClient = new backupdr.BackupDRClient(); +} + +main(); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..229588cfd57 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// 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 +// +// 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 {BackupDRClient} from '@google-cloud/backupdr'; + +// check that the client class type name can be used +function doStuffWithBackupDRClient(client: BackupDRClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const backupDRClient = new BackupDRClient(); + doStuffWithBackupDRClient(backupDRClient); +} + +main(); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts b/owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts new file mode 100644 index 00000000000..fd5bfdc71d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts @@ -0,0 +1,49 @@ +// 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 +// +// 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-backupdr/v1/test/gapic_backup_d_r_v1.ts b/owl-bot-staging/google-cloud-backupdr/v1/test/gapic_backup_d_r_v1.ts new file mode 100644 index 00000000000..451d7bee0fe --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/test/gapic_backup_d_r_v1.ts @@ -0,0 +1,6816 @@ +// 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 +// +// 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 backupdrModule 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.BackupDRClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new backupdrModule.v1.BackupDRClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'backupdr.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new backupdrModule.v1.BackupDRClient(); + 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 = backupdrModule.v1.BackupDRClient.servicePath; + assert.strictEqual(servicePath, 'backupdr.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = backupdrModule.v1.BackupDRClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'backupdr.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new backupdrModule.v1.BackupDRClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'backupdr.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new backupdrModule.v1.BackupDRClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'backupdr.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 backupdrModule.v1.BackupDRClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'backupdr.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 backupdrModule.v1.BackupDRClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'backupdr.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 backupdrModule.v1.BackupDRClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = backupdrModule.v1.BackupDRClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new backupdrModule.v1.BackupDRClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new backupdrModule.v1.BackupDRClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.backupDRStub, undefined); + await client.initialize(); + assert(client.backupDRStub); + }); + + it('has close method for the initialized client', done => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.backupDRStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.backupDRStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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('getManagementServer', () => { + it('invokes getManagementServer without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ); + client.innerApiCalls.getManagementServer = stubSimpleCall(expectedResponse); + const [response] = await client.getManagementServer(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getManagementServer without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ); + client.innerApiCalls.getManagementServer = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getManagementServer( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IManagementServer|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getManagementServer with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getManagementServer = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getManagementServer(request), expectedError); + const actualRequest = (client.innerApiCalls.getManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getManagementServer with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getManagementServer(request), expectedError); + }); + }); + + describe('getBackupVault', () => { + it('invokes getBackupVault without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ); + client.innerApiCalls.getBackupVault = stubSimpleCall(expectedResponse); + const [response] = await client.getBackupVault(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupVault without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ); + client.innerApiCalls.getBackupVault = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackupVault( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupVault|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupVault with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackupVault = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getBackupVault(request), expectedError); + const actualRequest = (client.innerApiCalls.getBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupVault with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBackupVault(request), expectedError); + }); + }); + + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = stubSimpleCall(expectedResponse); + const [response] = await client.testIamPermissions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + (err?: Error|null, result?: protos.google.iam.v1.ITestIamPermissionsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.testIamPermissions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.testIamPermissions(request), expectedError); + const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.testIamPermissions(request), expectedError); + }); + }); + + describe('getDataSource', () => { + it('invokes getDataSource without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DataSource() + ); + client.innerApiCalls.getDataSource = stubSimpleCall(expectedResponse); + const [response] = await client.getDataSource(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataSource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataSource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSource without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DataSource() + ); + client.innerApiCalls.getDataSource = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataSource( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IDataSource|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataSource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataSource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSource with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataSource = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDataSource(request), expectedError); + const actualRequest = (client.innerApiCalls.getDataSource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataSource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSource with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDataSource(request), expectedError); + }); + }); + + describe('initiateBackup', () => { + it('invokes initiateBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.InitiateBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.InitiateBackupRequest', ['dataSource']); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.InitiateBackupResponse() + ); + client.innerApiCalls.initiateBackup = stubSimpleCall(expectedResponse); + const [response] = await client.initiateBackup(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.initiateBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.initiateBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initiateBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.InitiateBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.InitiateBackupRequest', ['dataSource']); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.InitiateBackupResponse() + ); + client.innerApiCalls.initiateBackup = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.initiateBackup( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IInitiateBackupResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.initiateBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.initiateBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initiateBackup with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.InitiateBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.InitiateBackupRequest', ['dataSource']); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.initiateBackup = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.initiateBackup(request), expectedError); + const actualRequest = (client.innerApiCalls.initiateBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.initiateBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initiateBackup with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.InitiateBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.InitiateBackupRequest', ['dataSource']); + request.dataSource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.initiateBackup(request), expectedError); + }); + }); + + describe('fetchAccessToken', () => { + it('invokes fetchAccessToken without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchAccessTokenRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchAccessTokenResponse() + ); + client.innerApiCalls.fetchAccessToken = stubSimpleCall(expectedResponse); + const [response] = await client.fetchAccessToken(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.fetchAccessToken as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchAccessToken as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchAccessToken without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchAccessTokenRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchAccessTokenResponse() + ); + client.innerApiCalls.fetchAccessToken = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchAccessToken( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.fetchAccessToken as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchAccessToken as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchAccessToken with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchAccessTokenRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchAccessToken = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.fetchAccessToken(request), expectedError); + const actualRequest = (client.innerApiCalls.fetchAccessToken as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchAccessToken as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchAccessToken with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchAccessTokenRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchAccessToken(request), expectedError); + }); + }); + + describe('getBackup', () => { + it('invokes getBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.Backup() + ); + client.innerApiCalls.getBackup = stubSimpleCall(expectedResponse); + const [response] = await client.getBackup(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.Backup() + ); + client.innerApiCalls.getBackup = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackup( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackup|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackup with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackup = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getBackup(request), expectedError); + const actualRequest = (client.innerApiCalls.getBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackup with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBackup(request), expectedError); + }); + }); + + describe('getBackupPlan', () => { + it('invokes getBackupPlan without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupPlan() + ); + client.innerApiCalls.getBackupPlan = stubSimpleCall(expectedResponse); + const [response] = await client.getBackupPlan(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlan without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupPlan() + ); + client.innerApiCalls.getBackupPlan = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackupPlan( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlan|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlan with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackupPlan = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getBackupPlan(request), expectedError); + const actualRequest = (client.innerApiCalls.getBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlan with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBackupPlan(request), expectedError); + }); + }); + + describe('getBackupPlanAssociation', () => { + it('invokes getBackupPlanAssociation without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() + ); + client.innerApiCalls.getBackupPlanAssociation = stubSimpleCall(expectedResponse); + const [response] = await client.getBackupPlanAssociation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlanAssociation without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() + ); + client.innerApiCalls.getBackupPlanAssociation = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackupPlanAssociation( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlanAssociation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlanAssociation with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackupPlanAssociation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getBackupPlanAssociation(request), expectedError); + const actualRequest = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlanAssociation with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBackupPlanAssociation(request), expectedError); + }); + }); + + describe('createManagementServer', () => { + it('invokes createManagementServer without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createManagementServer = stubLongRunningCall(expectedResponse); + const [operation] = await client.createManagementServer(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createManagementServer without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createManagementServer = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createManagementServer( + 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.createManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createManagementServer with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createManagementServer = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createManagementServer(request), expectedError); + const actualRequest = (client.innerApiCalls.createManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createManagementServer with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createManagementServer = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createManagementServer(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateManagementServerProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateManagementServerProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateManagementServerProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateManagementServerProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteManagementServer', () => { + it('invokes deleteManagementServer without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteManagementServer = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteManagementServer(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteManagementServer without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteManagementServer = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteManagementServer( + 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.deleteManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteManagementServer with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteManagementServer = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteManagementServer(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteManagementServer with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteManagementServer = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteManagementServer(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteManagementServerProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteManagementServerProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteManagementServerProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteManagementServerProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createBackupVault', () => { + it('invokes createBackupVault without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupVault = stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackupVault(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupVault without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupVault = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createBackupVault( + 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.createBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupVault with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupVault = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createBackupVault(request), expectedError); + const actualRequest = (client.innerApiCalls.createBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupVault with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupVault = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createBackupVault(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupVaultProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupVaultProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupVaultProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupVaultProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateBackupVault', () => { + it('invokes updateBackupVault without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBackupVault = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateBackupVault(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupVault without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBackupVault = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateBackupVault( + 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.updateBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupVault with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackupVault = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateBackupVault(request), expectedError); + const actualRequest = (client.innerApiCalls.updateBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupVault with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackupVault = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateBackupVault(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateBackupVaultProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateBackupVaultProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateBackupVaultProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateBackupVaultProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteBackupVault', () => { + it('invokes deleteBackupVault without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupVault = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackupVault(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupVault without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupVault = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackupVault( + 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.deleteBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupVault with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupVault = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteBackupVault(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupVault with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupVault = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteBackupVault(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupVaultProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupVaultProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupVaultProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupVaultProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateDataSource', () => { + it('invokes updateDataSource without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + ); + request.dataSource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataSource = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateDataSource(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDataSource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataSource without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + ); + request.dataSource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataSource = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataSource( + 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.updateDataSource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataSource with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + ); + request.dataSource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataSource = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateDataSource(request), expectedError); + const actualRequest = (client.innerApiCalls.updateDataSource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataSource with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + ); + request.dataSource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataSource = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateDataSource(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateDataSource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateDataSourceProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateDataSourceProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateDataSourceProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateDataSourceProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('removeDataSource', () => { + it('invokes removeDataSource without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.RemoveDataSourceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.removeDataSource = stubLongRunningCall(expectedResponse); + const [operation] = await client.removeDataSource(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.removeDataSource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.removeDataSource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeDataSource without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.RemoveDataSourceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.removeDataSource = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removeDataSource( + 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.removeDataSource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.removeDataSource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeDataSource with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.RemoveDataSourceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.removeDataSource = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.removeDataSource(request), expectedError); + const actualRequest = (client.innerApiCalls.removeDataSource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.removeDataSource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeDataSource with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.RemoveDataSourceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.removeDataSource = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.removeDataSource(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.removeDataSource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.removeDataSource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRemoveDataSourceProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkRemoveDataSourceProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRemoveDataSourceProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkRemoveDataSourceProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('setInternalStatus', () => { + it('invokes setInternalStatus without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.SetInternalStatusRequest', ['dataSource']); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.setInternalStatus = stubLongRunningCall(expectedResponse); + const [operation] = await client.setInternalStatus(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setInternalStatus as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setInternalStatus as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setInternalStatus without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.SetInternalStatusRequest', ['dataSource']); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.setInternalStatus = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setInternalStatus( + 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.setInternalStatus as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setInternalStatus as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setInternalStatus with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.SetInternalStatusRequest', ['dataSource']); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setInternalStatus = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.setInternalStatus(request), expectedError); + const actualRequest = (client.innerApiCalls.setInternalStatus as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setInternalStatus as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setInternalStatus with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.SetInternalStatusRequest', ['dataSource']); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setInternalStatus = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.setInternalStatus(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.setInternalStatus as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setInternalStatus as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkSetInternalStatusProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkSetInternalStatusProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkSetInternalStatusProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkSetInternalStatusProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('abandonBackup', () => { + it('invokes abandonBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.AbandonBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.AbandonBackupRequest', ['dataSource']); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.abandonBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.abandonBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.abandonBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.abandonBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes abandonBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.AbandonBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.AbandonBackupRequest', ['dataSource']); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.abandonBackup = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.abandonBackup( + 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.abandonBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.abandonBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes abandonBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.AbandonBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.AbandonBackupRequest', ['dataSource']); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.abandonBackup = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.abandonBackup(request), expectedError); + const actualRequest = (client.innerApiCalls.abandonBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.abandonBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes abandonBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.AbandonBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.AbandonBackupRequest', ['dataSource']); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.abandonBackup = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.abandonBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.abandonBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.abandonBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkAbandonBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkAbandonBackupProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkAbandonBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkAbandonBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('finalizeBackup', () => { + it('invokes finalizeBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FinalizeBackupRequest', ['dataSource']); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.finalizeBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.finalizeBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.finalizeBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.finalizeBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes finalizeBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FinalizeBackupRequest', ['dataSource']); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.finalizeBackup = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.finalizeBackup( + 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.finalizeBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.finalizeBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes finalizeBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FinalizeBackupRequest', ['dataSource']); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.finalizeBackup = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.finalizeBackup(request), expectedError); + const actualRequest = (client.innerApiCalls.finalizeBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.finalizeBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes finalizeBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FinalizeBackupRequest', ['dataSource']); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.finalizeBackup = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.finalizeBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.finalizeBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.finalizeBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkFinalizeBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkFinalizeBackupProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkFinalizeBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkFinalizeBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateBackup', () => { + it('invokes updateBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBackup = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateBackup( + 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.updateBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackup = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateBackup(request), expectedError); + const actualRequest = (client.innerApiCalls.updateBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackup = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateBackupProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteBackup', () => { + it('invokes deleteBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackup = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackup( + 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.deleteBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackup = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteBackup(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackup = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('restoreBackup', () => { + it('invokes restoreBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RestoreBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.restoreBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.restoreBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.restoreBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RestoreBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.restoreBackup = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.restoreBackup( + 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.restoreBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RestoreBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreBackup = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.restoreBackup(request), expectedError); + const actualRequest = (client.innerApiCalls.restoreBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RestoreBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreBackup = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.restoreBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.restoreBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRestoreBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkRestoreBackupProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRestoreBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkRestoreBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createBackupPlan', () => { + it('invokes createBackupPlan without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupPlan = stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackupPlan(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlan without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupPlan = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createBackupPlan( + 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.createBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlan with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlan = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createBackupPlan(request), expectedError); + const actualRequest = (client.innerApiCalls.createBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlan with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlan = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createBackupPlan(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupPlanProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupPlanProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupPlanProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupPlanProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteBackupPlan', () => { + it('invokes deleteBackupPlan without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupPlan = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackupPlan(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlan without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupPlan = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackupPlan( + 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.deleteBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlan with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlan = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteBackupPlan(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlan with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlan = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteBackupPlan(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupPlanProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupPlanProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupPlanProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupPlanProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createBackupPlanAssociation', () => { + it('invokes createBackupPlanAssociation without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackupPlanAssociation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlanAssociation without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createBackupPlanAssociation( + 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.createBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlanAssociation with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createBackupPlanAssociation(request), expectedError); + const actualRequest = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlanAssociation with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createBackupPlanAssociation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupPlanAssociationProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupPlanAssociationProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupPlanAssociationProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupPlanAssociationProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteBackupPlanAssociation', () => { + it('invokes deleteBackupPlanAssociation without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackupPlanAssociation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlanAssociation without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackupPlanAssociation( + 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.deleteBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlanAssociation with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteBackupPlanAssociation(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlanAssociation with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteBackupPlanAssociation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupPlanAssociationProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupPlanAssociationProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupPlanAssociationProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupPlanAssociationProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('triggerBackup', () => { + it('invokes triggerBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.TriggerBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.triggerBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.triggerBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.triggerBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes triggerBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.TriggerBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.triggerBackup = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.triggerBackup( + 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.triggerBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes triggerBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.TriggerBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.triggerBackup = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.triggerBackup(request), expectedError); + const actualRequest = (client.innerApiCalls.triggerBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes triggerBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.TriggerBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.triggerBackup = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.triggerBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.triggerBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkTriggerBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkTriggerBackupProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkTriggerBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkTriggerBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listManagementServers', () => { + it('invokes listManagementServers without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + ]; + client.innerApiCalls.listManagementServers = stubSimpleCall(expectedResponse); + const [response] = await client.listManagementServers(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listManagementServers as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listManagementServers as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listManagementServers without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + ]; + client.innerApiCalls.listManagementServers = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listManagementServers( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IManagementServer[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listManagementServers as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listManagementServers as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listManagementServers with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listManagementServers = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listManagementServers(request), expectedError); + const actualRequest = (client.innerApiCalls.listManagementServers as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listManagementServers as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listManagementServersStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + ]; + client.descriptors.page.listManagementServers.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listManagementServersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.ManagementServer[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.ManagementServer) => { + 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.listManagementServers.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listManagementServers, request)); + assert( + (client.descriptors.page.listManagementServers.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listManagementServersStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listManagementServers.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listManagementServersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.ManagementServer[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.ManagementServer) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listManagementServers.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listManagementServers, request)); + assert( + (client.descriptors.page.listManagementServers.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listManagementServers without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + ]; + client.descriptors.page.listManagementServers.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IManagementServer[] = []; + const iterable = client.listManagementServersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listManagementServers with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listManagementServers.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listManagementServersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IManagementServer[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listBackupVaults', () => { + it('invokes listBackupVaults without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + ]; + client.innerApiCalls.listBackupVaults = stubSimpleCall(expectedResponse); + const [response] = await client.listBackupVaults(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBackupVaults as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupVaults as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupVaults without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + ]; + client.innerApiCalls.listBackupVaults = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackupVaults( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupVault[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBackupVaults as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupVaults as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupVaults with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackupVaults = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listBackupVaults(request), expectedError); + const actualRequest = (client.innerApiCalls.listBackupVaults as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupVaults as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupVaultsStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + ]; + client.descriptors.page.listBackupVaults.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { + 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.listBackupVaults.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBackupVaults, request)); + assert( + (client.descriptors.page.listBackupVaults.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listBackupVaultsStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupVaults.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listBackupVaults.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBackupVaults, request)); + assert( + (client.descriptors.page.listBackupVaults.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBackupVaults without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + ]; + client.descriptors.page.listBackupVaults.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; + const iterable = client.listBackupVaultsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBackupVaults with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupVaults.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBackupVaultsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('fetchUsableBackupVaults', () => { + it('invokes fetchUsableBackupVaults without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + ]; + client.innerApiCalls.fetchUsableBackupVaults = stubSimpleCall(expectedResponse); + const [response] = await client.fetchUsableBackupVaults(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchUsableBackupVaults without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + ]; + client.innerApiCalls.fetchUsableBackupVaults = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchUsableBackupVaults( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupVault[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchUsableBackupVaults with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchUsableBackupVaults = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.fetchUsableBackupVaults(request), expectedError); + const actualRequest = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchUsableBackupVaultsStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + ]; + client.descriptors.page.fetchUsableBackupVaults.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.fetchUsableBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { + 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.fetchUsableBackupVaults.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.fetchUsableBackupVaults, request)); + assert( + (client.descriptors.page.fetchUsableBackupVaults.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes fetchUsableBackupVaultsStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchUsableBackupVaults.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.fetchUsableBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.fetchUsableBackupVaults.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.fetchUsableBackupVaults, request)); + assert( + (client.descriptors.page.fetchUsableBackupVaults.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with fetchUsableBackupVaults without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + ]; + client.descriptors.page.fetchUsableBackupVaults.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; + const iterable = client.fetchUsableBackupVaultsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with fetchUsableBackupVaults with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchUsableBackupVaults.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.fetchUsableBackupVaultsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listDataSources', () => { + it('invokes listDataSources without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + ]; + client.innerApiCalls.listDataSources = stubSimpleCall(expectedResponse); + const [response] = await client.listDataSources(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataSources as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataSources as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSources without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + ]; + client.innerApiCalls.listDataSources = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataSources( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IDataSource[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataSources as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataSources as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSources with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataSources = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDataSources(request), expectedError); + const actualRequest = (client.innerApiCalls.listDataSources as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataSources as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSourcesStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + ]; + client.descriptors.page.listDataSources.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDataSourcesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.DataSource[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.DataSource) => { + 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.listDataSources.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataSources, request)); + assert( + (client.descriptors.page.listDataSources.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDataSourcesStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataSources.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataSourcesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.DataSource[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.DataSource) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDataSources.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataSources, request)); + assert( + (client.descriptors.page.listDataSources.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataSources without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + ]; + client.descriptors.page.listDataSources.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IDataSource[] = []; + const iterable = client.listDataSourcesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDataSources.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataSources.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataSources with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataSources.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataSourcesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IDataSource[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDataSources.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataSources.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listBackups', () => { + it('invokes listBackups without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.innerApiCalls.listBackups = stubSimpleCall(expectedResponse); + const [response] = await client.listBackups(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBackups as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackups as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackups without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.innerApiCalls.listBackups = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackups( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackup[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBackups as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackups as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackups with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackups = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listBackups(request), expectedError); + const actualRequest = (client.innerApiCalls.listBackups as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackups as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupsStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.descriptors.page.listBackups.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listBackupsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.Backup[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.Backup) => { + 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.listBackups.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBackups, request)); + assert( + (client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listBackupsStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackups.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listBackupsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.Backup[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.Backup) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBackups, request)); + assert( + (client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBackups without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.descriptors.page.listBackups.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackup[] = []; + const iterable = client.listBackupsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBackups.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBackups.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBackups with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackups.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBackupsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackup[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBackups.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBackups.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listBackupPlans', () => { + it('invokes listBackupPlans without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + ]; + client.innerApiCalls.listBackupPlans = stubSimpleCall(expectedResponse); + const [response] = await client.listBackupPlans(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBackupPlans as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlans as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlans without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + ]; + client.innerApiCalls.listBackupPlans = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackupPlans( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlan[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBackupPlans as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlans as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlans with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackupPlans = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listBackupPlans(request), expectedError); + const actualRequest = (client.innerApiCalls.listBackupPlans as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlans as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlansStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + ]; + client.descriptors.page.listBackupPlans.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listBackupPlansStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupPlan[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlan) => { + 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.listBackupPlans.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBackupPlans, request)); + assert( + (client.descriptors.page.listBackupPlans.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listBackupPlansStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupPlans.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listBackupPlansStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupPlan[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlan) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listBackupPlans.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBackupPlans, request)); + assert( + (client.descriptors.page.listBackupPlans.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBackupPlans without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + ]; + client.descriptors.page.listBackupPlans.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackupPlan[] = []; + const iterable = client.listBackupPlansAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBackupPlans with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupPlans.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBackupPlansAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackupPlan[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listBackupPlanAssociations', () => { + it('invokes listBackupPlanAssociations without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + ]; + client.innerApiCalls.listBackupPlanAssociations = stubSimpleCall(expectedResponse); + const [response] = await client.listBackupPlanAssociations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlanAssociations without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + ]; + client.innerApiCalls.listBackupPlanAssociations = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackupPlanAssociations( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlanAssociations with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackupPlanAssociations = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listBackupPlanAssociations(request), expectedError); + const actualRequest = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlanAssociationsStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + ]; + client.descriptors.page.listBackupPlanAssociations.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listBackupPlanAssociationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupPlanAssociation[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlanAssociation) => { + 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.listBackupPlanAssociations.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBackupPlanAssociations, request)); + assert( + (client.descriptors.page.listBackupPlanAssociations.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listBackupPlanAssociationsStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupPlanAssociations.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listBackupPlanAssociationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupPlanAssociation[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlanAssociation) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listBackupPlanAssociations.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBackupPlanAssociations, request)); + assert( + (client.descriptors.page.listBackupPlanAssociations.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBackupPlanAssociations without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + ]; + client.descriptors.page.listBackupPlanAssociations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[] = []; + const iterable = client.listBackupPlanAssociationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBackupPlanAssociations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBackupPlanAssociations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBackupPlanAssociations with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupPlanAssociations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBackupPlanAssociationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBackupPlanAssociations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBackupPlanAssociations.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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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('backup', () => { + const fakePath = "/rendered/path/backup"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + backupvault: "backupvaultValue", + datasource: "datasourceValue", + backup: "backupValue", + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.backupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.backupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('backupPath', () => { + const result = client.backupPath("projectValue", "locationValue", "backupvaultValue", "datasourceValue", "backupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.backupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromBackupName', () => { + const result = client.matchProjectFromBackupName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromBackupName', () => { + const result = client.matchLocationFromBackupName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBackupvaultFromBackupName', () => { + const result = client.matchBackupvaultFromBackupName(fakePath); + assert.strictEqual(result, "backupvaultValue"); + assert((client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDatasourceFromBackupName', () => { + const result = client.matchDatasourceFromBackupName(fakePath); + assert.strictEqual(result, "datasourceValue"); + assert((client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBackupFromBackupName', () => { + const result = client.matchBackupFromBackupName(fakePath); + assert.strictEqual(result, "backupValue"); + assert((client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('backupPlan', () => { + const fakePath = "/rendered/path/backupPlan"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + backup_plan: "backupPlanValue", + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.backupPlanPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.backupPlanPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('backupPlanPath', () => { + const result = client.backupPlanPath("projectValue", "locationValue", "backupPlanValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.backupPlanPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromBackupPlanName', () => { + const result = client.matchProjectFromBackupPlanName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.backupPlanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromBackupPlanName', () => { + const result = client.matchLocationFromBackupPlanName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.backupPlanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBackupPlanFromBackupPlanName', () => { + const result = client.matchBackupPlanFromBackupPlanName(fakePath); + assert.strictEqual(result, "backupPlanValue"); + assert((client.pathTemplates.backupPlanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('backupPlanAssociation', () => { + const fakePath = "/rendered/path/backupPlanAssociation"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + backup_plan_association: "backupPlanAssociationValue", + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.backupPlanAssociationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.backupPlanAssociationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('backupPlanAssociationPath', () => { + const result = client.backupPlanAssociationPath("projectValue", "locationValue", "backupPlanAssociationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.backupPlanAssociationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromBackupPlanAssociationName', () => { + const result = client.matchProjectFromBackupPlanAssociationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.backupPlanAssociationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromBackupPlanAssociationName', () => { + const result = client.matchLocationFromBackupPlanAssociationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.backupPlanAssociationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBackupPlanAssociationFromBackupPlanAssociationName', () => { + const result = client.matchBackupPlanAssociationFromBackupPlanAssociationName(fakePath); + assert.strictEqual(result, "backupPlanAssociationValue"); + assert((client.pathTemplates.backupPlanAssociationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('backupVault', () => { + const fakePath = "/rendered/path/backupVault"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + backupvault: "backupvaultValue", + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.backupVaultPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.backupVaultPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('backupVaultPath', () => { + const result = client.backupVaultPath("projectValue", "locationValue", "backupvaultValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.backupVaultPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromBackupVaultName', () => { + const result = client.matchProjectFromBackupVaultName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.backupVaultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromBackupVaultName', () => { + const result = client.matchLocationFromBackupVaultName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.backupVaultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBackupvaultFromBackupVaultName', () => { + const result = client.matchBackupvaultFromBackupVaultName(fakePath); + assert.strictEqual(result, "backupvaultValue"); + assert((client.pathTemplates.backupVaultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataSource', () => { + const fakePath = "/rendered/path/dataSource"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + backupvault: "backupvaultValue", + datasource: "datasourceValue", + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataSourcePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataSourcePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataSourcePath', () => { + const result = client.dataSourcePath("projectValue", "locationValue", "backupvaultValue", "datasourceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataSourcePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataSourceName', () => { + const result = client.matchProjectFromDataSourceName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataSourceName', () => { + const result = client.matchLocationFromDataSourceName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBackupvaultFromDataSourceName', () => { + const result = client.matchBackupvaultFromDataSourceName(fakePath); + assert.strictEqual(result, "backupvaultValue"); + assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDatasourceFromDataSourceName', () => { + const result = client.matchDatasourceFromDataSourceName(fakePath); + assert.strictEqual(result, "datasourceValue"); + assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new backupdrModule.v1.BackupDRClient({ + 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('managementServer', () => { + const fakePath = "/rendered/path/managementServer"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + managementserver: "managementserverValue", + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.managementServerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.managementServerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('managementServerPath', () => { + const result = client.managementServerPath("projectValue", "locationValue", "managementserverValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.managementServerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromManagementServerName', () => { + const result = client.matchProjectFromManagementServerName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.managementServerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromManagementServerName', () => { + const result = client.matchLocationFromManagementServerName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.managementServerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchManagementserverFromManagementServerName', () => { + const result = client.matchManagementserverFromManagementServerName(fakePath); + assert.strictEqual(result, "managementserverValue"); + assert((client.pathTemplates.managementServerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new backupdrModule.v1.BackupDRClient({ + 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)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/tsconfig.json b/owl-bot-staging/google-cloud-backupdr/v1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/tsconfig.json @@ -0,0 +1,19 @@ +{ + "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-backupdr/v1/webpack.config.js b/owl-bot-staging/google-cloud-backupdr/v1/webpack.config.js new file mode 100644 index 00000000000..72a35713b8c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'BackupDR', + filename: './backup-d-r.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; From 299ce5b37b8969ab0459f07d0f09d3e6cf4381f6 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 26 Sep 2024 00:12:33 +0000 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../google-cloud-backupdr/v1/.eslintignore | 7 - .../google-cloud-backupdr/v1/.eslintrc.json | 3 - .../google-cloud-backupdr/v1/.gitignore | 14 - .../google-cloud-backupdr/v1/.jsdoc.js | 55 - .../google-cloud-backupdr/v1/.mocharc.js | 33 - .../google-cloud-backupdr/v1/.prettierrc.js | 22 - .../google-cloud-backupdr/v1/README.md | 1 - .../google-cloud-backupdr/v1/package.json | 58 - .../google/cloud/backupdr/v1/backupdr.proto | 776 - .../v1/protos/protos.d.ts | 23288 ------ .../google-cloud-backupdr/v1/protos/protos.js | 61858 --------------- .../v1/protos/protos.json | 7871 -- .../v1/backup_d_r.create_management_server.js | 90 - .../v1/backup_d_r.delete_management_server.js | 76 - .../v1/backup_d_r.get_management_server.js | 62 - .../v1/backup_d_r.list_management_servers.js | 85 - ...pet_metadata_google.cloud.backupdr.v1.json | 1707 - .../google-cloud-backupdr/v1/src/index.ts | 25 - .../v1/src/v1/backup_d_r_client.ts | 5426 -- .../v1/src/v1/backup_d_r_client_config.json | 191 - .../v1/src/v1/backup_d_r_proto_list.json | 8 - .../v1/src/v1/gapic_metadata.json | 391 - .../google-cloud-backupdr/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_backup_d_r_v1.ts | 6816 -- .../google-cloud-backupdr/v1/tsconfig.json | 19 - .../v1/webpack.config.js | 64 - packages/google-cloud-backupdr/README.md | 34 +- .../google/cloud/backupdr/v1/backupdr.proto | 380 +- .../google/cloud/backupdr/v1/backupplan.proto | 0 .../backupdr/v1/backupplanassociation.proto | 0 .../cloud/backupdr/v1/backupvault.proto | 0 .../cloud/backupdr/v1/backupvault_ba.proto | 0 .../cloud/backupdr/v1/backupvault_gce.proto | 0 .../google-cloud-backupdr/protos/protos.d.ts | 24204 ++++-- .../google-cloud-backupdr/protos/protos.js | 65340 ++++++++++++---- .../google-cloud-backupdr/protos/protos.json | 5726 +- .../google-cloud-backupdr/samples/README.md | 540 + .../generated/v1/backup_d_r.abandon_backup.js | 0 .../v1/backup_d_r.create_backup_plan.js | 0 ...ckup_d_r.create_backup_plan_association.js | 0 .../v1/backup_d_r.create_backup_vault.js | 0 .../v1/backup_d_r.create_management_server.js | 4 +- .../generated/v1/backup_d_r.delete_backup.js | 0 .../v1/backup_d_r.delete_backup_plan.js | 0 ...ckup_d_r.delete_backup_plan_association.js | 0 .../v1/backup_d_r.delete_backup_vault.js | 0 .../v1/backup_d_r.fetch_access_token.js | 0 .../backup_d_r.fetch_usable_backup_vaults.js | 0 .../v1/backup_d_r.finalize_backup.js | 0 .../generated/v1/backup_d_r.get_backup.js | 0 .../v1/backup_d_r.get_backup_plan.js | 0 .../backup_d_r.get_backup_plan_association.js | 0 .../v1/backup_d_r.get_backup_vault.js | 0 .../v1/backup_d_r.get_data_source.js | 0 .../v1/backup_d_r.get_management_server.js | 2 +- .../v1/backup_d_r.initiate_backup.js | 0 ...ackup_d_r.list_backup_plan_associations.js | 0 .../v1/backup_d_r.list_backup_plans.js | 0 .../v1/backup_d_r.list_backup_vaults.js | 0 .../generated/v1/backup_d_r.list_backups.js | 0 .../v1/backup_d_r.list_data_sources.js | 0 .../v1/backup_d_r.list_management_servers.js | 9 +- .../v1/backup_d_r.remove_data_source.js | 0 .../generated/v1/backup_d_r.restore_backup.js | 0 .../v1/backup_d_r.set_internal_status.js | 0 .../v1/backup_d_r.test_iam_permissions.js | 0 .../generated/v1/backup_d_r.trigger_backup.js | 0 .../generated/v1/backup_d_r.update_backup.js | 0 .../v1/backup_d_r.update_backup_vault.js | 0 .../v1/backup_d_r.update_data_source.js | 0 ...pet_metadata_google.cloud.backupdr.v1.json | 1502 +- .../src/v1/backup_d_r_client.ts | 5711 +- .../src/v1/backup_d_r_client_config.json | 133 + .../src/v1/backup_d_r_proto_list.json | 7 +- .../src/v1/gapic_metadata.json | 324 + .../test/gapic_backup_d_r_v1.ts | 6952 +- 79 files changed, 89556 insertions(+), 130385 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/README.md delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/package.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client_config.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/test/gapic_backup_d_r_v1.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/webpack.config.js rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/protos/google/cloud/backupdr/v1/backupplan.proto (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/protos/google/cloud/backupdr/v1/backupplanassociation.proto (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/protos/google/cloud/backupdr/v1/backupvault.proto (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/protos/google/cloud/backupdr/v1/backupvault_ba.proto (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/protos/google/cloud/backupdr/v1/backupvault_gce.proto (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.abandon_backup.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.create_backup_plan.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.create_backup_plan_association.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.create_backup_vault.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.delete_backup.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.delete_backup_plan.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.delete_backup_plan_association.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.delete_backup_vault.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.fetch_access_token.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.finalize_backup.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.get_backup.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.get_backup_plan.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.get_backup_plan_association.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.get_backup_vault.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.get_data_source.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.initiate_backup.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.list_backup_plan_associations.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.list_backup_plans.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.list_backup_vaults.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.list_backups.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.list_data_sources.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.remove_data_source.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.restore_backup.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.set_internal_status.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.test_iam_permissions.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.trigger_backup.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.update_backup.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.update_backup_vault.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.update_data_source.js (100%) diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.eslintignore b/owl-bot-staging/google-cloud-backupdr/v1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/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-backupdr/v1/.eslintrc.json b/owl-bot-staging/google-cloud-backupdr/v1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.gitignore b/owl-bot-staging/google-cloud-backupdr/v1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/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-backupdr/v1/.jsdoc.js b/owl-bot-staging/google-cloud-backupdr/v1/.jsdoc.js deleted file mode 100644 index 7b9ce99a79c..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/.jsdoc.js +++ /dev/null @@ -1,55 +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 -// -// 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 2024 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/backupdr', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js b/owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js deleted file mode 100644 index 13b67c34edc..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js +++ /dev/null @@ -1,33 +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 -// -// 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-backupdr/v1/.prettierrc.js b/owl-bot-staging/google-cloud-backupdr/v1/.prettierrc.js deleted file mode 100644 index 9a8fd690982..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/.prettierrc.js +++ /dev/null @@ -1,22 +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 -// -// 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-backupdr/v1/README.md b/owl-bot-staging/google-cloud-backupdr/v1/README.md deleted file mode 100644 index a01e3b46ff3..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/README.md +++ /dev/null @@ -1 +0,0 @@ -Backupdr: Nodejs Client diff --git a/owl-bot-staging/google-cloud-backupdr/v1/package.json b/owl-bot-staging/google-cloud-backupdr/v1/package.json deleted file mode 100644 index 0bb72fdc884..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@google-cloud/backupdr", - "version": "0.1.0", - "description": "Backupdr client for Node.js", - "repository": "googleapis/nodejs-backupdr", - "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 backupdr", - "backupdr", - "backup d r" - ], - "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-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto deleted file mode 100644 index eff6b77e762..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto +++ /dev/null @@ -1,776 +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.backupdr.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/field_info.proto"; -import "google/api/resource.proto"; -import "google/cloud/backupdr/v1/backupplan.proto"; -import "google/cloud/backupdr/v1/backupplanassociation.proto"; -import "google/cloud/backupdr/v1/backupvault.proto"; -import "google/iam/v1/iam_policy.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -option csharp_namespace = "Google.Cloud.BackupDR.V1"; -option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; -option java_multiple_files = true; -option java_outer_classname = "BackupDRProto"; -option java_package = "com.google.cloud.backupdr.v1"; -option php_namespace = "Google\\Cloud\\BackupDR\\V1"; -option ruby_package = "Google::Cloud::BackupDR::V1"; - -// The BackupDR Service -service BackupDR { - option (google.api.default_host) = "backupdr.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists ManagementServers in a given project and location. - rpc ListManagementServers(ListManagementServersRequest) - returns (ListManagementServersResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/managementServers" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a single ManagementServer. - rpc GetManagementServer(GetManagementServerRequest) - returns (ManagementServer) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/managementServers/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new ManagementServer in a given project and location. - rpc CreateManagementServer(CreateManagementServerRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/managementServers" - body: "management_server" - }; - option (google.api.method_signature) = - "parent,management_server,management_server_id"; - option (google.longrunning.operation_info) = { - response_type: "ManagementServer" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a single ManagementServer. - rpc DeleteManagementServer(DeleteManagementServerRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/managementServers/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Creates a new BackupVault in a given project and location. - rpc CreateBackupVault(CreateBackupVaultRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/backupVaults" - body: "backup_vault" - }; - option (google.api.method_signature) = - "parent,backup_vault,backup_vault_id"; - option (google.longrunning.operation_info) = { - response_type: "BackupVault" - metadata_type: "OperationMetadata" - }; - } - - // Lists BackupVaults in a given project and location. - rpc ListBackupVaults(ListBackupVaultsRequest) - returns (ListBackupVaultsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/backupVaults" - }; - option (google.api.method_signature) = "parent"; - } - - // FetchUsableBackupVaults lists usable BackupVaults in a given project and - // location. Usable BackupVault are the ones that user has - // backupdr.backupVaults.get permission. - rpc FetchUsableBackupVaults(FetchUsableBackupVaultsRequest) - returns (FetchUsableBackupVaultsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a BackupVault. - rpc GetBackupVault(GetBackupVaultRequest) returns (BackupVault) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backupVaults/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates the settings of a BackupVault. - rpc UpdateBackupVault(UpdateBackupVaultRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}" - body: "backup_vault" - }; - option (google.api.method_signature) = "backup_vault,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "BackupVault" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a BackupVault. - rpc DeleteBackupVault(DeleteBackupVaultRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/backupVaults/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Returns the caller's permissions on a BackupVault resource. - // - // A caller is not required to have Google IAM permission to make this - // request. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/backupVaults/*}:testIamPermissions" - body: "*" - }; - option (google.api.method_signature) = "resource, permissions"; - } - - // Lists DataSources in a given project and location. - rpc ListDataSources(ListDataSourcesRequest) - returns (ListDataSourcesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a DataSource. - rpc GetDataSource(GetDataSourceRequest) returns (DataSource) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates the settings of a DataSource. - rpc UpdateDataSource(UpdateDataSourceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}" - body: "data_source" - }; - option (google.api.method_signature) = "data_source,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "DataSource" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a DataSource. This is a custom method instead of a standard delete - // method because external clients will not delete DataSources except for - // BackupDR backup appliances. - rpc RemoveDataSource(RemoveDataSourceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:remove" - body: "*" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Sets the internal status of a DataSource. - rpc SetInternalStatus(SetInternalStatusRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:setInternalStatus" - body: "*" - }; - option (google.api.method_signature) = "data_source"; - option (google.longrunning.operation_info) = { - response_type: "SetInternalStatusResponse" - metadata_type: "OperationMetadata" - }; - } - - // Internal only. - // Initiates a backup. - rpc InitiateBackup(InitiateBackupRequest) returns (InitiateBackupResponse) { - option (google.api.http) = { - post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:initiateBackup" - body: "*" - }; - option (google.api.method_signature) = "data_source"; - } - - // Internal only. - // Abandons a backup. - rpc AbandonBackup(AbandonBackupRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:abandonBackup" - body: "*" - }; - option (google.api.method_signature) = "data_source"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Internal only. - // Finalize a backup that was started by a call to InitiateBackup. - rpc FinalizeBackup(FinalizeBackupRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:finalizeBackup" - body: "*" - }; - option (google.api.method_signature) = "data_source"; - option (google.longrunning.operation_info) = { - response_type: "Backup" - metadata_type: "OperationMetadata" - }; - } - - // Internal only. - // Fetch access token for a given data source. - rpc FetchAccessToken(FetchAccessTokenRequest) - returns (FetchAccessTokenResponse) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Lists Backups in a given project and location. - rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a Backup. - rpc GetBackup(GetBackupRequest) returns (Backup) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates the settings of a Backup. - rpc UpdateBackup(UpdateBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" - body: "backup" - }; - option (google.api.method_signature) = "backup,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Backup" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a Backup. - rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "Backup" - metadata_type: "OperationMetadata" - }; - } - - // Restore from a Backup - rpc RestoreBackup(RestoreBackupRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore" - body: "*" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "RestoreBackupResponse" - metadata_type: "OperationMetadata" - }; - } - - // Create a BackupPlan - rpc CreateBackupPlan(CreateBackupPlanRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/backupPlans" - body: "backup_plan" - }; - option (google.api.method_signature) = "parent,backup_plan,backup_plan_id"; - option (google.longrunning.operation_info) = { - response_type: "BackupPlan" - metadata_type: "OperationMetadata" - }; - } - - // Gets details of a single BackupPlan. - rpc GetBackupPlan(GetBackupPlanRequest) returns (BackupPlan) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backupPlans/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists BackupPlans in a given project and location. - rpc ListBackupPlans(ListBackupPlansRequest) - returns (ListBackupPlansResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/backupPlans" - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a single BackupPlan. - rpc DeleteBackupPlan(DeleteBackupPlanRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/backupPlans/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Create a BackupPlanAssociation - rpc CreateBackupPlanAssociation(CreateBackupPlanAssociationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" - body: "backup_plan_association" - }; - option (google.api.method_signature) = - "parent,backup_plan_association,backup_plan_association_id"; - option (google.longrunning.operation_info) = { - response_type: "BackupPlanAssociation" - metadata_type: "OperationMetadata" - }; - } - - // Gets details of a single BackupPlanAssociation. - rpc GetBackupPlanAssociation(GetBackupPlanAssociationRequest) - returns (BackupPlanAssociation) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists BackupPlanAssociations in a given project and location. - rpc ListBackupPlanAssociations(ListBackupPlanAssociationsRequest) - returns (ListBackupPlanAssociationsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a single BackupPlanAssociation. - rpc DeleteBackupPlanAssociation(DeleteBackupPlanAssociationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Triggers a new Backup. - rpc TriggerBackup(TriggerBackupRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup" - body: "*" - }; - option (google.api.method_signature) = "name,rule_id"; - option (google.longrunning.operation_info) = { - response_type: "BackupPlanAssociation" - metadata_type: "OperationMetadata" - }; - } -} - -// Network configuration for ManagementServer instance. -message NetworkConfig { - // VPC peering modes supported by Cloud BackupDR. - enum PeeringMode { - // Peering mode not set. - PEERING_MODE_UNSPECIFIED = 0; - - // Connect using Private Service Access to the Management Server. Private - // services access provides an IP address range for multiple Google Cloud - // services, including Cloud BackupDR. - PRIVATE_SERVICE_ACCESS = 1; - } - - // Optional. The resource name of the Google Compute Engine VPC network to - // which the ManagementServer instance is connected. - string network = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The network connect mode of the ManagementServer instance. For - // this version, only PRIVATE_SERVICE_ACCESS is supported. - PeeringMode peering_mode = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// ManagementURI for the Management Server resource. -message ManagementURI { - // Output only. The ManagementServer AGM/RD WebUI URL. - string web_ui = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The ManagementServer AGM/RD API URL. - string api = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// ManagementURI depending on the Workforce Identity i.e. either 1p or 3p. -message WorkforceIdentityBasedManagementURI { - // Output only. First party Management URI for Google Identities. - string first_party_management_uri = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Third party Management URI for External Identity Providers. - string third_party_management_uri = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// OAuth Client ID depending on the Workforce Identity i.e. either 1p or 3p, -message WorkforceIdentityBasedOAuth2ClientID { - // Output only. First party OAuth Client ID for Google Identities. - string first_party_oauth2_client_id = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Third party OAuth Client ID for External Identity Providers. - string third_party_oauth2_client_id = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// ManagementServer describes a single BackupDR ManagementServer instance. -message ManagementServer { - option (google.api.resource) = { - type: "backupdr.googleapis.com/ManagementServer" - pattern: "projects/{project}/locations/{location}/managementServers/{managementserver}" - plural: "managementServers" - singular: "managementServer" - }; - - // Type of backup service resource. - enum InstanceType { - // Instance type is not mentioned. - INSTANCE_TYPE_UNSPECIFIED = 0; - - // Instance for backup and restore management (i.e., AGM). - BACKUP_RESTORE = 1; - } - - // State of Management server instance. - enum InstanceState { - // State not set. - INSTANCE_STATE_UNSPECIFIED = 0; - - // The instance is being created. - CREATING = 1; - - // The instance has been created and is fully usable. - READY = 2; - - // The instance configuration is being updated. Certain kinds of updates - // may cause the instance to become unusable while the update is in - // progress. - UPDATING = 3; - - // The instance is being deleted. - DELETING = 4; - - // The instance is being repaired and may be unstable. - REPAIRING = 5; - - // Maintenance is being performed on this instance. - MAINTENANCE = 6; - - // The instance is experiencing an issue and might be unusable. You can get - // further details from the statusMessage field of Instance resource. - ERROR = 7; - } - - // Output only. Identifier. The resource name. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = IDENTIFIER - ]; - - // Optional. The description of the ManagementServer instance (2048 characters - // or less). - string description = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Resource labels to represent user provided metadata. - // Labels currently defined: - // 1. migrate_from_go= - // If set to true, the MS is created in migration ready mode. - map labels = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The time when the instance was created. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the instance was updated. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The type of the ManagementServer resource. - InstanceType type = 14 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The hostname or ip address of the exposed AGM endpoints, used - // by clients to connect to AGM/RD graphical user interface and APIs. - ManagementURI management_uri = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The hostnames of the exposed AGM endpoints for both types of - // user i.e. 1p and 3p, used to connect AGM/RM UI. - WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = - 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The ManagementServer state. - InstanceState state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. VPC networks to which the ManagementServer instance is connected. - // For this version, only a single network is supported. - repeated NetworkConfig networks = 8 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Server specified ETag for the ManagementServer resource to - // prevent simultaneous updates from overwiting each other. - string etag = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The OAuth 2.0 client id is required to make API calls to the - // BackupDR instance API of this ManagementServer. This is the value that - // should be provided in the 'aud' field of the OIDC ID Token (see openid - // specification - // https://openid.net/specs/openid-connect-core-1_0.html#IDToken). - string oauth2_client_id = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The OAuth client IDs for both types of user i.e. 1p and 3p. - WorkforceIdentityBasedOAuth2ClientID - workforce_identity_based_oauth2_client_id = 17 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The hostname or ip address of the exposed AGM endpoints, used - // by BAs to connect to BA proxy. - repeated string ba_proxy_uri = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Reserved for future use. - google.protobuf.BoolValue satisfies_pzs = 19 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Reserved for future use. - bool satisfies_pzi = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for listing management servers. -message ListManagementServersRequest { - // Required. The project and location for which to retrieve management servers - // information, in the format 'projects/{project_id}/locations/{location}'. In - // Cloud BackupDR, locations map to Google Cloud regions, for example - // **us-central1**. To retrieve management servers for all locations, use "-" - // for the - // '{location}' value. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "backupdr.googleapis.com/ManagementServer" - } - ]; - - // Optional. Requested page size. Server may return fewer items than - // requested. If unspecified, server will pick an appropriate default. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A token identifying a page of results the server should return. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filtering results. - optional string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Hint for how to order the results. - optional string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for listing management servers. -message ListManagementServersResponse { - // The list of ManagementServer instances in the project for the specified - // location. - // - // If the '{location}' value in the request is "-", the response contains a - // list of instances from all locations. In case any location is unreachable, - // the response will only return management servers in reachable locations and - // the 'unreachable' field will be populated with a list of unreachable - // locations. - repeated ManagementServer management_servers = 1; - - // A token identifying a page of results the server should return. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for getting a management server instance. -message GetManagementServerRequest { - // Required. Name of the management server resource name, in the format - // 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/ManagementServer" - } - ]; -} - -// Request message for creating a management server instance. -message CreateManagementServerRequest { - // Required. The management server project and location in the format - // 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR - // locations map to Google Cloud regions, for example **us-central1**. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "backupdr.googleapis.com/ManagementServer" - } - ]; - - // Required. The name of the management server to create. The name must be - // unique for the specified project and location. - string management_server_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. A [management server - // resource][google.cloud.backupdr.v1.ManagementServer] - ManagementServer management_server = 3 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. An optional 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]; -} - -// Request message for deleting a management server instance. -message DeleteManagementServerRequest { - // Required. Name of the resource - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/ManagementServer" - } - ]; - - // Optional. An optional 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. AdditionalInfo contains additional Info related to backup plan - // association resource. - map additional_info = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts deleted file mode 100644 index 3edeaca2872..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts +++ /dev/null @@ -1,23288 +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. - -import type {protobuf as $protobuf} from "google-gax"; -import Long = require("long"); -/** Namespace google. */ -export namespace google { - - /** Namespace cloud. */ - namespace cloud { - - /** Namespace backupdr. */ - namespace backupdr { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a BackupDR */ - class BackupDR extends $protobuf.rpc.Service { - - /** - * Constructs a new BackupDR 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 BackupDR 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): BackupDR; - - /** - * Calls ListManagementServers. - * @param request ListManagementServersRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListManagementServersResponse - */ - public listManagementServers(request: google.cloud.backupdr.v1.IListManagementServersRequest, callback: google.cloud.backupdr.v1.BackupDR.ListManagementServersCallback): void; - - /** - * Calls ListManagementServers. - * @param request ListManagementServersRequest message or plain object - * @returns Promise - */ - public listManagementServers(request: google.cloud.backupdr.v1.IListManagementServersRequest): Promise; - - /** - * Calls GetManagementServer. - * @param request GetManagementServerRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ManagementServer - */ - public getManagementServer(request: google.cloud.backupdr.v1.IGetManagementServerRequest, callback: google.cloud.backupdr.v1.BackupDR.GetManagementServerCallback): void; - - /** - * Calls GetManagementServer. - * @param request GetManagementServerRequest message or plain object - * @returns Promise - */ - public getManagementServer(request: google.cloud.backupdr.v1.IGetManagementServerRequest): Promise; - - /** - * Calls CreateManagementServer. - * @param request CreateManagementServerRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createManagementServer(request: google.cloud.backupdr.v1.ICreateManagementServerRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateManagementServerCallback): void; - - /** - * Calls CreateManagementServer. - * @param request CreateManagementServerRequest message or plain object - * @returns Promise - */ - public createManagementServer(request: google.cloud.backupdr.v1.ICreateManagementServerRequest): Promise; - - /** - * Calls DeleteManagementServer. - * @param request DeleteManagementServerRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteManagementServer(request: google.cloud.backupdr.v1.IDeleteManagementServerRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteManagementServerCallback): void; - - /** - * Calls DeleteManagementServer. - * @param request DeleteManagementServerRequest message or plain object - * @returns Promise - */ - public deleteManagementServer(request: google.cloud.backupdr.v1.IDeleteManagementServerRequest): Promise; - - /** - * Calls CreateBackupVault. - * @param request CreateBackupVaultRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createBackupVault(request: google.cloud.backupdr.v1.ICreateBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupVaultCallback): void; - - /** - * Calls CreateBackupVault. - * @param request CreateBackupVaultRequest message or plain object - * @returns Promise - */ - public createBackupVault(request: google.cloud.backupdr.v1.ICreateBackupVaultRequest): Promise; - - /** - * Calls ListBackupVaults. - * @param request ListBackupVaultsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBackupVaultsResponse - */ - public listBackupVaults(request: google.cloud.backupdr.v1.IListBackupVaultsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupVaultsCallback): void; - - /** - * Calls ListBackupVaults. - * @param request ListBackupVaultsRequest message or plain object - * @returns Promise - */ - public listBackupVaults(request: google.cloud.backupdr.v1.IListBackupVaultsRequest): Promise; - - /** - * Calls FetchUsableBackupVaults. - * @param request FetchUsableBackupVaultsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FetchUsableBackupVaultsResponse - */ - public fetchUsableBackupVaults(request: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, callback: google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaultsCallback): void; - - /** - * Calls FetchUsableBackupVaults. - * @param request FetchUsableBackupVaultsRequest message or plain object - * @returns Promise - */ - public fetchUsableBackupVaults(request: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest): Promise; - - /** - * Calls GetBackupVault. - * @param request GetBackupVaultRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BackupVault - */ - public getBackupVault(request: google.cloud.backupdr.v1.IGetBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupVaultCallback): void; - - /** - * Calls GetBackupVault. - * @param request GetBackupVaultRequest message or plain object - * @returns Promise - */ - public getBackupVault(request: google.cloud.backupdr.v1.IGetBackupVaultRequest): Promise; - - /** - * Calls UpdateBackupVault. - * @param request UpdateBackupVaultRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateBackupVault(request: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateBackupVaultCallback): void; - - /** - * Calls UpdateBackupVault. - * @param request UpdateBackupVaultRequest message or plain object - * @returns Promise - */ - public updateBackupVault(request: google.cloud.backupdr.v1.IUpdateBackupVaultRequest): Promise; - - /** - * Calls DeleteBackupVault. - * @param request DeleteBackupVaultRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteBackupVault(request: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupVaultCallback): void; - - /** - * Calls DeleteBackupVault. - * @param request DeleteBackupVaultRequest message or plain object - * @returns Promise - */ - public deleteBackupVault(request: google.cloud.backupdr.v1.IDeleteBackupVaultRequest): Promise; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.backupdr.v1.BackupDR.TestIamPermissionsCallback): void; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; - - /** - * Calls ListDataSources. - * @param request ListDataSourcesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDataSourcesResponse - */ - public listDataSources(request: google.cloud.backupdr.v1.IListDataSourcesRequest, callback: google.cloud.backupdr.v1.BackupDR.ListDataSourcesCallback): void; - - /** - * Calls ListDataSources. - * @param request ListDataSourcesRequest message or plain object - * @returns Promise - */ - public listDataSources(request: google.cloud.backupdr.v1.IListDataSourcesRequest): Promise; - - /** - * Calls GetDataSource. - * @param request GetDataSourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DataSource - */ - public getDataSource(request: google.cloud.backupdr.v1.IGetDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.GetDataSourceCallback): void; - - /** - * Calls GetDataSource. - * @param request GetDataSourceRequest message or plain object - * @returns Promise - */ - public getDataSource(request: google.cloud.backupdr.v1.IGetDataSourceRequest): Promise; - - /** - * Calls UpdateDataSource. - * @param request UpdateDataSourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateDataSource(request: google.cloud.backupdr.v1.IUpdateDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateDataSourceCallback): void; - - /** - * Calls UpdateDataSource. - * @param request UpdateDataSourceRequest message or plain object - * @returns Promise - */ - public updateDataSource(request: google.cloud.backupdr.v1.IUpdateDataSourceRequest): Promise; - - /** - * Calls RemoveDataSource. - * @param request RemoveDataSourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public removeDataSource(request: google.cloud.backupdr.v1.IRemoveDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.RemoveDataSourceCallback): void; - - /** - * Calls RemoveDataSource. - * @param request RemoveDataSourceRequest message or plain object - * @returns Promise - */ - public removeDataSource(request: google.cloud.backupdr.v1.IRemoveDataSourceRequest): Promise; - - /** - * Calls SetInternalStatus. - * @param request SetInternalStatusRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setInternalStatus(request: google.cloud.backupdr.v1.ISetInternalStatusRequest, callback: google.cloud.backupdr.v1.BackupDR.SetInternalStatusCallback): void; - - /** - * Calls SetInternalStatus. - * @param request SetInternalStatusRequest message or plain object - * @returns Promise - */ - public setInternalStatus(request: google.cloud.backupdr.v1.ISetInternalStatusRequest): Promise; - - /** - * Calls InitiateBackup. - * @param request InitiateBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and InitiateBackupResponse - */ - public initiateBackup(request: google.cloud.backupdr.v1.IInitiateBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.InitiateBackupCallback): void; - - /** - * Calls InitiateBackup. - * @param request InitiateBackupRequest message or plain object - * @returns Promise - */ - public initiateBackup(request: google.cloud.backupdr.v1.IInitiateBackupRequest): Promise; - - /** - * Calls AbandonBackup. - * @param request AbandonBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public abandonBackup(request: google.cloud.backupdr.v1.IAbandonBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.AbandonBackupCallback): void; - - /** - * Calls AbandonBackup. - * @param request AbandonBackupRequest message or plain object - * @returns Promise - */ - public abandonBackup(request: google.cloud.backupdr.v1.IAbandonBackupRequest): Promise; - - /** - * Calls FinalizeBackup. - * @param request FinalizeBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public finalizeBackup(request: google.cloud.backupdr.v1.IFinalizeBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.FinalizeBackupCallback): void; - - /** - * Calls FinalizeBackup. - * @param request FinalizeBackupRequest message or plain object - * @returns Promise - */ - public finalizeBackup(request: google.cloud.backupdr.v1.IFinalizeBackupRequest): Promise; - - /** - * Calls FetchAccessToken. - * @param request FetchAccessTokenRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FetchAccessTokenResponse - */ - public fetchAccessToken(request: google.cloud.backupdr.v1.IFetchAccessTokenRequest, callback: google.cloud.backupdr.v1.BackupDR.FetchAccessTokenCallback): void; - - /** - * Calls FetchAccessToken. - * @param request FetchAccessTokenRequest message or plain object - * @returns Promise - */ - public fetchAccessToken(request: google.cloud.backupdr.v1.IFetchAccessTokenRequest): Promise; - - /** - * Calls ListBackups. - * @param request ListBackupsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBackupsResponse - */ - public listBackups(request: google.cloud.backupdr.v1.IListBackupsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupsCallback): void; - - /** - * Calls ListBackups. - * @param request ListBackupsRequest message or plain object - * @returns Promise - */ - public listBackups(request: google.cloud.backupdr.v1.IListBackupsRequest): Promise; - - /** - * Calls GetBackup. - * @param request GetBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Backup - */ - public getBackup(request: google.cloud.backupdr.v1.IGetBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupCallback): void; - - /** - * Calls GetBackup. - * @param request GetBackupRequest message or plain object - * @returns Promise - */ - public getBackup(request: google.cloud.backupdr.v1.IGetBackupRequest): Promise; - - /** - * Calls UpdateBackup. - * @param request UpdateBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateBackup(request: google.cloud.backupdr.v1.IUpdateBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateBackupCallback): void; - - /** - * Calls UpdateBackup. - * @param request UpdateBackupRequest message or plain object - * @returns Promise - */ - public updateBackup(request: google.cloud.backupdr.v1.IUpdateBackupRequest): Promise; - - /** - * Calls DeleteBackup. - * @param request DeleteBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteBackup(request: google.cloud.backupdr.v1.IDeleteBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupCallback): void; - - /** - * Calls DeleteBackup. - * @param request DeleteBackupRequest message or plain object - * @returns Promise - */ - public deleteBackup(request: google.cloud.backupdr.v1.IDeleteBackupRequest): Promise; - - /** - * Calls RestoreBackup. - * @param request RestoreBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public restoreBackup(request: google.cloud.backupdr.v1.IRestoreBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.RestoreBackupCallback): void; - - /** - * Calls RestoreBackup. - * @param request RestoreBackupRequest message or plain object - * @returns Promise - */ - public restoreBackup(request: google.cloud.backupdr.v1.IRestoreBackupRequest): Promise; - - /** - * Calls CreateBackupPlan. - * @param request CreateBackupPlanRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createBackupPlan(request: google.cloud.backupdr.v1.ICreateBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupPlanCallback): void; - - /** - * Calls CreateBackupPlan. - * @param request CreateBackupPlanRequest message or plain object - * @returns Promise - */ - public createBackupPlan(request: google.cloud.backupdr.v1.ICreateBackupPlanRequest): Promise; - - /** - * Calls GetBackupPlan. - * @param request GetBackupPlanRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BackupPlan - */ - public getBackupPlan(request: google.cloud.backupdr.v1.IGetBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupPlanCallback): void; - - /** - * Calls GetBackupPlan. - * @param request GetBackupPlanRequest message or plain object - * @returns Promise - */ - public getBackupPlan(request: google.cloud.backupdr.v1.IGetBackupPlanRequest): Promise; - - /** - * Calls ListBackupPlans. - * @param request ListBackupPlansRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBackupPlansResponse - */ - public listBackupPlans(request: google.cloud.backupdr.v1.IListBackupPlansRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupPlansCallback): void; - - /** - * Calls ListBackupPlans. - * @param request ListBackupPlansRequest message or plain object - * @returns Promise - */ - public listBackupPlans(request: google.cloud.backupdr.v1.IListBackupPlansRequest): Promise; - - /** - * Calls DeleteBackupPlan. - * @param request DeleteBackupPlanRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteBackupPlan(request: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanCallback): void; - - /** - * Calls DeleteBackupPlan. - * @param request DeleteBackupPlanRequest message or plain object - * @returns Promise - */ - public deleteBackupPlan(request: google.cloud.backupdr.v1.IDeleteBackupPlanRequest): Promise; - - /** - * Calls CreateBackupPlanAssociation. - * @param request CreateBackupPlanAssociationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createBackupPlanAssociation(request: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociationCallback): void; - - /** - * Calls CreateBackupPlanAssociation. - * @param request CreateBackupPlanAssociationRequest message or plain object - * @returns Promise - */ - public createBackupPlanAssociation(request: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest): Promise; - - /** - * Calls GetBackupPlanAssociation. - * @param request GetBackupPlanAssociationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BackupPlanAssociation - */ - public getBackupPlanAssociation(request: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociationCallback): void; - - /** - * Calls GetBackupPlanAssociation. - * @param request GetBackupPlanAssociationRequest message or plain object - * @returns Promise - */ - public getBackupPlanAssociation(request: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest): Promise; - - /** - * Calls ListBackupPlanAssociations. - * @param request ListBackupPlanAssociationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBackupPlanAssociationsResponse - */ - public listBackupPlanAssociations(request: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociationsCallback): void; - - /** - * Calls ListBackupPlanAssociations. - * @param request ListBackupPlanAssociationsRequest message or plain object - * @returns Promise - */ - public listBackupPlanAssociations(request: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest): Promise; - - /** - * Calls DeleteBackupPlanAssociation. - * @param request DeleteBackupPlanAssociationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteBackupPlanAssociation(request: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociationCallback): void; - - /** - * Calls DeleteBackupPlanAssociation. - * @param request DeleteBackupPlanAssociationRequest message or plain object - * @returns Promise - */ - public deleteBackupPlanAssociation(request: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest): Promise; - - /** - * Calls TriggerBackup. - * @param request TriggerBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public triggerBackup(request: google.cloud.backupdr.v1.ITriggerBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.TriggerBackupCallback): void; - - /** - * Calls TriggerBackup. - * @param request TriggerBackupRequest message or plain object - * @returns Promise - */ - public triggerBackup(request: google.cloud.backupdr.v1.ITriggerBackupRequest): Promise; - } - - namespace BackupDR { - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listManagementServers}. - * @param error Error, if any - * @param [response] ListManagementServersResponse - */ - type ListManagementServersCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListManagementServersResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getManagementServer}. - * @param error Error, if any - * @param [response] ManagementServer - */ - type GetManagementServerCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ManagementServer) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createManagementServer}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteManagementServer}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupVault}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupVaults}. - * @param error Error, if any - * @param [response] ListBackupVaultsResponse - */ - type ListBackupVaultsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupVaultsResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchUsableBackupVaults}. - * @param error Error, if any - * @param [response] FetchUsableBackupVaultsResponse - */ - type FetchUsableBackupVaultsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupVault}. - * @param error Error, if any - * @param [response] BackupVault - */ - type GetBackupVaultCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupVault) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackupVault}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupVault}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse - */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listDataSources}. - * @param error Error, if any - * @param [response] ListDataSourcesResponse - */ - type ListDataSourcesCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListDataSourcesResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getDataSource}. - * @param error Error, if any - * @param [response] DataSource - */ - type GetDataSourceCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.DataSource) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateDataSource}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateDataSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|removeDataSource}. - * @param error Error, if any - * @param [response] Operation - */ - type RemoveDataSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|setInternalStatus}. - * @param error Error, if any - * @param [response] Operation - */ - type SetInternalStatusCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|initiateBackup}. - * @param error Error, if any - * @param [response] InitiateBackupResponse - */ - type InitiateBackupCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.InitiateBackupResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|abandonBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type AbandonBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|finalizeBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type FinalizeBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchAccessToken}. - * @param error Error, if any - * @param [response] FetchAccessTokenResponse - */ - type FetchAccessTokenCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.FetchAccessTokenResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackups}. - * @param error Error, if any - * @param [response] ListBackupsResponse - */ - type ListBackupsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupsResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackup}. - * @param error Error, if any - * @param [response] Backup - */ - type GetBackupCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.Backup) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|restoreBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type RestoreBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlan}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateBackupPlanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlan}. - * @param error Error, if any - * @param [response] BackupPlan - */ - type GetBackupPlanCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupPlan) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlans}. - * @param error Error, if any - * @param [response] ListBackupPlansResponse - */ - type ListBackupPlansCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupPlansResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlan}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteBackupPlanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlanAssociation}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateBackupPlanAssociationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlanAssociation}. - * @param error Error, if any - * @param [response] BackupPlanAssociation - */ - type GetBackupPlanAssociationCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupPlanAssociation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlanAssociations}. - * @param error Error, if any - * @param [response] ListBackupPlanAssociationsResponse - */ - type ListBackupPlanAssociationsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlanAssociation}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteBackupPlanAssociationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|triggerBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type TriggerBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of a NetworkConfig. */ - interface INetworkConfig { - - /** NetworkConfig network */ - network?: (string|null); - - /** NetworkConfig peeringMode */ - peeringMode?: (google.cloud.backupdr.v1.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1.NetworkConfig.PeeringMode|null); - } - - /** Represents a NetworkConfig. */ - class NetworkConfig implements INetworkConfig { - - /** - * Constructs a new NetworkConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.INetworkConfig); - - /** NetworkConfig network. */ - public network: string; - - /** NetworkConfig peeringMode. */ - public peeringMode: (google.cloud.backupdr.v1.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1.NetworkConfig.PeeringMode); - - /** - * Creates a new NetworkConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.INetworkConfig): google.cloud.backupdr.v1.NetworkConfig; - - /** - * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @param message NetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @param message NetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkConfig; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkConfig; - - /** - * Verifies a NetworkConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkConfig; - - /** - * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. - * @param message NetworkConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NetworkConfig { - - /** PeeringMode enum. */ - enum PeeringMode { - PEERING_MODE_UNSPECIFIED = 0, - PRIVATE_SERVICE_ACCESS = 1 - } - } - - /** Properties of a ManagementURI. */ - interface IManagementURI { - - /** ManagementURI webUi */ - webUi?: (string|null); - - /** ManagementURI api */ - api?: (string|null); - } - - /** Represents a ManagementURI. */ - class ManagementURI implements IManagementURI { - - /** - * Constructs a new ManagementURI. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IManagementURI); - - /** ManagementURI webUi. */ - public webUi: string; - - /** ManagementURI api. */ - public api: string; - - /** - * Creates a new ManagementURI instance using the specified properties. - * @param [properties] Properties to set - * @returns ManagementURI instance - */ - public static create(properties?: google.cloud.backupdr.v1.IManagementURI): google.cloud.backupdr.v1.ManagementURI; - - /** - * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @param message ManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @param message ManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ManagementURI message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ManagementURI; - - /** - * Decodes a ManagementURI message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ManagementURI; - - /** - * Verifies a ManagementURI message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ManagementURI - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ManagementURI; - - /** - * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. - * @param message ManagementURI - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ManagementURI to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ManagementURI - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkforceIdentityBasedManagementURI. */ - interface IWorkforceIdentityBasedManagementURI { - - /** WorkforceIdentityBasedManagementURI firstPartyManagementUri */ - firstPartyManagementUri?: (string|null); - - /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri */ - thirdPartyManagementUri?: (string|null); - } - - /** Represents a WorkforceIdentityBasedManagementURI. */ - class WorkforceIdentityBasedManagementURI implements IWorkforceIdentityBasedManagementURI { - - /** - * Constructs a new WorkforceIdentityBasedManagementURI. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI); - - /** WorkforceIdentityBasedManagementURI firstPartyManagementUri. */ - public firstPartyManagementUri: string; - - /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri. */ - public thirdPartyManagementUri: string; - - /** - * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkforceIdentityBasedManagementURI instance - */ - public static create(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; - - /** - * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. - * @param message WorkforceIdentityBasedManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. - * @param message WorkforceIdentityBasedManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkforceIdentityBasedManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; - - /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkforceIdentityBasedManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; - - /** - * Verifies a WorkforceIdentityBasedManagementURI message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkforceIdentityBasedManagementURI - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; - - /** - * Creates a plain object from a WorkforceIdentityBasedManagementURI message. Also converts values to other types if specified. - * @param message WorkforceIdentityBasedManagementURI - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkforceIdentityBasedManagementURI to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkforceIdentityBasedManagementURI - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkforceIdentityBasedOAuth2ClientID. */ - interface IWorkforceIdentityBasedOAuth2ClientID { - - /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId */ - firstPartyOauth2ClientId?: (string|null); - - /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId */ - thirdPartyOauth2ClientId?: (string|null); - } - - /** Represents a WorkforceIdentityBasedOAuth2ClientID. */ - class WorkforceIdentityBasedOAuth2ClientID implements IWorkforceIdentityBasedOAuth2ClientID { - - /** - * Constructs a new WorkforceIdentityBasedOAuth2ClientID. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID); - - /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId. */ - public firstPartyOauth2ClientId: string; - - /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId. */ - public thirdPartyOauth2ClientId: string; - - /** - * Creates a new WorkforceIdentityBasedOAuth2ClientID instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkforceIdentityBasedOAuth2ClientID instance - */ - public static create(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; - - /** - * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. - * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. - * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkforceIdentityBasedOAuth2ClientID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; - - /** - * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkforceIdentityBasedOAuth2ClientID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; - - /** - * Verifies a WorkforceIdentityBasedOAuth2ClientID message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkforceIdentityBasedOAuth2ClientID message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkforceIdentityBasedOAuth2ClientID - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; - - /** - * Creates a plain object from a WorkforceIdentityBasedOAuth2ClientID message. Also converts values to other types if specified. - * @param message WorkforceIdentityBasedOAuth2ClientID - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkforceIdentityBasedOAuth2ClientID to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkforceIdentityBasedOAuth2ClientID - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ManagementServer. */ - interface IManagementServer { - - /** ManagementServer name */ - name?: (string|null); - - /** ManagementServer description */ - description?: (string|null); - - /** ManagementServer labels */ - labels?: ({ [k: string]: string }|null); - - /** ManagementServer createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** ManagementServer updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** ManagementServer type */ - type?: (google.cloud.backupdr.v1.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceType|null); - - /** ManagementServer managementUri */ - managementUri?: (google.cloud.backupdr.v1.IManagementURI|null); - - /** ManagementServer workforceIdentityBasedManagementUri */ - workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null); - - /** ManagementServer state */ - state?: (google.cloud.backupdr.v1.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceState|null); - - /** ManagementServer networks */ - networks?: (google.cloud.backupdr.v1.INetworkConfig[]|null); - - /** ManagementServer etag */ - etag?: (string|null); - - /** ManagementServer oauth2ClientId */ - oauth2ClientId?: (string|null); - - /** ManagementServer workforceIdentityBasedOauth2ClientId */ - workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null); - - /** ManagementServer baProxyUri */ - baProxyUri?: (string[]|null); - - /** ManagementServer satisfiesPzs */ - satisfiesPzs?: (google.protobuf.IBoolValue|null); - - /** ManagementServer satisfiesPzi */ - satisfiesPzi?: (boolean|null); - } - - /** Represents a ManagementServer. */ - class ManagementServer implements IManagementServer { - - /** - * Constructs a new ManagementServer. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IManagementServer); - - /** ManagementServer name. */ - public name: string; - - /** ManagementServer description. */ - public description: string; - - /** ManagementServer labels. */ - public labels: { [k: string]: string }; - - /** ManagementServer createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** ManagementServer updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** ManagementServer type. */ - public type: (google.cloud.backupdr.v1.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceType); - - /** ManagementServer managementUri. */ - public managementUri?: (google.cloud.backupdr.v1.IManagementURI|null); - - /** ManagementServer workforceIdentityBasedManagementUri. */ - public workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null); - - /** ManagementServer state. */ - public state: (google.cloud.backupdr.v1.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceState); - - /** ManagementServer networks. */ - public networks: google.cloud.backupdr.v1.INetworkConfig[]; - - /** ManagementServer etag. */ - public etag: string; - - /** ManagementServer oauth2ClientId. */ - public oauth2ClientId: string; - - /** ManagementServer workforceIdentityBasedOauth2ClientId. */ - public workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null); - - /** ManagementServer baProxyUri. */ - public baProxyUri: string[]; - - /** ManagementServer satisfiesPzs. */ - public satisfiesPzs?: (google.protobuf.IBoolValue|null); - - /** ManagementServer satisfiesPzi. */ - public satisfiesPzi: boolean; - - /** - * Creates a new ManagementServer instance using the specified properties. - * @param [properties] Properties to set - * @returns ManagementServer instance - */ - public static create(properties?: google.cloud.backupdr.v1.IManagementServer): google.cloud.backupdr.v1.ManagementServer; - - /** - * Encodes the specified ManagementServer message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. - * @param message ManagementServer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ManagementServer message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. - * @param message ManagementServer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ManagementServer message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ManagementServer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ManagementServer; - - /** - * Decodes a ManagementServer message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ManagementServer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ManagementServer; - - /** - * Verifies a ManagementServer message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ManagementServer message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ManagementServer - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ManagementServer; - - /** - * Creates a plain object from a ManagementServer message. Also converts values to other types if specified. - * @param message ManagementServer - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ManagementServer, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ManagementServer to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ManagementServer - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ManagementServer { - - /** InstanceType enum. */ - enum InstanceType { - INSTANCE_TYPE_UNSPECIFIED = 0, - BACKUP_RESTORE = 1 - } - - /** InstanceState enum. */ - enum InstanceState { - INSTANCE_STATE_UNSPECIFIED = 0, - CREATING = 1, - READY = 2, - UPDATING = 3, - DELETING = 4, - REPAIRING = 5, - MAINTENANCE = 6, - ERROR = 7 - } - } - - /** Properties of a ListManagementServersRequest. */ - interface IListManagementServersRequest { - - /** ListManagementServersRequest parent */ - parent?: (string|null); - - /** ListManagementServersRequest pageSize */ - pageSize?: (number|null); - - /** ListManagementServersRequest pageToken */ - pageToken?: (string|null); - - /** ListManagementServersRequest filter */ - filter?: (string|null); - - /** ListManagementServersRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListManagementServersRequest. */ - class ListManagementServersRequest implements IListManagementServersRequest { - - /** - * Constructs a new ListManagementServersRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListManagementServersRequest); - - /** ListManagementServersRequest parent. */ - public parent: string; - - /** ListManagementServersRequest pageSize. */ - public pageSize: number; - - /** ListManagementServersRequest pageToken. */ - public pageToken: string; - - /** ListManagementServersRequest filter. */ - public filter?: (string|null); - - /** ListManagementServersRequest orderBy. */ - public orderBy?: (string|null); - - /** ListManagementServersRequest _filter. */ - public _filter?: "filter"; - - /** ListManagementServersRequest _orderBy. */ - public _orderBy?: "orderBy"; - - /** - * Creates a new ListManagementServersRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListManagementServersRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListManagementServersRequest): google.cloud.backupdr.v1.ListManagementServersRequest; - - /** - * Encodes the specified ListManagementServersRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. - * @param message ListManagementServersRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListManagementServersRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. - * @param message ListManagementServersRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListManagementServersRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListManagementServersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListManagementServersRequest; - - /** - * Decodes a ListManagementServersRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListManagementServersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListManagementServersRequest; - - /** - * Verifies a ListManagementServersRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListManagementServersRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListManagementServersRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListManagementServersRequest; - - /** - * Creates a plain object from a ListManagementServersRequest message. Also converts values to other types if specified. - * @param message ListManagementServersRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListManagementServersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListManagementServersRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListManagementServersRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListManagementServersResponse. */ - interface IListManagementServersResponse { - - /** ListManagementServersResponse managementServers */ - managementServers?: (google.cloud.backupdr.v1.IManagementServer[]|null); - - /** ListManagementServersResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListManagementServersResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListManagementServersResponse. */ - class ListManagementServersResponse implements IListManagementServersResponse { - - /** - * Constructs a new ListManagementServersResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListManagementServersResponse); - - /** ListManagementServersResponse managementServers. */ - public managementServers: google.cloud.backupdr.v1.IManagementServer[]; - - /** ListManagementServersResponse nextPageToken. */ - public nextPageToken: string; - - /** ListManagementServersResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListManagementServersResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListManagementServersResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListManagementServersResponse): google.cloud.backupdr.v1.ListManagementServersResponse; - - /** - * Encodes the specified ListManagementServersResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. - * @param message ListManagementServersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListManagementServersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListManagementServersResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. - * @param message ListManagementServersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListManagementServersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListManagementServersResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListManagementServersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListManagementServersResponse; - - /** - * Decodes a ListManagementServersResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListManagementServersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListManagementServersResponse; - - /** - * Verifies a ListManagementServersResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListManagementServersResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListManagementServersResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListManagementServersResponse; - - /** - * Creates a plain object from a ListManagementServersResponse message. Also converts values to other types if specified. - * @param message ListManagementServersResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListManagementServersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListManagementServersResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListManagementServersResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetManagementServerRequest. */ - interface IGetManagementServerRequest { - - /** GetManagementServerRequest name */ - name?: (string|null); - } - - /** Represents a GetManagementServerRequest. */ - class GetManagementServerRequest implements IGetManagementServerRequest { - - /** - * Constructs a new GetManagementServerRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetManagementServerRequest); - - /** GetManagementServerRequest name. */ - public name: string; - - /** - * Creates a new GetManagementServerRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetManagementServerRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetManagementServerRequest): google.cloud.backupdr.v1.GetManagementServerRequest; - - /** - * Encodes the specified GetManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. - * @param message GetManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. - * @param message GetManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetManagementServerRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetManagementServerRequest; - - /** - * Decodes a GetManagementServerRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetManagementServerRequest; - - /** - * Verifies a GetManagementServerRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetManagementServerRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetManagementServerRequest; - - /** - * Creates a plain object from a GetManagementServerRequest message. Also converts values to other types if specified. - * @param message GetManagementServerRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetManagementServerRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetManagementServerRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateManagementServerRequest. */ - interface ICreateManagementServerRequest { - - /** CreateManagementServerRequest parent */ - parent?: (string|null); - - /** CreateManagementServerRequest managementServerId */ - managementServerId?: (string|null); - - /** CreateManagementServerRequest managementServer */ - managementServer?: (google.cloud.backupdr.v1.IManagementServer|null); - - /** CreateManagementServerRequest requestId */ - requestId?: (string|null); - } - - /** Represents a CreateManagementServerRequest. */ - class CreateManagementServerRequest implements ICreateManagementServerRequest { - - /** - * Constructs a new CreateManagementServerRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ICreateManagementServerRequest); - - /** CreateManagementServerRequest parent. */ - public parent: string; - - /** CreateManagementServerRequest managementServerId. */ - public managementServerId: string; - - /** CreateManagementServerRequest managementServer. */ - public managementServer?: (google.cloud.backupdr.v1.IManagementServer|null); - - /** CreateManagementServerRequest requestId. */ - public requestId: string; - - /** - * Creates a new CreateManagementServerRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateManagementServerRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ICreateManagementServerRequest): google.cloud.backupdr.v1.CreateManagementServerRequest; - - /** - * Encodes the specified CreateManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. - * @param message CreateManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. - * @param message CreateManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateManagementServerRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateManagementServerRequest; - - /** - * Decodes a CreateManagementServerRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateManagementServerRequest; - - /** - * Verifies a CreateManagementServerRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateManagementServerRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateManagementServerRequest; - - /** - * Creates a plain object from a CreateManagementServerRequest message. Also converts values to other types if specified. - * @param message CreateManagementServerRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.CreateManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateManagementServerRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateManagementServerRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteManagementServerRequest. */ - interface IDeleteManagementServerRequest { - - /** DeleteManagementServerRequest name */ - name?: (string|null); - - /** DeleteManagementServerRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteManagementServerRequest. */ - class DeleteManagementServerRequest implements IDeleteManagementServerRequest { - - /** - * Constructs a new DeleteManagementServerRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDeleteManagementServerRequest); - - /** DeleteManagementServerRequest name. */ - public name: string; - - /** DeleteManagementServerRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteManagementServerRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteManagementServerRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDeleteManagementServerRequest): google.cloud.backupdr.v1.DeleteManagementServerRequest; - - /** - * Encodes the specified DeleteManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. - * @param message DeleteManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. - * @param message DeleteManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteManagementServerRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteManagementServerRequest; - - /** - * Decodes a DeleteManagementServerRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteManagementServerRequest; - - /** - * Verifies a DeleteManagementServerRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteManagementServerRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteManagementServerRequest; - - /** - * Creates a plain object from a DeleteManagementServerRequest message. Also converts values to other types if specified. - * @param message DeleteManagementServerRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DeleteManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteManagementServerRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteManagementServerRequest - * @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 additionalInfo */ - additionalInfo?: ({ [k: string]: string }|null); - } - - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { - - /** - * Constructs a new OperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.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 additionalInfo. */ - public additionalInfo: { [k: string]: string }; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationMetadata instance - */ - public static create(properties?: google.cloud.backupdr.v1.IOperationMetadata): google.cloud.backupdr.v1.OperationMetadata; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.backupdr.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.backupdr.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.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.backupdr.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.backupdr.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.backupdr.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.backupdr.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.backupdr.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 BackupPlan. */ - interface IBackupPlan { - - /** BackupPlan name */ - name?: (string|null); - - /** BackupPlan description */ - description?: (string|null); - - /** BackupPlan labels */ - labels?: ({ [k: string]: string }|null); - - /** BackupPlan createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlan updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlan backupRules */ - backupRules?: (google.cloud.backupdr.v1.IBackupRule[]|null); - - /** BackupPlan state */ - state?: (google.cloud.backupdr.v1.BackupPlan.State|keyof typeof google.cloud.backupdr.v1.BackupPlan.State|null); - - /** BackupPlan resourceType */ - resourceType?: (string|null); - - /** BackupPlan etag */ - etag?: (string|null); - - /** BackupPlan backupVault */ - backupVault?: (string|null); - - /** BackupPlan backupVaultServiceAccount */ - backupVaultServiceAccount?: (string|null); - } - - /** Represents a BackupPlan. */ - class BackupPlan implements IBackupPlan { - - /** - * Constructs a new BackupPlan. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupPlan); - - /** BackupPlan name. */ - public name: string; - - /** BackupPlan description. */ - public description: string; - - /** BackupPlan labels. */ - public labels: { [k: string]: string }; - - /** BackupPlan createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlan updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlan backupRules. */ - public backupRules: google.cloud.backupdr.v1.IBackupRule[]; - - /** BackupPlan state. */ - public state: (google.cloud.backupdr.v1.BackupPlan.State|keyof typeof google.cloud.backupdr.v1.BackupPlan.State); - - /** BackupPlan resourceType. */ - public resourceType: string; - - /** BackupPlan etag. */ - public etag: string; - - /** BackupPlan backupVault. */ - public backupVault: string; - - /** BackupPlan backupVaultServiceAccount. */ - public backupVaultServiceAccount: string; - - /** - * Creates a new BackupPlan instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupPlan instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupPlan): google.cloud.backupdr.v1.BackupPlan; - - /** - * Encodes the specified BackupPlan message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. - * @param message BackupPlan message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupPlan, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupPlan message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. - * @param message BackupPlan message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupPlan, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupPlan message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupPlan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupPlan; - - /** - * Decodes a BackupPlan message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupPlan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupPlan; - - /** - * Verifies a BackupPlan message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupPlan message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupPlan - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupPlan; - - /** - * Creates a plain object from a BackupPlan message. Also converts values to other types if specified. - * @param message BackupPlan - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupPlan, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupPlan to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupPlan - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BackupPlan { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - DELETING = 3, - INACTIVE = 4 - } - } - - /** Properties of a BackupRule. */ - interface IBackupRule { - - /** BackupRule ruleId */ - ruleId?: (string|null); - - /** BackupRule backupRetentionDays */ - backupRetentionDays?: (number|null); - - /** BackupRule standardSchedule */ - standardSchedule?: (google.cloud.backupdr.v1.IStandardSchedule|null); - } - - /** Represents a BackupRule. */ - class BackupRule implements IBackupRule { - - /** - * Constructs a new BackupRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupRule); - - /** BackupRule ruleId. */ - public ruleId: string; - - /** BackupRule backupRetentionDays. */ - public backupRetentionDays: number; - - /** BackupRule standardSchedule. */ - public standardSchedule?: (google.cloud.backupdr.v1.IStandardSchedule|null); - - /** BackupRule backupScheduleOneof. */ - public backupScheduleOneof?: "standardSchedule"; - - /** - * Creates a new BackupRule instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupRule instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupRule): google.cloud.backupdr.v1.BackupRule; - - /** - * Encodes the specified BackupRule message. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. - * @param message BackupRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupRule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. - * @param message BackupRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupRule; - - /** - * Decodes a BackupRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupRule; - - /** - * Verifies a BackupRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupRule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupRule; - - /** - * Creates a plain object from a BackupRule message. Also converts values to other types if specified. - * @param message BackupRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StandardSchedule. */ - interface IStandardSchedule { - - /** StandardSchedule recurrenceType */ - recurrenceType?: (google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|keyof typeof google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|null); - - /** StandardSchedule hourlyFrequency */ - hourlyFrequency?: (number|null); - - /** StandardSchedule daysOfWeek */ - daysOfWeek?: (google.type.DayOfWeek[]|null); - - /** StandardSchedule daysOfMonth */ - daysOfMonth?: (number[]|null); - - /** StandardSchedule weekDayOfMonth */ - weekDayOfMonth?: (google.cloud.backupdr.v1.IWeekDayOfMonth|null); - - /** StandardSchedule months */ - months?: (google.type.Month[]|null); - - /** StandardSchedule backupWindow */ - backupWindow?: (google.cloud.backupdr.v1.IBackupWindow|null); - - /** StandardSchedule timeZone */ - timeZone?: (string|null); - } - - /** Represents a StandardSchedule. */ - class StandardSchedule implements IStandardSchedule { - - /** - * Constructs a new StandardSchedule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IStandardSchedule); - - /** StandardSchedule recurrenceType. */ - public recurrenceType: (google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|keyof typeof google.cloud.backupdr.v1.StandardSchedule.RecurrenceType); - - /** StandardSchedule hourlyFrequency. */ - public hourlyFrequency: number; - - /** StandardSchedule daysOfWeek. */ - public daysOfWeek: google.type.DayOfWeek[]; - - /** StandardSchedule daysOfMonth. */ - public daysOfMonth: number[]; - - /** StandardSchedule weekDayOfMonth. */ - public weekDayOfMonth?: (google.cloud.backupdr.v1.IWeekDayOfMonth|null); - - /** StandardSchedule months. */ - public months: google.type.Month[]; - - /** StandardSchedule backupWindow. */ - public backupWindow?: (google.cloud.backupdr.v1.IBackupWindow|null); - - /** StandardSchedule timeZone. */ - public timeZone: string; - - /** - * Creates a new StandardSchedule instance using the specified properties. - * @param [properties] Properties to set - * @returns StandardSchedule instance - */ - public static create(properties?: google.cloud.backupdr.v1.IStandardSchedule): google.cloud.backupdr.v1.StandardSchedule; - - /** - * Encodes the specified StandardSchedule message. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. - * @param message StandardSchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IStandardSchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StandardSchedule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. - * @param message StandardSchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IStandardSchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StandardSchedule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StandardSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.StandardSchedule; - - /** - * Decodes a StandardSchedule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StandardSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.StandardSchedule; - - /** - * Verifies a StandardSchedule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StandardSchedule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StandardSchedule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.StandardSchedule; - - /** - * Creates a plain object from a StandardSchedule message. Also converts values to other types if specified. - * @param message StandardSchedule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.StandardSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StandardSchedule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StandardSchedule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace StandardSchedule { - - /** RecurrenceType enum. */ - enum RecurrenceType { - RECURRENCE_TYPE_UNSPECIFIED = 0, - HOURLY = 1, - DAILY = 2, - WEEKLY = 3, - MONTHLY = 4, - YEARLY = 5 - } - } - - /** Properties of a BackupWindow. */ - interface IBackupWindow { - - /** BackupWindow startHourOfDay */ - startHourOfDay?: (number|null); - - /** BackupWindow endHourOfDay */ - endHourOfDay?: (number|null); - } - - /** Represents a BackupWindow. */ - class BackupWindow implements IBackupWindow { - - /** - * Constructs a new BackupWindow. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupWindow); - - /** BackupWindow startHourOfDay. */ - public startHourOfDay: number; - - /** BackupWindow endHourOfDay. */ - public endHourOfDay: number; - - /** - * Creates a new BackupWindow instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupWindow instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupWindow): google.cloud.backupdr.v1.BackupWindow; - - /** - * Encodes the specified BackupWindow message. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. - * @param message BackupWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupWindow message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. - * @param message BackupWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupWindow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupWindow; - - /** - * Decodes a BackupWindow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupWindow; - - /** - * Verifies a BackupWindow message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupWindow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupWindow - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupWindow; - - /** - * Creates a plain object from a BackupWindow message. Also converts values to other types if specified. - * @param message BackupWindow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupWindow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupWindow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WeekDayOfMonth. */ - interface IWeekDayOfMonth { - - /** WeekDayOfMonth weekOfMonth */ - weekOfMonth?: (google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|keyof typeof google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|null); - - /** WeekDayOfMonth dayOfWeek */ - dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); - } - - /** Represents a WeekDayOfMonth. */ - class WeekDayOfMonth implements IWeekDayOfMonth { - - /** - * Constructs a new WeekDayOfMonth. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IWeekDayOfMonth); - - /** WeekDayOfMonth weekOfMonth. */ - public weekOfMonth: (google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|keyof typeof google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth); - - /** WeekDayOfMonth dayOfWeek. */ - public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); - - /** - * Creates a new WeekDayOfMonth instance using the specified properties. - * @param [properties] Properties to set - * @returns WeekDayOfMonth instance - */ - public static create(properties?: google.cloud.backupdr.v1.IWeekDayOfMonth): google.cloud.backupdr.v1.WeekDayOfMonth; - - /** - * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. - * @param message WeekDayOfMonth message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. - * @param message WeekDayOfMonth message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WeekDayOfMonth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WeekDayOfMonth; - - /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WeekDayOfMonth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WeekDayOfMonth; - - /** - * Verifies a WeekDayOfMonth message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WeekDayOfMonth - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WeekDayOfMonth; - - /** - * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. - * @param message WeekDayOfMonth - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.WeekDayOfMonth, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WeekDayOfMonth to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WeekDayOfMonth - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WeekDayOfMonth { - - /** WeekOfMonth enum. */ - enum WeekOfMonth { - WEEK_OF_MONTH_UNSPECIFIED = 0, - FIRST = 1, - SECOND = 2, - THIRD = 3, - FOURTH = 4, - LAST = 5 - } - } - - /** Properties of a CreateBackupPlanRequest. */ - interface ICreateBackupPlanRequest { - - /** CreateBackupPlanRequest parent */ - parent?: (string|null); - - /** CreateBackupPlanRequest backupPlanId */ - backupPlanId?: (string|null); - - /** CreateBackupPlanRequest backupPlan */ - backupPlan?: (google.cloud.backupdr.v1.IBackupPlan|null); - - /** CreateBackupPlanRequest requestId */ - requestId?: (string|null); - } - - /** Represents a CreateBackupPlanRequest. */ - class CreateBackupPlanRequest implements ICreateBackupPlanRequest { - - /** - * Constructs a new CreateBackupPlanRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ICreateBackupPlanRequest); - - /** CreateBackupPlanRequest parent. */ - public parent: string; - - /** CreateBackupPlanRequest backupPlanId. */ - public backupPlanId: string; - - /** CreateBackupPlanRequest backupPlan. */ - public backupPlan?: (google.cloud.backupdr.v1.IBackupPlan|null); - - /** CreateBackupPlanRequest requestId. */ - public requestId: string; - - /** - * Creates a new CreateBackupPlanRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateBackupPlanRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ICreateBackupPlanRequest): google.cloud.backupdr.v1.CreateBackupPlanRequest; - - /** - * Encodes the specified CreateBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. - * @param message CreateBackupPlanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ICreateBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. - * @param message CreateBackupPlanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateBackupPlanRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupPlanRequest; - - /** - * Decodes a CreateBackupPlanRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupPlanRequest; - - /** - * Verifies a CreateBackupPlanRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateBackupPlanRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateBackupPlanRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupPlanRequest; - - /** - * Creates a plain object from a CreateBackupPlanRequest message. Also converts values to other types if specified. - * @param message CreateBackupPlanRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.CreateBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateBackupPlanRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateBackupPlanRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupPlansRequest. */ - interface IListBackupPlansRequest { - - /** ListBackupPlansRequest parent */ - parent?: (string|null); - - /** ListBackupPlansRequest pageSize */ - pageSize?: (number|null); - - /** ListBackupPlansRequest pageToken */ - pageToken?: (string|null); - - /** ListBackupPlansRequest filter */ - filter?: (string|null); - - /** ListBackupPlansRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListBackupPlansRequest. */ - class ListBackupPlansRequest implements IListBackupPlansRequest { - - /** - * Constructs a new ListBackupPlansRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupPlansRequest); - - /** ListBackupPlansRequest parent. */ - public parent: string; - - /** ListBackupPlansRequest pageSize. */ - public pageSize: number; - - /** ListBackupPlansRequest pageToken. */ - public pageToken: string; - - /** ListBackupPlansRequest filter. */ - public filter: string; - - /** ListBackupPlansRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListBackupPlansRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupPlansRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupPlansRequest): google.cloud.backupdr.v1.ListBackupPlansRequest; - - /** - * Encodes the specified ListBackupPlansRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. - * @param message ListBackupPlansRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupPlansRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupPlansRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. - * @param message ListBackupPlansRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlansRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupPlansRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupPlansRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlansRequest; - - /** - * Decodes a ListBackupPlansRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupPlansRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlansRequest; - - /** - * Verifies a ListBackupPlansRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupPlansRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupPlansRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlansRequest; - - /** - * Creates a plain object from a ListBackupPlansRequest message. Also converts values to other types if specified. - * @param message ListBackupPlansRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupPlansRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupPlansRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupPlansRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupPlansResponse. */ - interface IListBackupPlansResponse { - - /** ListBackupPlansResponse backupPlans */ - backupPlans?: (google.cloud.backupdr.v1.IBackupPlan[]|null); - - /** ListBackupPlansResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListBackupPlansResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListBackupPlansResponse. */ - class ListBackupPlansResponse implements IListBackupPlansResponse { - - /** - * Constructs a new ListBackupPlansResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupPlansResponse); - - /** ListBackupPlansResponse backupPlans. */ - public backupPlans: google.cloud.backupdr.v1.IBackupPlan[]; - - /** ListBackupPlansResponse nextPageToken. */ - public nextPageToken: string; - - /** ListBackupPlansResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListBackupPlansResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupPlansResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupPlansResponse): google.cloud.backupdr.v1.ListBackupPlansResponse; - - /** - * Encodes the specified ListBackupPlansResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. - * @param message ListBackupPlansResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupPlansResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupPlansResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. - * @param message ListBackupPlansResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlansResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupPlansResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupPlansResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlansResponse; - - /** - * Decodes a ListBackupPlansResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupPlansResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlansResponse; - - /** - * Verifies a ListBackupPlansResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupPlansResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupPlansResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlansResponse; - - /** - * Creates a plain object from a ListBackupPlansResponse message. Also converts values to other types if specified. - * @param message ListBackupPlansResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupPlansResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupPlansResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupPlansResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetBackupPlanRequest. */ - interface IGetBackupPlanRequest { - - /** GetBackupPlanRequest name */ - name?: (string|null); - } - - /** Represents a GetBackupPlanRequest. */ - class GetBackupPlanRequest implements IGetBackupPlanRequest { - - /** - * Constructs a new GetBackupPlanRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetBackupPlanRequest); - - /** GetBackupPlanRequest name. */ - public name: string; - - /** - * Creates a new GetBackupPlanRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupPlanRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetBackupPlanRequest): google.cloud.backupdr.v1.GetBackupPlanRequest; - - /** - * Encodes the specified GetBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. - * @param message GetBackupPlanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. - * @param message GetBackupPlanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetBackupPlanRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupPlanRequest; - - /** - * Decodes a GetBackupPlanRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupPlanRequest; - - /** - * Verifies a GetBackupPlanRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetBackupPlanRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetBackupPlanRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupPlanRequest; - - /** - * Creates a plain object from a GetBackupPlanRequest message. Also converts values to other types if specified. - * @param message GetBackupPlanRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetBackupPlanRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetBackupPlanRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteBackupPlanRequest. */ - interface IDeleteBackupPlanRequest { - - /** DeleteBackupPlanRequest name */ - name?: (string|null); - - /** DeleteBackupPlanRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteBackupPlanRequest. */ - class DeleteBackupPlanRequest implements IDeleteBackupPlanRequest { - - /** - * Constructs a new DeleteBackupPlanRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanRequest); - - /** DeleteBackupPlanRequest name. */ - public name: string; - - /** DeleteBackupPlanRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteBackupPlanRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteBackupPlanRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanRequest): google.cloud.backupdr.v1.DeleteBackupPlanRequest; - - /** - * Encodes the specified DeleteBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. - * @param message DeleteBackupPlanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. - * @param message DeleteBackupPlanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupPlanRequest; - - /** - * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupPlanRequest; - - /** - * Verifies a DeleteBackupPlanRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteBackupPlanRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteBackupPlanRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupPlanRequest; - - /** - * Creates a plain object from a DeleteBackupPlanRequest message. Also converts values to other types if specified. - * @param message DeleteBackupPlanRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DeleteBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteBackupPlanRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteBackupPlanRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackupPlanAssociation. */ - interface IBackupPlanAssociation { - - /** BackupPlanAssociation name */ - name?: (string|null); - - /** BackupPlanAssociation resourceType */ - resourceType?: (string|null); - - /** BackupPlanAssociation resource */ - resource?: (string|null); - - /** BackupPlanAssociation backupPlan */ - backupPlan?: (string|null); - - /** BackupPlanAssociation createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlanAssociation updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlanAssociation state */ - state?: (google.cloud.backupdr.v1.BackupPlanAssociation.State|keyof typeof google.cloud.backupdr.v1.BackupPlanAssociation.State|null); - - /** BackupPlanAssociation rulesConfigInfo */ - rulesConfigInfo?: (google.cloud.backupdr.v1.IRuleConfigInfo[]|null); - - /** BackupPlanAssociation dataSource */ - dataSource?: (string|null); - } - - /** Represents a BackupPlanAssociation. */ - class BackupPlanAssociation implements IBackupPlanAssociation { - - /** - * Constructs a new BackupPlanAssociation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupPlanAssociation); - - /** BackupPlanAssociation name. */ - public name: string; - - /** BackupPlanAssociation resourceType. */ - public resourceType: string; - - /** BackupPlanAssociation resource. */ - public resource: string; - - /** BackupPlanAssociation backupPlan. */ - public backupPlan: string; - - /** BackupPlanAssociation createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlanAssociation updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlanAssociation state. */ - public state: (google.cloud.backupdr.v1.BackupPlanAssociation.State|keyof typeof google.cloud.backupdr.v1.BackupPlanAssociation.State); - - /** BackupPlanAssociation rulesConfigInfo. */ - public rulesConfigInfo: google.cloud.backupdr.v1.IRuleConfigInfo[]; - - /** BackupPlanAssociation dataSource. */ - public dataSource: string; - - /** - * Creates a new BackupPlanAssociation instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupPlanAssociation instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupPlanAssociation): google.cloud.backupdr.v1.BackupPlanAssociation; - - /** - * Encodes the specified BackupPlanAssociation message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. - * @param message BackupPlanAssociation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupPlanAssociation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupPlanAssociation message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. - * @param message BackupPlanAssociation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupPlanAssociation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupPlanAssociation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupPlanAssociation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupPlanAssociation; - - /** - * Decodes a BackupPlanAssociation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupPlanAssociation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupPlanAssociation; - - /** - * Verifies a BackupPlanAssociation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupPlanAssociation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupPlanAssociation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupPlanAssociation; - - /** - * Creates a plain object from a BackupPlanAssociation message. Also converts values to other types if specified. - * @param message BackupPlanAssociation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupPlanAssociation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupPlanAssociation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupPlanAssociation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BackupPlanAssociation { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - DELETING = 3, - INACTIVE = 4 - } - } - - /** Properties of a RuleConfigInfo. */ - interface IRuleConfigInfo { - - /** RuleConfigInfo ruleId */ - ruleId?: (string|null); - - /** RuleConfigInfo lastBackupState */ - lastBackupState?: (google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|null); - - /** RuleConfigInfo lastBackupError */ - lastBackupError?: (google.rpc.IStatus|null); - - /** RuleConfigInfo lastSuccessfulBackupConsistencyTime */ - lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a RuleConfigInfo. */ - class RuleConfigInfo implements IRuleConfigInfo { - - /** - * Constructs a new RuleConfigInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IRuleConfigInfo); - - /** RuleConfigInfo ruleId. */ - public ruleId: string; - - /** RuleConfigInfo lastBackupState. */ - public lastBackupState: (google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState); - - /** RuleConfigInfo lastBackupError. */ - public lastBackupError?: (google.rpc.IStatus|null); - - /** RuleConfigInfo lastSuccessfulBackupConsistencyTime. */ - public lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new RuleConfigInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RuleConfigInfo instance - */ - public static create(properties?: google.cloud.backupdr.v1.IRuleConfigInfo): google.cloud.backupdr.v1.RuleConfigInfo; - - /** - * Encodes the specified RuleConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. - * @param message RuleConfigInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IRuleConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RuleConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. - * @param message RuleConfigInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IRuleConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RuleConfigInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RuleConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RuleConfigInfo; - - /** - * Decodes a RuleConfigInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RuleConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RuleConfigInfo; - - /** - * Verifies a RuleConfigInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RuleConfigInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RuleConfigInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RuleConfigInfo; - - /** - * Creates a plain object from a RuleConfigInfo message. Also converts values to other types if specified. - * @param message RuleConfigInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.RuleConfigInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RuleConfigInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RuleConfigInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace RuleConfigInfo { - - /** LastBackupState enum. */ - enum LastBackupState { - LAST_BACKUP_STATE_UNSPECIFIED = 0, - FIRST_BACKUP_PENDING = 1, - PERMISSION_DENIED = 2, - SUCCEEDED = 3, - FAILED = 4 - } - } - - /** Properties of a CreateBackupPlanAssociationRequest. */ - interface ICreateBackupPlanAssociationRequest { - - /** CreateBackupPlanAssociationRequest parent */ - parent?: (string|null); - - /** CreateBackupPlanAssociationRequest backupPlanAssociationId */ - backupPlanAssociationId?: (string|null); - - /** CreateBackupPlanAssociationRequest backupPlanAssociation */ - backupPlanAssociation?: (google.cloud.backupdr.v1.IBackupPlanAssociation|null); - - /** CreateBackupPlanAssociationRequest requestId */ - requestId?: (string|null); - } - - /** Represents a CreateBackupPlanAssociationRequest. */ - class CreateBackupPlanAssociationRequest implements ICreateBackupPlanAssociationRequest { - - /** - * Constructs a new CreateBackupPlanAssociationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest); - - /** CreateBackupPlanAssociationRequest parent. */ - public parent: string; - - /** CreateBackupPlanAssociationRequest backupPlanAssociationId. */ - public backupPlanAssociationId: string; - - /** CreateBackupPlanAssociationRequest backupPlanAssociation. */ - public backupPlanAssociation?: (google.cloud.backupdr.v1.IBackupPlanAssociation|null); - - /** CreateBackupPlanAssociationRequest requestId. */ - public requestId: string; - - /** - * Creates a new CreateBackupPlanAssociationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateBackupPlanAssociationRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; - - /** - * Encodes the specified CreateBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. - * @param message CreateBackupPlanAssociationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. - * @param message CreateBackupPlanAssociationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; - - /** - * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; - - /** - * Verifies a CreateBackupPlanAssociationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateBackupPlanAssociationRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; - - /** - * Creates a plain object from a CreateBackupPlanAssociationRequest message. Also converts values to other types if specified. - * @param message CreateBackupPlanAssociationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateBackupPlanAssociationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateBackupPlanAssociationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupPlanAssociationsRequest. */ - interface IListBackupPlanAssociationsRequest { - - /** ListBackupPlanAssociationsRequest parent */ - parent?: (string|null); - - /** ListBackupPlanAssociationsRequest pageSize */ - pageSize?: (number|null); - - /** ListBackupPlanAssociationsRequest pageToken */ - pageToken?: (string|null); - - /** ListBackupPlanAssociationsRequest filter */ - filter?: (string|null); - } - - /** Represents a ListBackupPlanAssociationsRequest. */ - class ListBackupPlanAssociationsRequest implements IListBackupPlanAssociationsRequest { - - /** - * Constructs a new ListBackupPlanAssociationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest); - - /** ListBackupPlanAssociationsRequest parent. */ - public parent: string; - - /** ListBackupPlanAssociationsRequest pageSize. */ - public pageSize: number; - - /** ListBackupPlanAssociationsRequest pageToken. */ - public pageToken: string; - - /** ListBackupPlanAssociationsRequest filter. */ - public filter: string; - - /** - * Creates a new ListBackupPlanAssociationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupPlanAssociationsRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; - - /** - * Encodes the specified ListBackupPlanAssociationsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. - * @param message ListBackupPlanAssociationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupPlanAssociationsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. - * @param message ListBackupPlanAssociationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupPlanAssociationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; - - /** - * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupPlanAssociationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; - - /** - * Verifies a ListBackupPlanAssociationsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupPlanAssociationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupPlanAssociationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; - - /** - * Creates a plain object from a ListBackupPlanAssociationsRequest message. Also converts values to other types if specified. - * @param message ListBackupPlanAssociationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupPlanAssociationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupPlanAssociationsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupPlanAssociationsResponse. */ - interface IListBackupPlanAssociationsResponse { - - /** ListBackupPlanAssociationsResponse backupPlanAssociations */ - backupPlanAssociations?: (google.cloud.backupdr.v1.IBackupPlanAssociation[]|null); - - /** ListBackupPlanAssociationsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListBackupPlanAssociationsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListBackupPlanAssociationsResponse. */ - class ListBackupPlanAssociationsResponse implements IListBackupPlanAssociationsResponse { - - /** - * Constructs a new ListBackupPlanAssociationsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse); - - /** ListBackupPlanAssociationsResponse backupPlanAssociations. */ - public backupPlanAssociations: google.cloud.backupdr.v1.IBackupPlanAssociation[]; - - /** ListBackupPlanAssociationsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListBackupPlanAssociationsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListBackupPlanAssociationsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupPlanAssociationsResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; - - /** - * Encodes the specified ListBackupPlanAssociationsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. - * @param message ListBackupPlanAssociationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupPlanAssociationsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. - * @param message ListBackupPlanAssociationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupPlanAssociationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; - - /** - * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupPlanAssociationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; - - /** - * Verifies a ListBackupPlanAssociationsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupPlanAssociationsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupPlanAssociationsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; - - /** - * Creates a plain object from a ListBackupPlanAssociationsResponse message. Also converts values to other types if specified. - * @param message ListBackupPlanAssociationsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupPlanAssociationsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupPlanAssociationsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetBackupPlanAssociationRequest. */ - interface IGetBackupPlanAssociationRequest { - - /** GetBackupPlanAssociationRequest name */ - name?: (string|null); - } - - /** Represents a GetBackupPlanAssociationRequest. */ - class GetBackupPlanAssociationRequest implements IGetBackupPlanAssociationRequest { - - /** - * Constructs a new GetBackupPlanAssociationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest); - - /** GetBackupPlanAssociationRequest name. */ - public name: string; - - /** - * Creates a new GetBackupPlanAssociationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupPlanAssociationRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; - - /** - * Encodes the specified GetBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. - * @param message GetBackupPlanAssociationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. - * @param message GetBackupPlanAssociationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; - - /** - * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; - - /** - * Verifies a GetBackupPlanAssociationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetBackupPlanAssociationRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; - - /** - * Creates a plain object from a GetBackupPlanAssociationRequest message. Also converts values to other types if specified. - * @param message GetBackupPlanAssociationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetBackupPlanAssociationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetBackupPlanAssociationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteBackupPlanAssociationRequest. */ - interface IDeleteBackupPlanAssociationRequest { - - /** DeleteBackupPlanAssociationRequest name */ - name?: (string|null); - - /** DeleteBackupPlanAssociationRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteBackupPlanAssociationRequest. */ - class DeleteBackupPlanAssociationRequest implements IDeleteBackupPlanAssociationRequest { - - /** - * Constructs a new DeleteBackupPlanAssociationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest); - - /** DeleteBackupPlanAssociationRequest name. */ - public name: string; - - /** DeleteBackupPlanAssociationRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteBackupPlanAssociationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteBackupPlanAssociationRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; - - /** - * Encodes the specified DeleteBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. - * @param message DeleteBackupPlanAssociationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. - * @param message DeleteBackupPlanAssociationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; - - /** - * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; - - /** - * Verifies a DeleteBackupPlanAssociationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteBackupPlanAssociationRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; - - /** - * Creates a plain object from a DeleteBackupPlanAssociationRequest message. Also converts values to other types if specified. - * @param message DeleteBackupPlanAssociationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteBackupPlanAssociationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteBackupPlanAssociationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TriggerBackupRequest. */ - interface ITriggerBackupRequest { - - /** TriggerBackupRequest name */ - name?: (string|null); - - /** TriggerBackupRequest ruleId */ - ruleId?: (string|null); - - /** TriggerBackupRequest requestId */ - requestId?: (string|null); - } - - /** Represents a TriggerBackupRequest. */ - class TriggerBackupRequest implements ITriggerBackupRequest { - - /** - * Constructs a new TriggerBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ITriggerBackupRequest); - - /** TriggerBackupRequest name. */ - public name: string; - - /** TriggerBackupRequest ruleId. */ - public ruleId: string; - - /** TriggerBackupRequest requestId. */ - public requestId: string; - - /** - * Creates a new TriggerBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns TriggerBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ITriggerBackupRequest): google.cloud.backupdr.v1.TriggerBackupRequest; - - /** - * Encodes the specified TriggerBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. - * @param message TriggerBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ITriggerBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TriggerBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. - * @param message TriggerBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ITriggerBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TriggerBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TriggerBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.TriggerBackupRequest; - - /** - * Decodes a TriggerBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TriggerBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.TriggerBackupRequest; - - /** - * Verifies a TriggerBackupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TriggerBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TriggerBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.TriggerBackupRequest; - - /** - * Creates a plain object from a TriggerBackupRequest message. Also converts values to other types if specified. - * @param message TriggerBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.TriggerBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TriggerBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TriggerBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackupVault. */ - interface IBackupVault { - - /** BackupVault name */ - name?: (string|null); - - /** BackupVault description */ - description?: (string|null); - - /** BackupVault labels */ - labels?: ({ [k: string]: string }|null); - - /** BackupVault createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault backupMinimumEnforcedRetentionDuration */ - backupMinimumEnforcedRetentionDuration?: (google.protobuf.IDuration|null); - - /** BackupVault deletable */ - deletable?: (boolean|null); - - /** BackupVault etag */ - etag?: (string|null); - - /** BackupVault state */ - state?: (google.cloud.backupdr.v1.BackupVault.State|keyof typeof google.cloud.backupdr.v1.BackupVault.State|null); - - /** BackupVault effectiveTime */ - effectiveTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault backupCount */ - backupCount?: (number|Long|string|null); - - /** BackupVault serviceAccount */ - serviceAccount?: (string|null); - - /** BackupVault totalStoredBytes */ - totalStoredBytes?: (number|Long|string|null); - - /** BackupVault uid */ - uid?: (string|null); - - /** BackupVault annotations */ - annotations?: ({ [k: string]: string }|null); - - /** BackupVault accessRestriction */ - accessRestriction?: (google.cloud.backupdr.v1.BackupVault.AccessRestriction|keyof typeof google.cloud.backupdr.v1.BackupVault.AccessRestriction|null); - } - - /** Represents a BackupVault. */ - class BackupVault implements IBackupVault { - - /** - * Constructs a new BackupVault. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupVault); - - /** BackupVault name. */ - public name: string; - - /** BackupVault description. */ - public description?: (string|null); - - /** BackupVault labels. */ - public labels: { [k: string]: string }; - - /** BackupVault createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault backupMinimumEnforcedRetentionDuration. */ - public backupMinimumEnforcedRetentionDuration?: (google.protobuf.IDuration|null); - - /** BackupVault deletable. */ - public deletable?: (boolean|null); - - /** BackupVault etag. */ - public etag?: (string|null); - - /** BackupVault state. */ - public state: (google.cloud.backupdr.v1.BackupVault.State|keyof typeof google.cloud.backupdr.v1.BackupVault.State); - - /** BackupVault effectiveTime. */ - public effectiveTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault backupCount. */ - public backupCount: (number|Long|string); - - /** BackupVault serviceAccount. */ - public serviceAccount: string; - - /** BackupVault totalStoredBytes. */ - public totalStoredBytes: (number|Long|string); - - /** BackupVault uid. */ - public uid: string; - - /** BackupVault annotations. */ - public annotations: { [k: string]: string }; - - /** BackupVault accessRestriction. */ - public accessRestriction: (google.cloud.backupdr.v1.BackupVault.AccessRestriction|keyof typeof google.cloud.backupdr.v1.BackupVault.AccessRestriction); - - /** BackupVault _description. */ - public _description?: "description"; - - /** BackupVault _createTime. */ - public _createTime?: "createTime"; - - /** BackupVault _updateTime. */ - public _updateTime?: "updateTime"; - - /** BackupVault _backupMinimumEnforcedRetentionDuration. */ - public _backupMinimumEnforcedRetentionDuration?: "backupMinimumEnforcedRetentionDuration"; - - /** BackupVault _deletable. */ - public _deletable?: "deletable"; - - /** BackupVault _etag. */ - public _etag?: "etag"; - - /** BackupVault _effectiveTime. */ - public _effectiveTime?: "effectiveTime"; - - /** - * Creates a new BackupVault instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupVault instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupVault): google.cloud.backupdr.v1.BackupVault; - - /** - * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. - * @param message BackupVault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupVault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. - * @param message BackupVault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupVault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupVault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupVault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupVault; - - /** - * Decodes a BackupVault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupVault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupVault; - - /** - * Verifies a BackupVault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupVault - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupVault; - - /** - * Creates a plain object from a BackupVault message. Also converts values to other types if specified. - * @param message BackupVault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupVault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupVault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupVault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BackupVault { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - DELETING = 3, - ERROR = 4 - } - - /** AccessRestriction enum. */ - enum AccessRestriction { - ACCESS_RESTRICTION_UNSPECIFIED = 0, - WITHIN_PROJECT = 1, - WITHIN_ORGANIZATION = 2, - UNRESTRICTED = 3 - } - } - - /** Properties of a DataSource. */ - interface IDataSource { - - /** DataSource name */ - name?: (string|null); - - /** DataSource state */ - state?: (google.cloud.backupdr.v1.DataSource.State|keyof typeof google.cloud.backupdr.v1.DataSource.State|null); - - /** DataSource labels */ - labels?: ({ [k: string]: string }|null); - - /** DataSource createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** DataSource updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** DataSource backupCount */ - backupCount?: (number|Long|string|null); - - /** DataSource etag */ - etag?: (string|null); - - /** DataSource totalStoredBytes */ - totalStoredBytes?: (number|Long|string|null); - - /** DataSource configState */ - configState?: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState|null); - - /** DataSource backupConfigInfo */ - backupConfigInfo?: (google.cloud.backupdr.v1.IBackupConfigInfo|null); - - /** DataSource dataSourceGcpResource */ - dataSourceGcpResource?: (google.cloud.backupdr.v1.IDataSourceGcpResource|null); - - /** DataSource dataSourceBackupApplianceApplication */ - dataSourceBackupApplianceApplication?: (google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null); - } - - /** Represents a DataSource. */ - class DataSource implements IDataSource { - - /** - * Constructs a new DataSource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDataSource); - - /** DataSource name. */ - public name: string; - - /** DataSource state. */ - public state: (google.cloud.backupdr.v1.DataSource.State|keyof typeof google.cloud.backupdr.v1.DataSource.State); - - /** DataSource labels. */ - public labels: { [k: string]: string }; - - /** DataSource createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** DataSource updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** DataSource backupCount. */ - public backupCount?: (number|Long|string|null); - - /** DataSource etag. */ - public etag?: (string|null); - - /** DataSource totalStoredBytes. */ - public totalStoredBytes?: (number|Long|string|null); - - /** DataSource configState. */ - public configState: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState); - - /** DataSource backupConfigInfo. */ - public backupConfigInfo?: (google.cloud.backupdr.v1.IBackupConfigInfo|null); - - /** DataSource dataSourceGcpResource. */ - public dataSourceGcpResource?: (google.cloud.backupdr.v1.IDataSourceGcpResource|null); - - /** DataSource dataSourceBackupApplianceApplication. */ - public dataSourceBackupApplianceApplication?: (google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null); - - /** DataSource _createTime. */ - public _createTime?: "createTime"; - - /** DataSource _updateTime. */ - public _updateTime?: "updateTime"; - - /** DataSource _backupCount. */ - public _backupCount?: "backupCount"; - - /** DataSource _etag. */ - public _etag?: "etag"; - - /** DataSource _totalStoredBytes. */ - public _totalStoredBytes?: "totalStoredBytes"; - - /** DataSource sourceResource. */ - public sourceResource?: ("dataSourceGcpResource"|"dataSourceBackupApplianceApplication"); - - /** - * Creates a new DataSource instance using the specified properties. - * @param [properties] Properties to set - * @returns DataSource instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDataSource): google.cloud.backupdr.v1.DataSource; - - /** - * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. - * @param message DataSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. - * @param message DataSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSource; - - /** - * Decodes a DataSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSource; - - /** - * Verifies a DataSource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataSource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSource; - - /** - * Creates a plain object from a DataSource message. Also converts values to other types if specified. - * @param message DataSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DataSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DataSource { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - DELETING = 3, - ERROR = 4 - } - } - - /** Properties of a BackupConfigInfo. */ - interface IBackupConfigInfo { - - /** BackupConfigInfo lastBackupState */ - lastBackupState?: (google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|null); - - /** BackupConfigInfo lastSuccessfulBackupConsistencyTime */ - lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); - - /** BackupConfigInfo lastBackupError */ - lastBackupError?: (google.rpc.IStatus|null); - - /** BackupConfigInfo gcpBackupConfig */ - gcpBackupConfig?: (google.cloud.backupdr.v1.IGcpBackupConfig|null); - - /** BackupConfigInfo backupApplianceBackupConfig */ - backupApplianceBackupConfig?: (google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null); - } - - /** Represents a BackupConfigInfo. */ - class BackupConfigInfo implements IBackupConfigInfo { - - /** - * Constructs a new BackupConfigInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupConfigInfo); - - /** BackupConfigInfo lastBackupState. */ - public lastBackupState: (google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState); - - /** BackupConfigInfo lastSuccessfulBackupConsistencyTime. */ - public lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); - - /** BackupConfigInfo lastBackupError. */ - public lastBackupError?: (google.rpc.IStatus|null); - - /** BackupConfigInfo gcpBackupConfig. */ - public gcpBackupConfig?: (google.cloud.backupdr.v1.IGcpBackupConfig|null); - - /** BackupConfigInfo backupApplianceBackupConfig. */ - public backupApplianceBackupConfig?: (google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null); - - /** BackupConfigInfo backupConfig. */ - public backupConfig?: ("gcpBackupConfig"|"backupApplianceBackupConfig"); - - /** - * Creates a new BackupConfigInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupConfigInfo instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupConfigInfo): google.cloud.backupdr.v1.BackupConfigInfo; - - /** - * Encodes the specified BackupConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. - * @param message BackupConfigInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. - * @param message BackupConfigInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupConfigInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupConfigInfo; - - /** - * Decodes a BackupConfigInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupConfigInfo; - - /** - * Verifies a BackupConfigInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupConfigInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupConfigInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupConfigInfo; - - /** - * Creates a plain object from a BackupConfigInfo message. Also converts values to other types if specified. - * @param message BackupConfigInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupConfigInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupConfigInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupConfigInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BackupConfigInfo { - - /** LastBackupState enum. */ - enum LastBackupState { - LAST_BACKUP_STATE_UNSPECIFIED = 0, - FIRST_BACKUP_PENDING = 1, - SUCCEEDED = 2, - FAILED = 3, - PERMISSION_DENIED = 4 - } - } - - /** Properties of a GcpBackupConfig. */ - interface IGcpBackupConfig { - - /** GcpBackupConfig backupPlan */ - backupPlan?: (string|null); - - /** GcpBackupConfig backupPlanDescription */ - backupPlanDescription?: (string|null); - - /** GcpBackupConfig backupPlanAssociation */ - backupPlanAssociation?: (string|null); - - /** GcpBackupConfig backupPlanRules */ - backupPlanRules?: (string[]|null); - } - - /** Represents a GcpBackupConfig. */ - class GcpBackupConfig implements IGcpBackupConfig { - - /** - * Constructs a new GcpBackupConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGcpBackupConfig); - - /** GcpBackupConfig backupPlan. */ - public backupPlan: string; - - /** GcpBackupConfig backupPlanDescription. */ - public backupPlanDescription: string; - - /** GcpBackupConfig backupPlanAssociation. */ - public backupPlanAssociation: string; - - /** GcpBackupConfig backupPlanRules. */ - public backupPlanRules: string[]; - - /** - * Creates a new GcpBackupConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GcpBackupConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGcpBackupConfig): google.cloud.backupdr.v1.GcpBackupConfig; - - /** - * Encodes the specified GcpBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. - * @param message GcpBackupConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGcpBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcpBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. - * @param message GcpBackupConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGcpBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcpBackupConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcpBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GcpBackupConfig; - - /** - * Decodes a GcpBackupConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcpBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GcpBackupConfig; - - /** - * Verifies a GcpBackupConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcpBackupConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcpBackupConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GcpBackupConfig; - - /** - * Creates a plain object from a GcpBackupConfig message. Also converts values to other types if specified. - * @param message GcpBackupConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GcpBackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcpBackupConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcpBackupConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackupApplianceBackupConfig. */ - interface IBackupApplianceBackupConfig { - - /** BackupApplianceBackupConfig backupApplianceName */ - backupApplianceName?: (string|null); - - /** BackupApplianceBackupConfig backupApplianceId */ - backupApplianceId?: (number|Long|string|null); - - /** BackupApplianceBackupConfig slaId */ - slaId?: (number|Long|string|null); - - /** BackupApplianceBackupConfig applicationName */ - applicationName?: (string|null); - - /** BackupApplianceBackupConfig hostName */ - hostName?: (string|null); - - /** BackupApplianceBackupConfig sltName */ - sltName?: (string|null); - - /** BackupApplianceBackupConfig slpName */ - slpName?: (string|null); - } - - /** Represents a BackupApplianceBackupConfig. */ - class BackupApplianceBackupConfig implements IBackupApplianceBackupConfig { - - /** - * Constructs a new BackupApplianceBackupConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupConfig); - - /** BackupApplianceBackupConfig backupApplianceName. */ - public backupApplianceName: string; - - /** BackupApplianceBackupConfig backupApplianceId. */ - public backupApplianceId: (number|Long|string); - - /** BackupApplianceBackupConfig slaId. */ - public slaId: (number|Long|string); - - /** BackupApplianceBackupConfig applicationName. */ - public applicationName: string; - - /** BackupApplianceBackupConfig hostName. */ - public hostName: string; - - /** BackupApplianceBackupConfig sltName. */ - public sltName: string; - - /** BackupApplianceBackupConfig slpName. */ - public slpName: string; - - /** - * Creates a new BackupApplianceBackupConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupApplianceBackupConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupConfig): google.cloud.backupdr.v1.BackupApplianceBackupConfig; - - /** - * Encodes the specified BackupApplianceBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. - * @param message BackupApplianceBackupConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupApplianceBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupApplianceBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. - * @param message BackupApplianceBackupConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupApplianceBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceBackupConfig; - - /** - * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupApplianceBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceBackupConfig; - - /** - * Verifies a BackupApplianceBackupConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupApplianceBackupConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupApplianceBackupConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceBackupConfig; - - /** - * Creates a plain object from a BackupApplianceBackupConfig message. Also converts values to other types if specified. - * @param message BackupApplianceBackupConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupApplianceBackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupApplianceBackupConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupApplianceBackupConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataSourceGcpResource. */ - interface IDataSourceGcpResource { - - /** DataSourceGcpResource gcpResourcename */ - gcpResourcename?: (string|null); - - /** DataSourceGcpResource location */ - location?: (string|null); - - /** DataSourceGcpResource type */ - type?: (string|null); - - /** DataSourceGcpResource computeInstanceDatasourceProperties */ - computeInstanceDatasourceProperties?: (google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null); - } - - /** Represents a DataSourceGcpResource. */ - class DataSourceGcpResource implements IDataSourceGcpResource { - - /** - * Constructs a new DataSourceGcpResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDataSourceGcpResource); - - /** DataSourceGcpResource gcpResourcename. */ - public gcpResourcename: string; - - /** DataSourceGcpResource location. */ - public location: string; - - /** DataSourceGcpResource type. */ - public type: string; - - /** DataSourceGcpResource computeInstanceDatasourceProperties. */ - public computeInstanceDatasourceProperties?: (google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null); - - /** DataSourceGcpResource gcpResourceProperties. */ - public gcpResourceProperties?: "computeInstanceDatasourceProperties"; - - /** - * Creates a new DataSourceGcpResource instance using the specified properties. - * @param [properties] Properties to set - * @returns DataSourceGcpResource instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDataSourceGcpResource): google.cloud.backupdr.v1.DataSourceGcpResource; - - /** - * Encodes the specified DataSourceGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. - * @param message DataSourceGcpResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDataSourceGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataSourceGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. - * @param message DataSourceGcpResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSourceGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataSourceGcpResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataSourceGcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSourceGcpResource; - - /** - * Decodes a DataSourceGcpResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataSourceGcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSourceGcpResource; - - /** - * Verifies a DataSourceGcpResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataSourceGcpResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataSourceGcpResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSourceGcpResource; - - /** - * Creates a plain object from a DataSourceGcpResource message. Also converts values to other types if specified. - * @param message DataSourceGcpResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DataSourceGcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataSourceGcpResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataSourceGcpResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataSourceBackupApplianceApplication. */ - interface IDataSourceBackupApplianceApplication { - - /** DataSourceBackupApplianceApplication applicationName */ - applicationName?: (string|null); - - /** DataSourceBackupApplianceApplication backupAppliance */ - backupAppliance?: (string|null); - - /** DataSourceBackupApplianceApplication applianceId */ - applianceId?: (number|Long|string|null); - - /** DataSourceBackupApplianceApplication type */ - type?: (string|null); - - /** DataSourceBackupApplianceApplication applicationId */ - applicationId?: (number|Long|string|null); - - /** DataSourceBackupApplianceApplication hostname */ - hostname?: (string|null); - - /** DataSourceBackupApplianceApplication hostId */ - hostId?: (number|Long|string|null); - } - - /** Represents a DataSourceBackupApplianceApplication. */ - class DataSourceBackupApplianceApplication implements IDataSourceBackupApplianceApplication { - - /** - * Constructs a new DataSourceBackupApplianceApplication. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication); - - /** DataSourceBackupApplianceApplication applicationName. */ - public applicationName: string; - - /** DataSourceBackupApplianceApplication backupAppliance. */ - public backupAppliance: string; - - /** DataSourceBackupApplianceApplication applianceId. */ - public applianceId: (number|Long|string); - - /** DataSourceBackupApplianceApplication type. */ - public type: string; - - /** DataSourceBackupApplianceApplication applicationId. */ - public applicationId: (number|Long|string); - - /** DataSourceBackupApplianceApplication hostname. */ - public hostname: string; - - /** DataSourceBackupApplianceApplication hostId. */ - public hostId: (number|Long|string); - - /** - * Creates a new DataSourceBackupApplianceApplication instance using the specified properties. - * @param [properties] Properties to set - * @returns DataSourceBackupApplianceApplication instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; - - /** - * Encodes the specified DataSourceBackupApplianceApplication message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. - * @param message DataSourceBackupApplianceApplication message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataSourceBackupApplianceApplication message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. - * @param message DataSourceBackupApplianceApplication message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataSourceBackupApplianceApplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; - - /** - * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataSourceBackupApplianceApplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; - - /** - * Verifies a DataSourceBackupApplianceApplication message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataSourceBackupApplianceApplication message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataSourceBackupApplianceApplication - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; - - /** - * Creates a plain object from a DataSourceBackupApplianceApplication message. Also converts values to other types if specified. - * @param message DataSourceBackupApplianceApplication - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DataSourceBackupApplianceApplication, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataSourceBackupApplianceApplication to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataSourceBackupApplianceApplication - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceLockInfo. */ - interface IServiceLockInfo { - - /** ServiceLockInfo operation */ - operation?: (string|null); - } - - /** Represents a ServiceLockInfo. */ - class ServiceLockInfo implements IServiceLockInfo { - - /** - * Constructs a new ServiceLockInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IServiceLockInfo); - - /** ServiceLockInfo operation. */ - public operation: string; - - /** - * Creates a new ServiceLockInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceLockInfo instance - */ - public static create(properties?: google.cloud.backupdr.v1.IServiceLockInfo): google.cloud.backupdr.v1.ServiceLockInfo; - - /** - * Encodes the specified ServiceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. - * @param message ServiceLockInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IServiceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. - * @param message ServiceLockInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IServiceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceLockInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ServiceLockInfo; - - /** - * Decodes a ServiceLockInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ServiceLockInfo; - - /** - * Verifies a ServiceLockInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceLockInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceLockInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ServiceLockInfo; - - /** - * Creates a plain object from a ServiceLockInfo message. Also converts values to other types if specified. - * @param message ServiceLockInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ServiceLockInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceLockInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceLockInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackupApplianceLockInfo. */ - interface IBackupApplianceLockInfo { - - /** BackupApplianceLockInfo backupApplianceId */ - backupApplianceId?: (number|Long|string|null); - - /** BackupApplianceLockInfo backupApplianceName */ - backupApplianceName?: (string|null); - - /** BackupApplianceLockInfo lockReason */ - lockReason?: (string|null); - - /** BackupApplianceLockInfo jobName */ - jobName?: (string|null); - - /** BackupApplianceLockInfo backupImage */ - backupImage?: (string|null); - - /** BackupApplianceLockInfo slaId */ - slaId?: (number|Long|string|null); - } - - /** Represents a BackupApplianceLockInfo. */ - class BackupApplianceLockInfo implements IBackupApplianceLockInfo { - - /** - * Constructs a new BackupApplianceLockInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceLockInfo); - - /** BackupApplianceLockInfo backupApplianceId. */ - public backupApplianceId: (number|Long|string); - - /** BackupApplianceLockInfo backupApplianceName. */ - public backupApplianceName: string; - - /** BackupApplianceLockInfo lockReason. */ - public lockReason: string; - - /** BackupApplianceLockInfo jobName. */ - public jobName?: (string|null); - - /** BackupApplianceLockInfo backupImage. */ - public backupImage?: (string|null); - - /** BackupApplianceLockInfo slaId. */ - public slaId?: (number|Long|string|null); - - /** BackupApplianceLockInfo lockSource. */ - public lockSource?: ("jobName"|"backupImage"|"slaId"); - - /** - * Creates a new BackupApplianceLockInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupApplianceLockInfo instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceLockInfo): google.cloud.backupdr.v1.BackupApplianceLockInfo; - - /** - * Encodes the specified BackupApplianceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. - * @param message BackupApplianceLockInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupApplianceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupApplianceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. - * @param message BackupApplianceLockInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupApplianceLockInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupApplianceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceLockInfo; - - /** - * Decodes a BackupApplianceLockInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupApplianceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceLockInfo; - - /** - * Verifies a BackupApplianceLockInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupApplianceLockInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupApplianceLockInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceLockInfo; - - /** - * Creates a plain object from a BackupApplianceLockInfo message. Also converts values to other types if specified. - * @param message BackupApplianceLockInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupApplianceLockInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupApplianceLockInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupApplianceLockInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackupLock. */ - interface IBackupLock { - - /** BackupLock lockUntilTime */ - lockUntilTime?: (google.protobuf.ITimestamp|null); - - /** BackupLock backupApplianceLockInfo */ - backupApplianceLockInfo?: (google.cloud.backupdr.v1.IBackupApplianceLockInfo|null); - - /** BackupLock serviceLockInfo */ - serviceLockInfo?: (google.cloud.backupdr.v1.IServiceLockInfo|null); - } - - /** Represents a BackupLock. */ - class BackupLock implements IBackupLock { - - /** - * Constructs a new BackupLock. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupLock); - - /** BackupLock lockUntilTime. */ - public lockUntilTime?: (google.protobuf.ITimestamp|null); - - /** BackupLock backupApplianceLockInfo. */ - public backupApplianceLockInfo?: (google.cloud.backupdr.v1.IBackupApplianceLockInfo|null); - - /** BackupLock serviceLockInfo. */ - public serviceLockInfo?: (google.cloud.backupdr.v1.IServiceLockInfo|null); - - /** BackupLock ClientLockInfo. */ - public ClientLockInfo?: ("backupApplianceLockInfo"|"serviceLockInfo"); - - /** - * Creates a new BackupLock instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupLock instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupLock): google.cloud.backupdr.v1.BackupLock; - - /** - * Encodes the specified BackupLock message. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. - * @param message BackupLock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupLock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupLock message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. - * @param message BackupLock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupLock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupLock message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupLock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupLock; - - /** - * Decodes a BackupLock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupLock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupLock; - - /** - * Verifies a BackupLock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupLock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupLock - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupLock; - - /** - * Creates a plain object from a BackupLock message. Also converts values to other types if specified. - * @param message BackupLock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupLock, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupLock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupLock - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Backup. */ - interface IBackup { - - /** Backup name */ - name?: (string|null); - - /** Backup description */ - description?: (string|null); - - /** Backup createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Backup updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Backup labels */ - labels?: ({ [k: string]: string }|null); - - /** Backup enforcedRetentionEndTime */ - enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); - - /** Backup expireTime */ - expireTime?: (google.protobuf.ITimestamp|null); - - /** Backup consistencyTime */ - consistencyTime?: (google.protobuf.ITimestamp|null); - - /** Backup etag */ - etag?: (string|null); - - /** Backup state */ - state?: (google.cloud.backupdr.v1.Backup.State|keyof typeof google.cloud.backupdr.v1.Backup.State|null); - - /** Backup serviceLocks */ - serviceLocks?: (google.cloud.backupdr.v1.IBackupLock[]|null); - - /** Backup backupApplianceLocks */ - backupApplianceLocks?: (google.cloud.backupdr.v1.IBackupLock[]|null); - - /** Backup computeInstanceBackupProperties */ - computeInstanceBackupProperties?: (google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null); - - /** Backup backupApplianceBackupProperties */ - backupApplianceBackupProperties?: (google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null); - - /** Backup backupType */ - backupType?: (google.cloud.backupdr.v1.Backup.BackupType|keyof typeof google.cloud.backupdr.v1.Backup.BackupType|null); - - /** Backup gcpBackupPlanInfo */ - gcpBackupPlanInfo?: (google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null); - - /** Backup resourceSizeBytes */ - resourceSizeBytes?: (number|Long|string|null); - } - - /** Represents a Backup. */ - class Backup implements IBackup { - - /** - * Constructs a new Backup. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackup); - - /** Backup name. */ - public name: string; - - /** Backup description. */ - public description?: (string|null); - - /** Backup createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Backup updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Backup labels. */ - public labels: { [k: string]: string }; - - /** Backup enforcedRetentionEndTime. */ - public enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); - - /** Backup expireTime. */ - public expireTime?: (google.protobuf.ITimestamp|null); - - /** Backup consistencyTime. */ - public consistencyTime?: (google.protobuf.ITimestamp|null); - - /** Backup etag. */ - public etag?: (string|null); - - /** Backup state. */ - public state: (google.cloud.backupdr.v1.Backup.State|keyof typeof google.cloud.backupdr.v1.Backup.State); - - /** Backup serviceLocks. */ - public serviceLocks: google.cloud.backupdr.v1.IBackupLock[]; - - /** Backup backupApplianceLocks. */ - public backupApplianceLocks: google.cloud.backupdr.v1.IBackupLock[]; - - /** Backup computeInstanceBackupProperties. */ - public computeInstanceBackupProperties?: (google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null); - - /** Backup backupApplianceBackupProperties. */ - public backupApplianceBackupProperties?: (google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null); - - /** Backup backupType. */ - public backupType: (google.cloud.backupdr.v1.Backup.BackupType|keyof typeof google.cloud.backupdr.v1.Backup.BackupType); - - /** Backup gcpBackupPlanInfo. */ - public gcpBackupPlanInfo?: (google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null); - - /** Backup resourceSizeBytes. */ - public resourceSizeBytes: (number|Long|string); - - /** Backup _description. */ - public _description?: "description"; - - /** Backup _createTime. */ - public _createTime?: "createTime"; - - /** Backup _updateTime. */ - public _updateTime?: "updateTime"; - - /** Backup _enforcedRetentionEndTime. */ - public _enforcedRetentionEndTime?: "enforcedRetentionEndTime"; - - /** Backup _expireTime. */ - public _expireTime?: "expireTime"; - - /** Backup _consistencyTime. */ - public _consistencyTime?: "consistencyTime"; - - /** Backup _etag. */ - public _etag?: "etag"; - - /** Backup backupProperties. */ - public backupProperties?: ("computeInstanceBackupProperties"|"backupApplianceBackupProperties"); - - /** Backup planInfo. */ - public planInfo?: "gcpBackupPlanInfo"; - - /** - * Creates a new Backup instance using the specified properties. - * @param [properties] Properties to set - * @returns Backup instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackup): google.cloud.backupdr.v1.Backup; - - /** - * Encodes the specified Backup message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. - * @param message Backup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. - * @param message Backup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Backup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Backup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Backup; - - /** - * Decodes a Backup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Backup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Backup; - - /** - * Verifies a Backup message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Backup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Backup - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Backup; - - /** - * Creates a plain object from a Backup message. Also converts values to other types if specified. - * @param message Backup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Backup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Backup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Backup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Backup { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - DELETING = 3, - ERROR = 4 - } - - /** BackupType enum. */ - enum BackupType { - BACKUP_TYPE_UNSPECIFIED = 0, - SCHEDULED = 1, - ON_DEMAND = 2 - } - - /** Properties of a GCPBackupPlanInfo. */ - interface IGCPBackupPlanInfo { - - /** GCPBackupPlanInfo backupPlan */ - backupPlan?: (string|null); - - /** GCPBackupPlanInfo backupPlanRuleId */ - backupPlanRuleId?: (string|null); - } - - /** Represents a GCPBackupPlanInfo. */ - class GCPBackupPlanInfo implements IGCPBackupPlanInfo { - - /** - * Constructs a new GCPBackupPlanInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo); - - /** GCPBackupPlanInfo backupPlan. */ - public backupPlan: string; - - /** GCPBackupPlanInfo backupPlanRuleId. */ - public backupPlanRuleId: string; - - /** - * Creates a new GCPBackupPlanInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GCPBackupPlanInfo instance - */ - public static create(properties?: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; - - /** - * Encodes the specified GCPBackupPlanInfo message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. - * @param message GCPBackupPlanInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GCPBackupPlanInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. - * @param message GCPBackupPlanInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GCPBackupPlanInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GCPBackupPlanInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; - - /** - * Decodes a GCPBackupPlanInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GCPBackupPlanInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; - - /** - * Verifies a GCPBackupPlanInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GCPBackupPlanInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GCPBackupPlanInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; - - /** - * Creates a plain object from a GCPBackupPlanInfo message. Also converts values to other types if specified. - * @param message GCPBackupPlanInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GCPBackupPlanInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GCPBackupPlanInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a CreateBackupVaultRequest. */ - interface ICreateBackupVaultRequest { - - /** CreateBackupVaultRequest parent */ - parent?: (string|null); - - /** CreateBackupVaultRequest backupVaultId */ - backupVaultId?: (string|null); - - /** CreateBackupVaultRequest backupVault */ - backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); - - /** CreateBackupVaultRequest requestId */ - requestId?: (string|null); - - /** CreateBackupVaultRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateBackupVaultRequest. */ - class CreateBackupVaultRequest implements ICreateBackupVaultRequest { - - /** - * Constructs a new CreateBackupVaultRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ICreateBackupVaultRequest); - - /** CreateBackupVaultRequest parent. */ - public parent: string; - - /** CreateBackupVaultRequest backupVaultId. */ - public backupVaultId: string; - - /** CreateBackupVaultRequest backupVault. */ - public backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); - - /** CreateBackupVaultRequest requestId. */ - public requestId: string; - - /** CreateBackupVaultRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateBackupVaultRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateBackupVaultRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ICreateBackupVaultRequest): google.cloud.backupdr.v1.CreateBackupVaultRequest; - - /** - * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. - * @param message CreateBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ICreateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. - * @param message CreateBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupVaultRequest; - - /** - * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupVaultRequest; - - /** - * Verifies a CreateBackupVaultRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateBackupVaultRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupVaultRequest; - - /** - * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. - * @param message CreateBackupVaultRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.CreateBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateBackupVaultRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateBackupVaultRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupVaultsRequest. */ - interface IListBackupVaultsRequest { - - /** ListBackupVaultsRequest parent */ - parent?: (string|null); - - /** ListBackupVaultsRequest pageSize */ - pageSize?: (number|null); - - /** ListBackupVaultsRequest pageToken */ - pageToken?: (string|null); - - /** ListBackupVaultsRequest filter */ - filter?: (string|null); - - /** ListBackupVaultsRequest orderBy */ - orderBy?: (string|null); - - /** ListBackupVaultsRequest view */ - view?: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView|null); - } - - /** Represents a ListBackupVaultsRequest. */ - class ListBackupVaultsRequest implements IListBackupVaultsRequest { - - /** - * Constructs a new ListBackupVaultsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupVaultsRequest); - - /** ListBackupVaultsRequest parent. */ - public parent: string; - - /** ListBackupVaultsRequest pageSize. */ - public pageSize: number; - - /** ListBackupVaultsRequest pageToken. */ - public pageToken: string; - - /** ListBackupVaultsRequest filter. */ - public filter: string; - - /** ListBackupVaultsRequest orderBy. */ - public orderBy: string; - - /** ListBackupVaultsRequest view. */ - public view: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView); - - /** - * Creates a new ListBackupVaultsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupVaultsRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupVaultsRequest): google.cloud.backupdr.v1.ListBackupVaultsRequest; - - /** - * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. - * @param message ListBackupVaultsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. - * @param message ListBackupVaultsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupVaultsRequest; - - /** - * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupVaultsRequest; - - /** - * Verifies a ListBackupVaultsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupVaultsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupVaultsRequest; - - /** - * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. - * @param message ListBackupVaultsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupVaultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupVaultsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupVaultsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupVaultsResponse. */ - interface IListBackupVaultsResponse { - - /** ListBackupVaultsResponse backupVaults */ - backupVaults?: (google.cloud.backupdr.v1.IBackupVault[]|null); - - /** ListBackupVaultsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListBackupVaultsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListBackupVaultsResponse. */ - class ListBackupVaultsResponse implements IListBackupVaultsResponse { - - /** - * Constructs a new ListBackupVaultsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupVaultsResponse); - - /** ListBackupVaultsResponse backupVaults. */ - public backupVaults: google.cloud.backupdr.v1.IBackupVault[]; - - /** ListBackupVaultsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListBackupVaultsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListBackupVaultsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupVaultsResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupVaultsResponse): google.cloud.backupdr.v1.ListBackupVaultsResponse; - - /** - * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. - * @param message ListBackupVaultsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. - * @param message ListBackupVaultsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupVaultsResponse; - - /** - * Decodes a ListBackupVaultsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupVaultsResponse; - - /** - * Verifies a ListBackupVaultsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupVaultsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupVaultsResponse; - - /** - * Creates a plain object from a ListBackupVaultsResponse message. Also converts values to other types if specified. - * @param message ListBackupVaultsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupVaultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupVaultsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupVaultsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchUsableBackupVaultsRequest. */ - interface IFetchUsableBackupVaultsRequest { - - /** FetchUsableBackupVaultsRequest parent */ - parent?: (string|null); - - /** FetchUsableBackupVaultsRequest pageSize */ - pageSize?: (number|null); - - /** FetchUsableBackupVaultsRequest pageToken */ - pageToken?: (string|null); - - /** FetchUsableBackupVaultsRequest filter */ - filter?: (string|null); - - /** FetchUsableBackupVaultsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a FetchUsableBackupVaultsRequest. */ - class FetchUsableBackupVaultsRequest implements IFetchUsableBackupVaultsRequest { - - /** - * Constructs a new FetchUsableBackupVaultsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest); - - /** FetchUsableBackupVaultsRequest parent. */ - public parent: string; - - /** FetchUsableBackupVaultsRequest pageSize. */ - public pageSize: number; - - /** FetchUsableBackupVaultsRequest pageToken. */ - public pageToken: string; - - /** FetchUsableBackupVaultsRequest filter. */ - public filter: string; - - /** FetchUsableBackupVaultsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new FetchUsableBackupVaultsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchUsableBackupVaultsRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; - - /** - * Encodes the specified FetchUsableBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. - * @param message FetchUsableBackupVaultsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchUsableBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. - * @param message FetchUsableBackupVaultsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchUsableBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; - - /** - * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchUsableBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; - - /** - * Verifies a FetchUsableBackupVaultsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchUsableBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchUsableBackupVaultsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; - - /** - * Creates a plain object from a FetchUsableBackupVaultsRequest message. Also converts values to other types if specified. - * @param message FetchUsableBackupVaultsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchUsableBackupVaultsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchUsableBackupVaultsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchUsableBackupVaultsResponse. */ - interface IFetchUsableBackupVaultsResponse { - - /** FetchUsableBackupVaultsResponse backupVaults */ - backupVaults?: (google.cloud.backupdr.v1.IBackupVault[]|null); - - /** FetchUsableBackupVaultsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** FetchUsableBackupVaultsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a FetchUsableBackupVaultsResponse. */ - class FetchUsableBackupVaultsResponse implements IFetchUsableBackupVaultsResponse { - - /** - * Constructs a new FetchUsableBackupVaultsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse); - - /** FetchUsableBackupVaultsResponse backupVaults. */ - public backupVaults: google.cloud.backupdr.v1.IBackupVault[]; - - /** FetchUsableBackupVaultsResponse nextPageToken. */ - public nextPageToken: string; - - /** FetchUsableBackupVaultsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new FetchUsableBackupVaultsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchUsableBackupVaultsResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; - - /** - * Encodes the specified FetchUsableBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. - * @param message FetchUsableBackupVaultsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchUsableBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. - * @param message FetchUsableBackupVaultsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchUsableBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; - - /** - * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchUsableBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; - - /** - * Verifies a FetchUsableBackupVaultsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchUsableBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchUsableBackupVaultsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; - - /** - * Creates a plain object from a FetchUsableBackupVaultsResponse message. Also converts values to other types if specified. - * @param message FetchUsableBackupVaultsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchUsableBackupVaultsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchUsableBackupVaultsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetBackupVaultRequest. */ - interface IGetBackupVaultRequest { - - /** GetBackupVaultRequest name */ - name?: (string|null); - - /** GetBackupVaultRequest view */ - view?: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView|null); - } - - /** Represents a GetBackupVaultRequest. */ - class GetBackupVaultRequest implements IGetBackupVaultRequest { - - /** - * Constructs a new GetBackupVaultRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetBackupVaultRequest); - - /** GetBackupVaultRequest name. */ - public name: string; - - /** GetBackupVaultRequest view. */ - public view: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView); - - /** - * Creates a new GetBackupVaultRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupVaultRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetBackupVaultRequest): google.cloud.backupdr.v1.GetBackupVaultRequest; - - /** - * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. - * @param message GetBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. - * @param message GetBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetBackupVaultRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupVaultRequest; - - /** - * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupVaultRequest; - - /** - * Verifies a GetBackupVaultRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetBackupVaultRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupVaultRequest; - - /** - * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. - * @param message GetBackupVaultRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetBackupVaultRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetBackupVaultRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateBackupVaultRequest. */ - interface IUpdateBackupVaultRequest { - - /** UpdateBackupVaultRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateBackupVaultRequest backupVault */ - backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); - - /** UpdateBackupVaultRequest requestId */ - requestId?: (string|null); - - /** UpdateBackupVaultRequest validateOnly */ - validateOnly?: (boolean|null); - - /** UpdateBackupVaultRequest force */ - force?: (boolean|null); - } - - /** Represents an UpdateBackupVaultRequest. */ - class UpdateBackupVaultRequest implements IUpdateBackupVaultRequest { - - /** - * Constructs a new UpdateBackupVaultRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IUpdateBackupVaultRequest); - - /** UpdateBackupVaultRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateBackupVaultRequest backupVault. */ - public backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); - - /** UpdateBackupVaultRequest requestId. */ - public requestId: string; - - /** UpdateBackupVaultRequest validateOnly. */ - public validateOnly: boolean; - - /** UpdateBackupVaultRequest force. */ - public force: boolean; - - /** - * Creates a new UpdateBackupVaultRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateBackupVaultRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IUpdateBackupVaultRequest): google.cloud.backupdr.v1.UpdateBackupVaultRequest; - - /** - * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. - * @param message UpdateBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. - * @param message UpdateBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateBackupVaultRequest; - - /** - * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateBackupVaultRequest; - - /** - * Verifies an UpdateBackupVaultRequest message. - * @param message Plain 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 UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateBackupVaultRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateBackupVaultRequest; - - /** - * Creates a plain object from an UpdateBackupVaultRequest message. Also converts values to other types if specified. - * @param message UpdateBackupVaultRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.UpdateBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateBackupVaultRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateBackupVaultRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteBackupVaultRequest. */ - interface IDeleteBackupVaultRequest { - - /** DeleteBackupVaultRequest name */ - name?: (string|null); - - /** DeleteBackupVaultRequest requestId */ - requestId?: (string|null); - - /** DeleteBackupVaultRequest force */ - force?: (boolean|null); - - /** DeleteBackupVaultRequest etag */ - etag?: (string|null); - - /** DeleteBackupVaultRequest validateOnly */ - validateOnly?: (boolean|null); - - /** DeleteBackupVaultRequest allowMissing */ - allowMissing?: (boolean|null); - } - - /** Represents a DeleteBackupVaultRequest. */ - class DeleteBackupVaultRequest implements IDeleteBackupVaultRequest { - - /** - * Constructs a new DeleteBackupVaultRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupVaultRequest); - - /** DeleteBackupVaultRequest name. */ - public name: string; - - /** DeleteBackupVaultRequest requestId. */ - public requestId: string; - - /** DeleteBackupVaultRequest force. */ - public force: boolean; - - /** DeleteBackupVaultRequest etag. */ - public etag: string; - - /** DeleteBackupVaultRequest validateOnly. */ - public validateOnly: boolean; - - /** DeleteBackupVaultRequest allowMissing. */ - public allowMissing: boolean; - - /** - * Creates a new DeleteBackupVaultRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteBackupVaultRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupVaultRequest): google.cloud.backupdr.v1.DeleteBackupVaultRequest; - - /** - * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. - * @param message DeleteBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. - * @param message DeleteBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupVaultRequest; - - /** - * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupVaultRequest; - - /** - * Verifies a DeleteBackupVaultRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteBackupVaultRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupVaultRequest; - - /** - * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. - * @param message DeleteBackupVaultRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DeleteBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteBackupVaultRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteBackupVaultRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDataSourcesRequest. */ - interface IListDataSourcesRequest { - - /** ListDataSourcesRequest parent */ - parent?: (string|null); - - /** ListDataSourcesRequest pageSize */ - pageSize?: (number|null); - - /** ListDataSourcesRequest pageToken */ - pageToken?: (string|null); - - /** ListDataSourcesRequest filter */ - filter?: (string|null); - - /** ListDataSourcesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListDataSourcesRequest. */ - class ListDataSourcesRequest implements IListDataSourcesRequest { - - /** - * Constructs a new ListDataSourcesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListDataSourcesRequest); - - /** ListDataSourcesRequest parent. */ - public parent: string; - - /** ListDataSourcesRequest pageSize. */ - public pageSize: number; - - /** ListDataSourcesRequest pageToken. */ - public pageToken: string; - - /** ListDataSourcesRequest filter. */ - public filter: string; - - /** ListDataSourcesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListDataSourcesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDataSourcesRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListDataSourcesRequest): google.cloud.backupdr.v1.ListDataSourcesRequest; - - /** - * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. - * @param message ListDataSourcesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListDataSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. - * @param message ListDataSourcesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListDataSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDataSourcesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDataSourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListDataSourcesRequest; - - /** - * Decodes a ListDataSourcesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDataSourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListDataSourcesRequest; - - /** - * Verifies a ListDataSourcesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDataSourcesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListDataSourcesRequest; - - /** - * Creates a plain object from a ListDataSourcesRequest message. Also converts values to other types if specified. - * @param message ListDataSourcesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListDataSourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDataSourcesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDataSourcesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDataSourcesResponse. */ - interface IListDataSourcesResponse { - - /** ListDataSourcesResponse dataSources */ - dataSources?: (google.cloud.backupdr.v1.IDataSource[]|null); - - /** ListDataSourcesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListDataSourcesResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListDataSourcesResponse. */ - class ListDataSourcesResponse implements IListDataSourcesResponse { - - /** - * Constructs a new ListDataSourcesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListDataSourcesResponse); - - /** ListDataSourcesResponse dataSources. */ - public dataSources: google.cloud.backupdr.v1.IDataSource[]; - - /** ListDataSourcesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListDataSourcesResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListDataSourcesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDataSourcesResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListDataSourcesResponse): google.cloud.backupdr.v1.ListDataSourcesResponse; - - /** - * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. - * @param message ListDataSourcesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListDataSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. - * @param message ListDataSourcesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListDataSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDataSourcesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDataSourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListDataSourcesResponse; - - /** - * Decodes a ListDataSourcesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDataSourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListDataSourcesResponse; - - /** - * Verifies a ListDataSourcesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDataSourcesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListDataSourcesResponse; - - /** - * Creates a plain object from a ListDataSourcesResponse message. Also converts values to other types if specified. - * @param message ListDataSourcesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListDataSourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDataSourcesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDataSourcesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetDataSourceRequest. */ - interface IGetDataSourceRequest { - - /** GetDataSourceRequest name */ - name?: (string|null); - } - - /** Represents a GetDataSourceRequest. */ - class GetDataSourceRequest implements IGetDataSourceRequest { - - /** - * Constructs a new GetDataSourceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetDataSourceRequest); - - /** GetDataSourceRequest name. */ - public name: string; - - /** - * Creates a new GetDataSourceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetDataSourceRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetDataSourceRequest): google.cloud.backupdr.v1.GetDataSourceRequest; - - /** - * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. - * @param message GetDataSourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. - * @param message GetDataSourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetDataSourceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetDataSourceRequest; - - /** - * Decodes a GetDataSourceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetDataSourceRequest; - - /** - * Verifies a GetDataSourceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetDataSourceRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetDataSourceRequest; - - /** - * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. - * @param message GetDataSourceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetDataSourceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetDataSourceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateDataSourceRequest. */ - interface IUpdateDataSourceRequest { - - /** UpdateDataSourceRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateDataSourceRequest dataSource */ - dataSource?: (google.cloud.backupdr.v1.IDataSource|null); - - /** UpdateDataSourceRequest requestId */ - requestId?: (string|null); - - /** UpdateDataSourceRequest allowMissing */ - allowMissing?: (boolean|null); - } - - /** Represents an UpdateDataSourceRequest. */ - class UpdateDataSourceRequest implements IUpdateDataSourceRequest { - - /** - * Constructs a new UpdateDataSourceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IUpdateDataSourceRequest); - - /** UpdateDataSourceRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateDataSourceRequest dataSource. */ - public dataSource?: (google.cloud.backupdr.v1.IDataSource|null); - - /** UpdateDataSourceRequest requestId. */ - public requestId: string; - - /** UpdateDataSourceRequest allowMissing. */ - public allowMissing: boolean; - - /** - * Creates a new UpdateDataSourceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateDataSourceRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IUpdateDataSourceRequest): google.cloud.backupdr.v1.UpdateDataSourceRequest; - - /** - * Encodes the specified UpdateDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. - * @param message UpdateDataSourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IUpdateDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. - * @param message UpdateDataSourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateDataSourceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateDataSourceRequest; - - /** - * Decodes an UpdateDataSourceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateDataSourceRequest; - - /** - * Verifies an UpdateDataSourceRequest message. - * @param message Plain 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 UpdateDataSourceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateDataSourceRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateDataSourceRequest; - - /** - * Creates a plain object from an UpdateDataSourceRequest message. Also converts values to other types if specified. - * @param message UpdateDataSourceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.UpdateDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateDataSourceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateDataSourceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RemoveDataSourceRequest. */ - interface IRemoveDataSourceRequest { - - /** RemoveDataSourceRequest name */ - name?: (string|null); - - /** RemoveDataSourceRequest requestId */ - requestId?: (string|null); - } - - /** Represents a RemoveDataSourceRequest. */ - class RemoveDataSourceRequest implements IRemoveDataSourceRequest { - - /** - * Constructs a new RemoveDataSourceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IRemoveDataSourceRequest); - - /** RemoveDataSourceRequest name. */ - public name: string; - - /** RemoveDataSourceRequest requestId. */ - public requestId: string; - - /** - * Creates a new RemoveDataSourceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RemoveDataSourceRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IRemoveDataSourceRequest): google.cloud.backupdr.v1.RemoveDataSourceRequest; - - /** - * Encodes the specified RemoveDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. - * @param message RemoveDataSourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IRemoveDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemoveDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. - * @param message RemoveDataSourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IRemoveDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemoveDataSourceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemoveDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RemoveDataSourceRequest; - - /** - * Decodes a RemoveDataSourceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemoveDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RemoveDataSourceRequest; - - /** - * Verifies a RemoveDataSourceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RemoveDataSourceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemoveDataSourceRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RemoveDataSourceRequest; - - /** - * Creates a plain object from a RemoveDataSourceRequest message. Also converts values to other types if specified. - * @param message RemoveDataSourceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.RemoveDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemoveDataSourceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemoveDataSourceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetInternalStatusRequest. */ - interface ISetInternalStatusRequest { - - /** SetInternalStatusRequest dataSource */ - dataSource?: (string|null); - - /** SetInternalStatusRequest value */ - value?: (Uint8Array|string|null); - - /** SetInternalStatusRequest backupConfigState */ - backupConfigState?: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState|null); - - /** SetInternalStatusRequest requestId */ - requestId?: (string|null); - } - - /** Represents a SetInternalStatusRequest. */ - class SetInternalStatusRequest implements ISetInternalStatusRequest { - - /** - * Constructs a new SetInternalStatusRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ISetInternalStatusRequest); - - /** SetInternalStatusRequest dataSource. */ - public dataSource: string; - - /** SetInternalStatusRequest value. */ - public value: (Uint8Array|string); - - /** SetInternalStatusRequest backupConfigState. */ - public backupConfigState: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState); - - /** SetInternalStatusRequest requestId. */ - public requestId: string; - - /** - * Creates a new SetInternalStatusRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetInternalStatusRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ISetInternalStatusRequest): google.cloud.backupdr.v1.SetInternalStatusRequest; - - /** - * Encodes the specified SetInternalStatusRequest message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. - * @param message SetInternalStatusRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ISetInternalStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetInternalStatusRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. - * @param message SetInternalStatusRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ISetInternalStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetInternalStatusRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetInternalStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SetInternalStatusRequest; - - /** - * Decodes a SetInternalStatusRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetInternalStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SetInternalStatusRequest; - - /** - * Verifies a SetInternalStatusRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetInternalStatusRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetInternalStatusRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SetInternalStatusRequest; - - /** - * Creates a plain object from a SetInternalStatusRequest message. Also converts values to other types if specified. - * @param message SetInternalStatusRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.SetInternalStatusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetInternalStatusRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetInternalStatusRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetInternalStatusResponse. */ - interface ISetInternalStatusResponse { - } - - /** Represents a SetInternalStatusResponse. */ - class SetInternalStatusResponse implements ISetInternalStatusResponse { - - /** - * Constructs a new SetInternalStatusResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ISetInternalStatusResponse); - - /** - * Creates a new SetInternalStatusResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SetInternalStatusResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.ISetInternalStatusResponse): google.cloud.backupdr.v1.SetInternalStatusResponse; - - /** - * Encodes the specified SetInternalStatusResponse message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. - * @param message SetInternalStatusResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ISetInternalStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetInternalStatusResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. - * @param message SetInternalStatusResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ISetInternalStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetInternalStatusResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetInternalStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SetInternalStatusResponse; - - /** - * Decodes a SetInternalStatusResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetInternalStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SetInternalStatusResponse; - - /** - * Verifies a SetInternalStatusResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetInternalStatusResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetInternalStatusResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SetInternalStatusResponse; - - /** - * Creates a plain object from a SetInternalStatusResponse message. Also converts values to other types if specified. - * @param message SetInternalStatusResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.SetInternalStatusResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetInternalStatusResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetInternalStatusResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an InitiateBackupRequest. */ - interface IInitiateBackupRequest { - - /** InitiateBackupRequest dataSource */ - dataSource?: (string|null); - - /** InitiateBackupRequest requestId */ - requestId?: (string|null); - - /** InitiateBackupRequest backupId */ - backupId?: (string|null); - } - - /** Represents an InitiateBackupRequest. */ - class InitiateBackupRequest implements IInitiateBackupRequest { - - /** - * Constructs a new InitiateBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IInitiateBackupRequest); - - /** InitiateBackupRequest dataSource. */ - public dataSource: string; - - /** InitiateBackupRequest requestId. */ - public requestId: string; - - /** InitiateBackupRequest backupId. */ - public backupId: string; - - /** - * Creates a new InitiateBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns InitiateBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IInitiateBackupRequest): google.cloud.backupdr.v1.InitiateBackupRequest; - - /** - * Encodes the specified InitiateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. - * @param message InitiateBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IInitiateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InitiateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. - * @param message InitiateBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IInitiateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InitiateBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InitiateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InitiateBackupRequest; - - /** - * Decodes an InitiateBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InitiateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InitiateBackupRequest; - - /** - * Verifies an InitiateBackupRequest message. - * @param message Plain 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 InitiateBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InitiateBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InitiateBackupRequest; - - /** - * Creates a plain object from an InitiateBackupRequest message. Also converts values to other types if specified. - * @param message InitiateBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.InitiateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InitiateBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InitiateBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an InitiateBackupResponse. */ - interface IInitiateBackupResponse { - - /** InitiateBackupResponse backup */ - backup?: (string|null); - - /** InitiateBackupResponse newBackupGenerationId */ - newBackupGenerationId?: (number|null); - - /** InitiateBackupResponse baseBackupGenerationId */ - baseBackupGenerationId?: (number|null); - } - - /** Represents an InitiateBackupResponse. */ - class InitiateBackupResponse implements IInitiateBackupResponse { - - /** - * Constructs a new InitiateBackupResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IInitiateBackupResponse); - - /** InitiateBackupResponse backup. */ - public backup: string; - - /** InitiateBackupResponse newBackupGenerationId. */ - public newBackupGenerationId: number; - - /** InitiateBackupResponse baseBackupGenerationId. */ - public baseBackupGenerationId: number; - - /** - * Creates a new InitiateBackupResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns InitiateBackupResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IInitiateBackupResponse): google.cloud.backupdr.v1.InitiateBackupResponse; - - /** - * Encodes the specified InitiateBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. - * @param message InitiateBackupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IInitiateBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InitiateBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. - * @param message InitiateBackupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IInitiateBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InitiateBackupResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InitiateBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InitiateBackupResponse; - - /** - * Decodes an InitiateBackupResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InitiateBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InitiateBackupResponse; - - /** - * Verifies an InitiateBackupResponse message. - * @param message Plain 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 InitiateBackupResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InitiateBackupResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InitiateBackupResponse; - - /** - * Creates a plain object from an InitiateBackupResponse message. Also converts values to other types if specified. - * @param message InitiateBackupResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.InitiateBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InitiateBackupResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InitiateBackupResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AbandonBackupRequest. */ - interface IAbandonBackupRequest { - - /** AbandonBackupRequest dataSource */ - dataSource?: (string|null); - - /** AbandonBackupRequest requestId */ - requestId?: (string|null); - } - - /** Represents an AbandonBackupRequest. */ - class AbandonBackupRequest implements IAbandonBackupRequest { - - /** - * Constructs a new AbandonBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAbandonBackupRequest); - - /** AbandonBackupRequest dataSource. */ - public dataSource: string; - - /** AbandonBackupRequest requestId. */ - public requestId: string; - - /** - * Creates a new AbandonBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns AbandonBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAbandonBackupRequest): google.cloud.backupdr.v1.AbandonBackupRequest; - - /** - * Encodes the specified AbandonBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. - * @param message AbandonBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAbandonBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AbandonBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. - * @param message AbandonBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAbandonBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AbandonBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AbandonBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AbandonBackupRequest; - - /** - * Decodes an AbandonBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AbandonBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AbandonBackupRequest; - - /** - * Verifies an AbandonBackupRequest message. - * @param message Plain 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 AbandonBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AbandonBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AbandonBackupRequest; - - /** - * Creates a plain object from an AbandonBackupRequest message. Also converts values to other types if specified. - * @param message AbandonBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AbandonBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AbandonBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AbandonBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FinalizeBackupRequest. */ - interface IFinalizeBackupRequest { - - /** FinalizeBackupRequest dataSource */ - dataSource?: (string|null); - - /** FinalizeBackupRequest description */ - description?: (string|null); - - /** FinalizeBackupRequest consistencyTime */ - consistencyTime?: (google.protobuf.ITimestamp|null); - - /** FinalizeBackupRequest requestId */ - requestId?: (string|null); - - /** FinalizeBackupRequest backupId */ - backupId?: (string|null); - - /** FinalizeBackupRequest recoveryRangeStartTime */ - recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); - - /** FinalizeBackupRequest recoveryRangeEndTime */ - recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); - - /** FinalizeBackupRequest retentionDuration */ - retentionDuration?: (google.protobuf.IDuration|null); - } - - /** Represents a FinalizeBackupRequest. */ - class FinalizeBackupRequest implements IFinalizeBackupRequest { - - /** - * Constructs a new FinalizeBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IFinalizeBackupRequest); - - /** FinalizeBackupRequest dataSource. */ - public dataSource: string; - - /** FinalizeBackupRequest description. */ - public description?: (string|null); - - /** FinalizeBackupRequest consistencyTime. */ - public consistencyTime?: (google.protobuf.ITimestamp|null); - - /** FinalizeBackupRequest requestId. */ - public requestId: string; - - /** FinalizeBackupRequest backupId. */ - public backupId: string; - - /** FinalizeBackupRequest recoveryRangeStartTime. */ - public recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); - - /** FinalizeBackupRequest recoveryRangeEndTime. */ - public recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); - - /** FinalizeBackupRequest retentionDuration. */ - public retentionDuration?: (google.protobuf.IDuration|null); - - /** FinalizeBackupRequest _description. */ - public _description?: "description"; - - /** FinalizeBackupRequest _consistencyTime. */ - public _consistencyTime?: "consistencyTime"; - - /** FinalizeBackupRequest _recoveryRangeStartTime. */ - public _recoveryRangeStartTime?: "recoveryRangeStartTime"; - - /** FinalizeBackupRequest _recoveryRangeEndTime. */ - public _recoveryRangeEndTime?: "recoveryRangeEndTime"; - - /** FinalizeBackupRequest _retentionDuration. */ - public _retentionDuration?: "retentionDuration"; - - /** - * Creates a new FinalizeBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns FinalizeBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IFinalizeBackupRequest): google.cloud.backupdr.v1.FinalizeBackupRequest; - - /** - * Encodes the specified FinalizeBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. - * @param message FinalizeBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IFinalizeBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FinalizeBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. - * @param message FinalizeBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IFinalizeBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FinalizeBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FinalizeBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FinalizeBackupRequest; - - /** - * Decodes a FinalizeBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FinalizeBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FinalizeBackupRequest; - - /** - * Verifies a FinalizeBackupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FinalizeBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FinalizeBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FinalizeBackupRequest; - - /** - * Creates a plain object from a FinalizeBackupRequest message. Also converts values to other types if specified. - * @param message FinalizeBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.FinalizeBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FinalizeBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FinalizeBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchAccessTokenRequest. */ - interface IFetchAccessTokenRequest { - - /** FetchAccessTokenRequest name */ - name?: (string|null); - - /** FetchAccessTokenRequest generationId */ - generationId?: (number|null); - } - - /** Represents a FetchAccessTokenRequest. */ - class FetchAccessTokenRequest implements IFetchAccessTokenRequest { - - /** - * Constructs a new FetchAccessTokenRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IFetchAccessTokenRequest); - - /** FetchAccessTokenRequest name. */ - public name: string; - - /** FetchAccessTokenRequest generationId. */ - public generationId: number; - - /** - * Creates a new FetchAccessTokenRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchAccessTokenRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IFetchAccessTokenRequest): google.cloud.backupdr.v1.FetchAccessTokenRequest; - - /** - * Encodes the specified FetchAccessTokenRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. - * @param message FetchAccessTokenRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IFetchAccessTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchAccessTokenRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. - * @param message FetchAccessTokenRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchAccessTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchAccessTokenRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchAccessTokenRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchAccessTokenRequest; - - /** - * Decodes a FetchAccessTokenRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchAccessTokenRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchAccessTokenRequest; - - /** - * Verifies a FetchAccessTokenRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchAccessTokenRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchAccessTokenRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchAccessTokenRequest; - - /** - * Creates a plain object from a FetchAccessTokenRequest message. Also converts values to other types if specified. - * @param message FetchAccessTokenRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.FetchAccessTokenRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchAccessTokenRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchAccessTokenRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchAccessTokenResponse. */ - interface IFetchAccessTokenResponse { - - /** FetchAccessTokenResponse readLocation */ - readLocation?: (string|null); - - /** FetchAccessTokenResponse writeLocation */ - writeLocation?: (string|null); - - /** FetchAccessTokenResponse token */ - token?: (string|null); - - /** FetchAccessTokenResponse expireTime */ - expireTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a FetchAccessTokenResponse. */ - class FetchAccessTokenResponse implements IFetchAccessTokenResponse { - - /** - * Constructs a new FetchAccessTokenResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IFetchAccessTokenResponse); - - /** FetchAccessTokenResponse readLocation. */ - public readLocation: string; - - /** FetchAccessTokenResponse writeLocation. */ - public writeLocation: string; - - /** FetchAccessTokenResponse token. */ - public token: string; - - /** FetchAccessTokenResponse expireTime. */ - public expireTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new FetchAccessTokenResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchAccessTokenResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IFetchAccessTokenResponse): google.cloud.backupdr.v1.FetchAccessTokenResponse; - - /** - * Encodes the specified FetchAccessTokenResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. - * @param message FetchAccessTokenResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IFetchAccessTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchAccessTokenResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. - * @param message FetchAccessTokenResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchAccessTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchAccessTokenResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchAccessTokenResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchAccessTokenResponse; - - /** - * Decodes a FetchAccessTokenResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchAccessTokenResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchAccessTokenResponse; - - /** - * Verifies a FetchAccessTokenResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchAccessTokenResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchAccessTokenResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchAccessTokenResponse; - - /** - * Creates a plain object from a FetchAccessTokenResponse message. Also converts values to other types if specified. - * @param message FetchAccessTokenResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.FetchAccessTokenResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchAccessTokenResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchAccessTokenResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupsRequest. */ - interface IListBackupsRequest { - - /** ListBackupsRequest parent */ - parent?: (string|null); - - /** ListBackupsRequest pageSize */ - pageSize?: (number|null); - - /** ListBackupsRequest pageToken */ - pageToken?: (string|null); - - /** ListBackupsRequest filter */ - filter?: (string|null); - - /** ListBackupsRequest orderBy */ - orderBy?: (string|null); - - /** ListBackupsRequest view */ - view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); - } - - /** Represents a ListBackupsRequest. */ - class ListBackupsRequest implements IListBackupsRequest { - - /** - * Constructs a new ListBackupsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupsRequest); - - /** ListBackupsRequest parent. */ - public parent: string; - - /** ListBackupsRequest pageSize. */ - public pageSize: number; - - /** ListBackupsRequest pageToken. */ - public pageToken: string; - - /** ListBackupsRequest filter. */ - public filter: string; - - /** ListBackupsRequest orderBy. */ - public orderBy: string; - - /** ListBackupsRequest view. */ - public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); - - /** - * Creates a new ListBackupsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupsRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupsRequest): google.cloud.backupdr.v1.ListBackupsRequest; - - /** - * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. - * @param message ListBackupsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. - * @param message ListBackupsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupsRequest; - - /** - * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupsRequest; - - /** - * Verifies a ListBackupsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupsRequest; - - /** - * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. - * @param message ListBackupsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupsResponse. */ - interface IListBackupsResponse { - - /** ListBackupsResponse backups */ - backups?: (google.cloud.backupdr.v1.IBackup[]|null); - - /** ListBackupsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListBackupsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListBackupsResponse. */ - class ListBackupsResponse implements IListBackupsResponse { - - /** - * Constructs a new ListBackupsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupsResponse); - - /** ListBackupsResponse backups. */ - public backups: google.cloud.backupdr.v1.IBackup[]; - - /** ListBackupsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListBackupsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListBackupsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupsResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupsResponse): google.cloud.backupdr.v1.ListBackupsResponse; - - /** - * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. - * @param message ListBackupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. - * @param message ListBackupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupsResponse; - - /** - * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupsResponse; - - /** - * Verifies a ListBackupsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupsResponse; - - /** - * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. - * @param message ListBackupsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetBackupRequest. */ - interface IGetBackupRequest { - - /** GetBackupRequest name */ - name?: (string|null); - - /** GetBackupRequest view */ - view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); - } - - /** Represents a GetBackupRequest. */ - class GetBackupRequest implements IGetBackupRequest { - - /** - * Constructs a new GetBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetBackupRequest); - - /** GetBackupRequest name. */ - public name: string; - - /** GetBackupRequest view. */ - public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); - - /** - * Creates a new GetBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetBackupRequest): google.cloud.backupdr.v1.GetBackupRequest; - - /** - * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. - * @param message GetBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. - * @param message GetBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupRequest; - - /** - * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupRequest; - - /** - * Verifies a GetBackupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupRequest; - - /** - * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. - * @param message GetBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateBackupRequest. */ - interface IUpdateBackupRequest { - - /** UpdateBackupRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateBackupRequest backup */ - backup?: (google.cloud.backupdr.v1.IBackup|null); - - /** UpdateBackupRequest requestId */ - requestId?: (string|null); - } - - /** Represents an UpdateBackupRequest. */ - class UpdateBackupRequest implements IUpdateBackupRequest { - - /** - * Constructs a new UpdateBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IUpdateBackupRequest); - - /** UpdateBackupRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateBackupRequest backup. */ - public backup?: (google.cloud.backupdr.v1.IBackup|null); - - /** UpdateBackupRequest requestId. */ - public requestId: string; - - /** - * Creates a new UpdateBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IUpdateBackupRequest): google.cloud.backupdr.v1.UpdateBackupRequest; - - /** - * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. - * @param message UpdateBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. - * @param message UpdateBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateBackupRequest; - - /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateBackupRequest; - - /** - * Verifies an UpdateBackupRequest message. - * @param message Plain 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 UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateBackupRequest; - - /** - * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. - * @param message UpdateBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.UpdateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteBackupRequest. */ - interface IDeleteBackupRequest { - - /** DeleteBackupRequest name */ - name?: (string|null); - - /** DeleteBackupRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteBackupRequest. */ - class DeleteBackupRequest implements IDeleteBackupRequest { - - /** - * Constructs a new DeleteBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupRequest); - - /** DeleteBackupRequest name. */ - public name: string; - - /** DeleteBackupRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupRequest): google.cloud.backupdr.v1.DeleteBackupRequest; - - /** - * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. - * @param message DeleteBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. - * @param message DeleteBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupRequest; - - /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupRequest; - - /** - * Verifies a DeleteBackupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupRequest; - - /** - * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. - * @param message DeleteBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DeleteBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RestoreBackupRequest. */ - interface IRestoreBackupRequest { - - /** RestoreBackupRequest name */ - name?: (string|null); - - /** RestoreBackupRequest requestId */ - requestId?: (string|null); - - /** RestoreBackupRequest computeInstanceTargetEnvironment */ - computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null); - - /** RestoreBackupRequest computeInstanceRestoreProperties */ - computeInstanceRestoreProperties?: (google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null); - } - - /** Represents a RestoreBackupRequest. */ - class RestoreBackupRequest implements IRestoreBackupRequest { - - /** - * Constructs a new RestoreBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IRestoreBackupRequest); - - /** RestoreBackupRequest name. */ - public name: string; - - /** RestoreBackupRequest requestId. */ - public requestId: string; - - /** RestoreBackupRequest computeInstanceTargetEnvironment. */ - public computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null); - - /** RestoreBackupRequest computeInstanceRestoreProperties. */ - public computeInstanceRestoreProperties?: (google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null); - - /** RestoreBackupRequest targetEnvironment. */ - public targetEnvironment?: "computeInstanceTargetEnvironment"; - - /** RestoreBackupRequest instanceProperties. */ - public instanceProperties?: "computeInstanceRestoreProperties"; - - /** - * Creates a new RestoreBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RestoreBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IRestoreBackupRequest): google.cloud.backupdr.v1.RestoreBackupRequest; - - /** - * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. - * @param message RestoreBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. - * @param message RestoreBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RestoreBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RestoreBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RestoreBackupRequest; - - /** - * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RestoreBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RestoreBackupRequest; - - /** - * Verifies a RestoreBackupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RestoreBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RestoreBackupRequest; - - /** - * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. - * @param message RestoreBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.RestoreBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RestoreBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RestoreBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RestoreBackupResponse. */ - interface IRestoreBackupResponse { - - /** RestoreBackupResponse targetResource */ - targetResource?: (google.cloud.backupdr.v1.ITargetResource|null); - } - - /** Represents a RestoreBackupResponse. */ - class RestoreBackupResponse implements IRestoreBackupResponse { - - /** - * Constructs a new RestoreBackupResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IRestoreBackupResponse); - - /** RestoreBackupResponse targetResource. */ - public targetResource?: (google.cloud.backupdr.v1.ITargetResource|null); - - /** - * Creates a new RestoreBackupResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RestoreBackupResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IRestoreBackupResponse): google.cloud.backupdr.v1.RestoreBackupResponse; - - /** - * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. - * @param message RestoreBackupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. - * @param message RestoreBackupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RestoreBackupResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RestoreBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RestoreBackupResponse; - - /** - * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RestoreBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RestoreBackupResponse; - - /** - * Verifies a RestoreBackupResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RestoreBackupResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RestoreBackupResponse; - - /** - * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. - * @param message RestoreBackupResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.RestoreBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RestoreBackupResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RestoreBackupResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TargetResource. */ - interface ITargetResource { - - /** TargetResource gcpResource */ - gcpResource?: (google.cloud.backupdr.v1.IGcpResource|null); - } - - /** Represents a TargetResource. */ - class TargetResource implements ITargetResource { - - /** - * Constructs a new TargetResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ITargetResource); - - /** TargetResource gcpResource. */ - public gcpResource?: (google.cloud.backupdr.v1.IGcpResource|null); - - /** TargetResource targetResourceInfo. */ - public targetResourceInfo?: "gcpResource"; - - /** - * Creates a new TargetResource instance using the specified properties. - * @param [properties] Properties to set - * @returns TargetResource instance - */ - public static create(properties?: google.cloud.backupdr.v1.ITargetResource): google.cloud.backupdr.v1.TargetResource; - - /** - * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. - * @param message TargetResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. - * @param message TargetResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TargetResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TargetResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.TargetResource; - - /** - * Decodes a TargetResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TargetResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.TargetResource; - - /** - * Verifies a TargetResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TargetResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.TargetResource; - - /** - * Creates a plain object from a TargetResource message. Also converts values to other types if specified. - * @param message TargetResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.TargetResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TargetResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TargetResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GcpResource. */ - interface IGcpResource { - - /** GcpResource gcpResourcename */ - gcpResourcename?: (string|null); - - /** GcpResource location */ - location?: (string|null); - - /** GcpResource type */ - type?: (string|null); - } - - /** Represents a GcpResource. */ - class GcpResource implements IGcpResource { - - /** - * Constructs a new GcpResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGcpResource); - - /** GcpResource gcpResourcename. */ - public gcpResourcename: string; - - /** GcpResource location. */ - public location: string; - - /** GcpResource type. */ - public type: string; - - /** - * Creates a new GcpResource instance using the specified properties. - * @param [properties] Properties to set - * @returns GcpResource instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGcpResource): google.cloud.backupdr.v1.GcpResource; - - /** - * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. - * @param message GcpResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. - * @param message GcpResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcpResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GcpResource; - - /** - * Decodes a GcpResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GcpResource; - - /** - * Verifies a GcpResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcpResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GcpResource; - - /** - * Creates a plain object from a GcpResource message. Also converts values to other types if specified. - * @param message GcpResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcpResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcpResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** BackupConfigState enum. */ - enum BackupConfigState { - BACKUP_CONFIG_STATE_UNSPECIFIED = 0, - ACTIVE = 1, - PASSIVE = 2 - } - - /** BackupView enum. */ - enum BackupView { - BACKUP_VIEW_UNSPECIFIED = 0, - BACKUP_VIEW_BASIC = 1, - BACKUP_VIEW_FULL = 2 - } - - /** BackupVaultView enum. */ - enum BackupVaultView { - BACKUP_VAULT_VIEW_UNSPECIFIED = 0, - BACKUP_VAULT_VIEW_BASIC = 1, - BACKUP_VAULT_VIEW_FULL = 2 - } - - /** Properties of a BackupApplianceBackupProperties. */ - interface IBackupApplianceBackupProperties { - - /** BackupApplianceBackupProperties generationId */ - generationId?: (number|null); - - /** BackupApplianceBackupProperties finalizeTime */ - finalizeTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties recoveryRangeStartTime */ - recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties recoveryRangeEndTime */ - recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a BackupApplianceBackupProperties. */ - class BackupApplianceBackupProperties implements IBackupApplianceBackupProperties { - - /** - * Constructs a new BackupApplianceBackupProperties. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupProperties); - - /** BackupApplianceBackupProperties generationId. */ - public generationId?: (number|null); - - /** BackupApplianceBackupProperties finalizeTime. */ - public finalizeTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties recoveryRangeStartTime. */ - public recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties recoveryRangeEndTime. */ - public recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties _generationId. */ - public _generationId?: "generationId"; - - /** BackupApplianceBackupProperties _finalizeTime. */ - public _finalizeTime?: "finalizeTime"; - - /** BackupApplianceBackupProperties _recoveryRangeStartTime. */ - public _recoveryRangeStartTime?: "recoveryRangeStartTime"; - - /** BackupApplianceBackupProperties _recoveryRangeEndTime. */ - public _recoveryRangeEndTime?: "recoveryRangeEndTime"; - - /** - * Creates a new BackupApplianceBackupProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupApplianceBackupProperties instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupProperties): google.cloud.backupdr.v1.BackupApplianceBackupProperties; - - /** - * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. - * @param message BackupApplianceBackupProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. - * @param message BackupApplianceBackupProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupApplianceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceBackupProperties; - - /** - * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupApplianceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceBackupProperties; - - /** - * Verifies a BackupApplianceBackupProperties message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupApplianceBackupProperties - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceBackupProperties; - - /** - * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. - * @param message BackupApplianceBackupProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupApplianceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupApplianceBackupProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupApplianceBackupProperties - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ComputeInstanceBackupProperties. */ - interface IComputeInstanceBackupProperties { - - /** ComputeInstanceBackupProperties description */ - description?: (string|null); - - /** ComputeInstanceBackupProperties tags */ - tags?: (google.cloud.backupdr.v1.ITags|null); - - /** ComputeInstanceBackupProperties machineType */ - machineType?: (string|null); - - /** ComputeInstanceBackupProperties canIpForward */ - canIpForward?: (boolean|null); - - /** ComputeInstanceBackupProperties networkInterface */ - networkInterface?: (google.cloud.backupdr.v1.INetworkInterface[]|null); - - /** ComputeInstanceBackupProperties disk */ - disk?: (google.cloud.backupdr.v1.IAttachedDisk[]|null); - - /** ComputeInstanceBackupProperties metadata */ - metadata?: (google.cloud.backupdr.v1.IMetadata|null); - - /** ComputeInstanceBackupProperties serviceAccount */ - serviceAccount?: (google.cloud.backupdr.v1.IServiceAccount[]|null); - - /** ComputeInstanceBackupProperties scheduling */ - scheduling?: (google.cloud.backupdr.v1.IScheduling|null); - - /** ComputeInstanceBackupProperties guestAccelerator */ - guestAccelerator?: (google.cloud.backupdr.v1.IAcceleratorConfig[]|null); - - /** ComputeInstanceBackupProperties minCpuPlatform */ - minCpuPlatform?: (string|null); - - /** ComputeInstanceBackupProperties keyRevocationActionType */ - keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); - - /** ComputeInstanceBackupProperties sourceInstance */ - sourceInstance?: (string|null); - - /** ComputeInstanceBackupProperties labels */ - labels?: ({ [k: string]: string }|null); - } - - /** Represents a ComputeInstanceBackupProperties. */ - class ComputeInstanceBackupProperties implements IComputeInstanceBackupProperties { - - /** - * Constructs a new ComputeInstanceBackupProperties. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceBackupProperties); - - /** ComputeInstanceBackupProperties description. */ - public description?: (string|null); - - /** ComputeInstanceBackupProperties tags. */ - public tags?: (google.cloud.backupdr.v1.ITags|null); - - /** ComputeInstanceBackupProperties machineType. */ - public machineType?: (string|null); - - /** ComputeInstanceBackupProperties canIpForward. */ - public canIpForward?: (boolean|null); - - /** ComputeInstanceBackupProperties networkInterface. */ - public networkInterface: google.cloud.backupdr.v1.INetworkInterface[]; - - /** ComputeInstanceBackupProperties disk. */ - public disk: google.cloud.backupdr.v1.IAttachedDisk[]; - - /** ComputeInstanceBackupProperties metadata. */ - public metadata?: (google.cloud.backupdr.v1.IMetadata|null); - - /** ComputeInstanceBackupProperties serviceAccount. */ - public serviceAccount: google.cloud.backupdr.v1.IServiceAccount[]; - - /** ComputeInstanceBackupProperties scheduling. */ - public scheduling?: (google.cloud.backupdr.v1.IScheduling|null); - - /** ComputeInstanceBackupProperties guestAccelerator. */ - public guestAccelerator: google.cloud.backupdr.v1.IAcceleratorConfig[]; - - /** ComputeInstanceBackupProperties minCpuPlatform. */ - public minCpuPlatform?: (string|null); - - /** ComputeInstanceBackupProperties keyRevocationActionType. */ - public keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); - - /** ComputeInstanceBackupProperties sourceInstance. */ - public sourceInstance?: (string|null); - - /** ComputeInstanceBackupProperties labels. */ - public labels: { [k: string]: string }; - - /** ComputeInstanceBackupProperties _description. */ - public _description?: "description"; - - /** ComputeInstanceBackupProperties _tags. */ - public _tags?: "tags"; - - /** ComputeInstanceBackupProperties _machineType. */ - public _machineType?: "machineType"; - - /** ComputeInstanceBackupProperties _canIpForward. */ - public _canIpForward?: "canIpForward"; - - /** ComputeInstanceBackupProperties _metadata. */ - public _metadata?: "metadata"; - - /** ComputeInstanceBackupProperties _scheduling. */ - public _scheduling?: "scheduling"; - - /** ComputeInstanceBackupProperties _minCpuPlatform. */ - public _minCpuPlatform?: "minCpuPlatform"; - - /** ComputeInstanceBackupProperties _keyRevocationActionType. */ - public _keyRevocationActionType?: "keyRevocationActionType"; - - /** ComputeInstanceBackupProperties _sourceInstance. */ - public _sourceInstance?: "sourceInstance"; - - /** - * Creates a new ComputeInstanceBackupProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns ComputeInstanceBackupProperties instance - */ - public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceBackupProperties): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; - - /** - * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. - * @param message ComputeInstanceBackupProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. - * @param message ComputeInstanceBackupProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComputeInstanceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; - - /** - * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComputeInstanceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; - - /** - * Verifies a ComputeInstanceBackupProperties message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComputeInstanceBackupProperties - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; - - /** - * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. - * @param message ComputeInstanceBackupProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComputeInstanceBackupProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComputeInstanceBackupProperties - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ComputeInstanceRestoreProperties. */ - interface IComputeInstanceRestoreProperties { - - /** ComputeInstanceRestoreProperties name */ - name?: (string|null); - - /** ComputeInstanceRestoreProperties advancedMachineFeatures */ - advancedMachineFeatures?: (google.cloud.backupdr.v1.IAdvancedMachineFeatures|null); - - /** ComputeInstanceRestoreProperties canIpForward */ - canIpForward?: (boolean|null); - - /** ComputeInstanceRestoreProperties confidentialInstanceConfig */ - confidentialInstanceConfig?: (google.cloud.backupdr.v1.IConfidentialInstanceConfig|null); - - /** ComputeInstanceRestoreProperties deletionProtection */ - deletionProtection?: (boolean|null); - - /** ComputeInstanceRestoreProperties description */ - description?: (string|null); - - /** ComputeInstanceRestoreProperties disks */ - disks?: (google.cloud.backupdr.v1.IAttachedDisk[]|null); - - /** ComputeInstanceRestoreProperties displayDevice */ - displayDevice?: (google.cloud.backupdr.v1.IDisplayDevice|null); - - /** ComputeInstanceRestoreProperties guestAccelerators */ - guestAccelerators?: (google.cloud.backupdr.v1.IAcceleratorConfig[]|null); - - /** ComputeInstanceRestoreProperties hostname */ - hostname?: (string|null); - - /** ComputeInstanceRestoreProperties instanceEncryptionKey */ - instanceEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); - - /** ComputeInstanceRestoreProperties keyRevocationActionType */ - keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); - - /** ComputeInstanceRestoreProperties labels */ - labels?: ({ [k: string]: string }|null); - - /** ComputeInstanceRestoreProperties machineType */ - machineType?: (string|null); - - /** ComputeInstanceRestoreProperties metadata */ - metadata?: (google.cloud.backupdr.v1.IMetadata|null); - - /** ComputeInstanceRestoreProperties minCpuPlatform */ - minCpuPlatform?: (string|null); - - /** ComputeInstanceRestoreProperties networkInterfaces */ - networkInterfaces?: (google.cloud.backupdr.v1.INetworkInterface[]|null); - - /** ComputeInstanceRestoreProperties networkPerformanceConfig */ - networkPerformanceConfig?: (google.cloud.backupdr.v1.INetworkPerformanceConfig|null); - - /** ComputeInstanceRestoreProperties params */ - params?: (google.cloud.backupdr.v1.IInstanceParams|null); - - /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess */ - privateIpv6GoogleAccess?: (google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); - - /** ComputeInstanceRestoreProperties allocationAffinity */ - allocationAffinity?: (google.cloud.backupdr.v1.IAllocationAffinity|null); - - /** ComputeInstanceRestoreProperties resourcePolicies */ - resourcePolicies?: (string[]|null); - - /** ComputeInstanceRestoreProperties scheduling */ - scheduling?: (google.cloud.backupdr.v1.IScheduling|null); - - /** ComputeInstanceRestoreProperties serviceAccounts */ - serviceAccounts?: (google.cloud.backupdr.v1.IServiceAccount[]|null); - - /** ComputeInstanceRestoreProperties tags */ - tags?: (google.cloud.backupdr.v1.ITags|null); - } - - /** Represents a ComputeInstanceRestoreProperties. */ - class ComputeInstanceRestoreProperties implements IComputeInstanceRestoreProperties { - - /** - * Constructs a new ComputeInstanceRestoreProperties. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties); - - /** ComputeInstanceRestoreProperties name. */ - public name?: (string|null); - - /** ComputeInstanceRestoreProperties advancedMachineFeatures. */ - public advancedMachineFeatures?: (google.cloud.backupdr.v1.IAdvancedMachineFeatures|null); - - /** ComputeInstanceRestoreProperties canIpForward. */ - public canIpForward?: (boolean|null); - - /** ComputeInstanceRestoreProperties confidentialInstanceConfig. */ - public confidentialInstanceConfig?: (google.cloud.backupdr.v1.IConfidentialInstanceConfig|null); - - /** ComputeInstanceRestoreProperties deletionProtection. */ - public deletionProtection?: (boolean|null); - - /** ComputeInstanceRestoreProperties description. */ - public description?: (string|null); - - /** ComputeInstanceRestoreProperties disks. */ - public disks: google.cloud.backupdr.v1.IAttachedDisk[]; - - /** ComputeInstanceRestoreProperties displayDevice. */ - public displayDevice?: (google.cloud.backupdr.v1.IDisplayDevice|null); - - /** ComputeInstanceRestoreProperties guestAccelerators. */ - public guestAccelerators: google.cloud.backupdr.v1.IAcceleratorConfig[]; - - /** ComputeInstanceRestoreProperties hostname. */ - public hostname?: (string|null); - - /** ComputeInstanceRestoreProperties instanceEncryptionKey. */ - public instanceEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); - - /** ComputeInstanceRestoreProperties keyRevocationActionType. */ - public keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); - - /** ComputeInstanceRestoreProperties labels. */ - public labels: { [k: string]: string }; - - /** ComputeInstanceRestoreProperties machineType. */ - public machineType?: (string|null); - - /** ComputeInstanceRestoreProperties metadata. */ - public metadata?: (google.cloud.backupdr.v1.IMetadata|null); - - /** ComputeInstanceRestoreProperties minCpuPlatform. */ - public minCpuPlatform?: (string|null); - - /** ComputeInstanceRestoreProperties networkInterfaces. */ - public networkInterfaces: google.cloud.backupdr.v1.INetworkInterface[]; - - /** ComputeInstanceRestoreProperties networkPerformanceConfig. */ - public networkPerformanceConfig?: (google.cloud.backupdr.v1.INetworkPerformanceConfig|null); - - /** ComputeInstanceRestoreProperties params. */ - public params?: (google.cloud.backupdr.v1.IInstanceParams|null); - - /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess. */ - public privateIpv6GoogleAccess?: (google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); - - /** ComputeInstanceRestoreProperties allocationAffinity. */ - public allocationAffinity?: (google.cloud.backupdr.v1.IAllocationAffinity|null); - - /** ComputeInstanceRestoreProperties resourcePolicies. */ - public resourcePolicies: string[]; - - /** ComputeInstanceRestoreProperties scheduling. */ - public scheduling?: (google.cloud.backupdr.v1.IScheduling|null); - - /** ComputeInstanceRestoreProperties serviceAccounts. */ - public serviceAccounts: google.cloud.backupdr.v1.IServiceAccount[]; - - /** ComputeInstanceRestoreProperties tags. */ - public tags?: (google.cloud.backupdr.v1.ITags|null); - - /** ComputeInstanceRestoreProperties _name. */ - public _name?: "name"; - - /** ComputeInstanceRestoreProperties _advancedMachineFeatures. */ - public _advancedMachineFeatures?: "advancedMachineFeatures"; - - /** ComputeInstanceRestoreProperties _canIpForward. */ - public _canIpForward?: "canIpForward"; - - /** ComputeInstanceRestoreProperties _confidentialInstanceConfig. */ - public _confidentialInstanceConfig?: "confidentialInstanceConfig"; - - /** ComputeInstanceRestoreProperties _deletionProtection. */ - public _deletionProtection?: "deletionProtection"; - - /** ComputeInstanceRestoreProperties _description. */ - public _description?: "description"; - - /** ComputeInstanceRestoreProperties _displayDevice. */ - public _displayDevice?: "displayDevice"; - - /** ComputeInstanceRestoreProperties _hostname. */ - public _hostname?: "hostname"; - - /** ComputeInstanceRestoreProperties _instanceEncryptionKey. */ - public _instanceEncryptionKey?: "instanceEncryptionKey"; - - /** ComputeInstanceRestoreProperties _keyRevocationActionType. */ - public _keyRevocationActionType?: "keyRevocationActionType"; - - /** ComputeInstanceRestoreProperties _machineType. */ - public _machineType?: "machineType"; - - /** ComputeInstanceRestoreProperties _metadata. */ - public _metadata?: "metadata"; - - /** ComputeInstanceRestoreProperties _minCpuPlatform. */ - public _minCpuPlatform?: "minCpuPlatform"; - - /** ComputeInstanceRestoreProperties _networkPerformanceConfig. */ - public _networkPerformanceConfig?: "networkPerformanceConfig"; - - /** ComputeInstanceRestoreProperties _params. */ - public _params?: "params"; - - /** ComputeInstanceRestoreProperties _privateIpv6GoogleAccess. */ - public _privateIpv6GoogleAccess?: "privateIpv6GoogleAccess"; - - /** ComputeInstanceRestoreProperties _allocationAffinity. */ - public _allocationAffinity?: "allocationAffinity"; - - /** ComputeInstanceRestoreProperties _scheduling. */ - public _scheduling?: "scheduling"; - - /** ComputeInstanceRestoreProperties _tags. */ - public _tags?: "tags"; - - /** - * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns ComputeInstanceRestoreProperties instance - */ - public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; - - /** - * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. - * @param message ComputeInstanceRestoreProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. - * @param message ComputeInstanceRestoreProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComputeInstanceRestoreProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; - - /** - * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComputeInstanceRestoreProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; - - /** - * Verifies a ComputeInstanceRestoreProperties message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComputeInstanceRestoreProperties - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; - - /** - * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. - * @param message ComputeInstanceRestoreProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceRestoreProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComputeInstanceRestoreProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComputeInstanceRestoreProperties - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ComputeInstanceRestoreProperties { - - /** InstancePrivateIpv6GoogleAccess enum. */ - enum InstancePrivateIpv6GoogleAccess { - INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0, - INHERIT_FROM_SUBNETWORK = 1, - ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2, - ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3 - } - } - - /** Properties of a ComputeInstanceTargetEnvironment. */ - interface IComputeInstanceTargetEnvironment { - - /** ComputeInstanceTargetEnvironment project */ - project?: (string|null); - - /** ComputeInstanceTargetEnvironment zone */ - zone?: (string|null); - } - - /** Represents a ComputeInstanceTargetEnvironment. */ - class ComputeInstanceTargetEnvironment implements IComputeInstanceTargetEnvironment { - - /** - * Constructs a new ComputeInstanceTargetEnvironment. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment); - - /** ComputeInstanceTargetEnvironment project. */ - public project: string; - - /** ComputeInstanceTargetEnvironment zone. */ - public zone: string; - - /** - * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. - * @param [properties] Properties to set - * @returns ComputeInstanceTargetEnvironment instance - */ - public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; - - /** - * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. - * @param message ComputeInstanceTargetEnvironment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. - * @param message ComputeInstanceTargetEnvironment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComputeInstanceTargetEnvironment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; - - /** - * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComputeInstanceTargetEnvironment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; - - /** - * Verifies a ComputeInstanceTargetEnvironment message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComputeInstanceTargetEnvironment - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; - - /** - * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. - * @param message ComputeInstanceTargetEnvironment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComputeInstanceTargetEnvironment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComputeInstanceTargetEnvironment - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ComputeInstanceDataSourceProperties. */ - interface IComputeInstanceDataSourceProperties { - - /** ComputeInstanceDataSourceProperties name */ - name?: (string|null); - - /** ComputeInstanceDataSourceProperties description */ - description?: (string|null); - - /** ComputeInstanceDataSourceProperties machineType */ - machineType?: (string|null); - - /** ComputeInstanceDataSourceProperties totalDiskCount */ - totalDiskCount?: (number|Long|string|null); - - /** ComputeInstanceDataSourceProperties totalDiskSizeGb */ - totalDiskSizeGb?: (number|Long|string|null); - } - - /** Represents a ComputeInstanceDataSourceProperties. */ - class ComputeInstanceDataSourceProperties implements IComputeInstanceDataSourceProperties { - - /** - * Constructs a new ComputeInstanceDataSourceProperties. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties); - - /** ComputeInstanceDataSourceProperties name. */ - public name: string; - - /** ComputeInstanceDataSourceProperties description. */ - public description: string; - - /** ComputeInstanceDataSourceProperties machineType. */ - public machineType: string; - - /** ComputeInstanceDataSourceProperties totalDiskCount. */ - public totalDiskCount: (number|Long|string); - - /** ComputeInstanceDataSourceProperties totalDiskSizeGb. */ - public totalDiskSizeGb: (number|Long|string); - - /** - * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns ComputeInstanceDataSourceProperties instance - */ - public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; - - /** - * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. - * @param message ComputeInstanceDataSourceProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. - * @param message ComputeInstanceDataSourceProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComputeInstanceDataSourceProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; - - /** - * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComputeInstanceDataSourceProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; - - /** - * Verifies a ComputeInstanceDataSourceProperties message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComputeInstanceDataSourceProperties - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; - - /** - * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. - * @param message ComputeInstanceDataSourceProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComputeInstanceDataSourceProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComputeInstanceDataSourceProperties - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AdvancedMachineFeatures. */ - interface IAdvancedMachineFeatures { - - /** AdvancedMachineFeatures enableNestedVirtualization */ - enableNestedVirtualization?: (boolean|null); - - /** AdvancedMachineFeatures threadsPerCore */ - threadsPerCore?: (number|null); - - /** AdvancedMachineFeatures visibleCoreCount */ - visibleCoreCount?: (number|null); - - /** AdvancedMachineFeatures enableUefiNetworking */ - enableUefiNetworking?: (boolean|null); - } - - /** Represents an AdvancedMachineFeatures. */ - class AdvancedMachineFeatures implements IAdvancedMachineFeatures { - - /** - * Constructs a new AdvancedMachineFeatures. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAdvancedMachineFeatures); - - /** AdvancedMachineFeatures enableNestedVirtualization. */ - public enableNestedVirtualization?: (boolean|null); - - /** AdvancedMachineFeatures threadsPerCore. */ - public threadsPerCore?: (number|null); - - /** AdvancedMachineFeatures visibleCoreCount. */ - public visibleCoreCount?: (number|null); - - /** AdvancedMachineFeatures enableUefiNetworking. */ - public enableUefiNetworking?: (boolean|null); - - /** AdvancedMachineFeatures _enableNestedVirtualization. */ - public _enableNestedVirtualization?: "enableNestedVirtualization"; - - /** AdvancedMachineFeatures _threadsPerCore. */ - public _threadsPerCore?: "threadsPerCore"; - - /** AdvancedMachineFeatures _visibleCoreCount. */ - public _visibleCoreCount?: "visibleCoreCount"; - - /** AdvancedMachineFeatures _enableUefiNetworking. */ - public _enableUefiNetworking?: "enableUefiNetworking"; - - /** - * Creates a new AdvancedMachineFeatures instance using the specified properties. - * @param [properties] Properties to set - * @returns AdvancedMachineFeatures instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAdvancedMachineFeatures): google.cloud.backupdr.v1.AdvancedMachineFeatures; - - /** - * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. - * @param message AdvancedMachineFeatures message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. - * @param message AdvancedMachineFeatures message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AdvancedMachineFeatures; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AdvancedMachineFeatures; - - /** - * Verifies an AdvancedMachineFeatures message. - * @param message Plain 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 AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AdvancedMachineFeatures - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AdvancedMachineFeatures; - - /** - * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. - * @param message AdvancedMachineFeatures - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AdvancedMachineFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AdvancedMachineFeatures to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AdvancedMachineFeatures - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ConfidentialInstanceConfig. */ - interface IConfidentialInstanceConfig { - - /** ConfidentialInstanceConfig enableConfidentialCompute */ - enableConfidentialCompute?: (boolean|null); - } - - /** Represents a ConfidentialInstanceConfig. */ - class ConfidentialInstanceConfig implements IConfidentialInstanceConfig { - - /** - * Constructs a new ConfidentialInstanceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IConfidentialInstanceConfig); - - /** ConfidentialInstanceConfig enableConfidentialCompute. */ - public enableConfidentialCompute?: (boolean|null); - - /** ConfidentialInstanceConfig _enableConfidentialCompute. */ - public _enableConfidentialCompute?: "enableConfidentialCompute"; - - /** - * Creates a new ConfidentialInstanceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfidentialInstanceConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.IConfidentialInstanceConfig): google.cloud.backupdr.v1.ConfidentialInstanceConfig; - - /** - * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. - * @param message ConfidentialInstanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. - * @param message ConfidentialInstanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfidentialInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ConfidentialInstanceConfig; - - /** - * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfidentialInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ConfidentialInstanceConfig; - - /** - * Verifies a ConfidentialInstanceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfidentialInstanceConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ConfidentialInstanceConfig; - - /** - * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. - * @param message ConfidentialInstanceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ConfidentialInstanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConfidentialInstanceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConfidentialInstanceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DisplayDevice. */ - interface IDisplayDevice { - - /** DisplayDevice enableDisplay */ - enableDisplay?: (boolean|null); - } - - /** Represents a DisplayDevice. */ - class DisplayDevice implements IDisplayDevice { - - /** - * Constructs a new DisplayDevice. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDisplayDevice); - - /** DisplayDevice enableDisplay. */ - public enableDisplay?: (boolean|null); - - /** DisplayDevice _enableDisplay. */ - public _enableDisplay?: "enableDisplay"; - - /** - * Creates a new DisplayDevice instance using the specified properties. - * @param [properties] Properties to set - * @returns DisplayDevice instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDisplayDevice): google.cloud.backupdr.v1.DisplayDevice; - - /** - * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. - * @param message DisplayDevice message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. - * @param message DisplayDevice message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DisplayDevice message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DisplayDevice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DisplayDevice; - - /** - * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DisplayDevice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DisplayDevice; - - /** - * Verifies a DisplayDevice message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DisplayDevice - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DisplayDevice; - - /** - * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. - * @param message DisplayDevice - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DisplayDevice, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DisplayDevice to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DisplayDevice - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AcceleratorConfig. */ - interface IAcceleratorConfig { - - /** AcceleratorConfig acceleratorType */ - acceleratorType?: (string|null); - - /** AcceleratorConfig acceleratorCount */ - acceleratorCount?: (number|null); - } - - /** Represents an AcceleratorConfig. */ - class AcceleratorConfig implements IAcceleratorConfig { - - /** - * Constructs a new AcceleratorConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAcceleratorConfig); - - /** AcceleratorConfig acceleratorType. */ - public acceleratorType?: (string|null); - - /** AcceleratorConfig acceleratorCount. */ - public acceleratorCount?: (number|null); - - /** AcceleratorConfig _acceleratorType. */ - public _acceleratorType?: "acceleratorType"; - - /** AcceleratorConfig _acceleratorCount. */ - public _acceleratorCount?: "acceleratorCount"; - - /** - * Creates a new AcceleratorConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AcceleratorConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAcceleratorConfig): google.cloud.backupdr.v1.AcceleratorConfig; - - /** - * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. - * @param message AcceleratorConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. - * @param message AcceleratorConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AcceleratorConfig; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AcceleratorConfig; - - /** - * Verifies an AcceleratorConfig message. - * @param message Plain 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 AcceleratorConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AcceleratorConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AcceleratorConfig; - - /** - * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. - * @param message AcceleratorConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AcceleratorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AcceleratorConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AcceleratorConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CustomerEncryptionKey. */ - interface ICustomerEncryptionKey { - - /** CustomerEncryptionKey rawKey */ - rawKey?: (string|null); - - /** CustomerEncryptionKey rsaEncryptedKey */ - rsaEncryptedKey?: (string|null); - - /** CustomerEncryptionKey kmsKeyName */ - kmsKeyName?: (string|null); - - /** CustomerEncryptionKey kmsKeyServiceAccount */ - kmsKeyServiceAccount?: (string|null); - } - - /** Represents a CustomerEncryptionKey. */ - class CustomerEncryptionKey implements ICustomerEncryptionKey { - - /** - * Constructs a new CustomerEncryptionKey. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ICustomerEncryptionKey); - - /** CustomerEncryptionKey rawKey. */ - public rawKey?: (string|null); - - /** CustomerEncryptionKey rsaEncryptedKey. */ - public rsaEncryptedKey?: (string|null); - - /** CustomerEncryptionKey kmsKeyName. */ - public kmsKeyName?: (string|null); - - /** CustomerEncryptionKey kmsKeyServiceAccount. */ - public kmsKeyServiceAccount?: (string|null); - - /** CustomerEncryptionKey key. */ - public key?: ("rawKey"|"rsaEncryptedKey"|"kmsKeyName"); - - /** CustomerEncryptionKey _kmsKeyServiceAccount. */ - public _kmsKeyServiceAccount?: "kmsKeyServiceAccount"; - - /** - * Creates a new CustomerEncryptionKey instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomerEncryptionKey instance - */ - public static create(properties?: google.cloud.backupdr.v1.ICustomerEncryptionKey): google.cloud.backupdr.v1.CustomerEncryptionKey; - - /** - * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. - * @param message CustomerEncryptionKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. - * @param message CustomerEncryptionKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomerEncryptionKey message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomerEncryptionKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CustomerEncryptionKey; - - /** - * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomerEncryptionKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CustomerEncryptionKey; - - /** - * Verifies a CustomerEncryptionKey message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomerEncryptionKey - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CustomerEncryptionKey; - - /** - * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. - * @param message CustomerEncryptionKey - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.CustomerEncryptionKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomerEncryptionKey to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomerEncryptionKey - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Entry. */ - interface IEntry { - - /** Entry key */ - key?: (string|null); - - /** Entry value */ - value?: (string|null); - } - - /** Represents an Entry. */ - class Entry implements IEntry { - - /** - * Constructs a new Entry. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IEntry); - - /** Entry key. */ - public key?: (string|null); - - /** Entry value. */ - public value?: (string|null); - - /** Entry _key. */ - public _key?: "key"; - - /** Entry _value. */ - public _value?: "value"; - - /** - * Creates a new Entry instance using the specified properties. - * @param [properties] Properties to set - * @returns Entry instance - */ - public static create(properties?: google.cloud.backupdr.v1.IEntry): google.cloud.backupdr.v1.Entry; - - /** - * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. - * @param message Entry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. - * @param message Entry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Entry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Entry; - - /** - * Decodes an Entry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Entry; - - /** - * Verifies an Entry message. - * @param message Plain 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 Entry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Entry - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Entry; - - /** - * Creates a plain object from an Entry message. Also converts values to other types if specified. - * @param message Entry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Entry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Entry - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Metadata. */ - interface IMetadata { - - /** Metadata items */ - items?: (google.cloud.backupdr.v1.IEntry[]|null); - } - - /** Represents a Metadata. */ - class Metadata implements IMetadata { - - /** - * Constructs a new Metadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IMetadata); - - /** Metadata items. */ - public items: google.cloud.backupdr.v1.IEntry[]; - - /** - * Creates a new Metadata instance using the specified properties. - * @param [properties] Properties to set - * @returns Metadata instance - */ - public static create(properties?: google.cloud.backupdr.v1.IMetadata): google.cloud.backupdr.v1.Metadata; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Metadata; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Metadata; - - /** - * Verifies a Metadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Metadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Metadata; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @param message Metadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Metadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NetworkInterface. */ - interface INetworkInterface { - - /** NetworkInterface network */ - network?: (string|null); - - /** NetworkInterface subnetwork */ - subnetwork?: (string|null); - - /** NetworkInterface ipAddress */ - ipAddress?: (string|null); - - /** NetworkInterface ipv6Address */ - ipv6Address?: (string|null); - - /** NetworkInterface internalIpv6PrefixLength */ - internalIpv6PrefixLength?: (number|null); - - /** NetworkInterface name */ - name?: (string|null); - - /** NetworkInterface accessConfigs */ - accessConfigs?: (google.cloud.backupdr.v1.IAccessConfig[]|null); - - /** NetworkInterface ipv6AccessConfigs */ - ipv6AccessConfigs?: (google.cloud.backupdr.v1.IAccessConfig[]|null); - - /** NetworkInterface aliasIpRanges */ - aliasIpRanges?: (google.cloud.backupdr.v1.IAliasIpRange[]|null); - - /** NetworkInterface stackType */ - stackType?: (google.cloud.backupdr.v1.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.StackType|null); - - /** NetworkInterface ipv6AccessType */ - ipv6AccessType?: (google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null); - - /** NetworkInterface queueCount */ - queueCount?: (number|null); - - /** NetworkInterface nicType */ - nicType?: (google.cloud.backupdr.v1.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.NicType|null); - - /** NetworkInterface networkAttachment */ - networkAttachment?: (string|null); - } - - /** Represents a NetworkInterface. */ - class NetworkInterface implements INetworkInterface { - - /** - * Constructs a new NetworkInterface. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.INetworkInterface); - - /** NetworkInterface network. */ - public network?: (string|null); - - /** NetworkInterface subnetwork. */ - public subnetwork?: (string|null); - - /** NetworkInterface ipAddress. */ - public ipAddress?: (string|null); - - /** NetworkInterface ipv6Address. */ - public ipv6Address?: (string|null); - - /** NetworkInterface internalIpv6PrefixLength. */ - public internalIpv6PrefixLength?: (number|null); - - /** NetworkInterface name. */ - public name?: (string|null); - - /** NetworkInterface accessConfigs. */ - public accessConfigs: google.cloud.backupdr.v1.IAccessConfig[]; - - /** NetworkInterface ipv6AccessConfigs. */ - public ipv6AccessConfigs: google.cloud.backupdr.v1.IAccessConfig[]; - - /** NetworkInterface aliasIpRanges. */ - public aliasIpRanges: google.cloud.backupdr.v1.IAliasIpRange[]; - - /** NetworkInterface stackType. */ - public stackType?: (google.cloud.backupdr.v1.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.StackType|null); - - /** NetworkInterface ipv6AccessType. */ - public ipv6AccessType?: (google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null); - - /** NetworkInterface queueCount. */ - public queueCount?: (number|null); - - /** NetworkInterface nicType. */ - public nicType?: (google.cloud.backupdr.v1.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.NicType|null); - - /** NetworkInterface networkAttachment. */ - public networkAttachment?: (string|null); - - /** NetworkInterface _network. */ - public _network?: "network"; - - /** NetworkInterface _subnetwork. */ - public _subnetwork?: "subnetwork"; - - /** NetworkInterface _ipAddress. */ - public _ipAddress?: "ipAddress"; - - /** NetworkInterface _ipv6Address. */ - public _ipv6Address?: "ipv6Address"; - - /** NetworkInterface _internalIpv6PrefixLength. */ - public _internalIpv6PrefixLength?: "internalIpv6PrefixLength"; - - /** NetworkInterface _name. */ - public _name?: "name"; - - /** NetworkInterface _stackType. */ - public _stackType?: "stackType"; - - /** NetworkInterface _ipv6AccessType. */ - public _ipv6AccessType?: "ipv6AccessType"; - - /** NetworkInterface _queueCount. */ - public _queueCount?: "queueCount"; - - /** NetworkInterface _nicType. */ - public _nicType?: "nicType"; - - /** NetworkInterface _networkAttachment. */ - public _networkAttachment?: "networkAttachment"; - - /** - * Creates a new NetworkInterface instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkInterface instance - */ - public static create(properties?: google.cloud.backupdr.v1.INetworkInterface): google.cloud.backupdr.v1.NetworkInterface; - - /** - * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. - * @param message NetworkInterface message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. - * @param message NetworkInterface message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkInterface message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkInterface - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkInterface; - - /** - * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkInterface - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkInterface; - - /** - * Verifies a NetworkInterface message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkInterface - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkInterface; - - /** - * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. - * @param message NetworkInterface - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.NetworkInterface, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkInterface to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkInterface - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NetworkInterface { - - /** StackType enum. */ - enum StackType { - STACK_TYPE_UNSPECIFIED = 0, - IPV4_ONLY = 1, - IPV4_IPV6 = 2 - } - - /** Ipv6AccessType enum. */ - enum Ipv6AccessType { - UNSPECIFIED_IPV6_ACCESS_TYPE = 0, - INTERNAL = 1, - EXTERNAL = 2 - } - - /** NicType enum. */ - enum NicType { - NIC_TYPE_UNSPECIFIED = 0, - VIRTIO_NET = 1, - GVNIC = 2 - } - } - - /** Properties of a NetworkPerformanceConfig. */ - interface INetworkPerformanceConfig { - - /** NetworkPerformanceConfig totalEgressBandwidthTier */ - totalEgressBandwidthTier?: (google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null); - } - - /** Represents a NetworkPerformanceConfig. */ - class NetworkPerformanceConfig implements INetworkPerformanceConfig { - - /** - * Constructs a new NetworkPerformanceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.INetworkPerformanceConfig); - - /** NetworkPerformanceConfig totalEgressBandwidthTier. */ - public totalEgressBandwidthTier?: (google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null); - - /** NetworkPerformanceConfig _totalEgressBandwidthTier. */ - public _totalEgressBandwidthTier?: "totalEgressBandwidthTier"; - - /** - * Creates a new NetworkPerformanceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkPerformanceConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.INetworkPerformanceConfig): google.cloud.backupdr.v1.NetworkPerformanceConfig; - - /** - * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. - * @param message NetworkPerformanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. - * @param message NetworkPerformanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkPerformanceConfig; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkPerformanceConfig; - - /** - * Verifies a NetworkPerformanceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkPerformanceConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkPerformanceConfig; - - /** - * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. - * @param message NetworkPerformanceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.NetworkPerformanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkPerformanceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkPerformanceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NetworkPerformanceConfig { - - /** Tier enum. */ - enum Tier { - TIER_UNSPECIFIED = 0, - DEFAULT = 1, - TIER_1 = 2 - } - } - - /** Properties of an AccessConfig. */ - interface IAccessConfig { - - /** AccessConfig type */ - type?: (google.cloud.backupdr.v1.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1.AccessConfig.AccessType|null); - - /** AccessConfig name */ - name?: (string|null); - - /** AccessConfig externalIp */ - externalIp?: (string|null); - - /** AccessConfig externalIpv6 */ - externalIpv6?: (string|null); - - /** AccessConfig externalIpv6PrefixLength */ - externalIpv6PrefixLength?: (number|null); - - /** AccessConfig setPublicPtr */ - setPublicPtr?: (boolean|null); - - /** AccessConfig publicPtrDomainName */ - publicPtrDomainName?: (string|null); - - /** AccessConfig networkTier */ - networkTier?: (google.cloud.backupdr.v1.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1.AccessConfig.NetworkTier|null); - } - - /** Represents an AccessConfig. */ - class AccessConfig implements IAccessConfig { - - /** - * Constructs a new AccessConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAccessConfig); - - /** AccessConfig type. */ - public type?: (google.cloud.backupdr.v1.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1.AccessConfig.AccessType|null); - - /** AccessConfig name. */ - public name?: (string|null); - - /** AccessConfig externalIp. */ - public externalIp?: (string|null); - - /** AccessConfig externalIpv6. */ - public externalIpv6?: (string|null); - - /** AccessConfig externalIpv6PrefixLength. */ - public externalIpv6PrefixLength?: (number|null); - - /** AccessConfig setPublicPtr. */ - public setPublicPtr?: (boolean|null); - - /** AccessConfig publicPtrDomainName. */ - public publicPtrDomainName?: (string|null); - - /** AccessConfig networkTier. */ - public networkTier?: (google.cloud.backupdr.v1.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1.AccessConfig.NetworkTier|null); - - /** AccessConfig _type. */ - public _type?: "type"; - - /** AccessConfig _name. */ - public _name?: "name"; - - /** AccessConfig _externalIp. */ - public _externalIp?: "externalIp"; - - /** AccessConfig _externalIpv6. */ - public _externalIpv6?: "externalIpv6"; - - /** AccessConfig _externalIpv6PrefixLength. */ - public _externalIpv6PrefixLength?: "externalIpv6PrefixLength"; - - /** AccessConfig _setPublicPtr. */ - public _setPublicPtr?: "setPublicPtr"; - - /** AccessConfig _publicPtrDomainName. */ - public _publicPtrDomainName?: "publicPtrDomainName"; - - /** AccessConfig _networkTier. */ - public _networkTier?: "networkTier"; - - /** - * Creates a new AccessConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AccessConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAccessConfig): google.cloud.backupdr.v1.AccessConfig; - - /** - * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. - * @param message AccessConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. - * @param message AccessConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AccessConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AccessConfig; - - /** - * Decodes an AccessConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AccessConfig; - - /** - * Verifies an AccessConfig message. - * @param message Plain 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 AccessConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AccessConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AccessConfig; - - /** - * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. - * @param message AccessConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AccessConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AccessConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AccessConfig { - - /** AccessType enum. */ - enum AccessType { - ACCESS_TYPE_UNSPECIFIED = 0, - ONE_TO_ONE_NAT = 1, - DIRECT_IPV6 = 2 - } - - /** NetworkTier enum. */ - enum NetworkTier { - NETWORK_TIER_UNSPECIFIED = 0, - PREMIUM = 1, - STANDARD = 2 - } - } - - /** Properties of an AliasIpRange. */ - interface IAliasIpRange { - - /** AliasIpRange ipCidrRange */ - ipCidrRange?: (string|null); - - /** AliasIpRange subnetworkRangeName */ - subnetworkRangeName?: (string|null); - } - - /** Represents an AliasIpRange. */ - class AliasIpRange implements IAliasIpRange { - - /** - * Constructs a new AliasIpRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAliasIpRange); - - /** AliasIpRange ipCidrRange. */ - public ipCidrRange?: (string|null); - - /** AliasIpRange subnetworkRangeName. */ - public subnetworkRangeName?: (string|null); - - /** AliasIpRange _ipCidrRange. */ - public _ipCidrRange?: "ipCidrRange"; - - /** AliasIpRange _subnetworkRangeName. */ - public _subnetworkRangeName?: "subnetworkRangeName"; - - /** - * Creates a new AliasIpRange instance using the specified properties. - * @param [properties] Properties to set - * @returns AliasIpRange instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAliasIpRange): google.cloud.backupdr.v1.AliasIpRange; - - /** - * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. - * @param message AliasIpRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. - * @param message AliasIpRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AliasIpRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AliasIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AliasIpRange; - - /** - * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AliasIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AliasIpRange; - - /** - * Verifies an AliasIpRange message. - * @param message Plain 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 AliasIpRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AliasIpRange - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AliasIpRange; - - /** - * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. - * @param message AliasIpRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AliasIpRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AliasIpRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AliasIpRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an InstanceParams. */ - interface IInstanceParams { - - /** InstanceParams resourceManagerTags */ - resourceManagerTags?: ({ [k: string]: string }|null); - } - - /** Represents an InstanceParams. */ - class InstanceParams implements IInstanceParams { - - /** - * Constructs a new InstanceParams. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IInstanceParams); - - /** InstanceParams resourceManagerTags. */ - public resourceManagerTags: { [k: string]: string }; - - /** - * Creates a new InstanceParams instance using the specified properties. - * @param [properties] Properties to set - * @returns InstanceParams instance - */ - public static create(properties?: google.cloud.backupdr.v1.IInstanceParams): google.cloud.backupdr.v1.InstanceParams; - - /** - * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. - * @param message InstanceParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. - * @param message InstanceParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InstanceParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InstanceParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InstanceParams; - - /** - * Decodes an InstanceParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InstanceParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InstanceParams; - - /** - * Verifies an InstanceParams message. - * @param message Plain 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 InstanceParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InstanceParams - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InstanceParams; - - /** - * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. - * @param message InstanceParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.InstanceParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InstanceParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InstanceParams - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AllocationAffinity. */ - interface IAllocationAffinity { - - /** AllocationAffinity consumeAllocationType */ - consumeAllocationType?: (google.cloud.backupdr.v1.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1.AllocationAffinity.Type|null); - - /** AllocationAffinity key */ - key?: (string|null); - - /** AllocationAffinity values */ - values?: (string[]|null); - } - - /** Represents an AllocationAffinity. */ - class AllocationAffinity implements IAllocationAffinity { - - /** - * Constructs a new AllocationAffinity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAllocationAffinity); - - /** AllocationAffinity consumeAllocationType. */ - public consumeAllocationType?: (google.cloud.backupdr.v1.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1.AllocationAffinity.Type|null); - - /** AllocationAffinity key. */ - public key?: (string|null); - - /** AllocationAffinity values. */ - public values: string[]; - - /** AllocationAffinity _consumeAllocationType. */ - public _consumeAllocationType?: "consumeAllocationType"; - - /** AllocationAffinity _key. */ - public _key?: "key"; - - /** - * Creates a new AllocationAffinity instance using the specified properties. - * @param [properties] Properties to set - * @returns AllocationAffinity instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAllocationAffinity): google.cloud.backupdr.v1.AllocationAffinity; - - /** - * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. - * @param message AllocationAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. - * @param message AllocationAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AllocationAffinity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AllocationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AllocationAffinity; - - /** - * Decodes an AllocationAffinity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AllocationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AllocationAffinity; - - /** - * Verifies an AllocationAffinity message. - * @param message Plain 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 AllocationAffinity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AllocationAffinity - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AllocationAffinity; - - /** - * Creates a plain object from an AllocationAffinity message. Also converts values to other types if specified. - * @param message AllocationAffinity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AllocationAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AllocationAffinity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AllocationAffinity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AllocationAffinity { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - NO_RESERVATION = 1, - ANY_RESERVATION = 2, - SPECIFIC_RESERVATION = 3 - } - } - - /** Properties of a Scheduling. */ - interface IScheduling { - - /** Scheduling onHostMaintenance */ - onHostMaintenance?: (google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null); - - /** Scheduling automaticRestart */ - automaticRestart?: (boolean|null); - - /** Scheduling preemptible */ - preemptible?: (boolean|null); - - /** Scheduling nodeAffinities */ - nodeAffinities?: (google.cloud.backupdr.v1.Scheduling.INodeAffinity[]|null); - - /** Scheduling minNodeCpus */ - minNodeCpus?: (number|null); - - /** Scheduling provisioningModel */ - provisioningModel?: (google.cloud.backupdr.v1.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null); - - /** Scheduling instanceTerminationAction */ - instanceTerminationAction?: (google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null); - - /** Scheduling localSsdRecoveryTimeout */ - localSsdRecoveryTimeout?: (google.cloud.backupdr.v1.ISchedulingDuration|null); - } - - /** Represents a Scheduling. */ - class Scheduling implements IScheduling { - - /** - * Constructs a new Scheduling. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IScheduling); - - /** Scheduling onHostMaintenance. */ - public onHostMaintenance?: (google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null); - - /** Scheduling automaticRestart. */ - public automaticRestart?: (boolean|null); - - /** Scheduling preemptible. */ - public preemptible?: (boolean|null); - - /** Scheduling nodeAffinities. */ - public nodeAffinities: google.cloud.backupdr.v1.Scheduling.INodeAffinity[]; - - /** Scheduling minNodeCpus. */ - public minNodeCpus?: (number|null); - - /** Scheduling provisioningModel. */ - public provisioningModel?: (google.cloud.backupdr.v1.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null); - - /** Scheduling instanceTerminationAction. */ - public instanceTerminationAction?: (google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null); - - /** Scheduling localSsdRecoveryTimeout. */ - public localSsdRecoveryTimeout?: (google.cloud.backupdr.v1.ISchedulingDuration|null); - - /** Scheduling _onHostMaintenance. */ - public _onHostMaintenance?: "onHostMaintenance"; - - /** Scheduling _automaticRestart. */ - public _automaticRestart?: "automaticRestart"; - - /** Scheduling _preemptible. */ - public _preemptible?: "preemptible"; - - /** Scheduling _minNodeCpus. */ - public _minNodeCpus?: "minNodeCpus"; - - /** Scheduling _provisioningModel. */ - public _provisioningModel?: "provisioningModel"; - - /** Scheduling _instanceTerminationAction. */ - public _instanceTerminationAction?: "instanceTerminationAction"; - - /** Scheduling _localSsdRecoveryTimeout. */ - public _localSsdRecoveryTimeout?: "localSsdRecoveryTimeout"; - - /** - * Creates a new Scheduling instance using the specified properties. - * @param [properties] Properties to set - * @returns Scheduling instance - */ - public static create(properties?: google.cloud.backupdr.v1.IScheduling): google.cloud.backupdr.v1.Scheduling; - - /** - * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. - * @param message Scheduling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. - * @param message Scheduling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Scheduling message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Scheduling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Scheduling; - - /** - * Decodes a Scheduling message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Scheduling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Scheduling; - - /** - * Verifies a Scheduling message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Scheduling - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Scheduling; - - /** - * Creates a plain object from a Scheduling message. Also converts values to other types if specified. - * @param message Scheduling - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Scheduling, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Scheduling to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Scheduling - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Scheduling { - - /** OnHostMaintenance enum. */ - enum OnHostMaintenance { - ON_HOST_MAINTENANCE_UNSPECIFIED = 0, - TERMINATE = 1, - MIGRATE = 1000 - } - - /** Properties of a NodeAffinity. */ - interface INodeAffinity { - - /** NodeAffinity key */ - key?: (string|null); - - /** NodeAffinity operator */ - operator?: (google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null); - - /** NodeAffinity values */ - values?: (string[]|null); - } - - /** Represents a NodeAffinity. */ - class NodeAffinity implements INodeAffinity { - - /** - * Constructs a new NodeAffinity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.Scheduling.INodeAffinity); - - /** NodeAffinity key. */ - public key?: (string|null); - - /** NodeAffinity operator. */ - public operator?: (google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null); - - /** NodeAffinity values. */ - public values: string[]; - - /** NodeAffinity _key. */ - public _key?: "key"; - - /** NodeAffinity _operator. */ - public _operator?: "operator"; - - /** - * Creates a new NodeAffinity instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeAffinity instance - */ - public static create(properties?: google.cloud.backupdr.v1.Scheduling.INodeAffinity): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - - /** - * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. - * @param message NodeAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. - * @param message NodeAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - - /** - * Verifies a NodeAffinity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeAffinity - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - - /** - * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. - * @param message NodeAffinity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Scheduling.NodeAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeAffinity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeAffinity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NodeAffinity { - - /** Operator enum. */ - enum Operator { - OPERATOR_UNSPECIFIED = 0, - IN = 1, - NOT_IN = 2 - } - } - - /** ProvisioningModel enum. */ - enum ProvisioningModel { - PROVISIONING_MODEL_UNSPECIFIED = 0, - STANDARD = 1, - SPOT = 2 - } - - /** InstanceTerminationAction enum. */ - enum InstanceTerminationAction { - INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0, - DELETE = 1, - STOP = 2 - } - } - - /** Properties of a SchedulingDuration. */ - interface ISchedulingDuration { - - /** SchedulingDuration seconds */ - seconds?: (number|Long|string|null); - - /** SchedulingDuration nanos */ - nanos?: (number|null); - } - - /** Represents a SchedulingDuration. */ - class SchedulingDuration implements ISchedulingDuration { - - /** - * Constructs a new SchedulingDuration. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ISchedulingDuration); - - /** SchedulingDuration seconds. */ - public seconds?: (number|Long|string|null); - - /** SchedulingDuration nanos. */ - public nanos?: (number|null); - - /** SchedulingDuration _seconds. */ - public _seconds?: "seconds"; - - /** SchedulingDuration _nanos. */ - public _nanos?: "nanos"; - - /** - * Creates a new SchedulingDuration instance using the specified properties. - * @param [properties] Properties to set - * @returns SchedulingDuration instance - */ - public static create(properties?: google.cloud.backupdr.v1.ISchedulingDuration): google.cloud.backupdr.v1.SchedulingDuration; - - /** - * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. - * @param message SchedulingDuration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. - * @param message SchedulingDuration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SchedulingDuration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SchedulingDuration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SchedulingDuration; - - /** - * Decodes a SchedulingDuration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SchedulingDuration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SchedulingDuration; - - /** - * Verifies a SchedulingDuration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SchedulingDuration - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SchedulingDuration; - - /** - * Creates a plain object from a SchedulingDuration message. Also converts values to other types if specified. - * @param message SchedulingDuration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.SchedulingDuration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SchedulingDuration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SchedulingDuration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceAccount. */ - interface IServiceAccount { - - /** ServiceAccount email */ - email?: (string|null); - - /** ServiceAccount scopes */ - scopes?: (string[]|null); - } - - /** Represents a ServiceAccount. */ - class ServiceAccount implements IServiceAccount { - - /** - * Constructs a new ServiceAccount. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IServiceAccount); - - /** ServiceAccount email. */ - public email?: (string|null); - - /** ServiceAccount scopes. */ - public scopes: string[]; - - /** ServiceAccount _email. */ - public _email?: "email"; - - /** - * Creates a new ServiceAccount instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceAccount instance - */ - public static create(properties?: google.cloud.backupdr.v1.IServiceAccount): google.cloud.backupdr.v1.ServiceAccount; - - /** - * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. - * @param message ServiceAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. - * @param message ServiceAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ServiceAccount; - - /** - * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ServiceAccount; - - /** - * Verifies a ServiceAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceAccount - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ServiceAccount; - - /** - * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. - * @param message ServiceAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ServiceAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceAccount - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Tags. */ - interface ITags { - - /** Tags items */ - items?: (string[]|null); - } - - /** Represents a Tags. */ - class Tags implements ITags { - - /** - * Constructs a new Tags. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ITags); - - /** Tags items. */ - public items: string[]; - - /** - * Creates a new Tags instance using the specified properties. - * @param [properties] Properties to set - * @returns Tags instance - */ - public static create(properties?: google.cloud.backupdr.v1.ITags): google.cloud.backupdr.v1.Tags; - - /** - * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. - * @param message Tags message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ITags, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. - * @param message Tags message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ITags, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Tags message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Tags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Tags; - - /** - * Decodes a Tags message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Tags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Tags; - - /** - * Verifies a Tags message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Tags message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Tags - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Tags; - - /** - * Creates a plain object from a Tags message. Also converts values to other types if specified. - * @param message Tags - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Tags, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Tags to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Tags - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AttachedDisk. */ - interface IAttachedDisk { - - /** AttachedDisk initializeParams */ - initializeParams?: (google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null); - - /** AttachedDisk deviceName */ - deviceName?: (string|null); - - /** AttachedDisk kind */ - kind?: (string|null); - - /** AttachedDisk diskTypeDeprecated */ - diskTypeDeprecated?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); - - /** AttachedDisk mode */ - mode?: (google.cloud.backupdr.v1.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskMode|null); - - /** AttachedDisk source */ - source?: (string|null); - - /** AttachedDisk index */ - index?: (number|Long|string|null); - - /** AttachedDisk boot */ - boot?: (boolean|null); - - /** AttachedDisk autoDelete */ - autoDelete?: (boolean|null); - - /** AttachedDisk license */ - license?: (string[]|null); - - /** AttachedDisk diskInterface */ - diskInterface?: (google.cloud.backupdr.v1.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null); - - /** AttachedDisk guestOsFeature */ - guestOsFeature?: (google.cloud.backupdr.v1.IGuestOsFeature[]|null); - - /** AttachedDisk diskEncryptionKey */ - diskEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); - - /** AttachedDisk diskSizeGb */ - diskSizeGb?: (number|Long|string|null); - - /** AttachedDisk savedState */ - savedState?: (google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null); - - /** AttachedDisk diskType */ - diskType?: (string|null); - - /** AttachedDisk type */ - type?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); - } - - /** Represents an AttachedDisk. */ - class AttachedDisk implements IAttachedDisk { - - /** - * Constructs a new AttachedDisk. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAttachedDisk); - - /** AttachedDisk initializeParams. */ - public initializeParams?: (google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null); - - /** AttachedDisk deviceName. */ - public deviceName?: (string|null); - - /** AttachedDisk kind. */ - public kind?: (string|null); - - /** AttachedDisk diskTypeDeprecated. */ - public diskTypeDeprecated?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); - - /** AttachedDisk mode. */ - public mode?: (google.cloud.backupdr.v1.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskMode|null); - - /** AttachedDisk source. */ - public source?: (string|null); - - /** AttachedDisk index. */ - public index?: (number|Long|string|null); - - /** AttachedDisk boot. */ - public boot?: (boolean|null); - - /** AttachedDisk autoDelete. */ - public autoDelete?: (boolean|null); - - /** AttachedDisk license. */ - public license: string[]; - - /** AttachedDisk diskInterface. */ - public diskInterface?: (google.cloud.backupdr.v1.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null); - - /** AttachedDisk guestOsFeature. */ - public guestOsFeature: google.cloud.backupdr.v1.IGuestOsFeature[]; - - /** AttachedDisk diskEncryptionKey. */ - public diskEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); - - /** AttachedDisk diskSizeGb. */ - public diskSizeGb?: (number|Long|string|null); - - /** AttachedDisk savedState. */ - public savedState?: (google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null); - - /** AttachedDisk diskType. */ - public diskType?: (string|null); - - /** AttachedDisk type. */ - public type?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); - - /** AttachedDisk _initializeParams. */ - public _initializeParams?: "initializeParams"; - - /** AttachedDisk _deviceName. */ - public _deviceName?: "deviceName"; - - /** AttachedDisk _kind. */ - public _kind?: "kind"; - - /** AttachedDisk _diskTypeDeprecated. */ - public _diskTypeDeprecated?: "diskTypeDeprecated"; - - /** AttachedDisk _mode. */ - public _mode?: "mode"; - - /** AttachedDisk _source. */ - public _source?: "source"; - - /** AttachedDisk _index. */ - public _index?: "index"; - - /** AttachedDisk _boot. */ - public _boot?: "boot"; - - /** AttachedDisk _autoDelete. */ - public _autoDelete?: "autoDelete"; - - /** AttachedDisk _diskInterface. */ - public _diskInterface?: "diskInterface"; - - /** AttachedDisk _diskEncryptionKey. */ - public _diskEncryptionKey?: "diskEncryptionKey"; - - /** AttachedDisk _diskSizeGb. */ - public _diskSizeGb?: "diskSizeGb"; - - /** AttachedDisk _savedState. */ - public _savedState?: "savedState"; - - /** AttachedDisk _diskType. */ - public _diskType?: "diskType"; - - /** AttachedDisk _type. */ - public _type?: "type"; - - /** - * Creates a new AttachedDisk instance using the specified properties. - * @param [properties] Properties to set - * @returns AttachedDisk instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAttachedDisk): google.cloud.backupdr.v1.AttachedDisk; - - /** - * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. - * @param message AttachedDisk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. - * @param message AttachedDisk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AttachedDisk message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AttachedDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AttachedDisk; - - /** - * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AttachedDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AttachedDisk; - - /** - * Verifies an AttachedDisk message. - * @param message Plain 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 AttachedDisk message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AttachedDisk - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AttachedDisk; - - /** - * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. - * @param message AttachedDisk - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AttachedDisk, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AttachedDisk to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AttachedDisk - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AttachedDisk { - - /** Properties of an InitializeParams. */ - interface IInitializeParams { - - /** InitializeParams diskName */ - diskName?: (string|null); - - /** InitializeParams replicaZones */ - replicaZones?: (string[]|null); - } - - /** Represents an InitializeParams. */ - class InitializeParams implements IInitializeParams { - - /** - * Constructs a new InitializeParams. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams); - - /** InitializeParams diskName. */ - public diskName?: (string|null); - - /** InitializeParams replicaZones. */ - public replicaZones: string[]; - - /** InitializeParams _diskName. */ - public _diskName?: "diskName"; - - /** - * Creates a new InitializeParams instance using the specified properties. - * @param [properties] Properties to set - * @returns InitializeParams instance - */ - public static create(properties?: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; - - /** - * Encodes the specified InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. - * @param message InitializeParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. - * @param message InitializeParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InitializeParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InitializeParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; - - /** - * Decodes an InitializeParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InitializeParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; - - /** - * Verifies an InitializeParams message. - * @param message Plain 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 InitializeParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InitializeParams - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; - - /** - * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. - * @param message InitializeParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AttachedDisk.InitializeParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InitializeParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InitializeParams - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** DiskType enum. */ - enum DiskType { - DISK_TYPE_UNSPECIFIED = 0, - SCRATCH = 1, - PERSISTENT = 2 - } - - /** DiskMode enum. */ - enum DiskMode { - DISK_MODE_UNSPECIFIED = 0, - READ_WRITE = 1, - READ_ONLY = 2, - LOCKED = 3 - } - - /** DiskInterface enum. */ - enum DiskInterface { - DISK_INTERFACE_UNSPECIFIED = 0, - SCSI = 1, - NVME = 2, - NVDIMM = 3, - ISCSI = 4 - } - - /** DiskSavedState enum. */ - enum DiskSavedState { - DISK_SAVED_STATE_UNSPECIFIED = 0, - PRESERVED = 1 - } - } - - /** Properties of a GuestOsFeature. */ - interface IGuestOsFeature { - - /** GuestOsFeature type */ - type?: (google.cloud.backupdr.v1.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null); - } - - /** Represents a GuestOsFeature. */ - class GuestOsFeature implements IGuestOsFeature { - - /** - * Constructs a new GuestOsFeature. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGuestOsFeature); - - /** GuestOsFeature type. */ - public type?: (google.cloud.backupdr.v1.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null); - - /** GuestOsFeature _type. */ - public _type?: "type"; - - /** - * Creates a new GuestOsFeature instance using the specified properties. - * @param [properties] Properties to set - * @returns GuestOsFeature instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGuestOsFeature): google.cloud.backupdr.v1.GuestOsFeature; - - /** - * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. - * @param message GuestOsFeature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. - * @param message GuestOsFeature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GuestOsFeature message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GuestOsFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GuestOsFeature; - - /** - * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GuestOsFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GuestOsFeature; - - /** - * Verifies a GuestOsFeature message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GuestOsFeature - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GuestOsFeature; - - /** - * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. - * @param message GuestOsFeature - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GuestOsFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GuestOsFeature to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GuestOsFeature - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GuestOsFeature { - - /** FeatureType enum. */ - enum FeatureType { - FEATURE_TYPE_UNSPECIFIED = 0, - VIRTIO_SCSI_MULTIQUEUE = 1, - WINDOWS = 2, - MULTI_IP_SUBNET = 3, - UEFI_COMPATIBLE = 4, - SECURE_BOOT = 5, - GVNIC = 6, - SEV_CAPABLE = 7, - BARE_METAL_LINUX_COMPATIBLE = 8, - SUSPEND_RESUME_COMPATIBLE = 9, - SEV_LIVE_MIGRATABLE = 10, - SEV_SNP_CAPABLE = 11, - TDX_CAPABLE = 12, - IDPF = 13, - SEV_LIVE_MIGRATABLE_V2 = 14 - } - } - - /** KeyRevocationActionType enum. */ - enum KeyRevocationActionType { - KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0, - NONE = 1, - STOP = 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 FieldInfo. */ - interface IFieldInfo { - - /** FieldInfo format */ - format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); - } - - /** Represents a FieldInfo. */ - class FieldInfo implements IFieldInfo { - - /** - * Constructs a new FieldInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IFieldInfo); - - /** FieldInfo format. */ - public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); - - /** - * Creates a new FieldInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldInfo instance - */ - public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; - - /** - * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @param message FieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @param message FieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldInfo - * @throws {Error} If the payload is not 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.FieldInfo; - - /** - * Decodes a FieldInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldInfo - * @throws {Error} If the payload 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.FieldInfo; - - /** - * Verifies a FieldInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldInfo - */ - public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; - - /** - * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. - * @param message FieldInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldInfo { - - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - UUID4 = 1, - IPV4 = 2, - IPV6 = 3, - IPV4_OR_IPV6 = 4 - } - } - - /** 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.fieldInfo */ - ".google.api.fieldInfo"?: (google.api.IFieldInfo|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 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; - } - - /** 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 DoubleValue. */ - interface IDoubleValue { - - /** DoubleValue value */ - value?: (number|null); - } - - /** Represents a DoubleValue. */ - class DoubleValue implements IDoubleValue { - - /** - * Constructs a new DoubleValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDoubleValue); - - /** DoubleValue value. */ - public value: number; - - /** - * Creates a new DoubleValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DoubleValue instance - */ - public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; - - /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DoubleValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DoubleValue - * @throws {Error} If the payload is not 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.DoubleValue; - - /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DoubleValue - * @throws {Error} If the payload 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.DoubleValue; - - /** - * Verifies a DoubleValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DoubleValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; - - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @param message DoubleValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DoubleValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DoubleValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FloatValue. */ - interface IFloatValue { - - /** FloatValue value */ - value?: (number|null); - } - - /** Represents a FloatValue. */ - class FloatValue implements IFloatValue { - - /** - * Constructs a new FloatValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFloatValue); - - /** FloatValue value. */ - public value: number; - - /** - * Creates a new FloatValue instance using the specified properties. - * @param [properties] Properties to set - * @returns FloatValue instance - */ - public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; - - /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FloatValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FloatValue - * @throws {Error} If the payload is not 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.FloatValue; - - /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FloatValue - * @throws {Error} If the payload 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.FloatValue; - - /** - * Verifies a FloatValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FloatValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; - - /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @param message FloatValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FloatValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FloatValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Int64Value. */ - interface IInt64Value { - - /** Int64Value value */ - value?: (number|Long|string|null); - } - - /** Represents an Int64Value. */ - class Int64Value implements IInt64Value { - - /** - * Constructs a new Int64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt64Value); - - /** Int64Value value. */ - public value: (number|Long|string); - - /** - * Creates a new Int64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int64Value instance - */ - public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; - - /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Int64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int64Value - * @throws {Error} If the payload is not 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.Int64Value; - - /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int64Value - * @throws {Error} If the payload 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.Int64Value; - - /** - * Verifies an Int64Value message. - * @param message Plain 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 Int64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; - - /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @param message Int64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Int64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Int64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UInt64Value. */ - interface IUInt64Value { - - /** UInt64Value value */ - value?: (number|Long|string|null); - } - - /** Represents a UInt64Value. */ - class UInt64Value implements IUInt64Value { - - /** - * Constructs a new UInt64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt64Value); - - /** UInt64Value value. */ - public value: (number|Long|string); - - /** - * Creates a new UInt64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt64Value instance - */ - public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; - - /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UInt64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt64Value - * @throws {Error} If the payload is not 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.UInt64Value; - - /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt64Value - * @throws {Error} If the payload 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.UInt64Value; - - /** - * Verifies a UInt64Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; - - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @param message UInt64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UInt64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UInt64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Int32Value. */ - interface IInt32Value { - - /** Int32Value value */ - value?: (number|null); - } - - /** Represents an Int32Value. */ - class Int32Value implements IInt32Value { - - /** - * Constructs a new Int32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt32Value); - - /** Int32Value value. */ - public value: number; - - /** - * Creates a new Int32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int32Value instance - */ - public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; - - /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Int32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int32Value - * @throws {Error} If the payload is not 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.Int32Value; - - /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int32Value - * @throws {Error} If the payload 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.Int32Value; - - /** - * Verifies an Int32Value message. - * @param message Plain 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 Int32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; - - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @param message Int32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Int32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Int32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UInt32Value. */ - interface IUInt32Value { - - /** UInt32Value value */ - value?: (number|null); - } - - /** Represents a UInt32Value. */ - class UInt32Value implements IUInt32Value { - - /** - * Constructs a new UInt32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt32Value); - - /** UInt32Value value. */ - public value: number; - - /** - * Creates a new UInt32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt32Value instance - */ - public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; - - /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UInt32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt32Value - * @throws {Error} If the payload is not 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.UInt32Value; - - /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt32Value - * @throws {Error} If the payload 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.UInt32Value; - - /** - * Verifies a UInt32Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; - - /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @param message UInt32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UInt32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UInt32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BoolValue. */ - interface IBoolValue { - - /** BoolValue value */ - value?: (boolean|null); - } - - /** Represents a BoolValue. */ - class BoolValue implements IBoolValue { - - /** - * Constructs a new BoolValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBoolValue); - - /** BoolValue value. */ - public value: boolean; - - /** - * Creates a new BoolValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BoolValue instance - */ - public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; - - /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BoolValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BoolValue - * @throws {Error} If the payload is not 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.BoolValue; - - /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BoolValue - * @throws {Error} If the payload 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.BoolValue; - - /** - * Verifies a BoolValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BoolValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; - - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @param message BoolValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BoolValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BoolValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StringValue. */ - interface IStringValue { - - /** StringValue value */ - value?: (string|null); - } - - /** Represents a StringValue. */ - class StringValue implements IStringValue { - - /** - * Constructs a new StringValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStringValue); - - /** StringValue value. */ - public value: string; - - /** - * Creates a new StringValue instance using the specified properties. - * @param [properties] Properties to set - * @returns StringValue instance - */ - public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; - - /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StringValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringValue - * @throws {Error} If the payload is not 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.StringValue; - - /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringValue - * @throws {Error} If the payload 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.StringValue; - - /** - * Verifies a StringValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; - - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @param message StringValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StringValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StringValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BytesValue. */ - interface IBytesValue { - - /** BytesValue value */ - value?: (Uint8Array|string|null); - } - - /** Represents a BytesValue. */ - class BytesValue implements IBytesValue { - - /** - * Constructs a new BytesValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBytesValue); - - /** BytesValue value. */ - public value: (Uint8Array|string); - - /** - * Creates a new BytesValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BytesValue instance - */ - public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; - - /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BytesValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BytesValue - * @throws {Error} If the payload is not 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.BytesValue; - - /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BytesValue - * @throws {Error} If the payload 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.BytesValue; - - /** - * Verifies a BytesValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BytesValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; - - /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. - * @param message BytesValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BytesValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BytesValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace type. */ - namespace type { - - /** DayOfWeek enum. */ - enum DayOfWeek { - DAY_OF_WEEK_UNSPECIFIED = 0, - MONDAY = 1, - TUESDAY = 2, - WEDNESDAY = 3, - THURSDAY = 4, - FRIDAY = 5, - SATURDAY = 6, - SUNDAY = 7 - } - - /** Month enum. */ - enum Month { - MONTH_UNSPECIFIED = 0, - JANUARY = 1, - FEBRUARY = 2, - MARCH = 3, - APRIL = 4, - MAY = 5, - JUNE = 6, - JULY = 7, - AUGUST = 8, - SEPTEMBER = 9, - OCTOBER = 10, - NOVEMBER = 11, - DECEMBER = 12 - } - - /** Properties of an Expr. */ - interface IExpr { - - /** Expr expression */ - expression?: (string|null); - - /** Expr title */ - title?: (string|null); - - /** Expr description */ - description?: (string|null); - - /** Expr location */ - location?: (string|null); - } - - /** Represents an Expr. */ - class Expr implements IExpr { - - /** - * Constructs a new Expr. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.IExpr); - - /** Expr expression. */ - public expression: string; - - /** Expr title. */ - public title: string; - - /** Expr description. */ - public description: string; - - /** Expr location. */ - public location: string; - - /** - * Creates a new Expr instance using the specified properties. - * @param [properties] Properties to set - * @returns Expr instance - */ - public static create(properties?: google.type.IExpr): google.type.Expr; - - /** - * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @param message Expr message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @param message Expr message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Expr message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Expr - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Expr; - - /** - * Decodes an Expr message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Expr - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Expr; - - /** - * Verifies an Expr message. - * @param message Plain 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 Expr message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Expr - */ - public static fromObject(object: { [k: string]: any }): google.type.Expr; - - /** - * Creates a plain object from an Expr message. Also converts values to other types if specified. - * @param message Expr - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.Expr, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Expr to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Expr - * @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; - } - } - - /** Namespace iam. */ - namespace iam { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a IAMPolicy */ - class IAMPolicy extends $protobuf.rpc.Service { - - /** - * Constructs a new IAMPolicy 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 IAMPolicy 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): IAMPolicy; - - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.SetIamPolicyCallback): void; - - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @returns Promise - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; - - /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.GetIamPolicyCallback): void; - - /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @returns Promise - */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.iam.v1.IAMPolicy.TestIamPermissionsCallback): void; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; - } - - namespace IAMPolicy { - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse - */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; - } - - /** Properties of a SetIamPolicyRequest. */ - interface ISetIamPolicyRequest { - - /** SetIamPolicyRequest resource */ - resource?: (string|null); - - /** SetIamPolicyRequest policy */ - policy?: (google.iam.v1.IPolicy|null); - - /** SetIamPolicyRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents a SetIamPolicyRequest. */ - class SetIamPolicyRequest implements ISetIamPolicyRequest { - - /** - * Constructs a new SetIamPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.ISetIamPolicyRequest); - - /** SetIamPolicyRequest resource. */ - public resource: string; - - /** SetIamPolicyRequest policy. */ - public policy?: (google.iam.v1.IPolicy|null); - - /** SetIamPolicyRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new SetIamPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetIamPolicyRequest instance - */ - public static create(properties?: google.iam.v1.ISetIamPolicyRequest): google.iam.v1.SetIamPolicyRequest; - - /** - * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @param message SetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @param message SetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.SetIamPolicyRequest; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.SetIamPolicyRequest; - - /** - * Verifies a SetIamPolicyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetIamPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.SetIamPolicyRequest; - - /** - * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. - * @param message SetIamPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.SetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetIamPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetIamPolicyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetIamPolicyRequest. */ - interface IGetIamPolicyRequest { - - /** GetIamPolicyRequest resource */ - resource?: (string|null); - - /** GetIamPolicyRequest options */ - options?: (google.iam.v1.IGetPolicyOptions|null); - } - - /** Represents a GetIamPolicyRequest. */ - class GetIamPolicyRequest implements IGetIamPolicyRequest { - - /** - * Constructs a new GetIamPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IGetIamPolicyRequest); - - /** GetIamPolicyRequest resource. */ - public resource: string; - - /** GetIamPolicyRequest options. */ - public options?: (google.iam.v1.IGetPolicyOptions|null); - - /** - * Creates a new GetIamPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetIamPolicyRequest instance - */ - public static create(properties?: google.iam.v1.IGetIamPolicyRequest): google.iam.v1.GetIamPolicyRequest; - - /** - * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @param message GetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @param message GetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetIamPolicyRequest; - - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetIamPolicyRequest; - - /** - * Verifies a GetIamPolicyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetIamPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.GetIamPolicyRequest; - - /** - * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. - * @param message GetIamPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.GetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetIamPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetIamPolicyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TestIamPermissionsRequest. */ - interface ITestIamPermissionsRequest { - - /** TestIamPermissionsRequest resource */ - resource?: (string|null); - - /** TestIamPermissionsRequest permissions */ - permissions?: (string[]|null); - } - - /** Represents a TestIamPermissionsRequest. */ - class TestIamPermissionsRequest implements ITestIamPermissionsRequest { - - /** - * Constructs a new TestIamPermissionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.ITestIamPermissionsRequest); - - /** TestIamPermissionsRequest resource. */ - public resource: string; - - /** TestIamPermissionsRequest permissions. */ - public permissions: string[]; - - /** - * Creates a new TestIamPermissionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns TestIamPermissionsRequest instance - */ - public static create(properties?: google.iam.v1.ITestIamPermissionsRequest): google.iam.v1.TestIamPermissionsRequest; - - /** - * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @param message TestIamPermissionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @param message TestIamPermissionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsRequest; - - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsRequest; - - /** - * Verifies a TestIamPermissionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TestIamPermissionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsRequest; - - /** - * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. - * @param message TestIamPermissionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.TestIamPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TestIamPermissionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TestIamPermissionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TestIamPermissionsResponse. */ - interface ITestIamPermissionsResponse { - - /** TestIamPermissionsResponse permissions */ - permissions?: (string[]|null); - } - - /** Represents a TestIamPermissionsResponse. */ - class TestIamPermissionsResponse implements ITestIamPermissionsResponse { - - /** - * Constructs a new TestIamPermissionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.ITestIamPermissionsResponse); - - /** TestIamPermissionsResponse permissions. */ - public permissions: string[]; - - /** - * Creates a new TestIamPermissionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns TestIamPermissionsResponse instance - */ - public static create(properties?: google.iam.v1.ITestIamPermissionsResponse): google.iam.v1.TestIamPermissionsResponse; - - /** - * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @param message TestIamPermissionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @param message TestIamPermissionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsResponse; - - /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsResponse; - - /** - * Verifies a TestIamPermissionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TestIamPermissionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsResponse; - - /** - * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. - * @param message TestIamPermissionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.TestIamPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TestIamPermissionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TestIamPermissionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetPolicyOptions. */ - interface IGetPolicyOptions { - - /** GetPolicyOptions requestedPolicyVersion */ - requestedPolicyVersion?: (number|null); - } - - /** Represents a GetPolicyOptions. */ - class GetPolicyOptions implements IGetPolicyOptions { - - /** - * Constructs a new GetPolicyOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IGetPolicyOptions); - - /** GetPolicyOptions requestedPolicyVersion. */ - public requestedPolicyVersion: number; - - /** - * Creates a new GetPolicyOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPolicyOptions instance - */ - public static create(properties?: google.iam.v1.IGetPolicyOptions): google.iam.v1.GetPolicyOptions; - - /** - * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @param message GetPolicyOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @param message GetPolicyOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetPolicyOptions; - - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetPolicyOptions; - - /** - * Verifies a GetPolicyOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPolicyOptions - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.GetPolicyOptions; - - /** - * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. - * @param message GetPolicyOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.GetPolicyOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetPolicyOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetPolicyOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Policy. */ - interface IPolicy { - - /** Policy version */ - version?: (number|null); - - /** Policy bindings */ - bindings?: (google.iam.v1.IBinding[]|null); - - /** Policy auditConfigs */ - auditConfigs?: (google.iam.v1.IAuditConfig[]|null); - - /** Policy etag */ - etag?: (Uint8Array|string|null); - } - - /** Represents a Policy. */ - class Policy implements IPolicy { - - /** - * Constructs a new Policy. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IPolicy); - - /** Policy version. */ - public version: number; - - /** Policy bindings. */ - public bindings: google.iam.v1.IBinding[]; - - /** Policy auditConfigs. */ - public auditConfigs: google.iam.v1.IAuditConfig[]; - - /** Policy etag. */ - public etag: (Uint8Array|string); - - /** - * Creates a new Policy instance using the specified properties. - * @param [properties] Properties to set - * @returns Policy instance - */ - public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy; - - /** - * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @param message Policy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @param message Policy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Policy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy; - - /** - * Decodes a Policy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy; - - /** - * Verifies a Policy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Policy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Policy - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy; - - /** - * Creates a plain object from a Policy message. Also converts values to other types if specified. - * @param message Policy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Policy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Policy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Binding. */ - interface IBinding { - - /** Binding role */ - role?: (string|null); - - /** Binding members */ - members?: (string[]|null); - - /** Binding condition */ - condition?: (google.type.IExpr|null); - } - - /** Represents a Binding. */ - class Binding implements IBinding { - - /** - * Constructs a new Binding. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IBinding); - - /** Binding role. */ - public role: string; - - /** Binding members. */ - public members: string[]; - - /** Binding condition. */ - public condition?: (google.type.IExpr|null); - - /** - * Creates a new Binding instance using the specified properties. - * @param [properties] Properties to set - * @returns Binding instance - */ - public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding; - - /** - * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @param message Binding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @param message Binding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Binding message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Binding; - - /** - * Decodes a Binding message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Binding; - - /** - * Verifies a Binding message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Binding message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Binding - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding; - - /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. - * @param message Binding - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Binding to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Binding - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AuditConfig. */ - interface IAuditConfig { - - /** AuditConfig service */ - service?: (string|null); - - /** AuditConfig auditLogConfigs */ - auditLogConfigs?: (google.iam.v1.IAuditLogConfig[]|null); - } - - /** Represents an AuditConfig. */ - class AuditConfig implements IAuditConfig { - - /** - * Constructs a new AuditConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IAuditConfig); - - /** AuditConfig service. */ - public service: string; - - /** AuditConfig auditLogConfigs. */ - public auditLogConfigs: google.iam.v1.IAuditLogConfig[]; - - /** - * Creates a new AuditConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditConfig instance - */ - public static create(properties?: google.iam.v1.IAuditConfig): google.iam.v1.AuditConfig; - - /** - * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @param message AuditConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @param message AuditConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuditConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfig; - - /** - * Decodes an AuditConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfig; - - /** - * Verifies an AuditConfig message. - * @param message Plain 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 AuditConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditConfig - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfig; - - /** - * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. - * @param message AuditConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuditConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuditConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AuditLogConfig. */ - interface IAuditLogConfig { - - /** AuditLogConfig logType */ - logType?: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType|null); - - /** AuditLogConfig exemptedMembers */ - exemptedMembers?: (string[]|null); - } - - /** Represents an AuditLogConfig. */ - class AuditLogConfig implements IAuditLogConfig { - - /** - * Constructs a new AuditLogConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IAuditLogConfig); - - /** AuditLogConfig logType. */ - public logType: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType); - - /** AuditLogConfig exemptedMembers. */ - public exemptedMembers: string[]; - - /** - * Creates a new AuditLogConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditLogConfig instance - */ - public static create(properties?: google.iam.v1.IAuditLogConfig): google.iam.v1.AuditLogConfig; - - /** - * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @param message AuditLogConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @param message AuditLogConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditLogConfig; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditLogConfig; - - /** - * Verifies an AuditLogConfig message. - * @param message Plain 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 AuditLogConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditLogConfig - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditLogConfig; - - /** - * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. - * @param message AuditLogConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.AuditLogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuditLogConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuditLogConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AuditLogConfig { - - /** LogType enum. */ - enum LogType { - LOG_TYPE_UNSPECIFIED = 0, - ADMIN_READ = 1, - DATA_WRITE = 2, - DATA_READ = 3 - } - } - - /** Properties of a PolicyDelta. */ - interface IPolicyDelta { - - /** PolicyDelta bindingDeltas */ - bindingDeltas?: (google.iam.v1.IBindingDelta[]|null); - - /** PolicyDelta auditConfigDeltas */ - auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null); - } - - /** Represents a PolicyDelta. */ - class PolicyDelta implements IPolicyDelta { - - /** - * Constructs a new PolicyDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IPolicyDelta); - - /** PolicyDelta bindingDeltas. */ - public bindingDeltas: google.iam.v1.IBindingDelta[]; - - /** PolicyDelta auditConfigDeltas. */ - public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[]; - - /** - * Creates a new PolicyDelta instance using the specified properties. - * @param [properties] Properties to set - * @returns PolicyDelta instance - */ - public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta; - - /** - * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @param message PolicyDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @param message PolicyDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.PolicyDelta; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.PolicyDelta; - - /** - * Verifies a PolicyDelta message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PolicyDelta - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta; - - /** - * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. - * @param message PolicyDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PolicyDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PolicyDelta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BindingDelta. */ - interface IBindingDelta { - - /** BindingDelta action */ - action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null); - - /** BindingDelta role */ - role?: (string|null); - - /** BindingDelta member */ - member?: (string|null); - - /** BindingDelta condition */ - condition?: (google.type.IExpr|null); - } - - /** Represents a BindingDelta. */ - class BindingDelta implements IBindingDelta { - - /** - * Constructs a new BindingDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IBindingDelta); - - /** BindingDelta action. */ - public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action); - - /** BindingDelta role. */ - public role: string; - - /** BindingDelta member. */ - public member: string; - - /** BindingDelta condition. */ - public condition?: (google.type.IExpr|null); - - /** - * Creates a new BindingDelta instance using the specified properties. - * @param [properties] Properties to set - * @returns BindingDelta instance - */ - public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta; - - /** - * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @param message BindingDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @param message BindingDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BindingDelta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.BindingDelta; - - /** - * Decodes a BindingDelta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.BindingDelta; - - /** - * Verifies a BindingDelta message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BindingDelta - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta; - - /** - * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. - * @param message BindingDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BindingDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BindingDelta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BindingDelta { - - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - ADD = 1, - REMOVE = 2 - } - } - - /** Properties of an AuditConfigDelta. */ - interface IAuditConfigDelta { - - /** AuditConfigDelta action */ - action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null); - - /** AuditConfigDelta service */ - service?: (string|null); - - /** AuditConfigDelta exemptedMember */ - exemptedMember?: (string|null); - - /** AuditConfigDelta logType */ - logType?: (string|null); - } - - /** Represents an AuditConfigDelta. */ - class AuditConfigDelta implements IAuditConfigDelta { - - /** - * Constructs a new AuditConfigDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IAuditConfigDelta); - - /** AuditConfigDelta action. */ - public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action); - - /** AuditConfigDelta service. */ - public service: string; - - /** AuditConfigDelta exemptedMember. */ - public exemptedMember: string; - - /** AuditConfigDelta logType. */ - public logType: string; - - /** - * Creates a new AuditConfigDelta instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditConfigDelta instance - */ - public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta; - - /** - * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @param message AuditConfigDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @param message AuditConfigDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfigDelta; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfigDelta; - - /** - * Verifies an AuditConfigDelta message. - * @param message Plain 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 AuditConfigDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditConfigDelta - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta; - - /** - * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. - * @param message AuditConfigDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuditConfigDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuditConfigDelta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AuditConfigDelta { - - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - ADD = 1, - REMOVE = 2 - } - } - } - } - - /** 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; - } - } -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js deleted file mode 100644 index f97790dd10a..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js +++ /dev/null @@ -1,61858 +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. - -/*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_backupdr_protos || ($protobuf.roots._google_cloud_backupdr_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.backupdr = (function() { - - /** - * Namespace backupdr. - * @memberof google.cloud - * @namespace - */ - var backupdr = {}; - - backupdr.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.cloud.backupdr - * @namespace - */ - var v1 = {}; - - v1.BackupDR = (function() { - - /** - * Constructs a new BackupDR service. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupDR - * @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 BackupDR(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (BackupDR.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = BackupDR; - - /** - * Creates new BackupDR service using the specified rpc implementation. - * @function create - * @memberof google.cloud.backupdr.v1.BackupDR - * @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 {BackupDR} RPC service. Useful where requests and/or responses are streamed. - */ - BackupDR.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listManagementServers}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef ListManagementServersCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ListManagementServersResponse} [response] ListManagementServersResponse - */ - - /** - * Calls ListManagementServers. - * @function listManagementServers - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListManagementServersRequest} request ListManagementServersRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.ListManagementServersCallback} callback Node-style callback called with the error, if any, and ListManagementServersResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.listManagementServers = function listManagementServers(request, callback) { - return this.rpcCall(listManagementServers, $root.google.cloud.backupdr.v1.ListManagementServersRequest, $root.google.cloud.backupdr.v1.ListManagementServersResponse, request, callback); - }, "name", { value: "ListManagementServers" }); - - /** - * Calls ListManagementServers. - * @function listManagementServers - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListManagementServersRequest} request ListManagementServersRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getManagementServer}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef GetManagementServerCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ManagementServer} [response] ManagementServer - */ - - /** - * Calls GetManagementServer. - * @function getManagementServer - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} request GetManagementServerRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.GetManagementServerCallback} callback Node-style callback called with the error, if any, and ManagementServer - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.getManagementServer = function getManagementServer(request, callback) { - return this.rpcCall(getManagementServer, $root.google.cloud.backupdr.v1.GetManagementServerRequest, $root.google.cloud.backupdr.v1.ManagementServer, request, callback); - }, "name", { value: "GetManagementServer" }); - - /** - * Calls GetManagementServer. - * @function getManagementServer - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} request GetManagementServerRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createManagementServer}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef CreateManagementServerCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateManagementServer. - * @function createManagementServer - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} request CreateManagementServerRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.CreateManagementServerCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.createManagementServer = function createManagementServer(request, callback) { - return this.rpcCall(createManagementServer, $root.google.cloud.backupdr.v1.CreateManagementServerRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateManagementServer" }); - - /** - * Calls CreateManagementServer. - * @function createManagementServer - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} request CreateManagementServerRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteManagementServer}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef DeleteManagementServerCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteManagementServer. - * @function deleteManagementServer - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} request DeleteManagementServerRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.DeleteManagementServerCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.deleteManagementServer = function deleteManagementServer(request, callback) { - return this.rpcCall(deleteManagementServer, $root.google.cloud.backupdr.v1.DeleteManagementServerRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteManagementServer" }); - - /** - * Calls DeleteManagementServer. - * @function deleteManagementServer - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} request DeleteManagementServerRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupVault}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef CreateBackupVaultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateBackupVault. - * @function createBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} request CreateBackupVaultRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.createBackupVault = function createBackupVault(request, callback) { - return this.rpcCall(createBackupVault, $root.google.cloud.backupdr.v1.CreateBackupVaultRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateBackupVault" }); - - /** - * Calls CreateBackupVault. - * @function createBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} request CreateBackupVaultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupVaults}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef ListBackupVaultsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ListBackupVaultsResponse} [response] ListBackupVaultsResponse - */ - - /** - * Calls ListBackupVaults. - * @function listBackupVaults - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} request ListBackupVaultsRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.ListBackupVaultsCallback} callback Node-style callback called with the error, if any, and ListBackupVaultsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.listBackupVaults = function listBackupVaults(request, callback) { - return this.rpcCall(listBackupVaults, $root.google.cloud.backupdr.v1.ListBackupVaultsRequest, $root.google.cloud.backupdr.v1.ListBackupVaultsResponse, request, callback); - }, "name", { value: "ListBackupVaults" }); - - /** - * Calls ListBackupVaults. - * @function listBackupVaults - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} request ListBackupVaultsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchUsableBackupVaults}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef FetchUsableBackupVaultsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} [response] FetchUsableBackupVaultsResponse - */ - - /** - * Calls FetchUsableBackupVaults. - * @function fetchUsableBackupVaults - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} request FetchUsableBackupVaultsRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaultsCallback} callback Node-style callback called with the error, if any, and FetchUsableBackupVaultsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.fetchUsableBackupVaults = function fetchUsableBackupVaults(request, callback) { - return this.rpcCall(fetchUsableBackupVaults, $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest, $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse, request, callback); - }, "name", { value: "FetchUsableBackupVaults" }); - - /** - * Calls FetchUsableBackupVaults. - * @function fetchUsableBackupVaults - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} request FetchUsableBackupVaultsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupVault}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef GetBackupVaultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.BackupVault} [response] BackupVault - */ - - /** - * Calls GetBackupVault. - * @function getBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} request GetBackupVaultRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.GetBackupVaultCallback} callback Node-style callback called with the error, if any, and BackupVault - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.getBackupVault = function getBackupVault(request, callback) { - return this.rpcCall(getBackupVault, $root.google.cloud.backupdr.v1.GetBackupVaultRequest, $root.google.cloud.backupdr.v1.BackupVault, request, callback); - }, "name", { value: "GetBackupVault" }); - - /** - * Calls GetBackupVault. - * @function getBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} request GetBackupVaultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackupVault}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef UpdateBackupVaultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateBackupVault. - * @function updateBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} request UpdateBackupVaultRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.UpdateBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.updateBackupVault = function updateBackupVault(request, callback) { - return this.rpcCall(updateBackupVault, $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateBackupVault" }); - - /** - * Calls UpdateBackupVault. - * @function updateBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} request UpdateBackupVaultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupVault}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef DeleteBackupVaultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteBackupVault. - * @function deleteBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} request DeleteBackupVaultRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.deleteBackupVault = function deleteBackupVault(request, callback) { - return this.rpcCall(deleteBackupVault, $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteBackupVault" }); - - /** - * Calls DeleteBackupVault. - * @function deleteBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} request DeleteBackupVaultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|testIamPermissions}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse - */ - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listDataSources}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef ListDataSourcesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ListDataSourcesResponse} [response] ListDataSourcesResponse - */ - - /** - * Calls ListDataSources. - * @function listDataSources - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} request ListDataSourcesRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.ListDataSourcesCallback} callback Node-style callback called with the error, if any, and ListDataSourcesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.listDataSources = function listDataSources(request, callback) { - return this.rpcCall(listDataSources, $root.google.cloud.backupdr.v1.ListDataSourcesRequest, $root.google.cloud.backupdr.v1.ListDataSourcesResponse, request, callback); - }, "name", { value: "ListDataSources" }); - - /** - * Calls ListDataSources. - * @function listDataSources - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} request ListDataSourcesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getDataSource}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef GetDataSourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.DataSource} [response] DataSource - */ - - /** - * Calls GetDataSource. - * @function getDataSource - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} request GetDataSourceRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.GetDataSourceCallback} callback Node-style callback called with the error, if any, and DataSource - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.getDataSource = function getDataSource(request, callback) { - return this.rpcCall(getDataSource, $root.google.cloud.backupdr.v1.GetDataSourceRequest, $root.google.cloud.backupdr.v1.DataSource, request, callback); - }, "name", { value: "GetDataSource" }); - - /** - * Calls GetDataSource. - * @function getDataSource - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} request GetDataSourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateDataSource}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef UpdateDataSourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateDataSource. - * @function updateDataSource - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} request UpdateDataSourceRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.UpdateDataSourceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.updateDataSource = function updateDataSource(request, callback) { - return this.rpcCall(updateDataSource, $root.google.cloud.backupdr.v1.UpdateDataSourceRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateDataSource" }); - - /** - * Calls UpdateDataSource. - * @function updateDataSource - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} request UpdateDataSourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|removeDataSource}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef RemoveDataSourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RemoveDataSource. - * @function removeDataSource - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} request RemoveDataSourceRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.RemoveDataSourceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.removeDataSource = function removeDataSource(request, callback) { - return this.rpcCall(removeDataSource, $root.google.cloud.backupdr.v1.RemoveDataSourceRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RemoveDataSource" }); - - /** - * Calls RemoveDataSource. - * @function removeDataSource - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} request RemoveDataSourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|setInternalStatus}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef SetInternalStatusCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls SetInternalStatus. - * @function setInternalStatus - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} request SetInternalStatusRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.SetInternalStatusCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.setInternalStatus = function setInternalStatus(request, callback) { - return this.rpcCall(setInternalStatus, $root.google.cloud.backupdr.v1.SetInternalStatusRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "SetInternalStatus" }); - - /** - * Calls SetInternalStatus. - * @function setInternalStatus - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} request SetInternalStatusRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|initiateBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef InitiateBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.InitiateBackupResponse} [response] InitiateBackupResponse - */ - - /** - * Calls InitiateBackup. - * @function initiateBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} request InitiateBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.InitiateBackupCallback} callback Node-style callback called with the error, if any, and InitiateBackupResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.initiateBackup = function initiateBackup(request, callback) { - return this.rpcCall(initiateBackup, $root.google.cloud.backupdr.v1.InitiateBackupRequest, $root.google.cloud.backupdr.v1.InitiateBackupResponse, request, callback); - }, "name", { value: "InitiateBackup" }); - - /** - * Calls InitiateBackup. - * @function initiateBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} request InitiateBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|abandonBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef AbandonBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls AbandonBackup. - * @function abandonBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} request AbandonBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.AbandonBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.abandonBackup = function abandonBackup(request, callback) { - return this.rpcCall(abandonBackup, $root.google.cloud.backupdr.v1.AbandonBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "AbandonBackup" }); - - /** - * Calls AbandonBackup. - * @function abandonBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} request AbandonBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|finalizeBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef FinalizeBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls FinalizeBackup. - * @function finalizeBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} request FinalizeBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.FinalizeBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.finalizeBackup = function finalizeBackup(request, callback) { - return this.rpcCall(finalizeBackup, $root.google.cloud.backupdr.v1.FinalizeBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "FinalizeBackup" }); - - /** - * Calls FinalizeBackup. - * @function finalizeBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} request FinalizeBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchAccessToken}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef FetchAccessTokenCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.FetchAccessTokenResponse} [response] FetchAccessTokenResponse - */ - - /** - * Calls FetchAccessToken. - * @function fetchAccessToken - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} request FetchAccessTokenRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.FetchAccessTokenCallback} callback Node-style callback called with the error, if any, and FetchAccessTokenResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.fetchAccessToken = function fetchAccessToken(request, callback) { - return this.rpcCall(fetchAccessToken, $root.google.cloud.backupdr.v1.FetchAccessTokenRequest, $root.google.cloud.backupdr.v1.FetchAccessTokenResponse, request, callback); - }, "name", { value: "FetchAccessToken" }); - - /** - * Calls FetchAccessToken. - * @function fetchAccessToken - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} request FetchAccessTokenRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackups}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef ListBackupsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ListBackupsResponse} [response] ListBackupsResponse - */ - - /** - * Calls ListBackups. - * @function listBackups - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupsRequest} request ListBackupsRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.ListBackupsCallback} callback Node-style callback called with the error, if any, and ListBackupsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.listBackups = function listBackups(request, callback) { - return this.rpcCall(listBackups, $root.google.cloud.backupdr.v1.ListBackupsRequest, $root.google.cloud.backupdr.v1.ListBackupsResponse, request, callback); - }, "name", { value: "ListBackups" }); - - /** - * Calls ListBackups. - * @function listBackups - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupsRequest} request ListBackupsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef GetBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.Backup} [response] Backup - */ - - /** - * Calls GetBackup. - * @function getBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupRequest} request GetBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.GetBackupCallback} callback Node-style callback called with the error, if any, and Backup - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.getBackup = function getBackup(request, callback) { - return this.rpcCall(getBackup, $root.google.cloud.backupdr.v1.GetBackupRequest, $root.google.cloud.backupdr.v1.Backup, request, callback); - }, "name", { value: "GetBackup" }); - - /** - * Calls GetBackup. - * @function getBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupRequest} request GetBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef UpdateBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateBackup. - * @function updateBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} request UpdateBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.UpdateBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.updateBackup = function updateBackup(request, callback) { - return this.rpcCall(updateBackup, $root.google.cloud.backupdr.v1.UpdateBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateBackup" }); - - /** - * Calls UpdateBackup. - * @function updateBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} request UpdateBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef DeleteBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteBackup. - * @function deleteBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} request DeleteBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.deleteBackup = function deleteBackup(request, callback) { - return this.rpcCall(deleteBackup, $root.google.cloud.backupdr.v1.DeleteBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteBackup" }); - - /** - * Calls DeleteBackup. - * @function deleteBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} request DeleteBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|restoreBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef RestoreBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RestoreBackup. - * @function restoreBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} request RestoreBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.RestoreBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.restoreBackup = function restoreBackup(request, callback) { - return this.rpcCall(restoreBackup, $root.google.cloud.backupdr.v1.RestoreBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RestoreBackup" }); - - /** - * Calls RestoreBackup. - * @function restoreBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} request RestoreBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlan}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef CreateBackupPlanCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateBackupPlan. - * @function createBackupPlan - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} request CreateBackupPlanRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupPlanCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.createBackupPlan = function createBackupPlan(request, callback) { - return this.rpcCall(createBackupPlan, $root.google.cloud.backupdr.v1.CreateBackupPlanRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateBackupPlan" }); - - /** - * Calls CreateBackupPlan. - * @function createBackupPlan - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} request CreateBackupPlanRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlan}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef GetBackupPlanCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.BackupPlan} [response] BackupPlan - */ - - /** - * Calls GetBackupPlan. - * @function getBackupPlan - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} request GetBackupPlanRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.GetBackupPlanCallback} callback Node-style callback called with the error, if any, and BackupPlan - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.getBackupPlan = function getBackupPlan(request, callback) { - return this.rpcCall(getBackupPlan, $root.google.cloud.backupdr.v1.GetBackupPlanRequest, $root.google.cloud.backupdr.v1.BackupPlan, request, callback); - }, "name", { value: "GetBackupPlan" }); - - /** - * Calls GetBackupPlan. - * @function getBackupPlan - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} request GetBackupPlanRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlans}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef ListBackupPlansCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ListBackupPlansResponse} [response] ListBackupPlansResponse - */ - - /** - * Calls ListBackupPlans. - * @function listBackupPlans - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} request ListBackupPlansRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.ListBackupPlansCallback} callback Node-style callback called with the error, if any, and ListBackupPlansResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.listBackupPlans = function listBackupPlans(request, callback) { - return this.rpcCall(listBackupPlans, $root.google.cloud.backupdr.v1.ListBackupPlansRequest, $root.google.cloud.backupdr.v1.ListBackupPlansResponse, request, callback); - }, "name", { value: "ListBackupPlans" }); - - /** - * Calls ListBackupPlans. - * @function listBackupPlans - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} request ListBackupPlansRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlan}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef DeleteBackupPlanCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteBackupPlan. - * @function deleteBackupPlan - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} request DeleteBackupPlanRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.deleteBackupPlan = function deleteBackupPlan(request, callback) { - return this.rpcCall(deleteBackupPlan, $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteBackupPlan" }); - - /** - * Calls DeleteBackupPlan. - * @function deleteBackupPlan - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} request DeleteBackupPlanRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlanAssociation}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef CreateBackupPlanAssociationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateBackupPlanAssociation. - * @function createBackupPlanAssociation - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} request CreateBackupPlanAssociationRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.createBackupPlanAssociation = function createBackupPlanAssociation(request, callback) { - return this.rpcCall(createBackupPlanAssociation, $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateBackupPlanAssociation" }); - - /** - * Calls CreateBackupPlanAssociation. - * @function createBackupPlanAssociation - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} request CreateBackupPlanAssociationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlanAssociation}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef GetBackupPlanAssociationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.BackupPlanAssociation} [response] BackupPlanAssociation - */ - - /** - * Calls GetBackupPlanAssociation. - * @function getBackupPlanAssociation - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} request GetBackupPlanAssociationRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and BackupPlanAssociation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.getBackupPlanAssociation = function getBackupPlanAssociation(request, callback) { - return this.rpcCall(getBackupPlanAssociation, $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest, $root.google.cloud.backupdr.v1.BackupPlanAssociation, request, callback); - }, "name", { value: "GetBackupPlanAssociation" }); - - /** - * Calls GetBackupPlanAssociation. - * @function getBackupPlanAssociation - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} request GetBackupPlanAssociationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlanAssociations}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef ListBackupPlanAssociationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} [response] ListBackupPlanAssociationsResponse - */ - - /** - * Calls ListBackupPlanAssociations. - * @function listBackupPlanAssociations - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} request ListBackupPlanAssociationsRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociationsCallback} callback Node-style callback called with the error, if any, and ListBackupPlanAssociationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.listBackupPlanAssociations = function listBackupPlanAssociations(request, callback) { - return this.rpcCall(listBackupPlanAssociations, $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest, $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse, request, callback); - }, "name", { value: "ListBackupPlanAssociations" }); - - /** - * Calls ListBackupPlanAssociations. - * @function listBackupPlanAssociations - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} request ListBackupPlanAssociationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlanAssociation}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef DeleteBackupPlanAssociationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteBackupPlanAssociation. - * @function deleteBackupPlanAssociation - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} request DeleteBackupPlanAssociationRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.deleteBackupPlanAssociation = function deleteBackupPlanAssociation(request, callback) { - return this.rpcCall(deleteBackupPlanAssociation, $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteBackupPlanAssociation" }); - - /** - * Calls DeleteBackupPlanAssociation. - * @function deleteBackupPlanAssociation - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} request DeleteBackupPlanAssociationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|triggerBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef TriggerBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls TriggerBackup. - * @function triggerBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} request TriggerBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.TriggerBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.triggerBackup = function triggerBackup(request, callback) { - return this.rpcCall(triggerBackup, $root.google.cloud.backupdr.v1.TriggerBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "TriggerBackup" }); - - /** - * Calls TriggerBackup. - * @function triggerBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} request TriggerBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return BackupDR; - })(); - - v1.NetworkConfig = (function() { - - /** - * Properties of a NetworkConfig. - * @memberof google.cloud.backupdr.v1 - * @interface INetworkConfig - * @property {string|null} [network] NetworkConfig network - * @property {google.cloud.backupdr.v1.NetworkConfig.PeeringMode|null} [peeringMode] NetworkConfig peeringMode - */ - - /** - * Constructs a new NetworkConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a NetworkConfig. - * @implements INetworkConfig - * @constructor - * @param {google.cloud.backupdr.v1.INetworkConfig=} [properties] Properties to set - */ - function NetworkConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkConfig network. - * @member {string} network - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.network = ""; - - /** - * NetworkConfig peeringMode. - * @member {google.cloud.backupdr.v1.NetworkConfig.PeeringMode} peeringMode - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.peeringMode = 0; - - /** - * Creates a new NetworkConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig instance - */ - NetworkConfig.create = function create(properties) { - return new NetworkConfig(properties); - }; - - /** - * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkConfig} message NetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); - if (message.peeringMode != null && Object.hasOwnProperty.call(message, "peeringMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.peeringMode); - return writer; - }; - - /** - * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkConfig} message NetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkConfig.decode = function 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.backupdr.v1.NetworkConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.network = reader.string(); - break; - } - case 2: { - message.peeringMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.peeringMode != null && message.hasOwnProperty("peeringMode")) - switch (message.peeringMode) { - default: - return "peeringMode: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig - */ - NetworkConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.NetworkConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.NetworkConfig(); - if (object.network != null) - message.network = String(object.network); - switch (object.peeringMode) { - default: - if (typeof object.peeringMode === "number") { - message.peeringMode = object.peeringMode; - break; - } - break; - case "PEERING_MODE_UNSPECIFIED": - case 0: - message.peeringMode = 0; - break; - case "PRIVATE_SERVICE_ACCESS": - case 1: - message.peeringMode = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.NetworkConfig} message NetworkConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.network = ""; - object.peeringMode = options.enums === String ? "PEERING_MODE_UNSPECIFIED" : 0; - } - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.peeringMode != null && message.hasOwnProperty("peeringMode")) - object.peeringMode = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode] === undefined ? message.peeringMode : $root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode] : message.peeringMode; - return object; - }; - - /** - * Converts this NetworkConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @instance - * @returns {Object.} JSON object - */ - NetworkConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkConfig"; - }; - - /** - * PeeringMode enum. - * @name google.cloud.backupdr.v1.NetworkConfig.PeeringMode - * @enum {number} - * @property {number} PEERING_MODE_UNSPECIFIED=0 PEERING_MODE_UNSPECIFIED value - * @property {number} PRIVATE_SERVICE_ACCESS=1 PRIVATE_SERVICE_ACCESS value - */ - NetworkConfig.PeeringMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PEERING_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRIVATE_SERVICE_ACCESS"] = 1; - return values; - })(); - - return NetworkConfig; - })(); - - v1.ManagementURI = (function() { - - /** - * Properties of a ManagementURI. - * @memberof google.cloud.backupdr.v1 - * @interface IManagementURI - * @property {string|null} [webUi] ManagementURI webUi - * @property {string|null} [api] ManagementURI api - */ - - /** - * Constructs a new ManagementURI. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ManagementURI. - * @implements IManagementURI - * @constructor - * @param {google.cloud.backupdr.v1.IManagementURI=} [properties] Properties to set - */ - function ManagementURI(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ManagementURI webUi. - * @member {string} webUi - * @memberof google.cloud.backupdr.v1.ManagementURI - * @instance - */ - ManagementURI.prototype.webUi = ""; - - /** - * ManagementURI api. - * @member {string} api - * @memberof google.cloud.backupdr.v1.ManagementURI - * @instance - */ - ManagementURI.prototype.api = ""; - - /** - * Creates a new ManagementURI instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.IManagementURI=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI instance - */ - ManagementURI.create = function create(properties) { - return new ManagementURI(properties); - }; - - /** - * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.IManagementURI} message ManagementURI message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ManagementURI.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.webUi != null && Object.hasOwnProperty.call(message, "webUi")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.webUi); - if (message.api != null && Object.hasOwnProperty.call(message, "api")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.api); - return writer; - }; - - /** - * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.IManagementURI} message ManagementURI message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ManagementURI.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ManagementURI message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ManagementURI.decode = function 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.backupdr.v1.ManagementURI(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.webUi = reader.string(); - break; - } - case 2: { - message.api = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ManagementURI message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ManagementURI.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ManagementURI message. - * @function verify - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ManagementURI.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.webUi != null && message.hasOwnProperty("webUi")) - if (!$util.isString(message.webUi)) - return "webUi: string expected"; - if (message.api != null && message.hasOwnProperty("api")) - if (!$util.isString(message.api)) - return "api: string expected"; - return null; - }; - - /** - * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI - */ - ManagementURI.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ManagementURI) - return object; - var message = new $root.google.cloud.backupdr.v1.ManagementURI(); - if (object.webUi != null) - message.webUi = String(object.webUi); - if (object.api != null) - message.api = String(object.api); - return message; - }; - - /** - * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.ManagementURI} message ManagementURI - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ManagementURI.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.webUi = ""; - object.api = ""; - } - if (message.webUi != null && message.hasOwnProperty("webUi")) - object.webUi = message.webUi; - if (message.api != null && message.hasOwnProperty("api")) - object.api = message.api; - return object; - }; - - /** - * Converts this ManagementURI to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ManagementURI - * @instance - * @returns {Object.} JSON object - */ - ManagementURI.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ManagementURI - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ManagementURI.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ManagementURI"; - }; - - return ManagementURI; - })(); - - v1.WorkforceIdentityBasedManagementURI = (function() { - - /** - * Properties of a WorkforceIdentityBasedManagementURI. - * @memberof google.cloud.backupdr.v1 - * @interface IWorkforceIdentityBasedManagementURI - * @property {string|null} [firstPartyManagementUri] WorkforceIdentityBasedManagementURI firstPartyManagementUri - * @property {string|null} [thirdPartyManagementUri] WorkforceIdentityBasedManagementURI thirdPartyManagementUri - */ - - /** - * Constructs a new WorkforceIdentityBasedManagementURI. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a WorkforceIdentityBasedManagementURI. - * @implements IWorkforceIdentityBasedManagementURI - * @constructor - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI=} [properties] Properties to set - */ - function WorkforceIdentityBasedManagementURI(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkforceIdentityBasedManagementURI firstPartyManagementUri. - * @member {string} firstPartyManagementUri - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @instance - */ - WorkforceIdentityBasedManagementURI.prototype.firstPartyManagementUri = ""; - - /** - * WorkforceIdentityBasedManagementURI thirdPartyManagementUri. - * @member {string} thirdPartyManagementUri - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @instance - */ - WorkforceIdentityBasedManagementURI.prototype.thirdPartyManagementUri = ""; - - /** - * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI instance - */ - WorkforceIdentityBasedManagementURI.create = function create(properties) { - return new WorkforceIdentityBasedManagementURI(properties); - }; - - /** - * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkforceIdentityBasedManagementURI.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.firstPartyManagementUri != null && Object.hasOwnProperty.call(message, "firstPartyManagementUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.firstPartyManagementUri); - if (message.thirdPartyManagementUri != null && Object.hasOwnProperty.call(message, "thirdPartyManagementUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.thirdPartyManagementUri); - return writer; - }; - - /** - * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkforceIdentityBasedManagementURI.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkforceIdentityBasedManagementURI.decode = function 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.backupdr.v1.WorkforceIdentityBasedManagementURI(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.firstPartyManagementUri = reader.string(); - break; - } - case 2: { - message.thirdPartyManagementUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkforceIdentityBasedManagementURI.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkforceIdentityBasedManagementURI message. - * @function verify - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkforceIdentityBasedManagementURI.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.firstPartyManagementUri != null && message.hasOwnProperty("firstPartyManagementUri")) - if (!$util.isString(message.firstPartyManagementUri)) - return "firstPartyManagementUri: string expected"; - if (message.thirdPartyManagementUri != null && message.hasOwnProperty("thirdPartyManagementUri")) - if (!$util.isString(message.thirdPartyManagementUri)) - return "thirdPartyManagementUri: string expected"; - return null; - }; - - /** - * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI - */ - WorkforceIdentityBasedManagementURI.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI) - return object; - var message = new $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI(); - if (object.firstPartyManagementUri != null) - message.firstPartyManagementUri = String(object.firstPartyManagementUri); - if (object.thirdPartyManagementUri != null) - message.thirdPartyManagementUri = String(object.thirdPartyManagementUri); - return message; - }; - - /** - * Creates a plain object from a WorkforceIdentityBasedManagementURI message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkforceIdentityBasedManagementURI.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.firstPartyManagementUri = ""; - object.thirdPartyManagementUri = ""; - } - if (message.firstPartyManagementUri != null && message.hasOwnProperty("firstPartyManagementUri")) - object.firstPartyManagementUri = message.firstPartyManagementUri; - if (message.thirdPartyManagementUri != null && message.hasOwnProperty("thirdPartyManagementUri")) - object.thirdPartyManagementUri = message.thirdPartyManagementUri; - return object; - }; - - /** - * Converts this WorkforceIdentityBasedManagementURI to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @instance - * @returns {Object.} JSON object - */ - WorkforceIdentityBasedManagementURI.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkforceIdentityBasedManagementURI - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkforceIdentityBasedManagementURI.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI"; - }; - - return WorkforceIdentityBasedManagementURI; - })(); - - v1.WorkforceIdentityBasedOAuth2ClientID = (function() { - - /** - * Properties of a WorkforceIdentityBasedOAuth2ClientID. - * @memberof google.cloud.backupdr.v1 - * @interface IWorkforceIdentityBasedOAuth2ClientID - * @property {string|null} [firstPartyOauth2ClientId] WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId - * @property {string|null} [thirdPartyOauth2ClientId] WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId - */ - - /** - * Constructs a new WorkforceIdentityBasedOAuth2ClientID. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a WorkforceIdentityBasedOAuth2ClientID. - * @implements IWorkforceIdentityBasedOAuth2ClientID - * @constructor - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID=} [properties] Properties to set - */ - function WorkforceIdentityBasedOAuth2ClientID(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId. - * @member {string} firstPartyOauth2ClientId - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @instance - */ - WorkforceIdentityBasedOAuth2ClientID.prototype.firstPartyOauth2ClientId = ""; - - /** - * WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId. - * @member {string} thirdPartyOauth2ClientId - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @instance - */ - WorkforceIdentityBasedOAuth2ClientID.prototype.thirdPartyOauth2ClientId = ""; - - /** - * Creates a new WorkforceIdentityBasedOAuth2ClientID instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID instance - */ - WorkforceIdentityBasedOAuth2ClientID.create = function create(properties) { - return new WorkforceIdentityBasedOAuth2ClientID(properties); - }; - - /** - * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID} message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkforceIdentityBasedOAuth2ClientID.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.firstPartyOauth2ClientId != null && Object.hasOwnProperty.call(message, "firstPartyOauth2ClientId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.firstPartyOauth2ClientId); - if (message.thirdPartyOauth2ClientId != null && Object.hasOwnProperty.call(message, "thirdPartyOauth2ClientId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.thirdPartyOauth2ClientId); - return writer; - }; - - /** - * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID} message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkforceIdentityBasedOAuth2ClientID.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkforceIdentityBasedOAuth2ClientID.decode = function 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.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.firstPartyOauth2ClientId = reader.string(); - break; - } - case 2: { - message.thirdPartyOauth2ClientId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkforceIdentityBasedOAuth2ClientID.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkforceIdentityBasedOAuth2ClientID message. - * @function verify - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkforceIdentityBasedOAuth2ClientID.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.firstPartyOauth2ClientId != null && message.hasOwnProperty("firstPartyOauth2ClientId")) - if (!$util.isString(message.firstPartyOauth2ClientId)) - return "firstPartyOauth2ClientId: string expected"; - if (message.thirdPartyOauth2ClientId != null && message.hasOwnProperty("thirdPartyOauth2ClientId")) - if (!$util.isString(message.thirdPartyOauth2ClientId)) - return "thirdPartyOauth2ClientId: string expected"; - return null; - }; - - /** - * Creates a WorkforceIdentityBasedOAuth2ClientID message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID - */ - WorkforceIdentityBasedOAuth2ClientID.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID) - return object; - var message = new $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID(); - if (object.firstPartyOauth2ClientId != null) - message.firstPartyOauth2ClientId = String(object.firstPartyOauth2ClientId); - if (object.thirdPartyOauth2ClientId != null) - message.thirdPartyOauth2ClientId = String(object.thirdPartyOauth2ClientId); - return message; - }; - - /** - * Creates a plain object from a WorkforceIdentityBasedOAuth2ClientID message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} message WorkforceIdentityBasedOAuth2ClientID - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkforceIdentityBasedOAuth2ClientID.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.firstPartyOauth2ClientId = ""; - object.thirdPartyOauth2ClientId = ""; - } - if (message.firstPartyOauth2ClientId != null && message.hasOwnProperty("firstPartyOauth2ClientId")) - object.firstPartyOauth2ClientId = message.firstPartyOauth2ClientId; - if (message.thirdPartyOauth2ClientId != null && message.hasOwnProperty("thirdPartyOauth2ClientId")) - object.thirdPartyOauth2ClientId = message.thirdPartyOauth2ClientId; - return object; - }; - - /** - * Converts this WorkforceIdentityBasedOAuth2ClientID to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @instance - * @returns {Object.} JSON object - */ - WorkforceIdentityBasedOAuth2ClientID.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkforceIdentityBasedOAuth2ClientID - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkforceIdentityBasedOAuth2ClientID.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID"; - }; - - return WorkforceIdentityBasedOAuth2ClientID; - })(); - - v1.ManagementServer = (function() { - - /** - * Properties of a ManagementServer. - * @memberof google.cloud.backupdr.v1 - * @interface IManagementServer - * @property {string|null} [name] ManagementServer name - * @property {string|null} [description] ManagementServer description - * @property {Object.|null} [labels] ManagementServer labels - * @property {google.protobuf.ITimestamp|null} [createTime] ManagementServer createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ManagementServer updateTime - * @property {google.cloud.backupdr.v1.ManagementServer.InstanceType|null} [type] ManagementServer type - * @property {google.cloud.backupdr.v1.IManagementURI|null} [managementUri] ManagementServer managementUri - * @property {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null} [workforceIdentityBasedManagementUri] ManagementServer workforceIdentityBasedManagementUri - * @property {google.cloud.backupdr.v1.ManagementServer.InstanceState|null} [state] ManagementServer state - * @property {Array.|null} [networks] ManagementServer networks - * @property {string|null} [etag] ManagementServer etag - * @property {string|null} [oauth2ClientId] ManagementServer oauth2ClientId - * @property {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null} [workforceIdentityBasedOauth2ClientId] ManagementServer workforceIdentityBasedOauth2ClientId - * @property {Array.|null} [baProxyUri] ManagementServer baProxyUri - * @property {google.protobuf.IBoolValue|null} [satisfiesPzs] ManagementServer satisfiesPzs - * @property {boolean|null} [satisfiesPzi] ManagementServer satisfiesPzi - */ - - /** - * Constructs a new ManagementServer. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ManagementServer. - * @implements IManagementServer - * @constructor - * @param {google.cloud.backupdr.v1.IManagementServer=} [properties] Properties to set - */ - function ManagementServer(properties) { - this.labels = {}; - this.networks = []; - this.baProxyUri = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ManagementServer name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.name = ""; - - /** - * ManagementServer description. - * @member {string} description - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.description = ""; - - /** - * ManagementServer labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.labels = $util.emptyObject; - - /** - * ManagementServer createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.createTime = null; - - /** - * ManagementServer updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.updateTime = null; - - /** - * ManagementServer type. - * @member {google.cloud.backupdr.v1.ManagementServer.InstanceType} type - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.type = 0; - - /** - * ManagementServer managementUri. - * @member {google.cloud.backupdr.v1.IManagementURI|null|undefined} managementUri - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.managementUri = null; - - /** - * ManagementServer workforceIdentityBasedManagementUri. - * @member {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null|undefined} workforceIdentityBasedManagementUri - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.workforceIdentityBasedManagementUri = null; - - /** - * ManagementServer state. - * @member {google.cloud.backupdr.v1.ManagementServer.InstanceState} state - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.state = 0; - - /** - * ManagementServer networks. - * @member {Array.} networks - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.networks = $util.emptyArray; - - /** - * ManagementServer etag. - * @member {string} etag - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.etag = ""; - - /** - * ManagementServer oauth2ClientId. - * @member {string} oauth2ClientId - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.oauth2ClientId = ""; - - /** - * ManagementServer workforceIdentityBasedOauth2ClientId. - * @member {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null|undefined} workforceIdentityBasedOauth2ClientId - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.workforceIdentityBasedOauth2ClientId = null; - - /** - * ManagementServer baProxyUri. - * @member {Array.} baProxyUri - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.baProxyUri = $util.emptyArray; - - /** - * ManagementServer satisfiesPzs. - * @member {google.protobuf.IBoolValue|null|undefined} satisfiesPzs - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.satisfiesPzs = null; - - /** - * ManagementServer satisfiesPzi. - * @member {boolean} satisfiesPzi - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.satisfiesPzi = false; - - /** - * Creates a new ManagementServer instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {google.cloud.backupdr.v1.IManagementServer=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer instance - */ - ManagementServer.create = function create(properties) { - return new ManagementServer(properties); - }; - - /** - * Encodes the specified ManagementServer message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {google.cloud.backupdr.v1.IManagementServer} message ManagementServer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ManagementServer.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.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); - if (message.networks != null && message.networks.length) - for (var i = 0; i < message.networks.length; ++i) - $root.google.cloud.backupdr.v1.NetworkConfig.encode(message.networks[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.description); - if (message.managementUri != null && Object.hasOwnProperty.call(message, "managementUri")) - $root.google.cloud.backupdr.v1.ManagementURI.encode(message.managementUri, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.etag); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.type); - if (message.oauth2ClientId != null && Object.hasOwnProperty.call(message, "oauth2ClientId")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.oauth2ClientId); - if (message.workforceIdentityBasedManagementUri != null && Object.hasOwnProperty.call(message, "workforceIdentityBasedManagementUri")) - $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.encode(message.workforceIdentityBasedManagementUri, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.workforceIdentityBasedOauth2ClientId != null && Object.hasOwnProperty.call(message, "workforceIdentityBasedOauth2ClientId")) - $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.encode(message.workforceIdentityBasedOauth2ClientId, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.baProxyUri != null && message.baProxyUri.length) - for (var i = 0; i < message.baProxyUri.length; ++i) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.baProxyUri[i]); - if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) - $root.google.protobuf.BoolValue.encode(message.satisfiesPzs, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.satisfiesPzi); - return writer; - }; - - /** - * Encodes the specified ManagementServer message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {google.cloud.backupdr.v1.IManagementServer} message ManagementServer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ManagementServer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ManagementServer message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ManagementServer.decode = function 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.backupdr.v1.ManagementServer(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 9: { - message.description = reader.string(); - 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 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 14: { - message.type = reader.int32(); - break; - } - case 11: { - message.managementUri = $root.google.cloud.backupdr.v1.ManagementURI.decode(reader, reader.uint32()); - break; - } - case 16: { - message.workforceIdentityBasedManagementUri = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.decode(reader, reader.uint32()); - break; - } - case 7: { - message.state = reader.int32(); - break; - } - case 8: { - if (!(message.networks && message.networks.length)) - message.networks = []; - message.networks.push($root.google.cloud.backupdr.v1.NetworkConfig.decode(reader, reader.uint32())); - break; - } - case 13: { - message.etag = reader.string(); - break; - } - case 15: { - message.oauth2ClientId = reader.string(); - break; - } - case 17: { - message.workforceIdentityBasedOauth2ClientId = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.decode(reader, reader.uint32()); - break; - } - case 18: { - if (!(message.baProxyUri && message.baProxyUri.length)) - message.baProxyUri = []; - message.baProxyUri.push(reader.string()); - break; - } - case 19: { - message.satisfiesPzs = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - } - case 20: { - message.satisfiesPzi = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ManagementServer message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ManagementServer.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ManagementServer message. - * @function verify - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ManagementServer.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - 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.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } - if (message.managementUri != null && message.hasOwnProperty("managementUri")) { - var error = $root.google.cloud.backupdr.v1.ManagementURI.verify(message.managementUri); - if (error) - return "managementUri." + error; - } - if (message.workforceIdentityBasedManagementUri != null && message.hasOwnProperty("workforceIdentityBasedManagementUri")) { - var error = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify(message.workforceIdentityBasedManagementUri); - if (error) - return "workforceIdentityBasedManagementUri." + 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: - break; - } - if (message.networks != null && message.hasOwnProperty("networks")) { - if (!Array.isArray(message.networks)) - return "networks: array expected"; - for (var i = 0; i < message.networks.length; ++i) { - var error = $root.google.cloud.backupdr.v1.NetworkConfig.verify(message.networks[i]); - if (error) - return "networks." + error; - } - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.oauth2ClientId != null && message.hasOwnProperty("oauth2ClientId")) - if (!$util.isString(message.oauth2ClientId)) - return "oauth2ClientId: string expected"; - if (message.workforceIdentityBasedOauth2ClientId != null && message.hasOwnProperty("workforceIdentityBasedOauth2ClientId")) { - var error = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify(message.workforceIdentityBasedOauth2ClientId); - if (error) - return "workforceIdentityBasedOauth2ClientId." + error; - } - if (message.baProxyUri != null && message.hasOwnProperty("baProxyUri")) { - if (!Array.isArray(message.baProxyUri)) - return "baProxyUri: array expected"; - for (var i = 0; i < message.baProxyUri.length; ++i) - if (!$util.isString(message.baProxyUri[i])) - return "baProxyUri: string[] expected"; - } - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { - var error = $root.google.protobuf.BoolValue.verify(message.satisfiesPzs); - if (error) - return "satisfiesPzs." + error; - } - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) - if (typeof message.satisfiesPzi !== "boolean") - return "satisfiesPzi: boolean expected"; - return null; - }; - - /** - * Creates a ManagementServer message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer - */ - ManagementServer.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ManagementServer) - return object; - var message = new $root.google.cloud.backupdr.v1.ManagementServer(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.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.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.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.backupdr.v1.ManagementServer.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "INSTANCE_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "BACKUP_RESTORE": - case 1: - message.type = 1; - break; - } - if (object.managementUri != null) { - if (typeof object.managementUri !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.managementUri: object expected"); - message.managementUri = $root.google.cloud.backupdr.v1.ManagementURI.fromObject(object.managementUri); - } - if (object.workforceIdentityBasedManagementUri != null) { - if (typeof object.workforceIdentityBasedManagementUri !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.workforceIdentityBasedManagementUri: object expected"); - message.workforceIdentityBasedManagementUri = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.fromObject(object.workforceIdentityBasedManagementUri); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "INSTANCE_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "CREATING": - case 1: - message.state = 1; - break; - case "READY": - case 2: - message.state = 2; - break; - case "UPDATING": - case 3: - message.state = 3; - break; - case "DELETING": - case 4: - message.state = 4; - break; - case "REPAIRING": - case 5: - message.state = 5; - break; - case "MAINTENANCE": - case 6: - message.state = 6; - break; - case "ERROR": - case 7: - message.state = 7; - break; - } - if (object.networks) { - if (!Array.isArray(object.networks)) - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.networks: array expected"); - message.networks = []; - for (var i = 0; i < object.networks.length; ++i) { - if (typeof object.networks[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.networks: object expected"); - message.networks[i] = $root.google.cloud.backupdr.v1.NetworkConfig.fromObject(object.networks[i]); - } - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.oauth2ClientId != null) - message.oauth2ClientId = String(object.oauth2ClientId); - if (object.workforceIdentityBasedOauth2ClientId != null) { - if (typeof object.workforceIdentityBasedOauth2ClientId !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.workforceIdentityBasedOauth2ClientId: object expected"); - message.workforceIdentityBasedOauth2ClientId = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.fromObject(object.workforceIdentityBasedOauth2ClientId); - } - if (object.baProxyUri) { - if (!Array.isArray(object.baProxyUri)) - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.baProxyUri: array expected"); - message.baProxyUri = []; - for (var i = 0; i < object.baProxyUri.length; ++i) - message.baProxyUri[i] = String(object.baProxyUri[i]); - } - if (object.satisfiesPzs != null) { - if (typeof object.satisfiesPzs !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.satisfiesPzs: object expected"); - message.satisfiesPzs = $root.google.protobuf.BoolValue.fromObject(object.satisfiesPzs); - } - if (object.satisfiesPzi != null) - message.satisfiesPzi = Boolean(object.satisfiesPzi); - return message; - }; - - /** - * Creates a plain object from a ManagementServer message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {google.cloud.backupdr.v1.ManagementServer} message ManagementServer - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ManagementServer.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.networks = []; - object.baProxyUri = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.state = options.enums === String ? "INSTANCE_STATE_UNSPECIFIED" : 0; - object.description = ""; - object.managementUri = null; - object.etag = ""; - object.type = options.enums === String ? "INSTANCE_TYPE_UNSPECIFIED" : 0; - object.oauth2ClientId = ""; - object.workforceIdentityBasedManagementUri = null; - object.workforceIdentityBasedOauth2ClientId = null; - object.satisfiesPzs = null; - object.satisfiesPzi = false; - } - 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.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.ManagementServer.InstanceState[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.ManagementServer.InstanceState[message.state] : message.state; - if (message.networks && message.networks.length) { - object.networks = []; - for (var j = 0; j < message.networks.length; ++j) - object.networks[j] = $root.google.cloud.backupdr.v1.NetworkConfig.toObject(message.networks[j], options); - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.managementUri != null && message.hasOwnProperty("managementUri")) - object.managementUri = $root.google.cloud.backupdr.v1.ManagementURI.toObject(message.managementUri, options); - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.backupdr.v1.ManagementServer.InstanceType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.ManagementServer.InstanceType[message.type] : message.type; - if (message.oauth2ClientId != null && message.hasOwnProperty("oauth2ClientId")) - object.oauth2ClientId = message.oauth2ClientId; - if (message.workforceIdentityBasedManagementUri != null && message.hasOwnProperty("workforceIdentityBasedManagementUri")) - object.workforceIdentityBasedManagementUri = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.toObject(message.workforceIdentityBasedManagementUri, options); - if (message.workforceIdentityBasedOauth2ClientId != null && message.hasOwnProperty("workforceIdentityBasedOauth2ClientId")) - object.workforceIdentityBasedOauth2ClientId = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.toObject(message.workforceIdentityBasedOauth2ClientId, options); - if (message.baProxyUri && message.baProxyUri.length) { - object.baProxyUri = []; - for (var j = 0; j < message.baProxyUri.length; ++j) - object.baProxyUri[j] = message.baProxyUri[j]; - } - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) - object.satisfiesPzs = $root.google.protobuf.BoolValue.toObject(message.satisfiesPzs, options); - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) - object.satisfiesPzi = message.satisfiesPzi; - return object; - }; - - /** - * Converts this ManagementServer to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - * @returns {Object.} JSON object - */ - ManagementServer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ManagementServer - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ManagementServer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ManagementServer"; - }; - - /** - * InstanceType enum. - * @name google.cloud.backupdr.v1.ManagementServer.InstanceType - * @enum {number} - * @property {number} INSTANCE_TYPE_UNSPECIFIED=0 INSTANCE_TYPE_UNSPECIFIED value - * @property {number} BACKUP_RESTORE=1 BACKUP_RESTORE value - */ - ManagementServer.InstanceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INSTANCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BACKUP_RESTORE"] = 1; - return values; - })(); - - /** - * InstanceState enum. - * @name google.cloud.backupdr.v1.ManagementServer.InstanceState - * @enum {number} - * @property {number} INSTANCE_STATE_UNSPECIFIED=0 INSTANCE_STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} READY=2 READY value - * @property {number} UPDATING=3 UPDATING value - * @property {number} DELETING=4 DELETING value - * @property {number} REPAIRING=5 REPAIRING value - * @property {number} MAINTENANCE=6 MAINTENANCE value - * @property {number} ERROR=7 ERROR value - */ - ManagementServer.InstanceState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INSTANCE_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "READY"] = 2; - values[valuesById[3] = "UPDATING"] = 3; - values[valuesById[4] = "DELETING"] = 4; - values[valuesById[5] = "REPAIRING"] = 5; - values[valuesById[6] = "MAINTENANCE"] = 6; - values[valuesById[7] = "ERROR"] = 7; - return values; - })(); - - return ManagementServer; - })(); - - v1.ListManagementServersRequest = (function() { - - /** - * Properties of a ListManagementServersRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListManagementServersRequest - * @property {string|null} [parent] ListManagementServersRequest parent - * @property {number|null} [pageSize] ListManagementServersRequest pageSize - * @property {string|null} [pageToken] ListManagementServersRequest pageToken - * @property {string|null} [filter] ListManagementServersRequest filter - * @property {string|null} [orderBy] ListManagementServersRequest orderBy - */ - - /** - * Constructs a new ListManagementServersRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListManagementServersRequest. - * @implements IListManagementServersRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListManagementServersRequest=} [properties] Properties to set - */ - function ListManagementServersRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListManagementServersRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - ListManagementServersRequest.prototype.parent = ""; - - /** - * ListManagementServersRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - ListManagementServersRequest.prototype.pageSize = 0; - - /** - * ListManagementServersRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - ListManagementServersRequest.prototype.pageToken = ""; - - /** - * ListManagementServersRequest filter. - * @member {string|null|undefined} filter - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - ListManagementServersRequest.prototype.filter = null; - - /** - * ListManagementServersRequest orderBy. - * @member {string|null|undefined} orderBy - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - ListManagementServersRequest.prototype.orderBy = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ListManagementServersRequest _filter. - * @member {"filter"|undefined} _filter - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - Object.defineProperty(ListManagementServersRequest.prototype, "_filter", { - get: $util.oneOfGetter($oneOfFields = ["filter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ListManagementServersRequest _orderBy. - * @member {"orderBy"|undefined} _orderBy - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - Object.defineProperty(ListManagementServersRequest.prototype, "_orderBy", { - get: $util.oneOfGetter($oneOfFields = ["orderBy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ListManagementServersRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {google.cloud.backupdr.v1.IListManagementServersRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest instance - */ - ListManagementServersRequest.create = function create(properties) { - return new ListManagementServersRequest(properties); - }; - - /** - * Encodes the specified ListManagementServersRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {google.cloud.backupdr.v1.IListManagementServersRequest} message ListManagementServersRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListManagementServersRequest.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 ListManagementServersRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {google.cloud.backupdr.v1.IListManagementServersRequest} message ListManagementServersRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListManagementServersRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListManagementServersRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListManagementServersRequest.decode = function 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.backupdr.v1.ListManagementServersRequest(); - 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 ListManagementServersRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListManagementServersRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListManagementServersRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListManagementServersRequest.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.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")) { - properties._filter = 1; - if (!$util.isString(message.filter)) - return "filter: string expected"; - } - if (message.orderBy != null && message.hasOwnProperty("orderBy")) { - properties._orderBy = 1; - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - } - return null; - }; - - /** - * Creates a ListManagementServersRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest - */ - ListManagementServersRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListManagementServersRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.ListManagementServersRequest(); - 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 ListManagementServersRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {google.cloud.backupdr.v1.ListManagementServersRequest} message ListManagementServersRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListManagementServersRequest.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; - if (message.filter != null && message.hasOwnProperty("filter")) { - object.filter = message.filter; - if (options.oneofs) - object._filter = "filter"; - } - if (message.orderBy != null && message.hasOwnProperty("orderBy")) { - object.orderBy = message.orderBy; - if (options.oneofs) - object._orderBy = "orderBy"; - } - return object; - }; - - /** - * Converts this ListManagementServersRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - * @returns {Object.} JSON object - */ - ListManagementServersRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListManagementServersRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListManagementServersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListManagementServersRequest"; - }; - - return ListManagementServersRequest; - })(); - - v1.ListManagementServersResponse = (function() { - - /** - * Properties of a ListManagementServersResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IListManagementServersResponse - * @property {Array.|null} [managementServers] ListManagementServersResponse managementServers - * @property {string|null} [nextPageToken] ListManagementServersResponse nextPageToken - * @property {Array.|null} [unreachable] ListManagementServersResponse unreachable - */ - - /** - * Constructs a new ListManagementServersResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListManagementServersResponse. - * @implements IListManagementServersResponse - * @constructor - * @param {google.cloud.backupdr.v1.IListManagementServersResponse=} [properties] Properties to set - */ - function ListManagementServersResponse(properties) { - this.managementServers = []; - 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]]; - } - - /** - * ListManagementServersResponse managementServers. - * @member {Array.} managementServers - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @instance - */ - ListManagementServersResponse.prototype.managementServers = $util.emptyArray; - - /** - * ListManagementServersResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @instance - */ - ListManagementServersResponse.prototype.nextPageToken = ""; - - /** - * ListManagementServersResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @instance - */ - ListManagementServersResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListManagementServersResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {google.cloud.backupdr.v1.IListManagementServersResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse instance - */ - ListManagementServersResponse.create = function create(properties) { - return new ListManagementServersResponse(properties); - }; - - /** - * Encodes the specified ListManagementServersResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {google.cloud.backupdr.v1.IListManagementServersResponse} message ListManagementServersResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListManagementServersResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.managementServers != null && message.managementServers.length) - for (var i = 0; i < message.managementServers.length; ++i) - $root.google.cloud.backupdr.v1.ManagementServer.encode(message.managementServers[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 ListManagementServersResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {google.cloud.backupdr.v1.IListManagementServersResponse} message ListManagementServersResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListManagementServersResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListManagementServersResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListManagementServersResponse.decode = function 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.backupdr.v1.ListManagementServersResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.managementServers && message.managementServers.length)) - message.managementServers = []; - message.managementServers.push($root.google.cloud.backupdr.v1.ManagementServer.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 ListManagementServersResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListManagementServersResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListManagementServersResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListManagementServersResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.managementServers != null && message.hasOwnProperty("managementServers")) { - if (!Array.isArray(message.managementServers)) - return "managementServers: array expected"; - for (var i = 0; i < message.managementServers.length; ++i) { - var error = $root.google.cloud.backupdr.v1.ManagementServer.verify(message.managementServers[i]); - if (error) - return "managementServers." + 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 ListManagementServersResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse - */ - ListManagementServersResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListManagementServersResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListManagementServersResponse(); - if (object.managementServers) { - if (!Array.isArray(object.managementServers)) - throw TypeError(".google.cloud.backupdr.v1.ListManagementServersResponse.managementServers: array expected"); - message.managementServers = []; - for (var i = 0; i < object.managementServers.length; ++i) { - if (typeof object.managementServers[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListManagementServersResponse.managementServers: object expected"); - message.managementServers[i] = $root.google.cloud.backupdr.v1.ManagementServer.fromObject(object.managementServers[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListManagementServersResponse.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 ListManagementServersResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {google.cloud.backupdr.v1.ListManagementServersResponse} message ListManagementServersResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListManagementServersResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.managementServers = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.managementServers && message.managementServers.length) { - object.managementServers = []; - for (var j = 0; j < message.managementServers.length; ++j) - object.managementServers[j] = $root.google.cloud.backupdr.v1.ManagementServer.toObject(message.managementServers[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 ListManagementServersResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @instance - * @returns {Object.} JSON object - */ - ListManagementServersResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListManagementServersResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListManagementServersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListManagementServersResponse"; - }; - - return ListManagementServersResponse; - })(); - - v1.GetManagementServerRequest = (function() { - - /** - * Properties of a GetManagementServerRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetManagementServerRequest - * @property {string|null} [name] GetManagementServerRequest name - */ - - /** - * Constructs a new GetManagementServerRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetManagementServerRequest. - * @implements IGetManagementServerRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetManagementServerRequest=} [properties] Properties to set - */ - function GetManagementServerRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetManagementServerRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @instance - */ - GetManagementServerRequest.prototype.name = ""; - - /** - * Creates a new GetManagementServerRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.IGetManagementServerRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest instance - */ - GetManagementServerRequest.create = function create(properties) { - return new GetManagementServerRequest(properties); - }; - - /** - * Encodes the specified GetManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} message GetManagementServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetManagementServerRequest.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 GetManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} message GetManagementServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetManagementServerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetManagementServerRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetManagementServerRequest.decode = function 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.backupdr.v1.GetManagementServerRequest(); - 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 GetManagementServerRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetManagementServerRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetManagementServerRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetManagementServerRequest.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 GetManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest - */ - GetManagementServerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetManagementServerRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.GetManagementServerRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetManagementServerRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.GetManagementServerRequest} message GetManagementServerRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetManagementServerRequest.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 GetManagementServerRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @instance - * @returns {Object.} JSON object - */ - GetManagementServerRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetManagementServerRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetManagementServerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetManagementServerRequest"; - }; - - return GetManagementServerRequest; - })(); - - v1.CreateManagementServerRequest = (function() { - - /** - * Properties of a CreateManagementServerRequest. - * @memberof google.cloud.backupdr.v1 - * @interface ICreateManagementServerRequest - * @property {string|null} [parent] CreateManagementServerRequest parent - * @property {string|null} [managementServerId] CreateManagementServerRequest managementServerId - * @property {google.cloud.backupdr.v1.IManagementServer|null} [managementServer] CreateManagementServerRequest managementServer - * @property {string|null} [requestId] CreateManagementServerRequest requestId - */ - - /** - * Constructs a new CreateManagementServerRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CreateManagementServerRequest. - * @implements ICreateManagementServerRequest - * @constructor - * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest=} [properties] Properties to set - */ - function CreateManagementServerRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateManagementServerRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @instance - */ - CreateManagementServerRequest.prototype.parent = ""; - - /** - * CreateManagementServerRequest managementServerId. - * @member {string} managementServerId - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @instance - */ - CreateManagementServerRequest.prototype.managementServerId = ""; - - /** - * CreateManagementServerRequest managementServer. - * @member {google.cloud.backupdr.v1.IManagementServer|null|undefined} managementServer - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @instance - */ - CreateManagementServerRequest.prototype.managementServer = null; - - /** - * CreateManagementServerRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @instance - */ - CreateManagementServerRequest.prototype.requestId = ""; - - /** - * Creates a new CreateManagementServerRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest instance - */ - CreateManagementServerRequest.create = function create(properties) { - return new CreateManagementServerRequest(properties); - }; - - /** - * Encodes the specified CreateManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} message CreateManagementServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateManagementServerRequest.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.managementServerId != null && Object.hasOwnProperty.call(message, "managementServerId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.managementServerId); - if (message.managementServer != null && Object.hasOwnProperty.call(message, "managementServer")) - $root.google.cloud.backupdr.v1.ManagementServer.encode(message.managementServer, 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 CreateManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} message CreateManagementServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateManagementServerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateManagementServerRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateManagementServerRequest.decode = function 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.backupdr.v1.CreateManagementServerRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.managementServerId = reader.string(); - break; - } - case 3: { - message.managementServer = $root.google.cloud.backupdr.v1.ManagementServer.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateManagementServerRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateManagementServerRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateManagementServerRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateManagementServerRequest.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.managementServerId != null && message.hasOwnProperty("managementServerId")) - if (!$util.isString(message.managementServerId)) - return "managementServerId: string expected"; - if (message.managementServer != null && message.hasOwnProperty("managementServer")) { - var error = $root.google.cloud.backupdr.v1.ManagementServer.verify(message.managementServer); - if (error) - return "managementServer." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a CreateManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest - */ - CreateManagementServerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CreateManagementServerRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.CreateManagementServerRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.managementServerId != null) - message.managementServerId = String(object.managementServerId); - if (object.managementServer != null) { - if (typeof object.managementServer !== "object") - throw TypeError(".google.cloud.backupdr.v1.CreateManagementServerRequest.managementServer: object expected"); - message.managementServer = $root.google.cloud.backupdr.v1.ManagementServer.fromObject(object.managementServer); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a CreateManagementServerRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.CreateManagementServerRequest} message CreateManagementServerRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateManagementServerRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.managementServerId = ""; - object.managementServer = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.managementServerId != null && message.hasOwnProperty("managementServerId")) - object.managementServerId = message.managementServerId; - if (message.managementServer != null && message.hasOwnProperty("managementServer")) - object.managementServer = $root.google.cloud.backupdr.v1.ManagementServer.toObject(message.managementServer, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this CreateManagementServerRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @instance - * @returns {Object.} JSON object - */ - CreateManagementServerRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateManagementServerRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateManagementServerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateManagementServerRequest"; - }; - - return CreateManagementServerRequest; - })(); - - v1.DeleteManagementServerRequest = (function() { - - /** - * Properties of a DeleteManagementServerRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IDeleteManagementServerRequest - * @property {string|null} [name] DeleteManagementServerRequest name - * @property {string|null} [requestId] DeleteManagementServerRequest requestId - */ - - /** - * Constructs a new DeleteManagementServerRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DeleteManagementServerRequest. - * @implements IDeleteManagementServerRequest - * @constructor - * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest=} [properties] Properties to set - */ - function DeleteManagementServerRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteManagementServerRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @instance - */ - DeleteManagementServerRequest.prototype.name = ""; - - /** - * DeleteManagementServerRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @instance - */ - DeleteManagementServerRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteManagementServerRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest instance - */ - DeleteManagementServerRequest.create = function create(properties) { - return new DeleteManagementServerRequest(properties); - }; - - /** - * Encodes the specified DeleteManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} message DeleteManagementServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteManagementServerRequest.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 DeleteManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} message DeleteManagementServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteManagementServerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteManagementServerRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteManagementServerRequest.decode = function 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.backupdr.v1.DeleteManagementServerRequest(); - 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 DeleteManagementServerRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteManagementServerRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteManagementServerRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteManagementServerRequest.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 DeleteManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest - */ - DeleteManagementServerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DeleteManagementServerRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.DeleteManagementServerRequest(); - 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 DeleteManagementServerRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.DeleteManagementServerRequest} message DeleteManagementServerRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteManagementServerRequest.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 DeleteManagementServerRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteManagementServerRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteManagementServerRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteManagementServerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteManagementServerRequest"; - }; - - return DeleteManagementServerRequest; - })(); - - v1.OperationMetadata = (function() { - - /** - * Properties of an OperationMetadata. - * @memberof google.cloud.backupdr.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 {Object.|null} [additionalInfo] OperationMetadata additionalInfo - */ - - /** - * Constructs a new OperationMetadata. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.cloud.backupdr.v1.IOperationMetadata=} [properties] Properties to set - */ - function OperationMetadata(properties) { - this.additionalInfo = {}; - if (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.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.verb = ""; - - /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.statusMessage = ""; - - /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.requestedCancellation = false; - - /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.apiVersion = ""; - - /** - * OperationMetadata additionalInfo. - * @member {Object.} additionalInfo - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.additionalInfo = $util.emptyObject; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @static - * @param {google.cloud.backupdr.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.OperationMetadata} OperationMetadata instance - */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.backupdr.v1.OperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @static - * @param {google.cloud.backupdr.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.additionalInfo != null && Object.hasOwnProperty.call(message, "additionalInfo")) - for (var keys = Object.keys(message.additionalInfo), i = 0; i < keys.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.additionalInfo[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.OperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @static - * @param {google.cloud.backupdr.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.backupdr.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.backupdr.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.backupdr.v1.OperationMetadata(), key, value; - 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: { - if (message.additionalInfo === $util.emptyObject) - message.additionalInfo = {}; - 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.additionalInfo[key] = value; - 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.backupdr.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.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.backupdr.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.additionalInfo != null && message.hasOwnProperty("additionalInfo")) { - if (!$util.isObject(message.additionalInfo)) - return "additionalInfo: object expected"; - var key = Object.keys(message.additionalInfo); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.additionalInfo[key[i]])) - return "additionalInfo: string{k:string} expected"; - } - return null; - }; - - /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.OperationMetadata} OperationMetadata - */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.OperationMetadata) - return object; - var message = new $root.google.cloud.backupdr.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.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.backupdr.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.additionalInfo) { - if (typeof object.additionalInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.OperationMetadata.additionalInfo: object expected"); - message.additionalInfo = {}; - for (var keys = Object.keys(object.additionalInfo), i = 0; i < keys.length; ++i) - message.additionalInfo[keys[i]] = String(object.additionalInfo[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @static - * @param {google.cloud.backupdr.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.objects || options.defaults) - object.additionalInfo = {}; - if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; - } - 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; - var keys2; - if (message.additionalInfo && (keys2 = Object.keys(message.additionalInfo)).length) { - object.additionalInfo = {}; - for (var j = 0; j < keys2.length; ++j) - object.additionalInfo[keys2[j]] = message.additionalInfo[keys2[j]]; - } - return object; - }; - - /** - * Converts this OperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.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.backupdr.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.backupdr.v1.OperationMetadata"; - }; - - return OperationMetadata; - })(); - - v1.BackupPlan = (function() { - - /** - * Properties of a BackupPlan. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupPlan - * @property {string|null} [name] BackupPlan name - * @property {string|null} [description] BackupPlan description - * @property {Object.|null} [labels] BackupPlan labels - * @property {google.protobuf.ITimestamp|null} [createTime] BackupPlan createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] BackupPlan updateTime - * @property {Array.|null} [backupRules] BackupPlan backupRules - * @property {google.cloud.backupdr.v1.BackupPlan.State|null} [state] BackupPlan state - * @property {string|null} [resourceType] BackupPlan resourceType - * @property {string|null} [etag] BackupPlan etag - * @property {string|null} [backupVault] BackupPlan backupVault - * @property {string|null} [backupVaultServiceAccount] BackupPlan backupVaultServiceAccount - */ - - /** - * Constructs a new BackupPlan. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupPlan. - * @implements IBackupPlan - * @constructor - * @param {google.cloud.backupdr.v1.IBackupPlan=} [properties] Properties to set - */ - function BackupPlan(properties) { - this.labels = {}; - this.backupRules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupPlan name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.name = ""; - - /** - * BackupPlan description. - * @member {string} description - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.description = ""; - - /** - * BackupPlan labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.labels = $util.emptyObject; - - /** - * BackupPlan createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.createTime = null; - - /** - * BackupPlan updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.updateTime = null; - - /** - * BackupPlan backupRules. - * @member {Array.} backupRules - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.backupRules = $util.emptyArray; - - /** - * BackupPlan state. - * @member {google.cloud.backupdr.v1.BackupPlan.State} state - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.state = 0; - - /** - * BackupPlan resourceType. - * @member {string} resourceType - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.resourceType = ""; - - /** - * BackupPlan etag. - * @member {string} etag - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.etag = ""; - - /** - * BackupPlan backupVault. - * @member {string} backupVault - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.backupVault = ""; - - /** - * BackupPlan backupVaultServiceAccount. - * @member {string} backupVaultServiceAccount - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.backupVaultServiceAccount = ""; - - /** - * Creates a new BackupPlan instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {google.cloud.backupdr.v1.IBackupPlan=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan instance - */ - BackupPlan.create = function create(properties) { - return new BackupPlan(properties); - }; - - /** - * Encodes the specified BackupPlan message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {google.cloud.backupdr.v1.IBackupPlan} message BackupPlan message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupPlan.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - 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 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.backupRules != null && message.backupRules.length) - for (var i = 0; i < message.backupRules.length; ++i) - $root.google.cloud.backupdr.v1.BackupRule.encode(message.backupRules[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); - if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceType); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.etag); - if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.backupVault); - if (message.backupVaultServiceAccount != null && Object.hasOwnProperty.call(message, "backupVaultServiceAccount")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.backupVaultServiceAccount); - return writer; - }; - - /** - * Encodes the specified BackupPlan message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {google.cloud.backupdr.v1.IBackupPlan} message BackupPlan message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupPlan.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupPlan message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupPlan.decode = function 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.backupdr.v1.BackupPlan(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - 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 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - if (!(message.backupRules && message.backupRules.length)) - message.backupRules = []; - message.backupRules.push($root.google.cloud.backupdr.v1.BackupRule.decode(reader, reader.uint32())); - break; - } - case 7: { - message.state = reader.int32(); - break; - } - case 8: { - message.resourceType = reader.string(); - break; - } - case 9: { - message.etag = reader.string(); - break; - } - case 10: { - message.backupVault = reader.string(); - break; - } - case 11: { - message.backupVaultServiceAccount = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupPlan message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupPlan.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupPlan message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupPlan.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - 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.backupRules != null && message.hasOwnProperty("backupRules")) { - if (!Array.isArray(message.backupRules)) - return "backupRules: array expected"; - for (var i = 0; i < message.backupRules.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupRule.verify(message.backupRules[i]); - if (error) - return "backupRules." + error; - } - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - if (!$util.isString(message.resourceType)) - return "resourceType: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.backupVault != null && message.hasOwnProperty("backupVault")) - if (!$util.isString(message.backupVault)) - return "backupVault: string expected"; - if (message.backupVaultServiceAccount != null && message.hasOwnProperty("backupVaultServiceAccount")) - if (!$util.isString(message.backupVaultServiceAccount)) - return "backupVaultServiceAccount: string expected"; - return null; - }; - - /** - * Creates a BackupPlan message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan - */ - BackupPlan.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupPlan) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupPlan(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupPlan.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.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupPlan.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.backupdr.v1.BackupPlan.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.backupRules) { - if (!Array.isArray(object.backupRules)) - throw TypeError(".google.cloud.backupdr.v1.BackupPlan.backupRules: array expected"); - message.backupRules = []; - for (var i = 0; i < object.backupRules.length; ++i) { - if (typeof object.backupRules[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupPlan.backupRules: object expected"); - message.backupRules[i] = $root.google.cloud.backupdr.v1.BackupRule.fromObject(object.backupRules[i]); - } - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "CREATING": - case 1: - message.state = 1; - break; - case "ACTIVE": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "INACTIVE": - case 4: - message.state = 4; - break; - } - if (object.resourceType != null) - message.resourceType = String(object.resourceType); - if (object.etag != null) - message.etag = String(object.etag); - if (object.backupVault != null) - message.backupVault = String(object.backupVault); - if (object.backupVaultServiceAccount != null) - message.backupVaultServiceAccount = String(object.backupVaultServiceAccount); - return message; - }; - - /** - * Creates a plain object from a BackupPlan message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {google.cloud.backupdr.v1.BackupPlan} message BackupPlan - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupPlan.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.backupRules = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.resourceType = ""; - object.etag = ""; - object.backupVault = ""; - object.backupVaultServiceAccount = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - 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.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.backupRules && message.backupRules.length) { - object.backupRules = []; - for (var j = 0; j < message.backupRules.length; ++j) - object.backupRules[j] = $root.google.cloud.backupdr.v1.BackupRule.toObject(message.backupRules[j], options); - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupPlan.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupPlan.State[message.state] : message.state; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = message.resourceType; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.backupVault != null && message.hasOwnProperty("backupVault")) - object.backupVault = message.backupVault; - if (message.backupVaultServiceAccount != null && message.hasOwnProperty("backupVaultServiceAccount")) - object.backupVaultServiceAccount = message.backupVaultServiceAccount; - return object; - }; - - /** - * Converts this BackupPlan to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - * @returns {Object.} JSON object - */ - BackupPlan.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupPlan - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupPlan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupPlan"; - }; - - /** - * State enum. - * @name google.cloud.backupdr.v1.BackupPlan.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} DELETING=3 DELETING value - * @property {number} INACTIVE=4 INACTIVE value - */ - BackupPlan.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "INACTIVE"] = 4; - return values; - })(); - - return BackupPlan; - })(); - - v1.BackupRule = (function() { - - /** - * Properties of a BackupRule. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupRule - * @property {string|null} [ruleId] BackupRule ruleId - * @property {number|null} [backupRetentionDays] BackupRule backupRetentionDays - * @property {google.cloud.backupdr.v1.IStandardSchedule|null} [standardSchedule] BackupRule standardSchedule - */ - - /** - * Constructs a new BackupRule. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupRule. - * @implements IBackupRule - * @constructor - * @param {google.cloud.backupdr.v1.IBackupRule=} [properties] Properties to set - */ - function BackupRule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupRule ruleId. - * @member {string} ruleId - * @memberof google.cloud.backupdr.v1.BackupRule - * @instance - */ - BackupRule.prototype.ruleId = ""; - - /** - * BackupRule backupRetentionDays. - * @member {number} backupRetentionDays - * @memberof google.cloud.backupdr.v1.BackupRule - * @instance - */ - BackupRule.prototype.backupRetentionDays = 0; - - /** - * BackupRule standardSchedule. - * @member {google.cloud.backupdr.v1.IStandardSchedule|null|undefined} standardSchedule - * @memberof google.cloud.backupdr.v1.BackupRule - * @instance - */ - BackupRule.prototype.standardSchedule = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupRule backupScheduleOneof. - * @member {"standardSchedule"|undefined} backupScheduleOneof - * @memberof google.cloud.backupdr.v1.BackupRule - * @instance - */ - Object.defineProperty(BackupRule.prototype, "backupScheduleOneof", { - get: $util.oneOfGetter($oneOfFields = ["standardSchedule"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupRule instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {google.cloud.backupdr.v1.IBackupRule=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule instance - */ - BackupRule.create = function create(properties) { - return new BackupRule(properties); - }; - - /** - * Encodes the specified BackupRule message. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {google.cloud.backupdr.v1.IBackupRule} message BackupRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ruleId); - if (message.backupRetentionDays != null && Object.hasOwnProperty.call(message, "backupRetentionDays")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.backupRetentionDays); - if (message.standardSchedule != null && Object.hasOwnProperty.call(message, "standardSchedule")) - $root.google.cloud.backupdr.v1.StandardSchedule.encode(message.standardSchedule, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BackupRule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {google.cloud.backupdr.v1.IBackupRule} message BackupRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupRule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupRule.decode = function 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.backupdr.v1.BackupRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ruleId = reader.string(); - break; - } - case 4: { - message.backupRetentionDays = reader.int32(); - break; - } - case 5: { - message.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupRule message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.ruleId != null && message.hasOwnProperty("ruleId")) - if (!$util.isString(message.ruleId)) - return "ruleId: string expected"; - if (message.backupRetentionDays != null && message.hasOwnProperty("backupRetentionDays")) - if (!$util.isInteger(message.backupRetentionDays)) - return "backupRetentionDays: integer expected"; - if (message.standardSchedule != null && message.hasOwnProperty("standardSchedule")) { - properties.backupScheduleOneof = 1; - { - var error = $root.google.cloud.backupdr.v1.StandardSchedule.verify(message.standardSchedule); - if (error) - return "standardSchedule." + error; - } - } - return null; - }; - - /** - * Creates a BackupRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule - */ - BackupRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupRule) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupRule(); - if (object.ruleId != null) - message.ruleId = String(object.ruleId); - if (object.backupRetentionDays != null) - message.backupRetentionDays = object.backupRetentionDays | 0; - if (object.standardSchedule != null) { - if (typeof object.standardSchedule !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupRule.standardSchedule: object expected"); - message.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.fromObject(object.standardSchedule); - } - return message; - }; - - /** - * Creates a plain object from a BackupRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {google.cloud.backupdr.v1.BackupRule} message BackupRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.ruleId = ""; - object.backupRetentionDays = 0; - } - if (message.ruleId != null && message.hasOwnProperty("ruleId")) - object.ruleId = message.ruleId; - if (message.backupRetentionDays != null && message.hasOwnProperty("backupRetentionDays")) - object.backupRetentionDays = message.backupRetentionDays; - if (message.standardSchedule != null && message.hasOwnProperty("standardSchedule")) { - object.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.toObject(message.standardSchedule, options); - if (options.oneofs) - object.backupScheduleOneof = "standardSchedule"; - } - return object; - }; - - /** - * Converts this BackupRule to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupRule - * @instance - * @returns {Object.} JSON object - */ - BackupRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupRule - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupRule"; - }; - - return BackupRule; - })(); - - v1.StandardSchedule = (function() { - - /** - * Properties of a StandardSchedule. - * @memberof google.cloud.backupdr.v1 - * @interface IStandardSchedule - * @property {google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|null} [recurrenceType] StandardSchedule recurrenceType - * @property {number|null} [hourlyFrequency] StandardSchedule hourlyFrequency - * @property {Array.|null} [daysOfWeek] StandardSchedule daysOfWeek - * @property {Array.|null} [daysOfMonth] StandardSchedule daysOfMonth - * @property {google.cloud.backupdr.v1.IWeekDayOfMonth|null} [weekDayOfMonth] StandardSchedule weekDayOfMonth - * @property {Array.|null} [months] StandardSchedule months - * @property {google.cloud.backupdr.v1.IBackupWindow|null} [backupWindow] StandardSchedule backupWindow - * @property {string|null} [timeZone] StandardSchedule timeZone - */ - - /** - * Constructs a new StandardSchedule. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a StandardSchedule. - * @implements IStandardSchedule - * @constructor - * @param {google.cloud.backupdr.v1.IStandardSchedule=} [properties] Properties to set - */ - function StandardSchedule(properties) { - this.daysOfWeek = []; - this.daysOfMonth = []; - this.months = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StandardSchedule recurrenceType. - * @member {google.cloud.backupdr.v1.StandardSchedule.RecurrenceType} recurrenceType - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.recurrenceType = 0; - - /** - * StandardSchedule hourlyFrequency. - * @member {number} hourlyFrequency - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.hourlyFrequency = 0; - - /** - * StandardSchedule daysOfWeek. - * @member {Array.} daysOfWeek - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.daysOfWeek = $util.emptyArray; - - /** - * StandardSchedule daysOfMonth. - * @member {Array.} daysOfMonth - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.daysOfMonth = $util.emptyArray; - - /** - * StandardSchedule weekDayOfMonth. - * @member {google.cloud.backupdr.v1.IWeekDayOfMonth|null|undefined} weekDayOfMonth - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.weekDayOfMonth = null; - - /** - * StandardSchedule months. - * @member {Array.} months - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.months = $util.emptyArray; - - /** - * StandardSchedule backupWindow. - * @member {google.cloud.backupdr.v1.IBackupWindow|null|undefined} backupWindow - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.backupWindow = null; - - /** - * StandardSchedule timeZone. - * @member {string} timeZone - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.timeZone = ""; - - /** - * Creates a new StandardSchedule instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {google.cloud.backupdr.v1.IStandardSchedule=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule instance - */ - StandardSchedule.create = function create(properties) { - return new StandardSchedule(properties); - }; - - /** - * Encodes the specified StandardSchedule message. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {google.cloud.backupdr.v1.IStandardSchedule} message StandardSchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StandardSchedule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.recurrenceType != null && Object.hasOwnProperty.call(message, "recurrenceType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.recurrenceType); - if (message.hourlyFrequency != null && Object.hasOwnProperty.call(message, "hourlyFrequency")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hourlyFrequency); - if (message.daysOfWeek != null && message.daysOfWeek.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.daysOfWeek.length; ++i) - writer.int32(message.daysOfWeek[i]); - writer.ldelim(); - } - if (message.daysOfMonth != null && message.daysOfMonth.length) { - writer.uint32(/* id 4, wireType 2 =*/34).fork(); - for (var i = 0; i < message.daysOfMonth.length; ++i) - writer.int32(message.daysOfMonth[i]); - writer.ldelim(); - } - if (message.weekDayOfMonth != null && Object.hasOwnProperty.call(message, "weekDayOfMonth")) - $root.google.cloud.backupdr.v1.WeekDayOfMonth.encode(message.weekDayOfMonth, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.months != null && message.months.length) { - writer.uint32(/* id 6, wireType 2 =*/50).fork(); - for (var i = 0; i < message.months.length; ++i) - writer.int32(message.months[i]); - writer.ldelim(); - } - if (message.backupWindow != null && Object.hasOwnProperty.call(message, "backupWindow")) - $root.google.cloud.backupdr.v1.BackupWindow.encode(message.backupWindow, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.timeZone); - return writer; - }; - - /** - * Encodes the specified StandardSchedule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {google.cloud.backupdr.v1.IStandardSchedule} message StandardSchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StandardSchedule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StandardSchedule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StandardSchedule.decode = function 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.backupdr.v1.StandardSchedule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.recurrenceType = reader.int32(); - break; - } - case 2: { - message.hourlyFrequency = reader.int32(); - break; - } - case 3: { - if (!(message.daysOfWeek && message.daysOfWeek.length)) - message.daysOfWeek = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.daysOfWeek.push(reader.int32()); - } else - message.daysOfWeek.push(reader.int32()); - break; - } - case 4: { - if (!(message.daysOfMonth && message.daysOfMonth.length)) - message.daysOfMonth = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.daysOfMonth.push(reader.int32()); - } else - message.daysOfMonth.push(reader.int32()); - break; - } - case 5: { - message.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.decode(reader, reader.uint32()); - break; - } - case 6: { - if (!(message.months && message.months.length)) - message.months = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.months.push(reader.int32()); - } else - message.months.push(reader.int32()); - break; - } - case 7: { - message.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.decode(reader, reader.uint32()); - break; - } - case 8: { - message.timeZone = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StandardSchedule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StandardSchedule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StandardSchedule message. - * @function verify - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StandardSchedule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.recurrenceType != null && message.hasOwnProperty("recurrenceType")) - switch (message.recurrenceType) { - default: - return "recurrenceType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.hourlyFrequency != null && message.hasOwnProperty("hourlyFrequency")) - if (!$util.isInteger(message.hourlyFrequency)) - return "hourlyFrequency: integer expected"; - if (message.daysOfWeek != null && message.hasOwnProperty("daysOfWeek")) { - if (!Array.isArray(message.daysOfWeek)) - return "daysOfWeek: array expected"; - for (var i = 0; i < message.daysOfWeek.length; ++i) - switch (message.daysOfWeek[i]) { - default: - return "daysOfWeek: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - } - if (message.daysOfMonth != null && message.hasOwnProperty("daysOfMonth")) { - if (!Array.isArray(message.daysOfMonth)) - return "daysOfMonth: array expected"; - for (var i = 0; i < message.daysOfMonth.length; ++i) - if (!$util.isInteger(message.daysOfMonth[i])) - return "daysOfMonth: integer[] expected"; - } - if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) { - var error = $root.google.cloud.backupdr.v1.WeekDayOfMonth.verify(message.weekDayOfMonth); - if (error) - return "weekDayOfMonth." + error; - } - if (message.months != null && message.hasOwnProperty("months")) { - if (!Array.isArray(message.months)) - return "months: array expected"; - for (var i = 0; i < message.months.length; ++i) - switch (message.months[i]) { - default: - return "months: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - break; - } - } - if (message.backupWindow != null && message.hasOwnProperty("backupWindow")) { - var error = $root.google.cloud.backupdr.v1.BackupWindow.verify(message.backupWindow); - if (error) - return "backupWindow." + error; - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - if (!$util.isString(message.timeZone)) - return "timeZone: string expected"; - return null; - }; - - /** - * Creates a StandardSchedule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule - */ - StandardSchedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.StandardSchedule) - return object; - var message = new $root.google.cloud.backupdr.v1.StandardSchedule(); - switch (object.recurrenceType) { - default: - if (typeof object.recurrenceType === "number") { - message.recurrenceType = object.recurrenceType; - break; - } - break; - case "RECURRENCE_TYPE_UNSPECIFIED": - case 0: - message.recurrenceType = 0; - break; - case "HOURLY": - case 1: - message.recurrenceType = 1; - break; - case "DAILY": - case 2: - message.recurrenceType = 2; - break; - case "WEEKLY": - case 3: - message.recurrenceType = 3; - break; - case "MONTHLY": - case 4: - message.recurrenceType = 4; - break; - case "YEARLY": - case 5: - message.recurrenceType = 5; - break; - } - if (object.hourlyFrequency != null) - message.hourlyFrequency = object.hourlyFrequency | 0; - if (object.daysOfWeek) { - if (!Array.isArray(object.daysOfWeek)) - throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.daysOfWeek: array expected"); - message.daysOfWeek = []; - for (var i = 0; i < object.daysOfWeek.length; ++i) - switch (object.daysOfWeek[i]) { - default: - if (typeof object.daysOfWeek[i] === "number") { - message.daysOfWeek[i] = object.daysOfWeek[i]; - break; - } - case "DAY_OF_WEEK_UNSPECIFIED": - case 0: - message.daysOfWeek[i] = 0; - break; - case "MONDAY": - case 1: - message.daysOfWeek[i] = 1; - break; - case "TUESDAY": - case 2: - message.daysOfWeek[i] = 2; - break; - case "WEDNESDAY": - case 3: - message.daysOfWeek[i] = 3; - break; - case "THURSDAY": - case 4: - message.daysOfWeek[i] = 4; - break; - case "FRIDAY": - case 5: - message.daysOfWeek[i] = 5; - break; - case "SATURDAY": - case 6: - message.daysOfWeek[i] = 6; - break; - case "SUNDAY": - case 7: - message.daysOfWeek[i] = 7; - break; - } - } - if (object.daysOfMonth) { - if (!Array.isArray(object.daysOfMonth)) - throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.daysOfMonth: array expected"); - message.daysOfMonth = []; - for (var i = 0; i < object.daysOfMonth.length; ++i) - message.daysOfMonth[i] = object.daysOfMonth[i] | 0; - } - if (object.weekDayOfMonth != null) { - if (typeof object.weekDayOfMonth !== "object") - throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.weekDayOfMonth: object expected"); - message.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.fromObject(object.weekDayOfMonth); - } - if (object.months) { - if (!Array.isArray(object.months)) - throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.months: array expected"); - message.months = []; - for (var i = 0; i < object.months.length; ++i) - switch (object.months[i]) { - default: - if (typeof object.months[i] === "number") { - message.months[i] = object.months[i]; - break; - } - case "MONTH_UNSPECIFIED": - case 0: - message.months[i] = 0; - break; - case "JANUARY": - case 1: - message.months[i] = 1; - break; - case "FEBRUARY": - case 2: - message.months[i] = 2; - break; - case "MARCH": - case 3: - message.months[i] = 3; - break; - case "APRIL": - case 4: - message.months[i] = 4; - break; - case "MAY": - case 5: - message.months[i] = 5; - break; - case "JUNE": - case 6: - message.months[i] = 6; - break; - case "JULY": - case 7: - message.months[i] = 7; - break; - case "AUGUST": - case 8: - message.months[i] = 8; - break; - case "SEPTEMBER": - case 9: - message.months[i] = 9; - break; - case "OCTOBER": - case 10: - message.months[i] = 10; - break; - case "NOVEMBER": - case 11: - message.months[i] = 11; - break; - case "DECEMBER": - case 12: - message.months[i] = 12; - break; - } - } - if (object.backupWindow != null) { - if (typeof object.backupWindow !== "object") - throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.backupWindow: object expected"); - message.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.fromObject(object.backupWindow); - } - if (object.timeZone != null) - message.timeZone = String(object.timeZone); - return message; - }; - - /** - * Creates a plain object from a StandardSchedule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {google.cloud.backupdr.v1.StandardSchedule} message StandardSchedule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StandardSchedule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.daysOfWeek = []; - object.daysOfMonth = []; - object.months = []; - } - if (options.defaults) { - object.recurrenceType = options.enums === String ? "RECURRENCE_TYPE_UNSPECIFIED" : 0; - object.hourlyFrequency = 0; - object.weekDayOfMonth = null; - object.backupWindow = null; - object.timeZone = ""; - } - if (message.recurrenceType != null && message.hasOwnProperty("recurrenceType")) - object.recurrenceType = options.enums === String ? $root.google.cloud.backupdr.v1.StandardSchedule.RecurrenceType[message.recurrenceType] === undefined ? message.recurrenceType : $root.google.cloud.backupdr.v1.StandardSchedule.RecurrenceType[message.recurrenceType] : message.recurrenceType; - if (message.hourlyFrequency != null && message.hasOwnProperty("hourlyFrequency")) - object.hourlyFrequency = message.hourlyFrequency; - if (message.daysOfWeek && message.daysOfWeek.length) { - object.daysOfWeek = []; - for (var j = 0; j < message.daysOfWeek.length; ++j) - object.daysOfWeek[j] = options.enums === String ? $root.google.type.DayOfWeek[message.daysOfWeek[j]] === undefined ? message.daysOfWeek[j] : $root.google.type.DayOfWeek[message.daysOfWeek[j]] : message.daysOfWeek[j]; - } - if (message.daysOfMonth && message.daysOfMonth.length) { - object.daysOfMonth = []; - for (var j = 0; j < message.daysOfMonth.length; ++j) - object.daysOfMonth[j] = message.daysOfMonth[j]; - } - if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) - object.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.toObject(message.weekDayOfMonth, options); - if (message.months && message.months.length) { - object.months = []; - for (var j = 0; j < message.months.length; ++j) - object.months[j] = options.enums === String ? $root.google.type.Month[message.months[j]] === undefined ? message.months[j] : $root.google.type.Month[message.months[j]] : message.months[j]; - } - if (message.backupWindow != null && message.hasOwnProperty("backupWindow")) - object.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.toObject(message.backupWindow, options); - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - object.timeZone = message.timeZone; - return object; - }; - - /** - * Converts this StandardSchedule to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - * @returns {Object.} JSON object - */ - StandardSchedule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StandardSchedule - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StandardSchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.StandardSchedule"; - }; - - /** - * RecurrenceType enum. - * @name google.cloud.backupdr.v1.StandardSchedule.RecurrenceType - * @enum {number} - * @property {number} RECURRENCE_TYPE_UNSPECIFIED=0 RECURRENCE_TYPE_UNSPECIFIED value - * @property {number} HOURLY=1 HOURLY value - * @property {number} DAILY=2 DAILY value - * @property {number} WEEKLY=3 WEEKLY value - * @property {number} MONTHLY=4 MONTHLY value - * @property {number} YEARLY=5 YEARLY value - */ - StandardSchedule.RecurrenceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RECURRENCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HOURLY"] = 1; - values[valuesById[2] = "DAILY"] = 2; - values[valuesById[3] = "WEEKLY"] = 3; - values[valuesById[4] = "MONTHLY"] = 4; - values[valuesById[5] = "YEARLY"] = 5; - return values; - })(); - - return StandardSchedule; - })(); - - v1.BackupWindow = (function() { - - /** - * Properties of a BackupWindow. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupWindow - * @property {number|null} [startHourOfDay] BackupWindow startHourOfDay - * @property {number|null} [endHourOfDay] BackupWindow endHourOfDay - */ - - /** - * Constructs a new BackupWindow. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupWindow. - * @implements IBackupWindow - * @constructor - * @param {google.cloud.backupdr.v1.IBackupWindow=} [properties] Properties to set - */ - function BackupWindow(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupWindow startHourOfDay. - * @member {number} startHourOfDay - * @memberof google.cloud.backupdr.v1.BackupWindow - * @instance - */ - BackupWindow.prototype.startHourOfDay = 0; - - /** - * BackupWindow endHourOfDay. - * @member {number} endHourOfDay - * @memberof google.cloud.backupdr.v1.BackupWindow - * @instance - */ - BackupWindow.prototype.endHourOfDay = 0; - - /** - * Creates a new BackupWindow instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {google.cloud.backupdr.v1.IBackupWindow=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow instance - */ - BackupWindow.create = function create(properties) { - return new BackupWindow(properties); - }; - - /** - * Encodes the specified BackupWindow message. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {google.cloud.backupdr.v1.IBackupWindow} message BackupWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupWindow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startHourOfDay != null && Object.hasOwnProperty.call(message, "startHourOfDay")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startHourOfDay); - if (message.endHourOfDay != null && Object.hasOwnProperty.call(message, "endHourOfDay")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endHourOfDay); - return writer; - }; - - /** - * Encodes the specified BackupWindow message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {google.cloud.backupdr.v1.IBackupWindow} message BackupWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupWindow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupWindow message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupWindow.decode = function 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.backupdr.v1.BackupWindow(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.startHourOfDay = reader.int32(); - break; - } - case 2: { - message.endHourOfDay = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupWindow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupWindow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupWindow message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupWindow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startHourOfDay != null && message.hasOwnProperty("startHourOfDay")) - if (!$util.isInteger(message.startHourOfDay)) - return "startHourOfDay: integer expected"; - if (message.endHourOfDay != null && message.hasOwnProperty("endHourOfDay")) - if (!$util.isInteger(message.endHourOfDay)) - return "endHourOfDay: integer expected"; - return null; - }; - - /** - * Creates a BackupWindow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow - */ - BackupWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupWindow) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupWindow(); - if (object.startHourOfDay != null) - message.startHourOfDay = object.startHourOfDay | 0; - if (object.endHourOfDay != null) - message.endHourOfDay = object.endHourOfDay | 0; - return message; - }; - - /** - * Creates a plain object from a BackupWindow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {google.cloud.backupdr.v1.BackupWindow} message BackupWindow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupWindow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startHourOfDay = 0; - object.endHourOfDay = 0; - } - if (message.startHourOfDay != null && message.hasOwnProperty("startHourOfDay")) - object.startHourOfDay = message.startHourOfDay; - if (message.endHourOfDay != null && message.hasOwnProperty("endHourOfDay")) - object.endHourOfDay = message.endHourOfDay; - return object; - }; - - /** - * Converts this BackupWindow to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupWindow - * @instance - * @returns {Object.} JSON object - */ - BackupWindow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupWindow - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupWindow"; - }; - - return BackupWindow; - })(); - - v1.WeekDayOfMonth = (function() { - - /** - * Properties of a WeekDayOfMonth. - * @memberof google.cloud.backupdr.v1 - * @interface IWeekDayOfMonth - * @property {google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|null} [weekOfMonth] WeekDayOfMonth weekOfMonth - * @property {google.type.DayOfWeek|null} [dayOfWeek] WeekDayOfMonth dayOfWeek - */ - - /** - * Constructs a new WeekDayOfMonth. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a WeekDayOfMonth. - * @implements IWeekDayOfMonth - * @constructor - * @param {google.cloud.backupdr.v1.IWeekDayOfMonth=} [properties] Properties to set - */ - function WeekDayOfMonth(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WeekDayOfMonth weekOfMonth. - * @member {google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth} weekOfMonth - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @instance - */ - WeekDayOfMonth.prototype.weekOfMonth = 0; - - /** - * WeekDayOfMonth dayOfWeek. - * @member {google.type.DayOfWeek} dayOfWeek - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @instance - */ - WeekDayOfMonth.prototype.dayOfWeek = 0; - - /** - * Creates a new WeekDayOfMonth instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {google.cloud.backupdr.v1.IWeekDayOfMonth=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth instance - */ - WeekDayOfMonth.create = function create(properties) { - return new WeekDayOfMonth(properties); - }; - - /** - * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {google.cloud.backupdr.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeekDayOfMonth.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.weekOfMonth != null && Object.hasOwnProperty.call(message, "weekOfMonth")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.weekOfMonth); - if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dayOfWeek); - return writer; - }; - - /** - * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {google.cloud.backupdr.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeekDayOfMonth.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeekDayOfMonth.decode = function 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.backupdr.v1.WeekDayOfMonth(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.weekOfMonth = reader.int32(); - break; - } - case 2: { - message.dayOfWeek = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeekDayOfMonth.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WeekDayOfMonth message. - * @function verify - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WeekDayOfMonth.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.weekOfMonth != null && message.hasOwnProperty("weekOfMonth")) - switch (message.weekOfMonth) { - default: - return "weekOfMonth: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - switch (message.dayOfWeek) { - default: - return "dayOfWeek: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - return null; - }; - - /** - * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth - */ - WeekDayOfMonth.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.WeekDayOfMonth) - return object; - var message = new $root.google.cloud.backupdr.v1.WeekDayOfMonth(); - switch (object.weekOfMonth) { - default: - if (typeof object.weekOfMonth === "number") { - message.weekOfMonth = object.weekOfMonth; - break; - } - break; - case "WEEK_OF_MONTH_UNSPECIFIED": - case 0: - message.weekOfMonth = 0; - break; - case "FIRST": - case 1: - message.weekOfMonth = 1; - break; - case "SECOND": - case 2: - message.weekOfMonth = 2; - break; - case "THIRD": - case 3: - message.weekOfMonth = 3; - break; - case "FOURTH": - case 4: - message.weekOfMonth = 4; - break; - case "LAST": - case 5: - message.weekOfMonth = 5; - break; - } - switch (object.dayOfWeek) { - default: - if (typeof object.dayOfWeek === "number") { - message.dayOfWeek = object.dayOfWeek; - break; - } - break; - case "DAY_OF_WEEK_UNSPECIFIED": - case 0: - message.dayOfWeek = 0; - break; - case "MONDAY": - case 1: - message.dayOfWeek = 1; - break; - case "TUESDAY": - case 2: - message.dayOfWeek = 2; - break; - case "WEDNESDAY": - case 3: - message.dayOfWeek = 3; - break; - case "THURSDAY": - case 4: - message.dayOfWeek = 4; - break; - case "FRIDAY": - case 5: - message.dayOfWeek = 5; - break; - case "SATURDAY": - case 6: - message.dayOfWeek = 6; - break; - case "SUNDAY": - case 7: - message.dayOfWeek = 7; - break; - } - return message; - }; - - /** - * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {google.cloud.backupdr.v1.WeekDayOfMonth} message WeekDayOfMonth - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WeekDayOfMonth.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.weekOfMonth = options.enums === String ? "WEEK_OF_MONTH_UNSPECIFIED" : 0; - object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; - } - if (message.weekOfMonth != null && message.hasOwnProperty("weekOfMonth")) - object.weekOfMonth = options.enums === String ? $root.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth] === undefined ? message.weekOfMonth : $root.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth] : message.weekOfMonth; - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] === undefined ? message.dayOfWeek : $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; - return object; - }; - - /** - * Converts this WeekDayOfMonth to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @instance - * @returns {Object.} JSON object - */ - WeekDayOfMonth.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WeekDayOfMonth - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WeekDayOfMonth.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.WeekDayOfMonth"; - }; - - /** - * WeekOfMonth enum. - * @name google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth - * @enum {number} - * @property {number} WEEK_OF_MONTH_UNSPECIFIED=0 WEEK_OF_MONTH_UNSPECIFIED value - * @property {number} FIRST=1 FIRST value - * @property {number} SECOND=2 SECOND value - * @property {number} THIRD=3 THIRD value - * @property {number} FOURTH=4 FOURTH value - * @property {number} LAST=5 LAST value - */ - WeekDayOfMonth.WeekOfMonth = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "WEEK_OF_MONTH_UNSPECIFIED"] = 0; - values[valuesById[1] = "FIRST"] = 1; - values[valuesById[2] = "SECOND"] = 2; - values[valuesById[3] = "THIRD"] = 3; - values[valuesById[4] = "FOURTH"] = 4; - values[valuesById[5] = "LAST"] = 5; - return values; - })(); - - return WeekDayOfMonth; - })(); - - v1.CreateBackupPlanRequest = (function() { - - /** - * Properties of a CreateBackupPlanRequest. - * @memberof google.cloud.backupdr.v1 - * @interface ICreateBackupPlanRequest - * @property {string|null} [parent] CreateBackupPlanRequest parent - * @property {string|null} [backupPlanId] CreateBackupPlanRequest backupPlanId - * @property {google.cloud.backupdr.v1.IBackupPlan|null} [backupPlan] CreateBackupPlanRequest backupPlan - * @property {string|null} [requestId] CreateBackupPlanRequest requestId - */ - - /** - * Constructs a new CreateBackupPlanRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CreateBackupPlanRequest. - * @implements ICreateBackupPlanRequest - * @constructor - * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest=} [properties] Properties to set - */ - function CreateBackupPlanRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateBackupPlanRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @instance - */ - CreateBackupPlanRequest.prototype.parent = ""; - - /** - * CreateBackupPlanRequest backupPlanId. - * @member {string} backupPlanId - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @instance - */ - CreateBackupPlanRequest.prototype.backupPlanId = ""; - - /** - * CreateBackupPlanRequest backupPlan. - * @member {google.cloud.backupdr.v1.IBackupPlan|null|undefined} backupPlan - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @instance - */ - CreateBackupPlanRequest.prototype.backupPlan = null; - - /** - * CreateBackupPlanRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @instance - */ - CreateBackupPlanRequest.prototype.requestId = ""; - - /** - * Creates a new CreateBackupPlanRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest instance - */ - CreateBackupPlanRequest.create = function create(properties) { - return new CreateBackupPlanRequest(properties); - }; - - /** - * Encodes the specified CreateBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} message CreateBackupPlanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupPlanRequest.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.backupPlanId != null && Object.hasOwnProperty.call(message, "backupPlanId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanId); - if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) - $root.google.cloud.backupdr.v1.BackupPlan.encode(message.backupPlan, 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 CreateBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} message CreateBackupPlanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateBackupPlanRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupPlanRequest.decode = function 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.backupdr.v1.CreateBackupPlanRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.backupPlanId = reader.string(); - break; - } - case 3: { - message.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateBackupPlanRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateBackupPlanRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateBackupPlanRequest.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.backupPlanId != null && message.hasOwnProperty("backupPlanId")) - if (!$util.isString(message.backupPlanId)) - return "backupPlanId: string expected"; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) { - var error = $root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlan); - if (error) - return "backupPlan." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a CreateBackupPlanRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest - */ - CreateBackupPlanRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupPlanRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.CreateBackupPlanRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.backupPlanId != null) - message.backupPlanId = String(object.backupPlanId); - if (object.backupPlan != null) { - if (typeof object.backupPlan !== "object") - throw TypeError(".google.cloud.backupdr.v1.CreateBackupPlanRequest.backupPlan: object expected"); - message.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlan); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a CreateBackupPlanRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.CreateBackupPlanRequest} message CreateBackupPlanRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateBackupPlanRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.backupPlanId = ""; - object.backupPlan = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.backupPlanId != null && message.hasOwnProperty("backupPlanId")) - object.backupPlanId = message.backupPlanId; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - object.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlan, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this CreateBackupPlanRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @instance - * @returns {Object.} JSON object - */ - CreateBackupPlanRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateBackupPlanRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupPlanRequest"; - }; - - return CreateBackupPlanRequest; - })(); - - v1.ListBackupPlansRequest = (function() { - - /** - * Properties of a ListBackupPlansRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupPlansRequest - * @property {string|null} [parent] ListBackupPlansRequest parent - * @property {number|null} [pageSize] ListBackupPlansRequest pageSize - * @property {string|null} [pageToken] ListBackupPlansRequest pageToken - * @property {string|null} [filter] ListBackupPlansRequest filter - * @property {string|null} [orderBy] ListBackupPlansRequest orderBy - */ - - /** - * Constructs a new ListBackupPlansRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupPlansRequest. - * @implements IListBackupPlansRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupPlansRequest=} [properties] Properties to set - */ - function ListBackupPlansRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListBackupPlansRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @instance - */ - ListBackupPlansRequest.prototype.parent = ""; - - /** - * ListBackupPlansRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @instance - */ - ListBackupPlansRequest.prototype.pageSize = 0; - - /** - * ListBackupPlansRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @instance - */ - ListBackupPlansRequest.prototype.pageToken = ""; - - /** - * ListBackupPlansRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @instance - */ - ListBackupPlansRequest.prototype.filter = ""; - - /** - * ListBackupPlansRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @instance - */ - ListBackupPlansRequest.prototype.orderBy = ""; - - /** - * Creates a new ListBackupPlansRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlansRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest instance - */ - ListBackupPlansRequest.create = function create(properties) { - return new ListBackupPlansRequest(properties); - }; - - /** - * Encodes the specified ListBackupPlansRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} message ListBackupPlansRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlansRequest.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 ListBackupPlansRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} message ListBackupPlansRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlansRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupPlansRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlansRequest.decode = function 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.backupdr.v1.ListBackupPlansRequest(); - 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 ListBackupPlansRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlansRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupPlansRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupPlansRequest.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 ListBackupPlansRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest - */ - ListBackupPlansRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlansRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupPlansRequest(); - 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 ListBackupPlansRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {google.cloud.backupdr.v1.ListBackupPlansRequest} message ListBackupPlansRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupPlansRequest.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 ListBackupPlansRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @instance - * @returns {Object.} JSON object - */ - ListBackupPlansRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupPlansRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupPlansRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlansRequest"; - }; - - return ListBackupPlansRequest; - })(); - - v1.ListBackupPlansResponse = (function() { - - /** - * Properties of a ListBackupPlansResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupPlansResponse - * @property {Array.|null} [backupPlans] ListBackupPlansResponse backupPlans - * @property {string|null} [nextPageToken] ListBackupPlansResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupPlansResponse unreachable - */ - - /** - * Constructs a new ListBackupPlansResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupPlansResponse. - * @implements IListBackupPlansResponse - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupPlansResponse=} [properties] Properties to set - */ - function ListBackupPlansResponse(properties) { - this.backupPlans = []; - 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]]; - } - - /** - * ListBackupPlansResponse backupPlans. - * @member {Array.} backupPlans - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @instance - */ - ListBackupPlansResponse.prototype.backupPlans = $util.emptyArray; - - /** - * ListBackupPlansResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @instance - */ - ListBackupPlansResponse.prototype.nextPageToken = ""; - - /** - * ListBackupPlansResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @instance - */ - ListBackupPlansResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListBackupPlansResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlansResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse instance - */ - ListBackupPlansResponse.create = function create(properties) { - return new ListBackupPlansResponse(properties); - }; - - /** - * Encodes the specified ListBackupPlansResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlansResponse} message ListBackupPlansResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlansResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupPlans != null && message.backupPlans.length) - for (var i = 0; i < message.backupPlans.length; ++i) - $root.google.cloud.backupdr.v1.BackupPlan.encode(message.backupPlans[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 ListBackupPlansResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlansResponse} message ListBackupPlansResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlansResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupPlansResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlansResponse.decode = function 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.backupdr.v1.ListBackupPlansResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.backupPlans && message.backupPlans.length)) - message.backupPlans = []; - message.backupPlans.push($root.google.cloud.backupdr.v1.BackupPlan.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 ListBackupPlansResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlansResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupPlansResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupPlansResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupPlans != null && message.hasOwnProperty("backupPlans")) { - if (!Array.isArray(message.backupPlans)) - return "backupPlans: array expected"; - for (var i = 0; i < message.backupPlans.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlans[i]); - if (error) - return "backupPlans." + 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 ListBackupPlansResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse - */ - ListBackupPlansResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlansResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupPlansResponse(); - if (object.backupPlans) { - if (!Array.isArray(object.backupPlans)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.backupPlans: array expected"); - message.backupPlans = []; - for (var i = 0; i < object.backupPlans.length; ++i) { - if (typeof object.backupPlans[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.backupPlans: object expected"); - message.backupPlans[i] = $root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlans[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.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 ListBackupPlansResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {google.cloud.backupdr.v1.ListBackupPlansResponse} message ListBackupPlansResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupPlansResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backupPlans = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backupPlans && message.backupPlans.length) { - object.backupPlans = []; - for (var j = 0; j < message.backupPlans.length; ++j) - object.backupPlans[j] = $root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlans[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 ListBackupPlansResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @instance - * @returns {Object.} JSON object - */ - ListBackupPlansResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupPlansResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupPlansResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlansResponse"; - }; - - return ListBackupPlansResponse; - })(); - - v1.GetBackupPlanRequest = (function() { - - /** - * Properties of a GetBackupPlanRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetBackupPlanRequest - * @property {string|null} [name] GetBackupPlanRequest name - */ - - /** - * Constructs a new GetBackupPlanRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetBackupPlanRequest. - * @implements IGetBackupPlanRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest=} [properties] Properties to set - */ - function GetBackupPlanRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetBackupPlanRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @instance - */ - GetBackupPlanRequest.prototype.name = ""; - - /** - * Creates a new GetBackupPlanRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest instance - */ - GetBackupPlanRequest.create = function create(properties) { - return new GetBackupPlanRequest(properties); - }; - - /** - * Encodes the specified GetBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} message GetBackupPlanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupPlanRequest.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 GetBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} message GetBackupPlanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetBackupPlanRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupPlanRequest.decode = function 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.backupdr.v1.GetBackupPlanRequest(); - 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 GetBackupPlanRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBackupPlanRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBackupPlanRequest.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 GetBackupPlanRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest - */ - GetBackupPlanRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.GetBackupPlanRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetBackupPlanRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.GetBackupPlanRequest} message GetBackupPlanRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetBackupPlanRequest.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 GetBackupPlanRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @instance - * @returns {Object.} JSON object - */ - GetBackupPlanRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetBackupPlanRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupPlanRequest"; - }; - - return GetBackupPlanRequest; - })(); - - v1.DeleteBackupPlanRequest = (function() { - - /** - * Properties of a DeleteBackupPlanRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IDeleteBackupPlanRequest - * @property {string|null} [name] DeleteBackupPlanRequest name - * @property {string|null} [requestId] DeleteBackupPlanRequest requestId - */ - - /** - * Constructs a new DeleteBackupPlanRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DeleteBackupPlanRequest. - * @implements IDeleteBackupPlanRequest - * @constructor - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest=} [properties] Properties to set - */ - function DeleteBackupPlanRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteBackupPlanRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @instance - */ - DeleteBackupPlanRequest.prototype.name = ""; - - /** - * DeleteBackupPlanRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @instance - */ - DeleteBackupPlanRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteBackupPlanRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest instance - */ - DeleteBackupPlanRequest.create = function create(properties) { - return new DeleteBackupPlanRequest(properties); - }; - - /** - * Encodes the specified DeleteBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} message DeleteBackupPlanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupPlanRequest.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 DeleteBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} message DeleteBackupPlanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupPlanRequest.decode = function 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.backupdr.v1.DeleteBackupPlanRequest(); - 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 DeleteBackupPlanRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteBackupPlanRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteBackupPlanRequest.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 DeleteBackupPlanRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest - */ - DeleteBackupPlanRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest(); - 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 DeleteBackupPlanRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.DeleteBackupPlanRequest} message DeleteBackupPlanRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteBackupPlanRequest.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 DeleteBackupPlanRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteBackupPlanRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteBackupPlanRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupPlanRequest"; - }; - - return DeleteBackupPlanRequest; - })(); - - v1.BackupPlanAssociation = (function() { - - /** - * Properties of a BackupPlanAssociation. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupPlanAssociation - * @property {string|null} [name] BackupPlanAssociation name - * @property {string|null} [resourceType] BackupPlanAssociation resourceType - * @property {string|null} [resource] BackupPlanAssociation resource - * @property {string|null} [backupPlan] BackupPlanAssociation backupPlan - * @property {google.protobuf.ITimestamp|null} [createTime] BackupPlanAssociation createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] BackupPlanAssociation updateTime - * @property {google.cloud.backupdr.v1.BackupPlanAssociation.State|null} [state] BackupPlanAssociation state - * @property {Array.|null} [rulesConfigInfo] BackupPlanAssociation rulesConfigInfo - * @property {string|null} [dataSource] BackupPlanAssociation dataSource - */ - - /** - * Constructs a new BackupPlanAssociation. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupPlanAssociation. - * @implements IBackupPlanAssociation - * @constructor - * @param {google.cloud.backupdr.v1.IBackupPlanAssociation=} [properties] Properties to set - */ - function BackupPlanAssociation(properties) { - this.rulesConfigInfo = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupPlanAssociation name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.name = ""; - - /** - * BackupPlanAssociation resourceType. - * @member {string} resourceType - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.resourceType = ""; - - /** - * BackupPlanAssociation resource. - * @member {string} resource - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.resource = ""; - - /** - * BackupPlanAssociation backupPlan. - * @member {string} backupPlan - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.backupPlan = ""; - - /** - * BackupPlanAssociation createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.createTime = null; - - /** - * BackupPlanAssociation updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.updateTime = null; - - /** - * BackupPlanAssociation state. - * @member {google.cloud.backupdr.v1.BackupPlanAssociation.State} state - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.state = 0; - - /** - * BackupPlanAssociation rulesConfigInfo. - * @member {Array.} rulesConfigInfo - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.rulesConfigInfo = $util.emptyArray; - - /** - * BackupPlanAssociation dataSource. - * @member {string} dataSource - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.dataSource = ""; - - /** - * Creates a new BackupPlanAssociation instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {google.cloud.backupdr.v1.IBackupPlanAssociation=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation instance - */ - BackupPlanAssociation.create = function create(properties) { - return new BackupPlanAssociation(properties); - }; - - /** - * Encodes the specified BackupPlanAssociation message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {google.cloud.backupdr.v1.IBackupPlanAssociation} message BackupPlanAssociation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupPlanAssociation.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.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceType); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); - if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.backupPlan); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); - if (message.rulesConfigInfo != null && message.rulesConfigInfo.length) - for (var i = 0; i < message.rulesConfigInfo.length; ++i) - $root.google.cloud.backupdr.v1.RuleConfigInfo.encode(message.rulesConfigInfo[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.dataSource); - return writer; - }; - - /** - * Encodes the specified BackupPlanAssociation message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {google.cloud.backupdr.v1.IBackupPlanAssociation} message BackupPlanAssociation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupPlanAssociation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupPlanAssociation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupPlanAssociation.decode = function 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.backupdr.v1.BackupPlanAssociation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.resourceType = reader.string(); - break; - } - case 3: { - message.resource = reader.string(); - break; - } - case 4: { - message.backupPlan = reader.string(); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.state = reader.int32(); - break; - } - case 8: { - if (!(message.rulesConfigInfo && message.rulesConfigInfo.length)) - message.rulesConfigInfo = []; - message.rulesConfigInfo.push($root.google.cloud.backupdr.v1.RuleConfigInfo.decode(reader, reader.uint32())); - break; - } - case 9: { - message.dataSource = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupPlanAssociation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupPlanAssociation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupPlanAssociation message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupPlanAssociation.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.resourceType != null && message.hasOwnProperty("resourceType")) - if (!$util.isString(message.resourceType)) - return "resourceType: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - if (!$util.isString(message.backupPlan)) - return "backupPlan: 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.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.rulesConfigInfo != null && message.hasOwnProperty("rulesConfigInfo")) { - if (!Array.isArray(message.rulesConfigInfo)) - return "rulesConfigInfo: array expected"; - for (var i = 0; i < message.rulesConfigInfo.length; ++i) { - var error = $root.google.cloud.backupdr.v1.RuleConfigInfo.verify(message.rulesConfigInfo[i]); - if (error) - return "rulesConfigInfo." + error; - } - } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: string expected"; - return null; - }; - - /** - * Creates a BackupPlanAssociation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation - */ - BackupPlanAssociation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupPlanAssociation) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupPlanAssociation(); - if (object.name != null) - message.name = String(object.name); - if (object.resourceType != null) - message.resourceType = String(object.resourceType); - if (object.resource != null) - message.resource = String(object.resource); - if (object.backupPlan != null) - message.backupPlan = String(object.backupPlan); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.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.backupdr.v1.BackupPlanAssociation.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - 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 "ACTIVE": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "INACTIVE": - case 4: - message.state = 4; - break; - } - if (object.rulesConfigInfo) { - if (!Array.isArray(object.rulesConfigInfo)) - throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.rulesConfigInfo: array expected"); - message.rulesConfigInfo = []; - for (var i = 0; i < object.rulesConfigInfo.length; ++i) { - if (typeof object.rulesConfigInfo[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.rulesConfigInfo: object expected"); - message.rulesConfigInfo[i] = $root.google.cloud.backupdr.v1.RuleConfigInfo.fromObject(object.rulesConfigInfo[i]); - } - } - if (object.dataSource != null) - message.dataSource = String(object.dataSource); - return message; - }; - - /** - * Creates a plain object from a BackupPlanAssociation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {google.cloud.backupdr.v1.BackupPlanAssociation} message BackupPlanAssociation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupPlanAssociation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rulesConfigInfo = []; - if (options.defaults) { - object.name = ""; - object.resourceType = ""; - object.resource = ""; - object.backupPlan = ""; - object.createTime = null; - object.updateTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.dataSource = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = message.resourceType; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - object.backupPlan = message.backupPlan; - 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.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupPlanAssociation.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupPlanAssociation.State[message.state] : message.state; - if (message.rulesConfigInfo && message.rulesConfigInfo.length) { - object.rulesConfigInfo = []; - for (var j = 0; j < message.rulesConfigInfo.length; ++j) - object.rulesConfigInfo[j] = $root.google.cloud.backupdr.v1.RuleConfigInfo.toObject(message.rulesConfigInfo[j], options); - } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; - return object; - }; - - /** - * Converts this BackupPlanAssociation to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - * @returns {Object.} JSON object - */ - BackupPlanAssociation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupPlanAssociation - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupPlanAssociation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupPlanAssociation"; - }; - - /** - * State enum. - * @name google.cloud.backupdr.v1.BackupPlanAssociation.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} DELETING=3 DELETING value - * @property {number} INACTIVE=4 INACTIVE value - */ - BackupPlanAssociation.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "INACTIVE"] = 4; - return values; - })(); - - return BackupPlanAssociation; - })(); - - v1.RuleConfigInfo = (function() { - - /** - * Properties of a RuleConfigInfo. - * @memberof google.cloud.backupdr.v1 - * @interface IRuleConfigInfo - * @property {string|null} [ruleId] RuleConfigInfo ruleId - * @property {google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|null} [lastBackupState] RuleConfigInfo lastBackupState - * @property {google.rpc.IStatus|null} [lastBackupError] RuleConfigInfo lastBackupError - * @property {google.protobuf.ITimestamp|null} [lastSuccessfulBackupConsistencyTime] RuleConfigInfo lastSuccessfulBackupConsistencyTime - */ - - /** - * Constructs a new RuleConfigInfo. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a RuleConfigInfo. - * @implements IRuleConfigInfo - * @constructor - * @param {google.cloud.backupdr.v1.IRuleConfigInfo=} [properties] Properties to set - */ - function RuleConfigInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RuleConfigInfo ruleId. - * @member {string} ruleId - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @instance - */ - RuleConfigInfo.prototype.ruleId = ""; - - /** - * RuleConfigInfo lastBackupState. - * @member {google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState} lastBackupState - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @instance - */ - RuleConfigInfo.prototype.lastBackupState = 0; - - /** - * RuleConfigInfo lastBackupError. - * @member {google.rpc.IStatus|null|undefined} lastBackupError - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @instance - */ - RuleConfigInfo.prototype.lastBackupError = null; - - /** - * RuleConfigInfo lastSuccessfulBackupConsistencyTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastSuccessfulBackupConsistencyTime - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @instance - */ - RuleConfigInfo.prototype.lastSuccessfulBackupConsistencyTime = null; - - /** - * Creates a new RuleConfigInfo instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IRuleConfigInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo instance - */ - RuleConfigInfo.create = function create(properties) { - return new RuleConfigInfo(properties); - }; - - /** - * Encodes the specified RuleConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IRuleConfigInfo} message RuleConfigInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RuleConfigInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ruleId); - if (message.lastBackupState != null && Object.hasOwnProperty.call(message, "lastBackupState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.lastBackupState); - if (message.lastBackupError != null && Object.hasOwnProperty.call(message, "lastBackupError")) - $root.google.rpc.Status.encode(message.lastBackupError, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.lastSuccessfulBackupConsistencyTime != null && Object.hasOwnProperty.call(message, "lastSuccessfulBackupConsistencyTime")) - $root.google.protobuf.Timestamp.encode(message.lastSuccessfulBackupConsistencyTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RuleConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IRuleConfigInfo} message RuleConfigInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RuleConfigInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RuleConfigInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RuleConfigInfo.decode = function 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.backupdr.v1.RuleConfigInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ruleId = reader.string(); - break; - } - case 3: { - message.lastBackupState = reader.int32(); - break; - } - case 4: { - message.lastBackupError = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 5: { - message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RuleConfigInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RuleConfigInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RuleConfigInfo message. - * @function verify - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RuleConfigInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ruleId != null && message.hasOwnProperty("ruleId")) - if (!$util.isString(message.ruleId)) - return "ruleId: string expected"; - if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) - switch (message.lastBackupState) { - default: - return "lastBackupState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) { - var error = $root.google.rpc.Status.verify(message.lastBackupError); - if (error) - return "lastBackupError." + error; - } - if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime); - if (error) - return "lastSuccessfulBackupConsistencyTime." + error; - } - return null; - }; - - /** - * Creates a RuleConfigInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo - */ - RuleConfigInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.RuleConfigInfo) - return object; - var message = new $root.google.cloud.backupdr.v1.RuleConfigInfo(); - if (object.ruleId != null) - message.ruleId = String(object.ruleId); - switch (object.lastBackupState) { - default: - if (typeof object.lastBackupState === "number") { - message.lastBackupState = object.lastBackupState; - break; - } - break; - case "LAST_BACKUP_STATE_UNSPECIFIED": - case 0: - message.lastBackupState = 0; - break; - case "FIRST_BACKUP_PENDING": - case 1: - message.lastBackupState = 1; - break; - case "PERMISSION_DENIED": - case 2: - message.lastBackupState = 2; - break; - case "SUCCEEDED": - case 3: - message.lastBackupState = 3; - break; - case "FAILED": - case 4: - message.lastBackupState = 4; - break; - } - if (object.lastBackupError != null) { - if (typeof object.lastBackupError !== "object") - throw TypeError(".google.cloud.backupdr.v1.RuleConfigInfo.lastBackupError: object expected"); - message.lastBackupError = $root.google.rpc.Status.fromObject(object.lastBackupError); - } - if (object.lastSuccessfulBackupConsistencyTime != null) { - if (typeof object.lastSuccessfulBackupConsistencyTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.RuleConfigInfo.lastSuccessfulBackupConsistencyTime: object expected"); - message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime); - } - return message; - }; - - /** - * Creates a plain object from a RuleConfigInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {google.cloud.backupdr.v1.RuleConfigInfo} message RuleConfigInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RuleConfigInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.ruleId = ""; - object.lastBackupState = options.enums === String ? "LAST_BACKUP_STATE_UNSPECIFIED" : 0; - object.lastBackupError = null; - object.lastSuccessfulBackupConsistencyTime = null; - } - if (message.ruleId != null && message.hasOwnProperty("ruleId")) - object.ruleId = message.ruleId; - if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) - object.lastBackupState = options.enums === String ? $root.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState[message.lastBackupState] === undefined ? message.lastBackupState : $root.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState[message.lastBackupState] : message.lastBackupState; - if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) - object.lastBackupError = $root.google.rpc.Status.toObject(message.lastBackupError, options); - if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) - object.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime, options); - return object; - }; - - /** - * Converts this RuleConfigInfo to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @instance - * @returns {Object.} JSON object - */ - RuleConfigInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RuleConfigInfo - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RuleConfigInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.RuleConfigInfo"; - }; - - /** - * LastBackupState enum. - * @name google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState - * @enum {number} - * @property {number} LAST_BACKUP_STATE_UNSPECIFIED=0 LAST_BACKUP_STATE_UNSPECIFIED value - * @property {number} FIRST_BACKUP_PENDING=1 FIRST_BACKUP_PENDING value - * @property {number} PERMISSION_DENIED=2 PERMISSION_DENIED value - * @property {number} SUCCEEDED=3 SUCCEEDED value - * @property {number} FAILED=4 FAILED value - */ - RuleConfigInfo.LastBackupState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAST_BACKUP_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FIRST_BACKUP_PENDING"] = 1; - values[valuesById[2] = "PERMISSION_DENIED"] = 2; - values[valuesById[3] = "SUCCEEDED"] = 3; - values[valuesById[4] = "FAILED"] = 4; - return values; - })(); - - return RuleConfigInfo; - })(); - - v1.CreateBackupPlanAssociationRequest = (function() { - - /** - * Properties of a CreateBackupPlanAssociationRequest. - * @memberof google.cloud.backupdr.v1 - * @interface ICreateBackupPlanAssociationRequest - * @property {string|null} [parent] CreateBackupPlanAssociationRequest parent - * @property {string|null} [backupPlanAssociationId] CreateBackupPlanAssociationRequest backupPlanAssociationId - * @property {google.cloud.backupdr.v1.IBackupPlanAssociation|null} [backupPlanAssociation] CreateBackupPlanAssociationRequest backupPlanAssociation - * @property {string|null} [requestId] CreateBackupPlanAssociationRequest requestId - */ - - /** - * Constructs a new CreateBackupPlanAssociationRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CreateBackupPlanAssociationRequest. - * @implements ICreateBackupPlanAssociationRequest - * @constructor - * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest=} [properties] Properties to set - */ - function CreateBackupPlanAssociationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateBackupPlanAssociationRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @instance - */ - CreateBackupPlanAssociationRequest.prototype.parent = ""; - - /** - * CreateBackupPlanAssociationRequest backupPlanAssociationId. - * @member {string} backupPlanAssociationId - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @instance - */ - CreateBackupPlanAssociationRequest.prototype.backupPlanAssociationId = ""; - - /** - * CreateBackupPlanAssociationRequest backupPlanAssociation. - * @member {google.cloud.backupdr.v1.IBackupPlanAssociation|null|undefined} backupPlanAssociation - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @instance - */ - CreateBackupPlanAssociationRequest.prototype.backupPlanAssociation = null; - - /** - * CreateBackupPlanAssociationRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @instance - */ - CreateBackupPlanAssociationRequest.prototype.requestId = ""; - - /** - * Creates a new CreateBackupPlanAssociationRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest instance - */ - CreateBackupPlanAssociationRequest.create = function create(properties) { - return new CreateBackupPlanAssociationRequest(properties); - }; - - /** - * Encodes the specified CreateBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupPlanAssociationRequest.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.backupPlanAssociationId != null && Object.hasOwnProperty.call(message, "backupPlanAssociationId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanAssociationId); - if (message.backupPlanAssociation != null && Object.hasOwnProperty.call(message, "backupPlanAssociation")) - $root.google.cloud.backupdr.v1.BackupPlanAssociation.encode(message.backupPlanAssociation, 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 CreateBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupPlanAssociationRequest.decode = function 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.backupdr.v1.CreateBackupPlanAssociationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.backupPlanAssociationId = reader.string(); - break; - } - case 3: { - message.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateBackupPlanAssociationRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateBackupPlanAssociationRequest.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.backupPlanAssociationId != null && message.hasOwnProperty("backupPlanAssociationId")) - if (!$util.isString(message.backupPlanAssociationId)) - return "backupPlanAssociationId: string expected"; - if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) { - var error = $root.google.cloud.backupdr.v1.BackupPlanAssociation.verify(message.backupPlanAssociation); - if (error) - return "backupPlanAssociation." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a CreateBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest - */ - CreateBackupPlanAssociationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.backupPlanAssociationId != null) - message.backupPlanAssociationId = String(object.backupPlanAssociationId); - if (object.backupPlanAssociation != null) { - if (typeof object.backupPlanAssociation !== "object") - throw TypeError(".google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.backupPlanAssociation: object expected"); - message.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.fromObject(object.backupPlanAssociation); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a CreateBackupPlanAssociationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateBackupPlanAssociationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.backupPlanAssociationId = ""; - object.backupPlanAssociation = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.backupPlanAssociationId != null && message.hasOwnProperty("backupPlanAssociationId")) - object.backupPlanAssociationId = message.backupPlanAssociationId; - if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) - object.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.toObject(message.backupPlanAssociation, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this CreateBackupPlanAssociationRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @instance - * @returns {Object.} JSON object - */ - CreateBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateBackupPlanAssociationRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest"; - }; - - return CreateBackupPlanAssociationRequest; - })(); - - v1.ListBackupPlanAssociationsRequest = (function() { - - /** - * Properties of a ListBackupPlanAssociationsRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupPlanAssociationsRequest - * @property {string|null} [parent] ListBackupPlanAssociationsRequest parent - * @property {number|null} [pageSize] ListBackupPlanAssociationsRequest pageSize - * @property {string|null} [pageToken] ListBackupPlanAssociationsRequest pageToken - * @property {string|null} [filter] ListBackupPlanAssociationsRequest filter - */ - - /** - * Constructs a new ListBackupPlanAssociationsRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupPlanAssociationsRequest. - * @implements IListBackupPlanAssociationsRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest=} [properties] Properties to set - */ - function ListBackupPlanAssociationsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListBackupPlanAssociationsRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @instance - */ - ListBackupPlanAssociationsRequest.prototype.parent = ""; - - /** - * ListBackupPlanAssociationsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @instance - */ - ListBackupPlanAssociationsRequest.prototype.pageSize = 0; - - /** - * ListBackupPlanAssociationsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @instance - */ - ListBackupPlanAssociationsRequest.prototype.pageToken = ""; - - /** - * ListBackupPlanAssociationsRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @instance - */ - ListBackupPlanAssociationsRequest.prototype.filter = ""; - - /** - * Creates a new ListBackupPlanAssociationsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest instance - */ - ListBackupPlanAssociationsRequest.create = function create(properties) { - return new ListBackupPlanAssociationsRequest(properties); - }; - - /** - * Encodes the specified ListBackupPlanAssociationsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlanAssociationsRequest.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); - return writer; - }; - - /** - * Encodes the specified ListBackupPlanAssociationsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlanAssociationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlanAssociationsRequest.decode = function 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.backupdr.v1.ListBackupPlanAssociationsRequest(); - 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; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlanAssociationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupPlanAssociationsRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupPlanAssociationsRequest.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"; - return null; - }; - - /** - * Creates a ListBackupPlanAssociationsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest - */ - ListBackupPlanAssociationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest(); - 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); - return message; - }; - - /** - * Creates a plain object from a ListBackupPlanAssociationsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupPlanAssociationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - 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; - return object; - }; - - /** - * Converts this ListBackupPlanAssociationsRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @instance - * @returns {Object.} JSON object - */ - ListBackupPlanAssociationsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupPlanAssociationsRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupPlanAssociationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest"; - }; - - return ListBackupPlanAssociationsRequest; - })(); - - v1.ListBackupPlanAssociationsResponse = (function() { - - /** - * Properties of a ListBackupPlanAssociationsResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupPlanAssociationsResponse - * @property {Array.|null} [backupPlanAssociations] ListBackupPlanAssociationsResponse backupPlanAssociations - * @property {string|null} [nextPageToken] ListBackupPlanAssociationsResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupPlanAssociationsResponse unreachable - */ - - /** - * Constructs a new ListBackupPlanAssociationsResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupPlanAssociationsResponse. - * @implements IListBackupPlanAssociationsResponse - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse=} [properties] Properties to set - */ - function ListBackupPlanAssociationsResponse(properties) { - this.backupPlanAssociations = []; - 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]]; - } - - /** - * ListBackupPlanAssociationsResponse backupPlanAssociations. - * @member {Array.} backupPlanAssociations - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @instance - */ - ListBackupPlanAssociationsResponse.prototype.backupPlanAssociations = $util.emptyArray; - - /** - * ListBackupPlanAssociationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @instance - */ - ListBackupPlanAssociationsResponse.prototype.nextPageToken = ""; - - /** - * ListBackupPlanAssociationsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @instance - */ - ListBackupPlanAssociationsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListBackupPlanAssociationsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse instance - */ - ListBackupPlanAssociationsResponse.create = function create(properties) { - return new ListBackupPlanAssociationsResponse(properties); - }; - - /** - * Encodes the specified ListBackupPlanAssociationsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlanAssociationsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupPlanAssociations != null && message.backupPlanAssociations.length) - for (var i = 0; i < message.backupPlanAssociations.length; ++i) - $root.google.cloud.backupdr.v1.BackupPlanAssociation.encode(message.backupPlanAssociations[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 ListBackupPlanAssociationsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlanAssociationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlanAssociationsResponse.decode = function 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.backupdr.v1.ListBackupPlanAssociationsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.backupPlanAssociations && message.backupPlanAssociations.length)) - message.backupPlanAssociations = []; - message.backupPlanAssociations.push($root.google.cloud.backupdr.v1.BackupPlanAssociation.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 ListBackupPlanAssociationsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlanAssociationsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupPlanAssociationsResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupPlanAssociationsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupPlanAssociations != null && message.hasOwnProperty("backupPlanAssociations")) { - if (!Array.isArray(message.backupPlanAssociations)) - return "backupPlanAssociations: array expected"; - for (var i = 0; i < message.backupPlanAssociations.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupPlanAssociation.verify(message.backupPlanAssociations[i]); - if (error) - return "backupPlanAssociations." + 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 ListBackupPlanAssociationsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse - */ - ListBackupPlanAssociationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse(); - if (object.backupPlanAssociations) { - if (!Array.isArray(object.backupPlanAssociations)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.backupPlanAssociations: array expected"); - message.backupPlanAssociations = []; - for (var i = 0; i < object.backupPlanAssociations.length; ++i) { - if (typeof object.backupPlanAssociations[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.backupPlanAssociations: object expected"); - message.backupPlanAssociations[i] = $root.google.cloud.backupdr.v1.BackupPlanAssociation.fromObject(object.backupPlanAssociations[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.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 ListBackupPlanAssociationsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupPlanAssociationsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backupPlanAssociations = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backupPlanAssociations && message.backupPlanAssociations.length) { - object.backupPlanAssociations = []; - for (var j = 0; j < message.backupPlanAssociations.length; ++j) - object.backupPlanAssociations[j] = $root.google.cloud.backupdr.v1.BackupPlanAssociation.toObject(message.backupPlanAssociations[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 ListBackupPlanAssociationsResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @instance - * @returns {Object.} JSON object - */ - ListBackupPlanAssociationsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupPlanAssociationsResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupPlanAssociationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse"; - }; - - return ListBackupPlanAssociationsResponse; - })(); - - v1.GetBackupPlanAssociationRequest = (function() { - - /** - * Properties of a GetBackupPlanAssociationRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetBackupPlanAssociationRequest - * @property {string|null} [name] GetBackupPlanAssociationRequest name - */ - - /** - * Constructs a new GetBackupPlanAssociationRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetBackupPlanAssociationRequest. - * @implements IGetBackupPlanAssociationRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest=} [properties] Properties to set - */ - function GetBackupPlanAssociationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetBackupPlanAssociationRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @instance - */ - GetBackupPlanAssociationRequest.prototype.name = ""; - - /** - * Creates a new GetBackupPlanAssociationRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest instance - */ - GetBackupPlanAssociationRequest.create = function create(properties) { - return new GetBackupPlanAssociationRequest(properties); - }; - - /** - * Encodes the specified GetBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupPlanAssociationRequest.decode = function 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.backupdr.v1.GetBackupPlanAssociationRequest(); - 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 GetBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBackupPlanAssociationRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest - */ - GetBackupPlanAssociationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetBackupPlanAssociationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @instance - * @returns {Object.} JSON object - */ - GetBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetBackupPlanAssociationRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupPlanAssociationRequest"; - }; - - return GetBackupPlanAssociationRequest; - })(); - - v1.DeleteBackupPlanAssociationRequest = (function() { - - /** - * Properties of a DeleteBackupPlanAssociationRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IDeleteBackupPlanAssociationRequest - * @property {string|null} [name] DeleteBackupPlanAssociationRequest name - * @property {string|null} [requestId] DeleteBackupPlanAssociationRequest requestId - */ - - /** - * Constructs a new DeleteBackupPlanAssociationRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DeleteBackupPlanAssociationRequest. - * @implements IDeleteBackupPlanAssociationRequest - * @constructor - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest=} [properties] Properties to set - */ - function DeleteBackupPlanAssociationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteBackupPlanAssociationRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @instance - */ - DeleteBackupPlanAssociationRequest.prototype.name = ""; - - /** - * DeleteBackupPlanAssociationRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @instance - */ - DeleteBackupPlanAssociationRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteBackupPlanAssociationRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest instance - */ - DeleteBackupPlanAssociationRequest.create = function create(properties) { - return new DeleteBackupPlanAssociationRequest(properties); - }; - - /** - * Encodes the specified DeleteBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupPlanAssociationRequest.decode = function 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.backupdr.v1.DeleteBackupPlanAssociationRequest(); - 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 DeleteBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteBackupPlanAssociationRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest - */ - DeleteBackupPlanAssociationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest(); - 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 DeleteBackupPlanAssociationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteBackupPlanAssociationRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest"; - }; - - return DeleteBackupPlanAssociationRequest; - })(); - - v1.TriggerBackupRequest = (function() { - - /** - * Properties of a TriggerBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface ITriggerBackupRequest - * @property {string|null} [name] TriggerBackupRequest name - * @property {string|null} [ruleId] TriggerBackupRequest ruleId - * @property {string|null} [requestId] TriggerBackupRequest requestId - */ - - /** - * Constructs a new TriggerBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a TriggerBackupRequest. - * @implements ITriggerBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.ITriggerBackupRequest=} [properties] Properties to set - */ - function TriggerBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TriggerBackupRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @instance - */ - TriggerBackupRequest.prototype.name = ""; - - /** - * TriggerBackupRequest ruleId. - * @member {string} ruleId - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @instance - */ - TriggerBackupRequest.prototype.ruleId = ""; - - /** - * TriggerBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @instance - */ - TriggerBackupRequest.prototype.requestId = ""; - - /** - * Creates a new TriggerBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {google.cloud.backupdr.v1.ITriggerBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest instance - */ - TriggerBackupRequest.create = function create(properties) { - return new TriggerBackupRequest(properties); - }; - - /** - * Encodes the specified TriggerBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} message TriggerBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TriggerBackupRequest.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.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ruleId); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified TriggerBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} message TriggerBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TriggerBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TriggerBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TriggerBackupRequest.decode = function 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.backupdr.v1.TriggerBackupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.ruleId = reader.string(); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TriggerBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TriggerBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TriggerBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TriggerBackupRequest.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.ruleId != null && message.hasOwnProperty("ruleId")) - if (!$util.isString(message.ruleId)) - return "ruleId: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a TriggerBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest - */ - TriggerBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.TriggerBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.TriggerBackupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.ruleId != null) - message.ruleId = String(object.ruleId); - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a TriggerBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {google.cloud.backupdr.v1.TriggerBackupRequest} message TriggerBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TriggerBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.ruleId = ""; - object.requestId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.ruleId != null && message.hasOwnProperty("ruleId")) - object.ruleId = message.ruleId; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this TriggerBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @instance - * @returns {Object.} JSON object - */ - TriggerBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TriggerBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TriggerBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.TriggerBackupRequest"; - }; - - return TriggerBackupRequest; - })(); - - v1.BackupVault = (function() { - - /** - * Properties of a BackupVault. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupVault - * @property {string|null} [name] BackupVault name - * @property {string|null} [description] BackupVault description - * @property {Object.|null} [labels] BackupVault labels - * @property {google.protobuf.ITimestamp|null} [createTime] BackupVault createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] BackupVault updateTime - * @property {google.protobuf.IDuration|null} [backupMinimumEnforcedRetentionDuration] BackupVault backupMinimumEnforcedRetentionDuration - * @property {boolean|null} [deletable] BackupVault deletable - * @property {string|null} [etag] BackupVault etag - * @property {google.cloud.backupdr.v1.BackupVault.State|null} [state] BackupVault state - * @property {google.protobuf.ITimestamp|null} [effectiveTime] BackupVault effectiveTime - * @property {number|Long|null} [backupCount] BackupVault backupCount - * @property {string|null} [serviceAccount] BackupVault serviceAccount - * @property {number|Long|null} [totalStoredBytes] BackupVault totalStoredBytes - * @property {string|null} [uid] BackupVault uid - * @property {Object.|null} [annotations] BackupVault annotations - * @property {google.cloud.backupdr.v1.BackupVault.AccessRestriction|null} [accessRestriction] BackupVault accessRestriction - */ - - /** - * Constructs a new BackupVault. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupVault. - * @implements IBackupVault - * @constructor - * @param {google.cloud.backupdr.v1.IBackupVault=} [properties] Properties to set - */ - function BackupVault(properties) { - this.labels = {}; - this.annotations = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupVault name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.name = ""; - - /** - * BackupVault description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.description = null; - - /** - * BackupVault labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.labels = $util.emptyObject; - - /** - * BackupVault createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.createTime = null; - - /** - * BackupVault updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.updateTime = null; - - /** - * BackupVault backupMinimumEnforcedRetentionDuration. - * @member {google.protobuf.IDuration|null|undefined} backupMinimumEnforcedRetentionDuration - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.backupMinimumEnforcedRetentionDuration = null; - - /** - * BackupVault deletable. - * @member {boolean|null|undefined} deletable - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.deletable = null; - - /** - * BackupVault etag. - * @member {string|null|undefined} etag - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.etag = null; - - /** - * BackupVault state. - * @member {google.cloud.backupdr.v1.BackupVault.State} state - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.state = 0; - - /** - * BackupVault effectiveTime. - * @member {google.protobuf.ITimestamp|null|undefined} effectiveTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.effectiveTime = null; - - /** - * BackupVault backupCount. - * @member {number|Long} backupCount - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.backupCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BackupVault serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.serviceAccount = ""; - - /** - * BackupVault totalStoredBytes. - * @member {number|Long} totalStoredBytes - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.totalStoredBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BackupVault uid. - * @member {string} uid - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.uid = ""; - - /** - * BackupVault annotations. - * @member {Object.} annotations - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.annotations = $util.emptyObject; - - /** - * BackupVault accessRestriction. - * @member {google.cloud.backupdr.v1.BackupVault.AccessRestriction} accessRestriction - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.accessRestriction = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupVault _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupVault _createTime. - * @member {"createTime"|undefined} _createTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_createTime", { - get: $util.oneOfGetter($oneOfFields = ["createTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupVault _updateTime. - * @member {"updateTime"|undefined} _updateTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_updateTime", { - get: $util.oneOfGetter($oneOfFields = ["updateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupVault _backupMinimumEnforcedRetentionDuration. - * @member {"backupMinimumEnforcedRetentionDuration"|undefined} _backupMinimumEnforcedRetentionDuration - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_backupMinimumEnforcedRetentionDuration", { - get: $util.oneOfGetter($oneOfFields = ["backupMinimumEnforcedRetentionDuration"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupVault _deletable. - * @member {"deletable"|undefined} _deletable - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_deletable", { - get: $util.oneOfGetter($oneOfFields = ["deletable"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupVault _etag. - * @member {"etag"|undefined} _etag - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_etag", { - get: $util.oneOfGetter($oneOfFields = ["etag"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupVault _effectiveTime. - * @member {"effectiveTime"|undefined} _effectiveTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_effectiveTime", { - get: $util.oneOfGetter($oneOfFields = ["effectiveTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupVault instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {google.cloud.backupdr.v1.IBackupVault=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault instance - */ - BackupVault.create = function create(properties) { - return new BackupVault(properties); - }; - - /** - * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {google.cloud.backupdr.v1.IBackupVault} message BackupVault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupVault.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - 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 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.deletable != null && Object.hasOwnProperty.call(message, "deletable")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.deletable); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.etag); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); - if (message.effectiveTime != null && Object.hasOwnProperty.call(message, "effectiveTime")) - $root.google.protobuf.Timestamp.encode(message.effectiveTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.backupCount != null && Object.hasOwnProperty.call(message, "backupCount")) - writer.uint32(/* id 17, wireType 0 =*/136).int64(message.backupCount); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.serviceAccount); - if (message.totalStoredBytes != null && Object.hasOwnProperty.call(message, "totalStoredBytes")) - writer.uint32(/* id 19, wireType 0 =*/152).int64(message.totalStoredBytes); - if (message.backupMinimumEnforcedRetentionDuration != null && Object.hasOwnProperty.call(message, "backupMinimumEnforcedRetentionDuration")) - $root.google.protobuf.Duration.encode(message.backupMinimumEnforcedRetentionDuration, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 21, wireType 2 =*/170).string(message.uid); - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) - for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) - writer.uint32(/* id 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); - if (message.accessRestriction != null && Object.hasOwnProperty.call(message, "accessRestriction")) - writer.uint32(/* id 24, wireType 0 =*/192).int32(message.accessRestriction); - return writer; - }; - - /** - * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {google.cloud.backupdr.v1.IBackupVault} message BackupVault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupVault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupVault message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupVault.decode = function 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.backupdr.v1.BackupVault(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - 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 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 20: { - message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 8: { - message.deletable = reader.bool(); - break; - } - case 9: { - message.etag = reader.string(); - break; - } - case 10: { - message.state = reader.int32(); - break; - } - case 12: { - message.effectiveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 17: { - message.backupCount = reader.int64(); - break; - } - case 18: { - message.serviceAccount = reader.string(); - break; - } - case 19: { - message.totalStoredBytes = reader.int64(); - break; - } - case 21: { - message.uid = reader.string(); - break; - } - case 22: { - if (message.annotations === $util.emptyObject) - message.annotations = {}; - 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.annotations[key] = value; - break; - } - case 24: { - message.accessRestriction = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupVault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupVault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupVault message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupVault.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.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - properties._createTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - properties._updateTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - } - if (message.backupMinimumEnforcedRetentionDuration != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDuration")) { - properties._backupMinimumEnforcedRetentionDuration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.backupMinimumEnforcedRetentionDuration); - if (error) - return "backupMinimumEnforcedRetentionDuration." + error; - } - } - if (message.deletable != null && message.hasOwnProperty("deletable")) { - properties._deletable = 1; - if (typeof message.deletable !== "boolean") - return "deletable: boolean expected"; - } - if (message.etag != null && message.hasOwnProperty("etag")) { - properties._etag = 1; - if (!$util.isString(message.etag)) - return "etag: 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.effectiveTime != null && message.hasOwnProperty("effectiveTime")) { - properties._effectiveTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.effectiveTime); - if (error) - return "effectiveTime." + error; - } - } - if (message.backupCount != null && message.hasOwnProperty("backupCount")) - if (!$util.isInteger(message.backupCount) && !(message.backupCount && $util.isInteger(message.backupCount.low) && $util.isInteger(message.backupCount.high))) - return "backupCount: integer|Long expected"; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) - if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) - return "totalStoredBytes: integer|Long expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.annotations != null && message.hasOwnProperty("annotations")) { - if (!$util.isObject(message.annotations)) - return "annotations: object expected"; - var key = Object.keys(message.annotations); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.annotations[key[i]])) - return "annotations: string{k:string} expected"; - } - if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) - switch (message.accessRestriction) { - default: - return "accessRestriction: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault - */ - BackupVault.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupVault) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupVault(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.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.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.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.backupdr.v1.BackupVault.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.backupMinimumEnforcedRetentionDuration != null) { - if (typeof object.backupMinimumEnforcedRetentionDuration !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.backupMinimumEnforcedRetentionDuration: object expected"); - message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.fromObject(object.backupMinimumEnforcedRetentionDuration); - } - if (object.deletable != null) - message.deletable = Boolean(object.deletable); - if (object.etag != null) - message.etag = String(object.etag); - 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 "ACTIVE": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ERROR": - case 4: - message.state = 4; - break; - } - if (object.effectiveTime != null) { - if (typeof object.effectiveTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.effectiveTime: object expected"); - message.effectiveTime = $root.google.protobuf.Timestamp.fromObject(object.effectiveTime); - } - if (object.backupCount != null) - if ($util.Long) - (message.backupCount = $util.Long.fromValue(object.backupCount)).unsigned = false; - else if (typeof object.backupCount === "string") - message.backupCount = parseInt(object.backupCount, 10); - else if (typeof object.backupCount === "number") - message.backupCount = object.backupCount; - else if (typeof object.backupCount === "object") - message.backupCount = new $util.LongBits(object.backupCount.low >>> 0, object.backupCount.high >>> 0).toNumber(); - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.totalStoredBytes != null) - if ($util.Long) - (message.totalStoredBytes = $util.Long.fromValue(object.totalStoredBytes)).unsigned = false; - else if (typeof object.totalStoredBytes === "string") - message.totalStoredBytes = parseInt(object.totalStoredBytes, 10); - else if (typeof object.totalStoredBytes === "number") - message.totalStoredBytes = object.totalStoredBytes; - else if (typeof object.totalStoredBytes === "object") - message.totalStoredBytes = new $util.LongBits(object.totalStoredBytes.low >>> 0, object.totalStoredBytes.high >>> 0).toNumber(); - if (object.uid != null) - message.uid = String(object.uid); - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.annotations: object expected"); - message.annotations = {}; - for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) - message.annotations[keys[i]] = String(object.annotations[keys[i]]); - } - switch (object.accessRestriction) { - default: - if (typeof object.accessRestriction === "number") { - message.accessRestriction = object.accessRestriction; - break; - } - break; - case "ACCESS_RESTRICTION_UNSPECIFIED": - case 0: - message.accessRestriction = 0; - break; - case "WITHIN_PROJECT": - case 1: - message.accessRestriction = 1; - break; - case "WITHIN_ORGANIZATION": - case 2: - message.accessRestriction = 2; - break; - case "UNRESTRICTED": - case 3: - message.accessRestriction = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a BackupVault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {google.cloud.backupdr.v1.BackupVault} message BackupVault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupVault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) { - object.labels = {}; - object.annotations = {}; - } - if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.backupCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.backupCount = options.longs === String ? "0" : 0; - object.serviceAccount = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalStoredBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalStoredBytes = options.longs === String ? "0" : 0; - object.uid = ""; - object.accessRestriction = options.enums === String ? "ACCESS_RESTRICTION_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - 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.createTime != null && message.hasOwnProperty("createTime")) { - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (options.oneofs) - object._createTime = "createTime"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (options.oneofs) - object._updateTime = "updateTime"; - } - if (message.deletable != null && message.hasOwnProperty("deletable")) { - object.deletable = message.deletable; - if (options.oneofs) - object._deletable = "deletable"; - } - if (message.etag != null && message.hasOwnProperty("etag")) { - object.etag = message.etag; - if (options.oneofs) - object._etag = "etag"; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupVault.State[message.state] : message.state; - if (message.effectiveTime != null && message.hasOwnProperty("effectiveTime")) { - object.effectiveTime = $root.google.protobuf.Timestamp.toObject(message.effectiveTime, options); - if (options.oneofs) - object._effectiveTime = "effectiveTime"; - } - if (message.backupCount != null && message.hasOwnProperty("backupCount")) - if (typeof message.backupCount === "number") - object.backupCount = options.longs === String ? String(message.backupCount) : message.backupCount; - else - object.backupCount = options.longs === String ? $util.Long.prototype.toString.call(message.backupCount) : options.longs === Number ? new $util.LongBits(message.backupCount.low >>> 0, message.backupCount.high >>> 0).toNumber() : message.backupCount; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) - if (typeof message.totalStoredBytes === "number") - object.totalStoredBytes = options.longs === String ? String(message.totalStoredBytes) : message.totalStoredBytes; - else - object.totalStoredBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStoredBytes) : options.longs === Number ? new $util.LongBits(message.totalStoredBytes.low >>> 0, message.totalStoredBytes.high >>> 0).toNumber() : message.totalStoredBytes; - if (message.backupMinimumEnforcedRetentionDuration != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDuration")) { - object.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.toObject(message.backupMinimumEnforcedRetentionDuration, options); - if (options.oneofs) - object._backupMinimumEnforcedRetentionDuration = "backupMinimumEnforcedRetentionDuration"; - } - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { - object.annotations = {}; - for (var j = 0; j < keys2.length; ++j) - object.annotations[keys2[j]] = message.annotations[keys2[j]]; - } - if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) - object.accessRestriction = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] === undefined ? message.accessRestriction : $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] : message.accessRestriction; - return object; - }; - - /** - * Converts this BackupVault to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - * @returns {Object.} JSON object - */ - BackupVault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupVault - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupVault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupVault"; - }; - - /** - * State enum. - * @name google.cloud.backupdr.v1.BackupVault.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} DELETING=3 DELETING value - * @property {number} ERROR=4 ERROR value - */ - BackupVault.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "ERROR"] = 4; - return values; - })(); - - /** - * AccessRestriction enum. - * @name google.cloud.backupdr.v1.BackupVault.AccessRestriction - * @enum {number} - * @property {number} ACCESS_RESTRICTION_UNSPECIFIED=0 ACCESS_RESTRICTION_UNSPECIFIED value - * @property {number} WITHIN_PROJECT=1 WITHIN_PROJECT value - * @property {number} WITHIN_ORGANIZATION=2 WITHIN_ORGANIZATION value - * @property {number} UNRESTRICTED=3 UNRESTRICTED value - */ - BackupVault.AccessRestriction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACCESS_RESTRICTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "WITHIN_PROJECT"] = 1; - values[valuesById[2] = "WITHIN_ORGANIZATION"] = 2; - values[valuesById[3] = "UNRESTRICTED"] = 3; - return values; - })(); - - return BackupVault; - })(); - - v1.DataSource = (function() { - - /** - * Properties of a DataSource. - * @memberof google.cloud.backupdr.v1 - * @interface IDataSource - * @property {string|null} [name] DataSource name - * @property {google.cloud.backupdr.v1.DataSource.State|null} [state] DataSource state - * @property {Object.|null} [labels] DataSource labels - * @property {google.protobuf.ITimestamp|null} [createTime] DataSource createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] DataSource updateTime - * @property {number|Long|null} [backupCount] DataSource backupCount - * @property {string|null} [etag] DataSource etag - * @property {number|Long|null} [totalStoredBytes] DataSource totalStoredBytes - * @property {google.cloud.backupdr.v1.BackupConfigState|null} [configState] DataSource configState - * @property {google.cloud.backupdr.v1.IBackupConfigInfo|null} [backupConfigInfo] DataSource backupConfigInfo - * @property {google.cloud.backupdr.v1.IDataSourceGcpResource|null} [dataSourceGcpResource] DataSource dataSourceGcpResource - * @property {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null} [dataSourceBackupApplianceApplication] DataSource dataSourceBackupApplianceApplication - */ - - /** - * Constructs a new DataSource. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DataSource. - * @implements IDataSource - * @constructor - * @param {google.cloud.backupdr.v1.IDataSource=} [properties] Properties to set - */ - function DataSource(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]]; - } - - /** - * DataSource name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.name = ""; - - /** - * DataSource state. - * @member {google.cloud.backupdr.v1.DataSource.State} state - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.state = 0; - - /** - * DataSource labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.labels = $util.emptyObject; - - /** - * DataSource createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.createTime = null; - - /** - * DataSource updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.updateTime = null; - - /** - * DataSource backupCount. - * @member {number|Long|null|undefined} backupCount - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.backupCount = null; - - /** - * DataSource etag. - * @member {string|null|undefined} etag - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.etag = null; - - /** - * DataSource totalStoredBytes. - * @member {number|Long|null|undefined} totalStoredBytes - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.totalStoredBytes = null; - - /** - * DataSource configState. - * @member {google.cloud.backupdr.v1.BackupConfigState} configState - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.configState = 0; - - /** - * DataSource backupConfigInfo. - * @member {google.cloud.backupdr.v1.IBackupConfigInfo|null|undefined} backupConfigInfo - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.backupConfigInfo = null; - - /** - * DataSource dataSourceGcpResource. - * @member {google.cloud.backupdr.v1.IDataSourceGcpResource|null|undefined} dataSourceGcpResource - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.dataSourceGcpResource = null; - - /** - * DataSource dataSourceBackupApplianceApplication. - * @member {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null|undefined} dataSourceBackupApplianceApplication - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.dataSourceBackupApplianceApplication = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataSource _createTime. - * @member {"createTime"|undefined} _createTime - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "_createTime", { - get: $util.oneOfGetter($oneOfFields = ["createTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DataSource _updateTime. - * @member {"updateTime"|undefined} _updateTime - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "_updateTime", { - get: $util.oneOfGetter($oneOfFields = ["updateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DataSource _backupCount. - * @member {"backupCount"|undefined} _backupCount - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "_backupCount", { - get: $util.oneOfGetter($oneOfFields = ["backupCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DataSource _etag. - * @member {"etag"|undefined} _etag - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "_etag", { - get: $util.oneOfGetter($oneOfFields = ["etag"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DataSource _totalStoredBytes. - * @member {"totalStoredBytes"|undefined} _totalStoredBytes - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "_totalStoredBytes", { - get: $util.oneOfGetter($oneOfFields = ["totalStoredBytes"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DataSource sourceResource. - * @member {"dataSourceGcpResource"|"dataSourceBackupApplianceApplication"|undefined} sourceResource - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "sourceResource", { - get: $util.oneOfGetter($oneOfFields = ["dataSourceGcpResource", "dataSourceBackupApplianceApplication"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataSource instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {google.cloud.backupdr.v1.IDataSource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DataSource} DataSource instance - */ - DataSource.create = function create(properties) { - return new DataSource(properties); - }; - - /** - * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {google.cloud.backupdr.v1.IDataSource} message DataSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.labels != null && 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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.backupCount != null && Object.hasOwnProperty.call(message, "backupCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.backupCount); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.etag); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 21, wireType 0 =*/168).int32(message.state); - if (message.totalStoredBytes != null && Object.hasOwnProperty.call(message, "totalStoredBytes")) - writer.uint32(/* id 23, wireType 0 =*/184).int64(message.totalStoredBytes); - if (message.configState != null && Object.hasOwnProperty.call(message, "configState")) - writer.uint32(/* id 24, wireType 0 =*/192).int32(message.configState); - if (message.backupConfigInfo != null && Object.hasOwnProperty.call(message, "backupConfigInfo")) - $root.google.cloud.backupdr.v1.BackupConfigInfo.encode(message.backupConfigInfo, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dataSourceGcpResource != null && Object.hasOwnProperty.call(message, "dataSourceGcpResource")) - $root.google.cloud.backupdr.v1.DataSourceGcpResource.encode(message.dataSourceGcpResource, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.dataSourceBackupApplianceApplication != null && Object.hasOwnProperty.call(message, "dataSourceBackupApplianceApplication")) - $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.encode(message.dataSourceBackupApplianceApplication, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {google.cloud.backupdr.v1.IDataSource} message DataSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataSource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DataSource} DataSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSource.decode = function 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.backupdr.v1.DataSource(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 21: { - message.state = reader.int32(); - 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.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.backupCount = reader.int64(); - break; - } - case 14: { - message.etag = reader.string(); - break; - } - case 23: { - message.totalStoredBytes = reader.int64(); - break; - } - case 24: { - message.configState = reader.int32(); - break; - } - case 25: { - message.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.decode(reader, reader.uint32()); - break; - } - case 26: { - message.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.decode(reader, reader.uint32()); - break; - } - case 27: { - message.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DataSource} DataSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataSource message. - * @function verify - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataSource.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.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.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.createTime != null && message.hasOwnProperty("createTime")) { - properties._createTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - properties._updateTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - } - if (message.backupCount != null && message.hasOwnProperty("backupCount")) { - properties._backupCount = 1; - if (!$util.isInteger(message.backupCount) && !(message.backupCount && $util.isInteger(message.backupCount.low) && $util.isInteger(message.backupCount.high))) - return "backupCount: integer|Long expected"; - } - if (message.etag != null && message.hasOwnProperty("etag")) { - properties._etag = 1; - if (!$util.isString(message.etag)) - return "etag: string expected"; - } - if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { - properties._totalStoredBytes = 1; - if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) - return "totalStoredBytes: integer|Long expected"; - } - if (message.configState != null && message.hasOwnProperty("configState")) - switch (message.configState) { - default: - return "configState: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.backupConfigInfo != null && message.hasOwnProperty("backupConfigInfo")) { - var error = $root.google.cloud.backupdr.v1.BackupConfigInfo.verify(message.backupConfigInfo); - if (error) - return "backupConfigInfo." + error; - } - if (message.dataSourceGcpResource != null && message.hasOwnProperty("dataSourceGcpResource")) { - properties.sourceResource = 1; - { - var error = $root.google.cloud.backupdr.v1.DataSourceGcpResource.verify(message.dataSourceGcpResource); - if (error) - return "dataSourceGcpResource." + error; - } - } - if (message.dataSourceBackupApplianceApplication != null && message.hasOwnProperty("dataSourceBackupApplianceApplication")) { - if (properties.sourceResource === 1) - return "sourceResource: multiple values"; - properties.sourceResource = 1; - { - var error = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify(message.dataSourceBackupApplianceApplication); - if (error) - return "dataSourceBackupApplianceApplication." + error; - } - } - return null; - }; - - /** - * Creates a DataSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DataSource} DataSource - */ - DataSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DataSource) - return object; - var message = new $root.google.cloud.backupdr.v1.DataSource(); - if (object.name != null) - message.name = String(object.name); - 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 "ACTIVE": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ERROR": - case 4: - message.state = 4; - break; - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.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.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.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.backupdr.v1.DataSource.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.backupCount != null) - if ($util.Long) - (message.backupCount = $util.Long.fromValue(object.backupCount)).unsigned = false; - else if (typeof object.backupCount === "string") - message.backupCount = parseInt(object.backupCount, 10); - else if (typeof object.backupCount === "number") - message.backupCount = object.backupCount; - else if (typeof object.backupCount === "object") - message.backupCount = new $util.LongBits(object.backupCount.low >>> 0, object.backupCount.high >>> 0).toNumber(); - if (object.etag != null) - message.etag = String(object.etag); - if (object.totalStoredBytes != null) - if ($util.Long) - (message.totalStoredBytes = $util.Long.fromValue(object.totalStoredBytes)).unsigned = false; - else if (typeof object.totalStoredBytes === "string") - message.totalStoredBytes = parseInt(object.totalStoredBytes, 10); - else if (typeof object.totalStoredBytes === "number") - message.totalStoredBytes = object.totalStoredBytes; - else if (typeof object.totalStoredBytes === "object") - message.totalStoredBytes = new $util.LongBits(object.totalStoredBytes.low >>> 0, object.totalStoredBytes.high >>> 0).toNumber(); - switch (object.configState) { - default: - if (typeof object.configState === "number") { - message.configState = object.configState; - break; - } - break; - case "BACKUP_CONFIG_STATE_UNSPECIFIED": - case 0: - message.configState = 0; - break; - case "ACTIVE": - case 1: - message.configState = 1; - break; - case "PASSIVE": - case 2: - message.configState = 2; - break; - } - if (object.backupConfigInfo != null) { - if (typeof object.backupConfigInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.backupConfigInfo: object expected"); - message.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.fromObject(object.backupConfigInfo); - } - if (object.dataSourceGcpResource != null) { - if (typeof object.dataSourceGcpResource !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.dataSourceGcpResource: object expected"); - message.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.fromObject(object.dataSourceGcpResource); - } - if (object.dataSourceBackupApplianceApplication != null) { - if (typeof object.dataSourceBackupApplianceApplication !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.dataSourceBackupApplianceApplication: object expected"); - message.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.fromObject(object.dataSourceBackupApplianceApplication); - } - return message; - }; - - /** - * Creates a plain object from a DataSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {google.cloud.backupdr.v1.DataSource} message DataSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.configState = options.enums === String ? "BACKUP_CONFIG_STATE_UNSPECIFIED" : 0; - object.backupConfigInfo = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - 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.createTime != null && message.hasOwnProperty("createTime")) { - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (options.oneofs) - object._createTime = "createTime"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (options.oneofs) - object._updateTime = "updateTime"; - } - if (message.backupCount != null && message.hasOwnProperty("backupCount")) { - if (typeof message.backupCount === "number") - object.backupCount = options.longs === String ? String(message.backupCount) : message.backupCount; - else - object.backupCount = options.longs === String ? $util.Long.prototype.toString.call(message.backupCount) : options.longs === Number ? new $util.LongBits(message.backupCount.low >>> 0, message.backupCount.high >>> 0).toNumber() : message.backupCount; - if (options.oneofs) - object._backupCount = "backupCount"; - } - if (message.etag != null && message.hasOwnProperty("etag")) { - object.etag = message.etag; - if (options.oneofs) - object._etag = "etag"; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.DataSource.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.DataSource.State[message.state] : message.state; - if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { - if (typeof message.totalStoredBytes === "number") - object.totalStoredBytes = options.longs === String ? String(message.totalStoredBytes) : message.totalStoredBytes; - else - object.totalStoredBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStoredBytes) : options.longs === Number ? new $util.LongBits(message.totalStoredBytes.low >>> 0, message.totalStoredBytes.high >>> 0).toNumber() : message.totalStoredBytes; - if (options.oneofs) - object._totalStoredBytes = "totalStoredBytes"; - } - if (message.configState != null && message.hasOwnProperty("configState")) - object.configState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigState[message.configState] === undefined ? message.configState : $root.google.cloud.backupdr.v1.BackupConfigState[message.configState] : message.configState; - if (message.backupConfigInfo != null && message.hasOwnProperty("backupConfigInfo")) - object.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.toObject(message.backupConfigInfo, options); - if (message.dataSourceGcpResource != null && message.hasOwnProperty("dataSourceGcpResource")) { - object.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.toObject(message.dataSourceGcpResource, options); - if (options.oneofs) - object.sourceResource = "dataSourceGcpResource"; - } - if (message.dataSourceBackupApplianceApplication != null && message.hasOwnProperty("dataSourceBackupApplianceApplication")) { - object.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.toObject(message.dataSourceBackupApplianceApplication, options); - if (options.oneofs) - object.sourceResource = "dataSourceBackupApplianceApplication"; - } - return object; - }; - - /** - * Converts this DataSource to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - * @returns {Object.} JSON object - */ - DataSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataSource - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSource"; - }; - - /** - * State enum. - * @name google.cloud.backupdr.v1.DataSource.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} DELETING=3 DELETING value - * @property {number} ERROR=4 ERROR value - */ - DataSource.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "ERROR"] = 4; - return values; - })(); - - return DataSource; - })(); - - v1.BackupConfigInfo = (function() { - - /** - * Properties of a BackupConfigInfo. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupConfigInfo - * @property {google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|null} [lastBackupState] BackupConfigInfo lastBackupState - * @property {google.protobuf.ITimestamp|null} [lastSuccessfulBackupConsistencyTime] BackupConfigInfo lastSuccessfulBackupConsistencyTime - * @property {google.rpc.IStatus|null} [lastBackupError] BackupConfigInfo lastBackupError - * @property {google.cloud.backupdr.v1.IGcpBackupConfig|null} [gcpBackupConfig] BackupConfigInfo gcpBackupConfig - * @property {google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null} [backupApplianceBackupConfig] BackupConfigInfo backupApplianceBackupConfig - */ - - /** - * Constructs a new BackupConfigInfo. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupConfigInfo. - * @implements IBackupConfigInfo - * @constructor - * @param {google.cloud.backupdr.v1.IBackupConfigInfo=} [properties] Properties to set - */ - function BackupConfigInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupConfigInfo lastBackupState. - * @member {google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState} lastBackupState - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.lastBackupState = 0; - - /** - * BackupConfigInfo lastSuccessfulBackupConsistencyTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastSuccessfulBackupConsistencyTime - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.lastSuccessfulBackupConsistencyTime = null; - - /** - * BackupConfigInfo lastBackupError. - * @member {google.rpc.IStatus|null|undefined} lastBackupError - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.lastBackupError = null; - - /** - * BackupConfigInfo gcpBackupConfig. - * @member {google.cloud.backupdr.v1.IGcpBackupConfig|null|undefined} gcpBackupConfig - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.gcpBackupConfig = null; - - /** - * BackupConfigInfo backupApplianceBackupConfig. - * @member {google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null|undefined} backupApplianceBackupConfig - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.backupApplianceBackupConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupConfigInfo backupConfig. - * @member {"gcpBackupConfig"|"backupApplianceBackupConfig"|undefined} backupConfig - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - Object.defineProperty(BackupConfigInfo.prototype, "backupConfig", { - get: $util.oneOfGetter($oneOfFields = ["gcpBackupConfig", "backupApplianceBackupConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupConfigInfo instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupConfigInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo instance - */ - BackupConfigInfo.create = function create(properties) { - return new BackupConfigInfo(properties); - }; - - /** - * Encodes the specified BackupConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupConfigInfo} message BackupConfigInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupConfigInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lastBackupState != null && Object.hasOwnProperty.call(message, "lastBackupState")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.lastBackupState); - if (message.lastSuccessfulBackupConsistencyTime != null && Object.hasOwnProperty.call(message, "lastSuccessfulBackupConsistencyTime")) - $root.google.protobuf.Timestamp.encode(message.lastSuccessfulBackupConsistencyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.lastBackupError != null && Object.hasOwnProperty.call(message, "lastBackupError")) - $root.google.rpc.Status.encode(message.lastBackupError, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.gcpBackupConfig != null && Object.hasOwnProperty.call(message, "gcpBackupConfig")) - $root.google.cloud.backupdr.v1.GcpBackupConfig.encode(message.gcpBackupConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.backupApplianceBackupConfig != null && Object.hasOwnProperty.call(message, "backupApplianceBackupConfig")) - $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.encode(message.backupApplianceBackupConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BackupConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupConfigInfo} message BackupConfigInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupConfigInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupConfigInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupConfigInfo.decode = function 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.backupdr.v1.BackupConfigInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.lastBackupState = reader.int32(); - break; - } - case 2: { - message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.lastBackupError = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 4: { - message.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupConfigInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupConfigInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupConfigInfo message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupConfigInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) - switch (message.lastBackupState) { - default: - return "lastBackupState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime); - if (error) - return "lastSuccessfulBackupConsistencyTime." + error; - } - if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) { - var error = $root.google.rpc.Status.verify(message.lastBackupError); - if (error) - return "lastBackupError." + error; - } - if (message.gcpBackupConfig != null && message.hasOwnProperty("gcpBackupConfig")) { - properties.backupConfig = 1; - { - var error = $root.google.cloud.backupdr.v1.GcpBackupConfig.verify(message.gcpBackupConfig); - if (error) - return "gcpBackupConfig." + error; - } - } - if (message.backupApplianceBackupConfig != null && message.hasOwnProperty("backupApplianceBackupConfig")) { - if (properties.backupConfig === 1) - return "backupConfig: multiple values"; - properties.backupConfig = 1; - { - var error = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify(message.backupApplianceBackupConfig); - if (error) - return "backupApplianceBackupConfig." + error; - } - } - return null; - }; - - /** - * Creates a BackupConfigInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo - */ - BackupConfigInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupConfigInfo) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupConfigInfo(); - switch (object.lastBackupState) { - default: - if (typeof object.lastBackupState === "number") { - message.lastBackupState = object.lastBackupState; - break; - } - break; - case "LAST_BACKUP_STATE_UNSPECIFIED": - case 0: - message.lastBackupState = 0; - break; - case "FIRST_BACKUP_PENDING": - case 1: - message.lastBackupState = 1; - break; - case "SUCCEEDED": - case 2: - message.lastBackupState = 2; - break; - case "FAILED": - case 3: - message.lastBackupState = 3; - break; - case "PERMISSION_DENIED": - case 4: - message.lastBackupState = 4; - break; - } - if (object.lastSuccessfulBackupConsistencyTime != null) { - if (typeof object.lastSuccessfulBackupConsistencyTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.lastSuccessfulBackupConsistencyTime: object expected"); - message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime); - } - if (object.lastBackupError != null) { - if (typeof object.lastBackupError !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.lastBackupError: object expected"); - message.lastBackupError = $root.google.rpc.Status.fromObject(object.lastBackupError); - } - if (object.gcpBackupConfig != null) { - if (typeof object.gcpBackupConfig !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.gcpBackupConfig: object expected"); - message.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.fromObject(object.gcpBackupConfig); - } - if (object.backupApplianceBackupConfig != null) { - if (typeof object.backupApplianceBackupConfig !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.backupApplianceBackupConfig: object expected"); - message.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.fromObject(object.backupApplianceBackupConfig); - } - return message; - }; - - /** - * Creates a plain object from a BackupConfigInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {google.cloud.backupdr.v1.BackupConfigInfo} message BackupConfigInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupConfigInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.lastBackupState = options.enums === String ? "LAST_BACKUP_STATE_UNSPECIFIED" : 0; - object.lastSuccessfulBackupConsistencyTime = null; - object.lastBackupError = null; - } - if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) - object.lastBackupState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState[message.lastBackupState] === undefined ? message.lastBackupState : $root.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState[message.lastBackupState] : message.lastBackupState; - if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) - object.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime, options); - if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) - object.lastBackupError = $root.google.rpc.Status.toObject(message.lastBackupError, options); - if (message.gcpBackupConfig != null && message.hasOwnProperty("gcpBackupConfig")) { - object.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.toObject(message.gcpBackupConfig, options); - if (options.oneofs) - object.backupConfig = "gcpBackupConfig"; - } - if (message.backupApplianceBackupConfig != null && message.hasOwnProperty("backupApplianceBackupConfig")) { - object.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.toObject(message.backupApplianceBackupConfig, options); - if (options.oneofs) - object.backupConfig = "backupApplianceBackupConfig"; - } - return object; - }; - - /** - * Converts this BackupConfigInfo to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - * @returns {Object.} JSON object - */ - BackupConfigInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupConfigInfo - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupConfigInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupConfigInfo"; - }; - - /** - * LastBackupState enum. - * @name google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState - * @enum {number} - * @property {number} LAST_BACKUP_STATE_UNSPECIFIED=0 LAST_BACKUP_STATE_UNSPECIFIED value - * @property {number} FIRST_BACKUP_PENDING=1 FIRST_BACKUP_PENDING value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} FAILED=3 FAILED value - * @property {number} PERMISSION_DENIED=4 PERMISSION_DENIED value - */ - BackupConfigInfo.LastBackupState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAST_BACKUP_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FIRST_BACKUP_PENDING"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - values[valuesById[4] = "PERMISSION_DENIED"] = 4; - return values; - })(); - - return BackupConfigInfo; - })(); - - v1.GcpBackupConfig = (function() { - - /** - * Properties of a GcpBackupConfig. - * @memberof google.cloud.backupdr.v1 - * @interface IGcpBackupConfig - * @property {string|null} [backupPlan] GcpBackupConfig backupPlan - * @property {string|null} [backupPlanDescription] GcpBackupConfig backupPlanDescription - * @property {string|null} [backupPlanAssociation] GcpBackupConfig backupPlanAssociation - * @property {Array.|null} [backupPlanRules] GcpBackupConfig backupPlanRules - */ - - /** - * Constructs a new GcpBackupConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GcpBackupConfig. - * @implements IGcpBackupConfig - * @constructor - * @param {google.cloud.backupdr.v1.IGcpBackupConfig=} [properties] Properties to set - */ - function GcpBackupConfig(properties) { - this.backupPlanRules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcpBackupConfig backupPlan. - * @member {string} backupPlan - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @instance - */ - GcpBackupConfig.prototype.backupPlan = ""; - - /** - * GcpBackupConfig backupPlanDescription. - * @member {string} backupPlanDescription - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @instance - */ - GcpBackupConfig.prototype.backupPlanDescription = ""; - - /** - * GcpBackupConfig backupPlanAssociation. - * @member {string} backupPlanAssociation - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @instance - */ - GcpBackupConfig.prototype.backupPlanAssociation = ""; - - /** - * GcpBackupConfig backupPlanRules. - * @member {Array.} backupPlanRules - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @instance - */ - GcpBackupConfig.prototype.backupPlanRules = $util.emptyArray; - - /** - * Creates a new GcpBackupConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {google.cloud.backupdr.v1.IGcpBackupConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig instance - */ - GcpBackupConfig.create = function create(properties) { - return new GcpBackupConfig(properties); - }; - - /** - * Encodes the specified GcpBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {google.cloud.backupdr.v1.IGcpBackupConfig} message GcpBackupConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcpBackupConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPlan); - if (message.backupPlanDescription != null && Object.hasOwnProperty.call(message, "backupPlanDescription")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanDescription); - if (message.backupPlanAssociation != null && Object.hasOwnProperty.call(message, "backupPlanAssociation")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.backupPlanAssociation); - if (message.backupPlanRules != null && message.backupPlanRules.length) - for (var i = 0; i < message.backupPlanRules.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.backupPlanRules[i]); - return writer; - }; - - /** - * Encodes the specified GcpBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {google.cloud.backupdr.v1.IGcpBackupConfig} message GcpBackupConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcpBackupConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcpBackupConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcpBackupConfig.decode = function 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.backupdr.v1.GcpBackupConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.backupPlan = reader.string(); - break; - } - case 2: { - message.backupPlanDescription = reader.string(); - break; - } - case 3: { - message.backupPlanAssociation = reader.string(); - break; - } - case 4: { - if (!(message.backupPlanRules && message.backupPlanRules.length)) - message.backupPlanRules = []; - message.backupPlanRules.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcpBackupConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcpBackupConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcpBackupConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcpBackupConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - if (!$util.isString(message.backupPlan)) - return "backupPlan: string expected"; - if (message.backupPlanDescription != null && message.hasOwnProperty("backupPlanDescription")) - if (!$util.isString(message.backupPlanDescription)) - return "backupPlanDescription: string expected"; - if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) - if (!$util.isString(message.backupPlanAssociation)) - return "backupPlanAssociation: string expected"; - if (message.backupPlanRules != null && message.hasOwnProperty("backupPlanRules")) { - if (!Array.isArray(message.backupPlanRules)) - return "backupPlanRules: array expected"; - for (var i = 0; i < message.backupPlanRules.length; ++i) - if (!$util.isString(message.backupPlanRules[i])) - return "backupPlanRules: string[] expected"; - } - return null; - }; - - /** - * Creates a GcpBackupConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig - */ - GcpBackupConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GcpBackupConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.GcpBackupConfig(); - if (object.backupPlan != null) - message.backupPlan = String(object.backupPlan); - if (object.backupPlanDescription != null) - message.backupPlanDescription = String(object.backupPlanDescription); - if (object.backupPlanAssociation != null) - message.backupPlanAssociation = String(object.backupPlanAssociation); - if (object.backupPlanRules) { - if (!Array.isArray(object.backupPlanRules)) - throw TypeError(".google.cloud.backupdr.v1.GcpBackupConfig.backupPlanRules: array expected"); - message.backupPlanRules = []; - for (var i = 0; i < object.backupPlanRules.length; ++i) - message.backupPlanRules[i] = String(object.backupPlanRules[i]); - } - return message; - }; - - /** - * Creates a plain object from a GcpBackupConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {google.cloud.backupdr.v1.GcpBackupConfig} message GcpBackupConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcpBackupConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.backupPlanRules = []; - if (options.defaults) { - object.backupPlan = ""; - object.backupPlanDescription = ""; - object.backupPlanAssociation = ""; - } - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - object.backupPlan = message.backupPlan; - if (message.backupPlanDescription != null && message.hasOwnProperty("backupPlanDescription")) - object.backupPlanDescription = message.backupPlanDescription; - if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) - object.backupPlanAssociation = message.backupPlanAssociation; - if (message.backupPlanRules && message.backupPlanRules.length) { - object.backupPlanRules = []; - for (var j = 0; j < message.backupPlanRules.length; ++j) - object.backupPlanRules[j] = message.backupPlanRules[j]; - } - return object; - }; - - /** - * Converts this GcpBackupConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @instance - * @returns {Object.} JSON object - */ - GcpBackupConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcpBackupConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcpBackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpBackupConfig"; - }; - - return GcpBackupConfig; - })(); - - v1.BackupApplianceBackupConfig = (function() { - - /** - * Properties of a BackupApplianceBackupConfig. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupApplianceBackupConfig - * @property {string|null} [backupApplianceName] BackupApplianceBackupConfig backupApplianceName - * @property {number|Long|null} [backupApplianceId] BackupApplianceBackupConfig backupApplianceId - * @property {number|Long|null} [slaId] BackupApplianceBackupConfig slaId - * @property {string|null} [applicationName] BackupApplianceBackupConfig applicationName - * @property {string|null} [hostName] BackupApplianceBackupConfig hostName - * @property {string|null} [sltName] BackupApplianceBackupConfig sltName - * @property {string|null} [slpName] BackupApplianceBackupConfig slpName - */ - - /** - * Constructs a new BackupApplianceBackupConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupApplianceBackupConfig. - * @implements IBackupApplianceBackupConfig - * @constructor - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig=} [properties] Properties to set - */ - function BackupApplianceBackupConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupApplianceBackupConfig backupApplianceName. - * @member {string} backupApplianceName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.backupApplianceName = ""; - - /** - * BackupApplianceBackupConfig backupApplianceId. - * @member {number|Long} backupApplianceId - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.backupApplianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BackupApplianceBackupConfig slaId. - * @member {number|Long} slaId - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.slaId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BackupApplianceBackupConfig applicationName. - * @member {string} applicationName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.applicationName = ""; - - /** - * BackupApplianceBackupConfig hostName. - * @member {string} hostName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.hostName = ""; - - /** - * BackupApplianceBackupConfig sltName. - * @member {string} sltName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.sltName = ""; - - /** - * BackupApplianceBackupConfig slpName. - * @member {string} slpName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.slpName = ""; - - /** - * Creates a new BackupApplianceBackupConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig instance - */ - BackupApplianceBackupConfig.create = function create(properties) { - return new BackupApplianceBackupConfig(properties); - }; - - /** - * Encodes the specified BackupApplianceBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig} message BackupApplianceBackupConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupApplianceBackupConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupApplianceName != null && Object.hasOwnProperty.call(message, "backupApplianceName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupApplianceName); - if (message.backupApplianceId != null && Object.hasOwnProperty.call(message, "backupApplianceId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.backupApplianceId); - if (message.slaId != null && Object.hasOwnProperty.call(message, "slaId")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.slaId); - if (message.applicationName != null && Object.hasOwnProperty.call(message, "applicationName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.applicationName); - if (message.hostName != null && Object.hasOwnProperty.call(message, "hostName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.hostName); - if (message.sltName != null && Object.hasOwnProperty.call(message, "sltName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sltName); - if (message.slpName != null && Object.hasOwnProperty.call(message, "slpName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.slpName); - return writer; - }; - - /** - * Encodes the specified BackupApplianceBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig} message BackupApplianceBackupConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupApplianceBackupConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupApplianceBackupConfig.decode = function 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.backupdr.v1.BackupApplianceBackupConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.backupApplianceName = reader.string(); - break; - } - case 2: { - message.backupApplianceId = reader.int64(); - break; - } - case 3: { - message.slaId = reader.int64(); - break; - } - case 4: { - message.applicationName = reader.string(); - break; - } - case 5: { - message.hostName = reader.string(); - break; - } - case 6: { - message.sltName = reader.string(); - break; - } - case 7: { - message.slpName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupApplianceBackupConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupApplianceBackupConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupApplianceBackupConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) - if (!$util.isString(message.backupApplianceName)) - return "backupApplianceName: string expected"; - if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) - if (!$util.isInteger(message.backupApplianceId) && !(message.backupApplianceId && $util.isInteger(message.backupApplianceId.low) && $util.isInteger(message.backupApplianceId.high))) - return "backupApplianceId: integer|Long expected"; - if (message.slaId != null && message.hasOwnProperty("slaId")) - if (!$util.isInteger(message.slaId) && !(message.slaId && $util.isInteger(message.slaId.low) && $util.isInteger(message.slaId.high))) - return "slaId: integer|Long expected"; - if (message.applicationName != null && message.hasOwnProperty("applicationName")) - if (!$util.isString(message.applicationName)) - return "applicationName: string expected"; - if (message.hostName != null && message.hasOwnProperty("hostName")) - if (!$util.isString(message.hostName)) - return "hostName: string expected"; - if (message.sltName != null && message.hasOwnProperty("sltName")) - if (!$util.isString(message.sltName)) - return "sltName: string expected"; - if (message.slpName != null && message.hasOwnProperty("slpName")) - if (!$util.isString(message.slpName)) - return "slpName: string expected"; - return null; - }; - - /** - * Creates a BackupApplianceBackupConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig - */ - BackupApplianceBackupConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig(); - if (object.backupApplianceName != null) - message.backupApplianceName = String(object.backupApplianceName); - if (object.backupApplianceId != null) - if ($util.Long) - (message.backupApplianceId = $util.Long.fromValue(object.backupApplianceId)).unsigned = false; - else if (typeof object.backupApplianceId === "string") - message.backupApplianceId = parseInt(object.backupApplianceId, 10); - else if (typeof object.backupApplianceId === "number") - message.backupApplianceId = object.backupApplianceId; - else if (typeof object.backupApplianceId === "object") - message.backupApplianceId = new $util.LongBits(object.backupApplianceId.low >>> 0, object.backupApplianceId.high >>> 0).toNumber(); - if (object.slaId != null) - if ($util.Long) - (message.slaId = $util.Long.fromValue(object.slaId)).unsigned = false; - else if (typeof object.slaId === "string") - message.slaId = parseInt(object.slaId, 10); - else if (typeof object.slaId === "number") - message.slaId = object.slaId; - else if (typeof object.slaId === "object") - message.slaId = new $util.LongBits(object.slaId.low >>> 0, object.slaId.high >>> 0).toNumber(); - if (object.applicationName != null) - message.applicationName = String(object.applicationName); - if (object.hostName != null) - message.hostName = String(object.hostName); - if (object.sltName != null) - message.sltName = String(object.sltName); - if (object.slpName != null) - message.slpName = String(object.slpName); - return message; - }; - - /** - * Creates a plain object from a BackupApplianceBackupConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {google.cloud.backupdr.v1.BackupApplianceBackupConfig} message BackupApplianceBackupConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupApplianceBackupConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.backupApplianceName = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.backupApplianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.backupApplianceId = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.slaId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.slaId = options.longs === String ? "0" : 0; - object.applicationName = ""; - object.hostName = ""; - object.sltName = ""; - object.slpName = ""; - } - if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) - object.backupApplianceName = message.backupApplianceName; - if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) - if (typeof message.backupApplianceId === "number") - object.backupApplianceId = options.longs === String ? String(message.backupApplianceId) : message.backupApplianceId; - else - object.backupApplianceId = options.longs === String ? $util.Long.prototype.toString.call(message.backupApplianceId) : options.longs === Number ? new $util.LongBits(message.backupApplianceId.low >>> 0, message.backupApplianceId.high >>> 0).toNumber() : message.backupApplianceId; - if (message.slaId != null && message.hasOwnProperty("slaId")) - if (typeof message.slaId === "number") - object.slaId = options.longs === String ? String(message.slaId) : message.slaId; - else - object.slaId = options.longs === String ? $util.Long.prototype.toString.call(message.slaId) : options.longs === Number ? new $util.LongBits(message.slaId.low >>> 0, message.slaId.high >>> 0).toNumber() : message.slaId; - if (message.applicationName != null && message.hasOwnProperty("applicationName")) - object.applicationName = message.applicationName; - if (message.hostName != null && message.hasOwnProperty("hostName")) - object.hostName = message.hostName; - if (message.sltName != null && message.hasOwnProperty("sltName")) - object.sltName = message.sltName; - if (message.slpName != null && message.hasOwnProperty("slpName")) - object.slpName = message.slpName; - return object; - }; - - /** - * Converts this BackupApplianceBackupConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - * @returns {Object.} JSON object - */ - BackupApplianceBackupConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupApplianceBackupConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupApplianceBackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceBackupConfig"; - }; - - return BackupApplianceBackupConfig; - })(); - - v1.DataSourceGcpResource = (function() { - - /** - * Properties of a DataSourceGcpResource. - * @memberof google.cloud.backupdr.v1 - * @interface IDataSourceGcpResource - * @property {string|null} [gcpResourcename] DataSourceGcpResource gcpResourcename - * @property {string|null} [location] DataSourceGcpResource location - * @property {string|null} [type] DataSourceGcpResource type - * @property {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null} [computeInstanceDatasourceProperties] DataSourceGcpResource computeInstanceDatasourceProperties - */ - - /** - * Constructs a new DataSourceGcpResource. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DataSourceGcpResource. - * @implements IDataSourceGcpResource - * @constructor - * @param {google.cloud.backupdr.v1.IDataSourceGcpResource=} [properties] Properties to set - */ - function DataSourceGcpResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataSourceGcpResource gcpResourcename. - * @member {string} gcpResourcename - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance - */ - DataSourceGcpResource.prototype.gcpResourcename = ""; - - /** - * DataSourceGcpResource location. - * @member {string} location - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance - */ - DataSourceGcpResource.prototype.location = ""; - - /** - * DataSourceGcpResource type. - * @member {string} type - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance - */ - DataSourceGcpResource.prototype.type = ""; - - /** - * DataSourceGcpResource computeInstanceDatasourceProperties. - * @member {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null|undefined} computeInstanceDatasourceProperties - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance - */ - DataSourceGcpResource.prototype.computeInstanceDatasourceProperties = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataSourceGcpResource gcpResourceProperties. - * @member {"computeInstanceDatasourceProperties"|undefined} gcpResourceProperties - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance - */ - Object.defineProperty(DataSourceGcpResource.prototype, "gcpResourceProperties", { - get: $util.oneOfGetter($oneOfFields = ["computeInstanceDatasourceProperties"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataSourceGcpResource instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {google.cloud.backupdr.v1.IDataSourceGcpResource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource instance - */ - DataSourceGcpResource.create = function create(properties) { - return new DataSourceGcpResource(properties); - }; - - /** - * Encodes the specified DataSourceGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {google.cloud.backupdr.v1.IDataSourceGcpResource} message DataSourceGcpResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSourceGcpResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.computeInstanceDatasourceProperties != null && Object.hasOwnProperty.call(message, "computeInstanceDatasourceProperties")) - $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.encode(message.computeInstanceDatasourceProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataSourceGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {google.cloud.backupdr.v1.IDataSourceGcpResource} message DataSourceGcpResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSourceGcpResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataSourceGcpResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSourceGcpResource.decode = function 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.backupdr.v1.DataSourceGcpResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.gcpResourcename = reader.string(); - break; - } - case 2: { - message.location = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 4: { - message.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataSourceGcpResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSourceGcpResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataSourceGcpResource message. - * @function verify - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataSourceGcpResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - if (!$util.isString(message.gcpResourcename)) - return "gcpResourcename: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.computeInstanceDatasourceProperties != null && message.hasOwnProperty("computeInstanceDatasourceProperties")) { - properties.gcpResourceProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify(message.computeInstanceDatasourceProperties); - if (error) - return "computeInstanceDatasourceProperties." + error; - } - } - return null; - }; - - /** - * Creates a DataSourceGcpResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource - */ - DataSourceGcpResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DataSourceGcpResource) - return object; - var message = new $root.google.cloud.backupdr.v1.DataSourceGcpResource(); - if (object.gcpResourcename != null) - message.gcpResourcename = String(object.gcpResourcename); - if (object.location != null) - message.location = String(object.location); - if (object.type != null) - message.type = String(object.type); - if (object.computeInstanceDatasourceProperties != null) { - if (typeof object.computeInstanceDatasourceProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSourceGcpResource.computeInstanceDatasourceProperties: object expected"); - message.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.fromObject(object.computeInstanceDatasourceProperties); - } - return message; - }; - - /** - * Creates a plain object from a DataSourceGcpResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {google.cloud.backupdr.v1.DataSourceGcpResource} message DataSourceGcpResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataSourceGcpResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.gcpResourcename = ""; - object.location = ""; - object.type = ""; - } - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - object.gcpResourcename = message.gcpResourcename; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.computeInstanceDatasourceProperties != null && message.hasOwnProperty("computeInstanceDatasourceProperties")) { - object.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.toObject(message.computeInstanceDatasourceProperties, options); - if (options.oneofs) - object.gcpResourceProperties = "computeInstanceDatasourceProperties"; - } - return object; - }; - - /** - * Converts this DataSourceGcpResource to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance - * @returns {Object.} JSON object - */ - DataSourceGcpResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataSourceGcpResource - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataSourceGcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSourceGcpResource"; - }; - - return DataSourceGcpResource; - })(); - - v1.DataSourceBackupApplianceApplication = (function() { - - /** - * Properties of a DataSourceBackupApplianceApplication. - * @memberof google.cloud.backupdr.v1 - * @interface IDataSourceBackupApplianceApplication - * @property {string|null} [applicationName] DataSourceBackupApplianceApplication applicationName - * @property {string|null} [backupAppliance] DataSourceBackupApplianceApplication backupAppliance - * @property {number|Long|null} [applianceId] DataSourceBackupApplianceApplication applianceId - * @property {string|null} [type] DataSourceBackupApplianceApplication type - * @property {number|Long|null} [applicationId] DataSourceBackupApplianceApplication applicationId - * @property {string|null} [hostname] DataSourceBackupApplianceApplication hostname - * @property {number|Long|null} [hostId] DataSourceBackupApplianceApplication hostId - */ - - /** - * Constructs a new DataSourceBackupApplianceApplication. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DataSourceBackupApplianceApplication. - * @implements IDataSourceBackupApplianceApplication - * @constructor - * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication=} [properties] Properties to set - */ - function DataSourceBackupApplianceApplication(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataSourceBackupApplianceApplication applicationName. - * @member {string} applicationName - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.applicationName = ""; - - /** - * DataSourceBackupApplianceApplication backupAppliance. - * @member {string} backupAppliance - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.backupAppliance = ""; - - /** - * DataSourceBackupApplianceApplication applianceId. - * @member {number|Long} applianceId - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.applianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DataSourceBackupApplianceApplication type. - * @member {string} type - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.type = ""; - - /** - * DataSourceBackupApplianceApplication applicationId. - * @member {number|Long} applicationId - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.applicationId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DataSourceBackupApplianceApplication hostname. - * @member {string} hostname - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.hostname = ""; - - /** - * DataSourceBackupApplianceApplication hostId. - * @member {number|Long} hostId - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.hostId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new DataSourceBackupApplianceApplication instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication instance - */ - DataSourceBackupApplianceApplication.create = function create(properties) { - return new DataSourceBackupApplianceApplication(properties); - }; - - /** - * Encodes the specified DataSourceBackupApplianceApplication message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSourceBackupApplianceApplication.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.applicationName != null && Object.hasOwnProperty.call(message, "applicationName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.applicationName); - if (message.backupAppliance != null && Object.hasOwnProperty.call(message, "backupAppliance")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupAppliance); - if (message.applianceId != null && Object.hasOwnProperty.call(message, "applianceId")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.applianceId); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.type); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.hostname); - if (message.hostId != null && Object.hasOwnProperty.call(message, "hostId")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.hostId); - if (message.applicationId != null && Object.hasOwnProperty.call(message, "applicationId")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.applicationId); - return writer; - }; - - /** - * Encodes the specified DataSourceBackupApplianceApplication message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSourceBackupApplianceApplication.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSourceBackupApplianceApplication.decode = function 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.backupdr.v1.DataSourceBackupApplianceApplication(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.applicationName = reader.string(); - break; - } - case 2: { - message.backupAppliance = reader.string(); - break; - } - case 3: { - message.applianceId = reader.int64(); - break; - } - case 4: { - message.type = reader.string(); - break; - } - case 8: { - message.applicationId = reader.int64(); - break; - } - case 6: { - message.hostname = reader.string(); - break; - } - case 7: { - message.hostId = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSourceBackupApplianceApplication.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataSourceBackupApplianceApplication message. - * @function verify - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataSourceBackupApplianceApplication.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.applicationName != null && message.hasOwnProperty("applicationName")) - if (!$util.isString(message.applicationName)) - return "applicationName: string expected"; - if (message.backupAppliance != null && message.hasOwnProperty("backupAppliance")) - if (!$util.isString(message.backupAppliance)) - return "backupAppliance: string expected"; - if (message.applianceId != null && message.hasOwnProperty("applianceId")) - if (!$util.isInteger(message.applianceId) && !(message.applianceId && $util.isInteger(message.applianceId.low) && $util.isInteger(message.applianceId.high))) - return "applianceId: integer|Long expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.applicationId != null && message.hasOwnProperty("applicationId")) - if (!$util.isInteger(message.applicationId) && !(message.applicationId && $util.isInteger(message.applicationId.low) && $util.isInteger(message.applicationId.high))) - return "applicationId: integer|Long expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - if (message.hostId != null && message.hasOwnProperty("hostId")) - if (!$util.isInteger(message.hostId) && !(message.hostId && $util.isInteger(message.hostId.low) && $util.isInteger(message.hostId.high))) - return "hostId: integer|Long expected"; - return null; - }; - - /** - * Creates a DataSourceBackupApplianceApplication message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication - */ - DataSourceBackupApplianceApplication.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication) - return object; - var message = new $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication(); - if (object.applicationName != null) - message.applicationName = String(object.applicationName); - if (object.backupAppliance != null) - message.backupAppliance = String(object.backupAppliance); - if (object.applianceId != null) - if ($util.Long) - (message.applianceId = $util.Long.fromValue(object.applianceId)).unsigned = false; - else if (typeof object.applianceId === "string") - message.applianceId = parseInt(object.applianceId, 10); - else if (typeof object.applianceId === "number") - message.applianceId = object.applianceId; - else if (typeof object.applianceId === "object") - message.applianceId = new $util.LongBits(object.applianceId.low >>> 0, object.applianceId.high >>> 0).toNumber(); - if (object.type != null) - message.type = String(object.type); - if (object.applicationId != null) - if ($util.Long) - (message.applicationId = $util.Long.fromValue(object.applicationId)).unsigned = false; - else if (typeof object.applicationId === "string") - message.applicationId = parseInt(object.applicationId, 10); - else if (typeof object.applicationId === "number") - message.applicationId = object.applicationId; - else if (typeof object.applicationId === "object") - message.applicationId = new $util.LongBits(object.applicationId.low >>> 0, object.applicationId.high >>> 0).toNumber(); - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.hostId != null) - if ($util.Long) - (message.hostId = $util.Long.fromValue(object.hostId)).unsigned = false; - else if (typeof object.hostId === "string") - message.hostId = parseInt(object.hostId, 10); - else if (typeof object.hostId === "number") - message.hostId = object.hostId; - else if (typeof object.hostId === "object") - message.hostId = new $util.LongBits(object.hostId.low >>> 0, object.hostId.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a DataSourceBackupApplianceApplication message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataSourceBackupApplianceApplication.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.applicationName = ""; - object.backupAppliance = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.applianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.applianceId = options.longs === String ? "0" : 0; - object.type = ""; - object.hostname = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.hostId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.hostId = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.applicationId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.applicationId = options.longs === String ? "0" : 0; - } - if (message.applicationName != null && message.hasOwnProperty("applicationName")) - object.applicationName = message.applicationName; - if (message.backupAppliance != null && message.hasOwnProperty("backupAppliance")) - object.backupAppliance = message.backupAppliance; - if (message.applianceId != null && message.hasOwnProperty("applianceId")) - if (typeof message.applianceId === "number") - object.applianceId = options.longs === String ? String(message.applianceId) : message.applianceId; - else - object.applianceId = options.longs === String ? $util.Long.prototype.toString.call(message.applianceId) : options.longs === Number ? new $util.LongBits(message.applianceId.low >>> 0, message.applianceId.high >>> 0).toNumber() : message.applianceId; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.hostname != null && message.hasOwnProperty("hostname")) - object.hostname = message.hostname; - if (message.hostId != null && message.hasOwnProperty("hostId")) - if (typeof message.hostId === "number") - object.hostId = options.longs === String ? String(message.hostId) : message.hostId; - else - object.hostId = options.longs === String ? $util.Long.prototype.toString.call(message.hostId) : options.longs === Number ? new $util.LongBits(message.hostId.low >>> 0, message.hostId.high >>> 0).toNumber() : message.hostId; - if (message.applicationId != null && message.hasOwnProperty("applicationId")) - if (typeof message.applicationId === "number") - object.applicationId = options.longs === String ? String(message.applicationId) : message.applicationId; - else - object.applicationId = options.longs === String ? $util.Long.prototype.toString.call(message.applicationId) : options.longs === Number ? new $util.LongBits(message.applicationId.low >>> 0, message.applicationId.high >>> 0).toNumber() : message.applicationId; - return object; - }; - - /** - * Converts this DataSourceBackupApplianceApplication to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - * @returns {Object.} JSON object - */ - DataSourceBackupApplianceApplication.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataSourceBackupApplianceApplication - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataSourceBackupApplianceApplication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSourceBackupApplianceApplication"; - }; - - return DataSourceBackupApplianceApplication; - })(); - - v1.ServiceLockInfo = (function() { - - /** - * Properties of a ServiceLockInfo. - * @memberof google.cloud.backupdr.v1 - * @interface IServiceLockInfo - * @property {string|null} [operation] ServiceLockInfo operation - */ - - /** - * Constructs a new ServiceLockInfo. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ServiceLockInfo. - * @implements IServiceLockInfo - * @constructor - * @param {google.cloud.backupdr.v1.IServiceLockInfo=} [properties] Properties to set - */ - function ServiceLockInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceLockInfo operation. - * @member {string} operation - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @instance - */ - ServiceLockInfo.prototype.operation = ""; - - /** - * Creates a new ServiceLockInfo instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IServiceLockInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo instance - */ - ServiceLockInfo.create = function create(properties) { - return new ServiceLockInfo(properties); - }; - - /** - * Encodes the specified ServiceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IServiceLockInfo} message ServiceLockInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceLockInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.operation); - return writer; - }; - - /** - * Encodes the specified ServiceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IServiceLockInfo} message ServiceLockInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceLockInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceLockInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceLockInfo.decode = function 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.backupdr.v1.ServiceLockInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.operation = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceLockInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceLockInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceLockInfo message. - * @function verify - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceLockInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operation != null && message.hasOwnProperty("operation")) - if (!$util.isString(message.operation)) - return "operation: string expected"; - return null; - }; - - /** - * Creates a ServiceLockInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo - */ - ServiceLockInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ServiceLockInfo) - return object; - var message = new $root.google.cloud.backupdr.v1.ServiceLockInfo(); - if (object.operation != null) - message.operation = String(object.operation); - return message; - }; - - /** - * Creates a plain object from a ServiceLockInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {google.cloud.backupdr.v1.ServiceLockInfo} message ServiceLockInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceLockInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.operation = ""; - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = message.operation; - return object; - }; - - /** - * Converts this ServiceLockInfo to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @instance - * @returns {Object.} JSON object - */ - ServiceLockInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceLockInfo - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceLockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ServiceLockInfo"; - }; - - return ServiceLockInfo; - })(); - - v1.BackupApplianceLockInfo = (function() { - - /** - * Properties of a BackupApplianceLockInfo. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupApplianceLockInfo - * @property {number|Long|null} [backupApplianceId] BackupApplianceLockInfo backupApplianceId - * @property {string|null} [backupApplianceName] BackupApplianceLockInfo backupApplianceName - * @property {string|null} [lockReason] BackupApplianceLockInfo lockReason - * @property {string|null} [jobName] BackupApplianceLockInfo jobName - * @property {string|null} [backupImage] BackupApplianceLockInfo backupImage - * @property {number|Long|null} [slaId] BackupApplianceLockInfo slaId - */ - - /** - * Constructs a new BackupApplianceLockInfo. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupApplianceLockInfo. - * @implements IBackupApplianceLockInfo - * @constructor - * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo=} [properties] Properties to set - */ - function BackupApplianceLockInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupApplianceLockInfo backupApplianceId. - * @member {number|Long} backupApplianceId - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - BackupApplianceLockInfo.prototype.backupApplianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BackupApplianceLockInfo backupApplianceName. - * @member {string} backupApplianceName - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - BackupApplianceLockInfo.prototype.backupApplianceName = ""; - - /** - * BackupApplianceLockInfo lockReason. - * @member {string} lockReason - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - BackupApplianceLockInfo.prototype.lockReason = ""; - - /** - * BackupApplianceLockInfo jobName. - * @member {string|null|undefined} jobName - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - BackupApplianceLockInfo.prototype.jobName = null; - - /** - * BackupApplianceLockInfo backupImage. - * @member {string|null|undefined} backupImage - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - BackupApplianceLockInfo.prototype.backupImage = null; - - /** - * BackupApplianceLockInfo slaId. - * @member {number|Long|null|undefined} slaId - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - BackupApplianceLockInfo.prototype.slaId = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupApplianceLockInfo lockSource. - * @member {"jobName"|"backupImage"|"slaId"|undefined} lockSource - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - Object.defineProperty(BackupApplianceLockInfo.prototype, "lockSource", { - get: $util.oneOfGetter($oneOfFields = ["jobName", "backupImage", "slaId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupApplianceLockInfo instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo instance - */ - BackupApplianceLockInfo.create = function create(properties) { - return new BackupApplianceLockInfo(properties); - }; - - /** - * Encodes the specified BackupApplianceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo} message BackupApplianceLockInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupApplianceLockInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupApplianceId != null && Object.hasOwnProperty.call(message, "backupApplianceId")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.backupApplianceId); - if (message.backupApplianceName != null && Object.hasOwnProperty.call(message, "backupApplianceName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupApplianceName); - if (message.lockReason != null && Object.hasOwnProperty.call(message, "lockReason")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.lockReason); - if (message.jobName != null && Object.hasOwnProperty.call(message, "jobName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.jobName); - if (message.backupImage != null && Object.hasOwnProperty.call(message, "backupImage")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.backupImage); - if (message.slaId != null && Object.hasOwnProperty.call(message, "slaId")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.slaId); - return writer; - }; - - /** - * Encodes the specified BackupApplianceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo} message BackupApplianceLockInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupApplianceLockInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupApplianceLockInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupApplianceLockInfo.decode = function 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.backupdr.v1.BackupApplianceLockInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.backupApplianceId = reader.int64(); - break; - } - case 2: { - message.backupApplianceName = reader.string(); - break; - } - case 5: { - message.lockReason = reader.string(); - break; - } - case 6: { - message.jobName = reader.string(); - break; - } - case 7: { - message.backupImage = reader.string(); - break; - } - case 8: { - message.slaId = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupApplianceLockInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupApplianceLockInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupApplianceLockInfo message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupApplianceLockInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) - if (!$util.isInteger(message.backupApplianceId) && !(message.backupApplianceId && $util.isInteger(message.backupApplianceId.low) && $util.isInteger(message.backupApplianceId.high))) - return "backupApplianceId: integer|Long expected"; - if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) - if (!$util.isString(message.backupApplianceName)) - return "backupApplianceName: string expected"; - if (message.lockReason != null && message.hasOwnProperty("lockReason")) - if (!$util.isString(message.lockReason)) - return "lockReason: string expected"; - if (message.jobName != null && message.hasOwnProperty("jobName")) { - properties.lockSource = 1; - if (!$util.isString(message.jobName)) - return "jobName: string expected"; - } - if (message.backupImage != null && message.hasOwnProperty("backupImage")) { - if (properties.lockSource === 1) - return "lockSource: multiple values"; - properties.lockSource = 1; - if (!$util.isString(message.backupImage)) - return "backupImage: string expected"; - } - if (message.slaId != null && message.hasOwnProperty("slaId")) { - if (properties.lockSource === 1) - return "lockSource: multiple values"; - properties.lockSource = 1; - if (!$util.isInteger(message.slaId) && !(message.slaId && $util.isInteger(message.slaId.low) && $util.isInteger(message.slaId.high))) - return "slaId: integer|Long expected"; - } - return null; - }; - - /** - * Creates a BackupApplianceLockInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo - */ - BackupApplianceLockInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceLockInfo) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupApplianceLockInfo(); - if (object.backupApplianceId != null) - if ($util.Long) - (message.backupApplianceId = $util.Long.fromValue(object.backupApplianceId)).unsigned = false; - else if (typeof object.backupApplianceId === "string") - message.backupApplianceId = parseInt(object.backupApplianceId, 10); - else if (typeof object.backupApplianceId === "number") - message.backupApplianceId = object.backupApplianceId; - else if (typeof object.backupApplianceId === "object") - message.backupApplianceId = new $util.LongBits(object.backupApplianceId.low >>> 0, object.backupApplianceId.high >>> 0).toNumber(); - if (object.backupApplianceName != null) - message.backupApplianceName = String(object.backupApplianceName); - if (object.lockReason != null) - message.lockReason = String(object.lockReason); - if (object.jobName != null) - message.jobName = String(object.jobName); - if (object.backupImage != null) - message.backupImage = String(object.backupImage); - if (object.slaId != null) - if ($util.Long) - (message.slaId = $util.Long.fromValue(object.slaId)).unsigned = false; - else if (typeof object.slaId === "string") - message.slaId = parseInt(object.slaId, 10); - else if (typeof object.slaId === "number") - message.slaId = object.slaId; - else if (typeof object.slaId === "object") - message.slaId = new $util.LongBits(object.slaId.low >>> 0, object.slaId.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a BackupApplianceLockInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {google.cloud.backupdr.v1.BackupApplianceLockInfo} message BackupApplianceLockInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupApplianceLockInfo.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.backupApplianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.backupApplianceId = options.longs === String ? "0" : 0; - object.backupApplianceName = ""; - object.lockReason = ""; - } - if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) - if (typeof message.backupApplianceId === "number") - object.backupApplianceId = options.longs === String ? String(message.backupApplianceId) : message.backupApplianceId; - else - object.backupApplianceId = options.longs === String ? $util.Long.prototype.toString.call(message.backupApplianceId) : options.longs === Number ? new $util.LongBits(message.backupApplianceId.low >>> 0, message.backupApplianceId.high >>> 0).toNumber() : message.backupApplianceId; - if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) - object.backupApplianceName = message.backupApplianceName; - if (message.lockReason != null && message.hasOwnProperty("lockReason")) - object.lockReason = message.lockReason; - if (message.jobName != null && message.hasOwnProperty("jobName")) { - object.jobName = message.jobName; - if (options.oneofs) - object.lockSource = "jobName"; - } - if (message.backupImage != null && message.hasOwnProperty("backupImage")) { - object.backupImage = message.backupImage; - if (options.oneofs) - object.lockSource = "backupImage"; - } - if (message.slaId != null && message.hasOwnProperty("slaId")) { - if (typeof message.slaId === "number") - object.slaId = options.longs === String ? String(message.slaId) : message.slaId; - else - object.slaId = options.longs === String ? $util.Long.prototype.toString.call(message.slaId) : options.longs === Number ? new $util.LongBits(message.slaId.low >>> 0, message.slaId.high >>> 0).toNumber() : message.slaId; - if (options.oneofs) - object.lockSource = "slaId"; - } - return object; - }; - - /** - * Converts this BackupApplianceLockInfo to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - * @returns {Object.} JSON object - */ - BackupApplianceLockInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupApplianceLockInfo - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupApplianceLockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceLockInfo"; - }; - - return BackupApplianceLockInfo; - })(); - - v1.BackupLock = (function() { - - /** - * Properties of a BackupLock. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupLock - * @property {google.protobuf.ITimestamp|null} [lockUntilTime] BackupLock lockUntilTime - * @property {google.cloud.backupdr.v1.IBackupApplianceLockInfo|null} [backupApplianceLockInfo] BackupLock backupApplianceLockInfo - * @property {google.cloud.backupdr.v1.IServiceLockInfo|null} [serviceLockInfo] BackupLock serviceLockInfo - */ - - /** - * Constructs a new BackupLock. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupLock. - * @implements IBackupLock - * @constructor - * @param {google.cloud.backupdr.v1.IBackupLock=} [properties] Properties to set - */ - function BackupLock(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupLock lockUntilTime. - * @member {google.protobuf.ITimestamp|null|undefined} lockUntilTime - * @memberof google.cloud.backupdr.v1.BackupLock - * @instance - */ - BackupLock.prototype.lockUntilTime = null; - - /** - * BackupLock backupApplianceLockInfo. - * @member {google.cloud.backupdr.v1.IBackupApplianceLockInfo|null|undefined} backupApplianceLockInfo - * @memberof google.cloud.backupdr.v1.BackupLock - * @instance - */ - BackupLock.prototype.backupApplianceLockInfo = null; - - /** - * BackupLock serviceLockInfo. - * @member {google.cloud.backupdr.v1.IServiceLockInfo|null|undefined} serviceLockInfo - * @memberof google.cloud.backupdr.v1.BackupLock - * @instance - */ - BackupLock.prototype.serviceLockInfo = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupLock ClientLockInfo. - * @member {"backupApplianceLockInfo"|"serviceLockInfo"|undefined} ClientLockInfo - * @memberof google.cloud.backupdr.v1.BackupLock - * @instance - */ - Object.defineProperty(BackupLock.prototype, "ClientLockInfo", { - get: $util.oneOfGetter($oneOfFields = ["backupApplianceLockInfo", "serviceLockInfo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupLock instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {google.cloud.backupdr.v1.IBackupLock=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock instance - */ - BackupLock.create = function create(properties) { - return new BackupLock(properties); - }; - - /** - * Encodes the specified BackupLock message. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {google.cloud.backupdr.v1.IBackupLock} message BackupLock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupLock.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lockUntilTime != null && Object.hasOwnProperty.call(message, "lockUntilTime")) - $root.google.protobuf.Timestamp.encode(message.lockUntilTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.backupApplianceLockInfo != null && Object.hasOwnProperty.call(message, "backupApplianceLockInfo")) - $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.encode(message.backupApplianceLockInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.serviceLockInfo != null && Object.hasOwnProperty.call(message, "serviceLockInfo")) - $root.google.cloud.backupdr.v1.ServiceLockInfo.encode(message.serviceLockInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BackupLock message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {google.cloud.backupdr.v1.IBackupLock} message BackupLock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupLock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupLock message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupLock.decode = function 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.backupdr.v1.BackupLock(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.lockUntilTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.decode(reader, reader.uint32()); - break; - } - case 4: { - message.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupLock message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupLock.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupLock message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupLock.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.lockUntilTime != null && message.hasOwnProperty("lockUntilTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lockUntilTime); - if (error) - return "lockUntilTime." + error; - } - if (message.backupApplianceLockInfo != null && message.hasOwnProperty("backupApplianceLockInfo")) { - properties.ClientLockInfo = 1; - { - var error = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.verify(message.backupApplianceLockInfo); - if (error) - return "backupApplianceLockInfo." + error; - } - } - if (message.serviceLockInfo != null && message.hasOwnProperty("serviceLockInfo")) { - if (properties.ClientLockInfo === 1) - return "ClientLockInfo: multiple values"; - properties.ClientLockInfo = 1; - { - var error = $root.google.cloud.backupdr.v1.ServiceLockInfo.verify(message.serviceLockInfo); - if (error) - return "serviceLockInfo." + error; - } - } - return null; - }; - - /** - * Creates a BackupLock message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock - */ - BackupLock.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupLock) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupLock(); - if (object.lockUntilTime != null) { - if (typeof object.lockUntilTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupLock.lockUntilTime: object expected"); - message.lockUntilTime = $root.google.protobuf.Timestamp.fromObject(object.lockUntilTime); - } - if (object.backupApplianceLockInfo != null) { - if (typeof object.backupApplianceLockInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupLock.backupApplianceLockInfo: object expected"); - message.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.fromObject(object.backupApplianceLockInfo); - } - if (object.serviceLockInfo != null) { - if (typeof object.serviceLockInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupLock.serviceLockInfo: object expected"); - message.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.fromObject(object.serviceLockInfo); - } - return message; - }; - - /** - * Creates a plain object from a BackupLock message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {google.cloud.backupdr.v1.BackupLock} message BackupLock - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupLock.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.lockUntilTime = null; - if (message.lockUntilTime != null && message.hasOwnProperty("lockUntilTime")) - object.lockUntilTime = $root.google.protobuf.Timestamp.toObject(message.lockUntilTime, options); - if (message.backupApplianceLockInfo != null && message.hasOwnProperty("backupApplianceLockInfo")) { - object.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.toObject(message.backupApplianceLockInfo, options); - if (options.oneofs) - object.ClientLockInfo = "backupApplianceLockInfo"; - } - if (message.serviceLockInfo != null && message.hasOwnProperty("serviceLockInfo")) { - object.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.toObject(message.serviceLockInfo, options); - if (options.oneofs) - object.ClientLockInfo = "serviceLockInfo"; - } - return object; - }; - - /** - * Converts this BackupLock to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupLock - * @instance - * @returns {Object.} JSON object - */ - BackupLock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupLock - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupLock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupLock"; - }; - - return BackupLock; - })(); - - v1.Backup = (function() { - - /** - * Properties of a Backup. - * @memberof google.cloud.backupdr.v1 - * @interface IBackup - * @property {string|null} [name] Backup name - * @property {string|null} [description] Backup description - * @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Backup updateTime - * @property {Object.|null} [labels] Backup labels - * @property {google.protobuf.ITimestamp|null} [enforcedRetentionEndTime] Backup enforcedRetentionEndTime - * @property {google.protobuf.ITimestamp|null} [expireTime] Backup expireTime - * @property {google.protobuf.ITimestamp|null} [consistencyTime] Backup consistencyTime - * @property {string|null} [etag] Backup etag - * @property {google.cloud.backupdr.v1.Backup.State|null} [state] Backup state - * @property {Array.|null} [serviceLocks] Backup serviceLocks - * @property {Array.|null} [backupApplianceLocks] Backup backupApplianceLocks - * @property {google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null} [computeInstanceBackupProperties] Backup computeInstanceBackupProperties - * @property {google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null} [backupApplianceBackupProperties] Backup backupApplianceBackupProperties - * @property {google.cloud.backupdr.v1.Backup.BackupType|null} [backupType] Backup backupType - * @property {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null} [gcpBackupPlanInfo] Backup gcpBackupPlanInfo - * @property {number|Long|null} [resourceSizeBytes] Backup resourceSizeBytes - */ - - /** - * Constructs a new Backup. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a Backup. - * @implements IBackup - * @constructor - * @param {google.cloud.backupdr.v1.IBackup=} [properties] Properties to set - */ - function Backup(properties) { - this.labels = {}; - this.serviceLocks = []; - this.backupApplianceLocks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Backup name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.name = ""; - - /** - * Backup description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.description = null; - - /** - * Backup createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.createTime = null; - - /** - * Backup updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.updateTime = null; - - /** - * Backup labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.labels = $util.emptyObject; - - /** - * Backup enforcedRetentionEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} enforcedRetentionEndTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.enforcedRetentionEndTime = null; - - /** - * Backup expireTime. - * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.expireTime = null; - - /** - * Backup consistencyTime. - * @member {google.protobuf.ITimestamp|null|undefined} consistencyTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.consistencyTime = null; - - /** - * Backup etag. - * @member {string|null|undefined} etag - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.etag = null; - - /** - * Backup state. - * @member {google.cloud.backupdr.v1.Backup.State} state - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.state = 0; - - /** - * Backup serviceLocks. - * @member {Array.} serviceLocks - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.serviceLocks = $util.emptyArray; - - /** - * Backup backupApplianceLocks. - * @member {Array.} backupApplianceLocks - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.backupApplianceLocks = $util.emptyArray; - - /** - * Backup computeInstanceBackupProperties. - * @member {google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null|undefined} computeInstanceBackupProperties - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.computeInstanceBackupProperties = null; - - /** - * Backup backupApplianceBackupProperties. - * @member {google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null|undefined} backupApplianceBackupProperties - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.backupApplianceBackupProperties = null; - - /** - * Backup backupType. - * @member {google.cloud.backupdr.v1.Backup.BackupType} backupType - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.backupType = 0; - - /** - * Backup gcpBackupPlanInfo. - * @member {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null|undefined} gcpBackupPlanInfo - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.gcpBackupPlanInfo = null; - - /** - * Backup resourceSizeBytes. - * @member {number|Long} resourceSizeBytes - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.resourceSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Backup _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup _createTime. - * @member {"createTime"|undefined} _createTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_createTime", { - get: $util.oneOfGetter($oneOfFields = ["createTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup _updateTime. - * @member {"updateTime"|undefined} _updateTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_updateTime", { - get: $util.oneOfGetter($oneOfFields = ["updateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup _enforcedRetentionEndTime. - * @member {"enforcedRetentionEndTime"|undefined} _enforcedRetentionEndTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_enforcedRetentionEndTime", { - get: $util.oneOfGetter($oneOfFields = ["enforcedRetentionEndTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup _expireTime. - * @member {"expireTime"|undefined} _expireTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_expireTime", { - get: $util.oneOfGetter($oneOfFields = ["expireTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup _consistencyTime. - * @member {"consistencyTime"|undefined} _consistencyTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_consistencyTime", { - get: $util.oneOfGetter($oneOfFields = ["consistencyTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup _etag. - * @member {"etag"|undefined} _etag - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_etag", { - get: $util.oneOfGetter($oneOfFields = ["etag"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup backupProperties. - * @member {"computeInstanceBackupProperties"|"backupApplianceBackupProperties"|undefined} backupProperties - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "backupProperties", { - get: $util.oneOfGetter($oneOfFields = ["computeInstanceBackupProperties", "backupApplianceBackupProperties"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup planInfo. - * @member {"gcpBackupPlanInfo"|undefined} planInfo - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "planInfo", { - get: $util.oneOfGetter($oneOfFields = ["gcpBackupPlanInfo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Backup instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {google.cloud.backupdr.v1.IBackup=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Backup} Backup instance - */ - Backup.create = function create(properties) { - return new Backup(properties); - }; - - /** - * Encodes the specified Backup message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {google.cloud.backupdr.v1.IBackup} message Backup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Backup.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).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 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.enforcedRetentionEndTime != null && Object.hasOwnProperty.call(message, "enforcedRetentionEndTime")) - $root.google.protobuf.Timestamp.encode(message.enforcedRetentionEndTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.consistencyTime != null && Object.hasOwnProperty.call(message, "consistencyTime")) - $root.google.protobuf.Timestamp.encode(message.consistencyTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.state); - if (message.serviceLocks != null && message.serviceLocks.length) - for (var i = 0; i < message.serviceLocks.length; ++i) - $root.google.cloud.backupdr.v1.BackupLock.encode(message.serviceLocks[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.backupApplianceLocks != null && message.backupApplianceLocks.length) - for (var i = 0; i < message.backupApplianceLocks.length; ++i) - $root.google.cloud.backupdr.v1.BackupLock.encode(message.backupApplianceLocks[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.computeInstanceBackupProperties != null && Object.hasOwnProperty.call(message, "computeInstanceBackupProperties")) - $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.encode(message.computeInstanceBackupProperties, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) - writer.uint32(/* id 20, wireType 0 =*/160).int32(message.backupType); - if (message.backupApplianceBackupProperties != null && Object.hasOwnProperty.call(message, "backupApplianceBackupProperties")) - $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.encode(message.backupApplianceBackupProperties, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.gcpBackupPlanInfo != null && Object.hasOwnProperty.call(message, "gcpBackupPlanInfo")) - $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.encode(message.gcpBackupPlanInfo, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.resourceSizeBytes != null && Object.hasOwnProperty.call(message, "resourceSizeBytes")) - writer.uint32(/* id 23, wireType 0 =*/184).int64(message.resourceSizeBytes); - return writer; - }; - - /** - * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {google.cloud.backupdr.v1.IBackup} message Backup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Backup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Backup message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Backup} Backup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Backup.decode = function 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.backupdr.v1.Backup(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - 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 6: { - message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.consistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - message.etag = reader.string(); - break; - } - case 15: { - message.state = reader.int32(); - break; - } - case 17: { - if (!(message.serviceLocks && message.serviceLocks.length)) - message.serviceLocks = []; - message.serviceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader, reader.uint32())); - break; - } - case 18: { - if (!(message.backupApplianceLocks && message.backupApplianceLocks.length)) - message.backupApplianceLocks = []; - message.backupApplianceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader, reader.uint32())); - break; - } - case 19: { - message.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.decode(reader, reader.uint32()); - break; - } - case 21: { - message.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.decode(reader, reader.uint32()); - break; - } - case 20: { - message.backupType = reader.int32(); - break; - } - case 22: { - message.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.decode(reader, reader.uint32()); - break; - } - case 23: { - message.resourceSizeBytes = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Backup message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Backup} Backup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Backup.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Backup message. - * @function verify - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Backup.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.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - properties._createTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - properties._updateTime = 1; - { - 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.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { - properties._enforcedRetentionEndTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.enforcedRetentionEndTime); - if (error) - return "enforcedRetentionEndTime." + error; - } - } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - properties._expireTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); - if (error) - return "expireTime." + error; - } - } - if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { - properties._consistencyTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.consistencyTime); - if (error) - return "consistencyTime." + error; - } - } - if (message.etag != null && message.hasOwnProperty("etag")) { - properties._etag = 1; - if (!$util.isString(message.etag)) - return "etag: 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.serviceLocks != null && message.hasOwnProperty("serviceLocks")) { - if (!Array.isArray(message.serviceLocks)) - return "serviceLocks: array expected"; - for (var i = 0; i < message.serviceLocks.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupLock.verify(message.serviceLocks[i]); - if (error) - return "serviceLocks." + error; - } - } - if (message.backupApplianceLocks != null && message.hasOwnProperty("backupApplianceLocks")) { - if (!Array.isArray(message.backupApplianceLocks)) - return "backupApplianceLocks: array expected"; - for (var i = 0; i < message.backupApplianceLocks.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupLock.verify(message.backupApplianceLocks[i]); - if (error) - return "backupApplianceLocks." + error; - } - } - if (message.computeInstanceBackupProperties != null && message.hasOwnProperty("computeInstanceBackupProperties")) { - properties.backupProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify(message.computeInstanceBackupProperties); - if (error) - return "computeInstanceBackupProperties." + error; - } - } - if (message.backupApplianceBackupProperties != null && message.hasOwnProperty("backupApplianceBackupProperties")) { - if (properties.backupProperties === 1) - return "backupProperties: multiple values"; - properties.backupProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify(message.backupApplianceBackupProperties); - if (error) - return "backupApplianceBackupProperties." + error; - } - } - if (message.backupType != null && message.hasOwnProperty("backupType")) - switch (message.backupType) { - default: - return "backupType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.gcpBackupPlanInfo != null && message.hasOwnProperty("gcpBackupPlanInfo")) { - properties.planInfo = 1; - { - var error = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify(message.gcpBackupPlanInfo); - if (error) - return "gcpBackupPlanInfo." + error; - } - } - if (message.resourceSizeBytes != null && message.hasOwnProperty("resourceSizeBytes")) - if (!$util.isInteger(message.resourceSizeBytes) && !(message.resourceSizeBytes && $util.isInteger(message.resourceSizeBytes.low) && $util.isInteger(message.resourceSizeBytes.high))) - return "resourceSizeBytes: integer|Long expected"; - return null; - }; - - /** - * Creates a Backup message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Backup} Backup - */ - Backup.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Backup) - return object; - var message = new $root.google.cloud.backupdr.v1.Backup(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.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.backupdr.v1.Backup.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.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.enforcedRetentionEndTime != null) { - if (typeof object.enforcedRetentionEndTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.enforcedRetentionEndTime: object expected"); - message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.fromObject(object.enforcedRetentionEndTime); - } - if (object.expireTime != null) { - if (typeof object.expireTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); - } - if (object.consistencyTime != null) { - if (typeof object.consistencyTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.consistencyTime: object expected"); - message.consistencyTime = $root.google.protobuf.Timestamp.fromObject(object.consistencyTime); - } - if (object.etag != null) - message.etag = String(object.etag); - 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 "ACTIVE": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ERROR": - case 4: - message.state = 4; - break; - } - if (object.serviceLocks) { - if (!Array.isArray(object.serviceLocks)) - throw TypeError(".google.cloud.backupdr.v1.Backup.serviceLocks: array expected"); - message.serviceLocks = []; - for (var i = 0; i < object.serviceLocks.length; ++i) { - if (typeof object.serviceLocks[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.serviceLocks: object expected"); - message.serviceLocks[i] = $root.google.cloud.backupdr.v1.BackupLock.fromObject(object.serviceLocks[i]); - } - } - if (object.backupApplianceLocks) { - if (!Array.isArray(object.backupApplianceLocks)) - throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceLocks: array expected"); - message.backupApplianceLocks = []; - for (var i = 0; i < object.backupApplianceLocks.length; ++i) { - if (typeof object.backupApplianceLocks[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceLocks: object expected"); - message.backupApplianceLocks[i] = $root.google.cloud.backupdr.v1.BackupLock.fromObject(object.backupApplianceLocks[i]); - } - } - if (object.computeInstanceBackupProperties != null) { - if (typeof object.computeInstanceBackupProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.computeInstanceBackupProperties: object expected"); - message.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.fromObject(object.computeInstanceBackupProperties); - } - if (object.backupApplianceBackupProperties != null) { - if (typeof object.backupApplianceBackupProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceBackupProperties: object expected"); - message.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.fromObject(object.backupApplianceBackupProperties); - } - switch (object.backupType) { - default: - if (typeof object.backupType === "number") { - message.backupType = object.backupType; - break; - } - break; - case "BACKUP_TYPE_UNSPECIFIED": - case 0: - message.backupType = 0; - break; - case "SCHEDULED": - case 1: - message.backupType = 1; - break; - case "ON_DEMAND": - case 2: - message.backupType = 2; - break; - } - if (object.gcpBackupPlanInfo != null) { - if (typeof object.gcpBackupPlanInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.gcpBackupPlanInfo: object expected"); - message.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.fromObject(object.gcpBackupPlanInfo); - } - if (object.resourceSizeBytes != null) - if ($util.Long) - (message.resourceSizeBytes = $util.Long.fromValue(object.resourceSizeBytes)).unsigned = false; - else if (typeof object.resourceSizeBytes === "string") - message.resourceSizeBytes = parseInt(object.resourceSizeBytes, 10); - else if (typeof object.resourceSizeBytes === "number") - message.resourceSizeBytes = object.resourceSizeBytes; - else if (typeof object.resourceSizeBytes === "object") - message.resourceSizeBytes = new $util.LongBits(object.resourceSizeBytes.low >>> 0, object.resourceSizeBytes.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a Backup message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {google.cloud.backupdr.v1.Backup} message Backup - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Backup.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.serviceLocks = []; - object.backupApplianceLocks = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.backupType = options.enums === String ? "BACKUP_TYPE_UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.resourceSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.resourceSizeBytes = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (options.oneofs) - object._createTime = "createTime"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (options.oneofs) - object._updateTime = "updateTime"; - } - 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.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { - object.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.toObject(message.enforcedRetentionEndTime, options); - if (options.oneofs) - object._enforcedRetentionEndTime = "enforcedRetentionEndTime"; - } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); - if (options.oneofs) - object._expireTime = "expireTime"; - } - if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { - object.consistencyTime = $root.google.protobuf.Timestamp.toObject(message.consistencyTime, options); - if (options.oneofs) - object._consistencyTime = "consistencyTime"; - } - if (message.etag != null && message.hasOwnProperty("etag")) { - object.etag = message.etag; - if (options.oneofs) - object._etag = "etag"; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.Backup.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.Backup.State[message.state] : message.state; - if (message.serviceLocks && message.serviceLocks.length) { - object.serviceLocks = []; - for (var j = 0; j < message.serviceLocks.length; ++j) - object.serviceLocks[j] = $root.google.cloud.backupdr.v1.BackupLock.toObject(message.serviceLocks[j], options); - } - if (message.backupApplianceLocks && message.backupApplianceLocks.length) { - object.backupApplianceLocks = []; - for (var j = 0; j < message.backupApplianceLocks.length; ++j) - object.backupApplianceLocks[j] = $root.google.cloud.backupdr.v1.BackupLock.toObject(message.backupApplianceLocks[j], options); - } - if (message.computeInstanceBackupProperties != null && message.hasOwnProperty("computeInstanceBackupProperties")) { - object.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.toObject(message.computeInstanceBackupProperties, options); - if (options.oneofs) - object.backupProperties = "computeInstanceBackupProperties"; - } - if (message.backupType != null && message.hasOwnProperty("backupType")) - object.backupType = options.enums === String ? $root.google.cloud.backupdr.v1.Backup.BackupType[message.backupType] === undefined ? message.backupType : $root.google.cloud.backupdr.v1.Backup.BackupType[message.backupType] : message.backupType; - if (message.backupApplianceBackupProperties != null && message.hasOwnProperty("backupApplianceBackupProperties")) { - object.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.toObject(message.backupApplianceBackupProperties, options); - if (options.oneofs) - object.backupProperties = "backupApplianceBackupProperties"; - } - if (message.gcpBackupPlanInfo != null && message.hasOwnProperty("gcpBackupPlanInfo")) { - object.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.toObject(message.gcpBackupPlanInfo, options); - if (options.oneofs) - object.planInfo = "gcpBackupPlanInfo"; - } - if (message.resourceSizeBytes != null && message.hasOwnProperty("resourceSizeBytes")) - if (typeof message.resourceSizeBytes === "number") - object.resourceSizeBytes = options.longs === String ? String(message.resourceSizeBytes) : message.resourceSizeBytes; - else - object.resourceSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resourceSizeBytes) : options.longs === Number ? new $util.LongBits(message.resourceSizeBytes.low >>> 0, message.resourceSizeBytes.high >>> 0).toNumber() : message.resourceSizeBytes; - return object; - }; - - /** - * Converts this Backup to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Backup - * @instance - * @returns {Object.} JSON object - */ - Backup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Backup - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Backup"; - }; - - /** - * State enum. - * @name google.cloud.backupdr.v1.Backup.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} DELETING=3 DELETING value - * @property {number} ERROR=4 ERROR value - */ - Backup.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "ERROR"] = 4; - return values; - })(); - - /** - * BackupType enum. - * @name google.cloud.backupdr.v1.Backup.BackupType - * @enum {number} - * @property {number} BACKUP_TYPE_UNSPECIFIED=0 BACKUP_TYPE_UNSPECIFIED value - * @property {number} SCHEDULED=1 SCHEDULED value - * @property {number} ON_DEMAND=2 ON_DEMAND value - */ - Backup.BackupType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCHEDULED"] = 1; - values[valuesById[2] = "ON_DEMAND"] = 2; - return values; - })(); - - Backup.GCPBackupPlanInfo = (function() { - - /** - * Properties of a GCPBackupPlanInfo. - * @memberof google.cloud.backupdr.v1.Backup - * @interface IGCPBackupPlanInfo - * @property {string|null} [backupPlan] GCPBackupPlanInfo backupPlan - * @property {string|null} [backupPlanRuleId] GCPBackupPlanInfo backupPlanRuleId - */ - - /** - * Constructs a new GCPBackupPlanInfo. - * @memberof google.cloud.backupdr.v1.Backup - * @classdesc Represents a GCPBackupPlanInfo. - * @implements IGCPBackupPlanInfo - * @constructor - * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo=} [properties] Properties to set - */ - function GCPBackupPlanInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GCPBackupPlanInfo backupPlan. - * @member {string} backupPlan - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @instance - */ - GCPBackupPlanInfo.prototype.backupPlan = ""; - - /** - * GCPBackupPlanInfo backupPlanRuleId. - * @member {string} backupPlanRuleId - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @instance - */ - GCPBackupPlanInfo.prototype.backupPlanRuleId = ""; - - /** - * Creates a new GCPBackupPlanInfo instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo instance - */ - GCPBackupPlanInfo.create = function create(properties) { - return new GCPBackupPlanInfo(properties); - }; - - /** - * Encodes the specified GCPBackupPlanInfo message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo} message GCPBackupPlanInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GCPBackupPlanInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPlan); - if (message.backupPlanRuleId != null && Object.hasOwnProperty.call(message, "backupPlanRuleId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanRuleId); - return writer; - }; - - /** - * Encodes the specified GCPBackupPlanInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo} message GCPBackupPlanInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GCPBackupPlanInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GCPBackupPlanInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GCPBackupPlanInfo.decode = function 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.backupdr.v1.Backup.GCPBackupPlanInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.backupPlan = reader.string(); - break; - } - case 2: { - message.backupPlanRuleId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GCPBackupPlanInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GCPBackupPlanInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GCPBackupPlanInfo message. - * @function verify - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GCPBackupPlanInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - if (!$util.isString(message.backupPlan)) - return "backupPlan: string expected"; - if (message.backupPlanRuleId != null && message.hasOwnProperty("backupPlanRuleId")) - if (!$util.isString(message.backupPlanRuleId)) - return "backupPlanRuleId: string expected"; - return null; - }; - - /** - * Creates a GCPBackupPlanInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo - */ - GCPBackupPlanInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo) - return object; - var message = new $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo(); - if (object.backupPlan != null) - message.backupPlan = String(object.backupPlan); - if (object.backupPlanRuleId != null) - message.backupPlanRuleId = String(object.backupPlanRuleId); - return message; - }; - - /** - * Creates a plain object from a GCPBackupPlanInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} message GCPBackupPlanInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GCPBackupPlanInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.backupPlan = ""; - object.backupPlanRuleId = ""; - } - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - object.backupPlan = message.backupPlan; - if (message.backupPlanRuleId != null && message.hasOwnProperty("backupPlanRuleId")) - object.backupPlanRuleId = message.backupPlanRuleId; - return object; - }; - - /** - * Converts this GCPBackupPlanInfo to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @instance - * @returns {Object.} JSON object - */ - GCPBackupPlanInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GCPBackupPlanInfo - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GCPBackupPlanInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo"; - }; - - return GCPBackupPlanInfo; - })(); - - return Backup; - })(); - - v1.CreateBackupVaultRequest = (function() { - - /** - * Properties of a CreateBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @interface ICreateBackupVaultRequest - * @property {string|null} [parent] CreateBackupVaultRequest parent - * @property {string|null} [backupVaultId] CreateBackupVaultRequest backupVaultId - * @property {google.cloud.backupdr.v1.IBackupVault|null} [backupVault] CreateBackupVaultRequest backupVault - * @property {string|null} [requestId] CreateBackupVaultRequest requestId - * @property {boolean|null} [validateOnly] CreateBackupVaultRequest validateOnly - */ - - /** - * Constructs a new CreateBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CreateBackupVaultRequest. - * @implements ICreateBackupVaultRequest - * @constructor - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest=} [properties] Properties to set - */ - function CreateBackupVaultRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateBackupVaultRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.parent = ""; - - /** - * CreateBackupVaultRequest backupVaultId. - * @member {string} backupVaultId - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.backupVaultId = ""; - - /** - * CreateBackupVaultRequest backupVault. - * @member {google.cloud.backupdr.v1.IBackupVault|null|undefined} backupVault - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.backupVault = null; - - /** - * CreateBackupVaultRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.requestId = ""; - - /** - * CreateBackupVaultRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateBackupVaultRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest instance - */ - CreateBackupVaultRequest.create = function create(properties) { - return new CreateBackupVaultRequest(properties); - }; - - /** - * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupVaultRequest.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.backupVaultId != null && Object.hasOwnProperty.call(message, "backupVaultId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupVaultId); - if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) - $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVault, 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); - return writer; - }; - - /** - * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupVaultRequest.decode = function 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.backupdr.v1.CreateBackupVaultRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.backupVaultId = reader.string(); - break; - } - case 3: { - message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - case 5: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateBackupVaultRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateBackupVaultRequest.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.backupVaultId != null && message.hasOwnProperty("backupVaultId")) - if (!$util.isString(message.backupVaultId)) - return "backupVaultId: string expected"; - if (message.backupVault != null && message.hasOwnProperty("backupVault")) { - var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault); - if (error) - return "backupVault." + 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"; - return null; - }; - - /** - * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest - */ - CreateBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupVaultRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.CreateBackupVaultRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.backupVaultId != null) - message.backupVaultId = String(object.backupVaultId); - if (object.backupVault != null) { - if (typeof object.backupVault !== "object") - throw TypeError(".google.cloud.backupdr.v1.CreateBackupVaultRequest.backupVault: object expected"); - message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVault); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.CreateBackupVaultRequest} message CreateBackupVaultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateBackupVaultRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.backupVaultId = ""; - object.backupVault = null; - object.requestId = ""; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.backupVaultId != null && message.hasOwnProperty("backupVaultId")) - object.backupVaultId = message.backupVaultId; - if (message.backupVault != null && message.hasOwnProperty("backupVault")) - object.backupVault = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVault, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateBackupVaultRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - * @returns {Object.} JSON object - */ - CreateBackupVaultRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateBackupVaultRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupVaultRequest"; - }; - - return CreateBackupVaultRequest; - })(); - - v1.ListBackupVaultsRequest = (function() { - - /** - * Properties of a ListBackupVaultsRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupVaultsRequest - * @property {string|null} [parent] ListBackupVaultsRequest parent - * @property {number|null} [pageSize] ListBackupVaultsRequest pageSize - * @property {string|null} [pageToken] ListBackupVaultsRequest pageToken - * @property {string|null} [filter] ListBackupVaultsRequest filter - * @property {string|null} [orderBy] ListBackupVaultsRequest orderBy - * @property {google.cloud.backupdr.v1.BackupVaultView|null} [view] ListBackupVaultsRequest view - */ - - /** - * Constructs a new ListBackupVaultsRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupVaultsRequest. - * @implements IListBackupVaultsRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest=} [properties] Properties to set - */ - function ListBackupVaultsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListBackupVaultsRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.parent = ""; - - /** - * ListBackupVaultsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.pageSize = 0; - - /** - * ListBackupVaultsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.pageToken = ""; - - /** - * ListBackupVaultsRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.filter = ""; - - /** - * ListBackupVaultsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.orderBy = ""; - - /** - * ListBackupVaultsRequest view. - * @member {google.cloud.backupdr.v1.BackupVaultView} view - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.view = 0; - - /** - * Creates a new ListBackupVaultsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest instance - */ - ListBackupVaultsRequest.create = function create(properties) { - return new ListBackupVaultsRequest(properties); - }; - - /** - * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupVaultsRequest.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); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); - return writer; - }; - - /** - * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupVaultsRequest.decode = function 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.backupdr.v1.ListBackupVaultsRequest(); - 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; - } - case 6: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupVaultsRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupVaultsRequest.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"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest - */ - ListBackupVaultsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupVaultsRequest(); - 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); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "BACKUP_VAULT_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BACKUP_VAULT_VIEW_BASIC": - case 1: - message.view = 1; - break; - case "BACKUP_VAULT_VIEW_FULL": - case 2: - message.view = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.ListBackupVaultsRequest} message ListBackupVaultsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupVaultsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - object.view = options.enums === String ? "BACKUP_VAULT_VIEW_UNSPECIFIED" : 0; - } - 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; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVaultView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupVaultView[message.view] : message.view; - return object; - }; - - /** - * Converts this ListBackupVaultsRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - * @returns {Object.} JSON object - */ - ListBackupVaultsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupVaultsRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupVaultsRequest"; - }; - - return ListBackupVaultsRequest; - })(); - - v1.ListBackupVaultsResponse = (function() { - - /** - * Properties of a ListBackupVaultsResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupVaultsResponse - * @property {Array.|null} [backupVaults] ListBackupVaultsResponse backupVaults - * @property {string|null} [nextPageToken] ListBackupVaultsResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupVaultsResponse unreachable - */ - - /** - * Constructs a new ListBackupVaultsResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupVaultsResponse. - * @implements IListBackupVaultsResponse - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse=} [properties] Properties to set - */ - function ListBackupVaultsResponse(properties) { - this.backupVaults = []; - 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]]; - } - - /** - * ListBackupVaultsResponse backupVaults. - * @member {Array.} backupVaults - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @instance - */ - ListBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; - - /** - * ListBackupVaultsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @instance - */ - ListBackupVaultsResponse.prototype.nextPageToken = ""; - - /** - * ListBackupVaultsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @instance - */ - ListBackupVaultsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListBackupVaultsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse instance - */ - ListBackupVaultsResponse.create = function create(properties) { - return new ListBackupVaultsResponse(properties); - }; - - /** - * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupVaultsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupVaults != null && message.backupVaults.length) - for (var i = 0; i < message.backupVaults.length; ++i) - $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVaults[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 ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupVaultsResponse.decode = function 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.backupdr.v1.ListBackupVaultsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.backupVaults && message.backupVaults.length)) - message.backupVaults = []; - message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.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 ListBackupVaultsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupVaultsResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupVaultsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { - if (!Array.isArray(message.backupVaults)) - return "backupVaults: array expected"; - for (var i = 0; i < message.backupVaults.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVaults[i]); - if (error) - return "backupVaults." + 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 ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse - */ - ListBackupVaultsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupVaultsResponse(); - if (object.backupVaults) { - if (!Array.isArray(object.backupVaults)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.backupVaults: array expected"); - message.backupVaults = []; - for (var i = 0; i < object.backupVaults.length; ++i) { - if (typeof object.backupVaults[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.backupVaults: object expected"); - message.backupVaults[i] = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVaults[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.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 ListBackupVaultsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.ListBackupVaultsResponse} message ListBackupVaultsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupVaultsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backupVaults = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backupVaults && message.backupVaults.length) { - object.backupVaults = []; - for (var j = 0; j < message.backupVaults.length; ++j) - object.backupVaults[j] = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVaults[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 ListBackupVaultsResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @instance - * @returns {Object.} JSON object - */ - ListBackupVaultsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupVaultsResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupVaultsResponse"; - }; - - return ListBackupVaultsResponse; - })(); - - v1.FetchUsableBackupVaultsRequest = (function() { - - /** - * Properties of a FetchUsableBackupVaultsRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IFetchUsableBackupVaultsRequest - * @property {string|null} [parent] FetchUsableBackupVaultsRequest parent - * @property {number|null} [pageSize] FetchUsableBackupVaultsRequest pageSize - * @property {string|null} [pageToken] FetchUsableBackupVaultsRequest pageToken - * @property {string|null} [filter] FetchUsableBackupVaultsRequest filter - * @property {string|null} [orderBy] FetchUsableBackupVaultsRequest orderBy - */ - - /** - * Constructs a new FetchUsableBackupVaultsRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FetchUsableBackupVaultsRequest. - * @implements IFetchUsableBackupVaultsRequest - * @constructor - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest=} [properties] Properties to set - */ - function FetchUsableBackupVaultsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FetchUsableBackupVaultsRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @instance - */ - FetchUsableBackupVaultsRequest.prototype.parent = ""; - - /** - * FetchUsableBackupVaultsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @instance - */ - FetchUsableBackupVaultsRequest.prototype.pageSize = 0; - - /** - * FetchUsableBackupVaultsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @instance - */ - FetchUsableBackupVaultsRequest.prototype.pageToken = ""; - - /** - * FetchUsableBackupVaultsRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @instance - */ - FetchUsableBackupVaultsRequest.prototype.filter = ""; - - /** - * FetchUsableBackupVaultsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @instance - */ - FetchUsableBackupVaultsRequest.prototype.orderBy = ""; - - /** - * Creates a new FetchUsableBackupVaultsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest instance - */ - FetchUsableBackupVaultsRequest.create = function create(properties) { - return new FetchUsableBackupVaultsRequest(properties); - }; - - /** - * Encodes the specified FetchUsableBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchUsableBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchUsableBackupVaultsRequest.decode = function 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.backupdr.v1.FetchUsableBackupVaultsRequest(); - 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 FetchUsableBackupVaultsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchUsableBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchUsableBackupVaultsRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest - */ - FetchUsableBackupVaultsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest(); - 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 FetchUsableBackupVaultsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @instance - * @returns {Object.} JSON object - */ - FetchUsableBackupVaultsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchUsableBackupVaultsRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchUsableBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest"; - }; - - return FetchUsableBackupVaultsRequest; - })(); - - v1.FetchUsableBackupVaultsResponse = (function() { - - /** - * Properties of a FetchUsableBackupVaultsResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IFetchUsableBackupVaultsResponse - * @property {Array.|null} [backupVaults] FetchUsableBackupVaultsResponse backupVaults - * @property {string|null} [nextPageToken] FetchUsableBackupVaultsResponse nextPageToken - * @property {Array.|null} [unreachable] FetchUsableBackupVaultsResponse unreachable - */ - - /** - * Constructs a new FetchUsableBackupVaultsResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FetchUsableBackupVaultsResponse. - * @implements IFetchUsableBackupVaultsResponse - * @constructor - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse=} [properties] Properties to set - */ - function FetchUsableBackupVaultsResponse(properties) { - this.backupVaults = []; - 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]]; - } - - /** - * FetchUsableBackupVaultsResponse backupVaults. - * @member {Array.} backupVaults - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @instance - */ - FetchUsableBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; - - /** - * FetchUsableBackupVaultsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @instance - */ - FetchUsableBackupVaultsResponse.prototype.nextPageToken = ""; - - /** - * FetchUsableBackupVaultsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @instance - */ - FetchUsableBackupVaultsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new FetchUsableBackupVaultsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse instance - */ - FetchUsableBackupVaultsResponse.create = function create(properties) { - return new FetchUsableBackupVaultsResponse(properties); - }; - - /** - * Encodes the specified FetchUsableBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchUsableBackupVaultsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupVaults != null && message.backupVaults.length) - for (var i = 0; i < message.backupVaults.length; ++i) - $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVaults[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 FetchUsableBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchUsableBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchUsableBackupVaultsResponse.decode = function 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.backupdr.v1.FetchUsableBackupVaultsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.backupVaults && message.backupVaults.length)) - message.backupVaults = []; - message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.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 FetchUsableBackupVaultsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchUsableBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchUsableBackupVaultsResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchUsableBackupVaultsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { - if (!Array.isArray(message.backupVaults)) - return "backupVaults: array expected"; - for (var i = 0; i < message.backupVaults.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVaults[i]); - if (error) - return "backupVaults." + 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 FetchUsableBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse - */ - FetchUsableBackupVaultsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse(); - if (object.backupVaults) { - if (!Array.isArray(object.backupVaults)) - throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.backupVaults: array expected"); - message.backupVaults = []; - for (var i = 0; i < object.backupVaults.length; ++i) { - if (typeof object.backupVaults[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.backupVaults: object expected"); - message.backupVaults[i] = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVaults[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.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 FetchUsableBackupVaultsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchUsableBackupVaultsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backupVaults = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backupVaults && message.backupVaults.length) { - object.backupVaults = []; - for (var j = 0; j < message.backupVaults.length; ++j) - object.backupVaults[j] = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVaults[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 FetchUsableBackupVaultsResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @instance - * @returns {Object.} JSON object - */ - FetchUsableBackupVaultsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchUsableBackupVaultsResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchUsableBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse"; - }; - - return FetchUsableBackupVaultsResponse; - })(); - - v1.GetBackupVaultRequest = (function() { - - /** - * Properties of a GetBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetBackupVaultRequest - * @property {string|null} [name] GetBackupVaultRequest name - * @property {google.cloud.backupdr.v1.BackupVaultView|null} [view] GetBackupVaultRequest view - */ - - /** - * Constructs a new GetBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetBackupVaultRequest. - * @implements IGetBackupVaultRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest=} [properties] Properties to set - */ - function GetBackupVaultRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetBackupVaultRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @instance - */ - GetBackupVaultRequest.prototype.name = ""; - - /** - * GetBackupVaultRequest view. - * @member {google.cloud.backupdr.v1.BackupVaultView} view - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @instance - */ - GetBackupVaultRequest.prototype.view = 0; - - /** - * Creates a new GetBackupVaultRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest instance - */ - GetBackupVaultRequest.create = function create(properties) { - return new GetBackupVaultRequest(properties); - }; - - /** - * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupVaultRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - return writer; - }; - - /** - * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetBackupVaultRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupVaultRequest.decode = function 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.backupdr.v1.GetBackupVaultRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBackupVaultRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBackupVaultRequest.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.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest - */ - GetBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetBackupVaultRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.GetBackupVaultRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "BACKUP_VAULT_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BACKUP_VAULT_VIEW_BASIC": - case 1: - message.view = 1; - break; - case "BACKUP_VAULT_VIEW_FULL": - case 2: - message.view = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.GetBackupVaultRequest} message GetBackupVaultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetBackupVaultRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "BACKUP_VAULT_VIEW_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVaultView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupVaultView[message.view] : message.view; - return object; - }; - - /** - * Converts this GetBackupVaultRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @instance - * @returns {Object.} JSON object - */ - GetBackupVaultRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetBackupVaultRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupVaultRequest"; - }; - - return GetBackupVaultRequest; - })(); - - v1.UpdateBackupVaultRequest = (function() { - - /** - * Properties of an UpdateBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IUpdateBackupVaultRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupVaultRequest updateMask - * @property {google.cloud.backupdr.v1.IBackupVault|null} [backupVault] UpdateBackupVaultRequest backupVault - * @property {string|null} [requestId] UpdateBackupVaultRequest requestId - * @property {boolean|null} [validateOnly] UpdateBackupVaultRequest validateOnly - * @property {boolean|null} [force] UpdateBackupVaultRequest force - */ - - /** - * Constructs a new UpdateBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an UpdateBackupVaultRequest. - * @implements IUpdateBackupVaultRequest - * @constructor - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest=} [properties] Properties to set - */ - function UpdateBackupVaultRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateBackupVaultRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.updateMask = null; - - /** - * UpdateBackupVaultRequest backupVault. - * @member {google.cloud.backupdr.v1.IBackupVault|null|undefined} backupVault - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.backupVault = null; - - /** - * UpdateBackupVaultRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.requestId = ""; - - /** - * UpdateBackupVaultRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.validateOnly = false; - - /** - * UpdateBackupVaultRequest force. - * @member {boolean} force - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.force = false; - - /** - * Creates a new UpdateBackupVaultRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest instance - */ - UpdateBackupVaultRequest.create = function create(properties) { - return new UpdateBackupVaultRequest(properties); - }; - - /** - * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBackupVaultRequest.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.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) - $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVault, 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 UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBackupVaultRequest.decode = function 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.backupdr.v1.UpdateBackupVaultRequest(); - 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.backupVault = $root.google.cloud.backupdr.v1.BackupVault.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 UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateBackupVaultRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateBackupVaultRequest.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.backupVault != null && message.hasOwnProperty("backupVault")) { - var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault); - if (error) - return "backupVault." + 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 UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest - */ - UpdateBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateBackupVaultRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.backupVault != null) { - if (typeof object.backupVault !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateBackupVaultRequest.backupVault: object expected"); - message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVault); - } - 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 UpdateBackupVaultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.UpdateBackupVaultRequest} message UpdateBackupVaultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateBackupVaultRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.backupVault = 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.backupVault != null && message.hasOwnProperty("backupVault")) - object.backupVault = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVault, 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 UpdateBackupVaultRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateBackupVaultRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateBackupVaultRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupVaultRequest"; - }; - - return UpdateBackupVaultRequest; - })(); - - v1.DeleteBackupVaultRequest = (function() { - - /** - * Properties of a DeleteBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IDeleteBackupVaultRequest - * @property {string|null} [name] DeleteBackupVaultRequest name - * @property {string|null} [requestId] DeleteBackupVaultRequest requestId - * @property {boolean|null} [force] DeleteBackupVaultRequest force - * @property {string|null} [etag] DeleteBackupVaultRequest etag - * @property {boolean|null} [validateOnly] DeleteBackupVaultRequest validateOnly - * @property {boolean|null} [allowMissing] DeleteBackupVaultRequest allowMissing - */ - - /** - * Constructs a new DeleteBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DeleteBackupVaultRequest. - * @implements IDeleteBackupVaultRequest - * @constructor - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest=} [properties] Properties to set - */ - function DeleteBackupVaultRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteBackupVaultRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.name = ""; - - /** - * DeleteBackupVaultRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.requestId = ""; - - /** - * DeleteBackupVaultRequest force. - * @member {boolean} force - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.force = false; - - /** - * DeleteBackupVaultRequest etag. - * @member {string} etag - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.etag = ""; - - /** - * DeleteBackupVaultRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.validateOnly = false; - - /** - * DeleteBackupVaultRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.allowMissing = false; - - /** - * Creates a new DeleteBackupVaultRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest instance - */ - DeleteBackupVaultRequest.create = function create(properties) { - return new DeleteBackupVaultRequest(properties); - }; - - /** - * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupVaultRequest.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); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.allowMissing); - return writer; - }; - - /** - * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupVaultRequest.decode = function 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.backupdr.v1.DeleteBackupVaultRequest(); - 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; - } - case 4: { - message.etag = reader.string(); - break; - } - case 5: { - message.validateOnly = reader.bool(); - break; - } - case 6: { - message.allowMissing = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteBackupVaultRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteBackupVaultRequest.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"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - if (typeof message.allowMissing !== "boolean") - return "allowMissing: boolean expected"; - return null; - }; - - /** - * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest - */ - DeleteBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest(); - 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); - if (object.etag != null) - message.etag = String(object.etag); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); - return message; - }; - - /** - * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.DeleteBackupVaultRequest} message DeleteBackupVaultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteBackupVaultRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.requestId = ""; - object.force = false; - object.etag = ""; - object.validateOnly = false; - object.allowMissing = 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; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; - return object; - }; - - /** - * Converts this DeleteBackupVaultRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteBackupVaultRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteBackupVaultRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupVaultRequest"; - }; - - return DeleteBackupVaultRequest; - })(); - - v1.ListDataSourcesRequest = (function() { - - /** - * Properties of a ListDataSourcesRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListDataSourcesRequest - * @property {string|null} [parent] ListDataSourcesRequest parent - * @property {number|null} [pageSize] ListDataSourcesRequest pageSize - * @property {string|null} [pageToken] ListDataSourcesRequest pageToken - * @property {string|null} [filter] ListDataSourcesRequest filter - * @property {string|null} [orderBy] ListDataSourcesRequest orderBy - */ - - /** - * Constructs a new ListDataSourcesRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListDataSourcesRequest. - * @implements IListDataSourcesRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest=} [properties] Properties to set - */ - function ListDataSourcesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDataSourcesRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @instance - */ - ListDataSourcesRequest.prototype.parent = ""; - - /** - * ListDataSourcesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @instance - */ - ListDataSourcesRequest.prototype.pageSize = 0; - - /** - * ListDataSourcesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @instance - */ - ListDataSourcesRequest.prototype.pageToken = ""; - - /** - * ListDataSourcesRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @instance - */ - ListDataSourcesRequest.prototype.filter = ""; - - /** - * ListDataSourcesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @instance - */ - ListDataSourcesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListDataSourcesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest instance - */ - ListDataSourcesRequest.create = function create(properties) { - return new ListDataSourcesRequest(properties); - }; - - /** - * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataSourcesRequest.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 ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataSourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDataSourcesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataSourcesRequest.decode = function 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.backupdr.v1.ListDataSourcesRequest(); - 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 ListDataSourcesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataSourcesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDataSourcesRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDataSourcesRequest.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 ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest - */ - ListDataSourcesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.ListDataSourcesRequest(); - 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 ListDataSourcesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {google.cloud.backupdr.v1.ListDataSourcesRequest} message ListDataSourcesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDataSourcesRequest.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 ListDataSourcesRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @instance - * @returns {Object.} JSON object - */ - ListDataSourcesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDataSourcesRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDataSourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourcesRequest"; - }; - - return ListDataSourcesRequest; - })(); - - v1.ListDataSourcesResponse = (function() { - - /** - * Properties of a ListDataSourcesResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IListDataSourcesResponse - * @property {Array.|null} [dataSources] ListDataSourcesResponse dataSources - * @property {string|null} [nextPageToken] ListDataSourcesResponse nextPageToken - * @property {Array.|null} [unreachable] ListDataSourcesResponse unreachable - */ - - /** - * Constructs a new ListDataSourcesResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListDataSourcesResponse. - * @implements IListDataSourcesResponse - * @constructor - * @param {google.cloud.backupdr.v1.IListDataSourcesResponse=} [properties] Properties to set - */ - function ListDataSourcesResponse(properties) { - this.dataSources = []; - 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]]; - } - - /** - * ListDataSourcesResponse dataSources. - * @member {Array.} dataSources - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @instance - */ - ListDataSourcesResponse.prototype.dataSources = $util.emptyArray; - - /** - * ListDataSourcesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @instance - */ - ListDataSourcesResponse.prototype.nextPageToken = ""; - - /** - * ListDataSourcesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @instance - */ - ListDataSourcesResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListDataSourcesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse instance - */ - ListDataSourcesResponse.create = function create(properties) { - return new ListDataSourcesResponse(properties); - }; - - /** - * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataSourcesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataSources != null && message.dataSources.length) - for (var i = 0; i < message.dataSources.length; ++i) - $root.google.cloud.backupdr.v1.DataSource.encode(message.dataSources[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 ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataSourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDataSourcesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataSourcesResponse.decode = function 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.backupdr.v1.ListDataSourcesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.dataSources && message.dataSources.length)) - message.dataSources = []; - message.dataSources.push($root.google.cloud.backupdr.v1.DataSource.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 ListDataSourcesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataSourcesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDataSourcesResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDataSourcesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataSources != null && message.hasOwnProperty("dataSources")) { - if (!Array.isArray(message.dataSources)) - return "dataSources: array expected"; - for (var i = 0; i < message.dataSources.length; ++i) { - var error = $root.google.cloud.backupdr.v1.DataSource.verify(message.dataSources[i]); - if (error) - return "dataSources." + 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 ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse - */ - ListDataSourcesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListDataSourcesResponse(); - if (object.dataSources) { - if (!Array.isArray(object.dataSources)) - throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.dataSources: array expected"); - message.dataSources = []; - for (var i = 0; i < object.dataSources.length; ++i) { - if (typeof object.dataSources[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.dataSources: object expected"); - message.dataSources[i] = $root.google.cloud.backupdr.v1.DataSource.fromObject(object.dataSources[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.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 ListDataSourcesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {google.cloud.backupdr.v1.ListDataSourcesResponse} message ListDataSourcesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDataSourcesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dataSources = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.dataSources && message.dataSources.length) { - object.dataSources = []; - for (var j = 0; j < message.dataSources.length; ++j) - object.dataSources[j] = $root.google.cloud.backupdr.v1.DataSource.toObject(message.dataSources[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 ListDataSourcesResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @instance - * @returns {Object.} JSON object - */ - ListDataSourcesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDataSourcesResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDataSourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourcesResponse"; - }; - - return ListDataSourcesResponse; - })(); - - v1.GetDataSourceRequest = (function() { - - /** - * Properties of a GetDataSourceRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetDataSourceRequest - * @property {string|null} [name] GetDataSourceRequest name - */ - - /** - * Constructs a new GetDataSourceRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetDataSourceRequest. - * @implements IGetDataSourceRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest=} [properties] Properties to set - */ - function GetDataSourceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetDataSourceRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @instance - */ - GetDataSourceRequest.prototype.name = ""; - - /** - * Creates a new GetDataSourceRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest instance - */ - GetDataSourceRequest.create = function create(properties) { - return new GetDataSourceRequest(properties); - }; - - /** - * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDataSourceRequest.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 GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetDataSourceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDataSourceRequest.decode = function 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.backupdr.v1.GetDataSourceRequest(); - 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 GetDataSourceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetDataSourceRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetDataSourceRequest.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 GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest - */ - GetDataSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetDataSourceRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.GetDataSourceRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.GetDataSourceRequest} message GetDataSourceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetDataSourceRequest.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 GetDataSourceRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @instance - * @returns {Object.} JSON object - */ - GetDataSourceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetDataSourceRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetDataSourceRequest"; - }; - - return GetDataSourceRequest; - })(); - - v1.UpdateDataSourceRequest = (function() { - - /** - * Properties of an UpdateDataSourceRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IUpdateDataSourceRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataSourceRequest updateMask - * @property {google.cloud.backupdr.v1.IDataSource|null} [dataSource] UpdateDataSourceRequest dataSource - * @property {string|null} [requestId] UpdateDataSourceRequest requestId - * @property {boolean|null} [allowMissing] UpdateDataSourceRequest allowMissing - */ - - /** - * Constructs a new UpdateDataSourceRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an UpdateDataSourceRequest. - * @implements IUpdateDataSourceRequest - * @constructor - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest=} [properties] Properties to set - */ - function UpdateDataSourceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateDataSourceRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @instance - */ - UpdateDataSourceRequest.prototype.updateMask = null; - - /** - * UpdateDataSourceRequest dataSource. - * @member {google.cloud.backupdr.v1.IDataSource|null|undefined} dataSource - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @instance - */ - UpdateDataSourceRequest.prototype.dataSource = null; - - /** - * UpdateDataSourceRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @instance - */ - UpdateDataSourceRequest.prototype.requestId = ""; - - /** - * UpdateDataSourceRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @instance - */ - UpdateDataSourceRequest.prototype.allowMissing = false; - - /** - * Creates a new UpdateDataSourceRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest instance - */ - UpdateDataSourceRequest.create = function create(properties) { - return new UpdateDataSourceRequest(properties); - }; - - /** - * Encodes the specified UpdateDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} message UpdateDataSourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDataSourceRequest.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.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - $root.google.cloud.backupdr.v1.DataSource.encode(message.dataSource, 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.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowMissing); - return writer; - }; - - /** - * Encodes the specified UpdateDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} message UpdateDataSourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateDataSourceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDataSourceRequest.decode = function 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.backupdr.v1.UpdateDataSourceRequest(); - 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.dataSource = $root.google.cloud.backupdr.v1.DataSource.decode(reader, reader.uint32()); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - case 4: { - message.allowMissing = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateDataSourceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateDataSourceRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateDataSourceRequest.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.dataSource != null && message.hasOwnProperty("dataSource")) { - var error = $root.google.cloud.backupdr.v1.DataSource.verify(message.dataSource); - if (error) - return "dataSource." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - if (typeof message.allowMissing !== "boolean") - return "allowMissing: boolean expected"; - return null; - }; - - /** - * Creates an UpdateDataSourceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest - */ - UpdateDataSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.UpdateDataSourceRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.UpdateDataSourceRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateDataSourceRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.dataSource != null) { - if (typeof object.dataSource !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateDataSourceRequest.dataSource: object expected"); - message.dataSource = $root.google.cloud.backupdr.v1.DataSource.fromObject(object.dataSource); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); - return message; - }; - - /** - * Creates a plain object from an UpdateDataSourceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.UpdateDataSourceRequest} message UpdateDataSourceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateDataSourceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.dataSource = null; - object.requestId = ""; - object.allowMissing = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = $root.google.cloud.backupdr.v1.DataSource.toObject(message.dataSource, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; - return object; - }; - - /** - * Converts this UpdateDataSourceRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateDataSourceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateDataSourceRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateDataSourceRequest"; - }; - - return UpdateDataSourceRequest; - })(); - - v1.RemoveDataSourceRequest = (function() { - - /** - * Properties of a RemoveDataSourceRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IRemoveDataSourceRequest - * @property {string|null} [name] RemoveDataSourceRequest name - * @property {string|null} [requestId] RemoveDataSourceRequest requestId - */ - - /** - * Constructs a new RemoveDataSourceRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a RemoveDataSourceRequest. - * @implements IRemoveDataSourceRequest - * @constructor - * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest=} [properties] Properties to set - */ - function RemoveDataSourceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RemoveDataSourceRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @instance - */ - RemoveDataSourceRequest.prototype.name = ""; - - /** - * RemoveDataSourceRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @instance - */ - RemoveDataSourceRequest.prototype.requestId = ""; - - /** - * Creates a new RemoveDataSourceRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest instance - */ - RemoveDataSourceRequest.create = function create(properties) { - return new RemoveDataSourceRequest(properties); - }; - - /** - * Encodes the specified RemoveDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} message RemoveDataSourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemoveDataSourceRequest.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 RemoveDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} message RemoveDataSourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemoveDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RemoveDataSourceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemoveDataSourceRequest.decode = function 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.backupdr.v1.RemoveDataSourceRequest(); - 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 RemoveDataSourceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemoveDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RemoveDataSourceRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RemoveDataSourceRequest.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 RemoveDataSourceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest - */ - RemoveDataSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.RemoveDataSourceRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.RemoveDataSourceRequest(); - 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 RemoveDataSourceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.RemoveDataSourceRequest} message RemoveDataSourceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RemoveDataSourceRequest.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 RemoveDataSourceRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @instance - * @returns {Object.} JSON object - */ - RemoveDataSourceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RemoveDataSourceRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RemoveDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.RemoveDataSourceRequest"; - }; - - return RemoveDataSourceRequest; - })(); - - v1.SetInternalStatusRequest = (function() { - - /** - * Properties of a SetInternalStatusRequest. - * @memberof google.cloud.backupdr.v1 - * @interface ISetInternalStatusRequest - * @property {string|null} [dataSource] SetInternalStatusRequest dataSource - * @property {Uint8Array|null} [value] SetInternalStatusRequest value - * @property {google.cloud.backupdr.v1.BackupConfigState|null} [backupConfigState] SetInternalStatusRequest backupConfigState - * @property {string|null} [requestId] SetInternalStatusRequest requestId - */ - - /** - * Constructs a new SetInternalStatusRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a SetInternalStatusRequest. - * @implements ISetInternalStatusRequest - * @constructor - * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest=} [properties] Properties to set - */ - function SetInternalStatusRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetInternalStatusRequest dataSource. - * @member {string} dataSource - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @instance - */ - SetInternalStatusRequest.prototype.dataSource = ""; - - /** - * SetInternalStatusRequest value. - * @member {Uint8Array} value - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @instance - */ - SetInternalStatusRequest.prototype.value = $util.newBuffer([]); - - /** - * SetInternalStatusRequest backupConfigState. - * @member {google.cloud.backupdr.v1.BackupConfigState} backupConfigState - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @instance - */ - SetInternalStatusRequest.prototype.backupConfigState = 0; - - /** - * SetInternalStatusRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @instance - */ - SetInternalStatusRequest.prototype.requestId = ""; - - /** - * Creates a new SetInternalStatusRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest instance - */ - SetInternalStatusRequest.create = function create(properties) { - return new SetInternalStatusRequest(properties); - }; - - /** - * Encodes the specified SetInternalStatusRequest message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} message SetInternalStatusRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetInternalStatusRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - if (message.backupConfigState != null && Object.hasOwnProperty.call(message, "backupConfigState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.backupConfigState); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified SetInternalStatusRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} message SetInternalStatusRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetInternalStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetInternalStatusRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetInternalStatusRequest.decode = function 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.backupdr.v1.SetInternalStatusRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataSource = reader.string(); - break; - } - case 2: { - message.value = reader.bytes(); - break; - } - case 3: { - message.backupConfigState = reader.int32(); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetInternalStatusRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetInternalStatusRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetInternalStatusRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetInternalStatusRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: 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"; - if (message.backupConfigState != null && message.hasOwnProperty("backupConfigState")) - switch (message.backupConfigState) { - default: - return "backupConfigState: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a SetInternalStatusRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest - */ - SetInternalStatusRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.SetInternalStatusRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.SetInternalStatusRequest(); - if (object.dataSource != null) - message.dataSource = String(object.dataSource); - 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; - switch (object.backupConfigState) { - default: - if (typeof object.backupConfigState === "number") { - message.backupConfigState = object.backupConfigState; - break; - } - break; - case "BACKUP_CONFIG_STATE_UNSPECIFIED": - case 0: - message.backupConfigState = 0; - break; - case "ACTIVE": - case 1: - message.backupConfigState = 1; - break; - case "PASSIVE": - case 2: - message.backupConfigState = 2; - break; - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a SetInternalStatusRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {google.cloud.backupdr.v1.SetInternalStatusRequest} message SetInternalStatusRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetInternalStatusRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dataSource = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - object.backupConfigState = options.enums === String ? "BACKUP_CONFIG_STATE_UNSPECIFIED" : 0; - object.requestId = ""; - } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; - 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; - if (message.backupConfigState != null && message.hasOwnProperty("backupConfigState")) - object.backupConfigState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigState[message.backupConfigState] === undefined ? message.backupConfigState : $root.google.cloud.backupdr.v1.BackupConfigState[message.backupConfigState] : message.backupConfigState; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this SetInternalStatusRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @instance - * @returns {Object.} JSON object - */ - SetInternalStatusRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetInternalStatusRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetInternalStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.SetInternalStatusRequest"; - }; - - return SetInternalStatusRequest; - })(); - - v1.SetInternalStatusResponse = (function() { - - /** - * Properties of a SetInternalStatusResponse. - * @memberof google.cloud.backupdr.v1 - * @interface ISetInternalStatusResponse - */ - - /** - * Constructs a new SetInternalStatusResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a SetInternalStatusResponse. - * @implements ISetInternalStatusResponse - * @constructor - * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse=} [properties] Properties to set - */ - function SetInternalStatusResponse(properties) { - if (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 SetInternalStatusResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @static - * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse instance - */ - SetInternalStatusResponse.create = function create(properties) { - return new SetInternalStatusResponse(properties); - }; - - /** - * Encodes the specified SetInternalStatusResponse message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @static - * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse} message SetInternalStatusResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetInternalStatusResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified SetInternalStatusResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @static - * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse} message SetInternalStatusResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetInternalStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetInternalStatusResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetInternalStatusResponse.decode = function 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.backupdr.v1.SetInternalStatusResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetInternalStatusResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetInternalStatusResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetInternalStatusResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetInternalStatusResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a SetInternalStatusResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse - */ - SetInternalStatusResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.SetInternalStatusResponse) - return object; - return new $root.google.cloud.backupdr.v1.SetInternalStatusResponse(); - }; - - /** - * Creates a plain object from a SetInternalStatusResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @static - * @param {google.cloud.backupdr.v1.SetInternalStatusResponse} message SetInternalStatusResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetInternalStatusResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this SetInternalStatusResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @instance - * @returns {Object.} JSON object - */ - SetInternalStatusResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetInternalStatusResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetInternalStatusResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.SetInternalStatusResponse"; - }; - - return SetInternalStatusResponse; - })(); - - v1.InitiateBackupRequest = (function() { - - /** - * Properties of an InitiateBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IInitiateBackupRequest - * @property {string|null} [dataSource] InitiateBackupRequest dataSource - * @property {string|null} [requestId] InitiateBackupRequest requestId - * @property {string|null} [backupId] InitiateBackupRequest backupId - */ - - /** - * Constructs a new InitiateBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an InitiateBackupRequest. - * @implements IInitiateBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IInitiateBackupRequest=} [properties] Properties to set - */ - function InitiateBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InitiateBackupRequest dataSource. - * @member {string} dataSource - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @instance - */ - InitiateBackupRequest.prototype.dataSource = ""; - - /** - * InitiateBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @instance - */ - InitiateBackupRequest.prototype.requestId = ""; - - /** - * InitiateBackupRequest backupId. - * @member {string} backupId - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @instance - */ - InitiateBackupRequest.prototype.backupId = ""; - - /** - * Creates a new InitiateBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IInitiateBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest instance - */ - InitiateBackupRequest.create = function create(properties) { - return new InitiateBackupRequest(properties); - }; - - /** - * Encodes the specified InitiateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} message InitiateBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitiateBackupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.backupId); - return writer; - }; - - /** - * Encodes the specified InitiateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} message InitiateBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitiateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InitiateBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitiateBackupRequest.decode = function 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.backupdr.v1.InitiateBackupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataSource = reader.string(); - break; - } - case 2: { - message.requestId = reader.string(); - break; - } - case 5: { - message.backupId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InitiateBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitiateBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InitiateBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InitiateBackupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.backupId != null && message.hasOwnProperty("backupId")) - if (!$util.isString(message.backupId)) - return "backupId: string expected"; - return null; - }; - - /** - * Creates an InitiateBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest - */ - InitiateBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.InitiateBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.InitiateBackupRequest(); - if (object.dataSource != null) - message.dataSource = String(object.dataSource); - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.backupId != null) - message.backupId = String(object.backupId); - return message; - }; - - /** - * Creates a plain object from an InitiateBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.InitiateBackupRequest} message InitiateBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InitiateBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dataSource = ""; - object.requestId = ""; - object.backupId = ""; - } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.backupId != null && message.hasOwnProperty("backupId")) - object.backupId = message.backupId; - return object; - }; - - /** - * Converts this InitiateBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @instance - * @returns {Object.} JSON object - */ - InitiateBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InitiateBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InitiateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.InitiateBackupRequest"; - }; - - return InitiateBackupRequest; - })(); - - v1.InitiateBackupResponse = (function() { - - /** - * Properties of an InitiateBackupResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IInitiateBackupResponse - * @property {string|null} [backup] InitiateBackupResponse backup - * @property {number|null} [newBackupGenerationId] InitiateBackupResponse newBackupGenerationId - * @property {number|null} [baseBackupGenerationId] InitiateBackupResponse baseBackupGenerationId - */ - - /** - * Constructs a new InitiateBackupResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an InitiateBackupResponse. - * @implements IInitiateBackupResponse - * @constructor - * @param {google.cloud.backupdr.v1.IInitiateBackupResponse=} [properties] Properties to set - */ - function InitiateBackupResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InitiateBackupResponse backup. - * @member {string} backup - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @instance - */ - InitiateBackupResponse.prototype.backup = ""; - - /** - * InitiateBackupResponse newBackupGenerationId. - * @member {number} newBackupGenerationId - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @instance - */ - InitiateBackupResponse.prototype.newBackupGenerationId = 0; - - /** - * InitiateBackupResponse baseBackupGenerationId. - * @member {number} baseBackupGenerationId - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @instance - */ - InitiateBackupResponse.prototype.baseBackupGenerationId = 0; - - /** - * Creates a new InitiateBackupResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @static - * @param {google.cloud.backupdr.v1.IInitiateBackupResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse instance - */ - InitiateBackupResponse.create = function create(properties) { - return new InitiateBackupResponse(properties); - }; - - /** - * Encodes the specified InitiateBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @static - * @param {google.cloud.backupdr.v1.IInitiateBackupResponse} message InitiateBackupResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitiateBackupResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.backup); - if (message.newBackupGenerationId != null && Object.hasOwnProperty.call(message, "newBackupGenerationId")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.newBackupGenerationId); - if (message.baseBackupGenerationId != null && Object.hasOwnProperty.call(message, "baseBackupGenerationId")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.baseBackupGenerationId); - return writer; - }; - - /** - * Encodes the specified InitiateBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @static - * @param {google.cloud.backupdr.v1.IInitiateBackupResponse} message InitiateBackupResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitiateBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InitiateBackupResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitiateBackupResponse.decode = function 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.backupdr.v1.InitiateBackupResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.backup = reader.string(); - break; - } - case 2: { - message.newBackupGenerationId = reader.int32(); - break; - } - case 3: { - message.baseBackupGenerationId = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InitiateBackupResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitiateBackupResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InitiateBackupResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InitiateBackupResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backup != null && message.hasOwnProperty("backup")) - if (!$util.isString(message.backup)) - return "backup: string expected"; - if (message.newBackupGenerationId != null && message.hasOwnProperty("newBackupGenerationId")) - if (!$util.isInteger(message.newBackupGenerationId)) - return "newBackupGenerationId: integer expected"; - if (message.baseBackupGenerationId != null && message.hasOwnProperty("baseBackupGenerationId")) - if (!$util.isInteger(message.baseBackupGenerationId)) - return "baseBackupGenerationId: integer expected"; - return null; - }; - - /** - * Creates an InitiateBackupResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse - */ - InitiateBackupResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.InitiateBackupResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.InitiateBackupResponse(); - if (object.backup != null) - message.backup = String(object.backup); - if (object.newBackupGenerationId != null) - message.newBackupGenerationId = object.newBackupGenerationId | 0; - if (object.baseBackupGenerationId != null) - message.baseBackupGenerationId = object.baseBackupGenerationId | 0; - return message; - }; - - /** - * Creates a plain object from an InitiateBackupResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @static - * @param {google.cloud.backupdr.v1.InitiateBackupResponse} message InitiateBackupResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InitiateBackupResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.backup = ""; - object.newBackupGenerationId = 0; - object.baseBackupGenerationId = 0; - } - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = message.backup; - if (message.newBackupGenerationId != null && message.hasOwnProperty("newBackupGenerationId")) - object.newBackupGenerationId = message.newBackupGenerationId; - if (message.baseBackupGenerationId != null && message.hasOwnProperty("baseBackupGenerationId")) - object.baseBackupGenerationId = message.baseBackupGenerationId; - return object; - }; - - /** - * Converts this InitiateBackupResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @instance - * @returns {Object.} JSON object - */ - InitiateBackupResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InitiateBackupResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InitiateBackupResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.InitiateBackupResponse"; - }; - - return InitiateBackupResponse; - })(); - - v1.AbandonBackupRequest = (function() { - - /** - * Properties of an AbandonBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IAbandonBackupRequest - * @property {string|null} [dataSource] AbandonBackupRequest dataSource - * @property {string|null} [requestId] AbandonBackupRequest requestId - */ - - /** - * Constructs a new AbandonBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AbandonBackupRequest. - * @implements IAbandonBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IAbandonBackupRequest=} [properties] Properties to set - */ - function AbandonBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AbandonBackupRequest dataSource. - * @member {string} dataSource - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @instance - */ - AbandonBackupRequest.prototype.dataSource = ""; - - /** - * AbandonBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @instance - */ - AbandonBackupRequest.prototype.requestId = ""; - - /** - * Creates a new AbandonBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IAbandonBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest instance - */ - AbandonBackupRequest.create = function create(properties) { - return new AbandonBackupRequest(properties); - }; - - /** - * Encodes the specified AbandonBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} message AbandonBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AbandonBackupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified AbandonBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} message AbandonBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AbandonBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AbandonBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AbandonBackupRequest.decode = function 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.backupdr.v1.AbandonBackupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataSource = reader.string(); - break; - } - case 2: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AbandonBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AbandonBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AbandonBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AbandonBackupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates an AbandonBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest - */ - AbandonBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AbandonBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.AbandonBackupRequest(); - if (object.dataSource != null) - message.dataSource = String(object.dataSource); - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from an AbandonBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {google.cloud.backupdr.v1.AbandonBackupRequest} message AbandonBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AbandonBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dataSource = ""; - object.requestId = ""; - } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this AbandonBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @instance - * @returns {Object.} JSON object - */ - AbandonBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AbandonBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AbandonBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AbandonBackupRequest"; - }; - - return AbandonBackupRequest; - })(); - - v1.FinalizeBackupRequest = (function() { - - /** - * Properties of a FinalizeBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IFinalizeBackupRequest - * @property {string|null} [dataSource] FinalizeBackupRequest dataSource - * @property {string|null} [description] FinalizeBackupRequest description - * @property {google.protobuf.ITimestamp|null} [consistencyTime] FinalizeBackupRequest consistencyTime - * @property {string|null} [requestId] FinalizeBackupRequest requestId - * @property {string|null} [backupId] FinalizeBackupRequest backupId - * @property {google.protobuf.ITimestamp|null} [recoveryRangeStartTime] FinalizeBackupRequest recoveryRangeStartTime - * @property {google.protobuf.ITimestamp|null} [recoveryRangeEndTime] FinalizeBackupRequest recoveryRangeEndTime - * @property {google.protobuf.IDuration|null} [retentionDuration] FinalizeBackupRequest retentionDuration - */ - - /** - * Constructs a new FinalizeBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FinalizeBackupRequest. - * @implements IFinalizeBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest=} [properties] Properties to set - */ - function FinalizeBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FinalizeBackupRequest dataSource. - * @member {string} dataSource - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.dataSource = ""; - - /** - * FinalizeBackupRequest description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.description = null; - - /** - * FinalizeBackupRequest consistencyTime. - * @member {google.protobuf.ITimestamp|null|undefined} consistencyTime - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.consistencyTime = null; - - /** - * FinalizeBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.requestId = ""; - - /** - * FinalizeBackupRequest backupId. - * @member {string} backupId - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.backupId = ""; - - /** - * FinalizeBackupRequest recoveryRangeStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeStartTime - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.recoveryRangeStartTime = null; - - /** - * FinalizeBackupRequest recoveryRangeEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeEndTime - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.recoveryRangeEndTime = null; - - /** - * FinalizeBackupRequest retentionDuration. - * @member {google.protobuf.IDuration|null|undefined} retentionDuration - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.retentionDuration = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FinalizeBackupRequest _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - Object.defineProperty(FinalizeBackupRequest.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FinalizeBackupRequest _consistencyTime. - * @member {"consistencyTime"|undefined} _consistencyTime - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - Object.defineProperty(FinalizeBackupRequest.prototype, "_consistencyTime", { - get: $util.oneOfGetter($oneOfFields = ["consistencyTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FinalizeBackupRequest _recoveryRangeStartTime. - * @member {"recoveryRangeStartTime"|undefined} _recoveryRangeStartTime - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - Object.defineProperty(FinalizeBackupRequest.prototype, "_recoveryRangeStartTime", { - get: $util.oneOfGetter($oneOfFields = ["recoveryRangeStartTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FinalizeBackupRequest _recoveryRangeEndTime. - * @member {"recoveryRangeEndTime"|undefined} _recoveryRangeEndTime - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - Object.defineProperty(FinalizeBackupRequest.prototype, "_recoveryRangeEndTime", { - get: $util.oneOfGetter($oneOfFields = ["recoveryRangeEndTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FinalizeBackupRequest _retentionDuration. - * @member {"retentionDuration"|undefined} _retentionDuration - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - Object.defineProperty(FinalizeBackupRequest.prototype, "_retentionDuration", { - get: $util.oneOfGetter($oneOfFields = ["retentionDuration"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FinalizeBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest instance - */ - FinalizeBackupRequest.create = function create(properties) { - return new FinalizeBackupRequest(properties); - }; - - /** - * Encodes the specified FinalizeBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} message FinalizeBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FinalizeBackupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.consistencyTime != null && Object.hasOwnProperty.call(message, "consistencyTime")) - $root.google.protobuf.Timestamp.encode(message.consistencyTime, 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.backupId != null && Object.hasOwnProperty.call(message, "backupId")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.backupId); - if (message.recoveryRangeStartTime != null && Object.hasOwnProperty.call(message, "recoveryRangeStartTime")) - $root.google.protobuf.Timestamp.encode(message.recoveryRangeStartTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.recoveryRangeEndTime != null && Object.hasOwnProperty.call(message, "recoveryRangeEndTime")) - $root.google.protobuf.Timestamp.encode(message.recoveryRangeEndTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.retentionDuration != null && Object.hasOwnProperty.call(message, "retentionDuration")) - $root.google.protobuf.Duration.encode(message.retentionDuration, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FinalizeBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} message FinalizeBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FinalizeBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FinalizeBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FinalizeBackupRequest.decode = function 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.backupdr.v1.FinalizeBackupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataSource = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.consistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - case 5: { - message.backupId = reader.string(); - break; - } - case 6: { - message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.retentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FinalizeBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FinalizeBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FinalizeBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FinalizeBackupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: string expected"; - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { - properties._consistencyTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.consistencyTime); - if (error) - return "consistencyTime." + error; - } - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.backupId != null && message.hasOwnProperty("backupId")) - if (!$util.isString(message.backupId)) - return "backupId: string expected"; - if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { - properties._recoveryRangeStartTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeStartTime); - if (error) - return "recoveryRangeStartTime." + error; - } - } - if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { - properties._recoveryRangeEndTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeEndTime); - if (error) - return "recoveryRangeEndTime." + error; - } - } - if (message.retentionDuration != null && message.hasOwnProperty("retentionDuration")) { - properties._retentionDuration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.retentionDuration); - if (error) - return "retentionDuration." + error; - } - } - return null; - }; - - /** - * Creates a FinalizeBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest - */ - FinalizeBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FinalizeBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.FinalizeBackupRequest(); - if (object.dataSource != null) - message.dataSource = String(object.dataSource); - if (object.description != null) - message.description = String(object.description); - if (object.consistencyTime != null) { - if (typeof object.consistencyTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.consistencyTime: object expected"); - message.consistencyTime = $root.google.protobuf.Timestamp.fromObject(object.consistencyTime); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.backupId != null) - message.backupId = String(object.backupId); - if (object.recoveryRangeStartTime != null) { - if (typeof object.recoveryRangeStartTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.recoveryRangeStartTime: object expected"); - message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeStartTime); - } - if (object.recoveryRangeEndTime != null) { - if (typeof object.recoveryRangeEndTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.recoveryRangeEndTime: object expected"); - message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeEndTime); - } - if (object.retentionDuration != null) { - if (typeof object.retentionDuration !== "object") - throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.retentionDuration: object expected"); - message.retentionDuration = $root.google.protobuf.Duration.fromObject(object.retentionDuration); - } - return message; - }; - - /** - * Creates a plain object from a FinalizeBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @static - * @param {google.cloud.backupdr.v1.FinalizeBackupRequest} message FinalizeBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FinalizeBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dataSource = ""; - object.requestId = ""; - object.backupId = ""; - } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { - object.consistencyTime = $root.google.protobuf.Timestamp.toObject(message.consistencyTime, options); - if (options.oneofs) - object._consistencyTime = "consistencyTime"; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.backupId != null && message.hasOwnProperty("backupId")) - object.backupId = message.backupId; - if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { - object.recoveryRangeStartTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeStartTime, options); - if (options.oneofs) - object._recoveryRangeStartTime = "recoveryRangeStartTime"; - } - if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { - object.recoveryRangeEndTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeEndTime, options); - if (options.oneofs) - object._recoveryRangeEndTime = "recoveryRangeEndTime"; - } - if (message.retentionDuration != null && message.hasOwnProperty("retentionDuration")) { - object.retentionDuration = $root.google.protobuf.Duration.toObject(message.retentionDuration, options); - if (options.oneofs) - object._retentionDuration = "retentionDuration"; - } - return object; - }; - - /** - * Converts this FinalizeBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - * @returns {Object.} JSON object - */ - FinalizeBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FinalizeBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FinalizeBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FinalizeBackupRequest"; - }; - - return FinalizeBackupRequest; - })(); - - v1.FetchAccessTokenRequest = (function() { - - /** - * Properties of a FetchAccessTokenRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IFetchAccessTokenRequest - * @property {string|null} [name] FetchAccessTokenRequest name - * @property {number|null} [generationId] FetchAccessTokenRequest generationId - */ - - /** - * Constructs a new FetchAccessTokenRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FetchAccessTokenRequest. - * @implements IFetchAccessTokenRequest - * @constructor - * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest=} [properties] Properties to set - */ - function FetchAccessTokenRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FetchAccessTokenRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @instance - */ - FetchAccessTokenRequest.prototype.name = ""; - - /** - * FetchAccessTokenRequest generationId. - * @member {number} generationId - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @instance - */ - FetchAccessTokenRequest.prototype.generationId = 0; - - /** - * Creates a new FetchAccessTokenRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @static - * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest instance - */ - FetchAccessTokenRequest.create = function create(properties) { - return new FetchAccessTokenRequest(properties); - }; - - /** - * Encodes the specified FetchAccessTokenRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @static - * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} message FetchAccessTokenRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchAccessTokenRequest.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.generationId != null && Object.hasOwnProperty.call(message, "generationId")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.generationId); - return writer; - }; - - /** - * Encodes the specified FetchAccessTokenRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @static - * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} message FetchAccessTokenRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchAccessTokenRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchAccessTokenRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchAccessTokenRequest.decode = function 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.backupdr.v1.FetchAccessTokenRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.generationId = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FetchAccessTokenRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchAccessTokenRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchAccessTokenRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchAccessTokenRequest.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.generationId != null && message.hasOwnProperty("generationId")) - if (!$util.isInteger(message.generationId)) - return "generationId: integer expected"; - return null; - }; - - /** - * Creates a FetchAccessTokenRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest - */ - FetchAccessTokenRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FetchAccessTokenRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.FetchAccessTokenRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.generationId != null) - message.generationId = object.generationId | 0; - return message; - }; - - /** - * Creates a plain object from a FetchAccessTokenRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @static - * @param {google.cloud.backupdr.v1.FetchAccessTokenRequest} message FetchAccessTokenRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchAccessTokenRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.generationId = 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.generationId != null && message.hasOwnProperty("generationId")) - object.generationId = message.generationId; - return object; - }; - - /** - * Converts this FetchAccessTokenRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @instance - * @returns {Object.} JSON object - */ - FetchAccessTokenRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchAccessTokenRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchAccessTokenRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchAccessTokenRequest"; - }; - - return FetchAccessTokenRequest; - })(); - - v1.FetchAccessTokenResponse = (function() { - - /** - * Properties of a FetchAccessTokenResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IFetchAccessTokenResponse - * @property {string|null} [readLocation] FetchAccessTokenResponse readLocation - * @property {string|null} [writeLocation] FetchAccessTokenResponse writeLocation - * @property {string|null} [token] FetchAccessTokenResponse token - * @property {google.protobuf.ITimestamp|null} [expireTime] FetchAccessTokenResponse expireTime - */ - - /** - * Constructs a new FetchAccessTokenResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FetchAccessTokenResponse. - * @implements IFetchAccessTokenResponse - * @constructor - * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse=} [properties] Properties to set - */ - function FetchAccessTokenResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FetchAccessTokenResponse readLocation. - * @member {string} readLocation - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @instance - */ - FetchAccessTokenResponse.prototype.readLocation = ""; - - /** - * FetchAccessTokenResponse writeLocation. - * @member {string} writeLocation - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @instance - */ - FetchAccessTokenResponse.prototype.writeLocation = ""; - - /** - * FetchAccessTokenResponse token. - * @member {string} token - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @instance - */ - FetchAccessTokenResponse.prototype.token = ""; - - /** - * FetchAccessTokenResponse expireTime. - * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @instance - */ - FetchAccessTokenResponse.prototype.expireTime = null; - - /** - * Creates a new FetchAccessTokenResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @static - * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse instance - */ - FetchAccessTokenResponse.create = function create(properties) { - return new FetchAccessTokenResponse(properties); - }; - - /** - * Encodes the specified FetchAccessTokenResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @static - * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse} message FetchAccessTokenResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchAccessTokenResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.readLocation != null && Object.hasOwnProperty.call(message, "readLocation")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.readLocation); - if (message.writeLocation != null && Object.hasOwnProperty.call(message, "writeLocation")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.writeLocation); - if (message.token != null && Object.hasOwnProperty.call(message, "token")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.token); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FetchAccessTokenResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @static - * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse} message FetchAccessTokenResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchAccessTokenResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchAccessTokenResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchAccessTokenResponse.decode = function 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.backupdr.v1.FetchAccessTokenResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.readLocation = reader.string(); - break; - } - case 2: { - message.writeLocation = reader.string(); - break; - } - case 3: { - message.token = reader.string(); - break; - } - case 4: { - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FetchAccessTokenResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchAccessTokenResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchAccessTokenResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchAccessTokenResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.readLocation != null && message.hasOwnProperty("readLocation")) - if (!$util.isString(message.readLocation)) - return "readLocation: string expected"; - if (message.writeLocation != null && message.hasOwnProperty("writeLocation")) - if (!$util.isString(message.writeLocation)) - return "writeLocation: string expected"; - if (message.token != null && message.hasOwnProperty("token")) - if (!$util.isString(message.token)) - return "token: string expected"; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); - if (error) - return "expireTime." + error; - } - return null; - }; - - /** - * Creates a FetchAccessTokenResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse - */ - FetchAccessTokenResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FetchAccessTokenResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.FetchAccessTokenResponse(); - if (object.readLocation != null) - message.readLocation = String(object.readLocation); - if (object.writeLocation != null) - message.writeLocation = String(object.writeLocation); - if (object.token != null) - message.token = String(object.token); - if (object.expireTime != null) { - if (typeof object.expireTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.FetchAccessTokenResponse.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); - } - return message; - }; - - /** - * Creates a plain object from a FetchAccessTokenResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @static - * @param {google.cloud.backupdr.v1.FetchAccessTokenResponse} message FetchAccessTokenResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchAccessTokenResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.readLocation = ""; - object.writeLocation = ""; - object.token = ""; - object.expireTime = null; - } - if (message.readLocation != null && message.hasOwnProperty("readLocation")) - object.readLocation = message.readLocation; - if (message.writeLocation != null && message.hasOwnProperty("writeLocation")) - object.writeLocation = message.writeLocation; - if (message.token != null && message.hasOwnProperty("token")) - object.token = message.token; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); - return object; - }; - - /** - * Converts this FetchAccessTokenResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @instance - * @returns {Object.} JSON object - */ - FetchAccessTokenResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchAccessTokenResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchAccessTokenResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchAccessTokenResponse"; - }; - - return FetchAccessTokenResponse; - })(); - - v1.ListBackupsRequest = (function() { - - /** - * Properties of a ListBackupsRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupsRequest - * @property {string|null} [parent] ListBackupsRequest parent - * @property {number|null} [pageSize] ListBackupsRequest pageSize - * @property {string|null} [pageToken] ListBackupsRequest pageToken - * @property {string|null} [filter] ListBackupsRequest filter - * @property {string|null} [orderBy] ListBackupsRequest orderBy - * @property {google.cloud.backupdr.v1.BackupView|null} [view] ListBackupsRequest view - */ - - /** - * Constructs a new ListBackupsRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupsRequest. - * @implements IListBackupsRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set - */ - function ListBackupsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListBackupsRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.parent = ""; - - /** - * ListBackupsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.pageSize = 0; - - /** - * ListBackupsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.pageToken = ""; - - /** - * ListBackupsRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.filter = ""; - - /** - * ListBackupsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.orderBy = ""; - - /** - * ListBackupsRequest view. - * @member {google.cloud.backupdr.v1.BackupView} view - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.view = 0; - - /** - * Creates a new ListBackupsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest instance - */ - ListBackupsRequest.create = function create(properties) { - return new ListBackupsRequest(properties); - }; - - /** - * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupsRequest.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); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); - return writer; - }; - - /** - * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupsRequest.decode = function 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.backupdr.v1.ListBackupsRequest(); - 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; - } - case 6: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupsRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupsRequest.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"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest - */ - ListBackupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupsRequest(); - 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); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "BACKUP_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BACKUP_VIEW_BASIC": - case 1: - message.view = 1; - break; - case "BACKUP_VIEW_FULL": - case 2: - message.view = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {google.cloud.backupdr.v1.ListBackupsRequest} message ListBackupsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; - } - 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; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; - return object; - }; - - /** - * Converts this ListBackupsRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - * @returns {Object.} JSON object - */ - ListBackupsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupsRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsRequest"; - }; - - return ListBackupsRequest; - })(); - - v1.ListBackupsResponse = (function() { - - /** - * Properties of a ListBackupsResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupsResponse - * @property {Array.|null} [backups] ListBackupsResponse backups - * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupsResponse unreachable - */ - - /** - * Constructs a new ListBackupsResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupsResponse. - * @implements IListBackupsResponse - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set - */ - function ListBackupsResponse(properties) { - this.backups = []; - 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]]; - } - - /** - * ListBackupsResponse backups. - * @member {Array.} backups - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @instance - */ - ListBackupsResponse.prototype.backups = $util.emptyArray; - - /** - * ListBackupsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @instance - */ - ListBackupsResponse.prototype.nextPageToken = ""; - - /** - * ListBackupsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @instance - */ - ListBackupsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListBackupsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse instance - */ - ListBackupsResponse.create = function create(properties) { - return new ListBackupsResponse(properties); - }; - - /** - * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backups != null && message.backups.length) - for (var i = 0; i < message.backups.length; ++i) - $root.google.cloud.backupdr.v1.Backup.encode(message.backups[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 ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupsResponse.decode = function 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.backupdr.v1.ListBackupsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.backups && message.backups.length)) - message.backups = []; - message.backups.push($root.google.cloud.backupdr.v1.Backup.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 ListBackupsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupsResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backups != null && message.hasOwnProperty("backups")) { - if (!Array.isArray(message.backups)) - return "backups: array expected"; - for (var i = 0; i < message.backups.length; ++i) { - var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backups[i]); - if (error) - return "backups." + 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 ListBackupsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse - */ - ListBackupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupsResponse(); - if (object.backups) { - if (!Array.isArray(object.backups)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: array expected"); - message.backups = []; - for (var i = 0; i < object.backups.length; ++i) { - if (typeof object.backups[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: object expected"); - message.backups[i] = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backups[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.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 ListBackupsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {google.cloud.backupdr.v1.ListBackupsResponse} message ListBackupsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backups = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backups && message.backups.length) { - object.backups = []; - for (var j = 0; j < message.backups.length; ++j) - object.backups[j] = $root.google.cloud.backupdr.v1.Backup.toObject(message.backups[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 ListBackupsResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @instance - * @returns {Object.} JSON object - */ - ListBackupsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupsResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsResponse"; - }; - - return ListBackupsResponse; - })(); - - v1.GetBackupRequest = (function() { - - /** - * Properties of a GetBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetBackupRequest - * @property {string|null} [name] GetBackupRequest name - * @property {google.cloud.backupdr.v1.BackupView|null} [view] GetBackupRequest view - */ - - /** - * Constructs a new GetBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetBackupRequest. - * @implements IGetBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set - */ - function GetBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetBackupRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @instance - */ - GetBackupRequest.prototype.name = ""; - - /** - * GetBackupRequest view. - * @member {google.cloud.backupdr.v1.BackupView} view - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @instance - */ - GetBackupRequest.prototype.view = 0; - - /** - * Creates a new GetBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest instance - */ - GetBackupRequest.create = function create(properties) { - return new GetBackupRequest(properties); - }; - - /** - * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - return writer; - }; - - /** - * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupRequest.decode = function 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.backupdr.v1.GetBackupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBackupRequest.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.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest - */ - GetBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.GetBackupRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "BACKUP_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BACKUP_VIEW_BASIC": - case 1: - message.view = 1; - break; - case "BACKUP_VIEW_FULL": - case 2: - message.view = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {google.cloud.backupdr.v1.GetBackupRequest} message GetBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; - return object; - }; - - /** - * Converts this GetBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @instance - * @returns {Object.} JSON object - */ - GetBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupRequest"; - }; - - return GetBackupRequest; - })(); - - v1.UpdateBackupRequest = (function() { - - /** - * Properties of an UpdateBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IUpdateBackupRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupRequest updateMask - * @property {google.cloud.backupdr.v1.IBackup|null} [backup] UpdateBackupRequest backup - * @property {string|null} [requestId] UpdateBackupRequest requestId - */ - - /** - * Constructs a new UpdateBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an UpdateBackupRequest. - * @implements IUpdateBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set - */ - function UpdateBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateBackupRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @instance - */ - UpdateBackupRequest.prototype.updateMask = null; - - /** - * UpdateBackupRequest backup. - * @member {google.cloud.backupdr.v1.IBackup|null|undefined} backup - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @instance - */ - UpdateBackupRequest.prototype.backup = null; - - /** - * UpdateBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @instance - */ - UpdateBackupRequest.prototype.requestId = ""; - - /** - * Creates a new UpdateBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest instance - */ - UpdateBackupRequest.create = function create(properties) { - return new UpdateBackupRequest(properties); - }; - - /** - * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBackupRequest.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.backup != null && Object.hasOwnProperty.call(message, "backup")) - $root.google.cloud.backupdr.v1.Backup.encode(message.backup, 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 UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBackupRequest.decode = function 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.backupdr.v1.UpdateBackupRequest(); - 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.backup = $root.google.cloud.backupdr.v1.Backup.decode(reader, reader.uint32()); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateBackupRequest.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.backup != null && message.hasOwnProperty("backup")) { - var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backup); - if (error) - return "backup." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates an UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest - */ - UpdateBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.UpdateBackupRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.backup != null) { - if (typeof object.backup !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.backup: object expected"); - message.backup = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backup); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.UpdateBackupRequest} message UpdateBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.backup = null; - object.requestId = ""; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = $root.google.cloud.backupdr.v1.Backup.toObject(message.backup, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this UpdateBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupRequest"; - }; - - return UpdateBackupRequest; - })(); - - v1.DeleteBackupRequest = (function() { - - /** - * Properties of a DeleteBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IDeleteBackupRequest - * @property {string|null} [name] DeleteBackupRequest name - * @property {string|null} [requestId] DeleteBackupRequest requestId - */ - - /** - * Constructs a new DeleteBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DeleteBackupRequest. - * @implements IDeleteBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set - */ - function DeleteBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteBackupRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @instance - */ - DeleteBackupRequest.prototype.name = ""; - - /** - * DeleteBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @instance - */ - DeleteBackupRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest instance - */ - DeleteBackupRequest.create = function create(properties) { - return new DeleteBackupRequest(properties); - }; - - /** - * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupRequest.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 DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupRequest.decode = function 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.backupdr.v1.DeleteBackupRequest(); - 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 DeleteBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteBackupRequest.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 DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest - */ - DeleteBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.DeleteBackupRequest(); - 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 DeleteBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {google.cloud.backupdr.v1.DeleteBackupRequest} message DeleteBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteBackupRequest.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 DeleteBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupRequest"; - }; - - return DeleteBackupRequest; - })(); - - v1.RestoreBackupRequest = (function() { - - /** - * Properties of a RestoreBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IRestoreBackupRequest - * @property {string|null} [name] RestoreBackupRequest name - * @property {string|null} [requestId] RestoreBackupRequest requestId - * @property {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null} [computeInstanceTargetEnvironment] RestoreBackupRequest computeInstanceTargetEnvironment - * @property {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null} [computeInstanceRestoreProperties] RestoreBackupRequest computeInstanceRestoreProperties - */ - - /** - * Constructs a new RestoreBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a RestoreBackupRequest. - * @implements IRestoreBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set - */ - function RestoreBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RestoreBackupRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.name = ""; - - /** - * RestoreBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.requestId = ""; - - /** - * RestoreBackupRequest computeInstanceTargetEnvironment. - * @member {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null|undefined} computeInstanceTargetEnvironment - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.computeInstanceTargetEnvironment = null; - - /** - * RestoreBackupRequest computeInstanceRestoreProperties. - * @member {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null|undefined} computeInstanceRestoreProperties - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.computeInstanceRestoreProperties = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * RestoreBackupRequest targetEnvironment. - * @member {"computeInstanceTargetEnvironment"|undefined} targetEnvironment - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - Object.defineProperty(RestoreBackupRequest.prototype, "targetEnvironment", { - get: $util.oneOfGetter($oneOfFields = ["computeInstanceTargetEnvironment"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * RestoreBackupRequest instanceProperties. - * @member {"computeInstanceRestoreProperties"|undefined} instanceProperties - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - Object.defineProperty(RestoreBackupRequest.prototype, "instanceProperties", { - get: $util.oneOfGetter($oneOfFields = ["computeInstanceRestoreProperties"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new RestoreBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest instance - */ - RestoreBackupRequest.create = function create(properties) { - return new RestoreBackupRequest(properties); - }; - - /** - * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreBackupRequest.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.computeInstanceTargetEnvironment != null && Object.hasOwnProperty.call(message, "computeInstanceTargetEnvironment")) - $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.encode(message.computeInstanceTargetEnvironment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.computeInstanceRestoreProperties != null && Object.hasOwnProperty.call(message, "computeInstanceRestoreProperties")) - $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.encode(message.computeInstanceRestoreProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RestoreBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreBackupRequest.decode = function 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.backupdr.v1.RestoreBackupRequest(); - 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.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.decode(reader, reader.uint32()); - break; - } - case 4: { - message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RestoreBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RestoreBackupRequest.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.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { - properties.targetEnvironment = 1; - { - var error = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify(message.computeInstanceTargetEnvironment); - if (error) - return "computeInstanceTargetEnvironment." + error; - } - } - if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { - properties.instanceProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify(message.computeInstanceRestoreProperties); - if (error) - return "computeInstanceRestoreProperties." + error; - } - } - return null; - }; - - /** - * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest - */ - RestoreBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.RestoreBackupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.computeInstanceTargetEnvironment != null) { - if (typeof object.computeInstanceTargetEnvironment !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceTargetEnvironment: object expected"); - message.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.fromObject(object.computeInstanceTargetEnvironment); - } - if (object.computeInstanceRestoreProperties != null) { - if (typeof object.computeInstanceRestoreProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceRestoreProperties: object expected"); - message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.fromObject(object.computeInstanceRestoreProperties); - } - return message; - }; - - /** - * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {google.cloud.backupdr.v1.RestoreBackupRequest} message RestoreBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RestoreBackupRequest.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; - if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { - object.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.toObject(message.computeInstanceTargetEnvironment, options); - if (options.oneofs) - object.targetEnvironment = "computeInstanceTargetEnvironment"; - } - if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { - object.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.toObject(message.computeInstanceRestoreProperties, options); - if (options.oneofs) - object.instanceProperties = "computeInstanceRestoreProperties"; - } - return object; - }; - - /** - * Converts this RestoreBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - * @returns {Object.} JSON object - */ - RestoreBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RestoreBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RestoreBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupRequest"; - }; - - return RestoreBackupRequest; - })(); - - v1.RestoreBackupResponse = (function() { - - /** - * Properties of a RestoreBackupResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IRestoreBackupResponse - * @property {google.cloud.backupdr.v1.ITargetResource|null} [targetResource] RestoreBackupResponse targetResource - */ - - /** - * Constructs a new RestoreBackupResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a RestoreBackupResponse. - * @implements IRestoreBackupResponse - * @constructor - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set - */ - function RestoreBackupResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RestoreBackupResponse targetResource. - * @member {google.cloud.backupdr.v1.ITargetResource|null|undefined} targetResource - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @instance - */ - RestoreBackupResponse.prototype.targetResource = null; - - /** - * Creates a new RestoreBackupResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse instance - */ - RestoreBackupResponse.create = function create(properties) { - return new RestoreBackupResponse(properties); - }; - - /** - * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreBackupResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.targetResource != null && Object.hasOwnProperty.call(message, "targetResource")) - $root.google.cloud.backupdr.v1.TargetResource.encode(message.targetResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RestoreBackupResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreBackupResponse.decode = function 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.backupdr.v1.RestoreBackupResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreBackupResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RestoreBackupResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RestoreBackupResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.targetResource != null && message.hasOwnProperty("targetResource")) { - var error = $root.google.cloud.backupdr.v1.TargetResource.verify(message.targetResource); - if (error) - return "targetResource." + error; - } - return null; - }; - - /** - * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse - */ - RestoreBackupResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.RestoreBackupResponse(); - if (object.targetResource != null) { - if (typeof object.targetResource !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupResponse.targetResource: object expected"); - message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.fromObject(object.targetResource); - } - return message; - }; - - /** - * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {google.cloud.backupdr.v1.RestoreBackupResponse} message RestoreBackupResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RestoreBackupResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.targetResource = null; - if (message.targetResource != null && message.hasOwnProperty("targetResource")) - object.targetResource = $root.google.cloud.backupdr.v1.TargetResource.toObject(message.targetResource, options); - return object; - }; - - /** - * Converts this RestoreBackupResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @instance - * @returns {Object.} JSON object - */ - RestoreBackupResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RestoreBackupResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RestoreBackupResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupResponse"; - }; - - return RestoreBackupResponse; - })(); - - v1.TargetResource = (function() { - - /** - * Properties of a TargetResource. - * @memberof google.cloud.backupdr.v1 - * @interface ITargetResource - * @property {google.cloud.backupdr.v1.IGcpResource|null} [gcpResource] TargetResource gcpResource - */ - - /** - * Constructs a new TargetResource. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a TargetResource. - * @implements ITargetResource - * @constructor - * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set - */ - function TargetResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TargetResource gcpResource. - * @member {google.cloud.backupdr.v1.IGcpResource|null|undefined} gcpResource - * @memberof google.cloud.backupdr.v1.TargetResource - * @instance - */ - TargetResource.prototype.gcpResource = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TargetResource targetResourceInfo. - * @member {"gcpResource"|undefined} targetResourceInfo - * @memberof google.cloud.backupdr.v1.TargetResource - * @instance - */ - Object.defineProperty(TargetResource.prototype, "targetResourceInfo", { - get: $util.oneOfGetter($oneOfFields = ["gcpResource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TargetResource instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource instance - */ - TargetResource.create = function create(properties) { - return new TargetResource(properties); - }; - - /** - * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TargetResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcpResource != null && Object.hasOwnProperty.call(message, "gcpResource")) - $root.google.cloud.backupdr.v1.GcpResource.encode(message.gcpResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TargetResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TargetResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetResource.decode = function 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.backupdr.v1.TargetResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TargetResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TargetResource message. - * @function verify - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TargetResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { - properties.targetResourceInfo = 1; - { - var error = $root.google.cloud.backupdr.v1.GcpResource.verify(message.gcpResource); - if (error) - return "gcpResource." + error; - } - } - return null; - }; - - /** - * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource - */ - TargetResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.TargetResource) - return object; - var message = new $root.google.cloud.backupdr.v1.TargetResource(); - if (object.gcpResource != null) { - if (typeof object.gcpResource !== "object") - throw TypeError(".google.cloud.backupdr.v1.TargetResource.gcpResource: object expected"); - message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.fromObject(object.gcpResource); - } - return message; - }; - - /** - * Creates a plain object from a TargetResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {google.cloud.backupdr.v1.TargetResource} message TargetResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TargetResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { - object.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.toObject(message.gcpResource, options); - if (options.oneofs) - object.targetResourceInfo = "gcpResource"; - } - return object; - }; - - /** - * Converts this TargetResource to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.TargetResource - * @instance - * @returns {Object.} JSON object - */ - TargetResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TargetResource - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TargetResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.TargetResource"; - }; - - return TargetResource; - })(); - - v1.GcpResource = (function() { - - /** - * Properties of a GcpResource. - * @memberof google.cloud.backupdr.v1 - * @interface IGcpResource - * @property {string|null} [gcpResourcename] GcpResource gcpResourcename - * @property {string|null} [location] GcpResource location - * @property {string|null} [type] GcpResource type - */ - - /** - * Constructs a new GcpResource. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GcpResource. - * @implements IGcpResource - * @constructor - * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set - */ - function GcpResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcpResource gcpResourcename. - * @member {string} gcpResourcename - * @memberof google.cloud.backupdr.v1.GcpResource - * @instance - */ - GcpResource.prototype.gcpResourcename = ""; - - /** - * GcpResource location. - * @member {string} location - * @memberof google.cloud.backupdr.v1.GcpResource - * @instance - */ - GcpResource.prototype.location = ""; - - /** - * GcpResource type. - * @member {string} type - * @memberof google.cloud.backupdr.v1.GcpResource - * @instance - */ - GcpResource.prototype.type = ""; - - /** - * Creates a new GcpResource instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource instance - */ - GcpResource.create = function create(properties) { - return new GcpResource(properties); - }; - - /** - * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcpResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - return writer; - }; - - /** - * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcpResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcpResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcpResource.decode = function 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.backupdr.v1.GcpResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.gcpResourcename = reader.string(); - break; - } - case 2: { - message.location = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcpResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcpResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcpResource message. - * @function verify - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcpResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - if (!$util.isString(message.gcpResourcename)) - return "gcpResourcename: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - return null; - }; - - /** - * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource - */ - GcpResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GcpResource) - return object; - var message = new $root.google.cloud.backupdr.v1.GcpResource(); - if (object.gcpResourcename != null) - message.gcpResourcename = String(object.gcpResourcename); - if (object.location != null) - message.location = String(object.location); - if (object.type != null) - message.type = String(object.type); - return message; - }; - - /** - * Creates a plain object from a GcpResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {google.cloud.backupdr.v1.GcpResource} message GcpResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcpResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.gcpResourcename = ""; - object.location = ""; - object.type = ""; - } - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - object.gcpResourcename = message.gcpResourcename; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - return object; - }; - - /** - * Converts this GcpResource to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GcpResource - * @instance - * @returns {Object.} JSON object - */ - GcpResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcpResource - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpResource"; - }; - - return GcpResource; - })(); - - /** - * BackupConfigState enum. - * @name google.cloud.backupdr.v1.BackupConfigState - * @enum {number} - * @property {number} BACKUP_CONFIG_STATE_UNSPECIFIED=0 BACKUP_CONFIG_STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} PASSIVE=2 PASSIVE value - */ - v1.BackupConfigState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_CONFIG_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "PASSIVE"] = 2; - return values; - })(); - - /** - * BackupView enum. - * @name google.cloud.backupdr.v1.BackupView - * @enum {number} - * @property {number} BACKUP_VIEW_UNSPECIFIED=0 BACKUP_VIEW_UNSPECIFIED value - * @property {number} BACKUP_VIEW_BASIC=1 BACKUP_VIEW_BASIC value - * @property {number} BACKUP_VIEW_FULL=2 BACKUP_VIEW_FULL value - */ - v1.BackupView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BACKUP_VIEW_BASIC"] = 1; - values[valuesById[2] = "BACKUP_VIEW_FULL"] = 2; - return values; - })(); - - /** - * BackupVaultView enum. - * @name google.cloud.backupdr.v1.BackupVaultView - * @enum {number} - * @property {number} BACKUP_VAULT_VIEW_UNSPECIFIED=0 BACKUP_VAULT_VIEW_UNSPECIFIED value - * @property {number} BACKUP_VAULT_VIEW_BASIC=1 BACKUP_VAULT_VIEW_BASIC value - * @property {number} BACKUP_VAULT_VIEW_FULL=2 BACKUP_VAULT_VIEW_FULL value - */ - v1.BackupVaultView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_VAULT_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BACKUP_VAULT_VIEW_BASIC"] = 1; - values[valuesById[2] = "BACKUP_VAULT_VIEW_FULL"] = 2; - return values; - })(); - - v1.BackupApplianceBackupProperties = (function() { - - /** - * Properties of a BackupApplianceBackupProperties. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupApplianceBackupProperties - * @property {number|null} [generationId] BackupApplianceBackupProperties generationId - * @property {google.protobuf.ITimestamp|null} [finalizeTime] BackupApplianceBackupProperties finalizeTime - * @property {google.protobuf.ITimestamp|null} [recoveryRangeStartTime] BackupApplianceBackupProperties recoveryRangeStartTime - * @property {google.protobuf.ITimestamp|null} [recoveryRangeEndTime] BackupApplianceBackupProperties recoveryRangeEndTime - */ - - /** - * Constructs a new BackupApplianceBackupProperties. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupApplianceBackupProperties. - * @implements IBackupApplianceBackupProperties - * @constructor - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties=} [properties] Properties to set - */ - function BackupApplianceBackupProperties(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupApplianceBackupProperties generationId. - * @member {number|null|undefined} generationId - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - BackupApplianceBackupProperties.prototype.generationId = null; - - /** - * BackupApplianceBackupProperties finalizeTime. - * @member {google.protobuf.ITimestamp|null|undefined} finalizeTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - BackupApplianceBackupProperties.prototype.finalizeTime = null; - - /** - * BackupApplianceBackupProperties recoveryRangeStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeStartTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - BackupApplianceBackupProperties.prototype.recoveryRangeStartTime = null; - - /** - * BackupApplianceBackupProperties recoveryRangeEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeEndTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - BackupApplianceBackupProperties.prototype.recoveryRangeEndTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupApplianceBackupProperties _generationId. - * @member {"generationId"|undefined} _generationId - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - Object.defineProperty(BackupApplianceBackupProperties.prototype, "_generationId", { - get: $util.oneOfGetter($oneOfFields = ["generationId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupApplianceBackupProperties _finalizeTime. - * @member {"finalizeTime"|undefined} _finalizeTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - Object.defineProperty(BackupApplianceBackupProperties.prototype, "_finalizeTime", { - get: $util.oneOfGetter($oneOfFields = ["finalizeTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupApplianceBackupProperties _recoveryRangeStartTime. - * @member {"recoveryRangeStartTime"|undefined} _recoveryRangeStartTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - Object.defineProperty(BackupApplianceBackupProperties.prototype, "_recoveryRangeStartTime", { - get: $util.oneOfGetter($oneOfFields = ["recoveryRangeStartTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupApplianceBackupProperties _recoveryRangeEndTime. - * @member {"recoveryRangeEndTime"|undefined} _recoveryRangeEndTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - Object.defineProperty(BackupApplianceBackupProperties.prototype, "_recoveryRangeEndTime", { - get: $util.oneOfGetter($oneOfFields = ["recoveryRangeEndTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupApplianceBackupProperties instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties instance - */ - BackupApplianceBackupProperties.create = function create(properties) { - return new BackupApplianceBackupProperties(properties); - }; - - /** - * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties} message BackupApplianceBackupProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupApplianceBackupProperties.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.generationId != null && Object.hasOwnProperty.call(message, "generationId")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.generationId); - if (message.finalizeTime != null && Object.hasOwnProperty.call(message, "finalizeTime")) - $root.google.protobuf.Timestamp.encode(message.finalizeTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.recoveryRangeStartTime != null && Object.hasOwnProperty.call(message, "recoveryRangeStartTime")) - $root.google.protobuf.Timestamp.encode(message.recoveryRangeStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.recoveryRangeEndTime != null && Object.hasOwnProperty.call(message, "recoveryRangeEndTime")) - $root.google.protobuf.Timestamp.encode(message.recoveryRangeEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties} message BackupApplianceBackupProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupApplianceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupApplianceBackupProperties.decode = function 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.backupdr.v1.BackupApplianceBackupProperties(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.generationId = reader.int32(); - break; - } - case 2: { - message.finalizeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupApplianceBackupProperties.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupApplianceBackupProperties message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupApplianceBackupProperties.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.generationId != null && message.hasOwnProperty("generationId")) { - properties._generationId = 1; - if (!$util.isInteger(message.generationId)) - return "generationId: integer expected"; - } - if (message.finalizeTime != null && message.hasOwnProperty("finalizeTime")) { - properties._finalizeTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.finalizeTime); - if (error) - return "finalizeTime." + error; - } - } - if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { - properties._recoveryRangeStartTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeStartTime); - if (error) - return "recoveryRangeStartTime." + error; - } - } - if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { - properties._recoveryRangeEndTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeEndTime); - if (error) - return "recoveryRangeEndTime." + error; - } - } - return null; - }; - - /** - * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties - */ - BackupApplianceBackupProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties(); - if (object.generationId != null) - message.generationId = object.generationId | 0; - if (object.finalizeTime != null) { - if (typeof object.finalizeTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.finalizeTime: object expected"); - message.finalizeTime = $root.google.protobuf.Timestamp.fromObject(object.finalizeTime); - } - if (object.recoveryRangeStartTime != null) { - if (typeof object.recoveryRangeStartTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeStartTime: object expected"); - message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeStartTime); - } - if (object.recoveryRangeEndTime != null) { - if (typeof object.recoveryRangeEndTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeEndTime: object expected"); - message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeEndTime); - } - return message; - }; - - /** - * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.BackupApplianceBackupProperties} message BackupApplianceBackupProperties - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupApplianceBackupProperties.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.generationId != null && message.hasOwnProperty("generationId")) { - object.generationId = message.generationId; - if (options.oneofs) - object._generationId = "generationId"; - } - if (message.finalizeTime != null && message.hasOwnProperty("finalizeTime")) { - object.finalizeTime = $root.google.protobuf.Timestamp.toObject(message.finalizeTime, options); - if (options.oneofs) - object._finalizeTime = "finalizeTime"; - } - if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { - object.recoveryRangeStartTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeStartTime, options); - if (options.oneofs) - object._recoveryRangeStartTime = "recoveryRangeStartTime"; - } - if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { - object.recoveryRangeEndTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeEndTime, options); - if (options.oneofs) - object._recoveryRangeEndTime = "recoveryRangeEndTime"; - } - return object; - }; - - /** - * Converts this BackupApplianceBackupProperties to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - * @returns {Object.} JSON object - */ - BackupApplianceBackupProperties.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupApplianceBackupProperties - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupApplianceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceBackupProperties"; - }; - - return BackupApplianceBackupProperties; - })(); - - v1.ComputeInstanceBackupProperties = (function() { - - /** - * Properties of a ComputeInstanceBackupProperties. - * @memberof google.cloud.backupdr.v1 - * @interface IComputeInstanceBackupProperties - * @property {string|null} [description] ComputeInstanceBackupProperties description - * @property {google.cloud.backupdr.v1.ITags|null} [tags] ComputeInstanceBackupProperties tags - * @property {string|null} [machineType] ComputeInstanceBackupProperties machineType - * @property {boolean|null} [canIpForward] ComputeInstanceBackupProperties canIpForward - * @property {Array.|null} [networkInterface] ComputeInstanceBackupProperties networkInterface - * @property {Array.|null} [disk] ComputeInstanceBackupProperties disk - * @property {google.cloud.backupdr.v1.IMetadata|null} [metadata] ComputeInstanceBackupProperties metadata - * @property {Array.|null} [serviceAccount] ComputeInstanceBackupProperties serviceAccount - * @property {google.cloud.backupdr.v1.IScheduling|null} [scheduling] ComputeInstanceBackupProperties scheduling - * @property {Array.|null} [guestAccelerator] ComputeInstanceBackupProperties guestAccelerator - * @property {string|null} [minCpuPlatform] ComputeInstanceBackupProperties minCpuPlatform - * @property {google.cloud.backupdr.v1.KeyRevocationActionType|null} [keyRevocationActionType] ComputeInstanceBackupProperties keyRevocationActionType - * @property {string|null} [sourceInstance] ComputeInstanceBackupProperties sourceInstance - * @property {Object.|null} [labels] ComputeInstanceBackupProperties labels - */ - - /** - * Constructs a new ComputeInstanceBackupProperties. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ComputeInstanceBackupProperties. - * @implements IComputeInstanceBackupProperties - * @constructor - * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties=} [properties] Properties to set - */ - function ComputeInstanceBackupProperties(properties) { - this.networkInterface = []; - this.disk = []; - this.serviceAccount = []; - this.guestAccelerator = []; - 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]]; - } - - /** - * ComputeInstanceBackupProperties description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.description = null; - - /** - * ComputeInstanceBackupProperties tags. - * @member {google.cloud.backupdr.v1.ITags|null|undefined} tags - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.tags = null; - - /** - * ComputeInstanceBackupProperties machineType. - * @member {string|null|undefined} machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.machineType = null; - - /** - * ComputeInstanceBackupProperties canIpForward. - * @member {boolean|null|undefined} canIpForward - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.canIpForward = null; - - /** - * ComputeInstanceBackupProperties networkInterface. - * @member {Array.} networkInterface - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.networkInterface = $util.emptyArray; - - /** - * ComputeInstanceBackupProperties disk. - * @member {Array.} disk - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.disk = $util.emptyArray; - - /** - * ComputeInstanceBackupProperties metadata. - * @member {google.cloud.backupdr.v1.IMetadata|null|undefined} metadata - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.metadata = null; - - /** - * ComputeInstanceBackupProperties serviceAccount. - * @member {Array.} serviceAccount - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.serviceAccount = $util.emptyArray; - - /** - * ComputeInstanceBackupProperties scheduling. - * @member {google.cloud.backupdr.v1.IScheduling|null|undefined} scheduling - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.scheduling = null; - - /** - * ComputeInstanceBackupProperties guestAccelerator. - * @member {Array.} guestAccelerator - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.guestAccelerator = $util.emptyArray; - - /** - * ComputeInstanceBackupProperties minCpuPlatform. - * @member {string|null|undefined} minCpuPlatform - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.minCpuPlatform = null; - - /** - * ComputeInstanceBackupProperties keyRevocationActionType. - * @member {google.cloud.backupdr.v1.KeyRevocationActionType|null|undefined} keyRevocationActionType - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.keyRevocationActionType = null; - - /** - * ComputeInstanceBackupProperties sourceInstance. - * @member {string|null|undefined} sourceInstance - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.sourceInstance = null; - - /** - * ComputeInstanceBackupProperties labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.labels = $util.emptyObject; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ComputeInstanceBackupProperties _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _tags. - * @member {"tags"|undefined} _tags - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_tags", { - get: $util.oneOfGetter($oneOfFields = ["tags"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _machineType. - * @member {"machineType"|undefined} _machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_machineType", { - get: $util.oneOfGetter($oneOfFields = ["machineType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _canIpForward. - * @member {"canIpForward"|undefined} _canIpForward - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_canIpForward", { - get: $util.oneOfGetter($oneOfFields = ["canIpForward"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _metadata. - * @member {"metadata"|undefined} _metadata - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_metadata", { - get: $util.oneOfGetter($oneOfFields = ["metadata"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _scheduling. - * @member {"scheduling"|undefined} _scheduling - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_scheduling", { - get: $util.oneOfGetter($oneOfFields = ["scheduling"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _minCpuPlatform. - * @member {"minCpuPlatform"|undefined} _minCpuPlatform - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_minCpuPlatform", { - get: $util.oneOfGetter($oneOfFields = ["minCpuPlatform"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _keyRevocationActionType. - * @member {"keyRevocationActionType"|undefined} _keyRevocationActionType - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_keyRevocationActionType", { - get: $util.oneOfGetter($oneOfFields = ["keyRevocationActionType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _sourceInstance. - * @member {"sourceInstance"|undefined} _sourceInstance - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_sourceInstance", { - get: $util.oneOfGetter($oneOfFields = ["sourceInstance"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ComputeInstanceBackupProperties instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties instance - */ - ComputeInstanceBackupProperties.create = function create(properties) { - return new ComputeInstanceBackupProperties(properties); - }; - - /** - * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties} message ComputeInstanceBackupProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceBackupProperties.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.tags != null && Object.hasOwnProperty.call(message, "tags")) - $root.google.cloud.backupdr.v1.Tags.encode(message.tags, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.machineType); - if (message.canIpForward != null && Object.hasOwnProperty.call(message, "canIpForward")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.canIpForward); - if (message.networkInterface != null && message.networkInterface.length) - for (var i = 0; i < message.networkInterface.length; ++i) - $root.google.cloud.backupdr.v1.NetworkInterface.encode(message.networkInterface[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.disk != null && message.disk.length) - for (var i = 0; i < message.disk.length; ++i) - $root.google.cloud.backupdr.v1.AttachedDisk.encode(message.disk[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.backupdr.v1.Metadata.encode(message.metadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.serviceAccount != null && message.serviceAccount.length) - for (var i = 0; i < message.serviceAccount.length; ++i) - $root.google.cloud.backupdr.v1.ServiceAccount.encode(message.serviceAccount[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) - $root.google.cloud.backupdr.v1.Scheduling.encode(message.scheduling, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.guestAccelerator != null && message.guestAccelerator.length) - for (var i = 0; i < message.guestAccelerator.length; ++i) - $root.google.cloud.backupdr.v1.AcceleratorConfig.encode(message.guestAccelerator[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.minCpuPlatform); - if (message.keyRevocationActionType != null && Object.hasOwnProperty.call(message, "keyRevocationActionType")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.keyRevocationActionType); - if (message.sourceInstance != null && Object.hasOwnProperty.call(message, "sourceInstance")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.sourceInstance); - 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 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties} message ComputeInstanceBackupProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceBackupProperties.decode = function 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.backupdr.v1.ComputeInstanceBackupProperties(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.description = reader.string(); - break; - } - case 2: { - message.tags = $root.google.cloud.backupdr.v1.Tags.decode(reader, reader.uint32()); - break; - } - case 3: { - message.machineType = reader.string(); - break; - } - case 4: { - message.canIpForward = reader.bool(); - break; - } - case 5: { - if (!(message.networkInterface && message.networkInterface.length)) - message.networkInterface = []; - message.networkInterface.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.disk && message.disk.length)) - message.disk = []; - message.disk.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader, reader.uint32())); - break; - } - case 7: { - message.metadata = $root.google.cloud.backupdr.v1.Metadata.decode(reader, reader.uint32()); - break; - } - case 8: { - if (!(message.serviceAccount && message.serviceAccount.length)) - message.serviceAccount = []; - message.serviceAccount.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader, reader.uint32())); - break; - } - case 9: { - message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.decode(reader, reader.uint32()); - break; - } - case 10: { - if (!(message.guestAccelerator && message.guestAccelerator.length)) - message.guestAccelerator = []; - message.guestAccelerator.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader, reader.uint32())); - break; - } - case 11: { - message.minCpuPlatform = reader.string(); - break; - } - case 12: { - message.keyRevocationActionType = reader.int32(); - break; - } - case 13: { - message.sourceInstance = reader.string(); - break; - } - case 14: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceBackupProperties.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComputeInstanceBackupProperties message. - * @function verify - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComputeInstanceBackupProperties.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.tags != null && message.hasOwnProperty("tags")) { - properties._tags = 1; - { - var error = $root.google.cloud.backupdr.v1.Tags.verify(message.tags); - if (error) - return "tags." + error; - } - } - if (message.machineType != null && message.hasOwnProperty("machineType")) { - properties._machineType = 1; - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - } - if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { - properties._canIpForward = 1; - if (typeof message.canIpForward !== "boolean") - return "canIpForward: boolean expected"; - } - if (message.networkInterface != null && message.hasOwnProperty("networkInterface")) { - if (!Array.isArray(message.networkInterface)) - return "networkInterface: array expected"; - for (var i = 0; i < message.networkInterface.length; ++i) { - var error = $root.google.cloud.backupdr.v1.NetworkInterface.verify(message.networkInterface[i]); - if (error) - return "networkInterface." + error; - } - } - if (message.disk != null && message.hasOwnProperty("disk")) { - if (!Array.isArray(message.disk)) - return "disk: array expected"; - for (var i = 0; i < message.disk.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AttachedDisk.verify(message.disk[i]); - if (error) - return "disk." + error; - } - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - properties._metadata = 1; - { - var error = $root.google.cloud.backupdr.v1.Metadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) { - if (!Array.isArray(message.serviceAccount)) - return "serviceAccount: array expected"; - for (var i = 0; i < message.serviceAccount.length; ++i) { - var error = $root.google.cloud.backupdr.v1.ServiceAccount.verify(message.serviceAccount[i]); - if (error) - return "serviceAccount." + error; - } - } - if (message.scheduling != null && message.hasOwnProperty("scheduling")) { - properties._scheduling = 1; - { - var error = $root.google.cloud.backupdr.v1.Scheduling.verify(message.scheduling); - if (error) - return "scheduling." + error; - } - } - if (message.guestAccelerator != null && message.hasOwnProperty("guestAccelerator")) { - if (!Array.isArray(message.guestAccelerator)) - return "guestAccelerator: array expected"; - for (var i = 0; i < message.guestAccelerator.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AcceleratorConfig.verify(message.guestAccelerator[i]); - if (error) - return "guestAccelerator." + error; - } - } - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { - properties._minCpuPlatform = 1; - if (!$util.isString(message.minCpuPlatform)) - return "minCpuPlatform: string expected"; - } - if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { - properties._keyRevocationActionType = 1; - switch (message.keyRevocationActionType) { - default: - return "keyRevocationActionType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) { - properties._sourceInstance = 1; - if (!$util.isString(message.sourceInstance)) - return "sourceInstance: string expected"; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties - */ - ComputeInstanceBackupProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties) - return object; - var message = new $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties(); - if (object.description != null) - message.description = String(object.description); - if (object.tags != null) { - if (typeof object.tags !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.tags: object expected"); - message.tags = $root.google.cloud.backupdr.v1.Tags.fromObject(object.tags); - } - if (object.machineType != null) - message.machineType = String(object.machineType); - if (object.canIpForward != null) - message.canIpForward = Boolean(object.canIpForward); - if (object.networkInterface) { - if (!Array.isArray(object.networkInterface)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: array expected"); - message.networkInterface = []; - for (var i = 0; i < object.networkInterface.length; ++i) { - if (typeof object.networkInterface[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: object expected"); - message.networkInterface[i] = $root.google.cloud.backupdr.v1.NetworkInterface.fromObject(object.networkInterface[i]); - } - } - if (object.disk) { - if (!Array.isArray(object.disk)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.disk: array expected"); - message.disk = []; - for (var i = 0; i < object.disk.length; ++i) { - if (typeof object.disk[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.disk: object expected"); - message.disk[i] = $root.google.cloud.backupdr.v1.AttachedDisk.fromObject(object.disk[i]); - } - } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.metadata: object expected"); - message.metadata = $root.google.cloud.backupdr.v1.Metadata.fromObject(object.metadata); - } - if (object.serviceAccount) { - if (!Array.isArray(object.serviceAccount)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.serviceAccount: array expected"); - message.serviceAccount = []; - for (var i = 0; i < object.serviceAccount.length; ++i) { - if (typeof object.serviceAccount[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.serviceAccount: object expected"); - message.serviceAccount[i] = $root.google.cloud.backupdr.v1.ServiceAccount.fromObject(object.serviceAccount[i]); - } - } - if (object.scheduling != null) { - if (typeof object.scheduling !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.scheduling: object expected"); - message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.fromObject(object.scheduling); - } - if (object.guestAccelerator) { - if (!Array.isArray(object.guestAccelerator)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.guestAccelerator: array expected"); - message.guestAccelerator = []; - for (var i = 0; i < object.guestAccelerator.length; ++i) { - if (typeof object.guestAccelerator[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.guestAccelerator: object expected"); - message.guestAccelerator[i] = $root.google.cloud.backupdr.v1.AcceleratorConfig.fromObject(object.guestAccelerator[i]); - } - } - if (object.minCpuPlatform != null) - message.minCpuPlatform = String(object.minCpuPlatform); - switch (object.keyRevocationActionType) { - default: - if (typeof object.keyRevocationActionType === "number") { - message.keyRevocationActionType = object.keyRevocationActionType; - break; - } - break; - case "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": - case 0: - message.keyRevocationActionType = 0; - break; - case "NONE": - case 1: - message.keyRevocationActionType = 1; - break; - case "STOP": - case 2: - message.keyRevocationActionType = 2; - break; - } - if (object.sourceInstance != null) - message.sourceInstance = String(object.sourceInstance); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} message ComputeInstanceBackupProperties - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComputeInstanceBackupProperties.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.networkInterface = []; - object.disk = []; - object.serviceAccount = []; - object.guestAccelerator = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.tags != null && message.hasOwnProperty("tags")) { - object.tags = $root.google.cloud.backupdr.v1.Tags.toObject(message.tags, options); - if (options.oneofs) - object._tags = "tags"; - } - if (message.machineType != null && message.hasOwnProperty("machineType")) { - object.machineType = message.machineType; - if (options.oneofs) - object._machineType = "machineType"; - } - if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { - object.canIpForward = message.canIpForward; - if (options.oneofs) - object._canIpForward = "canIpForward"; - } - if (message.networkInterface && message.networkInterface.length) { - object.networkInterface = []; - for (var j = 0; j < message.networkInterface.length; ++j) - object.networkInterface[j] = $root.google.cloud.backupdr.v1.NetworkInterface.toObject(message.networkInterface[j], options); - } - if (message.disk && message.disk.length) { - object.disk = []; - for (var j = 0; j < message.disk.length; ++j) - object.disk[j] = $root.google.cloud.backupdr.v1.AttachedDisk.toObject(message.disk[j], options); - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - object.metadata = $root.google.cloud.backupdr.v1.Metadata.toObject(message.metadata, options); - if (options.oneofs) - object._metadata = "metadata"; - } - if (message.serviceAccount && message.serviceAccount.length) { - object.serviceAccount = []; - for (var j = 0; j < message.serviceAccount.length; ++j) - object.serviceAccount[j] = $root.google.cloud.backupdr.v1.ServiceAccount.toObject(message.serviceAccount[j], options); - } - if (message.scheduling != null && message.hasOwnProperty("scheduling")) { - object.scheduling = $root.google.cloud.backupdr.v1.Scheduling.toObject(message.scheduling, options); - if (options.oneofs) - object._scheduling = "scheduling"; - } - if (message.guestAccelerator && message.guestAccelerator.length) { - object.guestAccelerator = []; - for (var j = 0; j < message.guestAccelerator.length; ++j) - object.guestAccelerator[j] = $root.google.cloud.backupdr.v1.AcceleratorConfig.toObject(message.guestAccelerator[j], options); - } - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { - object.minCpuPlatform = message.minCpuPlatform; - if (options.oneofs) - object._minCpuPlatform = "minCpuPlatform"; - } - if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { - object.keyRevocationActionType = options.enums === String ? $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] === undefined ? message.keyRevocationActionType : $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] : message.keyRevocationActionType; - if (options.oneofs) - object._keyRevocationActionType = "keyRevocationActionType"; - } - if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) { - object.sourceInstance = message.sourceInstance; - if (options.oneofs) - object._sourceInstance = "sourceInstance"; - } - 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]]; - } - return object; - }; - - /** - * Converts this ComputeInstanceBackupProperties to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - * @returns {Object.} JSON object - */ - ComputeInstanceBackupProperties.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComputeInstanceBackupProperties - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComputeInstanceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceBackupProperties"; - }; - - return ComputeInstanceBackupProperties; - })(); - - v1.ComputeInstanceRestoreProperties = (function() { - - /** - * Properties of a ComputeInstanceRestoreProperties. - * @memberof google.cloud.backupdr.v1 - * @interface IComputeInstanceRestoreProperties - * @property {string|null} [name] ComputeInstanceRestoreProperties name - * @property {google.cloud.backupdr.v1.IAdvancedMachineFeatures|null} [advancedMachineFeatures] ComputeInstanceRestoreProperties advancedMachineFeatures - * @property {boolean|null} [canIpForward] ComputeInstanceRestoreProperties canIpForward - * @property {google.cloud.backupdr.v1.IConfidentialInstanceConfig|null} [confidentialInstanceConfig] ComputeInstanceRestoreProperties confidentialInstanceConfig - * @property {boolean|null} [deletionProtection] ComputeInstanceRestoreProperties deletionProtection - * @property {string|null} [description] ComputeInstanceRestoreProperties description - * @property {Array.|null} [disks] ComputeInstanceRestoreProperties disks - * @property {google.cloud.backupdr.v1.IDisplayDevice|null} [displayDevice] ComputeInstanceRestoreProperties displayDevice - * @property {Array.|null} [guestAccelerators] ComputeInstanceRestoreProperties guestAccelerators - * @property {string|null} [hostname] ComputeInstanceRestoreProperties hostname - * @property {google.cloud.backupdr.v1.ICustomerEncryptionKey|null} [instanceEncryptionKey] ComputeInstanceRestoreProperties instanceEncryptionKey - * @property {google.cloud.backupdr.v1.KeyRevocationActionType|null} [keyRevocationActionType] ComputeInstanceRestoreProperties keyRevocationActionType - * @property {Object.|null} [labels] ComputeInstanceRestoreProperties labels - * @property {string|null} [machineType] ComputeInstanceRestoreProperties machineType - * @property {google.cloud.backupdr.v1.IMetadata|null} [metadata] ComputeInstanceRestoreProperties metadata - * @property {string|null} [minCpuPlatform] ComputeInstanceRestoreProperties minCpuPlatform - * @property {Array.|null} [networkInterfaces] ComputeInstanceRestoreProperties networkInterfaces - * @property {google.cloud.backupdr.v1.INetworkPerformanceConfig|null} [networkPerformanceConfig] ComputeInstanceRestoreProperties networkPerformanceConfig - * @property {google.cloud.backupdr.v1.IInstanceParams|null} [params] ComputeInstanceRestoreProperties params - * @property {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null} [privateIpv6GoogleAccess] ComputeInstanceRestoreProperties privateIpv6GoogleAccess - * @property {google.cloud.backupdr.v1.IAllocationAffinity|null} [allocationAffinity] ComputeInstanceRestoreProperties allocationAffinity - * @property {Array.|null} [resourcePolicies] ComputeInstanceRestoreProperties resourcePolicies - * @property {google.cloud.backupdr.v1.IScheduling|null} [scheduling] ComputeInstanceRestoreProperties scheduling - * @property {Array.|null} [serviceAccounts] ComputeInstanceRestoreProperties serviceAccounts - * @property {google.cloud.backupdr.v1.ITags|null} [tags] ComputeInstanceRestoreProperties tags - */ - - /** - * Constructs a new ComputeInstanceRestoreProperties. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ComputeInstanceRestoreProperties. - * @implements IComputeInstanceRestoreProperties - * @constructor - * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties=} [properties] Properties to set - */ - function ComputeInstanceRestoreProperties(properties) { - this.disks = []; - this.guestAccelerators = []; - this.labels = {}; - this.networkInterfaces = []; - this.resourcePolicies = []; - this.serviceAccounts = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComputeInstanceRestoreProperties name. - * @member {string|null|undefined} name - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.name = null; - - /** - * ComputeInstanceRestoreProperties advancedMachineFeatures. - * @member {google.cloud.backupdr.v1.IAdvancedMachineFeatures|null|undefined} advancedMachineFeatures - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.advancedMachineFeatures = null; - - /** - * ComputeInstanceRestoreProperties canIpForward. - * @member {boolean|null|undefined} canIpForward - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.canIpForward = null; - - /** - * ComputeInstanceRestoreProperties confidentialInstanceConfig. - * @member {google.cloud.backupdr.v1.IConfidentialInstanceConfig|null|undefined} confidentialInstanceConfig - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.confidentialInstanceConfig = null; - - /** - * ComputeInstanceRestoreProperties deletionProtection. - * @member {boolean|null|undefined} deletionProtection - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.deletionProtection = null; - - /** - * ComputeInstanceRestoreProperties description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.description = null; - - /** - * ComputeInstanceRestoreProperties disks. - * @member {Array.} disks - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.disks = $util.emptyArray; - - /** - * ComputeInstanceRestoreProperties displayDevice. - * @member {google.cloud.backupdr.v1.IDisplayDevice|null|undefined} displayDevice - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.displayDevice = null; - - /** - * ComputeInstanceRestoreProperties guestAccelerators. - * @member {Array.} guestAccelerators - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.guestAccelerators = $util.emptyArray; - - /** - * ComputeInstanceRestoreProperties hostname. - * @member {string|null|undefined} hostname - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.hostname = null; - - /** - * ComputeInstanceRestoreProperties instanceEncryptionKey. - * @member {google.cloud.backupdr.v1.ICustomerEncryptionKey|null|undefined} instanceEncryptionKey - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.instanceEncryptionKey = null; - - /** - * ComputeInstanceRestoreProperties keyRevocationActionType. - * @member {google.cloud.backupdr.v1.KeyRevocationActionType|null|undefined} keyRevocationActionType - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.keyRevocationActionType = null; - - /** - * ComputeInstanceRestoreProperties labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.labels = $util.emptyObject; - - /** - * ComputeInstanceRestoreProperties machineType. - * @member {string|null|undefined} machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.machineType = null; - - /** - * ComputeInstanceRestoreProperties metadata. - * @member {google.cloud.backupdr.v1.IMetadata|null|undefined} metadata - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.metadata = null; - - /** - * ComputeInstanceRestoreProperties minCpuPlatform. - * @member {string|null|undefined} minCpuPlatform - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.minCpuPlatform = null; - - /** - * ComputeInstanceRestoreProperties networkInterfaces. - * @member {Array.} networkInterfaces - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.networkInterfaces = $util.emptyArray; - - /** - * ComputeInstanceRestoreProperties networkPerformanceConfig. - * @member {google.cloud.backupdr.v1.INetworkPerformanceConfig|null|undefined} networkPerformanceConfig - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.networkPerformanceConfig = null; - - /** - * ComputeInstanceRestoreProperties params. - * @member {google.cloud.backupdr.v1.IInstanceParams|null|undefined} params - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.params = null; - - /** - * ComputeInstanceRestoreProperties privateIpv6GoogleAccess. - * @member {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null|undefined} privateIpv6GoogleAccess - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.privateIpv6GoogleAccess = null; - - /** - * ComputeInstanceRestoreProperties allocationAffinity. - * @member {google.cloud.backupdr.v1.IAllocationAffinity|null|undefined} allocationAffinity - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.allocationAffinity = null; - - /** - * ComputeInstanceRestoreProperties resourcePolicies. - * @member {Array.} resourcePolicies - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.resourcePolicies = $util.emptyArray; - - /** - * ComputeInstanceRestoreProperties scheduling. - * @member {google.cloud.backupdr.v1.IScheduling|null|undefined} scheduling - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.scheduling = null; - - /** - * ComputeInstanceRestoreProperties serviceAccounts. - * @member {Array.} serviceAccounts - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.serviceAccounts = $util.emptyArray; - - /** - * ComputeInstanceRestoreProperties tags. - * @member {google.cloud.backupdr.v1.ITags|null|undefined} tags - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.tags = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ComputeInstanceRestoreProperties _name. - * @member {"name"|undefined} _name - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _advancedMachineFeatures. - * @member {"advancedMachineFeatures"|undefined} _advancedMachineFeatures - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_advancedMachineFeatures", { - get: $util.oneOfGetter($oneOfFields = ["advancedMachineFeatures"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _canIpForward. - * @member {"canIpForward"|undefined} _canIpForward - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_canIpForward", { - get: $util.oneOfGetter($oneOfFields = ["canIpForward"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _confidentialInstanceConfig. - * @member {"confidentialInstanceConfig"|undefined} _confidentialInstanceConfig - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_confidentialInstanceConfig", { - get: $util.oneOfGetter($oneOfFields = ["confidentialInstanceConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _deletionProtection. - * @member {"deletionProtection"|undefined} _deletionProtection - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_deletionProtection", { - get: $util.oneOfGetter($oneOfFields = ["deletionProtection"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _displayDevice. - * @member {"displayDevice"|undefined} _displayDevice - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_displayDevice", { - get: $util.oneOfGetter($oneOfFields = ["displayDevice"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _hostname. - * @member {"hostname"|undefined} _hostname - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_hostname", { - get: $util.oneOfGetter($oneOfFields = ["hostname"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _instanceEncryptionKey. - * @member {"instanceEncryptionKey"|undefined} _instanceEncryptionKey - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_instanceEncryptionKey", { - get: $util.oneOfGetter($oneOfFields = ["instanceEncryptionKey"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _keyRevocationActionType. - * @member {"keyRevocationActionType"|undefined} _keyRevocationActionType - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_keyRevocationActionType", { - get: $util.oneOfGetter($oneOfFields = ["keyRevocationActionType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _machineType. - * @member {"machineType"|undefined} _machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_machineType", { - get: $util.oneOfGetter($oneOfFields = ["machineType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _metadata. - * @member {"metadata"|undefined} _metadata - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_metadata", { - get: $util.oneOfGetter($oneOfFields = ["metadata"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _minCpuPlatform. - * @member {"minCpuPlatform"|undefined} _minCpuPlatform - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_minCpuPlatform", { - get: $util.oneOfGetter($oneOfFields = ["minCpuPlatform"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _networkPerformanceConfig. - * @member {"networkPerformanceConfig"|undefined} _networkPerformanceConfig - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_networkPerformanceConfig", { - get: $util.oneOfGetter($oneOfFields = ["networkPerformanceConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _params. - * @member {"params"|undefined} _params - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_params", { - get: $util.oneOfGetter($oneOfFields = ["params"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _privateIpv6GoogleAccess. - * @member {"privateIpv6GoogleAccess"|undefined} _privateIpv6GoogleAccess - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_privateIpv6GoogleAccess", { - get: $util.oneOfGetter($oneOfFields = ["privateIpv6GoogleAccess"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _allocationAffinity. - * @member {"allocationAffinity"|undefined} _allocationAffinity - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_allocationAffinity", { - get: $util.oneOfGetter($oneOfFields = ["allocationAffinity"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _scheduling. - * @member {"scheduling"|undefined} _scheduling - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_scheduling", { - get: $util.oneOfGetter($oneOfFields = ["scheduling"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _tags. - * @member {"tags"|undefined} _tags - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_tags", { - get: $util.oneOfGetter($oneOfFields = ["tags"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties instance - */ - ComputeInstanceRestoreProperties.create = function create(properties) { - return new ComputeInstanceRestoreProperties(properties); - }; - - /** - * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceRestoreProperties.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.advancedMachineFeatures != null && Object.hasOwnProperty.call(message, "advancedMachineFeatures")) - $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.encode(message.advancedMachineFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.canIpForward != null && Object.hasOwnProperty.call(message, "canIpForward")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.canIpForward); - if (message.confidentialInstanceConfig != null && Object.hasOwnProperty.call(message, "confidentialInstanceConfig")) - $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.encode(message.confidentialInstanceConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.deletionProtection); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.disks != null && message.disks.length) - for (var i = 0; i < message.disks.length; ++i) - $root.google.cloud.backupdr.v1.AttachedDisk.encode(message.disks[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.displayDevice != null && Object.hasOwnProperty.call(message, "displayDevice")) - $root.google.cloud.backupdr.v1.DisplayDevice.encode(message.displayDevice, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.guestAccelerators != null && message.guestAccelerators.length) - for (var i = 0; i < message.guestAccelerators.length; ++i) - $root.google.cloud.backupdr.v1.AcceleratorConfig.encode(message.guestAccelerators[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.hostname); - if (message.instanceEncryptionKey != null && Object.hasOwnProperty.call(message, "instanceEncryptionKey")) - $root.google.cloud.backupdr.v1.CustomerEncryptionKey.encode(message.instanceEncryptionKey, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.keyRevocationActionType != null && Object.hasOwnProperty.call(message, "keyRevocationActionType")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.keyRevocationActionType); - 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 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.machineType); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.backupdr.v1.Metadata.encode(message.metadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.minCpuPlatform); - if (message.networkInterfaces != null && message.networkInterfaces.length) - for (var i = 0; i < message.networkInterfaces.length; ++i) - $root.google.cloud.backupdr.v1.NetworkInterface.encode(message.networkInterfaces[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.networkPerformanceConfig != null && Object.hasOwnProperty.call(message, "networkPerformanceConfig")) - $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.encode(message.networkPerformanceConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.google.cloud.backupdr.v1.InstanceParams.encode(message.params, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.privateIpv6GoogleAccess != null && Object.hasOwnProperty.call(message, "privateIpv6GoogleAccess")) - writer.uint32(/* id 20, wireType 0 =*/160).int32(message.privateIpv6GoogleAccess); - if (message.allocationAffinity != null && Object.hasOwnProperty.call(message, "allocationAffinity")) - $root.google.cloud.backupdr.v1.AllocationAffinity.encode(message.allocationAffinity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.resourcePolicies != null && message.resourcePolicies.length) - for (var i = 0; i < message.resourcePolicies.length; ++i) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.resourcePolicies[i]); - if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) - $root.google.cloud.backupdr.v1.Scheduling.encode(message.scheduling, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.serviceAccounts != null && message.serviceAccounts.length) - for (var i = 0; i < message.serviceAccounts.length; ++i) - $root.google.cloud.backupdr.v1.ServiceAccount.encode(message.serviceAccounts[i], writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) - $root.google.cloud.backupdr.v1.Tags.encode(message.tags, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceRestoreProperties.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceRestoreProperties.decode = function 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.backupdr.v1.ComputeInstanceRestoreProperties(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.decode(reader, reader.uint32()); - break; - } - case 3: { - message.canIpForward = reader.bool(); - break; - } - case 4: { - message.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.deletionProtection = reader.bool(); - break; - } - case 6: { - message.description = reader.string(); - break; - } - case 7: { - if (!(message.disks && message.disks.length)) - message.disks = []; - message.disks.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader, reader.uint32())); - break; - } - case 8: { - message.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.guestAccelerators && message.guestAccelerators.length)) - message.guestAccelerators = []; - message.guestAccelerators.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader, reader.uint32())); - break; - } - case 10: { - message.hostname = reader.string(); - break; - } - case 11: { - message.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader, reader.uint32()); - break; - } - case 12: { - message.keyRevocationActionType = reader.int32(); - break; - } - case 13: { - 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 14: { - message.machineType = reader.string(); - break; - } - case 15: { - message.metadata = $root.google.cloud.backupdr.v1.Metadata.decode(reader, reader.uint32()); - break; - } - case 16: { - message.minCpuPlatform = reader.string(); - break; - } - case 17: { - if (!(message.networkInterfaces && message.networkInterfaces.length)) - message.networkInterfaces = []; - message.networkInterfaces.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader, reader.uint32())); - break; - } - case 18: { - message.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.decode(reader, reader.uint32()); - break; - } - case 19: { - message.params = $root.google.cloud.backupdr.v1.InstanceParams.decode(reader, reader.uint32()); - break; - } - case 20: { - message.privateIpv6GoogleAccess = reader.int32(); - break; - } - case 21: { - message.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.decode(reader, reader.uint32()); - break; - } - case 22: { - if (!(message.resourcePolicies && message.resourcePolicies.length)) - message.resourcePolicies = []; - message.resourcePolicies.push(reader.string()); - break; - } - case 23: { - message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.decode(reader, reader.uint32()); - break; - } - case 24: { - if (!(message.serviceAccounts && message.serviceAccounts.length)) - message.serviceAccounts = []; - message.serviceAccounts.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader, reader.uint32())); - break; - } - case 26: { - message.tags = $root.google.cloud.backupdr.v1.Tags.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceRestoreProperties.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComputeInstanceRestoreProperties message. - * @function verify - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComputeInstanceRestoreProperties.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { - properties._advancedMachineFeatures = 1; - { - var error = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.verify(message.advancedMachineFeatures); - if (error) - return "advancedMachineFeatures." + error; - } - } - if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { - properties._canIpForward = 1; - if (typeof message.canIpForward !== "boolean") - return "canIpForward: boolean expected"; - } - if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) { - properties._confidentialInstanceConfig = 1; - { - var error = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify(message.confidentialInstanceConfig); - if (error) - return "confidentialInstanceConfig." + error; - } - } - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) { - properties._deletionProtection = 1; - if (typeof message.deletionProtection !== "boolean") - return "deletionProtection: boolean expected"; - } - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.disks != null && message.hasOwnProperty("disks")) { - if (!Array.isArray(message.disks)) - return "disks: array expected"; - for (var i = 0; i < message.disks.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AttachedDisk.verify(message.disks[i]); - if (error) - return "disks." + error; - } - } - if (message.displayDevice != null && message.hasOwnProperty("displayDevice")) { - properties._displayDevice = 1; - { - var error = $root.google.cloud.backupdr.v1.DisplayDevice.verify(message.displayDevice); - if (error) - return "displayDevice." + error; - } - } - if (message.guestAccelerators != null && message.hasOwnProperty("guestAccelerators")) { - if (!Array.isArray(message.guestAccelerators)) - return "guestAccelerators: array expected"; - for (var i = 0; i < message.guestAccelerators.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AcceleratorConfig.verify(message.guestAccelerators[i]); - if (error) - return "guestAccelerators." + error; - } - } - if (message.hostname != null && message.hasOwnProperty("hostname")) { - properties._hostname = 1; - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - } - if (message.instanceEncryptionKey != null && message.hasOwnProperty("instanceEncryptionKey")) { - properties._instanceEncryptionKey = 1; - { - var error = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.verify(message.instanceEncryptionKey); - if (error) - return "instanceEncryptionKey." + error; - } - } - if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { - properties._keyRevocationActionType = 1; - switch (message.keyRevocationActionType) { - default: - return "keyRevocationActionType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - 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.machineType != null && message.hasOwnProperty("machineType")) { - properties._machineType = 1; - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - properties._metadata = 1; - { - var error = $root.google.cloud.backupdr.v1.Metadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - } - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { - properties._minCpuPlatform = 1; - if (!$util.isString(message.minCpuPlatform)) - return "minCpuPlatform: string expected"; - } - if (message.networkInterfaces != null && message.hasOwnProperty("networkInterfaces")) { - if (!Array.isArray(message.networkInterfaces)) - return "networkInterfaces: array expected"; - for (var i = 0; i < message.networkInterfaces.length; ++i) { - var error = $root.google.cloud.backupdr.v1.NetworkInterface.verify(message.networkInterfaces[i]); - if (error) - return "networkInterfaces." + error; - } - } - if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { - properties._networkPerformanceConfig = 1; - { - var error = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.verify(message.networkPerformanceConfig); - if (error) - return "networkPerformanceConfig." + error; - } - } - if (message.params != null && message.hasOwnProperty("params")) { - properties._params = 1; - { - var error = $root.google.cloud.backupdr.v1.InstanceParams.verify(message.params); - if (error) - return "params." + error; - } - } - if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) { - properties._privateIpv6GoogleAccess = 1; - switch (message.privateIpv6GoogleAccess) { - default: - return "privateIpv6GoogleAccess: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.allocationAffinity != null && message.hasOwnProperty("allocationAffinity")) { - properties._allocationAffinity = 1; - { - var error = $root.google.cloud.backupdr.v1.AllocationAffinity.verify(message.allocationAffinity); - if (error) - return "allocationAffinity." + error; - } - } - if (message.resourcePolicies != null && message.hasOwnProperty("resourcePolicies")) { - if (!Array.isArray(message.resourcePolicies)) - return "resourcePolicies: array expected"; - for (var i = 0; i < message.resourcePolicies.length; ++i) - if (!$util.isString(message.resourcePolicies[i])) - return "resourcePolicies: string[] expected"; - } - if (message.scheduling != null && message.hasOwnProperty("scheduling")) { - properties._scheduling = 1; - { - var error = $root.google.cloud.backupdr.v1.Scheduling.verify(message.scheduling); - if (error) - return "scheduling." + error; - } - } - if (message.serviceAccounts != null && message.hasOwnProperty("serviceAccounts")) { - if (!Array.isArray(message.serviceAccounts)) - return "serviceAccounts: array expected"; - for (var i = 0; i < message.serviceAccounts.length; ++i) { - var error = $root.google.cloud.backupdr.v1.ServiceAccount.verify(message.serviceAccounts[i]); - if (error) - return "serviceAccounts." + error; - } - } - if (message.tags != null && message.hasOwnProperty("tags")) { - properties._tags = 1; - { - var error = $root.google.cloud.backupdr.v1.Tags.verify(message.tags); - if (error) - return "tags." + error; - } - } - return null; - }; - - /** - * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties - */ - ComputeInstanceRestoreProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties) - return object; - var message = new $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties(); - if (object.name != null) - message.name = String(object.name); - if (object.advancedMachineFeatures != null) { - if (typeof object.advancedMachineFeatures !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.advancedMachineFeatures: object expected"); - message.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.fromObject(object.advancedMachineFeatures); - } - if (object.canIpForward != null) - message.canIpForward = Boolean(object.canIpForward); - if (object.confidentialInstanceConfig != null) { - if (typeof object.confidentialInstanceConfig !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.confidentialInstanceConfig: object expected"); - message.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.fromObject(object.confidentialInstanceConfig); - } - if (object.deletionProtection != null) - message.deletionProtection = Boolean(object.deletionProtection); - if (object.description != null) - message.description = String(object.description); - if (object.disks) { - if (!Array.isArray(object.disks)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: array expected"); - message.disks = []; - for (var i = 0; i < object.disks.length; ++i) { - if (typeof object.disks[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: object expected"); - message.disks[i] = $root.google.cloud.backupdr.v1.AttachedDisk.fromObject(object.disks[i]); - } - } - if (object.displayDevice != null) { - if (typeof object.displayDevice !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.displayDevice: object expected"); - message.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.fromObject(object.displayDevice); - } - if (object.guestAccelerators) { - if (!Array.isArray(object.guestAccelerators)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.guestAccelerators: array expected"); - message.guestAccelerators = []; - for (var i = 0; i < object.guestAccelerators.length; ++i) { - if (typeof object.guestAccelerators[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.guestAccelerators: object expected"); - message.guestAccelerators[i] = $root.google.cloud.backupdr.v1.AcceleratorConfig.fromObject(object.guestAccelerators[i]); - } - } - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.instanceEncryptionKey != null) { - if (typeof object.instanceEncryptionKey !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.instanceEncryptionKey: object expected"); - message.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.fromObject(object.instanceEncryptionKey); - } - switch (object.keyRevocationActionType) { - default: - if (typeof object.keyRevocationActionType === "number") { - message.keyRevocationActionType = object.keyRevocationActionType; - break; - } - break; - case "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": - case 0: - message.keyRevocationActionType = 0; - break; - case "NONE": - case 1: - message.keyRevocationActionType = 1; - break; - case "STOP": - case 2: - message.keyRevocationActionType = 2; - break; - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.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.machineType != null) - message.machineType = String(object.machineType); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.metadata: object expected"); - message.metadata = $root.google.cloud.backupdr.v1.Metadata.fromObject(object.metadata); - } - if (object.minCpuPlatform != null) - message.minCpuPlatform = String(object.minCpuPlatform); - if (object.networkInterfaces) { - if (!Array.isArray(object.networkInterfaces)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkInterfaces: array expected"); - message.networkInterfaces = []; - for (var i = 0; i < object.networkInterfaces.length; ++i) { - if (typeof object.networkInterfaces[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkInterfaces: object expected"); - message.networkInterfaces[i] = $root.google.cloud.backupdr.v1.NetworkInterface.fromObject(object.networkInterfaces[i]); - } - } - if (object.networkPerformanceConfig != null) { - if (typeof object.networkPerformanceConfig !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkPerformanceConfig: object expected"); - message.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.fromObject(object.networkPerformanceConfig); - } - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.params: object expected"); - message.params = $root.google.cloud.backupdr.v1.InstanceParams.fromObject(object.params); - } - switch (object.privateIpv6GoogleAccess) { - default: - if (typeof object.privateIpv6GoogleAccess === "number") { - message.privateIpv6GoogleAccess = object.privateIpv6GoogleAccess; - break; - } - break; - case "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": - case 0: - message.privateIpv6GoogleAccess = 0; - break; - case "INHERIT_FROM_SUBNETWORK": - case 1: - message.privateIpv6GoogleAccess = 1; - break; - case "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE": - case 2: - message.privateIpv6GoogleAccess = 2; - break; - case "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE": - case 3: - message.privateIpv6GoogleAccess = 3; - break; - } - if (object.allocationAffinity != null) { - if (typeof object.allocationAffinity !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.allocationAffinity: object expected"); - message.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.fromObject(object.allocationAffinity); - } - if (object.resourcePolicies) { - if (!Array.isArray(object.resourcePolicies)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.resourcePolicies: array expected"); - message.resourcePolicies = []; - for (var i = 0; i < object.resourcePolicies.length; ++i) - message.resourcePolicies[i] = String(object.resourcePolicies[i]); - } - if (object.scheduling != null) { - if (typeof object.scheduling !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.scheduling: object expected"); - message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.fromObject(object.scheduling); - } - if (object.serviceAccounts) { - if (!Array.isArray(object.serviceAccounts)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.serviceAccounts: array expected"); - message.serviceAccounts = []; - for (var i = 0; i < object.serviceAccounts.length; ++i) { - if (typeof object.serviceAccounts[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.serviceAccounts: object expected"); - message.serviceAccounts[i] = $root.google.cloud.backupdr.v1.ServiceAccount.fromObject(object.serviceAccounts[i]); - } - } - if (object.tags != null) { - if (typeof object.tags !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.tags: object expected"); - message.tags = $root.google.cloud.backupdr.v1.Tags.fromObject(object.tags); - } - return message; - }; - - /** - * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComputeInstanceRestoreProperties.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.disks = []; - object.guestAccelerators = []; - object.networkInterfaces = []; - object.resourcePolicies = []; - object.serviceAccounts = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { - object.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.toObject(message.advancedMachineFeatures, options); - if (options.oneofs) - object._advancedMachineFeatures = "advancedMachineFeatures"; - } - if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { - object.canIpForward = message.canIpForward; - if (options.oneofs) - object._canIpForward = "canIpForward"; - } - if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) { - object.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.toObject(message.confidentialInstanceConfig, options); - if (options.oneofs) - object._confidentialInstanceConfig = "confidentialInstanceConfig"; - } - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) { - object.deletionProtection = message.deletionProtection; - if (options.oneofs) - object._deletionProtection = "deletionProtection"; - } - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.disks && message.disks.length) { - object.disks = []; - for (var j = 0; j < message.disks.length; ++j) - object.disks[j] = $root.google.cloud.backupdr.v1.AttachedDisk.toObject(message.disks[j], options); - } - if (message.displayDevice != null && message.hasOwnProperty("displayDevice")) { - object.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.toObject(message.displayDevice, options); - if (options.oneofs) - object._displayDevice = "displayDevice"; - } - if (message.guestAccelerators && message.guestAccelerators.length) { - object.guestAccelerators = []; - for (var j = 0; j < message.guestAccelerators.length; ++j) - object.guestAccelerators[j] = $root.google.cloud.backupdr.v1.AcceleratorConfig.toObject(message.guestAccelerators[j], options); - } - if (message.hostname != null && message.hasOwnProperty("hostname")) { - object.hostname = message.hostname; - if (options.oneofs) - object._hostname = "hostname"; - } - if (message.instanceEncryptionKey != null && message.hasOwnProperty("instanceEncryptionKey")) { - object.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.toObject(message.instanceEncryptionKey, options); - if (options.oneofs) - object._instanceEncryptionKey = "instanceEncryptionKey"; - } - if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { - object.keyRevocationActionType = options.enums === String ? $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] === undefined ? message.keyRevocationActionType : $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] : message.keyRevocationActionType; - if (options.oneofs) - object._keyRevocationActionType = "keyRevocationActionType"; - } - 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.machineType != null && message.hasOwnProperty("machineType")) { - object.machineType = message.machineType; - if (options.oneofs) - object._machineType = "machineType"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - object.metadata = $root.google.cloud.backupdr.v1.Metadata.toObject(message.metadata, options); - if (options.oneofs) - object._metadata = "metadata"; - } - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { - object.minCpuPlatform = message.minCpuPlatform; - if (options.oneofs) - object._minCpuPlatform = "minCpuPlatform"; - } - if (message.networkInterfaces && message.networkInterfaces.length) { - object.networkInterfaces = []; - for (var j = 0; j < message.networkInterfaces.length; ++j) - object.networkInterfaces[j] = $root.google.cloud.backupdr.v1.NetworkInterface.toObject(message.networkInterfaces[j], options); - } - if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { - object.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.toObject(message.networkPerformanceConfig, options); - if (options.oneofs) - object._networkPerformanceConfig = "networkPerformanceConfig"; - } - if (message.params != null && message.hasOwnProperty("params")) { - object.params = $root.google.cloud.backupdr.v1.InstanceParams.toObject(message.params, options); - if (options.oneofs) - object._params = "params"; - } - if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) { - object.privateIpv6GoogleAccess = options.enums === String ? $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess[message.privateIpv6GoogleAccess] === undefined ? message.privateIpv6GoogleAccess : $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess[message.privateIpv6GoogleAccess] : message.privateIpv6GoogleAccess; - if (options.oneofs) - object._privateIpv6GoogleAccess = "privateIpv6GoogleAccess"; - } - if (message.allocationAffinity != null && message.hasOwnProperty("allocationAffinity")) { - object.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.toObject(message.allocationAffinity, options); - if (options.oneofs) - object._allocationAffinity = "allocationAffinity"; - } - if (message.resourcePolicies && message.resourcePolicies.length) { - object.resourcePolicies = []; - for (var j = 0; j < message.resourcePolicies.length; ++j) - object.resourcePolicies[j] = message.resourcePolicies[j]; - } - if (message.scheduling != null && message.hasOwnProperty("scheduling")) { - object.scheduling = $root.google.cloud.backupdr.v1.Scheduling.toObject(message.scheduling, options); - if (options.oneofs) - object._scheduling = "scheduling"; - } - if (message.serviceAccounts && message.serviceAccounts.length) { - object.serviceAccounts = []; - for (var j = 0; j < message.serviceAccounts.length; ++j) - object.serviceAccounts[j] = $root.google.cloud.backupdr.v1.ServiceAccount.toObject(message.serviceAccounts[j], options); - } - if (message.tags != null && message.hasOwnProperty("tags")) { - object.tags = $root.google.cloud.backupdr.v1.Tags.toObject(message.tags, options); - if (options.oneofs) - object._tags = "tags"; - } - return object; - }; - - /** - * Converts this ComputeInstanceRestoreProperties to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - * @returns {Object.} JSON object - */ - ComputeInstanceRestoreProperties.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComputeInstanceRestoreProperties - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComputeInstanceRestoreProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceRestoreProperties"; - }; - - /** - * InstancePrivateIpv6GoogleAccess enum. - * @name google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess - * @enum {number} - * @property {number} INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED=0 INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED value - * @property {number} INHERIT_FROM_SUBNETWORK=1 INHERIT_FROM_SUBNETWORK value - * @property {number} ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE=2 ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE value - * @property {number} ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE=3 ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE value - */ - ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED"] = 0; - values[valuesById[1] = "INHERIT_FROM_SUBNETWORK"] = 1; - values[valuesById[2] = "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE"] = 2; - values[valuesById[3] = "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE"] = 3; - return values; - })(); - - return ComputeInstanceRestoreProperties; - })(); - - v1.ComputeInstanceTargetEnvironment = (function() { - - /** - * Properties of a ComputeInstanceTargetEnvironment. - * @memberof google.cloud.backupdr.v1 - * @interface IComputeInstanceTargetEnvironment - * @property {string|null} [project] ComputeInstanceTargetEnvironment project - * @property {string|null} [zone] ComputeInstanceTargetEnvironment zone - */ - - /** - * Constructs a new ComputeInstanceTargetEnvironment. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ComputeInstanceTargetEnvironment. - * @implements IComputeInstanceTargetEnvironment - * @constructor - * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment=} [properties] Properties to set - */ - function ComputeInstanceTargetEnvironment(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComputeInstanceTargetEnvironment project. - * @member {string} project - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @instance - */ - ComputeInstanceTargetEnvironment.prototype.project = ""; - - /** - * ComputeInstanceTargetEnvironment zone. - * @member {string} zone - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @instance - */ - ComputeInstanceTargetEnvironment.prototype.zone = ""; - - /** - * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment instance - */ - ComputeInstanceTargetEnvironment.create = function create(properties) { - return new ComputeInstanceTargetEnvironment(properties); - }; - - /** - * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceTargetEnvironment.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - return writer; - }; - - /** - * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceTargetEnvironment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceTargetEnvironment.decode = function 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.backupdr.v1.ComputeInstanceTargetEnvironment(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.project = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceTargetEnvironment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComputeInstanceTargetEnvironment message. - * @function verify - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComputeInstanceTargetEnvironment.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.project != null && message.hasOwnProperty("project")) - if (!$util.isString(message.project)) - return "project: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - return null; - }; - - /** - * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment - */ - ComputeInstanceTargetEnvironment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment) - return object; - var message = new $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment(); - if (object.project != null) - message.project = String(object.project); - if (object.zone != null) - message.zone = String(object.zone); - return message; - }; - - /** - * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComputeInstanceTargetEnvironment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.project = ""; - object.zone = ""; - } - if (message.project != null && message.hasOwnProperty("project")) - object.project = message.project; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - return object; - }; - - /** - * Converts this ComputeInstanceTargetEnvironment to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @instance - * @returns {Object.} JSON object - */ - ComputeInstanceTargetEnvironment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComputeInstanceTargetEnvironment - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComputeInstanceTargetEnvironment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment"; - }; - - return ComputeInstanceTargetEnvironment; - })(); - - v1.ComputeInstanceDataSourceProperties = (function() { - - /** - * Properties of a ComputeInstanceDataSourceProperties. - * @memberof google.cloud.backupdr.v1 - * @interface IComputeInstanceDataSourceProperties - * @property {string|null} [name] ComputeInstanceDataSourceProperties name - * @property {string|null} [description] ComputeInstanceDataSourceProperties description - * @property {string|null} [machineType] ComputeInstanceDataSourceProperties machineType - * @property {number|Long|null} [totalDiskCount] ComputeInstanceDataSourceProperties totalDiskCount - * @property {number|Long|null} [totalDiskSizeGb] ComputeInstanceDataSourceProperties totalDiskSizeGb - */ - - /** - * Constructs a new ComputeInstanceDataSourceProperties. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ComputeInstanceDataSourceProperties. - * @implements IComputeInstanceDataSourceProperties - * @constructor - * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties=} [properties] Properties to set - */ - function ComputeInstanceDataSourceProperties(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComputeInstanceDataSourceProperties name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @instance - */ - ComputeInstanceDataSourceProperties.prototype.name = ""; - - /** - * ComputeInstanceDataSourceProperties description. - * @member {string} description - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @instance - */ - ComputeInstanceDataSourceProperties.prototype.description = ""; - - /** - * ComputeInstanceDataSourceProperties machineType. - * @member {string} machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @instance - */ - ComputeInstanceDataSourceProperties.prototype.machineType = ""; - - /** - * ComputeInstanceDataSourceProperties totalDiskCount. - * @member {number|Long} totalDiskCount - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @instance - */ - ComputeInstanceDataSourceProperties.prototype.totalDiskCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ComputeInstanceDataSourceProperties totalDiskSizeGb. - * @member {number|Long} totalDiskSizeGb - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @instance - */ - ComputeInstanceDataSourceProperties.prototype.totalDiskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties instance - */ - ComputeInstanceDataSourceProperties.create = function create(properties) { - return new ComputeInstanceDataSourceProperties(properties); - }; - - /** - * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceDataSourceProperties.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.machineType); - if (message.totalDiskCount != null && Object.hasOwnProperty.call(message, "totalDiskCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.totalDiskCount); - if (message.totalDiskSizeGb != null && Object.hasOwnProperty.call(message, "totalDiskSizeGb")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.totalDiskSizeGb); - return writer; - }; - - /** - * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceDataSourceProperties.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceDataSourceProperties.decode = function 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.backupdr.v1.ComputeInstanceDataSourceProperties(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.machineType = reader.string(); - break; - } - case 4: { - message.totalDiskCount = reader.int64(); - break; - } - case 5: { - message.totalDiskSizeGb = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceDataSourceProperties.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComputeInstanceDataSourceProperties message. - * @function verify - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComputeInstanceDataSourceProperties.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.machineType != null && message.hasOwnProperty("machineType")) - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - if (message.totalDiskCount != null && message.hasOwnProperty("totalDiskCount")) - if (!$util.isInteger(message.totalDiskCount) && !(message.totalDiskCount && $util.isInteger(message.totalDiskCount.low) && $util.isInteger(message.totalDiskCount.high))) - return "totalDiskCount: integer|Long expected"; - if (message.totalDiskSizeGb != null && message.hasOwnProperty("totalDiskSizeGb")) - if (!$util.isInteger(message.totalDiskSizeGb) && !(message.totalDiskSizeGb && $util.isInteger(message.totalDiskSizeGb.low) && $util.isInteger(message.totalDiskSizeGb.high))) - return "totalDiskSizeGb: integer|Long expected"; - return null; - }; - - /** - * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties - */ - ComputeInstanceDataSourceProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties) - return object; - var message = new $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.machineType != null) - message.machineType = String(object.machineType); - if (object.totalDiskCount != null) - if ($util.Long) - (message.totalDiskCount = $util.Long.fromValue(object.totalDiskCount)).unsigned = false; - else if (typeof object.totalDiskCount === "string") - message.totalDiskCount = parseInt(object.totalDiskCount, 10); - else if (typeof object.totalDiskCount === "number") - message.totalDiskCount = object.totalDiskCount; - else if (typeof object.totalDiskCount === "object") - message.totalDiskCount = new $util.LongBits(object.totalDiskCount.low >>> 0, object.totalDiskCount.high >>> 0).toNumber(); - if (object.totalDiskSizeGb != null) - if ($util.Long) - (message.totalDiskSizeGb = $util.Long.fromValue(object.totalDiskSizeGb)).unsigned = false; - else if (typeof object.totalDiskSizeGb === "string") - message.totalDiskSizeGb = parseInt(object.totalDiskSizeGb, 10); - else if (typeof object.totalDiskSizeGb === "number") - message.totalDiskSizeGb = object.totalDiskSizeGb; - else if (typeof object.totalDiskSizeGb === "object") - message.totalDiskSizeGb = new $util.LongBits(object.totalDiskSizeGb.low >>> 0, object.totalDiskSizeGb.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComputeInstanceDataSourceProperties.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.machineType = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalDiskCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalDiskCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalDiskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalDiskSizeGb = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.machineType != null && message.hasOwnProperty("machineType")) - object.machineType = message.machineType; - if (message.totalDiskCount != null && message.hasOwnProperty("totalDiskCount")) - if (typeof message.totalDiskCount === "number") - object.totalDiskCount = options.longs === String ? String(message.totalDiskCount) : message.totalDiskCount; - else - object.totalDiskCount = options.longs === String ? $util.Long.prototype.toString.call(message.totalDiskCount) : options.longs === Number ? new $util.LongBits(message.totalDiskCount.low >>> 0, message.totalDiskCount.high >>> 0).toNumber() : message.totalDiskCount; - if (message.totalDiskSizeGb != null && message.hasOwnProperty("totalDiskSizeGb")) - if (typeof message.totalDiskSizeGb === "number") - object.totalDiskSizeGb = options.longs === String ? String(message.totalDiskSizeGb) : message.totalDiskSizeGb; - else - object.totalDiskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.totalDiskSizeGb) : options.longs === Number ? new $util.LongBits(message.totalDiskSizeGb.low >>> 0, message.totalDiskSizeGb.high >>> 0).toNumber() : message.totalDiskSizeGb; - return object; - }; - - /** - * Converts this ComputeInstanceDataSourceProperties to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @instance - * @returns {Object.} JSON object - */ - ComputeInstanceDataSourceProperties.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComputeInstanceDataSourceProperties - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComputeInstanceDataSourceProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties"; - }; - - return ComputeInstanceDataSourceProperties; - })(); - - v1.AdvancedMachineFeatures = (function() { - - /** - * Properties of an AdvancedMachineFeatures. - * @memberof google.cloud.backupdr.v1 - * @interface IAdvancedMachineFeatures - * @property {boolean|null} [enableNestedVirtualization] AdvancedMachineFeatures enableNestedVirtualization - * @property {number|null} [threadsPerCore] AdvancedMachineFeatures threadsPerCore - * @property {number|null} [visibleCoreCount] AdvancedMachineFeatures visibleCoreCount - * @property {boolean|null} [enableUefiNetworking] AdvancedMachineFeatures enableUefiNetworking - */ - - /** - * Constructs a new AdvancedMachineFeatures. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AdvancedMachineFeatures. - * @implements IAdvancedMachineFeatures - * @constructor - * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures=} [properties] Properties to set - */ - function AdvancedMachineFeatures(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AdvancedMachineFeatures enableNestedVirtualization. - * @member {boolean|null|undefined} enableNestedVirtualization - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.enableNestedVirtualization = null; - - /** - * AdvancedMachineFeatures threadsPerCore. - * @member {number|null|undefined} threadsPerCore - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.threadsPerCore = null; - - /** - * AdvancedMachineFeatures visibleCoreCount. - * @member {number|null|undefined} visibleCoreCount - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.visibleCoreCount = null; - - /** - * AdvancedMachineFeatures enableUefiNetworking. - * @member {boolean|null|undefined} enableUefiNetworking - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.enableUefiNetworking = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AdvancedMachineFeatures _enableNestedVirtualization. - * @member {"enableNestedVirtualization"|undefined} _enableNestedVirtualization - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableNestedVirtualization", { - get: $util.oneOfGetter($oneOfFields = ["enableNestedVirtualization"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AdvancedMachineFeatures _threadsPerCore. - * @member {"threadsPerCore"|undefined} _threadsPerCore - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_threadsPerCore", { - get: $util.oneOfGetter($oneOfFields = ["threadsPerCore"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AdvancedMachineFeatures _visibleCoreCount. - * @member {"visibleCoreCount"|undefined} _visibleCoreCount - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_visibleCoreCount", { - get: $util.oneOfGetter($oneOfFields = ["visibleCoreCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AdvancedMachineFeatures _enableUefiNetworking. - * @member {"enableUefiNetworking"|undefined} _enableUefiNetworking - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableUefiNetworking", { - get: $util.oneOfGetter($oneOfFields = ["enableUefiNetworking"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AdvancedMachineFeatures instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures instance - */ - AdvancedMachineFeatures.create = function create(properties) { - return new AdvancedMachineFeatures(properties); - }; - - /** - * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdvancedMachineFeatures.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableNestedVirtualization != null && Object.hasOwnProperty.call(message, "enableNestedVirtualization")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableNestedVirtualization); - if (message.threadsPerCore != null && Object.hasOwnProperty.call(message, "threadsPerCore")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.threadsPerCore); - if (message.visibleCoreCount != null && Object.hasOwnProperty.call(message, "visibleCoreCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.visibleCoreCount); - if (message.enableUefiNetworking != null && Object.hasOwnProperty.call(message, "enableUefiNetworking")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enableUefiNetworking); - return writer; - }; - - /** - * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdvancedMachineFeatures.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdvancedMachineFeatures.decode = function 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.backupdr.v1.AdvancedMachineFeatures(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableNestedVirtualization = reader.bool(); - break; - } - case 2: { - message.threadsPerCore = reader.int32(); - break; - } - case 3: { - message.visibleCoreCount = reader.int32(); - break; - } - case 4: { - message.enableUefiNetworking = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdvancedMachineFeatures.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AdvancedMachineFeatures message. - * @function verify - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AdvancedMachineFeatures.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { - properties._enableNestedVirtualization = 1; - if (typeof message.enableNestedVirtualization !== "boolean") - return "enableNestedVirtualization: boolean expected"; - } - if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { - properties._threadsPerCore = 1; - if (!$util.isInteger(message.threadsPerCore)) - return "threadsPerCore: integer expected"; - } - if (message.visibleCoreCount != null && message.hasOwnProperty("visibleCoreCount")) { - properties._visibleCoreCount = 1; - if (!$util.isInteger(message.visibleCoreCount)) - return "visibleCoreCount: integer expected"; - } - if (message.enableUefiNetworking != null && message.hasOwnProperty("enableUefiNetworking")) { - properties._enableUefiNetworking = 1; - if (typeof message.enableUefiNetworking !== "boolean") - return "enableUefiNetworking: boolean expected"; - } - return null; - }; - - /** - * Creates an AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures - */ - AdvancedMachineFeatures.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AdvancedMachineFeatures) - return object; - var message = new $root.google.cloud.backupdr.v1.AdvancedMachineFeatures(); - if (object.enableNestedVirtualization != null) - message.enableNestedVirtualization = Boolean(object.enableNestedVirtualization); - if (object.threadsPerCore != null) - message.threadsPerCore = object.threadsPerCore | 0; - if (object.visibleCoreCount != null) - message.visibleCoreCount = object.visibleCoreCount | 0; - if (object.enableUefiNetworking != null) - message.enableUefiNetworking = Boolean(object.enableUefiNetworking); - return message; - }; - - /** - * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {google.cloud.backupdr.v1.AdvancedMachineFeatures} message AdvancedMachineFeatures - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AdvancedMachineFeatures.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { - object.enableNestedVirtualization = message.enableNestedVirtualization; - if (options.oneofs) - object._enableNestedVirtualization = "enableNestedVirtualization"; - } - if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { - object.threadsPerCore = message.threadsPerCore; - if (options.oneofs) - object._threadsPerCore = "threadsPerCore"; - } - if (message.visibleCoreCount != null && message.hasOwnProperty("visibleCoreCount")) { - object.visibleCoreCount = message.visibleCoreCount; - if (options.oneofs) - object._visibleCoreCount = "visibleCoreCount"; - } - if (message.enableUefiNetworking != null && message.hasOwnProperty("enableUefiNetworking")) { - object.enableUefiNetworking = message.enableUefiNetworking; - if (options.oneofs) - object._enableUefiNetworking = "enableUefiNetworking"; - } - return object; - }; - - /** - * Converts this AdvancedMachineFeatures to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - * @returns {Object.} JSON object - */ - AdvancedMachineFeatures.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AdvancedMachineFeatures - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AdvancedMachineFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AdvancedMachineFeatures"; - }; - - return AdvancedMachineFeatures; - })(); - - v1.ConfidentialInstanceConfig = (function() { - - /** - * Properties of a ConfidentialInstanceConfig. - * @memberof google.cloud.backupdr.v1 - * @interface IConfidentialInstanceConfig - * @property {boolean|null} [enableConfidentialCompute] ConfidentialInstanceConfig enableConfidentialCompute - */ - - /** - * Constructs a new ConfidentialInstanceConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ConfidentialInstanceConfig. - * @implements IConfidentialInstanceConfig - * @constructor - * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig=} [properties] Properties to set - */ - function ConfidentialInstanceConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConfidentialInstanceConfig enableConfidentialCompute. - * @member {boolean|null|undefined} enableConfidentialCompute - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @instance - */ - ConfidentialInstanceConfig.prototype.enableConfidentialCompute = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ConfidentialInstanceConfig _enableConfidentialCompute. - * @member {"enableConfidentialCompute"|undefined} _enableConfidentialCompute - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @instance - */ - Object.defineProperty(ConfidentialInstanceConfig.prototype, "_enableConfidentialCompute", { - get: $util.oneOfGetter($oneOfFields = ["enableConfidentialCompute"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ConfidentialInstanceConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig instance - */ - ConfidentialInstanceConfig.create = function create(properties) { - return new ConfidentialInstanceConfig(properties); - }; - - /** - * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig} message ConfidentialInstanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidentialInstanceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableConfidentialCompute != null && Object.hasOwnProperty.call(message, "enableConfidentialCompute")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableConfidentialCompute); - return writer; - }; - - /** - * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig} message ConfidentialInstanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidentialInstanceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidentialInstanceConfig.decode = function 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.backupdr.v1.ConfidentialInstanceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableConfidentialCompute = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidentialInstanceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConfidentialInstanceConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConfidentialInstanceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enableConfidentialCompute != null && message.hasOwnProperty("enableConfidentialCompute")) { - properties._enableConfidentialCompute = 1; - if (typeof message.enableConfidentialCompute !== "boolean") - return "enableConfidentialCompute: boolean expected"; - } - return null; - }; - - /** - * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig - */ - ConfidentialInstanceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig(); - if (object.enableConfidentialCompute != null) - message.enableConfidentialCompute = Boolean(object.enableConfidentialCompute); - return message; - }; - - /** - * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {google.cloud.backupdr.v1.ConfidentialInstanceConfig} message ConfidentialInstanceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfidentialInstanceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.enableConfidentialCompute != null && message.hasOwnProperty("enableConfidentialCompute")) { - object.enableConfidentialCompute = message.enableConfidentialCompute; - if (options.oneofs) - object._enableConfidentialCompute = "enableConfidentialCompute"; - } - return object; - }; - - /** - * Converts this ConfidentialInstanceConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @instance - * @returns {Object.} JSON object - */ - ConfidentialInstanceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConfidentialInstanceConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConfidentialInstanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ConfidentialInstanceConfig"; - }; - - return ConfidentialInstanceConfig; - })(); - - v1.DisplayDevice = (function() { - - /** - * Properties of a DisplayDevice. - * @memberof google.cloud.backupdr.v1 - * @interface IDisplayDevice - * @property {boolean|null} [enableDisplay] DisplayDevice enableDisplay - */ - - /** - * Constructs a new DisplayDevice. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DisplayDevice. - * @implements IDisplayDevice - * @constructor - * @param {google.cloud.backupdr.v1.IDisplayDevice=} [properties] Properties to set - */ - function DisplayDevice(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DisplayDevice enableDisplay. - * @member {boolean|null|undefined} enableDisplay - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @instance - */ - DisplayDevice.prototype.enableDisplay = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DisplayDevice _enableDisplay. - * @member {"enableDisplay"|undefined} _enableDisplay - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @instance - */ - Object.defineProperty(DisplayDevice.prototype, "_enableDisplay", { - get: $util.oneOfGetter($oneOfFields = ["enableDisplay"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DisplayDevice instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {google.cloud.backupdr.v1.IDisplayDevice=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice instance - */ - DisplayDevice.create = function create(properties) { - return new DisplayDevice(properties); - }; - - /** - * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {google.cloud.backupdr.v1.IDisplayDevice} message DisplayDevice message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DisplayDevice.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableDisplay != null && Object.hasOwnProperty.call(message, "enableDisplay")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableDisplay); - return writer; - }; - - /** - * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {google.cloud.backupdr.v1.IDisplayDevice} message DisplayDevice message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DisplayDevice.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DisplayDevice message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DisplayDevice.decode = function 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.backupdr.v1.DisplayDevice(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableDisplay = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DisplayDevice.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DisplayDevice message. - * @function verify - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DisplayDevice.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enableDisplay != null && message.hasOwnProperty("enableDisplay")) { - properties._enableDisplay = 1; - if (typeof message.enableDisplay !== "boolean") - return "enableDisplay: boolean expected"; - } - return null; - }; - - /** - * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice - */ - DisplayDevice.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DisplayDevice) - return object; - var message = new $root.google.cloud.backupdr.v1.DisplayDevice(); - if (object.enableDisplay != null) - message.enableDisplay = Boolean(object.enableDisplay); - return message; - }; - - /** - * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {google.cloud.backupdr.v1.DisplayDevice} message DisplayDevice - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DisplayDevice.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.enableDisplay != null && message.hasOwnProperty("enableDisplay")) { - object.enableDisplay = message.enableDisplay; - if (options.oneofs) - object._enableDisplay = "enableDisplay"; - } - return object; - }; - - /** - * Converts this DisplayDevice to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @instance - * @returns {Object.} JSON object - */ - DisplayDevice.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DisplayDevice - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DisplayDevice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DisplayDevice"; - }; - - return DisplayDevice; - })(); - - v1.AcceleratorConfig = (function() { - - /** - * Properties of an AcceleratorConfig. - * @memberof google.cloud.backupdr.v1 - * @interface IAcceleratorConfig - * @property {string|null} [acceleratorType] AcceleratorConfig acceleratorType - * @property {number|null} [acceleratorCount] AcceleratorConfig acceleratorCount - */ - - /** - * Constructs a new AcceleratorConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AcceleratorConfig. - * @implements IAcceleratorConfig - * @constructor - * @param {google.cloud.backupdr.v1.IAcceleratorConfig=} [properties] Properties to set - */ - function AcceleratorConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AcceleratorConfig acceleratorType. - * @member {string|null|undefined} acceleratorType - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @instance - */ - AcceleratorConfig.prototype.acceleratorType = null; - - /** - * AcceleratorConfig acceleratorCount. - * @member {number|null|undefined} acceleratorCount - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @instance - */ - AcceleratorConfig.prototype.acceleratorCount = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AcceleratorConfig _acceleratorType. - * @member {"acceleratorType"|undefined} _acceleratorType - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @instance - */ - Object.defineProperty(AcceleratorConfig.prototype, "_acceleratorType", { - get: $util.oneOfGetter($oneOfFields = ["acceleratorType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AcceleratorConfig _acceleratorCount. - * @member {"acceleratorCount"|undefined} _acceleratorCount - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @instance - */ - Object.defineProperty(AcceleratorConfig.prototype, "_acceleratorCount", { - get: $util.oneOfGetter($oneOfFields = ["acceleratorCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AcceleratorConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {google.cloud.backupdr.v1.IAcceleratorConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig instance - */ - AcceleratorConfig.create = function create(properties) { - return new AcceleratorConfig(properties); - }; - - /** - * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {google.cloud.backupdr.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AcceleratorConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.acceleratorType != null && Object.hasOwnProperty.call(message, "acceleratorType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.acceleratorType); - if (message.acceleratorCount != null && Object.hasOwnProperty.call(message, "acceleratorCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.acceleratorCount); - return writer; - }; - - /** - * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {google.cloud.backupdr.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AcceleratorConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AcceleratorConfig.decode = function 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.backupdr.v1.AcceleratorConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.acceleratorType = reader.string(); - break; - } - case 2: { - message.acceleratorCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AcceleratorConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AcceleratorConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AcceleratorConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) { - properties._acceleratorType = 1; - if (!$util.isString(message.acceleratorType)) - return "acceleratorType: string expected"; - } - if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) { - properties._acceleratorCount = 1; - if (!$util.isInteger(message.acceleratorCount)) - return "acceleratorCount: integer expected"; - } - return null; - }; - - /** - * Creates an AcceleratorConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig - */ - AcceleratorConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AcceleratorConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.AcceleratorConfig(); - if (object.acceleratorType != null) - message.acceleratorType = String(object.acceleratorType); - if (object.acceleratorCount != null) - message.acceleratorCount = object.acceleratorCount | 0; - return message; - }; - - /** - * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {google.cloud.backupdr.v1.AcceleratorConfig} message AcceleratorConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AcceleratorConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) { - object.acceleratorType = message.acceleratorType; - if (options.oneofs) - object._acceleratorType = "acceleratorType"; - } - if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) { - object.acceleratorCount = message.acceleratorCount; - if (options.oneofs) - object._acceleratorCount = "acceleratorCount"; - } - return object; - }; - - /** - * Converts this AcceleratorConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @instance - * @returns {Object.} JSON object - */ - AcceleratorConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AcceleratorConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AcceleratorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AcceleratorConfig"; - }; - - return AcceleratorConfig; - })(); - - v1.CustomerEncryptionKey = (function() { - - /** - * Properties of a CustomerEncryptionKey. - * @memberof google.cloud.backupdr.v1 - * @interface ICustomerEncryptionKey - * @property {string|null} [rawKey] CustomerEncryptionKey rawKey - * @property {string|null} [rsaEncryptedKey] CustomerEncryptionKey rsaEncryptedKey - * @property {string|null} [kmsKeyName] CustomerEncryptionKey kmsKeyName - * @property {string|null} [kmsKeyServiceAccount] CustomerEncryptionKey kmsKeyServiceAccount - */ - - /** - * Constructs a new CustomerEncryptionKey. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CustomerEncryptionKey. - * @implements ICustomerEncryptionKey - * @constructor - * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey=} [properties] Properties to set - */ - function CustomerEncryptionKey(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomerEncryptionKey rawKey. - * @member {string|null|undefined} rawKey - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - CustomerEncryptionKey.prototype.rawKey = null; - - /** - * CustomerEncryptionKey rsaEncryptedKey. - * @member {string|null|undefined} rsaEncryptedKey - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - CustomerEncryptionKey.prototype.rsaEncryptedKey = null; - - /** - * CustomerEncryptionKey kmsKeyName. - * @member {string|null|undefined} kmsKeyName - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - CustomerEncryptionKey.prototype.kmsKeyName = null; - - /** - * CustomerEncryptionKey kmsKeyServiceAccount. - * @member {string|null|undefined} kmsKeyServiceAccount - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - CustomerEncryptionKey.prototype.kmsKeyServiceAccount = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CustomerEncryptionKey key. - * @member {"rawKey"|"rsaEncryptedKey"|"kmsKeyName"|undefined} key - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - Object.defineProperty(CustomerEncryptionKey.prototype, "key", { - get: $util.oneOfGetter($oneOfFields = ["rawKey", "rsaEncryptedKey", "kmsKeyName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * CustomerEncryptionKey _kmsKeyServiceAccount. - * @member {"kmsKeyServiceAccount"|undefined} _kmsKeyServiceAccount - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - Object.defineProperty(CustomerEncryptionKey.prototype, "_kmsKeyServiceAccount", { - get: $util.oneOfGetter($oneOfFields = ["kmsKeyServiceAccount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CustomerEncryptionKey instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey instance - */ - CustomerEncryptionKey.create = function create(properties) { - return new CustomerEncryptionKey(properties); - }; - - /** - * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey} message CustomerEncryptionKey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomerEncryptionKey.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rawKey != null && Object.hasOwnProperty.call(message, "rawKey")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.rawKey); - if (message.rsaEncryptedKey != null && Object.hasOwnProperty.call(message, "rsaEncryptedKey")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.rsaEncryptedKey); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyName); - if (message.kmsKeyServiceAccount != null && Object.hasOwnProperty.call(message, "kmsKeyServiceAccount")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.kmsKeyServiceAccount); - return writer; - }; - - /** - * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey} message CustomerEncryptionKey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomerEncryptionKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomerEncryptionKey message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomerEncryptionKey.decode = function 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.backupdr.v1.CustomerEncryptionKey(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rawKey = reader.string(); - break; - } - case 2: { - message.rsaEncryptedKey = reader.string(); - break; - } - case 3: { - message.kmsKeyName = reader.string(); - break; - } - case 4: { - message.kmsKeyServiceAccount = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomerEncryptionKey.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomerEncryptionKey message. - * @function verify - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomerEncryptionKey.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.rawKey != null && message.hasOwnProperty("rawKey")) { - properties.key = 1; - if (!$util.isString(message.rawKey)) - return "rawKey: string expected"; - } - if (message.rsaEncryptedKey != null && message.hasOwnProperty("rsaEncryptedKey")) { - if (properties.key === 1) - return "key: multiple values"; - properties.key = 1; - if (!$util.isString(message.rsaEncryptedKey)) - return "rsaEncryptedKey: string expected"; - } - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { - if (properties.key === 1) - return "key: multiple values"; - properties.key = 1; - if (!$util.isString(message.kmsKeyName)) - return "kmsKeyName: string expected"; - } - if (message.kmsKeyServiceAccount != null && message.hasOwnProperty("kmsKeyServiceAccount")) { - properties._kmsKeyServiceAccount = 1; - if (!$util.isString(message.kmsKeyServiceAccount)) - return "kmsKeyServiceAccount: string expected"; - } - return null; - }; - - /** - * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey - */ - CustomerEncryptionKey.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CustomerEncryptionKey) - return object; - var message = new $root.google.cloud.backupdr.v1.CustomerEncryptionKey(); - if (object.rawKey != null) - message.rawKey = String(object.rawKey); - if (object.rsaEncryptedKey != null) - message.rsaEncryptedKey = String(object.rsaEncryptedKey); - if (object.kmsKeyName != null) - message.kmsKeyName = String(object.kmsKeyName); - if (object.kmsKeyServiceAccount != null) - message.kmsKeyServiceAccount = String(object.kmsKeyServiceAccount); - return message; - }; - - /** - * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {google.cloud.backupdr.v1.CustomerEncryptionKey} message CustomerEncryptionKey - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomerEncryptionKey.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.rawKey != null && message.hasOwnProperty("rawKey")) { - object.rawKey = message.rawKey; - if (options.oneofs) - object.key = "rawKey"; - } - if (message.rsaEncryptedKey != null && message.hasOwnProperty("rsaEncryptedKey")) { - object.rsaEncryptedKey = message.rsaEncryptedKey; - if (options.oneofs) - object.key = "rsaEncryptedKey"; - } - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { - object.kmsKeyName = message.kmsKeyName; - if (options.oneofs) - object.key = "kmsKeyName"; - } - if (message.kmsKeyServiceAccount != null && message.hasOwnProperty("kmsKeyServiceAccount")) { - object.kmsKeyServiceAccount = message.kmsKeyServiceAccount; - if (options.oneofs) - object._kmsKeyServiceAccount = "kmsKeyServiceAccount"; - } - return object; - }; - - /** - * Converts this CustomerEncryptionKey to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - * @returns {Object.} JSON object - */ - CustomerEncryptionKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomerEncryptionKey - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomerEncryptionKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CustomerEncryptionKey"; - }; - - return CustomerEncryptionKey; - })(); - - v1.Entry = (function() { - - /** - * Properties of an Entry. - * @memberof google.cloud.backupdr.v1 - * @interface IEntry - * @property {string|null} [key] Entry key - * @property {string|null} [value] Entry value - */ - - /** - * Constructs a new Entry. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an Entry. - * @implements IEntry - * @constructor - * @param {google.cloud.backupdr.v1.IEntry=} [properties] Properties to set - */ - function Entry(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Entry key. - * @member {string|null|undefined} key - * @memberof google.cloud.backupdr.v1.Entry - * @instance - */ - Entry.prototype.key = null; - - /** - * Entry value. - * @member {string|null|undefined} value - * @memberof google.cloud.backupdr.v1.Entry - * @instance - */ - Entry.prototype.value = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Entry _key. - * @member {"key"|undefined} _key - * @memberof google.cloud.backupdr.v1.Entry - * @instance - */ - Object.defineProperty(Entry.prototype, "_key", { - get: $util.oneOfGetter($oneOfFields = ["key"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Entry _value. - * @member {"value"|undefined} _value - * @memberof google.cloud.backupdr.v1.Entry - * @instance - */ - Object.defineProperty(Entry.prototype, "_value", { - get: $util.oneOfGetter($oneOfFields = ["value"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Entry instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {google.cloud.backupdr.v1.IEntry=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Entry} Entry instance - */ - Entry.create = function create(properties) { - return new Entry(properties); - }; - - /** - * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {google.cloud.backupdr.v1.IEntry} message Entry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - return writer; - }; - - /** - * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {google.cloud.backupdr.v1.IEntry} message Entry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Entry message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Entry} Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entry.decode = function 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.backupdr.v1.Entry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.key = reader.string(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Entry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Entry} Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Entry message. - * @function verify - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Entry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.key != null && message.hasOwnProperty("key")) { - properties._key = 1; - if (!$util.isString(message.key)) - return "key: string expected"; - } - if (message.value != null && message.hasOwnProperty("value")) { - properties._value = 1; - if (!$util.isString(message.value)) - return "value: string expected"; - } - return null; - }; - - /** - * Creates an Entry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Entry} Entry - */ - Entry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Entry) - return object; - var message = new $root.google.cloud.backupdr.v1.Entry(); - if (object.key != null) - message.key = String(object.key); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an Entry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {google.cloud.backupdr.v1.Entry} message Entry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Entry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.key != null && message.hasOwnProperty("key")) { - object.key = message.key; - if (options.oneofs) - object._key = "key"; - } - if (message.value != null && message.hasOwnProperty("value")) { - object.value = message.value; - if (options.oneofs) - object._value = "value"; - } - return object; - }; - - /** - * Converts this Entry to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Entry - * @instance - * @returns {Object.} JSON object - */ - Entry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Entry - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Entry"; - }; - - return Entry; - })(); - - v1.Metadata = (function() { - - /** - * Properties of a Metadata. - * @memberof google.cloud.backupdr.v1 - * @interface IMetadata - * @property {Array.|null} [items] Metadata items - */ - - /** - * Constructs a new Metadata. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a Metadata. - * @implements IMetadata - * @constructor - * @param {google.cloud.backupdr.v1.IMetadata=} [properties] Properties to set - */ - function Metadata(properties) { - this.items = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Metadata items. - * @member {Array.} items - * @memberof google.cloud.backupdr.v1.Metadata - * @instance - */ - Metadata.prototype.items = $util.emptyArray; - - /** - * Creates a new Metadata instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {google.cloud.backupdr.v1.IMetadata=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Metadata} Metadata instance - */ - Metadata.create = function create(properties) { - return new Metadata(properties); - }; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {google.cloud.backupdr.v1.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.items != null && message.items.length) - for (var i = 0; i < message.items.length; ++i) - $root.google.cloud.backupdr.v1.Entry.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {google.cloud.backupdr.v1.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decode = function 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.backupdr.v1.Metadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.items && message.items.length)) - message.items = []; - message.items.push($root.google.cloud.backupdr.v1.Entry.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Metadata message. - * @function verify - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.items != null && message.hasOwnProperty("items")) { - if (!Array.isArray(message.items)) - return "items: array expected"; - for (var i = 0; i < message.items.length; ++i) { - var error = $root.google.cloud.backupdr.v1.Entry.verify(message.items[i]); - if (error) - return "items." + error; - } - } - return null; - }; - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Metadata} Metadata - */ - Metadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Metadata) - return object; - var message = new $root.google.cloud.backupdr.v1.Metadata(); - if (object.items) { - if (!Array.isArray(object.items)) - throw TypeError(".google.cloud.backupdr.v1.Metadata.items: array expected"); - message.items = []; - for (var i = 0; i < object.items.length; ++i) { - if (typeof object.items[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.Metadata.items: object expected"); - message.items[i] = $root.google.cloud.backupdr.v1.Entry.fromObject(object.items[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {google.cloud.backupdr.v1.Metadata} message Metadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.items = []; - if (message.items && message.items.length) { - object.items = []; - for (var j = 0; j < message.items.length; ++j) - object.items[j] = $root.google.cloud.backupdr.v1.Entry.toObject(message.items[j], options); - } - return object; - }; - - /** - * Converts this Metadata to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Metadata - * @instance - * @returns {Object.} JSON object - */ - Metadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Metadata - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Metadata"; - }; - - return Metadata; - })(); - - v1.NetworkInterface = (function() { - - /** - * Properties of a NetworkInterface. - * @memberof google.cloud.backupdr.v1 - * @interface INetworkInterface - * @property {string|null} [network] NetworkInterface network - * @property {string|null} [subnetwork] NetworkInterface subnetwork - * @property {string|null} [ipAddress] NetworkInterface ipAddress - * @property {string|null} [ipv6Address] NetworkInterface ipv6Address - * @property {number|null} [internalIpv6PrefixLength] NetworkInterface internalIpv6PrefixLength - * @property {string|null} [name] NetworkInterface name - * @property {Array.|null} [accessConfigs] NetworkInterface accessConfigs - * @property {Array.|null} [ipv6AccessConfigs] NetworkInterface ipv6AccessConfigs - * @property {Array.|null} [aliasIpRanges] NetworkInterface aliasIpRanges - * @property {google.cloud.backupdr.v1.NetworkInterface.StackType|null} [stackType] NetworkInterface stackType - * @property {google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null} [ipv6AccessType] NetworkInterface ipv6AccessType - * @property {number|null} [queueCount] NetworkInterface queueCount - * @property {google.cloud.backupdr.v1.NetworkInterface.NicType|null} [nicType] NetworkInterface nicType - * @property {string|null} [networkAttachment] NetworkInterface networkAttachment - */ - - /** - * Constructs a new NetworkInterface. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a NetworkInterface. - * @implements INetworkInterface - * @constructor - * @param {google.cloud.backupdr.v1.INetworkInterface=} [properties] Properties to set - */ - function NetworkInterface(properties) { - this.accessConfigs = []; - this.ipv6AccessConfigs = []; - this.aliasIpRanges = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkInterface network. - * @member {string|null|undefined} network - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.network = null; - - /** - * NetworkInterface subnetwork. - * @member {string|null|undefined} subnetwork - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.subnetwork = null; - - /** - * NetworkInterface ipAddress. - * @member {string|null|undefined} ipAddress - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.ipAddress = null; - - /** - * NetworkInterface ipv6Address. - * @member {string|null|undefined} ipv6Address - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.ipv6Address = null; - - /** - * NetworkInterface internalIpv6PrefixLength. - * @member {number|null|undefined} internalIpv6PrefixLength - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.internalIpv6PrefixLength = null; - - /** - * NetworkInterface name. - * @member {string|null|undefined} name - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.name = null; - - /** - * NetworkInterface accessConfigs. - * @member {Array.} accessConfigs - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.accessConfigs = $util.emptyArray; - - /** - * NetworkInterface ipv6AccessConfigs. - * @member {Array.} ipv6AccessConfigs - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.ipv6AccessConfigs = $util.emptyArray; - - /** - * NetworkInterface aliasIpRanges. - * @member {Array.} aliasIpRanges - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.aliasIpRanges = $util.emptyArray; - - /** - * NetworkInterface stackType. - * @member {google.cloud.backupdr.v1.NetworkInterface.StackType|null|undefined} stackType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.stackType = null; - - /** - * NetworkInterface ipv6AccessType. - * @member {google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null|undefined} ipv6AccessType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.ipv6AccessType = null; - - /** - * NetworkInterface queueCount. - * @member {number|null|undefined} queueCount - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.queueCount = null; - - /** - * NetworkInterface nicType. - * @member {google.cloud.backupdr.v1.NetworkInterface.NicType|null|undefined} nicType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.nicType = null; - - /** - * NetworkInterface networkAttachment. - * @member {string|null|undefined} networkAttachment - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.networkAttachment = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NetworkInterface _network. - * @member {"network"|undefined} _network - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_network", { - get: $util.oneOfGetter($oneOfFields = ["network"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _subnetwork. - * @member {"subnetwork"|undefined} _subnetwork - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_subnetwork", { - get: $util.oneOfGetter($oneOfFields = ["subnetwork"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _ipAddress. - * @member {"ipAddress"|undefined} _ipAddress - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_ipAddress", { - get: $util.oneOfGetter($oneOfFields = ["ipAddress"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _ipv6Address. - * @member {"ipv6Address"|undefined} _ipv6Address - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_ipv6Address", { - get: $util.oneOfGetter($oneOfFields = ["ipv6Address"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _internalIpv6PrefixLength. - * @member {"internalIpv6PrefixLength"|undefined} _internalIpv6PrefixLength - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_internalIpv6PrefixLength", { - get: $util.oneOfGetter($oneOfFields = ["internalIpv6PrefixLength"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _name. - * @member {"name"|undefined} _name - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _stackType. - * @member {"stackType"|undefined} _stackType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_stackType", { - get: $util.oneOfGetter($oneOfFields = ["stackType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _ipv6AccessType. - * @member {"ipv6AccessType"|undefined} _ipv6AccessType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_ipv6AccessType", { - get: $util.oneOfGetter($oneOfFields = ["ipv6AccessType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _queueCount. - * @member {"queueCount"|undefined} _queueCount - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_queueCount", { - get: $util.oneOfGetter($oneOfFields = ["queueCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _nicType. - * @member {"nicType"|undefined} _nicType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_nicType", { - get: $util.oneOfGetter($oneOfFields = ["nicType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _networkAttachment. - * @member {"networkAttachment"|undefined} _networkAttachment - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_networkAttachment", { - get: $util.oneOfGetter($oneOfFields = ["networkAttachment"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NetworkInterface instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {google.cloud.backupdr.v1.INetworkInterface=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface instance - */ - NetworkInterface.create = function create(properties) { - return new NetworkInterface(properties); - }; - - /** - * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {google.cloud.backupdr.v1.INetworkInterface} message NetworkInterface message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkInterface.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); - if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetwork); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); - if (message.ipv6Address != null && Object.hasOwnProperty.call(message, "ipv6Address")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipv6Address); - if (message.internalIpv6PrefixLength != null && Object.hasOwnProperty.call(message, "internalIpv6PrefixLength")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.internalIpv6PrefixLength); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - if (message.accessConfigs != null && message.accessConfigs.length) - for (var i = 0; i < message.accessConfigs.length; ++i) - $root.google.cloud.backupdr.v1.AccessConfig.encode(message.accessConfigs[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.ipv6AccessConfigs != null && message.ipv6AccessConfigs.length) - for (var i = 0; i < message.ipv6AccessConfigs.length; ++i) - $root.google.cloud.backupdr.v1.AccessConfig.encode(message.ipv6AccessConfigs[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.aliasIpRanges != null && message.aliasIpRanges.length) - for (var i = 0; i < message.aliasIpRanges.length; ++i) - $root.google.cloud.backupdr.v1.AliasIpRange.encode(message.aliasIpRanges[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.stackType != null && Object.hasOwnProperty.call(message, "stackType")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.stackType); - if (message.ipv6AccessType != null && Object.hasOwnProperty.call(message, "ipv6AccessType")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.ipv6AccessType); - if (message.queueCount != null && Object.hasOwnProperty.call(message, "queueCount")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.queueCount); - if (message.nicType != null && Object.hasOwnProperty.call(message, "nicType")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.nicType); - if (message.networkAttachment != null && Object.hasOwnProperty.call(message, "networkAttachment")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.networkAttachment); - return writer; - }; - - /** - * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {google.cloud.backupdr.v1.INetworkInterface} message NetworkInterface message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkInterface.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkInterface message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkInterface.decode = function 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.backupdr.v1.NetworkInterface(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.network = reader.string(); - break; - } - case 2: { - message.subnetwork = reader.string(); - break; - } - case 3: { - message.ipAddress = reader.string(); - break; - } - case 4: { - message.ipv6Address = reader.string(); - break; - } - case 5: { - message.internalIpv6PrefixLength = reader.int32(); - break; - } - case 6: { - message.name = reader.string(); - break; - } - case 7: { - if (!(message.accessConfigs && message.accessConfigs.length)) - message.accessConfigs = []; - message.accessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.ipv6AccessConfigs && message.ipv6AccessConfigs.length)) - message.ipv6AccessConfigs = []; - message.ipv6AccessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader, reader.uint32())); - break; - } - case 9: { - if (!(message.aliasIpRanges && message.aliasIpRanges.length)) - message.aliasIpRanges = []; - message.aliasIpRanges.push($root.google.cloud.backupdr.v1.AliasIpRange.decode(reader, reader.uint32())); - break; - } - case 10: { - message.stackType = reader.int32(); - break; - } - case 11: { - message.ipv6AccessType = reader.int32(); - break; - } - case 12: { - message.queueCount = reader.int32(); - break; - } - case 13: { - message.nicType = reader.int32(); - break; - } - case 14: { - message.networkAttachment = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkInterface.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkInterface message. - * @function verify - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkInterface.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.network != null && message.hasOwnProperty("network")) { - properties._network = 1; - if (!$util.isString(message.network)) - return "network: string expected"; - } - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { - properties._subnetwork = 1; - if (!$util.isString(message.subnetwork)) - return "subnetwork: string expected"; - } - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) { - properties._ipAddress = 1; - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - } - if (message.ipv6Address != null && message.hasOwnProperty("ipv6Address")) { - properties._ipv6Address = 1; - if (!$util.isString(message.ipv6Address)) - return "ipv6Address: string expected"; - } - if (message.internalIpv6PrefixLength != null && message.hasOwnProperty("internalIpv6PrefixLength")) { - properties._internalIpv6PrefixLength = 1; - if (!$util.isInteger(message.internalIpv6PrefixLength)) - return "internalIpv6PrefixLength: integer expected"; - } - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.accessConfigs != null && message.hasOwnProperty("accessConfigs")) { - if (!Array.isArray(message.accessConfigs)) - return "accessConfigs: array expected"; - for (var i = 0; i < message.accessConfigs.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AccessConfig.verify(message.accessConfigs[i]); - if (error) - return "accessConfigs." + error; - } - } - if (message.ipv6AccessConfigs != null && message.hasOwnProperty("ipv6AccessConfigs")) { - if (!Array.isArray(message.ipv6AccessConfigs)) - return "ipv6AccessConfigs: array expected"; - for (var i = 0; i < message.ipv6AccessConfigs.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AccessConfig.verify(message.ipv6AccessConfigs[i]); - if (error) - return "ipv6AccessConfigs." + error; - } - } - if (message.aliasIpRanges != null && message.hasOwnProperty("aliasIpRanges")) { - if (!Array.isArray(message.aliasIpRanges)) - return "aliasIpRanges: array expected"; - for (var i = 0; i < message.aliasIpRanges.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AliasIpRange.verify(message.aliasIpRanges[i]); - if (error) - return "aliasIpRanges." + error; - } - } - if (message.stackType != null && message.hasOwnProperty("stackType")) { - properties._stackType = 1; - switch (message.stackType) { - default: - return "stackType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { - properties._ipv6AccessType = 1; - switch (message.ipv6AccessType) { - default: - return "ipv6AccessType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.queueCount != null && message.hasOwnProperty("queueCount")) { - properties._queueCount = 1; - if (!$util.isInteger(message.queueCount)) - return "queueCount: integer expected"; - } - if (message.nicType != null && message.hasOwnProperty("nicType")) { - properties._nicType = 1; - switch (message.nicType) { - default: - return "nicType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) { - properties._networkAttachment = 1; - if (!$util.isString(message.networkAttachment)) - return "networkAttachment: string expected"; - } - return null; - }; - - /** - * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface - */ - NetworkInterface.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.NetworkInterface) - return object; - var message = new $root.google.cloud.backupdr.v1.NetworkInterface(); - if (object.network != null) - message.network = String(object.network); - if (object.subnetwork != null) - message.subnetwork = String(object.subnetwork); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.ipv6Address != null) - message.ipv6Address = String(object.ipv6Address); - if (object.internalIpv6PrefixLength != null) - message.internalIpv6PrefixLength = object.internalIpv6PrefixLength | 0; - if (object.name != null) - message.name = String(object.name); - if (object.accessConfigs) { - if (!Array.isArray(object.accessConfigs)) - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: array expected"); - message.accessConfigs = []; - for (var i = 0; i < object.accessConfigs.length; ++i) { - if (typeof object.accessConfigs[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: object expected"); - message.accessConfigs[i] = $root.google.cloud.backupdr.v1.AccessConfig.fromObject(object.accessConfigs[i]); - } - } - if (object.ipv6AccessConfigs) { - if (!Array.isArray(object.ipv6AccessConfigs)) - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.ipv6AccessConfigs: array expected"); - message.ipv6AccessConfigs = []; - for (var i = 0; i < object.ipv6AccessConfigs.length; ++i) { - if (typeof object.ipv6AccessConfigs[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.ipv6AccessConfigs: object expected"); - message.ipv6AccessConfigs[i] = $root.google.cloud.backupdr.v1.AccessConfig.fromObject(object.ipv6AccessConfigs[i]); - } - } - if (object.aliasIpRanges) { - if (!Array.isArray(object.aliasIpRanges)) - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.aliasIpRanges: array expected"); - message.aliasIpRanges = []; - for (var i = 0; i < object.aliasIpRanges.length; ++i) { - if (typeof object.aliasIpRanges[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.aliasIpRanges: object expected"); - message.aliasIpRanges[i] = $root.google.cloud.backupdr.v1.AliasIpRange.fromObject(object.aliasIpRanges[i]); - } - } - switch (object.stackType) { - default: - if (typeof object.stackType === "number") { - message.stackType = object.stackType; - break; - } - break; - case "STACK_TYPE_UNSPECIFIED": - case 0: - message.stackType = 0; - break; - case "IPV4_ONLY": - case 1: - message.stackType = 1; - break; - case "IPV4_IPV6": - case 2: - message.stackType = 2; - break; - } - switch (object.ipv6AccessType) { - default: - if (typeof object.ipv6AccessType === "number") { - message.ipv6AccessType = object.ipv6AccessType; - break; - } - break; - case "UNSPECIFIED_IPV6_ACCESS_TYPE": - case 0: - message.ipv6AccessType = 0; - break; - case "INTERNAL": - case 1: - message.ipv6AccessType = 1; - break; - case "EXTERNAL": - case 2: - message.ipv6AccessType = 2; - break; - } - if (object.queueCount != null) - message.queueCount = object.queueCount | 0; - switch (object.nicType) { - default: - if (typeof object.nicType === "number") { - message.nicType = object.nicType; - break; - } - break; - case "NIC_TYPE_UNSPECIFIED": - case 0: - message.nicType = 0; - break; - case "VIRTIO_NET": - case 1: - message.nicType = 1; - break; - case "GVNIC": - case 2: - message.nicType = 2; - break; - } - if (object.networkAttachment != null) - message.networkAttachment = String(object.networkAttachment); - return message; - }; - - /** - * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {google.cloud.backupdr.v1.NetworkInterface} message NetworkInterface - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkInterface.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.accessConfigs = []; - object.ipv6AccessConfigs = []; - object.aliasIpRanges = []; - } - if (message.network != null && message.hasOwnProperty("network")) { - object.network = message.network; - if (options.oneofs) - object._network = "network"; - } - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { - object.subnetwork = message.subnetwork; - if (options.oneofs) - object._subnetwork = "subnetwork"; - } - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) { - object.ipAddress = message.ipAddress; - if (options.oneofs) - object._ipAddress = "ipAddress"; - } - if (message.ipv6Address != null && message.hasOwnProperty("ipv6Address")) { - object.ipv6Address = message.ipv6Address; - if (options.oneofs) - object._ipv6Address = "ipv6Address"; - } - if (message.internalIpv6PrefixLength != null && message.hasOwnProperty("internalIpv6PrefixLength")) { - object.internalIpv6PrefixLength = message.internalIpv6PrefixLength; - if (options.oneofs) - object._internalIpv6PrefixLength = "internalIpv6PrefixLength"; - } - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.accessConfigs && message.accessConfigs.length) { - object.accessConfigs = []; - for (var j = 0; j < message.accessConfigs.length; ++j) - object.accessConfigs[j] = $root.google.cloud.backupdr.v1.AccessConfig.toObject(message.accessConfigs[j], options); - } - if (message.ipv6AccessConfigs && message.ipv6AccessConfigs.length) { - object.ipv6AccessConfigs = []; - for (var j = 0; j < message.ipv6AccessConfigs.length; ++j) - object.ipv6AccessConfigs[j] = $root.google.cloud.backupdr.v1.AccessConfig.toObject(message.ipv6AccessConfigs[j], options); - } - if (message.aliasIpRanges && message.aliasIpRanges.length) { - object.aliasIpRanges = []; - for (var j = 0; j < message.aliasIpRanges.length; ++j) - object.aliasIpRanges[j] = $root.google.cloud.backupdr.v1.AliasIpRange.toObject(message.aliasIpRanges[j], options); - } - if (message.stackType != null && message.hasOwnProperty("stackType")) { - object.stackType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.StackType[message.stackType] === undefined ? message.stackType : $root.google.cloud.backupdr.v1.NetworkInterface.StackType[message.stackType] : message.stackType; - if (options.oneofs) - object._stackType = "stackType"; - } - if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { - object.ipv6AccessType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType[message.ipv6AccessType] === undefined ? message.ipv6AccessType : $root.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType[message.ipv6AccessType] : message.ipv6AccessType; - if (options.oneofs) - object._ipv6AccessType = "ipv6AccessType"; - } - if (message.queueCount != null && message.hasOwnProperty("queueCount")) { - object.queueCount = message.queueCount; - if (options.oneofs) - object._queueCount = "queueCount"; - } - if (message.nicType != null && message.hasOwnProperty("nicType")) { - object.nicType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.NicType[message.nicType] === undefined ? message.nicType : $root.google.cloud.backupdr.v1.NetworkInterface.NicType[message.nicType] : message.nicType; - if (options.oneofs) - object._nicType = "nicType"; - } - if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) { - object.networkAttachment = message.networkAttachment; - if (options.oneofs) - object._networkAttachment = "networkAttachment"; - } - return object; - }; - - /** - * Converts this NetworkInterface to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - * @returns {Object.} JSON object - */ - NetworkInterface.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkInterface - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkInterface.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkInterface"; - }; - - /** - * StackType enum. - * @name google.cloud.backupdr.v1.NetworkInterface.StackType - * @enum {number} - * @property {number} STACK_TYPE_UNSPECIFIED=0 STACK_TYPE_UNSPECIFIED value - * @property {number} IPV4_ONLY=1 IPV4_ONLY value - * @property {number} IPV4_IPV6=2 IPV4_IPV6 value - */ - NetworkInterface.StackType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STACK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IPV4_ONLY"] = 1; - values[valuesById[2] = "IPV4_IPV6"] = 2; - return values; - })(); - - /** - * Ipv6AccessType enum. - * @name google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType - * @enum {number} - * @property {number} UNSPECIFIED_IPV6_ACCESS_TYPE=0 UNSPECIFIED_IPV6_ACCESS_TYPE value - * @property {number} INTERNAL=1 INTERNAL value - * @property {number} EXTERNAL=2 EXTERNAL value - */ - NetworkInterface.Ipv6AccessType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED_IPV6_ACCESS_TYPE"] = 0; - values[valuesById[1] = "INTERNAL"] = 1; - values[valuesById[2] = "EXTERNAL"] = 2; - return values; - })(); - - /** - * NicType enum. - * @name google.cloud.backupdr.v1.NetworkInterface.NicType - * @enum {number} - * @property {number} NIC_TYPE_UNSPECIFIED=0 NIC_TYPE_UNSPECIFIED value - * @property {number} VIRTIO_NET=1 VIRTIO_NET value - * @property {number} GVNIC=2 GVNIC value - */ - NetworkInterface.NicType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NIC_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "VIRTIO_NET"] = 1; - values[valuesById[2] = "GVNIC"] = 2; - return values; - })(); - - return NetworkInterface; - })(); - - v1.NetworkPerformanceConfig = (function() { - - /** - * Properties of a NetworkPerformanceConfig. - * @memberof google.cloud.backupdr.v1 - * @interface INetworkPerformanceConfig - * @property {google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null} [totalEgressBandwidthTier] NetworkPerformanceConfig totalEgressBandwidthTier - */ - - /** - * Constructs a new NetworkPerformanceConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a NetworkPerformanceConfig. - * @implements INetworkPerformanceConfig - * @constructor - * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig=} [properties] Properties to set - */ - function NetworkPerformanceConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkPerformanceConfig totalEgressBandwidthTier. - * @member {google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null|undefined} totalEgressBandwidthTier - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @instance - */ - NetworkPerformanceConfig.prototype.totalEgressBandwidthTier = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NetworkPerformanceConfig _totalEgressBandwidthTier. - * @member {"totalEgressBandwidthTier"|undefined} _totalEgressBandwidthTier - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @instance - */ - Object.defineProperty(NetworkPerformanceConfig.prototype, "_totalEgressBandwidthTier", { - get: $util.oneOfGetter($oneOfFields = ["totalEgressBandwidthTier"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NetworkPerformanceConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig instance - */ - NetworkPerformanceConfig.create = function create(properties) { - return new NetworkPerformanceConfig(properties); - }; - - /** - * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkPerformanceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.totalEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "totalEgressBandwidthTier")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalEgressBandwidthTier); - return writer; - }; - - /** - * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkPerformanceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkPerformanceConfig.decode = function 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.backupdr.v1.NetworkPerformanceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.totalEgressBandwidthTier = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkPerformanceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkPerformanceConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkPerformanceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { - properties._totalEgressBandwidthTier = 1; - switch (message.totalEgressBandwidthTier) { - default: - return "totalEgressBandwidthTier: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig - */ - NetworkPerformanceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.NetworkPerformanceConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.NetworkPerformanceConfig(); - switch (object.totalEgressBandwidthTier) { - default: - if (typeof object.totalEgressBandwidthTier === "number") { - message.totalEgressBandwidthTier = object.totalEgressBandwidthTier; - break; - } - break; - case "TIER_UNSPECIFIED": - case 0: - message.totalEgressBandwidthTier = 0; - break; - case "DEFAULT": - case 1: - message.totalEgressBandwidthTier = 1; - break; - case "TIER_1": - case 2: - message.totalEgressBandwidthTier = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {google.cloud.backupdr.v1.NetworkPerformanceConfig} message NetworkPerformanceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkPerformanceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { - object.totalEgressBandwidthTier = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] === undefined ? message.totalEgressBandwidthTier : $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] : message.totalEgressBandwidthTier; - if (options.oneofs) - object._totalEgressBandwidthTier = "totalEgressBandwidthTier"; - } - return object; - }; - - /** - * Converts this NetworkPerformanceConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @instance - * @returns {Object.} JSON object - */ - NetworkPerformanceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkPerformanceConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkPerformanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkPerformanceConfig"; - }; - - /** - * Tier enum. - * @name google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier - * @enum {number} - * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value - * @property {number} DEFAULT=1 DEFAULT value - * @property {number} TIER_1=2 TIER_1 value - */ - NetworkPerformanceConfig.Tier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEFAULT"] = 1; - values[valuesById[2] = "TIER_1"] = 2; - return values; - })(); - - return NetworkPerformanceConfig; - })(); - - v1.AccessConfig = (function() { - - /** - * Properties of an AccessConfig. - * @memberof google.cloud.backupdr.v1 - * @interface IAccessConfig - * @property {google.cloud.backupdr.v1.AccessConfig.AccessType|null} [type] AccessConfig type - * @property {string|null} [name] AccessConfig name - * @property {string|null} [externalIp] AccessConfig externalIp - * @property {string|null} [externalIpv6] AccessConfig externalIpv6 - * @property {number|null} [externalIpv6PrefixLength] AccessConfig externalIpv6PrefixLength - * @property {boolean|null} [setPublicPtr] AccessConfig setPublicPtr - * @property {string|null} [publicPtrDomainName] AccessConfig publicPtrDomainName - * @property {google.cloud.backupdr.v1.AccessConfig.NetworkTier|null} [networkTier] AccessConfig networkTier - */ - - /** - * Constructs a new AccessConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AccessConfig. - * @implements IAccessConfig - * @constructor - * @param {google.cloud.backupdr.v1.IAccessConfig=} [properties] Properties to set - */ - function AccessConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AccessConfig type. - * @member {google.cloud.backupdr.v1.AccessConfig.AccessType|null|undefined} type - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.type = null; - - /** - * AccessConfig name. - * @member {string|null|undefined} name - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.name = null; - - /** - * AccessConfig externalIp. - * @member {string|null|undefined} externalIp - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.externalIp = null; - - /** - * AccessConfig externalIpv6. - * @member {string|null|undefined} externalIpv6 - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.externalIpv6 = null; - - /** - * AccessConfig externalIpv6PrefixLength. - * @member {number|null|undefined} externalIpv6PrefixLength - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.externalIpv6PrefixLength = null; - - /** - * AccessConfig setPublicPtr. - * @member {boolean|null|undefined} setPublicPtr - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.setPublicPtr = null; - - /** - * AccessConfig publicPtrDomainName. - * @member {string|null|undefined} publicPtrDomainName - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.publicPtrDomainName = null; - - /** - * AccessConfig networkTier. - * @member {google.cloud.backupdr.v1.AccessConfig.NetworkTier|null|undefined} networkTier - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.networkTier = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AccessConfig _type. - * @member {"type"|undefined} _type - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_type", { - get: $util.oneOfGetter($oneOfFields = ["type"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _name. - * @member {"name"|undefined} _name - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _externalIp. - * @member {"externalIp"|undefined} _externalIp - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_externalIp", { - get: $util.oneOfGetter($oneOfFields = ["externalIp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _externalIpv6. - * @member {"externalIpv6"|undefined} _externalIpv6 - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_externalIpv6", { - get: $util.oneOfGetter($oneOfFields = ["externalIpv6"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _externalIpv6PrefixLength. - * @member {"externalIpv6PrefixLength"|undefined} _externalIpv6PrefixLength - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_externalIpv6PrefixLength", { - get: $util.oneOfGetter($oneOfFields = ["externalIpv6PrefixLength"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _setPublicPtr. - * @member {"setPublicPtr"|undefined} _setPublicPtr - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_setPublicPtr", { - get: $util.oneOfGetter($oneOfFields = ["setPublicPtr"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _publicPtrDomainName. - * @member {"publicPtrDomainName"|undefined} _publicPtrDomainName - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_publicPtrDomainName", { - get: $util.oneOfGetter($oneOfFields = ["publicPtrDomainName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _networkTier. - * @member {"networkTier"|undefined} _networkTier - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_networkTier", { - get: $util.oneOfGetter($oneOfFields = ["networkTier"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AccessConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {google.cloud.backupdr.v1.IAccessConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig instance - */ - AccessConfig.create = function create(properties) { - return new AccessConfig(properties); - }; - - /** - * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {google.cloud.backupdr.v1.IAccessConfig} message AccessConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AccessConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.externalIp); - if (message.externalIpv6 != null && Object.hasOwnProperty.call(message, "externalIpv6")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.externalIpv6); - if (message.externalIpv6PrefixLength != null && Object.hasOwnProperty.call(message, "externalIpv6PrefixLength")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.externalIpv6PrefixLength); - if (message.setPublicPtr != null && Object.hasOwnProperty.call(message, "setPublicPtr")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.setPublicPtr); - if (message.publicPtrDomainName != null && Object.hasOwnProperty.call(message, "publicPtrDomainName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.publicPtrDomainName); - if (message.networkTier != null && Object.hasOwnProperty.call(message, "networkTier")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.networkTier); - return writer; - }; - - /** - * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {google.cloud.backupdr.v1.IAccessConfig} message AccessConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AccessConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AccessConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AccessConfig.decode = function 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.backupdr.v1.AccessConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - message.externalIp = reader.string(); - break; - } - case 4: { - message.externalIpv6 = reader.string(); - break; - } - case 5: { - message.externalIpv6PrefixLength = reader.int32(); - break; - } - case 6: { - message.setPublicPtr = reader.bool(); - break; - } - case 7: { - message.publicPtrDomainName = reader.string(); - break; - } - case 8: { - message.networkTier = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AccessConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AccessConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AccessConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AccessConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.type != null && message.hasOwnProperty("type")) { - properties._type = 1; - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.externalIp != null && message.hasOwnProperty("externalIp")) { - properties._externalIp = 1; - if (!$util.isString(message.externalIp)) - return "externalIp: string expected"; - } - if (message.externalIpv6 != null && message.hasOwnProperty("externalIpv6")) { - properties._externalIpv6 = 1; - if (!$util.isString(message.externalIpv6)) - return "externalIpv6: string expected"; - } - if (message.externalIpv6PrefixLength != null && message.hasOwnProperty("externalIpv6PrefixLength")) { - properties._externalIpv6PrefixLength = 1; - if (!$util.isInteger(message.externalIpv6PrefixLength)) - return "externalIpv6PrefixLength: integer expected"; - } - if (message.setPublicPtr != null && message.hasOwnProperty("setPublicPtr")) { - properties._setPublicPtr = 1; - if (typeof message.setPublicPtr !== "boolean") - return "setPublicPtr: boolean expected"; - } - if (message.publicPtrDomainName != null && message.hasOwnProperty("publicPtrDomainName")) { - properties._publicPtrDomainName = 1; - if (!$util.isString(message.publicPtrDomainName)) - return "publicPtrDomainName: string expected"; - } - if (message.networkTier != null && message.hasOwnProperty("networkTier")) { - properties._networkTier = 1; - switch (message.networkTier) { - default: - return "networkTier: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates an AccessConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig - */ - AccessConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AccessConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.AccessConfig(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "ACCESS_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "ONE_TO_ONE_NAT": - case 1: - message.type = 1; - break; - case "DIRECT_IPV6": - case 2: - message.type = 2; - break; - } - if (object.name != null) - message.name = String(object.name); - if (object.externalIp != null) - message.externalIp = String(object.externalIp); - if (object.externalIpv6 != null) - message.externalIpv6 = String(object.externalIpv6); - if (object.externalIpv6PrefixLength != null) - message.externalIpv6PrefixLength = object.externalIpv6PrefixLength | 0; - if (object.setPublicPtr != null) - message.setPublicPtr = Boolean(object.setPublicPtr); - if (object.publicPtrDomainName != null) - message.publicPtrDomainName = String(object.publicPtrDomainName); - switch (object.networkTier) { - default: - if (typeof object.networkTier === "number") { - message.networkTier = object.networkTier; - break; - } - break; - case "NETWORK_TIER_UNSPECIFIED": - case 0: - message.networkTier = 0; - break; - case "PREMIUM": - case 1: - message.networkTier = 1; - break; - case "STANDARD": - case 2: - message.networkTier = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {google.cloud.backupdr.v1.AccessConfig} message AccessConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AccessConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.type != null && message.hasOwnProperty("type")) { - object.type = options.enums === String ? $root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type] : message.type; - if (options.oneofs) - object._type = "type"; - } - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.externalIp != null && message.hasOwnProperty("externalIp")) { - object.externalIp = message.externalIp; - if (options.oneofs) - object._externalIp = "externalIp"; - } - if (message.externalIpv6 != null && message.hasOwnProperty("externalIpv6")) { - object.externalIpv6 = message.externalIpv6; - if (options.oneofs) - object._externalIpv6 = "externalIpv6"; - } - if (message.externalIpv6PrefixLength != null && message.hasOwnProperty("externalIpv6PrefixLength")) { - object.externalIpv6PrefixLength = message.externalIpv6PrefixLength; - if (options.oneofs) - object._externalIpv6PrefixLength = "externalIpv6PrefixLength"; - } - if (message.setPublicPtr != null && message.hasOwnProperty("setPublicPtr")) { - object.setPublicPtr = message.setPublicPtr; - if (options.oneofs) - object._setPublicPtr = "setPublicPtr"; - } - if (message.publicPtrDomainName != null && message.hasOwnProperty("publicPtrDomainName")) { - object.publicPtrDomainName = message.publicPtrDomainName; - if (options.oneofs) - object._publicPtrDomainName = "publicPtrDomainName"; - } - if (message.networkTier != null && message.hasOwnProperty("networkTier")) { - object.networkTier = options.enums === String ? $root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier] === undefined ? message.networkTier : $root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier] : message.networkTier; - if (options.oneofs) - object._networkTier = "networkTier"; - } - return object; - }; - - /** - * Converts this AccessConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - * @returns {Object.} JSON object - */ - AccessConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AccessConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AccessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AccessConfig"; - }; - - /** - * AccessType enum. - * @name google.cloud.backupdr.v1.AccessConfig.AccessType - * @enum {number} - * @property {number} ACCESS_TYPE_UNSPECIFIED=0 ACCESS_TYPE_UNSPECIFIED value - * @property {number} ONE_TO_ONE_NAT=1 ONE_TO_ONE_NAT value - * @property {number} DIRECT_IPV6=2 DIRECT_IPV6 value - */ - AccessConfig.AccessType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACCESS_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ONE_TO_ONE_NAT"] = 1; - values[valuesById[2] = "DIRECT_IPV6"] = 2; - return values; - })(); - - /** - * NetworkTier enum. - * @name google.cloud.backupdr.v1.AccessConfig.NetworkTier - * @enum {number} - * @property {number} NETWORK_TIER_UNSPECIFIED=0 NETWORK_TIER_UNSPECIFIED value - * @property {number} PREMIUM=1 PREMIUM value - * @property {number} STANDARD=2 STANDARD value - */ - AccessConfig.NetworkTier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NETWORK_TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "PREMIUM"] = 1; - values[valuesById[2] = "STANDARD"] = 2; - return values; - })(); - - return AccessConfig; - })(); - - v1.AliasIpRange = (function() { - - /** - * Properties of an AliasIpRange. - * @memberof google.cloud.backupdr.v1 - * @interface IAliasIpRange - * @property {string|null} [ipCidrRange] AliasIpRange ipCidrRange - * @property {string|null} [subnetworkRangeName] AliasIpRange subnetworkRangeName - */ - - /** - * Constructs a new AliasIpRange. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AliasIpRange. - * @implements IAliasIpRange - * @constructor - * @param {google.cloud.backupdr.v1.IAliasIpRange=} [properties] Properties to set - */ - function AliasIpRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AliasIpRange ipCidrRange. - * @member {string|null|undefined} ipCidrRange - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - */ - AliasIpRange.prototype.ipCidrRange = null; - - /** - * AliasIpRange subnetworkRangeName. - * @member {string|null|undefined} subnetworkRangeName - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - */ - AliasIpRange.prototype.subnetworkRangeName = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AliasIpRange _ipCidrRange. - * @member {"ipCidrRange"|undefined} _ipCidrRange - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - */ - Object.defineProperty(AliasIpRange.prototype, "_ipCidrRange", { - get: $util.oneOfGetter($oneOfFields = ["ipCidrRange"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AliasIpRange _subnetworkRangeName. - * @member {"subnetworkRangeName"|undefined} _subnetworkRangeName - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - */ - Object.defineProperty(AliasIpRange.prototype, "_subnetworkRangeName", { - get: $util.oneOfGetter($oneOfFields = ["subnetworkRangeName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AliasIpRange instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {google.cloud.backupdr.v1.IAliasIpRange=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange instance - */ - AliasIpRange.create = function create(properties) { - return new AliasIpRange(properties); - }; - - /** - * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {google.cloud.backupdr.v1.IAliasIpRange} message AliasIpRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AliasIpRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ipCidrRange != null && Object.hasOwnProperty.call(message, "ipCidrRange")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipCidrRange); - if (message.subnetworkRangeName != null && Object.hasOwnProperty.call(message, "subnetworkRangeName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetworkRangeName); - return writer; - }; - - /** - * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {google.cloud.backupdr.v1.IAliasIpRange} message AliasIpRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AliasIpRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AliasIpRange message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AliasIpRange.decode = function 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.backupdr.v1.AliasIpRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ipCidrRange = reader.string(); - break; - } - case 2: { - message.subnetworkRangeName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AliasIpRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AliasIpRange message. - * @function verify - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AliasIpRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) { - properties._ipCidrRange = 1; - if (!$util.isString(message.ipCidrRange)) - return "ipCidrRange: string expected"; - } - if (message.subnetworkRangeName != null && message.hasOwnProperty("subnetworkRangeName")) { - properties._subnetworkRangeName = 1; - if (!$util.isString(message.subnetworkRangeName)) - return "subnetworkRangeName: string expected"; - } - return null; - }; - - /** - * Creates an AliasIpRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange - */ - AliasIpRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AliasIpRange) - return object; - var message = new $root.google.cloud.backupdr.v1.AliasIpRange(); - if (object.ipCidrRange != null) - message.ipCidrRange = String(object.ipCidrRange); - if (object.subnetworkRangeName != null) - message.subnetworkRangeName = String(object.subnetworkRangeName); - return message; - }; - - /** - * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {google.cloud.backupdr.v1.AliasIpRange} message AliasIpRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AliasIpRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) { - object.ipCidrRange = message.ipCidrRange; - if (options.oneofs) - object._ipCidrRange = "ipCidrRange"; - } - if (message.subnetworkRangeName != null && message.hasOwnProperty("subnetworkRangeName")) { - object.subnetworkRangeName = message.subnetworkRangeName; - if (options.oneofs) - object._subnetworkRangeName = "subnetworkRangeName"; - } - return object; - }; - - /** - * Converts this AliasIpRange to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - * @returns {Object.} JSON object - */ - AliasIpRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AliasIpRange - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AliasIpRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AliasIpRange"; - }; - - return AliasIpRange; - })(); - - v1.InstanceParams = (function() { - - /** - * Properties of an InstanceParams. - * @memberof google.cloud.backupdr.v1 - * @interface IInstanceParams - * @property {Object.|null} [resourceManagerTags] InstanceParams resourceManagerTags - */ - - /** - * Constructs a new InstanceParams. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an InstanceParams. - * @implements IInstanceParams - * @constructor - * @param {google.cloud.backupdr.v1.IInstanceParams=} [properties] Properties to set - */ - function InstanceParams(properties) { - this.resourceManagerTags = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InstanceParams resourceManagerTags. - * @member {Object.} resourceManagerTags - * @memberof google.cloud.backupdr.v1.InstanceParams - * @instance - */ - InstanceParams.prototype.resourceManagerTags = $util.emptyObject; - - /** - * Creates a new InstanceParams instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {google.cloud.backupdr.v1.IInstanceParams=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams instance - */ - InstanceParams.create = function create(properties) { - return new InstanceParams(properties); - }; - - /** - * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {google.cloud.backupdr.v1.IInstanceParams} message InstanceParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) - for (var keys = Object.keys(message.resourceManagerTags), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceManagerTags[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {google.cloud.backupdr.v1.IInstanceParams} message InstanceParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InstanceParams message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceParams.decode = function 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.backupdr.v1.InstanceParams(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.resourceManagerTags === $util.emptyObject) - message.resourceManagerTags = {}; - 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.resourceManagerTags[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InstanceParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InstanceParams message. - * @function verify - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InstanceParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { - if (!$util.isObject(message.resourceManagerTags)) - return "resourceManagerTags: object expected"; - var key = Object.keys(message.resourceManagerTags); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.resourceManagerTags[key[i]])) - return "resourceManagerTags: string{k:string} expected"; - } - return null; - }; - - /** - * Creates an InstanceParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams - */ - InstanceParams.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.InstanceParams) - return object; - var message = new $root.google.cloud.backupdr.v1.InstanceParams(); - if (object.resourceManagerTags) { - if (typeof object.resourceManagerTags !== "object") - throw TypeError(".google.cloud.backupdr.v1.InstanceParams.resourceManagerTags: object expected"); - message.resourceManagerTags = {}; - for (var keys = Object.keys(object.resourceManagerTags), i = 0; i < keys.length; ++i) - message.resourceManagerTags[keys[i]] = String(object.resourceManagerTags[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {google.cloud.backupdr.v1.InstanceParams} message InstanceParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InstanceParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.resourceManagerTags = {}; - var keys2; - if (message.resourceManagerTags && (keys2 = Object.keys(message.resourceManagerTags)).length) { - object.resourceManagerTags = {}; - for (var j = 0; j < keys2.length; ++j) - object.resourceManagerTags[keys2[j]] = message.resourceManagerTags[keys2[j]]; - } - return object; - }; - - /** - * Converts this InstanceParams to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.InstanceParams - * @instance - * @returns {Object.} JSON object - */ - InstanceParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InstanceParams - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InstanceParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.InstanceParams"; - }; - - return InstanceParams; - })(); - - v1.AllocationAffinity = (function() { - - /** - * Properties of an AllocationAffinity. - * @memberof google.cloud.backupdr.v1 - * @interface IAllocationAffinity - * @property {google.cloud.backupdr.v1.AllocationAffinity.Type|null} [consumeAllocationType] AllocationAffinity consumeAllocationType - * @property {string|null} [key] AllocationAffinity key - * @property {Array.|null} [values] AllocationAffinity values - */ - - /** - * Constructs a new AllocationAffinity. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AllocationAffinity. - * @implements IAllocationAffinity - * @constructor - * @param {google.cloud.backupdr.v1.IAllocationAffinity=} [properties] Properties to set - */ - function AllocationAffinity(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AllocationAffinity consumeAllocationType. - * @member {google.cloud.backupdr.v1.AllocationAffinity.Type|null|undefined} consumeAllocationType - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - AllocationAffinity.prototype.consumeAllocationType = null; - - /** - * AllocationAffinity key. - * @member {string|null|undefined} key - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - AllocationAffinity.prototype.key = null; - - /** - * AllocationAffinity values. - * @member {Array.} values - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - AllocationAffinity.prototype.values = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AllocationAffinity _consumeAllocationType. - * @member {"consumeAllocationType"|undefined} _consumeAllocationType - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - Object.defineProperty(AllocationAffinity.prototype, "_consumeAllocationType", { - get: $util.oneOfGetter($oneOfFields = ["consumeAllocationType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AllocationAffinity _key. - * @member {"key"|undefined} _key - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - Object.defineProperty(AllocationAffinity.prototype, "_key", { - get: $util.oneOfGetter($oneOfFields = ["key"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AllocationAffinity instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {google.cloud.backupdr.v1.IAllocationAffinity=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity instance - */ - AllocationAffinity.create = function create(properties) { - return new AllocationAffinity(properties); - }; - - /** - * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {google.cloud.backupdr.v1.IAllocationAffinity} message AllocationAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AllocationAffinity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consumeAllocationType != null && Object.hasOwnProperty.call(message, "consumeAllocationType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumeAllocationType); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); - return writer; - }; - - /** - * Encodes the specified AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {google.cloud.backupdr.v1.IAllocationAffinity} message AllocationAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AllocationAffinity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AllocationAffinity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AllocationAffinity.decode = function 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.backupdr.v1.AllocationAffinity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.consumeAllocationType = reader.int32(); - break; - } - case 2: { - message.key = reader.string(); - break; - } - case 3: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AllocationAffinity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AllocationAffinity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AllocationAffinity message. - * @function verify - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AllocationAffinity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.consumeAllocationType != null && message.hasOwnProperty("consumeAllocationType")) { - properties._consumeAllocationType = 1; - switch (message.consumeAllocationType) { - default: - return "consumeAllocationType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.key != null && message.hasOwnProperty("key")) { - properties._key = 1; - if (!$util.isString(message.key)) - return "key: string expected"; - } - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - return null; - }; - - /** - * Creates an AllocationAffinity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity - */ - AllocationAffinity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AllocationAffinity) - return object; - var message = new $root.google.cloud.backupdr.v1.AllocationAffinity(); - switch (object.consumeAllocationType) { - default: - if (typeof object.consumeAllocationType === "number") { - message.consumeAllocationType = object.consumeAllocationType; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.consumeAllocationType = 0; - break; - case "NO_RESERVATION": - case 1: - message.consumeAllocationType = 1; - break; - case "ANY_RESERVATION": - case 2: - message.consumeAllocationType = 2; - break; - case "SPECIFIC_RESERVATION": - case 3: - message.consumeAllocationType = 3; - break; - } - if (object.key != null) - message.key = String(object.key); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.cloud.backupdr.v1.AllocationAffinity.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - return message; - }; - - /** - * Creates a plain object from an AllocationAffinity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {google.cloud.backupdr.v1.AllocationAffinity} message AllocationAffinity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AllocationAffinity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.consumeAllocationType != null && message.hasOwnProperty("consumeAllocationType")) { - object.consumeAllocationType = options.enums === String ? $root.google.cloud.backupdr.v1.AllocationAffinity.Type[message.consumeAllocationType] === undefined ? message.consumeAllocationType : $root.google.cloud.backupdr.v1.AllocationAffinity.Type[message.consumeAllocationType] : message.consumeAllocationType; - if (options.oneofs) - object._consumeAllocationType = "consumeAllocationType"; - } - if (message.key != null && message.hasOwnProperty("key")) { - object.key = message.key; - if (options.oneofs) - object._key = "key"; - } - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - return object; - }; - - /** - * Converts this AllocationAffinity to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - * @returns {Object.} JSON object - */ - AllocationAffinity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AllocationAffinity - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AllocationAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AllocationAffinity"; - }; - - /** - * Type enum. - * @name google.cloud.backupdr.v1.AllocationAffinity.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} NO_RESERVATION=1 NO_RESERVATION value - * @property {number} ANY_RESERVATION=2 ANY_RESERVATION value - * @property {number} SPECIFIC_RESERVATION=3 SPECIFIC_RESERVATION value - */ - AllocationAffinity.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NO_RESERVATION"] = 1; - values[valuesById[2] = "ANY_RESERVATION"] = 2; - values[valuesById[3] = "SPECIFIC_RESERVATION"] = 3; - return values; - })(); - - return AllocationAffinity; - })(); - - v1.Scheduling = (function() { - - /** - * Properties of a Scheduling. - * @memberof google.cloud.backupdr.v1 - * @interface IScheduling - * @property {google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null} [onHostMaintenance] Scheduling onHostMaintenance - * @property {boolean|null} [automaticRestart] Scheduling automaticRestart - * @property {boolean|null} [preemptible] Scheduling preemptible - * @property {Array.|null} [nodeAffinities] Scheduling nodeAffinities - * @property {number|null} [minNodeCpus] Scheduling minNodeCpus - * @property {google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null} [provisioningModel] Scheduling provisioningModel - * @property {google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null} [instanceTerminationAction] Scheduling instanceTerminationAction - * @property {google.cloud.backupdr.v1.ISchedulingDuration|null} [localSsdRecoveryTimeout] Scheduling localSsdRecoveryTimeout - */ - - /** - * Constructs a new Scheduling. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a Scheduling. - * @implements IScheduling - * @constructor - * @param {google.cloud.backupdr.v1.IScheduling=} [properties] Properties to set - */ - function Scheduling(properties) { - this.nodeAffinities = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Scheduling onHostMaintenance. - * @member {google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null|undefined} onHostMaintenance - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.onHostMaintenance = null; - - /** - * Scheduling automaticRestart. - * @member {boolean|null|undefined} automaticRestart - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.automaticRestart = null; - - /** - * Scheduling preemptible. - * @member {boolean|null|undefined} preemptible - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.preemptible = null; - - /** - * Scheduling nodeAffinities. - * @member {Array.} nodeAffinities - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.nodeAffinities = $util.emptyArray; - - /** - * Scheduling minNodeCpus. - * @member {number|null|undefined} minNodeCpus - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.minNodeCpus = null; - - /** - * Scheduling provisioningModel. - * @member {google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null|undefined} provisioningModel - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.provisioningModel = null; - - /** - * Scheduling instanceTerminationAction. - * @member {google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null|undefined} instanceTerminationAction - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.instanceTerminationAction = null; - - /** - * Scheduling localSsdRecoveryTimeout. - * @member {google.cloud.backupdr.v1.ISchedulingDuration|null|undefined} localSsdRecoveryTimeout - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.localSsdRecoveryTimeout = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Scheduling _onHostMaintenance. - * @member {"onHostMaintenance"|undefined} _onHostMaintenance - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_onHostMaintenance", { - get: $util.oneOfGetter($oneOfFields = ["onHostMaintenance"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _automaticRestart. - * @member {"automaticRestart"|undefined} _automaticRestart - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_automaticRestart", { - get: $util.oneOfGetter($oneOfFields = ["automaticRestart"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _preemptible. - * @member {"preemptible"|undefined} _preemptible - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_preemptible", { - get: $util.oneOfGetter($oneOfFields = ["preemptible"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _minNodeCpus. - * @member {"minNodeCpus"|undefined} _minNodeCpus - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_minNodeCpus", { - get: $util.oneOfGetter($oneOfFields = ["minNodeCpus"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _provisioningModel. - * @member {"provisioningModel"|undefined} _provisioningModel - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_provisioningModel", { - get: $util.oneOfGetter($oneOfFields = ["provisioningModel"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _instanceTerminationAction. - * @member {"instanceTerminationAction"|undefined} _instanceTerminationAction - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_instanceTerminationAction", { - get: $util.oneOfGetter($oneOfFields = ["instanceTerminationAction"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _localSsdRecoveryTimeout. - * @member {"localSsdRecoveryTimeout"|undefined} _localSsdRecoveryTimeout - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_localSsdRecoveryTimeout", { - get: $util.oneOfGetter($oneOfFields = ["localSsdRecoveryTimeout"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Scheduling instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {google.cloud.backupdr.v1.IScheduling=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling instance - */ - Scheduling.create = function create(properties) { - return new Scheduling(properties); - }; - - /** - * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {google.cloud.backupdr.v1.IScheduling} message Scheduling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Scheduling.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.onHostMaintenance != null && Object.hasOwnProperty.call(message, "onHostMaintenance")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.onHostMaintenance); - if (message.automaticRestart != null && Object.hasOwnProperty.call(message, "automaticRestart")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.automaticRestart); - if (message.preemptible != null && Object.hasOwnProperty.call(message, "preemptible")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preemptible); - if (message.nodeAffinities != null && message.nodeAffinities.length) - for (var i = 0; i < message.nodeAffinities.length; ++i) - $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.encode(message.nodeAffinities[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.minNodeCpus != null && Object.hasOwnProperty.call(message, "minNodeCpus")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.minNodeCpus); - if (message.provisioningModel != null && Object.hasOwnProperty.call(message, "provisioningModel")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.provisioningModel); - if (message.instanceTerminationAction != null && Object.hasOwnProperty.call(message, "instanceTerminationAction")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.instanceTerminationAction); - if (message.localSsdRecoveryTimeout != null && Object.hasOwnProperty.call(message, "localSsdRecoveryTimeout")) - $root.google.cloud.backupdr.v1.SchedulingDuration.encode(message.localSsdRecoveryTimeout, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {google.cloud.backupdr.v1.IScheduling} message Scheduling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Scheduling.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Scheduling message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Scheduling.decode = function 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.backupdr.v1.Scheduling(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.onHostMaintenance = reader.int32(); - break; - } - case 2: { - message.automaticRestart = reader.bool(); - break; - } - case 3: { - message.preemptible = reader.bool(); - break; - } - case 4: { - if (!(message.nodeAffinities && message.nodeAffinities.length)) - message.nodeAffinities = []; - message.nodeAffinities.push($root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.decode(reader, reader.uint32())); - break; - } - case 5: { - message.minNodeCpus = reader.int32(); - break; - } - case 6: { - message.provisioningModel = reader.int32(); - break; - } - case 7: { - message.instanceTerminationAction = reader.int32(); - break; - } - case 10: { - message.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Scheduling message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Scheduling.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Scheduling message. - * @function verify - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Scheduling.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.onHostMaintenance != null && message.hasOwnProperty("onHostMaintenance")) { - properties._onHostMaintenance = 1; - switch (message.onHostMaintenance) { - default: - return "onHostMaintenance: enum value expected"; - case 0: - case 1: - case 1000: - break; - } - } - if (message.automaticRestart != null && message.hasOwnProperty("automaticRestart")) { - properties._automaticRestart = 1; - if (typeof message.automaticRestart !== "boolean") - return "automaticRestart: boolean expected"; - } - if (message.preemptible != null && message.hasOwnProperty("preemptible")) { - properties._preemptible = 1; - if (typeof message.preemptible !== "boolean") - return "preemptible: boolean expected"; - } - if (message.nodeAffinities != null && message.hasOwnProperty("nodeAffinities")) { - if (!Array.isArray(message.nodeAffinities)) - return "nodeAffinities: array expected"; - for (var i = 0; i < message.nodeAffinities.length; ++i) { - var error = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify(message.nodeAffinities[i]); - if (error) - return "nodeAffinities." + error; - } - } - if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { - properties._minNodeCpus = 1; - if (!$util.isInteger(message.minNodeCpus)) - return "minNodeCpus: integer expected"; - } - if (message.provisioningModel != null && message.hasOwnProperty("provisioningModel")) { - properties._provisioningModel = 1; - switch (message.provisioningModel) { - default: - return "provisioningModel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.instanceTerminationAction != null && message.hasOwnProperty("instanceTerminationAction")) { - properties._instanceTerminationAction = 1; - switch (message.instanceTerminationAction) { - default: - return "instanceTerminationAction: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.localSsdRecoveryTimeout != null && message.hasOwnProperty("localSsdRecoveryTimeout")) { - properties._localSsdRecoveryTimeout = 1; - { - var error = $root.google.cloud.backupdr.v1.SchedulingDuration.verify(message.localSsdRecoveryTimeout); - if (error) - return "localSsdRecoveryTimeout." + error; - } - } - return null; - }; - - /** - * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling - */ - Scheduling.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Scheduling) - return object; - var message = new $root.google.cloud.backupdr.v1.Scheduling(); - switch (object.onHostMaintenance) { - default: - if (typeof object.onHostMaintenance === "number") { - message.onHostMaintenance = object.onHostMaintenance; - break; - } - break; - case "ON_HOST_MAINTENANCE_UNSPECIFIED": - case 0: - message.onHostMaintenance = 0; - break; - case "TERMINATE": - case 1: - message.onHostMaintenance = 1; - break; - case "MIGRATE": - case 1000: - message.onHostMaintenance = 1000; - break; - } - if (object.automaticRestart != null) - message.automaticRestart = Boolean(object.automaticRestart); - if (object.preemptible != null) - message.preemptible = Boolean(object.preemptible); - if (object.nodeAffinities) { - if (!Array.isArray(object.nodeAffinities)) - throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: array expected"); - message.nodeAffinities = []; - for (var i = 0; i < object.nodeAffinities.length; ++i) { - if (typeof object.nodeAffinities[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: object expected"); - message.nodeAffinities[i] = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.fromObject(object.nodeAffinities[i]); - } - } - if (object.minNodeCpus != null) - message.minNodeCpus = object.minNodeCpus | 0; - switch (object.provisioningModel) { - default: - if (typeof object.provisioningModel === "number") { - message.provisioningModel = object.provisioningModel; - break; - } - break; - case "PROVISIONING_MODEL_UNSPECIFIED": - case 0: - message.provisioningModel = 0; - break; - case "STANDARD": - case 1: - message.provisioningModel = 1; - break; - case "SPOT": - case 2: - message.provisioningModel = 2; - break; - } - switch (object.instanceTerminationAction) { - default: - if (typeof object.instanceTerminationAction === "number") { - message.instanceTerminationAction = object.instanceTerminationAction; - break; - } - break; - case "INSTANCE_TERMINATION_ACTION_UNSPECIFIED": - case 0: - message.instanceTerminationAction = 0; - break; - case "DELETE": - case 1: - message.instanceTerminationAction = 1; - break; - case "STOP": - case 2: - message.instanceTerminationAction = 2; - break; - } - if (object.localSsdRecoveryTimeout != null) { - if (typeof object.localSsdRecoveryTimeout !== "object") - throw TypeError(".google.cloud.backupdr.v1.Scheduling.localSsdRecoveryTimeout: object expected"); - message.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.fromObject(object.localSsdRecoveryTimeout); - } - return message; - }; - - /** - * Creates a plain object from a Scheduling message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {google.cloud.backupdr.v1.Scheduling} message Scheduling - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Scheduling.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.nodeAffinities = []; - if (message.onHostMaintenance != null && message.hasOwnProperty("onHostMaintenance")) { - object.onHostMaintenance = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.OnHostMaintenance[message.onHostMaintenance] === undefined ? message.onHostMaintenance : $root.google.cloud.backupdr.v1.Scheduling.OnHostMaintenance[message.onHostMaintenance] : message.onHostMaintenance; - if (options.oneofs) - object._onHostMaintenance = "onHostMaintenance"; - } - if (message.automaticRestart != null && message.hasOwnProperty("automaticRestart")) { - object.automaticRestart = message.automaticRestart; - if (options.oneofs) - object._automaticRestart = "automaticRestart"; - } - if (message.preemptible != null && message.hasOwnProperty("preemptible")) { - object.preemptible = message.preemptible; - if (options.oneofs) - object._preemptible = "preemptible"; - } - if (message.nodeAffinities && message.nodeAffinities.length) { - object.nodeAffinities = []; - for (var j = 0; j < message.nodeAffinities.length; ++j) - object.nodeAffinities[j] = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.toObject(message.nodeAffinities[j], options); - } - if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { - object.minNodeCpus = message.minNodeCpus; - if (options.oneofs) - object._minNodeCpus = "minNodeCpus"; - } - if (message.provisioningModel != null && message.hasOwnProperty("provisioningModel")) { - object.provisioningModel = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.ProvisioningModel[message.provisioningModel] === undefined ? message.provisioningModel : $root.google.cloud.backupdr.v1.Scheduling.ProvisioningModel[message.provisioningModel] : message.provisioningModel; - if (options.oneofs) - object._provisioningModel = "provisioningModel"; - } - if (message.instanceTerminationAction != null && message.hasOwnProperty("instanceTerminationAction")) { - object.instanceTerminationAction = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction[message.instanceTerminationAction] === undefined ? message.instanceTerminationAction : $root.google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction[message.instanceTerminationAction] : message.instanceTerminationAction; - if (options.oneofs) - object._instanceTerminationAction = "instanceTerminationAction"; - } - if (message.localSsdRecoveryTimeout != null && message.hasOwnProperty("localSsdRecoveryTimeout")) { - object.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.toObject(message.localSsdRecoveryTimeout, options); - if (options.oneofs) - object._localSsdRecoveryTimeout = "localSsdRecoveryTimeout"; - } - return object; - }; - - /** - * Converts this Scheduling to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - * @returns {Object.} JSON object - */ - Scheduling.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Scheduling - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Scheduling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Scheduling"; - }; - - /** - * OnHostMaintenance enum. - * @name google.cloud.backupdr.v1.Scheduling.OnHostMaintenance - * @enum {number} - * @property {number} ON_HOST_MAINTENANCE_UNSPECIFIED=0 ON_HOST_MAINTENANCE_UNSPECIFIED value - * @property {number} TERMINATE=1 TERMINATE value - * @property {number} MIGRATE=1000 MIGRATE value - */ - Scheduling.OnHostMaintenance = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ON_HOST_MAINTENANCE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TERMINATE"] = 1; - values[valuesById[1000] = "MIGRATE"] = 1000; - return values; - })(); - - Scheduling.NodeAffinity = (function() { - - /** - * Properties of a NodeAffinity. - * @memberof google.cloud.backupdr.v1.Scheduling - * @interface INodeAffinity - * @property {string|null} [key] NodeAffinity key - * @property {google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null} [operator] NodeAffinity operator - * @property {Array.|null} [values] NodeAffinity values - */ - - /** - * Constructs a new NodeAffinity. - * @memberof google.cloud.backupdr.v1.Scheduling - * @classdesc Represents a NodeAffinity. - * @implements INodeAffinity - * @constructor - * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity=} [properties] Properties to set - */ - function NodeAffinity(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeAffinity key. - * @member {string|null|undefined} key - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - NodeAffinity.prototype.key = null; - - /** - * NodeAffinity operator. - * @member {google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null|undefined} operator - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - NodeAffinity.prototype.operator = null; - - /** - * NodeAffinity values. - * @member {Array.} values - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - NodeAffinity.prototype.values = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NodeAffinity _key. - * @member {"key"|undefined} _key - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - Object.defineProperty(NodeAffinity.prototype, "_key", { - get: $util.oneOfGetter($oneOfFields = ["key"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NodeAffinity _operator. - * @member {"operator"|undefined} _operator - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - Object.defineProperty(NodeAffinity.prototype, "_operator", { - get: $util.oneOfGetter($oneOfFields = ["operator"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NodeAffinity instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity instance - */ - NodeAffinity.create = function create(properties) { - return new NodeAffinity(properties); - }; - - /** - * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity} message NodeAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeAffinity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.operator != null && Object.hasOwnProperty.call(message, "operator")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operator); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); - return writer; - }; - - /** - * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity} message NodeAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeAffinity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeAffinity.decode = function 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.backupdr.v1.Scheduling.NodeAffinity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.key = reader.string(); - break; - } - case 2: { - message.operator = reader.int32(); - break; - } - case 3: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeAffinity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeAffinity message. - * @function verify - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeAffinity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.key != null && message.hasOwnProperty("key")) { - properties._key = 1; - if (!$util.isString(message.key)) - return "key: string expected"; - } - if (message.operator != null && message.hasOwnProperty("operator")) { - properties._operator = 1; - switch (message.operator) { - default: - return "operator: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - return null; - }; - - /** - * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity - */ - NodeAffinity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity) - return object; - var message = new $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity(); - if (object.key != null) - message.key = String(object.key); - switch (object.operator) { - default: - if (typeof object.operator === "number") { - message.operator = object.operator; - break; - } - break; - case "OPERATOR_UNSPECIFIED": - case 0: - message.operator = 0; - break; - case "IN": - case 1: - message.operator = 1; - break; - case "NOT_IN": - case 2: - message.operator = 2; - break; - } - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.cloud.backupdr.v1.Scheduling.NodeAffinity.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - return message; - }; - - /** - * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {google.cloud.backupdr.v1.Scheduling.NodeAffinity} message NodeAffinity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeAffinity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.key != null && message.hasOwnProperty("key")) { - object.key = message.key; - if (options.oneofs) - object._key = "key"; - } - if (message.operator != null && message.hasOwnProperty("operator")) { - object.operator = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator[message.operator] === undefined ? message.operator : $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator[message.operator] : message.operator; - if (options.oneofs) - object._operator = "operator"; - } - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - return object; - }; - - /** - * Converts this NodeAffinity to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - * @returns {Object.} JSON object - */ - NodeAffinity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeAffinity - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Scheduling.NodeAffinity"; - }; - - /** - * Operator enum. - * @name google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator - * @enum {number} - * @property {number} OPERATOR_UNSPECIFIED=0 OPERATOR_UNSPECIFIED value - * @property {number} IN=1 IN value - * @property {number} NOT_IN=2 NOT_IN value - */ - NodeAffinity.Operator = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OPERATOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "IN"] = 1; - values[valuesById[2] = "NOT_IN"] = 2; - return values; - })(); - - return NodeAffinity; - })(); - - /** - * ProvisioningModel enum. - * @name google.cloud.backupdr.v1.Scheduling.ProvisioningModel - * @enum {number} - * @property {number} PROVISIONING_MODEL_UNSPECIFIED=0 PROVISIONING_MODEL_UNSPECIFIED value - * @property {number} STANDARD=1 STANDARD value - * @property {number} SPOT=2 SPOT value - */ - Scheduling.ProvisioningModel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROVISIONING_MODEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "STANDARD"] = 1; - values[valuesById[2] = "SPOT"] = 2; - return values; - })(); - - /** - * InstanceTerminationAction enum. - * @name google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction - * @enum {number} - * @property {number} INSTANCE_TERMINATION_ACTION_UNSPECIFIED=0 INSTANCE_TERMINATION_ACTION_UNSPECIFIED value - * @property {number} DELETE=1 DELETE value - * @property {number} STOP=2 STOP value - */ - Scheduling.InstanceTerminationAction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INSTANCE_TERMINATION_ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "DELETE"] = 1; - values[valuesById[2] = "STOP"] = 2; - return values; - })(); - - return Scheduling; - })(); - - v1.SchedulingDuration = (function() { - - /** - * Properties of a SchedulingDuration. - * @memberof google.cloud.backupdr.v1 - * @interface ISchedulingDuration - * @property {number|Long|null} [seconds] SchedulingDuration seconds - * @property {number|null} [nanos] SchedulingDuration nanos - */ - - /** - * Constructs a new SchedulingDuration. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a SchedulingDuration. - * @implements ISchedulingDuration - * @constructor - * @param {google.cloud.backupdr.v1.ISchedulingDuration=} [properties] Properties to set - */ - function SchedulingDuration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SchedulingDuration seconds. - * @member {number|Long|null|undefined} seconds - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - */ - SchedulingDuration.prototype.seconds = null; - - /** - * SchedulingDuration nanos. - * @member {number|null|undefined} nanos - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - */ - SchedulingDuration.prototype.nanos = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SchedulingDuration _seconds. - * @member {"seconds"|undefined} _seconds - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - */ - Object.defineProperty(SchedulingDuration.prototype, "_seconds", { - get: $util.oneOfGetter($oneOfFields = ["seconds"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * SchedulingDuration _nanos. - * @member {"nanos"|undefined} _nanos - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - */ - Object.defineProperty(SchedulingDuration.prototype, "_nanos", { - get: $util.oneOfGetter($oneOfFields = ["nanos"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SchedulingDuration instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {google.cloud.backupdr.v1.ISchedulingDuration=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration instance - */ - SchedulingDuration.create = function create(properties) { - return new SchedulingDuration(properties); - }; - - /** - * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {google.cloud.backupdr.v1.ISchedulingDuration} message SchedulingDuration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchedulingDuration.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 SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {google.cloud.backupdr.v1.ISchedulingDuration} message SchedulingDuration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchedulingDuration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SchedulingDuration message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchedulingDuration.decode = function 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.backupdr.v1.SchedulingDuration(); - 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 SchedulingDuration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchedulingDuration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SchedulingDuration message. - * @function verify - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SchedulingDuration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.seconds != null && message.hasOwnProperty("seconds")) { - properties._seconds = 1; - 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")) { - properties._nanos = 1; - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - } - return null; - }; - - /** - * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration - */ - SchedulingDuration.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.SchedulingDuration) - return object; - var message = new $root.google.cloud.backupdr.v1.SchedulingDuration(); - 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 SchedulingDuration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {google.cloud.backupdr.v1.SchedulingDuration} message SchedulingDuration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SchedulingDuration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - 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 (options.oneofs) - object._seconds = "seconds"; - } - if (message.nanos != null && message.hasOwnProperty("nanos")) { - object.nanos = message.nanos; - if (options.oneofs) - object._nanos = "nanos"; - } - return object; - }; - - /** - * Converts this SchedulingDuration to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - * @returns {Object.} JSON object - */ - SchedulingDuration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SchedulingDuration - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SchedulingDuration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.SchedulingDuration"; - }; - - return SchedulingDuration; - })(); - - v1.ServiceAccount = (function() { - - /** - * Properties of a ServiceAccount. - * @memberof google.cloud.backupdr.v1 - * @interface IServiceAccount - * @property {string|null} [email] ServiceAccount email - * @property {Array.|null} [scopes] ServiceAccount scopes - */ - - /** - * Constructs a new ServiceAccount. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ServiceAccount. - * @implements IServiceAccount - * @constructor - * @param {google.cloud.backupdr.v1.IServiceAccount=} [properties] Properties to set - */ - function ServiceAccount(properties) { - this.scopes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceAccount email. - * @member {string|null|undefined} email - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @instance - */ - ServiceAccount.prototype.email = null; - - /** - * ServiceAccount scopes. - * @member {Array.} scopes - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @instance - */ - ServiceAccount.prototype.scopes = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ServiceAccount _email. - * @member {"email"|undefined} _email - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @instance - */ - Object.defineProperty(ServiceAccount.prototype, "_email", { - get: $util.oneOfGetter($oneOfFields = ["email"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ServiceAccount instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {google.cloud.backupdr.v1.IServiceAccount=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount instance - */ - ServiceAccount.create = function create(properties) { - return new ServiceAccount(properties); - }; - - /** - * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {google.cloud.backupdr.v1.IServiceAccount} message ServiceAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.email != null && Object.hasOwnProperty.call(message, "email")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.email); - if (message.scopes != null && message.scopes.length) - for (var i = 0; i < message.scopes.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.scopes[i]); - return writer; - }; - - /** - * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {google.cloud.backupdr.v1.IServiceAccount} message ServiceAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceAccount message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceAccount.decode = function 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.backupdr.v1.ServiceAccount(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.email = reader.string(); - break; - } - case 2: { - if (!(message.scopes && message.scopes.length)) - message.scopes = []; - message.scopes.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceAccount message. - * @function verify - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.email != null && message.hasOwnProperty("email")) { - properties._email = 1; - if (!$util.isString(message.email)) - return "email: string expected"; - } - if (message.scopes != null && message.hasOwnProperty("scopes")) { - if (!Array.isArray(message.scopes)) - return "scopes: array expected"; - for (var i = 0; i < message.scopes.length; ++i) - if (!$util.isString(message.scopes[i])) - return "scopes: string[] expected"; - } - return null; - }; - - /** - * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount - */ - ServiceAccount.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ServiceAccount) - return object; - var message = new $root.google.cloud.backupdr.v1.ServiceAccount(); - if (object.email != null) - message.email = String(object.email); - if (object.scopes) { - if (!Array.isArray(object.scopes)) - throw TypeError(".google.cloud.backupdr.v1.ServiceAccount.scopes: array expected"); - message.scopes = []; - for (var i = 0; i < object.scopes.length; ++i) - message.scopes[i] = String(object.scopes[i]); - } - return message; - }; - - /** - * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {google.cloud.backupdr.v1.ServiceAccount} message ServiceAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.scopes = []; - if (message.email != null && message.hasOwnProperty("email")) { - object.email = message.email; - if (options.oneofs) - object._email = "email"; - } - if (message.scopes && message.scopes.length) { - object.scopes = []; - for (var j = 0; j < message.scopes.length; ++j) - object.scopes[j] = message.scopes[j]; - } - return object; - }; - - /** - * Converts this ServiceAccount to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @instance - * @returns {Object.} JSON object - */ - ServiceAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceAccount - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceAccount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ServiceAccount"; - }; - - return ServiceAccount; - })(); - - v1.Tags = (function() { - - /** - * Properties of a Tags. - * @memberof google.cloud.backupdr.v1 - * @interface ITags - * @property {Array.|null} [items] Tags items - */ - - /** - * Constructs a new Tags. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a Tags. - * @implements ITags - * @constructor - * @param {google.cloud.backupdr.v1.ITags=} [properties] Properties to set - */ - function Tags(properties) { - this.items = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Tags items. - * @member {Array.} items - * @memberof google.cloud.backupdr.v1.Tags - * @instance - */ - Tags.prototype.items = $util.emptyArray; - - /** - * Creates a new Tags instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {google.cloud.backupdr.v1.ITags=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Tags} Tags instance - */ - Tags.create = function create(properties) { - return new Tags(properties); - }; - - /** - * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {google.cloud.backupdr.v1.ITags} message Tags message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tags.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.items != null && message.items.length) - for (var i = 0; i < message.items.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.items[i]); - return writer; - }; - - /** - * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {google.cloud.backupdr.v1.ITags} message Tags message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tags.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Tags message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Tags} Tags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tags.decode = function 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.backupdr.v1.Tags(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.items && message.items.length)) - message.items = []; - message.items.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Tags message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Tags} Tags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tags.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Tags message. - * @function verify - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Tags.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.items != null && message.hasOwnProperty("items")) { - if (!Array.isArray(message.items)) - return "items: array expected"; - for (var i = 0; i < message.items.length; ++i) - if (!$util.isString(message.items[i])) - return "items: string[] expected"; - } - return null; - }; - - /** - * Creates a Tags message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Tags} Tags - */ - Tags.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Tags) - return object; - var message = new $root.google.cloud.backupdr.v1.Tags(); - if (object.items) { - if (!Array.isArray(object.items)) - throw TypeError(".google.cloud.backupdr.v1.Tags.items: array expected"); - message.items = []; - for (var i = 0; i < object.items.length; ++i) - message.items[i] = String(object.items[i]); - } - return message; - }; - - /** - * Creates a plain object from a Tags message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {google.cloud.backupdr.v1.Tags} message Tags - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Tags.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.items = []; - if (message.items && message.items.length) { - object.items = []; - for (var j = 0; j < message.items.length; ++j) - object.items[j] = message.items[j]; - } - return object; - }; - - /** - * Converts this Tags to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Tags - * @instance - * @returns {Object.} JSON object - */ - Tags.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Tags - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Tags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Tags"; - }; - - return Tags; - })(); - - v1.AttachedDisk = (function() { - - /** - * Properties of an AttachedDisk. - * @memberof google.cloud.backupdr.v1 - * @interface IAttachedDisk - * @property {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null} [initializeParams] AttachedDisk initializeParams - * @property {string|null} [deviceName] AttachedDisk deviceName - * @property {string|null} [kind] AttachedDisk kind - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskType|null} [diskTypeDeprecated] AttachedDisk diskTypeDeprecated - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskMode|null} [mode] AttachedDisk mode - * @property {string|null} [source] AttachedDisk source - * @property {number|Long|null} [index] AttachedDisk index - * @property {boolean|null} [boot] AttachedDisk boot - * @property {boolean|null} [autoDelete] AttachedDisk autoDelete - * @property {Array.|null} [license] AttachedDisk license - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null} [diskInterface] AttachedDisk diskInterface - * @property {Array.|null} [guestOsFeature] AttachedDisk guestOsFeature - * @property {google.cloud.backupdr.v1.ICustomerEncryptionKey|null} [diskEncryptionKey] AttachedDisk diskEncryptionKey - * @property {number|Long|null} [diskSizeGb] AttachedDisk diskSizeGb - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null} [savedState] AttachedDisk savedState - * @property {string|null} [diskType] AttachedDisk diskType - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskType|null} [type] AttachedDisk type - */ - - /** - * Constructs a new AttachedDisk. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AttachedDisk. - * @implements IAttachedDisk - * @constructor - * @param {google.cloud.backupdr.v1.IAttachedDisk=} [properties] Properties to set - */ - function AttachedDisk(properties) { - this.license = []; - this.guestOsFeature = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AttachedDisk initializeParams. - * @member {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null|undefined} initializeParams - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.initializeParams = null; - - /** - * AttachedDisk deviceName. - * @member {string|null|undefined} deviceName - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.deviceName = null; - - /** - * AttachedDisk kind. - * @member {string|null|undefined} kind - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.kind = null; - - /** - * AttachedDisk diskTypeDeprecated. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskType|null|undefined} diskTypeDeprecated - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskTypeDeprecated = null; - - /** - * AttachedDisk mode. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskMode|null|undefined} mode - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.mode = null; - - /** - * AttachedDisk source. - * @member {string|null|undefined} source - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.source = null; - - /** - * AttachedDisk index. - * @member {number|Long|null|undefined} index - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.index = null; - - /** - * AttachedDisk boot. - * @member {boolean|null|undefined} boot - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.boot = null; - - /** - * AttachedDisk autoDelete. - * @member {boolean|null|undefined} autoDelete - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.autoDelete = null; - - /** - * AttachedDisk license. - * @member {Array.} license - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.license = $util.emptyArray; - - /** - * AttachedDisk diskInterface. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null|undefined} diskInterface - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskInterface = null; - - /** - * AttachedDisk guestOsFeature. - * @member {Array.} guestOsFeature - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.guestOsFeature = $util.emptyArray; - - /** - * AttachedDisk diskEncryptionKey. - * @member {google.cloud.backupdr.v1.ICustomerEncryptionKey|null|undefined} diskEncryptionKey - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskEncryptionKey = null; - - /** - * AttachedDisk diskSizeGb. - * @member {number|Long|null|undefined} diskSizeGb - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskSizeGb = null; - - /** - * AttachedDisk savedState. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null|undefined} savedState - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.savedState = null; - - /** - * AttachedDisk diskType. - * @member {string|null|undefined} diskType - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskType = null; - - /** - * AttachedDisk type. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskType|null|undefined} type - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.type = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AttachedDisk _initializeParams. - * @member {"initializeParams"|undefined} _initializeParams - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_initializeParams", { - get: $util.oneOfGetter($oneOfFields = ["initializeParams"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _deviceName. - * @member {"deviceName"|undefined} _deviceName - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_deviceName", { - get: $util.oneOfGetter($oneOfFields = ["deviceName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _kind. - * @member {"kind"|undefined} _kind - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_kind", { - get: $util.oneOfGetter($oneOfFields = ["kind"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskTypeDeprecated. - * @member {"diskTypeDeprecated"|undefined} _diskTypeDeprecated - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskTypeDeprecated", { - get: $util.oneOfGetter($oneOfFields = ["diskTypeDeprecated"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _mode. - * @member {"mode"|undefined} _mode - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_mode", { - get: $util.oneOfGetter($oneOfFields = ["mode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _source. - * @member {"source"|undefined} _source - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_source", { - get: $util.oneOfGetter($oneOfFields = ["source"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _index. - * @member {"index"|undefined} _index - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_index", { - get: $util.oneOfGetter($oneOfFields = ["index"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _boot. - * @member {"boot"|undefined} _boot - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_boot", { - get: $util.oneOfGetter($oneOfFields = ["boot"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _autoDelete. - * @member {"autoDelete"|undefined} _autoDelete - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_autoDelete", { - get: $util.oneOfGetter($oneOfFields = ["autoDelete"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskInterface. - * @member {"diskInterface"|undefined} _diskInterface - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskInterface", { - get: $util.oneOfGetter($oneOfFields = ["diskInterface"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskEncryptionKey. - * @member {"diskEncryptionKey"|undefined} _diskEncryptionKey - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskEncryptionKey", { - get: $util.oneOfGetter($oneOfFields = ["diskEncryptionKey"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskSizeGb. - * @member {"diskSizeGb"|undefined} _diskSizeGb - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskSizeGb", { - get: $util.oneOfGetter($oneOfFields = ["diskSizeGb"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _savedState. - * @member {"savedState"|undefined} _savedState - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_savedState", { - get: $util.oneOfGetter($oneOfFields = ["savedState"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskType. - * @member {"diskType"|undefined} _diskType - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskType", { - get: $util.oneOfGetter($oneOfFields = ["diskType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _type. - * @member {"type"|undefined} _type - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_type", { - get: $util.oneOfGetter($oneOfFields = ["type"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AttachedDisk instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {google.cloud.backupdr.v1.IAttachedDisk=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk instance - */ - AttachedDisk.create = function create(properties) { - return new AttachedDisk(properties); - }; - - /** - * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {google.cloud.backupdr.v1.IAttachedDisk} message AttachedDisk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AttachedDisk.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initializeParams != null && Object.hasOwnProperty.call(message, "initializeParams")) - $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.encode(message.initializeParams, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.deviceName); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.kind); - if (message.diskTypeDeprecated != null && Object.hasOwnProperty.call(message, "diskTypeDeprecated")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.diskTypeDeprecated); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.mode); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.source); - if (message.index != null && Object.hasOwnProperty.call(message, "index")) - writer.uint32(/* id 9, wireType 0 =*/72).int64(message.index); - if (message.boot != null && Object.hasOwnProperty.call(message, "boot")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.boot); - if (message.autoDelete != null && Object.hasOwnProperty.call(message, "autoDelete")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.autoDelete); - if (message.license != null && message.license.length) - for (var i = 0; i < message.license.length; ++i) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.license[i]); - if (message.diskInterface != null && Object.hasOwnProperty.call(message, "diskInterface")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.diskInterface); - if (message.guestOsFeature != null && message.guestOsFeature.length) - for (var i = 0; i < message.guestOsFeature.length; ++i) - $root.google.cloud.backupdr.v1.GuestOsFeature.encode(message.guestOsFeature[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.diskEncryptionKey != null && Object.hasOwnProperty.call(message, "diskEncryptionKey")) - $root.google.cloud.backupdr.v1.CustomerEncryptionKey.encode(message.diskEncryptionKey, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) - writer.uint32(/* id 16, wireType 0 =*/128).int64(message.diskSizeGb); - if (message.savedState != null && Object.hasOwnProperty.call(message, "savedState")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.savedState); - if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.diskType); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.type); - return writer; - }; - - /** - * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {google.cloud.backupdr.v1.IAttachedDisk} message AttachedDisk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AttachedDisk.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AttachedDisk message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AttachedDisk.decode = function 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.backupdr.v1.AttachedDisk(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.decode(reader, reader.uint32()); - break; - } - case 4: { - message.deviceName = reader.string(); - break; - } - case 5: { - message.kind = reader.string(); - break; - } - case 6: { - message.diskTypeDeprecated = reader.int32(); - break; - } - case 7: { - message.mode = reader.int32(); - break; - } - case 8: { - message.source = reader.string(); - break; - } - case 9: { - message.index = reader.int64(); - break; - } - case 10: { - message.boot = reader.bool(); - break; - } - case 11: { - message.autoDelete = reader.bool(); - break; - } - case 12: { - if (!(message.license && message.license.length)) - message.license = []; - message.license.push(reader.string()); - break; - } - case 13: { - message.diskInterface = reader.int32(); - break; - } - case 14: { - if (!(message.guestOsFeature && message.guestOsFeature.length)) - message.guestOsFeature = []; - message.guestOsFeature.push($root.google.cloud.backupdr.v1.GuestOsFeature.decode(reader, reader.uint32())); - break; - } - case 15: { - message.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader, reader.uint32()); - break; - } - case 16: { - message.diskSizeGb = reader.int64(); - break; - } - case 17: { - message.savedState = reader.int32(); - break; - } - case 18: { - message.diskType = reader.string(); - break; - } - case 19: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AttachedDisk.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AttachedDisk message. - * @function verify - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AttachedDisk.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.initializeParams != null && message.hasOwnProperty("initializeParams")) { - properties._initializeParams = 1; - { - var error = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify(message.initializeParams); - if (error) - return "initializeParams." + error; - } - } - if (message.deviceName != null && message.hasOwnProperty("deviceName")) { - properties._deviceName = 1; - if (!$util.isString(message.deviceName)) - return "deviceName: string expected"; - } - if (message.kind != null && message.hasOwnProperty("kind")) { - properties._kind = 1; - if (!$util.isString(message.kind)) - return "kind: string expected"; - } - if (message.diskTypeDeprecated != null && message.hasOwnProperty("diskTypeDeprecated")) { - properties._diskTypeDeprecated = 1; - switch (message.diskTypeDeprecated) { - default: - return "diskTypeDeprecated: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.mode != null && message.hasOwnProperty("mode")) { - properties._mode = 1; - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.source != null && message.hasOwnProperty("source")) { - properties._source = 1; - if (!$util.isString(message.source)) - return "source: string expected"; - } - if (message.index != null && message.hasOwnProperty("index")) { - properties._index = 1; - if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) - return "index: integer|Long expected"; - } - if (message.boot != null && message.hasOwnProperty("boot")) { - properties._boot = 1; - if (typeof message.boot !== "boolean") - return "boot: boolean expected"; - } - if (message.autoDelete != null && message.hasOwnProperty("autoDelete")) { - properties._autoDelete = 1; - if (typeof message.autoDelete !== "boolean") - return "autoDelete: boolean expected"; - } - if (message.license != null && message.hasOwnProperty("license")) { - if (!Array.isArray(message.license)) - return "license: array expected"; - for (var i = 0; i < message.license.length; ++i) - if (!$util.isString(message.license[i])) - return "license: string[] expected"; - } - if (message.diskInterface != null && message.hasOwnProperty("diskInterface")) { - properties._diskInterface = 1; - switch (message.diskInterface) { - default: - return "diskInterface: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.guestOsFeature != null && message.hasOwnProperty("guestOsFeature")) { - if (!Array.isArray(message.guestOsFeature)) - return "guestOsFeature: array expected"; - for (var i = 0; i < message.guestOsFeature.length; ++i) { - var error = $root.google.cloud.backupdr.v1.GuestOsFeature.verify(message.guestOsFeature[i]); - if (error) - return "guestOsFeature." + error; - } - } - if (message.diskEncryptionKey != null && message.hasOwnProperty("diskEncryptionKey")) { - properties._diskEncryptionKey = 1; - { - var error = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.verify(message.diskEncryptionKey); - if (error) - return "diskEncryptionKey." + error; - } - } - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) { - properties._diskSizeGb = 1; - if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) - return "diskSizeGb: integer|Long expected"; - } - if (message.savedState != null && message.hasOwnProperty("savedState")) { - properties._savedState = 1; - switch (message.savedState) { - default: - return "savedState: enum value expected"; - case 0: - case 1: - break; - } - } - if (message.diskType != null && message.hasOwnProperty("diskType")) { - properties._diskType = 1; - if (!$util.isString(message.diskType)) - return "diskType: string expected"; - } - if (message.type != null && message.hasOwnProperty("type")) { - properties._type = 1; - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates an AttachedDisk message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk - */ - AttachedDisk.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AttachedDisk) - return object; - var message = new $root.google.cloud.backupdr.v1.AttachedDisk(); - if (object.initializeParams != null) { - if (typeof object.initializeParams !== "object") - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.initializeParams: object expected"); - message.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.fromObject(object.initializeParams); - } - if (object.deviceName != null) - message.deviceName = String(object.deviceName); - if (object.kind != null) - message.kind = String(object.kind); - switch (object.diskTypeDeprecated) { - default: - if (typeof object.diskTypeDeprecated === "number") { - message.diskTypeDeprecated = object.diskTypeDeprecated; - break; - } - break; - case "DISK_TYPE_UNSPECIFIED": - case 0: - message.diskTypeDeprecated = 0; - break; - case "SCRATCH": - case 1: - message.diskTypeDeprecated = 1; - break; - case "PERSISTENT": - case 2: - message.diskTypeDeprecated = 2; - break; - } - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "DISK_MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "READ_WRITE": - case 1: - message.mode = 1; - break; - case "READ_ONLY": - case 2: - message.mode = 2; - break; - case "LOCKED": - case 3: - message.mode = 3; - break; - } - if (object.source != null) - message.source = String(object.source); - if (object.index != null) - if ($util.Long) - (message.index = $util.Long.fromValue(object.index)).unsigned = false; - else if (typeof object.index === "string") - message.index = parseInt(object.index, 10); - else if (typeof object.index === "number") - message.index = object.index; - else if (typeof object.index === "object") - message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); - if (object.boot != null) - message.boot = Boolean(object.boot); - if (object.autoDelete != null) - message.autoDelete = Boolean(object.autoDelete); - if (object.license) { - if (!Array.isArray(object.license)) - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.license: array expected"); - message.license = []; - for (var i = 0; i < object.license.length; ++i) - message.license[i] = String(object.license[i]); - } - switch (object.diskInterface) { - default: - if (typeof object.diskInterface === "number") { - message.diskInterface = object.diskInterface; - break; - } - break; - case "DISK_INTERFACE_UNSPECIFIED": - case 0: - message.diskInterface = 0; - break; - case "SCSI": - case 1: - message.diskInterface = 1; - break; - case "NVME": - case 2: - message.diskInterface = 2; - break; - case "NVDIMM": - case 3: - message.diskInterface = 3; - break; - case "ISCSI": - case 4: - message.diskInterface = 4; - break; - } - if (object.guestOsFeature) { - if (!Array.isArray(object.guestOsFeature)) - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.guestOsFeature: array expected"); - message.guestOsFeature = []; - for (var i = 0; i < object.guestOsFeature.length; ++i) { - if (typeof object.guestOsFeature[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.guestOsFeature: object expected"); - message.guestOsFeature[i] = $root.google.cloud.backupdr.v1.GuestOsFeature.fromObject(object.guestOsFeature[i]); - } - } - if (object.diskEncryptionKey != null) { - if (typeof object.diskEncryptionKey !== "object") - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.diskEncryptionKey: object expected"); - message.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.fromObject(object.diskEncryptionKey); - } - if (object.diskSizeGb != null) - if ($util.Long) - (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; - else if (typeof object.diskSizeGb === "string") - message.diskSizeGb = parseInt(object.diskSizeGb, 10); - else if (typeof object.diskSizeGb === "number") - message.diskSizeGb = object.diskSizeGb; - else if (typeof object.diskSizeGb === "object") - message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); - switch (object.savedState) { - default: - if (typeof object.savedState === "number") { - message.savedState = object.savedState; - break; - } - break; - case "DISK_SAVED_STATE_UNSPECIFIED": - case 0: - message.savedState = 0; - break; - case "PRESERVED": - case 1: - message.savedState = 1; - break; - } - if (object.diskType != null) - message.diskType = String(object.diskType); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "DISK_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "SCRATCH": - case 1: - message.type = 1; - break; - case "PERSISTENT": - case 2: - message.type = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk} message AttachedDisk - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AttachedDisk.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.license = []; - object.guestOsFeature = []; - } - if (message.initializeParams != null && message.hasOwnProperty("initializeParams")) { - object.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.toObject(message.initializeParams, options); - if (options.oneofs) - object._initializeParams = "initializeParams"; - } - if (message.deviceName != null && message.hasOwnProperty("deviceName")) { - object.deviceName = message.deviceName; - if (options.oneofs) - object._deviceName = "deviceName"; - } - if (message.kind != null && message.hasOwnProperty("kind")) { - object.kind = message.kind; - if (options.oneofs) - object._kind = "kind"; - } - if (message.diskTypeDeprecated != null && message.hasOwnProperty("diskTypeDeprecated")) { - object.diskTypeDeprecated = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated] === undefined ? message.diskTypeDeprecated : $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated] : message.diskTypeDeprecated; - if (options.oneofs) - object._diskTypeDeprecated = "diskTypeDeprecated"; - } - if (message.mode != null && message.hasOwnProperty("mode")) { - object.mode = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode] === undefined ? message.mode : $root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode] : message.mode; - if (options.oneofs) - object._mode = "mode"; - } - if (message.source != null && message.hasOwnProperty("source")) { - object.source = message.source; - if (options.oneofs) - object._source = "source"; - } - if (message.index != null && message.hasOwnProperty("index")) { - if (typeof message.index === "number") - object.index = options.longs === String ? String(message.index) : message.index; - else - object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; - if (options.oneofs) - object._index = "index"; - } - if (message.boot != null && message.hasOwnProperty("boot")) { - object.boot = message.boot; - if (options.oneofs) - object._boot = "boot"; - } - if (message.autoDelete != null && message.hasOwnProperty("autoDelete")) { - object.autoDelete = message.autoDelete; - if (options.oneofs) - object._autoDelete = "autoDelete"; - } - if (message.license && message.license.length) { - object.license = []; - for (var j = 0; j < message.license.length; ++j) - object.license[j] = message.license[j]; - } - if (message.diskInterface != null && message.hasOwnProperty("diskInterface")) { - object.diskInterface = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskInterface[message.diskInterface] === undefined ? message.diskInterface : $root.google.cloud.backupdr.v1.AttachedDisk.DiskInterface[message.diskInterface] : message.diskInterface; - if (options.oneofs) - object._diskInterface = "diskInterface"; - } - if (message.guestOsFeature && message.guestOsFeature.length) { - object.guestOsFeature = []; - for (var j = 0; j < message.guestOsFeature.length; ++j) - object.guestOsFeature[j] = $root.google.cloud.backupdr.v1.GuestOsFeature.toObject(message.guestOsFeature[j], options); - } - if (message.diskEncryptionKey != null && message.hasOwnProperty("diskEncryptionKey")) { - object.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.toObject(message.diskEncryptionKey, options); - if (options.oneofs) - object._diskEncryptionKey = "diskEncryptionKey"; - } - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) { - if (typeof message.diskSizeGb === "number") - object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; - else - object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; - if (options.oneofs) - object._diskSizeGb = "diskSizeGb"; - } - if (message.savedState != null && message.hasOwnProperty("savedState")) { - object.savedState = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState] === undefined ? message.savedState : $root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState] : message.savedState; - if (options.oneofs) - object._savedState = "savedState"; - } - if (message.diskType != null && message.hasOwnProperty("diskType")) { - object.diskType = message.diskType; - if (options.oneofs) - object._diskType = "diskType"; - } - if (message.type != null && message.hasOwnProperty("type")) { - object.type = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type] : message.type; - if (options.oneofs) - object._type = "type"; - } - return object; - }; - - /** - * Converts this AttachedDisk to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - * @returns {Object.} JSON object - */ - AttachedDisk.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AttachedDisk - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AttachedDisk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AttachedDisk"; - }; - - AttachedDisk.InitializeParams = (function() { - - /** - * Properties of an InitializeParams. - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @interface IInitializeParams - * @property {string|null} [diskName] InitializeParams diskName - * @property {Array.|null} [replicaZones] InitializeParams replicaZones - */ - - /** - * Constructs a new InitializeParams. - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @classdesc Represents an InitializeParams. - * @implements IInitializeParams - * @constructor - * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams=} [properties] Properties to set - */ - function InitializeParams(properties) { - this.replicaZones = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InitializeParams diskName. - * @member {string|null|undefined} diskName - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @instance - */ - InitializeParams.prototype.diskName = null; - - /** - * InitializeParams replicaZones. - * @member {Array.} replicaZones - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @instance - */ - InitializeParams.prototype.replicaZones = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * InitializeParams _diskName. - * @member {"diskName"|undefined} _diskName - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @instance - */ - Object.defineProperty(InitializeParams.prototype, "_diskName", { - get: $util.oneOfGetter($oneOfFields = ["diskName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new InitializeParams instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams instance - */ - InitializeParams.create = function create(properties) { - return new InitializeParams(properties); - }; - - /** - * Encodes the specified InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams} message InitializeParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitializeParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.diskName != null && Object.hasOwnProperty.call(message, "diskName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.diskName); - if (message.replicaZones != null && message.replicaZones.length) - for (var i = 0; i < message.replicaZones.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.replicaZones[i]); - return writer; - }; - - /** - * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams} message InitializeParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitializeParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InitializeParams message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitializeParams.decode = function 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.backupdr.v1.AttachedDisk.InitializeParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.diskName = reader.string(); - break; - } - case 2: { - if (!(message.replicaZones && message.replicaZones.length)) - message.replicaZones = []; - message.replicaZones.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InitializeParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitializeParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InitializeParams message. - * @function verify - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InitializeParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.diskName != null && message.hasOwnProperty("diskName")) { - properties._diskName = 1; - if (!$util.isString(message.diskName)) - return "diskName: string expected"; - } - if (message.replicaZones != null && message.hasOwnProperty("replicaZones")) { - if (!Array.isArray(message.replicaZones)) - return "replicaZones: array expected"; - for (var i = 0; i < message.replicaZones.length; ++i) - if (!$util.isString(message.replicaZones[i])) - return "replicaZones: string[] expected"; - } - return null; - }; - - /** - * Creates an InitializeParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams - */ - InitializeParams.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams) - return object; - var message = new $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams(); - if (object.diskName != null) - message.diskName = String(object.diskName); - if (object.replicaZones) { - if (!Array.isArray(object.replicaZones)) - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.InitializeParams.replicaZones: array expected"); - message.replicaZones = []; - for (var i = 0; i < object.replicaZones.length; ++i) - message.replicaZones[i] = String(object.replicaZones[i]); - } - return message; - }; - - /** - * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} message InitializeParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InitializeParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.replicaZones = []; - if (message.diskName != null && message.hasOwnProperty("diskName")) { - object.diskName = message.diskName; - if (options.oneofs) - object._diskName = "diskName"; - } - if (message.replicaZones && message.replicaZones.length) { - object.replicaZones = []; - for (var j = 0; j < message.replicaZones.length; ++j) - object.replicaZones[j] = message.replicaZones[j]; - } - return object; - }; - - /** - * Converts this InitializeParams to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @instance - * @returns {Object.} JSON object - */ - InitializeParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InitializeParams - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InitializeParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AttachedDisk.InitializeParams"; - }; - - return InitializeParams; - })(); - - /** - * DiskType enum. - * @name google.cloud.backupdr.v1.AttachedDisk.DiskType - * @enum {number} - * @property {number} DISK_TYPE_UNSPECIFIED=0 DISK_TYPE_UNSPECIFIED value - * @property {number} SCRATCH=1 SCRATCH value - * @property {number} PERSISTENT=2 PERSISTENT value - */ - AttachedDisk.DiskType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DISK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCRATCH"] = 1; - values[valuesById[2] = "PERSISTENT"] = 2; - return values; - })(); - - /** - * DiskMode enum. - * @name google.cloud.backupdr.v1.AttachedDisk.DiskMode - * @enum {number} - * @property {number} DISK_MODE_UNSPECIFIED=0 DISK_MODE_UNSPECIFIED value - * @property {number} READ_WRITE=1 READ_WRITE value - * @property {number} READ_ONLY=2 READ_ONLY value - * @property {number} LOCKED=3 LOCKED value - */ - AttachedDisk.DiskMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DISK_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "READ_WRITE"] = 1; - values[valuesById[2] = "READ_ONLY"] = 2; - values[valuesById[3] = "LOCKED"] = 3; - return values; - })(); - - /** - * DiskInterface enum. - * @name google.cloud.backupdr.v1.AttachedDisk.DiskInterface - * @enum {number} - * @property {number} DISK_INTERFACE_UNSPECIFIED=0 DISK_INTERFACE_UNSPECIFIED value - * @property {number} SCSI=1 SCSI value - * @property {number} NVME=2 NVME value - * @property {number} NVDIMM=3 NVDIMM value - * @property {number} ISCSI=4 ISCSI value - */ - AttachedDisk.DiskInterface = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DISK_INTERFACE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCSI"] = 1; - values[valuesById[2] = "NVME"] = 2; - values[valuesById[3] = "NVDIMM"] = 3; - values[valuesById[4] = "ISCSI"] = 4; - return values; - })(); - - /** - * DiskSavedState enum. - * @name google.cloud.backupdr.v1.AttachedDisk.DiskSavedState - * @enum {number} - * @property {number} DISK_SAVED_STATE_UNSPECIFIED=0 DISK_SAVED_STATE_UNSPECIFIED value - * @property {number} PRESERVED=1 PRESERVED value - */ - AttachedDisk.DiskSavedState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DISK_SAVED_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRESERVED"] = 1; - return values; - })(); - - return AttachedDisk; - })(); - - v1.GuestOsFeature = (function() { - - /** - * Properties of a GuestOsFeature. - * @memberof google.cloud.backupdr.v1 - * @interface IGuestOsFeature - * @property {google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null} [type] GuestOsFeature type - */ - - /** - * Constructs a new GuestOsFeature. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GuestOsFeature. - * @implements IGuestOsFeature - * @constructor - * @param {google.cloud.backupdr.v1.IGuestOsFeature=} [properties] Properties to set - */ - function GuestOsFeature(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GuestOsFeature type. - * @member {google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null|undefined} type - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @instance - */ - GuestOsFeature.prototype.type = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * GuestOsFeature _type. - * @member {"type"|undefined} _type - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @instance - */ - Object.defineProperty(GuestOsFeature.prototype, "_type", { - get: $util.oneOfGetter($oneOfFields = ["type"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GuestOsFeature instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {google.cloud.backupdr.v1.IGuestOsFeature=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature instance - */ - GuestOsFeature.create = function create(properties) { - return new GuestOsFeature(properties); - }; - - /** - * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {google.cloud.backupdr.v1.IGuestOsFeature} message GuestOsFeature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GuestOsFeature.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - return writer; - }; - - /** - * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {google.cloud.backupdr.v1.IGuestOsFeature} message GuestOsFeature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GuestOsFeature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GuestOsFeature message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GuestOsFeature.decode = function 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.backupdr.v1.GuestOsFeature(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GuestOsFeature.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GuestOsFeature message. - * @function verify - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GuestOsFeature.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.type != null && message.hasOwnProperty("type")) { - properties._type = 1; - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - break; - } - } - return null; - }; - - /** - * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature - */ - GuestOsFeature.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GuestOsFeature) - return object; - var message = new $root.google.cloud.backupdr.v1.GuestOsFeature(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "FEATURE_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "VIRTIO_SCSI_MULTIQUEUE": - case 1: - message.type = 1; - break; - case "WINDOWS": - case 2: - message.type = 2; - break; - case "MULTI_IP_SUBNET": - case 3: - message.type = 3; - break; - case "UEFI_COMPATIBLE": - case 4: - message.type = 4; - break; - case "SECURE_BOOT": - case 5: - message.type = 5; - break; - case "GVNIC": - case 6: - message.type = 6; - break; - case "SEV_CAPABLE": - case 7: - message.type = 7; - break; - case "BARE_METAL_LINUX_COMPATIBLE": - case 8: - message.type = 8; - break; - case "SUSPEND_RESUME_COMPATIBLE": - case 9: - message.type = 9; - break; - case "SEV_LIVE_MIGRATABLE": - case 10: - message.type = 10; - break; - case "SEV_SNP_CAPABLE": - case 11: - message.type = 11; - break; - case "TDX_CAPABLE": - case 12: - message.type = 12; - break; - case "IDPF": - case 13: - message.type = 13; - break; - case "SEV_LIVE_MIGRATABLE_V2": - case 14: - message.type = 14; - break; - } - return message; - }; - - /** - * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {google.cloud.backupdr.v1.GuestOsFeature} message GuestOsFeature - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GuestOsFeature.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.type != null && message.hasOwnProperty("type")) { - object.type = options.enums === String ? $root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type] : message.type; - if (options.oneofs) - object._type = "type"; - } - return object; - }; - - /** - * Converts this GuestOsFeature to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @instance - * @returns {Object.} JSON object - */ - GuestOsFeature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GuestOsFeature - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GuestOsFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GuestOsFeature"; - }; - - /** - * FeatureType enum. - * @name google.cloud.backupdr.v1.GuestOsFeature.FeatureType - * @enum {number} - * @property {number} FEATURE_TYPE_UNSPECIFIED=0 FEATURE_TYPE_UNSPECIFIED value - * @property {number} VIRTIO_SCSI_MULTIQUEUE=1 VIRTIO_SCSI_MULTIQUEUE value - * @property {number} WINDOWS=2 WINDOWS value - * @property {number} MULTI_IP_SUBNET=3 MULTI_IP_SUBNET value - * @property {number} UEFI_COMPATIBLE=4 UEFI_COMPATIBLE value - * @property {number} SECURE_BOOT=5 SECURE_BOOT value - * @property {number} GVNIC=6 GVNIC value - * @property {number} SEV_CAPABLE=7 SEV_CAPABLE value - * @property {number} BARE_METAL_LINUX_COMPATIBLE=8 BARE_METAL_LINUX_COMPATIBLE value - * @property {number} SUSPEND_RESUME_COMPATIBLE=9 SUSPEND_RESUME_COMPATIBLE value - * @property {number} SEV_LIVE_MIGRATABLE=10 SEV_LIVE_MIGRATABLE value - * @property {number} SEV_SNP_CAPABLE=11 SEV_SNP_CAPABLE value - * @property {number} TDX_CAPABLE=12 TDX_CAPABLE value - * @property {number} IDPF=13 IDPF value - * @property {number} SEV_LIVE_MIGRATABLE_V2=14 SEV_LIVE_MIGRATABLE_V2 value - */ - GuestOsFeature.FeatureType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FEATURE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "VIRTIO_SCSI_MULTIQUEUE"] = 1; - values[valuesById[2] = "WINDOWS"] = 2; - values[valuesById[3] = "MULTI_IP_SUBNET"] = 3; - values[valuesById[4] = "UEFI_COMPATIBLE"] = 4; - values[valuesById[5] = "SECURE_BOOT"] = 5; - values[valuesById[6] = "GVNIC"] = 6; - values[valuesById[7] = "SEV_CAPABLE"] = 7; - values[valuesById[8] = "BARE_METAL_LINUX_COMPATIBLE"] = 8; - values[valuesById[9] = "SUSPEND_RESUME_COMPATIBLE"] = 9; - values[valuesById[10] = "SEV_LIVE_MIGRATABLE"] = 10; - values[valuesById[11] = "SEV_SNP_CAPABLE"] = 11; - values[valuesById[12] = "TDX_CAPABLE"] = 12; - values[valuesById[13] = "IDPF"] = 13; - values[valuesById[14] = "SEV_LIVE_MIGRATABLE_V2"] = 14; - return values; - })(); - - return GuestOsFeature; - })(); - - /** - * KeyRevocationActionType enum. - * @name google.cloud.backupdr.v1.KeyRevocationActionType - * @enum {number} - * @property {number} KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED=0 KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED value - * @property {number} NONE=1 NONE value - * @property {number} STOP=2 STOP value - */ - v1.KeyRevocationActionType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NONE"] = 1; - values[valuesById[2] = "STOP"] = 2; - return values; - })(); - - return v1; - })(); - - return backupdr; - })(); - - 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.FieldInfo = (function() { - - /** - * Properties of a FieldInfo. - * @memberof google.api - * @interface IFieldInfo - * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format - */ - - /** - * Constructs a new FieldInfo. - * @memberof google.api - * @classdesc Represents a FieldInfo. - * @implements IFieldInfo - * @constructor - * @param {google.api.IFieldInfo=} [properties] Properties to set - */ - function FieldInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldInfo format. - * @member {google.api.FieldInfo.Format} format - * @memberof google.api.FieldInfo - * @instance - */ - FieldInfo.prototype.format = 0; - - /** - * Creates a new FieldInfo instance using the specified properties. - * @function create - * @memberof google.api.FieldInfo - * @static - * @param {google.api.IFieldInfo=} [properties] Properties to set - * @returns {google.api.FieldInfo} FieldInfo instance - */ - FieldInfo.create = function create(properties) { - return new FieldInfo(properties); - }; - - /** - * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @function encode - * @memberof google.api.FieldInfo - * @static - * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); - return writer; - }; - - /** - * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.FieldInfo - * @static - * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldInfo message from the specified reader or buffer. - * @function decode - * @memberof google.api.FieldInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.FieldInfo} FieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldInfo.decode = function 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.FieldInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.format = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.FieldInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.FieldInfo} FieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldInfo message. - * @function verify - * @memberof google.api.FieldInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.FieldInfo - * @static - * @param {Object.} object Plain object - * @returns {google.api.FieldInfo} FieldInfo - */ - FieldInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.FieldInfo) - return object; - var message = new $root.google.api.FieldInfo(); - switch (object.format) { - default: - if (typeof object.format === "number") { - message.format = object.format; - break; - } - break; - case "FORMAT_UNSPECIFIED": - case 0: - message.format = 0; - break; - case "UUID4": - case 1: - message.format = 1; - break; - case "IPV4": - case 2: - message.format = 2; - break; - case "IPV6": - case 3: - message.format = 3; - break; - case "IPV4_OR_IPV6": - case 4: - message.format = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.FieldInfo - * @static - * @param {google.api.FieldInfo} message FieldInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; - return object; - }; - - /** - * Converts this FieldInfo to JSON. - * @function toJSON - * @memberof google.api.FieldInfo - * @instance - * @returns {Object.} JSON object - */ - FieldInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldInfo - * @function getTypeUrl - * @memberof google.api.FieldInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.FieldInfo"; - }; - - /** - * Format enum. - * @name google.api.FieldInfo.Format - * @enum {number} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} UUID4=1 UUID4 value - * @property {number} IPV4=2 IPV4 value - * @property {number} IPV6=3 IPV6 value - * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value - */ - FieldInfo.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "UUID4"] = 1; - values[valuesById[2] = "IPV4"] = 2; - values[valuesById[3] = "IPV6"] = 3; - values[valuesById[4] = "IPV4_OR_IPV6"] = 4; - return values; - })(); - - return FieldInfo; - })(); - - 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.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo - * @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.fieldInfo. - * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldInfo"] = null; - - /** - * 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(); - if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) - $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).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 291403980: { - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); - 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.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { - var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); - if (error) - return ".google.api.fieldInfo." + error; - } - 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.fieldInfo"] != null) { - if (typeof object[".google.api.fieldInfo"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); - } - 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; - object[".google.api.fieldInfo"] = 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); - if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) - object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], 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.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; - })(); - - 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.DoubleValue = (function() { - - /** - * Properties of a DoubleValue. - * @memberof google.protobuf - * @interface IDoubleValue - * @property {number|null} [value] DoubleValue value - */ - - /** - * Constructs a new DoubleValue. - * @memberof google.protobuf - * @classdesc Represents a DoubleValue. - * @implements IDoubleValue - * @constructor - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set - */ - function DoubleValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DoubleValue value. - * @member {number} value - * @memberof google.protobuf.DoubleValue - * @instance - */ - DoubleValue.prototype.value = 0; - - /** - * Creates a new DoubleValue instance using the specified properties. - * @function create - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set - * @returns {google.protobuf.DoubleValue} DoubleValue instance - */ - DoubleValue.create = function create(properties) { - return new DoubleValue(properties); - }; - - /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DoubleValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); - return writer; - }; - - /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DoubleValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DoubleValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DoubleValue} DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DoubleValue.decode = function 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.DoubleValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DoubleValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DoubleValue} DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DoubleValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DoubleValue message. - * @function verify - * @memberof google.protobuf.DoubleValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DoubleValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - return null; - }; - - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DoubleValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DoubleValue} DoubleValue - */ - DoubleValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DoubleValue) - return object; - var message = new $root.google.protobuf.DoubleValue(); - if (object.value != null) - message.value = Number(object.value); - return message; - }; - - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.DoubleValue} message DoubleValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DoubleValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; - - /** - * Converts this DoubleValue to JSON. - * @function toJSON - * @memberof google.protobuf.DoubleValue - * @instance - * @returns {Object.} JSON object - */ - DoubleValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DoubleValue - * @function getTypeUrl - * @memberof google.protobuf.DoubleValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DoubleValue"; - }; - - return DoubleValue; - })(); - - protobuf.FloatValue = (function() { - - /** - * Properties of a FloatValue. - * @memberof google.protobuf - * @interface IFloatValue - * @property {number|null} [value] FloatValue value - */ - - /** - * Constructs a new FloatValue. - * @memberof google.protobuf - * @classdesc Represents a FloatValue. - * @implements IFloatValue - * @constructor - * @param {google.protobuf.IFloatValue=} [properties] Properties to set - */ - function FloatValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FloatValue value. - * @member {number} value - * @memberof google.protobuf.FloatValue - * @instance - */ - FloatValue.prototype.value = 0; - - /** - * Creates a new FloatValue instance using the specified properties. - * @function create - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue=} [properties] Properties to set - * @returns {google.protobuf.FloatValue} FloatValue instance - */ - FloatValue.create = function create(properties) { - return new FloatValue(properties); - }; - - /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FloatValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); - return writer; - }; - - /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FloatValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FloatValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FloatValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FloatValue} FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FloatValue.decode = function 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.FloatValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FloatValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FloatValue} FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FloatValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FloatValue message. - * @function verify - * @memberof google.protobuf.FloatValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FloatValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - return null; - }; - - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FloatValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FloatValue} FloatValue - */ - FloatValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FloatValue) - return object; - var message = new $root.google.protobuf.FloatValue(); - if (object.value != null) - message.value = Number(object.value); - return message; - }; - - /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.FloatValue} message FloatValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FloatValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; - - /** - * Converts this FloatValue to JSON. - * @function toJSON - * @memberof google.protobuf.FloatValue - * @instance - * @returns {Object.} JSON object - */ - FloatValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FloatValue - * @function getTypeUrl - * @memberof google.protobuf.FloatValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FloatValue"; - }; - - return FloatValue; - })(); - - protobuf.Int64Value = (function() { - - /** - * Properties of an Int64Value. - * @memberof google.protobuf - * @interface IInt64Value - * @property {number|Long|null} [value] Int64Value value - */ - - /** - * Constructs a new Int64Value. - * @memberof google.protobuf - * @classdesc Represents an Int64Value. - * @implements IInt64Value - * @constructor - * @param {google.protobuf.IInt64Value=} [properties] Properties to set - */ - function Int64Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Int64Value value. - * @member {number|Long} value - * @memberof google.protobuf.Int64Value - * @instance - */ - Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new Int64Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value=} [properties] Properties to set - * @returns {google.protobuf.Int64Value} Int64Value instance - */ - Int64Value.create = function create(properties) { - return new Int64Value(properties); - }; - - /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int64Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); - return writer; - }; - - /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Int64Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Int64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Int64Value} Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int64Value.decode = function 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.Int64Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Int64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Int64Value} Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int64Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Int64Value message. - * @function verify - * @memberof google.protobuf.Int64Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Int64Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; - return null; - }; - - /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int64Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int64Value} Int64Value - */ - Int64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int64Value) - return object; - var message = new $root.google.protobuf.Int64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = false; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.Int64Value} message Int64Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Int64Value.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.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; - return object; - }; - - /** - * Converts this Int64Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int64Value - * @instance - * @returns {Object.} JSON object - */ - Int64Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Int64Value - * @function getTypeUrl - * @memberof google.protobuf.Int64Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Int64Value"; - }; - - return Int64Value; - })(); - - protobuf.UInt64Value = (function() { - - /** - * Properties of a UInt64Value. - * @memberof google.protobuf - * @interface IUInt64Value - * @property {number|Long|null} [value] UInt64Value value - */ - - /** - * Constructs a new UInt64Value. - * @memberof google.protobuf - * @classdesc Represents a UInt64Value. - * @implements IUInt64Value - * @constructor - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set - */ - function UInt64Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UInt64Value value. - * @member {number|Long} value - * @memberof google.protobuf.UInt64Value - * @instance - */ - UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new UInt64Value instance using the specified properties. - * @function create - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set - * @returns {google.protobuf.UInt64Value} UInt64Value instance - */ - UInt64Value.create = function create(properties) { - return new UInt64Value(properties); - }; - - /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt64Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); - return writer; - }; - - /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UInt64Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UInt64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UInt64Value} UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt64Value.decode = function 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.UInt64Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.uint64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UInt64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UInt64Value} UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt64Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UInt64Value message. - * @function verify - * @memberof google.protobuf.UInt64Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UInt64Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; - return null; - }; - - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UInt64Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UInt64Value} UInt64Value - */ - UInt64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt64Value) - return object; - var message = new $root.google.protobuf.UInt64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = true; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.UInt64Value} message UInt64Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UInt64Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; - return object; - }; - - /** - * Converts this UInt64Value to JSON. - * @function toJSON - * @memberof google.protobuf.UInt64Value - * @instance - * @returns {Object.} JSON object - */ - UInt64Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UInt64Value - * @function getTypeUrl - * @memberof google.protobuf.UInt64Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UInt64Value"; - }; - - return UInt64Value; - })(); - - protobuf.Int32Value = (function() { - - /** - * Properties of an Int32Value. - * @memberof google.protobuf - * @interface IInt32Value - * @property {number|null} [value] Int32Value value - */ - - /** - * Constructs a new Int32Value. - * @memberof google.protobuf - * @classdesc Represents an Int32Value. - * @implements IInt32Value - * @constructor - * @param {google.protobuf.IInt32Value=} [properties] Properties to set - */ - function Int32Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Int32Value value. - * @member {number} value - * @memberof google.protobuf.Int32Value - * @instance - */ - Int32Value.prototype.value = 0; - - /** - * Creates a new Int32Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value=} [properties] Properties to set - * @returns {google.protobuf.Int32Value} Int32Value instance - */ - Int32Value.create = function create(properties) { - return new Int32Value(properties); - }; - - /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int32Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); - return writer; - }; - - /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Int32Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Int32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Int32Value} Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int32Value.decode = function 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.Int32Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Int32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Int32Value} Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int32Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Int32Value message. - * @function verify - * @memberof google.protobuf.Int32Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Int32Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; - return null; - }; - - /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int32Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int32Value} Int32Value - */ - Int32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int32Value) - return object; - var message = new $root.google.protobuf.Int32Value(); - if (object.value != null) - message.value = object.value | 0; - return message; - }; - - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.Int32Value} message Int32Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Int32Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this Int32Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int32Value - * @instance - * @returns {Object.} JSON object - */ - Int32Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Int32Value - * @function getTypeUrl - * @memberof google.protobuf.Int32Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Int32Value"; - }; - - return Int32Value; - })(); - - protobuf.UInt32Value = (function() { - - /** - * Properties of a UInt32Value. - * @memberof google.protobuf - * @interface IUInt32Value - * @property {number|null} [value] UInt32Value value - */ - - /** - * Constructs a new UInt32Value. - * @memberof google.protobuf - * @classdesc Represents a UInt32Value. - * @implements IUInt32Value - * @constructor - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set - */ - function UInt32Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UInt32Value value. - * @member {number} value - * @memberof google.protobuf.UInt32Value - * @instance - */ - UInt32Value.prototype.value = 0; - - /** - * Creates a new UInt32Value instance using the specified properties. - * @function create - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set - * @returns {google.protobuf.UInt32Value} UInt32Value instance - */ - UInt32Value.create = function create(properties) { - return new UInt32Value(properties); - }; - - /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt32Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); - return writer; - }; - - /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UInt32Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UInt32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UInt32Value} UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt32Value.decode = function 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.UInt32Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UInt32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UInt32Value} UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt32Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UInt32Value message. - * @function verify - * @memberof google.protobuf.UInt32Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UInt32Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; - return null; - }; - - /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UInt32Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UInt32Value} UInt32Value - */ - UInt32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt32Value) - return object; - var message = new $root.google.protobuf.UInt32Value(); - if (object.value != null) - message.value = object.value >>> 0; - return message; - }; - - /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.UInt32Value} message UInt32Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UInt32Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this UInt32Value to JSON. - * @function toJSON - * @memberof google.protobuf.UInt32Value - * @instance - * @returns {Object.} JSON object - */ - UInt32Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UInt32Value - * @function getTypeUrl - * @memberof google.protobuf.UInt32Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UInt32Value"; - }; - - return UInt32Value; - })(); - - protobuf.BoolValue = (function() { - - /** - * Properties of a BoolValue. - * @memberof google.protobuf - * @interface IBoolValue - * @property {boolean|null} [value] BoolValue value - */ - - /** - * Constructs a new BoolValue. - * @memberof google.protobuf - * @classdesc Represents a BoolValue. - * @implements IBoolValue - * @constructor - * @param {google.protobuf.IBoolValue=} [properties] Properties to set - */ - function BoolValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BoolValue value. - * @member {boolean} value - * @memberof google.protobuf.BoolValue - * @instance - */ - BoolValue.prototype.value = false; - - /** - * Creates a new BoolValue instance using the specified properties. - * @function create - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue=} [properties] Properties to set - * @returns {google.protobuf.BoolValue} BoolValue instance - */ - BoolValue.create = function create(properties) { - return new BoolValue(properties); - }; - - /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BoolValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); - return writer; - }; - - /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BoolValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BoolValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.BoolValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.BoolValue} BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BoolValue.decode = function 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.BoolValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.BoolValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.BoolValue} BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BoolValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BoolValue message. - * @function verify - * @memberof google.protobuf.BoolValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BoolValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "boolean") - return "value: boolean expected"; - return null; - }; - - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.BoolValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.BoolValue} BoolValue - */ - BoolValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BoolValue) - return object; - var message = new $root.google.protobuf.BoolValue(); - if (object.value != null) - message.value = Boolean(object.value); - return message; - }; - - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.BoolValue} message BoolValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BoolValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = false; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this BoolValue to JSON. - * @function toJSON - * @memberof google.protobuf.BoolValue - * @instance - * @returns {Object.} JSON object - */ - BoolValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BoolValue - * @function getTypeUrl - * @memberof google.protobuf.BoolValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.BoolValue"; - }; - - return BoolValue; - })(); - - protobuf.StringValue = (function() { - - /** - * Properties of a StringValue. - * @memberof google.protobuf - * @interface IStringValue - * @property {string|null} [value] StringValue value - */ - - /** - * Constructs a new StringValue. - * @memberof google.protobuf - * @classdesc Represents a StringValue. - * @implements IStringValue - * @constructor - * @param {google.protobuf.IStringValue=} [properties] Properties to set - */ - function StringValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StringValue value. - * @member {string} value - * @memberof google.protobuf.StringValue - * @instance - */ - StringValue.prototype.value = ""; - - /** - * Creates a new StringValue instance using the specified properties. - * @function create - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue=} [properties] Properties to set - * @returns {google.protobuf.StringValue} StringValue instance - */ - StringValue.create = function create(properties) { - return new StringValue(properties); - }; - - /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - return writer; - }; - - /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StringValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.StringValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.StringValue} StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringValue.decode = function 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.StringValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.StringValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.StringValue} StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StringValue message. - * @function verify - * @memberof google.protobuf.StringValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.StringValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.StringValue} StringValue - */ - StringValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.StringValue) - return object; - var message = new $root.google.protobuf.StringValue(); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.StringValue} message StringValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this StringValue to JSON. - * @function toJSON - * @memberof google.protobuf.StringValue - * @instance - * @returns {Object.} JSON object - */ - StringValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StringValue - * @function getTypeUrl - * @memberof google.protobuf.StringValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.StringValue"; - }; - - return StringValue; - })(); - - protobuf.BytesValue = (function() { - - /** - * Properties of a BytesValue. - * @memberof google.protobuf - * @interface IBytesValue - * @property {Uint8Array|null} [value] BytesValue value - */ - - /** - * Constructs a new BytesValue. - * @memberof google.protobuf - * @classdesc Represents a BytesValue. - * @implements IBytesValue - * @constructor - * @param {google.protobuf.IBytesValue=} [properties] Properties to set - */ - function BytesValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BytesValue value. - * @member {Uint8Array} value - * @memberof google.protobuf.BytesValue - * @instance - */ - BytesValue.prototype.value = $util.newBuffer([]); - - /** - * Creates a new BytesValue instance using the specified properties. - * @function create - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue=} [properties] Properties to set - * @returns {google.protobuf.BytesValue} BytesValue instance - */ - BytesValue.create = function create(properties) { - return new BytesValue(properties); - }; - - /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BytesValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BytesValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BytesValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.BytesValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.BytesValue} BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BytesValue.decode = function 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.BytesValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.BytesValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.BytesValue} BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BytesValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BytesValue message. - * @function verify - * @memberof google.protobuf.BytesValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BytesValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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 a BytesValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.BytesValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.BytesValue} BytesValue - */ - BytesValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BytesValue) - return object; - var message = new $root.google.protobuf.BytesValue(); - 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 a BytesValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.BytesValue} message BytesValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BytesValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - 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 BytesValue to JSON. - * @function toJSON - * @memberof google.protobuf.BytesValue - * @instance - * @returns {Object.} JSON object - */ - BytesValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BytesValue - * @function getTypeUrl - * @memberof google.protobuf.BytesValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.BytesValue"; - }; - - return BytesValue; - })(); - - return protobuf; - })(); - - google.type = (function() { - - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; - - /** - * DayOfWeek enum. - * @name google.type.DayOfWeek - * @enum {number} - * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value - * @property {number} MONDAY=1 MONDAY value - * @property {number} TUESDAY=2 TUESDAY value - * @property {number} WEDNESDAY=3 WEDNESDAY value - * @property {number} THURSDAY=4 THURSDAY value - * @property {number} FRIDAY=5 FRIDAY value - * @property {number} SATURDAY=6 SATURDAY value - * @property {number} SUNDAY=7 SUNDAY value - */ - type.DayOfWeek = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; - values[valuesById[1] = "MONDAY"] = 1; - values[valuesById[2] = "TUESDAY"] = 2; - values[valuesById[3] = "WEDNESDAY"] = 3; - values[valuesById[4] = "THURSDAY"] = 4; - values[valuesById[5] = "FRIDAY"] = 5; - values[valuesById[6] = "SATURDAY"] = 6; - values[valuesById[7] = "SUNDAY"] = 7; - return values; - })(); - - /** - * Month enum. - * @name google.type.Month - * @enum {number} - * @property {number} MONTH_UNSPECIFIED=0 MONTH_UNSPECIFIED value - * @property {number} JANUARY=1 JANUARY value - * @property {number} FEBRUARY=2 FEBRUARY value - * @property {number} MARCH=3 MARCH value - * @property {number} APRIL=4 APRIL value - * @property {number} MAY=5 MAY value - * @property {number} JUNE=6 JUNE value - * @property {number} JULY=7 JULY value - * @property {number} AUGUST=8 AUGUST value - * @property {number} SEPTEMBER=9 SEPTEMBER value - * @property {number} OCTOBER=10 OCTOBER value - * @property {number} NOVEMBER=11 NOVEMBER value - * @property {number} DECEMBER=12 DECEMBER value - */ - type.Month = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MONTH_UNSPECIFIED"] = 0; - values[valuesById[1] = "JANUARY"] = 1; - values[valuesById[2] = "FEBRUARY"] = 2; - values[valuesById[3] = "MARCH"] = 3; - values[valuesById[4] = "APRIL"] = 4; - values[valuesById[5] = "MAY"] = 5; - values[valuesById[6] = "JUNE"] = 6; - values[valuesById[7] = "JULY"] = 7; - values[valuesById[8] = "AUGUST"] = 8; - values[valuesById[9] = "SEPTEMBER"] = 9; - values[valuesById[10] = "OCTOBER"] = 10; - values[valuesById[11] = "NOVEMBER"] = 11; - values[valuesById[12] = "DECEMBER"] = 12; - return values; - })(); - - type.Expr = (function() { - - /** - * Properties of an Expr. - * @memberof google.type - * @interface IExpr - * @property {string|null} [expression] Expr expression - * @property {string|null} [title] Expr title - * @property {string|null} [description] Expr description - * @property {string|null} [location] Expr location - */ - - /** - * Constructs a new Expr. - * @memberof google.type - * @classdesc Represents an Expr. - * @implements IExpr - * @constructor - * @param {google.type.IExpr=} [properties] Properties to set - */ - function Expr(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Expr expression. - * @member {string} expression - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.expression = ""; - - /** - * Expr title. - * @member {string} title - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.title = ""; - - /** - * Expr description. - * @member {string} description - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.description = ""; - - /** - * Expr location. - * @member {string} location - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.location = ""; - - /** - * Creates a new Expr instance using the specified properties. - * @function create - * @memberof google.type.Expr - * @static - * @param {google.type.IExpr=} [properties] Properties to set - * @returns {google.type.Expr} Expr instance - */ - Expr.create = function create(properties) { - return new Expr(properties); - }; - - /** - * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @function encode - * @memberof google.type.Expr - * @static - * @param {google.type.IExpr} message Expr message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Expr.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); - return writer; - }; - - /** - * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @function encodeDelimited - * @memberof google.type.Expr - * @static - * @param {google.type.IExpr} message Expr message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Expr.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Expr message from the specified reader or buffer. - * @function decode - * @memberof google.type.Expr - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.type.Expr} Expr - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Expr.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Expr(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.expression = reader.string(); - break; - } - case 2: { - message.title = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.location = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Expr message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.type.Expr - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.Expr} Expr - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Expr.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Expr message. - * @function verify - * @memberof google.type.Expr - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Expr.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.expression != null && message.hasOwnProperty("expression")) - if (!$util.isString(message.expression)) - return "expression: string expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - return null; - }; - - /** - * Creates an Expr message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.type.Expr - * @static - * @param {Object.} object Plain object - * @returns {google.type.Expr} Expr - */ - Expr.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.Expr) - return object; - var message = new $root.google.type.Expr(); - if (object.expression != null) - message.expression = String(object.expression); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.location != null) - message.location = String(object.location); - return message; - }; - - /** - * Creates a plain object from an Expr message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.Expr - * @static - * @param {google.type.Expr} message Expr - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Expr.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.expression = ""; - object.title = ""; - object.description = ""; - object.location = ""; - } - if (message.expression != null && message.hasOwnProperty("expression")) - object.expression = message.expression; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - return object; - }; - - /** - * Converts this Expr to JSON. - * @function toJSON - * @memberof google.type.Expr - * @instance - * @returns {Object.} JSON object - */ - Expr.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Expr - * @function getTypeUrl - * @memberof google.type.Expr - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Expr.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.type.Expr"; - }; - - return Expr; - })(); - - return type; - })(); - - 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; - })(); - - google.iam = (function() { - - /** - * Namespace iam. - * @memberof google - * @namespace - */ - var iam = {}; - - iam.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.iam - * @namespace - */ - var v1 = {}; - - v1.IAMPolicy = (function() { - - /** - * Constructs a new IAMPolicy service. - * @memberof google.iam.v1 - * @classdesc Represents a IAMPolicy - * @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 IAMPolicy(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (IAMPolicy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IAMPolicy; - - /** - * Creates new IAMPolicy service using the specified rpc implementation. - * @function create - * @memberof google.iam.v1.IAMPolicy - * @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 {IAMPolicy} RPC service. Useful where requests and/or responses are streamed. - */ - IAMPolicy.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. - * @memberof google.iam.v1.IAMPolicy - * @typedef SetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.iam.v1.IAMPolicy.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IAMPolicy.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "SetIamPolicy" }); - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. - * @memberof google.iam.v1.IAMPolicy - * @typedef GetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.iam.v1.IAMPolicy.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IAMPolicy.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "GetIamPolicy" }); - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. - * @memberof google.iam.v1.IAMPolicy - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse - */ - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.iam.v1.IAMPolicy.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IAMPolicy.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return IAMPolicy; - })(); - - v1.SetIamPolicyRequest = (function() { - - /** - * Properties of a SetIamPolicyRequest. - * @memberof google.iam.v1 - * @interface ISetIamPolicyRequest - * @property {string|null} [resource] SetIamPolicyRequest resource - * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy - * @property {google.protobuf.IFieldMask|null} [updateMask] SetIamPolicyRequest updateMask - */ - - /** - * Constructs a new SetIamPolicyRequest. - * @memberof google.iam.v1 - * @classdesc Represents a SetIamPolicyRequest. - * @implements ISetIamPolicyRequest - * @constructor - * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set - */ - function SetIamPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetIamPolicyRequest resource. - * @member {string} resource - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - */ - SetIamPolicyRequest.prototype.resource = ""; - - /** - * SetIamPolicyRequest policy. - * @member {google.iam.v1.IPolicy|null|undefined} policy - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - */ - SetIamPolicyRequest.prototype.policy = null; - - /** - * SetIamPolicyRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - */ - SetIamPolicyRequest.prototype.updateMask = null; - - /** - * Creates a new SetIamPolicyRequest instance using the specified properties. - * @function create - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest instance - */ - SetIamPolicyRequest.create = function create(properties) { - return new SetIamPolicyRequest(properties); - }; - - /** - * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetIamPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) - $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetIamPolicyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.SetIamPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetIamPolicyRequest message. - * @function verify - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetIamPolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.policy != null && message.hasOwnProperty("policy")) { - var error = $root.google.iam.v1.Policy.verify(message.policy); - if (error) - return "policy." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; - - /** - * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest - */ - SetIamPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.SetIamPolicyRequest) - return object; - var message = new $root.google.iam.v1.SetIamPolicyRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.policy != null) { - if (typeof object.policy !== "object") - throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); - message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.SetIamPolicyRequest} message SetIamPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetIamPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resource = ""; - object.policy = null; - object.updateMask = null; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.policy != null && message.hasOwnProperty("policy")) - object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this SetIamPolicyRequest to JSON. - * @function toJSON - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - SetIamPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetIamPolicyRequest - * @function getTypeUrl - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.SetIamPolicyRequest"; - }; - - return SetIamPolicyRequest; - })(); - - v1.GetIamPolicyRequest = (function() { - - /** - * Properties of a GetIamPolicyRequest. - * @memberof google.iam.v1 - * @interface IGetIamPolicyRequest - * @property {string|null} [resource] GetIamPolicyRequest resource - * @property {google.iam.v1.IGetPolicyOptions|null} [options] GetIamPolicyRequest options - */ - - /** - * Constructs a new GetIamPolicyRequest. - * @memberof google.iam.v1 - * @classdesc Represents a GetIamPolicyRequest. - * @implements IGetIamPolicyRequest - * @constructor - * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set - */ - function GetIamPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetIamPolicyRequest resource. - * @member {string} resource - * @memberof google.iam.v1.GetIamPolicyRequest - * @instance - */ - GetIamPolicyRequest.prototype.resource = ""; - - /** - * GetIamPolicyRequest options. - * @member {google.iam.v1.IGetPolicyOptions|null|undefined} options - * @memberof google.iam.v1.GetIamPolicyRequest - * @instance - */ - GetIamPolicyRequest.prototype.options = null; - - /** - * Creates a new GetIamPolicyRequest instance using the specified properties. - * @function create - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest instance - */ - GetIamPolicyRequest.create = function create(properties) { - return new GetIamPolicyRequest(properties); - }; - - /** - * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetIamPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetIamPolicyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetIamPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetIamPolicyRequest message. - * @function verify - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetIamPolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest - */ - GetIamPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.GetIamPolicyRequest) - return object; - var message = new $root.google.iam.v1.GetIamPolicyRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected"); - message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.GetIamPolicyRequest} message GetIamPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetIamPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resource = ""; - object.options = null; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this GetIamPolicyRequest to JSON. - * @function toJSON - * @memberof google.iam.v1.GetIamPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - GetIamPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetIamPolicyRequest - * @function getTypeUrl - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.GetIamPolicyRequest"; - }; - - return GetIamPolicyRequest; - })(); - - v1.TestIamPermissionsRequest = (function() { - - /** - * Properties of a TestIamPermissionsRequest. - * @memberof google.iam.v1 - * @interface ITestIamPermissionsRequest - * @property {string|null} [resource] TestIamPermissionsRequest resource - * @property {Array.|null} [permissions] TestIamPermissionsRequest permissions - */ - - /** - * Constructs a new TestIamPermissionsRequest. - * @memberof google.iam.v1 - * @classdesc Represents a TestIamPermissionsRequest. - * @implements ITestIamPermissionsRequest - * @constructor - * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set - */ - function TestIamPermissionsRequest(properties) { - this.permissions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TestIamPermissionsRequest resource. - * @member {string} resource - * @memberof google.iam.v1.TestIamPermissionsRequest - * @instance - */ - TestIamPermissionsRequest.prototype.resource = ""; - - /** - * TestIamPermissionsRequest permissions. - * @member {Array.} permissions - * @memberof google.iam.v1.TestIamPermissionsRequest - * @instance - */ - TestIamPermissionsRequest.prototype.permissions = $util.emptyArray; - - /** - * Creates a new TestIamPermissionsRequest instance using the specified properties. - * @function create - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest instance - */ - TestIamPermissionsRequest.create = function create(properties) { - return new TestIamPermissionsRequest(properties); - }; - - /** - * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.permissions != null && message.permissions.length) - for (var i = 0; i < message.permissions.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.permissions[i]); - return writer; - }; - - /** - * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TestIamPermissionsRequest message. - * @function verify - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TestIamPermissionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - if (!Array.isArray(message.permissions)) - return "permissions: array expected"; - for (var i = 0; i < message.permissions.length; ++i) - if (!$util.isString(message.permissions[i])) - return "permissions: string[] expected"; - } - return null; - }; - - /** - * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest - */ - TestIamPermissionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest) - return object; - var message = new $root.google.iam.v1.TestIamPermissionsRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.permissions) { - if (!Array.isArray(object.permissions)) - throw TypeError(".google.iam.v1.TestIamPermissionsRequest.permissions: array expected"); - message.permissions = []; - for (var i = 0; i < object.permissions.length; ++i) - message.permissions[i] = String(object.permissions[i]); - } - return message; - }; - - /** - * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.TestIamPermissionsRequest} message TestIamPermissionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TestIamPermissionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.permissions = []; - if (options.defaults) - object.resource = ""; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.permissions && message.permissions.length) { - object.permissions = []; - for (var j = 0; j < message.permissions.length; ++j) - object.permissions[j] = message.permissions[j]; - } - return object; - }; - - /** - * Converts this TestIamPermissionsRequest to JSON. - * @function toJSON - * @memberof google.iam.v1.TestIamPermissionsRequest - * @instance - * @returns {Object.} JSON object - */ - TestIamPermissionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TestIamPermissionsRequest - * @function getTypeUrl - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TestIamPermissionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsRequest"; - }; - - return TestIamPermissionsRequest; - })(); - - v1.TestIamPermissionsResponse = (function() { - - /** - * Properties of a TestIamPermissionsResponse. - * @memberof google.iam.v1 - * @interface ITestIamPermissionsResponse - * @property {Array.|null} [permissions] TestIamPermissionsResponse permissions - */ - - /** - * Constructs a new TestIamPermissionsResponse. - * @memberof google.iam.v1 - * @classdesc Represents a TestIamPermissionsResponse. - * @implements ITestIamPermissionsResponse - * @constructor - * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set - */ - function TestIamPermissionsResponse(properties) { - this.permissions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TestIamPermissionsResponse permissions. - * @member {Array.} permissions - * @memberof google.iam.v1.TestIamPermissionsResponse - * @instance - */ - TestIamPermissionsResponse.prototype.permissions = $util.emptyArray; - - /** - * Creates a new TestIamPermissionsResponse instance using the specified properties. - * @function create - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse instance - */ - TestIamPermissionsResponse.create = function create(properties) { - return new TestIamPermissionsResponse(properties); - }; - - /** - * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.permissions != null && message.permissions.length) - for (var i = 0; i < message.permissions.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.permissions[i]); - return writer; - }; - - /** - * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TestIamPermissionsResponse message. - * @function verify - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TestIamPermissionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - if (!Array.isArray(message.permissions)) - return "permissions: array expected"; - for (var i = 0; i < message.permissions.length; ++i) - if (!$util.isString(message.permissions[i])) - return "permissions: string[] expected"; - } - return null; - }; - - /** - * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse - */ - TestIamPermissionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse) - return object; - var message = new $root.google.iam.v1.TestIamPermissionsResponse(); - if (object.permissions) { - if (!Array.isArray(object.permissions)) - throw TypeError(".google.iam.v1.TestIamPermissionsResponse.permissions: array expected"); - message.permissions = []; - for (var i = 0; i < object.permissions.length; ++i) - message.permissions[i] = String(object.permissions[i]); - } - return message; - }; - - /** - * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.TestIamPermissionsResponse} message TestIamPermissionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TestIamPermissionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.permissions = []; - if (message.permissions && message.permissions.length) { - object.permissions = []; - for (var j = 0; j < message.permissions.length; ++j) - object.permissions[j] = message.permissions[j]; - } - return object; - }; - - /** - * Converts this TestIamPermissionsResponse to JSON. - * @function toJSON - * @memberof google.iam.v1.TestIamPermissionsResponse - * @instance - * @returns {Object.} JSON object - */ - TestIamPermissionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TestIamPermissionsResponse - * @function getTypeUrl - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TestIamPermissionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsResponse"; - }; - - return TestIamPermissionsResponse; - })(); - - v1.GetPolicyOptions = (function() { - - /** - * Properties of a GetPolicyOptions. - * @memberof google.iam.v1 - * @interface IGetPolicyOptions - * @property {number|null} [requestedPolicyVersion] GetPolicyOptions requestedPolicyVersion - */ - - /** - * Constructs a new GetPolicyOptions. - * @memberof google.iam.v1 - * @classdesc Represents a GetPolicyOptions. - * @implements IGetPolicyOptions - * @constructor - * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set - */ - function GetPolicyOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetPolicyOptions requestedPolicyVersion. - * @member {number} requestedPolicyVersion - * @memberof google.iam.v1.GetPolicyOptions - * @instance - */ - GetPolicyOptions.prototype.requestedPolicyVersion = 0; - - /** - * Creates a new GetPolicyOptions instance using the specified properties. - * @function create - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions instance - */ - GetPolicyOptions.create = function create(properties) { - return new GetPolicyOptions(properties); - }; - - /** - * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPolicyOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.requestedPolicyVersion); - return writer; - }; - - /** - * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPolicyOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPolicyOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetPolicyOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.requestedPolicyVersion = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPolicyOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPolicyOptions message. - * @function verify - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPolicyOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) - if (!$util.isInteger(message.requestedPolicyVersion)) - return "requestedPolicyVersion: integer expected"; - return null; - }; - - /** - * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions - */ - GetPolicyOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.GetPolicyOptions) - return object; - var message = new $root.google.iam.v1.GetPolicyOptions(); - if (object.requestedPolicyVersion != null) - message.requestedPolicyVersion = object.requestedPolicyVersion | 0; - return message; - }; - - /** - * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.GetPolicyOptions} message GetPolicyOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPolicyOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.requestedPolicyVersion = 0; - if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) - object.requestedPolicyVersion = message.requestedPolicyVersion; - return object; - }; - - /** - * Converts this GetPolicyOptions to JSON. - * @function toJSON - * @memberof google.iam.v1.GetPolicyOptions - * @instance - * @returns {Object.} JSON object - */ - GetPolicyOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetPolicyOptions - * @function getTypeUrl - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPolicyOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.GetPolicyOptions"; - }; - - return GetPolicyOptions; - })(); - - v1.Policy = (function() { - - /** - * Properties of a Policy. - * @memberof google.iam.v1 - * @interface IPolicy - * @property {number|null} [version] Policy version - * @property {Array.|null} [bindings] Policy bindings - * @property {Array.|null} [auditConfigs] Policy auditConfigs - * @property {Uint8Array|null} [etag] Policy etag - */ - - /** - * Constructs a new Policy. - * @memberof google.iam.v1 - * @classdesc Represents a Policy. - * @implements IPolicy - * @constructor - * @param {google.iam.v1.IPolicy=} [properties] Properties to set - */ - function Policy(properties) { - this.bindings = []; - this.auditConfigs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Policy version. - * @member {number} version - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.version = 0; - - /** - * Policy bindings. - * @member {Array.} bindings - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.bindings = $util.emptyArray; - - /** - * Policy auditConfigs. - * @member {Array.} auditConfigs - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.auditConfigs = $util.emptyArray; - - /** - * Policy etag. - * @member {Uint8Array} etag - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.etag = $util.newBuffer([]); - - /** - * Creates a new Policy instance using the specified properties. - * @function create - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.IPolicy=} [properties] Properties to set - * @returns {google.iam.v1.Policy} Policy instance - */ - Policy.create = function create(properties) { - return new Policy(properties); - }; - - /** - * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Policy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); - if (message.bindings != null && message.bindings.length) - for (var i = 0; i < message.bindings.length; ++i) - $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.auditConfigs != null && message.auditConfigs.length) - for (var i = 0; i < message.auditConfigs.length; ++i) - $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Policy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Policy message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.Policy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.Policy} Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Policy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.int32(); - break; - } - case 4: { - if (!(message.bindings && message.bindings.length)) - message.bindings = []; - message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.auditConfigs && message.auditConfigs.length)) - message.auditConfigs = []; - message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32())); - break; - } - case 3: { - message.etag = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Policy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.Policy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.Policy} Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Policy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Policy message. - * @function verify - * @memberof google.iam.v1.Policy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Policy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isInteger(message.version)) - return "version: integer expected"; - if (message.bindings != null && message.hasOwnProperty("bindings")) { - if (!Array.isArray(message.bindings)) - return "bindings: array expected"; - for (var i = 0; i < message.bindings.length; ++i) { - var error = $root.google.iam.v1.Binding.verify(message.bindings[i]); - if (error) - return "bindings." + error; - } - } - if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) { - if (!Array.isArray(message.auditConfigs)) - return "auditConfigs: array expected"; - for (var i = 0; i < message.auditConfigs.length; ++i) { - var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]); - if (error) - return "auditConfigs." + error; - } - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) - return "etag: buffer expected"; - return null; - }; - - /** - * Creates a Policy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.Policy - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.Policy} Policy - */ - Policy.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.Policy) - return object; - var message = new $root.google.iam.v1.Policy(); - if (object.version != null) - message.version = object.version | 0; - if (object.bindings) { - if (!Array.isArray(object.bindings)) - throw TypeError(".google.iam.v1.Policy.bindings: array expected"); - message.bindings = []; - for (var i = 0; i < object.bindings.length; ++i) { - if (typeof object.bindings[i] !== "object") - throw TypeError(".google.iam.v1.Policy.bindings: object expected"); - message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); - } - } - if (object.auditConfigs) { - if (!Array.isArray(object.auditConfigs)) - throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected"); - message.auditConfigs = []; - for (var i = 0; i < object.auditConfigs.length; ++i) { - if (typeof object.auditConfigs[i] !== "object") - throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); - message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]); - } - } - if (object.etag != null) - if (typeof object.etag === "string") - $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); - else if (object.etag.length >= 0) - message.etag = object.etag; - return message; - }; - - /** - * Creates a plain object from a Policy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.Policy} message Policy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Policy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.bindings = []; - object.auditConfigs = []; - } - if (options.defaults) { - object.version = 0; - if (options.bytes === String) - object.etag = ""; - else { - object.etag = []; - if (options.bytes !== Array) - object.etag = $util.newBuffer(object.etag); - } - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; - if (message.bindings && message.bindings.length) { - object.bindings = []; - for (var j = 0; j < message.bindings.length; ++j) - object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); - } - if (message.auditConfigs && message.auditConfigs.length) { - object.auditConfigs = []; - for (var j = 0; j < message.auditConfigs.length; ++j) - object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options); - } - return object; - }; - - /** - * Converts this Policy to JSON. - * @function toJSON - * @memberof google.iam.v1.Policy - * @instance - * @returns {Object.} JSON object - */ - Policy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Policy - * @function getTypeUrl - * @memberof google.iam.v1.Policy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Policy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.Policy"; - }; - - return Policy; - })(); - - v1.Binding = (function() { - - /** - * Properties of a Binding. - * @memberof google.iam.v1 - * @interface IBinding - * @property {string|null} [role] Binding role - * @property {Array.|null} [members] Binding members - * @property {google.type.IExpr|null} [condition] Binding condition - */ - - /** - * Constructs a new Binding. - * @memberof google.iam.v1 - * @classdesc Represents a Binding. - * @implements IBinding - * @constructor - * @param {google.iam.v1.IBinding=} [properties] Properties to set - */ - function Binding(properties) { - this.members = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Binding role. - * @member {string} role - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.role = ""; - - /** - * Binding members. - * @member {Array.} members - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.members = $util.emptyArray; - - /** - * Binding condition. - * @member {google.type.IExpr|null|undefined} condition - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.condition = null; - - /** - * Creates a new Binding instance using the specified properties. - * @function create - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.IBinding=} [properties] Properties to set - * @returns {google.iam.v1.Binding} Binding instance - */ - Binding.create = function create(properties) { - return new Binding(properties); - }; - - /** - * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.IBinding} message Binding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Binding.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); - if (message.members != null && message.members.length) - for (var i = 0; i < message.members.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.IBinding} message Binding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Binding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Binding message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.Binding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.Binding} Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Binding.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.role = reader.string(); - break; - } - case 2: { - if (!(message.members && message.members.length)) - message.members = []; - message.members.push(reader.string()); - break; - } - case 3: { - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Binding message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.Binding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.Binding} Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Binding.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Binding message. - * @function verify - * @memberof google.iam.v1.Binding - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Binding.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string expected"; - if (message.members != null && message.hasOwnProperty("members")) { - if (!Array.isArray(message.members)) - return "members: array expected"; - for (var i = 0; i < message.members.length; ++i) - if (!$util.isString(message.members[i])) - return "members: string[] expected"; - } - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.google.type.Expr.verify(message.condition); - if (error) - return "condition." + error; - } - return null; - }; - - /** - * Creates a Binding message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.Binding - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.Binding} Binding - */ - Binding.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.Binding) - return object; - var message = new $root.google.iam.v1.Binding(); - if (object.role != null) - message.role = String(object.role); - if (object.members) { - if (!Array.isArray(object.members)) - throw TypeError(".google.iam.v1.Binding.members: array expected"); - message.members = []; - for (var i = 0; i < object.members.length; ++i) - message.members[i] = String(object.members[i]); - } - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.iam.v1.Binding.condition: object expected"); - message.condition = $root.google.type.Expr.fromObject(object.condition); - } - return message; - }; - - /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.Binding} message Binding - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Binding.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.members = []; - if (options.defaults) { - object.role = ""; - object.condition = null; - } - if (message.role != null && message.hasOwnProperty("role")) - object.role = message.role; - if (message.members && message.members.length) { - object.members = []; - for (var j = 0; j < message.members.length; ++j) - object.members[j] = message.members[j]; - } - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); - return object; - }; - - /** - * Converts this Binding to JSON. - * @function toJSON - * @memberof google.iam.v1.Binding - * @instance - * @returns {Object.} JSON object - */ - Binding.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Binding - * @function getTypeUrl - * @memberof google.iam.v1.Binding - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.Binding"; - }; - - return Binding; - })(); - - v1.AuditConfig = (function() { - - /** - * Properties of an AuditConfig. - * @memberof google.iam.v1 - * @interface IAuditConfig - * @property {string|null} [service] AuditConfig service - * @property {Array.|null} [auditLogConfigs] AuditConfig auditLogConfigs - */ - - /** - * Constructs a new AuditConfig. - * @memberof google.iam.v1 - * @classdesc Represents an AuditConfig. - * @implements IAuditConfig - * @constructor - * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set - */ - function AuditConfig(properties) { - this.auditLogConfigs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AuditConfig service. - * @member {string} service - * @memberof google.iam.v1.AuditConfig - * @instance - */ - AuditConfig.prototype.service = ""; - - /** - * AuditConfig auditLogConfigs. - * @member {Array.} auditLogConfigs - * @memberof google.iam.v1.AuditConfig - * @instance - */ - AuditConfig.prototype.auditLogConfigs = $util.emptyArray; - - /** - * Creates a new AuditConfig instance using the specified properties. - * @function create - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set - * @returns {google.iam.v1.AuditConfig} AuditConfig instance - */ - AuditConfig.create = function create(properties) { - return new AuditConfig(properties); - }; - - /** - * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); - if (message.auditLogConfigs != null && message.auditLogConfigs.length) - for (var i = 0; i < message.auditLogConfigs.length; ++i) - $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuditConfig message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.AuditConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditConfig} AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.service = reader.string(); - break; - } - case 3: { - if (!(message.auditLogConfigs && message.auditLogConfigs.length)) - message.auditLogConfigs = []; - message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuditConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.AuditConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditConfig} AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuditConfig message. - * @function verify - * @memberof google.iam.v1.AuditConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) { - if (!Array.isArray(message.auditLogConfigs)) - return "auditLogConfigs: array expected"; - for (var i = 0; i < message.auditLogConfigs.length; ++i) { - var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]); - if (error) - return "auditLogConfigs." + error; - } - } - return null; - }; - - /** - * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.AuditConfig - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditConfig} AuditConfig - */ - AuditConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditConfig) - return object; - var message = new $root.google.iam.v1.AuditConfig(); - if (object.service != null) - message.service = String(object.service); - if (object.auditLogConfigs) { - if (!Array.isArray(object.auditLogConfigs)) - throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected"); - message.auditLogConfigs = []; - for (var i = 0; i < object.auditLogConfigs.length; ++i) { - if (typeof object.auditLogConfigs[i] !== "object") - throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); - message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.AuditConfig} message AuditConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.auditLogConfigs = []; - if (options.defaults) - object.service = ""; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.auditLogConfigs && message.auditLogConfigs.length) { - object.auditLogConfigs = []; - for (var j = 0; j < message.auditLogConfigs.length; ++j) - object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options); - } - return object; - }; - - /** - * Converts this AuditConfig to JSON. - * @function toJSON - * @memberof google.iam.v1.AuditConfig - * @instance - * @returns {Object.} JSON object - */ - AuditConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuditConfig - * @function getTypeUrl - * @memberof google.iam.v1.AuditConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.AuditConfig"; - }; - - return AuditConfig; - })(); - - v1.AuditLogConfig = (function() { - - /** - * Properties of an AuditLogConfig. - * @memberof google.iam.v1 - * @interface IAuditLogConfig - * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType - * @property {Array.|null} [exemptedMembers] AuditLogConfig exemptedMembers - */ - - /** - * Constructs a new AuditLogConfig. - * @memberof google.iam.v1 - * @classdesc Represents an AuditLogConfig. - * @implements IAuditLogConfig - * @constructor - * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set - */ - function AuditLogConfig(properties) { - this.exemptedMembers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AuditLogConfig logType. - * @member {google.iam.v1.AuditLogConfig.LogType} logType - * @memberof google.iam.v1.AuditLogConfig - * @instance - */ - AuditLogConfig.prototype.logType = 0; - - /** - * AuditLogConfig exemptedMembers. - * @member {Array.} exemptedMembers - * @memberof google.iam.v1.AuditLogConfig - * @instance - */ - AuditLogConfig.prototype.exemptedMembers = $util.emptyArray; - - /** - * Creates a new AuditLogConfig instance using the specified properties. - * @function create - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance - */ - AuditLogConfig.create = function create(properties) { - return new AuditLogConfig(properties); - }; - - /** - * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditLogConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType); - if (message.exemptedMembers != null && message.exemptedMembers.length) - for (var i = 0; i < message.exemptedMembers.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]); - return writer; - }; - - /** - * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditLogConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.logType = reader.int32(); - break; - } - case 2: { - if (!(message.exemptedMembers && message.exemptedMembers.length)) - message.exemptedMembers = []; - message.exemptedMembers.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditLogConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuditLogConfig message. - * @function verify - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditLogConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.logType != null && message.hasOwnProperty("logType")) - switch (message.logType) { - default: - return "logType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) { - if (!Array.isArray(message.exemptedMembers)) - return "exemptedMembers: array expected"; - for (var i = 0; i < message.exemptedMembers.length; ++i) - if (!$util.isString(message.exemptedMembers[i])) - return "exemptedMembers: string[] expected"; - } - return null; - }; - - /** - * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig - */ - AuditLogConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditLogConfig) - return object; - var message = new $root.google.iam.v1.AuditLogConfig(); - switch (object.logType) { - default: - if (typeof object.logType === "number") { - message.logType = object.logType; - break; - } - break; - case "LOG_TYPE_UNSPECIFIED": - case 0: - message.logType = 0; - break; - case "ADMIN_READ": - case 1: - message.logType = 1; - break; - case "DATA_WRITE": - case 2: - message.logType = 2; - break; - case "DATA_READ": - case 3: - message.logType = 3; - break; - } - if (object.exemptedMembers) { - if (!Array.isArray(object.exemptedMembers)) - throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected"); - message.exemptedMembers = []; - for (var i = 0; i < object.exemptedMembers.length; ++i) - message.exemptedMembers[i] = String(object.exemptedMembers[i]); - } - return message; - }; - - /** - * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditLogConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.exemptedMembers = []; - if (options.defaults) - object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0; - if (message.logType != null && message.hasOwnProperty("logType")) - object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] === undefined ? message.logType : $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; - if (message.exemptedMembers && message.exemptedMembers.length) { - object.exemptedMembers = []; - for (var j = 0; j < message.exemptedMembers.length; ++j) - object.exemptedMembers[j] = message.exemptedMembers[j]; - } - return object; - }; - - /** - * Converts this AuditLogConfig to JSON. - * @function toJSON - * @memberof google.iam.v1.AuditLogConfig - * @instance - * @returns {Object.} JSON object - */ - AuditLogConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuditLogConfig - * @function getTypeUrl - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditLogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.AuditLogConfig"; - }; - - /** - * LogType enum. - * @name google.iam.v1.AuditLogConfig.LogType - * @enum {number} - * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value - * @property {number} ADMIN_READ=1 ADMIN_READ value - * @property {number} DATA_WRITE=2 DATA_WRITE value - * @property {number} DATA_READ=3 DATA_READ value - */ - AuditLogConfig.LogType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADMIN_READ"] = 1; - values[valuesById[2] = "DATA_WRITE"] = 2; - values[valuesById[3] = "DATA_READ"] = 3; - return values; - })(); - - return AuditLogConfig; - })(); - - v1.PolicyDelta = (function() { - - /** - * Properties of a PolicyDelta. - * @memberof google.iam.v1 - * @interface IPolicyDelta - * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas - * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas - */ - - /** - * Constructs a new PolicyDelta. - * @memberof google.iam.v1 - * @classdesc Represents a PolicyDelta. - * @implements IPolicyDelta - * @constructor - * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set - */ - function PolicyDelta(properties) { - this.bindingDeltas = []; - this.auditConfigDeltas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PolicyDelta bindingDeltas. - * @member {Array.} bindingDeltas - * @memberof google.iam.v1.PolicyDelta - * @instance - */ - PolicyDelta.prototype.bindingDeltas = $util.emptyArray; - - /** - * PolicyDelta auditConfigDeltas. - * @member {Array.} auditConfigDeltas - * @memberof google.iam.v1.PolicyDelta - * @instance - */ - PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray; - - /** - * Creates a new PolicyDelta instance using the specified properties. - * @function create - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set - * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance - */ - PolicyDelta.create = function create(properties) { - return new PolicyDelta(properties); - }; - - /** - * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyDelta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bindingDeltas != null && message.bindingDeltas.length) - for (var i = 0; i < message.bindingDeltas.length; ++i) - $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) - for (var i = 0; i < message.auditConfigDeltas.length; ++i) - $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.PolicyDelta} PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyDelta.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.bindingDeltas && message.bindingDeltas.length)) - message.bindingDeltas = []; - message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) - message.auditConfigDeltas = []; - message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.PolicyDelta} PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyDelta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PolicyDelta message. - * @function verify - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PolicyDelta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) { - if (!Array.isArray(message.bindingDeltas)) - return "bindingDeltas: array expected"; - for (var i = 0; i < message.bindingDeltas.length; ++i) { - var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i]); - if (error) - return "bindingDeltas." + error; - } - } - if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) { - if (!Array.isArray(message.auditConfigDeltas)) - return "auditConfigDeltas: array expected"; - for (var i = 0; i < message.auditConfigDeltas.length; ++i) { - var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i]); - if (error) - return "auditConfigDeltas." + error; - } - } - return null; - }; - - /** - * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.PolicyDelta} PolicyDelta - */ - PolicyDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.PolicyDelta) - return object; - var message = new $root.google.iam.v1.PolicyDelta(); - if (object.bindingDeltas) { - if (!Array.isArray(object.bindingDeltas)) - throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); - message.bindingDeltas = []; - for (var i = 0; i < object.bindingDeltas.length; ++i) { - if (typeof object.bindingDeltas[i] !== "object") - throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); - message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); - } - } - if (object.auditConfigDeltas) { - if (!Array.isArray(object.auditConfigDeltas)) - throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); - message.auditConfigDeltas = []; - for (var i = 0; i < object.auditConfigDeltas.length; ++i) { - if (typeof object.auditConfigDeltas[i] !== "object") - throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); - message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.PolicyDelta} message PolicyDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PolicyDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.bindingDeltas = []; - object.auditConfigDeltas = []; - } - if (message.bindingDeltas && message.bindingDeltas.length) { - object.bindingDeltas = []; - for (var j = 0; j < message.bindingDeltas.length; ++j) - object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options); - } - if (message.auditConfigDeltas && message.auditConfigDeltas.length) { - object.auditConfigDeltas = []; - for (var j = 0; j < message.auditConfigDeltas.length; ++j) - object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options); - } - return object; - }; - - /** - * Converts this PolicyDelta to JSON. - * @function toJSON - * @memberof google.iam.v1.PolicyDelta - * @instance - * @returns {Object.} JSON object - */ - PolicyDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PolicyDelta - * @function getTypeUrl - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PolicyDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.PolicyDelta"; - }; - - return PolicyDelta; - })(); - - v1.BindingDelta = (function() { - - /** - * Properties of a BindingDelta. - * @memberof google.iam.v1 - * @interface IBindingDelta - * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action - * @property {string|null} [role] BindingDelta role - * @property {string|null} [member] BindingDelta member - * @property {google.type.IExpr|null} [condition] BindingDelta condition - */ - - /** - * Constructs a new BindingDelta. - * @memberof google.iam.v1 - * @classdesc Represents a BindingDelta. - * @implements IBindingDelta - * @constructor - * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set - */ - function BindingDelta(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BindingDelta action. - * @member {google.iam.v1.BindingDelta.Action} action - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.action = 0; - - /** - * BindingDelta role. - * @member {string} role - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.role = ""; - - /** - * BindingDelta member. - * @member {string} member - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.member = ""; - - /** - * BindingDelta condition. - * @member {google.type.IExpr|null|undefined} condition - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.condition = null; - - /** - * Creates a new BindingDelta instance using the specified properties. - * @function create - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set - * @returns {google.iam.v1.BindingDelta} BindingDelta instance - */ - BindingDelta.create = function create(properties) { - return new BindingDelta(properties); - }; - - /** - * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BindingDelta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); - if (message.member != null && Object.hasOwnProperty.call(message, "member")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BindingDelta message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.BindingDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.BindingDelta} BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BindingDelta.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.action = reader.int32(); - break; - } - case 2: { - message.role = reader.string(); - break; - } - case 3: { - message.member = reader.string(); - break; - } - case 4: { - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BindingDelta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.BindingDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.BindingDelta} BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BindingDelta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BindingDelta message. - * @function verify - * @memberof google.iam.v1.BindingDelta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BindingDelta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string expected"; - if (message.member != null && message.hasOwnProperty("member")) - if (!$util.isString(message.member)) - return "member: string expected"; - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.google.type.Expr.verify(message.condition); - if (error) - return "condition." + error; - } - return null; - }; - - /** - * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.BindingDelta - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.BindingDelta} BindingDelta - */ - BindingDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.BindingDelta) - return object; - var message = new $root.google.iam.v1.BindingDelta(); - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "ADD": - case 1: - message.action = 1; - break; - case "REMOVE": - case 2: - message.action = 2; - break; - } - if (object.role != null) - message.role = String(object.role); - if (object.member != null) - message.member = String(object.member); - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); - message.condition = $root.google.type.Expr.fromObject(object.condition); - } - return message; - }; - - /** - * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.BindingDelta} message BindingDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BindingDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.role = ""; - object.member = ""; - object.condition = null; - } - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; - if (message.role != null && message.hasOwnProperty("role")) - object.role = message.role; - if (message.member != null && message.hasOwnProperty("member")) - object.member = message.member; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); - return object; - }; - - /** - * Converts this BindingDelta to JSON. - * @function toJSON - * @memberof google.iam.v1.BindingDelta - * @instance - * @returns {Object.} JSON object - */ - BindingDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BindingDelta - * @function getTypeUrl - * @memberof google.iam.v1.BindingDelta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BindingDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.BindingDelta"; - }; - - /** - * Action enum. - * @name google.iam.v1.BindingDelta.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} ADD=1 ADD value - * @property {number} REMOVE=2 REMOVE value - */ - BindingDelta.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADD"] = 1; - values[valuesById[2] = "REMOVE"] = 2; - return values; - })(); - - return BindingDelta; - })(); - - v1.AuditConfigDelta = (function() { - - /** - * Properties of an AuditConfigDelta. - * @memberof google.iam.v1 - * @interface IAuditConfigDelta - * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action - * @property {string|null} [service] AuditConfigDelta service - * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember - * @property {string|null} [logType] AuditConfigDelta logType - */ - - /** - * Constructs a new AuditConfigDelta. - * @memberof google.iam.v1 - * @classdesc Represents an AuditConfigDelta. - * @implements IAuditConfigDelta - * @constructor - * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set - */ - function AuditConfigDelta(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AuditConfigDelta action. - * @member {google.iam.v1.AuditConfigDelta.Action} action - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.action = 0; - - /** - * AuditConfigDelta service. - * @member {string} service - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.service = ""; - - /** - * AuditConfigDelta exemptedMember. - * @member {string} exemptedMember - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.exemptedMember = ""; - - /** - * AuditConfigDelta logType. - * @member {string} logType - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.logType = ""; - - /** - * Creates a new AuditConfigDelta instance using the specified properties. - * @function create - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance - */ - AuditConfigDelta.create = function create(properties) { - return new AuditConfigDelta(properties); - }; - - /** - * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfigDelta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); - if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); - if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); - return writer; - }; - - /** - * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfigDelta.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.action = reader.int32(); - break; - } - case 2: { - message.service = reader.string(); - break; - } - case 3: { - message.exemptedMember = reader.string(); - break; - } - case 4: { - message.logType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuditConfigDelta message. - * @function verify - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditConfigDelta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) - if (!$util.isString(message.exemptedMember)) - return "exemptedMember: string expected"; - if (message.logType != null && message.hasOwnProperty("logType")) - if (!$util.isString(message.logType)) - return "logType: string expected"; - return null; - }; - - /** - * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta - */ - AuditConfigDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditConfigDelta) - return object; - var message = new $root.google.iam.v1.AuditConfigDelta(); - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "ADD": - case 1: - message.action = 1; - break; - case "REMOVE": - case 2: - message.action = 2; - break; - } - if (object.service != null) - message.service = String(object.service); - if (object.exemptedMember != null) - message.exemptedMember = String(object.exemptedMember); - if (object.logType != null) - message.logType = String(object.logType); - return message; - }; - - /** - * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditConfigDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.service = ""; - object.exemptedMember = ""; - object.logType = ""; - } - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) - object.exemptedMember = message.exemptedMember; - if (message.logType != null && message.hasOwnProperty("logType")) - object.logType = message.logType; - return object; - }; - - /** - * Converts this AuditConfigDelta to JSON. - * @function toJSON - * @memberof google.iam.v1.AuditConfigDelta - * @instance - * @returns {Object.} JSON object - */ - AuditConfigDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuditConfigDelta - * @function getTypeUrl - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.AuditConfigDelta"; - }; - - /** - * Action enum. - * @name google.iam.v1.AuditConfigDelta.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} ADD=1 ADD value - * @property {number} REMOVE=2 REMOVE value - */ - AuditConfigDelta.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADD"] = 1; - values[valuesById[2] = "REMOVE"] = 2; - return values; - })(); - - return AuditConfigDelta; - })(); - - return v1; - })(); - - return iam; - })(); - - 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; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json deleted file mode 100644 index cf4a8cc6cff..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json +++ /dev/null @@ -1,7871 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "backupdr": { - "nested": { - "v1": { - "options": { - "csharp_namespace": "Google.Cloud.BackupDR.V1", - "go_package": "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb", - "java_multiple_files": true, - "java_outer_classname": "BackupvaultGceProto", - "java_package": "com.google.cloud.backupdr.v1", - "php_namespace": "Google\\Cloud\\BackupDR\\V1", - "ruby_package": "Google::Cloud::BackupDR::V1" - }, - "nested": { - "BackupDR": { - "options": { - "(google.api.default_host)": "backupdr.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListManagementServers": { - "requestType": "ListManagementServersRequest", - "responseType": "ListManagementServersResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/managementServers", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/managementServers" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetManagementServer": { - "requestType": "GetManagementServerRequest", - "responseType": "ManagementServer", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/managementServers/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/managementServers/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateManagementServer": { - "requestType": "CreateManagementServerRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/managementServers", - "(google.api.http).body": "management_server", - "(google.api.method_signature)": "parent,management_server,management_server_id", - "(google.longrunning.operation_info).response_type": "ManagementServer", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/managementServers", - "body": "management_server" - } - }, - { - "(google.api.method_signature)": "parent,management_server,management_server_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "ManagementServer", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteManagementServer": { - "requestType": "DeleteManagementServerRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/managementServers/*}", - "(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/*/managementServers/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "CreateBackupVault": { - "requestType": "CreateBackupVaultRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupVaults", - "(google.api.http).body": "backup_vault", - "(google.api.method_signature)": "parent,backup_vault,backup_vault_id", - "(google.longrunning.operation_info).response_type": "BackupVault", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/backupVaults", - "body": "backup_vault" - } - }, - { - "(google.api.method_signature)": "parent,backup_vault,backup_vault_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "BackupVault", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListBackupVaults": { - "requestType": "ListBackupVaultsRequest", - "responseType": "ListBackupVaultsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupVaults", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/backupVaults" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "FetchUsableBackupVaults": { - "requestType": "FetchUsableBackupVaultsRequest", - "responseType": "FetchUsableBackupVaultsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetBackupVault": { - "requestType": "GetBackupVaultRequest", - "responseType": "BackupVault", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/backupVaults/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateBackupVault": { - "requestType": "UpdateBackupVaultRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}", - "(google.api.http).body": "backup_vault", - "(google.api.method_signature)": "backup_vault,update_mask", - "(google.longrunning.operation_info).response_type": "BackupVault", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}", - "body": "backup_vault" - } - }, - { - "(google.api.method_signature)": "backup_vault,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "BackupVault", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteBackupVault": { - "requestType": "DeleteBackupVaultRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupVaults/*}", - "(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/*/backupVaults/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "TestIamPermissions": { - "requestType": "google.iam.v1.TestIamPermissionsRequest", - "responseType": "google.iam.v1.TestIamPermissionsResponse", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/locations/*/backupVaults/*}:testIamPermissions", - "(google.api.http).body": "*", - "(google.api.method_signature)": "resource, permissions" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=projects/*/locations/*/backupVaults/*}:testIamPermissions", - "body": "*" - } - }, - { - "(google.api.method_signature)": "resource, permissions" - } - ] - }, - "ListDataSources": { - "requestType": "ListDataSourcesRequest", - "responseType": "ListDataSourcesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetDataSource": { - "requestType": "GetDataSourceRequest", - "responseType": "DataSource", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateDataSource": { - "requestType": "UpdateDataSourceRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}", - "(google.api.http).body": "data_source", - "(google.api.method_signature)": "data_source,update_mask", - "(google.longrunning.operation_info).response_type": "DataSource", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}", - "body": "data_source" - } - }, - { - "(google.api.method_signature)": "data_source,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "DataSource", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "RemoveDataSource": { - "requestType": "RemoveDataSourceRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:remove", - "(google.api.http).body": "*", - "(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)": { - "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:remove", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "SetInternalStatus": { - "requestType": "SetInternalStatusRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:setInternalStatus", - "(google.api.http).body": "*", - "(google.api.method_signature)": "data_source", - "(google.longrunning.operation_info).response_type": "SetInternalStatusResponse", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:setInternalStatus", - "body": "*" - } - }, - { - "(google.api.method_signature)": "data_source" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "SetInternalStatusResponse", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "InitiateBackup": { - "requestType": "InitiateBackupRequest", - "responseType": "InitiateBackupResponse", - "options": { - "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:initiateBackup", - "(google.api.http).body": "*", - "(google.api.method_signature)": "data_source" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:initiateBackup", - "body": "*" - } - }, - { - "(google.api.method_signature)": "data_source" - } - ] - }, - "AbandonBackup": { - "requestType": "AbandonBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:abandonBackup", - "(google.api.http).body": "*", - "(google.api.method_signature)": "data_source", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:abandonBackup", - "body": "*" - } - }, - { - "(google.api.method_signature)": "data_source" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "FinalizeBackup": { - "requestType": "FinalizeBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:finalizeBackup", - "(google.api.http).body": "*", - "(google.api.method_signature)": "data_source", - "(google.longrunning.operation_info).response_type": "Backup", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:finalizeBackup", - "body": "*" - } - }, - { - "(google.api.method_signature)": "data_source" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Backup", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "FetchAccessToken": { - "requestType": "FetchAccessTokenRequest", - "responseType": "FetchAccessTokenResponse", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListBackups": { - "requestType": "ListBackupsRequest", - "responseType": "ListBackupsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetBackup": { - "requestType": "GetBackupRequest", - "responseType": "Backup", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateBackup": { - "requestType": "UpdateBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", - "(google.api.http).body": "backup", - "(google.api.method_signature)": "backup,update_mask", - "(google.longrunning.operation_info).response_type": "Backup", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", - "body": "backup" - } - }, - { - "(google.api.method_signature)": "backup,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Backup", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteBackup": { - "requestType": "DeleteBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "Backup", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Backup", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "RestoreBackup": { - "requestType": "RestoreBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "RestoreBackupResponse", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "RestoreBackupResponse", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "CreateBackupPlan": { - "requestType": "CreateBackupPlanRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupPlans", - "(google.api.http).body": "backup_plan", - "(google.api.method_signature)": "parent,backup_plan,backup_plan_id", - "(google.longrunning.operation_info).response_type": "BackupPlan", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/backupPlans", - "body": "backup_plan" - } - }, - { - "(google.api.method_signature)": "parent,backup_plan,backup_plan_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "BackupPlan", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "GetBackupPlan": { - "requestType": "GetBackupPlanRequest", - "responseType": "BackupPlan", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupPlans/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/backupPlans/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListBackupPlans": { - "requestType": "ListBackupPlansRequest", - "responseType": "ListBackupPlansResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupPlans", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/backupPlans" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "DeleteBackupPlan": { - "requestType": "DeleteBackupPlanRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupPlans/*}", - "(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/*/backupPlans/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "CreateBackupPlanAssociation": { - "requestType": "CreateBackupPlanAssociationRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", - "(google.api.http).body": "backup_plan_association", - "(google.api.method_signature)": "parent,backup_plan_association,backup_plan_association_id", - "(google.longrunning.operation_info).response_type": "BackupPlanAssociation", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", - "body": "backup_plan_association" - } - }, - { - "(google.api.method_signature)": "parent,backup_plan_association,backup_plan_association_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "BackupPlanAssociation", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "GetBackupPlanAssociation": { - "requestType": "GetBackupPlanAssociationRequest", - "responseType": "BackupPlanAssociation", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListBackupPlanAssociations": { - "requestType": "ListBackupPlanAssociationsRequest", - "responseType": "ListBackupPlanAssociationsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "DeleteBackupPlanAssociation": { - "requestType": "DeleteBackupPlanAssociationRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}", - "(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/*/backupPlanAssociations/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "TriggerBackup": { - "requestType": "TriggerBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name,rule_id", - "(google.longrunning.operation_info).response_type": "BackupPlanAssociation", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name,rule_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "BackupPlanAssociation", - "metadata_type": "OperationMetadata" - } - } - ] - } - } - }, - "NetworkConfig": { - "fields": { - "network": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "peeringMode": { - "type": "PeeringMode", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "PeeringMode": { - "values": { - "PEERING_MODE_UNSPECIFIED": 0, - "PRIVATE_SERVICE_ACCESS": 1 - } - } - } - }, - "ManagementURI": { - "fields": { - "webUi": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "api": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "WorkforceIdentityBasedManagementURI": { - "fields": { - "firstPartyManagementUri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "thirdPartyManagementUri": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "WorkforceIdentityBasedOAuth2ClientID": { - "fields": { - "firstPartyOauth2ClientId": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "thirdPartyOauth2ClientId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ManagementServer": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/ManagementServer", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/managementServers/{managementserver}", - "(google.api.resource).plural": "managementServers", - "(google.api.resource).singular": "managementServer" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "description": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "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" - } - }, - "type": { - "type": "InstanceType", - "id": 14, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "managementUri": { - "type": "ManagementURI", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "workforceIdentityBasedManagementUri": { - "type": "WorkforceIdentityBasedManagementURI", - "id": 16, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "state": { - "type": "InstanceState", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "networks": { - "rule": "repeated", - "type": "NetworkConfig", - "id": 8, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "etag": { - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "oauth2ClientId": { - "type": "string", - "id": 15, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "workforceIdentityBasedOauth2ClientId": { - "type": "WorkforceIdentityBasedOAuth2ClientID", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "baProxyUri": { - "rule": "repeated", - "type": "string", - "id": 18, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "satisfiesPzs": { - "type": "google.protobuf.BoolValue", - "id": 19, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "satisfiesPzi": { - "type": "bool", - "id": 20, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "InstanceType": { - "values": { - "INSTANCE_TYPE_UNSPECIFIED": 0, - "BACKUP_RESTORE": 1 - } - }, - "InstanceState": { - "values": { - "INSTANCE_STATE_UNSPECIFIED": 0, - "CREATING": 1, - "READY": 2, - "UPDATING": 3, - "DELETING": 4, - "REPAIRING": 5, - "MAINTENANCE": 6, - "ERROR": 7 - } - } - } - }, - "ListManagementServersRequest": { - "oneofs": { - "_filter": { - "oneof": [ - "filter" - ] - }, - "_orderBy": { - "oneof": [ - "orderBy" - ] - } - }, - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "ListManagementServersResponse": { - "fields": { - "managementServers": { - "rule": "repeated", - "type": "ManagementServer", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetManagementServerRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" - } - } - } - }, - "CreateManagementServerRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" - } - }, - "managementServerId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "managementServer": { - "type": "ManagementServer", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteManagementServerRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" - } - }, - "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" - } - }, - "additionalInfo": { - "keyType": "string", - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "BackupPlan": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/BackupPlan", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPlans/{backup_plan}", - "(google.api.resource).plural": "backupPlans", - "(google.api.resource).singular": "backupPlan" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backupRules": { - "rule": "repeated", - "type": "BackupRule", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "state": { - "type": "State", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "resourceType": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "etag": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "backupVault": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" - } - }, - "backupVaultServiceAccount": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "DELETING": 3, - "INACTIVE": 4 - } - } - } - }, - "BackupRule": { - "oneofs": { - "backupScheduleOneof": { - "oneof": [ - "standardSchedule" - ] - } - }, - "fields": { - "ruleId": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "backupRetentionDays": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "standardSchedule": { - "type": "StandardSchedule", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "StandardSchedule": { - "fields": { - "recurrenceType": { - "type": "RecurrenceType", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "hourlyFrequency": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "daysOfWeek": { - "rule": "repeated", - "type": "google.type.DayOfWeek", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "daysOfMonth": { - "rule": "repeated", - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "weekDayOfMonth": { - "type": "WeekDayOfMonth", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "months": { - "rule": "repeated", - "type": "google.type.Month", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "backupWindow": { - "type": "BackupWindow", - "id": 7, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "timeZone": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - }, - "nested": { - "RecurrenceType": { - "values": { - "RECURRENCE_TYPE_UNSPECIFIED": 0, - "HOURLY": 1, - "DAILY": 2, - "WEEKLY": 3, - "MONTHLY": 4, - "YEARLY": 5 - } - } - } - }, - "BackupWindow": { - "fields": { - "startHourOfDay": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "endHourOfDay": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "WeekDayOfMonth": { - "fields": { - "weekOfMonth": { - "type": "WeekOfMonth", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dayOfWeek": { - "type": "google.type.DayOfWeek", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - }, - "nested": { - "WeekOfMonth": { - "values": { - "WEEK_OF_MONTH_UNSPECIFIED": 0, - "FIRST": 1, - "SECOND": 2, - "THIRD": 3, - "FOURTH": 4, - "LAST": 5 - } - } - } - }, - "CreateBackupPlanRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlan" - } - }, - "backupPlanId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupPlan": { - "type": "BackupPlan", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupPlansRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlan" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupPlansResponse": { - "fields": { - "backupPlans": { - "rule": "repeated", - "type": "BackupPlan", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetBackupPlanRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" - } - } - } - }, - "DeleteBackupPlanRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "BackupPlanAssociation": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/BackupPlanAssociation", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}", - "(google.api.resource).plural": "backupPlanAssociations", - "(google.api.resource).singular": "backupPlanAssociation" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "resourceType": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "resource": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupPlan": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "state": { - "type": "State", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "rulesConfigInfo": { - "rule": "repeated", - "type": "RuleConfigInfo", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dataSource": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "DELETING": 3, - "INACTIVE": 4 - } - } - } - }, - "RuleConfigInfo": { - "fields": { - "ruleId": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastBackupState": { - "type": "LastBackupState", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastBackupError": { - "type": "google.rpc.Status", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastSuccessfulBackupConsistencyTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "LastBackupState": { - "values": { - "LAST_BACKUP_STATE_UNSPECIFIED": 0, - "FIRST_BACKUP_PENDING": 1, - "PERMISSION_DENIED": 2, - "SUCCEEDED": 3, - "FAILED": 4 - } - } - } - }, - "CreateBackupPlanAssociationRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlanAssociation" - } - }, - "backupPlanAssociationId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupPlanAssociation": { - "type": "BackupPlanAssociation", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupPlanAssociationsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlanAssociation" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupPlanAssociationsResponse": { - "fields": { - "backupPlanAssociations": { - "rule": "repeated", - "type": "BackupPlanAssociation", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetBackupPlanAssociationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" - } - } - } - }, - "DeleteBackupPlanAssociationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "TriggerBackupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" - } - }, - "ruleId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "BackupVault": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/BackupVault", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}", - "(google.api.resource).plural": "backupVaults", - "(google.api.resource).singular": "backupVault" - }, - "oneofs": { - "_description": { - "oneof": [ - "description" - ] - }, - "_createTime": { - "oneof": [ - "createTime" - ] - }, - "_updateTime": { - "oneof": [ - "updateTime" - ] - }, - "_backupMinimumEnforcedRetentionDuration": { - "oneof": [ - "backupMinimumEnforcedRetentionDuration" - ] - }, - "_deletable": { - "oneof": [ - "deletable" - ] - }, - "_etag": { - "oneof": [ - "etag" - ] - }, - "_effectiveTime": { - "oneof": [ - "effectiveTime" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "backupMinimumEnforcedRetentionDuration": { - "type": "google.protobuf.Duration", - "id": 20, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "proto3_optional": true - } - }, - "deletable": { - "type": "bool", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "etag": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "state": { - "type": "State", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "effectiveTime": { - "type": "google.protobuf.Timestamp", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "backupCount": { - "type": "int64", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "serviceAccount": { - "type": "string", - "id": 18, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "totalStoredBytes": { - "type": "int64", - "id": 19, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "uid": { - "type": "string", - "id": 21, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "annotations": { - "keyType": "string", - "type": "string", - "id": 22, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "accessRestriction": { - "type": "AccessRestriction", - "id": 24, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "DELETING": 3, - "ERROR": 4 - } - }, - "AccessRestriction": { - "values": { - "ACCESS_RESTRICTION_UNSPECIFIED": 0, - "WITHIN_PROJECT": 1, - "WITHIN_ORGANIZATION": 2, - "UNRESTRICTED": 3 - } - } - } - }, - "DataSource": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/DataSource", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}", - "(google.api.resource).plural": "dataSources", - "(google.api.resource).singular": "dataSource" - }, - "oneofs": { - "_createTime": { - "oneof": [ - "createTime" - ] - }, - "_updateTime": { - "oneof": [ - "updateTime" - ] - }, - "_backupCount": { - "oneof": [ - "backupCount" - ] - }, - "_etag": { - "oneof": [ - "etag" - ] - }, - "_totalStoredBytes": { - "oneof": [ - "totalStoredBytes" - ] - }, - "sourceResource": { - "oneof": [ - "dataSourceGcpResource", - "dataSourceBackupApplianceApplication" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "state": { - "type": "State", - "id": 21, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "backupCount": { - "type": "int64", - "id": 7, - "options": { - "proto3_optional": true - } - }, - "etag": { - "type": "string", - "id": 14, - "options": { - "proto3_optional": true - } - }, - "totalStoredBytes": { - "type": "int64", - "id": 23, - "options": { - "proto3_optional": true - } - }, - "configState": { - "type": "BackupConfigState", - "id": 24, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backupConfigInfo": { - "type": "BackupConfigInfo", - "id": 25, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dataSourceGcpResource": { - "type": "DataSourceGcpResource", - "id": 26 - }, - "dataSourceBackupApplianceApplication": { - "type": "DataSourceBackupApplianceApplication", - "id": 27 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "DELETING": 3, - "ERROR": 4 - } - } - } - }, - "BackupConfigInfo": { - "oneofs": { - "backupConfig": { - "oneof": [ - "gcpBackupConfig", - "backupApplianceBackupConfig" - ] - } - }, - "fields": { - "lastBackupState": { - "type": "LastBackupState", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastSuccessfulBackupConsistencyTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastBackupError": { - "type": "google.rpc.Status", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "gcpBackupConfig": { - "type": "GcpBackupConfig", - "id": 4 - }, - "backupApplianceBackupConfig": { - "type": "BackupApplianceBackupConfig", - "id": 5 - } - }, - "nested": { - "LastBackupState": { - "values": { - "LAST_BACKUP_STATE_UNSPECIFIED": 0, - "FIRST_BACKUP_PENDING": 1, - "SUCCEEDED": 2, - "FAILED": 3, - "PERMISSION_DENIED": 4 - } - } - } - }, - "GcpBackupConfig": { - "fields": { - "backupPlan": { - "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" - } - }, - "backupPlanDescription": { - "type": "string", - "id": 2 - }, - "backupPlanAssociation": { - "type": "string", - "id": 3, - "options": { - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" - } - }, - "backupPlanRules": { - "rule": "repeated", - "type": "string", - "id": 4 - } - } - }, - "BackupApplianceBackupConfig": { - "fields": { - "backupApplianceName": { - "type": "string", - "id": 1 - }, - "backupApplianceId": { - "type": "int64", - "id": 2 - }, - "slaId": { - "type": "int64", - "id": 3 - }, - "applicationName": { - "type": "string", - "id": 4 - }, - "hostName": { - "type": "string", - "id": 5 - }, - "sltName": { - "type": "string", - "id": 6 - }, - "slpName": { - "type": "string", - "id": 7 - } - } - }, - "DataSourceGcpResource": { - "oneofs": { - "gcpResourceProperties": { - "oneof": [ - "computeInstanceDatasourceProperties" - ] - } - }, - "fields": { - "gcpResourcename": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "location": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "computeInstanceDatasourceProperties": { - "type": "ComputeInstanceDataSourceProperties", - "id": 4 - } - } - }, - "DataSourceBackupApplianceApplication": { - "fields": { - "applicationName": { - "type": "string", - "id": 1 - }, - "backupAppliance": { - "type": "string", - "id": 2 - }, - "applianceId": { - "type": "int64", - "id": 3 - }, - "type": { - "type": "string", - "id": 4 - }, - "applicationId": { - "type": "int64", - "id": 8 - }, - "hostname": { - "type": "string", - "id": 6 - }, - "hostId": { - "type": "int64", - "id": 7 - } - } - }, - "ServiceLockInfo": { - "fields": { - "operation": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "BackupApplianceLockInfo": { - "oneofs": { - "lockSource": { - "oneof": [ - "jobName", - "backupImage", - "slaId" - ] - } - }, - "fields": { - "backupApplianceId": { - "type": "int64", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupApplianceName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "lockReason": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "jobName": { - "type": "string", - "id": 6 - }, - "backupImage": { - "type": "string", - "id": 7 - }, - "slaId": { - "type": "int64", - "id": 8 - } - } - }, - "BackupLock": { - "oneofs": { - "ClientLockInfo": { - "oneof": [ - "backupApplianceLockInfo", - "serviceLockInfo" - ] - } - }, - "fields": { - "lockUntilTime": { - "type": "google.protobuf.Timestamp", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupApplianceLockInfo": { - "type": "BackupApplianceLockInfo", - "id": 3 - }, - "serviceLockInfo": { - "type": "ServiceLockInfo", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "Backup": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/Backup", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}", - "(google.api.resource).plural": "backups", - "(google.api.resource).singular": "backup" - }, - "oneofs": { - "_description": { - "oneof": [ - "description" - ] - }, - "_createTime": { - "oneof": [ - "createTime" - ] - }, - "_updateTime": { - "oneof": [ - "updateTime" - ] - }, - "_enforcedRetentionEndTime": { - "oneof": [ - "enforcedRetentionEndTime" - ] - }, - "_expireTime": { - "oneof": [ - "expireTime" - ] - }, - "_consistencyTime": { - "oneof": [ - "consistencyTime" - ] - }, - "_etag": { - "oneof": [ - "etag" - ] - }, - "backupProperties": { - "oneof": [ - "computeInstanceBackupProperties", - "backupApplianceBackupProperties" - ] - }, - "planInfo": { - "oneof": [ - "gcpBackupPlanInfo" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "enforcedRetentionEndTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "expireTime": { - "type": "google.protobuf.Timestamp", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "consistencyTime": { - "type": "google.protobuf.Timestamp", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "etag": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "state": { - "type": "State", - "id": 15, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "serviceLocks": { - "rule": "repeated", - "type": "BackupLock", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backupApplianceLocks": { - "rule": "repeated", - "type": "BackupLock", - "id": 18, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "computeInstanceBackupProperties": { - "type": "ComputeInstanceBackupProperties", - "id": 19, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backupApplianceBackupProperties": { - "type": "BackupApplianceBackupProperties", - "id": 21, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backupType": { - "type": "BackupType", - "id": 20, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "gcpBackupPlanInfo": { - "type": "GCPBackupPlanInfo", - "id": 22, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "resourceSizeBytes": { - "type": "int64", - "id": 23, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "DELETING": 3, - "ERROR": 4 - } - }, - "BackupType": { - "values": { - "BACKUP_TYPE_UNSPECIFIED": 0, - "SCHEDULED": 1, - "ON_DEMAND": 2 - } - }, - "GCPBackupPlanInfo": { - "fields": { - "backupPlan": { - "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" - } - }, - "backupPlanRuleId": { - "type": "string", - "id": 2 - } - } - } - } - }, - "CreateBackupVaultRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" - } - }, - "backupVaultId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupVault": { - "type": "BackupVault", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "validateOnly": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupVaultsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "view": { - "type": "BackupVaultView", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupVaultsResponse": { - "fields": { - "backupVaults": { - "rule": "repeated", - "type": "BackupVault", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "FetchUsableBackupVaultsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "FetchUsableBackupVaultsResponse": { - "fields": { - "backupVaults": { - "rule": "repeated", - "type": "BackupVault", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetBackupVaultRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" - } - }, - "view": { - "type": "BackupVaultView", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateBackupVaultRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupVault": { - "type": "BackupVault", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "UUID4", - "(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" - } - } - } - }, - "DeleteBackupVaultRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "force": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "etag": { - "type": "string", - "id": 4 - }, - "validateOnly": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "allowMissing": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListDataSourcesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/DataSource" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListDataSourcesResponse": { - "fields": { - "dataSources": { - "rule": "repeated", - "type": "DataSource", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetDataSourceRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - } - } - }, - "UpdateDataSourceRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dataSource": { - "type": "DataSource", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "allowMissing": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "RemoveDataSourceRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "SetInternalStatusRequest": { - "fields": { - "dataSource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - }, - "value": { - "type": "bytes", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupConfigState": { - "type": "BackupConfigState", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "SetInternalStatusResponse": { - "fields": {} - }, - "InitiateBackupRequest": { - "fields": { - "dataSource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "backupId": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "InitiateBackupResponse": { - "fields": { - "backup": { - "type": "string", - "id": 1 - }, - "newBackupGenerationId": { - "type": "int32", - "id": 2 - }, - "baseBackupGenerationId": { - "type": "int32", - "id": 3 - } - } - }, - "AbandonBackupRequest": { - "fields": { - "dataSource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "FinalizeBackupRequest": { - "oneofs": { - "_description": { - "oneof": [ - "description" - ] - }, - "_consistencyTime": { - "oneof": [ - "consistencyTime" - ] - }, - "_recoveryRangeStartTime": { - "oneof": [ - "recoveryRangeStartTime" - ] - }, - "_recoveryRangeEndTime": { - "oneof": [ - "recoveryRangeEndTime" - ] - }, - "_retentionDuration": { - "oneof": [ - "retentionDuration" - ] - } - }, - "fields": { - "dataSource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "consistencyTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "backupId": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "recoveryRangeStartTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "proto3_optional": true - } - }, - "recoveryRangeEndTime": { - "type": "google.protobuf.Timestamp", - "id": 7, - "options": { - "proto3_optional": true - } - }, - "retentionDuration": { - "type": "google.protobuf.Duration", - "id": 9, - "options": { - "proto3_optional": true - } - } - } - }, - "FetchAccessTokenRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - }, - "generationId": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "FetchAccessTokenResponse": { - "fields": { - "readLocation": { - "type": "string", - "id": 1 - }, - "writeLocation": { - "type": "string", - "id": 2 - }, - "token": { - "type": "string", - "id": 3 - }, - "expireTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - } - } - }, - "ListBackupsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/Backup" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "view": { - "type": "BackupView", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupsResponse": { - "fields": { - "backups": { - "rule": "repeated", - "type": "Backup", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetBackupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" - } - }, - "view": { - "type": "BackupView", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateBackupRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backup": { - "type": "Backup", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteBackupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "RestoreBackupRequest": { - "oneofs": { - "targetEnvironment": { - "oneof": [ - "computeInstanceTargetEnvironment" - ] - }, - "instanceProperties": { - "oneof": [ - "computeInstanceRestoreProperties" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "computeInstanceTargetEnvironment": { - "type": "ComputeInstanceTargetEnvironment", - "id": 3 - }, - "computeInstanceRestoreProperties": { - "type": "ComputeInstanceRestoreProperties", - "id": 4 - } - } - }, - "RestoreBackupResponse": { - "fields": { - "targetResource": { - "type": "TargetResource", - "id": 1 - } - } - }, - "TargetResource": { - "oneofs": { - "targetResourceInfo": { - "oneof": [ - "gcpResource" - ] - } - }, - "fields": { - "gcpResource": { - "type": "GcpResource", - "id": 1 - } - } - }, - "GcpResource": { - "fields": { - "gcpResourcename": { - "type": "string", - "id": 1 - }, - "location": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - } - } - }, - "BackupConfigState": { - "values": { - "BACKUP_CONFIG_STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "PASSIVE": 2 - } - }, - "BackupView": { - "values": { - "BACKUP_VIEW_UNSPECIFIED": 0, - "BACKUP_VIEW_BASIC": 1, - "BACKUP_VIEW_FULL": 2 - } - }, - "BackupVaultView": { - "values": { - "BACKUP_VAULT_VIEW_UNSPECIFIED": 0, - "BACKUP_VAULT_VIEW_BASIC": 1, - "BACKUP_VAULT_VIEW_FULL": 2 - } - }, - "BackupApplianceBackupProperties": { - "oneofs": { - "_generationId": { - "oneof": [ - "generationId" - ] - }, - "_finalizeTime": { - "oneof": [ - "finalizeTime" - ] - }, - "_recoveryRangeStartTime": { - "oneof": [ - "recoveryRangeStartTime" - ] - }, - "_recoveryRangeEndTime": { - "oneof": [ - "recoveryRangeEndTime" - ] - } - }, - "fields": { - "generationId": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "finalizeTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "recoveryRangeStartTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "recoveryRangeEndTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "ComputeInstanceBackupProperties": { - "oneofs": { - "_description": { - "oneof": [ - "description" - ] - }, - "_tags": { - "oneof": [ - "tags" - ] - }, - "_machineType": { - "oneof": [ - "machineType" - ] - }, - "_canIpForward": { - "oneof": [ - "canIpForward" - ] - }, - "_metadata": { - "oneof": [ - "metadata" - ] - }, - "_scheduling": { - "oneof": [ - "scheduling" - ] - }, - "_minCpuPlatform": { - "oneof": [ - "minCpuPlatform" - ] - }, - "_keyRevocationActionType": { - "oneof": [ - "keyRevocationActionType" - ] - }, - "_sourceInstance": { - "oneof": [ - "sourceInstance" - ] - } - }, - "fields": { - "description": { - "type": "string", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "tags": { - "type": "Tags", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "machineType": { - "type": "string", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "canIpForward": { - "type": "bool", - "id": 4, - "options": { - "proto3_optional": true - } - }, - "networkInterface": { - "rule": "repeated", - "type": "NetworkInterface", - "id": 5 - }, - "disk": { - "rule": "repeated", - "type": "AttachedDisk", - "id": 6 - }, - "metadata": { - "type": "Metadata", - "id": 7, - "options": { - "proto3_optional": true - } - }, - "serviceAccount": { - "rule": "repeated", - "type": "ServiceAccount", - "id": 8 - }, - "scheduling": { - "type": "Scheduling", - "id": 9, - "options": { - "proto3_optional": true - } - }, - "guestAccelerator": { - "rule": "repeated", - "type": "AcceleratorConfig", - "id": 10 - }, - "minCpuPlatform": { - "type": "string", - "id": 11, - "options": { - "proto3_optional": true - } - }, - "keyRevocationActionType": { - "type": "KeyRevocationActionType", - "id": 12, - "options": { - "proto3_optional": true - } - }, - "sourceInstance": { - "type": "string", - "id": 13, - "options": { - "proto3_optional": true - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 14 - } - } - }, - "ComputeInstanceRestoreProperties": { - "oneofs": { - "_name": { - "oneof": [ - "name" - ] - }, - "_advancedMachineFeatures": { - "oneof": [ - "advancedMachineFeatures" - ] - }, - "_canIpForward": { - "oneof": [ - "canIpForward" - ] - }, - "_confidentialInstanceConfig": { - "oneof": [ - "confidentialInstanceConfig" - ] - }, - "_deletionProtection": { - "oneof": [ - "deletionProtection" - ] - }, - "_description": { - "oneof": [ - "description" - ] - }, - "_displayDevice": { - "oneof": [ - "displayDevice" - ] - }, - "_hostname": { - "oneof": [ - "hostname" - ] - }, - "_instanceEncryptionKey": { - "oneof": [ - "instanceEncryptionKey" - ] - }, - "_keyRevocationActionType": { - "oneof": [ - "keyRevocationActionType" - ] - }, - "_machineType": { - "oneof": [ - "machineType" - ] - }, - "_metadata": { - "oneof": [ - "metadata" - ] - }, - "_minCpuPlatform": { - "oneof": [ - "minCpuPlatform" - ] - }, - "_networkPerformanceConfig": { - "oneof": [ - "networkPerformanceConfig" - ] - }, - "_params": { - "oneof": [ - "params" - ] - }, - "_privateIpv6GoogleAccess": { - "oneof": [ - "privateIpv6GoogleAccess" - ] - }, - "_allocationAffinity": { - "oneof": [ - "allocationAffinity" - ] - }, - "_scheduling": { - "oneof": [ - "scheduling" - ] - }, - "_tags": { - "oneof": [ - "tags" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "proto3_optional": true - } - }, - "advancedMachineFeatures": { - "type": "AdvancedMachineFeatures", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "canIpForward": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "confidentialInstanceConfig": { - "type": "ConfidentialInstanceConfig", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "deletionProtection": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "description": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "disks": { - "rule": "repeated", - "type": "AttachedDisk", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "displayDevice": { - "type": "DisplayDevice", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "guestAccelerators": { - "rule": "repeated", - "type": "AcceleratorConfig", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "hostname": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "instanceEncryptionKey": { - "type": "CustomerEncryptionKey", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "keyRevocationActionType": { - "type": "KeyRevocationActionType", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "machineType": { - "type": "string", - "id": 14, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "metadata": { - "type": "Metadata", - "id": 15, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "minCpuPlatform": { - "type": "string", - "id": 16, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "networkInterfaces": { - "rule": "repeated", - "type": "NetworkInterface", - "id": 17, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "networkPerformanceConfig": { - "type": "NetworkPerformanceConfig", - "id": 18, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "params": { - "type": "InstanceParams", - "id": 19, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY", - "proto3_optional": true - } - }, - "privateIpv6GoogleAccess": { - "type": "InstancePrivateIpv6GoogleAccess", - "id": 20, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "allocationAffinity": { - "type": "AllocationAffinity", - "id": 21, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "resourcePolicies": { - "rule": "repeated", - "type": "string", - "id": 22, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "scheduling": { - "type": "Scheduling", - "id": 23, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "serviceAccounts": { - "rule": "repeated", - "type": "ServiceAccount", - "id": 24, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "tags": { - "type": "Tags", - "id": 26, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "InstancePrivateIpv6GoogleAccess": { - "values": { - "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": 0, - "INHERIT_FROM_SUBNETWORK": 1, - "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE": 2, - "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE": 3 - } - } - } - }, - "ComputeInstanceTargetEnvironment": { - "fields": { - "project": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ComputeInstanceDataSourceProperties": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "description": { - "type": "string", - "id": 2 - }, - "machineType": { - "type": "string", - "id": 3 - }, - "totalDiskCount": { - "type": "int64", - "id": 4 - }, - "totalDiskSizeGb": { - "type": "int64", - "id": 5 - } - } - }, - "AdvancedMachineFeatures": { - "oneofs": { - "_enableNestedVirtualization": { - "oneof": [ - "enableNestedVirtualization" - ] - }, - "_threadsPerCore": { - "oneof": [ - "threadsPerCore" - ] - }, - "_visibleCoreCount": { - "oneof": [ - "visibleCoreCount" - ] - }, - "_enableUefiNetworking": { - "oneof": [ - "enableUefiNetworking" - ] - } - }, - "fields": { - "enableNestedVirtualization": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "threadsPerCore": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "visibleCoreCount": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "enableUefiNetworking": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "ConfidentialInstanceConfig": { - "oneofs": { - "_enableConfidentialCompute": { - "oneof": [ - "enableConfidentialCompute" - ] - } - }, - "fields": { - "enableConfidentialCompute": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "DisplayDevice": { - "oneofs": { - "_enableDisplay": { - "oneof": [ - "enableDisplay" - ] - } - }, - "fields": { - "enableDisplay": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "AcceleratorConfig": { - "oneofs": { - "_acceleratorType": { - "oneof": [ - "acceleratorType" - ] - }, - "_acceleratorCount": { - "oneof": [ - "acceleratorCount" - ] - } - }, - "fields": { - "acceleratorType": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "acceleratorCount": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "CustomerEncryptionKey": { - "oneofs": { - "key": { - "oneof": [ - "rawKey", - "rsaEncryptedKey", - "kmsKeyName" - ] - }, - "_kmsKeyServiceAccount": { - "oneof": [ - "kmsKeyServiceAccount" - ] - } - }, - "fields": { - "rawKey": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "rsaEncryptedKey": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "kmsKeyName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "kmsKeyServiceAccount": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "Entry": { - "oneofs": { - "_key": { - "oneof": [ - "key" - ] - }, - "_value": { - "oneof": [ - "value" - ] - } - }, - "fields": { - "key": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "value": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "Metadata": { - "fields": { - "items": { - "rule": "repeated", - "type": "Entry", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "NetworkInterface": { - "oneofs": { - "_network": { - "oneof": [ - "network" - ] - }, - "_subnetwork": { - "oneof": [ - "subnetwork" - ] - }, - "_ipAddress": { - "oneof": [ - "ipAddress" - ] - }, - "_ipv6Address": { - "oneof": [ - "ipv6Address" - ] - }, - "_internalIpv6PrefixLength": { - "oneof": [ - "internalIpv6PrefixLength" - ] - }, - "_name": { - "oneof": [ - "name" - ] - }, - "_stackType": { - "oneof": [ - "stackType" - ] - }, - "_ipv6AccessType": { - "oneof": [ - "ipv6AccessType" - ] - }, - "_queueCount": { - "oneof": [ - "queueCount" - ] - }, - "_nicType": { - "oneof": [ - "nicType" - ] - }, - "_networkAttachment": { - "oneof": [ - "networkAttachment" - ] - } - }, - "fields": { - "network": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "subnetwork": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "ipAddress": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "IPV4", - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "ipv6Address": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "IPV6", - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "internalIpv6PrefixLength": { - "type": "int32", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "name": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "accessConfigs": { - "rule": "repeated", - "type": "AccessConfig", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "ipv6AccessConfigs": { - "rule": "repeated", - "type": "AccessConfig", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "aliasIpRanges": { - "rule": "repeated", - "type": "AliasIpRange", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "stackType": { - "type": "StackType", - "id": 10, - "options": { - "proto3_optional": true - } - }, - "ipv6AccessType": { - "type": "Ipv6AccessType", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "queueCount": { - "type": "int32", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "nicType": { - "type": "NicType", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "networkAttachment": { - "type": "string", - "id": 14, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "StackType": { - "values": { - "STACK_TYPE_UNSPECIFIED": 0, - "IPV4_ONLY": 1, - "IPV4_IPV6": 2 - } - }, - "Ipv6AccessType": { - "values": { - "UNSPECIFIED_IPV6_ACCESS_TYPE": 0, - "INTERNAL": 1, - "EXTERNAL": 2 - } - }, - "NicType": { - "values": { - "NIC_TYPE_UNSPECIFIED": 0, - "VIRTIO_NET": 1, - "GVNIC": 2 - } - } - } - }, - "NetworkPerformanceConfig": { - "oneofs": { - "_totalEgressBandwidthTier": { - "oneof": [ - "totalEgressBandwidthTier" - ] - } - }, - "fields": { - "totalEgressBandwidthTier": { - "type": "Tier", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "Tier": { - "values": { - "TIER_UNSPECIFIED": 0, - "DEFAULT": 1, - "TIER_1": 2 - } - } - } - }, - "AccessConfig": { - "oneofs": { - "_type": { - "oneof": [ - "type" - ] - }, - "_name": { - "oneof": [ - "name" - ] - }, - "_externalIp": { - "oneof": [ - "externalIp" - ] - }, - "_externalIpv6": { - "oneof": [ - "externalIpv6" - ] - }, - "_externalIpv6PrefixLength": { - "oneof": [ - "externalIpv6PrefixLength" - ] - }, - "_setPublicPtr": { - "oneof": [ - "setPublicPtr" - ] - }, - "_publicPtrDomainName": { - "oneof": [ - "publicPtrDomainName" - ] - }, - "_networkTier": { - "oneof": [ - "networkTier" - ] - } - }, - "fields": { - "type": { - "type": "AccessType", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "name": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "externalIp": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "externalIpv6": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "externalIpv6PrefixLength": { - "type": "int32", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "setPublicPtr": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "publicPtrDomainName": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "networkTier": { - "type": "NetworkTier", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "AccessType": { - "values": { - "ACCESS_TYPE_UNSPECIFIED": 0, - "ONE_TO_ONE_NAT": 1, - "DIRECT_IPV6": 2 - } - }, - "NetworkTier": { - "values": { - "NETWORK_TIER_UNSPECIFIED": 0, - "PREMIUM": 1, - "STANDARD": 2 - } - } - } - }, - "AliasIpRange": { - "oneofs": { - "_ipCidrRange": { - "oneof": [ - "ipCidrRange" - ] - }, - "_subnetworkRangeName": { - "oneof": [ - "subnetworkRangeName" - ] - } - }, - "fields": { - "ipCidrRange": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "subnetworkRangeName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "InstanceParams": { - "fields": { - "resourceManagerTags": { - "keyType": "string", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "AllocationAffinity": { - "oneofs": { - "_consumeAllocationType": { - "oneof": [ - "consumeAllocationType" - ] - }, - "_key": { - "oneof": [ - "key" - ] - } - }, - "fields": { - "consumeAllocationType": { - "type": "Type", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "key": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "values": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "NO_RESERVATION": 1, - "ANY_RESERVATION": 2, - "SPECIFIC_RESERVATION": 3 - } - } - } - }, - "Scheduling": { - "oneofs": { - "_onHostMaintenance": { - "oneof": [ - "onHostMaintenance" - ] - }, - "_automaticRestart": { - "oneof": [ - "automaticRestart" - ] - }, - "_preemptible": { - "oneof": [ - "preemptible" - ] - }, - "_minNodeCpus": { - "oneof": [ - "minNodeCpus" - ] - }, - "_provisioningModel": { - "oneof": [ - "provisioningModel" - ] - }, - "_instanceTerminationAction": { - "oneof": [ - "instanceTerminationAction" - ] - }, - "_localSsdRecoveryTimeout": { - "oneof": [ - "localSsdRecoveryTimeout" - ] - } - }, - "fields": { - "onHostMaintenance": { - "type": "OnHostMaintenance", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "automaticRestart": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "preemptible": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "nodeAffinities": { - "rule": "repeated", - "type": "NodeAffinity", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "minNodeCpus": { - "type": "int32", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "provisioningModel": { - "type": "ProvisioningModel", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "instanceTerminationAction": { - "type": "InstanceTerminationAction", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "localSsdRecoveryTimeout": { - "type": "SchedulingDuration", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "OnHostMaintenance": { - "values": { - "ON_HOST_MAINTENANCE_UNSPECIFIED": 0, - "TERMINATE": 1, - "MIGRATE": 1000 - } - }, - "NodeAffinity": { - "oneofs": { - "_key": { - "oneof": [ - "key" - ] - }, - "_operator": { - "oneof": [ - "operator" - ] - } - }, - "fields": { - "key": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "operator": { - "type": "Operator", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "values": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Operator": { - "values": { - "OPERATOR_UNSPECIFIED": 0, - "IN": 1, - "NOT_IN": 2 - } - } - } - }, - "ProvisioningModel": { - "values": { - "PROVISIONING_MODEL_UNSPECIFIED": 0, - "STANDARD": 1, - "SPOT": 2 - } - }, - "InstanceTerminationAction": { - "values": { - "INSTANCE_TERMINATION_ACTION_UNSPECIFIED": 0, - "DELETE": 1, - "STOP": 2 - } - } - } - }, - "SchedulingDuration": { - "oneofs": { - "_seconds": { - "oneof": [ - "seconds" - ] - }, - "_nanos": { - "oneof": [ - "nanos" - ] - } - }, - "fields": { - "seconds": { - "type": "int64", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "nanos": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "ServiceAccount": { - "oneofs": { - "_email": { - "oneof": [ - "email" - ] - } - }, - "fields": { - "email": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "scopes": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "Tags": { - "fields": { - "items": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "AttachedDisk": { - "oneofs": { - "_initializeParams": { - "oneof": [ - "initializeParams" - ] - }, - "_deviceName": { - "oneof": [ - "deviceName" - ] - }, - "_kind": { - "oneof": [ - "kind" - ] - }, - "_diskTypeDeprecated": { - "oneof": [ - "diskTypeDeprecated" - ] - }, - "_mode": { - "oneof": [ - "mode" - ] - }, - "_source": { - "oneof": [ - "source" - ] - }, - "_index": { - "oneof": [ - "index" - ] - }, - "_boot": { - "oneof": [ - "boot" - ] - }, - "_autoDelete": { - "oneof": [ - "autoDelete" - ] - }, - "_diskInterface": { - "oneof": [ - "diskInterface" - ] - }, - "_diskEncryptionKey": { - "oneof": [ - "diskEncryptionKey" - ] - }, - "_diskSizeGb": { - "oneof": [ - "diskSizeGb" - ] - }, - "_savedState": { - "oneof": [ - "savedState" - ] - }, - "_diskType": { - "oneof": [ - "diskType" - ] - }, - "_type": { - "oneof": [ - "type" - ] - } - }, - "fields": { - "initializeParams": { - "type": "InitializeParams", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "deviceName": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "kind": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "diskTypeDeprecated": { - "type": "DiskType", - "id": 6, - "options": { - "deprecated": true, - "proto3_optional": true - } - }, - "mode": { - "type": "DiskMode", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "source": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "index": { - "type": "int64", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "boot": { - "type": "bool", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "autoDelete": { - "type": "bool", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "license": { - "rule": "repeated", - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "diskInterface": { - "type": "DiskInterface", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "guestOsFeature": { - "rule": "repeated", - "type": "GuestOsFeature", - "id": 14, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "diskEncryptionKey": { - "type": "CustomerEncryptionKey", - "id": 15, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "diskSizeGb": { - "type": "int64", - "id": 16, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "savedState": { - "type": "DiskSavedState", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "diskType": { - "type": "string", - "id": 18, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "type": { - "type": "DiskType", - "id": 19, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "InitializeParams": { - "oneofs": { - "_diskName": { - "oneof": [ - "diskName" - ] - } - }, - "fields": { - "diskName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "replicaZones": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DiskType": { - "values": { - "DISK_TYPE_UNSPECIFIED": 0, - "SCRATCH": 1, - "PERSISTENT": 2 - } - }, - "DiskMode": { - "values": { - "DISK_MODE_UNSPECIFIED": 0, - "READ_WRITE": 1, - "READ_ONLY": 2, - "LOCKED": 3 - } - }, - "DiskInterface": { - "values": { - "DISK_INTERFACE_UNSPECIFIED": 0, - "SCSI": 1, - "NVME": 2, - "NVDIMM": 3, - "ISCSI": 4 - } - }, - "DiskSavedState": { - "values": { - "DISK_SAVED_STATE_UNSPECIFIED": 0, - "PRESERVED": 1 - } - } - } - }, - "GuestOsFeature": { - "oneofs": { - "_type": { - "oneof": [ - "type" - ] - } - }, - "fields": { - "type": { - "type": "FeatureType", - "id": 1, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "FeatureType": { - "values": { - "FEATURE_TYPE_UNSPECIFIED": 0, - "VIRTIO_SCSI_MULTIQUEUE": 1, - "WINDOWS": 2, - "MULTI_IP_SUBNET": 3, - "UEFI_COMPATIBLE": 4, - "SECURE_BOOT": 5, - "GVNIC": 6, - "SEV_CAPABLE": 7, - "BARE_METAL_LINUX_COMPATIBLE": 8, - "SUSPEND_RESUME_COMPATIBLE": 9, - "SEV_LIVE_MIGRATABLE": 10, - "SEV_SNP_CAPABLE": 11, - "TDX_CAPABLE": 12, - "IDPF": 13, - "SEV_LIVE_MIGRATABLE_V2": 14 - } - } - } - }, - "KeyRevocationActionType": { - "values": { - "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": 0, - "NONE": 1, - "STOP": 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 - } - }, - "fieldInfo": { - "type": "google.api.FieldInfo", - "id": 291403980, - "extend": "google.protobuf.FieldOptions" - }, - "FieldInfo": { - "fields": { - "format": { - "type": "Format", - "id": 1 - } - }, - "nested": { - "Format": { - "values": { - "FORMAT_UNSPECIFIED": 0, - "UUID4": 1, - "IPV4": 2, - "IPV6": 3, - "IPV4_OR_IPV6": 4 - } - } - } - }, - "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 - } - } - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "Empty": { - "fields": {} - }, - "DoubleValue": { - "fields": { - "value": { - "type": "double", - "id": 1 - } - } - }, - "FloatValue": { - "fields": { - "value": { - "type": "float", - "id": 1 - } - } - }, - "Int64Value": { - "fields": { - "value": { - "type": "int64", - "id": 1 - } - } - }, - "UInt64Value": { - "fields": { - "value": { - "type": "uint64", - "id": 1 - } - } - }, - "Int32Value": { - "fields": { - "value": { - "type": "int32", - "id": 1 - } - } - }, - "UInt32Value": { - "fields": { - "value": { - "type": "uint32", - "id": 1 - } - } - }, - "BoolValue": { - "fields": { - "value": { - "type": "bool", - "id": 1 - } - } - }, - "StringValue": { - "fields": { - "value": { - "type": "string", - "id": 1 - } - } - }, - "BytesValue": { - "fields": { - "value": { - "type": "bytes", - "id": 1 - } - } - } - } - }, - "type": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/type/expr;expr", - "java_multiple_files": true, - "java_outer_classname": "ExprProto", - "java_package": "com.google.type", - "objc_class_prefix": "GTP" - }, - "nested": { - "DayOfWeek": { - "values": { - "DAY_OF_WEEK_UNSPECIFIED": 0, - "MONDAY": 1, - "TUESDAY": 2, - "WEDNESDAY": 3, - "THURSDAY": 4, - "FRIDAY": 5, - "SATURDAY": 6, - "SUNDAY": 7 - } - }, - "Month": { - "values": { - "MONTH_UNSPECIFIED": 0, - "JANUARY": 1, - "FEBRUARY": 2, - "MARCH": 3, - "APRIL": 4, - "MAY": 5, - "JUNE": 6, - "JULY": 7, - "AUGUST": 8, - "SEPTEMBER": 9, - "OCTOBER": 10, - "NOVEMBER": 11, - "DECEMBER": 12 - } - }, - "Expr": { - "fields": { - "expression": { - "type": "string", - "id": 1 - }, - "title": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "location": { - "type": "string", - "id": 4 - } - } - } - } - }, - "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 - } - } - } - } - }, - "iam": { - "nested": { - "v1": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.Cloud.Iam.V1", - "go_package": "cloud.google.com/go/iam/apiv1/iampb;iampb", - "java_multiple_files": true, - "java_outer_classname": "PolicyProto", - "java_package": "com.google.iam.v1", - "php_namespace": "Google\\Cloud\\Iam\\V1" - }, - "nested": { - "IAMPolicy": { - "options": { - "(google.api.default_host)": "iam-meta-api.googleapis.com" - }, - "methods": { - "SetIamPolicy": { - "requestType": "SetIamPolicyRequest", - "responseType": "Policy", - "options": { - "(google.api.http).post": "/v1/{resource=**}:setIamPolicy", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=**}:setIamPolicy", - "body": "*" - } - } - ] - }, - "GetIamPolicy": { - "requestType": "GetIamPolicyRequest", - "responseType": "Policy", - "options": { - "(google.api.http).post": "/v1/{resource=**}:getIamPolicy", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=**}:getIamPolicy", - "body": "*" - } - } - ] - }, - "TestIamPermissions": { - "requestType": "TestIamPermissionsRequest", - "responseType": "TestIamPermissionsResponse", - "options": { - "(google.api.http).post": "/v1/{resource=**}:testIamPermissions", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=**}:testIamPermissions", - "body": "*" - } - } - ] - } - } - }, - "SetIamPolicyRequest": { - "fields": { - "resource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "*" - } - }, - "policy": { - "type": "Policy", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 3 - } - } - }, - "GetIamPolicyRequest": { - "fields": { - "resource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "*" - } - }, - "options": { - "type": "GetPolicyOptions", - "id": 2 - } - } - }, - "TestIamPermissionsRequest": { - "fields": { - "resource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "*" - } - }, - "permissions": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "TestIamPermissionsResponse": { - "fields": { - "permissions": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "GetPolicyOptions": { - "fields": { - "requestedPolicyVersion": { - "type": "int32", - "id": 1 - } - } - }, - "Policy": { - "fields": { - "version": { - "type": "int32", - "id": 1 - }, - "bindings": { - "rule": "repeated", - "type": "Binding", - "id": 4 - }, - "auditConfigs": { - "rule": "repeated", - "type": "AuditConfig", - "id": 6 - }, - "etag": { - "type": "bytes", - "id": 3 - } - } - }, - "Binding": { - "fields": { - "role": { - "type": "string", - "id": 1 - }, - "members": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "condition": { - "type": "google.type.Expr", - "id": 3 - } - } - }, - "AuditConfig": { - "fields": { - "service": { - "type": "string", - "id": 1 - }, - "auditLogConfigs": { - "rule": "repeated", - "type": "AuditLogConfig", - "id": 3 - } - } - }, - "AuditLogConfig": { - "fields": { - "logType": { - "type": "LogType", - "id": 1 - }, - "exemptedMembers": { - "rule": "repeated", - "type": "string", - "id": 2 - } - }, - "nested": { - "LogType": { - "values": { - "LOG_TYPE_UNSPECIFIED": 0, - "ADMIN_READ": 1, - "DATA_WRITE": 2, - "DATA_READ": 3 - } - } - } - }, - "PolicyDelta": { - "fields": { - "bindingDeltas": { - "rule": "repeated", - "type": "BindingDelta", - "id": 1 - }, - "auditConfigDeltas": { - "rule": "repeated", - "type": "AuditConfigDelta", - "id": 2 - } - } - }, - "BindingDelta": { - "fields": { - "action": { - "type": "Action", - "id": 1 - }, - "role": { - "type": "string", - "id": 2 - }, - "member": { - "type": "string", - "id": 3 - }, - "condition": { - "type": "google.type.Expr", - "id": 4 - } - }, - "nested": { - "Action": { - "values": { - "ACTION_UNSPECIFIED": 0, - "ADD": 1, - "REMOVE": 2 - } - } - } - }, - "AuditConfigDelta": { - "fields": { - "action": { - "type": "Action", - "id": 1 - }, - "service": { - "type": "string", - "id": 2 - }, - "exemptedMember": { - "type": "string", - "id": 3 - }, - "logType": { - "type": "string", - "id": 4 - } - }, - "nested": { - "Action": { - "values": { - "ACTION_UNSPECIFIED": 0, - "ADD": 1, - "REMOVE": 2 - } - } - } - } - } - } - } - }, - "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 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js deleted file mode 100644 index f14ca310e86..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js +++ /dev/null @@ -1,90 +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 -// -// 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, managementServerId, managementServer) { - // [START backupdr_v1_generated_BackupDR_CreateManagementServer_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 management server project and location in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR - * locations map to Google Cloud regions, for example **us-central1**. - */ - // const parent = 'abc123' - /** - * Required. The name of the management server to create. The name must be - * unique for the specified project and location. - */ - // const managementServerId = 'abc123' - /** - * Required. A management server - * resource google.cloud.backupdr.v1.ManagementServer - */ - // const managementServer = {} - /** - * Optional. An optional 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 Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callCreateManagementServer() { - // Construct request - const request = { - parent, - managementServerId, - managementServer, - }; - - // Run request - const [operation] = await backupdrClient.createManagementServer(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateManagementServer(); - // [END backupdr_v1_generated_BackupDR_CreateManagementServer_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-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js deleted file mode 100644 index c27febd63fd..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js +++ /dev/null @@ -1,76 +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 -// -// 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 backupdr_v1_generated_BackupDR_DeleteManagementServer_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 resource - */ - // const name = 'abc123' - /** - * Optional. An optional 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 Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callDeleteManagementServer() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await backupdrClient.deleteManagementServer(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteManagementServer(); - // [END backupdr_v1_generated_BackupDR_DeleteManagementServer_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-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js deleted file mode 100644 index 11cc5ae277f..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js +++ /dev/null @@ -1,62 +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 -// -// 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 backupdr_v1_generated_BackupDR_GetManagementServer_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 management server resource name, in the format - * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' - */ - // const name = 'abc123' - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callGetManagementServer() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await backupdrClient.getManagementServer(request); - console.log(response); - } - - callGetManagementServer(); - // [END backupdr_v1_generated_BackupDR_GetManagementServer_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-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js deleted file mode 100644 index 262d1a29e3c..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js +++ /dev/null @@ -1,85 +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 -// -// 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 backupdr_v1_generated_BackupDR_ListManagementServers_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The project and location for which to retrieve management servers - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud BackupDR, locations map to Google Cloud regions, for example - * **us-central1**. To retrieve management servers for all locations, use "-" - * for the - * '{location}' value. - */ - // const parent = 'abc123' - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - */ - // const pageSize = 1234 - /** - * Optional. A token identifying a page of results the server should return. - */ - // const pageToken = 'abc123' - /** - * Optional. Filtering results. - */ - // const filter = 'abc123' - /** - * Optional. Hint for how to order the results. - */ - // const orderBy = 'abc123' - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callListManagementServers() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = backupdrClient.listManagementServersAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListManagementServers(); - // [END backupdr_v1_generated_BackupDR_ListManagementServers_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-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json deleted file mode 100644 index 9a1269e985f..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json +++ /dev/null @@ -1,1707 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-backupdr", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.backupdr.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "backupdr_v1_generated_BackupDR_ListManagementServers_async", - "title": "BackupDR listManagementServers Sample", - "origin": "API_DEFINITION", - "description": " Lists ManagementServers in a given project and location.", - "canonical": true, - "file": "backup_d_r.list_management_servers.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListManagementServers", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListManagementServers", - "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.backupdr.v1.ListManagementServersResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "ListManagementServers", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListManagementServers", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_GetManagementServer_async", - "title": "BackupDR getManagementServer Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single ManagementServer.", - "canonical": true, - "file": "backup_d_r.get_management_server.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetManagementServer", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetManagementServer", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.backupdr.v1.ManagementServer", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "GetManagementServer", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetManagementServer", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_CreateManagementServer_async", - "title": "BackupDR createManagementServer Sample", - "origin": "API_DEFINITION", - "description": " Creates a new ManagementServer in a given project and location.", - "canonical": true, - "file": "backup_d_r.create_management_server.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateManagementServer", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateManagementServer", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "management_server_id", - "type": "TYPE_STRING" - }, - { - "name": "management_server", - "type": ".google.cloud.backupdr.v1.ManagementServer" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "CreateManagementServer", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateManagementServer", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_DeleteManagementServer_async", - "title": "BackupDR deleteManagementServer Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single ManagementServer.", - "canonical": true, - "file": "backup_d_r.delete_management_server.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteManagementServer", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteManagementServer", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "DeleteManagementServer", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteManagementServer", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupVault_async", - "title": "BackupDR createBackupVault Sample", - "origin": "API_DEFINITION", - "description": " Creates a new BackupVault in a given project and location.", - "canonical": true, - "file": "backup_d_r.create_backup_vault.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "backup_vault_id", - "type": "TYPE_STRING" - }, - { - "name": "backup_vault", - "type": ".google.cloud.backupdr.v1.BackupVault" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "CreateBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_ListBackupVaults_async", - "title": "BackupDR listBackupVaults Sample", - "origin": "API_DEFINITION", - "description": " Lists BackupVaults in a given project and location.", - "canonical": true, - "file": "backup_d_r.list_backup_vaults.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBackupVaults", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", - "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" - }, - { - "name": "view", - "type": ".google.cloud.backupdr.v1.BackupVaultView" - } - ], - "resultType": ".google.cloud.backupdr.v1.ListBackupVaultsResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "ListBackupVaults", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_async", - "title": "BackupDR fetchUsableBackupVaults Sample", - "origin": "API_DEFINITION", - "description": " FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.", - "canonical": true, - "file": "backup_d_r.fetch_usable_backup_vaults.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "FetchUsableBackupVaults", - "fullName": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", - "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.backupdr.v1.FetchUsableBackupVaultsResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "FetchUsableBackupVaults", - "fullName": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_GetBackupVault_async", - "title": "BackupDR getBackupVault Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a BackupVault.", - "canonical": true, - "file": "backup_d_r.get_backup_vault.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.backupdr.v1.BackupVaultView" - } - ], - "resultType": ".google.cloud.backupdr.v1.BackupVault", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "GetBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_UpdateBackupVault_async", - "title": "BackupDR updateBackupVault Sample", - "origin": "API_DEFINITION", - "description": " Updates the settings of a BackupVault.", - "canonical": true, - "file": "backup_d_r.update_backup_vault.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "backup_vault", - "type": ".google.cloud.backupdr.v1.BackupVault" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "UpdateBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupVault_async", - "title": "BackupDR deleteBackupVault Sample", - "origin": "API_DEFINITION", - "description": " Deletes a BackupVault.", - "canonical": true, - "file": "backup_d_r.delete_backup_vault.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 89, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - }, - { - "name": "etag", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "DeleteBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_TestIamPermissions_async", - "title": "BackupDR testIamPermissions Sample", - "origin": "API_DEFINITION", - "description": " Returns the caller's permissions on a BackupVault resource. A caller is not required to have Google IAM permission to make this request.", - "canonical": true, - "file": "backup_d_r.test_iam_permissions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TestIamPermissions", - "fullName": "google.cloud.backupdr.v1.BackupDR.TestIamPermissions", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "permissions", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.iam.v1.TestIamPermissionsResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "TestIamPermissions", - "fullName": "google.cloud.backupdr.v1.BackupDR.TestIamPermissions", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_ListDataSources_async", - "title": "BackupDR listDataSources Sample", - "origin": "API_DEFINITION", - "description": " Lists DataSources in a given project and location.", - "canonical": true, - "file": "backup_d_r.list_data_sources.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDataSources", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListDataSources", - "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.backupdr.v1.ListDataSourcesResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "ListDataSources", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListDataSources", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_GetDataSource_async", - "title": "BackupDR getDataSource Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a DataSource.", - "canonical": true, - "file": "backup_d_r.get_data_source.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDataSource", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetDataSource", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.backupdr.v1.DataSource", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "GetDataSource", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetDataSource", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_UpdateDataSource_async", - "title": "BackupDR updateDataSource Sample", - "origin": "API_DEFINITION", - "description": " Updates the settings of a DataSource.", - "canonical": true, - "file": "backup_d_r.update_data_source.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 81, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateDataSource", - "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "data_source", - "type": ".google.cloud.backupdr.v1.DataSource" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "UpdateDataSource", - "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_RemoveDataSource_async", - "title": "BackupDR removeDataSource Sample", - "origin": "API_DEFINITION", - "description": " Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.", - "canonical": true, - "file": "backup_d_r.remove_data_source.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RemoveDataSource", - "fullName": "google.cloud.backupdr.v1.BackupDR.RemoveDataSource", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "RemoveDataSource", - "fullName": "google.cloud.backupdr.v1.BackupDR.RemoveDataSource", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_SetInternalStatus_async", - "title": "BackupDR setInternalStatus Sample", - "origin": "API_DEFINITION", - "description": " Sets the internal status of a DataSource.", - "canonical": true, - "file": "backup_d_r.set_internal_status.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetInternalStatus", - "fullName": "google.cloud.backupdr.v1.BackupDR.SetInternalStatus", - "async": true, - "parameters": [ - { - "name": "data_source", - "type": "TYPE_STRING" - }, - { - "name": "value", - "type": "TYPE_BYTES" - }, - { - "name": "backup_config_state", - "type": ".google.cloud.backupdr.v1.BackupConfigState" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "SetInternalStatus", - "fullName": "google.cloud.backupdr.v1.BackupDR.SetInternalStatus", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_InitiateBackup_async", - "title": "BackupDR initiateBackup Sample", - "origin": "API_DEFINITION", - "description": " Internal only. Initiates a backup.", - "canonical": true, - "file": "backup_d_r.initiate_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "InitiateBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.InitiateBackup", - "async": true, - "parameters": [ - { - "name": "data_source", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "backup_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.backupdr.v1.InitiateBackupResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "InitiateBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.InitiateBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_AbandonBackup_async", - "title": "BackupDR abandonBackup Sample", - "origin": "API_DEFINITION", - "description": " Internal only. Abandons a backup.", - "canonical": true, - "file": "backup_d_r.abandon_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AbandonBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.AbandonBackup", - "async": true, - "parameters": [ - { - "name": "data_source", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "AbandonBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.AbandonBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_FinalizeBackup_async", - "title": "BackupDR finalizeBackup Sample", - "origin": "API_DEFINITION", - "description": " Internal only. Finalize a backup that was started by a call to InitiateBackup.", - "canonical": true, - "file": "backup_d_r.finalize_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 101, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "FinalizeBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.FinalizeBackup", - "async": true, - "parameters": [ - { - "name": "data_source", - "type": "TYPE_STRING" - }, - { - "name": "description", - "type": "TYPE_STRING" - }, - { - "name": "consistency_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "backup_id", - "type": "TYPE_STRING" - }, - { - "name": "recovery_range_start_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "recovery_range_end_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "retention_duration", - "type": ".google.protobuf.Duration" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "FinalizeBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.FinalizeBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_FetchAccessToken_async", - "title": "BackupDR fetchAccessToken Sample", - "origin": "API_DEFINITION", - "description": " Internal only. Fetch access token for a given data source.", - "canonical": true, - "file": "backup_d_r.fetch_access_token.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "FetchAccessToken", - "fullName": "google.cloud.backupdr.v1.BackupDR.FetchAccessToken", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "generation_id", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.cloud.backupdr.v1.FetchAccessTokenResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "FetchAccessToken", - "fullName": "google.cloud.backupdr.v1.BackupDR.FetchAccessToken", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_ListBackups_async", - "title": "BackupDR listBackups Sample", - "origin": "API_DEFINITION", - "description": " Lists Backups in a given project and location.", - "canonical": true, - "file": "backup_d_r.list_backups.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBackups", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackups", - "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" - }, - { - "name": "view", - "type": ".google.cloud.backupdr.v1.BackupView" - } - ], - "resultType": ".google.cloud.backupdr.v1.ListBackupsResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "ListBackups", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackups", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_GetBackup_async", - "title": "BackupDR getBackup Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a Backup.", - "canonical": true, - "file": "backup_d_r.get_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.backupdr.v1.BackupView" - } - ], - "resultType": ".google.cloud.backupdr.v1.Backup", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "GetBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_UpdateBackup_async", - "title": "BackupDR updateBackup Sample", - "origin": "API_DEFINITION", - "description": " Updates the settings of a Backup.", - "canonical": true, - "file": "backup_d_r.update_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "backup", - "type": ".google.cloud.backupdr.v1.Backup" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "UpdateBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackup_async", - "title": "BackupDR deleteBackup Sample", - "origin": "API_DEFINITION", - "description": " Deletes a Backup.", - "canonical": true, - "file": "backup_d_r.delete_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "DeleteBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_RestoreBackup_async", - "title": "BackupDR restoreBackup Sample", - "origin": "API_DEFINITION", - "description": " Restore from a Backup", - "canonical": true, - "file": "backup_d_r.restore_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RestoreBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "compute_instance_target_environment", - "type": ".google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment" - }, - { - "name": "compute_instance_restore_properties", - "type": ".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "RestoreBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupPlan_async", - "title": "BackupDR createBackupPlan Sample", - "origin": "API_DEFINITION", - "description": " Create a BackupPlan", - "canonical": true, - "file": "backup_d_r.create_backup_plan.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 83, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBackupPlan", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "backup_plan_id", - "type": "TYPE_STRING" - }, - { - "name": "backup_plan", - "type": ".google.cloud.backupdr.v1.BackupPlan" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "CreateBackupPlan", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_GetBackupPlan_async", - "title": "BackupDR getBackupPlan Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single BackupPlan.", - "canonical": true, - "file": "backup_d_r.get_backup_plan.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBackupPlan", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.backupdr.v1.BackupPlan", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "GetBackupPlan", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_ListBackupPlans_async", - "title": "BackupDR listBackupPlans Sample", - "origin": "API_DEFINITION", - "description": " Lists BackupPlans in a given project and location.", - "canonical": true, - "file": "backup_d_r.list_backup_plans.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBackupPlans", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", - "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.backupdr.v1.ListBackupPlansResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "ListBackupPlans", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupPlan_async", - "title": "BackupDR deleteBackupPlan Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single BackupPlan.", - "canonical": true, - "file": "backup_d_r.delete_backup_plan.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBackupPlan", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "DeleteBackupPlan", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async", - "title": "BackupDR createBackupPlanAssociation Sample", - "origin": "API_DEFINITION", - "description": " Create a BackupPlanAssociation", - "canonical": true, - "file": "backup_d_r.create_backup_plan_association.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 81, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBackupPlanAssociation", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "backup_plan_association_id", - "type": "TYPE_STRING" - }, - { - "name": "backup_plan_association", - "type": ".google.cloud.backupdr.v1.BackupPlanAssociation" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "CreateBackupPlanAssociation", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_async", - "title": "BackupDR getBackupPlanAssociation Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single BackupPlanAssociation.", - "canonical": true, - "file": "backup_d_r.get_backup_plan_association.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBackupPlanAssociation", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.backupdr.v1.BackupPlanAssociation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "GetBackupPlanAssociation", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_async", - "title": "BackupDR listBackupPlanAssociations Sample", - "origin": "API_DEFINITION", - "description": " Lists BackupPlanAssociations in a given project and location.", - "canonical": true, - "file": "backup_d_r.list_backup_plan_associations.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBackupPlanAssociations", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", - "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" - } - ], - "resultType": ".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "ListBackupPlanAssociations", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async", - "title": "BackupDR deleteBackupPlanAssociation Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single BackupPlanAssociation.", - "canonical": true, - "file": "backup_d_r.delete_backup_plan_association.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBackupPlanAssociation", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "DeleteBackupPlanAssociation", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_TriggerBackup_async", - "title": "BackupDR triggerBackup Sample", - "origin": "API_DEFINITION", - "description": " Triggers a new Backup.", - "canonical": true, - "file": "backup_d_r.trigger_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TriggerBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "rule_id", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "TriggerBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/index.ts b/owl-bot-staging/google-cloud-backupdr/v1/src/index.ts deleted file mode 100644 index 025ea882aeb..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/src/index.ts +++ /dev/null @@ -1,25 +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 -// -// 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 BackupDRClient = v1.BackupDRClient; -type BackupDRClient = v1.BackupDRClient; -export {v1, BackupDRClient}; -export default {v1, BackupDRClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts deleted file mode 100644 index 97cd950b4c8..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts +++ /dev/null @@ -1,5426 +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 -// -// 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/backup_d_r_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './backup_d_r_client_config.json'; -const version = require('../../../package.json').version; - -/** - * The BackupDR Service - * @class - * @memberof v1 - */ -export class BackupDRClient { - 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; - backupDRStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of BackupDRClient. - * - * @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 BackupDRClient({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 BackupDRClient; - 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 = 'backupdr.' + 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 = { - backupPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}' - ), - backupPlanPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/backupPlans/{backup_plan}' - ), - backupPlanAssociationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}' - ), - backupVaultPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/backupVaults/{backupvault}' - ), - dataSourcePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - managementServerPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/managementServers/{managementserver}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - }; - - // 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 = { - listManagementServers: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'managementServers'), - listBackupVaults: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupVaults'), - fetchUsableBackupVaults: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupVaults'), - listDataSources: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataSources'), - listBackups: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backups'), - listBackupPlans: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupPlans'), - listBackupPlanAssociations: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupPlanAssociations') - }; - - 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.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/managementServers/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/managementServers/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/managementServers/*}:testIamPermissions',body: '*',},{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 createManagementServerResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.ManagementServer') as gax.protobuf.Type; - const createManagementServerMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const deleteManagementServerResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteManagementServerMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const createBackupVaultResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.BackupVault') as gax.protobuf.Type; - const createBackupVaultMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const updateBackupVaultResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.BackupVault') as gax.protobuf.Type; - const updateBackupVaultMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const deleteBackupVaultResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteBackupVaultMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const updateDataSourceResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.DataSource') as gax.protobuf.Type; - const updateDataSourceMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const removeDataSourceResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const removeDataSourceMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const setInternalStatusResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.SetInternalStatusResponse') as gax.protobuf.Type; - const setInternalStatusMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const abandonBackupResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const abandonBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const finalizeBackupResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.Backup') as gax.protobuf.Type; - const finalizeBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const updateBackupResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.Backup') as gax.protobuf.Type; - const updateBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const deleteBackupResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.Backup') as gax.protobuf.Type; - const deleteBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const restoreBackupResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.RestoreBackupResponse') as gax.protobuf.Type; - const restoreBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const createBackupPlanResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.BackupPlan') as gax.protobuf.Type; - const createBackupPlanMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const deleteBackupPlanResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteBackupPlanMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const createBackupPlanAssociationResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.BackupPlanAssociation') as gax.protobuf.Type; - const createBackupPlanAssociationMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const deleteBackupPlanAssociationResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteBackupPlanAssociationMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const triggerBackupResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.BackupPlanAssociation') as gax.protobuf.Type; - const triggerBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createManagementServer: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createManagementServerResponse.decode.bind(createManagementServerResponse), - createManagementServerMetadata.decode.bind(createManagementServerMetadata)), - deleteManagementServer: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteManagementServerResponse.decode.bind(deleteManagementServerResponse), - deleteManagementServerMetadata.decode.bind(deleteManagementServerMetadata)), - createBackupVault: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createBackupVaultResponse.decode.bind(createBackupVaultResponse), - createBackupVaultMetadata.decode.bind(createBackupVaultMetadata)), - updateBackupVault: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateBackupVaultResponse.decode.bind(updateBackupVaultResponse), - updateBackupVaultMetadata.decode.bind(updateBackupVaultMetadata)), - deleteBackupVault: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteBackupVaultResponse.decode.bind(deleteBackupVaultResponse), - deleteBackupVaultMetadata.decode.bind(deleteBackupVaultMetadata)), - updateDataSource: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateDataSourceResponse.decode.bind(updateDataSourceResponse), - updateDataSourceMetadata.decode.bind(updateDataSourceMetadata)), - removeDataSource: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - removeDataSourceResponse.decode.bind(removeDataSourceResponse), - removeDataSourceMetadata.decode.bind(removeDataSourceMetadata)), - setInternalStatus: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - setInternalStatusResponse.decode.bind(setInternalStatusResponse), - setInternalStatusMetadata.decode.bind(setInternalStatusMetadata)), - abandonBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - abandonBackupResponse.decode.bind(abandonBackupResponse), - abandonBackupMetadata.decode.bind(abandonBackupMetadata)), - finalizeBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - finalizeBackupResponse.decode.bind(finalizeBackupResponse), - finalizeBackupMetadata.decode.bind(finalizeBackupMetadata)), - updateBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateBackupResponse.decode.bind(updateBackupResponse), - updateBackupMetadata.decode.bind(updateBackupMetadata)), - deleteBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteBackupResponse.decode.bind(deleteBackupResponse), - deleteBackupMetadata.decode.bind(deleteBackupMetadata)), - restoreBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - restoreBackupResponse.decode.bind(restoreBackupResponse), - restoreBackupMetadata.decode.bind(restoreBackupMetadata)), - createBackupPlan: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createBackupPlanResponse.decode.bind(createBackupPlanResponse), - createBackupPlanMetadata.decode.bind(createBackupPlanMetadata)), - deleteBackupPlan: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteBackupPlanResponse.decode.bind(deleteBackupPlanResponse), - deleteBackupPlanMetadata.decode.bind(deleteBackupPlanMetadata)), - createBackupPlanAssociation: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createBackupPlanAssociationResponse.decode.bind(createBackupPlanAssociationResponse), - createBackupPlanAssociationMetadata.decode.bind(createBackupPlanAssociationMetadata)), - deleteBackupPlanAssociation: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteBackupPlanAssociationResponse.decode.bind(deleteBackupPlanAssociationResponse), - deleteBackupPlanAssociationMetadata.decode.bind(deleteBackupPlanAssociationMetadata)), - triggerBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - triggerBackupResponse.decode.bind(triggerBackupResponse), - triggerBackupMetadata.decode.bind(triggerBackupMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.backupdr.v1.BackupDR', 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.backupDRStub) { - return this.backupDRStub; - } - - // Put together the "service stub" for - // google.cloud.backupdr.v1.BackupDR. - this.backupDRStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.backupdr.v1.BackupDR') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.backupdr.v1.BackupDR, - 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 backupDRStubMethods = - ['listManagementServers', 'getManagementServer', 'createManagementServer', 'deleteManagementServer', 'createBackupVault', 'listBackupVaults', 'fetchUsableBackupVaults', 'getBackupVault', 'updateBackupVault', 'deleteBackupVault', 'testIamPermissions', 'listDataSources', 'getDataSource', 'updateDataSource', 'removeDataSource', 'setInternalStatus', 'initiateBackup', 'abandonBackup', 'finalizeBackup', 'fetchAccessToken', 'listBackups', 'getBackup', 'updateBackup', 'deleteBackup', 'restoreBackup', 'createBackupPlan', 'getBackupPlan', 'listBackupPlans', 'deleteBackupPlan', 'createBackupPlanAssociation', 'getBackupPlanAssociation', 'listBackupPlanAssociations', 'deleteBackupPlanAssociation', 'triggerBackup']; - for (const methodName of backupDRStubMethods) { - const callPromise = this.backupDRStub.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.backupDRStub; - } - - /** - * 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 'backupdr.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 'backupdr.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 -- - // ------------------- -/** - * Gets details of a single ManagementServer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the management server resource name, in the format - * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' - * @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.backupdr.v1.ManagementServer|ManagementServer}. - * 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/backup_d_r.get_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_GetManagementServer_async - */ - getManagementServer( - request?: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IGetManagementServerRequest|undefined, {}|undefined - ]>; - getManagementServer( - request: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, - {}|null|undefined>): void; - getManagementServer( - request: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, - {}|null|undefined>): void; - getManagementServer( - request?: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IGetManagementServerRequest|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.getManagementServer(request, options, callback); - } -/** - * Gets details of a BackupVault. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the backupvault store resource name, in the format - * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' - * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * Vault - * @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.backupdr.v1.BackupVault|BackupVault}. - * 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/backup_d_r.get_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_GetBackupVault_async - */ - getBackupVault( - request?: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|undefined, {}|undefined - ]>; - getBackupVault( - request: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, - {}|null|undefined>): void; - getBackupVault( - request: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, - {}|null|undefined>): void; - getBackupVault( - request?: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|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.getBackupVault(request, options, callback); - } -/** - * Returns the caller's permissions on a BackupVault resource. - * - * A caller is not required to have Google IAM permission to make this - * request. - * - * @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 - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @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.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. - * 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/backup_d_r.test_iam_permissions.js - * region_tag:backupdr_v1_generated_BackupDR_TestIamPermissions_async - */ - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - options?: CallOptions): - Promise<[ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|undefined, {}|undefined - ]>; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>): void; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>): void; - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|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({ - 'resource': request.resource ?? '', - }); - this.initialize(); - return this.innerApiCalls.testIamPermissions(request, options, callback); - } -/** - * Gets details of a DataSource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the data source resource name, in the format - * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' - * @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.backupdr.v1.DataSource|DataSource}. - * 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/backup_d_r.get_data_source.js - * region_tag:backupdr_v1_generated_BackupDR_GetDataSource_async - */ - getDataSource( - request?: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IDataSource, - protos.google.cloud.backupdr.v1.IGetDataSourceRequest|undefined, {}|undefined - ]>; - getDataSource( - request: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IDataSource, - protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, - {}|null|undefined>): void; - getDataSource( - request: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IDataSource, - protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, - {}|null|undefined>): void; - getDataSource( - request?: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IDataSource, - protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IDataSource, - protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IDataSource, - protos.google.cloud.backupdr.v1.IGetDataSourceRequest|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.getDataSource(request, options, callback); - } -/** - * Internal only. - * Initiates a backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.dataSource - * Required. The resource name of the instance, in the format - * 'projects/* /locations/* /backupVaults/* /dataSources/'. - * @param {string} [request.requestId] - * Optional. An optional 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 {string} request.backupId - * Required. Resource ID of the Backup resource. - * @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.backupdr.v1.InitiateBackupResponse|InitiateBackupResponse}. - * 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/backup_d_r.initiate_backup.js - * region_tag:backupdr_v1_generated_BackupDR_InitiateBackup_async - */ - initiateBackup( - request?: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IInitiateBackupResponse, - protos.google.cloud.backupdr.v1.IInitiateBackupRequest|undefined, {}|undefined - ]>; - initiateBackup( - request: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IInitiateBackupResponse, - protos.google.cloud.backupdr.v1.IInitiateBackupRequest|null|undefined, - {}|null|undefined>): void; - initiateBackup( - request: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IInitiateBackupResponse, - protos.google.cloud.backupdr.v1.IInitiateBackupRequest|null|undefined, - {}|null|undefined>): void; - initiateBackup( - request?: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IInitiateBackupResponse, - protos.google.cloud.backupdr.v1.IInitiateBackupRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IInitiateBackupResponse, - protos.google.cloud.backupdr.v1.IInitiateBackupRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IInitiateBackupResponse, - protos.google.cloud.backupdr.v1.IInitiateBackupRequest|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({ - 'data_source': request.dataSource ?? '', - }); - this.initialize(); - return this.innerApiCalls.initiateBackup(request, options, callback); - } -/** - * Internal only. - * Fetch access token for a given data source. - * - * @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/* /backupVaults/* /dataSources'. - * @param {number} request.generationId - * Required. The generation of the backup to update. - * @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.backupdr.v1.FetchAccessTokenResponse|FetchAccessTokenResponse}. - * 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/backup_d_r.fetch_access_token.js - * region_tag:backupdr_v1_generated_BackupDR_FetchAccessToken_async - */ - fetchAccessToken( - request?: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, - protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest|undefined, {}|undefined - ]>; - fetchAccessToken( - request: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, - protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest|null|undefined, - {}|null|undefined>): void; - fetchAccessToken( - request: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, - protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest|null|undefined, - {}|null|undefined>): void; - fetchAccessToken( - request?: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, - protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, - protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, - protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest|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.fetchAccessToken(request, options, callback); - } -/** - * Gets details of a Backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the data source resource name, in the format - * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' - * @param {google.cloud.backupdr.v1.BackupView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * resource. - * @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.backupdr.v1.Backup|Backup}. - * 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/backup_d_r.get_backup.js - * region_tag:backupdr_v1_generated_BackupDR_GetBackup_async - */ - getBackup( - request?: protos.google.cloud.backupdr.v1.IGetBackupRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IGetBackupRequest|undefined, {}|undefined - ]>; - getBackup( - request: protos.google.cloud.backupdr.v1.IGetBackupRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, - {}|null|undefined>): void; - getBackup( - request: protos.google.cloud.backupdr.v1.IGetBackupRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, - {}|null|undefined>): void; - getBackup( - request?: protos.google.cloud.backupdr.v1.IGetBackupRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IGetBackupRequest|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.getBackup(request, options, callback); - } -/** - * Gets details of a single BackupPlan. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the `BackupPlan` to retrieve. - * - * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - * @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.backupdr.v1.BackupPlan|BackupPlan}. - * 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/backup_d_r.get_backup_plan.js - * region_tag:backupdr_v1_generated_BackupDR_GetBackupPlan_async - */ - getBackupPlan( - request?: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlan, - protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|undefined, {}|undefined - ]>; - getBackupPlan( - request: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackupPlan, - protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, - {}|null|undefined>): void; - getBackupPlan( - request: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackupPlan, - protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, - {}|null|undefined>): void; - getBackupPlan( - request?: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IBackupPlan, - protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IBackupPlan, - protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlan, - protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|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.getBackupPlan(request, options, callback); - } -/** - * Gets details of a single BackupPlanAssociation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the backup plan association resource, in the format - * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. - * 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/backup_d_r.get_backup_plan_association.js - * region_tag:backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_async - */ - getBackupPlanAssociation( - request?: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlanAssociation, - protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|undefined, {}|undefined - ]>; - getBackupPlanAssociation( - request: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackupPlanAssociation, - protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, - {}|null|undefined>): void; - getBackupPlanAssociation( - request: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackupPlanAssociation, - protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, - {}|null|undefined>): void; - getBackupPlanAssociation( - request?: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IBackupPlanAssociation, - protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IBackupPlanAssociation, - protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlanAssociation, - protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|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.getBackupPlanAssociation(request, options, callback); - } - -/** - * Creates a new ManagementServer in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The management server project and location in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR - * locations map to Google Cloud regions, for example **us-central1**. - * @param {string} request.managementServerId - * Required. The name of the management server to create. The name must be - * unique for the specified project and location. - * @param {google.cloud.backupdr.v1.ManagementServer} request.managementServer - * Required. A [management server - * resource][google.cloud.backupdr.v1.ManagementServer] - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.create_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_CreateManagementServer_async - */ - createManagementServer( - request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createManagementServer( - request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createManagementServer( - request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createManagementServer( - request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, - 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.createManagementServer(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createManagementServer()`. - * @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/backup_d_r.create_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_CreateManagementServer_async - */ - async checkCreateManagementServerProgress(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.createManagementServer, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a single ManagementServer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the resource - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.delete_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteManagementServer_async - */ - deleteManagementServer( - request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteManagementServer( - request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteManagementServer( - request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteManagementServer( - request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, - 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.deleteManagementServer(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteManagementServer()`. - * @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/backup_d_r.delete_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteManagementServer_async - */ - async checkDeleteManagementServerProgress(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.deleteManagementServer, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a new BackupVault in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Value for parent. - * @param {string} request.backupVaultId - * Required. ID of the requesting object - * If auto-generating ID server-side, remove this field and - * backup_vault_id from the method_signature of Create RPC - * @param {google.cloud.backupdr.v1.BackupVault} request.backupVault - * Required. The resource being created - * @param {string} [request.requestId] - * Optional. An optional 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 request, but do not perform mutations. - * The default is 'false'. - * @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/backup_d_r.create_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_CreateBackupVault_async - */ - createBackupVault( - request?: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createBackupVault( - request: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupVault( - request: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupVault( - request?: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, - 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.createBackupVault(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createBackupVault()`. - * @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/backup_d_r.create_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_CreateBackupVault_async - */ - async checkCreateBackupVaultProgress(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.createBackupVault, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the settings of a BackupVault. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * BackupVault 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 the request will fail. - * @param {google.cloud.backupdr.v1.BackupVault} request.backupVault - * Required. The resource being updated - * @param {string} [request.requestId] - * Optional. An optional 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 request, but do not perform mutations. - * The default is 'false'. - * @param {boolean} [request.force] - * Optional. If set to true, will not check plan duration against backup vault - * enforcement duration. - * @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/backup_d_r.update_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_UpdateBackupVault_async - */ - updateBackupVault( - request?: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateBackupVault( - request: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateBackupVault( - request: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateBackupVault( - request?: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, - 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({ - 'backup_vault.name': request.backupVault!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateBackupVault(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateBackupVault()`. - * @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/backup_d_r.update_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_UpdateBackupVault_async - */ - async checkUpdateBackupVaultProgress(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.updateBackupVault, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a BackupVault. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the resource. - * @param {string} [request.requestId] - * Optional. An optional 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 data source from this backup vault will also - * be deleted. - * @param {string} request.etag - * The current etag of the backup vault. - * If an etag is provided and does not match the current etag of the - * connection, deletion will be blocked. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is 'false'. - * @param {boolean} [request.allowMissing] - * Optional. If true and the BackupVault is not found, the request will - * succeed but no action will be taken. - * @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/backup_d_r.delete_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupVault_async - */ - deleteBackupVault( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteBackupVault( - request: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupVault( - request: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupVault( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, - 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.deleteBackupVault(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteBackupVault()`. - * @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/backup_d_r.delete_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupVault_async - */ - async checkDeleteBackupVaultProgress(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.deleteBackupVault, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the settings of a DataSource. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * DataSource 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 the request will fail. - * @param {google.cloud.backupdr.v1.DataSource} request.dataSource - * Required. The resource being updated - * @param {string} [request.requestId] - * Optional. An optional 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.allowMissing] - * Optional. Enable upsert. - * @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/backup_d_r.update_data_source.js - * region_tag:backupdr_v1_generated_BackupDR_UpdateDataSource_async - */ - updateDataSource( - request?: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateDataSource( - request: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateDataSource( - request: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateDataSource( - request?: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, - 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({ - 'data_source.name': request.dataSource!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateDataSource(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateDataSource()`. - * @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/backup_d_r.update_data_source.js - * region_tag:backupdr_v1_generated_BackupDR_UpdateDataSource_async - */ - async checkUpdateDataSourceProgress(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.updateDataSource, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a DataSource. This is a custom method instead of a standard delete - * method because external clients will not delete DataSources except for - * BackupDR backup appliances. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the resource. - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.remove_data_source.js - * region_tag:backupdr_v1_generated_BackupDR_RemoveDataSource_async - */ - removeDataSource( - request?: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - removeDataSource( - request: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - removeDataSource( - request: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - removeDataSource( - request?: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, - 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.removeDataSource(request, options, callback); - } -/** - * Check the status of the long running operation returned by `removeDataSource()`. - * @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/backup_d_r.remove_data_source.js - * region_tag:backupdr_v1_generated_BackupDR_RemoveDataSource_async - */ - async checkRemoveDataSourceProgress(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.removeDataSource, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Sets the internal status of a DataSource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.dataSource - * Required. The resource name of the instance, in the format - * 'projects/* /locations/* /backupVaults/* /dataSources/'. - * @param {Buffer} request.value - * Required. The value required for this method to work. This field must be - * the 32-byte SHA256 hash of the DataSourceID. The DataSourceID used here is - * only the final piece of the fully qualified resource path for this - * DataSource (i.e. the part after '.../dataSources/'). This field exists to - * make this method difficult to call since it is intended for use only by - * Backup Appliances. - * @param {google.cloud.backupdr.v1.BackupConfigState} request.backupConfigState - * Required. Output only. The new BackupConfigState to set for the DataSource. - * @param {string} [request.requestId] - * Optional. An optional 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. 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/backup_d_r.set_internal_status.js - * region_tag:backupdr_v1_generated_BackupDR_SetInternalStatus_async - */ - setInternalStatus( - request?: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - setInternalStatus( - request: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - setInternalStatus( - request: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - setInternalStatus( - request?: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, - 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({ - 'data_source': request.dataSource ?? '', - }); - this.initialize(); - return this.innerApiCalls.setInternalStatus(request, options, callback); - } -/** - * Check the status of the long running operation returned by `setInternalStatus()`. - * @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/backup_d_r.set_internal_status.js - * region_tag:backupdr_v1_generated_BackupDR_SetInternalStatus_async - */ - async checkSetInternalStatusProgress(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.setInternalStatus, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Internal only. - * Abandons a backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.dataSource - * Required. The resource name of the instance, in the format - * 'projects/* /locations/* /backupVaults/* /dataSources/'. - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.abandon_backup.js - * region_tag:backupdr_v1_generated_BackupDR_AbandonBackup_async - */ - abandonBackup( - request?: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - abandonBackup( - request: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - abandonBackup( - request: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - abandonBackup( - request?: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, - 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({ - 'data_source': request.dataSource ?? '', - }); - this.initialize(); - return this.innerApiCalls.abandonBackup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `abandonBackup()`. - * @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/backup_d_r.abandon_backup.js - * region_tag:backupdr_v1_generated_BackupDR_AbandonBackup_async - */ - async checkAbandonBackupProgress(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.abandonBackup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Internal only. - * Finalize a backup that was started by a call to InitiateBackup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.dataSource - * Required. The resource name of the instance, in the format - * 'projects/* /locations/* /backupVaults/* /dataSources/'. - * @param {string} request.description - * This will be assigned to the description field of the newly created Backup. - * @param {google.protobuf.Timestamp} request.consistencyTime - * The point in time when this backup was captured from the source. This will - * be assigned to the consistency_time field of the newly created Backup. - * @param {string} [request.requestId] - * Optional. An optional 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 {string} request.backupId - * Required. Resource ID of the Backup resource to be finalized. This must be - * the same backup_id that was used in the InitiateBackupRequest. - * @param {google.protobuf.Timestamp} request.recoveryRangeStartTime - * The earliest timestamp of data available in this Backup. This will set on - * the newly created Backup. - * @param {google.protobuf.Timestamp} request.recoveryRangeEndTime - * The latest timestamp of data available in this Backup. This will be set on - * the newly created Backup. - * @param {google.protobuf.Duration} request.retentionDuration - * The ExpireTime on the backup will be set to FinalizeTime plus this - * duration. If the resulting ExpireTime is less than - * EnforcedRetentionEndTime, then ExpireTime is set to - * EnforcedRetentionEndTime. - * @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/backup_d_r.finalize_backup.js - * region_tag:backupdr_v1_generated_BackupDR_FinalizeBackup_async - */ - finalizeBackup( - request?: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - finalizeBackup( - request: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - finalizeBackup( - request: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - finalizeBackup( - request?: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, - 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({ - 'data_source': request.dataSource ?? '', - }); - this.initialize(); - return this.innerApiCalls.finalizeBackup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `finalizeBackup()`. - * @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/backup_d_r.finalize_backup.js - * region_tag:backupdr_v1_generated_BackupDR_FinalizeBackup_async - */ - async checkFinalizeBackupProgress(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.finalizeBackup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the settings of a Backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * Backup 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 the request will fail. - * @param {google.cloud.backupdr.v1.Backup} request.backup - * Required. The resource being updated - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.update_backup.js - * region_tag:backupdr_v1_generated_BackupDR_UpdateBackup_async - */ - updateBackup( - request?: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateBackup( - request: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateBackup( - request: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateBackup( - request?: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, - 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({ - 'backup.name': request.backup!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateBackup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateBackup()`. - * @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/backup_d_r.update_backup.js - * region_tag:backupdr_v1_generated_BackupDR_UpdateBackup_async - */ - async checkUpdateBackupProgress(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.updateBackup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a Backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the resource. - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.delete_backup.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackup_async - */ - deleteBackup( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteBackup( - request: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackup( - request: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackup( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, - 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.deleteBackup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteBackup()`. - * @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/backup_d_r.delete_backup.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackup_async - */ - async checkDeleteBackupProgress(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.deleteBackup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Restore from a Backup - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the Backup instance, in the format - * 'projects/* /locations/* /backupVaults/* /dataSources/* /backups/'. - * @param {string} [request.requestId] - * Optional. An optional 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 {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} request.computeInstanceTargetEnvironment - * Compute Engine target environment to be used during restore. - * @param {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} request.computeInstanceRestoreProperties - * Compute Engine instance properties to be overridden during restore. - * @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/backup_d_r.restore_backup.js - * region_tag:backupdr_v1_generated_BackupDR_RestoreBackup_async - */ - restoreBackup( - request?: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - restoreBackup( - request: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - restoreBackup( - request: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - restoreBackup( - request?: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, - 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.restoreBackup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `restoreBackup()`. - * @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/backup_d_r.restore_backup.js - * region_tag:backupdr_v1_generated_BackupDR_RestoreBackup_async - */ - async checkRestoreBackupProgress(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.restoreBackup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Create a BackupPlan - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The `BackupPlan` project and location in the format - * `projects/{project}/locations/{location}`. In Cloud BackupDR locations - * map to GCP regions, for example **us-central1**. - * @param {string} request.backupPlanId - * Required. The name of the `BackupPlan` to create. The name must be unique - * for the specified project and location.The name must start with a lowercase - * letter followed by up to 62 lowercase letters, numbers, or hyphens. - * Pattern, /{@link protos.a-z0-9-|a-z}{,62}/. - * @param {google.cloud.backupdr.v1.BackupPlan} request.backupPlan - * Required. The `BackupPlan` resource object to create. - * @param {string} [request.requestId] - * Optional. An optional 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 t - * he 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/backup_d_r.create_backup_plan.js - * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlan_async - */ - createBackupPlan( - request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createBackupPlan( - request: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupPlan( - request: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupPlan( - request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, - 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.createBackupPlan(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createBackupPlan()`. - * @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/backup_d_r.create_backup_plan.js - * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlan_async - */ - async checkCreateBackupPlanProgress(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.createBackupPlan, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a single BackupPlan. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the `BackupPlan` to delete. - * - * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.delete_backup_plan.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlan_async - */ - deleteBackupPlan( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteBackupPlan( - request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupPlan( - request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupPlan( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, - 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.deleteBackupPlan(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteBackupPlan()`. - * @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/backup_d_r.delete_backup_plan.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlan_async - */ - async checkDeleteBackupPlanProgress(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.deleteBackupPlan, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Create a BackupPlanAssociation - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The backup plan association project and location in the format - * `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations - * map to GCP regions, for example **us-central1**. - * @param {string} request.backupPlanAssociationId - * Required. The name of the backup plan association to create. The name must - * be unique for the specified project and location. - * @param {google.cloud.backupdr.v1.BackupPlanAssociation} request.backupPlanAssociation - * Required. The resource being created - * @param {string} [request.requestId] - * Optional. An optional 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 t - * he 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/backup_d_r.create_backup_plan_association.js - * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async - */ - createBackupPlanAssociation( - request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createBackupPlanAssociation( - request: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupPlanAssociation( - request: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupPlanAssociation( - request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, - 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.createBackupPlanAssociation(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createBackupPlanAssociation()`. - * @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/backup_d_r.create_backup_plan_association.js - * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async - */ - async checkCreateBackupPlanAssociationProgress(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.createBackupPlanAssociation, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a single BackupPlanAssociation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the backup plan association resource, in the format - * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.delete_backup_plan_association.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async - */ - deleteBackupPlanAssociation( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteBackupPlanAssociation( - request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupPlanAssociation( - request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupPlanAssociation( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, - 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.deleteBackupPlanAssociation(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteBackupPlanAssociation()`. - * @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/backup_d_r.delete_backup_plan_association.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async - */ - async checkDeleteBackupPlanAssociationProgress(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.deleteBackupPlanAssociation, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Triggers a new Backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the backup plan association resource, in the format - * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - * @param {string} request.ruleId - * Required. backup rule_id for which a backup needs to be triggered. - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.trigger_backup.js - * region_tag:backupdr_v1_generated_BackupDR_TriggerBackup_async - */ - triggerBackup( - request?: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - triggerBackup( - request: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - triggerBackup( - request: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - triggerBackup( - request?: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, - 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.triggerBackup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `triggerBackup()`. - * @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/backup_d_r.trigger_backup.js - * region_tag:backupdr_v1_generated_BackupDR_TriggerBackup_async - */ - async checkTriggerBackupProgress(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.triggerBackup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists ManagementServers in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve management servers - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud BackupDR, locations map to Google Cloud regions, for example - * **us-central1**. To retrieve management servers for all locations, use "-" - * for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.ManagementServer|ManagementServer}. - * 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 `listManagementServersAsync()` - * 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. - */ - listManagementServers( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IManagementServer[], - protos.google.cloud.backupdr.v1.IListManagementServersRequest|null, - protos.google.cloud.backupdr.v1.IListManagementServersResponse - ]>; - listManagementServers( - request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, - protos.google.cloud.backupdr.v1.IManagementServer>): void; - listManagementServers( - request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, - protos.google.cloud.backupdr.v1.IManagementServer>): void; - listManagementServers( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, - protos.google.cloud.backupdr.v1.IManagementServer>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, - protos.google.cloud.backupdr.v1.IManagementServer>): - Promise<[ - protos.google.cloud.backupdr.v1.IManagementServer[], - protos.google.cloud.backupdr.v1.IListManagementServersRequest|null, - protos.google.cloud.backupdr.v1.IListManagementServersResponse - ]>|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.listManagementServers(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 project and location for which to retrieve management servers - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud BackupDR, locations map to Google Cloud regions, for example - * **us-central1**. To retrieve management servers for all locations, use "-" - * for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.ManagementServer|ManagementServer} 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 `listManagementServersAsync()` - * 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. - */ - listManagementServersStream( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, - 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['listManagementServers']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listManagementServers.createStream( - this.innerApiCalls.listManagementServers as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listManagementServers`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve management servers - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud BackupDR, locations map to Google Cloud regions, for example - * **us-central1**. To retrieve management servers for all locations, use "-" - * for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.ManagementServer|ManagementServer}. 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/backup_d_r.list_management_servers.js - * region_tag:backupdr_v1_generated_BackupDR_ListManagementServers_async - */ - listManagementServersAsync( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, - 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['listManagementServers']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listManagementServers.asyncIterate( - this.innerApiCalls['listManagementServers'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists BackupVaults in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * Vault. - * @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.backupdr.v1.BackupVault|BackupVault}. - * 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 `listBackupVaultsAsync()` - * 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. - */ - listBackupVaults( - request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupVault[], - protos.google.cloud.backupdr.v1.IListBackupVaultsRequest|null, - protos.google.cloud.backupdr.v1.IListBackupVaultsResponse - ]>; - listBackupVaults( - request: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>): void; - listBackupVaults( - request: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>): void; - listBackupVaults( - request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupVault[], - protos.google.cloud.backupdr.v1.IListBackupVaultsRequest|null, - protos.google.cloud.backupdr.v1.IListBackupVaultsResponse - ]>|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.listBackupVaults(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 project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * Vault. - * @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.backupdr.v1.BackupVault|BackupVault} 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 `listBackupVaultsAsync()` - * 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. - */ - listBackupVaultsStream( - request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - 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['listBackupVaults']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackupVaults.createStream( - this.innerApiCalls.listBackupVaults as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listBackupVaults`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * Vault. - * @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.backupdr.v1.BackupVault|BackupVault}. 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/backup_d_r.list_backup_vaults.js - * region_tag:backupdr_v1_generated_BackupDR_ListBackupVaults_async - */ - listBackupVaultsAsync( - request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - 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['listBackupVaults']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackupVaults.asyncIterate( - this.innerApiCalls['listBackupVaults'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * FetchUsableBackupVaults lists usable BackupVaults in a given project and - * location. Usable BackupVault are the ones that user has - * backupdr.backupVaults.get permission. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.BackupVault|BackupVault}. - * 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 `fetchUsableBackupVaultsAsync()` - * 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. - */ - fetchUsableBackupVaults( - request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupVault[], - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest|null, - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse - ]>; - fetchUsableBackupVaults( - request: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>): void; - fetchUsableBackupVaults( - request: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>): void; - fetchUsableBackupVaults( - request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupVault[], - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest|null, - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse - ]>|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.fetchUsableBackupVaults(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 project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.BackupVault|BackupVault} 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 `fetchUsableBackupVaultsAsync()` - * 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. - */ - fetchUsableBackupVaultsStream( - request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - 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['fetchUsableBackupVaults']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.fetchUsableBackupVaults.createStream( - this.innerApiCalls.fetchUsableBackupVaults as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `fetchUsableBackupVaults`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.BackupVault|BackupVault}. 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/backup_d_r.fetch_usable_backup_vaults.js - * region_tag:backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_async - */ - fetchUsableBackupVaultsAsync( - request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - 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['fetchUsableBackupVaults']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.fetchUsableBackupVaults.asyncIterate( - this.innerApiCalls['fetchUsableBackupVaults'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists DataSources in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve data - * sources information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.DataSource|DataSource}. - * 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 `listDataSourcesAsync()` - * 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. - */ - listDataSources( - request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IDataSource[], - protos.google.cloud.backupdr.v1.IListDataSourcesRequest|null, - protos.google.cloud.backupdr.v1.IListDataSourcesResponse - ]>; - listDataSources( - request: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, - protos.google.cloud.backupdr.v1.IDataSource>): void; - listDataSources( - request: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, - protos.google.cloud.backupdr.v1.IDataSource>): void; - listDataSources( - request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, - protos.google.cloud.backupdr.v1.IDataSource>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, - protos.google.cloud.backupdr.v1.IDataSource>): - Promise<[ - protos.google.cloud.backupdr.v1.IDataSource[], - protos.google.cloud.backupdr.v1.IListDataSourcesRequest|null, - protos.google.cloud.backupdr.v1.IListDataSourcesResponse - ]>|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.listDataSources(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 project and location for which to retrieve data - * sources information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.DataSource|DataSource} 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 `listDataSourcesAsync()` - * 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. - */ - listDataSourcesStream( - request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - 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['listDataSources']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDataSources.createStream( - this.innerApiCalls.listDataSources as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listDataSources`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve data - * sources information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.DataSource|DataSource}. 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/backup_d_r.list_data_sources.js - * region_tag:backupdr_v1_generated_BackupDR_ListDataSources_async - */ - listDataSourcesAsync( - request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - 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['listDataSources']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDataSources.asyncIterate( - this.innerApiCalls['listDataSources'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists Backups in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backup - * information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @param {google.cloud.backupdr.v1.BackupView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * resource. - * @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.backupdr.v1.Backup|Backup}. - * 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 `listBackupsAsync()` - * 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. - */ - listBackups( - request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackup[], - protos.google.cloud.backupdr.v1.IListBackupsRequest|null, - protos.google.cloud.backupdr.v1.IListBackupsResponse - ]>; - listBackups( - request: protos.google.cloud.backupdr.v1.IListBackupsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupsRequest, - protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackup>): void; - listBackups( - request: protos.google.cloud.backupdr.v1.IListBackupsRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupsRequest, - protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackup>): void; - listBackups( - request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupsRequest, - protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackup>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupsRequest, - protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackup>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackup[], - protos.google.cloud.backupdr.v1.IListBackupsRequest|null, - protos.google.cloud.backupdr.v1.IListBackupsResponse - ]>|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.listBackups(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 project and location for which to retrieve backup - * information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @param {google.cloud.backupdr.v1.BackupView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * resource. - * @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.backupdr.v1.Backup|Backup} 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 `listBackupsAsync()` - * 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. - */ - listBackupsStream( - request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, - 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['listBackups']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackups.createStream( - this.innerApiCalls.listBackups as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listBackups`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backup - * information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @param {google.cloud.backupdr.v1.BackupView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * resource. - * @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.backupdr.v1.Backup|Backup}. 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/backup_d_r.list_backups.js - * region_tag:backupdr_v1_generated_BackupDR_ListBackups_async - */ - listBackupsAsync( - request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, - 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['listBackups']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackups.asyncIterate( - this.innerApiCalls['listBackups'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists BackupPlans in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve `BackupPlans` - * information. Format: `projects/{project}/locations/{location}`. In Cloud - * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To - * retrieve backup plans for all locations, use "-" for the - * `{location}` value. - * @param {number} [request.pageSize] - * Optional. The maximum number of `BackupPlans` to return in a single - * response. If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} - * to determine if there are more instances left to be queried. - * @param {string} [request.pageToken] - * Optional. The value of - * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} - * received from a previous `ListBackupPlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackupPlans` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Field match expression used to filter the results. - * @param {string} [request.orderBy] - * Optional. Field by which to sort the results. - * @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.backupdr.v1.BackupPlan|BackupPlan}. - * 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 `listBackupPlansAsync()` - * 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. - */ - listBackupPlans( - request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlan[], - protos.google.cloud.backupdr.v1.IListBackupPlansRequest|null, - protos.google.cloud.backupdr.v1.IListBackupPlansResponse - ]>; - listBackupPlans( - request: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlan>): void; - listBackupPlans( - request: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlan>): void; - listBackupPlans( - request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlan>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlan>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlan[], - protos.google.cloud.backupdr.v1.IListBackupPlansRequest|null, - protos.google.cloud.backupdr.v1.IListBackupPlansResponse - ]>|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.listBackupPlans(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 project and location for which to retrieve `BackupPlans` - * information. Format: `projects/{project}/locations/{location}`. In Cloud - * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To - * retrieve backup plans for all locations, use "-" for the - * `{location}` value. - * @param {number} [request.pageSize] - * Optional. The maximum number of `BackupPlans` to return in a single - * response. If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} - * to determine if there are more instances left to be queried. - * @param {string} [request.pageToken] - * Optional. The value of - * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} - * received from a previous `ListBackupPlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackupPlans` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Field match expression used to filter the results. - * @param {string} [request.orderBy] - * Optional. Field by which to sort the results. - * @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.backupdr.v1.BackupPlan|BackupPlan} 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 `listBackupPlansAsync()` - * 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. - */ - listBackupPlansStream( - request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - 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['listBackupPlans']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackupPlans.createStream( - this.innerApiCalls.listBackupPlans as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listBackupPlans`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve `BackupPlans` - * information. Format: `projects/{project}/locations/{location}`. In Cloud - * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To - * retrieve backup plans for all locations, use "-" for the - * `{location}` value. - * @param {number} [request.pageSize] - * Optional. The maximum number of `BackupPlans` to return in a single - * response. If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} - * to determine if there are more instances left to be queried. - * @param {string} [request.pageToken] - * Optional. The value of - * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} - * received from a previous `ListBackupPlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackupPlans` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Field match expression used to filter the results. - * @param {string} [request.orderBy] - * Optional. Field by which to sort the results. - * @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.backupdr.v1.BackupPlan|BackupPlan}. 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/backup_d_r.list_backup_plans.js - * region_tag:backupdr_v1_generated_BackupDR_ListBackupPlans_async - */ - listBackupPlansAsync( - request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - 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['listBackupPlans']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackupPlans.asyncIterate( - this.innerApiCalls['listBackupPlans'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists BackupPlanAssociations in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backup Plan - * Associations information, in the format - * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations - * map to GCP regions, for example **us-central1**. To retrieve backup plan - * associations for all locations, use "-" for the - * `{location}` value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results - * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. - * 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 `listBackupPlanAssociationsAsync()` - * 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. - */ - listBackupPlanAssociations( - request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlanAssociation[], - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest|null, - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse - ]>; - listBackupPlanAssociations( - request: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): void; - listBackupPlanAssociations( - request: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): void; - listBackupPlanAssociations( - request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlanAssociation>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlanAssociation[], - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest|null, - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse - ]>|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.listBackupPlanAssociations(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 project and location for which to retrieve backup Plan - * Associations information, in the format - * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations - * map to GCP regions, for example **us-central1**. To retrieve backup plan - * associations for all locations, use "-" for the - * `{location}` value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results - * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation} 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 `listBackupPlanAssociationsAsync()` - * 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. - */ - listBackupPlanAssociationsStream( - request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - 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['listBackupPlanAssociations']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackupPlanAssociations.createStream( - this.innerApiCalls.listBackupPlanAssociations as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listBackupPlanAssociations`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backup Plan - * Associations information, in the format - * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations - * map to GCP regions, for example **us-central1**. To retrieve backup plan - * associations for all locations, use "-" for the - * `{location}` value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results - * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. 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/backup_d_r.list_backup_plan_associations.js - * region_tag:backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_async - */ - listBackupPlanAssociationsAsync( - request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - 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['listBackupPlanAssociations']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackupPlanAssociations.asyncIterate( - this.innerApiCalls['listBackupPlanAssociations'] 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 backup resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} backupvault - * @param {string} datasource - * @param {string} backup - * @returns {string} Resource name string. - */ - backupPath(project:string,location:string,backupvault:string,datasource:string,backup:string) { - return this.pathTemplates.backupPathTemplate.render({ - project: project, - location: location, - backupvault: backupvault, - datasource: datasource, - backup: backup, - }); - } - - /** - * Parse the project from Backup resource. - * - * @param {string} backupName - * A fully-qualified path representing Backup resource. - * @returns {string} A string representing the project. - */ - matchProjectFromBackupName(backupName: string) { - return this.pathTemplates.backupPathTemplate.match(backupName).project; - } - - /** - * Parse the location from Backup resource. - * - * @param {string} backupName - * A fully-qualified path representing Backup resource. - * @returns {string} A string representing the location. - */ - matchLocationFromBackupName(backupName: string) { - return this.pathTemplates.backupPathTemplate.match(backupName).location; - } - - /** - * Parse the backupvault from Backup resource. - * - * @param {string} backupName - * A fully-qualified path representing Backup resource. - * @returns {string} A string representing the backupvault. - */ - matchBackupvaultFromBackupName(backupName: string) { - return this.pathTemplates.backupPathTemplate.match(backupName).backupvault; - } - - /** - * Parse the datasource from Backup resource. - * - * @param {string} backupName - * A fully-qualified path representing Backup resource. - * @returns {string} A string representing the datasource. - */ - matchDatasourceFromBackupName(backupName: string) { - return this.pathTemplates.backupPathTemplate.match(backupName).datasource; - } - - /** - * Parse the backup from Backup resource. - * - * @param {string} backupName - * A fully-qualified path representing Backup resource. - * @returns {string} A string representing the backup. - */ - matchBackupFromBackupName(backupName: string) { - return this.pathTemplates.backupPathTemplate.match(backupName).backup; - } - - /** - * Return a fully-qualified backupPlan resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} backup_plan - * @returns {string} Resource name string. - */ - backupPlanPath(project:string,location:string,backupPlan:string) { - return this.pathTemplates.backupPlanPathTemplate.render({ - project: project, - location: location, - backup_plan: backupPlan, - }); - } - - /** - * Parse the project from BackupPlan resource. - * - * @param {string} backupPlanName - * A fully-qualified path representing BackupPlan resource. - * @returns {string} A string representing the project. - */ - matchProjectFromBackupPlanName(backupPlanName: string) { - return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName).project; - } - - /** - * Parse the location from BackupPlan resource. - * - * @param {string} backupPlanName - * A fully-qualified path representing BackupPlan resource. - * @returns {string} A string representing the location. - */ - matchLocationFromBackupPlanName(backupPlanName: string) { - return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName).location; - } - - /** - * Parse the backup_plan from BackupPlan resource. - * - * @param {string} backupPlanName - * A fully-qualified path representing BackupPlan resource. - * @returns {string} A string representing the backup_plan. - */ - matchBackupPlanFromBackupPlanName(backupPlanName: string) { - return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName).backup_plan; - } - - /** - * Return a fully-qualified backupPlanAssociation resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} backup_plan_association - * @returns {string} Resource name string. - */ - backupPlanAssociationPath(project:string,location:string,backupPlanAssociation:string) { - return this.pathTemplates.backupPlanAssociationPathTemplate.render({ - project: project, - location: location, - backup_plan_association: backupPlanAssociation, - }); - } - - /** - * Parse the project from BackupPlanAssociation resource. - * - * @param {string} backupPlanAssociationName - * A fully-qualified path representing BackupPlanAssociation resource. - * @returns {string} A string representing the project. - */ - matchProjectFromBackupPlanAssociationName(backupPlanAssociationName: string) { - return this.pathTemplates.backupPlanAssociationPathTemplate.match(backupPlanAssociationName).project; - } - - /** - * Parse the location from BackupPlanAssociation resource. - * - * @param {string} backupPlanAssociationName - * A fully-qualified path representing BackupPlanAssociation resource. - * @returns {string} A string representing the location. - */ - matchLocationFromBackupPlanAssociationName(backupPlanAssociationName: string) { - return this.pathTemplates.backupPlanAssociationPathTemplate.match(backupPlanAssociationName).location; - } - - /** - * Parse the backup_plan_association from BackupPlanAssociation resource. - * - * @param {string} backupPlanAssociationName - * A fully-qualified path representing BackupPlanAssociation resource. - * @returns {string} A string representing the backup_plan_association. - */ - matchBackupPlanAssociationFromBackupPlanAssociationName(backupPlanAssociationName: string) { - return this.pathTemplates.backupPlanAssociationPathTemplate.match(backupPlanAssociationName).backup_plan_association; - } - - /** - * Return a fully-qualified backupVault resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} backupvault - * @returns {string} Resource name string. - */ - backupVaultPath(project:string,location:string,backupvault:string) { - return this.pathTemplates.backupVaultPathTemplate.render({ - project: project, - location: location, - backupvault: backupvault, - }); - } - - /** - * Parse the project from BackupVault resource. - * - * @param {string} backupVaultName - * A fully-qualified path representing BackupVault resource. - * @returns {string} A string representing the project. - */ - matchProjectFromBackupVaultName(backupVaultName: string) { - return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName).project; - } - - /** - * Parse the location from BackupVault resource. - * - * @param {string} backupVaultName - * A fully-qualified path representing BackupVault resource. - * @returns {string} A string representing the location. - */ - matchLocationFromBackupVaultName(backupVaultName: string) { - return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName).location; - } - - /** - * Parse the backupvault from BackupVault resource. - * - * @param {string} backupVaultName - * A fully-qualified path representing BackupVault resource. - * @returns {string} A string representing the backupvault. - */ - matchBackupvaultFromBackupVaultName(backupVaultName: string) { - return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName).backupvault; - } - - /** - * Return a fully-qualified dataSource resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} backupvault - * @param {string} datasource - * @returns {string} Resource name string. - */ - dataSourcePath(project:string,location:string,backupvault:string,datasource:string) { - return this.pathTemplates.dataSourcePathTemplate.render({ - project: project, - location: location, - backupvault: backupvault, - datasource: datasource, - }); - } - - /** - * Parse the project from DataSource resource. - * - * @param {string} dataSourceName - * A fully-qualified path representing DataSource resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataSourceName(dataSourceName: string) { - return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).project; - } - - /** - * Parse the location from DataSource resource. - * - * @param {string} dataSourceName - * A fully-qualified path representing DataSource resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataSourceName(dataSourceName: string) { - return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).location; - } - - /** - * Parse the backupvault from DataSource resource. - * - * @param {string} dataSourceName - * A fully-qualified path representing DataSource resource. - * @returns {string} A string representing the backupvault. - */ - matchBackupvaultFromDataSourceName(dataSourceName: string) { - return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).backupvault; - } - - /** - * Parse the datasource from DataSource resource. - * - * @param {string} dataSourceName - * A fully-qualified path representing DataSource resource. - * @returns {string} A string representing the datasource. - */ - matchDatasourceFromDataSourceName(dataSourceName: string) { - return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).datasource; - } - - /** - * 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 managementServer resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} managementserver - * @returns {string} Resource name string. - */ - managementServerPath(project:string,location:string,managementserver:string) { - return this.pathTemplates.managementServerPathTemplate.render({ - project: project, - location: location, - managementserver: managementserver, - }); - } - - /** - * Parse the project from ManagementServer resource. - * - * @param {string} managementServerName - * A fully-qualified path representing ManagementServer resource. - * @returns {string} A string representing the project. - */ - matchProjectFromManagementServerName(managementServerName: string) { - return this.pathTemplates.managementServerPathTemplate.match(managementServerName).project; - } - - /** - * Parse the location from ManagementServer resource. - * - * @param {string} managementServerName - * A fully-qualified path representing ManagementServer resource. - * @returns {string} A string representing the location. - */ - matchLocationFromManagementServerName(managementServerName: string) { - return this.pathTemplates.managementServerPathTemplate.match(managementServerName).location; - } - - /** - * Parse the managementserver from ManagementServer resource. - * - * @param {string} managementServerName - * A fully-qualified path representing ManagementServer resource. - * @returns {string} A string representing the managementserver. - */ - matchManagementserverFromManagementServerName(managementServerName: string) { - return this.pathTemplates.managementServerPathTemplate.match(managementServerName).managementserver; - } - - /** - * 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; - } - - /** - * 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.backupDRStub && !this._terminated) { - return this.backupDRStub.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-backupdr/v1/src/v1/backup_d_r_client_config.json b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client_config.json deleted file mode 100644 index 8b29881f031..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client_config.json +++ /dev/null @@ -1,191 +0,0 @@ -{ - "interfaces": { - "google.cloud.backupdr.v1.BackupDR": { - "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": { - "ListManagementServers": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetManagementServer": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateManagementServer": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteManagementServer": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateBackupVault": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListBackupVaults": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "FetchUsableBackupVaults": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetBackupVault": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "UpdateBackupVault": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteBackupVault": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "TestIamPermissions": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListDataSources": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetDataSource": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "UpdateDataSource": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RemoveDataSource": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetInternalStatus": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "InitiateBackup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "AbandonBackup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "FinalizeBackup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "FetchAccessToken": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListBackups": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetBackup": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "UpdateBackup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteBackup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RestoreBackup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateBackupPlan": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetBackupPlan": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListBackupPlans": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteBackupPlan": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateBackupPlanAssociation": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetBackupPlanAssociation": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListBackupPlanAssociations": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteBackupPlanAssociation": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "TriggerBackup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json deleted file mode 100644 index 79496ec85e7..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - "../../protos/google/cloud/backupdr/v1/backupdr.proto", - "../../protos/google/cloud/backupdr/v1/backupplan.proto", - "../../protos/google/cloud/backupdr/v1/backupplanassociation.proto", - "../../protos/google/cloud/backupdr/v1/backupvault.proto", - "../../protos/google/cloud/backupdr/v1/backupvault_ba.proto", - "../../protos/google/cloud/backupdr/v1/backupvault_gce.proto" -] diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json deleted file mode 100644 index 0407284a357..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json +++ /dev/null @@ -1,391 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.backupdr.v1", - "libraryPackage": "@google-cloud/backupdr", - "services": { - "BackupDR": { - "clients": { - "grpc": { - "libraryClient": "BackupDRClient", - "rpcs": { - "GetManagementServer": { - "methods": [ - "getManagementServer" - ] - }, - "GetBackupVault": { - "methods": [ - "getBackupVault" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "GetDataSource": { - "methods": [ - "getDataSource" - ] - }, - "InitiateBackup": { - "methods": [ - "initiateBackup" - ] - }, - "FetchAccessToken": { - "methods": [ - "fetchAccessToken" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetBackupPlan": { - "methods": [ - "getBackupPlan" - ] - }, - "GetBackupPlanAssociation": { - "methods": [ - "getBackupPlanAssociation" - ] - }, - "CreateManagementServer": { - "methods": [ - "createManagementServer" - ] - }, - "DeleteManagementServer": { - "methods": [ - "deleteManagementServer" - ] - }, - "CreateBackupVault": { - "methods": [ - "createBackupVault" - ] - }, - "UpdateBackupVault": { - "methods": [ - "updateBackupVault" - ] - }, - "DeleteBackupVault": { - "methods": [ - "deleteBackupVault" - ] - }, - "UpdateDataSource": { - "methods": [ - "updateDataSource" - ] - }, - "RemoveDataSource": { - "methods": [ - "removeDataSource" - ] - }, - "SetInternalStatus": { - "methods": [ - "setInternalStatus" - ] - }, - "AbandonBackup": { - "methods": [ - "abandonBackup" - ] - }, - "FinalizeBackup": { - "methods": [ - "finalizeBackup" - ] - }, - "UpdateBackup": { - "methods": [ - "updateBackup" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "RestoreBackup": { - "methods": [ - "restoreBackup" - ] - }, - "CreateBackupPlan": { - "methods": [ - "createBackupPlan" - ] - }, - "DeleteBackupPlan": { - "methods": [ - "deleteBackupPlan" - ] - }, - "CreateBackupPlanAssociation": { - "methods": [ - "createBackupPlanAssociation" - ] - }, - "DeleteBackupPlanAssociation": { - "methods": [ - "deleteBackupPlanAssociation" - ] - }, - "TriggerBackup": { - "methods": [ - "triggerBackup" - ] - }, - "ListManagementServers": { - "methods": [ - "listManagementServers", - "listManagementServersStream", - "listManagementServersAsync" - ] - }, - "ListBackupVaults": { - "methods": [ - "listBackupVaults", - "listBackupVaultsStream", - "listBackupVaultsAsync" - ] - }, - "FetchUsableBackupVaults": { - "methods": [ - "fetchUsableBackupVaults", - "fetchUsableBackupVaultsStream", - "fetchUsableBackupVaultsAsync" - ] - }, - "ListDataSources": { - "methods": [ - "listDataSources", - "listDataSourcesStream", - "listDataSourcesAsync" - ] - }, - "ListBackups": { - "methods": [ - "listBackups", - "listBackupsStream", - "listBackupsAsync" - ] - }, - "ListBackupPlans": { - "methods": [ - "listBackupPlans", - "listBackupPlansStream", - "listBackupPlansAsync" - ] - }, - "ListBackupPlanAssociations": { - "methods": [ - "listBackupPlanAssociations", - "listBackupPlanAssociationsStream", - "listBackupPlanAssociationsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "BackupDRClient", - "rpcs": { - "GetManagementServer": { - "methods": [ - "getManagementServer" - ] - }, - "GetBackupVault": { - "methods": [ - "getBackupVault" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "GetDataSource": { - "methods": [ - "getDataSource" - ] - }, - "InitiateBackup": { - "methods": [ - "initiateBackup" - ] - }, - "FetchAccessToken": { - "methods": [ - "fetchAccessToken" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetBackupPlan": { - "methods": [ - "getBackupPlan" - ] - }, - "GetBackupPlanAssociation": { - "methods": [ - "getBackupPlanAssociation" - ] - }, - "CreateManagementServer": { - "methods": [ - "createManagementServer" - ] - }, - "DeleteManagementServer": { - "methods": [ - "deleteManagementServer" - ] - }, - "CreateBackupVault": { - "methods": [ - "createBackupVault" - ] - }, - "UpdateBackupVault": { - "methods": [ - "updateBackupVault" - ] - }, - "DeleteBackupVault": { - "methods": [ - "deleteBackupVault" - ] - }, - "UpdateDataSource": { - "methods": [ - "updateDataSource" - ] - }, - "RemoveDataSource": { - "methods": [ - "removeDataSource" - ] - }, - "SetInternalStatus": { - "methods": [ - "setInternalStatus" - ] - }, - "AbandonBackup": { - "methods": [ - "abandonBackup" - ] - }, - "FinalizeBackup": { - "methods": [ - "finalizeBackup" - ] - }, - "UpdateBackup": { - "methods": [ - "updateBackup" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "RestoreBackup": { - "methods": [ - "restoreBackup" - ] - }, - "CreateBackupPlan": { - "methods": [ - "createBackupPlan" - ] - }, - "DeleteBackupPlan": { - "methods": [ - "deleteBackupPlan" - ] - }, - "CreateBackupPlanAssociation": { - "methods": [ - "createBackupPlanAssociation" - ] - }, - "DeleteBackupPlanAssociation": { - "methods": [ - "deleteBackupPlanAssociation" - ] - }, - "TriggerBackup": { - "methods": [ - "triggerBackup" - ] - }, - "ListManagementServers": { - "methods": [ - "listManagementServers", - "listManagementServersStream", - "listManagementServersAsync" - ] - }, - "ListBackupVaults": { - "methods": [ - "listBackupVaults", - "listBackupVaultsStream", - "listBackupVaultsAsync" - ] - }, - "FetchUsableBackupVaults": { - "methods": [ - "fetchUsableBackupVaults", - "fetchUsableBackupVaultsStream", - "fetchUsableBackupVaultsAsync" - ] - }, - "ListDataSources": { - "methods": [ - "listDataSources", - "listDataSourcesStream", - "listDataSourcesAsync" - ] - }, - "ListBackups": { - "methods": [ - "listBackups", - "listBackupsStream", - "listBackupsAsync" - ] - }, - "ListBackupPlans": { - "methods": [ - "listBackupPlans", - "listBackupPlansStream", - "listBackupPlansAsync" - ] - }, - "ListBackupPlanAssociations": { - "methods": [ - "listBackupPlanAssociations", - "listBackupPlanAssociationsStream", - "listBackupPlanAssociationsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts deleted file mode 100644 index ba4dc25d2f3..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts +++ /dev/null @@ -1,19 +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 -// -// 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 {BackupDRClient} from './backup_d_r_client'; diff --git a/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 5c5ec9c7cf0..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,27 +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 -// -// 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 backupdr = require('@google-cloud/backupdr'); - -function main() { - const backupDRClient = new backupdr.BackupDRClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 229588cfd57..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,32 +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 -// -// 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 {BackupDRClient} from '@google-cloud/backupdr'; - -// check that the client class type name can be used -function doStuffWithBackupDRClient(client: BackupDRClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const backupDRClient = new BackupDRClient(); - doStuffWithBackupDRClient(backupDRClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts b/owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts deleted file mode 100644 index fd5bfdc71d5..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts +++ /dev/null @@ -1,49 +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 -// -// 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-backupdr/v1/test/gapic_backup_d_r_v1.ts b/owl-bot-staging/google-cloud-backupdr/v1/test/gapic_backup_d_r_v1.ts deleted file mode 100644 index 451d7bee0fe..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/test/gapic_backup_d_r_v1.ts +++ /dev/null @@ -1,6816 +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 -// -// 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 backupdrModule 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.BackupDRClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new backupdrModule.v1.BackupDRClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'backupdr.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new backupdrModule.v1.BackupDRClient(); - 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 = backupdrModule.v1.BackupDRClient.servicePath; - assert.strictEqual(servicePath, 'backupdr.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = backupdrModule.v1.BackupDRClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'backupdr.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new backupdrModule.v1.BackupDRClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'backupdr.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new backupdrModule.v1.BackupDRClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'backupdr.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 backupdrModule.v1.BackupDRClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'backupdr.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 backupdrModule.v1.BackupDRClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'backupdr.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 backupdrModule.v1.BackupDRClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = backupdrModule.v1.BackupDRClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new backupdrModule.v1.BackupDRClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new backupdrModule.v1.BackupDRClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.backupDRStub, undefined); - await client.initialize(); - assert(client.backupDRStub); - }); - - it('has close method for the initialized client', done => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.backupDRStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.backupDRStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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('getManagementServer', () => { - it('invokes getManagementServer without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() - ); - client.innerApiCalls.getManagementServer = stubSimpleCall(expectedResponse); - const [response] = await client.getManagementServer(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getManagementServer without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() - ); - client.innerApiCalls.getManagementServer = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getManagementServer( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IManagementServer|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getManagementServer with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getManagementServer = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getManagementServer(request), expectedError); - const actualRequest = (client.innerApiCalls.getManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getManagementServer with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getManagementServer(request), expectedError); - }); - }); - - describe('getBackupVault', () => { - it('invokes getBackupVault without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupVault() - ); - client.innerApiCalls.getBackupVault = stubSimpleCall(expectedResponse); - const [response] = await client.getBackupVault(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupVault without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupVault() - ); - client.innerApiCalls.getBackupVault = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getBackupVault( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupVault|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupVault with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getBackupVault = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getBackupVault(request), expectedError); - const actualRequest = (client.innerApiCalls.getBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupVault with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getBackupVault(request), expectedError); - }); - }); - - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = stubSimpleCall(expectedResponse); - const [response] = await client.testIamPermissions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.testIamPermissions( - request, - (err?: Error|null, result?: protos.google.iam.v1.ITestIamPermissionsResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.testIamPermissions = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.testIamPermissions(request), expectedError); - const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.testIamPermissions(request), expectedError); - }); - }); - - describe('getDataSource', () => { - it('invokes getDataSource without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DataSource() - ); - client.innerApiCalls.getDataSource = stubSimpleCall(expectedResponse); - const [response] = await client.getDataSource(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataSource without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DataSource() - ); - client.innerApiCalls.getDataSource = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getDataSource( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IDataSource|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataSource with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getDataSource = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getDataSource(request), expectedError); - const actualRequest = (client.innerApiCalls.getDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataSource with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getDataSource(request), expectedError); - }); - }); - - describe('initiateBackup', () => { - it('invokes initiateBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.InitiateBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.InitiateBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.InitiateBackupResponse() - ); - client.innerApiCalls.initiateBackup = stubSimpleCall(expectedResponse); - const [response] = await client.initiateBackup(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.initiateBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.initiateBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes initiateBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.InitiateBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.InitiateBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.InitiateBackupResponse() - ); - client.innerApiCalls.initiateBackup = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.initiateBackup( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IInitiateBackupResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.initiateBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.initiateBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes initiateBackup with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.InitiateBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.InitiateBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.initiateBackup = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.initiateBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.initiateBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.initiateBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes initiateBackup with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.InitiateBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.InitiateBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.initiateBackup(request), expectedError); - }); - }); - - describe('fetchAccessToken', () => { - it('invokes fetchAccessToken without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchAccessTokenRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchAccessTokenResponse() - ); - client.innerApiCalls.fetchAccessToken = stubSimpleCall(expectedResponse); - const [response] = await client.fetchAccessToken(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchAccessToken as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchAccessToken as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchAccessToken without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchAccessTokenRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchAccessTokenResponse() - ); - client.innerApiCalls.fetchAccessToken = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.fetchAccessToken( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchAccessToken as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchAccessToken as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchAccessToken with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchAccessTokenRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.fetchAccessToken = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.fetchAccessToken(request), expectedError); - const actualRequest = (client.innerApiCalls.fetchAccessToken as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchAccessToken as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchAccessToken with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchAccessTokenRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.fetchAccessToken(request), expectedError); - }); - }); - - describe('getBackup', () => { - it('invokes getBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.Backup() - ); - client.innerApiCalls.getBackup = stubSimpleCall(expectedResponse); - const [response] = await client.getBackup(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.Backup() - ); - client.innerApiCalls.getBackup = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getBackup( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackup|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackup with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getBackup = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.getBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackup with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getBackup(request), expectedError); - }); - }); - - describe('getBackupPlan', () => { - it('invokes getBackupPlan without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupPlan() - ); - client.innerApiCalls.getBackupPlan = stubSimpleCall(expectedResponse); - const [response] = await client.getBackupPlan(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlan without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupPlan() - ); - client.innerApiCalls.getBackupPlan = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getBackupPlan( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlan|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlan with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getBackupPlan = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getBackupPlan(request), expectedError); - const actualRequest = (client.innerApiCalls.getBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlan with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getBackupPlan(request), expectedError); - }); - }); - - describe('getBackupPlanAssociation', () => { - it('invokes getBackupPlanAssociation without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupPlanAssociation() - ); - client.innerApiCalls.getBackupPlanAssociation = stubSimpleCall(expectedResponse); - const [response] = await client.getBackupPlanAssociation(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlanAssociation without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupPlanAssociation() - ); - client.innerApiCalls.getBackupPlanAssociation = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getBackupPlanAssociation( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlanAssociation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlanAssociation with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getBackupPlanAssociation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getBackupPlanAssociation(request), expectedError); - const actualRequest = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlanAssociation with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getBackupPlanAssociation(request), expectedError); - }); - }); - - describe('createManagementServer', () => { - it('invokes createManagementServer without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createManagementServer = stubLongRunningCall(expectedResponse); - const [operation] = await client.createManagementServer(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createManagementServer without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createManagementServer = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createManagementServer( - 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.createManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createManagementServer with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createManagementServer = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createManagementServer(request), expectedError); - const actualRequest = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createManagementServer with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createManagementServer = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createManagementServer(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateManagementServerProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateManagementServerProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateManagementServerProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateManagementServerProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteManagementServer', () => { - it('invokes deleteManagementServer without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteManagementServer = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteManagementServer(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteManagementServer without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteManagementServer = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteManagementServer( - 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.deleteManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteManagementServer with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteManagementServer = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteManagementServer(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteManagementServer with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteManagementServer = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteManagementServer(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteManagementServerProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteManagementServerProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteManagementServerProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteManagementServerProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createBackupVault', () => { - it('invokes createBackupVault without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupVault = stubLongRunningCall(expectedResponse); - const [operation] = await client.createBackupVault(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupVault without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupVault = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createBackupVault( - 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.createBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupVault with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupVault = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createBackupVault(request), expectedError); - const actualRequest = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupVault with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupVault = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createBackupVault(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateBackupVaultProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupVaultProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateBackupVaultProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupVaultProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateBackupVault', () => { - it('invokes updateBackupVault without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); - request.backupVault.name = defaultValue1; - const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateBackupVault = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateBackupVault(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackupVault without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); - request.backupVault.name = defaultValue1; - const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateBackupVault = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateBackupVault( - 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.updateBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackupVault with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); - request.backupVault.name = defaultValue1; - const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateBackupVault = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateBackupVault(request), expectedError); - const actualRequest = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackupVault with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); - request.backupVault.name = defaultValue1; - const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateBackupVault = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateBackupVault(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateBackupVaultProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateBackupVaultProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateBackupVaultProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateBackupVaultProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteBackupVault', () => { - it('invokes deleteBackupVault without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupVault = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteBackupVault(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupVault without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupVault = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteBackupVault( - 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.deleteBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupVault with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupVault = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteBackupVault(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupVault with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupVault = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteBackupVault(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteBackupVaultProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupVaultProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteBackupVaultProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupVaultProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateDataSource', () => { - it('invokes updateDataSource without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() - ); - request.dataSource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); - request.dataSource.name = defaultValue1; - const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateDataSource = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateDataSource(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataSource without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() - ); - request.dataSource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); - request.dataSource.name = defaultValue1; - const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateDataSource = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateDataSource( - 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.updateDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataSource with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() - ); - request.dataSource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); - request.dataSource.name = defaultValue1; - const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDataSource = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateDataSource(request), expectedError); - const actualRequest = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataSource with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() - ); - request.dataSource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); - request.dataSource.name = defaultValue1; - const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDataSource = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateDataSource(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateDataSourceProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateDataSourceProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateDataSourceProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateDataSourceProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('removeDataSource', () => { - it('invokes removeDataSource without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RemoveDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.removeDataSource = stubLongRunningCall(expectedResponse); - const [operation] = await client.removeDataSource(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.removeDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.removeDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes removeDataSource without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RemoveDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.removeDataSource = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.removeDataSource( - 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.removeDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.removeDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes removeDataSource with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RemoveDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.removeDataSource = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.removeDataSource(request), expectedError); - const actualRequest = (client.innerApiCalls.removeDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.removeDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes removeDataSource with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RemoveDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.removeDataSource = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.removeDataSource(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.removeDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.removeDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkRemoveDataSourceProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkRemoveDataSourceProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkRemoveDataSourceProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkRemoveDataSourceProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('setInternalStatus', () => { - it('invokes setInternalStatus without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.SetInternalStatusRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.setInternalStatus = stubLongRunningCall(expectedResponse); - const [operation] = await client.setInternalStatus(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setInternalStatus as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setInternalStatus as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setInternalStatus without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.SetInternalStatusRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.setInternalStatus = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setInternalStatus( - 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.setInternalStatus as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setInternalStatus as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setInternalStatus with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.SetInternalStatusRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setInternalStatus = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.setInternalStatus(request), expectedError); - const actualRequest = (client.innerApiCalls.setInternalStatus as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setInternalStatus as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setInternalStatus with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.SetInternalStatusRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setInternalStatus = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.setInternalStatus(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.setInternalStatus as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setInternalStatus as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkSetInternalStatusProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkSetInternalStatusProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkSetInternalStatusProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkSetInternalStatusProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('abandonBackup', () => { - it('invokes abandonBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.AbandonBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.AbandonBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.abandonBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.abandonBackup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.abandonBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.abandonBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes abandonBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.AbandonBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.AbandonBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.abandonBackup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.abandonBackup( - 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.abandonBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.abandonBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes abandonBackup with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.AbandonBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.AbandonBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.abandonBackup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.abandonBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.abandonBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.abandonBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes abandonBackup with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.AbandonBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.AbandonBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.abandonBackup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.abandonBackup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.abandonBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.abandonBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkAbandonBackupProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkAbandonBackupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkAbandonBackupProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkAbandonBackupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('finalizeBackup', () => { - it('invokes finalizeBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FinalizeBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.finalizeBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.finalizeBackup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.finalizeBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.finalizeBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes finalizeBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FinalizeBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.finalizeBackup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.finalizeBackup( - 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.finalizeBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.finalizeBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes finalizeBackup with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FinalizeBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.finalizeBackup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.finalizeBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.finalizeBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.finalizeBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes finalizeBackup with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FinalizeBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.finalizeBackup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.finalizeBackup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.finalizeBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.finalizeBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkFinalizeBackupProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkFinalizeBackupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkFinalizeBackupProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkFinalizeBackupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateBackup', () => { - it('invokes updateBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupRequest() - ); - request.backup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); - request.backup.name = defaultValue1; - const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateBackup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupRequest() - ); - request.backup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); - request.backup.name = defaultValue1; - const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateBackup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateBackup( - 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.updateBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackup with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupRequest() - ); - request.backup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); - request.backup.name = defaultValue1; - const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateBackup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackup with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupRequest() - ); - request.backup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); - request.backup.name = defaultValue1; - const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateBackup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateBackup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateBackupProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateBackupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateBackupProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateBackupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteBackup', () => { - it('invokes deleteBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteBackup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteBackup( - 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.deleteBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackup with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackup with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteBackup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteBackupProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteBackupProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('restoreBackup', () => { - it('invokes restoreBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RestoreBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.restoreBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.restoreBackup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes restoreBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RestoreBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.restoreBackup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.restoreBackup( - 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.restoreBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes restoreBackup with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RestoreBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.restoreBackup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.restoreBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes restoreBackup with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RestoreBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.restoreBackup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.restoreBackup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkRestoreBackupProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkRestoreBackupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkRestoreBackupProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkRestoreBackupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createBackupPlan', () => { - it('invokes createBackupPlan without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupPlan = stubLongRunningCall(expectedResponse); - const [operation] = await client.createBackupPlan(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPlan without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupPlan = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createBackupPlan( - 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.createBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPlan with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupPlan = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createBackupPlan(request), expectedError); - const actualRequest = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPlan with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupPlan = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createBackupPlan(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateBackupPlanProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupPlanProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateBackupPlanProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupPlanProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteBackupPlan', () => { - it('invokes deleteBackupPlan without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupPlan = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteBackupPlan(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPlan without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupPlan = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteBackupPlan( - 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.deleteBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPlan with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupPlan = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteBackupPlan(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPlan with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupPlan = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteBackupPlan(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteBackupPlanProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupPlanProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteBackupPlanProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupPlanProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createBackupPlanAssociation', () => { - it('invokes createBackupPlanAssociation without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall(expectedResponse); - const [operation] = await client.createBackupPlanAssociation(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPlanAssociation without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createBackupPlanAssociation( - 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.createBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPlanAssociation with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createBackupPlanAssociation(request), expectedError); - const actualRequest = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPlanAssociation with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createBackupPlanAssociation(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateBackupPlanAssociationProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupPlanAssociationProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateBackupPlanAssociationProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupPlanAssociationProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteBackupPlanAssociation', () => { - it('invokes deleteBackupPlanAssociation without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteBackupPlanAssociation(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPlanAssociation without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteBackupPlanAssociation( - 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.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPlanAssociation with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteBackupPlanAssociation(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPlanAssociation with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteBackupPlanAssociation(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteBackupPlanAssociationProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupPlanAssociationProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteBackupPlanAssociationProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupPlanAssociationProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('triggerBackup', () => { - it('invokes triggerBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.TriggerBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.triggerBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.triggerBackup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes triggerBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.TriggerBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.triggerBackup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.triggerBackup( - 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.triggerBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes triggerBackup with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.TriggerBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.triggerBackup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.triggerBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes triggerBackup with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.TriggerBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.triggerBackup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.triggerBackup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkTriggerBackupProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkTriggerBackupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkTriggerBackupProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkTriggerBackupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listManagementServers', () => { - it('invokes listManagementServers without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - ]; - client.innerApiCalls.listManagementServers = stubSimpleCall(expectedResponse); - const [response] = await client.listManagementServers(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listManagementServers as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listManagementServers as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listManagementServers without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - ]; - client.innerApiCalls.listManagementServers = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listManagementServers( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IManagementServer[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listManagementServers as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listManagementServers as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listManagementServers with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listManagementServers = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listManagementServers(request), expectedError); - const actualRequest = (client.innerApiCalls.listManagementServers as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listManagementServers as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listManagementServersStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - ]; - client.descriptors.page.listManagementServers.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listManagementServersStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.ManagementServer[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.ManagementServer) => { - 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.listManagementServers.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listManagementServers, request)); - assert( - (client.descriptors.page.listManagementServers.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listManagementServersStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listManagementServers.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listManagementServersStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.ManagementServer[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.ManagementServer) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listManagementServers.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listManagementServers, request)); - assert( - (client.descriptors.page.listManagementServers.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listManagementServers without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - ]; - client.descriptors.page.listManagementServers.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IManagementServer[] = []; - const iterable = client.listManagementServersAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listManagementServers with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listManagementServers.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listManagementServersAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IManagementServer[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listBackupVaults', () => { - it('invokes listBackupVaults without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.innerApiCalls.listBackupVaults = stubSimpleCall(expectedResponse); - const [response] = await client.listBackupVaults(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupVaults as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupVaults as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupVaults without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.innerApiCalls.listBackupVaults = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listBackupVaults( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupVault[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupVaults as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupVaults as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupVaults with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listBackupVaults = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listBackupVaults(request), expectedError); - const actualRequest = (client.innerApiCalls.listBackupVaults as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupVaults as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupVaultsStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.descriptors.page.listBackupVaults.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBackupVaultsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { - 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.listBackupVaults.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupVaults, request)); - assert( - (client.descriptors.page.listBackupVaults.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listBackupVaultsStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupVaults.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listBackupVaultsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listBackupVaults.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupVaults, request)); - assert( - (client.descriptors.page.listBackupVaults.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupVaults without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.descriptors.page.listBackupVaults.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; - const iterable = client.listBackupVaultsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupVaults with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupVaults.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listBackupVaultsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('fetchUsableBackupVaults', () => { - it('invokes fetchUsableBackupVaults without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.innerApiCalls.fetchUsableBackupVaults = stubSimpleCall(expectedResponse); - const [response] = await client.fetchUsableBackupVaults(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchUsableBackupVaults without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.innerApiCalls.fetchUsableBackupVaults = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.fetchUsableBackupVaults( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupVault[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchUsableBackupVaults with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.fetchUsableBackupVaults = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.fetchUsableBackupVaults(request), expectedError); - const actualRequest = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchUsableBackupVaultsStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.descriptors.page.fetchUsableBackupVaults.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.fetchUsableBackupVaultsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { - 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.fetchUsableBackupVaults.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.fetchUsableBackupVaults, request)); - assert( - (client.descriptors.page.fetchUsableBackupVaults.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes fetchUsableBackupVaultsStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.fetchUsableBackupVaults.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.fetchUsableBackupVaultsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.fetchUsableBackupVaults.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.fetchUsableBackupVaults, request)); - assert( - (client.descriptors.page.fetchUsableBackupVaults.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with fetchUsableBackupVaults without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.descriptors.page.fetchUsableBackupVaults.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; - const iterable = client.fetchUsableBackupVaultsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with fetchUsableBackupVaults with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.fetchUsableBackupVaults.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.fetchUsableBackupVaultsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listDataSources', () => { - it('invokes listDataSources without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - ]; - client.innerApiCalls.listDataSources = stubSimpleCall(expectedResponse); - const [response] = await client.listDataSources(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDataSources as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataSources as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataSources without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - ]; - client.innerApiCalls.listDataSources = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listDataSources( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IDataSource[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDataSources as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataSources as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataSources with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listDataSources = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listDataSources(request), expectedError); - const actualRequest = (client.innerApiCalls.listDataSources as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataSources as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataSourcesStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - ]; - client.descriptors.page.listDataSources.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDataSourcesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.DataSource[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.DataSource) => { - 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.listDataSources.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDataSources, request)); - assert( - (client.descriptors.page.listDataSources.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listDataSourcesStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDataSources.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDataSourcesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.DataSource[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.DataSource) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listDataSources.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDataSources, request)); - assert( - (client.descriptors.page.listDataSources.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDataSources without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - ]; - client.descriptors.page.listDataSources.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IDataSource[] = []; - const iterable = client.listDataSourcesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listDataSources.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDataSources.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDataSources with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDataSources.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDataSourcesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IDataSource[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listDataSources.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDataSources.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listBackups', () => { - it('invokes listBackups without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - ]; - client.innerApiCalls.listBackups = stubSimpleCall(expectedResponse); - const [response] = await client.listBackups(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackups as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackups as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackups without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - ]; - client.innerApiCalls.listBackups = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listBackups( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackup[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackups as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackups as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackups with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listBackups = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listBackups(request), expectedError); - const actualRequest = (client.innerApiCalls.listBackups as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackups as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupsStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - ]; - client.descriptors.page.listBackups.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBackupsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.Backup[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.Backup) => { - 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.listBackups.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackups, request)); - assert( - (client.descriptors.page.listBackups.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listBackupsStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackups.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listBackupsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.Backup[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.Backup) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listBackups.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackups, request)); - assert( - (client.descriptors.page.listBackups.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackups without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - ]; - client.descriptors.page.listBackups.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IBackup[] = []; - const iterable = client.listBackupsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listBackups.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackups.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackups with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackups.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listBackupsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IBackup[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listBackups.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackups.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listBackupPlans', () => { - it('invokes listBackupPlans without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - ]; - client.innerApiCalls.listBackupPlans = stubSimpleCall(expectedResponse); - const [response] = await client.listBackupPlans(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupPlans as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlans as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPlans without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - ]; - client.innerApiCalls.listBackupPlans = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listBackupPlans( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlan[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupPlans as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlans as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPlans with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listBackupPlans = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listBackupPlans(request), expectedError); - const actualRequest = (client.innerApiCalls.listBackupPlans as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlans as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPlansStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - ]; - client.descriptors.page.listBackupPlans.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBackupPlansStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupPlan[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlan) => { - 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.listBackupPlans.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupPlans, request)); - assert( - (client.descriptors.page.listBackupPlans.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listBackupPlansStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupPlans.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listBackupPlansStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupPlan[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlan) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listBackupPlans.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupPlans, request)); - assert( - (client.descriptors.page.listBackupPlans.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupPlans without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - ]; - client.descriptors.page.listBackupPlans.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IBackupPlan[] = []; - const iterable = client.listBackupPlansAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupPlans with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupPlans.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listBackupPlansAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IBackupPlan[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listBackupPlanAssociations', () => { - it('invokes listBackupPlanAssociations without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - ]; - client.innerApiCalls.listBackupPlanAssociations = stubSimpleCall(expectedResponse); - const [response] = await client.listBackupPlanAssociations(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPlanAssociations without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - ]; - client.innerApiCalls.listBackupPlanAssociations = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listBackupPlanAssociations( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPlanAssociations with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listBackupPlanAssociations = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listBackupPlanAssociations(request), expectedError); - const actualRequest = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPlanAssociationsStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - ]; - client.descriptors.page.listBackupPlanAssociations.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBackupPlanAssociationsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupPlanAssociation[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlanAssociation) => { - 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.listBackupPlanAssociations.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupPlanAssociations, request)); - assert( - (client.descriptors.page.listBackupPlanAssociations.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listBackupPlanAssociationsStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupPlanAssociations.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listBackupPlanAssociationsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupPlanAssociation[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlanAssociation) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listBackupPlanAssociations.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupPlanAssociations, request)); - assert( - (client.descriptors.page.listBackupPlanAssociations.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupPlanAssociations without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - ]; - client.descriptors.page.listBackupPlanAssociations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[] = []; - const iterable = client.listBackupPlanAssociationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listBackupPlanAssociations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupPlanAssociations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupPlanAssociations with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupPlanAssociations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listBackupPlanAssociationsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listBackupPlanAssociations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupPlanAssociations.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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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('backup', () => { - const fakePath = "/rendered/path/backup"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - backupvault: "backupvaultValue", - datasource: "datasourceValue", - backup: "backupValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.backupPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.backupPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('backupPath', () => { - const result = client.backupPath("projectValue", "locationValue", "backupvaultValue", "datasourceValue", "backupValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.backupPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromBackupName', () => { - const result = client.matchProjectFromBackupName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.backupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromBackupName', () => { - const result = client.matchLocationFromBackupName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.backupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupvaultFromBackupName', () => { - const result = client.matchBackupvaultFromBackupName(fakePath); - assert.strictEqual(result, "backupvaultValue"); - assert((client.pathTemplates.backupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDatasourceFromBackupName', () => { - const result = client.matchDatasourceFromBackupName(fakePath); - assert.strictEqual(result, "datasourceValue"); - assert((client.pathTemplates.backupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupFromBackupName', () => { - const result = client.matchBackupFromBackupName(fakePath); - assert.strictEqual(result, "backupValue"); - assert((client.pathTemplates.backupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('backupPlan', () => { - const fakePath = "/rendered/path/backupPlan"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - backup_plan: "backupPlanValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.backupPlanPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.backupPlanPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('backupPlanPath', () => { - const result = client.backupPlanPath("projectValue", "locationValue", "backupPlanValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.backupPlanPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromBackupPlanName', () => { - const result = client.matchProjectFromBackupPlanName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.backupPlanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromBackupPlanName', () => { - const result = client.matchLocationFromBackupPlanName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.backupPlanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupPlanFromBackupPlanName', () => { - const result = client.matchBackupPlanFromBackupPlanName(fakePath); - assert.strictEqual(result, "backupPlanValue"); - assert((client.pathTemplates.backupPlanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('backupPlanAssociation', () => { - const fakePath = "/rendered/path/backupPlanAssociation"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - backup_plan_association: "backupPlanAssociationValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.backupPlanAssociationPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.backupPlanAssociationPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('backupPlanAssociationPath', () => { - const result = client.backupPlanAssociationPath("projectValue", "locationValue", "backupPlanAssociationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.backupPlanAssociationPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromBackupPlanAssociationName', () => { - const result = client.matchProjectFromBackupPlanAssociationName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.backupPlanAssociationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromBackupPlanAssociationName', () => { - const result = client.matchLocationFromBackupPlanAssociationName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.backupPlanAssociationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupPlanAssociationFromBackupPlanAssociationName', () => { - const result = client.matchBackupPlanAssociationFromBackupPlanAssociationName(fakePath); - assert.strictEqual(result, "backupPlanAssociationValue"); - assert((client.pathTemplates.backupPlanAssociationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('backupVault', () => { - const fakePath = "/rendered/path/backupVault"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - backupvault: "backupvaultValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.backupVaultPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.backupVaultPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('backupVaultPath', () => { - const result = client.backupVaultPath("projectValue", "locationValue", "backupvaultValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.backupVaultPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromBackupVaultName', () => { - const result = client.matchProjectFromBackupVaultName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.backupVaultPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromBackupVaultName', () => { - const result = client.matchLocationFromBackupVaultName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.backupVaultPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupvaultFromBackupVaultName', () => { - const result = client.matchBackupvaultFromBackupVaultName(fakePath); - assert.strictEqual(result, "backupvaultValue"); - assert((client.pathTemplates.backupVaultPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataSource', () => { - const fakePath = "/rendered/path/dataSource"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - backupvault: "backupvaultValue", - datasource: "datasourceValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataSourcePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataSourcePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataSourcePath', () => { - const result = client.dataSourcePath("projectValue", "locationValue", "backupvaultValue", "datasourceValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataSourcePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataSourceName', () => { - const result = client.matchProjectFromDataSourceName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataSourceName', () => { - const result = client.matchLocationFromDataSourceName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupvaultFromDataSourceName', () => { - const result = client.matchBackupvaultFromDataSourceName(fakePath); - assert.strictEqual(result, "backupvaultValue"); - assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDatasourceFromDataSourceName', () => { - const result = client.matchDatasourceFromDataSourceName(fakePath); - assert.strictEqual(result, "datasourceValue"); - assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - 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('managementServer', () => { - const fakePath = "/rendered/path/managementServer"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - managementserver: "managementserverValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.managementServerPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.managementServerPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('managementServerPath', () => { - const result = client.managementServerPath("projectValue", "locationValue", "managementserverValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.managementServerPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromManagementServerName', () => { - const result = client.matchProjectFromManagementServerName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.managementServerPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromManagementServerName', () => { - const result = client.matchLocationFromManagementServerName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.managementServerPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchManagementserverFromManagementServerName', () => { - const result = client.matchManagementserverFromManagementServerName(fakePath); - assert.strictEqual(result, "managementserverValue"); - assert((client.pathTemplates.managementServerPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('project', () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - 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)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/tsconfig.json b/owl-bot-staging/google-cloud-backupdr/v1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/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-backupdr/v1/webpack.config.js b/owl-bot-staging/google-cloud-backupdr/v1/webpack.config.js deleted file mode 100644 index 72a35713b8c..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/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: 'BackupDR', - filename: './backup-d-r.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-backupdr/README.md b/packages/google-cloud-backupdr/README.md index 3b6f181ce15..ece189b44ea 100644 --- a/packages/google-cloud-backupdr/README.md +++ b/packages/google-cloud-backupdr/README.md @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Backup and DR Service API API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Set up authentication][auth] so you can access the API from your local workstation. ### Installing the client library @@ -120,10 +120,40 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Backup_d_r.abandon_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.abandon_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.abandon_backup.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.create_backup_plan | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.create_backup_plan_association | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan_association.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan_association.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.create_backup_vault | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_vault.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_vault.js,packages/google-cloud-backupdr/samples/README.md) | | Backup_d_r.create_management_server | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_management_server.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_management_server.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.delete_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.delete_backup_plan | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.delete_backup_plan_association | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan_association.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan_association.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.delete_backup_vault | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_vault.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_vault.js,packages/google-cloud-backupdr/samples/README.md) | | Backup_d_r.delete_management_server | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_management_server.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_management_server.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.fetch_access_token | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_access_token.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_access_token.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.fetch_usable_backup_vaults | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.finalize_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.finalize_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.finalize_backup.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.get_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.get_backup_plan | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.get_backup_plan_association | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan_association.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan_association.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.get_backup_vault | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_vault.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_vault.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.get_data_source | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_data_source.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_data_source.js,packages/google-cloud-backupdr/samples/README.md) | | Backup_d_r.get_management_server | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_management_server.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_management_server.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.initiate_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.initiate_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.initiate_backup.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.list_backup_plan_associations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plan_associations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plan_associations.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.list_backup_plans | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plans.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plans.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.list_backup_vaults | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_vaults.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_vaults.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.list_backups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backups.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backups.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.list_data_sources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_sources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_sources.js,packages/google-cloud-backupdr/samples/README.md) | | Backup_d_r.list_management_servers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_management_servers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_management_servers.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.remove_data_source | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.remove_data_source.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.remove_data_source.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.restore_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.set_internal_status | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.set_internal_status.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.set_internal_status.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.test_iam_permissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.test_iam_permissions.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.trigger_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.trigger_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.trigger_backup.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.update_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.update_backup_vault | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup_vault.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup_vault.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.update_data_source | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_data_source.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_data_source.js,packages/google-cloud-backupdr/samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/quickstart.js,packages/google-cloud-backupdr/samples/README.md) | @@ -194,4 +224,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=backupdr.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupdr.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupdr.proto index 42b798458b1..eff6b77e762 100644 --- a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupdr.proto +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupdr.proto @@ -19,7 +19,12 @@ package google.cloud.backupdr.v1; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; import "google/api/resource.proto"; +import "google/cloud/backupdr/v1/backupplan.proto"; +import "google/cloud/backupdr/v1/backupplanassociation.proto"; +import "google/cloud/backupdr/v1/backupvault.proto"; +import "google/iam/v1/iam_policy.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; @@ -84,6 +89,360 @@ service BackupDR { metadata_type: "OperationMetadata" }; } + + // Creates a new BackupVault in a given project and location. + rpc CreateBackupVault(CreateBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/backupVaults" + body: "backup_vault" + }; + option (google.api.method_signature) = + "parent,backup_vault,backup_vault_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupVault" + metadata_type: "OperationMetadata" + }; + } + + // Lists BackupVaults in a given project and location. + rpc ListBackupVaults(ListBackupVaultsRequest) + returns (ListBackupVaultsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupVaults" + }; + option (google.api.method_signature) = "parent"; + } + + // FetchUsableBackupVaults lists usable BackupVaults in a given project and + // location. Usable BackupVault are the ones that user has + // backupdr.backupVaults.get permission. + rpc FetchUsableBackupVaults(FetchUsableBackupVaultsRequest) + returns (FetchUsableBackupVaultsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a BackupVault. + rpc GetBackupVault(GetBackupVaultRequest) returns (BackupVault) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupVaults/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings of a BackupVault. + rpc UpdateBackupVault(UpdateBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}" + body: "backup_vault" + }; + option (google.api.method_signature) = "backup_vault,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "BackupVault" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a BackupVault. + rpc DeleteBackupVault(DeleteBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupVaults/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Returns the caller's permissions on a BackupVault resource. + // + // A caller is not required to have Google IAM permission to make this + // request. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/backupVaults/*}:testIamPermissions" + body: "*" + }; + option (google.api.method_signature) = "resource, permissions"; + } + + // Lists DataSources in a given project and location. + rpc ListDataSources(ListDataSourcesRequest) + returns (ListDataSourcesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a DataSource. + rpc GetDataSource(GetDataSourceRequest) returns (DataSource) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings of a DataSource. + rpc UpdateDataSource(UpdateDataSourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}" + body: "data_source" + }; + option (google.api.method_signature) = "data_source,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DataSource" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a DataSource. This is a custom method instead of a standard delete + // method because external clients will not delete DataSources except for + // BackupDR backup appliances. + rpc RemoveDataSource(RemoveDataSourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:remove" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Sets the internal status of a DataSource. + rpc SetInternalStatus(SetInternalStatusRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:setInternalStatus" + body: "*" + }; + option (google.api.method_signature) = "data_source"; + option (google.longrunning.operation_info) = { + response_type: "SetInternalStatusResponse" + metadata_type: "OperationMetadata" + }; + } + + // Internal only. + // Initiates a backup. + rpc InitiateBackup(InitiateBackupRequest) returns (InitiateBackupResponse) { + option (google.api.http) = { + post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:initiateBackup" + body: "*" + }; + option (google.api.method_signature) = "data_source"; + } + + // Internal only. + // Abandons a backup. + rpc AbandonBackup(AbandonBackupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:abandonBackup" + body: "*" + }; + option (google.api.method_signature) = "data_source"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Internal only. + // Finalize a backup that was started by a call to InitiateBackup. + rpc FinalizeBackup(FinalizeBackupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:finalizeBackup" + body: "*" + }; + option (google.api.method_signature) = "data_source"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Internal only. + // Fetch access token for a given data source. + rpc FetchAccessToken(FetchAccessTokenRequest) + returns (FetchAccessTokenResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Backups in a given project and location. + rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a Backup. + rpc GetBackup(GetBackupRequest) returns (Backup) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings of a Backup. + rpc UpdateBackup(UpdateBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + body: "backup" + }; + option (google.api.method_signature) = "backup,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a Backup. + rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Restore from a Backup + rpc RestoreBackup(RestoreBackupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "RestoreBackupResponse" + metadata_type: "OperationMetadata" + }; + } + + // Create a BackupPlan + rpc CreateBackupPlan(CreateBackupPlanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/backupPlans" + body: "backup_plan" + }; + option (google.api.method_signature) = "parent,backup_plan,backup_plan_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlan" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single BackupPlan. + rpc GetBackupPlan(GetBackupPlanRequest) returns (BackupPlan) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupPlans/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists BackupPlans in a given project and location. + rpc ListBackupPlans(ListBackupPlansRequest) + returns (ListBackupPlansResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupPlans" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a single BackupPlan. + rpc DeleteBackupPlan(DeleteBackupPlanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupPlans/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Create a BackupPlanAssociation + rpc CreateBackupPlanAssociation(CreateBackupPlanAssociationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" + body: "backup_plan_association" + }; + option (google.api.method_signature) = + "parent,backup_plan_association,backup_plan_association_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlanAssociation" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single BackupPlanAssociation. + rpc GetBackupPlanAssociation(GetBackupPlanAssociationRequest) + returns (BackupPlanAssociation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists BackupPlanAssociations in a given project and location. + rpc ListBackupPlanAssociations(ListBackupPlanAssociationsRequest) + returns (ListBackupPlanAssociationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a single BackupPlanAssociation. + rpc DeleteBackupPlanAssociation(DeleteBackupPlanAssociationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Triggers a new Backup. + rpc TriggerBackup(TriggerBackupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup" + body: "*" + }; + option (google.api.method_signature) = "name,rule_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlanAssociation" + metadata_type: "OperationMetadata" + }; + } } // Network configuration for ManagementServer instance. @@ -236,7 +595,7 @@ message ManagementServer { // Output only. The OAuth 2.0 client id is required to make API calls to the // BackupDR instance API of this ManagementServer. This is the value that - // should be provided in the ‘aud’ field of the OIDC ID Token (see openid + // should be provided in the 'aud' field of the OIDC ID Token (see openid // specification // https://openid.net/specs/openid-connect-core-1_0.html#IDToken). string oauth2_client_id = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -261,10 +620,11 @@ message ManagementServer { // Request message for listing management servers. message ListManagementServersRequest { // Required. The project and location for which to retrieve management servers - // information, in the format `projects/{project_id}/locations/{location}`. In - // Cloud BackupDR, locations map to GCP regions, for example **us-central1**. - // To retrieve management servers for all locations, use "-" for the - // `{location}` value. + // information, in the format 'projects/{project_id}/locations/{location}'. In + // Cloud BackupDR, locations map to Google Cloud regions, for example + // **us-central1**. To retrieve management servers for all locations, use "-" + // for the + // '{location}' value. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -291,7 +651,7 @@ message ListManagementServersResponse { // The list of ManagementServer instances in the project for the specified // location. // - // If the `{location}` value in the request is "-", the response contains a + // If the '{location}' value in the request is "-", the response contains a // list of instances from all locations. In case any location is unreachable, // the response will only return management servers in reachable locations and // the 'unreachable' field will be populated with a list of unreachable @@ -308,7 +668,7 @@ message ListManagementServersResponse { // Request message for getting a management server instance. message GetManagementServerRequest { // Required. Name of the management server resource name, in the format - // `projects/{project_id}/locations/{location}/managementServers/{resource_name}` + // 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -320,8 +680,8 @@ message GetManagementServerRequest { // Request message for creating a management server instance. message CreateManagementServerRequest { // Required. The management server project and location in the format - // `projects/{project_id}/locations/{location}`. In Cloud Backup and DR - // locations map to GCP regions, for example **us-central1**. + // 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR + // locations map to Google Cloud regions, for example **us-central1**. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -403,7 +763,7 @@ message OperationMetadata { // 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`. + // 'Code.CANCELLED'. bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. API version used to start the operation. diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplan.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupplan.proto similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplan.proto rename to packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupplan.proto diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplanassociation.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupplanassociation.proto similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplanassociation.proto rename to packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupplanassociation.proto diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault.proto similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault.proto rename to packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault.proto diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_ba.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault_ba.proto similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_ba.proto rename to packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault_ba.proto diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_gce.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault_gce.proto similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_gce.proto rename to packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault_gce.proto diff --git a/packages/google-cloud-backupdr/protos/protos.d.ts b/packages/google-cloud-backupdr/protos/protos.d.ts index 5506c3035be..22fd9adfdfd 100644 --- a/packages/google-cloud-backupdr/protos/protos.d.ts +++ b/packages/google-cloud-backupdr/protos/protos.d.ts @@ -101,4884 +101,18333 @@ export namespace google { * @returns Promise */ public deleteManagementServer(request: google.cloud.backupdr.v1.IDeleteManagementServerRequest): Promise; - } - - namespace BackupDR { /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listManagementServers}. - * @param error Error, if any - * @param [response] ListManagementServersResponse + * Calls CreateBackupVault. + * @param request CreateBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - type ListManagementServersCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListManagementServersResponse) => void; + public createBackupVault(request: google.cloud.backupdr.v1.ICreateBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupVaultCallback): void; /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getManagementServer}. - * @param error Error, if any - * @param [response] ManagementServer + * Calls CreateBackupVault. + * @param request CreateBackupVaultRequest message or plain object + * @returns Promise */ - type GetManagementServerCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ManagementServer) => void; + public createBackupVault(request: google.cloud.backupdr.v1.ICreateBackupVaultRequest): Promise; /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createManagementServer}. - * @param error Error, if any - * @param [response] Operation + * Calls ListBackupVaults. + * @param request ListBackupVaultsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupVaultsResponse */ - type CreateManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public listBackupVaults(request: google.cloud.backupdr.v1.IListBackupVaultsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupVaultsCallback): void; /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteManagementServer}. - * @param error Error, if any - * @param [response] Operation + * Calls ListBackupVaults. + * @param request ListBackupVaultsRequest message or plain object + * @returns Promise */ - type DeleteManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of a NetworkConfig. */ - interface INetworkConfig { - - /** NetworkConfig network */ - network?: (string|null); - - /** NetworkConfig peeringMode */ - peeringMode?: (google.cloud.backupdr.v1.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1.NetworkConfig.PeeringMode|null); - } - - /** Represents a NetworkConfig. */ - class NetworkConfig implements INetworkConfig { + public listBackupVaults(request: google.cloud.backupdr.v1.IListBackupVaultsRequest): Promise; /** - * Constructs a new NetworkConfig. - * @param [properties] Properties to set + * Calls FetchUsableBackupVaults. + * @param request FetchUsableBackupVaultsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchUsableBackupVaultsResponse */ - constructor(properties?: google.cloud.backupdr.v1.INetworkConfig); + public fetchUsableBackupVaults(request: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, callback: google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaultsCallback): void; - /** NetworkConfig network. */ - public network: string; + /** + * Calls FetchUsableBackupVaults. + * @param request FetchUsableBackupVaultsRequest message or plain object + * @returns Promise + */ + public fetchUsableBackupVaults(request: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest): Promise; - /** NetworkConfig peeringMode. */ - public peeringMode: (google.cloud.backupdr.v1.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1.NetworkConfig.PeeringMode); + /** + * Calls GetBackupVault. + * @param request GetBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BackupVault + */ + public getBackupVault(request: google.cloud.backupdr.v1.IGetBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupVaultCallback): void; /** - * Creates a new NetworkConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkConfig instance + * Calls GetBackupVault. + * @param request GetBackupVaultRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.backupdr.v1.INetworkConfig): google.cloud.backupdr.v1.NetworkConfig; + public getBackupVault(request: google.cloud.backupdr.v1.IGetBackupVaultRequest): Promise; /** - * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @param message NetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateBackupVault. + * @param request UpdateBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static encode(message: google.cloud.backupdr.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public updateBackupVault(request: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateBackupVaultCallback): void; /** - * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @param message NetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateBackupVault. + * @param request UpdateBackupVaultRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public updateBackupVault(request: google.cloud.backupdr.v1.IUpdateBackupVaultRequest): Promise; /** - * Decodes a NetworkConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteBackupVault. + * @param request DeleteBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkConfig; + public deleteBackupVault(request: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupVaultCallback): void; /** - * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteBackupVault. + * @param request DeleteBackupVaultRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkConfig; + public deleteBackupVault(request: google.cloud.backupdr.v1.IDeleteBackupVaultRequest): Promise; /** - * Verifies a NetworkConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.backupdr.v1.BackupDR.TestIamPermissionsCallback): void; /** - * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkConfig + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkConfig; + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; /** - * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. - * @param message NetworkConfig - * @param [options] Conversion options - * @returns Plain object + * Calls ListDataSources. + * @param request ListDataSourcesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataSourcesResponse */ - public static toObject(message: google.cloud.backupdr.v1.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public listDataSources(request: google.cloud.backupdr.v1.IListDataSourcesRequest, callback: google.cloud.backupdr.v1.BackupDR.ListDataSourcesCallback): void; /** - * Converts this NetworkConfig to JSON. - * @returns JSON object + * Calls ListDataSources. + * @param request ListDataSourcesRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public listDataSources(request: google.cloud.backupdr.v1.IListDataSourcesRequest): Promise; /** - * Gets the default type url for NetworkConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls GetDataSource. + * @param request GetDataSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataSource */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + public getDataSource(request: google.cloud.backupdr.v1.IGetDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.GetDataSourceCallback): void; - namespace NetworkConfig { + /** + * Calls GetDataSource. + * @param request GetDataSourceRequest message or plain object + * @returns Promise + */ + public getDataSource(request: google.cloud.backupdr.v1.IGetDataSourceRequest): Promise; - /** PeeringMode enum. */ - enum PeeringMode { - PEERING_MODE_UNSPECIFIED = 0, - PRIVATE_SERVICE_ACCESS = 1 - } - } + /** + * Calls UpdateDataSource. + * @param request UpdateDataSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDataSource(request: google.cloud.backupdr.v1.IUpdateDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateDataSourceCallback): void; - /** Properties of a ManagementURI. */ - interface IManagementURI { + /** + * Calls UpdateDataSource. + * @param request UpdateDataSourceRequest message or plain object + * @returns Promise + */ + public updateDataSource(request: google.cloud.backupdr.v1.IUpdateDataSourceRequest): Promise; - /** ManagementURI webUi */ - webUi?: (string|null); + /** + * Calls RemoveDataSource. + * @param request RemoveDataSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public removeDataSource(request: google.cloud.backupdr.v1.IRemoveDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.RemoveDataSourceCallback): void; - /** ManagementURI api */ - api?: (string|null); - } + /** + * Calls RemoveDataSource. + * @param request RemoveDataSourceRequest message or plain object + * @returns Promise + */ + public removeDataSource(request: google.cloud.backupdr.v1.IRemoveDataSourceRequest): Promise; - /** Represents a ManagementURI. */ - class ManagementURI implements IManagementURI { + /** + * Calls SetInternalStatus. + * @param request SetInternalStatusRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setInternalStatus(request: google.cloud.backupdr.v1.ISetInternalStatusRequest, callback: google.cloud.backupdr.v1.BackupDR.SetInternalStatusCallback): void; /** - * Constructs a new ManagementURI. - * @param [properties] Properties to set + * Calls SetInternalStatus. + * @param request SetInternalStatusRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.backupdr.v1.IManagementURI); + public setInternalStatus(request: google.cloud.backupdr.v1.ISetInternalStatusRequest): Promise; - /** ManagementURI webUi. */ - public webUi: string; + /** + * Calls InitiateBackup. + * @param request InitiateBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and InitiateBackupResponse + */ + public initiateBackup(request: google.cloud.backupdr.v1.IInitiateBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.InitiateBackupCallback): void; - /** ManagementURI api. */ - public api: string; + /** + * Calls InitiateBackup. + * @param request InitiateBackupRequest message or plain object + * @returns Promise + */ + public initiateBackup(request: google.cloud.backupdr.v1.IInitiateBackupRequest): Promise; /** - * Creates a new ManagementURI instance using the specified properties. - * @param [properties] Properties to set - * @returns ManagementURI instance + * Calls AbandonBackup. + * @param request AbandonBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static create(properties?: google.cloud.backupdr.v1.IManagementURI): google.cloud.backupdr.v1.ManagementURI; + public abandonBackup(request: google.cloud.backupdr.v1.IAbandonBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.AbandonBackupCallback): void; /** - * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @param message ManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls AbandonBackup. + * @param request AbandonBackupRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.backupdr.v1.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + public abandonBackup(request: google.cloud.backupdr.v1.IAbandonBackupRequest): Promise; /** - * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @param message ManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls FinalizeBackup. + * @param request FinalizeBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + public finalizeBackup(request: google.cloud.backupdr.v1.IFinalizeBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.FinalizeBackupCallback): void; /** - * Decodes a ManagementURI message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls FinalizeBackup. + * @param request FinalizeBackupRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ManagementURI; + public finalizeBackup(request: google.cloud.backupdr.v1.IFinalizeBackupRequest): Promise; /** - * Decodes a ManagementURI message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls FetchAccessToken. + * @param request FetchAccessTokenRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchAccessTokenResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ManagementURI; + public fetchAccessToken(request: google.cloud.backupdr.v1.IFetchAccessTokenRequest, callback: google.cloud.backupdr.v1.BackupDR.FetchAccessTokenCallback): void; /** - * Verifies a ManagementURI message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls FetchAccessToken. + * @param request FetchAccessTokenRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public fetchAccessToken(request: google.cloud.backupdr.v1.IFetchAccessTokenRequest): Promise; /** - * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ManagementURI + * Calls ListBackups. + * @param request ListBackupsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ManagementURI; + public listBackups(request: google.cloud.backupdr.v1.IListBackupsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupsCallback): void; /** - * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. - * @param message ManagementURI - * @param [options] Conversion options - * @returns Plain object + * Calls ListBackups. + * @param request ListBackupsRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.backupdr.v1.ManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public listBackups(request: google.cloud.backupdr.v1.IListBackupsRequest): Promise; /** - * Converts this ManagementURI to JSON. - * @returns JSON object + * Calls GetBackup. + * @param request GetBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Backup */ - public toJSON(): { [k: string]: any }; + public getBackup(request: google.cloud.backupdr.v1.IGetBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupCallback): void; /** - * Gets the default type url for ManagementURI - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls GetBackup. + * @param request GetBackupRequest message or plain object + * @returns Promise */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + public getBackup(request: google.cloud.backupdr.v1.IGetBackupRequest): Promise; - /** Properties of a WorkforceIdentityBasedManagementURI. */ - interface IWorkforceIdentityBasedManagementURI { + /** + * Calls UpdateBackup. + * @param request UpdateBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateBackup(request: google.cloud.backupdr.v1.IUpdateBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateBackupCallback): void; - /** WorkforceIdentityBasedManagementURI firstPartyManagementUri */ - firstPartyManagementUri?: (string|null); + /** + * Calls UpdateBackup. + * @param request UpdateBackupRequest message or plain object + * @returns Promise + */ + public updateBackup(request: google.cloud.backupdr.v1.IUpdateBackupRequest): Promise; - /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri */ - thirdPartyManagementUri?: (string|null); - } + /** + * Calls DeleteBackup. + * @param request DeleteBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteBackup(request: google.cloud.backupdr.v1.IDeleteBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupCallback): void; - /** Represents a WorkforceIdentityBasedManagementURI. */ - class WorkforceIdentityBasedManagementURI implements IWorkforceIdentityBasedManagementURI { + /** + * Calls DeleteBackup. + * @param request DeleteBackupRequest message or plain object + * @returns Promise + */ + public deleteBackup(request: google.cloud.backupdr.v1.IDeleteBackupRequest): Promise; /** - * Constructs a new WorkforceIdentityBasedManagementURI. - * @param [properties] Properties to set + * Calls RestoreBackup. + * @param request RestoreBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - constructor(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI); + public restoreBackup(request: google.cloud.backupdr.v1.IRestoreBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.RestoreBackupCallback): void; - /** WorkforceIdentityBasedManagementURI firstPartyManagementUri. */ - public firstPartyManagementUri: string; + /** + * Calls RestoreBackup. + * @param request RestoreBackupRequest message or plain object + * @returns Promise + */ + public restoreBackup(request: google.cloud.backupdr.v1.IRestoreBackupRequest): Promise; - /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri. */ - public thirdPartyManagementUri: string; + /** + * Calls CreateBackupPlan. + * @param request CreateBackupPlanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createBackupPlan(request: google.cloud.backupdr.v1.ICreateBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupPlanCallback): void; /** - * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkforceIdentityBasedManagementURI instance + * Calls CreateBackupPlan. + * @param request CreateBackupPlanRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; + public createBackupPlan(request: google.cloud.backupdr.v1.ICreateBackupPlanRequest): Promise; /** - * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. - * @param message WorkforceIdentityBasedManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetBackupPlan. + * @param request GetBackupPlanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BackupPlan */ - public static encode(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + public getBackupPlan(request: google.cloud.backupdr.v1.IGetBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupPlanCallback): void; /** - * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. - * @param message WorkforceIdentityBasedManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetBackupPlan. + * @param request GetBackupPlanRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + public getBackupPlan(request: google.cloud.backupdr.v1.IGetBackupPlanRequest): Promise; /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkforceIdentityBasedManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListBackupPlans. + * @param request ListBackupPlansRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupPlansResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; + public listBackupPlans(request: google.cloud.backupdr.v1.IListBackupPlansRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupPlansCallback): void; /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkforceIdentityBasedManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListBackupPlans. + * @param request ListBackupPlansRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; + public listBackupPlans(request: google.cloud.backupdr.v1.IListBackupPlansRequest): Promise; /** - * Verifies a WorkforceIdentityBasedManagementURI message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls DeleteBackupPlan. + * @param request DeleteBackupPlanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static verify(message: { [k: string]: any }): (string|null); + public deleteBackupPlan(request: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanCallback): void; /** - * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkforceIdentityBasedManagementURI + * Calls DeleteBackupPlan. + * @param request DeleteBackupPlanRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; + public deleteBackupPlan(request: google.cloud.backupdr.v1.IDeleteBackupPlanRequest): Promise; /** - * Creates a plain object from a WorkforceIdentityBasedManagementURI message. Also converts values to other types if specified. - * @param message WorkforceIdentityBasedManagementURI - * @param [options] Conversion options - * @returns Plain object + * Calls CreateBackupPlanAssociation. + * @param request CreateBackupPlanAssociationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static toObject(message: google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public createBackupPlanAssociation(request: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociationCallback): void; /** - * Converts this WorkforceIdentityBasedManagementURI to JSON. - * @returns JSON object + * Calls CreateBackupPlanAssociation. + * @param request CreateBackupPlanAssociationRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public createBackupPlanAssociation(request: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest): Promise; /** - * Gets the default type url for WorkforceIdentityBasedManagementURI - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls GetBackupPlanAssociation. + * @param request GetBackupPlanAssociationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BackupPlanAssociation */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + public getBackupPlanAssociation(request: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociationCallback): void; - /** Properties of a WorkforceIdentityBasedOAuth2ClientID. */ - interface IWorkforceIdentityBasedOAuth2ClientID { + /** + * Calls GetBackupPlanAssociation. + * @param request GetBackupPlanAssociationRequest message or plain object + * @returns Promise + */ + public getBackupPlanAssociation(request: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest): Promise; - /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId */ - firstPartyOauth2ClientId?: (string|null); + /** + * Calls ListBackupPlanAssociations. + * @param request ListBackupPlanAssociationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupPlanAssociationsResponse + */ + public listBackupPlanAssociations(request: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociationsCallback): void; - /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId */ - thirdPartyOauth2ClientId?: (string|null); - } + /** + * Calls ListBackupPlanAssociations. + * @param request ListBackupPlanAssociationsRequest message or plain object + * @returns Promise + */ + public listBackupPlanAssociations(request: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest): Promise; - /** Represents a WorkforceIdentityBasedOAuth2ClientID. */ - class WorkforceIdentityBasedOAuth2ClientID implements IWorkforceIdentityBasedOAuth2ClientID { + /** + * Calls DeleteBackupPlanAssociation. + * @param request DeleteBackupPlanAssociationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteBackupPlanAssociation(request: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociationCallback): void; /** - * Constructs a new WorkforceIdentityBasedOAuth2ClientID. - * @param [properties] Properties to set + * Calls DeleteBackupPlanAssociation. + * @param request DeleteBackupPlanAssociationRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID); + public deleteBackupPlanAssociation(request: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest): Promise; - /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId. */ - public firstPartyOauth2ClientId: string; + /** + * Calls TriggerBackup. + * @param request TriggerBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public triggerBackup(request: google.cloud.backupdr.v1.ITriggerBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.TriggerBackupCallback): void; - /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId. */ - public thirdPartyOauth2ClientId: string; + /** + * Calls TriggerBackup. + * @param request TriggerBackupRequest message or plain object + * @returns Promise + */ + public triggerBackup(request: google.cloud.backupdr.v1.ITriggerBackupRequest): Promise; + } + + namespace BackupDR { /** - * Creates a new WorkforceIdentityBasedOAuth2ClientID instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkforceIdentityBasedOAuth2ClientID instance + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listManagementServers}. + * @param error Error, if any + * @param [response] ListManagementServersResponse */ - public static create(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; + type ListManagementServersCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListManagementServersResponse) => void; /** - * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. - * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getManagementServer}. + * @param error Error, if any + * @param [response] ManagementServer */ - public static encode(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; + type GetManagementServerCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ManagementServer) => void; /** - * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. - * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createManagementServer}. + * @param error Error, if any + * @param [response] Operation */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; + type CreateManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkforceIdentityBasedOAuth2ClientID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteManagementServer}. + * @param error Error, if any + * @param [response] Operation */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; + type DeleteManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkforceIdentityBasedOAuth2ClientID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupVault}. + * @param error Error, if any + * @param [response] Operation */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; + type CreateBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Verifies a WorkforceIdentityBasedOAuth2ClientID message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupVaults}. + * @param error Error, if any + * @param [response] ListBackupVaultsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + type ListBackupVaultsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupVaultsResponse) => void; /** - * Creates a WorkforceIdentityBasedOAuth2ClientID message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkforceIdentityBasedOAuth2ClientID + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchUsableBackupVaults}. + * @param error Error, if any + * @param [response] FetchUsableBackupVaultsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; + type FetchUsableBackupVaultsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse) => void; /** - * Creates a plain object from a WorkforceIdentityBasedOAuth2ClientID message. Also converts values to other types if specified. - * @param message WorkforceIdentityBasedOAuth2ClientID - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupVault}. + * @param error Error, if any + * @param [response] BackupVault */ - public static toObject(message: google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type GetBackupVaultCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupVault) => void; /** - * Converts this WorkforceIdentityBasedOAuth2ClientID to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackupVault}. + * @param error Error, if any + * @param [response] Operation */ - public toJSON(): { [k: string]: any }; + type UpdateBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Gets the default type url for WorkforceIdentityBasedOAuth2ClientID - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupVault}. + * @param error Error, if any + * @param [response] Operation */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + type DeleteBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** Properties of a ManagementServer. */ - interface IManagementServer { + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; - /** ManagementServer name */ - name?: (string|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listDataSources}. + * @param error Error, if any + * @param [response] ListDataSourcesResponse + */ + type ListDataSourcesCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListDataSourcesResponse) => void; - /** ManagementServer description */ - description?: (string|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getDataSource}. + * @param error Error, if any + * @param [response] DataSource + */ + type GetDataSourceCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.DataSource) => void; - /** ManagementServer labels */ - labels?: ({ [k: string]: string }|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateDataSource}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDataSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|removeDataSource}. + * @param error Error, if any + * @param [response] Operation + */ + type RemoveDataSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|setInternalStatus}. + * @param error Error, if any + * @param [response] Operation + */ + type SetInternalStatusCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer type */ - type?: (google.cloud.backupdr.v1.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceType|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|initiateBackup}. + * @param error Error, if any + * @param [response] InitiateBackupResponse + */ + type InitiateBackupCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.InitiateBackupResponse) => void; - /** ManagementServer managementUri */ - managementUri?: (google.cloud.backupdr.v1.IManagementURI|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|abandonBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type AbandonBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer workforceIdentityBasedManagementUri */ - workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|finalizeBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type FinalizeBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer state */ - state?: (google.cloud.backupdr.v1.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceState|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchAccessToken}. + * @param error Error, if any + * @param [response] FetchAccessTokenResponse + */ + type FetchAccessTokenCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.FetchAccessTokenResponse) => void; - /** ManagementServer networks */ - networks?: (google.cloud.backupdr.v1.INetworkConfig[]|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackups}. + * @param error Error, if any + * @param [response] ListBackupsResponse + */ + type ListBackupsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupsResponse) => void; - /** ManagementServer etag */ - etag?: (string|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackup}. + * @param error Error, if any + * @param [response] Backup + */ + type GetBackupCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.Backup) => void; - /** ManagementServer oauth2ClientId */ - oauth2ClientId?: (string|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer workforceIdentityBasedOauth2ClientId */ - workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer baProxyUri */ - baProxyUri?: (string[]|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|restoreBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type RestoreBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer satisfiesPzs */ - satisfiesPzs?: (google.protobuf.IBoolValue|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlan}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBackupPlanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer satisfiesPzi */ - satisfiesPzi?: (boolean|null); - } + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlan}. + * @param error Error, if any + * @param [response] BackupPlan + */ + type GetBackupPlanCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupPlan) => void; - /** Represents a ManagementServer. */ - class ManagementServer implements IManagementServer { + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlans}. + * @param error Error, if any + * @param [response] ListBackupPlansResponse + */ + type ListBackupPlansCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupPlansResponse) => void; /** - * Constructs a new ManagementServer. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlan}. + * @param error Error, if any + * @param [response] Operation */ - constructor(properties?: google.cloud.backupdr.v1.IManagementServer); + type DeleteBackupPlanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer name. */ - public name: string; - - /** ManagementServer description. */ - public description: string; - - /** ManagementServer labels. */ - public labels: { [k: string]: string }; - - /** ManagementServer createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** ManagementServer updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlanAssociation}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBackupPlanAssociationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer type. */ - public type: (google.cloud.backupdr.v1.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceType); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlanAssociation}. + * @param error Error, if any + * @param [response] BackupPlanAssociation + */ + type GetBackupPlanAssociationCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupPlanAssociation) => void; - /** ManagementServer managementUri. */ - public managementUri?: (google.cloud.backupdr.v1.IManagementURI|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlanAssociations}. + * @param error Error, if any + * @param [response] ListBackupPlanAssociationsResponse + */ + type ListBackupPlanAssociationsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse) => void; - /** ManagementServer workforceIdentityBasedManagementUri. */ - public workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlanAssociation}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteBackupPlanAssociationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer state. */ - public state: (google.cloud.backupdr.v1.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceState); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|triggerBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type TriggerBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } - /** ManagementServer networks. */ - public networks: google.cloud.backupdr.v1.INetworkConfig[]; + /** Properties of a NetworkConfig. */ + interface INetworkConfig { - /** ManagementServer etag. */ - public etag: string; + /** NetworkConfig network */ + network?: (string|null); - /** ManagementServer oauth2ClientId. */ - public oauth2ClientId: string; + /** NetworkConfig peeringMode */ + peeringMode?: (google.cloud.backupdr.v1.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1.NetworkConfig.PeeringMode|null); + } - /** ManagementServer workforceIdentityBasedOauth2ClientId. */ - public workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null); + /** Represents a NetworkConfig. */ + class NetworkConfig implements INetworkConfig { - /** ManagementServer baProxyUri. */ - public baProxyUri: string[]; + /** + * Constructs a new NetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.INetworkConfig); - /** ManagementServer satisfiesPzs. */ - public satisfiesPzs?: (google.protobuf.IBoolValue|null); + /** NetworkConfig network. */ + public network: string; - /** ManagementServer satisfiesPzi. */ - public satisfiesPzi: boolean; + /** NetworkConfig peeringMode. */ + public peeringMode: (google.cloud.backupdr.v1.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1.NetworkConfig.PeeringMode); /** - * Creates a new ManagementServer instance using the specified properties. + * Creates a new NetworkConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ManagementServer instance + * @returns NetworkConfig instance */ - public static create(properties?: google.cloud.backupdr.v1.IManagementServer): google.cloud.backupdr.v1.ManagementServer; + public static create(properties?: google.cloud.backupdr.v1.INetworkConfig): google.cloud.backupdr.v1.NetworkConfig; /** - * Encodes the specified ManagementServer message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. - * @param message ManagementServer message or plain object to encode + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ManagementServer message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. - * @param message ManagementServer message or plain object to encode + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ManagementServer message from the specified reader or buffer. + * Decodes a NetworkConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ManagementServer + * @returns NetworkConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ManagementServer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkConfig; /** - * Decodes a ManagementServer message from the specified reader or buffer, length delimited. + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ManagementServer + * @returns NetworkConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ManagementServer; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkConfig; /** - * Verifies a ManagementServer message. + * Verifies a NetworkConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ManagementServer message from a plain object. Also converts values to their respective internal types. + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ManagementServer + * @returns NetworkConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ManagementServer; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkConfig; /** - * Creates a plain object from a ManagementServer message. Also converts values to other types if specified. - * @param message ManagementServer + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @param message NetworkConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.ManagementServer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ManagementServer to JSON. + * Converts this NetworkConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ManagementServer + * Gets the default type url for NetworkConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ManagementServer { - - /** InstanceType enum. */ - enum InstanceType { - INSTANCE_TYPE_UNSPECIFIED = 0, - BACKUP_RESTORE = 1 - } + namespace NetworkConfig { - /** InstanceState enum. */ - enum InstanceState { - INSTANCE_STATE_UNSPECIFIED = 0, - CREATING = 1, - READY = 2, - UPDATING = 3, - DELETING = 4, - REPAIRING = 5, - MAINTENANCE = 6, - ERROR = 7 + /** PeeringMode enum. */ + enum PeeringMode { + PEERING_MODE_UNSPECIFIED = 0, + PRIVATE_SERVICE_ACCESS = 1 } } - /** Properties of a ListManagementServersRequest. */ - interface IListManagementServersRequest { - - /** ListManagementServersRequest parent */ - parent?: (string|null); - - /** ListManagementServersRequest pageSize */ - pageSize?: (number|null); - - /** ListManagementServersRequest pageToken */ - pageToken?: (string|null); + /** Properties of a ManagementURI. */ + interface IManagementURI { - /** ListManagementServersRequest filter */ - filter?: (string|null); + /** ManagementURI webUi */ + webUi?: (string|null); - /** ListManagementServersRequest orderBy */ - orderBy?: (string|null); + /** ManagementURI api */ + api?: (string|null); } - /** Represents a ListManagementServersRequest. */ - class ListManagementServersRequest implements IListManagementServersRequest { + /** Represents a ManagementURI. */ + class ManagementURI implements IManagementURI { /** - * Constructs a new ListManagementServersRequest. + * Constructs a new ManagementURI. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IListManagementServersRequest); - - /** ListManagementServersRequest parent. */ - public parent: string; - - /** ListManagementServersRequest pageSize. */ - public pageSize: number; - - /** ListManagementServersRequest pageToken. */ - public pageToken: string; - - /** ListManagementServersRequest filter. */ - public filter?: (string|null); - - /** ListManagementServersRequest orderBy. */ - public orderBy?: (string|null); + constructor(properties?: google.cloud.backupdr.v1.IManagementURI); - /** ListManagementServersRequest _filter. */ - public _filter?: "filter"; + /** ManagementURI webUi. */ + public webUi: string; - /** ListManagementServersRequest _orderBy. */ - public _orderBy?: "orderBy"; + /** ManagementURI api. */ + public api: string; /** - * Creates a new ListManagementServersRequest instance using the specified properties. + * Creates a new ManagementURI instance using the specified properties. * @param [properties] Properties to set - * @returns ListManagementServersRequest instance + * @returns ManagementURI instance */ - public static create(properties?: google.cloud.backupdr.v1.IListManagementServersRequest): google.cloud.backupdr.v1.ListManagementServersRequest; + public static create(properties?: google.cloud.backupdr.v1.IManagementURI): google.cloud.backupdr.v1.ManagementURI; /** - * Encodes the specified ListManagementServersRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. - * @param message ListManagementServersRequest message or plain object to encode + * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. + * @param message ManagementURI message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListManagementServersRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. - * @param message ListManagementServersRequest message or plain object to encode + * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. + * @param message ManagementURI message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListManagementServersRequest message from the specified reader or buffer. + * Decodes a ManagementURI message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListManagementServersRequest + * @returns ManagementURI * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListManagementServersRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ManagementURI; /** - * Decodes a ListManagementServersRequest message from the specified reader or buffer, length delimited. + * Decodes a ManagementURI message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListManagementServersRequest + * @returns ManagementURI * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListManagementServersRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ManagementURI; /** - * Verifies a ListManagementServersRequest message. + * Verifies a ManagementURI message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListManagementServersRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListManagementServersRequest + * @returns ManagementURI */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListManagementServersRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ManagementURI; /** - * Creates a plain object from a ListManagementServersRequest message. Also converts values to other types if specified. - * @param message ListManagementServersRequest + * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. + * @param message ManagementURI * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.ListManagementServersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.ManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListManagementServersRequest to JSON. + * Converts this ManagementURI to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListManagementServersRequest + * Gets the default type url for ManagementURI * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListManagementServersResponse. */ - interface IListManagementServersResponse { - - /** ListManagementServersResponse managementServers */ - managementServers?: (google.cloud.backupdr.v1.IManagementServer[]|null); + /** Properties of a WorkforceIdentityBasedManagementURI. */ + interface IWorkforceIdentityBasedManagementURI { - /** ListManagementServersResponse nextPageToken */ - nextPageToken?: (string|null); + /** WorkforceIdentityBasedManagementURI firstPartyManagementUri */ + firstPartyManagementUri?: (string|null); - /** ListManagementServersResponse unreachable */ - unreachable?: (string[]|null); + /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri */ + thirdPartyManagementUri?: (string|null); } - /** Represents a ListManagementServersResponse. */ - class ListManagementServersResponse implements IListManagementServersResponse { + /** Represents a WorkforceIdentityBasedManagementURI. */ + class WorkforceIdentityBasedManagementURI implements IWorkforceIdentityBasedManagementURI { /** - * Constructs a new ListManagementServersResponse. + * Constructs a new WorkforceIdentityBasedManagementURI. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IListManagementServersResponse); - - /** ListManagementServersResponse managementServers. */ - public managementServers: google.cloud.backupdr.v1.IManagementServer[]; + constructor(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI); - /** ListManagementServersResponse nextPageToken. */ - public nextPageToken: string; + /** WorkforceIdentityBasedManagementURI firstPartyManagementUri. */ + public firstPartyManagementUri: string; - /** ListManagementServersResponse unreachable. */ - public unreachable: string[]; + /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri. */ + public thirdPartyManagementUri: string; /** - * Creates a new ListManagementServersResponse instance using the specified properties. + * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. * @param [properties] Properties to set - * @returns ListManagementServersResponse instance + * @returns WorkforceIdentityBasedManagementURI instance */ - public static create(properties?: google.cloud.backupdr.v1.IListManagementServersResponse): google.cloud.backupdr.v1.ListManagementServersResponse; + public static create(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; /** - * Encodes the specified ListManagementServersResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. - * @param message ListManagementServersResponse message or plain object to encode + * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * @param message WorkforceIdentityBasedManagementURI message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IListManagementServersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListManagementServersResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. - * @param message ListManagementServersResponse message or plain object to encode + * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * @param message WorkforceIdentityBasedManagementURI message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListManagementServersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListManagementServersResponse message from the specified reader or buffer. + * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListManagementServersResponse + * @returns WorkforceIdentityBasedManagementURI * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListManagementServersResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; /** - * Decodes a ListManagementServersResponse message from the specified reader or buffer, length delimited. + * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListManagementServersResponse + * @returns WorkforceIdentityBasedManagementURI * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListManagementServersResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; /** - * Verifies a ListManagementServersResponse message. + * Verifies a WorkforceIdentityBasedManagementURI message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListManagementServersResponse message from a plain object. Also converts values to their respective internal types. + * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListManagementServersResponse + * @returns WorkforceIdentityBasedManagementURI */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListManagementServersResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; /** - * Creates a plain object from a ListManagementServersResponse message. Also converts values to other types if specified. - * @param message ListManagementServersResponse + * Creates a plain object from a WorkforceIdentityBasedManagementURI message. Also converts values to other types if specified. + * @param message WorkforceIdentityBasedManagementURI * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.ListManagementServersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListManagementServersResponse to JSON. + * Converts this WorkforceIdentityBasedManagementURI to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListManagementServersResponse + * Gets the default type url for WorkforceIdentityBasedManagementURI * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetManagementServerRequest. */ - interface IGetManagementServerRequest { + /** Properties of a WorkforceIdentityBasedOAuth2ClientID. */ + interface IWorkforceIdentityBasedOAuth2ClientID { - /** GetManagementServerRequest name */ - name?: (string|null); + /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId */ + firstPartyOauth2ClientId?: (string|null); + + /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId */ + thirdPartyOauth2ClientId?: (string|null); } - /** Represents a GetManagementServerRequest. */ - class GetManagementServerRequest implements IGetManagementServerRequest { + /** Represents a WorkforceIdentityBasedOAuth2ClientID. */ + class WorkforceIdentityBasedOAuth2ClientID implements IWorkforceIdentityBasedOAuth2ClientID { /** - * Constructs a new GetManagementServerRequest. + * Constructs a new WorkforceIdentityBasedOAuth2ClientID. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IGetManagementServerRequest); + constructor(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID); - /** GetManagementServerRequest name. */ - public name: string; + /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId. */ + public firstPartyOauth2ClientId: string; + + /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId. */ + public thirdPartyOauth2ClientId: string; /** - * Creates a new GetManagementServerRequest instance using the specified properties. + * Creates a new WorkforceIdentityBasedOAuth2ClientID instance using the specified properties. * @param [properties] Properties to set - * @returns GetManagementServerRequest instance + * @returns WorkforceIdentityBasedOAuth2ClientID instance */ - public static create(properties?: google.cloud.backupdr.v1.IGetManagementServerRequest): google.cloud.backupdr.v1.GetManagementServerRequest; + public static create(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; /** - * Encodes the specified GetManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. - * @param message GetManagementServerRequest message or plain object to encode + * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. + * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. - * @param message GetManagementServerRequest message or plain object to encode + * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. + * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetManagementServerRequest message from the specified reader or buffer. + * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetManagementServerRequest + * @returns WorkforceIdentityBasedOAuth2ClientID * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetManagementServerRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; /** - * Decodes a GetManagementServerRequest message from the specified reader or buffer, length delimited. + * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetManagementServerRequest + * @returns WorkforceIdentityBasedOAuth2ClientID * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetManagementServerRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; /** - * Verifies a GetManagementServerRequest message. + * Verifies a WorkforceIdentityBasedOAuth2ClientID message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a WorkforceIdentityBasedOAuth2ClientID message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetManagementServerRequest + * @returns WorkforceIdentityBasedOAuth2ClientID */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetManagementServerRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; /** - * Creates a plain object from a GetManagementServerRequest message. Also converts values to other types if specified. - * @param message GetManagementServerRequest + * Creates a plain object from a WorkforceIdentityBasedOAuth2ClientID message. Also converts values to other types if specified. + * @param message WorkforceIdentityBasedOAuth2ClientID * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.GetManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetManagementServerRequest to JSON. + * Converts this WorkforceIdentityBasedOAuth2ClientID to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetManagementServerRequest + * Gets the default type url for WorkforceIdentityBasedOAuth2ClientID * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateManagementServerRequest. */ - interface ICreateManagementServerRequest { + /** Properties of a ManagementServer. */ + interface IManagementServer { - /** CreateManagementServerRequest parent */ - parent?: (string|null); + /** ManagementServer name */ + name?: (string|null); - /** CreateManagementServerRequest managementServerId */ - managementServerId?: (string|null); + /** ManagementServer description */ + description?: (string|null); - /** CreateManagementServerRequest managementServer */ - managementServer?: (google.cloud.backupdr.v1.IManagementServer|null); + /** ManagementServer labels */ + labels?: ({ [k: string]: string }|null); - /** CreateManagementServerRequest requestId */ - requestId?: (string|null); - } + /** ManagementServer createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** Represents a CreateManagementServerRequest. */ - class CreateManagementServerRequest implements ICreateManagementServerRequest { + /** ManagementServer updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** - * Constructs a new CreateManagementServerRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ICreateManagementServerRequest); + /** ManagementServer type */ + type?: (google.cloud.backupdr.v1.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceType|null); - /** CreateManagementServerRequest parent. */ - public parent: string; + /** ManagementServer managementUri */ + managementUri?: (google.cloud.backupdr.v1.IManagementURI|null); - /** CreateManagementServerRequest managementServerId. */ - public managementServerId: string; + /** ManagementServer workforceIdentityBasedManagementUri */ + workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null); - /** CreateManagementServerRequest managementServer. */ - public managementServer?: (google.cloud.backupdr.v1.IManagementServer|null); + /** ManagementServer state */ + state?: (google.cloud.backupdr.v1.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceState|null); - /** CreateManagementServerRequest requestId. */ - public requestId: string; + /** ManagementServer networks */ + networks?: (google.cloud.backupdr.v1.INetworkConfig[]|null); - /** - * Creates a new CreateManagementServerRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateManagementServerRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ICreateManagementServerRequest): google.cloud.backupdr.v1.CreateManagementServerRequest; + /** ManagementServer etag */ + etag?: (string|null); - /** - * Encodes the specified CreateManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. - * @param message CreateManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** ManagementServer oauth2ClientId */ + oauth2ClientId?: (string|null); - /** - * Encodes the specified CreateManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. - * @param message CreateManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** ManagementServer workforceIdentityBasedOauth2ClientId */ + workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null); - /** - * Decodes a CreateManagementServerRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateManagementServerRequest; + /** ManagementServer baProxyUri */ + baProxyUri?: (string[]|null); - /** - * Decodes a CreateManagementServerRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateManagementServerRequest; + /** ManagementServer satisfiesPzs */ + satisfiesPzs?: (google.protobuf.IBoolValue|null); - /** - * Verifies a CreateManagementServerRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ManagementServer satisfiesPzi */ + satisfiesPzi?: (boolean|null); + } + + /** Represents a ManagementServer. */ + class ManagementServer implements IManagementServer { /** - * Creates a CreateManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateManagementServerRequest + * Constructs a new ManagementServer. + * @param [properties] Properties to set */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateManagementServerRequest; + constructor(properties?: google.cloud.backupdr.v1.IManagementServer); - /** - * Creates a plain object from a CreateManagementServerRequest message. Also converts values to other types if specified. - * @param message CreateManagementServerRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.CreateManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ManagementServer name. */ + public name: string; - /** - * Converts this CreateManagementServerRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ManagementServer description. */ + public description: string; - /** - * Gets the default type url for CreateManagementServerRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** ManagementServer labels. */ + public labels: { [k: string]: string }; - /** Properties of a DeleteManagementServerRequest. */ - interface IDeleteManagementServerRequest { + /** ManagementServer createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** DeleteManagementServerRequest name */ - name?: (string|null); + /** ManagementServer updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** DeleteManagementServerRequest requestId */ - requestId?: (string|null); - } + /** ManagementServer type. */ + public type: (google.cloud.backupdr.v1.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceType); - /** Represents a DeleteManagementServerRequest. */ - class DeleteManagementServerRequest implements IDeleteManagementServerRequest { + /** ManagementServer managementUri. */ + public managementUri?: (google.cloud.backupdr.v1.IManagementURI|null); - /** - * Constructs a new DeleteManagementServerRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDeleteManagementServerRequest); + /** ManagementServer workforceIdentityBasedManagementUri. */ + public workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null); - /** DeleteManagementServerRequest name. */ - public name: string; + /** ManagementServer state. */ + public state: (google.cloud.backupdr.v1.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceState); - /** DeleteManagementServerRequest requestId. */ - public requestId: string; + /** ManagementServer networks. */ + public networks: google.cloud.backupdr.v1.INetworkConfig[]; + + /** ManagementServer etag. */ + public etag: string; + + /** ManagementServer oauth2ClientId. */ + public oauth2ClientId: string; + + /** ManagementServer workforceIdentityBasedOauth2ClientId. */ + public workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null); + + /** ManagementServer baProxyUri. */ + public baProxyUri: string[]; + + /** ManagementServer satisfiesPzs. */ + public satisfiesPzs?: (google.protobuf.IBoolValue|null); + + /** ManagementServer satisfiesPzi. */ + public satisfiesPzi: boolean; /** - * Creates a new DeleteManagementServerRequest instance using the specified properties. + * Creates a new ManagementServer instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteManagementServerRequest instance + * @returns ManagementServer instance */ - public static create(properties?: google.cloud.backupdr.v1.IDeleteManagementServerRequest): google.cloud.backupdr.v1.DeleteManagementServerRequest; + public static create(properties?: google.cloud.backupdr.v1.IManagementServer): google.cloud.backupdr.v1.ManagementServer; /** - * Encodes the specified DeleteManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. - * @param message DeleteManagementServerRequest message or plain object to encode + * Encodes the specified ManagementServer message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. + * @param message ManagementServer message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. - * @param message DeleteManagementServerRequest message or plain object to encode + * Encodes the specified ManagementServer message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. + * @param message ManagementServer message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteManagementServerRequest message from the specified reader or buffer. + * Decodes a ManagementServer message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteManagementServerRequest + * @returns ManagementServer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteManagementServerRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ManagementServer; /** - * Decodes a DeleteManagementServerRequest message from the specified reader or buffer, length delimited. + * Decodes a ManagementServer message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteManagementServerRequest + * @returns ManagementServer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteManagementServerRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ManagementServer; /** - * Verifies a DeleteManagementServerRequest message. + * Verifies a ManagementServer message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ManagementServer message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteManagementServerRequest + * @returns ManagementServer */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteManagementServerRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ManagementServer; /** - * Creates a plain object from a DeleteManagementServerRequest message. Also converts values to other types if specified. - * @param message DeleteManagementServerRequest + * Creates a plain object from a ManagementServer message. Also converts values to other types if specified. + * @param message ManagementServer * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.DeleteManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.ManagementServer, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteManagementServerRequest to JSON. + * Converts this ManagementServer to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteManagementServerRequest + * Gets the default type url for ManagementServer * @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 { + namespace ManagementServer { - /** OperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** InstanceType enum. */ + enum InstanceType { + INSTANCE_TYPE_UNSPECIFIED = 0, + BACKUP_RESTORE = 1 + } - /** OperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** InstanceState enum. */ + enum InstanceState { + INSTANCE_STATE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2, + UPDATING = 3, + DELETING = 4, + REPAIRING = 5, + MAINTENANCE = 6, + ERROR = 7 + } + } - /** OperationMetadata target */ - target?: (string|null); + /** Properties of a ListManagementServersRequest. */ + interface IListManagementServersRequest { - /** OperationMetadata verb */ - verb?: (string|null); + /** ListManagementServersRequest parent */ + parent?: (string|null); - /** OperationMetadata statusMessage */ - statusMessage?: (string|null); + /** ListManagementServersRequest pageSize */ + pageSize?: (number|null); - /** OperationMetadata requestedCancellation */ - requestedCancellation?: (boolean|null); + /** ListManagementServersRequest pageToken */ + pageToken?: (string|null); - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); + /** ListManagementServersRequest filter */ + filter?: (string|null); - /** OperationMetadata additionalInfo */ - additionalInfo?: ({ [k: string]: string }|null); + /** ListManagementServersRequest orderBy */ + orderBy?: (string|null); } - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { + /** Represents a ListManagementServersRequest. */ + class ListManagementServersRequest implements IListManagementServersRequest { /** - * Constructs a new OperationMetadata. + * Constructs a new ListManagementServersRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IOperationMetadata); - - /** OperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.backupdr.v1.IListManagementServersRequest); - /** OperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** ListManagementServersRequest parent. */ + public parent: string; - /** OperationMetadata target. */ - public target: string; + /** ListManagementServersRequest pageSize. */ + public pageSize: number; - /** OperationMetadata verb. */ - public verb: string; + /** ListManagementServersRequest pageToken. */ + public pageToken: string; - /** OperationMetadata statusMessage. */ - public statusMessage: string; + /** ListManagementServersRequest filter. */ + public filter?: (string|null); - /** OperationMetadata requestedCancellation. */ - public requestedCancellation: boolean; + /** ListManagementServersRequest orderBy. */ + public orderBy?: (string|null); - /** OperationMetadata apiVersion. */ - public apiVersion: string; + /** ListManagementServersRequest _filter. */ + public _filter?: "filter"; - /** OperationMetadata additionalInfo. */ - public additionalInfo: { [k: string]: string }; + /** ListManagementServersRequest _orderBy. */ + public _orderBy?: "orderBy"; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new ListManagementServersRequest instance using the specified properties. * @param [properties] Properties to set - * @returns OperationMetadata instance + * @returns ListManagementServersRequest instance */ - public static create(properties?: google.cloud.backupdr.v1.IOperationMetadata): google.cloud.backupdr.v1.OperationMetadata; + public static create(properties?: google.cloud.backupdr.v1.IListManagementServersRequest): google.cloud.backupdr.v1.ListManagementServersRequest; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.backupdr.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified ListManagementServersRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. + * @param message ListManagementServersRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified ListManagementServersRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. + * @param message ListManagementServersRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a ListManagementServersRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OperationMetadata + * @returns ListManagementServersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.OperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListManagementServersRequest; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListManagementServersRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OperationMetadata + * @returns ListManagementServersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.OperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListManagementServersRequest; /** - * Verifies an OperationMetadata message. + * Verifies a ListManagementServersRequest message. * @param message Plain 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. + * Creates a ListManagementServersRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OperationMetadata + * @returns ListManagementServersRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.OperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListManagementServersRequest; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata + * Creates a plain object from a ListManagementServersRequest message. Also converts values to other types if specified. + * @param message ListManagementServersRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.ListManagementServersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OperationMetadata to JSON. + * Converts this ListManagementServersRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for ListManagementServersRequest * @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 ListManagementServersResponse. */ + interface IListManagementServersResponse { - /** Properties of a Http. */ - interface IHttp { + /** ListManagementServersResponse managementServers */ + managementServers?: (google.cloud.backupdr.v1.IManagementServer[]|null); - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** ListManagementServersResponse nextPageToken */ + nextPageToken?: (string|null); - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } + /** ListManagementServersResponse unreachable */ + unreachable?: (string[]|null); + } - /** Represents a Http. */ - class Http implements IHttp { + /** Represents a ListManagementServersResponse. */ + class ListManagementServersResponse implements IListManagementServersResponse { - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); + /** + * Constructs a new ListManagementServersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListManagementServersResponse); - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** ListManagementServersResponse managementServers. */ + public managementServers: google.cloud.backupdr.v1.IManagementServer[]; - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** ListManagementServersResponse nextPageToken. */ + public nextPageToken: string; - /** - * 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; + /** ListManagementServersResponse unreachable. */ + public unreachable: string[]; - /** - * 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; + /** + * Creates a new ListManagementServersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListManagementServersResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListManagementServersResponse): google.cloud.backupdr.v1.ListManagementServersResponse; - /** - * 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; + /** + * Encodes the specified ListManagementServersResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. + * @param message ListManagementServersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListManagementServersResponse, 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; + /** + * Encodes the specified ListManagementServersResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. + * @param message ListManagementServersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListManagementServersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes a ListManagementServersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListManagementServersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListManagementServersResponse; - /** - * 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); + /** + * Decodes a ListManagementServersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListManagementServersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListManagementServersResponse; - /** - * 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; + /** + * Verifies a ListManagementServersResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * 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 }; + /** + * Creates a ListManagementServersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListManagementServersResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListManagementServersResponse; - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a ListManagementServersResponse message. Also converts values to other types if specified. + * @param message ListManagementServersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListManagementServersResponse, options?: $protobuf.IConversionOptions): { [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; - } + /** + * Converts this ListManagementServersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a HttpRule. */ - interface IHttpRule { + /** + * Gets the default type url for ListManagementServersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** HttpRule selector */ - selector?: (string|null); + /** Properties of a GetManagementServerRequest. */ + interface IGetManagementServerRequest { - /** HttpRule get */ - get?: (string|null); + /** GetManagementServerRequest name */ + name?: (string|null); + } - /** HttpRule put */ - put?: (string|null); + /** Represents a GetManagementServerRequest. */ + class GetManagementServerRequest implements IGetManagementServerRequest { - /** HttpRule post */ - post?: (string|null); + /** + * Constructs a new GetManagementServerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetManagementServerRequest); - /** HttpRule delete */ - "delete"?: (string|null); + /** GetManagementServerRequest name. */ + public name: string; - /** HttpRule patch */ - patch?: (string|null); + /** + * Creates a new GetManagementServerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetManagementServerRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetManagementServerRequest): google.cloud.backupdr.v1.GetManagementServerRequest; - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); + /** + * Encodes the specified GetManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. + * @param message GetManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRule body */ - body?: (string|null); + /** + * Encodes the specified GetManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. + * @param message GetManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRule responseBody */ - responseBody?: (string|null); + /** + * Decodes a GetManagementServerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetManagementServerRequest; - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } + /** + * Decodes a GetManagementServerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetManagementServerRequest; - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); + /** + * Verifies a GetManagementServerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** HttpRule selector. */ - public selector: string; + /** + * Creates a GetManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetManagementServerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetManagementServerRequest; - /** HttpRule get. */ - public get?: (string|null); + /** + * Creates a plain object from a GetManagementServerRequest message. Also converts values to other types if specified. + * @param message GetManagementServerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** HttpRule put. */ - public put?: (string|null); + /** + * Converts this GetManagementServerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** HttpRule post. */ - public post?: (string|null); + /** + * Gets the default type url for GetManagementServerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** HttpRule delete. */ - public delete?: (string|null); + /** Properties of a CreateManagementServerRequest. */ + interface ICreateManagementServerRequest { - /** HttpRule patch. */ - public patch?: (string|null); + /** CreateManagementServerRequest parent */ + parent?: (string|null); - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); + /** CreateManagementServerRequest managementServerId */ + managementServerId?: (string|null); - /** HttpRule body. */ - public body: string; + /** CreateManagementServerRequest managementServer */ + managementServer?: (google.cloud.backupdr.v1.IManagementServer|null); - /** HttpRule responseBody. */ - public responseBody: string; + /** CreateManagementServerRequest requestId */ + requestId?: (string|null); + } - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + /** Represents a CreateManagementServerRequest. */ + class CreateManagementServerRequest implements ICreateManagementServerRequest { - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** + * Constructs a new CreateManagementServerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICreateManagementServerRequest); - /** - * 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; + /** CreateManagementServerRequest parent. */ + public parent: string; - /** - * 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; + /** CreateManagementServerRequest managementServerId. */ + public managementServerId: string; - /** - * 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; + /** CreateManagementServerRequest managementServer. */ + public managementServer?: (google.cloud.backupdr.v1.IManagementServer|null); - /** - * 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; + /** CreateManagementServerRequest requestId. */ + public requestId: string; - /** - * 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; + /** + * Creates a new CreateManagementServerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateManagementServerRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICreateManagementServerRequest): google.cloud.backupdr.v1.CreateManagementServerRequest; - /** - * 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); + /** + * Encodes the specified CreateManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. + * @param message CreateManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Encodes the specified CreateManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. + * @param message CreateManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Decodes a CreateManagementServerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateManagementServerRequest; - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a CreateManagementServerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateManagementServerRequest; - /** - * 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; - } + /** + * Verifies a CreateManagementServerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + /** + * Creates a CreateManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateManagementServerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateManagementServerRequest; - /** CustomHttpPattern kind */ - kind?: (string|null); + /** + * Creates a plain object from a CreateManagementServerRequest message. Also converts values to other types if specified. + * @param message CreateManagementServerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CreateManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** CustomHttpPattern path */ - path?: (string|null); - } + /** + * Converts this CreateManagementServerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** + * Gets the default type url for CreateManagementServerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); + /** Properties of a DeleteManagementServerRequest. */ + interface IDeleteManagementServerRequest { - /** CustomHttpPattern kind. */ - public kind: string; + /** DeleteManagementServerRequest name */ + name?: (string|null); - /** CustomHttpPattern path. */ - public path: string; + /** DeleteManagementServerRequest requestId */ + requestId?: (string|null); + } - /** - * 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; + /** Represents a DeleteManagementServerRequest. */ + class DeleteManagementServerRequest implements IDeleteManagementServerRequest { + + /** + * Constructs a new DeleteManagementServerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteManagementServerRequest); + + /** DeleteManagementServerRequest name. */ + public name: string; + + /** DeleteManagementServerRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteManagementServerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteManagementServerRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteManagementServerRequest): google.cloud.backupdr.v1.DeleteManagementServerRequest; + + /** + * Encodes the specified DeleteManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. + * @param message DeleteManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. + * @param message DeleteManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteManagementServerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteManagementServerRequest; + + /** + * Decodes a DeleteManagementServerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteManagementServerRequest; + + /** + * Verifies a DeleteManagementServerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteManagementServerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteManagementServerRequest; + + /** + * Creates a plain object from a DeleteManagementServerRequest message. Also converts values to other types if specified. + * @param message DeleteManagementServerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteManagementServerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteManagementServerRequest + * @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 additionalInfo */ + additionalInfo?: ({ [k: string]: string }|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.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 additionalInfo. */ + public additionalInfo: { [k: string]: string }; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.backupdr.v1.IOperationMetadata): google.cloud.backupdr.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.backupdr.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.backupdr.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.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.backupdr.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.backupdr.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.backupdr.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.backupdr.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.backupdr.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 BackupPlan. */ + interface IBackupPlan { + + /** BackupPlan name */ + name?: (string|null); + + /** BackupPlan description */ + description?: (string|null); + + /** BackupPlan labels */ + labels?: ({ [k: string]: string }|null); + + /** BackupPlan createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan backupRules */ + backupRules?: (google.cloud.backupdr.v1.IBackupRule[]|null); + + /** BackupPlan state */ + state?: (google.cloud.backupdr.v1.BackupPlan.State|keyof typeof google.cloud.backupdr.v1.BackupPlan.State|null); + + /** BackupPlan resourceType */ + resourceType?: (string|null); + + /** BackupPlan etag */ + etag?: (string|null); + + /** BackupPlan backupVault */ + backupVault?: (string|null); + + /** BackupPlan backupVaultServiceAccount */ + backupVaultServiceAccount?: (string|null); + } + + /** Represents a BackupPlan. */ + class BackupPlan implements IBackupPlan { + + /** + * Constructs a new BackupPlan. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupPlan); + + /** BackupPlan name. */ + public name: string; + + /** BackupPlan description. */ + public description: string; + + /** BackupPlan labels. */ + public labels: { [k: string]: string }; + + /** BackupPlan createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan backupRules. */ + public backupRules: google.cloud.backupdr.v1.IBackupRule[]; + + /** BackupPlan state. */ + public state: (google.cloud.backupdr.v1.BackupPlan.State|keyof typeof google.cloud.backupdr.v1.BackupPlan.State); + + /** BackupPlan resourceType. */ + public resourceType: string; + + /** BackupPlan etag. */ + public etag: string; + + /** BackupPlan backupVault. */ + public backupVault: string; + + /** BackupPlan backupVaultServiceAccount. */ + public backupVaultServiceAccount: string; + + /** + * Creates a new BackupPlan instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupPlan instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupPlan): google.cloud.backupdr.v1.BackupPlan; + + /** + * Encodes the specified BackupPlan message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. + * @param message BackupPlan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupPlan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupPlan message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. + * @param message BackupPlan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupPlan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupPlan message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupPlan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupPlan; + + /** + * Decodes a BackupPlan message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupPlan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupPlan; + + /** + * Verifies a BackupPlan message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupPlan message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupPlan + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupPlan; + + /** + * Creates a plain object from a BackupPlan message. Also converts values to other types if specified. + * @param message BackupPlan + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupPlan, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupPlan to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupPlan + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupPlan { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + INACTIVE = 4 + } + } + + /** Properties of a BackupRule. */ + interface IBackupRule { + + /** BackupRule ruleId */ + ruleId?: (string|null); + + /** BackupRule backupRetentionDays */ + backupRetentionDays?: (number|null); + + /** BackupRule standardSchedule */ + standardSchedule?: (google.cloud.backupdr.v1.IStandardSchedule|null); + } + + /** Represents a BackupRule. */ + class BackupRule implements IBackupRule { + + /** + * Constructs a new BackupRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupRule); + + /** BackupRule ruleId. */ + public ruleId: string; + + /** BackupRule backupRetentionDays. */ + public backupRetentionDays: number; + + /** BackupRule standardSchedule. */ + public standardSchedule?: (google.cloud.backupdr.v1.IStandardSchedule|null); + + /** BackupRule backupScheduleOneof. */ + public backupScheduleOneof?: "standardSchedule"; + + /** + * Creates a new BackupRule instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupRule instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupRule): google.cloud.backupdr.v1.BackupRule; + + /** + * Encodes the specified BackupRule message. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. + * @param message BackupRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupRule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. + * @param message BackupRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupRule; + + /** + * Decodes a BackupRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupRule; + + /** + * Verifies a BackupRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupRule; + + /** + * Creates a plain object from a BackupRule message. Also converts values to other types if specified. + * @param message BackupRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StandardSchedule. */ + interface IStandardSchedule { + + /** StandardSchedule recurrenceType */ + recurrenceType?: (google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|keyof typeof google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|null); + + /** StandardSchedule hourlyFrequency */ + hourlyFrequency?: (number|null); + + /** StandardSchedule daysOfWeek */ + daysOfWeek?: (google.type.DayOfWeek[]|null); + + /** StandardSchedule daysOfMonth */ + daysOfMonth?: (number[]|null); + + /** StandardSchedule weekDayOfMonth */ + weekDayOfMonth?: (google.cloud.backupdr.v1.IWeekDayOfMonth|null); + + /** StandardSchedule months */ + months?: (google.type.Month[]|null); + + /** StandardSchedule backupWindow */ + backupWindow?: (google.cloud.backupdr.v1.IBackupWindow|null); + + /** StandardSchedule timeZone */ + timeZone?: (string|null); + } + + /** Represents a StandardSchedule. */ + class StandardSchedule implements IStandardSchedule { + + /** + * Constructs a new StandardSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IStandardSchedule); + + /** StandardSchedule recurrenceType. */ + public recurrenceType: (google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|keyof typeof google.cloud.backupdr.v1.StandardSchedule.RecurrenceType); + + /** StandardSchedule hourlyFrequency. */ + public hourlyFrequency: number; + + /** StandardSchedule daysOfWeek. */ + public daysOfWeek: google.type.DayOfWeek[]; + + /** StandardSchedule daysOfMonth. */ + public daysOfMonth: number[]; + + /** StandardSchedule weekDayOfMonth. */ + public weekDayOfMonth?: (google.cloud.backupdr.v1.IWeekDayOfMonth|null); + + /** StandardSchedule months. */ + public months: google.type.Month[]; + + /** StandardSchedule backupWindow. */ + public backupWindow?: (google.cloud.backupdr.v1.IBackupWindow|null); + + /** StandardSchedule timeZone. */ + public timeZone: string; + + /** + * Creates a new StandardSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns StandardSchedule instance + */ + public static create(properties?: google.cloud.backupdr.v1.IStandardSchedule): google.cloud.backupdr.v1.StandardSchedule; + + /** + * Encodes the specified StandardSchedule message. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. + * @param message StandardSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IStandardSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StandardSchedule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. + * @param message StandardSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IStandardSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StandardSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StandardSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.StandardSchedule; + + /** + * Decodes a StandardSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StandardSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.StandardSchedule; + + /** + * Verifies a StandardSchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StandardSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StandardSchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.StandardSchedule; + + /** + * Creates a plain object from a StandardSchedule message. Also converts values to other types if specified. + * @param message StandardSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.StandardSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StandardSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StandardSchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StandardSchedule { + + /** RecurrenceType enum. */ + enum RecurrenceType { + RECURRENCE_TYPE_UNSPECIFIED = 0, + HOURLY = 1, + DAILY = 2, + WEEKLY = 3, + MONTHLY = 4, + YEARLY = 5 + } + } + + /** Properties of a BackupWindow. */ + interface IBackupWindow { + + /** BackupWindow startHourOfDay */ + startHourOfDay?: (number|null); + + /** BackupWindow endHourOfDay */ + endHourOfDay?: (number|null); + } + + /** Represents a BackupWindow. */ + class BackupWindow implements IBackupWindow { + + /** + * Constructs a new BackupWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupWindow); + + /** BackupWindow startHourOfDay. */ + public startHourOfDay: number; + + /** BackupWindow endHourOfDay. */ + public endHourOfDay: number; + + /** + * Creates a new BackupWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupWindow instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupWindow): google.cloud.backupdr.v1.BackupWindow; + + /** + * Encodes the specified BackupWindow message. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. + * @param message BackupWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupWindow message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. + * @param message BackupWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupWindow; + + /** + * Decodes a BackupWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupWindow; + + /** + * Verifies a BackupWindow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupWindow + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupWindow; + + /** + * Creates a plain object from a BackupWindow message. Also converts values to other types if specified. + * @param message BackupWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupWindow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WeekDayOfMonth. */ + interface IWeekDayOfMonth { + + /** WeekDayOfMonth weekOfMonth */ + weekOfMonth?: (google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|keyof typeof google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|null); + + /** WeekDayOfMonth dayOfWeek */ + dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + } + + /** Represents a WeekDayOfMonth. */ + class WeekDayOfMonth implements IWeekDayOfMonth { + + /** + * Constructs a new WeekDayOfMonth. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IWeekDayOfMonth); + + /** WeekDayOfMonth weekOfMonth. */ + public weekOfMonth: (google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|keyof typeof google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth); + + /** WeekDayOfMonth dayOfWeek. */ + public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); + + /** + * Creates a new WeekDayOfMonth instance using the specified properties. + * @param [properties] Properties to set + * @returns WeekDayOfMonth instance + */ + public static create(properties?: google.cloud.backupdr.v1.IWeekDayOfMonth): google.cloud.backupdr.v1.WeekDayOfMonth; + + /** + * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. + * @param message WeekDayOfMonth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. + * @param message WeekDayOfMonth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WeekDayOfMonth; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WeekDayOfMonth; + + /** + * Verifies a WeekDayOfMonth message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WeekDayOfMonth + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WeekDayOfMonth; + + /** + * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. + * @param message WeekDayOfMonth + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.WeekDayOfMonth, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WeekDayOfMonth to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WeekDayOfMonth + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WeekDayOfMonth { + + /** WeekOfMonth enum. */ + enum WeekOfMonth { + WEEK_OF_MONTH_UNSPECIFIED = 0, + FIRST = 1, + SECOND = 2, + THIRD = 3, + FOURTH = 4, + LAST = 5 + } + } + + /** Properties of a CreateBackupPlanRequest. */ + interface ICreateBackupPlanRequest { + + /** CreateBackupPlanRequest parent */ + parent?: (string|null); + + /** CreateBackupPlanRequest backupPlanId */ + backupPlanId?: (string|null); + + /** CreateBackupPlanRequest backupPlan */ + backupPlan?: (google.cloud.backupdr.v1.IBackupPlan|null); + + /** CreateBackupPlanRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateBackupPlanRequest. */ + class CreateBackupPlanRequest implements ICreateBackupPlanRequest { + + /** + * Constructs a new CreateBackupPlanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICreateBackupPlanRequest); + + /** CreateBackupPlanRequest parent. */ + public parent: string; + + /** CreateBackupPlanRequest backupPlanId. */ + public backupPlanId: string; + + /** CreateBackupPlanRequest backupPlan. */ + public backupPlan?: (google.cloud.backupdr.v1.IBackupPlan|null); + + /** CreateBackupPlanRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateBackupPlanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupPlanRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICreateBackupPlanRequest): google.cloud.backupdr.v1.CreateBackupPlanRequest; + + /** + * Encodes the specified CreateBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. + * @param message CreateBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICreateBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. + * @param message CreateBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupPlanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupPlanRequest; + + /** + * Decodes a CreateBackupPlanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupPlanRequest; + + /** + * Verifies a CreateBackupPlanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupPlanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupPlanRequest; + + /** + * Creates a plain object from a CreateBackupPlanRequest message. Also converts values to other types if specified. + * @param message CreateBackupPlanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CreateBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupPlanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupPlanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlansRequest. */ + interface IListBackupPlansRequest { + + /** ListBackupPlansRequest parent */ + parent?: (string|null); + + /** ListBackupPlansRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupPlansRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupPlansRequest filter */ + filter?: (string|null); + + /** ListBackupPlansRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListBackupPlansRequest. */ + class ListBackupPlansRequest implements IListBackupPlansRequest { + + /** + * Constructs a new ListBackupPlansRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupPlansRequest); + + /** ListBackupPlansRequest parent. */ + public parent: string; + + /** ListBackupPlansRequest pageSize. */ + public pageSize: number; + + /** ListBackupPlansRequest pageToken. */ + public pageToken: string; + + /** ListBackupPlansRequest filter. */ + public filter: string; + + /** ListBackupPlansRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListBackupPlansRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlansRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupPlansRequest): google.cloud.backupdr.v1.ListBackupPlansRequest; + + /** + * Encodes the specified ListBackupPlansRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. + * @param message ListBackupPlansRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupPlansRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlansRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. + * @param message ListBackupPlansRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlansRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlansRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlansRequest; + + /** + * Decodes a ListBackupPlansRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlansRequest; + + /** + * Verifies a ListBackupPlansRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlansRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlansRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlansRequest; + + /** + * Creates a plain object from a ListBackupPlansRequest message. Also converts values to other types if specified. + * @param message ListBackupPlansRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupPlansRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlansRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlansRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlansResponse. */ + interface IListBackupPlansResponse { + + /** ListBackupPlansResponse backupPlans */ + backupPlans?: (google.cloud.backupdr.v1.IBackupPlan[]|null); + + /** ListBackupPlansResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupPlansResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupPlansResponse. */ + class ListBackupPlansResponse implements IListBackupPlansResponse { + + /** + * Constructs a new ListBackupPlansResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupPlansResponse); + + /** ListBackupPlansResponse backupPlans. */ + public backupPlans: google.cloud.backupdr.v1.IBackupPlan[]; + + /** ListBackupPlansResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupPlansResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupPlansResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlansResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupPlansResponse): google.cloud.backupdr.v1.ListBackupPlansResponse; + + /** + * Encodes the specified ListBackupPlansResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. + * @param message ListBackupPlansResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupPlansResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlansResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. + * @param message ListBackupPlansResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlansResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlansResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlansResponse; + + /** + * Decodes a ListBackupPlansResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlansResponse; + + /** + * Verifies a ListBackupPlansResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlansResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlansResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlansResponse; + + /** + * Creates a plain object from a ListBackupPlansResponse message. Also converts values to other types if specified. + * @param message ListBackupPlansResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupPlansResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlansResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlansResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupPlanRequest. */ + interface IGetBackupPlanRequest { + + /** GetBackupPlanRequest name */ + name?: (string|null); + } + + /** Represents a GetBackupPlanRequest. */ + class GetBackupPlanRequest implements IGetBackupPlanRequest { + + /** + * Constructs a new GetBackupPlanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetBackupPlanRequest); + + /** GetBackupPlanRequest name. */ + public name: string; + + /** + * Creates a new GetBackupPlanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupPlanRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetBackupPlanRequest): google.cloud.backupdr.v1.GetBackupPlanRequest; + + /** + * Encodes the specified GetBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. + * @param message GetBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. + * @param message GetBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupPlanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupPlanRequest; + + /** + * Decodes a GetBackupPlanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupPlanRequest; + + /** + * Verifies a GetBackupPlanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupPlanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupPlanRequest; + + /** + * Creates a plain object from a GetBackupPlanRequest message. Also converts values to other types if specified. + * @param message GetBackupPlanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupPlanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupPlanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupPlanRequest. */ + interface IDeleteBackupPlanRequest { + + /** DeleteBackupPlanRequest name */ + name?: (string|null); + + /** DeleteBackupPlanRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteBackupPlanRequest. */ + class DeleteBackupPlanRequest implements IDeleteBackupPlanRequest { + + /** + * Constructs a new DeleteBackupPlanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanRequest); + + /** DeleteBackupPlanRequest name. */ + public name: string; + + /** DeleteBackupPlanRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteBackupPlanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupPlanRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanRequest): google.cloud.backupdr.v1.DeleteBackupPlanRequest; + + /** + * Encodes the specified DeleteBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. + * @param message DeleteBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. + * @param message DeleteBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupPlanRequest; + + /** + * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupPlanRequest; + + /** + * Verifies a DeleteBackupPlanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupPlanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupPlanRequest; + + /** + * Creates a plain object from a DeleteBackupPlanRequest message. Also converts values to other types if specified. + * @param message DeleteBackupPlanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupPlanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupPlanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupPlanAssociation. */ + interface IBackupPlanAssociation { + + /** BackupPlanAssociation name */ + name?: (string|null); + + /** BackupPlanAssociation resourceType */ + resourceType?: (string|null); + + /** BackupPlanAssociation resource */ + resource?: (string|null); + + /** BackupPlanAssociation backupPlan */ + backupPlan?: (string|null); + + /** BackupPlanAssociation createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation state */ + state?: (google.cloud.backupdr.v1.BackupPlanAssociation.State|keyof typeof google.cloud.backupdr.v1.BackupPlanAssociation.State|null); + + /** BackupPlanAssociation rulesConfigInfo */ + rulesConfigInfo?: (google.cloud.backupdr.v1.IRuleConfigInfo[]|null); + + /** BackupPlanAssociation dataSource */ + dataSource?: (string|null); + } + + /** Represents a BackupPlanAssociation. */ + class BackupPlanAssociation implements IBackupPlanAssociation { + + /** + * Constructs a new BackupPlanAssociation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupPlanAssociation); + + /** BackupPlanAssociation name. */ + public name: string; + + /** BackupPlanAssociation resourceType. */ + public resourceType: string; + + /** BackupPlanAssociation resource. */ + public resource: string; + + /** BackupPlanAssociation backupPlan. */ + public backupPlan: string; + + /** BackupPlanAssociation createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation state. */ + public state: (google.cloud.backupdr.v1.BackupPlanAssociation.State|keyof typeof google.cloud.backupdr.v1.BackupPlanAssociation.State); + + /** BackupPlanAssociation rulesConfigInfo. */ + public rulesConfigInfo: google.cloud.backupdr.v1.IRuleConfigInfo[]; + + /** BackupPlanAssociation dataSource. */ + public dataSource: string; + + /** + * Creates a new BackupPlanAssociation instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupPlanAssociation instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupPlanAssociation): google.cloud.backupdr.v1.BackupPlanAssociation; + + /** + * Encodes the specified BackupPlanAssociation message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. + * @param message BackupPlanAssociation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupPlanAssociation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupPlanAssociation message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. + * @param message BackupPlanAssociation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupPlanAssociation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupPlanAssociation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupPlanAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupPlanAssociation; + + /** + * Decodes a BackupPlanAssociation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupPlanAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupPlanAssociation; + + /** + * Verifies a BackupPlanAssociation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupPlanAssociation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupPlanAssociation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupPlanAssociation; + + /** + * Creates a plain object from a BackupPlanAssociation message. Also converts values to other types if specified. + * @param message BackupPlanAssociation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupPlanAssociation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupPlanAssociation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupPlanAssociation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupPlanAssociation { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + INACTIVE = 4 + } + } + + /** Properties of a RuleConfigInfo. */ + interface IRuleConfigInfo { + + /** RuleConfigInfo ruleId */ + ruleId?: (string|null); + + /** RuleConfigInfo lastBackupState */ + lastBackupState?: (google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|null); + + /** RuleConfigInfo lastBackupError */ + lastBackupError?: (google.rpc.IStatus|null); + + /** RuleConfigInfo lastSuccessfulBackupConsistencyTime */ + lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a RuleConfigInfo. */ + class RuleConfigInfo implements IRuleConfigInfo { + + /** + * Constructs a new RuleConfigInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IRuleConfigInfo); + + /** RuleConfigInfo ruleId. */ + public ruleId: string; + + /** RuleConfigInfo lastBackupState. */ + public lastBackupState: (google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState); + + /** RuleConfigInfo lastBackupError. */ + public lastBackupError?: (google.rpc.IStatus|null); + + /** RuleConfigInfo lastSuccessfulBackupConsistencyTime. */ + public lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new RuleConfigInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RuleConfigInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.IRuleConfigInfo): google.cloud.backupdr.v1.RuleConfigInfo; + + /** + * Encodes the specified RuleConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. + * @param message RuleConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IRuleConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RuleConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. + * @param message RuleConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IRuleConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RuleConfigInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RuleConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RuleConfigInfo; + + /** + * Decodes a RuleConfigInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RuleConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RuleConfigInfo; + + /** + * Verifies a RuleConfigInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RuleConfigInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RuleConfigInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RuleConfigInfo; + + /** + * Creates a plain object from a RuleConfigInfo message. Also converts values to other types if specified. + * @param message RuleConfigInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.RuleConfigInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RuleConfigInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RuleConfigInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RuleConfigInfo { + + /** LastBackupState enum. */ + enum LastBackupState { + LAST_BACKUP_STATE_UNSPECIFIED = 0, + FIRST_BACKUP_PENDING = 1, + PERMISSION_DENIED = 2, + SUCCEEDED = 3, + FAILED = 4 + } + } + + /** Properties of a CreateBackupPlanAssociationRequest. */ + interface ICreateBackupPlanAssociationRequest { + + /** CreateBackupPlanAssociationRequest parent */ + parent?: (string|null); + + /** CreateBackupPlanAssociationRequest backupPlanAssociationId */ + backupPlanAssociationId?: (string|null); + + /** CreateBackupPlanAssociationRequest backupPlanAssociation */ + backupPlanAssociation?: (google.cloud.backupdr.v1.IBackupPlanAssociation|null); + + /** CreateBackupPlanAssociationRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateBackupPlanAssociationRequest. */ + class CreateBackupPlanAssociationRequest implements ICreateBackupPlanAssociationRequest { + + /** + * Constructs a new CreateBackupPlanAssociationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest); + + /** CreateBackupPlanAssociationRequest parent. */ + public parent: string; + + /** CreateBackupPlanAssociationRequest backupPlanAssociationId. */ + public backupPlanAssociationId: string; + + /** CreateBackupPlanAssociationRequest backupPlanAssociation. */ + public backupPlanAssociation?: (google.cloud.backupdr.v1.IBackupPlanAssociation|null); + + /** CreateBackupPlanAssociationRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateBackupPlanAssociationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupPlanAssociationRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; + + /** + * Encodes the specified CreateBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. + * @param message CreateBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. + * @param message CreateBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; + + /** + * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; + + /** + * Verifies a CreateBackupPlanAssociationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupPlanAssociationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; + + /** + * Creates a plain object from a CreateBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @param message CreateBackupPlanAssociationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupPlanAssociationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupPlanAssociationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlanAssociationsRequest. */ + interface IListBackupPlanAssociationsRequest { + + /** ListBackupPlanAssociationsRequest parent */ + parent?: (string|null); + + /** ListBackupPlanAssociationsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupPlanAssociationsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupPlanAssociationsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListBackupPlanAssociationsRequest. */ + class ListBackupPlanAssociationsRequest implements IListBackupPlanAssociationsRequest { + + /** + * Constructs a new ListBackupPlanAssociationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest); + + /** ListBackupPlanAssociationsRequest parent. */ + public parent: string; + + /** ListBackupPlanAssociationsRequest pageSize. */ + public pageSize: number; + + /** ListBackupPlanAssociationsRequest pageToken. */ + public pageToken: string; + + /** ListBackupPlanAssociationsRequest filter. */ + public filter: string; + + /** + * Creates a new ListBackupPlanAssociationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlanAssociationsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; + + /** + * Encodes the specified ListBackupPlanAssociationsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. + * @param message ListBackupPlanAssociationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlanAssociationsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. + * @param message ListBackupPlanAssociationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlanAssociationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; + + /** + * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlanAssociationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; + + /** + * Verifies a ListBackupPlanAssociationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlanAssociationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlanAssociationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; + + /** + * Creates a plain object from a ListBackupPlanAssociationsRequest message. Also converts values to other types if specified. + * @param message ListBackupPlanAssociationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlanAssociationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlanAssociationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlanAssociationsResponse. */ + interface IListBackupPlanAssociationsResponse { + + /** ListBackupPlanAssociationsResponse backupPlanAssociations */ + backupPlanAssociations?: (google.cloud.backupdr.v1.IBackupPlanAssociation[]|null); + + /** ListBackupPlanAssociationsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupPlanAssociationsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupPlanAssociationsResponse. */ + class ListBackupPlanAssociationsResponse implements IListBackupPlanAssociationsResponse { + + /** + * Constructs a new ListBackupPlanAssociationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse); + + /** ListBackupPlanAssociationsResponse backupPlanAssociations. */ + public backupPlanAssociations: google.cloud.backupdr.v1.IBackupPlanAssociation[]; + + /** ListBackupPlanAssociationsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupPlanAssociationsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupPlanAssociationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlanAssociationsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; + + /** + * Encodes the specified ListBackupPlanAssociationsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. + * @param message ListBackupPlanAssociationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlanAssociationsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. + * @param message ListBackupPlanAssociationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlanAssociationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; + + /** + * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlanAssociationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; + + /** + * Verifies a ListBackupPlanAssociationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlanAssociationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlanAssociationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; + + /** + * Creates a plain object from a ListBackupPlanAssociationsResponse message. Also converts values to other types if specified. + * @param message ListBackupPlanAssociationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlanAssociationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlanAssociationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupPlanAssociationRequest. */ + interface IGetBackupPlanAssociationRequest { + + /** GetBackupPlanAssociationRequest name */ + name?: (string|null); + } + + /** Represents a GetBackupPlanAssociationRequest. */ + class GetBackupPlanAssociationRequest implements IGetBackupPlanAssociationRequest { + + /** + * Constructs a new GetBackupPlanAssociationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest); + + /** GetBackupPlanAssociationRequest name. */ + public name: string; + + /** + * Creates a new GetBackupPlanAssociationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupPlanAssociationRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; + + /** + * Encodes the specified GetBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. + * @param message GetBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. + * @param message GetBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; + + /** + * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; + + /** + * Verifies a GetBackupPlanAssociationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupPlanAssociationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; + + /** + * Creates a plain object from a GetBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @param message GetBackupPlanAssociationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupPlanAssociationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupPlanAssociationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupPlanAssociationRequest. */ + interface IDeleteBackupPlanAssociationRequest { + + /** DeleteBackupPlanAssociationRequest name */ + name?: (string|null); + + /** DeleteBackupPlanAssociationRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteBackupPlanAssociationRequest. */ + class DeleteBackupPlanAssociationRequest implements IDeleteBackupPlanAssociationRequest { + + /** + * Constructs a new DeleteBackupPlanAssociationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest); + + /** DeleteBackupPlanAssociationRequest name. */ + public name: string; + + /** DeleteBackupPlanAssociationRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteBackupPlanAssociationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupPlanAssociationRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; + + /** + * Encodes the specified DeleteBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. + * @param message DeleteBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. + * @param message DeleteBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; + + /** + * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; + + /** + * Verifies a DeleteBackupPlanAssociationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupPlanAssociationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; + + /** + * Creates a plain object from a DeleteBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @param message DeleteBackupPlanAssociationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupPlanAssociationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupPlanAssociationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TriggerBackupRequest. */ + interface ITriggerBackupRequest { + + /** TriggerBackupRequest name */ + name?: (string|null); + + /** TriggerBackupRequest ruleId */ + ruleId?: (string|null); + + /** TriggerBackupRequest requestId */ + requestId?: (string|null); + } + + /** Represents a TriggerBackupRequest. */ + class TriggerBackupRequest implements ITriggerBackupRequest { + + /** + * Constructs a new TriggerBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ITriggerBackupRequest); + + /** TriggerBackupRequest name. */ + public name: string; + + /** TriggerBackupRequest ruleId. */ + public ruleId: string; + + /** TriggerBackupRequest requestId. */ + public requestId: string; + + /** + * Creates a new TriggerBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TriggerBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ITriggerBackupRequest): google.cloud.backupdr.v1.TriggerBackupRequest; + + /** + * Encodes the specified TriggerBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. + * @param message TriggerBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ITriggerBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TriggerBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. + * @param message TriggerBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ITriggerBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TriggerBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TriggerBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.TriggerBackupRequest; + + /** + * Decodes a TriggerBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TriggerBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.TriggerBackupRequest; + + /** + * Verifies a TriggerBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TriggerBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TriggerBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.TriggerBackupRequest; + + /** + * Creates a plain object from a TriggerBackupRequest message. Also converts values to other types if specified. + * @param message TriggerBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.TriggerBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TriggerBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TriggerBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupVault. */ + interface IBackupVault { + + /** BackupVault name */ + name?: (string|null); + + /** BackupVault description */ + description?: (string|null); + + /** BackupVault labels */ + labels?: ({ [k: string]: string }|null); + + /** BackupVault createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupMinimumEnforcedRetentionDuration */ + backupMinimumEnforcedRetentionDuration?: (google.protobuf.IDuration|null); + + /** BackupVault deletable */ + deletable?: (boolean|null); + + /** BackupVault etag */ + etag?: (string|null); + + /** BackupVault state */ + state?: (google.cloud.backupdr.v1.BackupVault.State|keyof typeof google.cloud.backupdr.v1.BackupVault.State|null); + + /** BackupVault effectiveTime */ + effectiveTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupCount */ + backupCount?: (number|Long|string|null); + + /** BackupVault serviceAccount */ + serviceAccount?: (string|null); + + /** BackupVault totalStoredBytes */ + totalStoredBytes?: (number|Long|string|null); + + /** BackupVault uid */ + uid?: (string|null); + + /** BackupVault annotations */ + annotations?: ({ [k: string]: string }|null); + + /** BackupVault accessRestriction */ + accessRestriction?: (google.cloud.backupdr.v1.BackupVault.AccessRestriction|keyof typeof google.cloud.backupdr.v1.BackupVault.AccessRestriction|null); + } + + /** Represents a BackupVault. */ + class BackupVault implements IBackupVault { + + /** + * Constructs a new BackupVault. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupVault); + + /** BackupVault name. */ + public name: string; + + /** BackupVault description. */ + public description?: (string|null); + + /** BackupVault labels. */ + public labels: { [k: string]: string }; + + /** BackupVault createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupMinimumEnforcedRetentionDuration. */ + public backupMinimumEnforcedRetentionDuration?: (google.protobuf.IDuration|null); + + /** BackupVault deletable. */ + public deletable?: (boolean|null); + + /** BackupVault etag. */ + public etag?: (string|null); + + /** BackupVault state. */ + public state: (google.cloud.backupdr.v1.BackupVault.State|keyof typeof google.cloud.backupdr.v1.BackupVault.State); + + /** BackupVault effectiveTime. */ + public effectiveTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupCount. */ + public backupCount: (number|Long|string); + + /** BackupVault serviceAccount. */ + public serviceAccount: string; + + /** BackupVault totalStoredBytes. */ + public totalStoredBytes: (number|Long|string); + + /** BackupVault uid. */ + public uid: string; + + /** BackupVault annotations. */ + public annotations: { [k: string]: string }; + + /** BackupVault accessRestriction. */ + public accessRestriction: (google.cloud.backupdr.v1.BackupVault.AccessRestriction|keyof typeof google.cloud.backupdr.v1.BackupVault.AccessRestriction); + + /** BackupVault _description. */ + public _description?: "description"; + + /** BackupVault _createTime. */ + public _createTime?: "createTime"; + + /** BackupVault _updateTime. */ + public _updateTime?: "updateTime"; + + /** BackupVault _backupMinimumEnforcedRetentionDuration. */ + public _backupMinimumEnforcedRetentionDuration?: "backupMinimumEnforcedRetentionDuration"; + + /** BackupVault _deletable. */ + public _deletable?: "deletable"; + + /** BackupVault _etag. */ + public _etag?: "etag"; + + /** BackupVault _effectiveTime. */ + public _effectiveTime?: "effectiveTime"; + + /** + * Creates a new BackupVault instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupVault instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupVault): google.cloud.backupdr.v1.BackupVault; + + /** + * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. + * @param message BackupVault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupVault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. + * @param message BackupVault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupVault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupVault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupVault; + + /** + * Decodes a BackupVault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupVault; + + /** + * Verifies a BackupVault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupVault + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupVault; + + /** + * Creates a plain object from a BackupVault message. Also converts values to other types if specified. + * @param message BackupVault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupVault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupVault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupVault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupVault { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + ERROR = 4 + } + + /** AccessRestriction enum. */ + enum AccessRestriction { + ACCESS_RESTRICTION_UNSPECIFIED = 0, + WITHIN_PROJECT = 1, + WITHIN_ORGANIZATION = 2, + UNRESTRICTED = 3 + } + } + + /** Properties of a DataSource. */ + interface IDataSource { + + /** DataSource name */ + name?: (string|null); + + /** DataSource state */ + state?: (google.cloud.backupdr.v1.DataSource.State|keyof typeof google.cloud.backupdr.v1.DataSource.State|null); + + /** DataSource labels */ + labels?: ({ [k: string]: string }|null); + + /** DataSource createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataSource updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DataSource backupCount */ + backupCount?: (number|Long|string|null); + + /** DataSource etag */ + etag?: (string|null); + + /** DataSource totalStoredBytes */ + totalStoredBytes?: (number|Long|string|null); + + /** DataSource configState */ + configState?: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState|null); + + /** DataSource backupConfigInfo */ + backupConfigInfo?: (google.cloud.backupdr.v1.IBackupConfigInfo|null); + + /** DataSource dataSourceGcpResource */ + dataSourceGcpResource?: (google.cloud.backupdr.v1.IDataSourceGcpResource|null); + + /** DataSource dataSourceBackupApplianceApplication */ + dataSourceBackupApplianceApplication?: (google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null); + } + + /** Represents a DataSource. */ + class DataSource implements IDataSource { + + /** + * Constructs a new DataSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDataSource); + + /** DataSource name. */ + public name: string; + + /** DataSource state. */ + public state: (google.cloud.backupdr.v1.DataSource.State|keyof typeof google.cloud.backupdr.v1.DataSource.State); + + /** DataSource labels. */ + public labels: { [k: string]: string }; + + /** DataSource createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataSource updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DataSource backupCount. */ + public backupCount?: (number|Long|string|null); + + /** DataSource etag. */ + public etag?: (string|null); + + /** DataSource totalStoredBytes. */ + public totalStoredBytes?: (number|Long|string|null); + + /** DataSource configState. */ + public configState: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState); + + /** DataSource backupConfigInfo. */ + public backupConfigInfo?: (google.cloud.backupdr.v1.IBackupConfigInfo|null); + + /** DataSource dataSourceGcpResource. */ + public dataSourceGcpResource?: (google.cloud.backupdr.v1.IDataSourceGcpResource|null); + + /** DataSource dataSourceBackupApplianceApplication. */ + public dataSourceBackupApplianceApplication?: (google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null); + + /** DataSource _createTime. */ + public _createTime?: "createTime"; + + /** DataSource _updateTime. */ + public _updateTime?: "updateTime"; + + /** DataSource _backupCount. */ + public _backupCount?: "backupCount"; + + /** DataSource _etag. */ + public _etag?: "etag"; + + /** DataSource _totalStoredBytes. */ + public _totalStoredBytes?: "totalStoredBytes"; + + /** DataSource sourceResource. */ + public sourceResource?: ("dataSourceGcpResource"|"dataSourceBackupApplianceApplication"); + + /** + * Creates a new DataSource instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSource instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDataSource): google.cloud.backupdr.v1.DataSource; + + /** + * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. + * @param message DataSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. + * @param message DataSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSource; + + /** + * Decodes a DataSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSource; + + /** + * Verifies a DataSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSource; + + /** + * Creates a plain object from a DataSource message. Also converts values to other types if specified. + * @param message DataSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DataSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataSource { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + ERROR = 4 + } + } + + /** Properties of a BackupConfigInfo. */ + interface IBackupConfigInfo { + + /** BackupConfigInfo lastBackupState */ + lastBackupState?: (google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|null); + + /** BackupConfigInfo lastSuccessfulBackupConsistencyTime */ + lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + + /** BackupConfigInfo lastBackupError */ + lastBackupError?: (google.rpc.IStatus|null); + + /** BackupConfigInfo gcpBackupConfig */ + gcpBackupConfig?: (google.cloud.backupdr.v1.IGcpBackupConfig|null); + + /** BackupConfigInfo backupApplianceBackupConfig */ + backupApplianceBackupConfig?: (google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null); + } + + /** Represents a BackupConfigInfo. */ + class BackupConfigInfo implements IBackupConfigInfo { + + /** + * Constructs a new BackupConfigInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupConfigInfo); + + /** BackupConfigInfo lastBackupState. */ + public lastBackupState: (google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState); + + /** BackupConfigInfo lastSuccessfulBackupConsistencyTime. */ + public lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + + /** BackupConfigInfo lastBackupError. */ + public lastBackupError?: (google.rpc.IStatus|null); + + /** BackupConfigInfo gcpBackupConfig. */ + public gcpBackupConfig?: (google.cloud.backupdr.v1.IGcpBackupConfig|null); + + /** BackupConfigInfo backupApplianceBackupConfig. */ + public backupApplianceBackupConfig?: (google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null); + + /** BackupConfigInfo backupConfig. */ + public backupConfig?: ("gcpBackupConfig"|"backupApplianceBackupConfig"); + + /** + * Creates a new BackupConfigInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupConfigInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupConfigInfo): google.cloud.backupdr.v1.BackupConfigInfo; + + /** + * Encodes the specified BackupConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. + * @param message BackupConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. + * @param message BackupConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupConfigInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupConfigInfo; + + /** + * Decodes a BackupConfigInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupConfigInfo; + + /** + * Verifies a BackupConfigInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupConfigInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupConfigInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupConfigInfo; + + /** + * Creates a plain object from a BackupConfigInfo message. Also converts values to other types if specified. + * @param message BackupConfigInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupConfigInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupConfigInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupConfigInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupConfigInfo { + + /** LastBackupState enum. */ + enum LastBackupState { + LAST_BACKUP_STATE_UNSPECIFIED = 0, + FIRST_BACKUP_PENDING = 1, + SUCCEEDED = 2, + FAILED = 3, + PERMISSION_DENIED = 4 + } + } + + /** Properties of a GcpBackupConfig. */ + interface IGcpBackupConfig { + + /** GcpBackupConfig backupPlan */ + backupPlan?: (string|null); + + /** GcpBackupConfig backupPlanDescription */ + backupPlanDescription?: (string|null); + + /** GcpBackupConfig backupPlanAssociation */ + backupPlanAssociation?: (string|null); + + /** GcpBackupConfig backupPlanRules */ + backupPlanRules?: (string[]|null); + } + + /** Represents a GcpBackupConfig. */ + class GcpBackupConfig implements IGcpBackupConfig { + + /** + * Constructs a new GcpBackupConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGcpBackupConfig); + + /** GcpBackupConfig backupPlan. */ + public backupPlan: string; + + /** GcpBackupConfig backupPlanDescription. */ + public backupPlanDescription: string; + + /** GcpBackupConfig backupPlanAssociation. */ + public backupPlanAssociation: string; + + /** GcpBackupConfig backupPlanRules. */ + public backupPlanRules: string[]; + + /** + * Creates a new GcpBackupConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GcpBackupConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGcpBackupConfig): google.cloud.backupdr.v1.GcpBackupConfig; + + /** + * Encodes the specified GcpBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * @param message GcpBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGcpBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcpBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * @param message GcpBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGcpBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcpBackupConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcpBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GcpBackupConfig; + + /** + * Decodes a GcpBackupConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcpBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GcpBackupConfig; + + /** + * Verifies a GcpBackupConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcpBackupConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcpBackupConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GcpBackupConfig; + + /** + * Creates a plain object from a GcpBackupConfig message. Also converts values to other types if specified. + * @param message GcpBackupConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GcpBackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcpBackupConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcpBackupConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupApplianceBackupConfig. */ + interface IBackupApplianceBackupConfig { + + /** BackupApplianceBackupConfig backupApplianceName */ + backupApplianceName?: (string|null); + + /** BackupApplianceBackupConfig backupApplianceId */ + backupApplianceId?: (number|Long|string|null); + + /** BackupApplianceBackupConfig slaId */ + slaId?: (number|Long|string|null); + + /** BackupApplianceBackupConfig applicationName */ + applicationName?: (string|null); + + /** BackupApplianceBackupConfig hostName */ + hostName?: (string|null); + + /** BackupApplianceBackupConfig sltName */ + sltName?: (string|null); + + /** BackupApplianceBackupConfig slpName */ + slpName?: (string|null); + } + + /** Represents a BackupApplianceBackupConfig. */ + class BackupApplianceBackupConfig implements IBackupApplianceBackupConfig { + + /** + * Constructs a new BackupApplianceBackupConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupConfig); + + /** BackupApplianceBackupConfig backupApplianceName. */ + public backupApplianceName: string; + + /** BackupApplianceBackupConfig backupApplianceId. */ + public backupApplianceId: (number|Long|string); + + /** BackupApplianceBackupConfig slaId. */ + public slaId: (number|Long|string); + + /** BackupApplianceBackupConfig applicationName. */ + public applicationName: string; + + /** BackupApplianceBackupConfig hostName. */ + public hostName: string; + + /** BackupApplianceBackupConfig sltName. */ + public sltName: string; + + /** BackupApplianceBackupConfig slpName. */ + public slpName: string; + + /** + * Creates a new BackupApplianceBackupConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupApplianceBackupConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupConfig): google.cloud.backupdr.v1.BackupApplianceBackupConfig; + + /** + * Encodes the specified BackupApplianceBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. + * @param message BackupApplianceBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupApplianceBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupApplianceBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. + * @param message BackupApplianceBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupApplianceBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceBackupConfig; + + /** + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupApplianceBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceBackupConfig; + + /** + * Verifies a BackupApplianceBackupConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupApplianceBackupConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupApplianceBackupConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceBackupConfig; + + /** + * Creates a plain object from a BackupApplianceBackupConfig message. Also converts values to other types if specified. + * @param message BackupApplianceBackupConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupApplianceBackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupApplianceBackupConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupApplianceBackupConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataSourceGcpResource. */ + interface IDataSourceGcpResource { + + /** DataSourceGcpResource gcpResourcename */ + gcpResourcename?: (string|null); + + /** DataSourceGcpResource location */ + location?: (string|null); + + /** DataSourceGcpResource type */ + type?: (string|null); + + /** DataSourceGcpResource computeInstanceDatasourceProperties */ + computeInstanceDatasourceProperties?: (google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null); + } + + /** Represents a DataSourceGcpResource. */ + class DataSourceGcpResource implements IDataSourceGcpResource { + + /** + * Constructs a new DataSourceGcpResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDataSourceGcpResource); + + /** DataSourceGcpResource gcpResourcename. */ + public gcpResourcename: string; + + /** DataSourceGcpResource location. */ + public location: string; + + /** DataSourceGcpResource type. */ + public type: string; + + /** DataSourceGcpResource computeInstanceDatasourceProperties. */ + public computeInstanceDatasourceProperties?: (google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null); + + /** DataSourceGcpResource gcpResourceProperties. */ + public gcpResourceProperties?: "computeInstanceDatasourceProperties"; + + /** + * Creates a new DataSourceGcpResource instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSourceGcpResource instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDataSourceGcpResource): google.cloud.backupdr.v1.DataSourceGcpResource; + + /** + * Encodes the specified DataSourceGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * @param message DataSourceGcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDataSourceGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSourceGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * @param message DataSourceGcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSourceGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSourceGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSourceGcpResource; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSourceGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSourceGcpResource; + + /** + * Verifies a DataSourceGcpResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSourceGcpResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSourceGcpResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSourceGcpResource; + + /** + * Creates a plain object from a DataSourceGcpResource message. Also converts values to other types if specified. + * @param message DataSourceGcpResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DataSourceGcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSourceGcpResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSourceGcpResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataSourceBackupApplianceApplication. */ + interface IDataSourceBackupApplianceApplication { + + /** DataSourceBackupApplianceApplication applicationName */ + applicationName?: (string|null); + + /** DataSourceBackupApplianceApplication backupAppliance */ + backupAppliance?: (string|null); + + /** DataSourceBackupApplianceApplication applianceId */ + applianceId?: (number|Long|string|null); + + /** DataSourceBackupApplianceApplication type */ + type?: (string|null); + + /** DataSourceBackupApplianceApplication applicationId */ + applicationId?: (number|Long|string|null); + + /** DataSourceBackupApplianceApplication hostname */ + hostname?: (string|null); + + /** DataSourceBackupApplianceApplication hostId */ + hostId?: (number|Long|string|null); + } + + /** Represents a DataSourceBackupApplianceApplication. */ + class DataSourceBackupApplianceApplication implements IDataSourceBackupApplianceApplication { + + /** + * Constructs a new DataSourceBackupApplianceApplication. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication); + + /** DataSourceBackupApplianceApplication applicationName. */ + public applicationName: string; + + /** DataSourceBackupApplianceApplication backupAppliance. */ + public backupAppliance: string; + + /** DataSourceBackupApplianceApplication applianceId. */ + public applianceId: (number|Long|string); + + /** DataSourceBackupApplianceApplication type. */ + public type: string; + + /** DataSourceBackupApplianceApplication applicationId. */ + public applicationId: (number|Long|string); + + /** DataSourceBackupApplianceApplication hostname. */ + public hostname: string; + + /** DataSourceBackupApplianceApplication hostId. */ + public hostId: (number|Long|string); + + /** + * Creates a new DataSourceBackupApplianceApplication instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSourceBackupApplianceApplication instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; + + /** + * Encodes the specified DataSourceBackupApplianceApplication message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. + * @param message DataSourceBackupApplianceApplication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSourceBackupApplianceApplication message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. + * @param message DataSourceBackupApplianceApplication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSourceBackupApplianceApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; + + /** + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSourceBackupApplianceApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; + + /** + * Verifies a DataSourceBackupApplianceApplication message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSourceBackupApplianceApplication message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSourceBackupApplianceApplication + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; + + /** + * Creates a plain object from a DataSourceBackupApplianceApplication message. Also converts values to other types if specified. + * @param message DataSourceBackupApplianceApplication + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DataSourceBackupApplianceApplication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSourceBackupApplianceApplication to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSourceBackupApplianceApplication + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceLockInfo. */ + interface IServiceLockInfo { + + /** ServiceLockInfo operation */ + operation?: (string|null); + } + + /** Represents a ServiceLockInfo. */ + class ServiceLockInfo implements IServiceLockInfo { + + /** + * Constructs a new ServiceLockInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IServiceLockInfo); + + /** ServiceLockInfo operation. */ + public operation: string; + + /** + * Creates a new ServiceLockInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceLockInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.IServiceLockInfo): google.cloud.backupdr.v1.ServiceLockInfo; + + /** + * Encodes the specified ServiceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. + * @param message ServiceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IServiceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. + * @param message ServiceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IServiceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceLockInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ServiceLockInfo; + + /** + * Decodes a ServiceLockInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ServiceLockInfo; + + /** + * Verifies a ServiceLockInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceLockInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceLockInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ServiceLockInfo; + + /** + * Creates a plain object from a ServiceLockInfo message. Also converts values to other types if specified. + * @param message ServiceLockInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ServiceLockInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceLockInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceLockInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupApplianceLockInfo. */ + interface IBackupApplianceLockInfo { + + /** BackupApplianceLockInfo backupApplianceId */ + backupApplianceId?: (number|Long|string|null); + + /** BackupApplianceLockInfo backupApplianceName */ + backupApplianceName?: (string|null); + + /** BackupApplianceLockInfo lockReason */ + lockReason?: (string|null); + + /** BackupApplianceLockInfo jobName */ + jobName?: (string|null); + + /** BackupApplianceLockInfo backupImage */ + backupImage?: (string|null); + + /** BackupApplianceLockInfo slaId */ + slaId?: (number|Long|string|null); + } + + /** Represents a BackupApplianceLockInfo. */ + class BackupApplianceLockInfo implements IBackupApplianceLockInfo { + + /** + * Constructs a new BackupApplianceLockInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceLockInfo); + + /** BackupApplianceLockInfo backupApplianceId. */ + public backupApplianceId: (number|Long|string); + + /** BackupApplianceLockInfo backupApplianceName. */ + public backupApplianceName: string; + + /** BackupApplianceLockInfo lockReason. */ + public lockReason: string; + + /** BackupApplianceLockInfo jobName. */ + public jobName?: (string|null); + + /** BackupApplianceLockInfo backupImage. */ + public backupImage?: (string|null); + + /** BackupApplianceLockInfo slaId. */ + public slaId?: (number|Long|string|null); + + /** BackupApplianceLockInfo lockSource. */ + public lockSource?: ("jobName"|"backupImage"|"slaId"); + + /** + * Creates a new BackupApplianceLockInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupApplianceLockInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceLockInfo): google.cloud.backupdr.v1.BackupApplianceLockInfo; + + /** + * Encodes the specified BackupApplianceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * @param message BackupApplianceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupApplianceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupApplianceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * @param message BackupApplianceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupApplianceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceLockInfo; + + /** + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupApplianceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceLockInfo; + + /** + * Verifies a BackupApplianceLockInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupApplianceLockInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupApplianceLockInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceLockInfo; + + /** + * Creates a plain object from a BackupApplianceLockInfo message. Also converts values to other types if specified. + * @param message BackupApplianceLockInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupApplianceLockInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupApplianceLockInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupApplianceLockInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupLock. */ + interface IBackupLock { + + /** BackupLock lockUntilTime */ + lockUntilTime?: (google.protobuf.ITimestamp|null); + + /** BackupLock backupApplianceLockInfo */ + backupApplianceLockInfo?: (google.cloud.backupdr.v1.IBackupApplianceLockInfo|null); + + /** BackupLock serviceLockInfo */ + serviceLockInfo?: (google.cloud.backupdr.v1.IServiceLockInfo|null); + } + + /** Represents a BackupLock. */ + class BackupLock implements IBackupLock { + + /** + * Constructs a new BackupLock. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupLock); + + /** BackupLock lockUntilTime. */ + public lockUntilTime?: (google.protobuf.ITimestamp|null); + + /** BackupLock backupApplianceLockInfo. */ + public backupApplianceLockInfo?: (google.cloud.backupdr.v1.IBackupApplianceLockInfo|null); + + /** BackupLock serviceLockInfo. */ + public serviceLockInfo?: (google.cloud.backupdr.v1.IServiceLockInfo|null); + + /** BackupLock ClientLockInfo. */ + public ClientLockInfo?: ("backupApplianceLockInfo"|"serviceLockInfo"); + + /** + * Creates a new BackupLock instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupLock instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupLock): google.cloud.backupdr.v1.BackupLock; + + /** + * Encodes the specified BackupLock message. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. + * @param message BackupLock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupLock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupLock message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. + * @param message BackupLock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupLock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupLock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupLock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupLock; + + /** + * Decodes a BackupLock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupLock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupLock; + + /** + * Verifies a BackupLock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupLock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupLock + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupLock; + + /** + * Creates a plain object from a BackupLock message. Also converts values to other types if specified. + * @param message BackupLock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupLock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupLock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupLock + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Backup. */ + interface IBackup { + + /** Backup name */ + name?: (string|null); + + /** Backup description */ + description?: (string|null); + + /** Backup createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Backup updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Backup labels */ + labels?: ({ [k: string]: string }|null); + + /** Backup enforcedRetentionEndTime */ + enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); + + /** Backup expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + + /** Backup consistencyTime */ + consistencyTime?: (google.protobuf.ITimestamp|null); + + /** Backup etag */ + etag?: (string|null); + + /** Backup state */ + state?: (google.cloud.backupdr.v1.Backup.State|keyof typeof google.cloud.backupdr.v1.Backup.State|null); + + /** Backup serviceLocks */ + serviceLocks?: (google.cloud.backupdr.v1.IBackupLock[]|null); + + /** Backup backupApplianceLocks */ + backupApplianceLocks?: (google.cloud.backupdr.v1.IBackupLock[]|null); + + /** Backup computeInstanceBackupProperties */ + computeInstanceBackupProperties?: (google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null); + + /** Backup backupApplianceBackupProperties */ + backupApplianceBackupProperties?: (google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null); + + /** Backup backupType */ + backupType?: (google.cloud.backupdr.v1.Backup.BackupType|keyof typeof google.cloud.backupdr.v1.Backup.BackupType|null); + + /** Backup gcpBackupPlanInfo */ + gcpBackupPlanInfo?: (google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null); + + /** Backup resourceSizeBytes */ + resourceSizeBytes?: (number|Long|string|null); + } + + /** Represents a Backup. */ + class Backup implements IBackup { + + /** + * Constructs a new Backup. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackup); + + /** Backup name. */ + public name: string; + + /** Backup description. */ + public description?: (string|null); + + /** Backup createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Backup updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Backup labels. */ + public labels: { [k: string]: string }; + + /** Backup enforcedRetentionEndTime. */ + public enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); + + /** Backup expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** Backup consistencyTime. */ + public consistencyTime?: (google.protobuf.ITimestamp|null); + + /** Backup etag. */ + public etag?: (string|null); + + /** Backup state. */ + public state: (google.cloud.backupdr.v1.Backup.State|keyof typeof google.cloud.backupdr.v1.Backup.State); + + /** Backup serviceLocks. */ + public serviceLocks: google.cloud.backupdr.v1.IBackupLock[]; + + /** Backup backupApplianceLocks. */ + public backupApplianceLocks: google.cloud.backupdr.v1.IBackupLock[]; + + /** Backup computeInstanceBackupProperties. */ + public computeInstanceBackupProperties?: (google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null); + + /** Backup backupApplianceBackupProperties. */ + public backupApplianceBackupProperties?: (google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null); + + /** Backup backupType. */ + public backupType: (google.cloud.backupdr.v1.Backup.BackupType|keyof typeof google.cloud.backupdr.v1.Backup.BackupType); + + /** Backup gcpBackupPlanInfo. */ + public gcpBackupPlanInfo?: (google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null); + + /** Backup resourceSizeBytes. */ + public resourceSizeBytes: (number|Long|string); + + /** Backup _description. */ + public _description?: "description"; + + /** Backup _createTime. */ + public _createTime?: "createTime"; + + /** Backup _updateTime. */ + public _updateTime?: "updateTime"; + + /** Backup _enforcedRetentionEndTime. */ + public _enforcedRetentionEndTime?: "enforcedRetentionEndTime"; + + /** Backup _expireTime. */ + public _expireTime?: "expireTime"; + + /** Backup _consistencyTime. */ + public _consistencyTime?: "consistencyTime"; + + /** Backup _etag. */ + public _etag?: "etag"; + + /** Backup backupProperties. */ + public backupProperties?: ("computeInstanceBackupProperties"|"backupApplianceBackupProperties"); + + /** Backup planInfo. */ + public planInfo?: "gcpBackupPlanInfo"; + + /** + * Creates a new Backup instance using the specified properties. + * @param [properties] Properties to set + * @returns Backup instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackup): google.cloud.backupdr.v1.Backup; + + /** + * Encodes the specified Backup message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Backup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Backup; + + /** + * Decodes a Backup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Backup; + + /** + * Verifies a Backup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Backup + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Backup; + + /** + * Creates a plain object from a Backup message. Also converts values to other types if specified. + * @param message Backup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Backup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Backup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Backup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Backup { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + ERROR = 4 + } + + /** BackupType enum. */ + enum BackupType { + BACKUP_TYPE_UNSPECIFIED = 0, + SCHEDULED = 1, + ON_DEMAND = 2 + } + + /** Properties of a GCPBackupPlanInfo. */ + interface IGCPBackupPlanInfo { + + /** GCPBackupPlanInfo backupPlan */ + backupPlan?: (string|null); + + /** GCPBackupPlanInfo backupPlanRuleId */ + backupPlanRuleId?: (string|null); + } + + /** Represents a GCPBackupPlanInfo. */ + class GCPBackupPlanInfo implements IGCPBackupPlanInfo { + + /** + * Constructs a new GCPBackupPlanInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo); + + /** GCPBackupPlanInfo backupPlan. */ + public backupPlan: string; + + /** GCPBackupPlanInfo backupPlanRuleId. */ + public backupPlanRuleId: string; + + /** + * Creates a new GCPBackupPlanInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GCPBackupPlanInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; + + /** + * Encodes the specified GCPBackupPlanInfo message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @param message GCPBackupPlanInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GCPBackupPlanInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @param message GCPBackupPlanInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GCPBackupPlanInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; + + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GCPBackupPlanInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; + + /** + * Verifies a GCPBackupPlanInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GCPBackupPlanInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GCPBackupPlanInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; + + /** + * Creates a plain object from a GCPBackupPlanInfo message. Also converts values to other types if specified. + * @param message GCPBackupPlanInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GCPBackupPlanInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GCPBackupPlanInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateBackupVaultRequest. */ + interface ICreateBackupVaultRequest { + + /** CreateBackupVaultRequest parent */ + parent?: (string|null); + + /** CreateBackupVaultRequest backupVaultId */ + backupVaultId?: (string|null); + + /** CreateBackupVaultRequest backupVault */ + backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); + + /** CreateBackupVaultRequest requestId */ + requestId?: (string|null); + + /** CreateBackupVaultRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateBackupVaultRequest. */ + class CreateBackupVaultRequest implements ICreateBackupVaultRequest { + + /** + * Constructs a new CreateBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICreateBackupVaultRequest); + + /** CreateBackupVaultRequest parent. */ + public parent: string; + + /** CreateBackupVaultRequest backupVaultId. */ + public backupVaultId: string; + + /** CreateBackupVaultRequest backupVault. */ + public backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); + + /** CreateBackupVaultRequest requestId. */ + public requestId: string; + + /** CreateBackupVaultRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICreateBackupVaultRequest): google.cloud.backupdr.v1.CreateBackupVaultRequest; + + /** + * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. + * @param message CreateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICreateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. + * @param message CreateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupVaultRequest; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupVaultRequest; + + /** + * Verifies a CreateBackupVaultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupVaultRequest; + + /** + * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. + * @param message CreateBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CreateBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupVaultsRequest. */ + interface IListBackupVaultsRequest { + + /** ListBackupVaultsRequest parent */ + parent?: (string|null); + + /** ListBackupVaultsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupVaultsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupVaultsRequest filter */ + filter?: (string|null); + + /** ListBackupVaultsRequest orderBy */ + orderBy?: (string|null); + + /** ListBackupVaultsRequest view */ + view?: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView|null); + } + + /** Represents a ListBackupVaultsRequest. */ + class ListBackupVaultsRequest implements IListBackupVaultsRequest { + + /** + * Constructs a new ListBackupVaultsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupVaultsRequest); + + /** ListBackupVaultsRequest parent. */ + public parent: string; + + /** ListBackupVaultsRequest pageSize. */ + public pageSize: number; + + /** ListBackupVaultsRequest pageToken. */ + public pageToken: string; + + /** ListBackupVaultsRequest filter. */ + public filter: string; + + /** ListBackupVaultsRequest orderBy. */ + public orderBy: string; + + /** ListBackupVaultsRequest view. */ + public view: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView); + + /** + * Creates a new ListBackupVaultsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupVaultsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupVaultsRequest): google.cloud.backupdr.v1.ListBackupVaultsRequest; + + /** + * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. + * @param message ListBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. + * @param message ListBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupVaultsRequest; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupVaultsRequest; + + /** + * Verifies a ListBackupVaultsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupVaultsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupVaultsRequest; + + /** + * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. + * @param message ListBackupVaultsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupVaultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupVaultsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupVaultsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupVaultsResponse. */ + interface IListBackupVaultsResponse { + + /** ListBackupVaultsResponse backupVaults */ + backupVaults?: (google.cloud.backupdr.v1.IBackupVault[]|null); + + /** ListBackupVaultsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupVaultsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupVaultsResponse. */ + class ListBackupVaultsResponse implements IListBackupVaultsResponse { + + /** + * Constructs a new ListBackupVaultsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupVaultsResponse); + + /** ListBackupVaultsResponse backupVaults. */ + public backupVaults: google.cloud.backupdr.v1.IBackupVault[]; + + /** ListBackupVaultsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupVaultsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupVaultsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupVaultsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupVaultsResponse): google.cloud.backupdr.v1.ListBackupVaultsResponse; + + /** + * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. + * @param message ListBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. + * @param message ListBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupVaultsResponse; + + /** + * Decodes a ListBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupVaultsResponse; + + /** + * Verifies a ListBackupVaultsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupVaultsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupVaultsResponse; + + /** + * Creates a plain object from a ListBackupVaultsResponse message. Also converts values to other types if specified. + * @param message ListBackupVaultsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupVaultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupVaultsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupVaultsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchUsableBackupVaultsRequest. */ + interface IFetchUsableBackupVaultsRequest { + + /** FetchUsableBackupVaultsRequest parent */ + parent?: (string|null); + + /** FetchUsableBackupVaultsRequest pageSize */ + pageSize?: (number|null); + + /** FetchUsableBackupVaultsRequest pageToken */ + pageToken?: (string|null); + + /** FetchUsableBackupVaultsRequest filter */ + filter?: (string|null); + + /** FetchUsableBackupVaultsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a FetchUsableBackupVaultsRequest. */ + class FetchUsableBackupVaultsRequest implements IFetchUsableBackupVaultsRequest { + + /** + * Constructs a new FetchUsableBackupVaultsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest); + + /** FetchUsableBackupVaultsRequest parent. */ + public parent: string; + + /** FetchUsableBackupVaultsRequest pageSize. */ + public pageSize: number; + + /** FetchUsableBackupVaultsRequest pageToken. */ + public pageToken: string; + + /** FetchUsableBackupVaultsRequest filter. */ + public filter: string; + + /** FetchUsableBackupVaultsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new FetchUsableBackupVaultsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchUsableBackupVaultsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; + + /** + * Encodes the specified FetchUsableBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. + * @param message FetchUsableBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchUsableBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. + * @param message FetchUsableBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchUsableBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; + + /** + * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchUsableBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; + + /** + * Verifies a FetchUsableBackupVaultsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchUsableBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchUsableBackupVaultsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; + + /** + * Creates a plain object from a FetchUsableBackupVaultsRequest message. Also converts values to other types if specified. + * @param message FetchUsableBackupVaultsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchUsableBackupVaultsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchUsableBackupVaultsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchUsableBackupVaultsResponse. */ + interface IFetchUsableBackupVaultsResponse { + + /** FetchUsableBackupVaultsResponse backupVaults */ + backupVaults?: (google.cloud.backupdr.v1.IBackupVault[]|null); + + /** FetchUsableBackupVaultsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** FetchUsableBackupVaultsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a FetchUsableBackupVaultsResponse. */ + class FetchUsableBackupVaultsResponse implements IFetchUsableBackupVaultsResponse { + + /** + * Constructs a new FetchUsableBackupVaultsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse); + + /** FetchUsableBackupVaultsResponse backupVaults. */ + public backupVaults: google.cloud.backupdr.v1.IBackupVault[]; + + /** FetchUsableBackupVaultsResponse nextPageToken. */ + public nextPageToken: string; + + /** FetchUsableBackupVaultsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new FetchUsableBackupVaultsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchUsableBackupVaultsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; + + /** + * Encodes the specified FetchUsableBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. + * @param message FetchUsableBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchUsableBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. + * @param message FetchUsableBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchUsableBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; + + /** + * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchUsableBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; + + /** + * Verifies a FetchUsableBackupVaultsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchUsableBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchUsableBackupVaultsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; + + /** + * Creates a plain object from a FetchUsableBackupVaultsResponse message. Also converts values to other types if specified. + * @param message FetchUsableBackupVaultsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchUsableBackupVaultsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchUsableBackupVaultsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupVaultRequest. */ + interface IGetBackupVaultRequest { + + /** GetBackupVaultRequest name */ + name?: (string|null); + + /** GetBackupVaultRequest view */ + view?: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView|null); + } + + /** Represents a GetBackupVaultRequest. */ + class GetBackupVaultRequest implements IGetBackupVaultRequest { + + /** + * Constructs a new GetBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetBackupVaultRequest); + + /** GetBackupVaultRequest name. */ + public name: string; + + /** GetBackupVaultRequest view. */ + public view: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView); + + /** + * Creates a new GetBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetBackupVaultRequest): google.cloud.backupdr.v1.GetBackupVaultRequest; + + /** + * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. + * @param message GetBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. + * @param message GetBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupVaultRequest; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupVaultRequest; + + /** + * Verifies a GetBackupVaultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupVaultRequest; + + /** + * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. + * @param message GetBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateBackupVaultRequest. */ + interface IUpdateBackupVaultRequest { + + /** UpdateBackupVaultRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupVaultRequest backupVault */ + backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); + + /** UpdateBackupVaultRequest requestId */ + requestId?: (string|null); + + /** UpdateBackupVaultRequest validateOnly */ + validateOnly?: (boolean|null); + + /** UpdateBackupVaultRequest force */ + force?: (boolean|null); + } + + /** Represents an UpdateBackupVaultRequest. */ + class UpdateBackupVaultRequest implements IUpdateBackupVaultRequest { + + /** + * Constructs a new UpdateBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IUpdateBackupVaultRequest); + + /** UpdateBackupVaultRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupVaultRequest backupVault. */ + public backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); + + /** UpdateBackupVaultRequest requestId. */ + public requestId: string; + + /** UpdateBackupVaultRequest validateOnly. */ + public validateOnly: boolean; + + /** UpdateBackupVaultRequest force. */ + public force: boolean; + + /** + * Creates a new UpdateBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IUpdateBackupVaultRequest): google.cloud.backupdr.v1.UpdateBackupVaultRequest; + + /** + * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. + * @param message UpdateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. + * @param message UpdateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateBackupVaultRequest; + + /** + * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateBackupVaultRequest; + + /** + * Verifies an UpdateBackupVaultRequest message. + * @param message Plain 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 UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateBackupVaultRequest; + + /** + * Creates a plain object from an UpdateBackupVaultRequest message. Also converts values to other types if specified. + * @param message UpdateBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.UpdateBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupVaultRequest. */ + interface IDeleteBackupVaultRequest { + + /** DeleteBackupVaultRequest name */ + name?: (string|null); + + /** DeleteBackupVaultRequest requestId */ + requestId?: (string|null); + + /** DeleteBackupVaultRequest force */ + force?: (boolean|null); + + /** DeleteBackupVaultRequest etag */ + etag?: (string|null); + + /** DeleteBackupVaultRequest validateOnly */ + validateOnly?: (boolean|null); + + /** DeleteBackupVaultRequest allowMissing */ + allowMissing?: (boolean|null); + } + + /** Represents a DeleteBackupVaultRequest. */ + class DeleteBackupVaultRequest implements IDeleteBackupVaultRequest { + + /** + * Constructs a new DeleteBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupVaultRequest); + + /** DeleteBackupVaultRequest name. */ + public name: string; + + /** DeleteBackupVaultRequest requestId. */ + public requestId: string; + + /** DeleteBackupVaultRequest force. */ + public force: boolean; + + /** DeleteBackupVaultRequest etag. */ + public etag: string; + + /** DeleteBackupVaultRequest validateOnly. */ + public validateOnly: boolean; + + /** DeleteBackupVaultRequest allowMissing. */ + public allowMissing: boolean; + + /** + * Creates a new DeleteBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupVaultRequest): google.cloud.backupdr.v1.DeleteBackupVaultRequest; + + /** + * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. + * @param message DeleteBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. + * @param message DeleteBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupVaultRequest; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupVaultRequest; + + /** + * Verifies a DeleteBackupVaultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupVaultRequest; + + /** + * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. + * @param message DeleteBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataSourcesRequest. */ + interface IListDataSourcesRequest { + + /** ListDataSourcesRequest parent */ + parent?: (string|null); + + /** ListDataSourcesRequest pageSize */ + pageSize?: (number|null); + + /** ListDataSourcesRequest pageToken */ + pageToken?: (string|null); + + /** ListDataSourcesRequest filter */ + filter?: (string|null); + + /** ListDataSourcesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListDataSourcesRequest. */ + class ListDataSourcesRequest implements IListDataSourcesRequest { + + /** + * Constructs a new ListDataSourcesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListDataSourcesRequest); + + /** ListDataSourcesRequest parent. */ + public parent: string; + + /** ListDataSourcesRequest pageSize. */ + public pageSize: number; + + /** ListDataSourcesRequest pageToken. */ + public pageToken: string; + + /** ListDataSourcesRequest filter. */ + public filter: string; + + /** ListDataSourcesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListDataSourcesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataSourcesRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListDataSourcesRequest): google.cloud.backupdr.v1.ListDataSourcesRequest; + + /** + * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. + * @param message ListDataSourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListDataSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. + * @param message ListDataSourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListDataSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataSourcesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListDataSourcesRequest; + + /** + * Decodes a ListDataSourcesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListDataSourcesRequest; + + /** + * Verifies a ListDataSourcesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataSourcesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListDataSourcesRequest; + + /** + * Creates a plain object from a ListDataSourcesRequest message. Also converts values to other types if specified. + * @param message ListDataSourcesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListDataSourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataSourcesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataSourcesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataSourcesResponse. */ + interface IListDataSourcesResponse { + + /** ListDataSourcesResponse dataSources */ + dataSources?: (google.cloud.backupdr.v1.IDataSource[]|null); + + /** ListDataSourcesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListDataSourcesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListDataSourcesResponse. */ + class ListDataSourcesResponse implements IListDataSourcesResponse { + + /** + * Constructs a new ListDataSourcesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListDataSourcesResponse); + + /** ListDataSourcesResponse dataSources. */ + public dataSources: google.cloud.backupdr.v1.IDataSource[]; + + /** ListDataSourcesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListDataSourcesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListDataSourcesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataSourcesResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListDataSourcesResponse): google.cloud.backupdr.v1.ListDataSourcesResponse; + + /** + * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. + * @param message ListDataSourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListDataSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. + * @param message ListDataSourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListDataSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataSourcesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListDataSourcesResponse; + + /** + * Decodes a ListDataSourcesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListDataSourcesResponse; + + /** + * Verifies a ListDataSourcesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataSourcesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListDataSourcesResponse; + + /** + * Creates a plain object from a ListDataSourcesResponse message. Also converts values to other types if specified. + * @param message ListDataSourcesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListDataSourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataSourcesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataSourcesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataSourceRequest. */ + interface IGetDataSourceRequest { + + /** GetDataSourceRequest name */ + name?: (string|null); + } + + /** Represents a GetDataSourceRequest. */ + class GetDataSourceRequest implements IGetDataSourceRequest { + + /** + * Constructs a new GetDataSourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetDataSourceRequest); + + /** GetDataSourceRequest name. */ + public name: string; + + /** + * Creates a new GetDataSourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataSourceRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetDataSourceRequest): google.cloud.backupdr.v1.GetDataSourceRequest; + + /** + * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. + * @param message GetDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. + * @param message GetDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataSourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetDataSourceRequest; + + /** + * Decodes a GetDataSourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetDataSourceRequest; + + /** + * Verifies a GetDataSourceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataSourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetDataSourceRequest; + + /** + * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. + * @param message GetDataSourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataSourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataSourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataSourceRequest. */ + interface IUpdateDataSourceRequest { + + /** UpdateDataSourceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataSourceRequest dataSource */ + dataSource?: (google.cloud.backupdr.v1.IDataSource|null); + + /** UpdateDataSourceRequest requestId */ + requestId?: (string|null); + + /** UpdateDataSourceRequest allowMissing */ + allowMissing?: (boolean|null); + } + + /** Represents an UpdateDataSourceRequest. */ + class UpdateDataSourceRequest implements IUpdateDataSourceRequest { + + /** + * Constructs a new UpdateDataSourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IUpdateDataSourceRequest); + + /** UpdateDataSourceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataSourceRequest dataSource. */ + public dataSource?: (google.cloud.backupdr.v1.IDataSource|null); + + /** UpdateDataSourceRequest requestId. */ + public requestId: string; + + /** UpdateDataSourceRequest allowMissing. */ + public allowMissing: boolean; + + /** + * Creates a new UpdateDataSourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataSourceRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IUpdateDataSourceRequest): google.cloud.backupdr.v1.UpdateDataSourceRequest; + + /** + * Encodes the specified UpdateDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. + * @param message UpdateDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IUpdateDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. + * @param message UpdateDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateDataSourceRequest; + + /** + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateDataSourceRequest; + + /** + * Verifies an UpdateDataSourceRequest message. + * @param message Plain 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 UpdateDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataSourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateDataSourceRequest; + + /** + * Creates a plain object from an UpdateDataSourceRequest message. Also converts values to other types if specified. + * @param message UpdateDataSourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.UpdateDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataSourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataSourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemoveDataSourceRequest. */ + interface IRemoveDataSourceRequest { + + /** RemoveDataSourceRequest name */ + name?: (string|null); + + /** RemoveDataSourceRequest requestId */ + requestId?: (string|null); + } + + /** Represents a RemoveDataSourceRequest. */ + class RemoveDataSourceRequest implements IRemoveDataSourceRequest { + + /** + * Constructs a new RemoveDataSourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IRemoveDataSourceRequest); + + /** RemoveDataSourceRequest name. */ + public name: string; + + /** RemoveDataSourceRequest requestId. */ + public requestId: string; + + /** + * Creates a new RemoveDataSourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveDataSourceRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IRemoveDataSourceRequest): google.cloud.backupdr.v1.RemoveDataSourceRequest; + + /** + * Encodes the specified RemoveDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. + * @param message RemoveDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IRemoveDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. + * @param message RemoveDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IRemoveDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveDataSourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RemoveDataSourceRequest; + + /** + * Decodes a RemoveDataSourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RemoveDataSourceRequest; + + /** + * Verifies a RemoveDataSourceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemoveDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveDataSourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RemoveDataSourceRequest; + + /** + * Creates a plain object from a RemoveDataSourceRequest message. Also converts values to other types if specified. + * @param message RemoveDataSourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.RemoveDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveDataSourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveDataSourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetInternalStatusRequest. */ + interface ISetInternalStatusRequest { + + /** SetInternalStatusRequest dataSource */ + dataSource?: (string|null); + + /** SetInternalStatusRequest value */ + value?: (Uint8Array|string|null); + + /** SetInternalStatusRequest backupConfigState */ + backupConfigState?: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState|null); + + /** SetInternalStatusRequest requestId */ + requestId?: (string|null); + } + + /** Represents a SetInternalStatusRequest. */ + class SetInternalStatusRequest implements ISetInternalStatusRequest { + + /** + * Constructs a new SetInternalStatusRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ISetInternalStatusRequest); + + /** SetInternalStatusRequest dataSource. */ + public dataSource: string; + + /** SetInternalStatusRequest value. */ + public value: (Uint8Array|string); + + /** SetInternalStatusRequest backupConfigState. */ + public backupConfigState: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState); + + /** SetInternalStatusRequest requestId. */ + public requestId: string; + + /** + * Creates a new SetInternalStatusRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetInternalStatusRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ISetInternalStatusRequest): google.cloud.backupdr.v1.SetInternalStatusRequest; + + /** + * Encodes the specified SetInternalStatusRequest message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. + * @param message SetInternalStatusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ISetInternalStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetInternalStatusRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. + * @param message SetInternalStatusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ISetInternalStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetInternalStatusRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetInternalStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SetInternalStatusRequest; + + /** + * Decodes a SetInternalStatusRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetInternalStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SetInternalStatusRequest; + + /** + * Verifies a SetInternalStatusRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetInternalStatusRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetInternalStatusRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SetInternalStatusRequest; + + /** + * Creates a plain object from a SetInternalStatusRequest message. Also converts values to other types if specified. + * @param message SetInternalStatusRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.SetInternalStatusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetInternalStatusRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetInternalStatusRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetInternalStatusResponse. */ + interface ISetInternalStatusResponse { + } + + /** Represents a SetInternalStatusResponse. */ + class SetInternalStatusResponse implements ISetInternalStatusResponse { + + /** + * Constructs a new SetInternalStatusResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ISetInternalStatusResponse); + + /** + * Creates a new SetInternalStatusResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SetInternalStatusResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.ISetInternalStatusResponse): google.cloud.backupdr.v1.SetInternalStatusResponse; + + /** + * Encodes the specified SetInternalStatusResponse message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. + * @param message SetInternalStatusResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ISetInternalStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetInternalStatusResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. + * @param message SetInternalStatusResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ISetInternalStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetInternalStatusResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetInternalStatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SetInternalStatusResponse; + + /** + * Decodes a SetInternalStatusResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetInternalStatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SetInternalStatusResponse; + + /** + * Verifies a SetInternalStatusResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetInternalStatusResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetInternalStatusResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SetInternalStatusResponse; + + /** + * Creates a plain object from a SetInternalStatusResponse message. Also converts values to other types if specified. + * @param message SetInternalStatusResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.SetInternalStatusResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetInternalStatusResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetInternalStatusResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InitiateBackupRequest. */ + interface IInitiateBackupRequest { + + /** InitiateBackupRequest dataSource */ + dataSource?: (string|null); + + /** InitiateBackupRequest requestId */ + requestId?: (string|null); + + /** InitiateBackupRequest backupId */ + backupId?: (string|null); + } + + /** Represents an InitiateBackupRequest. */ + class InitiateBackupRequest implements IInitiateBackupRequest { + + /** + * Constructs a new InitiateBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IInitiateBackupRequest); + + /** InitiateBackupRequest dataSource. */ + public dataSource: string; + + /** InitiateBackupRequest requestId. */ + public requestId: string; + + /** InitiateBackupRequest backupId. */ + public backupId: string; + + /** + * Creates a new InitiateBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns InitiateBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IInitiateBackupRequest): google.cloud.backupdr.v1.InitiateBackupRequest; + + /** + * Encodes the specified InitiateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. + * @param message InitiateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IInitiateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InitiateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. + * @param message InitiateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IInitiateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InitiateBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InitiateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InitiateBackupRequest; + + /** + * Decodes an InitiateBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InitiateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InitiateBackupRequest; + + /** + * Verifies an InitiateBackupRequest message. + * @param message Plain 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 InitiateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InitiateBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InitiateBackupRequest; + + /** + * Creates a plain object from an InitiateBackupRequest message. Also converts values to other types if specified. + * @param message InitiateBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.InitiateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InitiateBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InitiateBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InitiateBackupResponse. */ + interface IInitiateBackupResponse { + + /** InitiateBackupResponse backup */ + backup?: (string|null); + + /** InitiateBackupResponse newBackupGenerationId */ + newBackupGenerationId?: (number|null); + + /** InitiateBackupResponse baseBackupGenerationId */ + baseBackupGenerationId?: (number|null); + } + + /** Represents an InitiateBackupResponse. */ + class InitiateBackupResponse implements IInitiateBackupResponse { + + /** + * Constructs a new InitiateBackupResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IInitiateBackupResponse); + + /** InitiateBackupResponse backup. */ + public backup: string; + + /** InitiateBackupResponse newBackupGenerationId. */ + public newBackupGenerationId: number; + + /** InitiateBackupResponse baseBackupGenerationId. */ + public baseBackupGenerationId: number; + + /** + * Creates a new InitiateBackupResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns InitiateBackupResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IInitiateBackupResponse): google.cloud.backupdr.v1.InitiateBackupResponse; + + /** + * Encodes the specified InitiateBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. + * @param message InitiateBackupResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IInitiateBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InitiateBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. + * @param message InitiateBackupResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IInitiateBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InitiateBackupResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InitiateBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InitiateBackupResponse; + + /** + * Decodes an InitiateBackupResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InitiateBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InitiateBackupResponse; + + /** + * Verifies an InitiateBackupResponse message. + * @param message Plain 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 InitiateBackupResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InitiateBackupResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InitiateBackupResponse; + + /** + * Creates a plain object from an InitiateBackupResponse message. Also converts values to other types if specified. + * @param message InitiateBackupResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.InitiateBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InitiateBackupResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InitiateBackupResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AbandonBackupRequest. */ + interface IAbandonBackupRequest { + + /** AbandonBackupRequest dataSource */ + dataSource?: (string|null); + + /** AbandonBackupRequest requestId */ + requestId?: (string|null); + } + + /** Represents an AbandonBackupRequest. */ + class AbandonBackupRequest implements IAbandonBackupRequest { + + /** + * Constructs a new AbandonBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAbandonBackupRequest); + + /** AbandonBackupRequest dataSource. */ + public dataSource: string; + + /** AbandonBackupRequest requestId. */ + public requestId: string; + + /** + * Creates a new AbandonBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AbandonBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAbandonBackupRequest): google.cloud.backupdr.v1.AbandonBackupRequest; + + /** + * Encodes the specified AbandonBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. + * @param message AbandonBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAbandonBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AbandonBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. + * @param message AbandonBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAbandonBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AbandonBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AbandonBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AbandonBackupRequest; + + /** + * Decodes an AbandonBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AbandonBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AbandonBackupRequest; + + /** + * Verifies an AbandonBackupRequest message. + * @param message Plain 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 AbandonBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AbandonBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AbandonBackupRequest; + + /** + * Creates a plain object from an AbandonBackupRequest message. Also converts values to other types if specified. + * @param message AbandonBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AbandonBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AbandonBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AbandonBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FinalizeBackupRequest. */ + interface IFinalizeBackupRequest { + + /** FinalizeBackupRequest dataSource */ + dataSource?: (string|null); + + /** FinalizeBackupRequest description */ + description?: (string|null); + + /** FinalizeBackupRequest consistencyTime */ + consistencyTime?: (google.protobuf.ITimestamp|null); + + /** FinalizeBackupRequest requestId */ + requestId?: (string|null); + + /** FinalizeBackupRequest backupId */ + backupId?: (string|null); + + /** FinalizeBackupRequest recoveryRangeStartTime */ + recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); + + /** FinalizeBackupRequest recoveryRangeEndTime */ + recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); + + /** FinalizeBackupRequest retentionDuration */ + retentionDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a FinalizeBackupRequest. */ + class FinalizeBackupRequest implements IFinalizeBackupRequest { + + /** + * Constructs a new FinalizeBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFinalizeBackupRequest); + + /** FinalizeBackupRequest dataSource. */ + public dataSource: string; + + /** FinalizeBackupRequest description. */ + public description?: (string|null); + + /** FinalizeBackupRequest consistencyTime. */ + public consistencyTime?: (google.protobuf.ITimestamp|null); + + /** FinalizeBackupRequest requestId. */ + public requestId: string; + + /** FinalizeBackupRequest backupId. */ + public backupId: string; + + /** FinalizeBackupRequest recoveryRangeStartTime. */ + public recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); + + /** FinalizeBackupRequest recoveryRangeEndTime. */ + public recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); + + /** FinalizeBackupRequest retentionDuration. */ + public retentionDuration?: (google.protobuf.IDuration|null); + + /** FinalizeBackupRequest _description. */ + public _description?: "description"; + + /** FinalizeBackupRequest _consistencyTime. */ + public _consistencyTime?: "consistencyTime"; + + /** FinalizeBackupRequest _recoveryRangeStartTime. */ + public _recoveryRangeStartTime?: "recoveryRangeStartTime"; + + /** FinalizeBackupRequest _recoveryRangeEndTime. */ + public _recoveryRangeEndTime?: "recoveryRangeEndTime"; + + /** FinalizeBackupRequest _retentionDuration. */ + public _retentionDuration?: "retentionDuration"; + + /** + * Creates a new FinalizeBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FinalizeBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFinalizeBackupRequest): google.cloud.backupdr.v1.FinalizeBackupRequest; + + /** + * Encodes the specified FinalizeBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. + * @param message FinalizeBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFinalizeBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FinalizeBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. + * @param message FinalizeBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFinalizeBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FinalizeBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FinalizeBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FinalizeBackupRequest; + + /** + * Decodes a FinalizeBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FinalizeBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FinalizeBackupRequest; + + /** + * Verifies a FinalizeBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FinalizeBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FinalizeBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FinalizeBackupRequest; + + /** + * Creates a plain object from a FinalizeBackupRequest message. Also converts values to other types if specified. + * @param message FinalizeBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FinalizeBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FinalizeBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FinalizeBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchAccessTokenRequest. */ + interface IFetchAccessTokenRequest { + + /** FetchAccessTokenRequest name */ + name?: (string|null); + + /** FetchAccessTokenRequest generationId */ + generationId?: (number|null); + } + + /** Represents a FetchAccessTokenRequest. */ + class FetchAccessTokenRequest implements IFetchAccessTokenRequest { + + /** + * Constructs a new FetchAccessTokenRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFetchAccessTokenRequest); + + /** FetchAccessTokenRequest name. */ + public name: string; + + /** FetchAccessTokenRequest generationId. */ + public generationId: number; + + /** + * Creates a new FetchAccessTokenRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchAccessTokenRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFetchAccessTokenRequest): google.cloud.backupdr.v1.FetchAccessTokenRequest; + + /** + * Encodes the specified FetchAccessTokenRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. + * @param message FetchAccessTokenRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFetchAccessTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchAccessTokenRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. + * @param message FetchAccessTokenRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchAccessTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchAccessTokenRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchAccessTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchAccessTokenRequest; + + /** + * Decodes a FetchAccessTokenRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchAccessTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchAccessTokenRequest; + + /** + * Verifies a FetchAccessTokenRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchAccessTokenRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchAccessTokenRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchAccessTokenRequest; + + /** + * Creates a plain object from a FetchAccessTokenRequest message. Also converts values to other types if specified. + * @param message FetchAccessTokenRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FetchAccessTokenRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchAccessTokenRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchAccessTokenRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchAccessTokenResponse. */ + interface IFetchAccessTokenResponse { + + /** FetchAccessTokenResponse readLocation */ + readLocation?: (string|null); + + /** FetchAccessTokenResponse writeLocation */ + writeLocation?: (string|null); + + /** FetchAccessTokenResponse token */ + token?: (string|null); + + /** FetchAccessTokenResponse expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a FetchAccessTokenResponse. */ + class FetchAccessTokenResponse implements IFetchAccessTokenResponse { + + /** + * Constructs a new FetchAccessTokenResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFetchAccessTokenResponse); + + /** FetchAccessTokenResponse readLocation. */ + public readLocation: string; + + /** FetchAccessTokenResponse writeLocation. */ + public writeLocation: string; + + /** FetchAccessTokenResponse token. */ + public token: string; + + /** FetchAccessTokenResponse expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new FetchAccessTokenResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchAccessTokenResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFetchAccessTokenResponse): google.cloud.backupdr.v1.FetchAccessTokenResponse; + + /** + * Encodes the specified FetchAccessTokenResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. + * @param message FetchAccessTokenResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFetchAccessTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchAccessTokenResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. + * @param message FetchAccessTokenResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchAccessTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchAccessTokenResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchAccessTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchAccessTokenResponse; + + /** + * Decodes a FetchAccessTokenResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchAccessTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchAccessTokenResponse; + + /** + * Verifies a FetchAccessTokenResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchAccessTokenResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchAccessTokenResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchAccessTokenResponse; + + /** + * Creates a plain object from a FetchAccessTokenResponse message. Also converts values to other types if specified. + * @param message FetchAccessTokenResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FetchAccessTokenResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchAccessTokenResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchAccessTokenResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupsRequest. */ + interface IListBackupsRequest { + + /** ListBackupsRequest parent */ + parent?: (string|null); + + /** ListBackupsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupsRequest filter */ + filter?: (string|null); + + /** ListBackupsRequest orderBy */ + orderBy?: (string|null); + + /** ListBackupsRequest view */ + view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); + } + + /** Represents a ListBackupsRequest. */ + class ListBackupsRequest implements IListBackupsRequest { + + /** + * Constructs a new ListBackupsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupsRequest); + + /** ListBackupsRequest parent. */ + public parent: string; + + /** ListBackupsRequest pageSize. */ + public pageSize: number; + + /** ListBackupsRequest pageToken. */ + public pageToken: string; + + /** ListBackupsRequest filter. */ + public filter: string; + + /** ListBackupsRequest orderBy. */ + public orderBy: string; + + /** ListBackupsRequest view. */ + public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); + + /** + * Creates a new ListBackupsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupsRequest): google.cloud.backupdr.v1.ListBackupsRequest; + + /** + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupsRequest; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupsRequest; + + /** + * Verifies a ListBackupsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupsRequest; + + /** + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * @param message ListBackupsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupsResponse. */ + interface IListBackupsResponse { + + /** ListBackupsResponse backups */ + backups?: (google.cloud.backupdr.v1.IBackup[]|null); + + /** ListBackupsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupsResponse. */ + class ListBackupsResponse implements IListBackupsResponse { + + /** + * Constructs a new ListBackupsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupsResponse); + + /** ListBackupsResponse backups. */ + public backups: google.cloud.backupdr.v1.IBackup[]; + + /** ListBackupsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupsResponse): google.cloud.backupdr.v1.ListBackupsResponse; + + /** + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupsResponse; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupsResponse; + + /** + * Verifies a ListBackupsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupsResponse; + + /** + * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. + * @param message ListBackupsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupRequest. */ + interface IGetBackupRequest { + + /** GetBackupRequest name */ + name?: (string|null); + + /** GetBackupRequest view */ + view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); + } + + /** Represents a GetBackupRequest. */ + class GetBackupRequest implements IGetBackupRequest { + + /** + * Constructs a new GetBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetBackupRequest); + + /** GetBackupRequest name. */ + public name: string; + + /** GetBackupRequest view. */ + public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); + + /** + * Creates a new GetBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetBackupRequest): google.cloud.backupdr.v1.GetBackupRequest; + + /** + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupRequest; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupRequest; + + /** + * Verifies a GetBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupRequest; + + /** + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * @param message GetBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateBackupRequest. */ + interface IUpdateBackupRequest { + + /** UpdateBackupRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupRequest backup */ + backup?: (google.cloud.backupdr.v1.IBackup|null); + + /** UpdateBackupRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateBackupRequest. */ + class UpdateBackupRequest implements IUpdateBackupRequest { + + /** + * Constructs a new UpdateBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IUpdateBackupRequest); + + /** UpdateBackupRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupRequest backup. */ + public backup?: (google.cloud.backupdr.v1.IBackup|null); + + /** UpdateBackupRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IUpdateBackupRequest): google.cloud.backupdr.v1.UpdateBackupRequest; + + /** + * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * @param message UpdateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * @param message UpdateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateBackupRequest; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateBackupRequest; + + /** + * Verifies an UpdateBackupRequest message. + * @param message Plain 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 UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateBackupRequest; + + /** + * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. + * @param message UpdateBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.UpdateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupRequest. */ + interface IDeleteBackupRequest { + + /** DeleteBackupRequest name */ + name?: (string|null); + + /** DeleteBackupRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteBackupRequest. */ + class DeleteBackupRequest implements IDeleteBackupRequest { + + /** + * Constructs a new DeleteBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupRequest); + + /** DeleteBackupRequest name. */ + public name: string; + + /** DeleteBackupRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupRequest): google.cloud.backupdr.v1.DeleteBackupRequest; + + /** + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupRequest; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupRequest; + + /** + * Verifies a DeleteBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupRequest; + + /** + * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. + * @param message DeleteBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestoreBackupRequest. */ + interface IRestoreBackupRequest { + + /** RestoreBackupRequest name */ + name?: (string|null); + + /** RestoreBackupRequest requestId */ + requestId?: (string|null); + + /** RestoreBackupRequest computeInstanceTargetEnvironment */ + computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null); + + /** RestoreBackupRequest computeInstanceRestoreProperties */ + computeInstanceRestoreProperties?: (google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null); + } + + /** Represents a RestoreBackupRequest. */ + class RestoreBackupRequest implements IRestoreBackupRequest { + + /** + * Constructs a new RestoreBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IRestoreBackupRequest); + + /** RestoreBackupRequest name. */ + public name: string; + + /** RestoreBackupRequest requestId. */ + public requestId: string; + + /** RestoreBackupRequest computeInstanceTargetEnvironment. */ + public computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null); + + /** RestoreBackupRequest computeInstanceRestoreProperties. */ + public computeInstanceRestoreProperties?: (google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null); + + /** RestoreBackupRequest targetEnvironment. */ + public targetEnvironment?: "computeInstanceTargetEnvironment"; + + /** RestoreBackupRequest instanceProperties. */ + public instanceProperties?: "computeInstanceRestoreProperties"; + + /** + * Creates a new RestoreBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IRestoreBackupRequest): google.cloud.backupdr.v1.RestoreBackupRequest; + + /** + * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * @param message RestoreBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * @param message RestoreBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RestoreBackupRequest; + + /** + * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RestoreBackupRequest; + + /** + * Verifies a RestoreBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RestoreBackupRequest; + + /** + * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. + * @param message RestoreBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.RestoreBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestoreBackupResponse. */ + interface IRestoreBackupResponse { + + /** RestoreBackupResponse targetResource */ + targetResource?: (google.cloud.backupdr.v1.ITargetResource|null); + } + + /** Represents a RestoreBackupResponse. */ + class RestoreBackupResponse implements IRestoreBackupResponse { + + /** + * Constructs a new RestoreBackupResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IRestoreBackupResponse); + + /** RestoreBackupResponse targetResource. */ + public targetResource?: (google.cloud.backupdr.v1.ITargetResource|null); + + /** + * Creates a new RestoreBackupResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreBackupResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IRestoreBackupResponse): google.cloud.backupdr.v1.RestoreBackupResponse; + + /** + * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * @param message RestoreBackupResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * @param message RestoreBackupResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreBackupResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RestoreBackupResponse; + + /** + * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RestoreBackupResponse; + + /** + * Verifies a RestoreBackupResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreBackupResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RestoreBackupResponse; + + /** + * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. + * @param message RestoreBackupResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.RestoreBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreBackupResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreBackupResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TargetResource. */ + interface ITargetResource { + + /** TargetResource gcpResource */ + gcpResource?: (google.cloud.backupdr.v1.IGcpResource|null); + } + + /** Represents a TargetResource. */ + class TargetResource implements ITargetResource { + + /** + * Constructs a new TargetResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ITargetResource); + + /** TargetResource gcpResource. */ + public gcpResource?: (google.cloud.backupdr.v1.IGcpResource|null); + + /** TargetResource targetResourceInfo. */ + public targetResourceInfo?: "gcpResource"; + + /** + * Creates a new TargetResource instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetResource instance + */ + public static create(properties?: google.cloud.backupdr.v1.ITargetResource): google.cloud.backupdr.v1.TargetResource; + + /** + * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * @param message TargetResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * @param message TargetResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.TargetResource; + + /** + * Decodes a TargetResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.TargetResource; + + /** + * Verifies a TargetResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.TargetResource; + + /** + * Creates a plain object from a TargetResource message. Also converts values to other types if specified. + * @param message TargetResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.TargetResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcpResource. */ + interface IGcpResource { + + /** GcpResource gcpResourcename */ + gcpResourcename?: (string|null); + + /** GcpResource location */ + location?: (string|null); + + /** GcpResource type */ + type?: (string|null); + } + + /** Represents a GcpResource. */ + class GcpResource implements IGcpResource { + + /** + * Constructs a new GcpResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGcpResource); + + /** GcpResource gcpResourcename. */ + public gcpResourcename: string; + + /** GcpResource location. */ + public location: string; + + /** GcpResource type. */ + public type: string; + + /** + * Creates a new GcpResource instance using the specified properties. + * @param [properties] Properties to set + * @returns GcpResource instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGcpResource): google.cloud.backupdr.v1.GcpResource; + + /** + * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * @param message GcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * @param message GcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcpResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GcpResource; + + /** + * Decodes a GcpResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GcpResource; + + /** + * Verifies a GcpResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcpResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GcpResource; + + /** + * Creates a plain object from a GcpResource message. Also converts values to other types if specified. + * @param message GcpResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcpResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcpResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** BackupConfigState enum. */ + enum BackupConfigState { + BACKUP_CONFIG_STATE_UNSPECIFIED = 0, + ACTIVE = 1, + PASSIVE = 2 + } + + /** BackupView enum. */ + enum BackupView { + BACKUP_VIEW_UNSPECIFIED = 0, + BACKUP_VIEW_BASIC = 1, + BACKUP_VIEW_FULL = 2 + } + + /** BackupVaultView enum. */ + enum BackupVaultView { + BACKUP_VAULT_VIEW_UNSPECIFIED = 0, + BACKUP_VAULT_VIEW_BASIC = 1, + BACKUP_VAULT_VIEW_FULL = 2 + } + + /** Properties of a BackupApplianceBackupProperties. */ + interface IBackupApplianceBackupProperties { + + /** BackupApplianceBackupProperties generationId */ + generationId?: (number|null); + + /** BackupApplianceBackupProperties finalizeTime */ + finalizeTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeStartTime */ + recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeEndTime */ + recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a BackupApplianceBackupProperties. */ + class BackupApplianceBackupProperties implements IBackupApplianceBackupProperties { + + /** + * Constructs a new BackupApplianceBackupProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupProperties); + + /** BackupApplianceBackupProperties generationId. */ + public generationId?: (number|null); + + /** BackupApplianceBackupProperties finalizeTime. */ + public finalizeTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeStartTime. */ + public recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeEndTime. */ + public recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties _generationId. */ + public _generationId?: "generationId"; + + /** BackupApplianceBackupProperties _finalizeTime. */ + public _finalizeTime?: "finalizeTime"; + + /** BackupApplianceBackupProperties _recoveryRangeStartTime. */ + public _recoveryRangeStartTime?: "recoveryRangeStartTime"; + + /** BackupApplianceBackupProperties _recoveryRangeEndTime. */ + public _recoveryRangeEndTime?: "recoveryRangeEndTime"; + + /** + * Creates a new BackupApplianceBackupProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupApplianceBackupProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupProperties): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + + /** + * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * @param message BackupApplianceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * @param message BackupApplianceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupApplianceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + + /** + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupApplianceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + + /** + * Verifies a BackupApplianceBackupProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupApplianceBackupProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + + /** + * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. + * @param message BackupApplianceBackupProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupApplianceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupApplianceBackupProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupApplianceBackupProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ComputeInstanceBackupProperties. */ + interface IComputeInstanceBackupProperties { + + /** ComputeInstanceBackupProperties description */ + description?: (string|null); + + /** ComputeInstanceBackupProperties tags */ + tags?: (google.cloud.backupdr.v1.ITags|null); + + /** ComputeInstanceBackupProperties machineType */ + machineType?: (string|null); + + /** ComputeInstanceBackupProperties canIpForward */ + canIpForward?: (boolean|null); + + /** ComputeInstanceBackupProperties networkInterface */ + networkInterface?: (google.cloud.backupdr.v1.INetworkInterface[]|null); + + /** ComputeInstanceBackupProperties disk */ + disk?: (google.cloud.backupdr.v1.IAttachedDisk[]|null); + + /** ComputeInstanceBackupProperties metadata */ + metadata?: (google.cloud.backupdr.v1.IMetadata|null); + + /** ComputeInstanceBackupProperties serviceAccount */ + serviceAccount?: (google.cloud.backupdr.v1.IServiceAccount[]|null); + + /** ComputeInstanceBackupProperties scheduling */ + scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + + /** ComputeInstanceBackupProperties guestAccelerator */ + guestAccelerator?: (google.cloud.backupdr.v1.IAcceleratorConfig[]|null); + + /** ComputeInstanceBackupProperties minCpuPlatform */ + minCpuPlatform?: (string|null); + + /** ComputeInstanceBackupProperties keyRevocationActionType */ + keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + + /** ComputeInstanceBackupProperties sourceInstance */ + sourceInstance?: (string|null); + + /** ComputeInstanceBackupProperties labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a ComputeInstanceBackupProperties. */ + class ComputeInstanceBackupProperties implements IComputeInstanceBackupProperties { + + /** + * Constructs a new ComputeInstanceBackupProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceBackupProperties); + + /** ComputeInstanceBackupProperties description. */ + public description?: (string|null); + + /** ComputeInstanceBackupProperties tags. */ + public tags?: (google.cloud.backupdr.v1.ITags|null); + + /** ComputeInstanceBackupProperties machineType. */ + public machineType?: (string|null); + + /** ComputeInstanceBackupProperties canIpForward. */ + public canIpForward?: (boolean|null); + + /** ComputeInstanceBackupProperties networkInterface. */ + public networkInterface: google.cloud.backupdr.v1.INetworkInterface[]; + + /** ComputeInstanceBackupProperties disk. */ + public disk: google.cloud.backupdr.v1.IAttachedDisk[]; + + /** ComputeInstanceBackupProperties metadata. */ + public metadata?: (google.cloud.backupdr.v1.IMetadata|null); + + /** ComputeInstanceBackupProperties serviceAccount. */ + public serviceAccount: google.cloud.backupdr.v1.IServiceAccount[]; + + /** ComputeInstanceBackupProperties scheduling. */ + public scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + + /** ComputeInstanceBackupProperties guestAccelerator. */ + public guestAccelerator: google.cloud.backupdr.v1.IAcceleratorConfig[]; + + /** ComputeInstanceBackupProperties minCpuPlatform. */ + public minCpuPlatform?: (string|null); + + /** ComputeInstanceBackupProperties keyRevocationActionType. */ + public keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + + /** ComputeInstanceBackupProperties sourceInstance. */ + public sourceInstance?: (string|null); + + /** ComputeInstanceBackupProperties labels. */ + public labels: { [k: string]: string }; + + /** ComputeInstanceBackupProperties _description. */ + public _description?: "description"; + + /** ComputeInstanceBackupProperties _tags. */ + public _tags?: "tags"; + + /** ComputeInstanceBackupProperties _machineType. */ + public _machineType?: "machineType"; + + /** ComputeInstanceBackupProperties _canIpForward. */ + public _canIpForward?: "canIpForward"; + + /** ComputeInstanceBackupProperties _metadata. */ + public _metadata?: "metadata"; + + /** ComputeInstanceBackupProperties _scheduling. */ + public _scheduling?: "scheduling"; + + /** ComputeInstanceBackupProperties _minCpuPlatform. */ + public _minCpuPlatform?: "minCpuPlatform"; + + /** ComputeInstanceBackupProperties _keyRevocationActionType. */ + public _keyRevocationActionType?: "keyRevocationActionType"; + + /** ComputeInstanceBackupProperties _sourceInstance. */ + public _sourceInstance?: "sourceInstance"; + + /** + * Creates a new ComputeInstanceBackupProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceBackupProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceBackupProperties): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + + /** + * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * @param message ComputeInstanceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * @param message ComputeInstanceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + + /** + * Verifies a ComputeInstanceBackupProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceBackupProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + + /** + * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceBackupProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceBackupProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceBackupProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ComputeInstanceRestoreProperties. */ + interface IComputeInstanceRestoreProperties { + + /** ComputeInstanceRestoreProperties name */ + name?: (string|null); + + /** ComputeInstanceRestoreProperties advancedMachineFeatures */ + advancedMachineFeatures?: (google.cloud.backupdr.v1.IAdvancedMachineFeatures|null); + + /** ComputeInstanceRestoreProperties canIpForward */ + canIpForward?: (boolean|null); + + /** ComputeInstanceRestoreProperties confidentialInstanceConfig */ + confidentialInstanceConfig?: (google.cloud.backupdr.v1.IConfidentialInstanceConfig|null); + + /** ComputeInstanceRestoreProperties deletionProtection */ + deletionProtection?: (boolean|null); + + /** ComputeInstanceRestoreProperties description */ + description?: (string|null); + + /** ComputeInstanceRestoreProperties disks */ + disks?: (google.cloud.backupdr.v1.IAttachedDisk[]|null); + + /** ComputeInstanceRestoreProperties displayDevice */ + displayDevice?: (google.cloud.backupdr.v1.IDisplayDevice|null); + + /** ComputeInstanceRestoreProperties guestAccelerators */ + guestAccelerators?: (google.cloud.backupdr.v1.IAcceleratorConfig[]|null); + + /** ComputeInstanceRestoreProperties hostname */ + hostname?: (string|null); + + /** ComputeInstanceRestoreProperties instanceEncryptionKey */ + instanceEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** ComputeInstanceRestoreProperties keyRevocationActionType */ + keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + + /** ComputeInstanceRestoreProperties labels */ + labels?: ({ [k: string]: string }|null); + + /** ComputeInstanceRestoreProperties machineType */ + machineType?: (string|null); + + /** ComputeInstanceRestoreProperties metadata */ + metadata?: (google.cloud.backupdr.v1.IMetadata|null); + + /** ComputeInstanceRestoreProperties minCpuPlatform */ + minCpuPlatform?: (string|null); + + /** ComputeInstanceRestoreProperties networkInterfaces */ + networkInterfaces?: (google.cloud.backupdr.v1.INetworkInterface[]|null); + + /** ComputeInstanceRestoreProperties networkPerformanceConfig */ + networkPerformanceConfig?: (google.cloud.backupdr.v1.INetworkPerformanceConfig|null); + + /** ComputeInstanceRestoreProperties params */ + params?: (google.cloud.backupdr.v1.IInstanceParams|null); + + /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess */ + privateIpv6GoogleAccess?: (google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); + + /** ComputeInstanceRestoreProperties allocationAffinity */ + allocationAffinity?: (google.cloud.backupdr.v1.IAllocationAffinity|null); + + /** ComputeInstanceRestoreProperties resourcePolicies */ + resourcePolicies?: (string[]|null); + + /** ComputeInstanceRestoreProperties scheduling */ + scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + + /** ComputeInstanceRestoreProperties serviceAccounts */ + serviceAccounts?: (google.cloud.backupdr.v1.IServiceAccount[]|null); + + /** ComputeInstanceRestoreProperties tags */ + tags?: (google.cloud.backupdr.v1.ITags|null); + } + + /** Represents a ComputeInstanceRestoreProperties. */ + class ComputeInstanceRestoreProperties implements IComputeInstanceRestoreProperties { + + /** + * Constructs a new ComputeInstanceRestoreProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties); + + /** ComputeInstanceRestoreProperties name. */ + public name?: (string|null); + + /** ComputeInstanceRestoreProperties advancedMachineFeatures. */ + public advancedMachineFeatures?: (google.cloud.backupdr.v1.IAdvancedMachineFeatures|null); + + /** ComputeInstanceRestoreProperties canIpForward. */ + public canIpForward?: (boolean|null); + + /** ComputeInstanceRestoreProperties confidentialInstanceConfig. */ + public confidentialInstanceConfig?: (google.cloud.backupdr.v1.IConfidentialInstanceConfig|null); + + /** ComputeInstanceRestoreProperties deletionProtection. */ + public deletionProtection?: (boolean|null); + + /** ComputeInstanceRestoreProperties description. */ + public description?: (string|null); + + /** ComputeInstanceRestoreProperties disks. */ + public disks: google.cloud.backupdr.v1.IAttachedDisk[]; + + /** ComputeInstanceRestoreProperties displayDevice. */ + public displayDevice?: (google.cloud.backupdr.v1.IDisplayDevice|null); + + /** ComputeInstanceRestoreProperties guestAccelerators. */ + public guestAccelerators: google.cloud.backupdr.v1.IAcceleratorConfig[]; + + /** ComputeInstanceRestoreProperties hostname. */ + public hostname?: (string|null); + + /** ComputeInstanceRestoreProperties instanceEncryptionKey. */ + public instanceEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** ComputeInstanceRestoreProperties keyRevocationActionType. */ + public keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + + /** ComputeInstanceRestoreProperties labels. */ + public labels: { [k: string]: string }; + + /** ComputeInstanceRestoreProperties machineType. */ + public machineType?: (string|null); + + /** ComputeInstanceRestoreProperties metadata. */ + public metadata?: (google.cloud.backupdr.v1.IMetadata|null); + + /** ComputeInstanceRestoreProperties minCpuPlatform. */ + public minCpuPlatform?: (string|null); + + /** ComputeInstanceRestoreProperties networkInterfaces. */ + public networkInterfaces: google.cloud.backupdr.v1.INetworkInterface[]; + + /** ComputeInstanceRestoreProperties networkPerformanceConfig. */ + public networkPerformanceConfig?: (google.cloud.backupdr.v1.INetworkPerformanceConfig|null); + + /** ComputeInstanceRestoreProperties params. */ + public params?: (google.cloud.backupdr.v1.IInstanceParams|null); + + /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess. */ + public privateIpv6GoogleAccess?: (google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); + + /** ComputeInstanceRestoreProperties allocationAffinity. */ + public allocationAffinity?: (google.cloud.backupdr.v1.IAllocationAffinity|null); + + /** ComputeInstanceRestoreProperties resourcePolicies. */ + public resourcePolicies: string[]; + + /** ComputeInstanceRestoreProperties scheduling. */ + public scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + + /** ComputeInstanceRestoreProperties serviceAccounts. */ + public serviceAccounts: google.cloud.backupdr.v1.IServiceAccount[]; + + /** ComputeInstanceRestoreProperties tags. */ + public tags?: (google.cloud.backupdr.v1.ITags|null); + + /** ComputeInstanceRestoreProperties _name. */ + public _name?: "name"; + + /** ComputeInstanceRestoreProperties _advancedMachineFeatures. */ + public _advancedMachineFeatures?: "advancedMachineFeatures"; + + /** ComputeInstanceRestoreProperties _canIpForward. */ + public _canIpForward?: "canIpForward"; + + /** ComputeInstanceRestoreProperties _confidentialInstanceConfig. */ + public _confidentialInstanceConfig?: "confidentialInstanceConfig"; + + /** ComputeInstanceRestoreProperties _deletionProtection. */ + public _deletionProtection?: "deletionProtection"; + + /** ComputeInstanceRestoreProperties _description. */ + public _description?: "description"; + + /** ComputeInstanceRestoreProperties _displayDevice. */ + public _displayDevice?: "displayDevice"; + + /** ComputeInstanceRestoreProperties _hostname. */ + public _hostname?: "hostname"; + + /** ComputeInstanceRestoreProperties _instanceEncryptionKey. */ + public _instanceEncryptionKey?: "instanceEncryptionKey"; + + /** ComputeInstanceRestoreProperties _keyRevocationActionType. */ + public _keyRevocationActionType?: "keyRevocationActionType"; + + /** ComputeInstanceRestoreProperties _machineType. */ + public _machineType?: "machineType"; + + /** ComputeInstanceRestoreProperties _metadata. */ + public _metadata?: "metadata"; + + /** ComputeInstanceRestoreProperties _minCpuPlatform. */ + public _minCpuPlatform?: "minCpuPlatform"; + + /** ComputeInstanceRestoreProperties _networkPerformanceConfig. */ + public _networkPerformanceConfig?: "networkPerformanceConfig"; + + /** ComputeInstanceRestoreProperties _params. */ + public _params?: "params"; + + /** ComputeInstanceRestoreProperties _privateIpv6GoogleAccess. */ + public _privateIpv6GoogleAccess?: "privateIpv6GoogleAccess"; + + /** ComputeInstanceRestoreProperties _allocationAffinity. */ + public _allocationAffinity?: "allocationAffinity"; + + /** ComputeInstanceRestoreProperties _scheduling. */ + public _scheduling?: "scheduling"; + + /** ComputeInstanceRestoreProperties _tags. */ + public _tags?: "tags"; + + /** + * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceRestoreProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * @param message ComputeInstanceRestoreProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * @param message ComputeInstanceRestoreProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceRestoreProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + + /** + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceRestoreProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + + /** + * Verifies a ComputeInstanceRestoreProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceRestoreProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + + /** + * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceRestoreProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceRestoreProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceRestoreProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceRestoreProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ComputeInstanceRestoreProperties { + + /** InstancePrivateIpv6GoogleAccess enum. */ + enum InstancePrivateIpv6GoogleAccess { + INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0, + INHERIT_FROM_SUBNETWORK = 1, + ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2, + ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3 + } + } + + /** Properties of a ComputeInstanceTargetEnvironment. */ + interface IComputeInstanceTargetEnvironment { + + /** ComputeInstanceTargetEnvironment project */ + project?: (string|null); + + /** ComputeInstanceTargetEnvironment zone */ + zone?: (string|null); + } + + /** Represents a ComputeInstanceTargetEnvironment. */ + class ComputeInstanceTargetEnvironment implements IComputeInstanceTargetEnvironment { + + /** + * Constructs a new ComputeInstanceTargetEnvironment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment); + + /** ComputeInstanceTargetEnvironment project. */ + public project: string; + + /** ComputeInstanceTargetEnvironment zone. */ + public zone: string; + + /** + * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceTargetEnvironment instance + */ + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + + /** + * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @param message ComputeInstanceTargetEnvironment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @param message ComputeInstanceTargetEnvironment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceTargetEnvironment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + + /** + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceTargetEnvironment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + + /** + * Verifies a ComputeInstanceTargetEnvironment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceTargetEnvironment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + + /** + * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. + * @param message ComputeInstanceTargetEnvironment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceTargetEnvironment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceTargetEnvironment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ComputeInstanceDataSourceProperties. */ + interface IComputeInstanceDataSourceProperties { + + /** ComputeInstanceDataSourceProperties name */ + name?: (string|null); + + /** ComputeInstanceDataSourceProperties description */ + description?: (string|null); + + /** ComputeInstanceDataSourceProperties machineType */ + machineType?: (string|null); + + /** ComputeInstanceDataSourceProperties totalDiskCount */ + totalDiskCount?: (number|Long|string|null); + + /** ComputeInstanceDataSourceProperties totalDiskSizeGb */ + totalDiskSizeGb?: (number|Long|string|null); + } + + /** Represents a ComputeInstanceDataSourceProperties. */ + class ComputeInstanceDataSourceProperties implements IComputeInstanceDataSourceProperties { + + /** + * Constructs a new ComputeInstanceDataSourceProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties); + + /** ComputeInstanceDataSourceProperties name. */ + public name: string; + + /** ComputeInstanceDataSourceProperties description. */ + public description: string; + + /** ComputeInstanceDataSourceProperties machineType. */ + public machineType: string; + + /** ComputeInstanceDataSourceProperties totalDiskCount. */ + public totalDiskCount: (number|Long|string); + + /** ComputeInstanceDataSourceProperties totalDiskSizeGb. */ + public totalDiskSizeGb: (number|Long|string); + + /** + * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceDataSourceProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + + /** + * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @param message ComputeInstanceDataSourceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @param message ComputeInstanceDataSourceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceDataSourceProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + + /** + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceDataSourceProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + + /** + * Verifies a ComputeInstanceDataSourceProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceDataSourceProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + + /** + * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceDataSourceProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceDataSourceProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceDataSourceProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdvancedMachineFeatures. */ + interface IAdvancedMachineFeatures { + + /** AdvancedMachineFeatures enableNestedVirtualization */ + enableNestedVirtualization?: (boolean|null); + + /** AdvancedMachineFeatures threadsPerCore */ + threadsPerCore?: (number|null); + + /** AdvancedMachineFeatures visibleCoreCount */ + visibleCoreCount?: (number|null); + + /** AdvancedMachineFeatures enableUefiNetworking */ + enableUefiNetworking?: (boolean|null); + } + + /** Represents an AdvancedMachineFeatures. */ + class AdvancedMachineFeatures implements IAdvancedMachineFeatures { + + /** + * Constructs a new AdvancedMachineFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAdvancedMachineFeatures); + + /** AdvancedMachineFeatures enableNestedVirtualization. */ + public enableNestedVirtualization?: (boolean|null); + + /** AdvancedMachineFeatures threadsPerCore. */ + public threadsPerCore?: (number|null); + + /** AdvancedMachineFeatures visibleCoreCount. */ + public visibleCoreCount?: (number|null); + + /** AdvancedMachineFeatures enableUefiNetworking. */ + public enableUefiNetworking?: (boolean|null); + + /** AdvancedMachineFeatures _enableNestedVirtualization. */ + public _enableNestedVirtualization?: "enableNestedVirtualization"; + + /** AdvancedMachineFeatures _threadsPerCore. */ + public _threadsPerCore?: "threadsPerCore"; + + /** AdvancedMachineFeatures _visibleCoreCount. */ + public _visibleCoreCount?: "visibleCoreCount"; + + /** AdvancedMachineFeatures _enableUefiNetworking. */ + public _enableUefiNetworking?: "enableUefiNetworking"; + + /** + * Creates a new AdvancedMachineFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns AdvancedMachineFeatures instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAdvancedMachineFeatures): google.cloud.backupdr.v1.AdvancedMachineFeatures; + + /** + * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @param message AdvancedMachineFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @param message AdvancedMachineFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AdvancedMachineFeatures; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AdvancedMachineFeatures; + + /** + * Verifies an AdvancedMachineFeatures message. + * @param message Plain 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 AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdvancedMachineFeatures + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AdvancedMachineFeatures; + + /** + * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. + * @param message AdvancedMachineFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AdvancedMachineFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdvancedMachineFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdvancedMachineFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConfidentialInstanceConfig. */ + interface IConfidentialInstanceConfig { + + /** ConfidentialInstanceConfig enableConfidentialCompute */ + enableConfidentialCompute?: (boolean|null); + } + + /** Represents a ConfidentialInstanceConfig. */ + class ConfidentialInstanceConfig implements IConfidentialInstanceConfig { + + /** + * Constructs a new ConfidentialInstanceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IConfidentialInstanceConfig); + + /** ConfidentialInstanceConfig enableConfidentialCompute. */ + public enableConfidentialCompute?: (boolean|null); + + /** ConfidentialInstanceConfig _enableConfidentialCompute. */ + public _enableConfidentialCompute?: "enableConfidentialCompute"; + + /** + * Creates a new ConfidentialInstanceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfidentialInstanceConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IConfidentialInstanceConfig): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + + /** + * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * @param message ConfidentialInstanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * @param message ConfidentialInstanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfidentialInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + + /** + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfidentialInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + + /** + * Verifies a ConfidentialInstanceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfidentialInstanceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + + /** + * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. + * @param message ConfidentialInstanceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ConfidentialInstanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfidentialInstanceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfidentialInstanceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DisplayDevice. */ + interface IDisplayDevice { + + /** DisplayDevice enableDisplay */ + enableDisplay?: (boolean|null); + } + + /** Represents a DisplayDevice. */ + class DisplayDevice implements IDisplayDevice { + + /** + * Constructs a new DisplayDevice. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDisplayDevice); + + /** DisplayDevice enableDisplay. */ + public enableDisplay?: (boolean|null); + + /** DisplayDevice _enableDisplay. */ + public _enableDisplay?: "enableDisplay"; + + /** + * Creates a new DisplayDevice instance using the specified properties. + * @param [properties] Properties to set + * @returns DisplayDevice instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDisplayDevice): google.cloud.backupdr.v1.DisplayDevice; + + /** + * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @param message DisplayDevice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @param message DisplayDevice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DisplayDevice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DisplayDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DisplayDevice; + + /** + * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DisplayDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DisplayDevice; + + /** + * Verifies a DisplayDevice message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DisplayDevice + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DisplayDevice; + + /** + * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. + * @param message DisplayDevice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DisplayDevice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DisplayDevice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DisplayDevice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcceleratorConfig. */ + interface IAcceleratorConfig { + + /** AcceleratorConfig acceleratorType */ + acceleratorType?: (string|null); + + /** AcceleratorConfig acceleratorCount */ + acceleratorCount?: (number|null); + } + + /** Represents an AcceleratorConfig. */ + class AcceleratorConfig implements IAcceleratorConfig { + + /** + * Constructs a new AcceleratorConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAcceleratorConfig); + + /** AcceleratorConfig acceleratorType. */ + public acceleratorType?: (string|null); + + /** AcceleratorConfig acceleratorCount. */ + public acceleratorCount?: (number|null); + + /** AcceleratorConfig _acceleratorType. */ + public _acceleratorType?: "acceleratorType"; + + /** AcceleratorConfig _acceleratorCount. */ + public _acceleratorCount?: "acceleratorCount"; + + /** + * Creates a new AcceleratorConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AcceleratorConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAcceleratorConfig): google.cloud.backupdr.v1.AcceleratorConfig; + + /** + * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * @param message AcceleratorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * @param message AcceleratorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AcceleratorConfig; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AcceleratorConfig; + + /** + * Verifies an AcceleratorConfig message. + * @param message Plain 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 AcceleratorConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcceleratorConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AcceleratorConfig; + + /** + * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. + * @param message AcceleratorConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AcceleratorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcceleratorConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcceleratorConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomerEncryptionKey. */ + interface ICustomerEncryptionKey { + + /** CustomerEncryptionKey rawKey */ + rawKey?: (string|null); + + /** CustomerEncryptionKey rsaEncryptedKey */ + rsaEncryptedKey?: (string|null); + + /** CustomerEncryptionKey kmsKeyName */ + kmsKeyName?: (string|null); + + /** CustomerEncryptionKey kmsKeyServiceAccount */ + kmsKeyServiceAccount?: (string|null); + } + + /** Represents a CustomerEncryptionKey. */ + class CustomerEncryptionKey implements ICustomerEncryptionKey { + + /** + * Constructs a new CustomerEncryptionKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICustomerEncryptionKey); + + /** CustomerEncryptionKey rawKey. */ + public rawKey?: (string|null); + + /** CustomerEncryptionKey rsaEncryptedKey. */ + public rsaEncryptedKey?: (string|null); + + /** CustomerEncryptionKey kmsKeyName. */ + public kmsKeyName?: (string|null); + + /** CustomerEncryptionKey kmsKeyServiceAccount. */ + public kmsKeyServiceAccount?: (string|null); + + /** CustomerEncryptionKey key. */ + public key?: ("rawKey"|"rsaEncryptedKey"|"kmsKeyName"); + + /** CustomerEncryptionKey _kmsKeyServiceAccount. */ + public _kmsKeyServiceAccount?: "kmsKeyServiceAccount"; + + /** + * Creates a new CustomerEncryptionKey instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomerEncryptionKey instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICustomerEncryptionKey): google.cloud.backupdr.v1.CustomerEncryptionKey; + + /** + * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @param message CustomerEncryptionKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @param message CustomerEncryptionKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomerEncryptionKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomerEncryptionKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CustomerEncryptionKey; + + /** + * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomerEncryptionKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CustomerEncryptionKey; + + /** + * Verifies a CustomerEncryptionKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomerEncryptionKey + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CustomerEncryptionKey; + + /** + * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. + * @param message CustomerEncryptionKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CustomerEncryptionKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomerEncryptionKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomerEncryptionKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Entry. */ + interface IEntry { + + /** Entry key */ + key?: (string|null); + + /** Entry value */ + value?: (string|null); + } + + /** Represents an Entry. */ + class Entry implements IEntry { + + /** + * Constructs a new Entry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IEntry); + + /** Entry key. */ + public key?: (string|null); + + /** Entry value. */ + public value?: (string|null); + + /** Entry _key. */ + public _key?: "key"; + + /** Entry _value. */ + public _value?: "value"; + + /** + * Creates a new Entry instance using the specified properties. + * @param [properties] Properties to set + * @returns Entry instance + */ + public static create(properties?: google.cloud.backupdr.v1.IEntry): google.cloud.backupdr.v1.Entry; + + /** + * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Entry; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Entry; + + /** + * Verifies an Entry message. + * @param message Plain 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 Entry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Entry; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @param message Entry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Entry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Metadata. */ + interface IMetadata { + + /** Metadata items */ + items?: (google.cloud.backupdr.v1.IEntry[]|null); + } + + /** Represents a Metadata. */ + class Metadata implements IMetadata { + + /** + * Constructs a new Metadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IMetadata); + + /** Metadata items. */ + public items: google.cloud.backupdr.v1.IEntry[]; + + /** + * Creates a new Metadata instance using the specified properties. + * @param [properties] Properties to set + * @returns Metadata instance + */ + public static create(properties?: google.cloud.backupdr.v1.IMetadata): google.cloud.backupdr.v1.Metadata; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Metadata; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Metadata; + + /** + * Verifies a Metadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Metadata; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @param message Metadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkInterface. */ + interface INetworkInterface { + + /** NetworkInterface network */ + network?: (string|null); + + /** NetworkInterface subnetwork */ + subnetwork?: (string|null); + + /** NetworkInterface ipAddress */ + ipAddress?: (string|null); + + /** NetworkInterface ipv6Address */ + ipv6Address?: (string|null); + + /** NetworkInterface internalIpv6PrefixLength */ + internalIpv6PrefixLength?: (number|null); + + /** NetworkInterface name */ + name?: (string|null); + + /** NetworkInterface accessConfigs */ + accessConfigs?: (google.cloud.backupdr.v1.IAccessConfig[]|null); + + /** NetworkInterface ipv6AccessConfigs */ + ipv6AccessConfigs?: (google.cloud.backupdr.v1.IAccessConfig[]|null); + + /** NetworkInterface aliasIpRanges */ + aliasIpRanges?: (google.cloud.backupdr.v1.IAliasIpRange[]|null); + + /** NetworkInterface stackType */ + stackType?: (google.cloud.backupdr.v1.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.StackType|null); + + /** NetworkInterface ipv6AccessType */ + ipv6AccessType?: (google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null); + + /** NetworkInterface queueCount */ + queueCount?: (number|null); + + /** NetworkInterface nicType */ + nicType?: (google.cloud.backupdr.v1.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.NicType|null); + + /** NetworkInterface networkAttachment */ + networkAttachment?: (string|null); + } + + /** Represents a NetworkInterface. */ + class NetworkInterface implements INetworkInterface { + + /** + * Constructs a new NetworkInterface. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.INetworkInterface); + + /** NetworkInterface network. */ + public network?: (string|null); + + /** NetworkInterface subnetwork. */ + public subnetwork?: (string|null); + + /** NetworkInterface ipAddress. */ + public ipAddress?: (string|null); + + /** NetworkInterface ipv6Address. */ + public ipv6Address?: (string|null); + + /** NetworkInterface internalIpv6PrefixLength. */ + public internalIpv6PrefixLength?: (number|null); + + /** NetworkInterface name. */ + public name?: (string|null); + + /** NetworkInterface accessConfigs. */ + public accessConfigs: google.cloud.backupdr.v1.IAccessConfig[]; + + /** NetworkInterface ipv6AccessConfigs. */ + public ipv6AccessConfigs: google.cloud.backupdr.v1.IAccessConfig[]; + + /** NetworkInterface aliasIpRanges. */ + public aliasIpRanges: google.cloud.backupdr.v1.IAliasIpRange[]; + + /** NetworkInterface stackType. */ + public stackType?: (google.cloud.backupdr.v1.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.StackType|null); + + /** NetworkInterface ipv6AccessType. */ + public ipv6AccessType?: (google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null); + + /** NetworkInterface queueCount. */ + public queueCount?: (number|null); + + /** NetworkInterface nicType. */ + public nicType?: (google.cloud.backupdr.v1.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.NicType|null); + + /** NetworkInterface networkAttachment. */ + public networkAttachment?: (string|null); + + /** NetworkInterface _network. */ + public _network?: "network"; + + /** NetworkInterface _subnetwork. */ + public _subnetwork?: "subnetwork"; + + /** NetworkInterface _ipAddress. */ + public _ipAddress?: "ipAddress"; + + /** NetworkInterface _ipv6Address. */ + public _ipv6Address?: "ipv6Address"; + + /** NetworkInterface _internalIpv6PrefixLength. */ + public _internalIpv6PrefixLength?: "internalIpv6PrefixLength"; + + /** NetworkInterface _name. */ + public _name?: "name"; + + /** NetworkInterface _stackType. */ + public _stackType?: "stackType"; + + /** NetworkInterface _ipv6AccessType. */ + public _ipv6AccessType?: "ipv6AccessType"; + + /** NetworkInterface _queueCount. */ + public _queueCount?: "queueCount"; + + /** NetworkInterface _nicType. */ + public _nicType?: "nicType"; + + /** NetworkInterface _networkAttachment. */ + public _networkAttachment?: "networkAttachment"; + + /** + * Creates a new NetworkInterface instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkInterface instance + */ + public static create(properties?: google.cloud.backupdr.v1.INetworkInterface): google.cloud.backupdr.v1.NetworkInterface; + + /** + * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * @param message NetworkInterface message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * @param message NetworkInterface message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkInterface message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkInterface + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkInterface; + + /** + * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkInterface + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkInterface; + + /** + * Verifies a NetworkInterface message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkInterface + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkInterface; + + /** + * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. + * @param message NetworkInterface + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.NetworkInterface, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkInterface to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkInterface + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkInterface { + + /** StackType enum. */ + enum StackType { + STACK_TYPE_UNSPECIFIED = 0, + IPV4_ONLY = 1, + IPV4_IPV6 = 2 + } + + /** Ipv6AccessType enum. */ + enum Ipv6AccessType { + UNSPECIFIED_IPV6_ACCESS_TYPE = 0, + INTERNAL = 1, + EXTERNAL = 2 + } + + /** NicType enum. */ + enum NicType { + NIC_TYPE_UNSPECIFIED = 0, + VIRTIO_NET = 1, + GVNIC = 2 + } + } + + /** Properties of a NetworkPerformanceConfig. */ + interface INetworkPerformanceConfig { + + /** NetworkPerformanceConfig totalEgressBandwidthTier */ + totalEgressBandwidthTier?: (google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null); + } + + /** Represents a NetworkPerformanceConfig. */ + class NetworkPerformanceConfig implements INetworkPerformanceConfig { + + /** + * Constructs a new NetworkPerformanceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.INetworkPerformanceConfig); + + /** NetworkPerformanceConfig totalEgressBandwidthTier. */ + public totalEgressBandwidthTier?: (google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null); + + /** NetworkPerformanceConfig _totalEgressBandwidthTier. */ + public _totalEgressBandwidthTier?: "totalEgressBandwidthTier"; + + /** + * Creates a new NetworkPerformanceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkPerformanceConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.INetworkPerformanceConfig): google.cloud.backupdr.v1.NetworkPerformanceConfig; + + /** + * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * @param message NetworkPerformanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * @param message NetworkPerformanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkPerformanceConfig; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkPerformanceConfig; + + /** + * Verifies a NetworkPerformanceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkPerformanceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkPerformanceConfig; + + /** + * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. + * @param message NetworkPerformanceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.NetworkPerformanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkPerformanceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkPerformanceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkPerformanceConfig { + + /** Tier enum. */ + enum Tier { + TIER_UNSPECIFIED = 0, + DEFAULT = 1, + TIER_1 = 2 + } + } + + /** Properties of an AccessConfig. */ + interface IAccessConfig { + + /** AccessConfig type */ + type?: (google.cloud.backupdr.v1.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1.AccessConfig.AccessType|null); + + /** AccessConfig name */ + name?: (string|null); + + /** AccessConfig externalIp */ + externalIp?: (string|null); + + /** AccessConfig externalIpv6 */ + externalIpv6?: (string|null); + + /** AccessConfig externalIpv6PrefixLength */ + externalIpv6PrefixLength?: (number|null); + + /** AccessConfig setPublicPtr */ + setPublicPtr?: (boolean|null); + + /** AccessConfig publicPtrDomainName */ + publicPtrDomainName?: (string|null); + + /** AccessConfig networkTier */ + networkTier?: (google.cloud.backupdr.v1.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1.AccessConfig.NetworkTier|null); + } + + /** Represents an AccessConfig. */ + class AccessConfig implements IAccessConfig { + + /** + * Constructs a new AccessConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAccessConfig); + + /** AccessConfig type. */ + public type?: (google.cloud.backupdr.v1.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1.AccessConfig.AccessType|null); + + /** AccessConfig name. */ + public name?: (string|null); + + /** AccessConfig externalIp. */ + public externalIp?: (string|null); + + /** AccessConfig externalIpv6. */ + public externalIpv6?: (string|null); + + /** AccessConfig externalIpv6PrefixLength. */ + public externalIpv6PrefixLength?: (number|null); + + /** AccessConfig setPublicPtr. */ + public setPublicPtr?: (boolean|null); + + /** AccessConfig publicPtrDomainName. */ + public publicPtrDomainName?: (string|null); + + /** AccessConfig networkTier. */ + public networkTier?: (google.cloud.backupdr.v1.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1.AccessConfig.NetworkTier|null); + + /** AccessConfig _type. */ + public _type?: "type"; + + /** AccessConfig _name. */ + public _name?: "name"; + + /** AccessConfig _externalIp. */ + public _externalIp?: "externalIp"; + + /** AccessConfig _externalIpv6. */ + public _externalIpv6?: "externalIpv6"; + + /** AccessConfig _externalIpv6PrefixLength. */ + public _externalIpv6PrefixLength?: "externalIpv6PrefixLength"; + + /** AccessConfig _setPublicPtr. */ + public _setPublicPtr?: "setPublicPtr"; + + /** AccessConfig _publicPtrDomainName. */ + public _publicPtrDomainName?: "publicPtrDomainName"; + + /** AccessConfig _networkTier. */ + public _networkTier?: "networkTier"; + + /** + * Creates a new AccessConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAccessConfig): google.cloud.backupdr.v1.AccessConfig; + + /** + * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * @param message AccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * @param message AccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AccessConfig; + + /** + * Decodes an AccessConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AccessConfig; + + /** + * Verifies an AccessConfig message. + * @param message Plain 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 AccessConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AccessConfig; + + /** + * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. + * @param message AccessConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AccessConfig { + + /** AccessType enum. */ + enum AccessType { + ACCESS_TYPE_UNSPECIFIED = 0, + ONE_TO_ONE_NAT = 1, + DIRECT_IPV6 = 2 + } + + /** NetworkTier enum. */ + enum NetworkTier { + NETWORK_TIER_UNSPECIFIED = 0, + PREMIUM = 1, + STANDARD = 2 + } + } + + /** Properties of an AliasIpRange. */ + interface IAliasIpRange { + + /** AliasIpRange ipCidrRange */ + ipCidrRange?: (string|null); + + /** AliasIpRange subnetworkRangeName */ + subnetworkRangeName?: (string|null); + } + + /** Represents an AliasIpRange. */ + class AliasIpRange implements IAliasIpRange { + + /** + * Constructs a new AliasIpRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAliasIpRange); + + /** AliasIpRange ipCidrRange. */ + public ipCidrRange?: (string|null); + + /** AliasIpRange subnetworkRangeName. */ + public subnetworkRangeName?: (string|null); + + /** AliasIpRange _ipCidrRange. */ + public _ipCidrRange?: "ipCidrRange"; + + /** AliasIpRange _subnetworkRangeName. */ + public _subnetworkRangeName?: "subnetworkRangeName"; + + /** + * Creates a new AliasIpRange instance using the specified properties. + * @param [properties] Properties to set + * @returns AliasIpRange instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAliasIpRange): google.cloud.backupdr.v1.AliasIpRange; + + /** + * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. + * @param message AliasIpRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. + * @param message AliasIpRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AliasIpRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AliasIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AliasIpRange; + + /** + * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AliasIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AliasIpRange; + + /** + * Verifies an AliasIpRange message. + * @param message Plain 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 AliasIpRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AliasIpRange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AliasIpRange; + + /** + * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. + * @param message AliasIpRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AliasIpRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AliasIpRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AliasIpRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InstanceParams. */ + interface IInstanceParams { + + /** InstanceParams resourceManagerTags */ + resourceManagerTags?: ({ [k: string]: string }|null); + } + + /** Represents an InstanceParams. */ + class InstanceParams implements IInstanceParams { + + /** + * Constructs a new InstanceParams. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IInstanceParams); + + /** InstanceParams resourceManagerTags. */ + public resourceManagerTags: { [k: string]: string }; + + /** + * Creates a new InstanceParams instance using the specified properties. + * @param [properties] Properties to set + * @returns InstanceParams instance + */ + public static create(properties?: google.cloud.backupdr.v1.IInstanceParams): google.cloud.backupdr.v1.InstanceParams; + + /** + * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @param message InstanceParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @param message InstanceParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstanceParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstanceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InstanceParams; + + /** + * Decodes an InstanceParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstanceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InstanceParams; + + /** + * Verifies an InstanceParams message. + * @param message Plain 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 InstanceParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstanceParams + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InstanceParams; + + /** + * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. + * @param message InstanceParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.InstanceParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstanceParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstanceParams + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AllocationAffinity. */ + interface IAllocationAffinity { + + /** AllocationAffinity consumeAllocationType */ + consumeAllocationType?: (google.cloud.backupdr.v1.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1.AllocationAffinity.Type|null); + + /** AllocationAffinity key */ + key?: (string|null); + + /** AllocationAffinity values */ + values?: (string[]|null); + } + + /** Represents an AllocationAffinity. */ + class AllocationAffinity implements IAllocationAffinity { + + /** + * Constructs a new AllocationAffinity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAllocationAffinity); + + /** AllocationAffinity consumeAllocationType. */ + public consumeAllocationType?: (google.cloud.backupdr.v1.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1.AllocationAffinity.Type|null); + + /** AllocationAffinity key. */ + public key?: (string|null); + + /** AllocationAffinity values. */ + public values: string[]; + + /** AllocationAffinity _consumeAllocationType. */ + public _consumeAllocationType?: "consumeAllocationType"; + + /** AllocationAffinity _key. */ + public _key?: "key"; + + /** + * Creates a new AllocationAffinity instance using the specified properties. + * @param [properties] Properties to set + * @returns AllocationAffinity instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAllocationAffinity): google.cloud.backupdr.v1.AllocationAffinity; + + /** + * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. + * @param message AllocationAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. + * @param message AllocationAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllocationAffinity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllocationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AllocationAffinity; + + /** + * Decodes an AllocationAffinity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllocationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AllocationAffinity; + + /** + * Verifies an AllocationAffinity message. + * @param message Plain 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 AllocationAffinity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllocationAffinity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AllocationAffinity; + + /** + * Creates a plain object from an AllocationAffinity message. Also converts values to other types if specified. + * @param message AllocationAffinity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AllocationAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllocationAffinity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllocationAffinity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AllocationAffinity { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + NO_RESERVATION = 1, + ANY_RESERVATION = 2, + SPECIFIC_RESERVATION = 3 + } + } + + /** Properties of a Scheduling. */ + interface IScheduling { + + /** Scheduling onHostMaintenance */ + onHostMaintenance?: (google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null); + + /** Scheduling automaticRestart */ + automaticRestart?: (boolean|null); + + /** Scheduling preemptible */ + preemptible?: (boolean|null); + + /** Scheduling nodeAffinities */ + nodeAffinities?: (google.cloud.backupdr.v1.Scheduling.INodeAffinity[]|null); + + /** Scheduling minNodeCpus */ + minNodeCpus?: (number|null); + + /** Scheduling provisioningModel */ + provisioningModel?: (google.cloud.backupdr.v1.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null); + + /** Scheduling instanceTerminationAction */ + instanceTerminationAction?: (google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null); + + /** Scheduling localSsdRecoveryTimeout */ + localSsdRecoveryTimeout?: (google.cloud.backupdr.v1.ISchedulingDuration|null); + } + + /** Represents a Scheduling. */ + class Scheduling implements IScheduling { + + /** + * Constructs a new Scheduling. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IScheduling); + + /** Scheduling onHostMaintenance. */ + public onHostMaintenance?: (google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null); + + /** Scheduling automaticRestart. */ + public automaticRestart?: (boolean|null); + + /** Scheduling preemptible. */ + public preemptible?: (boolean|null); + + /** Scheduling nodeAffinities. */ + public nodeAffinities: google.cloud.backupdr.v1.Scheduling.INodeAffinity[]; + + /** Scheduling minNodeCpus. */ + public minNodeCpus?: (number|null); + + /** Scheduling provisioningModel. */ + public provisioningModel?: (google.cloud.backupdr.v1.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null); + + /** Scheduling instanceTerminationAction. */ + public instanceTerminationAction?: (google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null); + + /** Scheduling localSsdRecoveryTimeout. */ + public localSsdRecoveryTimeout?: (google.cloud.backupdr.v1.ISchedulingDuration|null); + + /** Scheduling _onHostMaintenance. */ + public _onHostMaintenance?: "onHostMaintenance"; + + /** Scheduling _automaticRestart. */ + public _automaticRestart?: "automaticRestart"; + + /** Scheduling _preemptible. */ + public _preemptible?: "preemptible"; + + /** Scheduling _minNodeCpus. */ + public _minNodeCpus?: "minNodeCpus"; + + /** Scheduling _provisioningModel. */ + public _provisioningModel?: "provisioningModel"; + + /** Scheduling _instanceTerminationAction. */ + public _instanceTerminationAction?: "instanceTerminationAction"; + + /** Scheduling _localSsdRecoveryTimeout. */ + public _localSsdRecoveryTimeout?: "localSsdRecoveryTimeout"; + + /** + * Creates a new Scheduling instance using the specified properties. + * @param [properties] Properties to set + * @returns Scheduling instance + */ + public static create(properties?: google.cloud.backupdr.v1.IScheduling): google.cloud.backupdr.v1.Scheduling; + + /** + * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. + * @param message Scheduling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. + * @param message Scheduling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Scheduling message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Scheduling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Scheduling; + + /** + * Decodes a Scheduling message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Scheduling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Scheduling; + + /** + * Verifies a Scheduling message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Scheduling + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Scheduling; + + /** + * Creates a plain object from a Scheduling message. Also converts values to other types if specified. + * @param message Scheduling + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Scheduling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Scheduling to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Scheduling + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Scheduling { + + /** OnHostMaintenance enum. */ + enum OnHostMaintenance { + ON_HOST_MAINTENANCE_UNSPECIFIED = 0, + TERMINATE = 1, + MIGRATE = 1000 + } + + /** Properties of a NodeAffinity. */ + interface INodeAffinity { + + /** NodeAffinity key */ + key?: (string|null); + + /** NodeAffinity operator */ + operator?: (google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null); + + /** NodeAffinity values */ + values?: (string[]|null); + } + + /** Represents a NodeAffinity. */ + class NodeAffinity implements INodeAffinity { + + /** + * Constructs a new NodeAffinity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.Scheduling.INodeAffinity); + + /** NodeAffinity key. */ + public key?: (string|null); + + /** NodeAffinity operator. */ + public operator?: (google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null); + + /** NodeAffinity values. */ + public values: string[]; + + /** NodeAffinity _key. */ + public _key?: "key"; + + /** NodeAffinity _operator. */ + public _operator?: "operator"; + + /** + * Creates a new NodeAffinity instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeAffinity instance + */ + public static create(properties?: google.cloud.backupdr.v1.Scheduling.INodeAffinity): google.cloud.backupdr.v1.Scheduling.NodeAffinity; + + /** + * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @param message NodeAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @param message NodeAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Scheduling.NodeAffinity; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Scheduling.NodeAffinity; + + /** + * Verifies a NodeAffinity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeAffinity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Scheduling.NodeAffinity; + + /** + * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. + * @param message NodeAffinity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Scheduling.NodeAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeAffinity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeAffinity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NodeAffinity { + + /** Operator enum. */ + enum Operator { + OPERATOR_UNSPECIFIED = 0, + IN = 1, + NOT_IN = 2 + } + } + + /** ProvisioningModel enum. */ + enum ProvisioningModel { + PROVISIONING_MODEL_UNSPECIFIED = 0, + STANDARD = 1, + SPOT = 2 + } + + /** InstanceTerminationAction enum. */ + enum InstanceTerminationAction { + INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0, + DELETE = 1, + STOP = 2 + } + } + + /** Properties of a SchedulingDuration. */ + interface ISchedulingDuration { + + /** SchedulingDuration seconds */ + seconds?: (number|Long|string|null); + + /** SchedulingDuration nanos */ + nanos?: (number|null); + } + + /** Represents a SchedulingDuration. */ + class SchedulingDuration implements ISchedulingDuration { + + /** + * Constructs a new SchedulingDuration. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ISchedulingDuration); + + /** SchedulingDuration seconds. */ + public seconds?: (number|Long|string|null); + + /** SchedulingDuration nanos. */ + public nanos?: (number|null); + + /** SchedulingDuration _seconds. */ + public _seconds?: "seconds"; + + /** SchedulingDuration _nanos. */ + public _nanos?: "nanos"; + + /** + * Creates a new SchedulingDuration instance using the specified properties. + * @param [properties] Properties to set + * @returns SchedulingDuration instance + */ + public static create(properties?: google.cloud.backupdr.v1.ISchedulingDuration): google.cloud.backupdr.v1.SchedulingDuration; + + /** + * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. + * @param message SchedulingDuration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. + * @param message SchedulingDuration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchedulingDuration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchedulingDuration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SchedulingDuration; + + /** + * Decodes a SchedulingDuration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchedulingDuration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SchedulingDuration; + + /** + * Verifies a SchedulingDuration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchedulingDuration + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SchedulingDuration; + + /** + * Creates a plain object from a SchedulingDuration message. Also converts values to other types if specified. + * @param message SchedulingDuration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.SchedulingDuration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchedulingDuration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchedulingDuration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceAccount. */ + interface IServiceAccount { + + /** ServiceAccount email */ + email?: (string|null); + + /** ServiceAccount scopes */ + scopes?: (string[]|null); + } + + /** Represents a ServiceAccount. */ + class ServiceAccount implements IServiceAccount { + + /** + * Constructs a new ServiceAccount. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IServiceAccount); + + /** ServiceAccount email. */ + public email?: (string|null); + + /** ServiceAccount scopes. */ + public scopes: string[]; + + /** ServiceAccount _email. */ + public _email?: "email"; + + /** + * Creates a new ServiceAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceAccount instance + */ + public static create(properties?: google.cloud.backupdr.v1.IServiceAccount): google.cloud.backupdr.v1.ServiceAccount; + + /** + * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. + * @param message ServiceAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. + * @param message ServiceAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ServiceAccount; + + /** + * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ServiceAccount; + + /** + * Verifies a ServiceAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceAccount + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ServiceAccount; + + /** + * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. + * @param message ServiceAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ServiceAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceAccount + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Tags. */ + interface ITags { + + /** Tags items */ + items?: (string[]|null); + } + + /** Represents a Tags. */ + class Tags implements ITags { + + /** + * Constructs a new Tags. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ITags); + + /** Tags items. */ + public items: string[]; + + /** + * Creates a new Tags instance using the specified properties. + * @param [properties] Properties to set + * @returns Tags instance + */ + public static create(properties?: google.cloud.backupdr.v1.ITags): google.cloud.backupdr.v1.Tags; + + /** + * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. + * @param message Tags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ITags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. + * @param message Tags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ITags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Tags message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Tags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Tags; + + /** + * Decodes a Tags message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Tags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Tags; + + /** + * Verifies a Tags message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Tags message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Tags + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Tags; + + /** + * Creates a plain object from a Tags message. Also converts values to other types if specified. + * @param message Tags + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Tags, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Tags to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Tags + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AttachedDisk. */ + interface IAttachedDisk { + + /** AttachedDisk initializeParams */ + initializeParams?: (google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null); + + /** AttachedDisk deviceName */ + deviceName?: (string|null); + + /** AttachedDisk kind */ + kind?: (string|null); + + /** AttachedDisk diskTypeDeprecated */ + diskTypeDeprecated?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); + + /** AttachedDisk mode */ + mode?: (google.cloud.backupdr.v1.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskMode|null); + + /** AttachedDisk source */ + source?: (string|null); + + /** AttachedDisk index */ + index?: (number|Long|string|null); + + /** AttachedDisk boot */ + boot?: (boolean|null); + + /** AttachedDisk autoDelete */ + autoDelete?: (boolean|null); + + /** AttachedDisk license */ + license?: (string[]|null); + + /** AttachedDisk diskInterface */ + diskInterface?: (google.cloud.backupdr.v1.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null); + + /** AttachedDisk guestOsFeature */ + guestOsFeature?: (google.cloud.backupdr.v1.IGuestOsFeature[]|null); + + /** AttachedDisk diskEncryptionKey */ + diskEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** AttachedDisk diskSizeGb */ + diskSizeGb?: (number|Long|string|null); + + /** AttachedDisk savedState */ + savedState?: (google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null); + + /** AttachedDisk diskType */ + diskType?: (string|null); + + /** AttachedDisk type */ + type?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); + } + + /** Represents an AttachedDisk. */ + class AttachedDisk implements IAttachedDisk { + + /** + * Constructs a new AttachedDisk. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAttachedDisk); + + /** AttachedDisk initializeParams. */ + public initializeParams?: (google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null); + + /** AttachedDisk deviceName. */ + public deviceName?: (string|null); + + /** AttachedDisk kind. */ + public kind?: (string|null); + + /** AttachedDisk diskTypeDeprecated. */ + public diskTypeDeprecated?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); + + /** AttachedDisk mode. */ + public mode?: (google.cloud.backupdr.v1.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskMode|null); + + /** AttachedDisk source. */ + public source?: (string|null); + + /** AttachedDisk index. */ + public index?: (number|Long|string|null); + + /** AttachedDisk boot. */ + public boot?: (boolean|null); + + /** AttachedDisk autoDelete. */ + public autoDelete?: (boolean|null); + + /** AttachedDisk license. */ + public license: string[]; + + /** AttachedDisk diskInterface. */ + public diskInterface?: (google.cloud.backupdr.v1.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null); + + /** AttachedDisk guestOsFeature. */ + public guestOsFeature: google.cloud.backupdr.v1.IGuestOsFeature[]; + + /** AttachedDisk diskEncryptionKey. */ + public diskEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** AttachedDisk diskSizeGb. */ + public diskSizeGb?: (number|Long|string|null); + + /** AttachedDisk savedState. */ + public savedState?: (google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null); + + /** AttachedDisk diskType. */ + public diskType?: (string|null); + + /** AttachedDisk type. */ + public type?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); + + /** AttachedDisk _initializeParams. */ + public _initializeParams?: "initializeParams"; + + /** AttachedDisk _deviceName. */ + public _deviceName?: "deviceName"; + + /** AttachedDisk _kind. */ + public _kind?: "kind"; + + /** AttachedDisk _diskTypeDeprecated. */ + public _diskTypeDeprecated?: "diskTypeDeprecated"; + + /** AttachedDisk _mode. */ + public _mode?: "mode"; + + /** AttachedDisk _source. */ + public _source?: "source"; + + /** AttachedDisk _index. */ + public _index?: "index"; + + /** AttachedDisk _boot. */ + public _boot?: "boot"; + + /** AttachedDisk _autoDelete. */ + public _autoDelete?: "autoDelete"; + + /** AttachedDisk _diskInterface. */ + public _diskInterface?: "diskInterface"; + + /** AttachedDisk _diskEncryptionKey. */ + public _diskEncryptionKey?: "diskEncryptionKey"; + + /** AttachedDisk _diskSizeGb. */ + public _diskSizeGb?: "diskSizeGb"; + + /** AttachedDisk _savedState. */ + public _savedState?: "savedState"; + + /** AttachedDisk _diskType. */ + public _diskType?: "diskType"; + + /** AttachedDisk _type. */ + public _type?: "type"; + + /** + * Creates a new AttachedDisk instance using the specified properties. + * @param [properties] Properties to set + * @returns AttachedDisk instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAttachedDisk): google.cloud.backupdr.v1.AttachedDisk; + + /** + * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. + * @param message AttachedDisk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. + * @param message AttachedDisk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AttachedDisk message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AttachedDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AttachedDisk; + + /** + * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AttachedDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AttachedDisk; + + /** + * Verifies an AttachedDisk message. + * @param message Plain 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 AttachedDisk message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AttachedDisk + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AttachedDisk; + + /** + * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. + * @param message AttachedDisk + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AttachedDisk, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AttachedDisk to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AttachedDisk + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AttachedDisk { + + /** Properties of an InitializeParams. */ + interface IInitializeParams { + + /** InitializeParams diskName */ + diskName?: (string|null); + + /** InitializeParams replicaZones */ + replicaZones?: (string[]|null); + } + + /** Represents an InitializeParams. */ + class InitializeParams implements IInitializeParams { + + /** + * Constructs a new InitializeParams. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams); + + /** InitializeParams diskName. */ + public diskName?: (string|null); + + /** InitializeParams replicaZones. */ + public replicaZones: string[]; + + /** InitializeParams _diskName. */ + public _diskName?: "diskName"; + + /** + * Creates a new InitializeParams instance using the specified properties. + * @param [properties] Properties to set + * @returns InitializeParams instance + */ + public static create(properties?: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Encodes the specified InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @param message InitializeParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @param message InitializeParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InitializeParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Decodes an InitializeParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Verifies an InitializeParams message. + * @param message Plain 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 InitializeParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InitializeParams + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. + * @param message InitializeParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AttachedDisk.InitializeParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InitializeParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InitializeParams + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** DiskType enum. */ + enum DiskType { + DISK_TYPE_UNSPECIFIED = 0, + SCRATCH = 1, + PERSISTENT = 2 + } + + /** DiskMode enum. */ + enum DiskMode { + DISK_MODE_UNSPECIFIED = 0, + READ_WRITE = 1, + READ_ONLY = 2, + LOCKED = 3 + } + + /** DiskInterface enum. */ + enum DiskInterface { + DISK_INTERFACE_UNSPECIFIED = 0, + SCSI = 1, + NVME = 2, + NVDIMM = 3, + ISCSI = 4 + } + + /** DiskSavedState enum. */ + enum DiskSavedState { + DISK_SAVED_STATE_UNSPECIFIED = 0, + PRESERVED = 1 + } + } + + /** Properties of a GuestOsFeature. */ + interface IGuestOsFeature { + + /** GuestOsFeature type */ + type?: (google.cloud.backupdr.v1.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null); + } + + /** Represents a GuestOsFeature. */ + class GuestOsFeature implements IGuestOsFeature { + + /** + * Constructs a new GuestOsFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGuestOsFeature); + + /** GuestOsFeature type. */ + public type?: (google.cloud.backupdr.v1.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null); + + /** GuestOsFeature _type. */ + public _type?: "type"; + + /** + * Creates a new GuestOsFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns GuestOsFeature instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGuestOsFeature): google.cloud.backupdr.v1.GuestOsFeature; + + /** + * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @param message GuestOsFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @param message GuestOsFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GuestOsFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GuestOsFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GuestOsFeature; + + /** + * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GuestOsFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GuestOsFeature; + + /** + * Verifies a GuestOsFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GuestOsFeature + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GuestOsFeature; + + /** + * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. + * @param message GuestOsFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GuestOsFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GuestOsFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GuestOsFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GuestOsFeature { + + /** FeatureType enum. */ + enum FeatureType { + FEATURE_TYPE_UNSPECIFIED = 0, + VIRTIO_SCSI_MULTIQUEUE = 1, + WINDOWS = 2, + MULTI_IP_SUBNET = 3, + UEFI_COMPATIBLE = 4, + SECURE_BOOT = 5, + GVNIC = 6, + SEV_CAPABLE = 7, + BARE_METAL_LINUX_COMPATIBLE = 8, + SUSPEND_RESUME_COMPATIBLE = 9, + SEV_LIVE_MIGRATABLE = 10, + SEV_SNP_CAPABLE = 11, + TDX_CAPABLE = 12, + IDPF = 13, + SEV_LIVE_MIGRATABLE_V2 = 14 + } + } + + /** KeyRevocationActionType enum. */ + enum KeyRevocationActionType { + KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0, + NONE = 1, + STOP = 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); + } + + /** 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; + + /** + * 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 FieldInfo. */ + interface IFieldInfo { + + /** FieldInfo format */ + format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); + } + + /** Represents a FieldInfo. */ + class FieldInfo implements IFieldInfo { + + /** + * Constructs a new FieldInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IFieldInfo); + + /** FieldInfo format. */ + public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); + + /** + * Creates a new FieldInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldInfo instance + */ + public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldInfo + * @throws {Error} If the payload is not 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.FieldInfo; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldInfo + * @throws {Error} If the payload 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.FieldInfo; + + /** + * Verifies a FieldInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldInfo + */ + public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @param message FieldInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldInfo { + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + UUID4 = 1, + IPV4 = 2, + IPV6 = 3, + IPV4_OR_IPV6 = 4 + } + } + + /** 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.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceDescriptor, 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 + * 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.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * 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 CustomHttpPattern + * @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.CustomHttpPattern; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern + * @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.CustomHttpPattern; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; /** - * Verifies a CustomHttpPattern message. + * 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomHttpPattern + * @returns ResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern + * 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.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this ResourceDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomHttpPattern + * 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; } - /** Properties of a CommonLanguageSettings. */ - interface ICommonLanguageSettings { + namespace ResourceDescriptor { - /** CommonLanguageSettings referenceDocsUri */ - referenceDocsUri?: (string|null); + /** 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 { - /** CommonLanguageSettings destinations */ - destinations?: (google.api.ClientLibraryDestination[]|null); + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); } - /** Represents a CommonLanguageSettings. */ - class CommonLanguageSettings implements ICommonLanguageSettings { + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { /** - * Constructs a new CommonLanguageSettings. + * Constructs a new FileDescriptorSet. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICommonLanguageSettings); - - /** CommonLanguageSettings referenceDocsUri. */ - public referenceDocsUri: string; + constructor(properties?: google.protobuf.IFileDescriptorSet); - /** CommonLanguageSettings destinations. */ - public destinations: google.api.ClientLibraryDestination[]; + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; /** - * Creates a new CommonLanguageSettings instance using the specified properties. + * Creates a new FileDescriptorSet instance using the specified properties. * @param [properties] Properties to set - * @returns CommonLanguageSettings instance + * @returns FileDescriptorSet instance */ - public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode + * 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.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFileDescriptorSet, 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 + * 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.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * 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 CommonLanguageSettings + * @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.api.CommonLanguageSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CommonLanguageSettings + * @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.api.CommonLanguageSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; /** - * Verifies a CommonLanguageSettings message. + * 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 CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CommonLanguageSettings + * @returns FileDescriptorSet */ - public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @param message CommonLanguageSettings + * 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.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CommonLanguageSettings to JSON. + * Converts this FileDescriptorSet to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CommonLanguageSettings + * 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; } - /** Properties of a ClientLibrarySettings. */ - interface IClientLibrarySettings { + /** 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 + } - /** ClientLibrarySettings version */ - version?: (string|null); + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { - /** ClientLibrarySettings launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + /** FileDescriptorProto name */ + name?: (string|null); - /** ClientLibrarySettings restNumericEnums */ - restNumericEnums?: (boolean|null); + /** FileDescriptorProto package */ + "package"?: (string|null); - /** ClientLibrarySettings javaSettings */ - javaSettings?: (google.api.IJavaSettings|null); + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); - /** ClientLibrarySettings cppSettings */ - cppSettings?: (google.api.ICppSettings|null); + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); - /** ClientLibrarySettings phpSettings */ - phpSettings?: (google.api.IPhpSettings|null); + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); - /** ClientLibrarySettings pythonSettings */ - pythonSettings?: (google.api.IPythonSettings|null); + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); - /** ClientLibrarySettings nodeSettings */ - nodeSettings?: (google.api.INodeSettings|null); + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** ClientLibrarySettings dotnetSettings */ - dotnetSettings?: (google.api.IDotnetSettings|null); + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); - /** ClientLibrarySettings rubySettings */ - rubySettings?: (google.api.IRubySettings|null); + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** ClientLibrarySettings goSettings */ - goSettings?: (google.api.IGoSettings|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 ClientLibrarySettings. */ - class ClientLibrarySettings implements IClientLibrarySettings { + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { /** - * Constructs a new ClientLibrarySettings. + * Constructs a new FileDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.IClientLibrarySettings); + constructor(properties?: google.protobuf.IFileDescriptorProto); - /** ClientLibrarySettings version. */ - public version: string; + /** FileDescriptorProto name. */ + public name: string; - /** ClientLibrarySettings launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + /** FileDescriptorProto package. */ + public package: string; - /** ClientLibrarySettings restNumericEnums. */ - public restNumericEnums: boolean; + /** FileDescriptorProto dependency. */ + public dependency: string[]; - /** ClientLibrarySettings javaSettings. */ - public javaSettings?: (google.api.IJavaSettings|null); + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; - /** ClientLibrarySettings cppSettings. */ - public cppSettings?: (google.api.ICppSettings|null); + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; - /** ClientLibrarySettings phpSettings. */ - public phpSettings?: (google.api.IPhpSettings|null); + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; - /** ClientLibrarySettings pythonSettings. */ - public pythonSettings?: (google.api.IPythonSettings|null); + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** ClientLibrarySettings nodeSettings. */ - public nodeSettings?: (google.api.INodeSettings|null); + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; - /** ClientLibrarySettings dotnetSettings. */ - public dotnetSettings?: (google.api.IDotnetSettings|null); + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** ClientLibrarySettings rubySettings. */ - public rubySettings?: (google.api.IRubySettings|null); + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); - /** ClientLibrarySettings goSettings. */ - public goSettings?: (google.api.IGoSettings|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 ClientLibrarySettings instance using the specified properties. + * Creates a new FileDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns ClientLibrarySettings instance + * @returns FileDescriptorProto instance */ - public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode + * 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.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFileDescriptorProto, 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 + * 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.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * 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 ClientLibrarySettings + * @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.api.ClientLibrarySettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ClientLibrarySettings + * @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.api.ClientLibrarySettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; /** - * Verifies a ClientLibrarySettings message. + * 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 ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ClientLibrarySettings + * @returns FileDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @param message ClientLibrarySettings + * 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.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ClientLibrarySettings to JSON. + * Converts this FileDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ClientLibrarySettings + * 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 Publishing. */ - interface IPublishing { + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { - /** Publishing methodSettings */ - methodSettings?: (google.api.IMethodSettings[]|null); + /** DescriptorProto name */ + name?: (string|null); - /** Publishing newIssueUri */ - newIssueUri?: (string|null); + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); - /** Publishing documentationUri */ - documentationUri?: (string|null); + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** Publishing apiShortName */ - apiShortName?: (string|null); + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); - /** Publishing githubLabel */ - githubLabel?: (string|null); + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** Publishing codeownerGithubTeams */ - codeownerGithubTeams?: (string[]|null); + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - /** Publishing docTagPrefix */ - docTagPrefix?: (string|null); + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - /** Publishing organization */ - organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); - /** Publishing librarySettings */ - librarySettings?: (google.api.IClientLibrarySettings[]|null); + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - /** Publishing protoReferenceDocumentationUri */ - protoReferenceDocumentationUri?: (string|null); + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); } - /** Represents a Publishing. */ - class Publishing implements IPublishing { + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { /** - * Constructs a new Publishing. + * Constructs a new DescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.IPublishing); + constructor(properties?: google.protobuf.IDescriptorProto); - /** Publishing methodSettings. */ - public methodSettings: google.api.IMethodSettings[]; + /** DescriptorProto name. */ + public name: string; - /** Publishing newIssueUri. */ - public newIssueUri: string; + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; - /** Publishing documentationUri. */ - public documentationUri: string; + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** Publishing apiShortName. */ - public apiShortName: string; + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; - /** Publishing githubLabel. */ - public githubLabel: string; + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** Publishing codeownerGithubTeams. */ - public codeownerGithubTeams: string[]; + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - /** Publishing docTagPrefix. */ - public docTagPrefix: string; + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - /** Publishing organization. */ - public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); - /** Publishing librarySettings. */ - public librarySettings: google.api.IClientLibrarySettings[]; + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - /** Publishing protoReferenceDocumentationUri. */ - public protoReferenceDocumentationUri: string; + /** DescriptorProto reservedName. */ + public reservedName: string[]; /** - * Creates a new Publishing instance using the specified properties. + * Creates a new DescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns Publishing instance + * @returns DescriptorProto instance */ - public static create(properties?: google.api.IPublishing): google.api.Publishing; + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode + * 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.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDescriptorProto, 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 + * 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.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Publishing message from the specified reader or buffer. + * 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 Publishing + * @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.api.Publishing; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Publishing + * @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.api.Publishing; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; /** - * Verifies a Publishing message. + * 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 Publishing message from a plain object. Also converts values to their respective internal types. + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Publishing + * @returns DescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.Publishing; + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @param message Publishing + * 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.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Publishing to JSON. + * Converts this DescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Publishing + * 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; } - /** Properties of a JavaSettings. */ - interface IJavaSettings { + namespace DescriptorProto { - /** JavaSettings libraryPackage */ - libraryPackage?: (string|null); + /** Properties of an ExtensionRange. */ + interface IExtensionRange { - /** JavaSettings serviceClassNames */ - serviceClassNames?: ({ [k: string]: string }|null); + /** ExtensionRange start */ + start?: (number|null); - /** JavaSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } + /** ExtensionRange end */ + end?: (number|null); - /** Represents a JavaSettings. */ - class JavaSettings implements IJavaSettings { + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } - /** - * Constructs a new JavaSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IJavaSettings); + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { - /** JavaSettings libraryPackage. */ - public libraryPackage: string; + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - /** JavaSettings serviceClassNames. */ - public serviceClassNames: { [k: string]: string }; + /** ExtensionRange start. */ + public start: number; - /** JavaSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** ExtensionRange end. */ + public end: number; - /** - * 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; + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); - /** - * 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; + /** + * 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 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; + /** + * 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; - /** - * 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; + /** + * 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 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; + /** + * 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; - /** - * 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 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 }; - /** - * 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; + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * 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 }; + /** + * 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; + } - /** - * Converts this JavaSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Properties of a ReservedRange. */ + interface IReservedRange { - /** - * 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; - } + /** ReservedRange start */ + start?: (number|null); - /** Properties of a CppSettings. */ - interface ICppSettings { + /** ReservedRange end */ + end?: (number|null); + } - /** CppSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { - /** Represents a CppSettings. */ - class CppSettings implements ICppSettings { + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - /** - * Constructs a new CppSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICppSettings); + /** ReservedRange start. */ + public start: number; - /** CppSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** ReservedRange end. */ + public end: number; - /** - * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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; + /** + * 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 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); + /** + * 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 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 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 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 }; + /** + * 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 CppSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this ReservedRange 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; + /** + * 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 a PhpSettings. */ - interface IPhpSettings { + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { - /** PhpSettings common */ - common?: (google.api.ICommonLanguageSettings|null); + /** 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 a PhpSettings. */ - class PhpSettings implements IPhpSettings { + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { /** - * Constructs a new PhpSettings. + * Constructs a new ExtensionRangeOptions. * @param [properties] Properties to set */ - constructor(properties?: google.api.IPhpSettings); + constructor(properties?: google.protobuf.IExtensionRangeOptions); - /** PhpSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** 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 PhpSettings instance using the specified properties. + * Creates a new ExtensionRangeOptions instance using the specified properties. * @param [properties] Properties to set - * @returns PhpSettings instance + * @returns ExtensionRangeOptions instance */ - public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode + * 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.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IExtensionRangeOptions, 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 + * 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.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PhpSettings message from the specified reader or buffer. + * 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 PhpSettings + * @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.api.PhpSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PhpSettings + * @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.api.PhpSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; /** - * Verifies a PhpSettings message. + * 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 a PhpSettings message from a plain object. Also converts values to their respective internal types. + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PhpSettings + * @returns ExtensionRangeOptions */ - public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @param message PhpSettings + * 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.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PhpSettings to JSON. + * Converts this ExtensionRangeOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PhpSettings + * 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; } - /** Properties of a PythonSettings. */ - interface IPythonSettings { + namespace ExtensionRangeOptions { - /** PythonSettings common */ - common?: (google.api.ICommonLanguageSettings|null); + /** 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 + } } - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { - /** - * Constructs a new PythonSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPythonSettings); + /** FieldDescriptorProto name */ + name?: (string|null); - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** FieldDescriptorProto number */ + number?: (number|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; + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - /** - * 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; + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - /** - * 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; + /** FieldDescriptorProto typeName */ + typeName?: (string|null); - /** - * 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; + /** FieldDescriptorProto extendee */ + extendee?: (string|null); - /** - * 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; + /** 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); + } - /** - * 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); + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonSettings + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + constructor(properties?: google.protobuf.IFieldDescriptorProto); - /** - * 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 }; + /** FieldDescriptorProto name. */ + public name: string; - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** FieldDescriptorProto number. */ + public number: number; - /** - * 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; - } + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - /** Properties of a NodeSettings. */ - interface INodeSettings { + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } + /** FieldDescriptorProto typeName. */ + public typeName: string; - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { + /** FieldDescriptorProto extendee. */ + public extendee: string; - /** - * Constructs a new NodeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.INodeSettings); + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** 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 NodeSettings instance using the specified properties. + * Creates a new FieldDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns NodeSettings instance + * @returns FieldDescriptorProto instance */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode + * 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.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldDescriptorProto, 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 + * 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.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NodeSettings message from the specified reader or buffer. + * 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 NodeSettings + * @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.api.NodeSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NodeSettings + * @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.api.NodeSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; /** - * Verifies a NodeSettings message. + * 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 NodeSettings message from a plain object. Also converts values to their respective internal types. + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NodeSettings + * @returns FieldDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings + * 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.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NodeSettings to JSON. + * Converts this FieldDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NodeSettings + * 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; } - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); + namespace FieldDescriptorProto { - /** DotnetSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); + /** 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 + } - /** DotnetSettings renamedResources */ - renamedResources?: ({ [k: string]: string }|null); + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } - /** DotnetSettings ignoredResources */ - ignoredResources?: (string[]|null); + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { - /** DotnetSettings forcedNamespaceAliases */ - forcedNamespaceAliases?: (string[]|null); + /** OneofDescriptorProto name */ + name?: (string|null); - /** DotnetSettings handwrittenSignatures */ - handwrittenSignatures?: (string[]|null); + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); } - /** Represents a DotnetSettings. */ - class DotnetSettings implements IDotnetSettings { + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { /** - * Constructs a new DotnetSettings. + * Constructs a new OneofDescriptorProto. * @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[]; + constructor(properties?: google.protobuf.IOneofDescriptorProto); - /** DotnetSettings forcedNamespaceAliases. */ - public forcedNamespaceAliases: string[]; + /** OneofDescriptorProto name. */ + public name: string; - /** DotnetSettings handwrittenSignatures. */ - public handwrittenSignatures: string[]; + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); /** - * Creates a new DotnetSettings instance using the specified properties. + * Creates a new OneofDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns DotnetSettings instance + * @returns OneofDescriptorProto instance */ - public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode + * 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.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IOneofDescriptorProto, 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 + * 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.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DotnetSettings message from the specified reader or buffer. + * 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 DotnetSettings + * @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.api.DotnetSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DotnetSettings + * @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.api.DotnetSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; /** - * Verifies a DotnetSettings message. + * 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 a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DotnetSettings + * @returns OneofDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @param message DotnetSettings + * 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.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DotnetSettings to JSON. + * Converts this OneofDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DotnetSettings + * 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 a RubySettings. */ - interface IRubySettings { + /** 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); - /** RubySettings common */ - common?: (google.api.ICommonLanguageSettings|null); + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); } - /** Represents a RubySettings. */ - class RubySettings implements IRubySettings { + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { /** - * Constructs a new RubySettings. + * Constructs a new EnumDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.IRubySettings); + constructor(properties?: google.protobuf.IEnumDescriptorProto); - /** RubySettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** 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 RubySettings instance using the specified properties. + * Creates a new EnumDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns RubySettings instance + * @returns EnumDescriptorProto instance */ - public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode + * 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.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumDescriptorProto, 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 + * 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.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RubySettings message from the specified reader or buffer. + * 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 RubySettings + * @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.api.RubySettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RubySettings + * @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.api.RubySettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; /** - * Verifies a RubySettings message. + * 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 a RubySettings message from a plain object. Also converts values to their respective internal types. + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RubySettings + * @returns EnumDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @param message RubySettings + * 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.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RubySettings to JSON. + * Converts this EnumDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RubySettings + * 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; } - /** Properties of a GoSettings. */ - interface IGoSettings { + namespace EnumDescriptorProto { - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); + /** 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; + } } - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { + /** 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 GoSettings. + * Constructs a new EnumValueDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.IGoSettings); + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); /** - * Creates a new GoSettings instance using the specified properties. + * Creates a new EnumValueDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns GoSettings instance + * @returns EnumValueDescriptorProto instance */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode + * 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.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumValueDescriptorProto, 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 + * 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.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GoSettings message from the specified reader or buffer. + * 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 GoSettings + * @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.api.GoSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GoSettings + * @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.api.GoSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; /** - * Verifies a GoSettings message. + * 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 a GoSettings message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GoSettings + * @returns EnumValueDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings + * 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.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GoSettings to JSON. + * Converts this EnumValueDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GoSettings + * 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 MethodSettings. */ - interface IMethodSettings { + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { - /** MethodSettings selector */ - selector?: (string|null); + /** ServiceDescriptorProto name */ + name?: (string|null); - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); } - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { /** - * Constructs a new MethodSettings. + * Constructs a new ServiceDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMethodSettings); + constructor(properties?: google.protobuf.IServiceDescriptorProto); - /** MethodSettings selector. */ - public selector: string; + /** ServiceDescriptorProto name. */ + public name: string; - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: string[]; + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); /** - * Creates a new MethodSettings instance using the specified properties. + * Creates a new ServiceDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns MethodSettings instance + * @returns ServiceDescriptorProto instance */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode + * 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.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IServiceDescriptorProto, 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 + * 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.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MethodSettings message from the specified reader or buffer. + * 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 MethodSettings + * @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.api.MethodSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MethodSettings + * @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.api.MethodSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; /** - * Verifies a MethodSettings message. + * 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 MethodSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodSettings + * @returns ServiceDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings + * 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.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 - } + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** 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 - } + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { + /** + * 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; + } - /** ResourceDescriptor type */ - type?: (string|null); + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); + /** MethodDescriptorProto name */ + name?: (string|null); - /** ResourceDescriptor nameField */ - nameField?: (string|null); + /** MethodDescriptorProto inputType */ + inputType?: (string|null); - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + /** MethodDescriptorProto outputType */ + outputType?: (string|null); - /** ResourceDescriptor plural */ - plural?: (string|null); + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); - /** ResourceDescriptor singular */ - singular?: (string|null); + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); } - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { /** - * Constructs a new ResourceDescriptor. + * Constructs a new MethodDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; + constructor(properties?: google.protobuf.IMethodDescriptorProto); - /** ResourceDescriptor pattern. */ - public pattern: string[]; + /** MethodDescriptorProto name. */ + public name: string; - /** ResourceDescriptor nameField. */ - public nameField: string; + /** MethodDescriptorProto inputType. */ + public inputType: string; - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + /** MethodDescriptorProto outputType. */ + public outputType: string; - /** ResourceDescriptor plural. */ - public plural: string; + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); - /** ResourceDescriptor singular. */ - public singular: string; + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new MethodDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceDescriptor instance + * @returns MethodDescriptorProto instance */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * 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.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMethodDescriptorProto, 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 + * 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.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * 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 ResourceDescriptor + * @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.api.ResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; /** - * Verifies a ResourceDescriptor message. + * 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceDescriptor + * @returns MethodDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor + * 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.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this MethodDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResourceDescriptor + * 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; } - namespace ResourceDescriptor { + /** Properties of a FileOptions. */ + interface IFileOptions { - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } + /** FileOptions javaPackage */ + javaPackage?: (string|null); - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); - /** Properties of a ResourceReference. */ - interface IResourceReference { + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); - /** ResourceReference type */ - type?: (string|null); + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); - /** ResourceReference childType */ - childType?: (string|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 ResourceReference. */ - class ResourceReference implements IResourceReference { + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { /** - * Constructs a new ResourceReference. + * Constructs a new FileOptions. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceReference); + constructor(properties?: google.protobuf.IFileOptions); - /** ResourceReference type. */ - public type: string; + /** FileOptions javaPackage. */ + public javaPackage: string; - /** ResourceReference childType. */ - public childType: string; + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: 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; + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; - /** - * 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; + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; - /** - * 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; + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - /** - * 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; + /** FileOptions goPackage. */ + public goPackage: string; - /** - * 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; + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; - /** - * 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); + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; - /** - * 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; + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; - /** - * 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 }; + /** FileOptions deprecated. */ + public deprecated: boolean; - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; - /** - * 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; - } - } + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; - /** Namespace protobuf. */ - namespace protobuf { + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { + /** FileOptions phpNamespace. */ + public phpNamespace: string; - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new FileDescriptorSet instance using the specified properties. + * Creates a new FileOptions instance using the specified properties. * @param [properties] Properties to set - * @returns FileDescriptorSet instance + * @returns FileOptions instance */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode + * 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.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFileOptions, 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 + * 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.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. + * 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 FileDescriptorSet + * @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.FileDescriptorSet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * Decodes a FileOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet + * @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.FileDescriptorSet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; /** - * Verifies a FileDescriptorSet message. + * 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileDescriptorSet + * @returns FileOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet + * 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.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileDescriptorSet to JSON. + * Converts this FileOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FileDescriptorSet + * 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; } - /** 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); + namespace FileOptions { - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); + /** Properties of a MessageOptions. */ + interface IMessageOptions { - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); + /** MessageOptions deprecated */ + deprecated?: (boolean|null); - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); - /** FileDescriptorProto syntax */ - syntax?: (string|null); + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); } - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { /** - * Constructs a new FileDescriptorProto. + * Constructs a new MessageOptions. * @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[]; + constructor(properties?: google.protobuf.IMessageOptions); - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; + /** MessageOptions deprecated. */ + public deprecated: boolean; - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); + /** MessageOptions mapEntry. */ + public mapEntry: boolean; - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; - /** FileDescriptorProto syntax. */ - public syntax: string; + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new FileDescriptorProto instance using the specified properties. + * Creates a new MessageOptions instance using the specified properties. * @param [properties] Properties to set - * @returns FileDescriptorProto instance + * @returns MessageOptions instance */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode + * 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.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMessageOptions, 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 + * 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.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. + * 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 FileDescriptorProto + * @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.FileDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto + * @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.FileDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; /** - * Verifies a FileDescriptorProto message. + * 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileDescriptorProto + * @returns MessageOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto + * 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.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileDescriptorProto to JSON. + * Converts this MessageOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FileDescriptorProto + * 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 DescriptorProto. */ - interface IDescriptorProto { + /** Properties of a FieldOptions. */ + interface IFieldOptions { - /** DescriptorProto name */ - name?: (string|null); + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); + /** FieldOptions packed */ + packed?: (boolean|null); - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); + /** FieldOptions lazy */ + lazy?: (boolean|null); - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + /** FieldOptions deprecated */ + deprecated?: (boolean|null); - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + /** FieldOptions weak */ + weak?: (boolean|null); - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - /** DescriptorProto reservedName */ - reservedName?: (string[]|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.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); } - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { /** - * Constructs a new DescriptorProto. + * Constructs a new FieldOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDescriptorProto); + constructor(properties?: google.protobuf.IFieldOptions); - /** DescriptorProto name. */ - public name: string; + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; + /** FieldOptions packed. */ + public packed: boolean; - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; + /** FieldOptions lazy. */ + public lazy: boolean; - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + /** FieldOptions deprecated. */ + public deprecated: boolean; - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + /** FieldOptions weak. */ + public weak: boolean; - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); + /** FieldOptions debugRedact. */ + public debugRedact: boolean; - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - /** DescriptorProto reservedName. */ - public reservedName: string[]; + /** 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 DescriptorProto instance using the specified properties. + * Creates a new FieldOptions instance using the specified properties. * @param [properties] Properties to set - * @returns DescriptorProto instance + * @returns FieldOptions instance */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode + * 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.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldOptions, 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 + * 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.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DescriptorProto message from the specified reader or buffer. + * 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 DescriptorProto + * @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.DescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DescriptorProto + * @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.DescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; /** - * Verifies a DescriptorProto message. + * 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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DescriptorProto + * @returns FieldOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto + * 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.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DescriptorProto to JSON. + * Converts this FieldOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DescriptorProto + * 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 DescriptorProto { + 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 + } - /** Properties of an ExtensionRange. */ - interface IExtensionRange { + /** 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 + } - /** ExtensionRange start */ - start?: (number|null); + /** Properties of an EditionDefault. */ + interface IEditionDefault { - /** ExtensionRange end */ - end?: (number|null); + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); + /** EditionDefault value */ + value?: (string|null); } - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { /** - * Constructs a new ExtensionRange. + * Constructs a new EditionDefault. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); - /** ExtensionRange end. */ - public end: number; + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); + /** EditionDefault value. */ + public value: string; /** - * Creates a new ExtensionRange instance using the specified properties. + * Creates a new EditionDefault instance using the specified properties. * @param [properties] Properties to set - * @returns ExtensionRange instance + * @returns EditionDefault instance */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; /** - * 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 + * 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.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, 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 + * 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.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExtensionRange message from the specified reader or buffer. + * 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 ExtensionRange + * @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.DescriptorProto.ExtensionRange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExtensionRange + * @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.DescriptorProto.ExtensionRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; /** - * Verifies an ExtensionRange message. + * 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 ExtensionRange message from a plain object. Also converts values to their respective internal types. + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExtensionRange + * @returns EditionDefault */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange + * 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.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExtensionRange to JSON. + * Converts this EditionDefault to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExtensionRange + * Gets the default type url for EditionDefault * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } - /** Properties of a ReservedRange. */ - interface IReservedRange { + /** Properties of an OneofOptions. */ + interface IOneofOptions { - /** ReservedRange start */ - start?: (number|null); + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); - /** ReservedRange end */ - end?: (number|null); - } + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); - /** ReservedRange start. */ - public start: number; + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); - /** ReservedRange end. */ - public end: number; + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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; + /** + * 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 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); + /** + * 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 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 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 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 }; + /** + * 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 ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this OneofOptions 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; - } + /** + * 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 ExtensionRangeOptions. */ - interface IExtensionRangeOptions { + /** Properties of an EnumOptions. */ + interface IEnumOptions { - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + /** EnumOptions deprecated */ + deprecated?: (boolean|null); - /** ExtensionRangeOptions features */ + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ features?: (google.protobuf.IFeatureSet|null); - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { /** - * Constructs a new ExtensionRangeOptions. + * Constructs a new EnumOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); + constructor(properties?: google.protobuf.IEnumOptions); - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** EnumOptions allowAlias. */ + public allowAlias: boolean; - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + /** EnumOptions deprecated. */ + public deprecated: boolean; - /** ExtensionRangeOptions features. */ + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ public features?: (google.protobuf.IFeatureSet|null); - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new ExtensionRangeOptions instance using the specified properties. + * Creates a new EnumOptions instance using the specified properties. * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance + * @returns EnumOptions instance */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode + * 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.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumOptions, 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 + * 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.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * 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 ExtensionRangeOptions + * @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.ExtensionRangeOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions + * @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.ExtensionRangeOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; /** - * Verifies an ExtensionRangeOptions message. + * 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 ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExtensionRangeOptions + * @returns EnumOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions + * 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.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExtensionRangeOptions to JSON. + * Converts this EnumOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExtensionRangeOptions + * 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; } - 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; + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { - /** - * 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); + /** EnumValueOptions deprecated */ + deprecated?: (boolean|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; + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); - /** - * 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 }; + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** - * 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; - } + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { + /** EnumValueOptions deprecated. */ + public deprecated: boolean; - /** FieldDescriptorProto name */ - name?: (string|null); + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); - /** FieldDescriptorProto number */ - number?: (number|null); + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + /** + * 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; - /** FieldDescriptorProto typeName */ - typeName?: (string|null); + /** + * 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; - /** FieldDescriptorProto extendee */ - extendee?: (string|null); + /** + * 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; - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); + /** + * 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; - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); + /** + * 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; - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); + /** + * 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); - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|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; - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } + /** + * 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 }; - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FieldDescriptorProto name. */ - public name: string; + /** Properties of a ServiceOptions. */ + interface IServiceOptions { - /** FieldDescriptorProto number. */ - public number: number; + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** FieldDescriptorProto typeName. */ - public typeName: string; + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); - /** FieldDescriptorProto extendee. */ - public extendee: string; + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); - /** FieldDescriptorProto jsonName. */ - public jsonName: string; + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); + /** ServiceOptions deprecated. */ + public deprecated: boolean; - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new FieldDescriptorProto instance using the specified properties. + * Creates a new ServiceOptions instance using the specified properties. * @param [properties] Properties to set - * @returns FieldDescriptorProto instance + * @returns ServiceOptions instance */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode + * 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.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IServiceOptions, 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 + * 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.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * 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 FieldDescriptorProto + * @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.FieldDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto + * @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.FieldDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; /** - * Verifies a FieldDescriptorProto message. + * 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldDescriptorProto + * @returns ServiceOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto + * 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.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldDescriptorProto to JSON. + * Converts this ServiceOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FieldDescriptorProto + * 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; } - namespace FieldDescriptorProto { + /** Properties of a MethodOptions. */ + interface IMethodOptions { - /** 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 - } + /** MethodOptions deprecated */ + deprecated?: (boolean|null); - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); - /** OneofDescriptorProto name */ - name?: (string|null); + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|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 an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { /** - * Constructs a new OneofDescriptorProto. + * Constructs a new MethodOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; - /** OneofDescriptorProto name. */ - public name: string; + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new OneofDescriptorProto instance using the specified properties. + * Creates a new MethodOptions instance using the specified properties. * @param [properties] Properties to set - * @returns OneofDescriptorProto instance + * @returns MethodOptions instance */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode + * 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.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMethodOptions, 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 + * 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.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * 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 OneofDescriptorProto + * @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.OneofDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto + * @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.OneofDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; /** - * Verifies an OneofDescriptorProto message. + * 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 an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OneofDescriptorProto + * @returns MethodOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto + * 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.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OneofDescriptorProto to JSON. + * Converts this MethodOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OneofDescriptorProto + * 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; } - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { + namespace MethodOptions { - /** EnumDescriptorProto name */ - name?: (string|null); + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); - /** EnumDescriptorProto reservedName */ - reservedName?: (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 EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { /** - * Constructs a new EnumDescriptorProto. + * Constructs a new UninterpretedOption. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); + constructor(properties?: google.protobuf.IUninterpretedOption); - /** EnumDescriptorProto name. */ - public name: string; + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; + /** UninterpretedOption identifierValue. */ + public identifierValue: string; - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; /** - * Creates a new EnumDescriptorProto instance using the specified properties. + * Creates a new UninterpretedOption instance using the specified properties. * @param [properties] Properties to set - * @returns EnumDescriptorProto instance + * @returns UninterpretedOption instance */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode + * 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.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IUninterpretedOption, 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 + * 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.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * 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 EnumDescriptorProto + * @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.EnumDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto + * @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.EnumDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; /** - * Verifies an EnumDescriptorProto message. + * 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 EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumDescriptorProto + * @returns UninterpretedOption */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto + * 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.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumDescriptorProto to JSON. + * Converts this UninterpretedOption to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumDescriptorProto + * 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 EnumDescriptorProto { + namespace UninterpretedOption { - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { + /** Properties of a NamePart. */ + interface INamePart { - /** EnumReservedRange start */ - start?: (number|null); + /** NamePart namePart */ + namePart: string; - /** EnumReservedRange end */ - end?: (number|null); + /** NamePart isExtension */ + isExtension: boolean; } - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { + /** Represents a NamePart. */ + class NamePart implements INamePart { /** - * Constructs a new EnumReservedRange. + * Constructs a new NamePart. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - /** EnumReservedRange start. */ - public start: number; + /** NamePart namePart. */ + public namePart: string; - /** EnumReservedRange end. */ - public end: number; + /** NamePart isExtension. */ + public isExtension: boolean; /** - * Creates a new EnumReservedRange instance using the specified properties. + * Creates a new NamePart instance using the specified properties. * @param [properties] Properties to set - * @returns EnumReservedRange instance + * @returns NamePart instance */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; /** - * 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 + * 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.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.UninterpretedOption.INamePart, 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 + * 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.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumReservedRange message from the specified reader or buffer. + * 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 EnumReservedRange + * @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.EnumDescriptorProto.EnumReservedRange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * Decodes a NamePart message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumReservedRange + * @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.EnumDescriptorProto.EnumReservedRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; /** - * Verifies an EnumReservedRange message. + * 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 an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumReservedRange + * @returns NamePart */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange + * 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.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumReservedRange to JSON. + * Converts this NamePart to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumReservedRange + * Gets the default type url for NamePart * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -4986,3971 +18435,3873 @@ export namespace google { } } - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); + /** Properties of a FeatureSet. */ + interface IFeatureSet { - /** EnumValueDescriptorProto number */ - number?: (number|null); + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); - /** EnumValueDescriptorProto name. */ - public name: string; + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); - /** EnumValueDescriptorProto number. */ - public number: number; + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. + * Constructs a new FeatureSet. * @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); + constructor(properties?: google.protobuf.IFeatureSet); - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); - /** ServiceDescriptorProto name. */ - public name: string; + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); /** - * Creates a new ServiceDescriptorProto instance using the specified properties. + * Creates a new FeatureSet instance using the specified properties. * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance + * @returns FeatureSet instance */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode + * 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.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFeatureSet, 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 + * 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.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * 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 ServiceDescriptorProto + * @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.ServiceDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto + * @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.ServiceDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; /** - * Verifies a ServiceDescriptorProto message. + * 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ServiceDescriptorProto + * @returns FeatureSet */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto + * 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.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ServiceDescriptorProto to JSON. + * Converts this FeatureSet to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ServiceDescriptorProto + * 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; } - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { + namespace FeatureSet { - /** MethodDescriptorProto name */ - name?: (string|null); + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } - /** MethodDescriptorProto inputType */ - inputType?: (string|null); + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } - /** MethodDescriptorProto outputType */ - outputType?: (string|null); + /** 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 { - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); } - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { /** - * Constructs a new MethodDescriptorProto. + * Constructs a new FeatureSetDefaults. * @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; + constructor(properties?: google.protobuf.IFeatureSetDefaults); - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); /** - * Creates a new MethodDescriptorProto instance using the specified properties. + * Creates a new FeatureSetDefaults instance using the specified properties. * @param [properties] Properties to set - * @returns MethodDescriptorProto instance + * @returns FeatureSetDefaults instance */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode + * 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.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFeatureSetDefaults, 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 + * 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.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * 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 MethodDescriptorProto + * @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.MethodDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto + * @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.MethodDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; /** - * Verifies a MethodDescriptorProto message. + * 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodDescriptorProto + * @returns FeatureSetDefaults */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto + * 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.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MethodDescriptorProto to JSON. + * Converts this FeatureSetDefaults to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MethodDescriptorProto + * 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; } - /** 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 { + namespace FeatureSetDefaults { - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { - /** FileOptions javaPackage. */ - public javaPackage: string; + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); - /** FileOptions goPackage. */ - public goPackage: string; + /** + * 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; - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; + /** + * 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; - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; + /** + * 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; - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; + /** + * 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; - /** FileOptions deprecated. */ - public deprecated: boolean; + /** + * 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; - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; + /** + * 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); - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; + /** + * 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; - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; + /** + * 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 }; - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; + /** + * 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; + } + } - /** FileOptions phpNamespace. */ - public phpNamespace: string; + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } - /** FileOptions rubyPackage. */ - public rubyPackage: string; + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; /** - * Creates a new FileOptions instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @param [properties] Properties to set - * @returns FileOptions instance + * @returns SourceCodeInfo instance */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode + * 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.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ISourceCodeInfo, 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 + * 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.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileOptions message from the specified reader or buffer. + * 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 FileOptions + * @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.FileOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileOptions + * @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.FileOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; /** - * Verifies a FileOptions message. + * 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 FileOptions message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileOptions + * @returns SourceCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions + * 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.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileOptions to JSON. + * Converts this SourceCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FileOptions + * 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 FileOptions { + namespace SourceCodeInfo { - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 + /** 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); } - } - /** Properties of a MessageOptions. */ - interface IMessageOptions { + /** Represents a Location. */ + class Location implements ILocation { - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); + /** Location path. */ + public path: number[]; - /** MessageOptions deprecated */ - deprecated?: (boolean|null); + /** Location span. */ + public span: number[]; - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); + /** Location leadingComments. */ + public leadingComments: string; - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); + /** Location trailingComments. */ + public trailingComments: string; - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * 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; - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } + /** + * 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; - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { + /** + * 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; - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); + /** + * 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; - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; + /** + * 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; - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; + /** + * 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); - /** MessageOptions deprecated. */ - public deprecated: boolean; + /** + * 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; - /** MessageOptions mapEntry. */ - public mapEntry: boolean; + /** + * 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); + } - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; /** - * Creates a new MessageOptions instance using the specified properties. + * Creates a new GeneratedCodeInfo instance using the specified properties. * @param [properties] Properties to set - * @returns MessageOptions instance + * @returns GeneratedCodeInfo instance */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode + * 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.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IGeneratedCodeInfo, 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 + * 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.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MessageOptions message from the specified reader or buffer. + * 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 MessageOptions + * @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.MessageOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MessageOptions + * @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.MessageOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; /** - * Verifies a MessageOptions message. + * 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 MessageOptions message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MessageOptions + * @returns GeneratedCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions + * 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.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MessageOptions to JSON. + * Converts this GeneratedCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MessageOptions + * 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; } - /** Properties of a FieldOptions. */ - interface IFieldOptions { + namespace GeneratedCodeInfo { - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + /** Properties of an Annotation. */ + interface IAnnotation { - /** FieldOptions packed */ - packed?: (boolean|null); + /** Annotation path */ + path?: (number[]|null); - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + /** Annotation sourceFile */ + sourceFile?: (string|null); - /** FieldOptions lazy */ - lazy?: (boolean|null); + /** Annotation begin */ + begin?: (number|null); - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); + /** Annotation end */ + end?: (number|null); - /** FieldOptions deprecated */ - deprecated?: (boolean|null); + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } - /** FieldOptions weak */ - weak?: (boolean|null); + /** Represents an Annotation. */ + class Annotation implements IAnnotation { - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + /** Annotation path. */ + public path: number[]; - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + /** Annotation sourceFile. */ + public sourceFile: string; - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + /** Annotation begin. */ + public begin: number; - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** Annotation end. */ + public end: number; - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + /** + * 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; - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - } + /** + * 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; - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { + /** + * 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; - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); + /** + * 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; - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + /** + * 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; - /** FieldOptions packed. */ - public packed: boolean; + /** + * 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); - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + /** + * 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; - /** FieldOptions lazy. */ - public lazy: boolean; + /** + * 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 }; - /** FieldOptions unverifiedLazy. */ - public unverifiedLazy: boolean; + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FieldOptions deprecated. */ - public deprecated: boolean; + /** + * 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; + } - /** FieldOptions weak. */ - public weak: boolean; + namespace Annotation { - /** FieldOptions debugRedact. */ - public debugRedact: boolean; + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } - /** FieldOptions retention. */ - public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + /** Properties of a Duration. */ + interface IDuration { - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; + /** Duration seconds */ + seconds?: (number|Long|string|null); - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + /** Duration nanos */ + nanos?: (number|null); + } - /** FieldOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** Represents a Duration. */ + class Duration implements IDuration { - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * 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 FieldOptions instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @param [properties] Properties to set - * @returns FieldOptions instance + * @returns Duration instance */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode + * 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.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDuration, 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 + * 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.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldOptions message from the specified reader or buffer. + * 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 FieldOptions + * @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.FieldOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldOptions + * @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.FieldOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; /** - * Verifies a FieldOptions message. + * 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldOptions + * @returns Duration */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions + * 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.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldOptions to JSON. + * Converts this Duration to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FieldOptions + * 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; } - 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 { + /** Properties of a Timestamp. */ + interface ITimestamp { - /** EditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + /** Timestamp seconds */ + seconds?: (number|Long|string|null); - /** EditionDefault value */ - value?: (string|null); - } + /** Timestamp nanos */ + nanos?: (number|null); + } - /** Represents an EditionDefault. */ - class EditionDefault implements IEditionDefault { + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { - /** - * Constructs a new EditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); - /** EditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** Timestamp seconds. */ + public seconds: (number|Long|string); - /** EditionDefault value. */ - public value: string; + /** Timestamp nanos. */ + public nanos: number; - /** - * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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; + /** + * 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 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); + /** + * 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 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 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 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 }; + /** + * 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 EditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this Timestamp 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; - } + /** + * 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 OneofOptions. */ - interface IOneofOptions { + /** Properties of an Any. */ + interface IAny { - /** OneofOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** Any type_url */ + type_url?: (string|null); - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Any value */ + value?: (Uint8Array|string|null); } - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { + /** Represents an Any. */ + class Any implements IAny { /** - * Constructs a new OneofOptions. + * Constructs a new Any. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IOneofOptions); + constructor(properties?: google.protobuf.IAny); - /** OneofOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** Any type_url. */ + public type_url: string; - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Any value. */ + public value: (Uint8Array|string); /** - * Creates a new OneofOptions instance using the specified properties. + * Creates a new Any instance using the specified properties. * @param [properties] Properties to set - * @returns OneofOptions instance + * @returns Any instance */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode + * 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.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IAny, 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 + * 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.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OneofOptions message from the specified reader or buffer. + * 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 OneofOptions + * @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.OneofOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OneofOptions + * @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.OneofOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; /** - * Verifies an OneofOptions message. + * 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OneofOptions + * @returns Any */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions + * 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.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OneofOptions to JSON. + * Converts this Any to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OneofOptions + * 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 EnumOptions. */ - interface IEnumOptions { + /** Properties of a FieldMask. */ + interface IFieldMask { - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); + /** FieldMask paths */ + paths?: (string[]|null); + } - /** EnumOptions deprecated */ - deprecated?: (boolean|null); + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { - /** EnumOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); - /** EnumOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** FieldMask paths. */ + public paths: string[]; - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** + * 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; - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { + /** + * 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; /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set + * 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 */ - constructor(properties?: google.protobuf.IEnumOptions); + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - /** EnumOptions allowAlias. */ - public allowAlias: boolean; + /** + * 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; - /** EnumOptions deprecated. */ - public deprecated: boolean; + /** + * 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; - /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; + /** + * 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); - /** EnumOptions features. */ - public features?: (google.protobuf.IFeatureSet|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; - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * 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 }; /** - * Creates a new EnumOptions instance using the specified properties. + * 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; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. * @param [properties] Properties to set - * @returns EnumOptions instance */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + constructor(properties?: google.protobuf.IEmpty); /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode + * 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.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEmpty, 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 + * 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.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumOptions message from the specified reader or buffer. + * 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 EnumOptions + * @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.EnumOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumOptions + * @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.EnumOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; /** - * Verifies an EnumOptions message. + * 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumOptions + * @returns Empty */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions + * 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.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumOptions to JSON. + * Converts this Empty to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumOptions + * 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 an EnumValueOptions. */ - interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact */ - debugRedact?: (boolean|null); + /** Properties of a DoubleValue. */ + interface IDoubleValue { - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** DoubleValue value */ + value?: (number|null); } - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { /** - * Constructs a new EnumValueOptions. + * Constructs a new DoubleValue. * @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; + constructor(properties?: google.protobuf.IDoubleValue); - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** DoubleValue value. */ + public value: number; /** - * Creates a new EnumValueOptions instance using the specified properties. + * Creates a new DoubleValue instance using the specified properties. * @param [properties] Properties to set - * @returns EnumValueOptions instance + * @returns DoubleValue instance */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue 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; + public static encode(message: google.protobuf.IDoubleValue, 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 + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue 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; + public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumValueOptions message from the specified reader or buffer. + * Decodes a DoubleValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EnumValueOptions + * @returns DoubleValue * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DoubleValue; /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumValueOptions + * @returns DoubleValue * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DoubleValue; /** - * Verifies an EnumValueOptions message. + * Verifies a DoubleValue message. * @param message Plain 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. + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumValueOptions + * @returns DoubleValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumValueOptions to JSON. + * Converts this DoubleValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumValueOptions + * Gets the default type url for DoubleValue * @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); + /** Properties of a FloatValue. */ + interface IFloatValue { - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); + /** FloatValue value */ + value?: (number|null); } - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { /** - * Constructs a new ServiceOptions. + * Constructs a new FloatValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; + constructor(properties?: google.protobuf.IFloatValue); - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** FloatValue value. */ + public value: number; /** - * Creates a new ServiceOptions instance using the specified properties. + * Creates a new FloatValue instance using the specified properties. * @param [properties] Properties to set - * @returns ServiceOptions instance + * @returns FloatValue instance */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue 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; + public static encode(message: google.protobuf.IFloatValue, 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 + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue 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; + public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ServiceOptions message from the specified reader or buffer. + * Decodes a FloatValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ServiceOptions + * @returns FloatValue * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FloatValue; /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * Decodes a FloatValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ServiceOptions + * @returns FloatValue * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FloatValue; /** - * Verifies a ServiceOptions message. + * Verifies a FloatValue message. * @param message Plain object 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. + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ServiceOptions + * @returns FloatValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ServiceOptions to JSON. + * Converts this FloatValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ServiceOptions + * Gets the default type url for FloatValue * @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); + /** Properties of an Int64Value. */ + interface IInt64Value { - /** MethodOptions .google.longrunning.operationInfo */ - ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + /** Int64Value value */ + value?: (number|Long|string|null); } - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { /** - * Constructs a new MethodOptions. + * Constructs a new Int64Value. * @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); + constructor(properties?: google.protobuf.IInt64Value); - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Int64Value value. */ + public value: (number|Long|string); /** - * Creates a new MethodOptions instance using the specified properties. + * Creates a new Int64Value instance using the specified properties. * @param [properties] Properties to set - * @returns MethodOptions instance + * @returns Int64Value instance */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value 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; + public static encode(message: google.protobuf.IInt64Value, 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 + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value 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; + public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MethodOptions message from the specified reader or buffer. + * Decodes an Int64Value message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MethodOptions + * @returns Int64Value * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int64Value; /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * Decodes an Int64Value message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MethodOptions + * @returns Int64Value * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int64Value; /** - * Verifies a MethodOptions message. + * Verifies an Int64Value message. * @param message Plain object 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. + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodOptions + * @returns Int64Value */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MethodOptions to JSON. + * Converts this Int64Value to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MethodOptions + * Gets the default type url for Int64Value * @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); + /** Properties of a UInt64Value. */ + interface IUInt64Value { - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); + /** UInt64Value value */ + value?: (number|Long|string|null); } - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { /** - * Constructs a new UninterpretedOption. + * Constructs a new UInt64Value. * @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); + constructor(properties?: google.protobuf.IUInt64Value); - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; + /** UInt64Value value. */ + public value: (number|Long|string); /** - * Creates a new UninterpretedOption instance using the specified properties. + * Creates a new UInt64Value instance using the specified properties. * @param [properties] Properties to set - * @returns UninterpretedOption instance + * @returns UInt64Value instance */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value 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; + public static encode(message: google.protobuf.IUInt64Value, 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 + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value 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; + public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * Decodes a UInt64Value message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UninterpretedOption + * @returns UInt64Value * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt64Value; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UninterpretedOption + * @returns UInt64Value * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt64Value; /** - * Verifies an UninterpretedOption message. + * Verifies a UInt64Value message. * @param message Plain 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. + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UninterpretedOption + * @returns UInt64Value */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UninterpretedOption to JSON. + * Converts this UInt64Value to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UninterpretedOption + * Gets the default type url for UInt64Value * @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); + /** Properties of an Int32Value. */ + interface IInt32Value { - /** - * 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; + /** Int32Value value */ + value?: (number|null); + } - /** - * 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 }; + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); - /** - * 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; - } - } + /** Int32Value value. */ + public value: number; - /** Properties of a FeatureSet. */ - interface IFeatureSet { + /** + * Creates a new Int32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int32Value instance + */ + public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int32Value + * @throws {Error} If the payload is not 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.Int32Value; - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int32Value + * @throws {Error} If the payload 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.Int32Value; - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + /** + * Verifies an Int32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); - } + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; - /** Represents a FeatureSet. */ - class FeatureSet implements IFeatureSet { + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Constructs a new FeatureSet. - * @param [properties] Properties to set + * Converts this Int32Value to JSON. + * @returns JSON object */ - constructor(properties?: google.protobuf.IFeatureSet); + public toJSON(): { [k: string]: any }; - /** FeatureSet fieldPresence. */ - public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + /** + * Gets the default type url for Int32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FeatureSet enumType. */ - public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + /** Properties of a UInt32Value. */ + interface IUInt32Value { - /** FeatureSet repeatedFieldEncoding. */ - public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + /** UInt32Value value */ + value?: (number|null); + } - /** FeatureSet utf8Validation. */ - public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { - /** FeatureSet messageEncoding. */ - public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + /** + * Constructs a new UInt32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt32Value); - /** FeatureSet jsonFormat. */ - public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + /** UInt32Value value. */ + public value: number; /** - * Creates a new FeatureSet instance using the specified properties. + * Creates a new UInt32Value instance using the specified properties. * @param [properties] Properties to set - * @returns FeatureSet instance + * @returns UInt32Value instance */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value 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; + public static encode(message: google.protobuf.IUInt32Value, 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 + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value 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; + public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FeatureSet message from the specified reader or buffer. + * Decodes a UInt32Value message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FeatureSet + * @returns UInt32Value * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt32Value; /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FeatureSet + * @returns UInt32Value * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt32Value; /** - * Verifies a FeatureSet message. + * Verifies a UInt32Value message. * @param message Plain object 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. + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FeatureSet + * @returns UInt32Value */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FeatureSet to JSON. + * Converts this UInt32Value to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FeatureSet + * Gets the default type url for UInt32Value * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace FeatureSet { + /** Properties of a BoolValue. */ + interface IBoolValue { - /** FieldPresence enum. */ - enum FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3 - } + /** BoolValue value */ + value?: (boolean|null); + } - /** EnumType enum. */ - enum EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2 - } + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { - /** RepeatedFieldEncoding enum. */ - enum RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2 - } + /** + * Constructs a new BoolValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBoolValue); - /** Utf8Validation enum. */ - enum Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - VERIFY = 2, - NONE = 3 - } + /** BoolValue value. */ + public value: boolean; - /** MessageEncoding enum. */ - enum MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2 - } + /** + * Creates a new BoolValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BoolValue instance + */ + public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - } + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoolValue + * @throws {Error} If the payload is not 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.BoolValue; - /** FeatureSetDefaults minimumEdition */ - minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoolValue + * @throws {Error} If the payload 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.BoolValue; - /** FeatureSetDefaults maximumEdition */ - maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } + /** + * Verifies a BoolValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents a FeatureSetDefaults. */ - class FeatureSetDefaults implements IFeatureSetDefaults { + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoolValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; /** - * Constructs a new FeatureSetDefaults. - * @param [properties] Properties to set + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue + * @param [options] Conversion options + * @returns Plain object */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + /** + * Converts this BoolValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FeatureSetDefaults minimumEdition. */ - public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** + * Gets the default type url for BoolValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringValue. */ + interface IStringValue { + + /** StringValue value */ + value?: (string|null); + } + + /** Represents a StringValue. */ + class StringValue implements IStringValue { + + /** + * Constructs a new StringValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStringValue); - /** FeatureSetDefaults maximumEdition. */ - public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** StringValue value. */ + public value: string; /** - * Creates a new FeatureSetDefaults instance using the specified properties. + * Creates a new StringValue instance using the specified properties. * @param [properties] Properties to set - * @returns FeatureSetDefaults instance + * @returns StringValue instance */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue 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; + public static encode(message: google.protobuf.IStringValue, 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 + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue 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; + public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * Decodes a StringValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FeatureSetDefaults + * @returns StringValue * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.StringValue; /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * Decodes a StringValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults + * @returns StringValue * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.StringValue; /** - * Verifies a FeatureSetDefaults message. + * Verifies a StringValue message. * @param message Plain object 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. + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FeatureSetDefaults + * @returns StringValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FeatureSetDefaults to JSON. + * Converts this StringValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FeatureSetDefaults + * Gets the default type url for StringValue * @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 { + /** Properties of a BytesValue. */ + interface IBytesValue { - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + /** BytesValue value */ + value?: (Uint8Array|string|null); + } - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); - } + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { - /** Represents a FeatureSetEditionDefault. */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + /** + * Constructs a new BytesValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBytesValue); - /** - * Constructs a new FeatureSetEditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + /** BytesValue value. */ + public value: (Uint8Array|string); - /** FeatureSetEditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** + * Creates a new BytesValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BytesValue instance + */ + public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BytesValue + * @throws {Error} If the payload is not 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.BytesValue; - /** - * 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 BytesValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BytesValue + * @throws {Error} If the payload 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.BytesValue; - /** - * 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; + /** + * Verifies a BytesValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * 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; + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BytesValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; - /** - * 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 plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this BytesValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * 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 }; + /** + * Gets the default type url for BytesValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** - * Converts this FeatureSetEditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Namespace type. */ + namespace type { + + /** DayOfWeek enum. */ + enum DayOfWeek { + DAY_OF_WEEK_UNSPECIFIED = 0, + MONDAY = 1, + TUESDAY = 2, + WEDNESDAY = 3, + THURSDAY = 4, + FRIDAY = 5, + SATURDAY = 6, + SUNDAY = 7 + } - /** - * 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; - } + /** Month enum. */ + enum Month { + MONTH_UNSPECIFIED = 0, + JANUARY = 1, + FEBRUARY = 2, + MARCH = 3, + APRIL = 4, + MAY = 5, + JUNE = 6, + JULY = 7, + AUGUST = 8, + SEPTEMBER = 9, + OCTOBER = 10, + NOVEMBER = 11, + DECEMBER = 12 } - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { + /** Properties of an Expr. */ + interface IExpr { - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + /** Expr expression */ + expression?: (string|null); + + /** Expr title */ + title?: (string|null); + + /** Expr description */ + description?: (string|null); + + /** Expr location */ + location?: (string|null); } - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { + /** Represents an Expr. */ + class Expr implements IExpr { /** - * Constructs a new SourceCodeInfo. + * Constructs a new Expr. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.ISourceCodeInfo); + constructor(properties?: google.type.IExpr); - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; + /** Expr expression. */ + public expression: string; + + /** Expr title. */ + public title: string; + + /** Expr description. */ + public description: string; + + /** Expr location. */ + public location: string; /** - * Creates a new SourceCodeInfo instance using the specified properties. + * Creates a new Expr instance using the specified properties. * @param [properties] Properties to set - * @returns SourceCodeInfo instance + * @returns Expr instance */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + public static create(properties?: google.type.IExpr): google.type.Expr; /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr 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; + public static encode(message: google.type.IExpr, 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 + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr 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; + public static encodeDelimited(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. + * Decodes an Expr message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SourceCodeInfo + * @returns Expr * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Expr; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * Decodes an Expr message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo + * @returns Expr * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Expr; /** - * Verifies a SourceCodeInfo message. + * Verifies an Expr message. * @param message Plain object 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. + * Creates an Expr message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SourceCodeInfo + * @returns Expr */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + public static fromObject(object: { [k: string]: any }): google.type.Expr; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @param message Expr * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.type.Expr, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SourceCodeInfo to JSON. + * Converts this Expr to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SourceCodeInfo + * Gets the default type url for Expr * @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 }; + /** Namespace rpc. */ + namespace rpc { - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Properties of a Status. */ + interface IStatus { - /** - * 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; - } - } + /** Status code */ + code?: (number|null); - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { + /** Status message */ + message?: (string|null); - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + /** Status details */ + details?: (google.protobuf.IAny[]|null); } - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { + /** Represents a Status. */ + class Status implements IStatus { /** - * Constructs a new GeneratedCodeInfo. + * Constructs a new Status. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); + constructor(properties?: google.rpc.IStatus); - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * Creates a new Status instance using the specified properties. * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance + * @returns Status instance */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + public static create(properties?: google.rpc.IStatus): google.rpc.Status; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode + * 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.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.rpc.IStatus, 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 + * 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.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * 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 GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a Status message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; /** - * Verifies a GeneratedCodeInfo message. + * 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a Status message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GeneratedCodeInfo + * @returns Status */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + public static fromObject(object: { [k: string]: any }): google.rpc.Status; /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo + * 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.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this Status to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GeneratedCodeInfo + * 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; } + } - namespace GeneratedCodeInfo { + /** Namespace iam. */ + namespace iam { - /** Properties of an Annotation. */ - interface IAnnotation { + /** Namespace v1. */ + namespace v1 { - /** Annotation path */ - path?: (number[]|null); + /** Represents a IAMPolicy */ + class IAMPolicy extends $protobuf.rpc.Service { - /** Annotation sourceFile */ - sourceFile?: (string|null); + /** + * Constructs a new IAMPolicy 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 IAMPolicy 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): IAMPolicy; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.SetIamPolicyCallback): void; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.GetIamPolicyCallback): void; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.iam.v1.IAMPolicy.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + } + + namespace IAMPolicy { + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + } - /** Annotation begin */ - begin?: (number|null); + /** Properties of a SetIamPolicyRequest. */ + interface ISetIamPolicyRequest { - /** Annotation end */ - end?: (number|null); + /** SetIamPolicyRequest resource */ + resource?: (string|null); - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + /** SetIamPolicyRequest policy */ + policy?: (google.iam.v1.IPolicy|null); + + /** SetIamPolicyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents an Annotation. */ - class Annotation implements IAnnotation { + /** Represents a SetIamPolicyRequest. */ + class SetIamPolicyRequest implements ISetIamPolicyRequest { /** - * Constructs a new Annotation. + * Constructs a new SetIamPolicyRequest. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** Annotation path. */ - public path: number[]; - - /** Annotation sourceFile. */ - public sourceFile: string; + constructor(properties?: google.iam.v1.ISetIamPolicyRequest); - /** Annotation begin. */ - public begin: number; + /** SetIamPolicyRequest resource. */ + public resource: string; - /** Annotation end. */ - public end: number; + /** SetIamPolicyRequest policy. */ + public policy?: (google.iam.v1.IPolicy|null); - /** Annotation semantic. */ - public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + /** SetIamPolicyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new Annotation instance using the specified properties. + * Creates a new SetIamPolicyRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Annotation instance + * @returns SetIamPolicyRequest instance */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + public static create(properties?: google.iam.v1.ISetIamPolicyRequest): google.iam.v1.SetIamPolicyRequest; /** - * 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 + * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @param message SetIamPolicyRequest 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; + public static encode(message: google.iam.v1.ISetIamPolicyRequest, 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 + * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @param message SetIamPolicyRequest 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; + public static encodeDelimited(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Annotation message from the specified reader or buffer. + * Decodes a SetIamPolicyRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Annotation + * @returns SetIamPolicyRequest * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.SetIamPolicyRequest; /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. + * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Annotation + * @returns SetIamPolicyRequest * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.SetIamPolicyRequest; /** - * Verifies an Annotation message. + * Verifies a SetIamPolicyRequest message. * @param message Plain 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. + * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Annotation + * @returns SetIamPolicyRequest */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + public static fromObject(object: { [k: string]: any }): google.iam.v1.SetIamPolicyRequest; /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation + * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. + * @param message SetIamPolicyRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.iam.v1.SetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Annotation to JSON. + * Converts this SetIamPolicyRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Annotation + * Gets the default type url for SetIamPolicyRequest * @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); + /** Properties of a GetIamPolicyRequest. */ + interface IGetIamPolicyRequest { - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; + /** GetIamPolicyRequest resource */ + resource?: (string|null); - /** - * 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; + /** GetIamPolicyRequest options */ + options?: (google.iam.v1.IGetPolicyOptions|null); + } - /** - * 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; + /** Represents a GetIamPolicyRequest. */ + class GetIamPolicyRequest implements IGetIamPolicyRequest { - /** - * 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; + /** + * Constructs a new GetIamPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IGetIamPolicyRequest); - /** - * 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; + /** GetIamPolicyRequest resource. */ + public resource: string; - /** - * 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; + /** GetIamPolicyRequest options. */ + public options?: (google.iam.v1.IGetPolicyOptions|null); - /** - * 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 new GetIamPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetIamPolicyRequest instance + */ + public static create(properties?: google.iam.v1.IGetIamPolicyRequest): google.iam.v1.GetIamPolicyRequest; - /** - * 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; + /** + * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @param message GetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @param message GetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetIamPolicyRequest; - /** - * 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; - } + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetIamPolicyRequest; - /** Properties of an Any. */ - interface IAny { + /** + * Verifies a GetIamPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Any type_url */ - type_url?: (string|null); + /** + * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetIamPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.GetIamPolicyRequest; - /** Any value */ - value?: (Uint8Array|string|null); - } + /** + * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. + * @param message GetIamPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.GetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents an Any. */ - class Any implements IAny { + /** + * Converts this GetIamPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); + /** + * Gets the default type url for GetIamPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Any type_url. */ - public type_url: string; + /** Properties of a TestIamPermissionsRequest. */ + interface ITestIamPermissionsRequest { - /** Any value. */ - public value: (Uint8Array|string); + /** TestIamPermissionsRequest resource */ + resource?: (string|null); - /** - * 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; + /** TestIamPermissionsRequest permissions */ + permissions?: (string[]|null); + } - /** - * 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; + /** Represents a TestIamPermissionsRequest. */ + class TestIamPermissionsRequest implements ITestIamPermissionsRequest { - /** - * 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; + /** + * Constructs a new TestIamPermissionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ITestIamPermissionsRequest); - /** - * 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; + /** TestIamPermissionsRequest resource. */ + public resource: string; - /** - * 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; + /** TestIamPermissionsRequest permissions. */ + public permissions: string[]; - /** - * 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 a new TestIamPermissionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TestIamPermissionsRequest instance + */ + public static create(properties?: google.iam.v1.ITestIamPermissionsRequest): google.iam.v1.TestIamPermissionsRequest; - /** - * 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; + /** + * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @param message TestIamPermissionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @param message TestIamPermissionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsRequest; - /** - * 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; - } + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsRequest; - /** Properties of an Empty. */ - interface IEmpty { - } + /** + * Verifies a TestIamPermissionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents an Empty. */ - class Empty implements IEmpty { + /** + * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TestIamPermissionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsRequest; - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); + /** + * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. + * @param message TestIamPermissionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.TestIamPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this TestIamPermissionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * 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; + /** + * Gets the default type url for TestIamPermissionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * 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; + /** Properties of a TestIamPermissionsResponse. */ + interface ITestIamPermissionsResponse { - /** - * 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; + /** TestIamPermissionsResponse permissions */ + permissions?: (string[]|null); + } - /** - * 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; + /** Represents a TestIamPermissionsResponse. */ + class TestIamPermissionsResponse implements ITestIamPermissionsResponse { - /** - * 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); + /** + * Constructs a new TestIamPermissionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ITestIamPermissionsResponse); - /** - * 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; + /** TestIamPermissionsResponse permissions. */ + public permissions: string[]; - /** - * 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 }; + /** + * Creates a new TestIamPermissionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns TestIamPermissionsResponse instance + */ + public static create(properties?: google.iam.v1.ITestIamPermissionsResponse): google.iam.v1.TestIamPermissionsResponse; - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @param message TestIamPermissionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; - } + /** + * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @param message TestIamPermissionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a Timestamp. */ - interface ITimestamp { + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsResponse; - /** Timestamp seconds */ - seconds?: (number|Long|string|null); + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsResponse; - /** Timestamp nanos */ - nanos?: (number|null); - } + /** + * Verifies a TestIamPermissionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { + /** + * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TestIamPermissionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsResponse; - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); + /** + * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. + * @param message TestIamPermissionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.TestIamPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Timestamp seconds. */ - public seconds: (number|Long|string); + /** + * Converts this TestIamPermissionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Timestamp nanos. */ - public nanos: number; + /** + * Gets the default type url for TestIamPermissionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * 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; + /** Properties of a GetPolicyOptions. */ + interface IGetPolicyOptions { - /** - * 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; + /** GetPolicyOptions requestedPolicyVersion */ + requestedPolicyVersion?: (number|null); + } - /** - * 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; + /** Represents a GetPolicyOptions. */ + class GetPolicyOptions implements IGetPolicyOptions { - /** - * 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; + /** + * Constructs a new GetPolicyOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IGetPolicyOptions); + + /** GetPolicyOptions requestedPolicyVersion. */ + public requestedPolicyVersion: number; + + /** + * Creates a new GetPolicyOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPolicyOptions instance + */ + public static create(properties?: google.iam.v1.IGetPolicyOptions): google.iam.v1.GetPolicyOptions; - /** - * 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; + /** + * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @param message GetPolicyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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); + /** + * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @param message GetPolicyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetPolicyOptions; - /** - * 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 }; + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetPolicyOptions; - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Verifies a GetPolicyOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * 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; - } + /** + * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPolicyOptions + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.GetPolicyOptions; - /** Properties of a DoubleValue. */ - interface IDoubleValue { + /** + * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. + * @param message GetPolicyOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.GetPolicyOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** DoubleValue value */ - value?: (number|null); - } + /** + * Converts this GetPolicyOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a DoubleValue. */ - class DoubleValue implements IDoubleValue { + /** + * Gets the default type url for GetPolicyOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Constructs a new DoubleValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDoubleValue); + /** Properties of a Policy. */ + interface IPolicy { - /** DoubleValue value. */ - public value: number; + /** Policy version */ + version?: (number|null); - /** - * Creates a new DoubleValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DoubleValue instance - */ - public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; + /** Policy bindings */ + bindings?: (google.iam.v1.IBinding[]|null); - /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** Policy auditConfigs */ + auditConfigs?: (google.iam.v1.IAuditConfig[]|null); - /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** Policy etag */ + etag?: (Uint8Array|string|null); + } - /** - * Decodes a DoubleValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DoubleValue - * @throws {Error} If the payload is not 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.DoubleValue; + /** Represents a Policy. */ + class Policy implements IPolicy { - /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DoubleValue - * @throws {Error} If the payload 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.DoubleValue; + /** + * Constructs a new Policy. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicy); - /** - * Verifies a DoubleValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Policy version. */ + public version: number; - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DoubleValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + /** Policy bindings. */ + public bindings: google.iam.v1.IBinding[]; - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @param message DoubleValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Policy auditConfigs. */ + public auditConfigs: google.iam.v1.IAuditConfig[]; - /** - * Converts this DoubleValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Policy etag. */ + public etag: (Uint8Array|string); - /** - * Gets the default type url for DoubleValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a new Policy instance using the specified properties. + * @param [properties] Properties to set + * @returns Policy instance + */ + public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy; - /** Properties of a FloatValue. */ - interface IFloatValue { + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - /** FloatValue value */ - value?: (number|null); - } + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a FloatValue. */ - class FloatValue implements IFloatValue { + /** + * Decodes a Policy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy; - /** - * Constructs a new FloatValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFloatValue); + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy; - /** FloatValue value. */ - public value: number; + /** + * Verifies a Policy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a new FloatValue instance using the specified properties. - * @param [properties] Properties to set - * @returns FloatValue instance - */ - public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Policy + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy; - /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @param message Policy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this Policy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a FloatValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FloatValue - * @throws {Error} If the payload is not 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.FloatValue; + /** + * Gets the default type url for Policy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Binding. */ + interface IBinding { + + /** Binding role */ + role?: (string|null); - /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FloatValue - * @throws {Error} If the payload 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.FloatValue; + /** Binding members */ + members?: (string[]|null); - /** - * Verifies a FloatValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Binding condition */ + condition?: (google.type.IExpr|null); + } - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FloatValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + /** Represents a Binding. */ + class Binding implements IBinding { - /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @param message FloatValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new Binding. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBinding); - /** - * Converts this FloatValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Binding role. */ + public role: string; - /** - * Gets the default type url for FloatValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Binding members. */ + public members: string[]; - /** Properties of an Int64Value. */ - interface IInt64Value { + /** Binding condition. */ + public condition?: (google.type.IExpr|null); - /** Int64Value value */ - value?: (number|Long|string|null); - } + /** + * Creates a new Binding instance using the specified properties. + * @param [properties] Properties to set + * @returns Binding instance + */ + public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding; - /** Represents an Int64Value. */ - class Int64Value implements IInt64Value { + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new Int64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt64Value); + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; - /** Int64Value value. */ - public value: (number|Long|string); + /** + * Decodes a Binding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Binding; - /** - * Creates a new Int64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int64Value instance - */ - public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Binding; - /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a Binding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Binding + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding; - /** - * Decodes an Int64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int64Value - * @throws {Error} If the payload is not 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.Int64Value; + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @param message Binding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int64Value - * @throws {Error} If the payload 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.Int64Value; + /** + * Converts this Binding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Verifies an Int64Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Gets the default type url for Binding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + /** Properties of an AuditConfig. */ + interface IAuditConfig { - /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @param message Int64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** AuditConfig service */ + service?: (string|null); - /** - * Converts this Int64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** AuditConfig auditLogConfigs */ + auditLogConfigs?: (google.iam.v1.IAuditLogConfig[]|null); + } - /** - * Gets the default type url for Int64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Represents an AuditConfig. */ + class AuditConfig implements IAuditConfig { - /** Properties of a UInt64Value. */ - interface IUInt64Value { + /** + * Constructs a new AuditConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfig); - /** UInt64Value value */ - value?: (number|Long|string|null); - } + /** AuditConfig service. */ + public service: string; - /** Represents a UInt64Value. */ - class UInt64Value implements IUInt64Value { + /** AuditConfig auditLogConfigs. */ + public auditLogConfigs: google.iam.v1.IAuditLogConfig[]; - /** - * Constructs a new UInt64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt64Value); + /** + * Creates a new AuditConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfig instance + */ + public static create(properties?: google.iam.v1.IAuditConfig): google.iam.v1.AuditConfig; - /** UInt64Value value. */ - public value: (number|Long|string); + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new UInt64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt64Value instance - */ - public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfig; - /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfig; - /** - * Decodes a UInt64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt64Value - * @throws {Error} If the payload is not 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.UInt64Value; + /** + * Verifies an AuditConfig message. + * @param message Plain 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 AuditConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfig; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @param message AuditConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt64Value - * @throws {Error} If the payload 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.UInt64Value; + /** + * Gets the default type url for AuditConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Verifies a UInt64Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of an AuditLogConfig. */ + interface IAuditLogConfig { - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + /** AuditLogConfig logType */ + logType?: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType|null); - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @param message UInt64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** AuditLogConfig exemptedMembers */ + exemptedMembers?: (string[]|null); + } - /** - * Converts this UInt64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Represents an AuditLogConfig. */ + class AuditLogConfig implements IAuditLogConfig { - /** - * Gets the default type url for UInt64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Constructs a new AuditLogConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditLogConfig); - /** Properties of an Int32Value. */ - interface IInt32Value { + /** AuditLogConfig logType. */ + public logType: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType); - /** Int32Value value */ - value?: (number|null); - } + /** AuditLogConfig exemptedMembers. */ + public exemptedMembers: string[]; - /** Represents an Int32Value. */ - class Int32Value implements IInt32Value { + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditLogConfig instance + */ + public static create(properties?: google.iam.v1.IAuditLogConfig): google.iam.v1.AuditLogConfig; - /** - * Constructs a new Int32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt32Value); + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** Int32Value value. */ - public value: number; + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new Int32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int32Value instance - */ - public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditLogConfig; - /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditLogConfig; - /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies an AuditLogConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes an Int32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int32Value - * @throws {Error} If the payload is not 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.Int32Value; + /** + * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditLogConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditLogConfig; - /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int32Value - * @throws {Error} If the payload 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.Int32Value; + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @param message AuditLogConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditLogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies an Int32Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this AuditLogConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + /** + * Gets the default type url for AuditLogConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @param message Int32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + namespace AuditLogConfig { - /** - * Converts this Int32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** LogType enum. */ + enum LogType { + LOG_TYPE_UNSPECIFIED = 0, + ADMIN_READ = 1, + DATA_WRITE = 2, + DATA_READ = 3 + } + } - /** - * Gets the default type url for Int32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Properties of a PolicyDelta. */ + interface IPolicyDelta { - /** Properties of a UInt32Value. */ - interface IUInt32Value { + /** PolicyDelta bindingDeltas */ + bindingDeltas?: (google.iam.v1.IBindingDelta[]|null); - /** UInt32Value value */ - value?: (number|null); - } + /** PolicyDelta auditConfigDeltas */ + auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null); + } - /** Represents a UInt32Value. */ - class UInt32Value implements IUInt32Value { + /** Represents a PolicyDelta. */ + class PolicyDelta implements IPolicyDelta { - /** - * Constructs a new UInt32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt32Value); + /** + * Constructs a new PolicyDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicyDelta); - /** UInt32Value value. */ - public value: number; + /** PolicyDelta bindingDeltas. */ + public bindingDeltas: google.iam.v1.IBindingDelta[]; - /** - * Creates a new UInt32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt32Value instance - */ - public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; + /** PolicyDelta auditConfigDeltas. */ + public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[]; - /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new PolicyDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns PolicyDelta instance + */ + public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta; - /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a UInt32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt32Value - * @throws {Error} If the payload is not 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.UInt32Value; + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt32Value - * @throws {Error} If the payload 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.UInt32Value; + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.PolicyDelta; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.PolicyDelta; - /** - * Verifies a UInt32Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a PolicyDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PolicyDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta; - /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @param message UInt32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @param message PolicyDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this UInt32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this PolicyDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for UInt32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for PolicyDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of a BoolValue. */ - interface IBoolValue { + /** Properties of a BindingDelta. */ + interface IBindingDelta { - /** BoolValue value */ - value?: (boolean|null); - } + /** BindingDelta action */ + action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null); - /** Represents a BoolValue. */ - class BoolValue implements IBoolValue { + /** BindingDelta role */ + role?: (string|null); - /** - * Constructs a new BoolValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBoolValue); + /** BindingDelta member */ + member?: (string|null); - /** BoolValue value. */ - public value: boolean; + /** BindingDelta condition */ + condition?: (google.type.IExpr|null); + } - /** - * Creates a new BoolValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BoolValue instance - */ - public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; + /** Represents a BindingDelta. */ + class BindingDelta implements IBindingDelta { - /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new BindingDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBindingDelta); - /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** BindingDelta action. */ + public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action); - /** - * Decodes a BoolValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BoolValue - * @throws {Error} If the payload is not 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.BoolValue; + /** BindingDelta role. */ + public role: string; - /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BoolValue - * @throws {Error} If the payload 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.BoolValue; + /** BindingDelta member. */ + public member: string; - /** - * Verifies a BoolValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** BindingDelta condition. */ + public condition?: (google.type.IExpr|null); - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BoolValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + /** + * Creates a new BindingDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns BindingDelta instance + */ + public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta; - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @param message BoolValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this BoolValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Gets the default type url for BoolValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.BindingDelta; - /** Properties of a StringValue. */ - interface IStringValue { + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.BindingDelta; - /** StringValue value */ - value?: (string|null); - } + /** + * Verifies a BindingDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents a StringValue. */ - class StringValue implements IStringValue { + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BindingDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta; - /** - * Constructs a new StringValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStringValue); + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @param message BindingDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** StringValue value. */ - public value: string; + /** + * Converts this BindingDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a new StringValue instance using the specified properties. - * @param [properties] Properties to set - * @returns StringValue instance - */ - public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; + /** + * Gets the default type url for BindingDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + namespace BindingDelta { - /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } - /** - * Decodes a StringValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringValue - * @throws {Error} If the payload is not 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.StringValue; + /** Properties of an AuditConfigDelta. */ + interface IAuditConfigDelta { - /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringValue - * @throws {Error} If the payload 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.StringValue; + /** AuditConfigDelta action */ + action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null); - /** - * Verifies a StringValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** AuditConfigDelta service */ + service?: (string|null); - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + /** AuditConfigDelta exemptedMember */ + exemptedMember?: (string|null); - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @param message StringValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** AuditConfigDelta logType */ + logType?: (string|null); + } - /** - * Converts this StringValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Represents an AuditConfigDelta. */ + class AuditConfigDelta implements IAuditConfigDelta { - /** - * Gets the default type url for StringValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Constructs a new AuditConfigDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfigDelta); - /** Properties of a BytesValue. */ - interface IBytesValue { + /** AuditConfigDelta action. */ + public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action); - /** BytesValue value */ - value?: (Uint8Array|string|null); - } + /** AuditConfigDelta service. */ + public service: string; - /** Represents a BytesValue. */ - class BytesValue implements IBytesValue { + /** AuditConfigDelta exemptedMember. */ + public exemptedMember: string; - /** - * Constructs a new BytesValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBytesValue); + /** AuditConfigDelta logType. */ + public logType: string; - /** BytesValue value. */ - public value: (Uint8Array|string); + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfigDelta instance + */ + public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta; - /** - * Creates a new BytesValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BytesValue instance - */ - public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfigDelta; - /** - * Decodes a BytesValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BytesValue - * @throws {Error} If the payload is not 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.BytesValue; + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfigDelta; - /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BytesValue - * @throws {Error} If the payload 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.BytesValue; + /** + * Verifies an AuditConfigDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies a BytesValue message. - * @param message Plain 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 AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfigDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta; - /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BytesValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @param message AuditConfigDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. - * @param message BytesValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this AuditConfigDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this BytesValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Gets the default type url for AuditConfigDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Gets the default type url for BytesValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + namespace AuditConfigDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } } } @@ -9925,117 +23276,4 @@ export namespace google { 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/packages/google-cloud-backupdr/protos/protos.js b/packages/google-cloud-backupdr/protos/protos.js index cd28ca533aa..ba2ac5f0c52 100644 --- a/packages/google-cloud-backupdr/protos/protos.js +++ b/packages/google-cloud-backupdr/protos/protos.js @@ -230,515 +230,1018 @@ * @variation 2 */ - return BackupDR; - })(); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupVault}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef CreateBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - v1.NetworkConfig = (function() { + /** + * Calls CreateBackupVault. + * @function createBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} request CreateBackupVaultRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.createBackupVault = function createBackupVault(request, callback) { + return this.rpcCall(createBackupVault, $root.google.cloud.backupdr.v1.CreateBackupVaultRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBackupVault" }); /** - * Properties of a NetworkConfig. - * @memberof google.cloud.backupdr.v1 - * @interface INetworkConfig - * @property {string|null} [network] NetworkConfig network - * @property {google.cloud.backupdr.v1.NetworkConfig.PeeringMode|null} [peeringMode] NetworkConfig peeringMode + * Calls CreateBackupVault. + * @function createBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} request CreateBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new NetworkConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a NetworkConfig. - * @implements INetworkConfig - * @constructor - * @param {google.cloud.backupdr.v1.INetworkConfig=} [properties] Properties to set + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupVaults}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListBackupVaultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListBackupVaultsResponse} [response] ListBackupVaultsResponse */ - function NetworkConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * NetworkConfig network. - * @member {string} network - * @memberof google.cloud.backupdr.v1.NetworkConfig + * Calls ListBackupVaults. + * @function listBackupVaults + * @memberof google.cloud.backupdr.v1.BackupDR * @instance + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} request ListBackupVaultsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListBackupVaultsCallback} callback Node-style callback called with the error, if any, and ListBackupVaultsResponse + * @returns {undefined} + * @variation 1 */ - NetworkConfig.prototype.network = ""; + Object.defineProperty(BackupDR.prototype.listBackupVaults = function listBackupVaults(request, callback) { + return this.rpcCall(listBackupVaults, $root.google.cloud.backupdr.v1.ListBackupVaultsRequest, $root.google.cloud.backupdr.v1.ListBackupVaultsResponse, request, callback); + }, "name", { value: "ListBackupVaults" }); /** - * NetworkConfig peeringMode. - * @member {google.cloud.backupdr.v1.NetworkConfig.PeeringMode} peeringMode - * @memberof google.cloud.backupdr.v1.NetworkConfig + * Calls ListBackupVaults. + * @function listBackupVaults + * @memberof google.cloud.backupdr.v1.BackupDR * @instance + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} request ListBackupVaultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - NetworkConfig.prototype.peeringMode = 0; /** - * Creates a new NetworkConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig instance + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchUsableBackupVaults}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef FetchUsableBackupVaultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} [response] FetchUsableBackupVaultsResponse */ - NetworkConfig.create = function create(properties) { - return new NetworkConfig(properties); - }; /** - * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkConfig} message NetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls FetchUsableBackupVaults. + * @function fetchUsableBackupVaults + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} request FetchUsableBackupVaultsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaultsCallback} callback Node-style callback called with the error, if any, and FetchUsableBackupVaultsResponse + * @returns {undefined} + * @variation 1 */ - NetworkConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); - if (message.peeringMode != null && Object.hasOwnProperty.call(message, "peeringMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.peeringMode); - return writer; - }; + Object.defineProperty(BackupDR.prototype.fetchUsableBackupVaults = function fetchUsableBackupVaults(request, callback) { + return this.rpcCall(fetchUsableBackupVaults, $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest, $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse, request, callback); + }, "name", { value: "FetchUsableBackupVaults" }); /** - * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkConfig} message NetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls FetchUsableBackupVaults. + * @function fetchUsableBackupVaults + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} request FetchUsableBackupVaultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a NetworkConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupVault}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.BackupVault} [response] BackupVault */ - NetworkConfig.decode = function 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.backupdr.v1.NetworkConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.network = reader.string(); - break; - } - case 2: { - message.peeringMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetBackupVault. + * @function getBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} request GetBackupVaultRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetBackupVaultCallback} callback Node-style callback called with the error, if any, and BackupVault + * @returns {undefined} + * @variation 1 */ - NetworkConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(BackupDR.prototype.getBackupVault = function getBackupVault(request, callback) { + return this.rpcCall(getBackupVault, $root.google.cloud.backupdr.v1.GetBackupVaultRequest, $root.google.cloud.backupdr.v1.BackupVault, request, callback); + }, "name", { value: "GetBackupVault" }); /** - * Verifies a NetworkConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetBackupVault. + * @function getBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} request GetBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - NetworkConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.peeringMode != null && message.hasOwnProperty("peeringMode")) - switch (message.peeringMode) { - default: - return "peeringMode: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; /** - * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackupVault}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef UpdateBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - NetworkConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.NetworkConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.NetworkConfig(); - if (object.network != null) - message.network = String(object.network); - switch (object.peeringMode) { - default: - if (typeof object.peeringMode === "number") { - message.peeringMode = object.peeringMode; - break; - } - break; - case "PEERING_MODE_UNSPECIFIED": - case 0: - message.peeringMode = 0; - break; - case "PRIVATE_SERVICE_ACCESS": - case 1: - message.peeringMode = 1; - break; - } - return message; - }; /** - * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.NetworkConfig} message NetworkConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls UpdateBackupVault. + * @function updateBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} request UpdateBackupVaultRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.UpdateBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - NetworkConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.network = ""; - object.peeringMode = options.enums === String ? "PEERING_MODE_UNSPECIFIED" : 0; - } - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.peeringMode != null && message.hasOwnProperty("peeringMode")) - object.peeringMode = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode] === undefined ? message.peeringMode : $root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode] : message.peeringMode; - return object; - }; + Object.defineProperty(BackupDR.prototype.updateBackupVault = function updateBackupVault(request, callback) { + return this.rpcCall(updateBackupVault, $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateBackupVault" }); /** - * Converts this NetworkConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.NetworkConfig + * Calls UpdateBackupVault. + * @function updateBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR * @instance - * @returns {Object.} JSON object + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} request UpdateBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - NetworkConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for NetworkConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupVault}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef DeleteBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkConfig"; - }; /** - * PeeringMode enum. - * @name google.cloud.backupdr.v1.NetworkConfig.PeeringMode - * @enum {number} - * @property {number} PEERING_MODE_UNSPECIFIED=0 PEERING_MODE_UNSPECIFIED value - * @property {number} PRIVATE_SERVICE_ACCESS=1 PRIVATE_SERVICE_ACCESS value + * Calls DeleteBackupVault. + * @function deleteBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} request DeleteBackupVaultRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - NetworkConfig.PeeringMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PEERING_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRIVATE_SERVICE_ACCESS"] = 1; - return values; - })(); - - return NetworkConfig; - })(); - - v1.ManagementURI = (function() { + Object.defineProperty(BackupDR.prototype.deleteBackupVault = function deleteBackupVault(request, callback) { + return this.rpcCall(deleteBackupVault, $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackupVault" }); /** - * Properties of a ManagementURI. - * @memberof google.cloud.backupdr.v1 - * @interface IManagementURI - * @property {string|null} [webUi] ManagementURI webUi - * @property {string|null} [api] ManagementURI api + * Calls DeleteBackupVault. + * @function deleteBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} request DeleteBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new ManagementURI. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ManagementURI. - * @implements IManagementURI - * @constructor - * @param {google.cloud.backupdr.v1.IManagementURI=} [properties] Properties to set + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|testIamPermissions}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse */ - function ManagementURI(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * ManagementURI webUi. - * @member {string} webUi - * @memberof google.cloud.backupdr.v1.ManagementURI + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.backupdr.v1.BackupDR * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 */ - ManagementURI.prototype.webUi = ""; + Object.defineProperty(BackupDR.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); /** - * ManagementURI api. - * @member {string} api - * @memberof google.cloud.backupdr.v1.ManagementURI + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.backupdr.v1.BackupDR * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ManagementURI.prototype.api = ""; /** - * Creates a new ManagementURI instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.IManagementURI=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI instance + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listDataSources}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListDataSourcesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListDataSourcesResponse} [response] ListDataSourcesResponse */ - ManagementURI.create = function create(properties) { - return new ManagementURI(properties); - }; /** - * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.IManagementURI} message ManagementURI message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListDataSources. + * @function listDataSources + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} request ListDataSourcesRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListDataSourcesCallback} callback Node-style callback called with the error, if any, and ListDataSourcesResponse + * @returns {undefined} + * @variation 1 */ - ManagementURI.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.webUi != null && Object.hasOwnProperty.call(message, "webUi")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.webUi); - if (message.api != null && Object.hasOwnProperty.call(message, "api")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.api); - return writer; - }; + Object.defineProperty(BackupDR.prototype.listDataSources = function listDataSources(request, callback) { + return this.rpcCall(listDataSources, $root.google.cloud.backupdr.v1.ListDataSourcesRequest, $root.google.cloud.backupdr.v1.ListDataSourcesResponse, request, callback); + }, "name", { value: "ListDataSources" }); /** - * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.IManagementURI} message ManagementURI message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListDataSources. + * @function listDataSources + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} request ListDataSourcesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ManagementURI.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a ManagementURI message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getDataSource}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetDataSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.DataSource} [response] DataSource */ - ManagementURI.decode = function 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.backupdr.v1.ManagementURI(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.webUi = reader.string(); - break; - } - case 2: { - message.api = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ManagementURI message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetDataSource. + * @function getDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} request GetDataSourceRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetDataSourceCallback} callback Node-style callback called with the error, if any, and DataSource + * @returns {undefined} + * @variation 1 */ - ManagementURI.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(BackupDR.prototype.getDataSource = function getDataSource(request, callback) { + return this.rpcCall(getDataSource, $root.google.cloud.backupdr.v1.GetDataSourceRequest, $root.google.cloud.backupdr.v1.DataSource, request, callback); + }, "name", { value: "GetDataSource" }); /** - * Verifies a ManagementURI message. - * @function verify - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetDataSource. + * @function getDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} request GetDataSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ManagementURI.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.webUi != null && message.hasOwnProperty("webUi")) - if (!$util.isString(message.webUi)) - return "webUi: string expected"; - if (message.api != null && message.hasOwnProperty("api")) - if (!$util.isString(message.api)) - return "api: string expected"; - return null; - }; /** - * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateDataSource}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef UpdateDataSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ManagementURI.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ManagementURI) - return object; - var message = new $root.google.cloud.backupdr.v1.ManagementURI(); - if (object.webUi != null) - message.webUi = String(object.webUi); - if (object.api != null) - message.api = String(object.api); - return message; - }; /** - * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.ManagementURI} message ManagementURI - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls UpdateDataSource. + * @function updateDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} request UpdateDataSourceRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.UpdateDataSourceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ManagementURI.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.webUi = ""; - object.api = ""; - } - if (message.webUi != null && message.hasOwnProperty("webUi")) - object.webUi = message.webUi; - if (message.api != null && message.hasOwnProperty("api")) - object.api = message.api; - return object; - }; + Object.defineProperty(BackupDR.prototype.updateDataSource = function updateDataSource(request, callback) { + return this.rpcCall(updateDataSource, $root.google.cloud.backupdr.v1.UpdateDataSourceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateDataSource" }); /** - * Converts this ManagementURI to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ManagementURI + * Calls UpdateDataSource. + * @function updateDataSource + * @memberof google.cloud.backupdr.v1.BackupDR * @instance - * @returns {Object.} JSON object + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} request UpdateDataSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ManagementURI.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for ManagementURI - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|removeDataSource}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef RemoveDataSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ManagementURI.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ManagementURI"; - }; - - return ManagementURI; - })(); - v1.WorkforceIdentityBasedManagementURI = (function() { + /** + * Calls RemoveDataSource. + * @function removeDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} request RemoveDataSourceRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.RemoveDataSourceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.removeDataSource = function removeDataSource(request, callback) { + return this.rpcCall(removeDataSource, $root.google.cloud.backupdr.v1.RemoveDataSourceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RemoveDataSource" }); /** - * Properties of a WorkforceIdentityBasedManagementURI. + * Calls RemoveDataSource. + * @function removeDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} request RemoveDataSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|setInternalStatus}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef SetInternalStatusCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls SetInternalStatus. + * @function setInternalStatus + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} request SetInternalStatusRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.SetInternalStatusCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.setInternalStatus = function setInternalStatus(request, callback) { + return this.rpcCall(setInternalStatus, $root.google.cloud.backupdr.v1.SetInternalStatusRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "SetInternalStatus" }); + + /** + * Calls SetInternalStatus. + * @function setInternalStatus + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} request SetInternalStatusRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|initiateBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef InitiateBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.InitiateBackupResponse} [response] InitiateBackupResponse + */ + + /** + * Calls InitiateBackup. + * @function initiateBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} request InitiateBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.InitiateBackupCallback} callback Node-style callback called with the error, if any, and InitiateBackupResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.initiateBackup = function initiateBackup(request, callback) { + return this.rpcCall(initiateBackup, $root.google.cloud.backupdr.v1.InitiateBackupRequest, $root.google.cloud.backupdr.v1.InitiateBackupResponse, request, callback); + }, "name", { value: "InitiateBackup" }); + + /** + * Calls InitiateBackup. + * @function initiateBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} request InitiateBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|abandonBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef AbandonBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls AbandonBackup. + * @function abandonBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} request AbandonBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.AbandonBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.abandonBackup = function abandonBackup(request, callback) { + return this.rpcCall(abandonBackup, $root.google.cloud.backupdr.v1.AbandonBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "AbandonBackup" }); + + /** + * Calls AbandonBackup. + * @function abandonBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} request AbandonBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|finalizeBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef FinalizeBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls FinalizeBackup. + * @function finalizeBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} request FinalizeBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.FinalizeBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.finalizeBackup = function finalizeBackup(request, callback) { + return this.rpcCall(finalizeBackup, $root.google.cloud.backupdr.v1.FinalizeBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "FinalizeBackup" }); + + /** + * Calls FinalizeBackup. + * @function finalizeBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} request FinalizeBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchAccessToken}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef FetchAccessTokenCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.FetchAccessTokenResponse} [response] FetchAccessTokenResponse + */ + + /** + * Calls FetchAccessToken. + * @function fetchAccessToken + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} request FetchAccessTokenRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.FetchAccessTokenCallback} callback Node-style callback called with the error, if any, and FetchAccessTokenResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.fetchAccessToken = function fetchAccessToken(request, callback) { + return this.rpcCall(fetchAccessToken, $root.google.cloud.backupdr.v1.FetchAccessTokenRequest, $root.google.cloud.backupdr.v1.FetchAccessTokenResponse, request, callback); + }, "name", { value: "FetchAccessToken" }); + + /** + * Calls FetchAccessToken. + * @function fetchAccessToken + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} request FetchAccessTokenRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackups}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListBackupsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListBackupsResponse} [response] ListBackupsResponse + */ + + /** + * Calls ListBackups. + * @function listBackups + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupsRequest} request ListBackupsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListBackupsCallback} callback Node-style callback called with the error, if any, and ListBackupsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listBackups = function listBackups(request, callback) { + return this.rpcCall(listBackups, $root.google.cloud.backupdr.v1.ListBackupsRequest, $root.google.cloud.backupdr.v1.ListBackupsResponse, request, callback); + }, "name", { value: "ListBackups" }); + + /** + * Calls ListBackups. + * @function listBackups + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupsRequest} request ListBackupsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.Backup} [response] Backup + */ + + /** + * Calls GetBackup. + * @function getBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupRequest} request GetBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetBackupCallback} callback Node-style callback called with the error, if any, and Backup + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.getBackup = function getBackup(request, callback) { + return this.rpcCall(getBackup, $root.google.cloud.backupdr.v1.GetBackupRequest, $root.google.cloud.backupdr.v1.Backup, request, callback); + }, "name", { value: "GetBackup" }); + + /** + * Calls GetBackup. + * @function getBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupRequest} request GetBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef UpdateBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateBackup. + * @function updateBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} request UpdateBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.UpdateBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.updateBackup = function updateBackup(request, callback) { + return this.rpcCall(updateBackup, $root.google.cloud.backupdr.v1.UpdateBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateBackup" }); + + /** + * Calls UpdateBackup. + * @function updateBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} request UpdateBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef DeleteBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteBackup. + * @function deleteBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} request DeleteBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.deleteBackup = function deleteBackup(request, callback) { + return this.rpcCall(deleteBackup, $root.google.cloud.backupdr.v1.DeleteBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackup" }); + + /** + * Calls DeleteBackup. + * @function deleteBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} request DeleteBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|restoreBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef RestoreBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RestoreBackup. + * @function restoreBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} request RestoreBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.RestoreBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.restoreBackup = function restoreBackup(request, callback) { + return this.rpcCall(restoreBackup, $root.google.cloud.backupdr.v1.RestoreBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RestoreBackup" }); + + /** + * Calls RestoreBackup. + * @function restoreBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} request RestoreBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlan}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef CreateBackupPlanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateBackupPlan. + * @function createBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} request CreateBackupPlanRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupPlanCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.createBackupPlan = function createBackupPlan(request, callback) { + return this.rpcCall(createBackupPlan, $root.google.cloud.backupdr.v1.CreateBackupPlanRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBackupPlan" }); + + /** + * Calls CreateBackupPlan. + * @function createBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} request CreateBackupPlanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlan}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetBackupPlanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.BackupPlan} [response] BackupPlan + */ + + /** + * Calls GetBackupPlan. + * @function getBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} request GetBackupPlanRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetBackupPlanCallback} callback Node-style callback called with the error, if any, and BackupPlan + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.getBackupPlan = function getBackupPlan(request, callback) { + return this.rpcCall(getBackupPlan, $root.google.cloud.backupdr.v1.GetBackupPlanRequest, $root.google.cloud.backupdr.v1.BackupPlan, request, callback); + }, "name", { value: "GetBackupPlan" }); + + /** + * Calls GetBackupPlan. + * @function getBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} request GetBackupPlanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlans}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListBackupPlansCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListBackupPlansResponse} [response] ListBackupPlansResponse + */ + + /** + * Calls ListBackupPlans. + * @function listBackupPlans + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} request ListBackupPlansRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListBackupPlansCallback} callback Node-style callback called with the error, if any, and ListBackupPlansResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listBackupPlans = function listBackupPlans(request, callback) { + return this.rpcCall(listBackupPlans, $root.google.cloud.backupdr.v1.ListBackupPlansRequest, $root.google.cloud.backupdr.v1.ListBackupPlansResponse, request, callback); + }, "name", { value: "ListBackupPlans" }); + + /** + * Calls ListBackupPlans. + * @function listBackupPlans + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} request ListBackupPlansRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlan}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef DeleteBackupPlanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteBackupPlan. + * @function deleteBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} request DeleteBackupPlanRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.deleteBackupPlan = function deleteBackupPlan(request, callback) { + return this.rpcCall(deleteBackupPlan, $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackupPlan" }); + + /** + * Calls DeleteBackupPlan. + * @function deleteBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} request DeleteBackupPlanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlanAssociation}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef CreateBackupPlanAssociationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateBackupPlanAssociation. + * @function createBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} request CreateBackupPlanAssociationRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.createBackupPlanAssociation = function createBackupPlanAssociation(request, callback) { + return this.rpcCall(createBackupPlanAssociation, $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBackupPlanAssociation" }); + + /** + * Calls CreateBackupPlanAssociation. + * @function createBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} request CreateBackupPlanAssociationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlanAssociation}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetBackupPlanAssociationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.BackupPlanAssociation} [response] BackupPlanAssociation + */ + + /** + * Calls GetBackupPlanAssociation. + * @function getBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} request GetBackupPlanAssociationRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and BackupPlanAssociation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.getBackupPlanAssociation = function getBackupPlanAssociation(request, callback) { + return this.rpcCall(getBackupPlanAssociation, $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest, $root.google.cloud.backupdr.v1.BackupPlanAssociation, request, callback); + }, "name", { value: "GetBackupPlanAssociation" }); + + /** + * Calls GetBackupPlanAssociation. + * @function getBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} request GetBackupPlanAssociationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlanAssociations}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListBackupPlanAssociationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} [response] ListBackupPlanAssociationsResponse + */ + + /** + * Calls ListBackupPlanAssociations. + * @function listBackupPlanAssociations + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} request ListBackupPlanAssociationsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociationsCallback} callback Node-style callback called with the error, if any, and ListBackupPlanAssociationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listBackupPlanAssociations = function listBackupPlanAssociations(request, callback) { + return this.rpcCall(listBackupPlanAssociations, $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest, $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse, request, callback); + }, "name", { value: "ListBackupPlanAssociations" }); + + /** + * Calls ListBackupPlanAssociations. + * @function listBackupPlanAssociations + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} request ListBackupPlanAssociationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlanAssociation}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef DeleteBackupPlanAssociationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteBackupPlanAssociation. + * @function deleteBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} request DeleteBackupPlanAssociationRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.deleteBackupPlanAssociation = function deleteBackupPlanAssociation(request, callback) { + return this.rpcCall(deleteBackupPlanAssociation, $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackupPlanAssociation" }); + + /** + * Calls DeleteBackupPlanAssociation. + * @function deleteBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} request DeleteBackupPlanAssociationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|triggerBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef TriggerBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls TriggerBackup. + * @function triggerBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} request TriggerBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.TriggerBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.triggerBackup = function triggerBackup(request, callback) { + return this.rpcCall(triggerBackup, $root.google.cloud.backupdr.v1.TriggerBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "TriggerBackup" }); + + /** + * Calls TriggerBackup. + * @function triggerBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} request TriggerBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return BackupDR; + })(); + + v1.NetworkConfig = (function() { + + /** + * Properties of a NetworkConfig. * @memberof google.cloud.backupdr.v1 - * @interface IWorkforceIdentityBasedManagementURI - * @property {string|null} [firstPartyManagementUri] WorkforceIdentityBasedManagementURI firstPartyManagementUri - * @property {string|null} [thirdPartyManagementUri] WorkforceIdentityBasedManagementURI thirdPartyManagementUri + * @interface INetworkConfig + * @property {string|null} [network] NetworkConfig network + * @property {google.cloud.backupdr.v1.NetworkConfig.PeeringMode|null} [peeringMode] NetworkConfig peeringMode */ /** - * Constructs a new WorkforceIdentityBasedManagementURI. + * Constructs a new NetworkConfig. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a WorkforceIdentityBasedManagementURI. - * @implements IWorkforceIdentityBasedManagementURI + * @classdesc Represents a NetworkConfig. + * @implements INetworkConfig * @constructor - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.INetworkConfig=} [properties] Properties to set */ - function WorkforceIdentityBasedManagementURI(properties) { + function NetworkConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -746,89 +1249,89 @@ } /** - * WorkforceIdentityBasedManagementURI firstPartyManagementUri. - * @member {string} firstPartyManagementUri - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * NetworkConfig network. + * @member {string} network + * @memberof google.cloud.backupdr.v1.NetworkConfig * @instance */ - WorkforceIdentityBasedManagementURI.prototype.firstPartyManagementUri = ""; + NetworkConfig.prototype.network = ""; /** - * WorkforceIdentityBasedManagementURI thirdPartyManagementUri. - * @member {string} thirdPartyManagementUri - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * NetworkConfig peeringMode. + * @member {google.cloud.backupdr.v1.NetworkConfig.PeeringMode} peeringMode + * @memberof google.cloud.backupdr.v1.NetworkConfig * @instance */ - WorkforceIdentityBasedManagementURI.prototype.thirdPartyManagementUri = ""; + NetworkConfig.prototype.peeringMode = 0; /** - * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. + * Creates a new NetworkConfig instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @memberof google.cloud.backupdr.v1.NetworkConfig * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI instance + * @param {google.cloud.backupdr.v1.INetworkConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig instance */ - WorkforceIdentityBasedManagementURI.create = function create(properties) { - return new WorkforceIdentityBasedManagementURI(properties); + NetworkConfig.create = function create(properties) { + return new NetworkConfig(properties); }; /** - * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @memberof google.cloud.backupdr.v1.NetworkConfig * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI message or plain object to encode + * @param {google.cloud.backupdr.v1.INetworkConfig} message NetworkConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WorkforceIdentityBasedManagementURI.encode = function encode(message, writer) { + NetworkConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.firstPartyManagementUri != null && Object.hasOwnProperty.call(message, "firstPartyManagementUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.firstPartyManagementUri); - if (message.thirdPartyManagementUri != null && Object.hasOwnProperty.call(message, "thirdPartyManagementUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.thirdPartyManagementUri); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); + if (message.peeringMode != null && Object.hasOwnProperty.call(message, "peeringMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.peeringMode); return writer; }; /** - * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @memberof google.cloud.backupdr.v1.NetworkConfig * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI message or plain object to encode + * @param {google.cloud.backupdr.v1.INetworkConfig} message NetworkConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WorkforceIdentityBasedManagementURI.encodeDelimited = function encodeDelimited(message, writer) { + NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. + * Decodes a NetworkConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @memberof google.cloud.backupdr.v1.NetworkConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI + * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WorkforceIdentityBasedManagementURI.decode = function decode(reader, length) { + NetworkConfig.decode = function 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.backupdr.v1.WorkforceIdentityBasedManagementURI(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.NetworkConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.firstPartyManagementUri = reader.string(); + message.network = reader.string(); break; } case 2: { - message.thirdPartyManagementUri = reader.string(); + message.peeringMode = reader.int32(); break; } default: @@ -840,43 +1343,530 @@ }; /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @memberof google.cloud.backupdr.v1.NetworkConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI + * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WorkforceIdentityBasedManagementURI.decodeDelimited = function decodeDelimited(reader) { + NetworkConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WorkforceIdentityBasedManagementURI message. + * Verifies a NetworkConfig message. * @function verify - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @memberof google.cloud.backupdr.v1.NetworkConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WorkforceIdentityBasedManagementURI.verify = function verify(message) { + NetworkConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.firstPartyManagementUri != null && message.hasOwnProperty("firstPartyManagementUri")) - if (!$util.isString(message.firstPartyManagementUri)) - return "firstPartyManagementUri: string expected"; - if (message.thirdPartyManagementUri != null && message.hasOwnProperty("thirdPartyManagementUri")) - if (!$util.isString(message.thirdPartyManagementUri)) - return "thirdPartyManagementUri: string expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.peeringMode != null && message.hasOwnProperty("peeringMode")) + switch (message.peeringMode) { + default: + return "peeringMode: enum value expected"; + case 0: + case 1: + break; + } return null; }; /** - * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig + */ + NetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.NetworkConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.NetworkConfig(); + if (object.network != null) + message.network = String(object.network); + switch (object.peeringMode) { + default: + if (typeof object.peeringMode === "number") { + message.peeringMode = object.peeringMode; + break; + } + break; + case "PEERING_MODE_UNSPECIFIED": + case 0: + message.peeringMode = 0; + break; + case "PRIVATE_SERVICE_ACCESS": + case 1: + message.peeringMode = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {google.cloud.backupdr.v1.NetworkConfig} message NetworkConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.network = ""; + object.peeringMode = options.enums === String ? "PEERING_MODE_UNSPECIFIED" : 0; + } + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.peeringMode != null && message.hasOwnProperty("peeringMode")) + object.peeringMode = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode] === undefined ? message.peeringMode : $root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode] : message.peeringMode; + return object; + }; + + /** + * Converts this NetworkConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkConfig"; + }; + + /** + * PeeringMode enum. + * @name google.cloud.backupdr.v1.NetworkConfig.PeeringMode + * @enum {number} + * @property {number} PEERING_MODE_UNSPECIFIED=0 PEERING_MODE_UNSPECIFIED value + * @property {number} PRIVATE_SERVICE_ACCESS=1 PRIVATE_SERVICE_ACCESS value + */ + NetworkConfig.PeeringMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PEERING_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRIVATE_SERVICE_ACCESS"] = 1; + return values; + })(); + + return NetworkConfig; + })(); + + v1.ManagementURI = (function() { + + /** + * Properties of a ManagementURI. + * @memberof google.cloud.backupdr.v1 + * @interface IManagementURI + * @property {string|null} [webUi] ManagementURI webUi + * @property {string|null} [api] ManagementURI api + */ + + /** + * Constructs a new ManagementURI. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ManagementURI. + * @implements IManagementURI + * @constructor + * @param {google.cloud.backupdr.v1.IManagementURI=} [properties] Properties to set + */ + function ManagementURI(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ManagementURI webUi. + * @member {string} webUi + * @memberof google.cloud.backupdr.v1.ManagementURI + * @instance + */ + ManagementURI.prototype.webUi = ""; + + /** + * ManagementURI api. + * @member {string} api + * @memberof google.cloud.backupdr.v1.ManagementURI + * @instance + */ + ManagementURI.prototype.api = ""; + + /** + * Creates a new ManagementURI instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {google.cloud.backupdr.v1.IManagementURI=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI instance + */ + ManagementURI.create = function create(properties) { + return new ManagementURI(properties); + }; + + /** + * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {google.cloud.backupdr.v1.IManagementURI} message ManagementURI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagementURI.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.webUi != null && Object.hasOwnProperty.call(message, "webUi")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.webUi); + if (message.api != null && Object.hasOwnProperty.call(message, "api")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.api); + return writer; + }; + + /** + * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {google.cloud.backupdr.v1.IManagementURI} message ManagementURI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagementURI.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ManagementURI message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagementURI.decode = function 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.backupdr.v1.ManagementURI(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.webUi = reader.string(); + break; + } + case 2: { + message.api = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ManagementURI message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagementURI.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ManagementURI message. + * @function verify + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ManagementURI.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.webUi != null && message.hasOwnProperty("webUi")) + if (!$util.isString(message.webUi)) + return "webUi: string expected"; + if (message.api != null && message.hasOwnProperty("api")) + if (!$util.isString(message.api)) + return "api: string expected"; + return null; + }; + + /** + * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI + */ + ManagementURI.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ManagementURI) + return object; + var message = new $root.google.cloud.backupdr.v1.ManagementURI(); + if (object.webUi != null) + message.webUi = String(object.webUi); + if (object.api != null) + message.api = String(object.api); + return message; + }; + + /** + * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {google.cloud.backupdr.v1.ManagementURI} message ManagementURI + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ManagementURI.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.webUi = ""; + object.api = ""; + } + if (message.webUi != null && message.hasOwnProperty("webUi")) + object.webUi = message.webUi; + if (message.api != null && message.hasOwnProperty("api")) + object.api = message.api; + return object; + }; + + /** + * Converts this ManagementURI to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ManagementURI + * @instance + * @returns {Object.} JSON object + */ + ManagementURI.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ManagementURI + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ManagementURI.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ManagementURI"; + }; + + return ManagementURI; + })(); + + v1.WorkforceIdentityBasedManagementURI = (function() { + + /** + * Properties of a WorkforceIdentityBasedManagementURI. + * @memberof google.cloud.backupdr.v1 + * @interface IWorkforceIdentityBasedManagementURI + * @property {string|null} [firstPartyManagementUri] WorkforceIdentityBasedManagementURI firstPartyManagementUri + * @property {string|null} [thirdPartyManagementUri] WorkforceIdentityBasedManagementURI thirdPartyManagementUri + */ + + /** + * Constructs a new WorkforceIdentityBasedManagementURI. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a WorkforceIdentityBasedManagementURI. + * @implements IWorkforceIdentityBasedManagementURI + * @constructor + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI=} [properties] Properties to set + */ + function WorkforceIdentityBasedManagementURI(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkforceIdentityBasedManagementURI firstPartyManagementUri. + * @member {string} firstPartyManagementUri + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @instance + */ + WorkforceIdentityBasedManagementURI.prototype.firstPartyManagementUri = ""; + + /** + * WorkforceIdentityBasedManagementURI thirdPartyManagementUri. + * @member {string} thirdPartyManagementUri + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @instance + */ + WorkforceIdentityBasedManagementURI.prototype.thirdPartyManagementUri = ""; + + /** + * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI instance + */ + WorkforceIdentityBasedManagementURI.create = function create(properties) { + return new WorkforceIdentityBasedManagementURI(properties); + }; + + /** + * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkforceIdentityBasedManagementURI.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.firstPartyManagementUri != null && Object.hasOwnProperty.call(message, "firstPartyManagementUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.firstPartyManagementUri); + if (message.thirdPartyManagementUri != null && Object.hasOwnProperty.call(message, "thirdPartyManagementUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.thirdPartyManagementUri); + return writer; + }; + + /** + * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkforceIdentityBasedManagementURI.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkforceIdentityBasedManagementURI.decode = function 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.backupdr.v1.WorkforceIdentityBasedManagementURI(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.firstPartyManagementUri = reader.string(); + break; + } + case 2: { + message.thirdPartyManagementUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkforceIdentityBasedManagementURI.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkforceIdentityBasedManagementURI message. + * @function verify + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkforceIdentityBasedManagementURI.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.firstPartyManagementUri != null && message.hasOwnProperty("firstPartyManagementUri")) + if (!$util.isString(message.firstPartyManagementUri)) + return "firstPartyManagementUri: string expected"; + if (message.thirdPartyManagementUri != null && message.hasOwnProperty("thirdPartyManagementUri")) + if (!$util.isString(message.thirdPartyManagementUri)) + return "thirdPartyManagementUri: string expected"; + return null; + }; + + /** + * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI * @static @@ -3673,44 +4663,34000 @@ return OperationMetadata; })(); + v1.BackupPlan = (function() { + + /** + * Properties of a BackupPlan. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupPlan + * @property {string|null} [name] BackupPlan name + * @property {string|null} [description] BackupPlan description + * @property {Object.|null} [labels] BackupPlan labels + * @property {google.protobuf.ITimestamp|null} [createTime] BackupPlan createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] BackupPlan updateTime + * @property {Array.|null} [backupRules] BackupPlan backupRules + * @property {google.cloud.backupdr.v1.BackupPlan.State|null} [state] BackupPlan state + * @property {string|null} [resourceType] BackupPlan resourceType + * @property {string|null} [etag] BackupPlan etag + * @property {string|null} [backupVault] BackupPlan backupVault + * @property {string|null} [backupVaultServiceAccount] BackupPlan backupVaultServiceAccount + */ + + /** + * Constructs a new BackupPlan. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupPlan. + * @implements IBackupPlan + * @constructor + * @param {google.cloud.backupdr.v1.IBackupPlan=} [properties] Properties to set + */ + function BackupPlan(properties) { + this.labels = {}; + this.backupRules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupPlan name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.name = ""; + + /** + * BackupPlan description. + * @member {string} description + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.description = ""; + + /** + * BackupPlan labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.labels = $util.emptyObject; + + /** + * BackupPlan createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.createTime = null; + + /** + * BackupPlan updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.updateTime = null; + + /** + * BackupPlan backupRules. + * @member {Array.} backupRules + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.backupRules = $util.emptyArray; + + /** + * BackupPlan state. + * @member {google.cloud.backupdr.v1.BackupPlan.State} state + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.state = 0; + + /** + * BackupPlan resourceType. + * @member {string} resourceType + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.resourceType = ""; + + /** + * BackupPlan etag. + * @member {string} etag + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.etag = ""; + + /** + * BackupPlan backupVault. + * @member {string} backupVault + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.backupVault = ""; + + /** + * BackupPlan backupVaultServiceAccount. + * @member {string} backupVaultServiceAccount + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.backupVaultServiceAccount = ""; + + /** + * Creates a new BackupPlan instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {google.cloud.backupdr.v1.IBackupPlan=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan instance + */ + BackupPlan.create = function create(properties) { + return new BackupPlan(properties); + }; + + /** + * Encodes the specified BackupPlan message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {google.cloud.backupdr.v1.IBackupPlan} message BackupPlan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupPlan.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + 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 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.backupRules != null && message.backupRules.length) + for (var i = 0; i < message.backupRules.length; ++i) + $root.google.cloud.backupdr.v1.BackupRule.encode(message.backupRules[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceType); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.etag); + if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.backupVault); + if (message.backupVaultServiceAccount != null && Object.hasOwnProperty.call(message, "backupVaultServiceAccount")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.backupVaultServiceAccount); + return writer; + }; + + /** + * Encodes the specified BackupPlan message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {google.cloud.backupdr.v1.IBackupPlan} message BackupPlan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupPlan.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupPlan message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupPlan.decode = function 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.backupdr.v1.BackupPlan(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + 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 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.backupRules && message.backupRules.length)) + message.backupRules = []; + message.backupRules.push($root.google.cloud.backupdr.v1.BackupRule.decode(reader, reader.uint32())); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 8: { + message.resourceType = reader.string(); + break; + } + case 9: { + message.etag = reader.string(); + break; + } + case 10: { + message.backupVault = reader.string(); + break; + } + case 11: { + message.backupVaultServiceAccount = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupPlan message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupPlan.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupPlan message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupPlan.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + 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.backupRules != null && message.hasOwnProperty("backupRules")) { + if (!Array.isArray(message.backupRules)) + return "backupRules: array expected"; + for (var i = 0; i < message.backupRules.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupRule.verify(message.backupRules[i]); + if (error) + return "backupRules." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) + if (!$util.isString(message.backupVault)) + return "backupVault: string expected"; + if (message.backupVaultServiceAccount != null && message.hasOwnProperty("backupVaultServiceAccount")) + if (!$util.isString(message.backupVaultServiceAccount)) + return "backupVaultServiceAccount: string expected"; + return null; + }; + + /** + * Creates a BackupPlan message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan + */ + BackupPlan.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupPlan) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupPlan(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlan.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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlan.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.backupdr.v1.BackupPlan.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.backupRules) { + if (!Array.isArray(object.backupRules)) + throw TypeError(".google.cloud.backupdr.v1.BackupPlan.backupRules: array expected"); + message.backupRules = []; + for (var i = 0; i < object.backupRules.length; ++i) { + if (typeof object.backupRules[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlan.backupRules: object expected"); + message.backupRules[i] = $root.google.cloud.backupdr.v1.BackupRule.fromObject(object.backupRules[i]); + } + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "INACTIVE": + case 4: + message.state = 4; + break; + } + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.etag != null) + message.etag = String(object.etag); + if (object.backupVault != null) + message.backupVault = String(object.backupVault); + if (object.backupVaultServiceAccount != null) + message.backupVaultServiceAccount = String(object.backupVaultServiceAccount); + return message; + }; + + /** + * Creates a plain object from a BackupPlan message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {google.cloud.backupdr.v1.BackupPlan} message BackupPlan + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupPlan.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.backupRules = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.resourceType = ""; + object.etag = ""; + object.backupVault = ""; + object.backupVaultServiceAccount = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + 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.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.backupRules && message.backupRules.length) { + object.backupRules = []; + for (var j = 0; j < message.backupRules.length; ++j) + object.backupRules[j] = $root.google.cloud.backupdr.v1.BackupRule.toObject(message.backupRules[j], options); + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupPlan.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupPlan.State[message.state] : message.state; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) + object.backupVault = message.backupVault; + if (message.backupVaultServiceAccount != null && message.hasOwnProperty("backupVaultServiceAccount")) + object.backupVaultServiceAccount = message.backupVaultServiceAccount; + return object; + }; + + /** + * Converts this BackupPlan to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + * @returns {Object.} JSON object + */ + BackupPlan.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupPlan + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupPlan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupPlan"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.BackupPlan.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} INACTIVE=4 INACTIVE value + */ + BackupPlan.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "INACTIVE"] = 4; + return values; + })(); + + return BackupPlan; + })(); + + v1.BackupRule = (function() { + + /** + * Properties of a BackupRule. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupRule + * @property {string|null} [ruleId] BackupRule ruleId + * @property {number|null} [backupRetentionDays] BackupRule backupRetentionDays + * @property {google.cloud.backupdr.v1.IStandardSchedule|null} [standardSchedule] BackupRule standardSchedule + */ + + /** + * Constructs a new BackupRule. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupRule. + * @implements IBackupRule + * @constructor + * @param {google.cloud.backupdr.v1.IBackupRule=} [properties] Properties to set + */ + function BackupRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupRule ruleId. + * @member {string} ruleId + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + */ + BackupRule.prototype.ruleId = ""; + + /** + * BackupRule backupRetentionDays. + * @member {number} backupRetentionDays + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + */ + BackupRule.prototype.backupRetentionDays = 0; + + /** + * BackupRule standardSchedule. + * @member {google.cloud.backupdr.v1.IStandardSchedule|null|undefined} standardSchedule + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + */ + BackupRule.prototype.standardSchedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupRule backupScheduleOneof. + * @member {"standardSchedule"|undefined} backupScheduleOneof + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + */ + Object.defineProperty(BackupRule.prototype, "backupScheduleOneof", { + get: $util.oneOfGetter($oneOfFields = ["standardSchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupRule instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {google.cloud.backupdr.v1.IBackupRule=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule instance + */ + BackupRule.create = function create(properties) { + return new BackupRule(properties); + }; + + /** + * Encodes the specified BackupRule message. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {google.cloud.backupdr.v1.IBackupRule} message BackupRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ruleId); + if (message.backupRetentionDays != null && Object.hasOwnProperty.call(message, "backupRetentionDays")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.backupRetentionDays); + if (message.standardSchedule != null && Object.hasOwnProperty.call(message, "standardSchedule")) + $root.google.cloud.backupdr.v1.StandardSchedule.encode(message.standardSchedule, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BackupRule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {google.cloud.backupdr.v1.IBackupRule} message BackupRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupRule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupRule.decode = function 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.backupdr.v1.BackupRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ruleId = reader.string(); + break; + } + case 4: { + message.backupRetentionDays = reader.int32(); + break; + } + case 5: { + message.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupRule message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + if (!$util.isString(message.ruleId)) + return "ruleId: string expected"; + if (message.backupRetentionDays != null && message.hasOwnProperty("backupRetentionDays")) + if (!$util.isInteger(message.backupRetentionDays)) + return "backupRetentionDays: integer expected"; + if (message.standardSchedule != null && message.hasOwnProperty("standardSchedule")) { + properties.backupScheduleOneof = 1; + { + var error = $root.google.cloud.backupdr.v1.StandardSchedule.verify(message.standardSchedule); + if (error) + return "standardSchedule." + error; + } + } + return null; + }; + + /** + * Creates a BackupRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule + */ + BackupRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupRule) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupRule(); + if (object.ruleId != null) + message.ruleId = String(object.ruleId); + if (object.backupRetentionDays != null) + message.backupRetentionDays = object.backupRetentionDays | 0; + if (object.standardSchedule != null) { + if (typeof object.standardSchedule !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupRule.standardSchedule: object expected"); + message.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.fromObject(object.standardSchedule); + } + return message; + }; + + /** + * Creates a plain object from a BackupRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {google.cloud.backupdr.v1.BackupRule} message BackupRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.ruleId = ""; + object.backupRetentionDays = 0; + } + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + object.ruleId = message.ruleId; + if (message.backupRetentionDays != null && message.hasOwnProperty("backupRetentionDays")) + object.backupRetentionDays = message.backupRetentionDays; + if (message.standardSchedule != null && message.hasOwnProperty("standardSchedule")) { + object.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.toObject(message.standardSchedule, options); + if (options.oneofs) + object.backupScheduleOneof = "standardSchedule"; + } + return object; + }; + + /** + * Converts this BackupRule to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + * @returns {Object.} JSON object + */ + BackupRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupRule + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupRule"; + }; + + return BackupRule; + })(); + + v1.StandardSchedule = (function() { + + /** + * Properties of a StandardSchedule. + * @memberof google.cloud.backupdr.v1 + * @interface IStandardSchedule + * @property {google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|null} [recurrenceType] StandardSchedule recurrenceType + * @property {number|null} [hourlyFrequency] StandardSchedule hourlyFrequency + * @property {Array.|null} [daysOfWeek] StandardSchedule daysOfWeek + * @property {Array.|null} [daysOfMonth] StandardSchedule daysOfMonth + * @property {google.cloud.backupdr.v1.IWeekDayOfMonth|null} [weekDayOfMonth] StandardSchedule weekDayOfMonth + * @property {Array.|null} [months] StandardSchedule months + * @property {google.cloud.backupdr.v1.IBackupWindow|null} [backupWindow] StandardSchedule backupWindow + * @property {string|null} [timeZone] StandardSchedule timeZone + */ + + /** + * Constructs a new StandardSchedule. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a StandardSchedule. + * @implements IStandardSchedule + * @constructor + * @param {google.cloud.backupdr.v1.IStandardSchedule=} [properties] Properties to set + */ + function StandardSchedule(properties) { + this.daysOfWeek = []; + this.daysOfMonth = []; + this.months = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StandardSchedule recurrenceType. + * @member {google.cloud.backupdr.v1.StandardSchedule.RecurrenceType} recurrenceType + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.recurrenceType = 0; + + /** + * StandardSchedule hourlyFrequency. + * @member {number} hourlyFrequency + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.hourlyFrequency = 0; + + /** + * StandardSchedule daysOfWeek. + * @member {Array.} daysOfWeek + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.daysOfWeek = $util.emptyArray; + + /** + * StandardSchedule daysOfMonth. + * @member {Array.} daysOfMonth + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.daysOfMonth = $util.emptyArray; + + /** + * StandardSchedule weekDayOfMonth. + * @member {google.cloud.backupdr.v1.IWeekDayOfMonth|null|undefined} weekDayOfMonth + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.weekDayOfMonth = null; + + /** + * StandardSchedule months. + * @member {Array.} months + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.months = $util.emptyArray; + + /** + * StandardSchedule backupWindow. + * @member {google.cloud.backupdr.v1.IBackupWindow|null|undefined} backupWindow + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.backupWindow = null; + + /** + * StandardSchedule timeZone. + * @member {string} timeZone + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.timeZone = ""; + + /** + * Creates a new StandardSchedule instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {google.cloud.backupdr.v1.IStandardSchedule=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule instance + */ + StandardSchedule.create = function create(properties) { + return new StandardSchedule(properties); + }; + + /** + * Encodes the specified StandardSchedule message. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {google.cloud.backupdr.v1.IStandardSchedule} message StandardSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StandardSchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recurrenceType != null && Object.hasOwnProperty.call(message, "recurrenceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.recurrenceType); + if (message.hourlyFrequency != null && Object.hasOwnProperty.call(message, "hourlyFrequency")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hourlyFrequency); + if (message.daysOfWeek != null && message.daysOfWeek.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.daysOfWeek.length; ++i) + writer.int32(message.daysOfWeek[i]); + writer.ldelim(); + } + if (message.daysOfMonth != null && message.daysOfMonth.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (var i = 0; i < message.daysOfMonth.length; ++i) + writer.int32(message.daysOfMonth[i]); + writer.ldelim(); + } + if (message.weekDayOfMonth != null && Object.hasOwnProperty.call(message, "weekDayOfMonth")) + $root.google.cloud.backupdr.v1.WeekDayOfMonth.encode(message.weekDayOfMonth, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.months != null && message.months.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (var i = 0; i < message.months.length; ++i) + writer.int32(message.months[i]); + writer.ldelim(); + } + if (message.backupWindow != null && Object.hasOwnProperty.call(message, "backupWindow")) + $root.google.cloud.backupdr.v1.BackupWindow.encode(message.backupWindow, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.timeZone); + return writer; + }; + + /** + * Encodes the specified StandardSchedule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {google.cloud.backupdr.v1.IStandardSchedule} message StandardSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StandardSchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StandardSchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StandardSchedule.decode = function 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.backupdr.v1.StandardSchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.recurrenceType = reader.int32(); + break; + } + case 2: { + message.hourlyFrequency = reader.int32(); + break; + } + case 3: { + if (!(message.daysOfWeek && message.daysOfWeek.length)) + message.daysOfWeek = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.daysOfWeek.push(reader.int32()); + } else + message.daysOfWeek.push(reader.int32()); + break; + } + case 4: { + if (!(message.daysOfMonth && message.daysOfMonth.length)) + message.daysOfMonth = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.daysOfMonth.push(reader.int32()); + } else + message.daysOfMonth.push(reader.int32()); + break; + } + case 5: { + message.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.months && message.months.length)) + message.months = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.months.push(reader.int32()); + } else + message.months.push(reader.int32()); + break; + } + case 7: { + message.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.decode(reader, reader.uint32()); + break; + } + case 8: { + message.timeZone = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StandardSchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StandardSchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StandardSchedule message. + * @function verify + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StandardSchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recurrenceType != null && message.hasOwnProperty("recurrenceType")) + switch (message.recurrenceType) { + default: + return "recurrenceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.hourlyFrequency != null && message.hasOwnProperty("hourlyFrequency")) + if (!$util.isInteger(message.hourlyFrequency)) + return "hourlyFrequency: integer expected"; + if (message.daysOfWeek != null && message.hasOwnProperty("daysOfWeek")) { + if (!Array.isArray(message.daysOfWeek)) + return "daysOfWeek: array expected"; + for (var i = 0; i < message.daysOfWeek.length; ++i) + switch (message.daysOfWeek[i]) { + default: + return "daysOfWeek: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + if (message.daysOfMonth != null && message.hasOwnProperty("daysOfMonth")) { + if (!Array.isArray(message.daysOfMonth)) + return "daysOfMonth: array expected"; + for (var i = 0; i < message.daysOfMonth.length; ++i) + if (!$util.isInteger(message.daysOfMonth[i])) + return "daysOfMonth: integer[] expected"; + } + if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) { + var error = $root.google.cloud.backupdr.v1.WeekDayOfMonth.verify(message.weekDayOfMonth); + if (error) + return "weekDayOfMonth." + error; + } + if (message.months != null && message.hasOwnProperty("months")) { + if (!Array.isArray(message.months)) + return "months: array expected"; + for (var i = 0; i < message.months.length; ++i) + switch (message.months[i]) { + default: + return "months: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + } + if (message.backupWindow != null && message.hasOwnProperty("backupWindow")) { + var error = $root.google.cloud.backupdr.v1.BackupWindow.verify(message.backupWindow); + if (error) + return "backupWindow." + error; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + return null; + }; + + /** + * Creates a StandardSchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule + */ + StandardSchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.StandardSchedule) + return object; + var message = new $root.google.cloud.backupdr.v1.StandardSchedule(); + switch (object.recurrenceType) { + default: + if (typeof object.recurrenceType === "number") { + message.recurrenceType = object.recurrenceType; + break; + } + break; + case "RECURRENCE_TYPE_UNSPECIFIED": + case 0: + message.recurrenceType = 0; + break; + case "HOURLY": + case 1: + message.recurrenceType = 1; + break; + case "DAILY": + case 2: + message.recurrenceType = 2; + break; + case "WEEKLY": + case 3: + message.recurrenceType = 3; + break; + case "MONTHLY": + case 4: + message.recurrenceType = 4; + break; + case "YEARLY": + case 5: + message.recurrenceType = 5; + break; + } + if (object.hourlyFrequency != null) + message.hourlyFrequency = object.hourlyFrequency | 0; + if (object.daysOfWeek) { + if (!Array.isArray(object.daysOfWeek)) + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.daysOfWeek: array expected"); + message.daysOfWeek = []; + for (var i = 0; i < object.daysOfWeek.length; ++i) + switch (object.daysOfWeek[i]) { + default: + if (typeof object.daysOfWeek[i] === "number") { + message.daysOfWeek[i] = object.daysOfWeek[i]; + break; + } + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.daysOfWeek[i] = 0; + break; + case "MONDAY": + case 1: + message.daysOfWeek[i] = 1; + break; + case "TUESDAY": + case 2: + message.daysOfWeek[i] = 2; + break; + case "WEDNESDAY": + case 3: + message.daysOfWeek[i] = 3; + break; + case "THURSDAY": + case 4: + message.daysOfWeek[i] = 4; + break; + case "FRIDAY": + case 5: + message.daysOfWeek[i] = 5; + break; + case "SATURDAY": + case 6: + message.daysOfWeek[i] = 6; + break; + case "SUNDAY": + case 7: + message.daysOfWeek[i] = 7; + break; + } + } + if (object.daysOfMonth) { + if (!Array.isArray(object.daysOfMonth)) + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.daysOfMonth: array expected"); + message.daysOfMonth = []; + for (var i = 0; i < object.daysOfMonth.length; ++i) + message.daysOfMonth[i] = object.daysOfMonth[i] | 0; + } + if (object.weekDayOfMonth != null) { + if (typeof object.weekDayOfMonth !== "object") + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.weekDayOfMonth: object expected"); + message.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.fromObject(object.weekDayOfMonth); + } + if (object.months) { + if (!Array.isArray(object.months)) + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.months: array expected"); + message.months = []; + for (var i = 0; i < object.months.length; ++i) + switch (object.months[i]) { + default: + if (typeof object.months[i] === "number") { + message.months[i] = object.months[i]; + break; + } + case "MONTH_UNSPECIFIED": + case 0: + message.months[i] = 0; + break; + case "JANUARY": + case 1: + message.months[i] = 1; + break; + case "FEBRUARY": + case 2: + message.months[i] = 2; + break; + case "MARCH": + case 3: + message.months[i] = 3; + break; + case "APRIL": + case 4: + message.months[i] = 4; + break; + case "MAY": + case 5: + message.months[i] = 5; + break; + case "JUNE": + case 6: + message.months[i] = 6; + break; + case "JULY": + case 7: + message.months[i] = 7; + break; + case "AUGUST": + case 8: + message.months[i] = 8; + break; + case "SEPTEMBER": + case 9: + message.months[i] = 9; + break; + case "OCTOBER": + case 10: + message.months[i] = 10; + break; + case "NOVEMBER": + case 11: + message.months[i] = 11; + break; + case "DECEMBER": + case 12: + message.months[i] = 12; + break; + } + } + if (object.backupWindow != null) { + if (typeof object.backupWindow !== "object") + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.backupWindow: object expected"); + message.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.fromObject(object.backupWindow); + } + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + return message; + }; + + /** + * Creates a plain object from a StandardSchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {google.cloud.backupdr.v1.StandardSchedule} message StandardSchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StandardSchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.daysOfWeek = []; + object.daysOfMonth = []; + object.months = []; + } + if (options.defaults) { + object.recurrenceType = options.enums === String ? "RECURRENCE_TYPE_UNSPECIFIED" : 0; + object.hourlyFrequency = 0; + object.weekDayOfMonth = null; + object.backupWindow = null; + object.timeZone = ""; + } + if (message.recurrenceType != null && message.hasOwnProperty("recurrenceType")) + object.recurrenceType = options.enums === String ? $root.google.cloud.backupdr.v1.StandardSchedule.RecurrenceType[message.recurrenceType] === undefined ? message.recurrenceType : $root.google.cloud.backupdr.v1.StandardSchedule.RecurrenceType[message.recurrenceType] : message.recurrenceType; + if (message.hourlyFrequency != null && message.hasOwnProperty("hourlyFrequency")) + object.hourlyFrequency = message.hourlyFrequency; + if (message.daysOfWeek && message.daysOfWeek.length) { + object.daysOfWeek = []; + for (var j = 0; j < message.daysOfWeek.length; ++j) + object.daysOfWeek[j] = options.enums === String ? $root.google.type.DayOfWeek[message.daysOfWeek[j]] === undefined ? message.daysOfWeek[j] : $root.google.type.DayOfWeek[message.daysOfWeek[j]] : message.daysOfWeek[j]; + } + if (message.daysOfMonth && message.daysOfMonth.length) { + object.daysOfMonth = []; + for (var j = 0; j < message.daysOfMonth.length; ++j) + object.daysOfMonth[j] = message.daysOfMonth[j]; + } + if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) + object.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.toObject(message.weekDayOfMonth, options); + if (message.months && message.months.length) { + object.months = []; + for (var j = 0; j < message.months.length; ++j) + object.months[j] = options.enums === String ? $root.google.type.Month[message.months[j]] === undefined ? message.months[j] : $root.google.type.Month[message.months[j]] : message.months[j]; + } + if (message.backupWindow != null && message.hasOwnProperty("backupWindow")) + object.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.toObject(message.backupWindow, options); + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + return object; + }; + + /** + * Converts this StandardSchedule to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + * @returns {Object.} JSON object + */ + StandardSchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StandardSchedule + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StandardSchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.StandardSchedule"; + }; + + /** + * RecurrenceType enum. + * @name google.cloud.backupdr.v1.StandardSchedule.RecurrenceType + * @enum {number} + * @property {number} RECURRENCE_TYPE_UNSPECIFIED=0 RECURRENCE_TYPE_UNSPECIFIED value + * @property {number} HOURLY=1 HOURLY value + * @property {number} DAILY=2 DAILY value + * @property {number} WEEKLY=3 WEEKLY value + * @property {number} MONTHLY=4 MONTHLY value + * @property {number} YEARLY=5 YEARLY value + */ + StandardSchedule.RecurrenceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RECURRENCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HOURLY"] = 1; + values[valuesById[2] = "DAILY"] = 2; + values[valuesById[3] = "WEEKLY"] = 3; + values[valuesById[4] = "MONTHLY"] = 4; + values[valuesById[5] = "YEARLY"] = 5; + return values; + })(); + + return StandardSchedule; + })(); + + v1.BackupWindow = (function() { + + /** + * Properties of a BackupWindow. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupWindow + * @property {number|null} [startHourOfDay] BackupWindow startHourOfDay + * @property {number|null} [endHourOfDay] BackupWindow endHourOfDay + */ + + /** + * Constructs a new BackupWindow. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupWindow. + * @implements IBackupWindow + * @constructor + * @param {google.cloud.backupdr.v1.IBackupWindow=} [properties] Properties to set + */ + function BackupWindow(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupWindow startHourOfDay. + * @member {number} startHourOfDay + * @memberof google.cloud.backupdr.v1.BackupWindow + * @instance + */ + BackupWindow.prototype.startHourOfDay = 0; + + /** + * BackupWindow endHourOfDay. + * @member {number} endHourOfDay + * @memberof google.cloud.backupdr.v1.BackupWindow + * @instance + */ + BackupWindow.prototype.endHourOfDay = 0; + + /** + * Creates a new BackupWindow instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {google.cloud.backupdr.v1.IBackupWindow=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow instance + */ + BackupWindow.create = function create(properties) { + return new BackupWindow(properties); + }; + + /** + * Encodes the specified BackupWindow message. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {google.cloud.backupdr.v1.IBackupWindow} message BackupWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupWindow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startHourOfDay != null && Object.hasOwnProperty.call(message, "startHourOfDay")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startHourOfDay); + if (message.endHourOfDay != null && Object.hasOwnProperty.call(message, "endHourOfDay")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endHourOfDay); + return writer; + }; + + /** + * Encodes the specified BackupWindow message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {google.cloud.backupdr.v1.IBackupWindow} message BackupWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupWindow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupWindow message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupWindow.decode = function 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.backupdr.v1.BackupWindow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startHourOfDay = reader.int32(); + break; + } + case 2: { + message.endHourOfDay = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupWindow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupWindow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupWindow message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupWindow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startHourOfDay != null && message.hasOwnProperty("startHourOfDay")) + if (!$util.isInteger(message.startHourOfDay)) + return "startHourOfDay: integer expected"; + if (message.endHourOfDay != null && message.hasOwnProperty("endHourOfDay")) + if (!$util.isInteger(message.endHourOfDay)) + return "endHourOfDay: integer expected"; + return null; + }; + + /** + * Creates a BackupWindow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow + */ + BackupWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupWindow) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupWindow(); + if (object.startHourOfDay != null) + message.startHourOfDay = object.startHourOfDay | 0; + if (object.endHourOfDay != null) + message.endHourOfDay = object.endHourOfDay | 0; + return message; + }; + + /** + * Creates a plain object from a BackupWindow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {google.cloud.backupdr.v1.BackupWindow} message BackupWindow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupWindow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startHourOfDay = 0; + object.endHourOfDay = 0; + } + if (message.startHourOfDay != null && message.hasOwnProperty("startHourOfDay")) + object.startHourOfDay = message.startHourOfDay; + if (message.endHourOfDay != null && message.hasOwnProperty("endHourOfDay")) + object.endHourOfDay = message.endHourOfDay; + return object; + }; + + /** + * Converts this BackupWindow to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupWindow + * @instance + * @returns {Object.} JSON object + */ + BackupWindow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupWindow + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupWindow"; + }; + + return BackupWindow; + })(); + + v1.WeekDayOfMonth = (function() { + + /** + * Properties of a WeekDayOfMonth. + * @memberof google.cloud.backupdr.v1 + * @interface IWeekDayOfMonth + * @property {google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|null} [weekOfMonth] WeekDayOfMonth weekOfMonth + * @property {google.type.DayOfWeek|null} [dayOfWeek] WeekDayOfMonth dayOfWeek + */ + + /** + * Constructs a new WeekDayOfMonth. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a WeekDayOfMonth. + * @implements IWeekDayOfMonth + * @constructor + * @param {google.cloud.backupdr.v1.IWeekDayOfMonth=} [properties] Properties to set + */ + function WeekDayOfMonth(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WeekDayOfMonth weekOfMonth. + * @member {google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth} weekOfMonth + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @instance + */ + WeekDayOfMonth.prototype.weekOfMonth = 0; + + /** + * WeekDayOfMonth dayOfWeek. + * @member {google.type.DayOfWeek} dayOfWeek + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @instance + */ + WeekDayOfMonth.prototype.dayOfWeek = 0; + + /** + * Creates a new WeekDayOfMonth instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {google.cloud.backupdr.v1.IWeekDayOfMonth=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth instance + */ + WeekDayOfMonth.create = function create(properties) { + return new WeekDayOfMonth(properties); + }; + + /** + * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {google.cloud.backupdr.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeekDayOfMonth.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weekOfMonth != null && Object.hasOwnProperty.call(message, "weekOfMonth")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.weekOfMonth); + if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dayOfWeek); + return writer; + }; + + /** + * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {google.cloud.backupdr.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeekDayOfMonth.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeekDayOfMonth.decode = function 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.backupdr.v1.WeekDayOfMonth(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.weekOfMonth = reader.int32(); + break; + } + case 2: { + message.dayOfWeek = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeekDayOfMonth.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WeekDayOfMonth message. + * @function verify + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WeekDayOfMonth.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weekOfMonth != null && message.hasOwnProperty("weekOfMonth")) + switch (message.weekOfMonth) { + default: + return "weekOfMonth: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + switch (message.dayOfWeek) { + default: + return "dayOfWeek: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + return null; + }; + + /** + * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth + */ + WeekDayOfMonth.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.WeekDayOfMonth) + return object; + var message = new $root.google.cloud.backupdr.v1.WeekDayOfMonth(); + switch (object.weekOfMonth) { + default: + if (typeof object.weekOfMonth === "number") { + message.weekOfMonth = object.weekOfMonth; + break; + } + break; + case "WEEK_OF_MONTH_UNSPECIFIED": + case 0: + message.weekOfMonth = 0; + break; + case "FIRST": + case 1: + message.weekOfMonth = 1; + break; + case "SECOND": + case 2: + message.weekOfMonth = 2; + break; + case "THIRD": + case 3: + message.weekOfMonth = 3; + break; + case "FOURTH": + case 4: + message.weekOfMonth = 4; + break; + case "LAST": + case 5: + message.weekOfMonth = 5; + break; + } + switch (object.dayOfWeek) { + default: + if (typeof object.dayOfWeek === "number") { + message.dayOfWeek = object.dayOfWeek; + break; + } + break; + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.dayOfWeek = 0; + break; + case "MONDAY": + case 1: + message.dayOfWeek = 1; + break; + case "TUESDAY": + case 2: + message.dayOfWeek = 2; + break; + case "WEDNESDAY": + case 3: + message.dayOfWeek = 3; + break; + case "THURSDAY": + case 4: + message.dayOfWeek = 4; + break; + case "FRIDAY": + case 5: + message.dayOfWeek = 5; + break; + case "SATURDAY": + case 6: + message.dayOfWeek = 6; + break; + case "SUNDAY": + case 7: + message.dayOfWeek = 7; + break; + } + return message; + }; + + /** + * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {google.cloud.backupdr.v1.WeekDayOfMonth} message WeekDayOfMonth + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WeekDayOfMonth.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.weekOfMonth = options.enums === String ? "WEEK_OF_MONTH_UNSPECIFIED" : 0; + object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; + } + if (message.weekOfMonth != null && message.hasOwnProperty("weekOfMonth")) + object.weekOfMonth = options.enums === String ? $root.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth] === undefined ? message.weekOfMonth : $root.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth] : message.weekOfMonth; + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] === undefined ? message.dayOfWeek : $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; + return object; + }; + + /** + * Converts this WeekDayOfMonth to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @instance + * @returns {Object.} JSON object + */ + WeekDayOfMonth.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WeekDayOfMonth + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WeekDayOfMonth.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.WeekDayOfMonth"; + }; + + /** + * WeekOfMonth enum. + * @name google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth + * @enum {number} + * @property {number} WEEK_OF_MONTH_UNSPECIFIED=0 WEEK_OF_MONTH_UNSPECIFIED value + * @property {number} FIRST=1 FIRST value + * @property {number} SECOND=2 SECOND value + * @property {number} THIRD=3 THIRD value + * @property {number} FOURTH=4 FOURTH value + * @property {number} LAST=5 LAST value + */ + WeekDayOfMonth.WeekOfMonth = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "WEEK_OF_MONTH_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIRST"] = 1; + values[valuesById[2] = "SECOND"] = 2; + values[valuesById[3] = "THIRD"] = 3; + values[valuesById[4] = "FOURTH"] = 4; + values[valuesById[5] = "LAST"] = 5; + return values; + })(); + + return WeekDayOfMonth; + })(); + + v1.CreateBackupPlanRequest = (function() { + + /** + * Properties of a CreateBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ICreateBackupPlanRequest + * @property {string|null} [parent] CreateBackupPlanRequest parent + * @property {string|null} [backupPlanId] CreateBackupPlanRequest backupPlanId + * @property {google.cloud.backupdr.v1.IBackupPlan|null} [backupPlan] CreateBackupPlanRequest backupPlan + * @property {string|null} [requestId] CreateBackupPlanRequest requestId + */ + + /** + * Constructs a new CreateBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CreateBackupPlanRequest. + * @implements ICreateBackupPlanRequest + * @constructor + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest=} [properties] Properties to set + */ + function CreateBackupPlanRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBackupPlanRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + */ + CreateBackupPlanRequest.prototype.parent = ""; + + /** + * CreateBackupPlanRequest backupPlanId. + * @member {string} backupPlanId + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + */ + CreateBackupPlanRequest.prototype.backupPlanId = ""; + + /** + * CreateBackupPlanRequest backupPlan. + * @member {google.cloud.backupdr.v1.IBackupPlan|null|undefined} backupPlan + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + */ + CreateBackupPlanRequest.prototype.backupPlan = null; + + /** + * CreateBackupPlanRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + */ + CreateBackupPlanRequest.prototype.requestId = ""; + + /** + * Creates a new CreateBackupPlanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest instance + */ + CreateBackupPlanRequest.create = function create(properties) { + return new CreateBackupPlanRequest(properties); + }; + + /** + * Encodes the specified CreateBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} message CreateBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupPlanRequest.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.backupPlanId != null && Object.hasOwnProperty.call(message, "backupPlanId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanId); + if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) + $root.google.cloud.backupdr.v1.BackupPlan.encode(message.backupPlan, 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 CreateBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} message CreateBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBackupPlanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupPlanRequest.decode = function 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.backupdr.v1.CreateBackupPlanRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.backupPlanId = reader.string(); + break; + } + case 3: { + message.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBackupPlanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBackupPlanRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBackupPlanRequest.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.backupPlanId != null && message.hasOwnProperty("backupPlanId")) + if (!$util.isString(message.backupPlanId)) + return "backupPlanId: string expected"; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) { + var error = $root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlan); + if (error) + return "backupPlan." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest + */ + CreateBackupPlanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupPlanRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.CreateBackupPlanRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupPlanId != null) + message.backupPlanId = String(object.backupPlanId); + if (object.backupPlan != null) { + if (typeof object.backupPlan !== "object") + throw TypeError(".google.cloud.backupdr.v1.CreateBackupPlanRequest.backupPlan: object expected"); + message.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlan); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateBackupPlanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.CreateBackupPlanRequest} message CreateBackupPlanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBackupPlanRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupPlanId = ""; + object.backupPlan = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupPlanId != null && message.hasOwnProperty("backupPlanId")) + object.backupPlanId = message.backupPlanId; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + object.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlan, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateBackupPlanRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBackupPlanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateBackupPlanRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupPlanRequest"; + }; + + return CreateBackupPlanRequest; + })(); + + v1.ListBackupPlansRequest = (function() { + + /** + * Properties of a ListBackupPlansRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupPlansRequest + * @property {string|null} [parent] ListBackupPlansRequest parent + * @property {number|null} [pageSize] ListBackupPlansRequest pageSize + * @property {string|null} [pageToken] ListBackupPlansRequest pageToken + * @property {string|null} [filter] ListBackupPlansRequest filter + * @property {string|null} [orderBy] ListBackupPlansRequest orderBy + */ + + /** + * Constructs a new ListBackupPlansRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupPlansRequest. + * @implements IListBackupPlansRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest=} [properties] Properties to set + */ + function ListBackupPlansRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupPlansRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.parent = ""; + + /** + * ListBackupPlansRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.pageSize = 0; + + /** + * ListBackupPlansRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.pageToken = ""; + + /** + * ListBackupPlansRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.filter = ""; + + /** + * ListBackupPlansRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.orderBy = ""; + + /** + * Creates a new ListBackupPlansRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest instance + */ + ListBackupPlansRequest.create = function create(properties) { + return new ListBackupPlansRequest(properties); + }; + + /** + * Encodes the specified ListBackupPlansRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} message ListBackupPlansRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlansRequest.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 ListBackupPlansRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} message ListBackupPlansRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlansRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupPlansRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlansRequest.decode = function 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.backupdr.v1.ListBackupPlansRequest(); + 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 ListBackupPlansRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlansRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupPlansRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupPlansRequest.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 ListBackupPlansRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest + */ + ListBackupPlansRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlansRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupPlansRequest(); + 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 ListBackupPlansRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {google.cloud.backupdr.v1.ListBackupPlansRequest} message ListBackupPlansRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupPlansRequest.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 ListBackupPlansRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupPlansRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupPlansRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupPlansRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlansRequest"; + }; + + return ListBackupPlansRequest; + })(); + + v1.ListBackupPlansResponse = (function() { + + /** + * Properties of a ListBackupPlansResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupPlansResponse + * @property {Array.|null} [backupPlans] ListBackupPlansResponse backupPlans + * @property {string|null} [nextPageToken] ListBackupPlansResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupPlansResponse unreachable + */ + + /** + * Constructs a new ListBackupPlansResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupPlansResponse. + * @implements IListBackupPlansResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupPlansResponse=} [properties] Properties to set + */ + function ListBackupPlansResponse(properties) { + this.backupPlans = []; + 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]]; + } + + /** + * ListBackupPlansResponse backupPlans. + * @member {Array.} backupPlans + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @instance + */ + ListBackupPlansResponse.prototype.backupPlans = $util.emptyArray; + + /** + * ListBackupPlansResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @instance + */ + ListBackupPlansResponse.prototype.nextPageToken = ""; + + /** + * ListBackupPlansResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @instance + */ + ListBackupPlansResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupPlansResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse instance + */ + ListBackupPlansResponse.create = function create(properties) { + return new ListBackupPlansResponse(properties); + }; + + /** + * Encodes the specified ListBackupPlansResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansResponse} message ListBackupPlansResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlansResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPlans != null && message.backupPlans.length) + for (var i = 0; i < message.backupPlans.length; ++i) + $root.google.cloud.backupdr.v1.BackupPlan.encode(message.backupPlans[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 ListBackupPlansResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansResponse} message ListBackupPlansResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlansResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupPlansResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlansResponse.decode = function 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.backupdr.v1.ListBackupPlansResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backupPlans && message.backupPlans.length)) + message.backupPlans = []; + message.backupPlans.push($root.google.cloud.backupdr.v1.BackupPlan.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 ListBackupPlansResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlansResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupPlansResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupPlansResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupPlans != null && message.hasOwnProperty("backupPlans")) { + if (!Array.isArray(message.backupPlans)) + return "backupPlans: array expected"; + for (var i = 0; i < message.backupPlans.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlans[i]); + if (error) + return "backupPlans." + 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 ListBackupPlansResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse + */ + ListBackupPlansResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlansResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupPlansResponse(); + if (object.backupPlans) { + if (!Array.isArray(object.backupPlans)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.backupPlans: array expected"); + message.backupPlans = []; + for (var i = 0; i < object.backupPlans.length; ++i) { + if (typeof object.backupPlans[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.backupPlans: object expected"); + message.backupPlans[i] = $root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlans[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.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 ListBackupPlansResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {google.cloud.backupdr.v1.ListBackupPlansResponse} message ListBackupPlansResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupPlansResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupPlans = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backupPlans && message.backupPlans.length) { + object.backupPlans = []; + for (var j = 0; j < message.backupPlans.length; ++j) + object.backupPlans[j] = $root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlans[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 ListBackupPlansResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupPlansResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupPlansResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupPlansResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlansResponse"; + }; + + return ListBackupPlansResponse; + })(); + + v1.GetBackupPlanRequest = (function() { + + /** + * Properties of a GetBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetBackupPlanRequest + * @property {string|null} [name] GetBackupPlanRequest name + */ + + /** + * Constructs a new GetBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetBackupPlanRequest. + * @implements IGetBackupPlanRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest=} [properties] Properties to set + */ + function GetBackupPlanRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupPlanRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @instance + */ + GetBackupPlanRequest.prototype.name = ""; + + /** + * Creates a new GetBackupPlanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest instance + */ + GetBackupPlanRequest.create = function create(properties) { + return new GetBackupPlanRequest(properties); + }; + + /** + * Encodes the specified GetBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} message GetBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupPlanRequest.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 GetBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} message GetBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupPlanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupPlanRequest.decode = function 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.backupdr.v1.GetBackupPlanRequest(); + 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 GetBackupPlanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupPlanRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupPlanRequest.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 GetBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest + */ + GetBackupPlanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetBackupPlanRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetBackupPlanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.GetBackupPlanRequest} message GetBackupPlanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupPlanRequest.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 GetBackupPlanRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupPlanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupPlanRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupPlanRequest"; + }; + + return GetBackupPlanRequest; + })(); + + v1.DeleteBackupPlanRequest = (function() { + + /** + * Properties of a DeleteBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IDeleteBackupPlanRequest + * @property {string|null} [name] DeleteBackupPlanRequest name + * @property {string|null} [requestId] DeleteBackupPlanRequest requestId + */ + + /** + * Constructs a new DeleteBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DeleteBackupPlanRequest. + * @implements IDeleteBackupPlanRequest + * @constructor + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest=} [properties] Properties to set + */ + function DeleteBackupPlanRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupPlanRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @instance + */ + DeleteBackupPlanRequest.prototype.name = ""; + + /** + * DeleteBackupPlanRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @instance + */ + DeleteBackupPlanRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteBackupPlanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest instance + */ + DeleteBackupPlanRequest.create = function create(properties) { + return new DeleteBackupPlanRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} message DeleteBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupPlanRequest.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 DeleteBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} message DeleteBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupPlanRequest.decode = function 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.backupdr.v1.DeleteBackupPlanRequest(); + 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 DeleteBackupPlanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupPlanRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupPlanRequest.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 DeleteBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest + */ + DeleteBackupPlanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest(); + 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 DeleteBackupPlanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.DeleteBackupPlanRequest} message DeleteBackupPlanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupPlanRequest.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 DeleteBackupPlanRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupPlanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupPlanRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupPlanRequest"; + }; + + return DeleteBackupPlanRequest; + })(); + + v1.BackupPlanAssociation = (function() { + + /** + * Properties of a BackupPlanAssociation. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupPlanAssociation + * @property {string|null} [name] BackupPlanAssociation name + * @property {string|null} [resourceType] BackupPlanAssociation resourceType + * @property {string|null} [resource] BackupPlanAssociation resource + * @property {string|null} [backupPlan] BackupPlanAssociation backupPlan + * @property {google.protobuf.ITimestamp|null} [createTime] BackupPlanAssociation createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] BackupPlanAssociation updateTime + * @property {google.cloud.backupdr.v1.BackupPlanAssociation.State|null} [state] BackupPlanAssociation state + * @property {Array.|null} [rulesConfigInfo] BackupPlanAssociation rulesConfigInfo + * @property {string|null} [dataSource] BackupPlanAssociation dataSource + */ + + /** + * Constructs a new BackupPlanAssociation. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupPlanAssociation. + * @implements IBackupPlanAssociation + * @constructor + * @param {google.cloud.backupdr.v1.IBackupPlanAssociation=} [properties] Properties to set + */ + function BackupPlanAssociation(properties) { + this.rulesConfigInfo = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupPlanAssociation name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.name = ""; + + /** + * BackupPlanAssociation resourceType. + * @member {string} resourceType + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.resourceType = ""; + + /** + * BackupPlanAssociation resource. + * @member {string} resource + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.resource = ""; + + /** + * BackupPlanAssociation backupPlan. + * @member {string} backupPlan + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.backupPlan = ""; + + /** + * BackupPlanAssociation createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.createTime = null; + + /** + * BackupPlanAssociation updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.updateTime = null; + + /** + * BackupPlanAssociation state. + * @member {google.cloud.backupdr.v1.BackupPlanAssociation.State} state + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.state = 0; + + /** + * BackupPlanAssociation rulesConfigInfo. + * @member {Array.} rulesConfigInfo + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.rulesConfigInfo = $util.emptyArray; + + /** + * BackupPlanAssociation dataSource. + * @member {string} dataSource + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.dataSource = ""; + + /** + * Creates a new BackupPlanAssociation instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {google.cloud.backupdr.v1.IBackupPlanAssociation=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation instance + */ + BackupPlanAssociation.create = function create(properties) { + return new BackupPlanAssociation(properties); + }; + + /** + * Encodes the specified BackupPlanAssociation message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {google.cloud.backupdr.v1.IBackupPlanAssociation} message BackupPlanAssociation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupPlanAssociation.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.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceType); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); + if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.backupPlan); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.rulesConfigInfo != null && message.rulesConfigInfo.length) + for (var i = 0; i < message.rulesConfigInfo.length; ++i) + $root.google.cloud.backupdr.v1.RuleConfigInfo.encode(message.rulesConfigInfo[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.dataSource); + return writer; + }; + + /** + * Encodes the specified BackupPlanAssociation message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {google.cloud.backupdr.v1.IBackupPlanAssociation} message BackupPlanAssociation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupPlanAssociation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupPlanAssociation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupPlanAssociation.decode = function 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.backupdr.v1.BackupPlanAssociation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.resourceType = reader.string(); + break; + } + case 3: { + message.resource = reader.string(); + break; + } + case 4: { + message.backupPlan = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 8: { + if (!(message.rulesConfigInfo && message.rulesConfigInfo.length)) + message.rulesConfigInfo = []; + message.rulesConfigInfo.push($root.google.cloud.backupdr.v1.RuleConfigInfo.decode(reader, reader.uint32())); + break; + } + case 9: { + message.dataSource = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupPlanAssociation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupPlanAssociation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupPlanAssociation message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupPlanAssociation.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.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + if (!$util.isString(message.backupPlan)) + return "backupPlan: 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.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.rulesConfigInfo != null && message.hasOwnProperty("rulesConfigInfo")) { + if (!Array.isArray(message.rulesConfigInfo)) + return "rulesConfigInfo: array expected"; + for (var i = 0; i < message.rulesConfigInfo.length; ++i) { + var error = $root.google.cloud.backupdr.v1.RuleConfigInfo.verify(message.rulesConfigInfo[i]); + if (error) + return "rulesConfigInfo." + error; + } + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + return null; + }; + + /** + * Creates a BackupPlanAssociation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation + */ + BackupPlanAssociation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupPlanAssociation) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupPlanAssociation(); + if (object.name != null) + message.name = String(object.name); + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.resource != null) + message.resource = String(object.resource); + if (object.backupPlan != null) + message.backupPlan = String(object.backupPlan); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.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.backupdr.v1.BackupPlanAssociation.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + 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 "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "INACTIVE": + case 4: + message.state = 4; + break; + } + if (object.rulesConfigInfo) { + if (!Array.isArray(object.rulesConfigInfo)) + throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.rulesConfigInfo: array expected"); + message.rulesConfigInfo = []; + for (var i = 0; i < object.rulesConfigInfo.length; ++i) { + if (typeof object.rulesConfigInfo[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.rulesConfigInfo: object expected"); + message.rulesConfigInfo[i] = $root.google.cloud.backupdr.v1.RuleConfigInfo.fromObject(object.rulesConfigInfo[i]); + } + } + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + return message; + }; + + /** + * Creates a plain object from a BackupPlanAssociation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {google.cloud.backupdr.v1.BackupPlanAssociation} message BackupPlanAssociation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupPlanAssociation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rulesConfigInfo = []; + if (options.defaults) { + object.name = ""; + object.resourceType = ""; + object.resource = ""; + object.backupPlan = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.dataSource = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + object.backupPlan = message.backupPlan; + 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.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupPlanAssociation.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupPlanAssociation.State[message.state] : message.state; + if (message.rulesConfigInfo && message.rulesConfigInfo.length) { + object.rulesConfigInfo = []; + for (var j = 0; j < message.rulesConfigInfo.length; ++j) + object.rulesConfigInfo[j] = $root.google.cloud.backupdr.v1.RuleConfigInfo.toObject(message.rulesConfigInfo[j], options); + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + return object; + }; + + /** + * Converts this BackupPlanAssociation to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + * @returns {Object.} JSON object + */ + BackupPlanAssociation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupPlanAssociation + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupPlanAssociation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupPlanAssociation"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.BackupPlanAssociation.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} INACTIVE=4 INACTIVE value + */ + BackupPlanAssociation.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "INACTIVE"] = 4; + return values; + })(); + + return BackupPlanAssociation; + })(); + + v1.RuleConfigInfo = (function() { + + /** + * Properties of a RuleConfigInfo. + * @memberof google.cloud.backupdr.v1 + * @interface IRuleConfigInfo + * @property {string|null} [ruleId] RuleConfigInfo ruleId + * @property {google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|null} [lastBackupState] RuleConfigInfo lastBackupState + * @property {google.rpc.IStatus|null} [lastBackupError] RuleConfigInfo lastBackupError + * @property {google.protobuf.ITimestamp|null} [lastSuccessfulBackupConsistencyTime] RuleConfigInfo lastSuccessfulBackupConsistencyTime + */ + + /** + * Constructs a new RuleConfigInfo. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a RuleConfigInfo. + * @implements IRuleConfigInfo + * @constructor + * @param {google.cloud.backupdr.v1.IRuleConfigInfo=} [properties] Properties to set + */ + function RuleConfigInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RuleConfigInfo ruleId. + * @member {string} ruleId + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + */ + RuleConfigInfo.prototype.ruleId = ""; + + /** + * RuleConfigInfo lastBackupState. + * @member {google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState} lastBackupState + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + */ + RuleConfigInfo.prototype.lastBackupState = 0; + + /** + * RuleConfigInfo lastBackupError. + * @member {google.rpc.IStatus|null|undefined} lastBackupError + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + */ + RuleConfigInfo.prototype.lastBackupError = null; + + /** + * RuleConfigInfo lastSuccessfulBackupConsistencyTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastSuccessfulBackupConsistencyTime + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + */ + RuleConfigInfo.prototype.lastSuccessfulBackupConsistencyTime = null; + + /** + * Creates a new RuleConfigInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IRuleConfigInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo instance + */ + RuleConfigInfo.create = function create(properties) { + return new RuleConfigInfo(properties); + }; + + /** + * Encodes the specified RuleConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IRuleConfigInfo} message RuleConfigInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RuleConfigInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ruleId); + if (message.lastBackupState != null && Object.hasOwnProperty.call(message, "lastBackupState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.lastBackupState); + if (message.lastBackupError != null && Object.hasOwnProperty.call(message, "lastBackupError")) + $root.google.rpc.Status.encode(message.lastBackupError, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.lastSuccessfulBackupConsistencyTime != null && Object.hasOwnProperty.call(message, "lastSuccessfulBackupConsistencyTime")) + $root.google.protobuf.Timestamp.encode(message.lastSuccessfulBackupConsistencyTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RuleConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IRuleConfigInfo} message RuleConfigInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RuleConfigInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RuleConfigInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RuleConfigInfo.decode = function 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.backupdr.v1.RuleConfigInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ruleId = reader.string(); + break; + } + case 3: { + message.lastBackupState = reader.int32(); + break; + } + case 4: { + message.lastBackupError = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RuleConfigInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RuleConfigInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RuleConfigInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RuleConfigInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + if (!$util.isString(message.ruleId)) + return "ruleId: string expected"; + if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) + switch (message.lastBackupState) { + default: + return "lastBackupState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) { + var error = $root.google.rpc.Status.verify(message.lastBackupError); + if (error) + return "lastBackupError." + error; + } + if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime); + if (error) + return "lastSuccessfulBackupConsistencyTime." + error; + } + return null; + }; + + /** + * Creates a RuleConfigInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo + */ + RuleConfigInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RuleConfigInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.RuleConfigInfo(); + if (object.ruleId != null) + message.ruleId = String(object.ruleId); + switch (object.lastBackupState) { + default: + if (typeof object.lastBackupState === "number") { + message.lastBackupState = object.lastBackupState; + break; + } + break; + case "LAST_BACKUP_STATE_UNSPECIFIED": + case 0: + message.lastBackupState = 0; + break; + case "FIRST_BACKUP_PENDING": + case 1: + message.lastBackupState = 1; + break; + case "PERMISSION_DENIED": + case 2: + message.lastBackupState = 2; + break; + case "SUCCEEDED": + case 3: + message.lastBackupState = 3; + break; + case "FAILED": + case 4: + message.lastBackupState = 4; + break; + } + if (object.lastBackupError != null) { + if (typeof object.lastBackupError !== "object") + throw TypeError(".google.cloud.backupdr.v1.RuleConfigInfo.lastBackupError: object expected"); + message.lastBackupError = $root.google.rpc.Status.fromObject(object.lastBackupError); + } + if (object.lastSuccessfulBackupConsistencyTime != null) { + if (typeof object.lastSuccessfulBackupConsistencyTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.RuleConfigInfo.lastSuccessfulBackupConsistencyTime: object expected"); + message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime); + } + return message; + }; + + /** + * Creates a plain object from a RuleConfigInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {google.cloud.backupdr.v1.RuleConfigInfo} message RuleConfigInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RuleConfigInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.ruleId = ""; + object.lastBackupState = options.enums === String ? "LAST_BACKUP_STATE_UNSPECIFIED" : 0; + object.lastBackupError = null; + object.lastSuccessfulBackupConsistencyTime = null; + } + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + object.ruleId = message.ruleId; + if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) + object.lastBackupState = options.enums === String ? $root.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState[message.lastBackupState] === undefined ? message.lastBackupState : $root.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState[message.lastBackupState] : message.lastBackupState; + if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) + object.lastBackupError = $root.google.rpc.Status.toObject(message.lastBackupError, options); + if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) + object.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime, options); + return object; + }; + + /** + * Converts this RuleConfigInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + * @returns {Object.} JSON object + */ + RuleConfigInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RuleConfigInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RuleConfigInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.RuleConfigInfo"; + }; + + /** + * LastBackupState enum. + * @name google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState + * @enum {number} + * @property {number} LAST_BACKUP_STATE_UNSPECIFIED=0 LAST_BACKUP_STATE_UNSPECIFIED value + * @property {number} FIRST_BACKUP_PENDING=1 FIRST_BACKUP_PENDING value + * @property {number} PERMISSION_DENIED=2 PERMISSION_DENIED value + * @property {number} SUCCEEDED=3 SUCCEEDED value + * @property {number} FAILED=4 FAILED value + */ + RuleConfigInfo.LastBackupState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAST_BACKUP_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIRST_BACKUP_PENDING"] = 1; + values[valuesById[2] = "PERMISSION_DENIED"] = 2; + values[valuesById[3] = "SUCCEEDED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + return values; + })(); + + return RuleConfigInfo; + })(); + + v1.CreateBackupPlanAssociationRequest = (function() { + + /** + * Properties of a CreateBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ICreateBackupPlanAssociationRequest + * @property {string|null} [parent] CreateBackupPlanAssociationRequest parent + * @property {string|null} [backupPlanAssociationId] CreateBackupPlanAssociationRequest backupPlanAssociationId + * @property {google.cloud.backupdr.v1.IBackupPlanAssociation|null} [backupPlanAssociation] CreateBackupPlanAssociationRequest backupPlanAssociation + * @property {string|null} [requestId] CreateBackupPlanAssociationRequest requestId + */ + + /** + * Constructs a new CreateBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CreateBackupPlanAssociationRequest. + * @implements ICreateBackupPlanAssociationRequest + * @constructor + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest=} [properties] Properties to set + */ + function CreateBackupPlanAssociationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBackupPlanAssociationRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + */ + CreateBackupPlanAssociationRequest.prototype.parent = ""; + + /** + * CreateBackupPlanAssociationRequest backupPlanAssociationId. + * @member {string} backupPlanAssociationId + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + */ + CreateBackupPlanAssociationRequest.prototype.backupPlanAssociationId = ""; + + /** + * CreateBackupPlanAssociationRequest backupPlanAssociation. + * @member {google.cloud.backupdr.v1.IBackupPlanAssociation|null|undefined} backupPlanAssociation + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + */ + CreateBackupPlanAssociationRequest.prototype.backupPlanAssociation = null; + + /** + * CreateBackupPlanAssociationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + */ + CreateBackupPlanAssociationRequest.prototype.requestId = ""; + + /** + * Creates a new CreateBackupPlanAssociationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest instance + */ + CreateBackupPlanAssociationRequest.create = function create(properties) { + return new CreateBackupPlanAssociationRequest(properties); + }; + + /** + * Encodes the specified CreateBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupPlanAssociationRequest.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.backupPlanAssociationId != null && Object.hasOwnProperty.call(message, "backupPlanAssociationId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanAssociationId); + if (message.backupPlanAssociation != null && Object.hasOwnProperty.call(message, "backupPlanAssociation")) + $root.google.cloud.backupdr.v1.BackupPlanAssociation.encode(message.backupPlanAssociation, 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 CreateBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupPlanAssociationRequest.decode = function 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.backupdr.v1.CreateBackupPlanAssociationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.backupPlanAssociationId = reader.string(); + break; + } + case 3: { + message.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBackupPlanAssociationRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBackupPlanAssociationRequest.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.backupPlanAssociationId != null && message.hasOwnProperty("backupPlanAssociationId")) + if (!$util.isString(message.backupPlanAssociationId)) + return "backupPlanAssociationId: string expected"; + if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) { + var error = $root.google.cloud.backupdr.v1.BackupPlanAssociation.verify(message.backupPlanAssociation); + if (error) + return "backupPlanAssociation." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest + */ + CreateBackupPlanAssociationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupPlanAssociationId != null) + message.backupPlanAssociationId = String(object.backupPlanAssociationId); + if (object.backupPlanAssociation != null) { + if (typeof object.backupPlanAssociation !== "object") + throw TypeError(".google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.backupPlanAssociation: object expected"); + message.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.fromObject(object.backupPlanAssociation); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBackupPlanAssociationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupPlanAssociationId = ""; + object.backupPlanAssociation = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupPlanAssociationId != null && message.hasOwnProperty("backupPlanAssociationId")) + object.backupPlanAssociationId = message.backupPlanAssociationId; + if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) + object.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.toObject(message.backupPlanAssociation, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateBackupPlanAssociationRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateBackupPlanAssociationRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest"; + }; + + return CreateBackupPlanAssociationRequest; + })(); + + v1.ListBackupPlanAssociationsRequest = (function() { + + /** + * Properties of a ListBackupPlanAssociationsRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupPlanAssociationsRequest + * @property {string|null} [parent] ListBackupPlanAssociationsRequest parent + * @property {number|null} [pageSize] ListBackupPlanAssociationsRequest pageSize + * @property {string|null} [pageToken] ListBackupPlanAssociationsRequest pageToken + * @property {string|null} [filter] ListBackupPlanAssociationsRequest filter + */ + + /** + * Constructs a new ListBackupPlanAssociationsRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupPlanAssociationsRequest. + * @implements IListBackupPlanAssociationsRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest=} [properties] Properties to set + */ + function ListBackupPlanAssociationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupPlanAssociationsRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + */ + ListBackupPlanAssociationsRequest.prototype.parent = ""; + + /** + * ListBackupPlanAssociationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + */ + ListBackupPlanAssociationsRequest.prototype.pageSize = 0; + + /** + * ListBackupPlanAssociationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + */ + ListBackupPlanAssociationsRequest.prototype.pageToken = ""; + + /** + * ListBackupPlanAssociationsRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + */ + ListBackupPlanAssociationsRequest.prototype.filter = ""; + + /** + * Creates a new ListBackupPlanAssociationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest instance + */ + ListBackupPlanAssociationsRequest.create = function create(properties) { + return new ListBackupPlanAssociationsRequest(properties); + }; + + /** + * Encodes the specified ListBackupPlanAssociationsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlanAssociationsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListBackupPlanAssociationsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlanAssociationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlanAssociationsRequest.decode = function 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.backupdr.v1.ListBackupPlanAssociationsRequest(); + 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlanAssociationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupPlanAssociationsRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupPlanAssociationsRequest.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"; + return null; + }; + + /** + * Creates a ListBackupPlanAssociationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest + */ + ListBackupPlanAssociationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest(); + 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); + return message; + }; + + /** + * Creates a plain object from a ListBackupPlanAssociationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupPlanAssociationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + 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; + return object; + }; + + /** + * Converts this ListBackupPlanAssociationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupPlanAssociationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupPlanAssociationsRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupPlanAssociationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest"; + }; + + return ListBackupPlanAssociationsRequest; + })(); + + v1.ListBackupPlanAssociationsResponse = (function() { + + /** + * Properties of a ListBackupPlanAssociationsResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupPlanAssociationsResponse + * @property {Array.|null} [backupPlanAssociations] ListBackupPlanAssociationsResponse backupPlanAssociations + * @property {string|null} [nextPageToken] ListBackupPlanAssociationsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupPlanAssociationsResponse unreachable + */ + + /** + * Constructs a new ListBackupPlanAssociationsResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupPlanAssociationsResponse. + * @implements IListBackupPlanAssociationsResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse=} [properties] Properties to set + */ + function ListBackupPlanAssociationsResponse(properties) { + this.backupPlanAssociations = []; + 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]]; + } + + /** + * ListBackupPlanAssociationsResponse backupPlanAssociations. + * @member {Array.} backupPlanAssociations + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @instance + */ + ListBackupPlanAssociationsResponse.prototype.backupPlanAssociations = $util.emptyArray; + + /** + * ListBackupPlanAssociationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @instance + */ + ListBackupPlanAssociationsResponse.prototype.nextPageToken = ""; + + /** + * ListBackupPlanAssociationsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @instance + */ + ListBackupPlanAssociationsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupPlanAssociationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse instance + */ + ListBackupPlanAssociationsResponse.create = function create(properties) { + return new ListBackupPlanAssociationsResponse(properties); + }; + + /** + * Encodes the specified ListBackupPlanAssociationsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlanAssociationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPlanAssociations != null && message.backupPlanAssociations.length) + for (var i = 0; i < message.backupPlanAssociations.length; ++i) + $root.google.cloud.backupdr.v1.BackupPlanAssociation.encode(message.backupPlanAssociations[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 ListBackupPlanAssociationsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlanAssociationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlanAssociationsResponse.decode = function 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.backupdr.v1.ListBackupPlanAssociationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backupPlanAssociations && message.backupPlanAssociations.length)) + message.backupPlanAssociations = []; + message.backupPlanAssociations.push($root.google.cloud.backupdr.v1.BackupPlanAssociation.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 ListBackupPlanAssociationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlanAssociationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupPlanAssociationsResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupPlanAssociationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupPlanAssociations != null && message.hasOwnProperty("backupPlanAssociations")) { + if (!Array.isArray(message.backupPlanAssociations)) + return "backupPlanAssociations: array expected"; + for (var i = 0; i < message.backupPlanAssociations.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupPlanAssociation.verify(message.backupPlanAssociations[i]); + if (error) + return "backupPlanAssociations." + 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 ListBackupPlanAssociationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse + */ + ListBackupPlanAssociationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse(); + if (object.backupPlanAssociations) { + if (!Array.isArray(object.backupPlanAssociations)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.backupPlanAssociations: array expected"); + message.backupPlanAssociations = []; + for (var i = 0; i < object.backupPlanAssociations.length; ++i) { + if (typeof object.backupPlanAssociations[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.backupPlanAssociations: object expected"); + message.backupPlanAssociations[i] = $root.google.cloud.backupdr.v1.BackupPlanAssociation.fromObject(object.backupPlanAssociations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.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 ListBackupPlanAssociationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupPlanAssociationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupPlanAssociations = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backupPlanAssociations && message.backupPlanAssociations.length) { + object.backupPlanAssociations = []; + for (var j = 0; j < message.backupPlanAssociations.length; ++j) + object.backupPlanAssociations[j] = $root.google.cloud.backupdr.v1.BackupPlanAssociation.toObject(message.backupPlanAssociations[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 ListBackupPlanAssociationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupPlanAssociationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupPlanAssociationsResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupPlanAssociationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse"; + }; + + return ListBackupPlanAssociationsResponse; + })(); + + v1.GetBackupPlanAssociationRequest = (function() { + + /** + * Properties of a GetBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetBackupPlanAssociationRequest + * @property {string|null} [name] GetBackupPlanAssociationRequest name + */ + + /** + * Constructs a new GetBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetBackupPlanAssociationRequest. + * @implements IGetBackupPlanAssociationRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest=} [properties] Properties to set + */ + function GetBackupPlanAssociationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupPlanAssociationRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @instance + */ + GetBackupPlanAssociationRequest.prototype.name = ""; + + /** + * Creates a new GetBackupPlanAssociationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest instance + */ + GetBackupPlanAssociationRequest.create = function create(properties) { + return new GetBackupPlanAssociationRequest(properties); + }; + + /** + * Encodes the specified GetBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupPlanAssociationRequest.decode = function 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.backupdr.v1.GetBackupPlanAssociationRequest(); + 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 GetBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupPlanAssociationRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest + */ + GetBackupPlanAssociationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupPlanAssociationRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupPlanAssociationRequest"; + }; + + return GetBackupPlanAssociationRequest; + })(); + + v1.DeleteBackupPlanAssociationRequest = (function() { + + /** + * Properties of a DeleteBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IDeleteBackupPlanAssociationRequest + * @property {string|null} [name] DeleteBackupPlanAssociationRequest name + * @property {string|null} [requestId] DeleteBackupPlanAssociationRequest requestId + */ + + /** + * Constructs a new DeleteBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DeleteBackupPlanAssociationRequest. + * @implements IDeleteBackupPlanAssociationRequest + * @constructor + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest=} [properties] Properties to set + */ + function DeleteBackupPlanAssociationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupPlanAssociationRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @instance + */ + DeleteBackupPlanAssociationRequest.prototype.name = ""; + + /** + * DeleteBackupPlanAssociationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @instance + */ + DeleteBackupPlanAssociationRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteBackupPlanAssociationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest instance + */ + DeleteBackupPlanAssociationRequest.create = function create(properties) { + return new DeleteBackupPlanAssociationRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupPlanAssociationRequest.decode = function 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.backupdr.v1.DeleteBackupPlanAssociationRequest(); + 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 DeleteBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupPlanAssociationRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest + */ + DeleteBackupPlanAssociationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest(); + 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 DeleteBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupPlanAssociationRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest"; + }; + + return DeleteBackupPlanAssociationRequest; + })(); + + v1.TriggerBackupRequest = (function() { + + /** + * Properties of a TriggerBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ITriggerBackupRequest + * @property {string|null} [name] TriggerBackupRequest name + * @property {string|null} [ruleId] TriggerBackupRequest ruleId + * @property {string|null} [requestId] TriggerBackupRequest requestId + */ + + /** + * Constructs a new TriggerBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a TriggerBackupRequest. + * @implements ITriggerBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest=} [properties] Properties to set + */ + function TriggerBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TriggerBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @instance + */ + TriggerBackupRequest.prototype.name = ""; + + /** + * TriggerBackupRequest ruleId. + * @member {string} ruleId + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @instance + */ + TriggerBackupRequest.prototype.ruleId = ""; + + /** + * TriggerBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @instance + */ + TriggerBackupRequest.prototype.requestId = ""; + + /** + * Creates a new TriggerBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest instance + */ + TriggerBackupRequest.create = function create(properties) { + return new TriggerBackupRequest(properties); + }; + + /** + * Encodes the specified TriggerBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} message TriggerBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerBackupRequest.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.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ruleId); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified TriggerBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} message TriggerBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TriggerBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerBackupRequest.decode = function 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.backupdr.v1.TriggerBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.ruleId = reader.string(); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TriggerBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TriggerBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TriggerBackupRequest.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.ruleId != null && message.hasOwnProperty("ruleId")) + if (!$util.isString(message.ruleId)) + return "ruleId: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a TriggerBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest + */ + TriggerBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.TriggerBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.TriggerBackupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.ruleId != null) + message.ruleId = String(object.ruleId); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a TriggerBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {google.cloud.backupdr.v1.TriggerBackupRequest} message TriggerBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TriggerBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.ruleId = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + object.ruleId = message.ruleId; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this TriggerBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @instance + * @returns {Object.} JSON object + */ + TriggerBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TriggerBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TriggerBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.TriggerBackupRequest"; + }; + + return TriggerBackupRequest; + })(); + + v1.BackupVault = (function() { + + /** + * Properties of a BackupVault. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupVault + * @property {string|null} [name] BackupVault name + * @property {string|null} [description] BackupVault description + * @property {Object.|null} [labels] BackupVault labels + * @property {google.protobuf.ITimestamp|null} [createTime] BackupVault createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] BackupVault updateTime + * @property {google.protobuf.IDuration|null} [backupMinimumEnforcedRetentionDuration] BackupVault backupMinimumEnforcedRetentionDuration + * @property {boolean|null} [deletable] BackupVault deletable + * @property {string|null} [etag] BackupVault etag + * @property {google.cloud.backupdr.v1.BackupVault.State|null} [state] BackupVault state + * @property {google.protobuf.ITimestamp|null} [effectiveTime] BackupVault effectiveTime + * @property {number|Long|null} [backupCount] BackupVault backupCount + * @property {string|null} [serviceAccount] BackupVault serviceAccount + * @property {number|Long|null} [totalStoredBytes] BackupVault totalStoredBytes + * @property {string|null} [uid] BackupVault uid + * @property {Object.|null} [annotations] BackupVault annotations + * @property {google.cloud.backupdr.v1.BackupVault.AccessRestriction|null} [accessRestriction] BackupVault accessRestriction + */ + + /** + * Constructs a new BackupVault. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupVault. + * @implements IBackupVault + * @constructor + * @param {google.cloud.backupdr.v1.IBackupVault=} [properties] Properties to set + */ + function BackupVault(properties) { + this.labels = {}; + this.annotations = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupVault name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.name = ""; + + /** + * BackupVault description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.description = null; + + /** + * BackupVault labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.labels = $util.emptyObject; + + /** + * BackupVault createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.createTime = null; + + /** + * BackupVault updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.updateTime = null; + + /** + * BackupVault backupMinimumEnforcedRetentionDuration. + * @member {google.protobuf.IDuration|null|undefined} backupMinimumEnforcedRetentionDuration + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.backupMinimumEnforcedRetentionDuration = null; + + /** + * BackupVault deletable. + * @member {boolean|null|undefined} deletable + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.deletable = null; + + /** + * BackupVault etag. + * @member {string|null|undefined} etag + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.etag = null; + + /** + * BackupVault state. + * @member {google.cloud.backupdr.v1.BackupVault.State} state + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.state = 0; + + /** + * BackupVault effectiveTime. + * @member {google.protobuf.ITimestamp|null|undefined} effectiveTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.effectiveTime = null; + + /** + * BackupVault backupCount. + * @member {number|Long} backupCount + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.backupCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupVault serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.serviceAccount = ""; + + /** + * BackupVault totalStoredBytes. + * @member {number|Long} totalStoredBytes + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.totalStoredBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupVault uid. + * @member {string} uid + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.uid = ""; + + /** + * BackupVault annotations. + * @member {Object.} annotations + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.annotations = $util.emptyObject; + + /** + * BackupVault accessRestriction. + * @member {google.cloud.backupdr.v1.BackupVault.AccessRestriction} accessRestriction + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.accessRestriction = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupVault _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _createTime. + * @member {"createTime"|undefined} _createTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_createTime", { + get: $util.oneOfGetter($oneOfFields = ["createTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _updateTime. + * @member {"updateTime"|undefined} _updateTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _backupMinimumEnforcedRetentionDuration. + * @member {"backupMinimumEnforcedRetentionDuration"|undefined} _backupMinimumEnforcedRetentionDuration + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_backupMinimumEnforcedRetentionDuration", { + get: $util.oneOfGetter($oneOfFields = ["backupMinimumEnforcedRetentionDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _deletable. + * @member {"deletable"|undefined} _deletable + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_deletable", { + get: $util.oneOfGetter($oneOfFields = ["deletable"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _etag. + * @member {"etag"|undefined} _etag + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_etag", { + get: $util.oneOfGetter($oneOfFields = ["etag"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _effectiveTime. + * @member {"effectiveTime"|undefined} _effectiveTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_effectiveTime", { + get: $util.oneOfGetter($oneOfFields = ["effectiveTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupVault instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {google.cloud.backupdr.v1.IBackupVault=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault instance + */ + BackupVault.create = function create(properties) { + return new BackupVault(properties); + }; + + /** + * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {google.cloud.backupdr.v1.IBackupVault} message BackupVault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupVault.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + 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 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.deletable != null && Object.hasOwnProperty.call(message, "deletable")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.deletable); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.etag); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); + if (message.effectiveTime != null && Object.hasOwnProperty.call(message, "effectiveTime")) + $root.google.protobuf.Timestamp.encode(message.effectiveTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.backupCount != null && Object.hasOwnProperty.call(message, "backupCount")) + writer.uint32(/* id 17, wireType 0 =*/136).int64(message.backupCount); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.serviceAccount); + if (message.totalStoredBytes != null && Object.hasOwnProperty.call(message, "totalStoredBytes")) + writer.uint32(/* id 19, wireType 0 =*/152).int64(message.totalStoredBytes); + if (message.backupMinimumEnforcedRetentionDuration != null && Object.hasOwnProperty.call(message, "backupMinimumEnforcedRetentionDuration")) + $root.google.protobuf.Duration.encode(message.backupMinimumEnforcedRetentionDuration, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.uid); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.accessRestriction != null && Object.hasOwnProperty.call(message, "accessRestriction")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.accessRestriction); + return writer; + }; + + /** + * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {google.cloud.backupdr.v1.IBackupVault} message BackupVault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupVault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupVault message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupVault.decode = function 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.backupdr.v1.BackupVault(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + 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 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 20: { + message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 8: { + message.deletable = reader.bool(); + break; + } + case 9: { + message.etag = reader.string(); + break; + } + case 10: { + message.state = reader.int32(); + break; + } + case 12: { + message.effectiveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 17: { + message.backupCount = reader.int64(); + break; + } + case 18: { + message.serviceAccount = reader.string(); + break; + } + case 19: { + message.totalStoredBytes = reader.int64(); + break; + } + case 21: { + message.uid = reader.string(); + break; + } + case 22: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + 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.annotations[key] = value; + break; + } + case 24: { + message.accessRestriction = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupVault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupVault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupVault message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupVault.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.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + properties._createTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + } + if (message.backupMinimumEnforcedRetentionDuration != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDuration")) { + properties._backupMinimumEnforcedRetentionDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.backupMinimumEnforcedRetentionDuration); + if (error) + return "backupMinimumEnforcedRetentionDuration." + error; + } + } + if (message.deletable != null && message.hasOwnProperty("deletable")) { + properties._deletable = 1; + if (typeof message.deletable !== "boolean") + return "deletable: boolean expected"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + properties._etag = 1; + if (!$util.isString(message.etag)) + return "etag: 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.effectiveTime != null && message.hasOwnProperty("effectiveTime")) { + properties._effectiveTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.effectiveTime); + if (error) + return "effectiveTime." + error; + } + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) + if (!$util.isInteger(message.backupCount) && !(message.backupCount && $util.isInteger(message.backupCount.low) && $util.isInteger(message.backupCount.high))) + return "backupCount: integer|Long expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) + if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) + return "totalStoredBytes: integer|Long expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) + switch (message.accessRestriction) { + default: + return "accessRestriction: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault + */ + BackupVault.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupVault) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupVault(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.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.backupdr.v1.BackupVault.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.backupMinimumEnforcedRetentionDuration != null) { + if (typeof object.backupMinimumEnforcedRetentionDuration !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.backupMinimumEnforcedRetentionDuration: object expected"); + message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.fromObject(object.backupMinimumEnforcedRetentionDuration); + } + if (object.deletable != null) + message.deletable = Boolean(object.deletable); + if (object.etag != null) + message.etag = String(object.etag); + 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 "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.effectiveTime != null) { + if (typeof object.effectiveTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.effectiveTime: object expected"); + message.effectiveTime = $root.google.protobuf.Timestamp.fromObject(object.effectiveTime); + } + if (object.backupCount != null) + if ($util.Long) + (message.backupCount = $util.Long.fromValue(object.backupCount)).unsigned = false; + else if (typeof object.backupCount === "string") + message.backupCount = parseInt(object.backupCount, 10); + else if (typeof object.backupCount === "number") + message.backupCount = object.backupCount; + else if (typeof object.backupCount === "object") + message.backupCount = new $util.LongBits(object.backupCount.low >>> 0, object.backupCount.high >>> 0).toNumber(); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.totalStoredBytes != null) + if ($util.Long) + (message.totalStoredBytes = $util.Long.fromValue(object.totalStoredBytes)).unsigned = false; + else if (typeof object.totalStoredBytes === "string") + message.totalStoredBytes = parseInt(object.totalStoredBytes, 10); + else if (typeof object.totalStoredBytes === "number") + message.totalStoredBytes = object.totalStoredBytes; + else if (typeof object.totalStoredBytes === "object") + message.totalStoredBytes = new $util.LongBits(object.totalStoredBytes.low >>> 0, object.totalStoredBytes.high >>> 0).toNumber(); + if (object.uid != null) + message.uid = String(object.uid); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + switch (object.accessRestriction) { + default: + if (typeof object.accessRestriction === "number") { + message.accessRestriction = object.accessRestriction; + break; + } + break; + case "ACCESS_RESTRICTION_UNSPECIFIED": + case 0: + message.accessRestriction = 0; + break; + case "WITHIN_PROJECT": + case 1: + message.accessRestriction = 1; + break; + case "WITHIN_ORGANIZATION": + case 2: + message.accessRestriction = 2; + break; + case "UNRESTRICTED": + case 3: + message.accessRestriction = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a BackupVault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {google.cloud.backupdr.v1.BackupVault} message BackupVault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupVault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.labels = {}; + object.annotations = {}; + } + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.backupCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.backupCount = options.longs === String ? "0" : 0; + object.serviceAccount = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalStoredBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalStoredBytes = options.longs === String ? "0" : 0; + object.uid = ""; + object.accessRestriction = options.enums === String ? "ACCESS_RESTRICTION_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + 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.createTime != null && message.hasOwnProperty("createTime")) { + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (options.oneofs) + object._createTime = "createTime"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + if (message.deletable != null && message.hasOwnProperty("deletable")) { + object.deletable = message.deletable; + if (options.oneofs) + object._deletable = "deletable"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + object.etag = message.etag; + if (options.oneofs) + object._etag = "etag"; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupVault.State[message.state] : message.state; + if (message.effectiveTime != null && message.hasOwnProperty("effectiveTime")) { + object.effectiveTime = $root.google.protobuf.Timestamp.toObject(message.effectiveTime, options); + if (options.oneofs) + object._effectiveTime = "effectiveTime"; + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) + if (typeof message.backupCount === "number") + object.backupCount = options.longs === String ? String(message.backupCount) : message.backupCount; + else + object.backupCount = options.longs === String ? $util.Long.prototype.toString.call(message.backupCount) : options.longs === Number ? new $util.LongBits(message.backupCount.low >>> 0, message.backupCount.high >>> 0).toNumber() : message.backupCount; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) + if (typeof message.totalStoredBytes === "number") + object.totalStoredBytes = options.longs === String ? String(message.totalStoredBytes) : message.totalStoredBytes; + else + object.totalStoredBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStoredBytes) : options.longs === Number ? new $util.LongBits(message.totalStoredBytes.low >>> 0, message.totalStoredBytes.high >>> 0).toNumber() : message.totalStoredBytes; + if (message.backupMinimumEnforcedRetentionDuration != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDuration")) { + object.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.toObject(message.backupMinimumEnforcedRetentionDuration, options); + if (options.oneofs) + object._backupMinimumEnforcedRetentionDuration = "backupMinimumEnforcedRetentionDuration"; + } + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) + object.accessRestriction = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] === undefined ? message.accessRestriction : $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] : message.accessRestriction; + return object; + }; + + /** + * Converts this BackupVault to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + * @returns {Object.} JSON object + */ + BackupVault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupVault + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupVault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupVault"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.BackupVault.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} ERROR=4 ERROR value + */ + BackupVault.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + /** + * AccessRestriction enum. + * @name google.cloud.backupdr.v1.BackupVault.AccessRestriction + * @enum {number} + * @property {number} ACCESS_RESTRICTION_UNSPECIFIED=0 ACCESS_RESTRICTION_UNSPECIFIED value + * @property {number} WITHIN_PROJECT=1 WITHIN_PROJECT value + * @property {number} WITHIN_ORGANIZATION=2 WITHIN_ORGANIZATION value + * @property {number} UNRESTRICTED=3 UNRESTRICTED value + */ + BackupVault.AccessRestriction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_RESTRICTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "WITHIN_PROJECT"] = 1; + values[valuesById[2] = "WITHIN_ORGANIZATION"] = 2; + values[valuesById[3] = "UNRESTRICTED"] = 3; + return values; + })(); + + return BackupVault; + })(); + + v1.DataSource = (function() { + + /** + * Properties of a DataSource. + * @memberof google.cloud.backupdr.v1 + * @interface IDataSource + * @property {string|null} [name] DataSource name + * @property {google.cloud.backupdr.v1.DataSource.State|null} [state] DataSource state + * @property {Object.|null} [labels] DataSource labels + * @property {google.protobuf.ITimestamp|null} [createTime] DataSource createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DataSource updateTime + * @property {number|Long|null} [backupCount] DataSource backupCount + * @property {string|null} [etag] DataSource etag + * @property {number|Long|null} [totalStoredBytes] DataSource totalStoredBytes + * @property {google.cloud.backupdr.v1.BackupConfigState|null} [configState] DataSource configState + * @property {google.cloud.backupdr.v1.IBackupConfigInfo|null} [backupConfigInfo] DataSource backupConfigInfo + * @property {google.cloud.backupdr.v1.IDataSourceGcpResource|null} [dataSourceGcpResource] DataSource dataSourceGcpResource + * @property {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null} [dataSourceBackupApplianceApplication] DataSource dataSourceBackupApplianceApplication + */ + + /** + * Constructs a new DataSource. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DataSource. + * @implements IDataSource + * @constructor + * @param {google.cloud.backupdr.v1.IDataSource=} [properties] Properties to set + */ + function DataSource(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]]; + } + + /** + * DataSource name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.name = ""; + + /** + * DataSource state. + * @member {google.cloud.backupdr.v1.DataSource.State} state + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.state = 0; + + /** + * DataSource labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.labels = $util.emptyObject; + + /** + * DataSource createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.createTime = null; + + /** + * DataSource updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.updateTime = null; + + /** + * DataSource backupCount. + * @member {number|Long|null|undefined} backupCount + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.backupCount = null; + + /** + * DataSource etag. + * @member {string|null|undefined} etag + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.etag = null; + + /** + * DataSource totalStoredBytes. + * @member {number|Long|null|undefined} totalStoredBytes + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.totalStoredBytes = null; + + /** + * DataSource configState. + * @member {google.cloud.backupdr.v1.BackupConfigState} configState + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.configState = 0; + + /** + * DataSource backupConfigInfo. + * @member {google.cloud.backupdr.v1.IBackupConfigInfo|null|undefined} backupConfigInfo + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.backupConfigInfo = null; + + /** + * DataSource dataSourceGcpResource. + * @member {google.cloud.backupdr.v1.IDataSourceGcpResource|null|undefined} dataSourceGcpResource + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.dataSourceGcpResource = null; + + /** + * DataSource dataSourceBackupApplianceApplication. + * @member {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null|undefined} dataSourceBackupApplianceApplication + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.dataSourceBackupApplianceApplication = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataSource _createTime. + * @member {"createTime"|undefined} _createTime + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_createTime", { + get: $util.oneOfGetter($oneOfFields = ["createTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource _updateTime. + * @member {"updateTime"|undefined} _updateTime + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource _backupCount. + * @member {"backupCount"|undefined} _backupCount + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_backupCount", { + get: $util.oneOfGetter($oneOfFields = ["backupCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource _etag. + * @member {"etag"|undefined} _etag + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_etag", { + get: $util.oneOfGetter($oneOfFields = ["etag"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource _totalStoredBytes. + * @member {"totalStoredBytes"|undefined} _totalStoredBytes + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_totalStoredBytes", { + get: $util.oneOfGetter($oneOfFields = ["totalStoredBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource sourceResource. + * @member {"dataSourceGcpResource"|"dataSourceBackupApplianceApplication"|undefined} sourceResource + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "sourceResource", { + get: $util.oneOfGetter($oneOfFields = ["dataSourceGcpResource", "dataSourceBackupApplianceApplication"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataSource instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {google.cloud.backupdr.v1.IDataSource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DataSource} DataSource instance + */ + DataSource.create = function create(properties) { + return new DataSource(properties); + }; + + /** + * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {google.cloud.backupdr.v1.IDataSource} message DataSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.labels != null && 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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.backupCount != null && Object.hasOwnProperty.call(message, "backupCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.backupCount); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.etag); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.state); + if (message.totalStoredBytes != null && Object.hasOwnProperty.call(message, "totalStoredBytes")) + writer.uint32(/* id 23, wireType 0 =*/184).int64(message.totalStoredBytes); + if (message.configState != null && Object.hasOwnProperty.call(message, "configState")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.configState); + if (message.backupConfigInfo != null && Object.hasOwnProperty.call(message, "backupConfigInfo")) + $root.google.cloud.backupdr.v1.BackupConfigInfo.encode(message.backupConfigInfo, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dataSourceGcpResource != null && Object.hasOwnProperty.call(message, "dataSourceGcpResource")) + $root.google.cloud.backupdr.v1.DataSourceGcpResource.encode(message.dataSourceGcpResource, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.dataSourceBackupApplianceApplication != null && Object.hasOwnProperty.call(message, "dataSourceBackupApplianceApplication")) + $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.encode(message.dataSourceBackupApplianceApplication, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {google.cloud.backupdr.v1.IDataSource} message DataSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DataSource} DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSource.decode = function 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.backupdr.v1.DataSource(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 21: { + message.state = reader.int32(); + 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.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.backupCount = reader.int64(); + break; + } + case 14: { + message.etag = reader.string(); + break; + } + case 23: { + message.totalStoredBytes = reader.int64(); + break; + } + case 24: { + message.configState = reader.int32(); + break; + } + case 25: { + message.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.decode(reader, reader.uint32()); + break; + } + case 27: { + message.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DataSource} DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSource message. + * @function verify + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSource.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.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.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.createTime != null && message.hasOwnProperty("createTime")) { + properties._createTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) { + properties._backupCount = 1; + if (!$util.isInteger(message.backupCount) && !(message.backupCount && $util.isInteger(message.backupCount.low) && $util.isInteger(message.backupCount.high))) + return "backupCount: integer|Long expected"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + properties._etag = 1; + if (!$util.isString(message.etag)) + return "etag: string expected"; + } + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { + properties._totalStoredBytes = 1; + if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) + return "totalStoredBytes: integer|Long expected"; + } + if (message.configState != null && message.hasOwnProperty("configState")) + switch (message.configState) { + default: + return "configState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.backupConfigInfo != null && message.hasOwnProperty("backupConfigInfo")) { + var error = $root.google.cloud.backupdr.v1.BackupConfigInfo.verify(message.backupConfigInfo); + if (error) + return "backupConfigInfo." + error; + } + if (message.dataSourceGcpResource != null && message.hasOwnProperty("dataSourceGcpResource")) { + properties.sourceResource = 1; + { + var error = $root.google.cloud.backupdr.v1.DataSourceGcpResource.verify(message.dataSourceGcpResource); + if (error) + return "dataSourceGcpResource." + error; + } + } + if (message.dataSourceBackupApplianceApplication != null && message.hasOwnProperty("dataSourceBackupApplianceApplication")) { + if (properties.sourceResource === 1) + return "sourceResource: multiple values"; + properties.sourceResource = 1; + { + var error = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify(message.dataSourceBackupApplianceApplication); + if (error) + return "dataSourceBackupApplianceApplication." + error; + } + } + return null; + }; + + /** + * Creates a DataSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DataSource} DataSource + */ + DataSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DataSource) + return object; + var message = new $root.google.cloud.backupdr.v1.DataSource(); + if (object.name != null) + message.name = String(object.name); + 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 "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.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.backupdr.v1.DataSource.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.backupCount != null) + if ($util.Long) + (message.backupCount = $util.Long.fromValue(object.backupCount)).unsigned = false; + else if (typeof object.backupCount === "string") + message.backupCount = parseInt(object.backupCount, 10); + else if (typeof object.backupCount === "number") + message.backupCount = object.backupCount; + else if (typeof object.backupCount === "object") + message.backupCount = new $util.LongBits(object.backupCount.low >>> 0, object.backupCount.high >>> 0).toNumber(); + if (object.etag != null) + message.etag = String(object.etag); + if (object.totalStoredBytes != null) + if ($util.Long) + (message.totalStoredBytes = $util.Long.fromValue(object.totalStoredBytes)).unsigned = false; + else if (typeof object.totalStoredBytes === "string") + message.totalStoredBytes = parseInt(object.totalStoredBytes, 10); + else if (typeof object.totalStoredBytes === "number") + message.totalStoredBytes = object.totalStoredBytes; + else if (typeof object.totalStoredBytes === "object") + message.totalStoredBytes = new $util.LongBits(object.totalStoredBytes.low >>> 0, object.totalStoredBytes.high >>> 0).toNumber(); + switch (object.configState) { + default: + if (typeof object.configState === "number") { + message.configState = object.configState; + break; + } + break; + case "BACKUP_CONFIG_STATE_UNSPECIFIED": + case 0: + message.configState = 0; + break; + case "ACTIVE": + case 1: + message.configState = 1; + break; + case "PASSIVE": + case 2: + message.configState = 2; + break; + } + if (object.backupConfigInfo != null) { + if (typeof object.backupConfigInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.backupConfigInfo: object expected"); + message.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.fromObject(object.backupConfigInfo); + } + if (object.dataSourceGcpResource != null) { + if (typeof object.dataSourceGcpResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.dataSourceGcpResource: object expected"); + message.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.fromObject(object.dataSourceGcpResource); + } + if (object.dataSourceBackupApplianceApplication != null) { + if (typeof object.dataSourceBackupApplianceApplication !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.dataSourceBackupApplianceApplication: object expected"); + message.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.fromObject(object.dataSourceBackupApplianceApplication); + } + return message; + }; + + /** + * Creates a plain object from a DataSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {google.cloud.backupdr.v1.DataSource} message DataSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.configState = options.enums === String ? "BACKUP_CONFIG_STATE_UNSPECIFIED" : 0; + object.backupConfigInfo = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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.createTime != null && message.hasOwnProperty("createTime")) { + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (options.oneofs) + object._createTime = "createTime"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) { + if (typeof message.backupCount === "number") + object.backupCount = options.longs === String ? String(message.backupCount) : message.backupCount; + else + object.backupCount = options.longs === String ? $util.Long.prototype.toString.call(message.backupCount) : options.longs === Number ? new $util.LongBits(message.backupCount.low >>> 0, message.backupCount.high >>> 0).toNumber() : message.backupCount; + if (options.oneofs) + object._backupCount = "backupCount"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + object.etag = message.etag; + if (options.oneofs) + object._etag = "etag"; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.DataSource.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.DataSource.State[message.state] : message.state; + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { + if (typeof message.totalStoredBytes === "number") + object.totalStoredBytes = options.longs === String ? String(message.totalStoredBytes) : message.totalStoredBytes; + else + object.totalStoredBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStoredBytes) : options.longs === Number ? new $util.LongBits(message.totalStoredBytes.low >>> 0, message.totalStoredBytes.high >>> 0).toNumber() : message.totalStoredBytes; + if (options.oneofs) + object._totalStoredBytes = "totalStoredBytes"; + } + if (message.configState != null && message.hasOwnProperty("configState")) + object.configState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigState[message.configState] === undefined ? message.configState : $root.google.cloud.backupdr.v1.BackupConfigState[message.configState] : message.configState; + if (message.backupConfigInfo != null && message.hasOwnProperty("backupConfigInfo")) + object.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.toObject(message.backupConfigInfo, options); + if (message.dataSourceGcpResource != null && message.hasOwnProperty("dataSourceGcpResource")) { + object.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.toObject(message.dataSourceGcpResource, options); + if (options.oneofs) + object.sourceResource = "dataSourceGcpResource"; + } + if (message.dataSourceBackupApplianceApplication != null && message.hasOwnProperty("dataSourceBackupApplianceApplication")) { + object.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.toObject(message.dataSourceBackupApplianceApplication, options); + if (options.oneofs) + object.sourceResource = "dataSourceBackupApplianceApplication"; + } + return object; + }; + + /** + * Converts this DataSource to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + * @returns {Object.} JSON object + */ + DataSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataSource + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSource"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.DataSource.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} ERROR=4 ERROR value + */ + DataSource.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + return DataSource; + })(); + + v1.BackupConfigInfo = (function() { + + /** + * Properties of a BackupConfigInfo. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupConfigInfo + * @property {google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|null} [lastBackupState] BackupConfigInfo lastBackupState + * @property {google.protobuf.ITimestamp|null} [lastSuccessfulBackupConsistencyTime] BackupConfigInfo lastSuccessfulBackupConsistencyTime + * @property {google.rpc.IStatus|null} [lastBackupError] BackupConfigInfo lastBackupError + * @property {google.cloud.backupdr.v1.IGcpBackupConfig|null} [gcpBackupConfig] BackupConfigInfo gcpBackupConfig + * @property {google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null} [backupApplianceBackupConfig] BackupConfigInfo backupApplianceBackupConfig + */ + + /** + * Constructs a new BackupConfigInfo. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupConfigInfo. + * @implements IBackupConfigInfo + * @constructor + * @param {google.cloud.backupdr.v1.IBackupConfigInfo=} [properties] Properties to set + */ + function BackupConfigInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupConfigInfo lastBackupState. + * @member {google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState} lastBackupState + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.lastBackupState = 0; + + /** + * BackupConfigInfo lastSuccessfulBackupConsistencyTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastSuccessfulBackupConsistencyTime + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.lastSuccessfulBackupConsistencyTime = null; + + /** + * BackupConfigInfo lastBackupError. + * @member {google.rpc.IStatus|null|undefined} lastBackupError + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.lastBackupError = null; + + /** + * BackupConfigInfo gcpBackupConfig. + * @member {google.cloud.backupdr.v1.IGcpBackupConfig|null|undefined} gcpBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.gcpBackupConfig = null; + + /** + * BackupConfigInfo backupApplianceBackupConfig. + * @member {google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null|undefined} backupApplianceBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.backupApplianceBackupConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupConfigInfo backupConfig. + * @member {"gcpBackupConfig"|"backupApplianceBackupConfig"|undefined} backupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + Object.defineProperty(BackupConfigInfo.prototype, "backupConfig", { + get: $util.oneOfGetter($oneOfFields = ["gcpBackupConfig", "backupApplianceBackupConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupConfigInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupConfigInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo instance + */ + BackupConfigInfo.create = function create(properties) { + return new BackupConfigInfo(properties); + }; + + /** + * Encodes the specified BackupConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupConfigInfo} message BackupConfigInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupConfigInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lastBackupState != null && Object.hasOwnProperty.call(message, "lastBackupState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.lastBackupState); + if (message.lastSuccessfulBackupConsistencyTime != null && Object.hasOwnProperty.call(message, "lastSuccessfulBackupConsistencyTime")) + $root.google.protobuf.Timestamp.encode(message.lastSuccessfulBackupConsistencyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.lastBackupError != null && Object.hasOwnProperty.call(message, "lastBackupError")) + $root.google.rpc.Status.encode(message.lastBackupError, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.gcpBackupConfig != null && Object.hasOwnProperty.call(message, "gcpBackupConfig")) + $root.google.cloud.backupdr.v1.GcpBackupConfig.encode(message.gcpBackupConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.backupApplianceBackupConfig != null && Object.hasOwnProperty.call(message, "backupApplianceBackupConfig")) + $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.encode(message.backupApplianceBackupConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BackupConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupConfigInfo} message BackupConfigInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupConfigInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupConfigInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupConfigInfo.decode = function 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.backupdr.v1.BackupConfigInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.lastBackupState = reader.int32(); + break; + } + case 2: { + message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.lastBackupError = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 4: { + message.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupConfigInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupConfigInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupConfigInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupConfigInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) + switch (message.lastBackupState) { + default: + return "lastBackupState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime); + if (error) + return "lastSuccessfulBackupConsistencyTime." + error; + } + if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) { + var error = $root.google.rpc.Status.verify(message.lastBackupError); + if (error) + return "lastBackupError." + error; + } + if (message.gcpBackupConfig != null && message.hasOwnProperty("gcpBackupConfig")) { + properties.backupConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.GcpBackupConfig.verify(message.gcpBackupConfig); + if (error) + return "gcpBackupConfig." + error; + } + } + if (message.backupApplianceBackupConfig != null && message.hasOwnProperty("backupApplianceBackupConfig")) { + if (properties.backupConfig === 1) + return "backupConfig: multiple values"; + properties.backupConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify(message.backupApplianceBackupConfig); + if (error) + return "backupApplianceBackupConfig." + error; + } + } + return null; + }; + + /** + * Creates a BackupConfigInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo + */ + BackupConfigInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupConfigInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupConfigInfo(); + switch (object.lastBackupState) { + default: + if (typeof object.lastBackupState === "number") { + message.lastBackupState = object.lastBackupState; + break; + } + break; + case "LAST_BACKUP_STATE_UNSPECIFIED": + case 0: + message.lastBackupState = 0; + break; + case "FIRST_BACKUP_PENDING": + case 1: + message.lastBackupState = 1; + break; + case "SUCCEEDED": + case 2: + message.lastBackupState = 2; + break; + case "FAILED": + case 3: + message.lastBackupState = 3; + break; + case "PERMISSION_DENIED": + case 4: + message.lastBackupState = 4; + break; + } + if (object.lastSuccessfulBackupConsistencyTime != null) { + if (typeof object.lastSuccessfulBackupConsistencyTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.lastSuccessfulBackupConsistencyTime: object expected"); + message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime); + } + if (object.lastBackupError != null) { + if (typeof object.lastBackupError !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.lastBackupError: object expected"); + message.lastBackupError = $root.google.rpc.Status.fromObject(object.lastBackupError); + } + if (object.gcpBackupConfig != null) { + if (typeof object.gcpBackupConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.gcpBackupConfig: object expected"); + message.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.fromObject(object.gcpBackupConfig); + } + if (object.backupApplianceBackupConfig != null) { + if (typeof object.backupApplianceBackupConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.backupApplianceBackupConfig: object expected"); + message.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.fromObject(object.backupApplianceBackupConfig); + } + return message; + }; + + /** + * Creates a plain object from a BackupConfigInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {google.cloud.backupdr.v1.BackupConfigInfo} message BackupConfigInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupConfigInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lastBackupState = options.enums === String ? "LAST_BACKUP_STATE_UNSPECIFIED" : 0; + object.lastSuccessfulBackupConsistencyTime = null; + object.lastBackupError = null; + } + if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) + object.lastBackupState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState[message.lastBackupState] === undefined ? message.lastBackupState : $root.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState[message.lastBackupState] : message.lastBackupState; + if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) + object.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime, options); + if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) + object.lastBackupError = $root.google.rpc.Status.toObject(message.lastBackupError, options); + if (message.gcpBackupConfig != null && message.hasOwnProperty("gcpBackupConfig")) { + object.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.toObject(message.gcpBackupConfig, options); + if (options.oneofs) + object.backupConfig = "gcpBackupConfig"; + } + if (message.backupApplianceBackupConfig != null && message.hasOwnProperty("backupApplianceBackupConfig")) { + object.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.toObject(message.backupApplianceBackupConfig, options); + if (options.oneofs) + object.backupConfig = "backupApplianceBackupConfig"; + } + return object; + }; + + /** + * Converts this BackupConfigInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + * @returns {Object.} JSON object + */ + BackupConfigInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupConfigInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupConfigInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupConfigInfo"; + }; + + /** + * LastBackupState enum. + * @name google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState + * @enum {number} + * @property {number} LAST_BACKUP_STATE_UNSPECIFIED=0 LAST_BACKUP_STATE_UNSPECIFIED value + * @property {number} FIRST_BACKUP_PENDING=1 FIRST_BACKUP_PENDING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + * @property {number} PERMISSION_DENIED=4 PERMISSION_DENIED value + */ + BackupConfigInfo.LastBackupState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAST_BACKUP_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIRST_BACKUP_PENDING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "PERMISSION_DENIED"] = 4; + return values; + })(); + + return BackupConfigInfo; + })(); + + v1.GcpBackupConfig = (function() { + + /** + * Properties of a GcpBackupConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IGcpBackupConfig + * @property {string|null} [backupPlan] GcpBackupConfig backupPlan + * @property {string|null} [backupPlanDescription] GcpBackupConfig backupPlanDescription + * @property {string|null} [backupPlanAssociation] GcpBackupConfig backupPlanAssociation + * @property {Array.|null} [backupPlanRules] GcpBackupConfig backupPlanRules + */ + + /** + * Constructs a new GcpBackupConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GcpBackupConfig. + * @implements IGcpBackupConfig + * @constructor + * @param {google.cloud.backupdr.v1.IGcpBackupConfig=} [properties] Properties to set + */ + function GcpBackupConfig(properties) { + this.backupPlanRules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcpBackupConfig backupPlan. + * @member {string} backupPlan + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + */ + GcpBackupConfig.prototype.backupPlan = ""; + + /** + * GcpBackupConfig backupPlanDescription. + * @member {string} backupPlanDescription + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + */ + GcpBackupConfig.prototype.backupPlanDescription = ""; + + /** + * GcpBackupConfig backupPlanAssociation. + * @member {string} backupPlanAssociation + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + */ + GcpBackupConfig.prototype.backupPlanAssociation = ""; + + /** + * GcpBackupConfig backupPlanRules. + * @member {Array.} backupPlanRules + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + */ + GcpBackupConfig.prototype.backupPlanRules = $util.emptyArray; + + /** + * Creates a new GcpBackupConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IGcpBackupConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig instance + */ + GcpBackupConfig.create = function create(properties) { + return new GcpBackupConfig(properties); + }; + + /** + * Encodes the specified GcpBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IGcpBackupConfig} message GcpBackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpBackupConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPlan); + if (message.backupPlanDescription != null && Object.hasOwnProperty.call(message, "backupPlanDescription")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanDescription); + if (message.backupPlanAssociation != null && Object.hasOwnProperty.call(message, "backupPlanAssociation")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.backupPlanAssociation); + if (message.backupPlanRules != null && message.backupPlanRules.length) + for (var i = 0; i < message.backupPlanRules.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.backupPlanRules[i]); + return writer; + }; + + /** + * Encodes the specified GcpBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IGcpBackupConfig} message GcpBackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpBackupConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcpBackupConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpBackupConfig.decode = function 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.backupdr.v1.GcpBackupConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backupPlan = reader.string(); + break; + } + case 2: { + message.backupPlanDescription = reader.string(); + break; + } + case 3: { + message.backupPlanAssociation = reader.string(); + break; + } + case 4: { + if (!(message.backupPlanRules && message.backupPlanRules.length)) + message.backupPlanRules = []; + message.backupPlanRules.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcpBackupConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpBackupConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcpBackupConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcpBackupConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + if (!$util.isString(message.backupPlan)) + return "backupPlan: string expected"; + if (message.backupPlanDescription != null && message.hasOwnProperty("backupPlanDescription")) + if (!$util.isString(message.backupPlanDescription)) + return "backupPlanDescription: string expected"; + if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) + if (!$util.isString(message.backupPlanAssociation)) + return "backupPlanAssociation: string expected"; + if (message.backupPlanRules != null && message.hasOwnProperty("backupPlanRules")) { + if (!Array.isArray(message.backupPlanRules)) + return "backupPlanRules: array expected"; + for (var i = 0; i < message.backupPlanRules.length; ++i) + if (!$util.isString(message.backupPlanRules[i])) + return "backupPlanRules: string[] expected"; + } + return null; + }; + + /** + * Creates a GcpBackupConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig + */ + GcpBackupConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GcpBackupConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.GcpBackupConfig(); + if (object.backupPlan != null) + message.backupPlan = String(object.backupPlan); + if (object.backupPlanDescription != null) + message.backupPlanDescription = String(object.backupPlanDescription); + if (object.backupPlanAssociation != null) + message.backupPlanAssociation = String(object.backupPlanAssociation); + if (object.backupPlanRules) { + if (!Array.isArray(object.backupPlanRules)) + throw TypeError(".google.cloud.backupdr.v1.GcpBackupConfig.backupPlanRules: array expected"); + message.backupPlanRules = []; + for (var i = 0; i < object.backupPlanRules.length; ++i) + message.backupPlanRules[i] = String(object.backupPlanRules[i]); + } + return message; + }; + + /** + * Creates a plain object from a GcpBackupConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {google.cloud.backupdr.v1.GcpBackupConfig} message GcpBackupConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcpBackupConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.backupPlanRules = []; + if (options.defaults) { + object.backupPlan = ""; + object.backupPlanDescription = ""; + object.backupPlanAssociation = ""; + } + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + object.backupPlan = message.backupPlan; + if (message.backupPlanDescription != null && message.hasOwnProperty("backupPlanDescription")) + object.backupPlanDescription = message.backupPlanDescription; + if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) + object.backupPlanAssociation = message.backupPlanAssociation; + if (message.backupPlanRules && message.backupPlanRules.length) { + object.backupPlanRules = []; + for (var j = 0; j < message.backupPlanRules.length; ++j) + object.backupPlanRules[j] = message.backupPlanRules[j]; + } + return object; + }; + + /** + * Converts this GcpBackupConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + * @returns {Object.} JSON object + */ + GcpBackupConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcpBackupConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcpBackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpBackupConfig"; + }; + + return GcpBackupConfig; + })(); + + v1.BackupApplianceBackupConfig = (function() { + + /** + * Properties of a BackupApplianceBackupConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupApplianceBackupConfig + * @property {string|null} [backupApplianceName] BackupApplianceBackupConfig backupApplianceName + * @property {number|Long|null} [backupApplianceId] BackupApplianceBackupConfig backupApplianceId + * @property {number|Long|null} [slaId] BackupApplianceBackupConfig slaId + * @property {string|null} [applicationName] BackupApplianceBackupConfig applicationName + * @property {string|null} [hostName] BackupApplianceBackupConfig hostName + * @property {string|null} [sltName] BackupApplianceBackupConfig sltName + * @property {string|null} [slpName] BackupApplianceBackupConfig slpName + */ + + /** + * Constructs a new BackupApplianceBackupConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupApplianceBackupConfig. + * @implements IBackupApplianceBackupConfig + * @constructor + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig=} [properties] Properties to set + */ + function BackupApplianceBackupConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupApplianceBackupConfig backupApplianceName. + * @member {string} backupApplianceName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.backupApplianceName = ""; + + /** + * BackupApplianceBackupConfig backupApplianceId. + * @member {number|Long} backupApplianceId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.backupApplianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupApplianceBackupConfig slaId. + * @member {number|Long} slaId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.slaId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupApplianceBackupConfig applicationName. + * @member {string} applicationName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.applicationName = ""; + + /** + * BackupApplianceBackupConfig hostName. + * @member {string} hostName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.hostName = ""; + + /** + * BackupApplianceBackupConfig sltName. + * @member {string} sltName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.sltName = ""; + + /** + * BackupApplianceBackupConfig slpName. + * @member {string} slpName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.slpName = ""; + + /** + * Creates a new BackupApplianceBackupConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig instance + */ + BackupApplianceBackupConfig.create = function create(properties) { + return new BackupApplianceBackupConfig(properties); + }; + + /** + * Encodes the specified BackupApplianceBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig} message BackupApplianceBackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceBackupConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupApplianceName != null && Object.hasOwnProperty.call(message, "backupApplianceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupApplianceName); + if (message.backupApplianceId != null && Object.hasOwnProperty.call(message, "backupApplianceId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.backupApplianceId); + if (message.slaId != null && Object.hasOwnProperty.call(message, "slaId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.slaId); + if (message.applicationName != null && Object.hasOwnProperty.call(message, "applicationName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.applicationName); + if (message.hostName != null && Object.hasOwnProperty.call(message, "hostName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.hostName); + if (message.sltName != null && Object.hasOwnProperty.call(message, "sltName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sltName); + if (message.slpName != null && Object.hasOwnProperty.call(message, "slpName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.slpName); + return writer; + }; + + /** + * Encodes the specified BackupApplianceBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig} message BackupApplianceBackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceBackupConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceBackupConfig.decode = function 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.backupdr.v1.BackupApplianceBackupConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backupApplianceName = reader.string(); + break; + } + case 2: { + message.backupApplianceId = reader.int64(); + break; + } + case 3: { + message.slaId = reader.int64(); + break; + } + case 4: { + message.applicationName = reader.string(); + break; + } + case 5: { + message.hostName = reader.string(); + break; + } + case 6: { + message.sltName = reader.string(); + break; + } + case 7: { + message.slpName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceBackupConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupApplianceBackupConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupApplianceBackupConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + if (!$util.isString(message.backupApplianceName)) + return "backupApplianceName: string expected"; + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (!$util.isInteger(message.backupApplianceId) && !(message.backupApplianceId && $util.isInteger(message.backupApplianceId.low) && $util.isInteger(message.backupApplianceId.high))) + return "backupApplianceId: integer|Long expected"; + if (message.slaId != null && message.hasOwnProperty("slaId")) + if (!$util.isInteger(message.slaId) && !(message.slaId && $util.isInteger(message.slaId.low) && $util.isInteger(message.slaId.high))) + return "slaId: integer|Long expected"; + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + if (!$util.isString(message.applicationName)) + return "applicationName: string expected"; + if (message.hostName != null && message.hasOwnProperty("hostName")) + if (!$util.isString(message.hostName)) + return "hostName: string expected"; + if (message.sltName != null && message.hasOwnProperty("sltName")) + if (!$util.isString(message.sltName)) + return "sltName: string expected"; + if (message.slpName != null && message.hasOwnProperty("slpName")) + if (!$util.isString(message.slpName)) + return "slpName: string expected"; + return null; + }; + + /** + * Creates a BackupApplianceBackupConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig + */ + BackupApplianceBackupConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig(); + if (object.backupApplianceName != null) + message.backupApplianceName = String(object.backupApplianceName); + if (object.backupApplianceId != null) + if ($util.Long) + (message.backupApplianceId = $util.Long.fromValue(object.backupApplianceId)).unsigned = false; + else if (typeof object.backupApplianceId === "string") + message.backupApplianceId = parseInt(object.backupApplianceId, 10); + else if (typeof object.backupApplianceId === "number") + message.backupApplianceId = object.backupApplianceId; + else if (typeof object.backupApplianceId === "object") + message.backupApplianceId = new $util.LongBits(object.backupApplianceId.low >>> 0, object.backupApplianceId.high >>> 0).toNumber(); + if (object.slaId != null) + if ($util.Long) + (message.slaId = $util.Long.fromValue(object.slaId)).unsigned = false; + else if (typeof object.slaId === "string") + message.slaId = parseInt(object.slaId, 10); + else if (typeof object.slaId === "number") + message.slaId = object.slaId; + else if (typeof object.slaId === "object") + message.slaId = new $util.LongBits(object.slaId.low >>> 0, object.slaId.high >>> 0).toNumber(); + if (object.applicationName != null) + message.applicationName = String(object.applicationName); + if (object.hostName != null) + message.hostName = String(object.hostName); + if (object.sltName != null) + message.sltName = String(object.sltName); + if (object.slpName != null) + message.slpName = String(object.slpName); + return message; + }; + + /** + * Creates a plain object from a BackupApplianceBackupConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {google.cloud.backupdr.v1.BackupApplianceBackupConfig} message BackupApplianceBackupConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupApplianceBackupConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.backupApplianceName = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.backupApplianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.backupApplianceId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.slaId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.slaId = options.longs === String ? "0" : 0; + object.applicationName = ""; + object.hostName = ""; + object.sltName = ""; + object.slpName = ""; + } + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + object.backupApplianceName = message.backupApplianceName; + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (typeof message.backupApplianceId === "number") + object.backupApplianceId = options.longs === String ? String(message.backupApplianceId) : message.backupApplianceId; + else + object.backupApplianceId = options.longs === String ? $util.Long.prototype.toString.call(message.backupApplianceId) : options.longs === Number ? new $util.LongBits(message.backupApplianceId.low >>> 0, message.backupApplianceId.high >>> 0).toNumber() : message.backupApplianceId; + if (message.slaId != null && message.hasOwnProperty("slaId")) + if (typeof message.slaId === "number") + object.slaId = options.longs === String ? String(message.slaId) : message.slaId; + else + object.slaId = options.longs === String ? $util.Long.prototype.toString.call(message.slaId) : options.longs === Number ? new $util.LongBits(message.slaId.low >>> 0, message.slaId.high >>> 0).toNumber() : message.slaId; + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + object.applicationName = message.applicationName; + if (message.hostName != null && message.hasOwnProperty("hostName")) + object.hostName = message.hostName; + if (message.sltName != null && message.hasOwnProperty("sltName")) + object.sltName = message.sltName; + if (message.slpName != null && message.hasOwnProperty("slpName")) + object.slpName = message.slpName; + return object; + }; + + /** + * Converts this BackupApplianceBackupConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + * @returns {Object.} JSON object + */ + BackupApplianceBackupConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupApplianceBackupConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupApplianceBackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceBackupConfig"; + }; + + return BackupApplianceBackupConfig; + })(); + + v1.DataSourceGcpResource = (function() { + + /** + * Properties of a DataSourceGcpResource. + * @memberof google.cloud.backupdr.v1 + * @interface IDataSourceGcpResource + * @property {string|null} [gcpResourcename] DataSourceGcpResource gcpResourcename + * @property {string|null} [location] DataSourceGcpResource location + * @property {string|null} [type] DataSourceGcpResource type + * @property {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null} [computeInstanceDatasourceProperties] DataSourceGcpResource computeInstanceDatasourceProperties + */ + + /** + * Constructs a new DataSourceGcpResource. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DataSourceGcpResource. + * @implements IDataSourceGcpResource + * @constructor + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource=} [properties] Properties to set + */ + function DataSourceGcpResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataSourceGcpResource gcpResourcename. + * @member {string} gcpResourcename + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + DataSourceGcpResource.prototype.gcpResourcename = ""; + + /** + * DataSourceGcpResource location. + * @member {string} location + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + DataSourceGcpResource.prototype.location = ""; + + /** + * DataSourceGcpResource type. + * @member {string} type + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + DataSourceGcpResource.prototype.type = ""; + + /** + * DataSourceGcpResource computeInstanceDatasourceProperties. + * @member {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null|undefined} computeInstanceDatasourceProperties + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + DataSourceGcpResource.prototype.computeInstanceDatasourceProperties = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataSourceGcpResource gcpResourceProperties. + * @member {"computeInstanceDatasourceProperties"|undefined} gcpResourceProperties + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + Object.defineProperty(DataSourceGcpResource.prototype, "gcpResourceProperties", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceDatasourceProperties"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataSourceGcpResource instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource instance + */ + DataSourceGcpResource.create = function create(properties) { + return new DataSourceGcpResource(properties); + }; + + /** + * Encodes the specified DataSourceGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource} message DataSourceGcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceGcpResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.computeInstanceDatasourceProperties != null && Object.hasOwnProperty.call(message, "computeInstanceDatasourceProperties")) + $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.encode(message.computeInstanceDatasourceProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataSourceGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource} message DataSourceGcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceGcpResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceGcpResource.decode = function 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.backupdr.v1.DataSourceGcpResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcpResourcename = reader.string(); + break; + } + case 2: { + message.location = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 4: { + message.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceGcpResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSourceGcpResource message. + * @function verify + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSourceGcpResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + if (!$util.isString(message.gcpResourcename)) + return "gcpResourcename: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.computeInstanceDatasourceProperties != null && message.hasOwnProperty("computeInstanceDatasourceProperties")) { + properties.gcpResourceProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify(message.computeInstanceDatasourceProperties); + if (error) + return "computeInstanceDatasourceProperties." + error; + } + } + return null; + }; + + /** + * Creates a DataSourceGcpResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource + */ + DataSourceGcpResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DataSourceGcpResource) + return object; + var message = new $root.google.cloud.backupdr.v1.DataSourceGcpResource(); + if (object.gcpResourcename != null) + message.gcpResourcename = String(object.gcpResourcename); + if (object.location != null) + message.location = String(object.location); + if (object.type != null) + message.type = String(object.type); + if (object.computeInstanceDatasourceProperties != null) { + if (typeof object.computeInstanceDatasourceProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSourceGcpResource.computeInstanceDatasourceProperties: object expected"); + message.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.fromObject(object.computeInstanceDatasourceProperties); + } + return message; + }; + + /** + * Creates a plain object from a DataSourceGcpResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.DataSourceGcpResource} message DataSourceGcpResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSourceGcpResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gcpResourcename = ""; + object.location = ""; + object.type = ""; + } + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + object.gcpResourcename = message.gcpResourcename; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.computeInstanceDatasourceProperties != null && message.hasOwnProperty("computeInstanceDatasourceProperties")) { + object.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.toObject(message.computeInstanceDatasourceProperties, options); + if (options.oneofs) + object.gcpResourceProperties = "computeInstanceDatasourceProperties"; + } + return object; + }; + + /** + * Converts this DataSourceGcpResource to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + * @returns {Object.} JSON object + */ + DataSourceGcpResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataSourceGcpResource + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSourceGcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSourceGcpResource"; + }; + + return DataSourceGcpResource; + })(); + + v1.DataSourceBackupApplianceApplication = (function() { + + /** + * Properties of a DataSourceBackupApplianceApplication. + * @memberof google.cloud.backupdr.v1 + * @interface IDataSourceBackupApplianceApplication + * @property {string|null} [applicationName] DataSourceBackupApplianceApplication applicationName + * @property {string|null} [backupAppliance] DataSourceBackupApplianceApplication backupAppliance + * @property {number|Long|null} [applianceId] DataSourceBackupApplianceApplication applianceId + * @property {string|null} [type] DataSourceBackupApplianceApplication type + * @property {number|Long|null} [applicationId] DataSourceBackupApplianceApplication applicationId + * @property {string|null} [hostname] DataSourceBackupApplianceApplication hostname + * @property {number|Long|null} [hostId] DataSourceBackupApplianceApplication hostId + */ + + /** + * Constructs a new DataSourceBackupApplianceApplication. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DataSourceBackupApplianceApplication. + * @implements IDataSourceBackupApplianceApplication + * @constructor + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication=} [properties] Properties to set + */ + function DataSourceBackupApplianceApplication(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataSourceBackupApplianceApplication applicationName. + * @member {string} applicationName + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.applicationName = ""; + + /** + * DataSourceBackupApplianceApplication backupAppliance. + * @member {string} backupAppliance + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.backupAppliance = ""; + + /** + * DataSourceBackupApplianceApplication applianceId. + * @member {number|Long} applianceId + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.applianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataSourceBackupApplianceApplication type. + * @member {string} type + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.type = ""; + + /** + * DataSourceBackupApplianceApplication applicationId. + * @member {number|Long} applicationId + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.applicationId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataSourceBackupApplianceApplication hostname. + * @member {string} hostname + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.hostname = ""; + + /** + * DataSourceBackupApplianceApplication hostId. + * @member {number|Long} hostId + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.hostId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new DataSourceBackupApplianceApplication instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication instance + */ + DataSourceBackupApplianceApplication.create = function create(properties) { + return new DataSourceBackupApplianceApplication(properties); + }; + + /** + * Encodes the specified DataSourceBackupApplianceApplication message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceBackupApplianceApplication.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.applicationName != null && Object.hasOwnProperty.call(message, "applicationName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.applicationName); + if (message.backupAppliance != null && Object.hasOwnProperty.call(message, "backupAppliance")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupAppliance); + if (message.applianceId != null && Object.hasOwnProperty.call(message, "applianceId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.applianceId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.type); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.hostname); + if (message.hostId != null && Object.hasOwnProperty.call(message, "hostId")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.hostId); + if (message.applicationId != null && Object.hasOwnProperty.call(message, "applicationId")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.applicationId); + return writer; + }; + + /** + * Encodes the specified DataSourceBackupApplianceApplication message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceBackupApplianceApplication.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceBackupApplianceApplication.decode = function 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.backupdr.v1.DataSourceBackupApplianceApplication(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.applicationName = reader.string(); + break; + } + case 2: { + message.backupAppliance = reader.string(); + break; + } + case 3: { + message.applianceId = reader.int64(); + break; + } + case 4: { + message.type = reader.string(); + break; + } + case 8: { + message.applicationId = reader.int64(); + break; + } + case 6: { + message.hostname = reader.string(); + break; + } + case 7: { + message.hostId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceBackupApplianceApplication.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSourceBackupApplianceApplication message. + * @function verify + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSourceBackupApplianceApplication.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + if (!$util.isString(message.applicationName)) + return "applicationName: string expected"; + if (message.backupAppliance != null && message.hasOwnProperty("backupAppliance")) + if (!$util.isString(message.backupAppliance)) + return "backupAppliance: string expected"; + if (message.applianceId != null && message.hasOwnProperty("applianceId")) + if (!$util.isInteger(message.applianceId) && !(message.applianceId && $util.isInteger(message.applianceId.low) && $util.isInteger(message.applianceId.high))) + return "applianceId: integer|Long expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.applicationId != null && message.hasOwnProperty("applicationId")) + if (!$util.isInteger(message.applicationId) && !(message.applicationId && $util.isInteger(message.applicationId.low) && $util.isInteger(message.applicationId.high))) + return "applicationId: integer|Long expected"; + if (message.hostname != null && message.hasOwnProperty("hostname")) + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + if (message.hostId != null && message.hasOwnProperty("hostId")) + if (!$util.isInteger(message.hostId) && !(message.hostId && $util.isInteger(message.hostId.low) && $util.isInteger(message.hostId.high))) + return "hostId: integer|Long expected"; + return null; + }; + + /** + * Creates a DataSourceBackupApplianceApplication message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication + */ + DataSourceBackupApplianceApplication.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication) + return object; + var message = new $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication(); + if (object.applicationName != null) + message.applicationName = String(object.applicationName); + if (object.backupAppliance != null) + message.backupAppliance = String(object.backupAppliance); + if (object.applianceId != null) + if ($util.Long) + (message.applianceId = $util.Long.fromValue(object.applianceId)).unsigned = false; + else if (typeof object.applianceId === "string") + message.applianceId = parseInt(object.applianceId, 10); + else if (typeof object.applianceId === "number") + message.applianceId = object.applianceId; + else if (typeof object.applianceId === "object") + message.applianceId = new $util.LongBits(object.applianceId.low >>> 0, object.applianceId.high >>> 0).toNumber(); + if (object.type != null) + message.type = String(object.type); + if (object.applicationId != null) + if ($util.Long) + (message.applicationId = $util.Long.fromValue(object.applicationId)).unsigned = false; + else if (typeof object.applicationId === "string") + message.applicationId = parseInt(object.applicationId, 10); + else if (typeof object.applicationId === "number") + message.applicationId = object.applicationId; + else if (typeof object.applicationId === "object") + message.applicationId = new $util.LongBits(object.applicationId.low >>> 0, object.applicationId.high >>> 0).toNumber(); + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.hostId != null) + if ($util.Long) + (message.hostId = $util.Long.fromValue(object.hostId)).unsigned = false; + else if (typeof object.hostId === "string") + message.hostId = parseInt(object.hostId, 10); + else if (typeof object.hostId === "number") + message.hostId = object.hostId; + else if (typeof object.hostId === "object") + message.hostId = new $util.LongBits(object.hostId.low >>> 0, object.hostId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a DataSourceBackupApplianceApplication message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSourceBackupApplianceApplication.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.applicationName = ""; + object.backupAppliance = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.applianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.applianceId = options.longs === String ? "0" : 0; + object.type = ""; + object.hostname = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.hostId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.hostId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.applicationId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.applicationId = options.longs === String ? "0" : 0; + } + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + object.applicationName = message.applicationName; + if (message.backupAppliance != null && message.hasOwnProperty("backupAppliance")) + object.backupAppliance = message.backupAppliance; + if (message.applianceId != null && message.hasOwnProperty("applianceId")) + if (typeof message.applianceId === "number") + object.applianceId = options.longs === String ? String(message.applianceId) : message.applianceId; + else + object.applianceId = options.longs === String ? $util.Long.prototype.toString.call(message.applianceId) : options.longs === Number ? new $util.LongBits(message.applianceId.low >>> 0, message.applianceId.high >>> 0).toNumber() : message.applianceId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.hostname != null && message.hasOwnProperty("hostname")) + object.hostname = message.hostname; + if (message.hostId != null && message.hasOwnProperty("hostId")) + if (typeof message.hostId === "number") + object.hostId = options.longs === String ? String(message.hostId) : message.hostId; + else + object.hostId = options.longs === String ? $util.Long.prototype.toString.call(message.hostId) : options.longs === Number ? new $util.LongBits(message.hostId.low >>> 0, message.hostId.high >>> 0).toNumber() : message.hostId; + if (message.applicationId != null && message.hasOwnProperty("applicationId")) + if (typeof message.applicationId === "number") + object.applicationId = options.longs === String ? String(message.applicationId) : message.applicationId; + else + object.applicationId = options.longs === String ? $util.Long.prototype.toString.call(message.applicationId) : options.longs === Number ? new $util.LongBits(message.applicationId.low >>> 0, message.applicationId.high >>> 0).toNumber() : message.applicationId; + return object; + }; + + /** + * Converts this DataSourceBackupApplianceApplication to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + * @returns {Object.} JSON object + */ + DataSourceBackupApplianceApplication.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataSourceBackupApplianceApplication + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSourceBackupApplianceApplication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSourceBackupApplianceApplication"; + }; + + return DataSourceBackupApplianceApplication; + })(); + + v1.ServiceLockInfo = (function() { + + /** + * Properties of a ServiceLockInfo. + * @memberof google.cloud.backupdr.v1 + * @interface IServiceLockInfo + * @property {string|null} [operation] ServiceLockInfo operation + */ + + /** + * Constructs a new ServiceLockInfo. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ServiceLockInfo. + * @implements IServiceLockInfo + * @constructor + * @param {google.cloud.backupdr.v1.IServiceLockInfo=} [properties] Properties to set + */ + function ServiceLockInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceLockInfo operation. + * @member {string} operation + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @instance + */ + ServiceLockInfo.prototype.operation = ""; + + /** + * Creates a new ServiceLockInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IServiceLockInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo instance + */ + ServiceLockInfo.create = function create(properties) { + return new ServiceLockInfo(properties); + }; + + /** + * Encodes the specified ServiceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IServiceLockInfo} message ServiceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceLockInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.operation); + return writer; + }; + + /** + * Encodes the specified ServiceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IServiceLockInfo} message ServiceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceLockInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceLockInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceLockInfo.decode = function 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.backupdr.v1.ServiceLockInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.operation = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceLockInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceLockInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceLockInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceLockInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) + if (!$util.isString(message.operation)) + return "operation: string expected"; + return null; + }; + + /** + * Creates a ServiceLockInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo + */ + ServiceLockInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ServiceLockInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.ServiceLockInfo(); + if (object.operation != null) + message.operation = String(object.operation); + return message; + }; + + /** + * Creates a plain object from a ServiceLockInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {google.cloud.backupdr.v1.ServiceLockInfo} message ServiceLockInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceLockInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.operation = ""; + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = message.operation; + return object; + }; + + /** + * Converts this ServiceLockInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @instance + * @returns {Object.} JSON object + */ + ServiceLockInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceLockInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceLockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ServiceLockInfo"; + }; + + return ServiceLockInfo; + })(); + + v1.BackupApplianceLockInfo = (function() { + + /** + * Properties of a BackupApplianceLockInfo. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupApplianceLockInfo + * @property {number|Long|null} [backupApplianceId] BackupApplianceLockInfo backupApplianceId + * @property {string|null} [backupApplianceName] BackupApplianceLockInfo backupApplianceName + * @property {string|null} [lockReason] BackupApplianceLockInfo lockReason + * @property {string|null} [jobName] BackupApplianceLockInfo jobName + * @property {string|null} [backupImage] BackupApplianceLockInfo backupImage + * @property {number|Long|null} [slaId] BackupApplianceLockInfo slaId + */ + + /** + * Constructs a new BackupApplianceLockInfo. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupApplianceLockInfo. + * @implements IBackupApplianceLockInfo + * @constructor + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo=} [properties] Properties to set + */ + function BackupApplianceLockInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupApplianceLockInfo backupApplianceId. + * @member {number|Long} backupApplianceId + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.backupApplianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupApplianceLockInfo backupApplianceName. + * @member {string} backupApplianceName + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.backupApplianceName = ""; + + /** + * BackupApplianceLockInfo lockReason. + * @member {string} lockReason + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.lockReason = ""; + + /** + * BackupApplianceLockInfo jobName. + * @member {string|null|undefined} jobName + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.jobName = null; + + /** + * BackupApplianceLockInfo backupImage. + * @member {string|null|undefined} backupImage + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.backupImage = null; + + /** + * BackupApplianceLockInfo slaId. + * @member {number|Long|null|undefined} slaId + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.slaId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupApplianceLockInfo lockSource. + * @member {"jobName"|"backupImage"|"slaId"|undefined} lockSource + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + Object.defineProperty(BackupApplianceLockInfo.prototype, "lockSource", { + get: $util.oneOfGetter($oneOfFields = ["jobName", "backupImage", "slaId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupApplianceLockInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo instance + */ + BackupApplianceLockInfo.create = function create(properties) { + return new BackupApplianceLockInfo(properties); + }; + + /** + * Encodes the specified BackupApplianceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo} message BackupApplianceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceLockInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupApplianceId != null && Object.hasOwnProperty.call(message, "backupApplianceId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.backupApplianceId); + if (message.backupApplianceName != null && Object.hasOwnProperty.call(message, "backupApplianceName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupApplianceName); + if (message.lockReason != null && Object.hasOwnProperty.call(message, "lockReason")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.lockReason); + if (message.jobName != null && Object.hasOwnProperty.call(message, "jobName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.jobName); + if (message.backupImage != null && Object.hasOwnProperty.call(message, "backupImage")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.backupImage); + if (message.slaId != null && Object.hasOwnProperty.call(message, "slaId")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.slaId); + return writer; + }; + + /** + * Encodes the specified BackupApplianceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo} message BackupApplianceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceLockInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceLockInfo.decode = function 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.backupdr.v1.BackupApplianceLockInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backupApplianceId = reader.int64(); + break; + } + case 2: { + message.backupApplianceName = reader.string(); + break; + } + case 5: { + message.lockReason = reader.string(); + break; + } + case 6: { + message.jobName = reader.string(); + break; + } + case 7: { + message.backupImage = reader.string(); + break; + } + case 8: { + message.slaId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceLockInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupApplianceLockInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupApplianceLockInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (!$util.isInteger(message.backupApplianceId) && !(message.backupApplianceId && $util.isInteger(message.backupApplianceId.low) && $util.isInteger(message.backupApplianceId.high))) + return "backupApplianceId: integer|Long expected"; + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + if (!$util.isString(message.backupApplianceName)) + return "backupApplianceName: string expected"; + if (message.lockReason != null && message.hasOwnProperty("lockReason")) + if (!$util.isString(message.lockReason)) + return "lockReason: string expected"; + if (message.jobName != null && message.hasOwnProperty("jobName")) { + properties.lockSource = 1; + if (!$util.isString(message.jobName)) + return "jobName: string expected"; + } + if (message.backupImage != null && message.hasOwnProperty("backupImage")) { + if (properties.lockSource === 1) + return "lockSource: multiple values"; + properties.lockSource = 1; + if (!$util.isString(message.backupImage)) + return "backupImage: string expected"; + } + if (message.slaId != null && message.hasOwnProperty("slaId")) { + if (properties.lockSource === 1) + return "lockSource: multiple values"; + properties.lockSource = 1; + if (!$util.isInteger(message.slaId) && !(message.slaId && $util.isInteger(message.slaId.low) && $util.isInteger(message.slaId.high))) + return "slaId: integer|Long expected"; + } + return null; + }; + + /** + * Creates a BackupApplianceLockInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo + */ + BackupApplianceLockInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceLockInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupApplianceLockInfo(); + if (object.backupApplianceId != null) + if ($util.Long) + (message.backupApplianceId = $util.Long.fromValue(object.backupApplianceId)).unsigned = false; + else if (typeof object.backupApplianceId === "string") + message.backupApplianceId = parseInt(object.backupApplianceId, 10); + else if (typeof object.backupApplianceId === "number") + message.backupApplianceId = object.backupApplianceId; + else if (typeof object.backupApplianceId === "object") + message.backupApplianceId = new $util.LongBits(object.backupApplianceId.low >>> 0, object.backupApplianceId.high >>> 0).toNumber(); + if (object.backupApplianceName != null) + message.backupApplianceName = String(object.backupApplianceName); + if (object.lockReason != null) + message.lockReason = String(object.lockReason); + if (object.jobName != null) + message.jobName = String(object.jobName); + if (object.backupImage != null) + message.backupImage = String(object.backupImage); + if (object.slaId != null) + if ($util.Long) + (message.slaId = $util.Long.fromValue(object.slaId)).unsigned = false; + else if (typeof object.slaId === "string") + message.slaId = parseInt(object.slaId, 10); + else if (typeof object.slaId === "number") + message.slaId = object.slaId; + else if (typeof object.slaId === "object") + message.slaId = new $util.LongBits(object.slaId.low >>> 0, object.slaId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BackupApplianceLockInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.BackupApplianceLockInfo} message BackupApplianceLockInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupApplianceLockInfo.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.backupApplianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.backupApplianceId = options.longs === String ? "0" : 0; + object.backupApplianceName = ""; + object.lockReason = ""; + } + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (typeof message.backupApplianceId === "number") + object.backupApplianceId = options.longs === String ? String(message.backupApplianceId) : message.backupApplianceId; + else + object.backupApplianceId = options.longs === String ? $util.Long.prototype.toString.call(message.backupApplianceId) : options.longs === Number ? new $util.LongBits(message.backupApplianceId.low >>> 0, message.backupApplianceId.high >>> 0).toNumber() : message.backupApplianceId; + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + object.backupApplianceName = message.backupApplianceName; + if (message.lockReason != null && message.hasOwnProperty("lockReason")) + object.lockReason = message.lockReason; + if (message.jobName != null && message.hasOwnProperty("jobName")) { + object.jobName = message.jobName; + if (options.oneofs) + object.lockSource = "jobName"; + } + if (message.backupImage != null && message.hasOwnProperty("backupImage")) { + object.backupImage = message.backupImage; + if (options.oneofs) + object.lockSource = "backupImage"; + } + if (message.slaId != null && message.hasOwnProperty("slaId")) { + if (typeof message.slaId === "number") + object.slaId = options.longs === String ? String(message.slaId) : message.slaId; + else + object.slaId = options.longs === String ? $util.Long.prototype.toString.call(message.slaId) : options.longs === Number ? new $util.LongBits(message.slaId.low >>> 0, message.slaId.high >>> 0).toNumber() : message.slaId; + if (options.oneofs) + object.lockSource = "slaId"; + } + return object; + }; + + /** + * Converts this BackupApplianceLockInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + * @returns {Object.} JSON object + */ + BackupApplianceLockInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupApplianceLockInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupApplianceLockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceLockInfo"; + }; + + return BackupApplianceLockInfo; + })(); + + v1.BackupLock = (function() { + + /** + * Properties of a BackupLock. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupLock + * @property {google.protobuf.ITimestamp|null} [lockUntilTime] BackupLock lockUntilTime + * @property {google.cloud.backupdr.v1.IBackupApplianceLockInfo|null} [backupApplianceLockInfo] BackupLock backupApplianceLockInfo + * @property {google.cloud.backupdr.v1.IServiceLockInfo|null} [serviceLockInfo] BackupLock serviceLockInfo + */ + + /** + * Constructs a new BackupLock. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupLock. + * @implements IBackupLock + * @constructor + * @param {google.cloud.backupdr.v1.IBackupLock=} [properties] Properties to set + */ + function BackupLock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupLock lockUntilTime. + * @member {google.protobuf.ITimestamp|null|undefined} lockUntilTime + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + */ + BackupLock.prototype.lockUntilTime = null; + + /** + * BackupLock backupApplianceLockInfo. + * @member {google.cloud.backupdr.v1.IBackupApplianceLockInfo|null|undefined} backupApplianceLockInfo + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + */ + BackupLock.prototype.backupApplianceLockInfo = null; + + /** + * BackupLock serviceLockInfo. + * @member {google.cloud.backupdr.v1.IServiceLockInfo|null|undefined} serviceLockInfo + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + */ + BackupLock.prototype.serviceLockInfo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupLock ClientLockInfo. + * @member {"backupApplianceLockInfo"|"serviceLockInfo"|undefined} ClientLockInfo + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + */ + Object.defineProperty(BackupLock.prototype, "ClientLockInfo", { + get: $util.oneOfGetter($oneOfFields = ["backupApplianceLockInfo", "serviceLockInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupLock instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.IBackupLock=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock instance + */ + BackupLock.create = function create(properties) { + return new BackupLock(properties); + }; + + /** + * Encodes the specified BackupLock message. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.IBackupLock} message BackupLock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupLock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lockUntilTime != null && Object.hasOwnProperty.call(message, "lockUntilTime")) + $root.google.protobuf.Timestamp.encode(message.lockUntilTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.backupApplianceLockInfo != null && Object.hasOwnProperty.call(message, "backupApplianceLockInfo")) + $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.encode(message.backupApplianceLockInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.serviceLockInfo != null && Object.hasOwnProperty.call(message, "serviceLockInfo")) + $root.google.cloud.backupdr.v1.ServiceLockInfo.encode(message.serviceLockInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BackupLock message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.IBackupLock} message BackupLock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupLock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupLock message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupLock.decode = function 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.backupdr.v1.BackupLock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.lockUntilTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.decode(reader, reader.uint32()); + break; + } + case 4: { + message.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupLock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupLock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupLock message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupLock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.lockUntilTime != null && message.hasOwnProperty("lockUntilTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lockUntilTime); + if (error) + return "lockUntilTime." + error; + } + if (message.backupApplianceLockInfo != null && message.hasOwnProperty("backupApplianceLockInfo")) { + properties.ClientLockInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.verify(message.backupApplianceLockInfo); + if (error) + return "backupApplianceLockInfo." + error; + } + } + if (message.serviceLockInfo != null && message.hasOwnProperty("serviceLockInfo")) { + if (properties.ClientLockInfo === 1) + return "ClientLockInfo: multiple values"; + properties.ClientLockInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.ServiceLockInfo.verify(message.serviceLockInfo); + if (error) + return "serviceLockInfo." + error; + } + } + return null; + }; + + /** + * Creates a BackupLock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock + */ + BackupLock.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupLock) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupLock(); + if (object.lockUntilTime != null) { + if (typeof object.lockUntilTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupLock.lockUntilTime: object expected"); + message.lockUntilTime = $root.google.protobuf.Timestamp.fromObject(object.lockUntilTime); + } + if (object.backupApplianceLockInfo != null) { + if (typeof object.backupApplianceLockInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupLock.backupApplianceLockInfo: object expected"); + message.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.fromObject(object.backupApplianceLockInfo); + } + if (object.serviceLockInfo != null) { + if (typeof object.serviceLockInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupLock.serviceLockInfo: object expected"); + message.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.fromObject(object.serviceLockInfo); + } + return message; + }; + + /** + * Creates a plain object from a BackupLock message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.BackupLock} message BackupLock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupLock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.lockUntilTime = null; + if (message.lockUntilTime != null && message.hasOwnProperty("lockUntilTime")) + object.lockUntilTime = $root.google.protobuf.Timestamp.toObject(message.lockUntilTime, options); + if (message.backupApplianceLockInfo != null && message.hasOwnProperty("backupApplianceLockInfo")) { + object.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.toObject(message.backupApplianceLockInfo, options); + if (options.oneofs) + object.ClientLockInfo = "backupApplianceLockInfo"; + } + if (message.serviceLockInfo != null && message.hasOwnProperty("serviceLockInfo")) { + object.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.toObject(message.serviceLockInfo, options); + if (options.oneofs) + object.ClientLockInfo = "serviceLockInfo"; + } + return object; + }; + + /** + * Converts this BackupLock to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + * @returns {Object.} JSON object + */ + BackupLock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupLock + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupLock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupLock"; + }; + + return BackupLock; + })(); + + v1.Backup = (function() { + + /** + * Properties of a Backup. + * @memberof google.cloud.backupdr.v1 + * @interface IBackup + * @property {string|null} [name] Backup name + * @property {string|null} [description] Backup description + * @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Backup updateTime + * @property {Object.|null} [labels] Backup labels + * @property {google.protobuf.ITimestamp|null} [enforcedRetentionEndTime] Backup enforcedRetentionEndTime + * @property {google.protobuf.ITimestamp|null} [expireTime] Backup expireTime + * @property {google.protobuf.ITimestamp|null} [consistencyTime] Backup consistencyTime + * @property {string|null} [etag] Backup etag + * @property {google.cloud.backupdr.v1.Backup.State|null} [state] Backup state + * @property {Array.|null} [serviceLocks] Backup serviceLocks + * @property {Array.|null} [backupApplianceLocks] Backup backupApplianceLocks + * @property {google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null} [computeInstanceBackupProperties] Backup computeInstanceBackupProperties + * @property {google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null} [backupApplianceBackupProperties] Backup backupApplianceBackupProperties + * @property {google.cloud.backupdr.v1.Backup.BackupType|null} [backupType] Backup backupType + * @property {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null} [gcpBackupPlanInfo] Backup gcpBackupPlanInfo + * @property {number|Long|null} [resourceSizeBytes] Backup resourceSizeBytes + */ + + /** + * Constructs a new Backup. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Backup. + * @implements IBackup + * @constructor + * @param {google.cloud.backupdr.v1.IBackup=} [properties] Properties to set + */ + function Backup(properties) { + this.labels = {}; + this.serviceLocks = []; + this.backupApplianceLocks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Backup name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.name = ""; + + /** + * Backup description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.description = null; + + /** + * Backup createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.createTime = null; + + /** + * Backup updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.updateTime = null; + + /** + * Backup labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.labels = $util.emptyObject; + + /** + * Backup enforcedRetentionEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} enforcedRetentionEndTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.enforcedRetentionEndTime = null; + + /** + * Backup expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.expireTime = null; + + /** + * Backup consistencyTime. + * @member {google.protobuf.ITimestamp|null|undefined} consistencyTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.consistencyTime = null; + + /** + * Backup etag. + * @member {string|null|undefined} etag + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.etag = null; + + /** + * Backup state. + * @member {google.cloud.backupdr.v1.Backup.State} state + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.state = 0; + + /** + * Backup serviceLocks. + * @member {Array.} serviceLocks + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.serviceLocks = $util.emptyArray; + + /** + * Backup backupApplianceLocks. + * @member {Array.} backupApplianceLocks + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.backupApplianceLocks = $util.emptyArray; + + /** + * Backup computeInstanceBackupProperties. + * @member {google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null|undefined} computeInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.computeInstanceBackupProperties = null; + + /** + * Backup backupApplianceBackupProperties. + * @member {google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null|undefined} backupApplianceBackupProperties + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.backupApplianceBackupProperties = null; + + /** + * Backup backupType. + * @member {google.cloud.backupdr.v1.Backup.BackupType} backupType + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.backupType = 0; + + /** + * Backup gcpBackupPlanInfo. + * @member {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null|undefined} gcpBackupPlanInfo + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.gcpBackupPlanInfo = null; + + /** + * Backup resourceSizeBytes. + * @member {number|Long} resourceSizeBytes + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.resourceSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Backup _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _createTime. + * @member {"createTime"|undefined} _createTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_createTime", { + get: $util.oneOfGetter($oneOfFields = ["createTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _updateTime. + * @member {"updateTime"|undefined} _updateTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _enforcedRetentionEndTime. + * @member {"enforcedRetentionEndTime"|undefined} _enforcedRetentionEndTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_enforcedRetentionEndTime", { + get: $util.oneOfGetter($oneOfFields = ["enforcedRetentionEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _expireTime. + * @member {"expireTime"|undefined} _expireTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_expireTime", { + get: $util.oneOfGetter($oneOfFields = ["expireTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _consistencyTime. + * @member {"consistencyTime"|undefined} _consistencyTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_consistencyTime", { + get: $util.oneOfGetter($oneOfFields = ["consistencyTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _etag. + * @member {"etag"|undefined} _etag + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_etag", { + get: $util.oneOfGetter($oneOfFields = ["etag"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup backupProperties. + * @member {"computeInstanceBackupProperties"|"backupApplianceBackupProperties"|undefined} backupProperties + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "backupProperties", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceBackupProperties", "backupApplianceBackupProperties"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup planInfo. + * @member {"gcpBackupPlanInfo"|undefined} planInfo + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "planInfo", { + get: $util.oneOfGetter($oneOfFields = ["gcpBackupPlanInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Backup instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.IBackup=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Backup} Backup instance + */ + Backup.create = function create(properties) { + return new Backup(properties); + }; + + /** + * Encodes the specified Backup message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.IBackup} message Backup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Backup.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).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 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.enforcedRetentionEndTime != null && Object.hasOwnProperty.call(message, "enforcedRetentionEndTime")) + $root.google.protobuf.Timestamp.encode(message.enforcedRetentionEndTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.consistencyTime != null && Object.hasOwnProperty.call(message, "consistencyTime")) + $root.google.protobuf.Timestamp.encode(message.consistencyTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.state); + if (message.serviceLocks != null && message.serviceLocks.length) + for (var i = 0; i < message.serviceLocks.length; ++i) + $root.google.cloud.backupdr.v1.BackupLock.encode(message.serviceLocks[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.backupApplianceLocks != null && message.backupApplianceLocks.length) + for (var i = 0; i < message.backupApplianceLocks.length; ++i) + $root.google.cloud.backupdr.v1.BackupLock.encode(message.backupApplianceLocks[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.computeInstanceBackupProperties != null && Object.hasOwnProperty.call(message, "computeInstanceBackupProperties")) + $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.encode(message.computeInstanceBackupProperties, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.backupType); + if (message.backupApplianceBackupProperties != null && Object.hasOwnProperty.call(message, "backupApplianceBackupProperties")) + $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.encode(message.backupApplianceBackupProperties, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.gcpBackupPlanInfo != null && Object.hasOwnProperty.call(message, "gcpBackupPlanInfo")) + $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.encode(message.gcpBackupPlanInfo, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.resourceSizeBytes != null && Object.hasOwnProperty.call(message, "resourceSizeBytes")) + writer.uint32(/* id 23, wireType 0 =*/184).int64(message.resourceSizeBytes); + return writer; + }; + + /** + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.IBackup} message Backup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Backup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Backup message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Backup} Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Backup.decode = function 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.backupdr.v1.Backup(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + 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 6: { + message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.consistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.etag = reader.string(); + break; + } + case 15: { + message.state = reader.int32(); + break; + } + case 17: { + if (!(message.serviceLocks && message.serviceLocks.length)) + message.serviceLocks = []; + message.serviceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader, reader.uint32())); + break; + } + case 18: { + if (!(message.backupApplianceLocks && message.backupApplianceLocks.length)) + message.backupApplianceLocks = []; + message.backupApplianceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader, reader.uint32())); + break; + } + case 19: { + message.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.decode(reader, reader.uint32()); + break; + } + case 21: { + message.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.decode(reader, reader.uint32()); + break; + } + case 20: { + message.backupType = reader.int32(); + break; + } + case 22: { + message.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.decode(reader, reader.uint32()); + break; + } + case 23: { + message.resourceSizeBytes = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Backup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Backup} Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Backup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Backup message. + * @function verify + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Backup.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.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + properties._createTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + 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.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { + properties._enforcedRetentionEndTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.enforcedRetentionEndTime); + if (error) + return "enforcedRetentionEndTime." + error; + } + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + properties._expireTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + } + if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { + properties._consistencyTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.consistencyTime); + if (error) + return "consistencyTime." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) { + properties._etag = 1; + if (!$util.isString(message.etag)) + return "etag: 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.serviceLocks != null && message.hasOwnProperty("serviceLocks")) { + if (!Array.isArray(message.serviceLocks)) + return "serviceLocks: array expected"; + for (var i = 0; i < message.serviceLocks.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupLock.verify(message.serviceLocks[i]); + if (error) + return "serviceLocks." + error; + } + } + if (message.backupApplianceLocks != null && message.hasOwnProperty("backupApplianceLocks")) { + if (!Array.isArray(message.backupApplianceLocks)) + return "backupApplianceLocks: array expected"; + for (var i = 0; i < message.backupApplianceLocks.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupLock.verify(message.backupApplianceLocks[i]); + if (error) + return "backupApplianceLocks." + error; + } + } + if (message.computeInstanceBackupProperties != null && message.hasOwnProperty("computeInstanceBackupProperties")) { + properties.backupProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify(message.computeInstanceBackupProperties); + if (error) + return "computeInstanceBackupProperties." + error; + } + } + if (message.backupApplianceBackupProperties != null && message.hasOwnProperty("backupApplianceBackupProperties")) { + if (properties.backupProperties === 1) + return "backupProperties: multiple values"; + properties.backupProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify(message.backupApplianceBackupProperties); + if (error) + return "backupApplianceBackupProperties." + error; + } + } + if (message.backupType != null && message.hasOwnProperty("backupType")) + switch (message.backupType) { + default: + return "backupType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.gcpBackupPlanInfo != null && message.hasOwnProperty("gcpBackupPlanInfo")) { + properties.planInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify(message.gcpBackupPlanInfo); + if (error) + return "gcpBackupPlanInfo." + error; + } + } + if (message.resourceSizeBytes != null && message.hasOwnProperty("resourceSizeBytes")) + if (!$util.isInteger(message.resourceSizeBytes) && !(message.resourceSizeBytes && $util.isInteger(message.resourceSizeBytes.low) && $util.isInteger(message.resourceSizeBytes.high))) + return "resourceSizeBytes: integer|Long expected"; + return null; + }; + + /** + * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Backup} Backup + */ + Backup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Backup) + return object; + var message = new $root.google.cloud.backupdr.v1.Backup(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.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.backupdr.v1.Backup.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.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.enforcedRetentionEndTime != null) { + if (typeof object.enforcedRetentionEndTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.enforcedRetentionEndTime: object expected"); + message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.fromObject(object.enforcedRetentionEndTime); + } + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + if (object.consistencyTime != null) { + if (typeof object.consistencyTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.consistencyTime: object expected"); + message.consistencyTime = $root.google.protobuf.Timestamp.fromObject(object.consistencyTime); + } + if (object.etag != null) + message.etag = String(object.etag); + 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 "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.serviceLocks) { + if (!Array.isArray(object.serviceLocks)) + throw TypeError(".google.cloud.backupdr.v1.Backup.serviceLocks: array expected"); + message.serviceLocks = []; + for (var i = 0; i < object.serviceLocks.length; ++i) { + if (typeof object.serviceLocks[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.serviceLocks: object expected"); + message.serviceLocks[i] = $root.google.cloud.backupdr.v1.BackupLock.fromObject(object.serviceLocks[i]); + } + } + if (object.backupApplianceLocks) { + if (!Array.isArray(object.backupApplianceLocks)) + throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceLocks: array expected"); + message.backupApplianceLocks = []; + for (var i = 0; i < object.backupApplianceLocks.length; ++i) { + if (typeof object.backupApplianceLocks[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceLocks: object expected"); + message.backupApplianceLocks[i] = $root.google.cloud.backupdr.v1.BackupLock.fromObject(object.backupApplianceLocks[i]); + } + } + if (object.computeInstanceBackupProperties != null) { + if (typeof object.computeInstanceBackupProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.computeInstanceBackupProperties: object expected"); + message.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.fromObject(object.computeInstanceBackupProperties); + } + if (object.backupApplianceBackupProperties != null) { + if (typeof object.backupApplianceBackupProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceBackupProperties: object expected"); + message.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.fromObject(object.backupApplianceBackupProperties); + } + switch (object.backupType) { + default: + if (typeof object.backupType === "number") { + message.backupType = object.backupType; + break; + } + break; + case "BACKUP_TYPE_UNSPECIFIED": + case 0: + message.backupType = 0; + break; + case "SCHEDULED": + case 1: + message.backupType = 1; + break; + case "ON_DEMAND": + case 2: + message.backupType = 2; + break; + } + if (object.gcpBackupPlanInfo != null) { + if (typeof object.gcpBackupPlanInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.gcpBackupPlanInfo: object expected"); + message.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.fromObject(object.gcpBackupPlanInfo); + } + if (object.resourceSizeBytes != null) + if ($util.Long) + (message.resourceSizeBytes = $util.Long.fromValue(object.resourceSizeBytes)).unsigned = false; + else if (typeof object.resourceSizeBytes === "string") + message.resourceSizeBytes = parseInt(object.resourceSizeBytes, 10); + else if (typeof object.resourceSizeBytes === "number") + message.resourceSizeBytes = object.resourceSizeBytes; + else if (typeof object.resourceSizeBytes === "object") + message.resourceSizeBytes = new $util.LongBits(object.resourceSizeBytes.low >>> 0, object.resourceSizeBytes.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Backup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.Backup} message Backup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Backup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.serviceLocks = []; + object.backupApplianceLocks = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.backupType = options.enums === String ? "BACKUP_TYPE_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.resourceSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.resourceSizeBytes = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (options.oneofs) + object._createTime = "createTime"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + 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.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { + object.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.toObject(message.enforcedRetentionEndTime, options); + if (options.oneofs) + object._enforcedRetentionEndTime = "enforcedRetentionEndTime"; + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (options.oneofs) + object._expireTime = "expireTime"; + } + if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { + object.consistencyTime = $root.google.protobuf.Timestamp.toObject(message.consistencyTime, options); + if (options.oneofs) + object._consistencyTime = "consistencyTime"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + object.etag = message.etag; + if (options.oneofs) + object._etag = "etag"; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.Backup.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.Backup.State[message.state] : message.state; + if (message.serviceLocks && message.serviceLocks.length) { + object.serviceLocks = []; + for (var j = 0; j < message.serviceLocks.length; ++j) + object.serviceLocks[j] = $root.google.cloud.backupdr.v1.BackupLock.toObject(message.serviceLocks[j], options); + } + if (message.backupApplianceLocks && message.backupApplianceLocks.length) { + object.backupApplianceLocks = []; + for (var j = 0; j < message.backupApplianceLocks.length; ++j) + object.backupApplianceLocks[j] = $root.google.cloud.backupdr.v1.BackupLock.toObject(message.backupApplianceLocks[j], options); + } + if (message.computeInstanceBackupProperties != null && message.hasOwnProperty("computeInstanceBackupProperties")) { + object.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.toObject(message.computeInstanceBackupProperties, options); + if (options.oneofs) + object.backupProperties = "computeInstanceBackupProperties"; + } + if (message.backupType != null && message.hasOwnProperty("backupType")) + object.backupType = options.enums === String ? $root.google.cloud.backupdr.v1.Backup.BackupType[message.backupType] === undefined ? message.backupType : $root.google.cloud.backupdr.v1.Backup.BackupType[message.backupType] : message.backupType; + if (message.backupApplianceBackupProperties != null && message.hasOwnProperty("backupApplianceBackupProperties")) { + object.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.toObject(message.backupApplianceBackupProperties, options); + if (options.oneofs) + object.backupProperties = "backupApplianceBackupProperties"; + } + if (message.gcpBackupPlanInfo != null && message.hasOwnProperty("gcpBackupPlanInfo")) { + object.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.toObject(message.gcpBackupPlanInfo, options); + if (options.oneofs) + object.planInfo = "gcpBackupPlanInfo"; + } + if (message.resourceSizeBytes != null && message.hasOwnProperty("resourceSizeBytes")) + if (typeof message.resourceSizeBytes === "number") + object.resourceSizeBytes = options.longs === String ? String(message.resourceSizeBytes) : message.resourceSizeBytes; + else + object.resourceSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resourceSizeBytes) : options.longs === Number ? new $util.LongBits(message.resourceSizeBytes.low >>> 0, message.resourceSizeBytes.high >>> 0).toNumber() : message.resourceSizeBytes; + return object; + }; + + /** + * Converts this Backup to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Backup + * @instance + * @returns {Object.} JSON object + */ + Backup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Backup + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Backup"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.Backup.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} ERROR=4 ERROR value + */ + Backup.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + /** + * BackupType enum. + * @name google.cloud.backupdr.v1.Backup.BackupType + * @enum {number} + * @property {number} BACKUP_TYPE_UNSPECIFIED=0 BACKUP_TYPE_UNSPECIFIED value + * @property {number} SCHEDULED=1 SCHEDULED value + * @property {number} ON_DEMAND=2 ON_DEMAND value + */ + Backup.BackupType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCHEDULED"] = 1; + values[valuesById[2] = "ON_DEMAND"] = 2; + return values; + })(); + + Backup.GCPBackupPlanInfo = (function() { + + /** + * Properties of a GCPBackupPlanInfo. + * @memberof google.cloud.backupdr.v1.Backup + * @interface IGCPBackupPlanInfo + * @property {string|null} [backupPlan] GCPBackupPlanInfo backupPlan + * @property {string|null} [backupPlanRuleId] GCPBackupPlanInfo backupPlanRuleId + */ + + /** + * Constructs a new GCPBackupPlanInfo. + * @memberof google.cloud.backupdr.v1.Backup + * @classdesc Represents a GCPBackupPlanInfo. + * @implements IGCPBackupPlanInfo + * @constructor + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo=} [properties] Properties to set + */ + function GCPBackupPlanInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GCPBackupPlanInfo backupPlan. + * @member {string} backupPlan + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @instance + */ + GCPBackupPlanInfo.prototype.backupPlan = ""; + + /** + * GCPBackupPlanInfo backupPlanRuleId. + * @member {string} backupPlanRuleId + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @instance + */ + GCPBackupPlanInfo.prototype.backupPlanRuleId = ""; + + /** + * Creates a new GCPBackupPlanInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo instance + */ + GCPBackupPlanInfo.create = function create(properties) { + return new GCPBackupPlanInfo(properties); + }; + + /** + * Encodes the specified GCPBackupPlanInfo message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo} message GCPBackupPlanInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GCPBackupPlanInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPlan); + if (message.backupPlanRuleId != null && Object.hasOwnProperty.call(message, "backupPlanRuleId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanRuleId); + return writer; + }; + + /** + * Encodes the specified GCPBackupPlanInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo} message GCPBackupPlanInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GCPBackupPlanInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GCPBackupPlanInfo.decode = function 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.backupdr.v1.Backup.GCPBackupPlanInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backupPlan = reader.string(); + break; + } + case 2: { + message.backupPlanRuleId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GCPBackupPlanInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GCPBackupPlanInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GCPBackupPlanInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + if (!$util.isString(message.backupPlan)) + return "backupPlan: string expected"; + if (message.backupPlanRuleId != null && message.hasOwnProperty("backupPlanRuleId")) + if (!$util.isString(message.backupPlanRuleId)) + return "backupPlanRuleId: string expected"; + return null; + }; + + /** + * Creates a GCPBackupPlanInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo + */ + GCPBackupPlanInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo(); + if (object.backupPlan != null) + message.backupPlan = String(object.backupPlan); + if (object.backupPlanRuleId != null) + message.backupPlanRuleId = String(object.backupPlanRuleId); + return message; + }; + + /** + * Creates a plain object from a GCPBackupPlanInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} message GCPBackupPlanInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GCPBackupPlanInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.backupPlan = ""; + object.backupPlanRuleId = ""; + } + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + object.backupPlan = message.backupPlan; + if (message.backupPlanRuleId != null && message.hasOwnProperty("backupPlanRuleId")) + object.backupPlanRuleId = message.backupPlanRuleId; + return object; + }; + + /** + * Converts this GCPBackupPlanInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @instance + * @returns {Object.} JSON object + */ + GCPBackupPlanInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GCPBackupPlanInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GCPBackupPlanInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo"; + }; + + return GCPBackupPlanInfo; + })(); + + return Backup; + })(); + + v1.CreateBackupVaultRequest = (function() { + + /** + * Properties of a CreateBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ICreateBackupVaultRequest + * @property {string|null} [parent] CreateBackupVaultRequest parent + * @property {string|null} [backupVaultId] CreateBackupVaultRequest backupVaultId + * @property {google.cloud.backupdr.v1.IBackupVault|null} [backupVault] CreateBackupVaultRequest backupVault + * @property {string|null} [requestId] CreateBackupVaultRequest requestId + * @property {boolean|null} [validateOnly] CreateBackupVaultRequest validateOnly + */ + + /** + * Constructs a new CreateBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CreateBackupVaultRequest. + * @implements ICreateBackupVaultRequest + * @constructor + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest=} [properties] Properties to set + */ + function CreateBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBackupVaultRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.parent = ""; + + /** + * CreateBackupVaultRequest backupVaultId. + * @member {string} backupVaultId + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.backupVaultId = ""; + + /** + * CreateBackupVaultRequest backupVault. + * @member {google.cloud.backupdr.v1.IBackupVault|null|undefined} backupVault + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.backupVault = null; + + /** + * CreateBackupVaultRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.requestId = ""; + + /** + * CreateBackupVaultRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest instance + */ + CreateBackupVaultRequest.create = function create(properties) { + return new CreateBackupVaultRequest(properties); + }; + + /** + * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupVaultRequest.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.backupVaultId != null && Object.hasOwnProperty.call(message, "backupVaultId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupVaultId); + if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVault, 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); + return writer; + }; + + /** + * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupVaultRequest.decode = function 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.backupdr.v1.CreateBackupVaultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.backupVaultId = reader.string(); + break; + } + case 3: { + message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBackupVaultRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBackupVaultRequest.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.backupVaultId != null && message.hasOwnProperty("backupVaultId")) + if (!$util.isString(message.backupVaultId)) + return "backupVaultId: string expected"; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault); + if (error) + return "backupVault." + 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"; + return null; + }; + + /** + * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest + */ + CreateBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupVaultRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.CreateBackupVaultRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupVaultId != null) + message.backupVaultId = String(object.backupVaultId); + if (object.backupVault != null) { + if (typeof object.backupVault !== "object") + throw TypeError(".google.cloud.backupdr.v1.CreateBackupVaultRequest.backupVault: object expected"); + message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVault); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.CreateBackupVaultRequest} message CreateBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupVaultId = ""; + object.backupVault = null; + object.requestId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupVaultId != null && message.hasOwnProperty("backupVaultId")) + object.backupVaultId = message.backupVaultId; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) + object.backupVault = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVault, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupVaultRequest"; + }; + + return CreateBackupVaultRequest; + })(); + + v1.ListBackupVaultsRequest = (function() { + + /** + * Properties of a ListBackupVaultsRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupVaultsRequest + * @property {string|null} [parent] ListBackupVaultsRequest parent + * @property {number|null} [pageSize] ListBackupVaultsRequest pageSize + * @property {string|null} [pageToken] ListBackupVaultsRequest pageToken + * @property {string|null} [filter] ListBackupVaultsRequest filter + * @property {string|null} [orderBy] ListBackupVaultsRequest orderBy + * @property {google.cloud.backupdr.v1.BackupVaultView|null} [view] ListBackupVaultsRequest view + */ + + /** + * Constructs a new ListBackupVaultsRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupVaultsRequest. + * @implements IListBackupVaultsRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest=} [properties] Properties to set + */ + function ListBackupVaultsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupVaultsRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.parent = ""; + + /** + * ListBackupVaultsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.pageSize = 0; + + /** + * ListBackupVaultsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.pageToken = ""; + + /** + * ListBackupVaultsRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.filter = ""; + + /** + * ListBackupVaultsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.orderBy = ""; + + /** + * ListBackupVaultsRequest view. + * @member {google.cloud.backupdr.v1.BackupVaultView} view + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.view = 0; + + /** + * Creates a new ListBackupVaultsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest instance + */ + ListBackupVaultsRequest.create = function create(properties) { + return new ListBackupVaultsRequest(properties); + }; + + /** + * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsRequest.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); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); + return writer; + }; + + /** + * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsRequest.decode = function 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.backupdr.v1.ListBackupVaultsRequest(); + 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; + } + case 6: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupVaultsRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupVaultsRequest.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"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest + */ + ListBackupVaultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupVaultsRequest(); + 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); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VAULT_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VAULT_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VAULT_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.ListBackupVaultsRequest} message ListBackupVaultsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupVaultsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.view = options.enums === String ? "BACKUP_VAULT_VIEW_UNSPECIFIED" : 0; + } + 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; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVaultView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupVaultView[message.view] : message.view; + return object; + }; + + /** + * Converts this ListBackupVaultsRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupVaultsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupVaultsRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupVaultsRequest"; + }; + + return ListBackupVaultsRequest; + })(); + + v1.ListBackupVaultsResponse = (function() { + + /** + * Properties of a ListBackupVaultsResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupVaultsResponse + * @property {Array.|null} [backupVaults] ListBackupVaultsResponse backupVaults + * @property {string|null} [nextPageToken] ListBackupVaultsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupVaultsResponse unreachable + */ + + /** + * Constructs a new ListBackupVaultsResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupVaultsResponse. + * @implements IListBackupVaultsResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse=} [properties] Properties to set + */ + function ListBackupVaultsResponse(properties) { + this.backupVaults = []; + 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]]; + } + + /** + * ListBackupVaultsResponse backupVaults. + * @member {Array.} backupVaults + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @instance + */ + ListBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; + + /** + * ListBackupVaultsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @instance + */ + ListBackupVaultsResponse.prototype.nextPageToken = ""; + + /** + * ListBackupVaultsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @instance + */ + ListBackupVaultsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupVaultsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse instance + */ + ListBackupVaultsResponse.create = function create(properties) { + return new ListBackupVaultsResponse(properties); + }; + + /** + * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupVaults != null && message.backupVaults.length) + for (var i = 0; i < message.backupVaults.length; ++i) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVaults[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 ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsResponse.decode = function 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.backupdr.v1.ListBackupVaultsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backupVaults && message.backupVaults.length)) + message.backupVaults = []; + message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.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 ListBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupVaultsResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupVaultsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { + if (!Array.isArray(message.backupVaults)) + return "backupVaults: array expected"; + for (var i = 0; i < message.backupVaults.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVaults[i]); + if (error) + return "backupVaults." + 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 ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse + */ + ListBackupVaultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupVaultsResponse(); + if (object.backupVaults) { + if (!Array.isArray(object.backupVaults)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.backupVaults: array expected"); + message.backupVaults = []; + for (var i = 0; i < object.backupVaults.length; ++i) { + if (typeof object.backupVaults[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.backupVaults: object expected"); + message.backupVaults[i] = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVaults[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.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 ListBackupVaultsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.ListBackupVaultsResponse} message ListBackupVaultsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupVaultsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupVaults = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backupVaults && message.backupVaults.length) { + object.backupVaults = []; + for (var j = 0; j < message.backupVaults.length; ++j) + object.backupVaults[j] = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVaults[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 ListBackupVaultsResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupVaultsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupVaultsResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupVaultsResponse"; + }; + + return ListBackupVaultsResponse; + })(); + + v1.FetchUsableBackupVaultsRequest = (function() { + + /** + * Properties of a FetchUsableBackupVaultsRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IFetchUsableBackupVaultsRequest + * @property {string|null} [parent] FetchUsableBackupVaultsRequest parent + * @property {number|null} [pageSize] FetchUsableBackupVaultsRequest pageSize + * @property {string|null} [pageToken] FetchUsableBackupVaultsRequest pageToken + * @property {string|null} [filter] FetchUsableBackupVaultsRequest filter + * @property {string|null} [orderBy] FetchUsableBackupVaultsRequest orderBy + */ + + /** + * Constructs a new FetchUsableBackupVaultsRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FetchUsableBackupVaultsRequest. + * @implements IFetchUsableBackupVaultsRequest + * @constructor + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest=} [properties] Properties to set + */ + function FetchUsableBackupVaultsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchUsableBackupVaultsRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.parent = ""; + + /** + * FetchUsableBackupVaultsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.pageSize = 0; + + /** + * FetchUsableBackupVaultsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.pageToken = ""; + + /** + * FetchUsableBackupVaultsRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.filter = ""; + + /** + * FetchUsableBackupVaultsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.orderBy = ""; + + /** + * Creates a new FetchUsableBackupVaultsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest instance + */ + FetchUsableBackupVaultsRequest.create = function create(properties) { + return new FetchUsableBackupVaultsRequest(properties); + }; + + /** + * Encodes the specified FetchUsableBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchUsableBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchUsableBackupVaultsRequest.decode = function 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.backupdr.v1.FetchUsableBackupVaultsRequest(); + 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 FetchUsableBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchUsableBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchUsableBackupVaultsRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest + */ + FetchUsableBackupVaultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest(); + 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 FetchUsableBackupVaultsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + * @returns {Object.} JSON object + */ + FetchUsableBackupVaultsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchUsableBackupVaultsRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchUsableBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest"; + }; + + return FetchUsableBackupVaultsRequest; + })(); + + v1.FetchUsableBackupVaultsResponse = (function() { + + /** + * Properties of a FetchUsableBackupVaultsResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IFetchUsableBackupVaultsResponse + * @property {Array.|null} [backupVaults] FetchUsableBackupVaultsResponse backupVaults + * @property {string|null} [nextPageToken] FetchUsableBackupVaultsResponse nextPageToken + * @property {Array.|null} [unreachable] FetchUsableBackupVaultsResponse unreachable + */ + + /** + * Constructs a new FetchUsableBackupVaultsResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FetchUsableBackupVaultsResponse. + * @implements IFetchUsableBackupVaultsResponse + * @constructor + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse=} [properties] Properties to set + */ + function FetchUsableBackupVaultsResponse(properties) { + this.backupVaults = []; + 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]]; + } + + /** + * FetchUsableBackupVaultsResponse backupVaults. + * @member {Array.} backupVaults + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @instance + */ + FetchUsableBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; + + /** + * FetchUsableBackupVaultsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @instance + */ + FetchUsableBackupVaultsResponse.prototype.nextPageToken = ""; + + /** + * FetchUsableBackupVaultsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @instance + */ + FetchUsableBackupVaultsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new FetchUsableBackupVaultsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse instance + */ + FetchUsableBackupVaultsResponse.create = function create(properties) { + return new FetchUsableBackupVaultsResponse(properties); + }; + + /** + * Encodes the specified FetchUsableBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchUsableBackupVaultsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupVaults != null && message.backupVaults.length) + for (var i = 0; i < message.backupVaults.length; ++i) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVaults[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 FetchUsableBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchUsableBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchUsableBackupVaultsResponse.decode = function 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.backupdr.v1.FetchUsableBackupVaultsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backupVaults && message.backupVaults.length)) + message.backupVaults = []; + message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.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 FetchUsableBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchUsableBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchUsableBackupVaultsResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchUsableBackupVaultsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { + if (!Array.isArray(message.backupVaults)) + return "backupVaults: array expected"; + for (var i = 0; i < message.backupVaults.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVaults[i]); + if (error) + return "backupVaults." + 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 FetchUsableBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse + */ + FetchUsableBackupVaultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse(); + if (object.backupVaults) { + if (!Array.isArray(object.backupVaults)) + throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.backupVaults: array expected"); + message.backupVaults = []; + for (var i = 0; i < object.backupVaults.length; ++i) { + if (typeof object.backupVaults[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.backupVaults: object expected"); + message.backupVaults[i] = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVaults[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.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 FetchUsableBackupVaultsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchUsableBackupVaultsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupVaults = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backupVaults && message.backupVaults.length) { + object.backupVaults = []; + for (var j = 0; j < message.backupVaults.length; ++j) + object.backupVaults[j] = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVaults[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 FetchUsableBackupVaultsResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @instance + * @returns {Object.} JSON object + */ + FetchUsableBackupVaultsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchUsableBackupVaultsResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchUsableBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse"; + }; + + return FetchUsableBackupVaultsResponse; + })(); + + v1.GetBackupVaultRequest = (function() { + + /** + * Properties of a GetBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetBackupVaultRequest + * @property {string|null} [name] GetBackupVaultRequest name + * @property {google.cloud.backupdr.v1.BackupVaultView|null} [view] GetBackupVaultRequest view + */ + + /** + * Constructs a new GetBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetBackupVaultRequest. + * @implements IGetBackupVaultRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest=} [properties] Properties to set + */ + function GetBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupVaultRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @instance + */ + GetBackupVaultRequest.prototype.name = ""; + + /** + * GetBackupVaultRequest view. + * @member {google.cloud.backupdr.v1.BackupVaultView} view + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @instance + */ + GetBackupVaultRequest.prototype.view = 0; + + /** + * Creates a new GetBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest instance + */ + GetBackupVaultRequest.create = function create(properties) { + return new GetBackupVaultRequest(properties); + }; + + /** + * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupVaultRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupVaultRequest.decode = function 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.backupdr.v1.GetBackupVaultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupVaultRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupVaultRequest.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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest + */ + GetBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupVaultRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetBackupVaultRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VAULT_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VAULT_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VAULT_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.GetBackupVaultRequest} message GetBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "BACKUP_VAULT_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVaultView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupVaultView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupVaultRequest"; + }; + + return GetBackupVaultRequest; + })(); + + v1.UpdateBackupVaultRequest = (function() { + + /** + * Properties of an UpdateBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IUpdateBackupVaultRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupVaultRequest updateMask + * @property {google.cloud.backupdr.v1.IBackupVault|null} [backupVault] UpdateBackupVaultRequest backupVault + * @property {string|null} [requestId] UpdateBackupVaultRequest requestId + * @property {boolean|null} [validateOnly] UpdateBackupVaultRequest validateOnly + * @property {boolean|null} [force] UpdateBackupVaultRequest force + */ + + /** + * Constructs a new UpdateBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an UpdateBackupVaultRequest. + * @implements IUpdateBackupVaultRequest + * @constructor + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest=} [properties] Properties to set + */ + function UpdateBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateBackupVaultRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.updateMask = null; + + /** + * UpdateBackupVaultRequest backupVault. + * @member {google.cloud.backupdr.v1.IBackupVault|null|undefined} backupVault + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.backupVault = null; + + /** + * UpdateBackupVaultRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.requestId = ""; + + /** + * UpdateBackupVaultRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.validateOnly = false; + + /** + * UpdateBackupVaultRequest force. + * @member {boolean} force + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.force = false; + + /** + * Creates a new UpdateBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest instance + */ + UpdateBackupVaultRequest.create = function create(properties) { + return new UpdateBackupVaultRequest(properties); + }; + + /** + * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupVaultRequest.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.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVault, 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 UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupVaultRequest.decode = function 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.backupdr.v1.UpdateBackupVaultRequest(); + 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.backupVault = $root.google.cloud.backupdr.v1.BackupVault.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 UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateBackupVaultRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateBackupVaultRequest.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.backupVault != null && message.hasOwnProperty("backupVault")) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault); + if (error) + return "backupVault." + 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 UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest + */ + UpdateBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupVaultRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.backupVault != null) { + if (typeof object.backupVault !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupVaultRequest.backupVault: object expected"); + message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVault); + } + 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 UpdateBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.UpdateBackupVaultRequest} message UpdateBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.backupVault = 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.backupVault != null && message.hasOwnProperty("backupVault")) + object.backupVault = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVault, 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 UpdateBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupVaultRequest"; + }; + + return UpdateBackupVaultRequest; + })(); + + v1.DeleteBackupVaultRequest = (function() { + + /** + * Properties of a DeleteBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IDeleteBackupVaultRequest + * @property {string|null} [name] DeleteBackupVaultRequest name + * @property {string|null} [requestId] DeleteBackupVaultRequest requestId + * @property {boolean|null} [force] DeleteBackupVaultRequest force + * @property {string|null} [etag] DeleteBackupVaultRequest etag + * @property {boolean|null} [validateOnly] DeleteBackupVaultRequest validateOnly + * @property {boolean|null} [allowMissing] DeleteBackupVaultRequest allowMissing + */ + + /** + * Constructs a new DeleteBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DeleteBackupVaultRequest. + * @implements IDeleteBackupVaultRequest + * @constructor + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest=} [properties] Properties to set + */ + function DeleteBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupVaultRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.name = ""; + + /** + * DeleteBackupVaultRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.requestId = ""; + + /** + * DeleteBackupVaultRequest force. + * @member {boolean} force + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.force = false; + + /** + * DeleteBackupVaultRequest etag. + * @member {string} etag + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.etag = ""; + + /** + * DeleteBackupVaultRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.validateOnly = false; + + /** + * DeleteBackupVaultRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.allowMissing = false; + + /** + * Creates a new DeleteBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest instance + */ + DeleteBackupVaultRequest.create = function create(properties) { + return new DeleteBackupVaultRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupVaultRequest.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); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.allowMissing); + return writer; + }; + + /** + * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupVaultRequest.decode = function 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.backupdr.v1.DeleteBackupVaultRequest(); + 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; + } + case 4: { + message.etag = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } + case 6: { + message.allowMissing = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupVaultRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupVaultRequest.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"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + return null; + }; + + /** + * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest + */ + DeleteBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest(); + 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); + if (object.etag != null) + message.etag = String(object.etag); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + return message; + }; + + /** + * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.DeleteBackupVaultRequest} message DeleteBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + object.force = false; + object.etag = ""; + object.validateOnly = false; + object.allowMissing = 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; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + return object; + }; + + /** + * Converts this DeleteBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupVaultRequest"; + }; + + return DeleteBackupVaultRequest; + })(); + + v1.ListDataSourcesRequest = (function() { + + /** + * Properties of a ListDataSourcesRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListDataSourcesRequest + * @property {string|null} [parent] ListDataSourcesRequest parent + * @property {number|null} [pageSize] ListDataSourcesRequest pageSize + * @property {string|null} [pageToken] ListDataSourcesRequest pageToken + * @property {string|null} [filter] ListDataSourcesRequest filter + * @property {string|null} [orderBy] ListDataSourcesRequest orderBy + */ + + /** + * Constructs a new ListDataSourcesRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListDataSourcesRequest. + * @implements IListDataSourcesRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest=} [properties] Properties to set + */ + function ListDataSourcesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataSourcesRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.parent = ""; + + /** + * ListDataSourcesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.pageSize = 0; + + /** + * ListDataSourcesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.pageToken = ""; + + /** + * ListDataSourcesRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.filter = ""; + + /** + * ListDataSourcesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListDataSourcesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest instance + */ + ListDataSourcesRequest.create = function create(properties) { + return new ListDataSourcesRequest(properties); + }; + + /** + * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesRequest.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 ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataSourcesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesRequest.decode = function 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.backupdr.v1.ListDataSourcesRequest(); + 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 ListDataSourcesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataSourcesRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataSourcesRequest.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 ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest + */ + ListDataSourcesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListDataSourcesRequest(); + 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 ListDataSourcesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.backupdr.v1.ListDataSourcesRequest} message ListDataSourcesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataSourcesRequest.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 ListDataSourcesRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataSourcesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataSourcesRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataSourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourcesRequest"; + }; + + return ListDataSourcesRequest; + })(); + + v1.ListDataSourcesResponse = (function() { + + /** + * Properties of a ListDataSourcesResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListDataSourcesResponse + * @property {Array.|null} [dataSources] ListDataSourcesResponse dataSources + * @property {string|null} [nextPageToken] ListDataSourcesResponse nextPageToken + * @property {Array.|null} [unreachable] ListDataSourcesResponse unreachable + */ + + /** + * Constructs a new ListDataSourcesResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListDataSourcesResponse. + * @implements IListDataSourcesResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse=} [properties] Properties to set + */ + function ListDataSourcesResponse(properties) { + this.dataSources = []; + 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]]; + } + + /** + * ListDataSourcesResponse dataSources. + * @member {Array.} dataSources + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @instance + */ + ListDataSourcesResponse.prototype.dataSources = $util.emptyArray; + + /** + * ListDataSourcesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @instance + */ + ListDataSourcesResponse.prototype.nextPageToken = ""; + + /** + * ListDataSourcesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @instance + */ + ListDataSourcesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListDataSourcesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse instance + */ + ListDataSourcesResponse.create = function create(properties) { + return new ListDataSourcesResponse(properties); + }; + + /** + * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSources != null && message.dataSources.length) + for (var i = 0; i < message.dataSources.length; ++i) + $root.google.cloud.backupdr.v1.DataSource.encode(message.dataSources[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 ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataSourcesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesResponse.decode = function 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.backupdr.v1.ListDataSourcesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataSources && message.dataSources.length)) + message.dataSources = []; + message.dataSources.push($root.google.cloud.backupdr.v1.DataSource.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 ListDataSourcesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataSourcesResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataSourcesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSources != null && message.hasOwnProperty("dataSources")) { + if (!Array.isArray(message.dataSources)) + return "dataSources: array expected"; + for (var i = 0; i < message.dataSources.length; ++i) { + var error = $root.google.cloud.backupdr.v1.DataSource.verify(message.dataSources[i]); + if (error) + return "dataSources." + 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 ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse + */ + ListDataSourcesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListDataSourcesResponse(); + if (object.dataSources) { + if (!Array.isArray(object.dataSources)) + throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.dataSources: array expected"); + message.dataSources = []; + for (var i = 0; i < object.dataSources.length; ++i) { + if (typeof object.dataSources[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.dataSources: object expected"); + message.dataSources[i] = $root.google.cloud.backupdr.v1.DataSource.fromObject(object.dataSources[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.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 ListDataSourcesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.backupdr.v1.ListDataSourcesResponse} message ListDataSourcesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataSourcesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataSources = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.dataSources && message.dataSources.length) { + object.dataSources = []; + for (var j = 0; j < message.dataSources.length; ++j) + object.dataSources[j] = $root.google.cloud.backupdr.v1.DataSource.toObject(message.dataSources[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 ListDataSourcesResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataSourcesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataSourcesResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataSourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourcesResponse"; + }; + + return ListDataSourcesResponse; + })(); + + v1.GetDataSourceRequest = (function() { + + /** + * Properties of a GetDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetDataSourceRequest + * @property {string|null} [name] GetDataSourceRequest name + */ + + /** + * Constructs a new GetDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetDataSourceRequest. + * @implements IGetDataSourceRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest=} [properties] Properties to set + */ + function GetDataSourceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataSourceRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @instance + */ + GetDataSourceRequest.prototype.name = ""; + + /** + * Creates a new GetDataSourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest instance + */ + GetDataSourceRequest.create = function create(properties) { + return new GetDataSourceRequest(properties); + }; + + /** + * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataSourceRequest.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 GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataSourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataSourceRequest.decode = function 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.backupdr.v1.GetDataSourceRequest(); + 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 GetDataSourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataSourceRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataSourceRequest.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 GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest + */ + GetDataSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetDataSourceRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetDataSourceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.GetDataSourceRequest} message GetDataSourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataSourceRequest.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 GetDataSourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataSourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataSourceRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetDataSourceRequest"; + }; + + return GetDataSourceRequest; + })(); + + v1.UpdateDataSourceRequest = (function() { + + /** + * Properties of an UpdateDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IUpdateDataSourceRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataSourceRequest updateMask + * @property {google.cloud.backupdr.v1.IDataSource|null} [dataSource] UpdateDataSourceRequest dataSource + * @property {string|null} [requestId] UpdateDataSourceRequest requestId + * @property {boolean|null} [allowMissing] UpdateDataSourceRequest allowMissing + */ + + /** + * Constructs a new UpdateDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an UpdateDataSourceRequest. + * @implements IUpdateDataSourceRequest + * @constructor + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest=} [properties] Properties to set + */ + function UpdateDataSourceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDataSourceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + */ + UpdateDataSourceRequest.prototype.updateMask = null; + + /** + * UpdateDataSourceRequest dataSource. + * @member {google.cloud.backupdr.v1.IDataSource|null|undefined} dataSource + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + */ + UpdateDataSourceRequest.prototype.dataSource = null; + + /** + * UpdateDataSourceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + */ + UpdateDataSourceRequest.prototype.requestId = ""; + + /** + * UpdateDataSourceRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + */ + UpdateDataSourceRequest.prototype.allowMissing = false; + + /** + * Creates a new UpdateDataSourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest instance + */ + UpdateDataSourceRequest.create = function create(properties) { + return new UpdateDataSourceRequest(properties); + }; + + /** + * Encodes the specified UpdateDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} message UpdateDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataSourceRequest.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.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + $root.google.cloud.backupdr.v1.DataSource.encode(message.dataSource, 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.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowMissing); + return writer; + }; + + /** + * Encodes the specified UpdateDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} message UpdateDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataSourceRequest.decode = function 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.backupdr.v1.UpdateDataSourceRequest(); + 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.dataSource = $root.google.cloud.backupdr.v1.DataSource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + case 4: { + message.allowMissing = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDataSourceRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDataSourceRequest.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.dataSource != null && message.hasOwnProperty("dataSource")) { + var error = $root.google.cloud.backupdr.v1.DataSource.verify(message.dataSource); + if (error) + return "dataSource." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + return null; + }; + + /** + * Creates an UpdateDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest + */ + UpdateDataSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.UpdateDataSourceRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.UpdateDataSourceRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateDataSourceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.dataSource != null) { + if (typeof object.dataSource !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateDataSourceRequest.dataSource: object expected"); + message.dataSource = $root.google.cloud.backupdr.v1.DataSource.fromObject(object.dataSource); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + return message; + }; + + /** + * Creates a plain object from an UpdateDataSourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.UpdateDataSourceRequest} message UpdateDataSourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDataSourceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.dataSource = null; + object.requestId = ""; + object.allowMissing = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = $root.google.cloud.backupdr.v1.DataSource.toObject(message.dataSource, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + return object; + }; + + /** + * Converts this UpdateDataSourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDataSourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDataSourceRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateDataSourceRequest"; + }; + + return UpdateDataSourceRequest; + })(); + + v1.RemoveDataSourceRequest = (function() { + + /** + * Properties of a RemoveDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IRemoveDataSourceRequest + * @property {string|null} [name] RemoveDataSourceRequest name + * @property {string|null} [requestId] RemoveDataSourceRequest requestId + */ + + /** + * Constructs a new RemoveDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a RemoveDataSourceRequest. + * @implements IRemoveDataSourceRequest + * @constructor + * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest=} [properties] Properties to set + */ + function RemoveDataSourceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemoveDataSourceRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @instance + */ + RemoveDataSourceRequest.prototype.name = ""; + + /** + * RemoveDataSourceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @instance + */ + RemoveDataSourceRequest.prototype.requestId = ""; + + /** + * Creates a new RemoveDataSourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest instance + */ + RemoveDataSourceRequest.create = function create(properties) { + return new RemoveDataSourceRequest(properties); + }; + + /** + * Encodes the specified RemoveDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} message RemoveDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveDataSourceRequest.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 RemoveDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} message RemoveDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveDataSourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveDataSourceRequest.decode = function 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.backupdr.v1.RemoveDataSourceRequest(); + 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 RemoveDataSourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveDataSourceRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveDataSourceRequest.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 RemoveDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest + */ + RemoveDataSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RemoveDataSourceRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.RemoveDataSourceRequest(); + 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 RemoveDataSourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.RemoveDataSourceRequest} message RemoveDataSourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveDataSourceRequest.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 RemoveDataSourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @instance + * @returns {Object.} JSON object + */ + RemoveDataSourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemoveDataSourceRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.RemoveDataSourceRequest"; + }; + + return RemoveDataSourceRequest; + })(); + + v1.SetInternalStatusRequest = (function() { + + /** + * Properties of a SetInternalStatusRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ISetInternalStatusRequest + * @property {string|null} [dataSource] SetInternalStatusRequest dataSource + * @property {Uint8Array|null} [value] SetInternalStatusRequest value + * @property {google.cloud.backupdr.v1.BackupConfigState|null} [backupConfigState] SetInternalStatusRequest backupConfigState + * @property {string|null} [requestId] SetInternalStatusRequest requestId + */ + + /** + * Constructs a new SetInternalStatusRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a SetInternalStatusRequest. + * @implements ISetInternalStatusRequest + * @constructor + * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest=} [properties] Properties to set + */ + function SetInternalStatusRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetInternalStatusRequest dataSource. + * @member {string} dataSource + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @instance + */ + SetInternalStatusRequest.prototype.dataSource = ""; + + /** + * SetInternalStatusRequest value. + * @member {Uint8Array} value + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @instance + */ + SetInternalStatusRequest.prototype.value = $util.newBuffer([]); + + /** + * SetInternalStatusRequest backupConfigState. + * @member {google.cloud.backupdr.v1.BackupConfigState} backupConfigState + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @instance + */ + SetInternalStatusRequest.prototype.backupConfigState = 0; + + /** + * SetInternalStatusRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @instance + */ + SetInternalStatusRequest.prototype.requestId = ""; + + /** + * Creates a new SetInternalStatusRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest instance + */ + SetInternalStatusRequest.create = function create(properties) { + return new SetInternalStatusRequest(properties); + }; + + /** + * Encodes the specified SetInternalStatusRequest message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} message SetInternalStatusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetInternalStatusRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.backupConfigState != null && Object.hasOwnProperty.call(message, "backupConfigState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.backupConfigState); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified SetInternalStatusRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} message SetInternalStatusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetInternalStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetInternalStatusRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetInternalStatusRequest.decode = function 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.backupdr.v1.SetInternalStatusRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataSource = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + case 3: { + message.backupConfigState = reader.int32(); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetInternalStatusRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetInternalStatusRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetInternalStatusRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetInternalStatusRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: 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"; + if (message.backupConfigState != null && message.hasOwnProperty("backupConfigState")) + switch (message.backupConfigState) { + default: + return "backupConfigState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a SetInternalStatusRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest + */ + SetInternalStatusRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.SetInternalStatusRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.SetInternalStatusRequest(); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + 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; + switch (object.backupConfigState) { + default: + if (typeof object.backupConfigState === "number") { + message.backupConfigState = object.backupConfigState; + break; + } + break; + case "BACKUP_CONFIG_STATE_UNSPECIFIED": + case 0: + message.backupConfigState = 0; + break; + case "ACTIVE": + case 1: + message.backupConfigState = 1; + break; + case "PASSIVE": + case 2: + message.backupConfigState = 2; + break; + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a SetInternalStatusRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {google.cloud.backupdr.v1.SetInternalStatusRequest} message SetInternalStatusRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetInternalStatusRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataSource = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + object.backupConfigState = options.enums === String ? "BACKUP_CONFIG_STATE_UNSPECIFIED" : 0; + object.requestId = ""; + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + 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; + if (message.backupConfigState != null && message.hasOwnProperty("backupConfigState")) + object.backupConfigState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigState[message.backupConfigState] === undefined ? message.backupConfigState : $root.google.cloud.backupdr.v1.BackupConfigState[message.backupConfigState] : message.backupConfigState; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this SetInternalStatusRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @instance + * @returns {Object.} JSON object + */ + SetInternalStatusRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetInternalStatusRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetInternalStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.SetInternalStatusRequest"; + }; + + return SetInternalStatusRequest; + })(); + + v1.SetInternalStatusResponse = (function() { + + /** + * Properties of a SetInternalStatusResponse. + * @memberof google.cloud.backupdr.v1 + * @interface ISetInternalStatusResponse + */ + + /** + * Constructs a new SetInternalStatusResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a SetInternalStatusResponse. + * @implements ISetInternalStatusResponse + * @constructor + * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse=} [properties] Properties to set + */ + function SetInternalStatusResponse(properties) { + if (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 SetInternalStatusResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse instance + */ + SetInternalStatusResponse.create = function create(properties) { + return new SetInternalStatusResponse(properties); + }; + + /** + * Encodes the specified SetInternalStatusResponse message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse} message SetInternalStatusResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetInternalStatusResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified SetInternalStatusResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse} message SetInternalStatusResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetInternalStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetInternalStatusResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetInternalStatusResponse.decode = function 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.backupdr.v1.SetInternalStatusResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetInternalStatusResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetInternalStatusResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetInternalStatusResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetInternalStatusResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a SetInternalStatusResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse + */ + SetInternalStatusResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.SetInternalStatusResponse) + return object; + return new $root.google.cloud.backupdr.v1.SetInternalStatusResponse(); + }; + + /** + * Creates a plain object from a SetInternalStatusResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {google.cloud.backupdr.v1.SetInternalStatusResponse} message SetInternalStatusResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetInternalStatusResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SetInternalStatusResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @instance + * @returns {Object.} JSON object + */ + SetInternalStatusResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetInternalStatusResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetInternalStatusResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.SetInternalStatusResponse"; + }; + + return SetInternalStatusResponse; + })(); + + v1.InitiateBackupRequest = (function() { + + /** + * Properties of an InitiateBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IInitiateBackupRequest + * @property {string|null} [dataSource] InitiateBackupRequest dataSource + * @property {string|null} [requestId] InitiateBackupRequest requestId + * @property {string|null} [backupId] InitiateBackupRequest backupId + */ + + /** + * Constructs a new InitiateBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an InitiateBackupRequest. + * @implements IInitiateBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IInitiateBackupRequest=} [properties] Properties to set + */ + function InitiateBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InitiateBackupRequest dataSource. + * @member {string} dataSource + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @instance + */ + InitiateBackupRequest.prototype.dataSource = ""; + + /** + * InitiateBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @instance + */ + InitiateBackupRequest.prototype.requestId = ""; + + /** + * InitiateBackupRequest backupId. + * @member {string} backupId + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @instance + */ + InitiateBackupRequest.prototype.backupId = ""; + + /** + * Creates a new InitiateBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IInitiateBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest instance + */ + InitiateBackupRequest.create = function create(properties) { + return new InitiateBackupRequest(properties); + }; + + /** + * Encodes the specified InitiateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} message InitiateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitiateBackupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.backupId); + return writer; + }; + + /** + * Encodes the specified InitiateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} message InitiateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitiateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InitiateBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitiateBackupRequest.decode = function 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.backupdr.v1.InitiateBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataSource = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + case 5: { + message.backupId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InitiateBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitiateBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InitiateBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InitiateBackupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.backupId != null && message.hasOwnProperty("backupId")) + if (!$util.isString(message.backupId)) + return "backupId: string expected"; + return null; + }; + + /** + * Creates an InitiateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest + */ + InitiateBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.InitiateBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.InitiateBackupRequest(); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.backupId != null) + message.backupId = String(object.backupId); + return message; + }; + + /** + * Creates a plain object from an InitiateBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.InitiateBackupRequest} message InitiateBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InitiateBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataSource = ""; + object.requestId = ""; + object.backupId = ""; + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.backupId != null && message.hasOwnProperty("backupId")) + object.backupId = message.backupId; + return object; + }; + + /** + * Converts this InitiateBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @instance + * @returns {Object.} JSON object + */ + InitiateBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InitiateBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InitiateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.InitiateBackupRequest"; + }; + + return InitiateBackupRequest; + })(); + + v1.InitiateBackupResponse = (function() { + + /** + * Properties of an InitiateBackupResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IInitiateBackupResponse + * @property {string|null} [backup] InitiateBackupResponse backup + * @property {number|null} [newBackupGenerationId] InitiateBackupResponse newBackupGenerationId + * @property {number|null} [baseBackupGenerationId] InitiateBackupResponse baseBackupGenerationId + */ + + /** + * Constructs a new InitiateBackupResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an InitiateBackupResponse. + * @implements IInitiateBackupResponse + * @constructor + * @param {google.cloud.backupdr.v1.IInitiateBackupResponse=} [properties] Properties to set + */ + function InitiateBackupResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InitiateBackupResponse backup. + * @member {string} backup + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @instance + */ + InitiateBackupResponse.prototype.backup = ""; + + /** + * InitiateBackupResponse newBackupGenerationId. + * @member {number} newBackupGenerationId + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @instance + */ + InitiateBackupResponse.prototype.newBackupGenerationId = 0; + + /** + * InitiateBackupResponse baseBackupGenerationId. + * @member {number} baseBackupGenerationId + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @instance + */ + InitiateBackupResponse.prototype.baseBackupGenerationId = 0; + + /** + * Creates a new InitiateBackupResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IInitiateBackupResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse instance + */ + InitiateBackupResponse.create = function create(properties) { + return new InitiateBackupResponse(properties); + }; + + /** + * Encodes the specified InitiateBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IInitiateBackupResponse} message InitiateBackupResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitiateBackupResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backup); + if (message.newBackupGenerationId != null && Object.hasOwnProperty.call(message, "newBackupGenerationId")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.newBackupGenerationId); + if (message.baseBackupGenerationId != null && Object.hasOwnProperty.call(message, "baseBackupGenerationId")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.baseBackupGenerationId); + return writer; + }; + + /** + * Encodes the specified InitiateBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IInitiateBackupResponse} message InitiateBackupResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitiateBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InitiateBackupResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitiateBackupResponse.decode = function 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.backupdr.v1.InitiateBackupResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backup = reader.string(); + break; + } + case 2: { + message.newBackupGenerationId = reader.int32(); + break; + } + case 3: { + message.baseBackupGenerationId = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InitiateBackupResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitiateBackupResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InitiateBackupResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InitiateBackupResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backup != null && message.hasOwnProperty("backup")) + if (!$util.isString(message.backup)) + return "backup: string expected"; + if (message.newBackupGenerationId != null && message.hasOwnProperty("newBackupGenerationId")) + if (!$util.isInteger(message.newBackupGenerationId)) + return "newBackupGenerationId: integer expected"; + if (message.baseBackupGenerationId != null && message.hasOwnProperty("baseBackupGenerationId")) + if (!$util.isInteger(message.baseBackupGenerationId)) + return "baseBackupGenerationId: integer expected"; + return null; + }; + + /** + * Creates an InitiateBackupResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse + */ + InitiateBackupResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.InitiateBackupResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.InitiateBackupResponse(); + if (object.backup != null) + message.backup = String(object.backup); + if (object.newBackupGenerationId != null) + message.newBackupGenerationId = object.newBackupGenerationId | 0; + if (object.baseBackupGenerationId != null) + message.baseBackupGenerationId = object.baseBackupGenerationId | 0; + return message; + }; + + /** + * Creates a plain object from an InitiateBackupResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {google.cloud.backupdr.v1.InitiateBackupResponse} message InitiateBackupResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InitiateBackupResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.backup = ""; + object.newBackupGenerationId = 0; + object.baseBackupGenerationId = 0; + } + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = message.backup; + if (message.newBackupGenerationId != null && message.hasOwnProperty("newBackupGenerationId")) + object.newBackupGenerationId = message.newBackupGenerationId; + if (message.baseBackupGenerationId != null && message.hasOwnProperty("baseBackupGenerationId")) + object.baseBackupGenerationId = message.baseBackupGenerationId; + return object; + }; + + /** + * Converts this InitiateBackupResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @instance + * @returns {Object.} JSON object + */ + InitiateBackupResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InitiateBackupResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InitiateBackupResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.InitiateBackupResponse"; + }; + + return InitiateBackupResponse; + })(); + + v1.AbandonBackupRequest = (function() { + + /** + * Properties of an AbandonBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IAbandonBackupRequest + * @property {string|null} [dataSource] AbandonBackupRequest dataSource + * @property {string|null} [requestId] AbandonBackupRequest requestId + */ + + /** + * Constructs a new AbandonBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AbandonBackupRequest. + * @implements IAbandonBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IAbandonBackupRequest=} [properties] Properties to set + */ + function AbandonBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AbandonBackupRequest dataSource. + * @member {string} dataSource + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @instance + */ + AbandonBackupRequest.prototype.dataSource = ""; + + /** + * AbandonBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @instance + */ + AbandonBackupRequest.prototype.requestId = ""; + + /** + * Creates a new AbandonBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IAbandonBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest instance + */ + AbandonBackupRequest.create = function create(properties) { + return new AbandonBackupRequest(properties); + }; + + /** + * Encodes the specified AbandonBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} message AbandonBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AbandonBackupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified AbandonBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} message AbandonBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AbandonBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AbandonBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AbandonBackupRequest.decode = function 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.backupdr.v1.AbandonBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataSource = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AbandonBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AbandonBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AbandonBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AbandonBackupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an AbandonBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest + */ + AbandonBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AbandonBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.AbandonBackupRequest(); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an AbandonBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {google.cloud.backupdr.v1.AbandonBackupRequest} message AbandonBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AbandonBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataSource = ""; + object.requestId = ""; + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this AbandonBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @instance + * @returns {Object.} JSON object + */ + AbandonBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AbandonBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AbandonBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AbandonBackupRequest"; + }; + + return AbandonBackupRequest; + })(); + + v1.FinalizeBackupRequest = (function() { + + /** + * Properties of a FinalizeBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IFinalizeBackupRequest + * @property {string|null} [dataSource] FinalizeBackupRequest dataSource + * @property {string|null} [description] FinalizeBackupRequest description + * @property {google.protobuf.ITimestamp|null} [consistencyTime] FinalizeBackupRequest consistencyTime + * @property {string|null} [requestId] FinalizeBackupRequest requestId + * @property {string|null} [backupId] FinalizeBackupRequest backupId + * @property {google.protobuf.ITimestamp|null} [recoveryRangeStartTime] FinalizeBackupRequest recoveryRangeStartTime + * @property {google.protobuf.ITimestamp|null} [recoveryRangeEndTime] FinalizeBackupRequest recoveryRangeEndTime + * @property {google.protobuf.IDuration|null} [retentionDuration] FinalizeBackupRequest retentionDuration + */ + + /** + * Constructs a new FinalizeBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FinalizeBackupRequest. + * @implements IFinalizeBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest=} [properties] Properties to set + */ + function FinalizeBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FinalizeBackupRequest dataSource. + * @member {string} dataSource + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.dataSource = ""; + + /** + * FinalizeBackupRequest description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.description = null; + + /** + * FinalizeBackupRequest consistencyTime. + * @member {google.protobuf.ITimestamp|null|undefined} consistencyTime + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.consistencyTime = null; + + /** + * FinalizeBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.requestId = ""; + + /** + * FinalizeBackupRequest backupId. + * @member {string} backupId + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.backupId = ""; + + /** + * FinalizeBackupRequest recoveryRangeStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeStartTime + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.recoveryRangeStartTime = null; + + /** + * FinalizeBackupRequest recoveryRangeEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeEndTime + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.recoveryRangeEndTime = null; + + /** + * FinalizeBackupRequest retentionDuration. + * @member {google.protobuf.IDuration|null|undefined} retentionDuration + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.retentionDuration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FinalizeBackupRequest _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + Object.defineProperty(FinalizeBackupRequest.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FinalizeBackupRequest _consistencyTime. + * @member {"consistencyTime"|undefined} _consistencyTime + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + Object.defineProperty(FinalizeBackupRequest.prototype, "_consistencyTime", { + get: $util.oneOfGetter($oneOfFields = ["consistencyTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FinalizeBackupRequest _recoveryRangeStartTime. + * @member {"recoveryRangeStartTime"|undefined} _recoveryRangeStartTime + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + Object.defineProperty(FinalizeBackupRequest.prototype, "_recoveryRangeStartTime", { + get: $util.oneOfGetter($oneOfFields = ["recoveryRangeStartTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FinalizeBackupRequest _recoveryRangeEndTime. + * @member {"recoveryRangeEndTime"|undefined} _recoveryRangeEndTime + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + Object.defineProperty(FinalizeBackupRequest.prototype, "_recoveryRangeEndTime", { + get: $util.oneOfGetter($oneOfFields = ["recoveryRangeEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FinalizeBackupRequest _retentionDuration. + * @member {"retentionDuration"|undefined} _retentionDuration + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + Object.defineProperty(FinalizeBackupRequest.prototype, "_retentionDuration", { + get: $util.oneOfGetter($oneOfFields = ["retentionDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FinalizeBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest instance + */ + FinalizeBackupRequest.create = function create(properties) { + return new FinalizeBackupRequest(properties); + }; + + /** + * Encodes the specified FinalizeBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} message FinalizeBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FinalizeBackupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.consistencyTime != null && Object.hasOwnProperty.call(message, "consistencyTime")) + $root.google.protobuf.Timestamp.encode(message.consistencyTime, 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.backupId != null && Object.hasOwnProperty.call(message, "backupId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.backupId); + if (message.recoveryRangeStartTime != null && Object.hasOwnProperty.call(message, "recoveryRangeStartTime")) + $root.google.protobuf.Timestamp.encode(message.recoveryRangeStartTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.recoveryRangeEndTime != null && Object.hasOwnProperty.call(message, "recoveryRangeEndTime")) + $root.google.protobuf.Timestamp.encode(message.recoveryRangeEndTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.retentionDuration != null && Object.hasOwnProperty.call(message, "retentionDuration")) + $root.google.protobuf.Duration.encode(message.retentionDuration, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FinalizeBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} message FinalizeBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FinalizeBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FinalizeBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FinalizeBackupRequest.decode = function 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.backupdr.v1.FinalizeBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataSource = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.consistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.backupId = reader.string(); + break; + } + case 6: { + message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.retentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FinalizeBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FinalizeBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FinalizeBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FinalizeBackupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { + properties._consistencyTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.consistencyTime); + if (error) + return "consistencyTime." + error; + } + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.backupId != null && message.hasOwnProperty("backupId")) + if (!$util.isString(message.backupId)) + return "backupId: string expected"; + if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { + properties._recoveryRangeStartTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeStartTime); + if (error) + return "recoveryRangeStartTime." + error; + } + } + if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { + properties._recoveryRangeEndTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeEndTime); + if (error) + return "recoveryRangeEndTime." + error; + } + } + if (message.retentionDuration != null && message.hasOwnProperty("retentionDuration")) { + properties._retentionDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.retentionDuration); + if (error) + return "retentionDuration." + error; + } + } + return null; + }; + + /** + * Creates a FinalizeBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest + */ + FinalizeBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FinalizeBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.FinalizeBackupRequest(); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + if (object.description != null) + message.description = String(object.description); + if (object.consistencyTime != null) { + if (typeof object.consistencyTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.consistencyTime: object expected"); + message.consistencyTime = $root.google.protobuf.Timestamp.fromObject(object.consistencyTime); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.backupId != null) + message.backupId = String(object.backupId); + if (object.recoveryRangeStartTime != null) { + if (typeof object.recoveryRangeStartTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.recoveryRangeStartTime: object expected"); + message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeStartTime); + } + if (object.recoveryRangeEndTime != null) { + if (typeof object.recoveryRangeEndTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.recoveryRangeEndTime: object expected"); + message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeEndTime); + } + if (object.retentionDuration != null) { + if (typeof object.retentionDuration !== "object") + throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.retentionDuration: object expected"); + message.retentionDuration = $root.google.protobuf.Duration.fromObject(object.retentionDuration); + } + return message; + }; + + /** + * Creates a plain object from a FinalizeBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {google.cloud.backupdr.v1.FinalizeBackupRequest} message FinalizeBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FinalizeBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataSource = ""; + object.requestId = ""; + object.backupId = ""; + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { + object.consistencyTime = $root.google.protobuf.Timestamp.toObject(message.consistencyTime, options); + if (options.oneofs) + object._consistencyTime = "consistencyTime"; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.backupId != null && message.hasOwnProperty("backupId")) + object.backupId = message.backupId; + if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { + object.recoveryRangeStartTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeStartTime, options); + if (options.oneofs) + object._recoveryRangeStartTime = "recoveryRangeStartTime"; + } + if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { + object.recoveryRangeEndTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeEndTime, options); + if (options.oneofs) + object._recoveryRangeEndTime = "recoveryRangeEndTime"; + } + if (message.retentionDuration != null && message.hasOwnProperty("retentionDuration")) { + object.retentionDuration = $root.google.protobuf.Duration.toObject(message.retentionDuration, options); + if (options.oneofs) + object._retentionDuration = "retentionDuration"; + } + return object; + }; + + /** + * Converts this FinalizeBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + * @returns {Object.} JSON object + */ + FinalizeBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FinalizeBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FinalizeBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FinalizeBackupRequest"; + }; + + return FinalizeBackupRequest; + })(); + + v1.FetchAccessTokenRequest = (function() { + + /** + * Properties of a FetchAccessTokenRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IFetchAccessTokenRequest + * @property {string|null} [name] FetchAccessTokenRequest name + * @property {number|null} [generationId] FetchAccessTokenRequest generationId + */ + + /** + * Constructs a new FetchAccessTokenRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FetchAccessTokenRequest. + * @implements IFetchAccessTokenRequest + * @constructor + * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest=} [properties] Properties to set + */ + function FetchAccessTokenRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchAccessTokenRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @instance + */ + FetchAccessTokenRequest.prototype.name = ""; + + /** + * FetchAccessTokenRequest generationId. + * @member {number} generationId + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @instance + */ + FetchAccessTokenRequest.prototype.generationId = 0; + + /** + * Creates a new FetchAccessTokenRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest instance + */ + FetchAccessTokenRequest.create = function create(properties) { + return new FetchAccessTokenRequest(properties); + }; + + /** + * Encodes the specified FetchAccessTokenRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} message FetchAccessTokenRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchAccessTokenRequest.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.generationId != null && Object.hasOwnProperty.call(message, "generationId")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.generationId); + return writer; + }; + + /** + * Encodes the specified FetchAccessTokenRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} message FetchAccessTokenRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchAccessTokenRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchAccessTokenRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchAccessTokenRequest.decode = function 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.backupdr.v1.FetchAccessTokenRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.generationId = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchAccessTokenRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchAccessTokenRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchAccessTokenRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchAccessTokenRequest.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.generationId != null && message.hasOwnProperty("generationId")) + if (!$util.isInteger(message.generationId)) + return "generationId: integer expected"; + return null; + }; + + /** + * Creates a FetchAccessTokenRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest + */ + FetchAccessTokenRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchAccessTokenRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.FetchAccessTokenRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.generationId != null) + message.generationId = object.generationId | 0; + return message; + }; + + /** + * Creates a plain object from a FetchAccessTokenRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {google.cloud.backupdr.v1.FetchAccessTokenRequest} message FetchAccessTokenRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchAccessTokenRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.generationId = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.generationId != null && message.hasOwnProperty("generationId")) + object.generationId = message.generationId; + return object; + }; + + /** + * Converts this FetchAccessTokenRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @instance + * @returns {Object.} JSON object + */ + FetchAccessTokenRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchAccessTokenRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchAccessTokenRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchAccessTokenRequest"; + }; + + return FetchAccessTokenRequest; + })(); + + v1.FetchAccessTokenResponse = (function() { + + /** + * Properties of a FetchAccessTokenResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IFetchAccessTokenResponse + * @property {string|null} [readLocation] FetchAccessTokenResponse readLocation + * @property {string|null} [writeLocation] FetchAccessTokenResponse writeLocation + * @property {string|null} [token] FetchAccessTokenResponse token + * @property {google.protobuf.ITimestamp|null} [expireTime] FetchAccessTokenResponse expireTime + */ + + /** + * Constructs a new FetchAccessTokenResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FetchAccessTokenResponse. + * @implements IFetchAccessTokenResponse + * @constructor + * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse=} [properties] Properties to set + */ + function FetchAccessTokenResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchAccessTokenResponse readLocation. + * @member {string} readLocation + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @instance + */ + FetchAccessTokenResponse.prototype.readLocation = ""; + + /** + * FetchAccessTokenResponse writeLocation. + * @member {string} writeLocation + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @instance + */ + FetchAccessTokenResponse.prototype.writeLocation = ""; + + /** + * FetchAccessTokenResponse token. + * @member {string} token + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @instance + */ + FetchAccessTokenResponse.prototype.token = ""; + + /** + * FetchAccessTokenResponse expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @instance + */ + FetchAccessTokenResponse.prototype.expireTime = null; + + /** + * Creates a new FetchAccessTokenResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse instance + */ + FetchAccessTokenResponse.create = function create(properties) { + return new FetchAccessTokenResponse(properties); + }; + + /** + * Encodes the specified FetchAccessTokenResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse} message FetchAccessTokenResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchAccessTokenResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.readLocation != null && Object.hasOwnProperty.call(message, "readLocation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.readLocation); + if (message.writeLocation != null && Object.hasOwnProperty.call(message, "writeLocation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.writeLocation); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.token); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FetchAccessTokenResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse} message FetchAccessTokenResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchAccessTokenResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchAccessTokenResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchAccessTokenResponse.decode = function 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.backupdr.v1.FetchAccessTokenResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.readLocation = reader.string(); + break; + } + case 2: { + message.writeLocation = reader.string(); + break; + } + case 3: { + message.token = reader.string(); + break; + } + case 4: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchAccessTokenResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchAccessTokenResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchAccessTokenResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchAccessTokenResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.readLocation != null && message.hasOwnProperty("readLocation")) + if (!$util.isString(message.readLocation)) + return "readLocation: string expected"; + if (message.writeLocation != null && message.hasOwnProperty("writeLocation")) + if (!$util.isString(message.writeLocation)) + return "writeLocation: string expected"; + if (message.token != null && message.hasOwnProperty("token")) + if (!$util.isString(message.token)) + return "token: string expected"; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + return null; + }; + + /** + * Creates a FetchAccessTokenResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse + */ + FetchAccessTokenResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchAccessTokenResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.FetchAccessTokenResponse(); + if (object.readLocation != null) + message.readLocation = String(object.readLocation); + if (object.writeLocation != null) + message.writeLocation = String(object.writeLocation); + if (object.token != null) + message.token = String(object.token); + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.FetchAccessTokenResponse.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + return message; + }; + + /** + * Creates a plain object from a FetchAccessTokenResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {google.cloud.backupdr.v1.FetchAccessTokenResponse} message FetchAccessTokenResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchAccessTokenResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.readLocation = ""; + object.writeLocation = ""; + object.token = ""; + object.expireTime = null; + } + if (message.readLocation != null && message.hasOwnProperty("readLocation")) + object.readLocation = message.readLocation; + if (message.writeLocation != null && message.hasOwnProperty("writeLocation")) + object.writeLocation = message.writeLocation; + if (message.token != null && message.hasOwnProperty("token")) + object.token = message.token; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + return object; + }; + + /** + * Converts this FetchAccessTokenResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @instance + * @returns {Object.} JSON object + */ + FetchAccessTokenResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchAccessTokenResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchAccessTokenResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchAccessTokenResponse"; + }; + + return FetchAccessTokenResponse; + })(); + + v1.ListBackupsRequest = (function() { + + /** + * Properties of a ListBackupsRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupsRequest + * @property {string|null} [parent] ListBackupsRequest parent + * @property {number|null} [pageSize] ListBackupsRequest pageSize + * @property {string|null} [pageToken] ListBackupsRequest pageToken + * @property {string|null} [filter] ListBackupsRequest filter + * @property {string|null} [orderBy] ListBackupsRequest orderBy + * @property {google.cloud.backupdr.v1.BackupView|null} [view] ListBackupsRequest view + */ + + /** + * Constructs a new ListBackupsRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupsRequest. + * @implements IListBackupsRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set + */ + function ListBackupsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupsRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.parent = ""; + + /** + * ListBackupsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.pageSize = 0; + + /** + * ListBackupsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.pageToken = ""; + + /** + * ListBackupsRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.filter = ""; + + /** + * ListBackupsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.orderBy = ""; + + /** + * ListBackupsRequest view. + * @member {google.cloud.backupdr.v1.BackupView} view + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.view = 0; + + /** + * Creates a new ListBackupsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest instance + */ + ListBackupsRequest.create = function create(properties) { + return new ListBackupsRequest(properties); + }; + + /** + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsRequest.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); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); + return writer; + }; + + /** + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsRequest.decode = function 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.backupdr.v1.ListBackupsRequest(); + 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; + } + case 6: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupsRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupsRequest.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"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest + */ + ListBackupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupsRequest(); + 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); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {google.cloud.backupdr.v1.ListBackupsRequest} message ListBackupsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; + } + 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; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; + return object; + }; + + /** + * Converts this ListBackupsRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupsRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsRequest"; + }; + + return ListBackupsRequest; + })(); + + v1.ListBackupsResponse = (function() { + + /** + * Properties of a ListBackupsResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupsResponse + * @property {Array.|null} [backups] ListBackupsResponse backups + * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupsResponse unreachable + */ + + /** + * Constructs a new ListBackupsResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupsResponse. + * @implements IListBackupsResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set + */ + function ListBackupsResponse(properties) { + this.backups = []; + 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]]; + } + + /** + * ListBackupsResponse backups. + * @member {Array.} backups + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.backups = $util.emptyArray; + + /** + * ListBackupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.nextPageToken = ""; + + /** + * ListBackupsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse instance + */ + ListBackupsResponse.create = function create(properties) { + return new ListBackupsResponse(properties); + }; + + /** + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backups != null && message.backups.length) + for (var i = 0; i < message.backups.length; ++i) + $root.google.cloud.backupdr.v1.Backup.encode(message.backups[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 ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsResponse.decode = function 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.backupdr.v1.ListBackupsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backups && message.backups.length)) + message.backups = []; + message.backups.push($root.google.cloud.backupdr.v1.Backup.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 ListBackupsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupsResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backups != null && message.hasOwnProperty("backups")) { + if (!Array.isArray(message.backups)) + return "backups: array expected"; + for (var i = 0; i < message.backups.length; ++i) { + var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backups[i]); + if (error) + return "backups." + 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 ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse + */ + ListBackupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupsResponse(); + if (object.backups) { + if (!Array.isArray(object.backups)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: array expected"); + message.backups = []; + for (var i = 0; i < object.backups.length; ++i) { + if (typeof object.backups[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: object expected"); + message.backups[i] = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backups[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.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 ListBackupsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {google.cloud.backupdr.v1.ListBackupsResponse} message ListBackupsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backups = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backups && message.backups.length) { + object.backups = []; + for (var j = 0; j < message.backups.length; ++j) + object.backups[j] = $root.google.cloud.backupdr.v1.Backup.toObject(message.backups[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 ListBackupsResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupsResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsResponse"; + }; + + return ListBackupsResponse; + })(); + + v1.GetBackupRequest = (function() { + + /** + * Properties of a GetBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetBackupRequest + * @property {string|null} [name] GetBackupRequest name + * @property {google.cloud.backupdr.v1.BackupView|null} [view] GetBackupRequest view + */ + + /** + * Constructs a new GetBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetBackupRequest. + * @implements IGetBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set + */ + function GetBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @instance + */ + GetBackupRequest.prototype.name = ""; + + /** + * GetBackupRequest view. + * @member {google.cloud.backupdr.v1.BackupView} view + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @instance + */ + GetBackupRequest.prototype.view = 0; + + /** + * Creates a new GetBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest instance + */ + GetBackupRequest.create = function create(properties) { + return new GetBackupRequest(properties); + }; + + /** + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupRequest.decode = function 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.backupdr.v1.GetBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupRequest.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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest + */ + GetBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetBackupRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {google.cloud.backupdr.v1.GetBackupRequest} message GetBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupRequest"; + }; + + return GetBackupRequest; + })(); + + v1.UpdateBackupRequest = (function() { + + /** + * Properties of an UpdateBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IUpdateBackupRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupRequest updateMask + * @property {google.cloud.backupdr.v1.IBackup|null} [backup] UpdateBackupRequest backup + * @property {string|null} [requestId] UpdateBackupRequest requestId + */ + + /** + * Constructs a new UpdateBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an UpdateBackupRequest. + * @implements IUpdateBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set + */ + function UpdateBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateBackupRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @instance + */ + UpdateBackupRequest.prototype.updateMask = null; + + /** + * UpdateBackupRequest backup. + * @member {google.cloud.backupdr.v1.IBackup|null|undefined} backup + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @instance + */ + UpdateBackupRequest.prototype.backup = null; + + /** + * UpdateBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @instance + */ + UpdateBackupRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest instance + */ + UpdateBackupRequest.create = function create(properties) { + return new UpdateBackupRequest(properties); + }; + + /** + * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupRequest.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.backup != null && Object.hasOwnProperty.call(message, "backup")) + $root.google.cloud.backupdr.v1.Backup.encode(message.backup, 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 UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupRequest.decode = function 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.backupdr.v1.UpdateBackupRequest(); + 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.backup = $root.google.cloud.backupdr.v1.Backup.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateBackupRequest.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.backup != null && message.hasOwnProperty("backup")) { + var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backup); + if (error) + return "backup." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest + */ + UpdateBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.UpdateBackupRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.backup != null) { + if (typeof object.backup !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.backup: object expected"); + message.backup = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backup); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.UpdateBackupRequest} message UpdateBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.backup = null; + object.requestId = ""; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = $root.google.cloud.backupdr.v1.Backup.toObject(message.backup, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupRequest"; + }; + + return UpdateBackupRequest; + })(); + + v1.DeleteBackupRequest = (function() { + + /** + * Properties of a DeleteBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IDeleteBackupRequest + * @property {string|null} [name] DeleteBackupRequest name + * @property {string|null} [requestId] DeleteBackupRequest requestId + */ + + /** + * Constructs a new DeleteBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DeleteBackupRequest. + * @implements IDeleteBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set + */ + function DeleteBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @instance + */ + DeleteBackupRequest.prototype.name = ""; + + /** + * DeleteBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @instance + */ + DeleteBackupRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest instance + */ + DeleteBackupRequest.create = function create(properties) { + return new DeleteBackupRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupRequest.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 DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupRequest.decode = function 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.backupdr.v1.DeleteBackupRequest(); + 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 DeleteBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupRequest.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 DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest + */ + DeleteBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.DeleteBackupRequest(); + 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 DeleteBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {google.cloud.backupdr.v1.DeleteBackupRequest} message DeleteBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupRequest.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 DeleteBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupRequest"; + }; + + return DeleteBackupRequest; + })(); + + v1.RestoreBackupRequest = (function() { + + /** + * Properties of a RestoreBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IRestoreBackupRequest + * @property {string|null} [name] RestoreBackupRequest name + * @property {string|null} [requestId] RestoreBackupRequest requestId + * @property {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null} [computeInstanceTargetEnvironment] RestoreBackupRequest computeInstanceTargetEnvironment + * @property {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null} [computeInstanceRestoreProperties] RestoreBackupRequest computeInstanceRestoreProperties + */ + + /** + * Constructs a new RestoreBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a RestoreBackupRequest. + * @implements IRestoreBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set + */ + function RestoreBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestoreBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.name = ""; + + /** + * RestoreBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.requestId = ""; + + /** + * RestoreBackupRequest computeInstanceTargetEnvironment. + * @member {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null|undefined} computeInstanceTargetEnvironment + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.computeInstanceTargetEnvironment = null; + + /** + * RestoreBackupRequest computeInstanceRestoreProperties. + * @member {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null|undefined} computeInstanceRestoreProperties + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.computeInstanceRestoreProperties = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RestoreBackupRequest targetEnvironment. + * @member {"computeInstanceTargetEnvironment"|undefined} targetEnvironment + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + Object.defineProperty(RestoreBackupRequest.prototype, "targetEnvironment", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceTargetEnvironment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RestoreBackupRequest instanceProperties. + * @member {"computeInstanceRestoreProperties"|undefined} instanceProperties + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + Object.defineProperty(RestoreBackupRequest.prototype, "instanceProperties", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceRestoreProperties"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RestoreBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest instance + */ + RestoreBackupRequest.create = function create(properties) { + return new RestoreBackupRequest(properties); + }; + + /** + * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupRequest.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.computeInstanceTargetEnvironment != null && Object.hasOwnProperty.call(message, "computeInstanceTargetEnvironment")) + $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.encode(message.computeInstanceTargetEnvironment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.computeInstanceRestoreProperties != null && Object.hasOwnProperty.call(message, "computeInstanceRestoreProperties")) + $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.encode(message.computeInstanceRestoreProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestoreBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupRequest.decode = function 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.backupdr.v1.RestoreBackupRequest(); + 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.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestoreBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreBackupRequest.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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { + properties.targetEnvironment = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify(message.computeInstanceTargetEnvironment); + if (error) + return "computeInstanceTargetEnvironment." + error; + } + } + if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { + properties.instanceProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify(message.computeInstanceRestoreProperties); + if (error) + return "computeInstanceRestoreProperties." + error; + } + } + return null; + }; + + /** + * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest + */ + RestoreBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.RestoreBackupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.computeInstanceTargetEnvironment != null) { + if (typeof object.computeInstanceTargetEnvironment !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceTargetEnvironment: object expected"); + message.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.fromObject(object.computeInstanceTargetEnvironment); + } + if (object.computeInstanceRestoreProperties != null) { + if (typeof object.computeInstanceRestoreProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceRestoreProperties: object expected"); + message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.fromObject(object.computeInstanceRestoreProperties); + } + return message; + }; + + /** + * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {google.cloud.backupdr.v1.RestoreBackupRequest} message RestoreBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestoreBackupRequest.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; + if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { + object.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.toObject(message.computeInstanceTargetEnvironment, options); + if (options.oneofs) + object.targetEnvironment = "computeInstanceTargetEnvironment"; + } + if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { + object.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.toObject(message.computeInstanceRestoreProperties, options); + if (options.oneofs) + object.instanceProperties = "computeInstanceRestoreProperties"; + } + return object; + }; + + /** + * Converts this RestoreBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + * @returns {Object.} JSON object + */ + RestoreBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestoreBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestoreBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupRequest"; + }; + + return RestoreBackupRequest; + })(); + + v1.RestoreBackupResponse = (function() { + + /** + * Properties of a RestoreBackupResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IRestoreBackupResponse + * @property {google.cloud.backupdr.v1.ITargetResource|null} [targetResource] RestoreBackupResponse targetResource + */ + + /** + * Constructs a new RestoreBackupResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a RestoreBackupResponse. + * @implements IRestoreBackupResponse + * @constructor + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set + */ + function RestoreBackupResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestoreBackupResponse targetResource. + * @member {google.cloud.backupdr.v1.ITargetResource|null|undefined} targetResource + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @instance + */ + RestoreBackupResponse.prototype.targetResource = null; + + /** + * Creates a new RestoreBackupResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse instance + */ + RestoreBackupResponse.create = function create(properties) { + return new RestoreBackupResponse(properties); + }; + + /** + * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetResource != null && Object.hasOwnProperty.call(message, "targetResource")) + $root.google.cloud.backupdr.v1.TargetResource.encode(message.targetResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestoreBackupResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupResponse.decode = function 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.backupdr.v1.RestoreBackupResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestoreBackupResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreBackupResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetResource != null && message.hasOwnProperty("targetResource")) { + var error = $root.google.cloud.backupdr.v1.TargetResource.verify(message.targetResource); + if (error) + return "targetResource." + error; + } + return null; + }; + + /** + * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse + */ + RestoreBackupResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.RestoreBackupResponse(); + if (object.targetResource != null) { + if (typeof object.targetResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupResponse.targetResource: object expected"); + message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.fromObject(object.targetResource); + } + return message; + }; + + /** + * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {google.cloud.backupdr.v1.RestoreBackupResponse} message RestoreBackupResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestoreBackupResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.targetResource = null; + if (message.targetResource != null && message.hasOwnProperty("targetResource")) + object.targetResource = $root.google.cloud.backupdr.v1.TargetResource.toObject(message.targetResource, options); + return object; + }; + + /** + * Converts this RestoreBackupResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @instance + * @returns {Object.} JSON object + */ + RestoreBackupResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestoreBackupResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestoreBackupResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupResponse"; + }; + + return RestoreBackupResponse; + })(); + + v1.TargetResource = (function() { + + /** + * Properties of a TargetResource. + * @memberof google.cloud.backupdr.v1 + * @interface ITargetResource + * @property {google.cloud.backupdr.v1.IGcpResource|null} [gcpResource] TargetResource gcpResource + */ + + /** + * Constructs a new TargetResource. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a TargetResource. + * @implements ITargetResource + * @constructor + * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set + */ + function TargetResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TargetResource gcpResource. + * @member {google.cloud.backupdr.v1.IGcpResource|null|undefined} gcpResource + * @memberof google.cloud.backupdr.v1.TargetResource + * @instance + */ + TargetResource.prototype.gcpResource = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TargetResource targetResourceInfo. + * @member {"gcpResource"|undefined} targetResourceInfo + * @memberof google.cloud.backupdr.v1.TargetResource + * @instance + */ + Object.defineProperty(TargetResource.prototype, "targetResourceInfo", { + get: $util.oneOfGetter($oneOfFields = ["gcpResource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TargetResource instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource instance + */ + TargetResource.create = function create(properties) { + return new TargetResource(properties); + }; + + /** + * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcpResource != null && Object.hasOwnProperty.call(message, "gcpResource")) + $root.google.cloud.backupdr.v1.GcpResource.encode(message.gcpResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetResource.decode = function 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.backupdr.v1.TargetResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TargetResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetResource message. + * @function verify + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { + properties.targetResourceInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.GcpResource.verify(message.gcpResource); + if (error) + return "gcpResource." + error; + } + } + return null; + }; + + /** + * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource + */ + TargetResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.TargetResource) + return object; + var message = new $root.google.cloud.backupdr.v1.TargetResource(); + if (object.gcpResource != null) { + if (typeof object.gcpResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.TargetResource.gcpResource: object expected"); + message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.fromObject(object.gcpResource); + } + return message; + }; + + /** + * Creates a plain object from a TargetResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {google.cloud.backupdr.v1.TargetResource} message TargetResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { + object.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.toObject(message.gcpResource, options); + if (options.oneofs) + object.targetResourceInfo = "gcpResource"; + } + return object; + }; + + /** + * Converts this TargetResource to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.TargetResource + * @instance + * @returns {Object.} JSON object + */ + TargetResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TargetResource + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.TargetResource"; + }; + + return TargetResource; + })(); + + v1.GcpResource = (function() { + + /** + * Properties of a GcpResource. + * @memberof google.cloud.backupdr.v1 + * @interface IGcpResource + * @property {string|null} [gcpResourcename] GcpResource gcpResourcename + * @property {string|null} [location] GcpResource location + * @property {string|null} [type] GcpResource type + */ + + /** + * Constructs a new GcpResource. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GcpResource. + * @implements IGcpResource + * @constructor + * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set + */ + function GcpResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcpResource gcpResourcename. + * @member {string} gcpResourcename + * @memberof google.cloud.backupdr.v1.GcpResource + * @instance + */ + GcpResource.prototype.gcpResourcename = ""; + + /** + * GcpResource location. + * @member {string} location + * @memberof google.cloud.backupdr.v1.GcpResource + * @instance + */ + GcpResource.prototype.location = ""; + + /** + * GcpResource type. + * @member {string} type + * @memberof google.cloud.backupdr.v1.GcpResource + * @instance + */ + GcpResource.prototype.type = ""; + + /** + * Creates a new GcpResource instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource instance + */ + GcpResource.create = function create(properties) { + return new GcpResource(properties); + }; + + /** + * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + return writer; + }; + + /** + * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcpResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpResource.decode = function 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.backupdr.v1.GcpResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcpResourcename = reader.string(); + break; + } + case 2: { + message.location = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcpResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcpResource message. + * @function verify + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcpResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + if (!$util.isString(message.gcpResourcename)) + return "gcpResourcename: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + return null; + }; + + /** + * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource + */ + GcpResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GcpResource) + return object; + var message = new $root.google.cloud.backupdr.v1.GcpResource(); + if (object.gcpResourcename != null) + message.gcpResourcename = String(object.gcpResourcename); + if (object.location != null) + message.location = String(object.location); + if (object.type != null) + message.type = String(object.type); + return message; + }; + + /** + * Creates a plain object from a GcpResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {google.cloud.backupdr.v1.GcpResource} message GcpResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcpResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gcpResourcename = ""; + object.location = ""; + object.type = ""; + } + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + object.gcpResourcename = message.gcpResourcename; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; + + /** + * Converts this GcpResource to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GcpResource + * @instance + * @returns {Object.} JSON object + */ + GcpResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcpResource + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpResource"; + }; + + return GcpResource; + })(); + + /** + * BackupConfigState enum. + * @name google.cloud.backupdr.v1.BackupConfigState + * @enum {number} + * @property {number} BACKUP_CONFIG_STATE_UNSPECIFIED=0 BACKUP_CONFIG_STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} PASSIVE=2 PASSIVE value + */ + v1.BackupConfigState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_CONFIG_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "PASSIVE"] = 2; + return values; + })(); + + /** + * BackupView enum. + * @name google.cloud.backupdr.v1.BackupView + * @enum {number} + * @property {number} BACKUP_VIEW_UNSPECIFIED=0 BACKUP_VIEW_UNSPECIFIED value + * @property {number} BACKUP_VIEW_BASIC=1 BACKUP_VIEW_BASIC value + * @property {number} BACKUP_VIEW_FULL=2 BACKUP_VIEW_FULL value + */ + v1.BackupView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKUP_VIEW_BASIC"] = 1; + values[valuesById[2] = "BACKUP_VIEW_FULL"] = 2; + return values; + })(); + + /** + * BackupVaultView enum. + * @name google.cloud.backupdr.v1.BackupVaultView + * @enum {number} + * @property {number} BACKUP_VAULT_VIEW_UNSPECIFIED=0 BACKUP_VAULT_VIEW_UNSPECIFIED value + * @property {number} BACKUP_VAULT_VIEW_BASIC=1 BACKUP_VAULT_VIEW_BASIC value + * @property {number} BACKUP_VAULT_VIEW_FULL=2 BACKUP_VAULT_VIEW_FULL value + */ + v1.BackupVaultView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_VAULT_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKUP_VAULT_VIEW_BASIC"] = 1; + values[valuesById[2] = "BACKUP_VAULT_VIEW_FULL"] = 2; + return values; + })(); + + v1.BackupApplianceBackupProperties = (function() { + + /** + * Properties of a BackupApplianceBackupProperties. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupApplianceBackupProperties + * @property {number|null} [generationId] BackupApplianceBackupProperties generationId + * @property {google.protobuf.ITimestamp|null} [finalizeTime] BackupApplianceBackupProperties finalizeTime + * @property {google.protobuf.ITimestamp|null} [recoveryRangeStartTime] BackupApplianceBackupProperties recoveryRangeStartTime + * @property {google.protobuf.ITimestamp|null} [recoveryRangeEndTime] BackupApplianceBackupProperties recoveryRangeEndTime + */ + + /** + * Constructs a new BackupApplianceBackupProperties. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupApplianceBackupProperties. + * @implements IBackupApplianceBackupProperties + * @constructor + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties=} [properties] Properties to set + */ + function BackupApplianceBackupProperties(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupApplianceBackupProperties generationId. + * @member {number|null|undefined} generationId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + BackupApplianceBackupProperties.prototype.generationId = null; + + /** + * BackupApplianceBackupProperties finalizeTime. + * @member {google.protobuf.ITimestamp|null|undefined} finalizeTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + BackupApplianceBackupProperties.prototype.finalizeTime = null; + + /** + * BackupApplianceBackupProperties recoveryRangeStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeStartTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + BackupApplianceBackupProperties.prototype.recoveryRangeStartTime = null; + + /** + * BackupApplianceBackupProperties recoveryRangeEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeEndTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + BackupApplianceBackupProperties.prototype.recoveryRangeEndTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupApplianceBackupProperties _generationId. + * @member {"generationId"|undefined} _generationId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_generationId", { + get: $util.oneOfGetter($oneOfFields = ["generationId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupApplianceBackupProperties _finalizeTime. + * @member {"finalizeTime"|undefined} _finalizeTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_finalizeTime", { + get: $util.oneOfGetter($oneOfFields = ["finalizeTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupApplianceBackupProperties _recoveryRangeStartTime. + * @member {"recoveryRangeStartTime"|undefined} _recoveryRangeStartTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_recoveryRangeStartTime", { + get: $util.oneOfGetter($oneOfFields = ["recoveryRangeStartTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupApplianceBackupProperties _recoveryRangeEndTime. + * @member {"recoveryRangeEndTime"|undefined} _recoveryRangeEndTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_recoveryRangeEndTime", { + get: $util.oneOfGetter($oneOfFields = ["recoveryRangeEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupApplianceBackupProperties instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties instance + */ + BackupApplianceBackupProperties.create = function create(properties) { + return new BackupApplianceBackupProperties(properties); + }; + + /** + * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties} message BackupApplianceBackupProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceBackupProperties.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.generationId != null && Object.hasOwnProperty.call(message, "generationId")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.generationId); + if (message.finalizeTime != null && Object.hasOwnProperty.call(message, "finalizeTime")) + $root.google.protobuf.Timestamp.encode(message.finalizeTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.recoveryRangeStartTime != null && Object.hasOwnProperty.call(message, "recoveryRangeStartTime")) + $root.google.protobuf.Timestamp.encode(message.recoveryRangeStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.recoveryRangeEndTime != null && Object.hasOwnProperty.call(message, "recoveryRangeEndTime")) + $root.google.protobuf.Timestamp.encode(message.recoveryRangeEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties} message BackupApplianceBackupProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceBackupProperties.decode = function 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.backupdr.v1.BackupApplianceBackupProperties(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.generationId = reader.int32(); + break; + } + case 2: { + message.finalizeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceBackupProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupApplianceBackupProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupApplianceBackupProperties.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.generationId != null && message.hasOwnProperty("generationId")) { + properties._generationId = 1; + if (!$util.isInteger(message.generationId)) + return "generationId: integer expected"; + } + if (message.finalizeTime != null && message.hasOwnProperty("finalizeTime")) { + properties._finalizeTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.finalizeTime); + if (error) + return "finalizeTime." + error; + } + } + if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { + properties._recoveryRangeStartTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeStartTime); + if (error) + return "recoveryRangeStartTime." + error; + } + } + if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { + properties._recoveryRangeEndTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeEndTime); + if (error) + return "recoveryRangeEndTime." + error; + } + } + return null; + }; + + /** + * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties + */ + BackupApplianceBackupProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties(); + if (object.generationId != null) + message.generationId = object.generationId | 0; + if (object.finalizeTime != null) { + if (typeof object.finalizeTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.finalizeTime: object expected"); + message.finalizeTime = $root.google.protobuf.Timestamp.fromObject(object.finalizeTime); + } + if (object.recoveryRangeStartTime != null) { + if (typeof object.recoveryRangeStartTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeStartTime: object expected"); + message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeStartTime); + } + if (object.recoveryRangeEndTime != null) { + if (typeof object.recoveryRangeEndTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeEndTime: object expected"); + message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeEndTime); + } + return message; + }; + + /** + * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.BackupApplianceBackupProperties} message BackupApplianceBackupProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupApplianceBackupProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.generationId != null && message.hasOwnProperty("generationId")) { + object.generationId = message.generationId; + if (options.oneofs) + object._generationId = "generationId"; + } + if (message.finalizeTime != null && message.hasOwnProperty("finalizeTime")) { + object.finalizeTime = $root.google.protobuf.Timestamp.toObject(message.finalizeTime, options); + if (options.oneofs) + object._finalizeTime = "finalizeTime"; + } + if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { + object.recoveryRangeStartTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeStartTime, options); + if (options.oneofs) + object._recoveryRangeStartTime = "recoveryRangeStartTime"; + } + if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { + object.recoveryRangeEndTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeEndTime, options); + if (options.oneofs) + object._recoveryRangeEndTime = "recoveryRangeEndTime"; + } + return object; + }; + + /** + * Converts this BackupApplianceBackupProperties to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + * @returns {Object.} JSON object + */ + BackupApplianceBackupProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupApplianceBackupProperties + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupApplianceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceBackupProperties"; + }; + + return BackupApplianceBackupProperties; + })(); + + v1.ComputeInstanceBackupProperties = (function() { + + /** + * Properties of a ComputeInstanceBackupProperties. + * @memberof google.cloud.backupdr.v1 + * @interface IComputeInstanceBackupProperties + * @property {string|null} [description] ComputeInstanceBackupProperties description + * @property {google.cloud.backupdr.v1.ITags|null} [tags] ComputeInstanceBackupProperties tags + * @property {string|null} [machineType] ComputeInstanceBackupProperties machineType + * @property {boolean|null} [canIpForward] ComputeInstanceBackupProperties canIpForward + * @property {Array.|null} [networkInterface] ComputeInstanceBackupProperties networkInterface + * @property {Array.|null} [disk] ComputeInstanceBackupProperties disk + * @property {google.cloud.backupdr.v1.IMetadata|null} [metadata] ComputeInstanceBackupProperties metadata + * @property {Array.|null} [serviceAccount] ComputeInstanceBackupProperties serviceAccount + * @property {google.cloud.backupdr.v1.IScheduling|null} [scheduling] ComputeInstanceBackupProperties scheduling + * @property {Array.|null} [guestAccelerator] ComputeInstanceBackupProperties guestAccelerator + * @property {string|null} [minCpuPlatform] ComputeInstanceBackupProperties minCpuPlatform + * @property {google.cloud.backupdr.v1.KeyRevocationActionType|null} [keyRevocationActionType] ComputeInstanceBackupProperties keyRevocationActionType + * @property {string|null} [sourceInstance] ComputeInstanceBackupProperties sourceInstance + * @property {Object.|null} [labels] ComputeInstanceBackupProperties labels + */ + + /** + * Constructs a new ComputeInstanceBackupProperties. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ComputeInstanceBackupProperties. + * @implements IComputeInstanceBackupProperties + * @constructor + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties=} [properties] Properties to set + */ + function ComputeInstanceBackupProperties(properties) { + this.networkInterface = []; + this.disk = []; + this.serviceAccount = []; + this.guestAccelerator = []; + 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]]; + } + + /** + * ComputeInstanceBackupProperties description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.description = null; + + /** + * ComputeInstanceBackupProperties tags. + * @member {google.cloud.backupdr.v1.ITags|null|undefined} tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.tags = null; + + /** + * ComputeInstanceBackupProperties machineType. + * @member {string|null|undefined} machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.machineType = null; + + /** + * ComputeInstanceBackupProperties canIpForward. + * @member {boolean|null|undefined} canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.canIpForward = null; + + /** + * ComputeInstanceBackupProperties networkInterface. + * @member {Array.} networkInterface + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.networkInterface = $util.emptyArray; + + /** + * ComputeInstanceBackupProperties disk. + * @member {Array.} disk + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.disk = $util.emptyArray; + + /** + * ComputeInstanceBackupProperties metadata. + * @member {google.cloud.backupdr.v1.IMetadata|null|undefined} metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.metadata = null; + + /** + * ComputeInstanceBackupProperties serviceAccount. + * @member {Array.} serviceAccount + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.serviceAccount = $util.emptyArray; + + /** + * ComputeInstanceBackupProperties scheduling. + * @member {google.cloud.backupdr.v1.IScheduling|null|undefined} scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.scheduling = null; + + /** + * ComputeInstanceBackupProperties guestAccelerator. + * @member {Array.} guestAccelerator + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.guestAccelerator = $util.emptyArray; + + /** + * ComputeInstanceBackupProperties minCpuPlatform. + * @member {string|null|undefined} minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.minCpuPlatform = null; + + /** + * ComputeInstanceBackupProperties keyRevocationActionType. + * @member {google.cloud.backupdr.v1.KeyRevocationActionType|null|undefined} keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.keyRevocationActionType = null; + + /** + * ComputeInstanceBackupProperties sourceInstance. + * @member {string|null|undefined} sourceInstance + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.sourceInstance = null; + + /** + * ComputeInstanceBackupProperties labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.labels = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ComputeInstanceBackupProperties _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _tags. + * @member {"tags"|undefined} _tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_tags", { + get: $util.oneOfGetter($oneOfFields = ["tags"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _machineType. + * @member {"machineType"|undefined} _machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_machineType", { + get: $util.oneOfGetter($oneOfFields = ["machineType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _canIpForward. + * @member {"canIpForward"|undefined} _canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_canIpForward", { + get: $util.oneOfGetter($oneOfFields = ["canIpForward"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _scheduling. + * @member {"scheduling"|undefined} _scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_scheduling", { + get: $util.oneOfGetter($oneOfFields = ["scheduling"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _minCpuPlatform. + * @member {"minCpuPlatform"|undefined} _minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_minCpuPlatform", { + get: $util.oneOfGetter($oneOfFields = ["minCpuPlatform"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _keyRevocationActionType. + * @member {"keyRevocationActionType"|undefined} _keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_keyRevocationActionType", { + get: $util.oneOfGetter($oneOfFields = ["keyRevocationActionType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _sourceInstance. + * @member {"sourceInstance"|undefined} _sourceInstance + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_sourceInstance", { + get: $util.oneOfGetter($oneOfFields = ["sourceInstance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ComputeInstanceBackupProperties instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties instance + */ + ComputeInstanceBackupProperties.create = function create(properties) { + return new ComputeInstanceBackupProperties(properties); + }; + + /** + * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties} message ComputeInstanceBackupProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceBackupProperties.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.tags != null && Object.hasOwnProperty.call(message, "tags")) + $root.google.cloud.backupdr.v1.Tags.encode(message.tags, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.machineType); + if (message.canIpForward != null && Object.hasOwnProperty.call(message, "canIpForward")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.canIpForward); + if (message.networkInterface != null && message.networkInterface.length) + for (var i = 0; i < message.networkInterface.length; ++i) + $root.google.cloud.backupdr.v1.NetworkInterface.encode(message.networkInterface[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.disk != null && message.disk.length) + for (var i = 0; i < message.disk.length; ++i) + $root.google.cloud.backupdr.v1.AttachedDisk.encode(message.disk[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.cloud.backupdr.v1.Metadata.encode(message.metadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.serviceAccount != null && message.serviceAccount.length) + for (var i = 0; i < message.serviceAccount.length; ++i) + $root.google.cloud.backupdr.v1.ServiceAccount.encode(message.serviceAccount[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) + $root.google.cloud.backupdr.v1.Scheduling.encode(message.scheduling, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.guestAccelerator != null && message.guestAccelerator.length) + for (var i = 0; i < message.guestAccelerator.length; ++i) + $root.google.cloud.backupdr.v1.AcceleratorConfig.encode(message.guestAccelerator[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.minCpuPlatform); + if (message.keyRevocationActionType != null && Object.hasOwnProperty.call(message, "keyRevocationActionType")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.keyRevocationActionType); + if (message.sourceInstance != null && Object.hasOwnProperty.call(message, "sourceInstance")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.sourceInstance); + 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 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties} message ComputeInstanceBackupProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceBackupProperties.decode = function 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.backupdr.v1.ComputeInstanceBackupProperties(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.description = reader.string(); + break; + } + case 2: { + message.tags = $root.google.cloud.backupdr.v1.Tags.decode(reader, reader.uint32()); + break; + } + case 3: { + message.machineType = reader.string(); + break; + } + case 4: { + message.canIpForward = reader.bool(); + break; + } + case 5: { + if (!(message.networkInterface && message.networkInterface.length)) + message.networkInterface = []; + message.networkInterface.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.disk && message.disk.length)) + message.disk = []; + message.disk.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader, reader.uint32())); + break; + } + case 7: { + message.metadata = $root.google.cloud.backupdr.v1.Metadata.decode(reader, reader.uint32()); + break; + } + case 8: { + if (!(message.serviceAccount && message.serviceAccount.length)) + message.serviceAccount = []; + message.serviceAccount.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader, reader.uint32())); + break; + } + case 9: { + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.decode(reader, reader.uint32()); + break; + } + case 10: { + if (!(message.guestAccelerator && message.guestAccelerator.length)) + message.guestAccelerator = []; + message.guestAccelerator.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader, reader.uint32())); + break; + } + case 11: { + message.minCpuPlatform = reader.string(); + break; + } + case 12: { + message.keyRevocationActionType = reader.int32(); + break; + } + case 13: { + message.sourceInstance = reader.string(); + break; + } + case 14: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceBackupProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputeInstanceBackupProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeInstanceBackupProperties.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + properties._tags = 1; + { + var error = $root.google.cloud.backupdr.v1.Tags.verify(message.tags); + if (error) + return "tags." + error; + } + } + if (message.machineType != null && message.hasOwnProperty("machineType")) { + properties._machineType = 1; + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + properties._canIpForward = 1; + if (typeof message.canIpForward !== "boolean") + return "canIpForward: boolean expected"; + } + if (message.networkInterface != null && message.hasOwnProperty("networkInterface")) { + if (!Array.isArray(message.networkInterface)) + return "networkInterface: array expected"; + for (var i = 0; i < message.networkInterface.length; ++i) { + var error = $root.google.cloud.backupdr.v1.NetworkInterface.verify(message.networkInterface[i]); + if (error) + return "networkInterface." + error; + } + } + if (message.disk != null && message.hasOwnProperty("disk")) { + if (!Array.isArray(message.disk)) + return "disk: array expected"; + for (var i = 0; i < message.disk.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AttachedDisk.verify(message.disk[i]); + if (error) + return "disk." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + { + var error = $root.google.cloud.backupdr.v1.Metadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) { + if (!Array.isArray(message.serviceAccount)) + return "serviceAccount: array expected"; + for (var i = 0; i < message.serviceAccount.length; ++i) { + var error = $root.google.cloud.backupdr.v1.ServiceAccount.verify(message.serviceAccount[i]); + if (error) + return "serviceAccount." + error; + } + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + properties._scheduling = 1; + { + var error = $root.google.cloud.backupdr.v1.Scheduling.verify(message.scheduling); + if (error) + return "scheduling." + error; + } + } + if (message.guestAccelerator != null && message.hasOwnProperty("guestAccelerator")) { + if (!Array.isArray(message.guestAccelerator)) + return "guestAccelerator: array expected"; + for (var i = 0; i < message.guestAccelerator.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AcceleratorConfig.verify(message.guestAccelerator[i]); + if (error) + return "guestAccelerator." + error; + } + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + properties._minCpuPlatform = 1; + if (!$util.isString(message.minCpuPlatform)) + return "minCpuPlatform: string expected"; + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + properties._keyRevocationActionType = 1; + switch (message.keyRevocationActionType) { + default: + return "keyRevocationActionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) { + properties._sourceInstance = 1; + if (!$util.isString(message.sourceInstance)) + return "sourceInstance: string expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties + */ + ComputeInstanceBackupProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties(); + if (object.description != null) + message.description = String(object.description); + if (object.tags != null) { + if (typeof object.tags !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.tags: object expected"); + message.tags = $root.google.cloud.backupdr.v1.Tags.fromObject(object.tags); + } + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.canIpForward != null) + message.canIpForward = Boolean(object.canIpForward); + if (object.networkInterface) { + if (!Array.isArray(object.networkInterface)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: array expected"); + message.networkInterface = []; + for (var i = 0; i < object.networkInterface.length; ++i) { + if (typeof object.networkInterface[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: object expected"); + message.networkInterface[i] = $root.google.cloud.backupdr.v1.NetworkInterface.fromObject(object.networkInterface[i]); + } + } + if (object.disk) { + if (!Array.isArray(object.disk)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.disk: array expected"); + message.disk = []; + for (var i = 0; i < object.disk.length; ++i) { + if (typeof object.disk[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.disk: object expected"); + message.disk[i] = $root.google.cloud.backupdr.v1.AttachedDisk.fromObject(object.disk[i]); + } + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.metadata: object expected"); + message.metadata = $root.google.cloud.backupdr.v1.Metadata.fromObject(object.metadata); + } + if (object.serviceAccount) { + if (!Array.isArray(object.serviceAccount)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.serviceAccount: array expected"); + message.serviceAccount = []; + for (var i = 0; i < object.serviceAccount.length; ++i) { + if (typeof object.serviceAccount[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.serviceAccount: object expected"); + message.serviceAccount[i] = $root.google.cloud.backupdr.v1.ServiceAccount.fromObject(object.serviceAccount[i]); + } + } + if (object.scheduling != null) { + if (typeof object.scheduling !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.scheduling: object expected"); + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.fromObject(object.scheduling); + } + if (object.guestAccelerator) { + if (!Array.isArray(object.guestAccelerator)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.guestAccelerator: array expected"); + message.guestAccelerator = []; + for (var i = 0; i < object.guestAccelerator.length; ++i) { + if (typeof object.guestAccelerator[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.guestAccelerator: object expected"); + message.guestAccelerator[i] = $root.google.cloud.backupdr.v1.AcceleratorConfig.fromObject(object.guestAccelerator[i]); + } + } + if (object.minCpuPlatform != null) + message.minCpuPlatform = String(object.minCpuPlatform); + switch (object.keyRevocationActionType) { + default: + if (typeof object.keyRevocationActionType === "number") { + message.keyRevocationActionType = object.keyRevocationActionType; + break; + } + break; + case "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": + case 0: + message.keyRevocationActionType = 0; + break; + case "NONE": + case 1: + message.keyRevocationActionType = 1; + break; + case "STOP": + case 2: + message.keyRevocationActionType = 2; + break; + } + if (object.sourceInstance != null) + message.sourceInstance = String(object.sourceInstance); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} message ComputeInstanceBackupProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeInstanceBackupProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.networkInterface = []; + object.disk = []; + object.serviceAccount = []; + object.guestAccelerator = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + object.tags = $root.google.cloud.backupdr.v1.Tags.toObject(message.tags, options); + if (options.oneofs) + object._tags = "tags"; + } + if (message.machineType != null && message.hasOwnProperty("machineType")) { + object.machineType = message.machineType; + if (options.oneofs) + object._machineType = "machineType"; + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + object.canIpForward = message.canIpForward; + if (options.oneofs) + object._canIpForward = "canIpForward"; + } + if (message.networkInterface && message.networkInterface.length) { + object.networkInterface = []; + for (var j = 0; j < message.networkInterface.length; ++j) + object.networkInterface[j] = $root.google.cloud.backupdr.v1.NetworkInterface.toObject(message.networkInterface[j], options); + } + if (message.disk && message.disk.length) { + object.disk = []; + for (var j = 0; j < message.disk.length; ++j) + object.disk[j] = $root.google.cloud.backupdr.v1.AttachedDisk.toObject(message.disk[j], options); + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = $root.google.cloud.backupdr.v1.Metadata.toObject(message.metadata, options); + if (options.oneofs) + object._metadata = "metadata"; + } + if (message.serviceAccount && message.serviceAccount.length) { + object.serviceAccount = []; + for (var j = 0; j < message.serviceAccount.length; ++j) + object.serviceAccount[j] = $root.google.cloud.backupdr.v1.ServiceAccount.toObject(message.serviceAccount[j], options); + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + object.scheduling = $root.google.cloud.backupdr.v1.Scheduling.toObject(message.scheduling, options); + if (options.oneofs) + object._scheduling = "scheduling"; + } + if (message.guestAccelerator && message.guestAccelerator.length) { + object.guestAccelerator = []; + for (var j = 0; j < message.guestAccelerator.length; ++j) + object.guestAccelerator[j] = $root.google.cloud.backupdr.v1.AcceleratorConfig.toObject(message.guestAccelerator[j], options); + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + object.minCpuPlatform = message.minCpuPlatform; + if (options.oneofs) + object._minCpuPlatform = "minCpuPlatform"; + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + object.keyRevocationActionType = options.enums === String ? $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] === undefined ? message.keyRevocationActionType : $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] : message.keyRevocationActionType; + if (options.oneofs) + object._keyRevocationActionType = "keyRevocationActionType"; + } + if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) { + object.sourceInstance = message.sourceInstance; + if (options.oneofs) + object._sourceInstance = "sourceInstance"; + } + 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]]; + } + return object; + }; + + /** + * Converts this ComputeInstanceBackupProperties to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + * @returns {Object.} JSON object + */ + ComputeInstanceBackupProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComputeInstanceBackupProperties + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputeInstanceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceBackupProperties"; + }; + + return ComputeInstanceBackupProperties; + })(); + + v1.ComputeInstanceRestoreProperties = (function() { + + /** + * Properties of a ComputeInstanceRestoreProperties. + * @memberof google.cloud.backupdr.v1 + * @interface IComputeInstanceRestoreProperties + * @property {string|null} [name] ComputeInstanceRestoreProperties name + * @property {google.cloud.backupdr.v1.IAdvancedMachineFeatures|null} [advancedMachineFeatures] ComputeInstanceRestoreProperties advancedMachineFeatures + * @property {boolean|null} [canIpForward] ComputeInstanceRestoreProperties canIpForward + * @property {google.cloud.backupdr.v1.IConfidentialInstanceConfig|null} [confidentialInstanceConfig] ComputeInstanceRestoreProperties confidentialInstanceConfig + * @property {boolean|null} [deletionProtection] ComputeInstanceRestoreProperties deletionProtection + * @property {string|null} [description] ComputeInstanceRestoreProperties description + * @property {Array.|null} [disks] ComputeInstanceRestoreProperties disks + * @property {google.cloud.backupdr.v1.IDisplayDevice|null} [displayDevice] ComputeInstanceRestoreProperties displayDevice + * @property {Array.|null} [guestAccelerators] ComputeInstanceRestoreProperties guestAccelerators + * @property {string|null} [hostname] ComputeInstanceRestoreProperties hostname + * @property {google.cloud.backupdr.v1.ICustomerEncryptionKey|null} [instanceEncryptionKey] ComputeInstanceRestoreProperties instanceEncryptionKey + * @property {google.cloud.backupdr.v1.KeyRevocationActionType|null} [keyRevocationActionType] ComputeInstanceRestoreProperties keyRevocationActionType + * @property {Object.|null} [labels] ComputeInstanceRestoreProperties labels + * @property {string|null} [machineType] ComputeInstanceRestoreProperties machineType + * @property {google.cloud.backupdr.v1.IMetadata|null} [metadata] ComputeInstanceRestoreProperties metadata + * @property {string|null} [minCpuPlatform] ComputeInstanceRestoreProperties minCpuPlatform + * @property {Array.|null} [networkInterfaces] ComputeInstanceRestoreProperties networkInterfaces + * @property {google.cloud.backupdr.v1.INetworkPerformanceConfig|null} [networkPerformanceConfig] ComputeInstanceRestoreProperties networkPerformanceConfig + * @property {google.cloud.backupdr.v1.IInstanceParams|null} [params] ComputeInstanceRestoreProperties params + * @property {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null} [privateIpv6GoogleAccess] ComputeInstanceRestoreProperties privateIpv6GoogleAccess + * @property {google.cloud.backupdr.v1.IAllocationAffinity|null} [allocationAffinity] ComputeInstanceRestoreProperties allocationAffinity + * @property {Array.|null} [resourcePolicies] ComputeInstanceRestoreProperties resourcePolicies + * @property {google.cloud.backupdr.v1.IScheduling|null} [scheduling] ComputeInstanceRestoreProperties scheduling + * @property {Array.|null} [serviceAccounts] ComputeInstanceRestoreProperties serviceAccounts + * @property {google.cloud.backupdr.v1.ITags|null} [tags] ComputeInstanceRestoreProperties tags + */ + + /** + * Constructs a new ComputeInstanceRestoreProperties. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ComputeInstanceRestoreProperties. + * @implements IComputeInstanceRestoreProperties + * @constructor + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties=} [properties] Properties to set + */ + function ComputeInstanceRestoreProperties(properties) { + this.disks = []; + this.guestAccelerators = []; + this.labels = {}; + this.networkInterfaces = []; + this.resourcePolicies = []; + this.serviceAccounts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComputeInstanceRestoreProperties name. + * @member {string|null|undefined} name + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.name = null; + + /** + * ComputeInstanceRestoreProperties advancedMachineFeatures. + * @member {google.cloud.backupdr.v1.IAdvancedMachineFeatures|null|undefined} advancedMachineFeatures + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.advancedMachineFeatures = null; + + /** + * ComputeInstanceRestoreProperties canIpForward. + * @member {boolean|null|undefined} canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.canIpForward = null; + + /** + * ComputeInstanceRestoreProperties confidentialInstanceConfig. + * @member {google.cloud.backupdr.v1.IConfidentialInstanceConfig|null|undefined} confidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.confidentialInstanceConfig = null; + + /** + * ComputeInstanceRestoreProperties deletionProtection. + * @member {boolean|null|undefined} deletionProtection + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.deletionProtection = null; + + /** + * ComputeInstanceRestoreProperties description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.description = null; + + /** + * ComputeInstanceRestoreProperties disks. + * @member {Array.} disks + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.disks = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties displayDevice. + * @member {google.cloud.backupdr.v1.IDisplayDevice|null|undefined} displayDevice + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.displayDevice = null; + + /** + * ComputeInstanceRestoreProperties guestAccelerators. + * @member {Array.} guestAccelerators + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.guestAccelerators = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties hostname. + * @member {string|null|undefined} hostname + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.hostname = null; + + /** + * ComputeInstanceRestoreProperties instanceEncryptionKey. + * @member {google.cloud.backupdr.v1.ICustomerEncryptionKey|null|undefined} instanceEncryptionKey + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.instanceEncryptionKey = null; + + /** + * ComputeInstanceRestoreProperties keyRevocationActionType. + * @member {google.cloud.backupdr.v1.KeyRevocationActionType|null|undefined} keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.keyRevocationActionType = null; + + /** + * ComputeInstanceRestoreProperties labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.labels = $util.emptyObject; + + /** + * ComputeInstanceRestoreProperties machineType. + * @member {string|null|undefined} machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.machineType = null; + + /** + * ComputeInstanceRestoreProperties metadata. + * @member {google.cloud.backupdr.v1.IMetadata|null|undefined} metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.metadata = null; + + /** + * ComputeInstanceRestoreProperties minCpuPlatform. + * @member {string|null|undefined} minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.minCpuPlatform = null; + + /** + * ComputeInstanceRestoreProperties networkInterfaces. + * @member {Array.} networkInterfaces + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.networkInterfaces = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties networkPerformanceConfig. + * @member {google.cloud.backupdr.v1.INetworkPerformanceConfig|null|undefined} networkPerformanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.networkPerformanceConfig = null; + + /** + * ComputeInstanceRestoreProperties params. + * @member {google.cloud.backupdr.v1.IInstanceParams|null|undefined} params + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.params = null; + + /** + * ComputeInstanceRestoreProperties privateIpv6GoogleAccess. + * @member {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null|undefined} privateIpv6GoogleAccess + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.privateIpv6GoogleAccess = null; + + /** + * ComputeInstanceRestoreProperties allocationAffinity. + * @member {google.cloud.backupdr.v1.IAllocationAffinity|null|undefined} allocationAffinity + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.allocationAffinity = null; + + /** + * ComputeInstanceRestoreProperties resourcePolicies. + * @member {Array.} resourcePolicies + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.resourcePolicies = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties scheduling. + * @member {google.cloud.backupdr.v1.IScheduling|null|undefined} scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.scheduling = null; + + /** + * ComputeInstanceRestoreProperties serviceAccounts. + * @member {Array.} serviceAccounts + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.serviceAccounts = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties tags. + * @member {google.cloud.backupdr.v1.ITags|null|undefined} tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.tags = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ComputeInstanceRestoreProperties _name. + * @member {"name"|undefined} _name + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _advancedMachineFeatures. + * @member {"advancedMachineFeatures"|undefined} _advancedMachineFeatures + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_advancedMachineFeatures", { + get: $util.oneOfGetter($oneOfFields = ["advancedMachineFeatures"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _canIpForward. + * @member {"canIpForward"|undefined} _canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_canIpForward", { + get: $util.oneOfGetter($oneOfFields = ["canIpForward"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _confidentialInstanceConfig. + * @member {"confidentialInstanceConfig"|undefined} _confidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_confidentialInstanceConfig", { + get: $util.oneOfGetter($oneOfFields = ["confidentialInstanceConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _deletionProtection. + * @member {"deletionProtection"|undefined} _deletionProtection + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_deletionProtection", { + get: $util.oneOfGetter($oneOfFields = ["deletionProtection"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _displayDevice. + * @member {"displayDevice"|undefined} _displayDevice + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_displayDevice", { + get: $util.oneOfGetter($oneOfFields = ["displayDevice"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _hostname. + * @member {"hostname"|undefined} _hostname + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_hostname", { + get: $util.oneOfGetter($oneOfFields = ["hostname"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _instanceEncryptionKey. + * @member {"instanceEncryptionKey"|undefined} _instanceEncryptionKey + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_instanceEncryptionKey", { + get: $util.oneOfGetter($oneOfFields = ["instanceEncryptionKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _keyRevocationActionType. + * @member {"keyRevocationActionType"|undefined} _keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_keyRevocationActionType", { + get: $util.oneOfGetter($oneOfFields = ["keyRevocationActionType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _machineType. + * @member {"machineType"|undefined} _machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_machineType", { + get: $util.oneOfGetter($oneOfFields = ["machineType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _minCpuPlatform. + * @member {"minCpuPlatform"|undefined} _minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_minCpuPlatform", { + get: $util.oneOfGetter($oneOfFields = ["minCpuPlatform"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _networkPerformanceConfig. + * @member {"networkPerformanceConfig"|undefined} _networkPerformanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_networkPerformanceConfig", { + get: $util.oneOfGetter($oneOfFields = ["networkPerformanceConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _params. + * @member {"params"|undefined} _params + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_params", { + get: $util.oneOfGetter($oneOfFields = ["params"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _privateIpv6GoogleAccess. + * @member {"privateIpv6GoogleAccess"|undefined} _privateIpv6GoogleAccess + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_privateIpv6GoogleAccess", { + get: $util.oneOfGetter($oneOfFields = ["privateIpv6GoogleAccess"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _allocationAffinity. + * @member {"allocationAffinity"|undefined} _allocationAffinity + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_allocationAffinity", { + get: $util.oneOfGetter($oneOfFields = ["allocationAffinity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _scheduling. + * @member {"scheduling"|undefined} _scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_scheduling", { + get: $util.oneOfGetter($oneOfFields = ["scheduling"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _tags. + * @member {"tags"|undefined} _tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_tags", { + get: $util.oneOfGetter($oneOfFields = ["tags"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties instance + */ + ComputeInstanceRestoreProperties.create = function create(properties) { + return new ComputeInstanceRestoreProperties(properties); + }; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceRestoreProperties.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.advancedMachineFeatures != null && Object.hasOwnProperty.call(message, "advancedMachineFeatures")) + $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.encode(message.advancedMachineFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.canIpForward != null && Object.hasOwnProperty.call(message, "canIpForward")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.canIpForward); + if (message.confidentialInstanceConfig != null && Object.hasOwnProperty.call(message, "confidentialInstanceConfig")) + $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.encode(message.confidentialInstanceConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.deletionProtection); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.disks != null && message.disks.length) + for (var i = 0; i < message.disks.length; ++i) + $root.google.cloud.backupdr.v1.AttachedDisk.encode(message.disks[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.displayDevice != null && Object.hasOwnProperty.call(message, "displayDevice")) + $root.google.cloud.backupdr.v1.DisplayDevice.encode(message.displayDevice, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.guestAccelerators != null && message.guestAccelerators.length) + for (var i = 0; i < message.guestAccelerators.length; ++i) + $root.google.cloud.backupdr.v1.AcceleratorConfig.encode(message.guestAccelerators[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.hostname); + if (message.instanceEncryptionKey != null && Object.hasOwnProperty.call(message, "instanceEncryptionKey")) + $root.google.cloud.backupdr.v1.CustomerEncryptionKey.encode(message.instanceEncryptionKey, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.keyRevocationActionType != null && Object.hasOwnProperty.call(message, "keyRevocationActionType")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.keyRevocationActionType); + 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 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.machineType); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.cloud.backupdr.v1.Metadata.encode(message.metadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.minCpuPlatform); + if (message.networkInterfaces != null && message.networkInterfaces.length) + for (var i = 0; i < message.networkInterfaces.length; ++i) + $root.google.cloud.backupdr.v1.NetworkInterface.encode(message.networkInterfaces[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.networkPerformanceConfig != null && Object.hasOwnProperty.call(message, "networkPerformanceConfig")) + $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.encode(message.networkPerformanceConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.google.cloud.backupdr.v1.InstanceParams.encode(message.params, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.privateIpv6GoogleAccess != null && Object.hasOwnProperty.call(message, "privateIpv6GoogleAccess")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.privateIpv6GoogleAccess); + if (message.allocationAffinity != null && Object.hasOwnProperty.call(message, "allocationAffinity")) + $root.google.cloud.backupdr.v1.AllocationAffinity.encode(message.allocationAffinity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.resourcePolicies != null && message.resourcePolicies.length) + for (var i = 0; i < message.resourcePolicies.length; ++i) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.resourcePolicies[i]); + if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) + $root.google.cloud.backupdr.v1.Scheduling.encode(message.scheduling, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.serviceAccounts != null && message.serviceAccounts.length) + for (var i = 0; i < message.serviceAccounts.length; ++i) + $root.google.cloud.backupdr.v1.ServiceAccount.encode(message.serviceAccounts[i], writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + $root.google.cloud.backupdr.v1.Tags.encode(message.tags, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceRestoreProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceRestoreProperties.decode = function 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.backupdr.v1.ComputeInstanceRestoreProperties(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.decode(reader, reader.uint32()); + break; + } + case 3: { + message.canIpForward = reader.bool(); + break; + } + case 4: { + message.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.deletionProtection = reader.bool(); + break; + } + case 6: { + message.description = reader.string(); + break; + } + case 7: { + if (!(message.disks && message.disks.length)) + message.disks = []; + message.disks.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader, reader.uint32())); + break; + } + case 8: { + message.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.guestAccelerators && message.guestAccelerators.length)) + message.guestAccelerators = []; + message.guestAccelerators.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader, reader.uint32())); + break; + } + case 10: { + message.hostname = reader.string(); + break; + } + case 11: { + message.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader, reader.uint32()); + break; + } + case 12: { + message.keyRevocationActionType = reader.int32(); + break; + } + case 13: { + 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 14: { + message.machineType = reader.string(); + break; + } + case 15: { + message.metadata = $root.google.cloud.backupdr.v1.Metadata.decode(reader, reader.uint32()); + break; + } + case 16: { + message.minCpuPlatform = reader.string(); + break; + } + case 17: { + if (!(message.networkInterfaces && message.networkInterfaces.length)) + message.networkInterfaces = []; + message.networkInterfaces.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader, reader.uint32())); + break; + } + case 18: { + message.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.decode(reader, reader.uint32()); + break; + } + case 19: { + message.params = $root.google.cloud.backupdr.v1.InstanceParams.decode(reader, reader.uint32()); + break; + } + case 20: { + message.privateIpv6GoogleAccess = reader.int32(); + break; + } + case 21: { + message.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.decode(reader, reader.uint32()); + break; + } + case 22: { + if (!(message.resourcePolicies && message.resourcePolicies.length)) + message.resourcePolicies = []; + message.resourcePolicies.push(reader.string()); + break; + } + case 23: { + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.decode(reader, reader.uint32()); + break; + } + case 24: { + if (!(message.serviceAccounts && message.serviceAccounts.length)) + message.serviceAccounts = []; + message.serviceAccounts.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader, reader.uint32())); + break; + } + case 26: { + message.tags = $root.google.cloud.backupdr.v1.Tags.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceRestoreProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputeInstanceRestoreProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeInstanceRestoreProperties.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { + properties._advancedMachineFeatures = 1; + { + var error = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.verify(message.advancedMachineFeatures); + if (error) + return "advancedMachineFeatures." + error; + } + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + properties._canIpForward = 1; + if (typeof message.canIpForward !== "boolean") + return "canIpForward: boolean expected"; + } + if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) { + properties._confidentialInstanceConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify(message.confidentialInstanceConfig); + if (error) + return "confidentialInstanceConfig." + error; + } + } + if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) { + properties._deletionProtection = 1; + if (typeof message.deletionProtection !== "boolean") + return "deletionProtection: boolean expected"; + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.disks != null && message.hasOwnProperty("disks")) { + if (!Array.isArray(message.disks)) + return "disks: array expected"; + for (var i = 0; i < message.disks.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AttachedDisk.verify(message.disks[i]); + if (error) + return "disks." + error; + } + } + if (message.displayDevice != null && message.hasOwnProperty("displayDevice")) { + properties._displayDevice = 1; + { + var error = $root.google.cloud.backupdr.v1.DisplayDevice.verify(message.displayDevice); + if (error) + return "displayDevice." + error; + } + } + if (message.guestAccelerators != null && message.hasOwnProperty("guestAccelerators")) { + if (!Array.isArray(message.guestAccelerators)) + return "guestAccelerators: array expected"; + for (var i = 0; i < message.guestAccelerators.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AcceleratorConfig.verify(message.guestAccelerators[i]); + if (error) + return "guestAccelerators." + error; + } + } + if (message.hostname != null && message.hasOwnProperty("hostname")) { + properties._hostname = 1; + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + } + if (message.instanceEncryptionKey != null && message.hasOwnProperty("instanceEncryptionKey")) { + properties._instanceEncryptionKey = 1; + { + var error = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.verify(message.instanceEncryptionKey); + if (error) + return "instanceEncryptionKey." + error; + } + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + properties._keyRevocationActionType = 1; + switch (message.keyRevocationActionType) { + default: + return "keyRevocationActionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + 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.machineType != null && message.hasOwnProperty("machineType")) { + properties._machineType = 1; + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + { + var error = $root.google.cloud.backupdr.v1.Metadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + properties._minCpuPlatform = 1; + if (!$util.isString(message.minCpuPlatform)) + return "minCpuPlatform: string expected"; + } + if (message.networkInterfaces != null && message.hasOwnProperty("networkInterfaces")) { + if (!Array.isArray(message.networkInterfaces)) + return "networkInterfaces: array expected"; + for (var i = 0; i < message.networkInterfaces.length; ++i) { + var error = $root.google.cloud.backupdr.v1.NetworkInterface.verify(message.networkInterfaces[i]); + if (error) + return "networkInterfaces." + error; + } + } + if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { + properties._networkPerformanceConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.verify(message.networkPerformanceConfig); + if (error) + return "networkPerformanceConfig." + error; + } + } + if (message.params != null && message.hasOwnProperty("params")) { + properties._params = 1; + { + var error = $root.google.cloud.backupdr.v1.InstanceParams.verify(message.params); + if (error) + return "params." + error; + } + } + if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) { + properties._privateIpv6GoogleAccess = 1; + switch (message.privateIpv6GoogleAccess) { + default: + return "privateIpv6GoogleAccess: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.allocationAffinity != null && message.hasOwnProperty("allocationAffinity")) { + properties._allocationAffinity = 1; + { + var error = $root.google.cloud.backupdr.v1.AllocationAffinity.verify(message.allocationAffinity); + if (error) + return "allocationAffinity." + error; + } + } + if (message.resourcePolicies != null && message.hasOwnProperty("resourcePolicies")) { + if (!Array.isArray(message.resourcePolicies)) + return "resourcePolicies: array expected"; + for (var i = 0; i < message.resourcePolicies.length; ++i) + if (!$util.isString(message.resourcePolicies[i])) + return "resourcePolicies: string[] expected"; + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + properties._scheduling = 1; + { + var error = $root.google.cloud.backupdr.v1.Scheduling.verify(message.scheduling); + if (error) + return "scheduling." + error; + } + } + if (message.serviceAccounts != null && message.hasOwnProperty("serviceAccounts")) { + if (!Array.isArray(message.serviceAccounts)) + return "serviceAccounts: array expected"; + for (var i = 0; i < message.serviceAccounts.length; ++i) { + var error = $root.google.cloud.backupdr.v1.ServiceAccount.verify(message.serviceAccounts[i]); + if (error) + return "serviceAccounts." + error; + } + } + if (message.tags != null && message.hasOwnProperty("tags")) { + properties._tags = 1; + { + var error = $root.google.cloud.backupdr.v1.Tags.verify(message.tags); + if (error) + return "tags." + error; + } + } + return null; + }; + + /** + * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties + */ + ComputeInstanceRestoreProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties(); + if (object.name != null) + message.name = String(object.name); + if (object.advancedMachineFeatures != null) { + if (typeof object.advancedMachineFeatures !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.advancedMachineFeatures: object expected"); + message.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.fromObject(object.advancedMachineFeatures); + } + if (object.canIpForward != null) + message.canIpForward = Boolean(object.canIpForward); + if (object.confidentialInstanceConfig != null) { + if (typeof object.confidentialInstanceConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.confidentialInstanceConfig: object expected"); + message.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.fromObject(object.confidentialInstanceConfig); + } + if (object.deletionProtection != null) + message.deletionProtection = Boolean(object.deletionProtection); + if (object.description != null) + message.description = String(object.description); + if (object.disks) { + if (!Array.isArray(object.disks)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: array expected"); + message.disks = []; + for (var i = 0; i < object.disks.length; ++i) { + if (typeof object.disks[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: object expected"); + message.disks[i] = $root.google.cloud.backupdr.v1.AttachedDisk.fromObject(object.disks[i]); + } + } + if (object.displayDevice != null) { + if (typeof object.displayDevice !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.displayDevice: object expected"); + message.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.fromObject(object.displayDevice); + } + if (object.guestAccelerators) { + if (!Array.isArray(object.guestAccelerators)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.guestAccelerators: array expected"); + message.guestAccelerators = []; + for (var i = 0; i < object.guestAccelerators.length; ++i) { + if (typeof object.guestAccelerators[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.guestAccelerators: object expected"); + message.guestAccelerators[i] = $root.google.cloud.backupdr.v1.AcceleratorConfig.fromObject(object.guestAccelerators[i]); + } + } + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.instanceEncryptionKey != null) { + if (typeof object.instanceEncryptionKey !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.instanceEncryptionKey: object expected"); + message.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.fromObject(object.instanceEncryptionKey); + } + switch (object.keyRevocationActionType) { + default: + if (typeof object.keyRevocationActionType === "number") { + message.keyRevocationActionType = object.keyRevocationActionType; + break; + } + break; + case "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": + case 0: + message.keyRevocationActionType = 0; + break; + case "NONE": + case 1: + message.keyRevocationActionType = 1; + break; + case "STOP": + case 2: + message.keyRevocationActionType = 2; + break; + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.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.machineType != null) + message.machineType = String(object.machineType); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.metadata: object expected"); + message.metadata = $root.google.cloud.backupdr.v1.Metadata.fromObject(object.metadata); + } + if (object.minCpuPlatform != null) + message.minCpuPlatform = String(object.minCpuPlatform); + if (object.networkInterfaces) { + if (!Array.isArray(object.networkInterfaces)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkInterfaces: array expected"); + message.networkInterfaces = []; + for (var i = 0; i < object.networkInterfaces.length; ++i) { + if (typeof object.networkInterfaces[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkInterfaces: object expected"); + message.networkInterfaces[i] = $root.google.cloud.backupdr.v1.NetworkInterface.fromObject(object.networkInterfaces[i]); + } + } + if (object.networkPerformanceConfig != null) { + if (typeof object.networkPerformanceConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkPerformanceConfig: object expected"); + message.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.fromObject(object.networkPerformanceConfig); + } + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.params: object expected"); + message.params = $root.google.cloud.backupdr.v1.InstanceParams.fromObject(object.params); + } + switch (object.privateIpv6GoogleAccess) { + default: + if (typeof object.privateIpv6GoogleAccess === "number") { + message.privateIpv6GoogleAccess = object.privateIpv6GoogleAccess; + break; + } + break; + case "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": + case 0: + message.privateIpv6GoogleAccess = 0; + break; + case "INHERIT_FROM_SUBNETWORK": + case 1: + message.privateIpv6GoogleAccess = 1; + break; + case "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE": + case 2: + message.privateIpv6GoogleAccess = 2; + break; + case "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE": + case 3: + message.privateIpv6GoogleAccess = 3; + break; + } + if (object.allocationAffinity != null) { + if (typeof object.allocationAffinity !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.allocationAffinity: object expected"); + message.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.fromObject(object.allocationAffinity); + } + if (object.resourcePolicies) { + if (!Array.isArray(object.resourcePolicies)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.resourcePolicies: array expected"); + message.resourcePolicies = []; + for (var i = 0; i < object.resourcePolicies.length; ++i) + message.resourcePolicies[i] = String(object.resourcePolicies[i]); + } + if (object.scheduling != null) { + if (typeof object.scheduling !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.scheduling: object expected"); + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.fromObject(object.scheduling); + } + if (object.serviceAccounts) { + if (!Array.isArray(object.serviceAccounts)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.serviceAccounts: array expected"); + message.serviceAccounts = []; + for (var i = 0; i < object.serviceAccounts.length; ++i) { + if (typeof object.serviceAccounts[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.serviceAccounts: object expected"); + message.serviceAccounts[i] = $root.google.cloud.backupdr.v1.ServiceAccount.fromObject(object.serviceAccounts[i]); + } + } + if (object.tags != null) { + if (typeof object.tags !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.tags: object expected"); + message.tags = $root.google.cloud.backupdr.v1.Tags.fromObject(object.tags); + } + return message; + }; + + /** + * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeInstanceRestoreProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.disks = []; + object.guestAccelerators = []; + object.networkInterfaces = []; + object.resourcePolicies = []; + object.serviceAccounts = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { + object.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.toObject(message.advancedMachineFeatures, options); + if (options.oneofs) + object._advancedMachineFeatures = "advancedMachineFeatures"; + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + object.canIpForward = message.canIpForward; + if (options.oneofs) + object._canIpForward = "canIpForward"; + } + if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) { + object.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.toObject(message.confidentialInstanceConfig, options); + if (options.oneofs) + object._confidentialInstanceConfig = "confidentialInstanceConfig"; + } + if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) { + object.deletionProtection = message.deletionProtection; + if (options.oneofs) + object._deletionProtection = "deletionProtection"; + } + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.disks && message.disks.length) { + object.disks = []; + for (var j = 0; j < message.disks.length; ++j) + object.disks[j] = $root.google.cloud.backupdr.v1.AttachedDisk.toObject(message.disks[j], options); + } + if (message.displayDevice != null && message.hasOwnProperty("displayDevice")) { + object.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.toObject(message.displayDevice, options); + if (options.oneofs) + object._displayDevice = "displayDevice"; + } + if (message.guestAccelerators && message.guestAccelerators.length) { + object.guestAccelerators = []; + for (var j = 0; j < message.guestAccelerators.length; ++j) + object.guestAccelerators[j] = $root.google.cloud.backupdr.v1.AcceleratorConfig.toObject(message.guestAccelerators[j], options); + } + if (message.hostname != null && message.hasOwnProperty("hostname")) { + object.hostname = message.hostname; + if (options.oneofs) + object._hostname = "hostname"; + } + if (message.instanceEncryptionKey != null && message.hasOwnProperty("instanceEncryptionKey")) { + object.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.toObject(message.instanceEncryptionKey, options); + if (options.oneofs) + object._instanceEncryptionKey = "instanceEncryptionKey"; + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + object.keyRevocationActionType = options.enums === String ? $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] === undefined ? message.keyRevocationActionType : $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] : message.keyRevocationActionType; + if (options.oneofs) + object._keyRevocationActionType = "keyRevocationActionType"; + } + 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.machineType != null && message.hasOwnProperty("machineType")) { + object.machineType = message.machineType; + if (options.oneofs) + object._machineType = "machineType"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = $root.google.cloud.backupdr.v1.Metadata.toObject(message.metadata, options); + if (options.oneofs) + object._metadata = "metadata"; + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + object.minCpuPlatform = message.minCpuPlatform; + if (options.oneofs) + object._minCpuPlatform = "minCpuPlatform"; + } + if (message.networkInterfaces && message.networkInterfaces.length) { + object.networkInterfaces = []; + for (var j = 0; j < message.networkInterfaces.length; ++j) + object.networkInterfaces[j] = $root.google.cloud.backupdr.v1.NetworkInterface.toObject(message.networkInterfaces[j], options); + } + if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { + object.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.toObject(message.networkPerformanceConfig, options); + if (options.oneofs) + object._networkPerformanceConfig = "networkPerformanceConfig"; + } + if (message.params != null && message.hasOwnProperty("params")) { + object.params = $root.google.cloud.backupdr.v1.InstanceParams.toObject(message.params, options); + if (options.oneofs) + object._params = "params"; + } + if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) { + object.privateIpv6GoogleAccess = options.enums === String ? $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess[message.privateIpv6GoogleAccess] === undefined ? message.privateIpv6GoogleAccess : $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess[message.privateIpv6GoogleAccess] : message.privateIpv6GoogleAccess; + if (options.oneofs) + object._privateIpv6GoogleAccess = "privateIpv6GoogleAccess"; + } + if (message.allocationAffinity != null && message.hasOwnProperty("allocationAffinity")) { + object.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.toObject(message.allocationAffinity, options); + if (options.oneofs) + object._allocationAffinity = "allocationAffinity"; + } + if (message.resourcePolicies && message.resourcePolicies.length) { + object.resourcePolicies = []; + for (var j = 0; j < message.resourcePolicies.length; ++j) + object.resourcePolicies[j] = message.resourcePolicies[j]; + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + object.scheduling = $root.google.cloud.backupdr.v1.Scheduling.toObject(message.scheduling, options); + if (options.oneofs) + object._scheduling = "scheduling"; + } + if (message.serviceAccounts && message.serviceAccounts.length) { + object.serviceAccounts = []; + for (var j = 0; j < message.serviceAccounts.length; ++j) + object.serviceAccounts[j] = $root.google.cloud.backupdr.v1.ServiceAccount.toObject(message.serviceAccounts[j], options); + } + if (message.tags != null && message.hasOwnProperty("tags")) { + object.tags = $root.google.cloud.backupdr.v1.Tags.toObject(message.tags, options); + if (options.oneofs) + object._tags = "tags"; + } + return object; + }; + + /** + * Converts this ComputeInstanceRestoreProperties to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + * @returns {Object.} JSON object + */ + ComputeInstanceRestoreProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComputeInstanceRestoreProperties + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputeInstanceRestoreProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceRestoreProperties"; + }; + + /** + * InstancePrivateIpv6GoogleAccess enum. + * @name google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess + * @enum {number} + * @property {number} INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED=0 INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED value + * @property {number} INHERIT_FROM_SUBNETWORK=1 INHERIT_FROM_SUBNETWORK value + * @property {number} ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE=2 ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE value + * @property {number} ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE=3 ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE value + */ + ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED"] = 0; + values[valuesById[1] = "INHERIT_FROM_SUBNETWORK"] = 1; + values[valuesById[2] = "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE"] = 2; + values[valuesById[3] = "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE"] = 3; + return values; + })(); + + return ComputeInstanceRestoreProperties; + })(); + + v1.ComputeInstanceTargetEnvironment = (function() { + + /** + * Properties of a ComputeInstanceTargetEnvironment. + * @memberof google.cloud.backupdr.v1 + * @interface IComputeInstanceTargetEnvironment + * @property {string|null} [project] ComputeInstanceTargetEnvironment project + * @property {string|null} [zone] ComputeInstanceTargetEnvironment zone + */ + + /** + * Constructs a new ComputeInstanceTargetEnvironment. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ComputeInstanceTargetEnvironment. + * @implements IComputeInstanceTargetEnvironment + * @constructor + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment=} [properties] Properties to set + */ + function ComputeInstanceTargetEnvironment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComputeInstanceTargetEnvironment project. + * @member {string} project + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @instance + */ + ComputeInstanceTargetEnvironment.prototype.project = ""; + + /** + * ComputeInstanceTargetEnvironment zone. + * @member {string} zone + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @instance + */ + ComputeInstanceTargetEnvironment.prototype.zone = ""; + + /** + * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment instance + */ + ComputeInstanceTargetEnvironment.create = function create(properties) { + return new ComputeInstanceTargetEnvironment(properties); + }; + + /** + * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceTargetEnvironment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + return writer; + }; + + /** + * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceTargetEnvironment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceTargetEnvironment.decode = function 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.backupdr.v1.ComputeInstanceTargetEnvironment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.project = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceTargetEnvironment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputeInstanceTargetEnvironment message. + * @function verify + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeInstanceTargetEnvironment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + return null; + }; + + /** + * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment + */ + ComputeInstanceTargetEnvironment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment) + return object; + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment(); + if (object.project != null) + message.project = String(object.project); + if (object.zone != null) + message.zone = String(object.zone); + return message; + }; + + /** + * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeInstanceTargetEnvironment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.project = ""; + object.zone = ""; + } + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + return object; + }; + + /** + * Converts this ComputeInstanceTargetEnvironment to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @instance + * @returns {Object.} JSON object + */ + ComputeInstanceTargetEnvironment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComputeInstanceTargetEnvironment + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputeInstanceTargetEnvironment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment"; + }; + + return ComputeInstanceTargetEnvironment; + })(); + + v1.ComputeInstanceDataSourceProperties = (function() { + + /** + * Properties of a ComputeInstanceDataSourceProperties. + * @memberof google.cloud.backupdr.v1 + * @interface IComputeInstanceDataSourceProperties + * @property {string|null} [name] ComputeInstanceDataSourceProperties name + * @property {string|null} [description] ComputeInstanceDataSourceProperties description + * @property {string|null} [machineType] ComputeInstanceDataSourceProperties machineType + * @property {number|Long|null} [totalDiskCount] ComputeInstanceDataSourceProperties totalDiskCount + * @property {number|Long|null} [totalDiskSizeGb] ComputeInstanceDataSourceProperties totalDiskSizeGb + */ + + /** + * Constructs a new ComputeInstanceDataSourceProperties. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ComputeInstanceDataSourceProperties. + * @implements IComputeInstanceDataSourceProperties + * @constructor + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties=} [properties] Properties to set + */ + function ComputeInstanceDataSourceProperties(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComputeInstanceDataSourceProperties name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.name = ""; + + /** + * ComputeInstanceDataSourceProperties description. + * @member {string} description + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.description = ""; + + /** + * ComputeInstanceDataSourceProperties machineType. + * @member {string} machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.machineType = ""; + + /** + * ComputeInstanceDataSourceProperties totalDiskCount. + * @member {number|Long} totalDiskCount + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.totalDiskCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ComputeInstanceDataSourceProperties totalDiskSizeGb. + * @member {number|Long} totalDiskSizeGb + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.totalDiskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties instance + */ + ComputeInstanceDataSourceProperties.create = function create(properties) { + return new ComputeInstanceDataSourceProperties(properties); + }; + + /** + * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceDataSourceProperties.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.machineType); + if (message.totalDiskCount != null && Object.hasOwnProperty.call(message, "totalDiskCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.totalDiskCount); + if (message.totalDiskSizeGb != null && Object.hasOwnProperty.call(message, "totalDiskSizeGb")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.totalDiskSizeGb); + return writer; + }; + + /** + * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceDataSourceProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceDataSourceProperties.decode = function 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.backupdr.v1.ComputeInstanceDataSourceProperties(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.machineType = reader.string(); + break; + } + case 4: { + message.totalDiskCount = reader.int64(); + break; + } + case 5: { + message.totalDiskSizeGb = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceDataSourceProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputeInstanceDataSourceProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeInstanceDataSourceProperties.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + if (message.totalDiskCount != null && message.hasOwnProperty("totalDiskCount")) + if (!$util.isInteger(message.totalDiskCount) && !(message.totalDiskCount && $util.isInteger(message.totalDiskCount.low) && $util.isInteger(message.totalDiskCount.high))) + return "totalDiskCount: integer|Long expected"; + if (message.totalDiskSizeGb != null && message.hasOwnProperty("totalDiskSizeGb")) + if (!$util.isInteger(message.totalDiskSizeGb) && !(message.totalDiskSizeGb && $util.isInteger(message.totalDiskSizeGb.low) && $util.isInteger(message.totalDiskSizeGb.high))) + return "totalDiskSizeGb: integer|Long expected"; + return null; + }; + + /** + * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties + */ + ComputeInstanceDataSourceProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.totalDiskCount != null) + if ($util.Long) + (message.totalDiskCount = $util.Long.fromValue(object.totalDiskCount)).unsigned = false; + else if (typeof object.totalDiskCount === "string") + message.totalDiskCount = parseInt(object.totalDiskCount, 10); + else if (typeof object.totalDiskCount === "number") + message.totalDiskCount = object.totalDiskCount; + else if (typeof object.totalDiskCount === "object") + message.totalDiskCount = new $util.LongBits(object.totalDiskCount.low >>> 0, object.totalDiskCount.high >>> 0).toNumber(); + if (object.totalDiskSizeGb != null) + if ($util.Long) + (message.totalDiskSizeGb = $util.Long.fromValue(object.totalDiskSizeGb)).unsigned = false; + else if (typeof object.totalDiskSizeGb === "string") + message.totalDiskSizeGb = parseInt(object.totalDiskSizeGb, 10); + else if (typeof object.totalDiskSizeGb === "number") + message.totalDiskSizeGb = object.totalDiskSizeGb; + else if (typeof object.totalDiskSizeGb === "object") + message.totalDiskSizeGb = new $util.LongBits(object.totalDiskSizeGb.low >>> 0, object.totalDiskSizeGb.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeInstanceDataSourceProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.machineType = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalDiskCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalDiskCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalDiskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalDiskSizeGb = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + if (message.totalDiskCount != null && message.hasOwnProperty("totalDiskCount")) + if (typeof message.totalDiskCount === "number") + object.totalDiskCount = options.longs === String ? String(message.totalDiskCount) : message.totalDiskCount; + else + object.totalDiskCount = options.longs === String ? $util.Long.prototype.toString.call(message.totalDiskCount) : options.longs === Number ? new $util.LongBits(message.totalDiskCount.low >>> 0, message.totalDiskCount.high >>> 0).toNumber() : message.totalDiskCount; + if (message.totalDiskSizeGb != null && message.hasOwnProperty("totalDiskSizeGb")) + if (typeof message.totalDiskSizeGb === "number") + object.totalDiskSizeGb = options.longs === String ? String(message.totalDiskSizeGb) : message.totalDiskSizeGb; + else + object.totalDiskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.totalDiskSizeGb) : options.longs === Number ? new $util.LongBits(message.totalDiskSizeGb.low >>> 0, message.totalDiskSizeGb.high >>> 0).toNumber() : message.totalDiskSizeGb; + return object; + }; + + /** + * Converts this ComputeInstanceDataSourceProperties to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + * @returns {Object.} JSON object + */ + ComputeInstanceDataSourceProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComputeInstanceDataSourceProperties + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputeInstanceDataSourceProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties"; + }; + + return ComputeInstanceDataSourceProperties; + })(); + + v1.AdvancedMachineFeatures = (function() { + + /** + * Properties of an AdvancedMachineFeatures. + * @memberof google.cloud.backupdr.v1 + * @interface IAdvancedMachineFeatures + * @property {boolean|null} [enableNestedVirtualization] AdvancedMachineFeatures enableNestedVirtualization + * @property {number|null} [threadsPerCore] AdvancedMachineFeatures threadsPerCore + * @property {number|null} [visibleCoreCount] AdvancedMachineFeatures visibleCoreCount + * @property {boolean|null} [enableUefiNetworking] AdvancedMachineFeatures enableUefiNetworking + */ + + /** + * Constructs a new AdvancedMachineFeatures. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AdvancedMachineFeatures. + * @implements IAdvancedMachineFeatures + * @constructor + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures=} [properties] Properties to set + */ + function AdvancedMachineFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdvancedMachineFeatures enableNestedVirtualization. + * @member {boolean|null|undefined} enableNestedVirtualization + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.enableNestedVirtualization = null; + + /** + * AdvancedMachineFeatures threadsPerCore. + * @member {number|null|undefined} threadsPerCore + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.threadsPerCore = null; + + /** + * AdvancedMachineFeatures visibleCoreCount. + * @member {number|null|undefined} visibleCoreCount + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.visibleCoreCount = null; + + /** + * AdvancedMachineFeatures enableUefiNetworking. + * @member {boolean|null|undefined} enableUefiNetworking + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.enableUefiNetworking = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AdvancedMachineFeatures _enableNestedVirtualization. + * @member {"enableNestedVirtualization"|undefined} _enableNestedVirtualization + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableNestedVirtualization", { + get: $util.oneOfGetter($oneOfFields = ["enableNestedVirtualization"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AdvancedMachineFeatures _threadsPerCore. + * @member {"threadsPerCore"|undefined} _threadsPerCore + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_threadsPerCore", { + get: $util.oneOfGetter($oneOfFields = ["threadsPerCore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AdvancedMachineFeatures _visibleCoreCount. + * @member {"visibleCoreCount"|undefined} _visibleCoreCount + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_visibleCoreCount", { + get: $util.oneOfGetter($oneOfFields = ["visibleCoreCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AdvancedMachineFeatures _enableUefiNetworking. + * @member {"enableUefiNetworking"|undefined} _enableUefiNetworking + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableUefiNetworking", { + get: $util.oneOfGetter($oneOfFields = ["enableUefiNetworking"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AdvancedMachineFeatures instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures instance + */ + AdvancedMachineFeatures.create = function create(properties) { + return new AdvancedMachineFeatures(properties); + }; + + /** + * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvancedMachineFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableNestedVirtualization != null && Object.hasOwnProperty.call(message, "enableNestedVirtualization")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableNestedVirtualization); + if (message.threadsPerCore != null && Object.hasOwnProperty.call(message, "threadsPerCore")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.threadsPerCore); + if (message.visibleCoreCount != null && Object.hasOwnProperty.call(message, "visibleCoreCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.visibleCoreCount); + if (message.enableUefiNetworking != null && Object.hasOwnProperty.call(message, "enableUefiNetworking")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enableUefiNetworking); + return writer; + }; + + /** + * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvancedMachineFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdvancedMachineFeatures.decode = function 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.backupdr.v1.AdvancedMachineFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableNestedVirtualization = reader.bool(); + break; + } + case 2: { + message.threadsPerCore = reader.int32(); + break; + } + case 3: { + message.visibleCoreCount = reader.int32(); + break; + } + case 4: { + message.enableUefiNetworking = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdvancedMachineFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdvancedMachineFeatures message. + * @function verify + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdvancedMachineFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { + properties._enableNestedVirtualization = 1; + if (typeof message.enableNestedVirtualization !== "boolean") + return "enableNestedVirtualization: boolean expected"; + } + if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { + properties._threadsPerCore = 1; + if (!$util.isInteger(message.threadsPerCore)) + return "threadsPerCore: integer expected"; + } + if (message.visibleCoreCount != null && message.hasOwnProperty("visibleCoreCount")) { + properties._visibleCoreCount = 1; + if (!$util.isInteger(message.visibleCoreCount)) + return "visibleCoreCount: integer expected"; + } + if (message.enableUefiNetworking != null && message.hasOwnProperty("enableUefiNetworking")) { + properties._enableUefiNetworking = 1; + if (typeof message.enableUefiNetworking !== "boolean") + return "enableUefiNetworking: boolean expected"; + } + return null; + }; + + /** + * Creates an AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures + */ + AdvancedMachineFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AdvancedMachineFeatures) + return object; + var message = new $root.google.cloud.backupdr.v1.AdvancedMachineFeatures(); + if (object.enableNestedVirtualization != null) + message.enableNestedVirtualization = Boolean(object.enableNestedVirtualization); + if (object.threadsPerCore != null) + message.threadsPerCore = object.threadsPerCore | 0; + if (object.visibleCoreCount != null) + message.visibleCoreCount = object.visibleCoreCount | 0; + if (object.enableUefiNetworking != null) + message.enableUefiNetworking = Boolean(object.enableUefiNetworking); + return message; + }; + + /** + * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.AdvancedMachineFeatures} message AdvancedMachineFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdvancedMachineFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { + object.enableNestedVirtualization = message.enableNestedVirtualization; + if (options.oneofs) + object._enableNestedVirtualization = "enableNestedVirtualization"; + } + if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { + object.threadsPerCore = message.threadsPerCore; + if (options.oneofs) + object._threadsPerCore = "threadsPerCore"; + } + if (message.visibleCoreCount != null && message.hasOwnProperty("visibleCoreCount")) { + object.visibleCoreCount = message.visibleCoreCount; + if (options.oneofs) + object._visibleCoreCount = "visibleCoreCount"; + } + if (message.enableUefiNetworking != null && message.hasOwnProperty("enableUefiNetworking")) { + object.enableUefiNetworking = message.enableUefiNetworking; + if (options.oneofs) + object._enableUefiNetworking = "enableUefiNetworking"; + } + return object; + }; + + /** + * Converts this AdvancedMachineFeatures to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + * @returns {Object.} JSON object + */ + AdvancedMachineFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdvancedMachineFeatures + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdvancedMachineFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AdvancedMachineFeatures"; + }; + + return AdvancedMachineFeatures; + })(); + + v1.ConfidentialInstanceConfig = (function() { + + /** + * Properties of a ConfidentialInstanceConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IConfidentialInstanceConfig + * @property {boolean|null} [enableConfidentialCompute] ConfidentialInstanceConfig enableConfidentialCompute + */ + + /** + * Constructs a new ConfidentialInstanceConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ConfidentialInstanceConfig. + * @implements IConfidentialInstanceConfig + * @constructor + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig=} [properties] Properties to set + */ + function ConfidentialInstanceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConfidentialInstanceConfig enableConfidentialCompute. + * @member {boolean|null|undefined} enableConfidentialCompute + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @instance + */ + ConfidentialInstanceConfig.prototype.enableConfidentialCompute = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConfidentialInstanceConfig _enableConfidentialCompute. + * @member {"enableConfidentialCompute"|undefined} _enableConfidentialCompute + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @instance + */ + Object.defineProperty(ConfidentialInstanceConfig.prototype, "_enableConfidentialCompute", { + get: $util.oneOfGetter($oneOfFields = ["enableConfidentialCompute"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConfidentialInstanceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig instance + */ + ConfidentialInstanceConfig.create = function create(properties) { + return new ConfidentialInstanceConfig(properties); + }; + + /** + * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig} message ConfidentialInstanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidentialInstanceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableConfidentialCompute != null && Object.hasOwnProperty.call(message, "enableConfidentialCompute")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableConfidentialCompute); + return writer; + }; + + /** + * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig} message ConfidentialInstanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidentialInstanceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidentialInstanceConfig.decode = function 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.backupdr.v1.ConfidentialInstanceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableConfidentialCompute = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidentialInstanceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfidentialInstanceConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfidentialInstanceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enableConfidentialCompute != null && message.hasOwnProperty("enableConfidentialCompute")) { + properties._enableConfidentialCompute = 1; + if (typeof message.enableConfidentialCompute !== "boolean") + return "enableConfidentialCompute: boolean expected"; + } + return null; + }; + + /** + * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig + */ + ConfidentialInstanceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig(); + if (object.enableConfidentialCompute != null) + message.enableConfidentialCompute = Boolean(object.enableConfidentialCompute); + return message; + }; + + /** + * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {google.cloud.backupdr.v1.ConfidentialInstanceConfig} message ConfidentialInstanceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfidentialInstanceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enableConfidentialCompute != null && message.hasOwnProperty("enableConfidentialCompute")) { + object.enableConfidentialCompute = message.enableConfidentialCompute; + if (options.oneofs) + object._enableConfidentialCompute = "enableConfidentialCompute"; + } + return object; + }; + + /** + * Converts this ConfidentialInstanceConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @instance + * @returns {Object.} JSON object + */ + ConfidentialInstanceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConfidentialInstanceConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfidentialInstanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ConfidentialInstanceConfig"; + }; + + return ConfidentialInstanceConfig; + })(); + + v1.DisplayDevice = (function() { + + /** + * Properties of a DisplayDevice. + * @memberof google.cloud.backupdr.v1 + * @interface IDisplayDevice + * @property {boolean|null} [enableDisplay] DisplayDevice enableDisplay + */ + + /** + * Constructs a new DisplayDevice. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DisplayDevice. + * @implements IDisplayDevice + * @constructor + * @param {google.cloud.backupdr.v1.IDisplayDevice=} [properties] Properties to set + */ + function DisplayDevice(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DisplayDevice enableDisplay. + * @member {boolean|null|undefined} enableDisplay + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @instance + */ + DisplayDevice.prototype.enableDisplay = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DisplayDevice _enableDisplay. + * @member {"enableDisplay"|undefined} _enableDisplay + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @instance + */ + Object.defineProperty(DisplayDevice.prototype, "_enableDisplay", { + get: $util.oneOfGetter($oneOfFields = ["enableDisplay"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DisplayDevice instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.IDisplayDevice=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice instance + */ + DisplayDevice.create = function create(properties) { + return new DisplayDevice(properties); + }; + + /** + * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.IDisplayDevice} message DisplayDevice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisplayDevice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableDisplay != null && Object.hasOwnProperty.call(message, "enableDisplay")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableDisplay); + return writer; + }; + + /** + * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.IDisplayDevice} message DisplayDevice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisplayDevice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DisplayDevice message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisplayDevice.decode = function 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.backupdr.v1.DisplayDevice(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableDisplay = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisplayDevice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DisplayDevice message. + * @function verify + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DisplayDevice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enableDisplay != null && message.hasOwnProperty("enableDisplay")) { + properties._enableDisplay = 1; + if (typeof message.enableDisplay !== "boolean") + return "enableDisplay: boolean expected"; + } + return null; + }; + + /** + * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice + */ + DisplayDevice.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DisplayDevice) + return object; + var message = new $root.google.cloud.backupdr.v1.DisplayDevice(); + if (object.enableDisplay != null) + message.enableDisplay = Boolean(object.enableDisplay); + return message; + }; + + /** + * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.DisplayDevice} message DisplayDevice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DisplayDevice.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enableDisplay != null && message.hasOwnProperty("enableDisplay")) { + object.enableDisplay = message.enableDisplay; + if (options.oneofs) + object._enableDisplay = "enableDisplay"; + } + return object; + }; + + /** + * Converts this DisplayDevice to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @instance + * @returns {Object.} JSON object + */ + DisplayDevice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DisplayDevice + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DisplayDevice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DisplayDevice"; + }; + + return DisplayDevice; + })(); + + v1.AcceleratorConfig = (function() { + + /** + * Properties of an AcceleratorConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IAcceleratorConfig + * @property {string|null} [acceleratorType] AcceleratorConfig acceleratorType + * @property {number|null} [acceleratorCount] AcceleratorConfig acceleratorCount + */ + + /** + * Constructs a new AcceleratorConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AcceleratorConfig. + * @implements IAcceleratorConfig + * @constructor + * @param {google.cloud.backupdr.v1.IAcceleratorConfig=} [properties] Properties to set + */ + function AcceleratorConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcceleratorConfig acceleratorType. + * @member {string|null|undefined} acceleratorType + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.acceleratorType = null; + + /** + * AcceleratorConfig acceleratorCount. + * @member {number|null|undefined} acceleratorCount + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.acceleratorCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AcceleratorConfig _acceleratorType. + * @member {"acceleratorType"|undefined} _acceleratorType + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + */ + Object.defineProperty(AcceleratorConfig.prototype, "_acceleratorType", { + get: $util.oneOfGetter($oneOfFields = ["acceleratorType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AcceleratorConfig _acceleratorCount. + * @member {"acceleratorCount"|undefined} _acceleratorCount + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + */ + Object.defineProperty(AcceleratorConfig.prototype, "_acceleratorCount", { + get: $util.oneOfGetter($oneOfFields = ["acceleratorCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AcceleratorConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {google.cloud.backupdr.v1.IAcceleratorConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig instance + */ + AcceleratorConfig.create = function create(properties) { + return new AcceleratorConfig(properties); + }; + + /** + * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {google.cloud.backupdr.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcceleratorConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.acceleratorType != null && Object.hasOwnProperty.call(message, "acceleratorType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.acceleratorType); + if (message.acceleratorCount != null && Object.hasOwnProperty.call(message, "acceleratorCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.acceleratorCount); + return writer; + }; + + /** + * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {google.cloud.backupdr.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcceleratorConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcceleratorConfig.decode = function 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.backupdr.v1.AcceleratorConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.acceleratorType = reader.string(); + break; + } + case 2: { + message.acceleratorCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcceleratorConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcceleratorConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcceleratorConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) { + properties._acceleratorType = 1; + if (!$util.isString(message.acceleratorType)) + return "acceleratorType: string expected"; + } + if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) { + properties._acceleratorCount = 1; + if (!$util.isInteger(message.acceleratorCount)) + return "acceleratorCount: integer expected"; + } + return null; + }; + + /** + * Creates an AcceleratorConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig + */ + AcceleratorConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AcceleratorConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.AcceleratorConfig(); + if (object.acceleratorType != null) + message.acceleratorType = String(object.acceleratorType); + if (object.acceleratorCount != null) + message.acceleratorCount = object.acceleratorCount | 0; + return message; + }; + + /** + * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {google.cloud.backupdr.v1.AcceleratorConfig} message AcceleratorConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcceleratorConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) { + object.acceleratorType = message.acceleratorType; + if (options.oneofs) + object._acceleratorType = "acceleratorType"; + } + if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) { + object.acceleratorCount = message.acceleratorCount; + if (options.oneofs) + object._acceleratorCount = "acceleratorCount"; + } + return object; + }; + + /** + * Converts this AcceleratorConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + * @returns {Object.} JSON object + */ + AcceleratorConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcceleratorConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcceleratorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AcceleratorConfig"; + }; + + return AcceleratorConfig; + })(); + + v1.CustomerEncryptionKey = (function() { + + /** + * Properties of a CustomerEncryptionKey. + * @memberof google.cloud.backupdr.v1 + * @interface ICustomerEncryptionKey + * @property {string|null} [rawKey] CustomerEncryptionKey rawKey + * @property {string|null} [rsaEncryptedKey] CustomerEncryptionKey rsaEncryptedKey + * @property {string|null} [kmsKeyName] CustomerEncryptionKey kmsKeyName + * @property {string|null} [kmsKeyServiceAccount] CustomerEncryptionKey kmsKeyServiceAccount + */ + + /** + * Constructs a new CustomerEncryptionKey. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CustomerEncryptionKey. + * @implements ICustomerEncryptionKey + * @constructor + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey=} [properties] Properties to set + */ + function CustomerEncryptionKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomerEncryptionKey rawKey. + * @member {string|null|undefined} rawKey + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + CustomerEncryptionKey.prototype.rawKey = null; + + /** + * CustomerEncryptionKey rsaEncryptedKey. + * @member {string|null|undefined} rsaEncryptedKey + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + CustomerEncryptionKey.prototype.rsaEncryptedKey = null; + + /** + * CustomerEncryptionKey kmsKeyName. + * @member {string|null|undefined} kmsKeyName + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + CustomerEncryptionKey.prototype.kmsKeyName = null; + + /** + * CustomerEncryptionKey kmsKeyServiceAccount. + * @member {string|null|undefined} kmsKeyServiceAccount + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + CustomerEncryptionKey.prototype.kmsKeyServiceAccount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CustomerEncryptionKey key. + * @member {"rawKey"|"rsaEncryptedKey"|"kmsKeyName"|undefined} key + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + Object.defineProperty(CustomerEncryptionKey.prototype, "key", { + get: $util.oneOfGetter($oneOfFields = ["rawKey", "rsaEncryptedKey", "kmsKeyName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * CustomerEncryptionKey _kmsKeyServiceAccount. + * @member {"kmsKeyServiceAccount"|undefined} _kmsKeyServiceAccount + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + Object.defineProperty(CustomerEncryptionKey.prototype, "_kmsKeyServiceAccount", { + get: $util.oneOfGetter($oneOfFields = ["kmsKeyServiceAccount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CustomerEncryptionKey instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey instance + */ + CustomerEncryptionKey.create = function create(properties) { + return new CustomerEncryptionKey(properties); + }; + + /** + * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey} message CustomerEncryptionKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomerEncryptionKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rawKey != null && Object.hasOwnProperty.call(message, "rawKey")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rawKey); + if (message.rsaEncryptedKey != null && Object.hasOwnProperty.call(message, "rsaEncryptedKey")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rsaEncryptedKey); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyName); + if (message.kmsKeyServiceAccount != null && Object.hasOwnProperty.call(message, "kmsKeyServiceAccount")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kmsKeyServiceAccount); + return writer; + }; + + /** + * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey} message CustomerEncryptionKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomerEncryptionKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomerEncryptionKey message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomerEncryptionKey.decode = function 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.backupdr.v1.CustomerEncryptionKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rawKey = reader.string(); + break; + } + case 2: { + message.rsaEncryptedKey = reader.string(); + break; + } + case 3: { + message.kmsKeyName = reader.string(); + break; + } + case 4: { + message.kmsKeyServiceAccount = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomerEncryptionKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomerEncryptionKey message. + * @function verify + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomerEncryptionKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rawKey != null && message.hasOwnProperty("rawKey")) { + properties.key = 1; + if (!$util.isString(message.rawKey)) + return "rawKey: string expected"; + } + if (message.rsaEncryptedKey != null && message.hasOwnProperty("rsaEncryptedKey")) { + if (properties.key === 1) + return "key: multiple values"; + properties.key = 1; + if (!$util.isString(message.rsaEncryptedKey)) + return "rsaEncryptedKey: string expected"; + } + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { + if (properties.key === 1) + return "key: multiple values"; + properties.key = 1; + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + } + if (message.kmsKeyServiceAccount != null && message.hasOwnProperty("kmsKeyServiceAccount")) { + properties._kmsKeyServiceAccount = 1; + if (!$util.isString(message.kmsKeyServiceAccount)) + return "kmsKeyServiceAccount: string expected"; + } + return null; + }; + + /** + * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey + */ + CustomerEncryptionKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CustomerEncryptionKey) + return object; + var message = new $root.google.cloud.backupdr.v1.CustomerEncryptionKey(); + if (object.rawKey != null) + message.rawKey = String(object.rawKey); + if (object.rsaEncryptedKey != null) + message.rsaEncryptedKey = String(object.rsaEncryptedKey); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + if (object.kmsKeyServiceAccount != null) + message.kmsKeyServiceAccount = String(object.kmsKeyServiceAccount); + return message; + }; + + /** + * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.CustomerEncryptionKey} message CustomerEncryptionKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomerEncryptionKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.rawKey != null && message.hasOwnProperty("rawKey")) { + object.rawKey = message.rawKey; + if (options.oneofs) + object.key = "rawKey"; + } + if (message.rsaEncryptedKey != null && message.hasOwnProperty("rsaEncryptedKey")) { + object.rsaEncryptedKey = message.rsaEncryptedKey; + if (options.oneofs) + object.key = "rsaEncryptedKey"; + } + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { + object.kmsKeyName = message.kmsKeyName; + if (options.oneofs) + object.key = "kmsKeyName"; + } + if (message.kmsKeyServiceAccount != null && message.hasOwnProperty("kmsKeyServiceAccount")) { + object.kmsKeyServiceAccount = message.kmsKeyServiceAccount; + if (options.oneofs) + object._kmsKeyServiceAccount = "kmsKeyServiceAccount"; + } + return object; + }; + + /** + * Converts this CustomerEncryptionKey to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + * @returns {Object.} JSON object + */ + CustomerEncryptionKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomerEncryptionKey + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomerEncryptionKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CustomerEncryptionKey"; + }; + + return CustomerEncryptionKey; + })(); + + v1.Entry = (function() { + + /** + * Properties of an Entry. + * @memberof google.cloud.backupdr.v1 + * @interface IEntry + * @property {string|null} [key] Entry key + * @property {string|null} [value] Entry value + */ + + /** + * Constructs a new Entry. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an Entry. + * @implements IEntry + * @constructor + * @param {google.cloud.backupdr.v1.IEntry=} [properties] Properties to set + */ + function Entry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entry key. + * @member {string|null|undefined} key + * @memberof google.cloud.backupdr.v1.Entry + * @instance + */ + Entry.prototype.key = null; + + /** + * Entry value. + * @member {string|null|undefined} value + * @memberof google.cloud.backupdr.v1.Entry + * @instance + */ + Entry.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Entry _key. + * @member {"key"|undefined} _key + * @memberof google.cloud.backupdr.v1.Entry + * @instance + */ + Object.defineProperty(Entry.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Entry _value. + * @member {"value"|undefined} _value + * @memberof google.cloud.backupdr.v1.Entry + * @instance + */ + Object.defineProperty(Entry.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Entry instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.IEntry=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Entry} Entry instance + */ + Entry.create = function create(properties) { + return new Entry(properties); + }; + + /** + * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decode = function 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.backupdr.v1.Entry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entry message. + * @function verify + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; + } + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Entry} Entry + */ + Entry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Entry) + return object; + var message = new $root.google.cloud.backupdr.v1.Entry(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.Entry} message Entry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) + object._key = "key"; + } + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object._value = "value"; + } + return object; + }; + + /** + * Converts this Entry to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Entry + * @instance + * @returns {Object.} JSON object + */ + Entry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Entry + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Entry"; + }; + + return Entry; + })(); + + v1.Metadata = (function() { + + /** + * Properties of a Metadata. + * @memberof google.cloud.backupdr.v1 + * @interface IMetadata + * @property {Array.|null} [items] Metadata items + */ + + /** + * Constructs a new Metadata. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {google.cloud.backupdr.v1.IMetadata=} [properties] Properties to set + */ + function Metadata(properties) { + this.items = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metadata items. + * @member {Array.} items + * @memberof google.cloud.backupdr.v1.Metadata + * @instance + */ + Metadata.prototype.items = $util.emptyArray; + + /** + * Creates a new Metadata instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {google.cloud.backupdr.v1.IMetadata=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Metadata} Metadata instance + */ + Metadata.create = function create(properties) { + return new Metadata(properties); + }; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {google.cloud.backupdr.v1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + $root.google.cloud.backupdr.v1.Entry.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {google.cloud.backupdr.v1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decode = function 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.backupdr.v1.Metadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.google.cloud.backupdr.v1.Entry.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metadata message. + * @function verify + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) { + var error = $root.google.cloud.backupdr.v1.Entry.verify(message.items[i]); + if (error) + return "items." + error; + } + } + return null; + }; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Metadata} Metadata + */ + Metadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Metadata) + return object; + var message = new $root.google.cloud.backupdr.v1.Metadata(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".google.cloud.backupdr.v1.Metadata.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Metadata.items: object expected"); + message.items[i] = $root.google.cloud.backupdr.v1.Entry.fromObject(object.items[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {google.cloud.backupdr.v1.Metadata} message Metadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = $root.google.cloud.backupdr.v1.Entry.toObject(message.items[j], options); + } + return object; + }; + + /** + * Converts this Metadata to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Metadata + * @instance + * @returns {Object.} JSON object + */ + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metadata + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Metadata"; + }; + + return Metadata; + })(); + + v1.NetworkInterface = (function() { + + /** + * Properties of a NetworkInterface. + * @memberof google.cloud.backupdr.v1 + * @interface INetworkInterface + * @property {string|null} [network] NetworkInterface network + * @property {string|null} [subnetwork] NetworkInterface subnetwork + * @property {string|null} [ipAddress] NetworkInterface ipAddress + * @property {string|null} [ipv6Address] NetworkInterface ipv6Address + * @property {number|null} [internalIpv6PrefixLength] NetworkInterface internalIpv6PrefixLength + * @property {string|null} [name] NetworkInterface name + * @property {Array.|null} [accessConfigs] NetworkInterface accessConfigs + * @property {Array.|null} [ipv6AccessConfigs] NetworkInterface ipv6AccessConfigs + * @property {Array.|null} [aliasIpRanges] NetworkInterface aliasIpRanges + * @property {google.cloud.backupdr.v1.NetworkInterface.StackType|null} [stackType] NetworkInterface stackType + * @property {google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null} [ipv6AccessType] NetworkInterface ipv6AccessType + * @property {number|null} [queueCount] NetworkInterface queueCount + * @property {google.cloud.backupdr.v1.NetworkInterface.NicType|null} [nicType] NetworkInterface nicType + * @property {string|null} [networkAttachment] NetworkInterface networkAttachment + */ + + /** + * Constructs a new NetworkInterface. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a NetworkInterface. + * @implements INetworkInterface + * @constructor + * @param {google.cloud.backupdr.v1.INetworkInterface=} [properties] Properties to set + */ + function NetworkInterface(properties) { + this.accessConfigs = []; + this.ipv6AccessConfigs = []; + this.aliasIpRanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkInterface network. + * @member {string|null|undefined} network + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.network = null; + + /** + * NetworkInterface subnetwork. + * @member {string|null|undefined} subnetwork + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.subnetwork = null; + + /** + * NetworkInterface ipAddress. + * @member {string|null|undefined} ipAddress + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.ipAddress = null; + + /** + * NetworkInterface ipv6Address. + * @member {string|null|undefined} ipv6Address + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.ipv6Address = null; + + /** + * NetworkInterface internalIpv6PrefixLength. + * @member {number|null|undefined} internalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.internalIpv6PrefixLength = null; + + /** + * NetworkInterface name. + * @member {string|null|undefined} name + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.name = null; + + /** + * NetworkInterface accessConfigs. + * @member {Array.} accessConfigs + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.accessConfigs = $util.emptyArray; + + /** + * NetworkInterface ipv6AccessConfigs. + * @member {Array.} ipv6AccessConfigs + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.ipv6AccessConfigs = $util.emptyArray; + + /** + * NetworkInterface aliasIpRanges. + * @member {Array.} aliasIpRanges + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.aliasIpRanges = $util.emptyArray; + + /** + * NetworkInterface stackType. + * @member {google.cloud.backupdr.v1.NetworkInterface.StackType|null|undefined} stackType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.stackType = null; + + /** + * NetworkInterface ipv6AccessType. + * @member {google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null|undefined} ipv6AccessType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.ipv6AccessType = null; + + /** + * NetworkInterface queueCount. + * @member {number|null|undefined} queueCount + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.queueCount = null; + + /** + * NetworkInterface nicType. + * @member {google.cloud.backupdr.v1.NetworkInterface.NicType|null|undefined} nicType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.nicType = null; + + /** + * NetworkInterface networkAttachment. + * @member {string|null|undefined} networkAttachment + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.networkAttachment = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NetworkInterface _network. + * @member {"network"|undefined} _network + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_network", { + get: $util.oneOfGetter($oneOfFields = ["network"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _subnetwork. + * @member {"subnetwork"|undefined} _subnetwork + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_subnetwork", { + get: $util.oneOfGetter($oneOfFields = ["subnetwork"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _ipAddress. + * @member {"ipAddress"|undefined} _ipAddress + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_ipAddress", { + get: $util.oneOfGetter($oneOfFields = ["ipAddress"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _ipv6Address. + * @member {"ipv6Address"|undefined} _ipv6Address + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_ipv6Address", { + get: $util.oneOfGetter($oneOfFields = ["ipv6Address"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _internalIpv6PrefixLength. + * @member {"internalIpv6PrefixLength"|undefined} _internalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_internalIpv6PrefixLength", { + get: $util.oneOfGetter($oneOfFields = ["internalIpv6PrefixLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _name. + * @member {"name"|undefined} _name + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _stackType. + * @member {"stackType"|undefined} _stackType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_stackType", { + get: $util.oneOfGetter($oneOfFields = ["stackType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _ipv6AccessType. + * @member {"ipv6AccessType"|undefined} _ipv6AccessType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_ipv6AccessType", { + get: $util.oneOfGetter($oneOfFields = ["ipv6AccessType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _queueCount. + * @member {"queueCount"|undefined} _queueCount + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_queueCount", { + get: $util.oneOfGetter($oneOfFields = ["queueCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _nicType. + * @member {"nicType"|undefined} _nicType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_nicType", { + get: $util.oneOfGetter($oneOfFields = ["nicType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _networkAttachment. + * @member {"networkAttachment"|undefined} _networkAttachment + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_networkAttachment", { + get: $util.oneOfGetter($oneOfFields = ["networkAttachment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NetworkInterface instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {google.cloud.backupdr.v1.INetworkInterface=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface instance + */ + NetworkInterface.create = function create(properties) { + return new NetworkInterface(properties); + }; + + /** + * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {google.cloud.backupdr.v1.INetworkInterface} message NetworkInterface message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkInterface.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetwork); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); + if (message.ipv6Address != null && Object.hasOwnProperty.call(message, "ipv6Address")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipv6Address); + if (message.internalIpv6PrefixLength != null && Object.hasOwnProperty.call(message, "internalIpv6PrefixLength")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.internalIpv6PrefixLength); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.accessConfigs != null && message.accessConfigs.length) + for (var i = 0; i < message.accessConfigs.length; ++i) + $root.google.cloud.backupdr.v1.AccessConfig.encode(message.accessConfigs[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.ipv6AccessConfigs != null && message.ipv6AccessConfigs.length) + for (var i = 0; i < message.ipv6AccessConfigs.length; ++i) + $root.google.cloud.backupdr.v1.AccessConfig.encode(message.ipv6AccessConfigs[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.aliasIpRanges != null && message.aliasIpRanges.length) + for (var i = 0; i < message.aliasIpRanges.length; ++i) + $root.google.cloud.backupdr.v1.AliasIpRange.encode(message.aliasIpRanges[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.stackType != null && Object.hasOwnProperty.call(message, "stackType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.stackType); + if (message.ipv6AccessType != null && Object.hasOwnProperty.call(message, "ipv6AccessType")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.ipv6AccessType); + if (message.queueCount != null && Object.hasOwnProperty.call(message, "queueCount")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.queueCount); + if (message.nicType != null && Object.hasOwnProperty.call(message, "nicType")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.nicType); + if (message.networkAttachment != null && Object.hasOwnProperty.call(message, "networkAttachment")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.networkAttachment); + return writer; + }; + + /** + * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {google.cloud.backupdr.v1.INetworkInterface} message NetworkInterface message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkInterface.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkInterface message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkInterface.decode = function 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.backupdr.v1.NetworkInterface(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.network = reader.string(); + break; + } + case 2: { + message.subnetwork = reader.string(); + break; + } + case 3: { + message.ipAddress = reader.string(); + break; + } + case 4: { + message.ipv6Address = reader.string(); + break; + } + case 5: { + message.internalIpv6PrefixLength = reader.int32(); + break; + } + case 6: { + message.name = reader.string(); + break; + } + case 7: { + if (!(message.accessConfigs && message.accessConfigs.length)) + message.accessConfigs = []; + message.accessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.ipv6AccessConfigs && message.ipv6AccessConfigs.length)) + message.ipv6AccessConfigs = []; + message.ipv6AccessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader, reader.uint32())); + break; + } + case 9: { + if (!(message.aliasIpRanges && message.aliasIpRanges.length)) + message.aliasIpRanges = []; + message.aliasIpRanges.push($root.google.cloud.backupdr.v1.AliasIpRange.decode(reader, reader.uint32())); + break; + } + case 10: { + message.stackType = reader.int32(); + break; + } + case 11: { + message.ipv6AccessType = reader.int32(); + break; + } + case 12: { + message.queueCount = reader.int32(); + break; + } + case 13: { + message.nicType = reader.int32(); + break; + } + case 14: { + message.networkAttachment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkInterface.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkInterface message. + * @function verify + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkInterface.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.network != null && message.hasOwnProperty("network")) { + properties._network = 1; + if (!$util.isString(message.network)) + return "network: string expected"; + } + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { + properties._subnetwork = 1; + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + } + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) { + properties._ipAddress = 1; + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + } + if (message.ipv6Address != null && message.hasOwnProperty("ipv6Address")) { + properties._ipv6Address = 1; + if (!$util.isString(message.ipv6Address)) + return "ipv6Address: string expected"; + } + if (message.internalIpv6PrefixLength != null && message.hasOwnProperty("internalIpv6PrefixLength")) { + properties._internalIpv6PrefixLength = 1; + if (!$util.isInteger(message.internalIpv6PrefixLength)) + return "internalIpv6PrefixLength: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.accessConfigs != null && message.hasOwnProperty("accessConfigs")) { + if (!Array.isArray(message.accessConfigs)) + return "accessConfigs: array expected"; + for (var i = 0; i < message.accessConfigs.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AccessConfig.verify(message.accessConfigs[i]); + if (error) + return "accessConfigs." + error; + } + } + if (message.ipv6AccessConfigs != null && message.hasOwnProperty("ipv6AccessConfigs")) { + if (!Array.isArray(message.ipv6AccessConfigs)) + return "ipv6AccessConfigs: array expected"; + for (var i = 0; i < message.ipv6AccessConfigs.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AccessConfig.verify(message.ipv6AccessConfigs[i]); + if (error) + return "ipv6AccessConfigs." + error; + } + } + if (message.aliasIpRanges != null && message.hasOwnProperty("aliasIpRanges")) { + if (!Array.isArray(message.aliasIpRanges)) + return "aliasIpRanges: array expected"; + for (var i = 0; i < message.aliasIpRanges.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AliasIpRange.verify(message.aliasIpRanges[i]); + if (error) + return "aliasIpRanges." + error; + } + } + if (message.stackType != null && message.hasOwnProperty("stackType")) { + properties._stackType = 1; + switch (message.stackType) { + default: + return "stackType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { + properties._ipv6AccessType = 1; + switch (message.ipv6AccessType) { + default: + return "ipv6AccessType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.queueCount != null && message.hasOwnProperty("queueCount")) { + properties._queueCount = 1; + if (!$util.isInteger(message.queueCount)) + return "queueCount: integer expected"; + } + if (message.nicType != null && message.hasOwnProperty("nicType")) { + properties._nicType = 1; + switch (message.nicType) { + default: + return "nicType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) { + properties._networkAttachment = 1; + if (!$util.isString(message.networkAttachment)) + return "networkAttachment: string expected"; + } + return null; + }; + + /** + * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface + */ + NetworkInterface.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.NetworkInterface) + return object; + var message = new $root.google.cloud.backupdr.v1.NetworkInterface(); + if (object.network != null) + message.network = String(object.network); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.ipv6Address != null) + message.ipv6Address = String(object.ipv6Address); + if (object.internalIpv6PrefixLength != null) + message.internalIpv6PrefixLength = object.internalIpv6PrefixLength | 0; + if (object.name != null) + message.name = String(object.name); + if (object.accessConfigs) { + if (!Array.isArray(object.accessConfigs)) + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: array expected"); + message.accessConfigs = []; + for (var i = 0; i < object.accessConfigs.length; ++i) { + if (typeof object.accessConfigs[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: object expected"); + message.accessConfigs[i] = $root.google.cloud.backupdr.v1.AccessConfig.fromObject(object.accessConfigs[i]); + } + } + if (object.ipv6AccessConfigs) { + if (!Array.isArray(object.ipv6AccessConfigs)) + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.ipv6AccessConfigs: array expected"); + message.ipv6AccessConfigs = []; + for (var i = 0; i < object.ipv6AccessConfigs.length; ++i) { + if (typeof object.ipv6AccessConfigs[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.ipv6AccessConfigs: object expected"); + message.ipv6AccessConfigs[i] = $root.google.cloud.backupdr.v1.AccessConfig.fromObject(object.ipv6AccessConfigs[i]); + } + } + if (object.aliasIpRanges) { + if (!Array.isArray(object.aliasIpRanges)) + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.aliasIpRanges: array expected"); + message.aliasIpRanges = []; + for (var i = 0; i < object.aliasIpRanges.length; ++i) { + if (typeof object.aliasIpRanges[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.aliasIpRanges: object expected"); + message.aliasIpRanges[i] = $root.google.cloud.backupdr.v1.AliasIpRange.fromObject(object.aliasIpRanges[i]); + } + } + switch (object.stackType) { + default: + if (typeof object.stackType === "number") { + message.stackType = object.stackType; + break; + } + break; + case "STACK_TYPE_UNSPECIFIED": + case 0: + message.stackType = 0; + break; + case "IPV4_ONLY": + case 1: + message.stackType = 1; + break; + case "IPV4_IPV6": + case 2: + message.stackType = 2; + break; + } + switch (object.ipv6AccessType) { + default: + if (typeof object.ipv6AccessType === "number") { + message.ipv6AccessType = object.ipv6AccessType; + break; + } + break; + case "UNSPECIFIED_IPV6_ACCESS_TYPE": + case 0: + message.ipv6AccessType = 0; + break; + case "INTERNAL": + case 1: + message.ipv6AccessType = 1; + break; + case "EXTERNAL": + case 2: + message.ipv6AccessType = 2; + break; + } + if (object.queueCount != null) + message.queueCount = object.queueCount | 0; + switch (object.nicType) { + default: + if (typeof object.nicType === "number") { + message.nicType = object.nicType; + break; + } + break; + case "NIC_TYPE_UNSPECIFIED": + case 0: + message.nicType = 0; + break; + case "VIRTIO_NET": + case 1: + message.nicType = 1; + break; + case "GVNIC": + case 2: + message.nicType = 2; + break; + } + if (object.networkAttachment != null) + message.networkAttachment = String(object.networkAttachment); + return message; + }; + + /** + * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {google.cloud.backupdr.v1.NetworkInterface} message NetworkInterface + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkInterface.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.accessConfigs = []; + object.ipv6AccessConfigs = []; + object.aliasIpRanges = []; + } + if (message.network != null && message.hasOwnProperty("network")) { + object.network = message.network; + if (options.oneofs) + object._network = "network"; + } + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { + object.subnetwork = message.subnetwork; + if (options.oneofs) + object._subnetwork = "subnetwork"; + } + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) { + object.ipAddress = message.ipAddress; + if (options.oneofs) + object._ipAddress = "ipAddress"; + } + if (message.ipv6Address != null && message.hasOwnProperty("ipv6Address")) { + object.ipv6Address = message.ipv6Address; + if (options.oneofs) + object._ipv6Address = "ipv6Address"; + } + if (message.internalIpv6PrefixLength != null && message.hasOwnProperty("internalIpv6PrefixLength")) { + object.internalIpv6PrefixLength = message.internalIpv6PrefixLength; + if (options.oneofs) + object._internalIpv6PrefixLength = "internalIpv6PrefixLength"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.accessConfigs && message.accessConfigs.length) { + object.accessConfigs = []; + for (var j = 0; j < message.accessConfigs.length; ++j) + object.accessConfigs[j] = $root.google.cloud.backupdr.v1.AccessConfig.toObject(message.accessConfigs[j], options); + } + if (message.ipv6AccessConfigs && message.ipv6AccessConfigs.length) { + object.ipv6AccessConfigs = []; + for (var j = 0; j < message.ipv6AccessConfigs.length; ++j) + object.ipv6AccessConfigs[j] = $root.google.cloud.backupdr.v1.AccessConfig.toObject(message.ipv6AccessConfigs[j], options); + } + if (message.aliasIpRanges && message.aliasIpRanges.length) { + object.aliasIpRanges = []; + for (var j = 0; j < message.aliasIpRanges.length; ++j) + object.aliasIpRanges[j] = $root.google.cloud.backupdr.v1.AliasIpRange.toObject(message.aliasIpRanges[j], options); + } + if (message.stackType != null && message.hasOwnProperty("stackType")) { + object.stackType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.StackType[message.stackType] === undefined ? message.stackType : $root.google.cloud.backupdr.v1.NetworkInterface.StackType[message.stackType] : message.stackType; + if (options.oneofs) + object._stackType = "stackType"; + } + if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { + object.ipv6AccessType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType[message.ipv6AccessType] === undefined ? message.ipv6AccessType : $root.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType[message.ipv6AccessType] : message.ipv6AccessType; + if (options.oneofs) + object._ipv6AccessType = "ipv6AccessType"; + } + if (message.queueCount != null && message.hasOwnProperty("queueCount")) { + object.queueCount = message.queueCount; + if (options.oneofs) + object._queueCount = "queueCount"; + } + if (message.nicType != null && message.hasOwnProperty("nicType")) { + object.nicType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.NicType[message.nicType] === undefined ? message.nicType : $root.google.cloud.backupdr.v1.NetworkInterface.NicType[message.nicType] : message.nicType; + if (options.oneofs) + object._nicType = "nicType"; + } + if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) { + object.networkAttachment = message.networkAttachment; + if (options.oneofs) + object._networkAttachment = "networkAttachment"; + } + return object; + }; + + /** + * Converts this NetworkInterface to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + * @returns {Object.} JSON object + */ + NetworkInterface.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkInterface + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkInterface.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkInterface"; + }; + + /** + * StackType enum. + * @name google.cloud.backupdr.v1.NetworkInterface.StackType + * @enum {number} + * @property {number} STACK_TYPE_UNSPECIFIED=0 STACK_TYPE_UNSPECIFIED value + * @property {number} IPV4_ONLY=1 IPV4_ONLY value + * @property {number} IPV4_IPV6=2 IPV4_IPV6 value + */ + NetworkInterface.StackType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STACK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IPV4_ONLY"] = 1; + values[valuesById[2] = "IPV4_IPV6"] = 2; + return values; + })(); + + /** + * Ipv6AccessType enum. + * @name google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType + * @enum {number} + * @property {number} UNSPECIFIED_IPV6_ACCESS_TYPE=0 UNSPECIFIED_IPV6_ACCESS_TYPE value + * @property {number} INTERNAL=1 INTERNAL value + * @property {number} EXTERNAL=2 EXTERNAL value + */ + NetworkInterface.Ipv6AccessType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED_IPV6_ACCESS_TYPE"] = 0; + values[valuesById[1] = "INTERNAL"] = 1; + values[valuesById[2] = "EXTERNAL"] = 2; + return values; + })(); + + /** + * NicType enum. + * @name google.cloud.backupdr.v1.NetworkInterface.NicType + * @enum {number} + * @property {number} NIC_TYPE_UNSPECIFIED=0 NIC_TYPE_UNSPECIFIED value + * @property {number} VIRTIO_NET=1 VIRTIO_NET value + * @property {number} GVNIC=2 GVNIC value + */ + NetworkInterface.NicType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VIRTIO_NET"] = 1; + values[valuesById[2] = "GVNIC"] = 2; + return values; + })(); + + return NetworkInterface; + })(); + + v1.NetworkPerformanceConfig = (function() { + + /** + * Properties of a NetworkPerformanceConfig. + * @memberof google.cloud.backupdr.v1 + * @interface INetworkPerformanceConfig + * @property {google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null} [totalEgressBandwidthTier] NetworkPerformanceConfig totalEgressBandwidthTier + */ + + /** + * Constructs a new NetworkPerformanceConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a NetworkPerformanceConfig. + * @implements INetworkPerformanceConfig + * @constructor + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig=} [properties] Properties to set + */ + function NetworkPerformanceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkPerformanceConfig totalEgressBandwidthTier. + * @member {google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null|undefined} totalEgressBandwidthTier + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @instance + */ + NetworkPerformanceConfig.prototype.totalEgressBandwidthTier = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NetworkPerformanceConfig _totalEgressBandwidthTier. + * @member {"totalEgressBandwidthTier"|undefined} _totalEgressBandwidthTier + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @instance + */ + Object.defineProperty(NetworkPerformanceConfig.prototype, "_totalEgressBandwidthTier", { + get: $util.oneOfGetter($oneOfFields = ["totalEgressBandwidthTier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NetworkPerformanceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig instance + */ + NetworkPerformanceConfig.create = function create(properties) { + return new NetworkPerformanceConfig(properties); + }; + + /** + * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPerformanceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.totalEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "totalEgressBandwidthTier")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalEgressBandwidthTier); + return writer; + }; + + /** + * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPerformanceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPerformanceConfig.decode = function 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.backupdr.v1.NetworkPerformanceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.totalEgressBandwidthTier = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPerformanceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkPerformanceConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkPerformanceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { + properties._totalEgressBandwidthTier = 1; + switch (message.totalEgressBandwidthTier) { + default: + return "totalEgressBandwidthTier: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig + */ + NetworkPerformanceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.NetworkPerformanceConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.NetworkPerformanceConfig(); + switch (object.totalEgressBandwidthTier) { + default: + if (typeof object.totalEgressBandwidthTier === "number") { + message.totalEgressBandwidthTier = object.totalEgressBandwidthTier; + break; + } + break; + case "TIER_UNSPECIFIED": + case 0: + message.totalEgressBandwidthTier = 0; + break; + case "DEFAULT": + case 1: + message.totalEgressBandwidthTier = 1; + break; + case "TIER_1": + case 2: + message.totalEgressBandwidthTier = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {google.cloud.backupdr.v1.NetworkPerformanceConfig} message NetworkPerformanceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkPerformanceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { + object.totalEgressBandwidthTier = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] === undefined ? message.totalEgressBandwidthTier : $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] : message.totalEgressBandwidthTier; + if (options.oneofs) + object._totalEgressBandwidthTier = "totalEgressBandwidthTier"; + } + return object; + }; + + /** + * Converts this NetworkPerformanceConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkPerformanceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkPerformanceConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkPerformanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkPerformanceConfig"; + }; + + /** + * Tier enum. + * @name google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier + * @enum {number} + * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value + * @property {number} DEFAULT=1 DEFAULT value + * @property {number} TIER_1=2 TIER_1 value + */ + NetworkPerformanceConfig.Tier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEFAULT"] = 1; + values[valuesById[2] = "TIER_1"] = 2; + return values; + })(); + + return NetworkPerformanceConfig; + })(); + + v1.AccessConfig = (function() { + + /** + * Properties of an AccessConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IAccessConfig + * @property {google.cloud.backupdr.v1.AccessConfig.AccessType|null} [type] AccessConfig type + * @property {string|null} [name] AccessConfig name + * @property {string|null} [externalIp] AccessConfig externalIp + * @property {string|null} [externalIpv6] AccessConfig externalIpv6 + * @property {number|null} [externalIpv6PrefixLength] AccessConfig externalIpv6PrefixLength + * @property {boolean|null} [setPublicPtr] AccessConfig setPublicPtr + * @property {string|null} [publicPtrDomainName] AccessConfig publicPtrDomainName + * @property {google.cloud.backupdr.v1.AccessConfig.NetworkTier|null} [networkTier] AccessConfig networkTier + */ + + /** + * Constructs a new AccessConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AccessConfig. + * @implements IAccessConfig + * @constructor + * @param {google.cloud.backupdr.v1.IAccessConfig=} [properties] Properties to set + */ + function AccessConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessConfig type. + * @member {google.cloud.backupdr.v1.AccessConfig.AccessType|null|undefined} type + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.type = null; + + /** + * AccessConfig name. + * @member {string|null|undefined} name + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.name = null; + + /** + * AccessConfig externalIp. + * @member {string|null|undefined} externalIp + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.externalIp = null; + + /** + * AccessConfig externalIpv6. + * @member {string|null|undefined} externalIpv6 + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.externalIpv6 = null; + + /** + * AccessConfig externalIpv6PrefixLength. + * @member {number|null|undefined} externalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.externalIpv6PrefixLength = null; + + /** + * AccessConfig setPublicPtr. + * @member {boolean|null|undefined} setPublicPtr + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.setPublicPtr = null; + + /** + * AccessConfig publicPtrDomainName. + * @member {string|null|undefined} publicPtrDomainName + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.publicPtrDomainName = null; + + /** + * AccessConfig networkTier. + * @member {google.cloud.backupdr.v1.AccessConfig.NetworkTier|null|undefined} networkTier + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.networkTier = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AccessConfig _type. + * @member {"type"|undefined} _type + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _name. + * @member {"name"|undefined} _name + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _externalIp. + * @member {"externalIp"|undefined} _externalIp + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_externalIp", { + get: $util.oneOfGetter($oneOfFields = ["externalIp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _externalIpv6. + * @member {"externalIpv6"|undefined} _externalIpv6 + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_externalIpv6", { + get: $util.oneOfGetter($oneOfFields = ["externalIpv6"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _externalIpv6PrefixLength. + * @member {"externalIpv6PrefixLength"|undefined} _externalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_externalIpv6PrefixLength", { + get: $util.oneOfGetter($oneOfFields = ["externalIpv6PrefixLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _setPublicPtr. + * @member {"setPublicPtr"|undefined} _setPublicPtr + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_setPublicPtr", { + get: $util.oneOfGetter($oneOfFields = ["setPublicPtr"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _publicPtrDomainName. + * @member {"publicPtrDomainName"|undefined} _publicPtrDomainName + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_publicPtrDomainName", { + get: $util.oneOfGetter($oneOfFields = ["publicPtrDomainName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _networkTier. + * @member {"networkTier"|undefined} _networkTier + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_networkTier", { + get: $util.oneOfGetter($oneOfFields = ["networkTier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AccessConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {google.cloud.backupdr.v1.IAccessConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig instance + */ + AccessConfig.create = function create(properties) { + return new AccessConfig(properties); + }; + + /** + * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {google.cloud.backupdr.v1.IAccessConfig} message AccessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.externalIp); + if (message.externalIpv6 != null && Object.hasOwnProperty.call(message, "externalIpv6")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.externalIpv6); + if (message.externalIpv6PrefixLength != null && Object.hasOwnProperty.call(message, "externalIpv6PrefixLength")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.externalIpv6PrefixLength); + if (message.setPublicPtr != null && Object.hasOwnProperty.call(message, "setPublicPtr")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.setPublicPtr); + if (message.publicPtrDomainName != null && Object.hasOwnProperty.call(message, "publicPtrDomainName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.publicPtrDomainName); + if (message.networkTier != null && Object.hasOwnProperty.call(message, "networkTier")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.networkTier); + return writer; + }; + + /** + * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {google.cloud.backupdr.v1.IAccessConfig} message AccessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessConfig.decode = function 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.backupdr.v1.AccessConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + message.externalIp = reader.string(); + break; + } + case 4: { + message.externalIpv6 = reader.string(); + break; + } + case 5: { + message.externalIpv6PrefixLength = reader.int32(); + break; + } + case 6: { + message.setPublicPtr = reader.bool(); + break; + } + case 7: { + message.publicPtrDomainName = reader.string(); + break; + } + case 8: { + message.networkTier = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.externalIp != null && message.hasOwnProperty("externalIp")) { + properties._externalIp = 1; + if (!$util.isString(message.externalIp)) + return "externalIp: string expected"; + } + if (message.externalIpv6 != null && message.hasOwnProperty("externalIpv6")) { + properties._externalIpv6 = 1; + if (!$util.isString(message.externalIpv6)) + return "externalIpv6: string expected"; + } + if (message.externalIpv6PrefixLength != null && message.hasOwnProperty("externalIpv6PrefixLength")) { + properties._externalIpv6PrefixLength = 1; + if (!$util.isInteger(message.externalIpv6PrefixLength)) + return "externalIpv6PrefixLength: integer expected"; + } + if (message.setPublicPtr != null && message.hasOwnProperty("setPublicPtr")) { + properties._setPublicPtr = 1; + if (typeof message.setPublicPtr !== "boolean") + return "setPublicPtr: boolean expected"; + } + if (message.publicPtrDomainName != null && message.hasOwnProperty("publicPtrDomainName")) { + properties._publicPtrDomainName = 1; + if (!$util.isString(message.publicPtrDomainName)) + return "publicPtrDomainName: string expected"; + } + if (message.networkTier != null && message.hasOwnProperty("networkTier")) { + properties._networkTier = 1; + switch (message.networkTier) { + default: + return "networkTier: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates an AccessConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig + */ + AccessConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AccessConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.AccessConfig(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "ACCESS_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ONE_TO_ONE_NAT": + case 1: + message.type = 1; + break; + case "DIRECT_IPV6": + case 2: + message.type = 2; + break; + } + if (object.name != null) + message.name = String(object.name); + if (object.externalIp != null) + message.externalIp = String(object.externalIp); + if (object.externalIpv6 != null) + message.externalIpv6 = String(object.externalIpv6); + if (object.externalIpv6PrefixLength != null) + message.externalIpv6PrefixLength = object.externalIpv6PrefixLength | 0; + if (object.setPublicPtr != null) + message.setPublicPtr = Boolean(object.setPublicPtr); + if (object.publicPtrDomainName != null) + message.publicPtrDomainName = String(object.publicPtrDomainName); + switch (object.networkTier) { + default: + if (typeof object.networkTier === "number") { + message.networkTier = object.networkTier; + break; + } + break; + case "NETWORK_TIER_UNSPECIFIED": + case 0: + message.networkTier = 0; + break; + case "PREMIUM": + case 1: + message.networkTier = 1; + break; + case "STANDARD": + case 2: + message.networkTier = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {google.cloud.backupdr.v1.AccessConfig} message AccessConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.externalIp != null && message.hasOwnProperty("externalIp")) { + object.externalIp = message.externalIp; + if (options.oneofs) + object._externalIp = "externalIp"; + } + if (message.externalIpv6 != null && message.hasOwnProperty("externalIpv6")) { + object.externalIpv6 = message.externalIpv6; + if (options.oneofs) + object._externalIpv6 = "externalIpv6"; + } + if (message.externalIpv6PrefixLength != null && message.hasOwnProperty("externalIpv6PrefixLength")) { + object.externalIpv6PrefixLength = message.externalIpv6PrefixLength; + if (options.oneofs) + object._externalIpv6PrefixLength = "externalIpv6PrefixLength"; + } + if (message.setPublicPtr != null && message.hasOwnProperty("setPublicPtr")) { + object.setPublicPtr = message.setPublicPtr; + if (options.oneofs) + object._setPublicPtr = "setPublicPtr"; + } + if (message.publicPtrDomainName != null && message.hasOwnProperty("publicPtrDomainName")) { + object.publicPtrDomainName = message.publicPtrDomainName; + if (options.oneofs) + object._publicPtrDomainName = "publicPtrDomainName"; + } + if (message.networkTier != null && message.hasOwnProperty("networkTier")) { + object.networkTier = options.enums === String ? $root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier] === undefined ? message.networkTier : $root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier] : message.networkTier; + if (options.oneofs) + object._networkTier = "networkTier"; + } + return object; + }; + + /** + * Converts this AccessConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + * @returns {Object.} JSON object + */ + AccessConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AccessConfig"; + }; + + /** + * AccessType enum. + * @name google.cloud.backupdr.v1.AccessConfig.AccessType + * @enum {number} + * @property {number} ACCESS_TYPE_UNSPECIFIED=0 ACCESS_TYPE_UNSPECIFIED value + * @property {number} ONE_TO_ONE_NAT=1 ONE_TO_ONE_NAT value + * @property {number} DIRECT_IPV6=2 DIRECT_IPV6 value + */ + AccessConfig.AccessType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ONE_TO_ONE_NAT"] = 1; + values[valuesById[2] = "DIRECT_IPV6"] = 2; + return values; + })(); + + /** + * NetworkTier enum. + * @name google.cloud.backupdr.v1.AccessConfig.NetworkTier + * @enum {number} + * @property {number} NETWORK_TIER_UNSPECIFIED=0 NETWORK_TIER_UNSPECIFIED value + * @property {number} PREMIUM=1 PREMIUM value + * @property {number} STANDARD=2 STANDARD value + */ + AccessConfig.NetworkTier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NETWORK_TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "PREMIUM"] = 1; + values[valuesById[2] = "STANDARD"] = 2; + return values; + })(); + + return AccessConfig; + })(); + + v1.AliasIpRange = (function() { + + /** + * Properties of an AliasIpRange. + * @memberof google.cloud.backupdr.v1 + * @interface IAliasIpRange + * @property {string|null} [ipCidrRange] AliasIpRange ipCidrRange + * @property {string|null} [subnetworkRangeName] AliasIpRange subnetworkRangeName + */ + + /** + * Constructs a new AliasIpRange. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AliasIpRange. + * @implements IAliasIpRange + * @constructor + * @param {google.cloud.backupdr.v1.IAliasIpRange=} [properties] Properties to set + */ + function AliasIpRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AliasIpRange ipCidrRange. + * @member {string|null|undefined} ipCidrRange + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + */ + AliasIpRange.prototype.ipCidrRange = null; + + /** + * AliasIpRange subnetworkRangeName. + * @member {string|null|undefined} subnetworkRangeName + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + */ + AliasIpRange.prototype.subnetworkRangeName = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AliasIpRange _ipCidrRange. + * @member {"ipCidrRange"|undefined} _ipCidrRange + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + */ + Object.defineProperty(AliasIpRange.prototype, "_ipCidrRange", { + get: $util.oneOfGetter($oneOfFields = ["ipCidrRange"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AliasIpRange _subnetworkRangeName. + * @member {"subnetworkRangeName"|undefined} _subnetworkRangeName + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + */ + Object.defineProperty(AliasIpRange.prototype, "_subnetworkRangeName", { + get: $util.oneOfGetter($oneOfFields = ["subnetworkRangeName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AliasIpRange instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {google.cloud.backupdr.v1.IAliasIpRange=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange instance + */ + AliasIpRange.create = function create(properties) { + return new AliasIpRange(properties); + }; + + /** + * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {google.cloud.backupdr.v1.IAliasIpRange} message AliasIpRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AliasIpRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ipCidrRange != null && Object.hasOwnProperty.call(message, "ipCidrRange")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipCidrRange); + if (message.subnetworkRangeName != null && Object.hasOwnProperty.call(message, "subnetworkRangeName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetworkRangeName); + return writer; + }; + + /** + * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {google.cloud.backupdr.v1.IAliasIpRange} message AliasIpRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AliasIpRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AliasIpRange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AliasIpRange.decode = function 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.backupdr.v1.AliasIpRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ipCidrRange = reader.string(); + break; + } + case 2: { + message.subnetworkRangeName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AliasIpRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AliasIpRange message. + * @function verify + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AliasIpRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) { + properties._ipCidrRange = 1; + if (!$util.isString(message.ipCidrRange)) + return "ipCidrRange: string expected"; + } + if (message.subnetworkRangeName != null && message.hasOwnProperty("subnetworkRangeName")) { + properties._subnetworkRangeName = 1; + if (!$util.isString(message.subnetworkRangeName)) + return "subnetworkRangeName: string expected"; + } + return null; + }; + + /** + * Creates an AliasIpRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange + */ + AliasIpRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AliasIpRange) + return object; + var message = new $root.google.cloud.backupdr.v1.AliasIpRange(); + if (object.ipCidrRange != null) + message.ipCidrRange = String(object.ipCidrRange); + if (object.subnetworkRangeName != null) + message.subnetworkRangeName = String(object.subnetworkRangeName); + return message; + }; + + /** + * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {google.cloud.backupdr.v1.AliasIpRange} message AliasIpRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AliasIpRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) { + object.ipCidrRange = message.ipCidrRange; + if (options.oneofs) + object._ipCidrRange = "ipCidrRange"; + } + if (message.subnetworkRangeName != null && message.hasOwnProperty("subnetworkRangeName")) { + object.subnetworkRangeName = message.subnetworkRangeName; + if (options.oneofs) + object._subnetworkRangeName = "subnetworkRangeName"; + } + return object; + }; + + /** + * Converts this AliasIpRange to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + * @returns {Object.} JSON object + */ + AliasIpRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AliasIpRange + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AliasIpRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AliasIpRange"; + }; + + return AliasIpRange; + })(); + + v1.InstanceParams = (function() { + + /** + * Properties of an InstanceParams. + * @memberof google.cloud.backupdr.v1 + * @interface IInstanceParams + * @property {Object.|null} [resourceManagerTags] InstanceParams resourceManagerTags + */ + + /** + * Constructs a new InstanceParams. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an InstanceParams. + * @implements IInstanceParams + * @constructor + * @param {google.cloud.backupdr.v1.IInstanceParams=} [properties] Properties to set + */ + function InstanceParams(properties) { + this.resourceManagerTags = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstanceParams resourceManagerTags. + * @member {Object.} resourceManagerTags + * @memberof google.cloud.backupdr.v1.InstanceParams + * @instance + */ + InstanceParams.prototype.resourceManagerTags = $util.emptyObject; + + /** + * Creates a new InstanceParams instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {google.cloud.backupdr.v1.IInstanceParams=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams instance + */ + InstanceParams.create = function create(properties) { + return new InstanceParams(properties); + }; + + /** + * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {google.cloud.backupdr.v1.IInstanceParams} message InstanceParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) + for (var keys = Object.keys(message.resourceManagerTags), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceManagerTags[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {google.cloud.backupdr.v1.IInstanceParams} message InstanceParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstanceParams message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceParams.decode = function 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.backupdr.v1.InstanceParams(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.resourceManagerTags === $util.emptyObject) + message.resourceManagerTags = {}; + 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.resourceManagerTags[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstanceParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstanceParams message. + * @function verify + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstanceParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { + if (!$util.isObject(message.resourceManagerTags)) + return "resourceManagerTags: object expected"; + var key = Object.keys(message.resourceManagerTags); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.resourceManagerTags[key[i]])) + return "resourceManagerTags: string{k:string} expected"; + } + return null; + }; + + /** + * Creates an InstanceParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams + */ + InstanceParams.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.InstanceParams) + return object; + var message = new $root.google.cloud.backupdr.v1.InstanceParams(); + if (object.resourceManagerTags) { + if (typeof object.resourceManagerTags !== "object") + throw TypeError(".google.cloud.backupdr.v1.InstanceParams.resourceManagerTags: object expected"); + message.resourceManagerTags = {}; + for (var keys = Object.keys(object.resourceManagerTags), i = 0; i < keys.length; ++i) + message.resourceManagerTags[keys[i]] = String(object.resourceManagerTags[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {google.cloud.backupdr.v1.InstanceParams} message InstanceParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstanceParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.resourceManagerTags = {}; + var keys2; + if (message.resourceManagerTags && (keys2 = Object.keys(message.resourceManagerTags)).length) { + object.resourceManagerTags = {}; + for (var j = 0; j < keys2.length; ++j) + object.resourceManagerTags[keys2[j]] = message.resourceManagerTags[keys2[j]]; + } + return object; + }; + + /** + * Converts this InstanceParams to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.InstanceParams + * @instance + * @returns {Object.} JSON object + */ + InstanceParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InstanceParams + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstanceParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.InstanceParams"; + }; + + return InstanceParams; + })(); + + v1.AllocationAffinity = (function() { + + /** + * Properties of an AllocationAffinity. + * @memberof google.cloud.backupdr.v1 + * @interface IAllocationAffinity + * @property {google.cloud.backupdr.v1.AllocationAffinity.Type|null} [consumeAllocationType] AllocationAffinity consumeAllocationType + * @property {string|null} [key] AllocationAffinity key + * @property {Array.|null} [values] AllocationAffinity values + */ + + /** + * Constructs a new AllocationAffinity. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AllocationAffinity. + * @implements IAllocationAffinity + * @constructor + * @param {google.cloud.backupdr.v1.IAllocationAffinity=} [properties] Properties to set + */ + function AllocationAffinity(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AllocationAffinity consumeAllocationType. + * @member {google.cloud.backupdr.v1.AllocationAffinity.Type|null|undefined} consumeAllocationType + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + AllocationAffinity.prototype.consumeAllocationType = null; + + /** + * AllocationAffinity key. + * @member {string|null|undefined} key + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + AllocationAffinity.prototype.key = null; + + /** + * AllocationAffinity values. + * @member {Array.} values + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + AllocationAffinity.prototype.values = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AllocationAffinity _consumeAllocationType. + * @member {"consumeAllocationType"|undefined} _consumeAllocationType + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + Object.defineProperty(AllocationAffinity.prototype, "_consumeAllocationType", { + get: $util.oneOfGetter($oneOfFields = ["consumeAllocationType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AllocationAffinity _key. + * @member {"key"|undefined} _key + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + Object.defineProperty(AllocationAffinity.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AllocationAffinity instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {google.cloud.backupdr.v1.IAllocationAffinity=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity instance + */ + AllocationAffinity.create = function create(properties) { + return new AllocationAffinity(properties); + }; + + /** + * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {google.cloud.backupdr.v1.IAllocationAffinity} message AllocationAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllocationAffinity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consumeAllocationType != null && Object.hasOwnProperty.call(message, "consumeAllocationType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumeAllocationType); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {google.cloud.backupdr.v1.IAllocationAffinity} message AllocationAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllocationAffinity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllocationAffinity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllocationAffinity.decode = function 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.backupdr.v1.AllocationAffinity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.consumeAllocationType = reader.int32(); + break; + } + case 2: { + message.key = reader.string(); + break; + } + case 3: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AllocationAffinity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllocationAffinity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllocationAffinity message. + * @function verify + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllocationAffinity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.consumeAllocationType != null && message.hasOwnProperty("consumeAllocationType")) { + properties._consumeAllocationType = 1; + switch (message.consumeAllocationType) { + default: + return "consumeAllocationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; + } + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates an AllocationAffinity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity + */ + AllocationAffinity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AllocationAffinity) + return object; + var message = new $root.google.cloud.backupdr.v1.AllocationAffinity(); + switch (object.consumeAllocationType) { + default: + if (typeof object.consumeAllocationType === "number") { + message.consumeAllocationType = object.consumeAllocationType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.consumeAllocationType = 0; + break; + case "NO_RESERVATION": + case 1: + message.consumeAllocationType = 1; + break; + case "ANY_RESERVATION": + case 2: + message.consumeAllocationType = 2; + break; + case "SPECIFIC_RESERVATION": + case 3: + message.consumeAllocationType = 3; + break; + } + if (object.key != null) + message.key = String(object.key); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.backupdr.v1.AllocationAffinity.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from an AllocationAffinity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {google.cloud.backupdr.v1.AllocationAffinity} message AllocationAffinity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllocationAffinity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.consumeAllocationType != null && message.hasOwnProperty("consumeAllocationType")) { + object.consumeAllocationType = options.enums === String ? $root.google.cloud.backupdr.v1.AllocationAffinity.Type[message.consumeAllocationType] === undefined ? message.consumeAllocationType : $root.google.cloud.backupdr.v1.AllocationAffinity.Type[message.consumeAllocationType] : message.consumeAllocationType; + if (options.oneofs) + object._consumeAllocationType = "consumeAllocationType"; + } + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) + object._key = "key"; + } + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + return object; + }; + + /** + * Converts this AllocationAffinity to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + * @returns {Object.} JSON object + */ + AllocationAffinity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AllocationAffinity + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllocationAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AllocationAffinity"; + }; + + /** + * Type enum. + * @name google.cloud.backupdr.v1.AllocationAffinity.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} NO_RESERVATION=1 NO_RESERVATION value + * @property {number} ANY_RESERVATION=2 ANY_RESERVATION value + * @property {number} SPECIFIC_RESERVATION=3 SPECIFIC_RESERVATION value + */ + AllocationAffinity.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NO_RESERVATION"] = 1; + values[valuesById[2] = "ANY_RESERVATION"] = 2; + values[valuesById[3] = "SPECIFIC_RESERVATION"] = 3; + return values; + })(); + + return AllocationAffinity; + })(); + + v1.Scheduling = (function() { + + /** + * Properties of a Scheduling. + * @memberof google.cloud.backupdr.v1 + * @interface IScheduling + * @property {google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null} [onHostMaintenance] Scheduling onHostMaintenance + * @property {boolean|null} [automaticRestart] Scheduling automaticRestart + * @property {boolean|null} [preemptible] Scheduling preemptible + * @property {Array.|null} [nodeAffinities] Scheduling nodeAffinities + * @property {number|null} [minNodeCpus] Scheduling minNodeCpus + * @property {google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null} [provisioningModel] Scheduling provisioningModel + * @property {google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null} [instanceTerminationAction] Scheduling instanceTerminationAction + * @property {google.cloud.backupdr.v1.ISchedulingDuration|null} [localSsdRecoveryTimeout] Scheduling localSsdRecoveryTimeout + */ + + /** + * Constructs a new Scheduling. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Scheduling. + * @implements IScheduling + * @constructor + * @param {google.cloud.backupdr.v1.IScheduling=} [properties] Properties to set + */ + function Scheduling(properties) { + this.nodeAffinities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Scheduling onHostMaintenance. + * @member {google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null|undefined} onHostMaintenance + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.onHostMaintenance = null; + + /** + * Scheduling automaticRestart. + * @member {boolean|null|undefined} automaticRestart + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.automaticRestart = null; + + /** + * Scheduling preemptible. + * @member {boolean|null|undefined} preemptible + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.preemptible = null; + + /** + * Scheduling nodeAffinities. + * @member {Array.} nodeAffinities + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.nodeAffinities = $util.emptyArray; + + /** + * Scheduling minNodeCpus. + * @member {number|null|undefined} minNodeCpus + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.minNodeCpus = null; + + /** + * Scheduling provisioningModel. + * @member {google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null|undefined} provisioningModel + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.provisioningModel = null; + + /** + * Scheduling instanceTerminationAction. + * @member {google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null|undefined} instanceTerminationAction + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.instanceTerminationAction = null; + + /** + * Scheduling localSsdRecoveryTimeout. + * @member {google.cloud.backupdr.v1.ISchedulingDuration|null|undefined} localSsdRecoveryTimeout + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.localSsdRecoveryTimeout = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Scheduling _onHostMaintenance. + * @member {"onHostMaintenance"|undefined} _onHostMaintenance + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_onHostMaintenance", { + get: $util.oneOfGetter($oneOfFields = ["onHostMaintenance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _automaticRestart. + * @member {"automaticRestart"|undefined} _automaticRestart + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_automaticRestart", { + get: $util.oneOfGetter($oneOfFields = ["automaticRestart"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _preemptible. + * @member {"preemptible"|undefined} _preemptible + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_preemptible", { + get: $util.oneOfGetter($oneOfFields = ["preemptible"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _minNodeCpus. + * @member {"minNodeCpus"|undefined} _minNodeCpus + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_minNodeCpus", { + get: $util.oneOfGetter($oneOfFields = ["minNodeCpus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _provisioningModel. + * @member {"provisioningModel"|undefined} _provisioningModel + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_provisioningModel", { + get: $util.oneOfGetter($oneOfFields = ["provisioningModel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _instanceTerminationAction. + * @member {"instanceTerminationAction"|undefined} _instanceTerminationAction + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_instanceTerminationAction", { + get: $util.oneOfGetter($oneOfFields = ["instanceTerminationAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _localSsdRecoveryTimeout. + * @member {"localSsdRecoveryTimeout"|undefined} _localSsdRecoveryTimeout + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_localSsdRecoveryTimeout", { + get: $util.oneOfGetter($oneOfFields = ["localSsdRecoveryTimeout"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Scheduling instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {google.cloud.backupdr.v1.IScheduling=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling instance + */ + Scheduling.create = function create(properties) { + return new Scheduling(properties); + }; + + /** + * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {google.cloud.backupdr.v1.IScheduling} message Scheduling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Scheduling.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.onHostMaintenance != null && Object.hasOwnProperty.call(message, "onHostMaintenance")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.onHostMaintenance); + if (message.automaticRestart != null && Object.hasOwnProperty.call(message, "automaticRestart")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.automaticRestart); + if (message.preemptible != null && Object.hasOwnProperty.call(message, "preemptible")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preemptible); + if (message.nodeAffinities != null && message.nodeAffinities.length) + for (var i = 0; i < message.nodeAffinities.length; ++i) + $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.encode(message.nodeAffinities[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.minNodeCpus != null && Object.hasOwnProperty.call(message, "minNodeCpus")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.minNodeCpus); + if (message.provisioningModel != null && Object.hasOwnProperty.call(message, "provisioningModel")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.provisioningModel); + if (message.instanceTerminationAction != null && Object.hasOwnProperty.call(message, "instanceTerminationAction")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.instanceTerminationAction); + if (message.localSsdRecoveryTimeout != null && Object.hasOwnProperty.call(message, "localSsdRecoveryTimeout")) + $root.google.cloud.backupdr.v1.SchedulingDuration.encode(message.localSsdRecoveryTimeout, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {google.cloud.backupdr.v1.IScheduling} message Scheduling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Scheduling.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Scheduling message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Scheduling.decode = function 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.backupdr.v1.Scheduling(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.onHostMaintenance = reader.int32(); + break; + } + case 2: { + message.automaticRestart = reader.bool(); + break; + } + case 3: { + message.preemptible = reader.bool(); + break; + } + case 4: { + if (!(message.nodeAffinities && message.nodeAffinities.length)) + message.nodeAffinities = []; + message.nodeAffinities.push($root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.decode(reader, reader.uint32())); + break; + } + case 5: { + message.minNodeCpus = reader.int32(); + break; + } + case 6: { + message.provisioningModel = reader.int32(); + break; + } + case 7: { + message.instanceTerminationAction = reader.int32(); + break; + } + case 10: { + message.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Scheduling message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Scheduling.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Scheduling message. + * @function verify + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Scheduling.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.onHostMaintenance != null && message.hasOwnProperty("onHostMaintenance")) { + properties._onHostMaintenance = 1; + switch (message.onHostMaintenance) { + default: + return "onHostMaintenance: enum value expected"; + case 0: + case 1: + case 1000: + break; + } + } + if (message.automaticRestart != null && message.hasOwnProperty("automaticRestart")) { + properties._automaticRestart = 1; + if (typeof message.automaticRestart !== "boolean") + return "automaticRestart: boolean expected"; + } + if (message.preemptible != null && message.hasOwnProperty("preemptible")) { + properties._preemptible = 1; + if (typeof message.preemptible !== "boolean") + return "preemptible: boolean expected"; + } + if (message.nodeAffinities != null && message.hasOwnProperty("nodeAffinities")) { + if (!Array.isArray(message.nodeAffinities)) + return "nodeAffinities: array expected"; + for (var i = 0; i < message.nodeAffinities.length; ++i) { + var error = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify(message.nodeAffinities[i]); + if (error) + return "nodeAffinities." + error; + } + } + if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { + properties._minNodeCpus = 1; + if (!$util.isInteger(message.minNodeCpus)) + return "minNodeCpus: integer expected"; + } + if (message.provisioningModel != null && message.hasOwnProperty("provisioningModel")) { + properties._provisioningModel = 1; + switch (message.provisioningModel) { + default: + return "provisioningModel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.instanceTerminationAction != null && message.hasOwnProperty("instanceTerminationAction")) { + properties._instanceTerminationAction = 1; + switch (message.instanceTerminationAction) { + default: + return "instanceTerminationAction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.localSsdRecoveryTimeout != null && message.hasOwnProperty("localSsdRecoveryTimeout")) { + properties._localSsdRecoveryTimeout = 1; + { + var error = $root.google.cloud.backupdr.v1.SchedulingDuration.verify(message.localSsdRecoveryTimeout); + if (error) + return "localSsdRecoveryTimeout." + error; + } + } + return null; + }; + + /** + * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling + */ + Scheduling.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Scheduling) + return object; + var message = new $root.google.cloud.backupdr.v1.Scheduling(); + switch (object.onHostMaintenance) { + default: + if (typeof object.onHostMaintenance === "number") { + message.onHostMaintenance = object.onHostMaintenance; + break; + } + break; + case "ON_HOST_MAINTENANCE_UNSPECIFIED": + case 0: + message.onHostMaintenance = 0; + break; + case "TERMINATE": + case 1: + message.onHostMaintenance = 1; + break; + case "MIGRATE": + case 1000: + message.onHostMaintenance = 1000; + break; + } + if (object.automaticRestart != null) + message.automaticRestart = Boolean(object.automaticRestart); + if (object.preemptible != null) + message.preemptible = Boolean(object.preemptible); + if (object.nodeAffinities) { + if (!Array.isArray(object.nodeAffinities)) + throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: array expected"); + message.nodeAffinities = []; + for (var i = 0; i < object.nodeAffinities.length; ++i) { + if (typeof object.nodeAffinities[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: object expected"); + message.nodeAffinities[i] = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.fromObject(object.nodeAffinities[i]); + } + } + if (object.minNodeCpus != null) + message.minNodeCpus = object.minNodeCpus | 0; + switch (object.provisioningModel) { + default: + if (typeof object.provisioningModel === "number") { + message.provisioningModel = object.provisioningModel; + break; + } + break; + case "PROVISIONING_MODEL_UNSPECIFIED": + case 0: + message.provisioningModel = 0; + break; + case "STANDARD": + case 1: + message.provisioningModel = 1; + break; + case "SPOT": + case 2: + message.provisioningModel = 2; + break; + } + switch (object.instanceTerminationAction) { + default: + if (typeof object.instanceTerminationAction === "number") { + message.instanceTerminationAction = object.instanceTerminationAction; + break; + } + break; + case "INSTANCE_TERMINATION_ACTION_UNSPECIFIED": + case 0: + message.instanceTerminationAction = 0; + break; + case "DELETE": + case 1: + message.instanceTerminationAction = 1; + break; + case "STOP": + case 2: + message.instanceTerminationAction = 2; + break; + } + if (object.localSsdRecoveryTimeout != null) { + if (typeof object.localSsdRecoveryTimeout !== "object") + throw TypeError(".google.cloud.backupdr.v1.Scheduling.localSsdRecoveryTimeout: object expected"); + message.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.fromObject(object.localSsdRecoveryTimeout); + } + return message; + }; + + /** + * Creates a plain object from a Scheduling message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {google.cloud.backupdr.v1.Scheduling} message Scheduling + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Scheduling.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.nodeAffinities = []; + if (message.onHostMaintenance != null && message.hasOwnProperty("onHostMaintenance")) { + object.onHostMaintenance = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.OnHostMaintenance[message.onHostMaintenance] === undefined ? message.onHostMaintenance : $root.google.cloud.backupdr.v1.Scheduling.OnHostMaintenance[message.onHostMaintenance] : message.onHostMaintenance; + if (options.oneofs) + object._onHostMaintenance = "onHostMaintenance"; + } + if (message.automaticRestart != null && message.hasOwnProperty("automaticRestart")) { + object.automaticRestart = message.automaticRestart; + if (options.oneofs) + object._automaticRestart = "automaticRestart"; + } + if (message.preemptible != null && message.hasOwnProperty("preemptible")) { + object.preemptible = message.preemptible; + if (options.oneofs) + object._preemptible = "preemptible"; + } + if (message.nodeAffinities && message.nodeAffinities.length) { + object.nodeAffinities = []; + for (var j = 0; j < message.nodeAffinities.length; ++j) + object.nodeAffinities[j] = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.toObject(message.nodeAffinities[j], options); + } + if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { + object.minNodeCpus = message.minNodeCpus; + if (options.oneofs) + object._minNodeCpus = "minNodeCpus"; + } + if (message.provisioningModel != null && message.hasOwnProperty("provisioningModel")) { + object.provisioningModel = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.ProvisioningModel[message.provisioningModel] === undefined ? message.provisioningModel : $root.google.cloud.backupdr.v1.Scheduling.ProvisioningModel[message.provisioningModel] : message.provisioningModel; + if (options.oneofs) + object._provisioningModel = "provisioningModel"; + } + if (message.instanceTerminationAction != null && message.hasOwnProperty("instanceTerminationAction")) { + object.instanceTerminationAction = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction[message.instanceTerminationAction] === undefined ? message.instanceTerminationAction : $root.google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction[message.instanceTerminationAction] : message.instanceTerminationAction; + if (options.oneofs) + object._instanceTerminationAction = "instanceTerminationAction"; + } + if (message.localSsdRecoveryTimeout != null && message.hasOwnProperty("localSsdRecoveryTimeout")) { + object.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.toObject(message.localSsdRecoveryTimeout, options); + if (options.oneofs) + object._localSsdRecoveryTimeout = "localSsdRecoveryTimeout"; + } + return object; + }; + + /** + * Converts this Scheduling to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + * @returns {Object.} JSON object + */ + Scheduling.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Scheduling + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Scheduling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Scheduling"; + }; + + /** + * OnHostMaintenance enum. + * @name google.cloud.backupdr.v1.Scheduling.OnHostMaintenance + * @enum {number} + * @property {number} ON_HOST_MAINTENANCE_UNSPECIFIED=0 ON_HOST_MAINTENANCE_UNSPECIFIED value + * @property {number} TERMINATE=1 TERMINATE value + * @property {number} MIGRATE=1000 MIGRATE value + */ + Scheduling.OnHostMaintenance = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ON_HOST_MAINTENANCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TERMINATE"] = 1; + values[valuesById[1000] = "MIGRATE"] = 1000; + return values; + })(); + + Scheduling.NodeAffinity = (function() { + + /** + * Properties of a NodeAffinity. + * @memberof google.cloud.backupdr.v1.Scheduling + * @interface INodeAffinity + * @property {string|null} [key] NodeAffinity key + * @property {google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null} [operator] NodeAffinity operator + * @property {Array.|null} [values] NodeAffinity values + */ + + /** + * Constructs a new NodeAffinity. + * @memberof google.cloud.backupdr.v1.Scheduling + * @classdesc Represents a NodeAffinity. + * @implements INodeAffinity + * @constructor + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity=} [properties] Properties to set + */ + function NodeAffinity(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeAffinity key. + * @member {string|null|undefined} key + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + NodeAffinity.prototype.key = null; + + /** + * NodeAffinity operator. + * @member {google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null|undefined} operator + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + NodeAffinity.prototype.operator = null; + + /** + * NodeAffinity values. + * @member {Array.} values + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + NodeAffinity.prototype.values = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NodeAffinity _key. + * @member {"key"|undefined} _key + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + Object.defineProperty(NodeAffinity.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NodeAffinity _operator. + * @member {"operator"|undefined} _operator + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + Object.defineProperty(NodeAffinity.prototype, "_operator", { + get: $util.oneOfGetter($oneOfFields = ["operator"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NodeAffinity instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity instance + */ + NodeAffinity.create = function create(properties) { + return new NodeAffinity(properties); + }; + + /** + * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity} message NodeAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeAffinity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.operator != null && Object.hasOwnProperty.call(message, "operator")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operator); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity} message NodeAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeAffinity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeAffinity.decode = function 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.backupdr.v1.Scheduling.NodeAffinity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.operator = reader.int32(); + break; + } + case 3: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeAffinity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeAffinity message. + * @function verify + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeAffinity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; + } + if (message.operator != null && message.hasOwnProperty("operator")) { + properties._operator = 1; + switch (message.operator) { + default: + return "operator: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity + */ + NodeAffinity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity) + return object; + var message = new $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity(); + if (object.key != null) + message.key = String(object.key); + switch (object.operator) { + default: + if (typeof object.operator === "number") { + message.operator = object.operator; + break; + } + break; + case "OPERATOR_UNSPECIFIED": + case 0: + message.operator = 0; + break; + case "IN": + case 1: + message.operator = 1; + break; + case "NOT_IN": + case 2: + message.operator = 2; + break; + } + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.backupdr.v1.Scheduling.NodeAffinity.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.NodeAffinity} message NodeAffinity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeAffinity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) + object._key = "key"; + } + if (message.operator != null && message.hasOwnProperty("operator")) { + object.operator = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator[message.operator] === undefined ? message.operator : $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator[message.operator] : message.operator; + if (options.oneofs) + object._operator = "operator"; + } + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + return object; + }; + + /** + * Converts this NodeAffinity to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + * @returns {Object.} JSON object + */ + NodeAffinity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeAffinity + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Scheduling.NodeAffinity"; + }; + + /** + * Operator enum. + * @name google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator + * @enum {number} + * @property {number} OPERATOR_UNSPECIFIED=0 OPERATOR_UNSPECIFIED value + * @property {number} IN=1 IN value + * @property {number} NOT_IN=2 NOT_IN value + */ + NodeAffinity.Operator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN"] = 1; + values[valuesById[2] = "NOT_IN"] = 2; + return values; + })(); + + return NodeAffinity; + })(); + + /** + * ProvisioningModel enum. + * @name google.cloud.backupdr.v1.Scheduling.ProvisioningModel + * @enum {number} + * @property {number} PROVISIONING_MODEL_UNSPECIFIED=0 PROVISIONING_MODEL_UNSPECIFIED value + * @property {number} STANDARD=1 STANDARD value + * @property {number} SPOT=2 SPOT value + */ + Scheduling.ProvisioningModel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROVISIONING_MODEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD"] = 1; + values[valuesById[2] = "SPOT"] = 2; + return values; + })(); + + /** + * InstanceTerminationAction enum. + * @name google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction + * @enum {number} + * @property {number} INSTANCE_TERMINATION_ACTION_UNSPECIFIED=0 INSTANCE_TERMINATION_ACTION_UNSPECIFIED value + * @property {number} DELETE=1 DELETE value + * @property {number} STOP=2 STOP value + */ + Scheduling.InstanceTerminationAction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INSTANCE_TERMINATION_ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "DELETE"] = 1; + values[valuesById[2] = "STOP"] = 2; + return values; + })(); + + return Scheduling; + })(); + + v1.SchedulingDuration = (function() { + + /** + * Properties of a SchedulingDuration. + * @memberof google.cloud.backupdr.v1 + * @interface ISchedulingDuration + * @property {number|Long|null} [seconds] SchedulingDuration seconds + * @property {number|null} [nanos] SchedulingDuration nanos + */ + + /** + * Constructs a new SchedulingDuration. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a SchedulingDuration. + * @implements ISchedulingDuration + * @constructor + * @param {google.cloud.backupdr.v1.ISchedulingDuration=} [properties] Properties to set + */ + function SchedulingDuration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchedulingDuration seconds. + * @member {number|Long|null|undefined} seconds + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + SchedulingDuration.prototype.seconds = null; + + /** + * SchedulingDuration nanos. + * @member {number|null|undefined} nanos + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + SchedulingDuration.prototype.nanos = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SchedulingDuration _seconds. + * @member {"seconds"|undefined} _seconds + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + Object.defineProperty(SchedulingDuration.prototype, "_seconds", { + get: $util.oneOfGetter($oneOfFields = ["seconds"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SchedulingDuration _nanos. + * @member {"nanos"|undefined} _nanos + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + Object.defineProperty(SchedulingDuration.prototype, "_nanos", { + get: $util.oneOfGetter($oneOfFields = ["nanos"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SchedulingDuration instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {google.cloud.backupdr.v1.ISchedulingDuration=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration instance + */ + SchedulingDuration.create = function create(properties) { + return new SchedulingDuration(properties); + }; + + /** + * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {google.cloud.backupdr.v1.ISchedulingDuration} message SchedulingDuration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchedulingDuration.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 SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {google.cloud.backupdr.v1.ISchedulingDuration} message SchedulingDuration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchedulingDuration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchedulingDuration message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchedulingDuration.decode = function 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.backupdr.v1.SchedulingDuration(); + 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 SchedulingDuration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchedulingDuration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchedulingDuration message. + * @function verify + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchedulingDuration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.seconds != null && message.hasOwnProperty("seconds")) { + properties._seconds = 1; + 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")) { + properties._nanos = 1; + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + } + return null; + }; + + /** + * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration + */ + SchedulingDuration.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.SchedulingDuration) + return object; + var message = new $root.google.cloud.backupdr.v1.SchedulingDuration(); + 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 SchedulingDuration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {google.cloud.backupdr.v1.SchedulingDuration} message SchedulingDuration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchedulingDuration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 (options.oneofs) + object._seconds = "seconds"; + } + if (message.nanos != null && message.hasOwnProperty("nanos")) { + object.nanos = message.nanos; + if (options.oneofs) + object._nanos = "nanos"; + } + return object; + }; + + /** + * Converts this SchedulingDuration to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + * @returns {Object.} JSON object + */ + SchedulingDuration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchedulingDuration + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchedulingDuration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.SchedulingDuration"; + }; + + return SchedulingDuration; + })(); + + v1.ServiceAccount = (function() { + + /** + * Properties of a ServiceAccount. + * @memberof google.cloud.backupdr.v1 + * @interface IServiceAccount + * @property {string|null} [email] ServiceAccount email + * @property {Array.|null} [scopes] ServiceAccount scopes + */ + + /** + * Constructs a new ServiceAccount. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ServiceAccount. + * @implements IServiceAccount + * @constructor + * @param {google.cloud.backupdr.v1.IServiceAccount=} [properties] Properties to set + */ + function ServiceAccount(properties) { + this.scopes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceAccount email. + * @member {string|null|undefined} email + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @instance + */ + ServiceAccount.prototype.email = null; + + /** + * ServiceAccount scopes. + * @member {Array.} scopes + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @instance + */ + ServiceAccount.prototype.scopes = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ServiceAccount _email. + * @member {"email"|undefined} _email + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @instance + */ + Object.defineProperty(ServiceAccount.prototype, "_email", { + get: $util.oneOfGetter($oneOfFields = ["email"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ServiceAccount instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {google.cloud.backupdr.v1.IServiceAccount=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount instance + */ + ServiceAccount.create = function create(properties) { + return new ServiceAccount(properties); + }; + + /** + * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {google.cloud.backupdr.v1.IServiceAccount} message ServiceAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.email != null && Object.hasOwnProperty.call(message, "email")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.email); + if (message.scopes != null && message.scopes.length) + for (var i = 0; i < message.scopes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.scopes[i]); + return writer; + }; + + /** + * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {google.cloud.backupdr.v1.IServiceAccount} message ServiceAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceAccount message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceAccount.decode = function 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.backupdr.v1.ServiceAccount(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.email = reader.string(); + break; + } + case 2: { + if (!(message.scopes && message.scopes.length)) + message.scopes = []; + message.scopes.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceAccount message. + * @function verify + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.email != null && message.hasOwnProperty("email")) { + properties._email = 1; + if (!$util.isString(message.email)) + return "email: string expected"; + } + if (message.scopes != null && message.hasOwnProperty("scopes")) { + if (!Array.isArray(message.scopes)) + return "scopes: array expected"; + for (var i = 0; i < message.scopes.length; ++i) + if (!$util.isString(message.scopes[i])) + return "scopes: string[] expected"; + } + return null; + }; + + /** + * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount + */ + ServiceAccount.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ServiceAccount) + return object; + var message = new $root.google.cloud.backupdr.v1.ServiceAccount(); + if (object.email != null) + message.email = String(object.email); + if (object.scopes) { + if (!Array.isArray(object.scopes)) + throw TypeError(".google.cloud.backupdr.v1.ServiceAccount.scopes: array expected"); + message.scopes = []; + for (var i = 0; i < object.scopes.length; ++i) + message.scopes[i] = String(object.scopes[i]); + } + return message; + }; + + /** + * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {google.cloud.backupdr.v1.ServiceAccount} message ServiceAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.scopes = []; + if (message.email != null && message.hasOwnProperty("email")) { + object.email = message.email; + if (options.oneofs) + object._email = "email"; + } + if (message.scopes && message.scopes.length) { + object.scopes = []; + for (var j = 0; j < message.scopes.length; ++j) + object.scopes[j] = message.scopes[j]; + } + return object; + }; + + /** + * Converts this ServiceAccount to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @instance + * @returns {Object.} JSON object + */ + ServiceAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceAccount + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceAccount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ServiceAccount"; + }; + + return ServiceAccount; + })(); + + v1.Tags = (function() { + + /** + * Properties of a Tags. + * @memberof google.cloud.backupdr.v1 + * @interface ITags + * @property {Array.|null} [items] Tags items + */ + + /** + * Constructs a new Tags. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Tags. + * @implements ITags + * @constructor + * @param {google.cloud.backupdr.v1.ITags=} [properties] Properties to set + */ + function Tags(properties) { + this.items = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Tags items. + * @member {Array.} items + * @memberof google.cloud.backupdr.v1.Tags + * @instance + */ + Tags.prototype.items = $util.emptyArray; + + /** + * Creates a new Tags instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {google.cloud.backupdr.v1.ITags=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Tags} Tags instance + */ + Tags.create = function create(properties) { + return new Tags(properties); + }; + + /** + * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {google.cloud.backupdr.v1.ITags} message Tags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tags.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.items[i]); + return writer; + }; + + /** + * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {google.cloud.backupdr.v1.ITags} message Tags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tags.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Tags message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Tags} Tags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tags.decode = function 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.backupdr.v1.Tags(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.items && message.items.length)) + message.items = []; + message.items.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Tags message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Tags} Tags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tags.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Tags message. + * @function verify + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Tags.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) + if (!$util.isString(message.items[i])) + return "items: string[] expected"; + } + return null; + }; + + /** + * Creates a Tags message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Tags} Tags + */ + Tags.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Tags) + return object; + var message = new $root.google.cloud.backupdr.v1.Tags(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".google.cloud.backupdr.v1.Tags.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) + message.items[i] = String(object.items[i]); + } + return message; + }; + + /** + * Creates a plain object from a Tags message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {google.cloud.backupdr.v1.Tags} message Tags + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Tags.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = message.items[j]; + } + return object; + }; + + /** + * Converts this Tags to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Tags + * @instance + * @returns {Object.} JSON object + */ + Tags.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Tags + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Tags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Tags"; + }; + + return Tags; + })(); + + v1.AttachedDisk = (function() { + + /** + * Properties of an AttachedDisk. + * @memberof google.cloud.backupdr.v1 + * @interface IAttachedDisk + * @property {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null} [initializeParams] AttachedDisk initializeParams + * @property {string|null} [deviceName] AttachedDisk deviceName + * @property {string|null} [kind] AttachedDisk kind + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskType|null} [diskTypeDeprecated] AttachedDisk diskTypeDeprecated + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskMode|null} [mode] AttachedDisk mode + * @property {string|null} [source] AttachedDisk source + * @property {number|Long|null} [index] AttachedDisk index + * @property {boolean|null} [boot] AttachedDisk boot + * @property {boolean|null} [autoDelete] AttachedDisk autoDelete + * @property {Array.|null} [license] AttachedDisk license + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null} [diskInterface] AttachedDisk diskInterface + * @property {Array.|null} [guestOsFeature] AttachedDisk guestOsFeature + * @property {google.cloud.backupdr.v1.ICustomerEncryptionKey|null} [diskEncryptionKey] AttachedDisk diskEncryptionKey + * @property {number|Long|null} [diskSizeGb] AttachedDisk diskSizeGb + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null} [savedState] AttachedDisk savedState + * @property {string|null} [diskType] AttachedDisk diskType + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskType|null} [type] AttachedDisk type + */ + + /** + * Constructs a new AttachedDisk. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AttachedDisk. + * @implements IAttachedDisk + * @constructor + * @param {google.cloud.backupdr.v1.IAttachedDisk=} [properties] Properties to set + */ + function AttachedDisk(properties) { + this.license = []; + this.guestOsFeature = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AttachedDisk initializeParams. + * @member {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null|undefined} initializeParams + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.initializeParams = null; + + /** + * AttachedDisk deviceName. + * @member {string|null|undefined} deviceName + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.deviceName = null; + + /** + * AttachedDisk kind. + * @member {string|null|undefined} kind + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.kind = null; + + /** + * AttachedDisk diskTypeDeprecated. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskType|null|undefined} diskTypeDeprecated + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskTypeDeprecated = null; + + /** + * AttachedDisk mode. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskMode|null|undefined} mode + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.mode = null; + + /** + * AttachedDisk source. + * @member {string|null|undefined} source + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.source = null; + + /** + * AttachedDisk index. + * @member {number|Long|null|undefined} index + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.index = null; + + /** + * AttachedDisk boot. + * @member {boolean|null|undefined} boot + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.boot = null; + + /** + * AttachedDisk autoDelete. + * @member {boolean|null|undefined} autoDelete + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.autoDelete = null; + + /** + * AttachedDisk license. + * @member {Array.} license + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.license = $util.emptyArray; + + /** + * AttachedDisk diskInterface. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null|undefined} diskInterface + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskInterface = null; + + /** + * AttachedDisk guestOsFeature. + * @member {Array.} guestOsFeature + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.guestOsFeature = $util.emptyArray; + + /** + * AttachedDisk diskEncryptionKey. + * @member {google.cloud.backupdr.v1.ICustomerEncryptionKey|null|undefined} diskEncryptionKey + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskEncryptionKey = null; + + /** + * AttachedDisk diskSizeGb. + * @member {number|Long|null|undefined} diskSizeGb + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskSizeGb = null; + + /** + * AttachedDisk savedState. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null|undefined} savedState + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.savedState = null; + + /** + * AttachedDisk diskType. + * @member {string|null|undefined} diskType + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskType = null; + + /** + * AttachedDisk type. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskType|null|undefined} type + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.type = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AttachedDisk _initializeParams. + * @member {"initializeParams"|undefined} _initializeParams + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_initializeParams", { + get: $util.oneOfGetter($oneOfFields = ["initializeParams"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _deviceName. + * @member {"deviceName"|undefined} _deviceName + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_deviceName", { + get: $util.oneOfGetter($oneOfFields = ["deviceName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _kind. + * @member {"kind"|undefined} _kind + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_kind", { + get: $util.oneOfGetter($oneOfFields = ["kind"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskTypeDeprecated. + * @member {"diskTypeDeprecated"|undefined} _diskTypeDeprecated + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskTypeDeprecated", { + get: $util.oneOfGetter($oneOfFields = ["diskTypeDeprecated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _mode. + * @member {"mode"|undefined} _mode + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_mode", { + get: $util.oneOfGetter($oneOfFields = ["mode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _source. + * @member {"source"|undefined} _source + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_source", { + get: $util.oneOfGetter($oneOfFields = ["source"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _index. + * @member {"index"|undefined} _index + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_index", { + get: $util.oneOfGetter($oneOfFields = ["index"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _boot. + * @member {"boot"|undefined} _boot + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_boot", { + get: $util.oneOfGetter($oneOfFields = ["boot"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _autoDelete. + * @member {"autoDelete"|undefined} _autoDelete + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_autoDelete", { + get: $util.oneOfGetter($oneOfFields = ["autoDelete"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskInterface. + * @member {"diskInterface"|undefined} _diskInterface + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskInterface", { + get: $util.oneOfGetter($oneOfFields = ["diskInterface"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskEncryptionKey. + * @member {"diskEncryptionKey"|undefined} _diskEncryptionKey + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskEncryptionKey", { + get: $util.oneOfGetter($oneOfFields = ["diskEncryptionKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskSizeGb. + * @member {"diskSizeGb"|undefined} _diskSizeGb + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskSizeGb", { + get: $util.oneOfGetter($oneOfFields = ["diskSizeGb"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _savedState. + * @member {"savedState"|undefined} _savedState + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_savedState", { + get: $util.oneOfGetter($oneOfFields = ["savedState"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskType. + * @member {"diskType"|undefined} _diskType + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskType", { + get: $util.oneOfGetter($oneOfFields = ["diskType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _type. + * @member {"type"|undefined} _type + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AttachedDisk instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {google.cloud.backupdr.v1.IAttachedDisk=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk instance + */ + AttachedDisk.create = function create(properties) { + return new AttachedDisk(properties); + }; + + /** + * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {google.cloud.backupdr.v1.IAttachedDisk} message AttachedDisk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttachedDisk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initializeParams != null && Object.hasOwnProperty.call(message, "initializeParams")) + $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.encode(message.initializeParams, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.deviceName); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.kind); + if (message.diskTypeDeprecated != null && Object.hasOwnProperty.call(message, "diskTypeDeprecated")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.diskTypeDeprecated); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.mode); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.source); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.index); + if (message.boot != null && Object.hasOwnProperty.call(message, "boot")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.boot); + if (message.autoDelete != null && Object.hasOwnProperty.call(message, "autoDelete")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.autoDelete); + if (message.license != null && message.license.length) + for (var i = 0; i < message.license.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.license[i]); + if (message.diskInterface != null && Object.hasOwnProperty.call(message, "diskInterface")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.diskInterface); + if (message.guestOsFeature != null && message.guestOsFeature.length) + for (var i = 0; i < message.guestOsFeature.length; ++i) + $root.google.cloud.backupdr.v1.GuestOsFeature.encode(message.guestOsFeature[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.diskEncryptionKey != null && Object.hasOwnProperty.call(message, "diskEncryptionKey")) + $root.google.cloud.backupdr.v1.CustomerEncryptionKey.encode(message.diskEncryptionKey, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 16, wireType 0 =*/128).int64(message.diskSizeGb); + if (message.savedState != null && Object.hasOwnProperty.call(message, "savedState")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.savedState); + if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.diskType); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.type); + return writer; + }; + + /** + * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {google.cloud.backupdr.v1.IAttachedDisk} message AttachedDisk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttachedDisk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AttachedDisk message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttachedDisk.decode = function 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.backupdr.v1.AttachedDisk(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.decode(reader, reader.uint32()); + break; + } + case 4: { + message.deviceName = reader.string(); + break; + } + case 5: { + message.kind = reader.string(); + break; + } + case 6: { + message.diskTypeDeprecated = reader.int32(); + break; + } + case 7: { + message.mode = reader.int32(); + break; + } + case 8: { + message.source = reader.string(); + break; + } + case 9: { + message.index = reader.int64(); + break; + } + case 10: { + message.boot = reader.bool(); + break; + } + case 11: { + message.autoDelete = reader.bool(); + break; + } + case 12: { + if (!(message.license && message.license.length)) + message.license = []; + message.license.push(reader.string()); + break; + } + case 13: { + message.diskInterface = reader.int32(); + break; + } + case 14: { + if (!(message.guestOsFeature && message.guestOsFeature.length)) + message.guestOsFeature = []; + message.guestOsFeature.push($root.google.cloud.backupdr.v1.GuestOsFeature.decode(reader, reader.uint32())); + break; + } + case 15: { + message.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader, reader.uint32()); + break; + } + case 16: { + message.diskSizeGb = reader.int64(); + break; + } + case 17: { + message.savedState = reader.int32(); + break; + } + case 18: { + message.diskType = reader.string(); + break; + } + case 19: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttachedDisk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AttachedDisk message. + * @function verify + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AttachedDisk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.initializeParams != null && message.hasOwnProperty("initializeParams")) { + properties._initializeParams = 1; + { + var error = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify(message.initializeParams); + if (error) + return "initializeParams." + error; + } + } + if (message.deviceName != null && message.hasOwnProperty("deviceName")) { + properties._deviceName = 1; + if (!$util.isString(message.deviceName)) + return "deviceName: string expected"; + } + if (message.kind != null && message.hasOwnProperty("kind")) { + properties._kind = 1; + if (!$util.isString(message.kind)) + return "kind: string expected"; + } + if (message.diskTypeDeprecated != null && message.hasOwnProperty("diskTypeDeprecated")) { + properties._diskTypeDeprecated = 1; + switch (message.diskTypeDeprecated) { + default: + return "diskTypeDeprecated: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.mode != null && message.hasOwnProperty("mode")) { + properties._mode = 1; + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.source != null && message.hasOwnProperty("source")) { + properties._source = 1; + if (!$util.isString(message.source)) + return "source: string expected"; + } + if (message.index != null && message.hasOwnProperty("index")) { + properties._index = 1; + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; + } + if (message.boot != null && message.hasOwnProperty("boot")) { + properties._boot = 1; + if (typeof message.boot !== "boolean") + return "boot: boolean expected"; + } + if (message.autoDelete != null && message.hasOwnProperty("autoDelete")) { + properties._autoDelete = 1; + if (typeof message.autoDelete !== "boolean") + return "autoDelete: boolean expected"; + } + if (message.license != null && message.hasOwnProperty("license")) { + if (!Array.isArray(message.license)) + return "license: array expected"; + for (var i = 0; i < message.license.length; ++i) + if (!$util.isString(message.license[i])) + return "license: string[] expected"; + } + if (message.diskInterface != null && message.hasOwnProperty("diskInterface")) { + properties._diskInterface = 1; + switch (message.diskInterface) { + default: + return "diskInterface: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.guestOsFeature != null && message.hasOwnProperty("guestOsFeature")) { + if (!Array.isArray(message.guestOsFeature)) + return "guestOsFeature: array expected"; + for (var i = 0; i < message.guestOsFeature.length; ++i) { + var error = $root.google.cloud.backupdr.v1.GuestOsFeature.verify(message.guestOsFeature[i]); + if (error) + return "guestOsFeature." + error; + } + } + if (message.diskEncryptionKey != null && message.hasOwnProperty("diskEncryptionKey")) { + properties._diskEncryptionKey = 1; + { + var error = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.verify(message.diskEncryptionKey); + if (error) + return "diskEncryptionKey." + error; + } + } + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) { + properties._diskSizeGb = 1; + if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) + return "diskSizeGb: integer|Long expected"; + } + if (message.savedState != null && message.hasOwnProperty("savedState")) { + properties._savedState = 1; + switch (message.savedState) { + default: + return "savedState: enum value expected"; + case 0: + case 1: + break; + } + } + if (message.diskType != null && message.hasOwnProperty("diskType")) { + properties._diskType = 1; + if (!$util.isString(message.diskType)) + return "diskType: string expected"; + } + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates an AttachedDisk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk + */ + AttachedDisk.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AttachedDisk) + return object; + var message = new $root.google.cloud.backupdr.v1.AttachedDisk(); + if (object.initializeParams != null) { + if (typeof object.initializeParams !== "object") + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.initializeParams: object expected"); + message.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.fromObject(object.initializeParams); + } + if (object.deviceName != null) + message.deviceName = String(object.deviceName); + if (object.kind != null) + message.kind = String(object.kind); + switch (object.diskTypeDeprecated) { + default: + if (typeof object.diskTypeDeprecated === "number") { + message.diskTypeDeprecated = object.diskTypeDeprecated; + break; + } + break; + case "DISK_TYPE_UNSPECIFIED": + case 0: + message.diskTypeDeprecated = 0; + break; + case "SCRATCH": + case 1: + message.diskTypeDeprecated = 1; + break; + case "PERSISTENT": + case 2: + message.diskTypeDeprecated = 2; + break; + } + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "DISK_MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "READ_WRITE": + case 1: + message.mode = 1; + break; + case "READ_ONLY": + case 2: + message.mode = 2; + break; + case "LOCKED": + case 3: + message.mode = 3; + break; + } + if (object.source != null) + message.source = String(object.source); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = false; + else if (typeof object.index === "string") + message.index = parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); + if (object.boot != null) + message.boot = Boolean(object.boot); + if (object.autoDelete != null) + message.autoDelete = Boolean(object.autoDelete); + if (object.license) { + if (!Array.isArray(object.license)) + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.license: array expected"); + message.license = []; + for (var i = 0; i < object.license.length; ++i) + message.license[i] = String(object.license[i]); + } + switch (object.diskInterface) { + default: + if (typeof object.diskInterface === "number") { + message.diskInterface = object.diskInterface; + break; + } + break; + case "DISK_INTERFACE_UNSPECIFIED": + case 0: + message.diskInterface = 0; + break; + case "SCSI": + case 1: + message.diskInterface = 1; + break; + case "NVME": + case 2: + message.diskInterface = 2; + break; + case "NVDIMM": + case 3: + message.diskInterface = 3; + break; + case "ISCSI": + case 4: + message.diskInterface = 4; + break; + } + if (object.guestOsFeature) { + if (!Array.isArray(object.guestOsFeature)) + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.guestOsFeature: array expected"); + message.guestOsFeature = []; + for (var i = 0; i < object.guestOsFeature.length; ++i) { + if (typeof object.guestOsFeature[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.guestOsFeature: object expected"); + message.guestOsFeature[i] = $root.google.cloud.backupdr.v1.GuestOsFeature.fromObject(object.guestOsFeature[i]); + } + } + if (object.diskEncryptionKey != null) { + if (typeof object.diskEncryptionKey !== "object") + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.diskEncryptionKey: object expected"); + message.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.fromObject(object.diskEncryptionKey); + } + if (object.diskSizeGb != null) + if ($util.Long) + (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; + else if (typeof object.diskSizeGb === "string") + message.diskSizeGb = parseInt(object.diskSizeGb, 10); + else if (typeof object.diskSizeGb === "number") + message.diskSizeGb = object.diskSizeGb; + else if (typeof object.diskSizeGb === "object") + message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); + switch (object.savedState) { + default: + if (typeof object.savedState === "number") { + message.savedState = object.savedState; + break; + } + break; + case "DISK_SAVED_STATE_UNSPECIFIED": + case 0: + message.savedState = 0; + break; + case "PRESERVED": + case 1: + message.savedState = 1; + break; + } + if (object.diskType != null) + message.diskType = String(object.diskType); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DISK_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "SCRATCH": + case 1: + message.type = 1; + break; + case "PERSISTENT": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk} message AttachedDisk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AttachedDisk.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.license = []; + object.guestOsFeature = []; + } + if (message.initializeParams != null && message.hasOwnProperty("initializeParams")) { + object.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.toObject(message.initializeParams, options); + if (options.oneofs) + object._initializeParams = "initializeParams"; + } + if (message.deviceName != null && message.hasOwnProperty("deviceName")) { + object.deviceName = message.deviceName; + if (options.oneofs) + object._deviceName = "deviceName"; + } + if (message.kind != null && message.hasOwnProperty("kind")) { + object.kind = message.kind; + if (options.oneofs) + object._kind = "kind"; + } + if (message.diskTypeDeprecated != null && message.hasOwnProperty("diskTypeDeprecated")) { + object.diskTypeDeprecated = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated] === undefined ? message.diskTypeDeprecated : $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated] : message.diskTypeDeprecated; + if (options.oneofs) + object._diskTypeDeprecated = "diskTypeDeprecated"; + } + if (message.mode != null && message.hasOwnProperty("mode")) { + object.mode = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode] === undefined ? message.mode : $root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode] : message.mode; + if (options.oneofs) + object._mode = "mode"; + } + if (message.source != null && message.hasOwnProperty("source")) { + object.source = message.source; + if (options.oneofs) + object._source = "source"; + } + if (message.index != null && message.hasOwnProperty("index")) { + if (typeof message.index === "number") + object.index = options.longs === String ? String(message.index) : message.index; + else + object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; + if (options.oneofs) + object._index = "index"; + } + if (message.boot != null && message.hasOwnProperty("boot")) { + object.boot = message.boot; + if (options.oneofs) + object._boot = "boot"; + } + if (message.autoDelete != null && message.hasOwnProperty("autoDelete")) { + object.autoDelete = message.autoDelete; + if (options.oneofs) + object._autoDelete = "autoDelete"; + } + if (message.license && message.license.length) { + object.license = []; + for (var j = 0; j < message.license.length; ++j) + object.license[j] = message.license[j]; + } + if (message.diskInterface != null && message.hasOwnProperty("diskInterface")) { + object.diskInterface = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskInterface[message.diskInterface] === undefined ? message.diskInterface : $root.google.cloud.backupdr.v1.AttachedDisk.DiskInterface[message.diskInterface] : message.diskInterface; + if (options.oneofs) + object._diskInterface = "diskInterface"; + } + if (message.guestOsFeature && message.guestOsFeature.length) { + object.guestOsFeature = []; + for (var j = 0; j < message.guestOsFeature.length; ++j) + object.guestOsFeature[j] = $root.google.cloud.backupdr.v1.GuestOsFeature.toObject(message.guestOsFeature[j], options); + } + if (message.diskEncryptionKey != null && message.hasOwnProperty("diskEncryptionKey")) { + object.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.toObject(message.diskEncryptionKey, options); + if (options.oneofs) + object._diskEncryptionKey = "diskEncryptionKey"; + } + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) { + if (typeof message.diskSizeGb === "number") + object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; + else + object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; + if (options.oneofs) + object._diskSizeGb = "diskSizeGb"; + } + if (message.savedState != null && message.hasOwnProperty("savedState")) { + object.savedState = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState] === undefined ? message.savedState : $root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState] : message.savedState; + if (options.oneofs) + object._savedState = "savedState"; + } + if (message.diskType != null && message.hasOwnProperty("diskType")) { + object.diskType = message.diskType; + if (options.oneofs) + object._diskType = "diskType"; + } + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + return object; + }; + + /** + * Converts this AttachedDisk to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + * @returns {Object.} JSON object + */ + AttachedDisk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AttachedDisk + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AttachedDisk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AttachedDisk"; + }; + + AttachedDisk.InitializeParams = (function() { + + /** + * Properties of an InitializeParams. + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @interface IInitializeParams + * @property {string|null} [diskName] InitializeParams diskName + * @property {Array.|null} [replicaZones] InitializeParams replicaZones + */ + + /** + * Constructs a new InitializeParams. + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @classdesc Represents an InitializeParams. + * @implements IInitializeParams + * @constructor + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams=} [properties] Properties to set + */ + function InitializeParams(properties) { + this.replicaZones = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InitializeParams diskName. + * @member {string|null|undefined} diskName + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + */ + InitializeParams.prototype.diskName = null; + + /** + * InitializeParams replicaZones. + * @member {Array.} replicaZones + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + */ + InitializeParams.prototype.replicaZones = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InitializeParams _diskName. + * @member {"diskName"|undefined} _diskName + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + */ + Object.defineProperty(InitializeParams.prototype, "_diskName", { + get: $util.oneOfGetter($oneOfFields = ["diskName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InitializeParams instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams instance + */ + InitializeParams.create = function create(properties) { + return new InitializeParams(properties); + }; + + /** + * Encodes the specified InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams} message InitializeParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitializeParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.diskName != null && Object.hasOwnProperty.call(message, "diskName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.diskName); + if (message.replicaZones != null && message.replicaZones.length) + for (var i = 0; i < message.replicaZones.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.replicaZones[i]); + return writer; + }; + + /** + * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams} message InitializeParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitializeParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InitializeParams message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitializeParams.decode = function 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.backupdr.v1.AttachedDisk.InitializeParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.diskName = reader.string(); + break; + } + case 2: { + if (!(message.replicaZones && message.replicaZones.length)) + message.replicaZones = []; + message.replicaZones.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InitializeParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitializeParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InitializeParams message. + * @function verify + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InitializeParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.diskName != null && message.hasOwnProperty("diskName")) { + properties._diskName = 1; + if (!$util.isString(message.diskName)) + return "diskName: string expected"; + } + if (message.replicaZones != null && message.hasOwnProperty("replicaZones")) { + if (!Array.isArray(message.replicaZones)) + return "replicaZones: array expected"; + for (var i = 0; i < message.replicaZones.length; ++i) + if (!$util.isString(message.replicaZones[i])) + return "replicaZones: string[] expected"; + } + return null; + }; + + /** + * Creates an InitializeParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams + */ + InitializeParams.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams) + return object; + var message = new $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams(); + if (object.diskName != null) + message.diskName = String(object.diskName); + if (object.replicaZones) { + if (!Array.isArray(object.replicaZones)) + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.InitializeParams.replicaZones: array expected"); + message.replicaZones = []; + for (var i = 0; i < object.replicaZones.length; ++i) + message.replicaZones[i] = String(object.replicaZones[i]); + } + return message; + }; + + /** + * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} message InitializeParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InitializeParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.replicaZones = []; + if (message.diskName != null && message.hasOwnProperty("diskName")) { + object.diskName = message.diskName; + if (options.oneofs) + object._diskName = "diskName"; + } + if (message.replicaZones && message.replicaZones.length) { + object.replicaZones = []; + for (var j = 0; j < message.replicaZones.length; ++j) + object.replicaZones[j] = message.replicaZones[j]; + } + return object; + }; + + /** + * Converts this InitializeParams to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + * @returns {Object.} JSON object + */ + InitializeParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InitializeParams + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InitializeParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AttachedDisk.InitializeParams"; + }; + + return InitializeParams; + })(); + + /** + * DiskType enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskType + * @enum {number} + * @property {number} DISK_TYPE_UNSPECIFIED=0 DISK_TYPE_UNSPECIFIED value + * @property {number} SCRATCH=1 SCRATCH value + * @property {number} PERSISTENT=2 PERSISTENT value + */ + AttachedDisk.DiskType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCRATCH"] = 1; + values[valuesById[2] = "PERSISTENT"] = 2; + return values; + })(); + + /** + * DiskMode enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskMode + * @enum {number} + * @property {number} DISK_MODE_UNSPECIFIED=0 DISK_MODE_UNSPECIFIED value + * @property {number} READ_WRITE=1 READ_WRITE value + * @property {number} READ_ONLY=2 READ_ONLY value + * @property {number} LOCKED=3 LOCKED value + */ + AttachedDisk.DiskMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READ_WRITE"] = 1; + values[valuesById[2] = "READ_ONLY"] = 2; + values[valuesById[3] = "LOCKED"] = 3; + return values; + })(); + + /** + * DiskInterface enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskInterface + * @enum {number} + * @property {number} DISK_INTERFACE_UNSPECIFIED=0 DISK_INTERFACE_UNSPECIFIED value + * @property {number} SCSI=1 SCSI value + * @property {number} NVME=2 NVME value + * @property {number} NVDIMM=3 NVDIMM value + * @property {number} ISCSI=4 ISCSI value + */ + AttachedDisk.DiskInterface = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_INTERFACE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCSI"] = 1; + values[valuesById[2] = "NVME"] = 2; + values[valuesById[3] = "NVDIMM"] = 3; + values[valuesById[4] = "ISCSI"] = 4; + return values; + })(); + + /** + * DiskSavedState enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskSavedState + * @enum {number} + * @property {number} DISK_SAVED_STATE_UNSPECIFIED=0 DISK_SAVED_STATE_UNSPECIFIED value + * @property {number} PRESERVED=1 PRESERVED value + */ + AttachedDisk.DiskSavedState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_SAVED_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRESERVED"] = 1; + return values; + })(); + + return AttachedDisk; + })(); + + v1.GuestOsFeature = (function() { + + /** + * Properties of a GuestOsFeature. + * @memberof google.cloud.backupdr.v1 + * @interface IGuestOsFeature + * @property {google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null} [type] GuestOsFeature type + */ + + /** + * Constructs a new GuestOsFeature. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GuestOsFeature. + * @implements IGuestOsFeature + * @constructor + * @param {google.cloud.backupdr.v1.IGuestOsFeature=} [properties] Properties to set + */ + function GuestOsFeature(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GuestOsFeature type. + * @member {google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null|undefined} type + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @instance + */ + GuestOsFeature.prototype.type = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GuestOsFeature _type. + * @member {"type"|undefined} _type + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @instance + */ + Object.defineProperty(GuestOsFeature.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GuestOsFeature instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.IGuestOsFeature=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature instance + */ + GuestOsFeature.create = function create(properties) { + return new GuestOsFeature(properties); + }; + + /** + * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.IGuestOsFeature} message GuestOsFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GuestOsFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + return writer; + }; + + /** + * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.IGuestOsFeature} message GuestOsFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GuestOsFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GuestOsFeature message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GuestOsFeature.decode = function 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.backupdr.v1.GuestOsFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GuestOsFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GuestOsFeature message. + * @function verify + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GuestOsFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + break; + } + } + return null; + }; + + /** + * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature + */ + GuestOsFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GuestOsFeature) + return object; + var message = new $root.google.cloud.backupdr.v1.GuestOsFeature(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "FEATURE_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "VIRTIO_SCSI_MULTIQUEUE": + case 1: + message.type = 1; + break; + case "WINDOWS": + case 2: + message.type = 2; + break; + case "MULTI_IP_SUBNET": + case 3: + message.type = 3; + break; + case "UEFI_COMPATIBLE": + case 4: + message.type = 4; + break; + case "SECURE_BOOT": + case 5: + message.type = 5; + break; + case "GVNIC": + case 6: + message.type = 6; + break; + case "SEV_CAPABLE": + case 7: + message.type = 7; + break; + case "BARE_METAL_LINUX_COMPATIBLE": + case 8: + message.type = 8; + break; + case "SUSPEND_RESUME_COMPATIBLE": + case 9: + message.type = 9; + break; + case "SEV_LIVE_MIGRATABLE": + case 10: + message.type = 10; + break; + case "SEV_SNP_CAPABLE": + case 11: + message.type = 11; + break; + case "TDX_CAPABLE": + case 12: + message.type = 12; + break; + case "IDPF": + case 13: + message.type = 13; + break; + case "SEV_LIVE_MIGRATABLE_V2": + case 14: + message.type = 14; + break; + } + return message; + }; + + /** + * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.GuestOsFeature} message GuestOsFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GuestOsFeature.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + return object; + }; + + /** + * Converts this GuestOsFeature to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @instance + * @returns {Object.} JSON object + */ + GuestOsFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GuestOsFeature + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GuestOsFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GuestOsFeature"; + }; + + /** + * FeatureType enum. + * @name google.cloud.backupdr.v1.GuestOsFeature.FeatureType + * @enum {number} + * @property {number} FEATURE_TYPE_UNSPECIFIED=0 FEATURE_TYPE_UNSPECIFIED value + * @property {number} VIRTIO_SCSI_MULTIQUEUE=1 VIRTIO_SCSI_MULTIQUEUE value + * @property {number} WINDOWS=2 WINDOWS value + * @property {number} MULTI_IP_SUBNET=3 MULTI_IP_SUBNET value + * @property {number} UEFI_COMPATIBLE=4 UEFI_COMPATIBLE value + * @property {number} SECURE_BOOT=5 SECURE_BOOT value + * @property {number} GVNIC=6 GVNIC value + * @property {number} SEV_CAPABLE=7 SEV_CAPABLE value + * @property {number} BARE_METAL_LINUX_COMPATIBLE=8 BARE_METAL_LINUX_COMPATIBLE value + * @property {number} SUSPEND_RESUME_COMPATIBLE=9 SUSPEND_RESUME_COMPATIBLE value + * @property {number} SEV_LIVE_MIGRATABLE=10 SEV_LIVE_MIGRATABLE value + * @property {number} SEV_SNP_CAPABLE=11 SEV_SNP_CAPABLE value + * @property {number} TDX_CAPABLE=12 TDX_CAPABLE value + * @property {number} IDPF=13 IDPF value + * @property {number} SEV_LIVE_MIGRATABLE_V2=14 SEV_LIVE_MIGRATABLE_V2 value + */ + GuestOsFeature.FeatureType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FEATURE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VIRTIO_SCSI_MULTIQUEUE"] = 1; + values[valuesById[2] = "WINDOWS"] = 2; + values[valuesById[3] = "MULTI_IP_SUBNET"] = 3; + values[valuesById[4] = "UEFI_COMPATIBLE"] = 4; + values[valuesById[5] = "SECURE_BOOT"] = 5; + values[valuesById[6] = "GVNIC"] = 6; + values[valuesById[7] = "SEV_CAPABLE"] = 7; + values[valuesById[8] = "BARE_METAL_LINUX_COMPATIBLE"] = 8; + values[valuesById[9] = "SUSPEND_RESUME_COMPATIBLE"] = 9; + values[valuesById[10] = "SEV_LIVE_MIGRATABLE"] = 10; + values[valuesById[11] = "SEV_SNP_CAPABLE"] = 11; + values[valuesById[12] = "TDX_CAPABLE"] = 12; + values[valuesById[13] = "IDPF"] = 13; + values[valuesById[14] = "SEV_LIVE_MIGRATABLE_V2"] = 14; + return values; + })(); + + return GuestOsFeature; + })(); + + /** + * KeyRevocationActionType enum. + * @name google.cloud.backupdr.v1.KeyRevocationActionType + * @enum {number} + * @property {number} KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED=0 KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} STOP=2 STOP value + */ + v1.KeyRevocationActionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "STOP"] = 2; + return values; + })(); + return v1; })(); - return backupdr; - })(); + return backupdr; + })(); + + 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 + */ + + /** + * 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 = ""; + + /** + * 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); + 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; + } + 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"; + 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); + 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 = ""; + } + 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; + 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()); + }; - return cloud; - })(); + /** + * 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; + }; - google.api = (function() { + /** + * 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; + }; - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; + /** + * 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; + }; - api.Http = (function() { + /** + * 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); + }; /** - * Properties of a Http. + * 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 IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common */ /** - * Constructs a new Http. + * Constructs a new RubySettings. * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * @classdesc Represents a RubySettings. + * @implements IRubySettings * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.IRubySettings=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function RubySettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3718,92 +38664,283 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings * @instance */ - Http.prototype.rules = $util.emptyArray; + RubySettings.prototype.common = null; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * 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 */ - Http.prototype.fullyDecodeReservedExpansion = false; + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Creates a new Http instance using the specified properties. + * 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.Http + * @memberof google.api.GoSettings * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance */ - Http.create = function create(properties) { - return new Http(properties); + GoSettings.create = function create(properties) { + return new GoSettings(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.GoSettings * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + GoSettings.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); + 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 Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.api.GoSettings * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a GoSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @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.Http} Http + * @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 */ - Http.decode = function decode(reader, length) { + 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.Http(); + 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: { - 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(); + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } default: @@ -3815,158 +38952,130 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a GoSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.api.GoSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @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 */ - Http.decodeDelimited = function decodeDelimited(reader) { + GoSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a GoSettings message. * @function verify - * @memberof google.api.Http + * @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 */ - Http.verify = function verify(message) { + GoSettings.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.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + 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. + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.api.GoSettings * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.api.GoSettings} GoSettings */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) 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]); - } + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } - if (object.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. + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.api.GoSettings * @static - * @param {google.api.Http} message Http + * @param {google.api.GoSettings} message GoSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + GoSettings.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; + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); return object; }; /** - * Converts this Http to JSON. + * Converts this GoSettings to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.api.GoSettings * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + GoSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Http + * Gets the default type url for GoSettings * @function getTypeUrl - * @memberof google.api.Http + * @memberof google.api.GoSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.Http"; + return typeUrlPrefix + "/google.api.GoSettings"; }; - return Http; + return GoSettings; })(); - api.HttpRule = (function() { + api.MethodSettings = (function() { /** - * Properties of a HttpRule. + * Properties of a MethodSettings. * @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 + * @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 HttpRule. + * Constructs a new MethodSettings. * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.api.IMethodSettings=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function MethodSettings(properties) { + this.autoPopulatedFields = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3974,175 +39083,91 @@ } /** - * HttpRule selector. + * MethodSettings 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 + * @memberof google.api.MethodSettings * @instance */ - HttpRule.prototype.responseBody = ""; + MethodSettings.prototype.selector = ""; /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + MethodSettings.prototype.longRunning = null; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new MethodSettings instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.MethodSettings * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.MethodSettings * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, 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.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); + 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 HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.MethodSettings * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a MethodSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @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.HttpRule} HttpRule + * @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 */ - HttpRule.decode = function decode(reader, length) { + 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.HttpRule(); + 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) { @@ -4151,41 +39176,13 @@ break; } case 2: { - message.get = reader.string(); + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); 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())); + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); break; } default: @@ -4197,255 +39194,541 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.MethodSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @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 */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + MethodSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies a MethodSettings message. * @function verify - * @memberof google.api.HttpRule + * @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 */ - HttpRule.verify = function verify(message) { + MethodSettings.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.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + 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; - } + 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 HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.api.MethodSettings * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.MethodSettings} MethodSettings */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) return object; - var message = new $root.google.api.HttpRule(); + var message = new $root.google.api.MethodSettings(); 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.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.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]); - } + 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 HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.api.MethodSettings * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.MethodSettings} message MethodSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + MethodSettings.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"; + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; } - 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.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]; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this MethodSettings to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.MethodSettings * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + MethodSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HttpRule + * Gets the default type url for MethodSettings * @function getTypeUrl - * @memberof google.api.HttpRule + * @memberof google.api.MethodSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.HttpRule"; + return typeUrlPrefix + "/google.api.MethodSettings"; }; - return HttpRule; + 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; })(); - api.CustomHttpPattern = (function() { + /** + * 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.FieldInfo = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a FieldInfo. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IFieldInfo + * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new FieldInfo. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a FieldInfo. + * @implements IFieldInfo * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IFieldInfo=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function FieldInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4453,89 +39736,75 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * FieldInfo format. + * @member {google.api.FieldInfo.Format} format + * @memberof google.api.FieldInfo * @instance */ - CustomHttpPattern.prototype.path = ""; + FieldInfo.prototype.format = 0; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new FieldInfo instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IFieldInfo=} [properties] Properties to set + * @returns {google.api.FieldInfo} FieldInfo instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + FieldInfo.create = function create(properties) { + return new FieldInfo(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + FieldInfo.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); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a FieldInfo message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @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 + * @returns {google.api.FieldInfo} FieldInfo * @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) { + FieldInfo.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.FieldInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.kind = reader.string(); - break; - } - case 2: { - message.path = reader.string(); + message.format = reader.int32(); break; } default: @@ -4547,133 +39816,184 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.FieldInfo} FieldInfo * @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) { + FieldInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a FieldInfo message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @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) { + FieldInfo.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"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.FieldInfo} FieldInfo */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + FieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.FieldInfo) 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); + var message = new $root.google.api.FieldInfo(); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "UUID4": + case 1: + message.format = 1; + break; + case "IPV4": + case 2: + message.format = 2; + break; + case "IPV6": + case 3: + message.format = 3; + break; + case "IPV4_OR_IPV6": + case 4: + message.format = 4; + break; + } return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.FieldInfo} message FieldInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + FieldInfo.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; + if (options.defaults) + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this FieldInfo to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + FieldInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomHttpPattern + * Gets the default type url for FieldInfo * @function getTypeUrl - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; + return typeUrlPrefix + "/google.api.FieldInfo"; }; - return CustomHttpPattern; + /** + * Format enum. + * @name google.api.FieldInfo.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} UUID4=1 UUID4 value + * @property {number} IPV4=2 IPV4 value + * @property {number} IPV6=3 IPV6 value + * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value + */ + FieldInfo.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "UUID4"] = 1; + values[valuesById[2] = "IPV4"] = 2; + values[valuesById[3] = "IPV6"] = 3; + values[valuesById[4] = "IPV4_OR_IPV6"] = 4; + return values; + })(); + + return FieldInfo; })(); - api.CommonLanguageSettings = (function() { + api.ResourceDescriptor = (function() { /** - * Properties of a CommonLanguageSettings. + * Properties of a ResourceDescriptor. * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @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 CommonLanguageSettings. + * Constructs a new ResourceDescriptor. * @memberof google.api - * @classdesc Represents a CommonLanguageSettings. - * @implements ICommonLanguageSettings + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function CommonLanguageSettings(properties) { - this.destinations = []; + 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) @@ -4681,100 +40001,173 @@ } /** - * CommonLanguageSettings referenceDocsUri. - * @member {string} referenceDocsUri - * @memberof google.api.CommonLanguageSettings + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - CommonLanguageSettings.prototype.referenceDocsUri = ""; + ResourceDescriptor.prototype.type = ""; /** - * CommonLanguageSettings destinations. - * @member {Array.} destinations - * @memberof google.api.CommonLanguageSettings + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - CommonLanguageSettings.prototype.destinations = $util.emptyArray; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * Creates a new CommonLanguageSettings instance using the specified properties. + * 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.CommonLanguageSettings + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - CommonLanguageSettings.create = function create(properties) { - return new CommonLanguageSettings(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommonLanguageSettings.encode = function encode(message, writer) { + ResourceDescriptor.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]); + 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 CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.CommonLanguageSettings + * @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.CommonLanguageSettings} CommonLanguageSettings + * @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 */ - CommonLanguageSettings.decode = function decode(reader, length) { + 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.CommonLanguageSettings(); + 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.referenceDocsUri = reader.string(); + message.type = reader.string(); break; } case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; + 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.destinations.push(reader.int32()); + message.style.push(reader.int32()); } else - message.destinations.push(reader.int32()); + message.style.push(reader.int32()); break; } default: @@ -4786,45 +40179,69 @@ }; /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @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 */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CommonLanguageSettings message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.api.CommonLanguageSettings + * @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 */ - CommonLanguageSettings.verify = function verify(message) { + ResourceDescriptor.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]) { + 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 "destinations: enum value[] expected"; + return "style: enum value[] expected"; case 0: - case 10: - case 20: + case 1: break; } } @@ -4832,41 +40249,70 @@ }; /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) 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]) { + 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.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; break; } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case "STYLE_UNSPECIFIED": case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; + message.style[i] = 0; break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; break; } } @@ -4874,305 +40320,220 @@ }; /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CommonLanguageSettings.toObject = function toObject(message, options) { + ResourceDescriptor.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]; + 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 CommonLanguageSettings to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CommonLanguageSettings + * Gets the default type url for ResourceDescriptor * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.ResourceDescriptor * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + return typeUrlPrefix + "/google.api.ResourceDescriptor"; }; - 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 + * 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 */ - ClientLibrarySettings.prototype.javaSettings = null; + 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; + })(); /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings - * @instance + * 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 */ - ClientLibrarySettings.prototype.cppSettings = null; + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); - /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.phpSettings = null; + return ResourceDescriptor; + })(); - /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.pythonSettings = null; + api.ResourceReference = (function() { /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings - * @instance + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ - ClientLibrarySettings.prototype.nodeSettings = null; /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings - * @instance + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set */ - ClientLibrarySettings.prototype.dotnetSettings = null; + 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]]; + } /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - ClientLibrarySettings.prototype.rubySettings = null; + ResourceReference.prototype.type = ""; /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - ClientLibrarySettings.prototype.goSettings = null; + ResourceReference.prototype.childType = ""; /** - * Creates a new ClientLibrarySettings instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.ResourceReference * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.ResourceReference * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientLibrarySettings.encode = function encode(message, writer) { + ResourceReference.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(); + 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 ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.ResourceReference * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.api.ClientLibrarySettings + * @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.ClientLibrarySettings} ClientLibrarySettings + * @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 */ - ClientLibrarySettings.decode = function decode(reader, length) { + 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.ClientLibrarySettings(); + 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.version = reader.string(); + message.type = 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()); + message.childType = reader.string(); break; } default: @@ -5184,515 +40545,223 @@ }; /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @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 */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + ResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ClientLibrarySettings message. + * Verifies a ResourceReference message. * @function verify - * @memberof google.api.ClientLibrarySettings + * @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 */ - ClientLibrarySettings.verify = function verify(message) { + ResourceReference.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; - } + 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 ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @returns {google.api.ResourceReference} ResourceReference */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) 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); - } + 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 ClientLibrarySettings message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.ResourceReference * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClientLibrarySettings.toObject = function toObject(message, options) { + ResourceReference.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; + object.type = ""; + object.childType = ""; } - 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); + 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 ClientLibrarySettings to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ClientLibrarySettings + * Gets the default type url for ResourceReference * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.ResourceReference * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + return typeUrlPrefix + "/google.api.ResourceReference"; }; - return ClientLibrarySettings; + return ResourceReference; })(); - 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 - */ - - /** - * 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 = ""; + return api; + })(); - /** - * Publishing codeownerGithubTeams. - * @member {Array.} codeownerGithubTeams - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + google.protobuf = (function() { - /** - * Publishing docTagPrefix. - * @member {string} docTagPrefix - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.docTagPrefix = ""; + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; - /** - * Publishing organization. - * @member {google.api.ClientLibraryOrganization} organization - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.organization = 0; + protobuf.FileDescriptorSet = (function() { /** - * Publishing librarySettings. - * @member {Array.} librarySettings - * @memberof google.api.Publishing - * @instance + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file */ - Publishing.prototype.librarySettings = $util.emptyArray; /** - * Publishing protoReferenceDocumentationUri. - * @member {string} protoReferenceDocumentationUri - * @memberof google.api.Publishing + * 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 */ - Publishing.prototype.protoReferenceDocumentationUri = ""; + FileDescriptorSet.prototype.file = $util.emptyArray; /** - * Creates a new Publishing instance using the specified properties. + * Creates a new FileDescriptorSet instance using the specified properties. * @function create - * @memberof google.api.Publishing + * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.api.IPublishing=} [properties] Properties to set - * @returns {google.api.Publishing} Publishing instance + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance */ - Publishing.create = function create(properties) { - return new Publishing(properties); + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); }; /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. * @function encode - * @memberof google.api.Publishing + * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Publishing.encode = function encode(message, writer) { + FileDescriptorSet.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.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 Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Publishing + * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Publishing.encodeDelimited = function encodeDelimited(message, writer) { + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Publishing message from the specified reader or buffer. + * Decodes a FileDescriptorSet message from the specified reader or buffer. * @function decode - * @memberof google.api.Publishing + * @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.api.Publishing} Publishing + * @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 */ - Publishing.decode = function decode(reader, length) { + 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.api.Publishing(); + 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 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(); + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); break; } default: @@ -5704,419 +40773,465 @@ }; /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Publishing + * @memberof google.protobuf.FileDescriptorSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing + * @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 */ - Publishing.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Publishing message. + * Verifies a FileDescriptorSet message. * @function verify - * @memberof google.api.Publishing + * @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 */ - Publishing.verify = function verify(message) { + FileDescriptorSet.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 (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 "librarySettings." + error; + return "file." + error; } } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; return null; }; /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Publishing + * @memberof google.protobuf.FileDescriptorSet * @static * @param {Object.} object Plain object - * @returns {google.api.Publishing} Publishing + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet */ - Publishing.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Publishing) + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) 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]); + 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]); } } - if (object.protoReferenceDocumentationUri != null) - message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); return message; }; /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Publishing + * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.api.Publishing} message Publishing + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Publishing.toObject = function toObject(message, options) { + FileDescriptorSet.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 = ""; - } - 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 (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); } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; return object; }; /** - * Converts this Publishing to JSON. - * @function toJSON - * @memberof google.api.Publishing + * 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 - * @returns {Object.} JSON object */ - Publishing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + FileDescriptorProto.prototype.enumType = $util.emptyArray; /** - * 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 + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance */ - Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Publishing"; - }; - - return Publishing; - })(); - - api.JavaSettings = (function() { + FileDescriptorProto.prototype.service = $util.emptyArray; /** - * 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 + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance */ + FileDescriptorProto.prototype.extension = $util.emptyArray; /** - * Constructs a new JavaSettings. - * @memberof google.api - * @classdesc Represents a JavaSettings. - * @implements IJavaSettings - * @constructor - * @param {google.api.IJavaSettings=} [properties] Properties to set + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance */ - 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]]; - } + FileDescriptorProto.prototype.options = null; /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto * @instance */ - JavaSettings.prototype.libraryPackage = ""; + FileDescriptorProto.prototype.sourceCodeInfo = null; /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto * @instance */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; + FileDescriptorProto.prototype.syntax = ""; /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto * @instance */ - JavaSettings.prototype.common = null; + FileDescriptorProto.prototype.edition = 0; /** - * Creates a new JavaSettings instance using the specified properties. + * Creates a new FileDescriptorProto instance using the specified properties. * @function create - * @memberof google.api.JavaSettings + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); }; /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.api.JavaSettings + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JavaSettings.encode = function encode(message, writer) { + FileDescriptorProto.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(); + 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 JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.JavaSettings + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a JavaSettings message from the specified reader or buffer. + * Decodes a FileDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.api.JavaSettings + * @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.api.JavaSettings} JavaSettings + * @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 */ - JavaSettings.decode = function decode(reader, length) { + 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.api.JavaSettings(), key, value; + 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.libraryPackage = reader.string(); + message.name = 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; + message["package"] = reader.string(); break; } case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + 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: @@ -6128,159 +41243,416 @@ }; /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.JavaSettings + * @memberof google.protobuf.FileDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings + * @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 */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a JavaSettings message. + * Verifies a FileDescriptorProto message. * @function verify - * @memberof google.api.JavaSettings + * @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 */ - JavaSettings.verify = function verify(message) { + FileDescriptorProto.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.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.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); + 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 "common." + 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 JavaSettings message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.JavaSettings + * @memberof google.protobuf.FileDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) 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]]); + 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.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + 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 JavaSettings message. Also converts values to other types if specified. + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.JavaSettings + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.api.JavaSettings} message JavaSettings + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - JavaSettings.toObject = function toObject(message, options) { + FileDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } if (options.defaults) { - object.libraryPackage = ""; - object.common = null; + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - 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.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.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + 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 JavaSettings to JSON. + * Converts this FileDescriptorProto to JSON. * @function toJSON - * @memberof google.api.JavaSettings + * @memberof google.protobuf.FileDescriptorProto * @instance * @returns {Object.} JSON object */ - JavaSettings.prototype.toJSON = function toJSON() { + FileDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for JavaSettings + * Gets the default type url for FileDescriptorProto * @function getTypeUrl - * @memberof google.api.JavaSettings + * @memberof google.protobuf.FileDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.JavaSettings"; + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; }; - return JavaSettings; + return FileDescriptorProto; })(); - api.CppSettings = (function() { + protobuf.DescriptorProto = (function() { /** - * Properties of a CppSettings. - * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + * 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 CppSettings. - * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set */ - function CppSettings(properties) { + 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) @@ -6288,75 +41660,225 @@ } /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto * @instance */ - CppSettings.prototype.common = null; + DescriptorProto.prototype.name = ""; /** - * Creates a new CppSettings instance using the specified properties. + * 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.api.CppSettings + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); }; /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. * @function encode - * @memberof google.api.CppSettings + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CppSettings.encode = function encode(message, writer) { + DescriptorProto.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.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 CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CppSettings + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CppSettings message from the specified reader or buffer. + * Decodes a DescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.api.CppSettings + * @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.api.CppSettings} CppSettings + * @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 */ - CppSettings.decode = function decode(reader, length) { + 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.api.CppSettings(); + 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.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + 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: @@ -6368,335 +41890,820 @@ }; /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CppSettings + * @memberof google.protobuf.DescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings + * @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 */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CppSettings message. + * Verifies a DescriptorProto message. * @function verify - * @memberof google.api.CppSettings + * @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 */ - CppSettings.verify = function verify(message) { + DescriptorProto.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 (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 "common." + 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]); + } } - 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); + 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 CppSettings message. Also converts values to other types if specified. + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CppSettings + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.api.CppSettings} message CppSettings + * @param {google.protobuf.DescriptorProto} message DescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CppSettings.toObject = function toObject(message, options) { + DescriptorProto.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); + 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 CppSettings to JSON. + * Converts this DescriptorProto to JSON. * @function toJSON - * @memberof google.api.CppSettings + * @memberof google.protobuf.DescriptorProto * @instance * @returns {Object.} JSON object */ - CppSettings.prototype.toJSON = function toJSON() { + DescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CppSettings + * Gets the default type url for DescriptorProto * @function getTypeUrl - * @memberof google.api.CppSettings + * @memberof google.protobuf.DescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.CppSettings"; + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; }; - return CppSettings; - })(); + DescriptorProto.ExtensionRange = (function() { - api.PhpSettings = (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 + */ - /** - * Properties of a PhpSettings. - * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common - */ + /** + * 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]]; + } - /** - * 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]]; - } + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; - /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings - * @instance - */ - PhpSettings.prototype.common = null; + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; - /** - * 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); - }; + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; - /** - * 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; - }; + /** + * 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 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(); - }; + /** + * 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; + }; - /** - * 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()); + /** + * 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; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + 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()); - }; + /** + * 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 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; - }; + /** + * 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 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) + /** + * 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; - 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 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); + }; - /** - * 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 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"; + }; - /** - * 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 ReservedRange; + })(); - return PhpSettings; + return DescriptorProto; })(); - api.PythonSettings = (function() { + protobuf.ExtensionRangeOptions = (function() { /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * 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 PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set */ - function PythonSettings(properties) { + 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) @@ -6704,283 +42711,123 @@ } /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions * @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; - }; + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Converts this PythonSettings to JSON. - * @function toJSON - * @memberof google.api.PythonSettings + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions * @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 */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; /** - * Constructs a new NodeSettings. - * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings - * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance */ - 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]]; - } + ExtensionRangeOptions.prototype.features = null; /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions * @instance */ - NodeSettings.prototype.common = null; + ExtensionRangeOptions.prototype.verification = 1; /** - * Creates a new NodeSettings instance using the specified properties. + * Creates a new ExtensionRangeOptions instance using the specified properties. * @function create - * @memberof google.api.NodeSettings + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); }; /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. * @function encode - * @memberof google.api.NodeSettings + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NodeSettings.encode = function encode(message, writer) { + ExtensionRangeOptions.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.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 NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.NodeSettings + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NodeSettings message from the specified reader or buffer. + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. * @function decode - * @memberof google.api.NodeSettings + * @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.api.NodeSettings} NodeSettings + * @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 */ - NodeSettings.decode = function decode(reader, length) { + 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.api.NodeSettings(); + 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 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + 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: @@ -6992,137 +42839,527 @@ }; /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.NodeSettings + * @memberof google.protobuf.ExtensionRangeOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings + * @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 */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NodeSettings message. + * Verifies an ExtensionRangeOptions message. * @function verify - * @memberof google.api.NodeSettings + * @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 */ - NodeSettings.verify = function verify(message) { + ExtensionRangeOptions.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 (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 "common." + 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 a NodeSettings message from a plain object. Also converts values to their respective internal types. + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.NodeSettings + * @memberof google.protobuf.ExtensionRangeOptions * @static * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) 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); + 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 a NodeSettings message. Also converts values to other types if specified. + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.NodeSettings + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.api.NodeSettings} message NodeSettings + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NodeSettings.toObject = function toObject(message, options) { + ExtensionRangeOptions.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); + 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 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); - }; + /** + * 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; + })(); /** - * 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 + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.NodeSettings"; - }; + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); - return NodeSettings; + return ExtensionRangeOptions; })(); - api.DotnetSettings = (function() { + protobuf.FieldDescriptorProto = (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 + * 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 DotnetSettings. - * @memberof google.api - * @classdesc Represents a DotnetSettings. - * @implements IDotnetSettings + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto * @constructor - * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set */ - function DotnetSettings(properties) { - this.renamedServices = {}; - this.renamedResources = {}; - this.ignoredResources = []; - this.forcedNamespaceAliases = []; - this.handwrittenSignatures = []; + function FieldDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7130,509 +43367,215 @@ } /** - * 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 + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - DotnetSettings.prototype.renamedServices = $util.emptyObject; + FieldDescriptorProto.prototype.name = ""; /** - * DotnetSettings renamedResources. - * @member {Object.} renamedResources - * @memberof google.api.DotnetSettings + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - DotnetSettings.prototype.renamedResources = $util.emptyObject; + FieldDescriptorProto.prototype.number = 0; /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; + FieldDescriptorProto.prototype.label = 1; /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + FieldDescriptorProto.prototype.type = 1; /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto * @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; - }; + FieldDescriptorProto.prototype.typeName = ""; /** - * Converts this DotnetSettings to JSON. - * @function toJSON - * @memberof google.api.DotnetSettings + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto * @instance - * @returns {Object.} JSON object */ - DotnetSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + FieldDescriptorProto.prototype.extendee = ""; /** - * 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; - })(); + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; - api.RubySettings = (function() { + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; /** - * Properties of a RubySettings. - * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance */ + FieldDescriptorProto.prototype.jsonName = ""; /** - * Constructs a new RubySettings. - * @memberof google.api - * @classdesc Represents a RubySettings. - * @implements IRubySettings - * @constructor - * @param {google.api.IRubySettings=} [properties] Properties to set + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance */ - 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]]; - } + FieldDescriptorProto.prototype.options = null; /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - RubySettings.prototype.common = null; + FieldDescriptorProto.prototype.proto3Optional = false; /** - * Creates a new RubySettings instance using the specified properties. + * Creates a new FieldDescriptorProto instance using the specified properties. * @function create - * @memberof google.api.RubySettings + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); }; /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.api.RubySettings + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RubySettings.encode = function encode(message, writer) { + FieldDescriptorProto.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.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 RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.RubySettings + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RubySettings message from the specified reader or buffer. + * Decodes a FieldDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.api.RubySettings + * @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.api.RubySettings} RubySettings + * @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 */ - RubySettings.decode = function decode(reader, length) { + 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.api.RubySettings(); + 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.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + 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: @@ -7644,127 +43587,394 @@ }; /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.RubySettings + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings + * @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 */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RubySettings message. + * Verifies a FieldDescriptorProto message. * @function verify - * @memberof google.api.RubySettings + * @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 */ - RubySettings.verify = function verify(message) { + FieldDescriptorProto.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 (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 "common." + error; + return "options." + error; } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; return null; }; /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.RubySettings + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) 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); + 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 RubySettings message. Also converts values to other types if specified. + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.RubySettings + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.api.RubySettings} message RubySettings + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RubySettings.toObject = function toObject(message, options) { + FieldDescriptorProto.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); + 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 RubySettings to JSON. + * Converts this FieldDescriptorProto to JSON. * @function toJSON - * @memberof google.api.RubySettings + * @memberof google.protobuf.FieldDescriptorProto * @instance * @returns {Object.} JSON object */ - RubySettings.prototype.toJSON = function toJSON() { + FieldDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RubySettings + * Gets the default type url for FieldDescriptorProto * @function getTypeUrl - * @memberof google.api.RubySettings + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.RubySettings"; + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; }; - return RubySettings; + /** + * 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; })(); - api.GoSettings = (function() { + protobuf.OneofDescriptorProto = (function() { /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * 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 GoSettings. - * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set */ - function GoSettings(properties) { + function OneofDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7772,75 +43982,89 @@ } /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings + * 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 */ - GoSettings.prototype.common = null; + OneofDescriptorProto.prototype.options = null; /** - * Creates a new GoSettings instance using the specified properties. + * Creates a new OneofDescriptorProto instance using the specified properties. * @function create - * @memberof google.api.GoSettings + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); }; /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.api.GoSettings + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GoSettings.encode = function encode(message, writer) { + OneofDescriptorProto.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.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 GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.GoSettings + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GoSettings message from the specified reader or buffer. + * Decodes an OneofDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.api.GoSettings + * @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.api.GoSettings} GoSettings + * @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 */ - GoSettings.decode = function decode(reader, length) { + 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.api.GoSettings(); + 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.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); break; } default: @@ -7852,130 +44076,143 @@ }; /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.GoSettings + * @memberof google.protobuf.OneofDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings + * @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 */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GoSettings message. + * Verifies an OneofDescriptorProto message. * @function verify - * @memberof google.api.GoSettings + * @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 */ - GoSettings.verify = function verify(message) { + OneofDescriptorProto.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 (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 "common." + error; + return "options." + error; } return null; }; /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.GoSettings + * @memberof google.protobuf.OneofDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto */ - GoSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.GoSettings) + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) 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); + 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 a GoSettings message. Also converts values to other types if specified. + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.GoSettings + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.api.GoSettings} message GoSettings + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GoSettings.toObject = function toObject(message, options) { + OneofDescriptorProto.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); + 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 GoSettings to JSON. + * Converts this OneofDescriptorProto to JSON. * @function toJSON - * @memberof google.api.GoSettings + * @memberof google.protobuf.OneofDescriptorProto * @instance * @returns {Object.} JSON object */ - GoSettings.prototype.toJSON = function toJSON() { + OneofDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GoSettings + * Gets the default type url for OneofDescriptorProto * @function getTypeUrl - * @memberof google.api.GoSettings + * @memberof google.protobuf.OneofDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.GoSettings"; + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; }; - return GoSettings; + return OneofDescriptorProto; })(); - api.MethodSettings = (function() { + protobuf.EnumDescriptorProto = (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 + * 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 MethodSettings. - * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set */ - function MethodSettings(properties) { - this.autoPopulatedFields = []; + 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) @@ -7983,106 +44220,140 @@ } /** - * MethodSettings selector. - * @member {string} selector - * @memberof google.api.MethodSettings + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - MethodSettings.prototype.selector = ""; + EnumDescriptorProto.prototype.name = ""; /** - * MethodSettings longRunning. - * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning - * @memberof google.api.MethodSettings + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - MethodSettings.prototype.longRunning = null; + EnumDescriptorProto.prototype.value = $util.emptyArray; /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + EnumDescriptorProto.prototype.options = null; /** - * Creates a new MethodSettings instance using the specified properties. + * 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.api.MethodSettings + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); }; /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.api.MethodSettings + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodSettings.encode = function encode(message, writer) { + EnumDescriptorProto.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]); + 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 MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MethodSettings + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodSettings message from the specified reader or buffer. + * Decodes an EnumDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.api.MethodSettings + * @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.api.MethodSettings} MethodSettings + * @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 */ - MethodSettings.decode = function decode(reader, length) { + 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.api.MethodSettings(); + 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.selector = reader.string(); + message.name = reader.string(); break; } case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); break; } case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); + 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: @@ -8094,275 +44365,296 @@ }; /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MethodSettings + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings + * @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 */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodSettings message. + * Verifies an EnumDescriptorProto message. * @function verify - * @memberof google.api.MethodSettings + * @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 */ - MethodSettings.verify = function verify(message) { + EnumDescriptorProto.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 (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 "longRunning." + error; + return "options." + 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"; + 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 a MethodSettings message from a plain object. Also converts values to their respective internal types. + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MethodSettings + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto */ - MethodSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings) + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) 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); + 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.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]); + 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 a MethodSettings message. Also converts values to other types if specified. + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MethodSettings + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.api.MethodSettings} message MethodSettings + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodSettings.toObject = function toObject(message, options) { + EnumDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } if (options.defaults) { - object.selector = ""; - object.longRunning = null; + object.name = ""; + object.options = 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]; + 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 MethodSettings to JSON. + * Converts this EnumDescriptorProto to JSON. * @function toJSON - * @memberof google.api.MethodSettings + * @memberof google.protobuf.EnumDescriptorProto * @instance * @returns {Object.} JSON object */ - MethodSettings.prototype.toJSON = function toJSON() { + EnumDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MethodSettings + * Gets the default type url for EnumDescriptorProto * @function getTypeUrl - * @memberof google.api.MethodSettings + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.MethodSettings"; + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; }; - 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]]; - } + EnumDescriptorProto.EnumReservedRange = (function() { /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end */ - LongRunning.prototype.initialPollDelay = null; /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set */ - LongRunning.prototype.pollDelayMultiplier = 0; + 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]]; + } /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @instance */ - LongRunning.prototype.maxPollDelay = null; + EnumReservedRange.prototype.start = 0; /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @instance */ - LongRunning.prototype.totalPollTimeout = null; + EnumReservedRange.prototype.end = 0; /** - * Creates a new LongRunning instance using the specified properties. + * Creates a new EnumReservedRange instance using the specified properties. * @function create - * @memberof google.api.MethodSettings.LongRunning + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); }; /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. * @function encode - * @memberof google.api.MethodSettings.LongRunning + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @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 */ - LongRunning.encode = function encode(message, writer) { + EnumReservedRange.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(); + 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 LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @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 */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LongRunning message from the specified reader or buffer. + * Decodes an EnumReservedRange message from the specified reader or buffer. * @function decode - * @memberof google.api.MethodSettings.LongRunning + * @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.api.MethodSettings.LongRunning} LongRunning + * @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 */ - LongRunning.decode = function decode(reader, length) { + 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.api.MethodSettings.LongRunning(); + 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.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.start = reader.int32(); 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()); + message.end = reader.int32(); break; } default: @@ -8374,269 +44666,392 @@ }; /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @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 */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LongRunning message. + * Verifies an EnumReservedRange message. * @function verify - * @memberof google.api.MethodSettings.LongRunning + * @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 */ - LongRunning.verify = function verify(message) { + EnumReservedRange.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; - } + 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 LongRunning message from a plain object. Also converts values to their respective internal types. + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MethodSettings.LongRunning + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange */ - LongRunning.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) 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); - } + 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 a LongRunning message. Also converts values to other types if specified. + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MethodSettings.LongRunning + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LongRunning.toObject = function toObject(message, options) { + EnumReservedRange.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; + object.start = 0; + object.end = 0; } - 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); + 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 LongRunning to JSON. + * Converts this EnumReservedRange to JSON. * @function toJSON - * @memberof google.api.MethodSettings.LongRunning + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @instance * @returns {Object.} JSON object */ - LongRunning.prototype.toJSON = function toJSON() { + EnumReservedRange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LongRunning + * Gets the default type url for EnumReservedRange * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; }; - return LongRunning; + return EnumReservedRange; })(); - return MethodSettings; + return EnumDescriptorProto; })(); - /** - * 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; - })(); + protobuf.EnumValueDescriptorProto = (function() { - /** - * 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; - })(); + /** + * 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 + */ - /** - * 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; - })(); + /** + * 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"; + }; - /** - * 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; + return EnumValueDescriptorProto; })(); - api.ResourceDescriptor = (function() { + protobuf.ServiceDescriptorProto = (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 + * 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 ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; + function ServiceDescriptorProto(properties) { + this.method = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8644,173 +45059,106 @@ } /** - * 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 + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto * @instance */ - ResourceDescriptor.prototype.plural = ""; + ServiceDescriptorProto.prototype.name = ""; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto * @instance */ - ResourceDescriptor.prototype.singular = ""; + ServiceDescriptorProto.prototype.method = $util.emptyArray; /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto * @instance */ - ResourceDescriptor.prototype.style = $util.emptyArray; + ServiceDescriptorProto.prototype.options = null; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new ServiceDescriptorProto instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + ServiceDescriptorProto.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(); - } + 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 ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @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.api.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.decode = function decode(reader, length) { + 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.api.ResourceDescriptor(); + 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.type = reader.string(); + message.name = reader.string(); break; } case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); 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()); + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); break; } default: @@ -8822,271 +45170,167 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a ServiceDescriptorProto message. * @function verify - * @memberof google.api.ResourceDescriptor + * @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 */ - ResourceDescriptor.verify = function verify(message) { + ServiceDescriptorProto.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.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.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; - } + } + 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) 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; + 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]); } - 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; - } + 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 ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + ServiceDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } + if (options.arrays || options.defaults) + object.method = []; 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]; + object.name = ""; + object.options = null; } - 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]; + 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 ResourceDescriptor to JSON. + * Converts this ServiceDescriptorProto to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.ServiceDescriptorProto * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + ServiceDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceDescriptor + * Gets the default type url for ServiceDescriptorProto * @function getTypeUrl - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; }; - /** - * 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; + return ServiceDescriptorProto; })(); - api.ResourceReference = (function() { + protobuf.MethodDescriptorProto = (function() { /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * 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 ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set */ - function ResourceReference(properties) { + function MethodDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9094,89 +45338,145 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * 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 */ - ResourceReference.prototype.type = ""; + MethodDescriptorProto.prototype.clientStreaming = false; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - ResourceReference.prototype.childType = ""; + MethodDescriptorProto.prototype.serverStreaming = false; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new MethodDescriptorProto instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + MethodDescriptorProto.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); + 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 ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a MethodDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @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.api.ResourceReference} ResourceReference + * @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 */ - ResourceReference.decode = function decode(reader, length) { + 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.api.ResourceReference(); + 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.type = reader.string(); + message.name = reader.string(); break; } case 2: { - message.childType = reader.string(); + 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: @@ -9188,144 +45488,191 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.protobuf.MethodDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @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 */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a MethodDescriptorProto message. * @function verify - * @memberof google.api.ResourceReference + * @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 */ - ResourceReference.verify = function verify(message) { + MethodDescriptorProto.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"; + 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.protobuf.MethodDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) 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); + 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 ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + MethodDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + 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 ResourceReference to JSON. + * Converts this MethodDescriptorProto to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.protobuf.MethodDescriptorProto * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + MethodDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceReference + * Gets the default type url for MethodDescriptorProto * @function getTypeUrl - * @memberof google.api.ResourceReference + * @memberof google.protobuf.MethodDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ResourceReference"; + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; }; - return ResourceReference; + return MethodDescriptorProto; })(); - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { + protobuf.FileOptions = (function() { /** - * Properties of a FileDescriptorSet. + * Properties of a FileOptions. * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file + * @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 FileDescriptorSet. + * Constructs a new FileOptions. * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet + * @classdesc Represents a FileOptions. + * @implements IFileOptions * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.IFileOptions=} [properties] Properties to set */ - function FileDescriptorSet(properties) { - this.file = []; + 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) @@ -9333,78 +45680,375 @@ } /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions * @instance */ - FileDescriptorSet.prototype.file = $util.emptyArray; + FileOptions.prototype.javaPackage = ""; /** - * Creates a new FileDescriptorSet instance using the specified properties. + * 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.FileDescriptorSet + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); + FileOptions.create = function create(properties) { + return new FileOptions(properties); }; /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encode = function encode(message, writer) { + FileOptions.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(); + 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 FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. + * Decodes a FileOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileDescriptorSet + * @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.FileDescriptorSet} FileDescriptorSet + * @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 */ - FileDescriptorSet.decode = function decode(reader, length) { + 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.FileDescriptorSet(); + 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: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + 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: @@ -9416,465 +46060,557 @@ }; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * Decodes a FileOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.FileOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @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 */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + FileOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileDescriptorSet message. + * Verifies a FileOptions message. * @function verify - * @memberof google.protobuf.FileDescriptorSet + * @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 */ - FileDescriptorSet.verify = function verify(message) { + FileOptions.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 (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 "file." + 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.FileOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.FileOptions} FileOptions */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) 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]); + 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 FileDescriptorSet message. Also converts values to other types if specified. + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {google.protobuf.FileOptions} message FileOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options) { + FileOptions.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); + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; } - 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"; + 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; } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + 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; }; - - 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 + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions * @instance + * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.name = ""; + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance + * 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 */ - FileDescriptorProto.prototype["package"] = ""; + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance + * 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 */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; + 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() { /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance + * 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 */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + 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]]; + } /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions * @instance */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; + MessageOptions.prototype.messageSetWireFormat = false; /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions * @instance */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; + MessageOptions.prototype.noStandardDescriptorAccessor = false; /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions * @instance */ - FileDescriptorProto.prototype.service = $util.emptyArray; + MessageOptions.prototype.deprecated = false; /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions * @instance */ - FileDescriptorProto.prototype.extension = $util.emptyArray; + MessageOptions.prototype.mapEntry = false; /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions * @instance */ - FileDescriptorProto.prototype.options = null; + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions * @instance */ - FileDescriptorProto.prototype.sourceCodeInfo = null; + MessageOptions.prototype.features = null; /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions * @instance */ - FileDescriptorProto.prototype.syntax = ""; + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions * @instance */ - FileDescriptorProto.prototype.edition = 0; + MessageOptions.prototype[".google.api.resource"] = null; /** - * Creates a new FileDescriptorProto instance using the specified properties. + * Creates a new MessageOptions instance using the specified properties. * @function create - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); }; /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encode = function encode(message, writer) { + MessageOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + if (message.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 FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. + * Decodes a MessageOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileDescriptorProto + * @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.FileDescriptorProto} FileDescriptorProto + * @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 */ - FileDescriptorProto.decode = function decode(reader, length) { + 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.FileDescriptorProto(); + 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.name = reader.string(); + message.messageSetWireFormat = reader.bool(); break; } case 2: { - message["package"] = reader.string(); + message.noStandardDescriptorAccessor = reader.bool(); 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())); + message.deprecated = reader.bool(); break; } case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + message.mapEntry = reader.bool(); break; } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); break; } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } - case 12: { - message.syntax = reader.string(); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } - case 14: { - message.edition = reader.int32(); + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); break; } default: @@ -9886,416 +46622,226 @@ }; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.MessageOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @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 */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + MessageOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileDescriptorProto message. + * Verifies a MessageOptions message. * @function verify - * @memberof google.protobuf.FileDescriptorProto + * @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 */ - FileDescriptorProto.verify = function verify(message) { + MessageOptions.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.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.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 (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 "extension." + error; + return "uninterpretedOption." + 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 (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); if (error) - return "sourceCodeInfo." + error; + return ".google.api.resource." + 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. + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.MessageOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.MessageOptions} MessageOptions */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) 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]); - } + 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.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.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.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; + 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 FileDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {google.protobuf.MessageOptions} message MessageOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorProto.toObject = function toObject(message, options) { + MessageOptions.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.arrays || options.defaults) + object.uninterpretedOption = []; 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]; + 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.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; + 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.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + if (message[".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 FileDescriptorProto to JSON. + * Converts this MessageOptions to JSON. * @function toJSON - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.MessageOptions * @instance * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.toJSON = function toJSON() { + MessageOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FileDescriptorProto + * Gets the default type url for MessageOptions * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.MessageOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.MessageOptions"; }; - return FileDescriptorProto; + return MessageOptions; })(); - protobuf.DescriptorProto = (function() { + protobuf.FieldOptions = (function() { /** - * Properties of a DescriptorProto. + * Properties of a FieldOptions. * @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 + * @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.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference */ /** - * Constructs a new DescriptorProto. + * Constructs a new FieldOptions. * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; + 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) @@ -10303,225 +46849,310 @@ } /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.name = ""; + FieldOptions.prototype.ctype = 0; /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.field = $util.emptyArray; + FieldOptions.prototype.packed = false; /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.extension = $util.emptyArray; + FieldOptions.prototype.jstype = 0; /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.nestedType = $util.emptyArray; + FieldOptions.prototype.lazy = false; /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.enumType = $util.emptyArray; + FieldOptions.prototype.unverifiedLazy = false; /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; + FieldOptions.prototype.deprecated = false; /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; + FieldOptions.prototype.weak = false; /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.options = null; + FieldOptions.prototype.debugRedact = false; /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; + FieldOptions.prototype.retention = 0; /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.reservedName = $util.emptyArray; + FieldOptions.prototype.targets = $util.emptyArray; /** - * Creates a new DescriptorProto instance using the specified properties. + * 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.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = null; + + /** + * 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.DescriptorProto + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); }; /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encode = function encode(message, writer) { + FieldOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + if (message.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) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + 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(); + if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) + $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); return writer; }; /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DescriptorProto message from the specified reader or buffer. + * Decodes a FieldOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.DescriptorProto + * @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.DescriptorProto} DescriptorProto + * @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 */ - DescriptorProto.decode = function decode(reader, length) { + 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.DescriptorProto(); + 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.name = reader.string(); + message.ctype = reader.int32(); break; } case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + message.packed = reader.bool(); break; } case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); break; } case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + 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 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + 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 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.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())); + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.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())); + 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 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); + case 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); break; } default: @@ -10533,586 +47164,579 @@ }; /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @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 */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FieldOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DescriptorProto message. + * Verifies a FieldOptions message. * @function verify - * @memberof google.protobuf.DescriptorProto + * @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 */ - DescriptorProto.verify = function verify(message) { + FieldOptions.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.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; } - } - 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.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.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.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.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 (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 "enumType." + error; + return "editionDefaults." + 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + 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 (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 "oneofDecl." + error; + return "uninterpretedOption." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + 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.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[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { + var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); + if (error) + return ".google.api.fieldInfo." + error; } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; + if (message[".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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FieldOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.FieldOptions} FieldOptions */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) 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]); + 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.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.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.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.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.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.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.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.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.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.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.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[".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.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[".google.api.fieldInfo"] != null) { + if (typeof object[".google.api.fieldInfo"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); } - 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]); + 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 DescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {google.protobuf.FieldOptions} message FieldOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options) { + FieldOptions.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 = []; + object.targets = []; + object.editionDefaults = []; + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; } 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); + 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; + object[".google.api.fieldInfo"] = null; } - 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.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.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.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.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.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.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; + 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); + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) + object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); return object; }; /** - * Converts this DescriptorProto to JSON. + * Converts this FieldOptions to JSON. * @function toJSON - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FieldOptions * @instance * @returns {Object.} JSON object */ - DescriptorProto.prototype.toJSON = function toJSON() { + FieldOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DescriptorProto + * Gets the default type url for FieldOptions * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FieldOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + return typeUrlPrefix + "/google.protobuf.FieldOptions"; }; - 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; - }; + /** + * 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; + })(); - /** - * 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); - }; + /** + * 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; + })(); - /** - * 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"; - }; + /** + * 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; + })(); - return ExtensionRange; + /** + * 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; })(); - DescriptorProto.ReservedRange = (function() { + FieldOptions.EditionDefault = (function() { /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end + * 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 ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set */ - function ReservedRange(properties) { + function EditionDefault(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11120,89 +47744,89 @@ } /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault * @instance */ - ReservedRange.prototype.start = 0; + EditionDefault.prototype.edition = 0; /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault * @instance */ - ReservedRange.prototype.end = 0; + EditionDefault.prototype.value = ""; /** - * Creates a new ReservedRange instance using the specified properties. + * Creates a new EditionDefault instance using the specified properties. * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.FieldOptions.EditionDefault * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); }; /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.FieldOptions.EditionDefault * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @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 */ - ReservedRange.encode = function encode(message, writer) { + EditionDefault.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.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 ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.FieldOptions.EditionDefault * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @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 */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReservedRange message from the specified reader or buffer. + * Decodes an EditionDefault message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @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.DescriptorProto.ReservedRange} ReservedRange + * @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 */ - ReservedRange.decode = function decode(reader, length) { + 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.DescriptorProto.ReservedRange(); + 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 1: { - message.start = reader.int32(); + case 3: { + message.edition = reader.int32(); break; } case 2: { - message.end = reader.int32(); + message.value = reader.string(); break; } default: @@ -11214,139 +47838,200 @@ }; /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.FieldOptions.EditionDefault * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @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 */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { + EditionDefault.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReservedRange message. + * Verifies an EditionDefault message. * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @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 */ - ReservedRange.verify = function verify(message) { + EditionDefault.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.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 a ReservedRange message from a plain object. Also converts values to their respective internal types. + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.FieldOptions.EditionDefault * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) 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; + 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 a ReservedRange message. Also converts values to other types if specified. + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.FieldOptions.EditionDefault * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReservedRange.toObject = function toObject(message, options) { + EditionDefault.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.start = 0; - object.end = 0; + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; + 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 ReservedRange to JSON. + * Converts this EditionDefault to JSON. * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.FieldOptions.EditionDefault * @instance * @returns {Object.} JSON object */ - ReservedRange.prototype.toJSON = function toJSON() { + EditionDefault.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ReservedRange + * Gets the default type url for EditionDefault * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.FieldOptions.EditionDefault * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; }; - return ReservedRange; + return EditionDefault; })(); - return DescriptorProto; + return FieldOptions; })(); - protobuf.ExtensionRangeOptions = (function() { + protobuf.OneofOptions = (function() { /** - * Properties of an ExtensionRangeOptions. + * Properties of an OneofOptions. * @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 + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption */ /** - * Constructs a new ExtensionRangeOptions. + * Constructs a new OneofOptions. * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set */ - function ExtensionRangeOptions(properties) { + function OneofOptions(properties) { this.uninterpretedOption = []; - this.declaration = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11354,68 +48039,333 @@ } /** - * ExtensionRangeOptions uninterpretedOption. + * 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.ExtensionRangeOptions + * @memberof google.protobuf.OneofOptions * @instance */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions + * 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 */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * ExtensionRangeOptions features. + * 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.ExtensionRangeOptions + * @memberof google.protobuf.EnumOptions * @instance */ - ExtensionRangeOptions.prototype.features = null; + EnumOptions.prototype.features = null; /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions * @instance */ - ExtensionRangeOptions.prototype.verification = 1; + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new ExtensionRangeOptions instance using the specified properties. + * Creates a new EnumOptions instance using the specified properties. * @function create - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); }; /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {google.protobuf.IEnumOptions} message EnumOptions 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); + 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 50, wireType 2 =*/402).fork()).ldelim(); + $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(); @@ -11423,54 +48373,56 @@ }; /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * Decodes an EnumOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ExtensionRangeOptions + * @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.ExtensionRangeOptions} ExtensionRangeOptions + * @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 */ - ExtensionRangeOptions.decode = function decode(reader, length) { + 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.ExtensionRangeOptions(); + 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 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 2: { + message.allowAlias = reader.bool(); break; } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + case 3: { + message.deprecated = reader.bool(); break; } - case 50: { + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } - case 3: { - message.verification = reader.int32(); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } default: @@ -11482,32 +48434,46 @@ }; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @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 */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + EnumOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExtensionRangeOptions message. + * Verifies an EnumOptions message. * @function verify - * @memberof google.protobuf.ExtensionRangeOptions + * @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 */ - ExtensionRangeOptions.verify = function verify(message) { + 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"; @@ -11517,115 +48483,72 @@ 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. + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.EnumOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @returns {google.protobuf.EnumOptions} EnumOptions */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); + 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.ExtensionRangeOptions.uninterpretedOption: array expected"); + 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.ExtensionRangeOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.EnumOptions.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. + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {google.protobuf.EnumOptions} message EnumOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRangeOptions.toObject = function toObject(message, options) { + EnumOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; + if (options.arrays || options.defaults) object.uninterpretedOption = []; - } if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; 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.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) { @@ -11637,372 +48560,56 @@ }; /** - * Converts this ExtensionRangeOptions to JSON. + * Converts this EnumOptions to JSON. * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.EnumOptions * @instance * @returns {Object.} JSON object */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { + EnumOptions.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 + * 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 */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; - return ExtensionRangeOptions; + return EnumOptions; })(); - protobuf.FieldDescriptorProto = (function() { + protobuf.EnumValueOptions = (function() { /** - * Properties of a FieldDescriptorProto. + * Properties of an EnumValueOptions. * @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 + * @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 FieldDescriptorProto. + * Constructs a new EnumValueOptions. * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set */ - function FieldDescriptorProto(properties) { + function EnumValueOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12010,215 +48617,435 @@ } /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions * @instance */ - FieldDescriptorProto.prototype.name = ""; + EnumValueOptions.prototype.deprecated = false; /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions * @instance */ - FieldDescriptorProto.prototype.number = 0; + EnumValueOptions.prototype.features = null; /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions * @instance */ - FieldDescriptorProto.prototype.label = 1; + EnumValueOptions.prototype.debugRedact = false; /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions * @instance */ - FieldDescriptorProto.prototype.type = 1; + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * 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 */ - FieldDescriptorProto.prototype.typeName = ""; + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto + * 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 */ - FieldDescriptorProto.prototype.extendee = ""; + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto + * 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 + */ + + /** + * 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 */ - FieldDescriptorProto.prototype.defaultValue = ""; + ServiceOptions.prototype.features = null; /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions * @instance */ - FieldDescriptorProto.prototype.oneofIndex = 0; + ServiceOptions.prototype.deprecated = false; /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions * @instance */ - FieldDescriptorProto.prototype.jsonName = ""; + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions * @instance */ - FieldDescriptorProto.prototype.options = null; + ServiceOptions.prototype[".google.api.defaultHost"] = ""; /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions * @instance */ - FieldDescriptorProto.prototype.proto3Optional = false; + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; /** - * Creates a new FieldDescriptorProto instance using the specified properties. + * Creates a new ServiceOptions instance using the specified properties. * @function create - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); }; /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encode = function encode(message, writer) { + ServiceOptions.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); + 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"]); return writer; }; /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * Decodes a ServiceOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldDescriptorProto + * @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.FieldDescriptorProto} FieldDescriptorProto + * @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 */ - FieldDescriptorProto.decode = function decode(reader, length) { + 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.FieldDescriptorProto(); + 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 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(); + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } - case 9: { - message.oneofIndex = reader.int32(); + case 33: { + message.deprecated = reader.bool(); break; } - case 10: { - message.jsonName = reader.string(); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + case 1049: { + message[".google.api.defaultHost"] = reader.string(); break; } - case 17: { - message.proto3Optional = reader.bool(); + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); break; } default: @@ -12230,394 +49057,186 @@ }; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @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 */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldDescriptorProto message. + * Verifies a ServiceOptions message. * @function verify - * @memberof google.protobuf.FieldDescriptorProto + * @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 */ - FieldDescriptorProto.verify = function verify(message) { + ServiceOptions.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 (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); if (error) - return "options." + error; + return "features." + error; } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; + 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"; return null; }; /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) 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; + 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); } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; + 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]); } - 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); + 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"]); return message; }; /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {google.protobuf.ServiceOptions} message ServiceOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldDescriptorProto.toObject = function toObject(message, options) { + ServiceOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; 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; + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; } - 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; + 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"]; return object; }; /** - * Converts this FieldDescriptorProto to JSON. + * Converts this ServiceOptions to JSON. * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.ServiceOptions * @instance * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { + ServiceOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FieldDescriptorProto + * Gets the default type url for ServiceOptions * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; }; - /** - * 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; + return ServiceOptions; })(); - protobuf.OneofDescriptorProto = (function() { + protobuf.MethodOptions = (function() { /** - * Properties of an OneofDescriptorProto. + * Properties of a MethodOptions. * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + * @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 OneofDescriptorProto. + * Constructs a new MethodOptions. * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set */ - function OneofDescriptorProto(properties) { + 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) @@ -12625,89 +49244,165 @@ } /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions * @instance */ - OneofDescriptorProto.prototype.name = ""; + MethodOptions.prototype.deprecated = false; /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions * @instance */ - OneofDescriptorProto.prototype.options = null; + MethodOptions.prototype.idempotencyLevel = 0; /** - * Creates a new OneofDescriptorProto instance using the specified properties. + * 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.OneofDescriptorProto + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); }; /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofDescriptorProto.encode = function encode(message, writer) { + MethodOptions.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(); + 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 OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * Decodes a MethodOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.OneofDescriptorProto + * @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.OneofDescriptorProto} OneofDescriptorProto + * @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 */ - OneofDescriptorProto.decode = function decode(reader, length) { + 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.OneofDescriptorProto(); + 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 1: { - message.name = reader.string(); + case 33: { + message.deprecated = reader.bool(); break; } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + 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: @@ -12719,143 +49414,264 @@ }; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @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 */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + MethodOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OneofDescriptorProto message. + * Verifies a MethodOptions message. * @function verify - * @memberof google.protobuf.OneofDescriptorProto + * @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 */ - OneofDescriptorProto.verify = function verify(message) { + MethodOptions.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 (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 "options." + 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 an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @returns {google.protobuf.MethodOptions} MethodOptions */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) 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); + 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 an OneofDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {google.protobuf.MethodOptions} message MethodOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofDescriptorProto.toObject = function toObject(message, options) { + 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.name = ""; - object.options = null; + 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.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); + 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 OneofDescriptorProto to JSON. + * Converts this MethodOptions to JSON. * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.MethodOptions * @instance * @returns {Object.} JSON object */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { + MethodOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OneofDescriptorProto + * Gets the default type url for MethodOptions * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.MethodOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.MethodOptions"; }; - return OneofDescriptorProto; + /** + * 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.EnumDescriptorProto = (function() { + protobuf.UninterpretedOption = (function() { /** - * Properties of an EnumDescriptorProto. + * Properties of an UninterpretedOption. * @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 + * @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 EnumDescriptorProto. + * Constructs a new UninterpretedOption. * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; + function UninterpretedOption(properties) { + this.name = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12863,140 +49679,162 @@ } /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption * @instance */ - EnumDescriptorProto.prototype.name = ""; + UninterpretedOption.prototype.name = $util.emptyArray; /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - EnumDescriptorProto.prototype.value = $util.emptyArray; + UninterpretedOption.prototype.identifierValue = ""; /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - EnumDescriptorProto.prototype.options = null; + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + UninterpretedOption.prototype.doubleValue = 0; /** - * Creates a new EnumDescriptorProto instance using the specified properties. + * 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.EnumDescriptorProto + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); }; /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encode = function encode(message, writer) { + UninterpretedOption.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + if (message.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 EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * Decodes an UninterpretedOption message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumDescriptorProto + * @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.EnumDescriptorProto} EnumDescriptorProto + * @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 */ - EnumDescriptorProto.decode = function decode(reader, length) { + 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.EnumDescriptorProto(); + 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 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())); + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); break; } case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + message.identifierValue = reader.string(); break; } case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + message.positiveIntValue = reader.uint64(); break; } case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); + 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: @@ -13008,206 +49846,224 @@ }; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @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 */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumDescriptorProto message. + * Verifies an UninterpretedOption message. * @function verify - * @memberof google.protobuf.EnumDescriptorProto + * @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 */ - EnumDescriptorProto.verify = function verify(message) { + UninterpretedOption.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 (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 "reservedRange." + error; + return "name." + error; } } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } + if (message.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 EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) 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]); + 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.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]); - } + 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 EnumDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumDescriptorProto.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } + if (options.arrays || options.defaults) + object.name = []; 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); + 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.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; + 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 EnumDescriptorProto to JSON. + * Converts this UninterpretedOption to JSON. * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.UninterpretedOption * @instance * @returns {Object.} JSON object */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { + UninterpretedOption.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumDescriptorProto + * Gets the default type url for UninterpretedOption * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.UninterpretedOption * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; }; - EnumDescriptorProto.EnumReservedRange = (function() { + UninterpretedOption.NamePart = (function() { /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension */ /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set */ - function EnumReservedRange(properties) { + function NamePart(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13215,89 +50071,87 @@ } /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart * @instance */ - EnumReservedRange.prototype.start = 0; + NamePart.prototype.namePart = ""; /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart * @instance */ - EnumReservedRange.prototype.end = 0; + NamePart.prototype.isExtension = false; /** - * Creates a new EnumReservedRange instance using the specified properties. + * Creates a new NamePart instance using the specified properties. * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); + NamePart.create = function create(properties) { + return new NamePart(properties); }; /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @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 */ - EnumReservedRange.encode = function encode(message, writer) { + NamePart.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); + 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 EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @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 */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + NamePart.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumReservedRange message from the specified reader or buffer. + * Decodes a NamePart message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @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.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @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 */ - EnumReservedRange.decode = function decode(reader, length) { + 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.EnumDescriptorProto.EnumReservedRange(); + 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.start = reader.int32(); + message.namePart = reader.string(); break; } case 2: { - message.end = reader.int32(); + message.isExtension = reader.bool(); break; } default: @@ -13305,396 +50159,145 @@ 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 an EnumReservedRange message from the specified reader or buffer, length delimited. + * Decodes a NamePart message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @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 - */ - 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()); - }; + * @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 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; - }; + /** + * 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 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) + /** + * 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; - 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 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); + }; - /** - * 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 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"; + }; - /** - * 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 NamePart; + })(); - return EnumValueDescriptorProto; + return UninterpretedOption; })(); - protobuf.ServiceDescriptorProto = (function() { + protobuf.FeatureSet = (function() { /** - * Properties of a ServiceDescriptorProto. + * Properties of a FeatureSet. * @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 + * @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 ServiceDescriptorProto. + * Constructs a new FeatureSet. * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set */ - function ServiceDescriptorProto(properties) { - this.method = []; + function FeatureSet(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13702,106 +50305,145 @@ } /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet * @instance */ - ServiceDescriptorProto.prototype.name = ""; + FeatureSet.prototype.fieldPresence = 0; /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet * @instance */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; + FeatureSet.prototype.enumType = 0; /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet * @instance */ - ServiceDescriptorProto.prototype.options = null; + FeatureSet.prototype.repeatedFieldEncoding = 0; /** - * Creates a new ServiceDescriptorProto instance using the specified properties. + * 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.ServiceDescriptorProto + * @memberof google.protobuf.FeatureSet * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); }; /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. * @function encode - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FeatureSet * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encode = function encode(message, writer) { + FeatureSet.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(); + 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 ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FeatureSet * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * Decodes a FeatureSet message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ServiceDescriptorProto + * @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.ServiceDescriptorProto} ServiceDescriptorProto + * @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 */ - ServiceDescriptorProto.decode = function decode(reader, length) { + 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.ServiceDescriptorProto(); + 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.name = reader.string(); + message.fieldPresence = reader.int32(); break; } case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + message.enumType = reader.int32(); break; } case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + 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: @@ -13813,313 +50455,520 @@ }; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FeatureSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @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 */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FeatureSet.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceDescriptorProto message. + * Verifies a FeatureSet message. * @function verify - * @memberof google.protobuf.ServiceDescriptorProto + * @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 */ - ServiceDescriptorProto.verify = function verify(message) { + FeatureSet.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.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; } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; + 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; } - 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]); + 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; } - 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); + 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 ServiceDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FeatureSet * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {google.protobuf.FeatureSet} message FeatureSet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceDescriptorProto.toObject = function toObject(message, options) { + FeatureSet.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); + 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.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + 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 ServiceDescriptorProto to JSON. + * Converts this FeatureSet to JSON. * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FeatureSet * @instance * @returns {Object.} JSON object */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { + FeatureSet.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ServiceDescriptorProto + * Gets the default type url for FeatureSet * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FeatureSet * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.FeatureSet"; }; - return ServiceDescriptorProto; - })(); + /** + * 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; + })(); - protobuf.MethodDescriptorProto = (function() { + /** + * 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; + })(); /** - * 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 + * 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; + })(); /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * 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 */ - 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]]; - } + 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; + })(); /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance + * 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 */ - MethodDescriptorProto.prototype.name = ""; + 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; + })(); /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance + * 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 */ - MethodDescriptorProto.prototype.inputType = ""; + 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() { /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance + * 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 */ - MethodDescriptorProto.prototype.outputType = ""; /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto + * 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 */ - MethodDescriptorProto.prototype.options = null; + FeatureSetDefaults.prototype.defaults = $util.emptyArray; /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults * @instance */ - MethodDescriptorProto.prototype.clientStreaming = false; + FeatureSetDefaults.prototype.minimumEdition = 0; /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults * @instance */ - MethodDescriptorProto.prototype.serverStreaming = false; + FeatureSetDefaults.prototype.maximumEdition = 0; /** - * Creates a new MethodDescriptorProto instance using the specified properties. + * Creates a new FeatureSetDefaults instance using the specified properties. * @function create - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); }; /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. * @function encode - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encode = function encode(message, writer) { + FeatureSetDefaults.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); + 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 MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * Decodes a FeatureSetDefaults message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MethodDescriptorProto + * @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.MethodDescriptorProto} MethodDescriptorProto + * @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 */ - MethodDescriptorProto.decode = function decode(reader, length) { + 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.MethodDescriptorProto(); + 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: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); break; } case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + message.minimumEdition = reader.int32(); break; } case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); + message.maximumEdition = reader.int32(); break; } default: @@ -14131,567 +50980,661 @@ }; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FeatureSetDefaults * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @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 */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodDescriptorProto message. + * Verifies a FeatureSetDefaults message. * @function verify - * @memberof google.protobuf.MethodDescriptorProto + * @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 */ - MethodDescriptorProto.verify = function verify(message) { + FeatureSetDefaults.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.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.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"; + 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FeatureSetDefaults * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) 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); + 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; } - 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. + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodDescriptorProto.toObject = function toObject(message, options) { + FeatureSetDefaults.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - 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; + 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 MethodDescriptorProto to JSON. + * Converts this FeatureSetDefaults to JSON. * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FeatureSetDefaults * @instance * @returns {Object.} JSON object */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { + FeatureSetDefaults.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MethodDescriptorProto + * Gets the default type url for FeatureSetDefaults * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FeatureSetDefaults * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; }; - 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; + FeatureSetDefaults.FeatureSetEditionDefault = (function() { - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; + /** + * 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 + */ - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; + /** + * 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]]; + } - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; + /** + * 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); + }; - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; + /** + * 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; + }; - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; + /** + * 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(); + }; - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; + /** + * 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; + }; - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; + /** + * 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()); + }; - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; + /** + * 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; + }; - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; + /** + * 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; + }; - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; + /** + * 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; + }; - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; + /** + * 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); + }; - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; + /** + * 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"; + }; - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; + return FeatureSetEditionDefault; + })(); - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location */ - FileOptions.prototype.features = null; /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; + 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]]; + } /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo * @instance */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + SourceCodeInfo.prototype.location = $util.emptyArray; /** - * Creates a new FileOptions instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @function create - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); }; /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encode = function encode(message, writer) { + SourceCodeInfo.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(); + 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 FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileOptions message from the specified reader or buffer. + * Decodes a SourceCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileOptions + * @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.FileOptions} FileOptions + * @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 */ - FileOptions.decode = function decode(reader, length) { + 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.FileOptions(); + 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: { - 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())); + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); break; } default: @@ -14703,787 +51646,1087 @@ }; /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions + * @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 */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileOptions message. + * Verifies a SourceCodeInfo message. * @function verify - * @memberof google.protobuf.FileOptions + * @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 */ - FileOptions.verify = function verify(message) { + SourceCodeInfo.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 (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 ".google.api.resourceDefinition." + error; + return "location." + error; } } return null; }; /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) 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]); + 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 FileOptions message. Also converts values to other types if specified. + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.FileOptions} message FileOptions + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileOptions.toObject = function toObject(message, options) { + SourceCodeInfo.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); + 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 FileOptions to JSON. + * Converts this SourceCodeInfo to JSON. * @function toJSON - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.SourceCodeInfo * @instance * @returns {Object.} JSON object */ - FileOptions.prototype.toJSON = function toJSON() { + SourceCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FileOptions + * Gets the default type url for SourceCodeInfo * @function getTypeUrl - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.SourceCodeInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FileOptions"; + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; }; - /** - * 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; - })(); + SourceCodeInfo.Location = (function() { - return FileOptions; - })(); + /** + * 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 + */ - protobuf.MessageOptions = (function() { + /** + * 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]]; + } - /** - * 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 - */ + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; - /** - * 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]]; - } + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; + /** + * 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"; + }; - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; + return Location; + })(); - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation */ - MessageOptions.prototype.features = null; /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + 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]]; + } /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo * @instance */ - MessageOptions.prototype[".google.api.resource"] = null; + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; /** - * Creates a new MessageOptions instance using the specified properties. + * Creates a new GeneratedCodeInfo instance using the specified properties. * @function create - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); }; /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encode = function encode(message, writer) { + GeneratedCodeInfo.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(); + 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 MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MessageOptions message from the specified reader or buffer. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MessageOptions + * @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.MessageOptions} MessageOptions + * @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 */ - MessageOptions.decode = function decode(reader, length) { + 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.MessageOptions(); + 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: { - 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(); + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); break; } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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; } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + } + 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; } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + 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; } - default: - reader.skipType(tag & 7); + 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; - }; - - /** - * 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()); - }; + return message; + }; - /** - * 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; + /** + * 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[".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 (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; } - } - 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; - }; + 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; + }; - /** - * 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 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); + }; - /** - * 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 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"; + }; - /** - * 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"; - }; + /** + * 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 MessageOptions; + return Annotation; + })(); + + return GeneratedCodeInfo; })(); - protobuf.FieldOptions = (function() { + protobuf.Duration = (function() { /** - * Properties of a FieldOptions. + * Properties of a Duration. * @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 + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos */ /** - * Constructs a new FieldOptions. + * Constructs a new Duration. * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions + * @classdesc Represents a Duration. + * @implements IDuration * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @param {google.protobuf.IDuration=} [properties] Properties to set */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; + function Duration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15491,296 +52734,89 @@ } /** - * 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 + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration * @instance */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration * @instance */ - FieldOptions.prototype[".google.api.resourceReference"] = null; + Duration.prototype.nanos = 0; /** - * Creates a new FieldOptions instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @function create - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); + Duration.create = function create(properties) { + return new Duration(properties); }; /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encode = function encode(message, writer) { + Duration.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) { - writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.int32(message[".google.api.fieldBehavior"][i]); - writer.ldelim(); - } - 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(); + 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 FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + Duration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldOptions message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldOptions + * @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.FieldOptions} FieldOptions + * @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 */ - FieldOptions.decode = function decode(reader, length) { + 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.FieldOptions(); + 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.ctype = reader.int32(); + message.seconds = reader.int64(); 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()); + message.nanos = reader.int32(); break; } default: @@ -15792,861 +52828,387 @@ }; /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions + * @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 */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { + Duration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldOptions message. + * Verifies a Duration message. * @function verify - * @memberof google.protobuf.FieldOptions + * @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 */ - FieldOptions.verify = function verify(message) { + Duration.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; - } + 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.Duration * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.Duration} Duration */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) 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"]); - } + 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 FieldOptions message. Also converts values to other types if specified. + * Creates a plain object from a Duration message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {google.protobuf.Duration} message Duration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldOptions.toObject = function toObject(message, options) { + Duration.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 ($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[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + 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 FieldOptions to JSON. + * Converts this Duration to JSON. * @function toJSON - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.Duration * @instance * @returns {Object.} JSON object */ - FieldOptions.prototype.toJSON = function toJSON() { + Duration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FieldOptions + * Gets the default type url for Duration * @function getTypeUrl - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.Duration * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; + return typeUrlPrefix + "/google.protobuf.Duration"; }; + return Duration; + })(); + + protobuf.Timestamp = (function() { + /** - * 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 + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos */ - 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 + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ - 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; - })(); + 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]]; + } /** - * 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 + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance */ - 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; - })(); + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * 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 + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance */ - 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 = ""; + Timestamp.prototype.nanos = 0; - /** - * 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); - }; + /** + * 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 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 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 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(); - }; + /** + * 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 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); + /** + * 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; } - } - 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: + case 2: { + message.nanos = reader.int32(); 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; + reader.skipType(tag & 7); break; } - if (object.value != null) - message.value = String(object.value); - return message; - }; + } + 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; + /** + * 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; + }; - /** - * 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); - }; + /** + * 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; + }; - /** - * 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"; - }; + /** + * 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); + }; - return EditionDefault; - })(); + /** + * 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 FieldOptions; + return Timestamp; })(); - protobuf.OneofOptions = (function() { + protobuf.Any = (function() { /** - * Properties of an OneofOptions. + * Properties of an Any. * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value */ /** - * Constructs a new OneofOptions. + * Constructs a new Any. * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions + * @classdesc Represents an Any. + * @implements IAny * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @param {google.protobuf.IAny=} [properties] Properties to set */ - function OneofOptions(properties) { - this.uninterpretedOption = []; + function Any(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16654,92 +53216,89 @@ } /** - * OneofOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.OneofOptions + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any * @instance */ - OneofOptions.prototype.features = null; + Any.prototype.type_url = ""; /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any * @instance */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + Any.prototype.value = $util.newBuffer([]); /** - * Creates a new OneofOptions instance using the specified properties. + * Creates a new Any instance using the specified properties. * @function create - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); + Any.create = function create(properties) { + return new Any(properties); }; /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encode - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofOptions.encode = function encode(message, writer) { + Any.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(); + 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 OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + Any.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OneofOptions message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.OneofOptions + * @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.OneofOptions} OneofOptions + * @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 */ - OneofOptions.decode = function decode(reader, length) { + 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.OneofOptions(); + 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.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + message.type_url = reader.string(); break; } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 2: { + message.value = reader.bytes(); break; } default: @@ -16751,158 +53310,141 @@ }; /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions + * @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 */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { + Any.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OneofOptions message. + * Verifies an Any message. * @function verify - * @memberof google.protobuf.OneofOptions + * @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 */ - OneofOptions.verify = function verify(message) { + Any.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; - } - } + 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions + * @returns {google.protobuf.Any} Any */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) 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]); - } - } + 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 OneofOptions message. Also converts values to other types if specified. + * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofOptions.toObject = function toObject(message, options) { + Any.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); + 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 OneofOptions to JSON. + * Converts this Any to JSON. * @function toJSON - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.Any * @instance * @returns {Object.} JSON object */ - OneofOptions.prototype.toJSON = function toJSON() { + Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OneofOptions + * Gets the default type url for Any * @function getTypeUrl - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.Any * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; + return typeUrlPrefix + "/google.protobuf.Any"; }; - return OneofOptions; + return Any; })(); - protobuf.EnumOptions = (function() { + protobuf.FieldMask = (function() { /** - * Properties of an EnumOptions. + * Properties of a FieldMask. * @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 + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths */ /** - * Constructs a new EnumOptions. + * Constructs a new FieldMask. * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions + * @classdesc Represents a FieldMask. + * @implements IFieldMask * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.IFieldMask=} [properties] Properties to set */ - function EnumOptions(properties) { - this.uninterpretedOption = []; + function FieldMask(properties) { + this.paths = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16910,134 +53452,78 @@ } /** - * 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 + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask * @instance */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + FieldMask.prototype.paths = $util.emptyArray; /** - * Creates a new EnumOptions instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @function create - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); + FieldMask.create = function create(properties) { + return new FieldMask(properties); }; /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encode = function encode(message, writer) { + FieldMask.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(); + 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 EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumOptions message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumOptions + * @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.EnumOptions} EnumOptions + * @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 */ - EnumOptions.decode = function decode(reader, length) { + 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.EnumOptions(); + 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 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())); + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); break; } default: @@ -17049,305 +53535,197 @@ }; /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions + * @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 */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { + FieldMask.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumOptions message. + * Verifies a FieldMask message. * @function verify - * @memberof google.protobuf.EnumOptions + * @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 */ - EnumOptions.verify = function verify(message) { + FieldMask.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; - } + 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 an EnumOptions message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldMask * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.FieldMask} FieldMask */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) 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]); - } + 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 an EnumOptions message. Also converts values to other types if specified. + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {google.protobuf.FieldMask} message FieldMask * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumOptions.toObject = function toObject(message, options) { + FieldMask.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); + 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 EnumOptions to JSON. + * Converts this FieldMask to JSON. * @function toJSON - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldMask * @instance * @returns {Object.} JSON object */ - EnumOptions.prototype.toJSON = function toJSON() { + FieldMask.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumOptions + * Gets the default type url for FieldMask * @function getTypeUrl - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldMask * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; + return typeUrlPrefix + "/google.protobuf.FieldMask"; }; - return EnumOptions; + return FieldMask; })(); - protobuf.EnumValueOptions = (function() { + protobuf.Empty = (function() { /** - * Properties of an EnumValueOptions. + * Properties of an Empty. * @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 + * @interface IEmpty */ /** - * Constructs a new EnumValueOptions. + * Constructs a new Empty. * @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 + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + 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 EnumValueOptions instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @function create - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); + Empty.create = function create(properties) { + return new Empty(properties); }; /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer) { + Empty.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. + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + Empty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumValueOptions + * @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.EnumValueOptions} EnumValueOptions + * @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 */ - EnumValueOptions.decode = function decode(reader, length) { + 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.EnumValueOptions(); + 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) { - 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; @@ -17357,175 +53735,109 @@ }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @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 */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + Empty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumValueOptions message. + * Verifies an Empty message. * @function verify - * @memberof google.protobuf.EnumValueOptions + * @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 */ - EnumValueOptions.verify = function verify(message) { + Empty.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. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Empty * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.Empty} Empty */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) 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; + return new $root.google.protobuf.Empty(); }; /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * Creates a plain object from an Empty message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {google.protobuf.Empty} message Empty * @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; + Empty.toObject = function toObject() { + return {}; }; /** - * Converts this EnumValueOptions to JSON. + * Converts this Empty to JSON. * @function toJSON - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Empty * @instance * @returns {Object.} JSON object */ - EnumValueOptions.prototype.toJSON = function toJSON() { + Empty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumValueOptions + * Gets the default type url for Empty * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Empty * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + return typeUrlPrefix + "/google.protobuf.Empty"; }; - return EnumValueOptions; + return Empty; })(); - protobuf.ServiceOptions = (function() { + protobuf.DoubleValue = (function() { /** - * Properties of a ServiceOptions. + * Properties of a DoubleValue. * @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 + * @interface IDoubleValue + * @property {number|null} [value] DoubleValue value */ /** - * Constructs a new ServiceOptions. + * Constructs a new DoubleValue. * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions + * @classdesc Represents a DoubleValue. + * @implements IDoubleValue * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; + function DoubleValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17533,134 +53845,75 @@ } /** - * 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 + * DoubleValue value. + * @member {number} value + * @memberof google.protobuf.DoubleValue * @instance */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + DoubleValue.prototype.value = 0; /** - * Creates a new ServiceOptions instance using the specified properties. + * Creates a new DoubleValue instance using the specified properties. * @function create - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.DoubleValue * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * @returns {google.protobuf.DoubleValue} DoubleValue instance */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); + DoubleValue.create = function create(properties) { + return new DoubleValue(properties); }; /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.DoubleValue * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer) { + DoubleValue.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.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); return writer; }; /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.DoubleValue * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceOptions message from the specified reader or buffer. + * Decodes a DoubleValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.DoubleValue * @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 + * @returns {google.protobuf.DoubleValue} DoubleValue * @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) { + DoubleValue.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DoubleValue(); 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(); + case 1: { + message.value = reader.double(); break; } default: @@ -17672,352 +53925,198 @@ }; /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.DoubleValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.DoubleValue} DoubleValue * @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) { + DoubleValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceOptions message. + * Verifies a DoubleValue message. * @function verify - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.DoubleValue * @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) { + DoubleValue.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.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; return null; }; /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.DoubleValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.DoubleValue} DoubleValue */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) + DoubleValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DoubleValue) 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"]); + var message = new $root.google.protobuf.DoubleValue(); + if (object.value != null) + message.value = Number(object.value); return message; }; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.DoubleValue * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {google.protobuf.DoubleValue} message DoubleValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + DoubleValue.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"] = ""; - } - 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 (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; }; /** - * Converts this ServiceOptions to JSON. + * Converts this DoubleValue to JSON. * @function toJSON - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.DoubleValue * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { + DoubleValue.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 + * Gets the default type url for DoubleValue + * @function getTypeUrl + * @memberof google.protobuf.DoubleValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DoubleValue"; + }; + + return DoubleValue; + })(); + + protobuf.FloatValue = (function() { /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance + * Properties of a FloatValue. + * @memberof google.protobuf + * @interface IFloatValue + * @property {number|null} [value] FloatValue value */ - MethodOptions.prototype[".google.api.http"] = null; /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance + * Constructs a new FloatValue. + * @memberof google.protobuf + * @classdesc Represents a FloatValue. + * @implements IFloatValue + * @constructor + * @param {google.protobuf.IFloatValue=} [properties] Properties to set */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + function FloatValue(properties) { + if (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 .google.longrunning.operationInfo. - * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo - * @memberof google.protobuf.MethodOptions + * FloatValue value. + * @member {number} value + * @memberof google.protobuf.FloatValue * @instance */ - MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + FloatValue.prototype.value = 0; /** - * Creates a new MethodOptions instance using the specified properties. + * Creates a new FloatValue instance using the specified properties. * @function create - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @returns {google.protobuf.FloatValue} FloatValue instance */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); + FloatValue.create = function create(properties) { + return new FloatValue(properties); }; /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer) { + FloatValue.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(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); return writer; }; /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + FloatValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodOptions message from the specified reader or buffer. + * Decodes a FloatValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @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 + * @returns {google.protobuf.FloatValue} FloatValue * @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) { + FloatValue.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FloatValue(); 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()); + case 1: { + message.value = reader.float(); break; } default: @@ -18029,264 +54128,122 @@ }; /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * Decodes a FloatValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.FloatValue} FloatValue * @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) { + FloatValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodOptions message. + * Verifies a FloatValue message. * @function verify - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @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) { + FloatValue.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; - } + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; return null; }; /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.FloatValue} FloatValue */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) + FloatValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FloatValue) 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"]); - } + var message = new $root.google.protobuf.FloatValue(); + if (object.value != null) + message.value = Number(object.value); return message; }; /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @static - * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {google.protobuf.FloatValue} message FloatValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + FloatValue.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); + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; }; /** - * Converts this MethodOptions to JSON. + * Converts this FloatValue to JSON. * @function toJSON - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @instance * @returns {Object.} JSON object */ - MethodOptions.prototype.toJSON = function toJSON() { + FloatValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MethodOptions + * Gets the default type url for FloatValue * @function getTypeUrl - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; + return typeUrlPrefix + "/google.protobuf.FloatValue"; }; - /** - * 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; + return FloatValue; })(); - protobuf.UninterpretedOption = (function() { + protobuf.Int64Value = (function() { /** - * Properties of an UninterpretedOption. + * Properties of an Int64Value. * @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 + * @interface IInt64Value + * @property {number|Long|null} [value] Int64Value value */ /** - * Constructs a new UninterpretedOption. + * Constructs a new Int64Value. * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption + * @classdesc Represents an Int64Value. + * @implements IInt64Value * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.IInt64Value=} [properties] Properties to set */ - function UninterpretedOption(properties) { - this.name = []; + function Int64Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18294,162 +54251,75 @@ } /** - * 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 + * Int64Value value. + * @member {number|Long} value + * @memberof google.protobuf.Int64Value * @instance */ - UninterpretedOption.prototype.aggregateValue = ""; + Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new UninterpretedOption instance using the specified properties. + * Creates a new Int64Value instance using the specified properties. * @function create - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + * @returns {google.protobuf.Int64Value} Int64Value instance */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); + Int64Value.create = function create(properties) { + return new Int64Value(properties); }; /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. * @function encode - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encode = function encode(message, writer) { + Int64Value.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); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); return writer; }; /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + Int64Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * Decodes an Int64Value message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @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 + * @returns {google.protobuf.Int64Value} Int64Value * @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) { + Int64Value.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int64Value(); 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(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int64(); break; } default: @@ -18461,458 +54331,136 @@ }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes an Int64Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.Int64Value} Int64Value * @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) { + Int64Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UninterpretedOption message. + * Verifies an Int64Value message. * @function verify - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @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) { + Int64Value.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"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; return null; }; /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.Int64Value} Int64Value */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) + Int64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int64Value) 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) + var message = new $root.google.protobuf.Int64Value(); + if (object.value != 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); + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {google.protobuf.Int64Value} message Int64Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + Int64Value.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 (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.value = 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; + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; 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; + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; return object; }; /** - * Converts this UninterpretedOption to JSON. + * Converts this Int64Value to JSON. * @function toJSON - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @instance * @returns {Object.} JSON object */ - UninterpretedOption.prototype.toJSON = function toJSON() { + Int64Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UninterpretedOption + * Gets the default type url for Int64Value * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + return typeUrlPrefix + "/google.protobuf.Int64Value"; }; - 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; + return Int64Value; })(); - protobuf.FeatureSet = (function() { + protobuf.UInt64Value = (function() { /** - * Properties of a FeatureSet. + * Properties of a UInt64Value. * @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 + * @interface IUInt64Value + * @property {number|Long|null} [value] UInt64Value value */ /** - * Constructs a new FeatureSet. + * Constructs a new UInt64Value. * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet + * @classdesc Represents a UInt64Value. + * @implements IUInt64Value * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set */ - function FeatureSet(properties) { + function UInt64Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18920,145 +54468,75 @@ } /** - * 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 + * UInt64Value value. + * @member {number|Long} value + * @memberof google.protobuf.UInt64Value * @instance */ - FeatureSet.prototype.jsonFormat = 0; + UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * Creates a new FeatureSet instance using the specified properties. + * Creates a new UInt64Value instance using the specified properties. * @function create - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @returns {google.protobuf.UInt64Value} UInt64Value instance */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); + UInt64Value.create = function create(properties) { + return new UInt64Value(properties); }; /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. * @function encode - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @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); + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); return writer; }; /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FeatureSet message from the specified reader or buffer. + * Decodes a UInt64Value message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @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 + * @returns {google.protobuf.UInt64Value} UInt64Value * @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) { + UInt64Value.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt64Value(); 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(); + message.value = reader.uint64(); break; } default: @@ -19070,413 +54548,339 @@ }; /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet + * @returns {google.protobuf.UInt64Value} UInt64Value * @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) { + UInt64Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FeatureSet message. + * Verifies a UInt64Value message. * @function verify - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @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) { + UInt64Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; return null; }; /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet + * @returns {google.protobuf.UInt64Value} UInt64Value */ - FeatureSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet) + UInt64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt64Value) 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; - } + var message = new $root.google.protobuf.UInt64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = true; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); return message; }; /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @static - * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {google.protobuf.UInt64Value} message UInt64Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSet.toObject = function toObject(message, options) { + UInt64Value.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; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; return object; }; /** - * Converts this FeatureSet to JSON. + * Converts this UInt64Value to JSON. * @function toJSON - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @instance * @returns {Object.} JSON object */ - FeatureSet.prototype.toJSON = function toJSON() { + UInt64Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FeatureSet + * Gets the default type url for UInt64Value * @function getTypeUrl - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; + return typeUrlPrefix + "/google.protobuf.UInt64Value"; }; + return UInt64Value; + })(); + + protobuf.Int32Value = (function() { + /** - * 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 + * Properties of an Int32Value. + * @memberof google.protobuf + * @interface IInt32Value + * @property {number|null} [value] Int32Value 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 + * Constructs a new Int32Value. + * @memberof google.protobuf + * @classdesc Represents an Int32Value. + * @implements IInt32Value + * @constructor + * @param {google.protobuf.IInt32Value=} [properties] Properties to set */ - 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; - })(); + function Int32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * 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 + * Int32Value value. + * @member {number} value + * @memberof google.protobuf.Int32Value + * @instance */ - 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; - })(); + Int32Value.prototype.value = 0; /** - * 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 + * Creates a new Int32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @returns {google.protobuf.Int32Value} Int32Value instance + */ + Int32Value.create = function create(properties) { + return new Int32Value(properties); + }; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); + return writer; + }; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decode = function 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.Int32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int32Value message. + * @function verify + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int32Value} Int32Value + */ + Int32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int32Value) + return object; + var message = new $root.google.protobuf.Int32Value(); + if (object.value != null) + message.value = object.value | 0; + return message; + }; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.Int32Value} message Int32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - 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; - })(); + Int32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; /** - * 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 + * Converts this Int32Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int32Value + * @instance + * @returns {Object.} JSON object */ - 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; - })(); + Int32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * 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 + * Gets the default type url for Int32Value + * @function getTypeUrl + * @memberof google.protobuf.Int32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - 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; - })(); + Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int32Value"; + }; - return FeatureSet; + return Int32Value; })(); - protobuf.FeatureSetDefaults = (function() { + protobuf.UInt32Value = (function() { /** - * Properties of a FeatureSetDefaults. + * Properties of a UInt32Value. * @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 + * @interface IUInt32Value + * @property {number|null} [value] UInt32Value value */ /** - * Constructs a new FeatureSetDefaults. + * Constructs a new UInt32Value. * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults + * @classdesc Represents a UInt32Value. + * @implements IUInt32Value * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set */ - function FeatureSetDefaults(properties) { - this.defaults = []; + function UInt32Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19484,106 +54888,75 @@ } /** - * 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 + * UInt32Value value. + * @member {number} value + * @memberof google.protobuf.UInt32Value * @instance */ - FeatureSetDefaults.prototype.maximumEdition = 0; + UInt32Value.prototype.value = 0; /** - * Creates a new FeatureSetDefaults instance using the specified properties. + * Creates a new UInt32Value instance using the specified properties. * @function create - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.UInt32Value * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * @returns {google.protobuf.UInt32Value} UInt32Value instance */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); + UInt32Value.create = function create(properties) { + return new UInt32Value(properties); }; /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. * @function encode - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.UInt32Value * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSetDefaults.encode = function encode(message, writer) { + UInt32Value.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); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); return writer; }; /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.UInt32Value * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * Decodes a UInt32Value message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.UInt32Value * @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 + * @returns {google.protobuf.UInt32Value} UInt32Value * @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) { + UInt32Value.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt32Value(); 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(); + message.value = reader.uint32(); break; } default: @@ -19595,582 +54968,325 @@ }; /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.UInt32Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @returns {google.protobuf.UInt32Value} UInt32Value * @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) { + UInt32Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FeatureSetDefaults message. + * Verifies a UInt32Value message. * @function verify - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.UInt32Value * @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) { + UInt32Value.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; - } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; return null; }; /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.UInt32Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @returns {google.protobuf.UInt32Value} UInt32Value */ - FeatureSetDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) + UInt32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt32Value) 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; + var message = new $root.google.protobuf.UInt32Value(); + if (object.value != null) + message.value = object.value >>> 0; + return message; + }; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this UInt32Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt32Value + * @instance + * @returns {Object.} JSON object + */ + UInt32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UInt32Value + * @function getTypeUrl + * @memberof google.protobuf.UInt32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - switch (object.maximumEdition) { - default: - if (typeof object.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; + return typeUrlPrefix + "/google.protobuf.UInt32Value"; + }; + + return UInt32Value; + })(); + + protobuf.BoolValue = (function() { + + /** + * Properties of a BoolValue. + * @memberof google.protobuf + * @interface IBoolValue + * @property {boolean|null} [value] BoolValue value + */ + + /** + * Constructs a new BoolValue. + * @memberof google.protobuf + * @classdesc Represents a BoolValue. + * @implements IBoolValue + * @constructor + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + */ + function BoolValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BoolValue value. + * @member {boolean} value + * @memberof google.protobuf.BoolValue + * @instance + */ + BoolValue.prototype.value = false; + + /** + * Creates a new BoolValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @returns {google.protobuf.BoolValue} BoolValue instance + */ + BoolValue.create = function create(properties) { + return new BoolValue(properties); + }; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); + return writer; + }; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decode = function 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.BoolValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); 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. + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoolValue message. + * @function verify + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BoolValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "boolean") + return "value: boolean expected"; + return null; + }; + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BoolValue} BoolValue + */ + BoolValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BoolValue) + return object; + var message = new $root.google.protobuf.BoolValue(); + if (object.value != null) + message.value = Boolean(object.value); + return message; + }; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.BoolValue * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {google.protobuf.BoolValue} message BoolValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSetDefaults.toObject = function toObject(message, options) { + BoolValue.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; + if (options.defaults) + object.value = false; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; return object; }; /** - * Converts this FeatureSetDefaults to JSON. + * Converts this BoolValue to JSON. * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.BoolValue * @instance * @returns {Object.} JSON object */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { + BoolValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FeatureSetDefaults + * Gets the default type url for BoolValue * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.BoolValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + return typeUrlPrefix + "/google.protobuf.BoolValue"; }; - 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; + return BoolValue; })(); - protobuf.SourceCodeInfo = (function() { + protobuf.StringValue = (function() { /** - * Properties of a SourceCodeInfo. + * Properties of a StringValue. * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location + * @interface IStringValue + * @property {string|null} [value] StringValue value */ /** - * Constructs a new SourceCodeInfo. + * Constructs a new StringValue. * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo + * @classdesc Represents a StringValue. + * @implements IStringValue * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.IStringValue=} [properties] Properties to set */ - function SourceCodeInfo(properties) { - this.location = []; + function StringValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20178,78 +55294,75 @@ } /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo + * StringValue value. + * @member {string} value + * @memberof google.protobuf.StringValue * @instance */ - SourceCodeInfo.prototype.location = $util.emptyArray; + StringValue.prototype.value = ""; /** - * Creates a new SourceCodeInfo instance using the specified properties. + * Creates a new StringValue instance using the specified properties. * @function create - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.StringValue * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @returns {google.protobuf.StringValue} StringValue instance */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); + StringValue.create = function create(properties) { + return new StringValue(properties); }; /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.StringValue * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer) { + StringValue.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(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); return writer; }; /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.StringValue * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + StringValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. + * Decodes a StringValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.StringValue * @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 + * @returns {google.protobuf.StringValue} StringValue * @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) { + StringValue.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.StringValue(); 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())); + message.value = reader.string(); break; } default: @@ -20261,502 +55374,122 @@ }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a StringValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.StringValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.StringValue} StringValue * @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) { + StringValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceCodeInfo message. + * Verifies a StringValue message. * @function verify - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.StringValue * @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) { + StringValue.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; - } - } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; return null; }; /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a StringValue 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]); - } - } + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.StringValue} StringValue + */ + StringValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.StringValue) + return object; + var message = new $root.google.protobuf.StringValue(); + if (object.value != null) + message.value = String(object.value); return message; }; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a StringValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.StringValue * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {google.protobuf.StringValue} message StringValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + StringValue.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); - } + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; return object; }; /** - * Converts this SourceCodeInfo to JSON. + * Converts this StringValue to JSON. * @function toJSON - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.StringValue * @instance * @returns {Object.} JSON object */ - SourceCodeInfo.prototype.toJSON = function toJSON() { + StringValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SourceCodeInfo + * Gets the default type url for StringValue * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.StringValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + return typeUrlPrefix + "/google.protobuf.StringValue"; }; - 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; + return StringValue; })(); - protobuf.GeneratedCodeInfo = (function() { + protobuf.BytesValue = (function() { /** - * Properties of a GeneratedCodeInfo. + * Properties of a BytesValue. * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + * @interface IBytesValue + * @property {Uint8Array|null} [value] BytesValue value */ /** - * Constructs a new GeneratedCodeInfo. + * Constructs a new BytesValue. * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo + * @classdesc Represents a BytesValue. + * @implements IBytesValue * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @param {google.protobuf.IBytesValue=} [properties] Properties to set */ - function GeneratedCodeInfo(properties) { - this.annotation = []; + function BytesValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20764,78 +55497,75 @@ } /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo + * BytesValue value. + * @member {Uint8Array} value + * @memberof google.protobuf.BytesValue * @instance */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + BytesValue.prototype.value = $util.newBuffer([]); /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * Creates a new BytesValue instance using the specified properties. * @function create - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * @returns {google.protobuf.BytesValue} BytesValue instance */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); + BytesValue.create = function create(properties) { + return new BytesValue(properties); }; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encode = function encode(message, writer) { + BytesValue.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(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); return writer; }; /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + BytesValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * Decodes a BytesValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @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 + * @returns {google.protobuf.BytesValue} BytesValue * @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) { + BytesValue.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BytesValue(); 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())); + message.value = reader.bytes(); break; } default: @@ -20847,501 +55577,208 @@ }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a BytesValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.protobuf.BytesValue} BytesValue * @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) { + BytesValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GeneratedCodeInfo message. + * Verifies a BytesValue message. * @function verify - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @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) { + BytesValue.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; - } - } + 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 a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.protobuf.BytesValue} BytesValue */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + BytesValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BytesValue) 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]); - } - } + var message = new $root.google.protobuf.BytesValue(); + 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 a GeneratedCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {google.protobuf.BytesValue} message BytesValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GeneratedCodeInfo.toObject = function toObject(message, options) { + BytesValue.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); - } + if (options.defaults) + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + 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 GeneratedCodeInfo to JSON. + * Converts this BytesValue to JSON. * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @instance * @returns {Object.} JSON object */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { + BytesValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GeneratedCodeInfo + * Gets the default type url for BytesValue * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + return typeUrlPrefix + "/google.protobuf.BytesValue"; }; - 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; - }; + return BytesValue; + })(); - /** - * 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); - }; + return protobuf; + })(); - /** - * 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"; - }; + google.type = (function() { - /** - * 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; - })(); + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; - return Annotation; - })(); + /** + * DayOfWeek enum. + * @name google.type.DayOfWeek + * @enum {number} + * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value + * @property {number} MONDAY=1 MONDAY value + * @property {number} TUESDAY=2 TUESDAY value + * @property {number} WEDNESDAY=3 WEDNESDAY value + * @property {number} THURSDAY=4 THURSDAY value + * @property {number} FRIDAY=5 FRIDAY value + * @property {number} SATURDAY=6 SATURDAY value + * @property {number} SUNDAY=7 SUNDAY value + */ + type.DayOfWeek = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; + values[valuesById[1] = "MONDAY"] = 1; + values[valuesById[2] = "TUESDAY"] = 2; + values[valuesById[3] = "WEDNESDAY"] = 3; + values[valuesById[4] = "THURSDAY"] = 4; + values[valuesById[5] = "FRIDAY"] = 5; + values[valuesById[6] = "SATURDAY"] = 6; + values[valuesById[7] = "SUNDAY"] = 7; + return values; + })(); - return GeneratedCodeInfo; + /** + * Month enum. + * @name google.type.Month + * @enum {number} + * @property {number} MONTH_UNSPECIFIED=0 MONTH_UNSPECIFIED value + * @property {number} JANUARY=1 JANUARY value + * @property {number} FEBRUARY=2 FEBRUARY value + * @property {number} MARCH=3 MARCH value + * @property {number} APRIL=4 APRIL value + * @property {number} MAY=5 MAY value + * @property {number} JUNE=6 JUNE value + * @property {number} JULY=7 JULY value + * @property {number} AUGUST=8 AUGUST value + * @property {number} SEPTEMBER=9 SEPTEMBER value + * @property {number} OCTOBER=10 OCTOBER value + * @property {number} NOVEMBER=11 NOVEMBER value + * @property {number} DECEMBER=12 DECEMBER value + */ + type.Month = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MONTH_UNSPECIFIED"] = 0; + values[valuesById[1] = "JANUARY"] = 1; + values[valuesById[2] = "FEBRUARY"] = 2; + values[valuesById[3] = "MARCH"] = 3; + values[valuesById[4] = "APRIL"] = 4; + values[valuesById[5] = "MAY"] = 5; + values[valuesById[6] = "JUNE"] = 6; + values[valuesById[7] = "JULY"] = 7; + values[valuesById[8] = "AUGUST"] = 8; + values[valuesById[9] = "SEPTEMBER"] = 9; + values[valuesById[10] = "OCTOBER"] = 10; + values[valuesById[11] = "NOVEMBER"] = 11; + values[valuesById[12] = "DECEMBER"] = 12; + return values; })(); - protobuf.Duration = (function() { + type.Expr = (function() { /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos + * Properties of an Expr. + * @memberof google.type + * @interface IExpr + * @property {string|null} [expression] Expr expression + * @property {string|null} [title] Expr title + * @property {string|null} [description] Expr description + * @property {string|null} [location] Expr location */ /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration + * Constructs a new Expr. + * @memberof google.type + * @classdesc Represents an Expr. + * @implements IExpr * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * @param {google.type.IExpr=} [properties] Properties to set */ - function Duration(properties) { + function Expr(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21349,89 +55786,117 @@ } /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration + * Expr expression. + * @member {string} expression + * @memberof google.type.Expr * @instance */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Expr.prototype.expression = ""; /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration + * Expr title. + * @member {string} title + * @memberof google.type.Expr * @instance */ - Duration.prototype.nanos = 0; + Expr.prototype.title = ""; /** - * Creates a new Duration instance using the specified properties. + * Expr description. + * @member {string} description + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.description = ""; + + /** + * Expr location. + * @member {string} location + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.location = ""; + + /** + * Creates a new Expr instance using the specified properties. * @function create - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance + * @param {google.type.IExpr=} [properties] Properties to set + * @returns {google.type.Expr} Expr instance */ - Duration.create = function create(properties) { - return new Duration(properties); + Expr.create = function create(properties) { + return new Expr(properties); }; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. * @function encode - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.type.IExpr} message Expr message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encode = function encode(message, writer) { + Expr.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); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); return writer; }; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.type.IExpr} message Expr message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { + Expr.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes an Expr message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @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 + * @returns {google.type.Expr} Expr * @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) { + Expr.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Expr(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.seconds = reader.int64(); + message.expression = reader.string(); break; } case 2: { - message.nanos = reader.int32(); + message.title = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.location = reader.string(); break; } default: @@ -21443,146 +55908,162 @@ }; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes an Expr message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration + * @returns {google.type.Expr} Expr * @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) { + Expr.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Duration message. + * Verifies an Expr message. * @function verify - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @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"; + */ + Expr.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; return null; }; /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates an Expr message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration + * @returns {google.type.Expr} Expr */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) + Expr.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Expr) 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; + var message = new $root.google.type.Expr(); + if (object.expression != null) + message.expression = String(object.expression); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.location != null) + message.location = String(object.location); return message; }; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. + * Creates a plain object from an Expr message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @static - * @param {google.protobuf.Duration} message Duration + * @param {google.type.Expr} message Expr * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options) { + Expr.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; + object.expression = ""; + object.title = ""; + object.description = ""; + object.location = ""; + } + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; return object; }; /** - * Converts this Duration to JSON. + * Converts this Expr to JSON. * @function toJSON - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @instance * @returns {Object.} JSON object */ - Duration.prototype.toJSON = function toJSON() { + Expr.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Duration + * Gets the default type url for Expr * @function getTypeUrl - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Expr.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Duration"; + return typeUrlPrefix + "/google.type.Expr"; }; - return Duration; + return Expr; })(); - protobuf.Any = (function() { + return type; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value + * 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 Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set + * @param {google.rpc.IStatus=} [properties] Properties to set */ - function Any(properties) { + function Status(properties) { + this.details = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21590,89 +56071,106 @@ } /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any + * Status code. + * @member {number} code + * @memberof google.rpc.Status * @instance */ - Any.prototype.type_url = ""; + Status.prototype.code = 0; /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any + * Status message. + * @member {string} message + * @memberof google.rpc.Status * @instance */ - Any.prototype.value = $util.newBuffer([]); + Status.prototype.message = ""; /** - * Creates a new Any instance using the specified properties. + * 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.protobuf.Any + * @memberof google.rpc.Status * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance */ - Any.create = function create(properties) { - return new Any(properties); + Status.create = function create(properties) { + return new Status(properties); }; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. * @function encode - * @memberof google.protobuf.Any + * @memberof google.rpc.Status * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.rpc.IStatus} message Status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encode = function encode(message, writer) { + Status.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); + 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 Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Any + * @memberof google.rpc.Status * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.rpc.IStatus} message Status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encodeDelimited = function encodeDelimited(message, writer) { + Status.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes a Status message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Any + * @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.protobuf.Any} Any + * @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 */ - Any.decode = function decode(reader, length) { + 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.protobuf.Any(); + 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.type_url = reader.string(); + message.code = reader.int32(); break; } case 2: { - message.value = reader.bytes(); + 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: @@ -21684,2403 +56182,3491 @@ }; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes a Status message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Any + * @memberof google.rpc.Status * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any + * @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 */ - Any.decodeDelimited = function decodeDelimited(reader) { + Status.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Any message. + * Verifies a Status message. * @function verify - * @memberof google.protobuf.Any + * @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 */ - Any.verify = function verify(message) { + Status.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"; + 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 an Any message from a plain object. Also converts values to their respective internal types. + * Creates a Status message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Any + * @memberof google.rpc.Status * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any + * @returns {google.rpc.Status} Status */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) 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; + 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 an Any message. Also converts values to other types if specified. + * Creates a plain object from a Status message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Any + * @memberof google.rpc.Status * @static - * @param {google.protobuf.Any} message Any + * @param {google.rpc.Status} message Status * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Any.toObject = function toObject(message, options) { + Status.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.details = []; 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); - } + 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); } - 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. + * Converts this Status to JSON. * @function toJSON - * @memberof google.protobuf.Any + * @memberof google.rpc.Status * @instance * @returns {Object.} JSON object */ - Any.prototype.toJSON = function toJSON() { + Status.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Any + * Gets the default type url for Status * @function getTypeUrl - * @memberof google.protobuf.Any + * @memberof google.rpc.Status * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Any"; - }; + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + google.iam = (function() { + + /** + * Namespace iam. + * @memberof google + * @namespace + */ + var iam = {}; + + iam.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.iam + * @namespace + */ + var v1 = {}; + + v1.IAMPolicy = (function() { + + /** + * Constructs a new IAMPolicy service. + * @memberof google.iam.v1 + * @classdesc Represents a IAMPolicy + * @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 IAMPolicy(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (IAMPolicy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IAMPolicy; + + /** + * Creates new IAMPolicy service using the specified rpc implementation. + * @function create + * @memberof google.iam.v1.IAMPolicy + * @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 {IAMPolicy} RPC service. Useful where requests and/or responses are streamed. + */ + IAMPolicy.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. + * @memberof google.iam.v1.IAMPolicy + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.iam.v1.IAMPolicy.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. + * @memberof google.iam.v1.IAMPolicy + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.iam.v1.IAMPolicy.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. + * @memberof google.iam.v1.IAMPolicy + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.iam.v1.IAMPolicy.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return IAMPolicy; + })(); + + v1.SetIamPolicyRequest = (function() { + + /** + * Properties of a SetIamPolicyRequest. + * @memberof google.iam.v1 + * @interface ISetIamPolicyRequest + * @property {string|null} [resource] SetIamPolicyRequest resource + * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy + * @property {google.protobuf.IFieldMask|null} [updateMask] SetIamPolicyRequest updateMask + */ + + /** + * Constructs a new SetIamPolicyRequest. + * @memberof google.iam.v1 + * @classdesc Represents a SetIamPolicyRequest. + * @implements ISetIamPolicyRequest + * @constructor + * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set + */ + function SetIamPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetIamPolicyRequest resource. + * @member {string} resource + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.resource = ""; + + /** + * SetIamPolicyRequest policy. + * @member {google.iam.v1.IPolicy|null|undefined} policy + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.policy = null; + + /** + * SetIamPolicyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.updateMask = null; + + /** + * Creates a new SetIamPolicyRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest instance + */ + SetIamPolicyRequest.create = function create(properties) { + return new SetIamPolicyRequest(properties); + }; + + /** + * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetIamPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) + $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetIamPolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.SetIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetIamPolicyRequest message. + * @function verify + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetIamPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.policy != null && message.hasOwnProperty("policy")) { + var error = $root.google.iam.v1.Policy.verify(message.policy); + if (error) + return "policy." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + */ + SetIamPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.SetIamPolicyRequest) + return object; + var message = new $root.google.iam.v1.SetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.policy != null) { + if (typeof object.policy !== "object") + throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); + message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.SetIamPolicyRequest} message SetIamPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetIamPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.policy = null; + object.updateMask = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.policy != null && message.hasOwnProperty("policy")) + object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this SetIamPolicyRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + SetIamPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetIamPolicyRequest + * @function getTypeUrl + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.SetIamPolicyRequest"; + }; + + return SetIamPolicyRequest; + })(); + + v1.GetIamPolicyRequest = (function() { + + /** + * Properties of a GetIamPolicyRequest. + * @memberof google.iam.v1 + * @interface IGetIamPolicyRequest + * @property {string|null} [resource] GetIamPolicyRequest resource + * @property {google.iam.v1.IGetPolicyOptions|null} [options] GetIamPolicyRequest options + */ + + /** + * Constructs a new GetIamPolicyRequest. + * @memberof google.iam.v1 + * @classdesc Represents a GetIamPolicyRequest. + * @implements IGetIamPolicyRequest + * @constructor + * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set + */ + function GetIamPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - return Any; - })(); + /** + * GetIamPolicyRequest resource. + * @member {string} resource + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + */ + GetIamPolicyRequest.prototype.resource = ""; - protobuf.Empty = (function() { + /** + * GetIamPolicyRequest options. + * @member {google.iam.v1.IGetPolicyOptions|null|undefined} options + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + */ + GetIamPolicyRequest.prototype.options = null; - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ + /** + * Creates a new GetIamPolicyRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest instance + */ + GetIamPolicyRequest.create = function create(properties) { + return new GetIamPolicyRequest(properties); + }; - /** - * 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]]; - } + /** + * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIamPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * 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 GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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; - }; + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIamPolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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 a GetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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; + /** + * Verifies a GetIamPolicyRequest message. + * @function verify + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIamPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options); + if (error) + return "options." + error; } - } - 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()); - }; + return null; + }; - /** - * 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 a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + */ + GetIamPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.GetIamPolicyRequest) + return object; + var message = new $root.google.iam.v1.GetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected"); + message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options); + } + return message; + }; - /** - * 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) + /** + * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.GetIamPolicyRequest} message GetIamPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIamPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.options = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options); 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); - }; + /** + * Converts this GetIamPolicyRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + GetIamPolicyRequest.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"; - }; + /** + * Gets the default type url for GetIamPolicyRequest + * @function getTypeUrl + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.GetIamPolicyRequest"; + }; - return Empty; - })(); + return GetIamPolicyRequest; + })(); - protobuf.Timestamp = (function() { + v1.TestIamPermissionsRequest = (function() { - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ + /** + * Properties of a TestIamPermissionsRequest. + * @memberof google.iam.v1 + * @interface ITestIamPermissionsRequest + * @property {string|null} [resource] TestIamPermissionsRequest resource + * @property {Array.|null} [permissions] TestIamPermissionsRequest permissions + */ - /** - * 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]]; - } + /** + * Constructs a new TestIamPermissionsRequest. + * @memberof google.iam.v1 + * @classdesc Represents a TestIamPermissionsRequest. + * @implements ITestIamPermissionsRequest + * @constructor + * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set + */ + function TestIamPermissionsRequest(properties) { + this.permissions = []; + if (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; + /** + * TestIamPermissionsRequest resource. + * @member {string} resource + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + */ + TestIamPermissionsRequest.prototype.resource = ""; - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; + /** + * TestIamPermissionsRequest permissions. + * @member {Array.} permissions + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + */ + TestIamPermissionsRequest.prototype.permissions = $util.emptyArray; - /** - * 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); - }; + /** + * Creates a new TestIamPermissionsRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest instance + */ + TestIamPermissionsRequest.create = function create(properties) { + return new TestIamPermissionsRequest(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 TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.permissions[i]); + 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(); - }; + /** + * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsRequest.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(); + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + 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()); - }; + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsRequest.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; - }; + /** + * Verifies a TestIamPermissionsRequest message. + * @function verify + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestIamPermissionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] 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 TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + */ + TestIamPermissionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest) + return object; + var message = new $root.google.iam.v1.TestIamPermissionsRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".google.iam.v1.TestIamPermissionsRequest.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); + } + 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; - }; + /** + * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.TestIamPermissionsRequest} message TestIamPermissionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestIamPermissionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (options.defaults) + object.resource = ""; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; + } + 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); - }; + /** + * Converts this TestIamPermissionsRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + * @returns {Object.} JSON object + */ + TestIamPermissionsRequest.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"; - }; + /** + * Gets the default type url for TestIamPermissionsRequest + * @function getTypeUrl + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestIamPermissionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsRequest"; + }; - return Timestamp; - })(); + return TestIamPermissionsRequest; + })(); - protobuf.DoubleValue = (function() { + v1.TestIamPermissionsResponse = (function() { - /** - * Properties of a DoubleValue. - * @memberof google.protobuf - * @interface IDoubleValue - * @property {number|null} [value] DoubleValue value - */ + /** + * Properties of a TestIamPermissionsResponse. + * @memberof google.iam.v1 + * @interface ITestIamPermissionsResponse + * @property {Array.|null} [permissions] TestIamPermissionsResponse permissions + */ - /** - * Constructs a new DoubleValue. - * @memberof google.protobuf - * @classdesc Represents a DoubleValue. - * @implements IDoubleValue - * @constructor - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set - */ - function DoubleValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new TestIamPermissionsResponse. + * @memberof google.iam.v1 + * @classdesc Represents a TestIamPermissionsResponse. + * @implements ITestIamPermissionsResponse + * @constructor + * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set + */ + function TestIamPermissionsResponse(properties) { + this.permissions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * DoubleValue value. - * @member {number} value - * @memberof google.protobuf.DoubleValue - * @instance - */ - DoubleValue.prototype.value = 0; + /** + * TestIamPermissionsResponse permissions. + * @member {Array.} permissions + * @memberof google.iam.v1.TestIamPermissionsResponse + * @instance + */ + TestIamPermissionsResponse.prototype.permissions = $util.emptyArray; - /** - * Creates a new DoubleValue instance using the specified properties. - * @function create - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set - * @returns {google.protobuf.DoubleValue} DoubleValue instance - */ - DoubleValue.create = function create(properties) { - return new DoubleValue(properties); - }; + /** + * Creates a new TestIamPermissionsResponse instance using the specified properties. + * @function create + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse instance + */ + TestIamPermissionsResponse.create = function create(properties) { + return new TestIamPermissionsResponse(properties); + }; - /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DoubleValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); - return writer; - }; + /** + * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.permissions[i]); + return writer; + }; - /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a DoubleValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DoubleValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DoubleValue} DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DoubleValue.decode = function 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.DoubleValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.double(); + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; - - /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DoubleValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DoubleValue} DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DoubleValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return message; + }; - /** - * Verifies a DoubleValue message. - * @function verify - * @memberof google.protobuf.DoubleValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DoubleValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - return null; - }; + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DoubleValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DoubleValue} DoubleValue - */ - DoubleValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DoubleValue) - return object; - var message = new $root.google.protobuf.DoubleValue(); - if (object.value != null) - message.value = Number(object.value); - return message; - }; + /** + * Verifies a TestIamPermissionsResponse message. + * @function verify + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestIamPermissionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] expected"; + } + return null; + }; - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.DoubleValue} message DoubleValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DoubleValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; + /** + * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + */ + TestIamPermissionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse) + return object; + var message = new $root.google.iam.v1.TestIamPermissionsResponse(); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".google.iam.v1.TestIamPermissionsResponse.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); + } + return message; + }; - /** - * Converts this DoubleValue to JSON. - * @function toJSON - * @memberof google.protobuf.DoubleValue - * @instance - * @returns {Object.} JSON object - */ - DoubleValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.TestIamPermissionsResponse} message TestIamPermissionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestIamPermissionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; + } + return object; + }; - /** - * Gets the default type url for DoubleValue - * @function getTypeUrl - * @memberof google.protobuf.DoubleValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DoubleValue"; - }; + /** + * Converts this TestIamPermissionsResponse to JSON. + * @function toJSON + * @memberof google.iam.v1.TestIamPermissionsResponse + * @instance + * @returns {Object.} JSON object + */ + TestIamPermissionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return DoubleValue; - })(); + /** + * Gets the default type url for TestIamPermissionsResponse + * @function getTypeUrl + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestIamPermissionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsResponse"; + }; - protobuf.FloatValue = (function() { + return TestIamPermissionsResponse; + })(); - /** - * Properties of a FloatValue. - * @memberof google.protobuf - * @interface IFloatValue - * @property {number|null} [value] FloatValue value - */ + v1.GetPolicyOptions = (function() { - /** - * Constructs a new FloatValue. - * @memberof google.protobuf - * @classdesc Represents a FloatValue. - * @implements IFloatValue - * @constructor - * @param {google.protobuf.IFloatValue=} [properties] Properties to set - */ - function FloatValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a GetPolicyOptions. + * @memberof google.iam.v1 + * @interface IGetPolicyOptions + * @property {number|null} [requestedPolicyVersion] GetPolicyOptions requestedPolicyVersion + */ - /** - * FloatValue value. - * @member {number} value - * @memberof google.protobuf.FloatValue - * @instance - */ - FloatValue.prototype.value = 0; + /** + * Constructs a new GetPolicyOptions. + * @memberof google.iam.v1 + * @classdesc Represents a GetPolicyOptions. + * @implements IGetPolicyOptions + * @constructor + * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set + */ + function GetPolicyOptions(properties) { + if (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 FloatValue instance using the specified properties. - * @function create - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue=} [properties] Properties to set - * @returns {google.protobuf.FloatValue} FloatValue instance - */ - FloatValue.create = function create(properties) { - return new FloatValue(properties); - }; + /** + * GetPolicyOptions requestedPolicyVersion. + * @member {number} requestedPolicyVersion + * @memberof google.iam.v1.GetPolicyOptions + * @instance + */ + GetPolicyOptions.prototype.requestedPolicyVersion = 0; - /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FloatValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); - return writer; - }; + /** + * Creates a new GetPolicyOptions instance using the specified properties. + * @function create + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions instance + */ + GetPolicyOptions.create = function create(properties) { + return new GetPolicyOptions(properties); + }; - /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FloatValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPolicyOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.requestedPolicyVersion); + return writer; + }; - /** - * Decodes a FloatValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FloatValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FloatValue} FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FloatValue.decode = function 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.FloatValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.float(); + /** + * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPolicyOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPolicyOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetPolicyOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.requestedPolicyVersion = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FloatValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FloatValue} FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FloatValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPolicyOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a FloatValue message. - * @function verify - * @memberof google.protobuf.FloatValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FloatValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - return null; - }; + /** + * Verifies a GetPolicyOptions message. + * @function verify + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPolicyOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + if (!$util.isInteger(message.requestedPolicyVersion)) + return "requestedPolicyVersion: integer expected"; + return null; + }; - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FloatValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FloatValue} FloatValue - */ - FloatValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FloatValue) + /** + * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + */ + GetPolicyOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.GetPolicyOptions) + return object; + var message = new $root.google.iam.v1.GetPolicyOptions(); + if (object.requestedPolicyVersion != null) + message.requestedPolicyVersion = object.requestedPolicyVersion | 0; + return message; + }; + + /** + * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.GetPolicyOptions} message GetPolicyOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPolicyOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.requestedPolicyVersion = 0; + if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + object.requestedPolicyVersion = message.requestedPolicyVersion; return object; - var message = new $root.google.protobuf.FloatValue(); - if (object.value != null) - message.value = Number(object.value); - return message; - }; + }; - /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.FloatValue} message FloatValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FloatValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; + /** + * Converts this GetPolicyOptions to JSON. + * @function toJSON + * @memberof google.iam.v1.GetPolicyOptions + * @instance + * @returns {Object.} JSON object + */ + GetPolicyOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this FloatValue to JSON. - * @function toJSON - * @memberof google.protobuf.FloatValue - * @instance - * @returns {Object.} JSON object - */ - FloatValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for GetPolicyOptions + * @function getTypeUrl + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPolicyOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.GetPolicyOptions"; + }; - /** - * Gets the default type url for FloatValue - * @function getTypeUrl - * @memberof google.protobuf.FloatValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FloatValue"; - }; + return GetPolicyOptions; + })(); - return FloatValue; - })(); + v1.Policy = (function() { - protobuf.Int64Value = (function() { + /** + * Properties of a Policy. + * @memberof google.iam.v1 + * @interface IPolicy + * @property {number|null} [version] Policy version + * @property {Array.|null} [bindings] Policy bindings + * @property {Array.|null} [auditConfigs] Policy auditConfigs + * @property {Uint8Array|null} [etag] Policy etag + */ - /** - * Properties of an Int64Value. - * @memberof google.protobuf - * @interface IInt64Value - * @property {number|Long|null} [value] Int64Value value - */ + /** + * Constructs a new Policy. + * @memberof google.iam.v1 + * @classdesc Represents a Policy. + * @implements IPolicy + * @constructor + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + */ + function Policy(properties) { + this.bindings = []; + this.auditConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new Int64Value. - * @memberof google.protobuf - * @classdesc Represents an Int64Value. - * @implements IInt64Value - * @constructor - * @param {google.protobuf.IInt64Value=} [properties] Properties to set - */ - function Int64Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Policy version. + * @member {number} version + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.version = 0; - /** - * Int64Value value. - * @member {number|Long} value - * @memberof google.protobuf.Int64Value - * @instance - */ - Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Policy bindings. + * @member {Array.} bindings + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.bindings = $util.emptyArray; - /** - * Creates a new Int64Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value=} [properties] Properties to set - * @returns {google.protobuf.Int64Value} Int64Value instance - */ - Int64Value.create = function create(properties) { - return new Int64Value(properties); - }; + /** + * Policy auditConfigs. + * @member {Array.} auditConfigs + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.auditConfigs = $util.emptyArray; - /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int64Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); - return writer; - }; + /** + * Policy etag. + * @member {Uint8Array} etag + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.etag = $util.newBuffer([]); - /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new Policy instance using the specified properties. + * @function create + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + * @returns {google.iam.v1.Policy} Policy instance + */ + Policy.create = function create(properties) { + return new Policy(properties); + }; - /** - * Decodes an Int64Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Int64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Int64Value} Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int64Value.decode = function 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.Int64Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.int64(); + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); + if (message.bindings != null && message.bindings.length) + for (var i = 0; i < message.bindings.length; ++i) + $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.auditConfigs != null && message.auditConfigs.length) + for (var i = 0; i < message.auditConfigs.length; ++i) + $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Policy message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.int32(); + break; + } + case 4: { + if (!(message.bindings && message.bindings.length)) + message.bindings = []; + message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.auditConfigs && message.auditConfigs.length)) + message.auditConfigs = []; + message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32())); + break; + } + case 3: { + message.etag = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Int64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Int64Value} Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int64Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an Int64Value message. - * @function verify - * @memberof google.protobuf.Int64Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Int64Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; - return null; - }; + /** + * Verifies a Policy message. + * @function verify + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Policy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + if (message.bindings != null && message.hasOwnProperty("bindings")) { + if (!Array.isArray(message.bindings)) + return "bindings: array expected"; + for (var i = 0; i < message.bindings.length; ++i) { + var error = $root.google.iam.v1.Binding.verify(message.bindings[i]); + if (error) + return "bindings." + error; + } + } + if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) { + if (!Array.isArray(message.auditConfigs)) + return "auditConfigs: array expected"; + for (var i = 0; i < message.auditConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]); + if (error) + return "auditConfigs." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) + return "etag: buffer expected"; + return null; + }; - /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int64Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int64Value} Int64Value - */ - Int64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int64Value) - return object; - var message = new $root.google.protobuf.Int64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = false; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); - return message; - }; + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Policy} Policy + */ + Policy.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Policy) + return object; + var message = new $root.google.iam.v1.Policy(); + if (object.version != null) + message.version = object.version | 0; + if (object.bindings) { + if (!Array.isArray(object.bindings)) + throw TypeError(".google.iam.v1.Policy.bindings: array expected"); + message.bindings = []; + for (var i = 0; i < object.bindings.length; ++i) { + if (typeof object.bindings[i] !== "object") + throw TypeError(".google.iam.v1.Policy.bindings: object expected"); + message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); + } + } + if (object.auditConfigs) { + if (!Array.isArray(object.auditConfigs)) + throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected"); + message.auditConfigs = []; + for (var i = 0; i < object.auditConfigs.length; ++i) { + if (typeof object.auditConfigs[i] !== "object") + throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); + message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]); + } + } + if (object.etag != null) + if (typeof object.etag === "string") + $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); + else if (object.etag.length >= 0) + message.etag = object.etag; + return message; + }; - /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.Int64Value} message Int64Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Int64Value.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.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; - return object; - }; + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.Policy} message Policy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Policy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bindings = []; + object.auditConfigs = []; + } + if (options.defaults) { + object.version = 0; + if (options.bytes === String) + object.etag = ""; + else { + object.etag = []; + if (options.bytes !== Array) + object.etag = $util.newBuffer(object.etag); + } + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; + if (message.bindings && message.bindings.length) { + object.bindings = []; + for (var j = 0; j < message.bindings.length; ++j) + object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); + } + if (message.auditConfigs && message.auditConfigs.length) { + object.auditConfigs = []; + for (var j = 0; j < message.auditConfigs.length; ++j) + object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options); + } + return object; + }; - /** - * Converts this Int64Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int64Value - * @instance - * @returns {Object.} JSON object - */ - Int64Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Policy to JSON. + * @function toJSON + * @memberof google.iam.v1.Policy + * @instance + * @returns {Object.} JSON object + */ + Policy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for Int64Value - * @function getTypeUrl - * @memberof google.protobuf.Int64Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Int64Value"; - }; + /** + * Gets the default type url for Policy + * @function getTypeUrl + * @memberof google.iam.v1.Policy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Policy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Policy"; + }; - return Int64Value; - })(); + return Policy; + })(); - protobuf.UInt64Value = (function() { + v1.Binding = (function() { - /** - * Properties of a UInt64Value. - * @memberof google.protobuf - * @interface IUInt64Value - * @property {number|Long|null} [value] UInt64Value value - */ + /** + * Properties of a Binding. + * @memberof google.iam.v1 + * @interface IBinding + * @property {string|null} [role] Binding role + * @property {Array.|null} [members] Binding members + * @property {google.type.IExpr|null} [condition] Binding condition + */ - /** - * Constructs a new UInt64Value. - * @memberof google.protobuf - * @classdesc Represents a UInt64Value. - * @implements IUInt64Value - * @constructor - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set - */ - function UInt64Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new Binding. + * @memberof google.iam.v1 + * @classdesc Represents a Binding. + * @implements IBinding + * @constructor + * @param {google.iam.v1.IBinding=} [properties] Properties to set + */ + function Binding(properties) { + this.members = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * UInt64Value value. - * @member {number|Long} value - * @memberof google.protobuf.UInt64Value - * @instance - */ - UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + /** + * Binding role. + * @member {string} role + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.role = ""; - /** - * Creates a new UInt64Value instance using the specified properties. - * @function create - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set - * @returns {google.protobuf.UInt64Value} UInt64Value instance - */ - UInt64Value.create = function create(properties) { - return new UInt64Value(properties); - }; + /** + * Binding members. + * @member {Array.} members + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.members = $util.emptyArray; - /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt64Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); - return writer; - }; + /** + * Binding condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.condition = null; - /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new Binding instance using the specified properties. + * @function create + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding=} [properties] Properties to set + * @returns {google.iam.v1.Binding} Binding instance + */ + Binding.create = function create(properties) { + return new Binding(properties); + }; - /** - * Decodes a UInt64Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UInt64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UInt64Value} UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt64Value.decode = function 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.UInt64Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.uint64(); + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); + if (message.members != null && message.members.length) + for (var i = 0; i < message.members.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.role = reader.string(); + break; + } + case 2: { + if (!(message.members && message.members.length)) + message.members = []; + message.members.push(reader.string()); + break; + } + case 3: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UInt64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UInt64Value} UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt64Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a UInt64Value message. - * @function verify - * @memberof google.protobuf.UInt64Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UInt64Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; - return null; - }; + /** + * Verifies a Binding message. + * @function verify + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Binding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.members != null && message.hasOwnProperty("members")) { + if (!Array.isArray(message.members)) + return "members: array expected"; + for (var i = 0; i < message.members.length; ++i) + if (!$util.isString(message.members[i])) + return "members: string[] expected"; + } + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UInt64Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UInt64Value} UInt64Value - */ - UInt64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt64Value) - return object; - var message = new $root.google.protobuf.UInt64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = true; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); - return message; - }; + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Binding} Binding + */ + Binding.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Binding) + return object; + var message = new $root.google.iam.v1.Binding(); + if (object.role != null) + message.role = String(object.role); + if (object.members) { + if (!Array.isArray(object.members)) + throw TypeError(".google.iam.v1.Binding.members: array expected"); + message.members = []; + for (var i = 0; i < object.members.length; ++i) + message.members[i] = String(object.members[i]); + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.Binding.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.UInt64Value} message UInt64Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UInt64Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; - return object; - }; + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.Binding} message Binding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Binding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.members = []; + if (options.defaults) { + object.role = ""; + object.condition = null; + } + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.members && message.members.length) { + object.members = []; + for (var j = 0; j < message.members.length; ++j) + object.members[j] = message.members[j]; + } + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; - /** - * Converts this UInt64Value to JSON. - * @function toJSON - * @memberof google.protobuf.UInt64Value - * @instance - * @returns {Object.} JSON object - */ - UInt64Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Binding to JSON. + * @function toJSON + * @memberof google.iam.v1.Binding + * @instance + * @returns {Object.} JSON object + */ + Binding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for UInt64Value - * @function getTypeUrl - * @memberof google.protobuf.UInt64Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UInt64Value"; - }; + /** + * Gets the default type url for Binding + * @function getTypeUrl + * @memberof google.iam.v1.Binding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Binding"; + }; - return UInt64Value; - })(); + return Binding; + })(); - protobuf.Int32Value = (function() { + v1.AuditConfig = (function() { - /** - * Properties of an Int32Value. - * @memberof google.protobuf - * @interface IInt32Value - * @property {number|null} [value] Int32Value value - */ + /** + * Properties of an AuditConfig. + * @memberof google.iam.v1 + * @interface IAuditConfig + * @property {string|null} [service] AuditConfig service + * @property {Array.|null} [auditLogConfigs] AuditConfig auditLogConfigs + */ - /** - * Constructs a new Int32Value. - * @memberof google.protobuf - * @classdesc Represents an Int32Value. - * @implements IInt32Value - * @constructor - * @param {google.protobuf.IInt32Value=} [properties] Properties to set - */ - function Int32Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new AuditConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfig. + * @implements IAuditConfig + * @constructor + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + */ + function AuditConfig(properties) { + this.auditLogConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Int32Value value. - * @member {number} value - * @memberof google.protobuf.Int32Value - * @instance - */ - Int32Value.prototype.value = 0; + /** + * AuditConfig service. + * @member {string} service + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.service = ""; - /** - * Creates a new Int32Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value=} [properties] Properties to set - * @returns {google.protobuf.Int32Value} Int32Value instance - */ - Int32Value.create = function create(properties) { - return new Int32Value(properties); - }; + /** + * AuditConfig auditLogConfigs. + * @member {Array.} auditLogConfigs + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.auditLogConfigs = $util.emptyArray; - /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int32Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); - return writer; - }; + /** + * Creates a new AuditConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfig} AuditConfig instance + */ + AuditConfig.create = function create(properties) { + return new AuditConfig(properties); + }; - /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.auditLogConfigs != null && message.auditLogConfigs.length) + for (var i = 0; i < message.auditLogConfigs.length; ++i) + $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Decodes an Int32Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Int32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Int32Value} Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int32Value.decode = function 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.Int32Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.int32(); + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + case 3: { + if (!(message.auditLogConfigs && message.auditLogConfigs.length)) + message.auditLogConfigs = []; + message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Int32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Int32Value} Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int32Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an Int32Value message. - * @function verify - * @memberof google.protobuf.Int32Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Int32Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; - return null; - }; + /** + * Verifies an AuditConfig message. + * @function verify + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) { + if (!Array.isArray(message.auditLogConfigs)) + return "auditLogConfigs: array expected"; + for (var i = 0; i < message.auditLogConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]); + if (error) + return "auditLogConfigs." + error; + } + } + return null; + }; - /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int32Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int32Value} Int32Value - */ - Int32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int32Value) + /** + * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfig} AuditConfig + */ + AuditConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfig) + return object; + var message = new $root.google.iam.v1.AuditConfig(); + if (object.service != null) + message.service = String(object.service); + if (object.auditLogConfigs) { + if (!Array.isArray(object.auditLogConfigs)) + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected"); + message.auditLogConfigs = []; + for (var i = 0; i < object.auditLogConfigs.length; ++i) { + if (typeof object.auditLogConfigs[i] !== "object") + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); + message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.AuditConfig} message AuditConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.auditLogConfigs = []; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.auditLogConfigs && message.auditLogConfigs.length) { + object.auditLogConfigs = []; + for (var j = 0; j < message.auditLogConfigs.length; ++j) + object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options); + } return object; - var message = new $root.google.protobuf.Int32Value(); - if (object.value != null) - message.value = object.value | 0; - return message; - }; + }; - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.Int32Value} message Int32Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Int32Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; + /** + * Converts this AuditConfig to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfig + * @instance + * @returns {Object.} JSON object + */ + AuditConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this Int32Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int32Value - * @instance - * @returns {Object.} JSON object - */ - Int32Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for AuditConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditConfig"; + }; - /** - * Gets the default type url for Int32Value - * @function getTypeUrl - * @memberof google.protobuf.Int32Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Int32Value"; - }; + return AuditConfig; + })(); - return Int32Value; - })(); + v1.AuditLogConfig = (function() { - protobuf.UInt32Value = (function() { + /** + * Properties of an AuditLogConfig. + * @memberof google.iam.v1 + * @interface IAuditLogConfig + * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType + * @property {Array.|null} [exemptedMembers] AuditLogConfig exemptedMembers + */ - /** - * Properties of a UInt32Value. - * @memberof google.protobuf - * @interface IUInt32Value - * @property {number|null} [value] UInt32Value value - */ + /** + * Constructs a new AuditLogConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditLogConfig. + * @implements IAuditLogConfig + * @constructor + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + */ + function AuditLogConfig(properties) { + this.exemptedMembers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new UInt32Value. - * @memberof google.protobuf - * @classdesc Represents a UInt32Value. - * @implements IUInt32Value - * @constructor - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set - */ - function UInt32Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * AuditLogConfig logType. + * @member {google.iam.v1.AuditLogConfig.LogType} logType + * @memberof google.iam.v1.AuditLogConfig + * @instance + */ + AuditLogConfig.prototype.logType = 0; - /** - * UInt32Value value. - * @member {number} value - * @memberof google.protobuf.UInt32Value - * @instance - */ - UInt32Value.prototype.value = 0; + /** + * AuditLogConfig exemptedMembers. + * @member {Array.} exemptedMembers + * @memberof google.iam.v1.AuditLogConfig + * @instance + */ + AuditLogConfig.prototype.exemptedMembers = $util.emptyArray; - /** - * Creates a new UInt32Value instance using the specified properties. - * @function create - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set - * @returns {google.protobuf.UInt32Value} UInt32Value instance - */ - UInt32Value.create = function create(properties) { - return new UInt32Value(properties); - }; + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance + */ + AuditLogConfig.create = function create(properties) { + return new AuditLogConfig(properties); + }; - /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt32Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); - return writer; - }; + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditLogConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType); + if (message.exemptedMembers != null && message.exemptedMembers.length) + for (var i = 0; i < message.exemptedMembers.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]); + return writer; + }; - /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a UInt32Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UInt32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UInt32Value} UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt32Value.decode = function 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.UInt32Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.uint32(); + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditLogConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.logType = reader.int32(); + break; + } + case 2: { + if (!(message.exemptedMembers && message.exemptedMembers.length)) + message.exemptedMembers = []; + message.exemptedMembers.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UInt32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UInt32Value} UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt32Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditLogConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a UInt32Value message. - * @function verify - * @memberof google.protobuf.UInt32Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UInt32Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; - return null; - }; + /** + * Verifies an AuditLogConfig message. + * @function verify + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditLogConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + switch (message.logType) { + default: + return "logType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) { + if (!Array.isArray(message.exemptedMembers)) + return "exemptedMembers: array expected"; + for (var i = 0; i < message.exemptedMembers.length; ++i) + if (!$util.isString(message.exemptedMembers[i])) + return "exemptedMembers: string[] expected"; + } + return null; + }; - /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UInt32Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UInt32Value} UInt32Value - */ - UInt32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt32Value) - return object; - var message = new $root.google.protobuf.UInt32Value(); - if (object.value != null) - message.value = object.value >>> 0; - return message; - }; + /** + * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + */ + AuditLogConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditLogConfig) + return object; + var message = new $root.google.iam.v1.AuditLogConfig(); + switch (object.logType) { + default: + if (typeof object.logType === "number") { + message.logType = object.logType; + break; + } + break; + case "LOG_TYPE_UNSPECIFIED": + case 0: + message.logType = 0; + break; + case "ADMIN_READ": + case 1: + message.logType = 1; + break; + case "DATA_WRITE": + case 2: + message.logType = 2; + break; + case "DATA_READ": + case 3: + message.logType = 3; + break; + } + if (object.exemptedMembers) { + if (!Array.isArray(object.exemptedMembers)) + throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected"); + message.exemptedMembers = []; + for (var i = 0; i < object.exemptedMembers.length; ++i) + message.exemptedMembers[i] = String(object.exemptedMembers[i]); + } + return message; + }; - /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.UInt32Value} message UInt32Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UInt32Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditLogConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exemptedMembers = []; + if (options.defaults) + object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] === undefined ? message.logType : $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; + if (message.exemptedMembers && message.exemptedMembers.length) { + object.exemptedMembers = []; + for (var j = 0; j < message.exemptedMembers.length; ++j) + object.exemptedMembers[j] = message.exemptedMembers[j]; + } + return object; + }; - /** - * Converts this UInt32Value to JSON. - * @function toJSON - * @memberof google.protobuf.UInt32Value - * @instance - * @returns {Object.} JSON object - */ - UInt32Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this AuditLogConfig to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditLogConfig + * @instance + * @returns {Object.} JSON object + */ + AuditLogConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for UInt32Value - * @function getTypeUrl - * @memberof google.protobuf.UInt32Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UInt32Value"; - }; + /** + * Gets the default type url for AuditLogConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditLogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditLogConfig"; + }; - return UInt32Value; - })(); + /** + * LogType enum. + * @name google.iam.v1.AuditLogConfig.LogType + * @enum {number} + * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value + * @property {number} ADMIN_READ=1 ADMIN_READ value + * @property {number} DATA_WRITE=2 DATA_WRITE value + * @property {number} DATA_READ=3 DATA_READ value + */ + AuditLogConfig.LogType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADMIN_READ"] = 1; + values[valuesById[2] = "DATA_WRITE"] = 2; + values[valuesById[3] = "DATA_READ"] = 3; + return values; + })(); - protobuf.BoolValue = (function() { + return AuditLogConfig; + })(); - /** - * Properties of a BoolValue. - * @memberof google.protobuf - * @interface IBoolValue - * @property {boolean|null} [value] BoolValue value - */ + v1.PolicyDelta = (function() { - /** - * Constructs a new BoolValue. - * @memberof google.protobuf - * @classdesc Represents a BoolValue. - * @implements IBoolValue - * @constructor - * @param {google.protobuf.IBoolValue=} [properties] Properties to set - */ - function BoolValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a PolicyDelta. + * @memberof google.iam.v1 + * @interface IPolicyDelta + * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas + * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas + */ - /** - * BoolValue value. - * @member {boolean} value - * @memberof google.protobuf.BoolValue - * @instance - */ - BoolValue.prototype.value = false; + /** + * Constructs a new PolicyDelta. + * @memberof google.iam.v1 + * @classdesc Represents a PolicyDelta. + * @implements IPolicyDelta + * @constructor + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + */ + function PolicyDelta(properties) { + this.bindingDeltas = []; + this.auditConfigDeltas = []; + if (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 BoolValue instance using the specified properties. - * @function create - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue=} [properties] Properties to set - * @returns {google.protobuf.BoolValue} BoolValue instance - */ - BoolValue.create = function create(properties) { - return new BoolValue(properties); - }; + /** + * PolicyDelta bindingDeltas. + * @member {Array.} bindingDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.bindingDeltas = $util.emptyArray; - /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BoolValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); - return writer; - }; + /** + * PolicyDelta auditConfigDeltas. + * @member {Array.} auditConfigDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray; - /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BoolValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new PolicyDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance + */ + PolicyDelta.create = function create(properties) { + return new PolicyDelta(properties); + }; - /** - * Decodes a BoolValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.BoolValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.BoolValue} BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BoolValue.decode = function 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.BoolValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.bool(); + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bindingDeltas != null && message.bindingDeltas.length) + for (var i = 0; i < message.bindingDeltas.length; ++i) + $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) + for (var i = 0; i < message.auditConfigDeltas.length; ++i) + $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.bindingDeltas && message.bindingDeltas.length)) + message.bindingDeltas = []; + message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) + message.auditConfigDeltas = []; + message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.BoolValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.BoolValue} BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BoolValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a BoolValue message. - * @function verify - * @memberof google.protobuf.BoolValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BoolValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "boolean") - return "value: boolean expected"; - return null; - }; + /** + * Verifies a PolicyDelta message. + * @function verify + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PolicyDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) { + if (!Array.isArray(message.bindingDeltas)) + return "bindingDeltas: array expected"; + for (var i = 0; i < message.bindingDeltas.length; ++i) { + var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i]); + if (error) + return "bindingDeltas." + error; + } + } + if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) { + if (!Array.isArray(message.auditConfigDeltas)) + return "auditConfigDeltas: array expected"; + for (var i = 0; i < message.auditConfigDeltas.length; ++i) { + var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i]); + if (error) + return "auditConfigDeltas." + error; + } + } + return null; + }; - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.BoolValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.BoolValue} BoolValue - */ - BoolValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BoolValue) + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + */ + PolicyDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.PolicyDelta) + return object; + var message = new $root.google.iam.v1.PolicyDelta(); + if (object.bindingDeltas) { + if (!Array.isArray(object.bindingDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); + message.bindingDeltas = []; + for (var i = 0; i < object.bindingDeltas.length; ++i) { + if (typeof object.bindingDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); + message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); + } + } + if (object.auditConfigDeltas) { + if (!Array.isArray(object.auditConfigDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); + message.auditConfigDeltas = []; + for (var i = 0; i < object.auditConfigDeltas.length; ++i) { + if (typeof object.auditConfigDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); + message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.PolicyDelta} message PolicyDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PolicyDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bindingDeltas = []; + object.auditConfigDeltas = []; + } + if (message.bindingDeltas && message.bindingDeltas.length) { + object.bindingDeltas = []; + for (var j = 0; j < message.bindingDeltas.length; ++j) + object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options); + } + if (message.auditConfigDeltas && message.auditConfigDeltas.length) { + object.auditConfigDeltas = []; + for (var j = 0; j < message.auditConfigDeltas.length; ++j) + object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options); + } return object; - var message = new $root.google.protobuf.BoolValue(); - if (object.value != null) - message.value = Boolean(object.value); - return message; - }; + }; - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.BoolValue} message BoolValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BoolValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = false; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; + /** + * Converts this PolicyDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.PolicyDelta + * @instance + * @returns {Object.} JSON object + */ + PolicyDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this BoolValue to JSON. - * @function toJSON - * @memberof google.protobuf.BoolValue - * @instance - * @returns {Object.} JSON object - */ - BoolValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for PolicyDelta + * @function getTypeUrl + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PolicyDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.PolicyDelta"; + }; - /** - * Gets the default type url for BoolValue - * @function getTypeUrl - * @memberof google.protobuf.BoolValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + return PolicyDelta; + })(); + + v1.BindingDelta = (function() { + + /** + * Properties of a BindingDelta. + * @memberof google.iam.v1 + * @interface IBindingDelta + * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action + * @property {string|null} [role] BindingDelta role + * @property {string|null} [member] BindingDelta member + * @property {google.type.IExpr|null} [condition] BindingDelta condition + */ + + /** + * Constructs a new BindingDelta. + * @memberof google.iam.v1 + * @classdesc Represents a BindingDelta. + * @implements IBindingDelta + * @constructor + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + */ + function BindingDelta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return typeUrlPrefix + "/google.protobuf.BoolValue"; - }; - return BoolValue; - })(); + /** + * BindingDelta action. + * @member {google.iam.v1.BindingDelta.Action} action + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.action = 0; - protobuf.StringValue = (function() { + /** + * BindingDelta role. + * @member {string} role + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.role = ""; - /** - * Properties of a StringValue. - * @memberof google.protobuf - * @interface IStringValue - * @property {string|null} [value] StringValue value - */ + /** + * BindingDelta member. + * @member {string} member + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.member = ""; - /** - * Constructs a new StringValue. - * @memberof google.protobuf - * @classdesc Represents a StringValue. - * @implements IStringValue - * @constructor - * @param {google.protobuf.IStringValue=} [properties] Properties to set - */ - function StringValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * BindingDelta condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.condition = null; - /** - * StringValue value. - * @member {string} value - * @memberof google.protobuf.StringValue - * @instance - */ - StringValue.prototype.value = ""; + /** + * Creates a new BindingDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + * @returns {google.iam.v1.BindingDelta} BindingDelta instance + */ + BindingDelta.create = function create(properties) { + return new BindingDelta(properties); + }; - /** - * Creates a new StringValue instance using the specified properties. - * @function create - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue=} [properties] Properties to set - * @returns {google.protobuf.StringValue} StringValue instance - */ - StringValue.create = function create(properties) { - return new StringValue(properties); - }; + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); + if (message.member != null && Object.hasOwnProperty.call(message, "member")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - return writer; - }; + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.role = reader.string(); + break; + } + case 3: { + message.member = reader.string(); + break; + } + case 4: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a StringValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.StringValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.StringValue} StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringValue.decode = function 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.StringValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BindingDelta message. + * @function verify + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BindingDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: break; } + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.member != null && message.hasOwnProperty("member")) + if (!$util.isString(message.member)) + return "member: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.BindingDelta} BindingDelta + */ + BindingDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.BindingDelta) + return object; + var message = new $root.google.iam.v1.BindingDelta(); + switch (object.action) { default: - reader.skipType(tag & 7); + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; break; } - } - return message; - }; + if (object.role != null) + message.role = String(object.role); + if (object.member != null) + message.member = String(object.member); + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; - /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.StringValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.StringValue} StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.BindingDelta} message BindingDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BindingDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.role = ""; + object.member = ""; + object.condition = null; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.member != null && message.hasOwnProperty("member")) + object.member = message.member; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; - /** - * Verifies a StringValue message. - * @function verify - * @memberof google.protobuf.StringValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; + /** + * Converts this BindingDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.BindingDelta + * @instance + * @returns {Object.} JSON object + */ + BindingDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.StringValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.StringValue} StringValue - */ - StringValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.StringValue) - return object; - var message = new $root.google.protobuf.StringValue(); - if (object.value != null) - message.value = String(object.value); - return message; - }; + /** + * Gets the default type url for BindingDelta + * @function getTypeUrl + * @memberof google.iam.v1.BindingDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BindingDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.BindingDelta"; + }; - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.StringValue} message StringValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; + /** + * Action enum. + * @name google.iam.v1.BindingDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + BindingDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); - /** - * Converts this StringValue to JSON. - * @function toJSON - * @memberof google.protobuf.StringValue - * @instance - * @returns {Object.} JSON object - */ - StringValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return BindingDelta; + })(); - /** - * Gets the default type url for StringValue - * @function getTypeUrl - * @memberof google.protobuf.StringValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + v1.AuditConfigDelta = (function() { + + /** + * Properties of an AuditConfigDelta. + * @memberof google.iam.v1 + * @interface IAuditConfigDelta + * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action + * @property {string|null} [service] AuditConfigDelta service + * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember + * @property {string|null} [logType] AuditConfigDelta logType + */ + + /** + * Constructs a new AuditConfigDelta. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfigDelta. + * @implements IAuditConfigDelta + * @constructor + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + */ + function AuditConfigDelta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return typeUrlPrefix + "/google.protobuf.StringValue"; - }; - return StringValue; - })(); + /** + * AuditConfigDelta action. + * @member {google.iam.v1.AuditConfigDelta.Action} action + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.action = 0; - protobuf.BytesValue = (function() { + /** + * AuditConfigDelta service. + * @member {string} service + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.service = ""; - /** - * Properties of a BytesValue. - * @memberof google.protobuf - * @interface IBytesValue - * @property {Uint8Array|null} [value] BytesValue value - */ + /** + * AuditConfigDelta exemptedMember. + * @member {string} exemptedMember + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.exemptedMember = ""; - /** - * Constructs a new BytesValue. - * @memberof google.protobuf - * @classdesc Represents a BytesValue. - * @implements IBytesValue - * @constructor - * @param {google.protobuf.IBytesValue=} [properties] Properties to set - */ - function BytesValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * AuditConfigDelta logType. + * @member {string} logType + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.logType = ""; - /** - * BytesValue value. - * @member {Uint8Array} value - * @memberof google.protobuf.BytesValue - * @instance - */ - BytesValue.prototype.value = $util.newBuffer([]); + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance + */ + AuditConfigDelta.create = function create(properties) { + return new AuditConfigDelta(properties); + }; - /** - * Creates a new BytesValue instance using the specified properties. - * @function create - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue=} [properties] Properties to set - * @returns {google.protobuf.BytesValue} BytesValue instance - */ - BytesValue.create = function create(properties) { - return new BytesValue(properties); - }; + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); + if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); + return writer; + }; - /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BytesValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); - return writer; - }; + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BytesValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.service = reader.string(); + break; + } + case 3: { + message.exemptedMember = reader.string(); + break; + } + case 4: { + message.logType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a BytesValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.BytesValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.BytesValue} BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BytesValue.decode = function 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.BytesValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.bytes(); + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfigDelta message. + * @function verify + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfigDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: break; } + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + if (!$util.isString(message.exemptedMember)) + return "exemptedMember: string expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + if (!$util.isString(message.logType)) + return "logType: string expected"; + return null; + }; + + /** + * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + */ + AuditConfigDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfigDelta) + return object; + var message = new $root.google.iam.v1.AuditConfigDelta(); + switch (object.action) { default: - reader.skipType(tag & 7); + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; break; } - } - return message; - }; - - /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.BytesValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.BytesValue} BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BytesValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BytesValue message. - * @function verify - * @memberof google.protobuf.BytesValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BytesValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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; - }; + if (object.service != null) + message.service = String(object.service); + if (object.exemptedMember != null) + message.exemptedMember = String(object.exemptedMember); + if (object.logType != null) + message.logType = String(object.logType); + return message; + }; - /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.BytesValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.BytesValue} BytesValue - */ - BytesValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BytesValue) + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfigDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.service = ""; + object.exemptedMember = ""; + object.logType = ""; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + object.exemptedMember = message.exemptedMember; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = message.logType; return object; - var message = new $root.google.protobuf.BytesValue(); - 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 a BytesValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.BytesValue} message BytesValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BytesValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); + /** + * Converts this AuditConfigDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfigDelta + * @instance + * @returns {Object.} JSON object + */ + AuditConfigDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditConfigDelta + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - 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; - }; + return typeUrlPrefix + "/google.iam.v1.AuditConfigDelta"; + }; - /** - * Converts this BytesValue to JSON. - * @function toJSON - * @memberof google.protobuf.BytesValue - * @instance - * @returns {Object.} JSON object - */ - BytesValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Action enum. + * @name google.iam.v1.AuditConfigDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + AuditConfigDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); - /** - * Gets the default type url for BytesValue - * @function getTypeUrl - * @memberof google.protobuf.BytesValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.BytesValue"; - }; + return AuditConfigDelta; + })(); - return BytesValue; + return v1; })(); - return protobuf; + return iam; })(); google.longrunning = (function() { @@ -26222,290 +61808,6 @@ 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; })(); diff --git a/packages/google-cloud-backupdr/protos/protos.json b/packages/google-cloud-backupdr/protos/protos.json index c0760fa65b1..f9f1f1014e7 100644 --- a/packages/google-cloud-backupdr/protos/protos.json +++ b/packages/google-cloud-backupdr/protos/protos.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": { @@ -11,7 +14,7 @@ "csharp_namespace": "Google.Cloud.BackupDR.V1", "go_package": "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb", "java_multiple_files": true, - "java_outer_classname": "BackupDRProto", + "java_outer_classname": "BackupvaultGceProto", "java_package": "com.google.cloud.backupdr.v1", "php_namespace": "Google\\Cloud\\BackupDR\\V1", "ruby_package": "Google::Cloud::BackupDR::V1" @@ -112,430 +115,5217 @@ } } ] + }, + "CreateBackupVault": { + "requestType": "CreateBackupVaultRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupVaults", + "(google.api.http).body": "backup_vault", + "(google.api.method_signature)": "parent,backup_vault,backup_vault_id", + "(google.longrunning.operation_info).response_type": "BackupVault", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/backupVaults", + "body": "backup_vault" + } + }, + { + "(google.api.method_signature)": "parent,backup_vault,backup_vault_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupVault", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListBackupVaults": { + "requestType": "ListBackupVaultsRequest", + "responseType": "ListBackupVaultsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupVaults", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/backupVaults" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "FetchUsableBackupVaults": { + "requestType": "FetchUsableBackupVaultsRequest", + "responseType": "FetchUsableBackupVaultsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetBackupVault": { + "requestType": "GetBackupVaultRequest", + "responseType": "BackupVault", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupVaults/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateBackupVault": { + "requestType": "UpdateBackupVaultRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}", + "(google.api.http).body": "backup_vault", + "(google.api.method_signature)": "backup_vault,update_mask", + "(google.longrunning.operation_info).response_type": "BackupVault", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}", + "body": "backup_vault" + } + }, + { + "(google.api.method_signature)": "backup_vault,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupVault", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteBackupVault": { + "requestType": "DeleteBackupVaultRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupVaults/*}", + "(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/*/backupVaults/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "TestIamPermissions": { + "requestType": "google.iam.v1.TestIamPermissionsRequest", + "responseType": "google.iam.v1.TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/locations/*/backupVaults/*}:testIamPermissions", + "(google.api.http).body": "*", + "(google.api.method_signature)": "resource, permissions" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=projects/*/locations/*/backupVaults/*}:testIamPermissions", + "body": "*" + } + }, + { + "(google.api.method_signature)": "resource, permissions" + } + ] + }, + "ListDataSources": { + "requestType": "ListDataSourcesRequest", + "responseType": "ListDataSourcesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDataSource": { + "requestType": "GetDataSourceRequest", + "responseType": "DataSource", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateDataSource": { + "requestType": "UpdateDataSourceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}", + "(google.api.http).body": "data_source", + "(google.api.method_signature)": "data_source,update_mask", + "(google.longrunning.operation_info).response_type": "DataSource", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}", + "body": "data_source" + } + }, + { + "(google.api.method_signature)": "data_source,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataSource", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "RemoveDataSource": { + "requestType": "RemoveDataSourceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:remove", + "(google.api.http).body": "*", + "(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)": { + "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:remove", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "SetInternalStatus": { + "requestType": "SetInternalStatusRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:setInternalStatus", + "(google.api.http).body": "*", + "(google.api.method_signature)": "data_source", + "(google.longrunning.operation_info).response_type": "SetInternalStatusResponse", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:setInternalStatus", + "body": "*" + } + }, + { + "(google.api.method_signature)": "data_source" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "SetInternalStatusResponse", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "InitiateBackup": { + "requestType": "InitiateBackupRequest", + "responseType": "InitiateBackupResponse", + "options": { + "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:initiateBackup", + "(google.api.http).body": "*", + "(google.api.method_signature)": "data_source" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:initiateBackup", + "body": "*" + } + }, + { + "(google.api.method_signature)": "data_source" + } + ] + }, + "AbandonBackup": { + "requestType": "AbandonBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:abandonBackup", + "(google.api.http).body": "*", + "(google.api.method_signature)": "data_source", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:abandonBackup", + "body": "*" + } + }, + { + "(google.api.method_signature)": "data_source" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "FinalizeBackup": { + "requestType": "FinalizeBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:finalizeBackup", + "(google.api.http).body": "*", + "(google.api.method_signature)": "data_source", + "(google.longrunning.operation_info).response_type": "Backup", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:finalizeBackup", + "body": "*" + } + }, + { + "(google.api.method_signature)": "data_source" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Backup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "FetchAccessToken": { + "requestType": "FetchAccessTokenRequest", + "responseType": "FetchAccessTokenResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBackups": { + "requestType": "ListBackupsRequest", + "responseType": "ListBackupsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetBackup": { + "requestType": "GetBackupRequest", + "responseType": "Backup", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateBackup": { + "requestType": "UpdateBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "(google.api.http).body": "backup", + "(google.api.method_signature)": "backup,update_mask", + "(google.longrunning.operation_info).response_type": "Backup", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "body": "backup" + } + }, + { + "(google.api.method_signature)": "backup,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Backup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteBackup": { + "requestType": "DeleteBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "Backup", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Backup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "RestoreBackup": { + "requestType": "RestoreBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "RestoreBackupResponse", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "RestoreBackupResponse", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateBackupPlan": { + "requestType": "CreateBackupPlanRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupPlans", + "(google.api.http).body": "backup_plan", + "(google.api.method_signature)": "parent,backup_plan,backup_plan_id", + "(google.longrunning.operation_info).response_type": "BackupPlan", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/backupPlans", + "body": "backup_plan" + } + }, + { + "(google.api.method_signature)": "parent,backup_plan,backup_plan_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPlan", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetBackupPlan": { + "requestType": "GetBackupPlanRequest", + "responseType": "BackupPlan", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupPlans/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupPlans/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBackupPlans": { + "requestType": "ListBackupPlansRequest", + "responseType": "ListBackupPlansResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupPlans", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/backupPlans" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteBackupPlan": { + "requestType": "DeleteBackupPlanRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupPlans/*}", + "(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/*/backupPlans/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateBackupPlanAssociation": { + "requestType": "CreateBackupPlanAssociationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", + "(google.api.http).body": "backup_plan_association", + "(google.api.method_signature)": "parent,backup_plan_association,backup_plan_association_id", + "(google.longrunning.operation_info).response_type": "BackupPlanAssociation", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", + "body": "backup_plan_association" + } + }, + { + "(google.api.method_signature)": "parent,backup_plan_association,backup_plan_association_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPlanAssociation", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetBackupPlanAssociation": { + "requestType": "GetBackupPlanAssociationRequest", + "responseType": "BackupPlanAssociation", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBackupPlanAssociations": { + "requestType": "ListBackupPlanAssociationsRequest", + "responseType": "ListBackupPlanAssociationsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteBackupPlanAssociation": { + "requestType": "DeleteBackupPlanAssociationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}", + "(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/*/backupPlanAssociations/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "TriggerBackup": { + "requestType": "TriggerBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,rule_id", + "(google.longrunning.operation_info).response_type": "BackupPlanAssociation", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name,rule_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPlanAssociation", + "metadata_type": "OperationMetadata" + } + } + ] + } + } + }, + "NetworkConfig": { + "fields": { + "network": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "peeringMode": { + "type": "PeeringMode", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "PeeringMode": { + "values": { + "PEERING_MODE_UNSPECIFIED": 0, + "PRIVATE_SERVICE_ACCESS": 1 + } + } + } + }, + "ManagementURI": { + "fields": { + "webUi": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "api": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "WorkforceIdentityBasedManagementURI": { + "fields": { + "firstPartyManagementUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "thirdPartyManagementUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "WorkforceIdentityBasedOAuth2ClientID": { + "fields": { + "firstPartyOauth2ClientId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "thirdPartyOauth2ClientId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ManagementServer": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/ManagementServer", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/managementServers/{managementserver}", + "(google.api.resource).plural": "managementServers", + "(google.api.resource).singular": "managementServer" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "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" + } + }, + "type": { + "type": "InstanceType", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "managementUri": { + "type": "ManagementURI", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "workforceIdentityBasedManagementUri": { + "type": "WorkforceIdentityBasedManagementURI", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "InstanceState", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "networks": { + "rule": "repeated", + "type": "NetworkConfig", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "etag": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "oauth2ClientId": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "workforceIdentityBasedOauth2ClientId": { + "type": "WorkforceIdentityBasedOAuth2ClientID", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "baProxyUri": { + "rule": "repeated", + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzs": { + "type": "google.protobuf.BoolValue", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzi": { + "type": "bool", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "InstanceType": { + "values": { + "INSTANCE_TYPE_UNSPECIFIED": 0, + "BACKUP_RESTORE": 1 + } + }, + "InstanceState": { + "values": { + "INSTANCE_STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "UPDATING": 3, + "DELETING": 4, + "REPAIRING": 5, + "MAINTENANCE": 6, + "ERROR": 7 + } + } + } + }, + "ListManagementServersRequest": { + "oneofs": { + "_filter": { + "oneof": [ + "filter" + ] + }, + "_orderBy": { + "oneof": [ + "orderBy" + ] + } + }, + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ListManagementServersResponse": { + "fields": { + "managementServers": { + "rule": "repeated", + "type": "ManagementServer", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetManagementServerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" + } + } + } + }, + "CreateManagementServerRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" + } + }, + "managementServerId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "managementServer": { + "type": "ManagementServer", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteManagementServerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" + } + }, + "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" + } + }, + "additionalInfo": { + "keyType": "string", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "BackupPlan": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/BackupPlan", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPlans/{backup_plan}", + "(google.api.resource).plural": "backupPlans", + "(google.api.resource).singular": "backupPlan" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupRules": { + "rule": "repeated", + "type": "BackupRule", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceType": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "etag": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupVault": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" + } + }, + "backupVaultServiceAccount": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "INACTIVE": 4 + } + } + } + }, + "BackupRule": { + "oneofs": { + "backupScheduleOneof": { + "oneof": [ + "standardSchedule" + ] + } + }, + "fields": { + "ruleId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "backupRetentionDays": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "standardSchedule": { + "type": "StandardSchedule", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "StandardSchedule": { + "fields": { + "recurrenceType": { + "type": "RecurrenceType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "hourlyFrequency": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "daysOfWeek": { + "rule": "repeated", + "type": "google.type.DayOfWeek", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "daysOfMonth": { + "rule": "repeated", + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "weekDayOfMonth": { + "type": "WeekDayOfMonth", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "months": { + "rule": "repeated", + "type": "google.type.Month", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupWindow": { + "type": "BackupWindow", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "timeZone": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "RecurrenceType": { + "values": { + "RECURRENCE_TYPE_UNSPECIFIED": 0, + "HOURLY": 1, + "DAILY": 2, + "WEEKLY": 3, + "MONTHLY": 4, + "YEARLY": 5 + } + } + } + }, + "BackupWindow": { + "fields": { + "startHourOfDay": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "endHourOfDay": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "WeekDayOfMonth": { + "fields": { + "weekOfMonth": { + "type": "WeekOfMonth", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dayOfWeek": { + "type": "google.type.DayOfWeek", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "WeekOfMonth": { + "values": { + "WEEK_OF_MONTH_UNSPECIFIED": 0, + "FIRST": 1, + "SECOND": 2, + "THIRD": 3, + "FOURTH": 4, + "LAST": 5 + } + } + } + }, + "CreateBackupPlanRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlan" + } + }, + "backupPlanId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupPlan": { + "type": "BackupPlan", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlansRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlan" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlansResponse": { + "fields": { + "backupPlans": { + "rule": "repeated", + "type": "BackupPlan", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetBackupPlanRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + } + } + }, + "DeleteBackupPlanRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "BackupPlanAssociation": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/BackupPlanAssociation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}", + "(google.api.resource).plural": "backupPlanAssociations", + "(google.api.resource).singular": "backupPlanAssociation" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceType": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "resource": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupPlan": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rulesConfigInfo": { + "rule": "repeated", + "type": "RuleConfigInfo", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataSource": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "INACTIVE": 4 + } + } + } + }, + "RuleConfigInfo": { + "fields": { + "ruleId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastBackupState": { + "type": "LastBackupState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastBackupError": { + "type": "google.rpc.Status", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastSuccessfulBackupConsistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "LastBackupState": { + "values": { + "LAST_BACKUP_STATE_UNSPECIFIED": 0, + "FIRST_BACKUP_PENDING": 1, + "PERMISSION_DENIED": 2, + "SUCCEEDED": 3, + "FAILED": 4 + } + } + } + }, + "CreateBackupPlanAssociationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "backupPlanAssociationId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupPlanAssociation": { + "type": "BackupPlanAssociation", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlanAssociationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlanAssociationsResponse": { + "fields": { + "backupPlanAssociations": { + "rule": "repeated", + "type": "BackupPlanAssociation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetBackupPlanAssociationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + } + } + }, + "DeleteBackupPlanAssociationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "TriggerBackupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "ruleId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "BackupVault": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/BackupVault", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}", + "(google.api.resource).plural": "backupVaults", + "(google.api.resource).singular": "backupVault" + }, + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_createTime": { + "oneof": [ + "createTime" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + }, + "_backupMinimumEnforcedRetentionDuration": { + "oneof": [ + "backupMinimumEnforcedRetentionDuration" + ] + }, + "_deletable": { + "oneof": [ + "deletable" + ] + }, + "_etag": { + "oneof": [ + "etag" + ] + }, + "_effectiveTime": { + "oneof": [ + "effectiveTime" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "backupMinimumEnforcedRetentionDuration": { + "type": "google.protobuf.Duration", + "id": 20, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "deletable": { + "type": "bool", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "etag": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "state": { + "type": "State", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "effectiveTime": { + "type": "google.protobuf.Timestamp", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "backupCount": { + "type": "int64", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceAccount": { + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "totalStoredBytes": { + "type": "int64", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uid": { + "type": "string", + "id": 21, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "accessRestriction": { + "type": "AccessRestriction", + "id": 24, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "ERROR": 4 + } + }, + "AccessRestriction": { + "values": { + "ACCESS_RESTRICTION_UNSPECIFIED": 0, + "WITHIN_PROJECT": 1, + "WITHIN_ORGANIZATION": 2, + "UNRESTRICTED": 3 + } + } + } + }, + "DataSource": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/DataSource", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}", + "(google.api.resource).plural": "dataSources", + "(google.api.resource).singular": "dataSource" + }, + "oneofs": { + "_createTime": { + "oneof": [ + "createTime" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + }, + "_backupCount": { + "oneof": [ + "backupCount" + ] + }, + "_etag": { + "oneof": [ + "etag" + ] + }, + "_totalStoredBytes": { + "oneof": [ + "totalStoredBytes" + ] + }, + "sourceResource": { + "oneof": [ + "dataSourceGcpResource", + "dataSourceBackupApplianceApplication" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "state": { + "type": "State", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "backupCount": { + "type": "int64", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "etag": { + "type": "string", + "id": 14, + "options": { + "proto3_optional": true + } + }, + "totalStoredBytes": { + "type": "int64", + "id": 23, + "options": { + "proto3_optional": true + } + }, + "configState": { + "type": "BackupConfigState", + "id": 24, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupConfigInfo": { + "type": "BackupConfigInfo", + "id": 25, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataSourceGcpResource": { + "type": "DataSourceGcpResource", + "id": 26 + }, + "dataSourceBackupApplianceApplication": { + "type": "DataSourceBackupApplianceApplication", + "id": 27 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "ERROR": 4 + } + } + } + }, + "BackupConfigInfo": { + "oneofs": { + "backupConfig": { + "oneof": [ + "gcpBackupConfig", + "backupApplianceBackupConfig" + ] + } + }, + "fields": { + "lastBackupState": { + "type": "LastBackupState", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastSuccessfulBackupConsistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastBackupError": { + "type": "google.rpc.Status", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gcpBackupConfig": { + "type": "GcpBackupConfig", + "id": 4 + }, + "backupApplianceBackupConfig": { + "type": "BackupApplianceBackupConfig", + "id": 5 + } + }, + "nested": { + "LastBackupState": { + "values": { + "LAST_BACKUP_STATE_UNSPECIFIED": 0, + "FIRST_BACKUP_PENDING": 1, + "SUCCEEDED": 2, + "FAILED": 3, + "PERMISSION_DENIED": 4 + } + } + } + }, + "GcpBackupConfig": { + "fields": { + "backupPlan": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "backupPlanDescription": { + "type": "string", + "id": 2 + }, + "backupPlanAssociation": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "backupPlanRules": { + "rule": "repeated", + "type": "string", + "id": 4 + } + } + }, + "BackupApplianceBackupConfig": { + "fields": { + "backupApplianceName": { + "type": "string", + "id": 1 + }, + "backupApplianceId": { + "type": "int64", + "id": 2 + }, + "slaId": { + "type": "int64", + "id": 3 + }, + "applicationName": { + "type": "string", + "id": 4 + }, + "hostName": { + "type": "string", + "id": 5 + }, + "sltName": { + "type": "string", + "id": 6 + }, + "slpName": { + "type": "string", + "id": 7 + } + } + }, + "DataSourceGcpResource": { + "oneofs": { + "gcpResourceProperties": { + "oneof": [ + "computeInstanceDatasourceProperties" + ] + } + }, + "fields": { + "gcpResourcename": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "location": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "computeInstanceDatasourceProperties": { + "type": "ComputeInstanceDataSourceProperties", + "id": 4 + } + } + }, + "DataSourceBackupApplianceApplication": { + "fields": { + "applicationName": { + "type": "string", + "id": 1 + }, + "backupAppliance": { + "type": "string", + "id": 2 + }, + "applianceId": { + "type": "int64", + "id": 3 + }, + "type": { + "type": "string", + "id": 4 + }, + "applicationId": { + "type": "int64", + "id": 8 + }, + "hostname": { + "type": "string", + "id": 6 + }, + "hostId": { + "type": "int64", + "id": 7 + } + } + }, + "ServiceLockInfo": { + "fields": { + "operation": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "BackupApplianceLockInfo": { + "oneofs": { + "lockSource": { + "oneof": [ + "jobName", + "backupImage", + "slaId" + ] + } + }, + "fields": { + "backupApplianceId": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupApplianceName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "lockReason": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "jobName": { + "type": "string", + "id": 6 + }, + "backupImage": { + "type": "string", + "id": 7 + }, + "slaId": { + "type": "int64", + "id": 8 + } + } + }, + "BackupLock": { + "oneofs": { + "ClientLockInfo": { + "oneof": [ + "backupApplianceLockInfo", + "serviceLockInfo" + ] + } + }, + "fields": { + "lockUntilTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupApplianceLockInfo": { + "type": "BackupApplianceLockInfo", + "id": 3 + }, + "serviceLockInfo": { + "type": "ServiceLockInfo", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Backup": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/Backup", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}", + "(google.api.resource).plural": "backups", + "(google.api.resource).singular": "backup" + }, + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_createTime": { + "oneof": [ + "createTime" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + }, + "_enforcedRetentionEndTime": { + "oneof": [ + "enforcedRetentionEndTime" + ] + }, + "_expireTime": { + "oneof": [ + "expireTime" + ] + }, + "_consistencyTime": { + "oneof": [ + "consistencyTime" + ] + }, + "_etag": { + "oneof": [ + "etag" + ] + }, + "backupProperties": { + "oneof": [ + "computeInstanceBackupProperties", + "backupApplianceBackupProperties" + ] + }, + "planInfo": { + "oneof": [ + "gcpBackupPlanInfo" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "enforcedRetentionEndTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "consistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "etag": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "state": { + "type": "State", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceLocks": { + "rule": "repeated", + "type": "BackupLock", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupApplianceLocks": { + "rule": "repeated", + "type": "BackupLock", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "computeInstanceBackupProperties": { + "type": "ComputeInstanceBackupProperties", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupApplianceBackupProperties": { + "type": "BackupApplianceBackupProperties", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupType": { + "type": "BackupType", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gcpBackupPlanInfo": { + "type": "GCPBackupPlanInfo", + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceSizeBytes": { + "type": "int64", + "id": 23, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "ERROR": 4 + } + }, + "BackupType": { + "values": { + "BACKUP_TYPE_UNSPECIFIED": 0, + "SCHEDULED": 1, + "ON_DEMAND": 2 + } + }, + "GCPBackupPlanInfo": { + "fields": { + "backupPlan": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "backupPlanRuleId": { + "type": "string", + "id": 2 + } + } + } + } + }, + "CreateBackupVaultRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" + } + }, + "backupVaultId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupVault": { + "type": "BackupVault", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupVaultsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "view": { + "type": "BackupVaultView", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupVaultsResponse": { + "fields": { + "backupVaults": { + "rule": "repeated", + "type": "BackupVault", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "FetchUsableBackupVaultsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchUsableBackupVaultsResponse": { + "fields": { + "backupVaults": { + "rule": "repeated", + "type": "BackupVault", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetBackupVaultRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" + } + }, + "view": { + "type": "BackupVaultView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateBackupVaultRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupVault": { + "type": "BackupVault", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(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" + } + } + } + }, + "DeleteBackupVaultRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "force": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "etag": { + "type": "string", + "id": 4 + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataSourcesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/DataSource" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataSourcesResponse": { + "fields": { + "dataSources": { + "rule": "repeated", + "type": "DataSource", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetDataSourceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + } + } + }, + "UpdateDataSourceRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataSource": { + "type": "DataSource", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RemoveDataSourceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SetInternalStatusRequest": { + "fields": { + "dataSource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "value": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupConfigState": { + "type": "BackupConfigState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SetInternalStatusResponse": { + "fields": {} + }, + "InitiateBackupRequest": { + "fields": { + "dataSource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupId": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "InitiateBackupResponse": { + "fields": { + "backup": { + "type": "string", + "id": 1 + }, + "newBackupGenerationId": { + "type": "int32", + "id": 2 + }, + "baseBackupGenerationId": { + "type": "int32", + "id": 3 + } + } + }, + "AbandonBackupRequest": { + "fields": { + "dataSource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FinalizeBackupRequest": { + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_consistencyTime": { + "oneof": [ + "consistencyTime" + ] + }, + "_recoveryRangeStartTime": { + "oneof": [ + "recoveryRangeStartTime" + ] + }, + "_recoveryRangeEndTime": { + "oneof": [ + "recoveryRangeEndTime" + ] + }, + "_retentionDuration": { + "oneof": [ + "retentionDuration" + ] + } + }, + "fields": { + "dataSource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "consistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupId": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "recoveryRangeStartTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "recoveryRangeEndTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "retentionDuration": { + "type": "google.protobuf.Duration", + "id": 9, + "options": { + "proto3_optional": true + } + } + } + }, + "FetchAccessTokenRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "generationId": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "FetchAccessTokenResponse": { + "fields": { + "readLocation": { + "type": "string", + "id": 1 + }, + "writeLocation": { + "type": "string", + "id": 2 + }, + "token": { + "type": "string", + "id": 3 + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + } + } + }, + "ListBackupsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/Backup" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "view": { + "type": "BackupView", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupsResponse": { + "fields": { + "backups": { + "rule": "repeated", + "type": "Backup", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetBackupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" + } + }, + "view": { + "type": "BackupView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateBackupRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backup": { + "type": "Backup", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteBackupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RestoreBackupRequest": { + "oneofs": { + "targetEnvironment": { + "oneof": [ + "computeInstanceTargetEnvironment" + ] + }, + "instanceProperties": { + "oneof": [ + "computeInstanceRestoreProperties" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "computeInstanceTargetEnvironment": { + "type": "ComputeInstanceTargetEnvironment", + "id": 3 + }, + "computeInstanceRestoreProperties": { + "type": "ComputeInstanceRestoreProperties", + "id": 4 + } + } + }, + "RestoreBackupResponse": { + "fields": { + "targetResource": { + "type": "TargetResource", + "id": 1 + } + } + }, + "TargetResource": { + "oneofs": { + "targetResourceInfo": { + "oneof": [ + "gcpResource" + ] + } + }, + "fields": { + "gcpResource": { + "type": "GcpResource", + "id": 1 + } + } + }, + "GcpResource": { + "fields": { + "gcpResourcename": { + "type": "string", + "id": 1 + }, + "location": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + } + } + }, + "BackupConfigState": { + "values": { + "BACKUP_CONFIG_STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "PASSIVE": 2 + } + }, + "BackupView": { + "values": { + "BACKUP_VIEW_UNSPECIFIED": 0, + "BACKUP_VIEW_BASIC": 1, + "BACKUP_VIEW_FULL": 2 + } + }, + "BackupVaultView": { + "values": { + "BACKUP_VAULT_VIEW_UNSPECIFIED": 0, + "BACKUP_VAULT_VIEW_BASIC": 1, + "BACKUP_VAULT_VIEW_FULL": 2 + } + }, + "BackupApplianceBackupProperties": { + "oneofs": { + "_generationId": { + "oneof": [ + "generationId" + ] + }, + "_finalizeTime": { + "oneof": [ + "finalizeTime" + ] + }, + "_recoveryRangeStartTime": { + "oneof": [ + "recoveryRangeStartTime" + ] + }, + "_recoveryRangeEndTime": { + "oneof": [ + "recoveryRangeEndTime" + ] + } + }, + "fields": { + "generationId": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "finalizeTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "recoveryRangeStartTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "recoveryRangeEndTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ComputeInstanceBackupProperties": { + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_tags": { + "oneof": [ + "tags" + ] + }, + "_machineType": { + "oneof": [ + "machineType" + ] + }, + "_canIpForward": { + "oneof": [ + "canIpForward" + ] + }, + "_metadata": { + "oneof": [ + "metadata" + ] + }, + "_scheduling": { + "oneof": [ + "scheduling" + ] + }, + "_minCpuPlatform": { + "oneof": [ + "minCpuPlatform" + ] + }, + "_keyRevocationActionType": { + "oneof": [ + "keyRevocationActionType" + ] + }, + "_sourceInstance": { + "oneof": [ + "sourceInstance" + ] + } + }, + "fields": { + "description": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "tags": { + "type": "Tags", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "machineType": { + "type": "string", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "canIpForward": { + "type": "bool", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "networkInterface": { + "rule": "repeated", + "type": "NetworkInterface", + "id": 5 + }, + "disk": { + "rule": "repeated", + "type": "AttachedDisk", + "id": 6 + }, + "metadata": { + "type": "Metadata", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "serviceAccount": { + "rule": "repeated", + "type": "ServiceAccount", + "id": 8 + }, + "scheduling": { + "type": "Scheduling", + "id": 9, + "options": { + "proto3_optional": true + } + }, + "guestAccelerator": { + "rule": "repeated", + "type": "AcceleratorConfig", + "id": 10 + }, + "minCpuPlatform": { + "type": "string", + "id": 11, + "options": { + "proto3_optional": true + } + }, + "keyRevocationActionType": { + "type": "KeyRevocationActionType", + "id": 12, + "options": { + "proto3_optional": true + } + }, + "sourceInstance": { + "type": "string", + "id": 13, + "options": { + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 14 + } + } + }, + "ComputeInstanceRestoreProperties": { + "oneofs": { + "_name": { + "oneof": [ + "name" + ] + }, + "_advancedMachineFeatures": { + "oneof": [ + "advancedMachineFeatures" + ] + }, + "_canIpForward": { + "oneof": [ + "canIpForward" + ] + }, + "_confidentialInstanceConfig": { + "oneof": [ + "confidentialInstanceConfig" + ] + }, + "_deletionProtection": { + "oneof": [ + "deletionProtection" + ] + }, + "_description": { + "oneof": [ + "description" + ] + }, + "_displayDevice": { + "oneof": [ + "displayDevice" + ] + }, + "_hostname": { + "oneof": [ + "hostname" + ] + }, + "_instanceEncryptionKey": { + "oneof": [ + "instanceEncryptionKey" + ] + }, + "_keyRevocationActionType": { + "oneof": [ + "keyRevocationActionType" + ] + }, + "_machineType": { + "oneof": [ + "machineType" + ] + }, + "_metadata": { + "oneof": [ + "metadata" + ] + }, + "_minCpuPlatform": { + "oneof": [ + "minCpuPlatform" + ] + }, + "_networkPerformanceConfig": { + "oneof": [ + "networkPerformanceConfig" + ] + }, + "_params": { + "oneof": [ + "params" + ] + }, + "_privateIpv6GoogleAccess": { + "oneof": [ + "privateIpv6GoogleAccess" + ] + }, + "_allocationAffinity": { + "oneof": [ + "allocationAffinity" + ] + }, + "_scheduling": { + "oneof": [ + "scheduling" + ] + }, + "_tags": { + "oneof": [ + "tags" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "advancedMachineFeatures": { + "type": "AdvancedMachineFeatures", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "canIpForward": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "confidentialInstanceConfig": { + "type": "ConfidentialInstanceConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "deletionProtection": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "description": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "disks": { + "rule": "repeated", + "type": "AttachedDisk", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayDevice": { + "type": "DisplayDevice", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "guestAccelerators": { + "rule": "repeated", + "type": "AcceleratorConfig", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "hostname": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "instanceEncryptionKey": { + "type": "CustomerEncryptionKey", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "keyRevocationActionType": { + "type": "KeyRevocationActionType", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "machineType": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "metadata": { + "type": "Metadata", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "minCpuPlatform": { + "type": "string", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "networkInterfaces": { + "rule": "repeated", + "type": "NetworkInterface", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "networkPerformanceConfig": { + "type": "NetworkPerformanceConfig", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "params": { + "type": "InstanceParams", + "id": 19, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY", + "proto3_optional": true + } + }, + "privateIpv6GoogleAccess": { + "type": "InstancePrivateIpv6GoogleAccess", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "allocationAffinity": { + "type": "AllocationAffinity", + "id": 21, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "resourcePolicies": { + "rule": "repeated", + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "scheduling": { + "type": "Scheduling", + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "serviceAccounts": { + "rule": "repeated", + "type": "ServiceAccount", + "id": 24, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tags": { + "type": "Tags", + "id": 26, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "InstancePrivateIpv6GoogleAccess": { + "values": { + "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": 0, + "INHERIT_FROM_SUBNETWORK": 1, + "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE": 2, + "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE": 3 + } + } + } + }, + "ComputeInstanceTargetEnvironment": { + "fields": { + "project": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ComputeInstanceDataSourceProperties": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "machineType": { + "type": "string", + "id": 3 + }, + "totalDiskCount": { + "type": "int64", + "id": 4 + }, + "totalDiskSizeGb": { + "type": "int64", + "id": 5 + } + } + }, + "AdvancedMachineFeatures": { + "oneofs": { + "_enableNestedVirtualization": { + "oneof": [ + "enableNestedVirtualization" + ] + }, + "_threadsPerCore": { + "oneof": [ + "threadsPerCore" + ] + }, + "_visibleCoreCount": { + "oneof": [ + "visibleCoreCount" + ] + }, + "_enableUefiNetworking": { + "oneof": [ + "enableUefiNetworking" + ] + } + }, + "fields": { + "enableNestedVirtualization": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "threadsPerCore": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "visibleCoreCount": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "enableUefiNetworking": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ConfidentialInstanceConfig": { + "oneofs": { + "_enableConfidentialCompute": { + "oneof": [ + "enableConfidentialCompute" + ] + } + }, + "fields": { + "enableConfidentialCompute": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "DisplayDevice": { + "oneofs": { + "_enableDisplay": { + "oneof": [ + "enableDisplay" + ] + } + }, + "fields": { + "enableDisplay": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "AcceleratorConfig": { + "oneofs": { + "_acceleratorType": { + "oneof": [ + "acceleratorType" + ] + }, + "_acceleratorCount": { + "oneof": [ + "acceleratorCount" + ] + } + }, + "fields": { + "acceleratorType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "acceleratorCount": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "CustomerEncryptionKey": { + "oneofs": { + "key": { + "oneof": [ + "rawKey", + "rsaEncryptedKey", + "kmsKeyName" + ] + }, + "_kmsKeyServiceAccount": { + "oneof": [ + "kmsKeyServiceAccount" + ] + } + }, + "fields": { + "rawKey": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "rsaEncryptedKey": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kmsKeyName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kmsKeyServiceAccount": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "Entry": { + "oneofs": { + "_key": { + "oneof": [ + "key" + ] + }, + "_value": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "Metadata": { + "fields": { + "items": { + "rule": "repeated", + "type": "Entry", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "NetworkConfig": { + "NetworkInterface": { + "oneofs": { + "_network": { + "oneof": [ + "network" + ] + }, + "_subnetwork": { + "oneof": [ + "subnetwork" + ] + }, + "_ipAddress": { + "oneof": [ + "ipAddress" + ] + }, + "_ipv6Address": { + "oneof": [ + "ipv6Address" + ] + }, + "_internalIpv6PrefixLength": { + "oneof": [ + "internalIpv6PrefixLength" + ] + }, + "_name": { + "oneof": [ + "name" + ] + }, + "_stackType": { + "oneof": [ + "stackType" + ] + }, + "_ipv6AccessType": { + "oneof": [ + "ipv6AccessType" + ] + }, + "_queueCount": { + "oneof": [ + "queueCount" + ] + }, + "_nicType": { + "oneof": [ + "nicType" + ] + }, + "_networkAttachment": { + "oneof": [ + "networkAttachment" + ] + } + }, "fields": { "network": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "peeringMode": { - "type": "PeeringMode", + "subnetwork": { + "type": "string", "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "ipAddress": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "IPV4", + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "ipv6Address": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "IPV6", + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "internalIpv6PrefixLength": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "name": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "accessConfigs": { + "rule": "repeated", + "type": "AccessConfig", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ipv6AccessConfigs": { + "rule": "repeated", + "type": "AccessConfig", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "aliasIpRanges": { + "rule": "repeated", + "type": "AliasIpRange", + "id": 9, "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "stackType": { + "type": "StackType", + "id": 10, + "options": { + "proto3_optional": true + } + }, + "ipv6AccessType": { + "type": "Ipv6AccessType", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "queueCount": { + "type": "int32", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "nicType": { + "type": "NicType", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "networkAttachment": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } } }, "nested": { - "PeeringMode": { + "StackType": { "values": { - "PEERING_MODE_UNSPECIFIED": 0, - "PRIVATE_SERVICE_ACCESS": 1 + "STACK_TYPE_UNSPECIFIED": 0, + "IPV4_ONLY": 1, + "IPV4_IPV6": 2 + } + }, + "Ipv6AccessType": { + "values": { + "UNSPECIFIED_IPV6_ACCESS_TYPE": 0, + "INTERNAL": 1, + "EXTERNAL": 2 + } + }, + "NicType": { + "values": { + "NIC_TYPE_UNSPECIFIED": 0, + "VIRTIO_NET": 1, + "GVNIC": 2 } } } }, - "ManagementURI": { + "NetworkPerformanceConfig": { + "oneofs": { + "_totalEgressBandwidthTier": { + "oneof": [ + "totalEgressBandwidthTier" + ] + } + }, "fields": { - "webUi": { - "type": "string", + "totalEgressBandwidthTier": { + "type": "Tier", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } + } + }, + "nested": { + "Tier": { + "values": { + "TIER_UNSPECIFIED": 0, + "DEFAULT": 1, + "TIER_1": 2 + } + } + } + }, + "AccessConfig": { + "oneofs": { + "_type": { + "oneof": [ + "type" + ] }, - "api": { + "_name": { + "oneof": [ + "name" + ] + }, + "_externalIp": { + "oneof": [ + "externalIp" + ] + }, + "_externalIpv6": { + "oneof": [ + "externalIpv6" + ] + }, + "_externalIpv6PrefixLength": { + "oneof": [ + "externalIpv6PrefixLength" + ] + }, + "_setPublicPtr": { + "oneof": [ + "setPublicPtr" + ] + }, + "_publicPtrDomainName": { + "oneof": [ + "publicPtrDomainName" + ] + }, + "_networkTier": { + "oneof": [ + "networkTier" + ] + } + }, + "fields": { + "type": { + "type": "AccessType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "name": { "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "externalIp": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "externalIpv6": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "externalIpv6PrefixLength": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "setPublicPtr": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "publicPtrDomainName": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "networkTier": { + "type": "NetworkTier", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "AccessType": { + "values": { + "ACCESS_TYPE_UNSPECIFIED": 0, + "ONE_TO_ONE_NAT": 1, + "DIRECT_IPV6": 2 + } + }, + "NetworkTier": { + "values": { + "NETWORK_TIER_UNSPECIFIED": 0, + "PREMIUM": 1, + "STANDARD": 2 } } } }, - "WorkforceIdentityBasedManagementURI": { + "AliasIpRange": { + "oneofs": { + "_ipCidrRange": { + "oneof": [ + "ipCidrRange" + ] + }, + "_subnetworkRangeName": { + "oneof": [ + "subnetworkRangeName" + ] + } + }, "fields": { - "firstPartyManagementUri": { + "ipCidrRange": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "thirdPartyManagementUri": { + "subnetworkRangeName": { "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } } } }, - "WorkforceIdentityBasedOAuth2ClientID": { + "InstanceParams": { "fields": { - "firstPartyOauth2ClientId": { + "resourceManagerTags": { + "keyType": "string", "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "thirdPartyOauth2ClientId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "ManagementServer": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/ManagementServer", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/managementServers/{managementserver}", - "(google.api.resource).plural": "managementServers", - "(google.api.resource).singular": "managementServer" + "AllocationAffinity": { + "oneofs": { + "_consumeAllocationType": { + "oneof": [ + "consumeAllocationType" + ] + }, + "_key": { + "oneof": [ + "key" + ] + } }, "fields": { - "name": { - "type": "string", + "consumeAllocationType": { + "type": "Type", "id": 1, "options": { - "(google.api.field_behavior)": "IDENTIFIER" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "description": { + "key": { "type": "string", - "id": 9, + "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "labels": { - "keyType": "string", + "values": { + "rule": "repeated", "type": "string", - "id": 4, + "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "NO_RESERVATION": 1, + "ANY_RESERVATION": 2, + "SPECIFIC_RESERVATION": 3 + } + } + } + }, + "Scheduling": { + "oneofs": { + "_onHostMaintenance": { + "oneof": [ + "onHostMaintenance" + ] }, - "createTime": { - "type": "google.protobuf.Timestamp", + "_automaticRestart": { + "oneof": [ + "automaticRestart" + ] + }, + "_preemptible": { + "oneof": [ + "preemptible" + ] + }, + "_minNodeCpus": { + "oneof": [ + "minNodeCpus" + ] + }, + "_provisioningModel": { + "oneof": [ + "provisioningModel" + ] + }, + "_instanceTerminationAction": { + "oneof": [ + "instanceTerminationAction" + ] + }, + "_localSsdRecoveryTimeout": { + "oneof": [ + "localSsdRecoveryTimeout" + ] + } + }, + "fields": { + "onHostMaintenance": { + "type": "OnHostMaintenance", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "automaticRestart": { + "type": "bool", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "updateTime": { - "type": "google.protobuf.Timestamp", + "preemptible": { + "type": "bool", "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "type": { - "type": "InstanceType", - "id": 14, + "nodeAffinities": { + "rule": "repeated", + "type": "NodeAffinity", + "id": 4, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "managementUri": { - "type": "ManagementURI", - "id": 11, + "minNodeCpus": { + "type": "int32", + "id": 5, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "workforceIdentityBasedManagementUri": { - "type": "WorkforceIdentityBasedManagementURI", - "id": 16, + "provisioningModel": { + "type": "ProvisioningModel", + "id": 6, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "state": { - "type": "InstanceState", + "instanceTerminationAction": { + "type": "InstanceTerminationAction", "id": 7, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "networks": { - "rule": "repeated", - "type": "NetworkConfig", - "id": 8, + "localSsdRecoveryTimeout": { + "type": "SchedulingDuration", + "id": 10, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } - }, - "etag": { - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + } + }, + "nested": { + "OnHostMaintenance": { + "values": { + "ON_HOST_MAINTENANCE_UNSPECIFIED": 0, + "TERMINATE": 1, + "MIGRATE": 1000 } }, - "oauth2ClientId": { - "type": "string", - "id": 15, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "NodeAffinity": { + "oneofs": { + "_key": { + "oneof": [ + "key" + ] + }, + "_operator": { + "oneof": [ + "operator" + ] + } + }, + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "operator": { + "type": "Operator", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "values": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Operator": { + "values": { + "OPERATOR_UNSPECIFIED": 0, + "IN": 1, + "NOT_IN": 2 + } + } } }, - "workforceIdentityBasedOauth2ClientId": { - "type": "WorkforceIdentityBasedOAuth2ClientID", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "ProvisioningModel": { + "values": { + "PROVISIONING_MODEL_UNSPECIFIED": 0, + "STANDARD": 1, + "SPOT": 2 } }, - "baProxyUri": { - "rule": "repeated", - "type": "string", - "id": 18, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "InstanceTerminationAction": { + "values": { + "INSTANCE_TERMINATION_ACTION_UNSPECIFIED": 0, + "DELETE": 1, + "STOP": 2 } + } + } + }, + "SchedulingDuration": { + "oneofs": { + "_seconds": { + "oneof": [ + "seconds" + ] }, - "satisfiesPzs": { - "type": "google.protobuf.BoolValue", - "id": 19, + "_nanos": { + "oneof": [ + "nanos" + ] + } + }, + "fields": { + "seconds": { + "type": "int64", + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "satisfiesPzi": { - "type": "bool", - "id": 20, + "nanos": { + "type": "int32", + "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } } + } + }, + "ServiceAccount": { + "oneofs": { + "_email": { + "oneof": [ + "email" + ] + } }, - "nested": { - "InstanceType": { - "values": { - "INSTANCE_TYPE_UNSPECIFIED": 0, - "BACKUP_RESTORE": 1 + "fields": { + "email": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "InstanceState": { - "values": { - "INSTANCE_STATE_UNSPECIFIED": 0, - "CREATING": 1, - "READY": 2, - "UPDATING": 3, - "DELETING": 4, - "REPAIRING": 5, - "MAINTENANCE": 6, - "ERROR": 7 + "scopes": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "ListManagementServersRequest": { + "Tags": { + "fields": { + "items": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AttachedDisk": { "oneofs": { - "_filter": { + "_initializeParams": { + "oneof": [ + "initializeParams" + ] + }, + "_deviceName": { + "oneof": [ + "deviceName" + ] + }, + "_kind": { + "oneof": [ + "kind" + ] + }, + "_diskTypeDeprecated": { + "oneof": [ + "diskTypeDeprecated" + ] + }, + "_mode": { + "oneof": [ + "mode" + ] + }, + "_source": { + "oneof": [ + "source" + ] + }, + "_index": { + "oneof": [ + "index" + ] + }, + "_boot": { + "oneof": [ + "boot" + ] + }, + "_autoDelete": { "oneof": [ - "filter" + "autoDelete" ] }, - "_orderBy": { + "_diskInterface": { "oneof": [ - "orderBy" + "diskInterface" + ] + }, + "_diskEncryptionKey": { + "oneof": [ + "diskEncryptionKey" + ] + }, + "_diskSizeGb": { + "oneof": [ + "diskSizeGb" + ] + }, + "_savedState": { + "oneof": [ + "savedState" + ] + }, + "_diskType": { + "oneof": [ + "diskType" + ] + }, + "_type": { + "oneof": [ + "type" ] } }, "fields": { - "parent": { - "type": "string", + "initializeParams": { + "type": "InitializeParams", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "pageSize": { - "type": "int32", - "id": 2, + "deviceName": { + "type": "string", + "id": 4, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "pageToken": { + "kind": { "type": "string", - "id": 3, + "id": 5, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "filter": { - "type": "string", - "id": 4, + "diskTypeDeprecated": { + "type": "DiskType", + "id": 6, "options": { - "(google.api.field_behavior)": "OPTIONAL", + "deprecated": true, "proto3_optional": true } }, - "orderBy": { - "type": "string", - "id": 5, + "mode": { + "type": "DiskMode", + "id": 7, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } - } - } - }, - "ListManagementServersResponse": { - "fields": { - "managementServers": { - "rule": "repeated", - "type": "ManagementServer", - "id": 1 }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetManagementServerRequest": { - "fields": { - "name": { + "source": { "type": "string", - "id": 1, + "id": 8, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } - } - } - }, - "CreateManagementServerRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, + }, + "index": { + "type": "int64", + "id": 9, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "managementServerId": { - "type": "string", - "id": 2, + "boot": { + "type": "bool", + "id": 10, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "managementServer": { - "type": "ManagementServer", - "id": 3, + "autoDelete": { + "type": "bool", + "id": 11, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "requestId": { + "license": { + "rule": "repeated", "type": "string", - "id": 4, + "id": 12, "options": { "(google.api.field_behavior)": "OPTIONAL" } - } - } - }, - "DeleteManagementServerRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, + }, + "diskInterface": { + "type": "DiskInterface", + "id": 13, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "requestId": { - "type": "string", - "id": 2, + "guestOsFeature": { + "rule": "repeated", + "type": "GuestOsFeature", + "id": 14, "options": { "(google.api.field_behavior)": "OPTIONAL" } - } - } - }, - "OperationMetadata": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1, + }, + "diskEncryptionKey": { + "type": "CustomerEncryptionKey", + "id": 15, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2, + "diskSizeGb": { + "type": "int64", + "id": 16, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "target": { - "type": "string", - "id": 3, + "savedState": { + "type": "DiskSavedState", + "id": 17, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } }, - "verb": { + "diskType": { "type": "string", - "id": 4, + "id": 18, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } }, - "statusMessage": { - "type": "string", - "id": 5, + "type": { + "type": "DiskType", + "id": 19, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "InitializeParams": { + "oneofs": { + "_diskName": { + "oneof": [ + "diskName" + ] + } + }, + "fields": { + "diskName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "replicaZones": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } } }, - "requestedCancellation": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "DiskType": { + "values": { + "DISK_TYPE_UNSPECIFIED": 0, + "SCRATCH": 1, + "PERSISTENT": 2 } }, - "apiVersion": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "DiskMode": { + "values": { + "DISK_MODE_UNSPECIFIED": 0, + "READ_WRITE": 1, + "READ_ONLY": 2, + "LOCKED": 3 } }, - "additionalInfo": { - "keyType": "string", - "type": "string", - "id": 8, + "DiskInterface": { + "values": { + "DISK_INTERFACE_UNSPECIFIED": 0, + "SCSI": 1, + "NVME": 2, + "NVDIMM": 3, + "ISCSI": 4 + } + }, + "DiskSavedState": { + "values": { + "DISK_SAVED_STATE_UNSPECIFIED": 0, + "PRESERVED": 1 + } + } + } + }, + "GuestOsFeature": { + "oneofs": { + "_type": { + "oneof": [ + "type" + ] + } + }, + "fields": { + "type": { + "type": "FeatureType", + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "proto3_optional": true + } + } + }, + "nested": { + "FeatureType": { + "values": { + "FEATURE_TYPE_UNSPECIFIED": 0, + "VIRTIO_SCSI_MULTIQUEUE": 1, + "WINDOWS": 2, + "MULTI_IP_SUBNET": 3, + "UEFI_COMPATIBLE": 4, + "SECURE_BOOT": 5, + "GVNIC": 6, + "SEV_CAPABLE": 7, + "BARE_METAL_LINUX_COMPATIBLE": 8, + "SUSPEND_RESUME_COMPATIBLE": 9, + "SEV_LIVE_MIGRATABLE": 10, + "SEV_SNP_CAPABLE": 11, + "TDX_CAPABLE": 12, + "IDPF": 13, + "SEV_LIVE_MIGRATABLE_V2": 14 } } } + }, + "KeyRevocationActionType": { + "values": { + "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": 0, + "NONE": 1, + "STOP": 2 + } } } } @@ -954,6 +5744,30 @@ "IDENTIFIER": 8 } }, + "fieldInfo": { + "type": "google.api.FieldInfo", + "id": 291403980, + "extend": "google.protobuf.FieldOptions" + }, + "FieldInfo": { + "fields": { + "format": { + "type": "Format", + "id": 1 + } + }, + "nested": { + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "UUID4": 1, + "IPV4": 2, + "IPV6": 3, + "IPV4_OR_IPV6": 4 + } + } + } + }, "resourceReference": { "type": "google.api.ResourceReference", "id": 1055, @@ -2320,6 +7134,18 @@ } } }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, "Any": { "fields": { "type_url": { @@ -2332,21 +7158,18 @@ } } }, - "Empty": { - "fields": {} - }, - "Timestamp": { + "FieldMask": { "fields": { - "seconds": { - "type": "int64", + "paths": { + "rule": "repeated", + "type": "string", "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 } } }, + "Empty": { + "fields": {} + }, "DoubleValue": { "fields": { "value": { @@ -2421,6 +7244,390 @@ } } }, + "type": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/type/expr;expr", + "java_multiple_files": true, + "java_outer_classname": "ExprProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "DayOfWeek": { + "values": { + "DAY_OF_WEEK_UNSPECIFIED": 0, + "MONDAY": 1, + "TUESDAY": 2, + "WEDNESDAY": 3, + "THURSDAY": 4, + "FRIDAY": 5, + "SATURDAY": 6, + "SUNDAY": 7 + } + }, + "Month": { + "values": { + "MONTH_UNSPECIFIED": 0, + "JANUARY": 1, + "FEBRUARY": 2, + "MARCH": 3, + "APRIL": 4, + "MAY": 5, + "JUNE": 6, + "JULY": 7, + "AUGUST": 8, + "SEPTEMBER": 9, + "OCTOBER": 10, + "NOVEMBER": 11, + "DECEMBER": 12 + } + }, + "Expr": { + "fields": { + "expression": { + "type": "string", + "id": 1 + }, + "title": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "location": { + "type": "string", + "id": 4 + } + } + } + } + }, + "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 + } + } + } + } + }, + "iam": { + "nested": { + "v1": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Cloud.Iam.V1", + "go_package": "cloud.google.com/go/iam/apiv1/iampb;iampb", + "java_multiple_files": true, + "java_outer_classname": "PolicyProto", + "java_package": "com.google.iam.v1", + "php_namespace": "Google\\Cloud\\Iam\\V1" + }, + "nested": { + "IAMPolicy": { + "options": { + "(google.api.default_host)": "iam-meta-api.googleapis.com" + }, + "methods": { + "SetIamPolicy": { + "requestType": "SetIamPolicyRequest", + "responseType": "Policy", + "options": { + "(google.api.http).post": "/v1/{resource=**}:setIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:setIamPolicy", + "body": "*" + } + } + ] + }, + "GetIamPolicy": { + "requestType": "GetIamPolicyRequest", + "responseType": "Policy", + "options": { + "(google.api.http).post": "/v1/{resource=**}:getIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:getIamPolicy", + "body": "*" + } + } + ] + }, + "TestIamPermissions": { + "requestType": "TestIamPermissionsRequest", + "responseType": "TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=**}:testIamPermissions", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:testIamPermissions", + "body": "*" + } + } + ] + } + } + }, + "SetIamPolicyRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "policy": { + "type": "Policy", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "GetIamPolicyRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "options": { + "type": "GetPolicyOptions", + "id": 2 + } + } + }, + "TestIamPermissionsRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "permissions": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "TestIamPermissionsResponse": { + "fields": { + "permissions": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "GetPolicyOptions": { + "fields": { + "requestedPolicyVersion": { + "type": "int32", + "id": 1 + } + } + }, + "Policy": { + "fields": { + "version": { + "type": "int32", + "id": 1 + }, + "bindings": { + "rule": "repeated", + "type": "Binding", + "id": 4 + }, + "auditConfigs": { + "rule": "repeated", + "type": "AuditConfig", + "id": 6 + }, + "etag": { + "type": "bytes", + "id": 3 + } + } + }, + "Binding": { + "fields": { + "role": { + "type": "string", + "id": 1 + }, + "members": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "condition": { + "type": "google.type.Expr", + "id": 3 + } + } + }, + "AuditConfig": { + "fields": { + "service": { + "type": "string", + "id": 1 + }, + "auditLogConfigs": { + "rule": "repeated", + "type": "AuditLogConfig", + "id": 3 + } + } + }, + "AuditLogConfig": { + "fields": { + "logType": { + "type": "LogType", + "id": 1 + }, + "exemptedMembers": { + "rule": "repeated", + "type": "string", + "id": 2 + } + }, + "nested": { + "LogType": { + "values": { + "LOG_TYPE_UNSPECIFIED": 0, + "ADMIN_READ": 1, + "DATA_WRITE": 2, + "DATA_READ": 3 + } + } + } + }, + "PolicyDelta": { + "fields": { + "bindingDeltas": { + "rule": "repeated", + "type": "BindingDelta", + "id": 1 + }, + "auditConfigDeltas": { + "rule": "repeated", + "type": "AuditConfigDelta", + "id": 2 + } + } + }, + "BindingDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "role": { + "type": "string", + "id": 2 + }, + "member": { + "type": "string", + "id": 3 + }, + "condition": { + "type": "google.type.Expr", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + }, + "AuditConfigDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "service": { + "type": "string", + "id": 2 + }, + "exemptedMember": { + "type": "string", + "id": 3 + }, + "logType": { + "type": "string", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + } + } + } + } + }, "longrunning": { "options": { "cc_enable_arenas": true, @@ -2636,35 +7843,6 @@ } } } - }, - "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 - } - } - } - } } } } diff --git a/packages/google-cloud-backupdr/samples/README.md b/packages/google-cloud-backupdr/samples/README.md index cb1951e106d..27db6e74ed5 100644 --- a/packages/google-cloud-backupdr/samples/README.md +++ b/packages/google-cloud-backupdr/samples/README.md @@ -12,10 +12,40 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Backup_d_r.abandon_backup](#backup_d_r.abandon_backup) + * [Backup_d_r.create_backup_plan](#backup_d_r.create_backup_plan) + * [Backup_d_r.create_backup_plan_association](#backup_d_r.create_backup_plan_association) + * [Backup_d_r.create_backup_vault](#backup_d_r.create_backup_vault) * [Backup_d_r.create_management_server](#backup_d_r.create_management_server) + * [Backup_d_r.delete_backup](#backup_d_r.delete_backup) + * [Backup_d_r.delete_backup_plan](#backup_d_r.delete_backup_plan) + * [Backup_d_r.delete_backup_plan_association](#backup_d_r.delete_backup_plan_association) + * [Backup_d_r.delete_backup_vault](#backup_d_r.delete_backup_vault) * [Backup_d_r.delete_management_server](#backup_d_r.delete_management_server) + * [Backup_d_r.fetch_access_token](#backup_d_r.fetch_access_token) + * [Backup_d_r.fetch_usable_backup_vaults](#backup_d_r.fetch_usable_backup_vaults) + * [Backup_d_r.finalize_backup](#backup_d_r.finalize_backup) + * [Backup_d_r.get_backup](#backup_d_r.get_backup) + * [Backup_d_r.get_backup_plan](#backup_d_r.get_backup_plan) + * [Backup_d_r.get_backup_plan_association](#backup_d_r.get_backup_plan_association) + * [Backup_d_r.get_backup_vault](#backup_d_r.get_backup_vault) + * [Backup_d_r.get_data_source](#backup_d_r.get_data_source) * [Backup_d_r.get_management_server](#backup_d_r.get_management_server) + * [Backup_d_r.initiate_backup](#backup_d_r.initiate_backup) + * [Backup_d_r.list_backup_plan_associations](#backup_d_r.list_backup_plan_associations) + * [Backup_d_r.list_backup_plans](#backup_d_r.list_backup_plans) + * [Backup_d_r.list_backup_vaults](#backup_d_r.list_backup_vaults) + * [Backup_d_r.list_backups](#backup_d_r.list_backups) + * [Backup_d_r.list_data_sources](#backup_d_r.list_data_sources) * [Backup_d_r.list_management_servers](#backup_d_r.list_management_servers) + * [Backup_d_r.remove_data_source](#backup_d_r.remove_data_source) + * [Backup_d_r.restore_backup](#backup_d_r.restore_backup) + * [Backup_d_r.set_internal_status](#backup_d_r.set_internal_status) + * [Backup_d_r.test_iam_permissions](#backup_d_r.test_iam_permissions) + * [Backup_d_r.trigger_backup](#backup_d_r.trigger_backup) + * [Backup_d_r.update_backup](#backup_d_r.update_backup) + * [Backup_d_r.update_backup_vault](#backup_d_r.update_backup_vault) + * [Backup_d_r.update_data_source](#backup_d_r.update_data_source) * [Quickstart](#quickstart) ## Before you begin @@ -33,6 +63,74 @@ Before running the samples, make sure you've followed the steps outlined in +### Backup_d_r.abandon_backup + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.abandon_backup.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.abandon_backup.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.abandon_backup.js` + + +----- + + + + +### Backup_d_r.create_backup_plan + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan.js` + + +----- + + + + +### Backup_d_r.create_backup_plan_association + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan_association.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan_association.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan_association.js` + + +----- + + + + +### Backup_d_r.create_backup_vault + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_vault.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_vault.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_vault.js` + + +----- + + + + ### Backup_d_r.create_management_server View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_management_server.js). @@ -50,6 +148,74 @@ __Usage:__ +### Backup_d_r.delete_backup + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup.js` + + +----- + + + + +### Backup_d_r.delete_backup_plan + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan.js` + + +----- + + + + +### Backup_d_r.delete_backup_plan_association + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan_association.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan_association.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan_association.js` + + +----- + + + + +### Backup_d_r.delete_backup_vault + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_vault.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_vault.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_vault.js` + + +----- + + + + ### Backup_d_r.delete_management_server View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_management_server.js). @@ -67,6 +233,142 @@ __Usage:__ +### Backup_d_r.fetch_access_token + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_access_token.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_access_token.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_access_token.js` + + +----- + + + + +### Backup_d_r.fetch_usable_backup_vaults + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js` + + +----- + + + + +### Backup_d_r.finalize_backup + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.finalize_backup.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.finalize_backup.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.finalize_backup.js` + + +----- + + + + +### Backup_d_r.get_backup + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup.js` + + +----- + + + + +### Backup_d_r.get_backup_plan + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan.js` + + +----- + + + + +### Backup_d_r.get_backup_plan_association + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan_association.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan_association.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan_association.js` + + +----- + + + + +### Backup_d_r.get_backup_vault + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_vault.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_vault.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_vault.js` + + +----- + + + + +### Backup_d_r.get_data_source + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_data_source.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_data_source.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_data_source.js` + + +----- + + + + ### Backup_d_r.get_management_server View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_management_server.js). @@ -84,6 +386,108 @@ __Usage:__ +### Backup_d_r.initiate_backup + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.initiate_backup.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.initiate_backup.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.initiate_backup.js` + + +----- + + + + +### Backup_d_r.list_backup_plan_associations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plan_associations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plan_associations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plan_associations.js` + + +----- + + + + +### Backup_d_r.list_backup_plans + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plans.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plans.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plans.js` + + +----- + + + + +### Backup_d_r.list_backup_vaults + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_vaults.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_vaults.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_vaults.js` + + +----- + + + + +### Backup_d_r.list_backups + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backups.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backups.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backups.js` + + +----- + + + + +### Backup_d_r.list_data_sources + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_sources.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_sources.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_sources.js` + + +----- + + + + ### Backup_d_r.list_management_servers View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_management_servers.js). @@ -101,6 +505,142 @@ __Usage:__ +### Backup_d_r.remove_data_source + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.remove_data_source.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.remove_data_source.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.remove_data_source.js` + + +----- + + + + +### Backup_d_r.restore_backup + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js` + + +----- + + + + +### Backup_d_r.set_internal_status + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.set_internal_status.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.set_internal_status.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.set_internal_status.js` + + +----- + + + + +### Backup_d_r.test_iam_permissions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.test_iam_permissions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.test_iam_permissions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.test_iam_permissions.js` + + +----- + + + + +### Backup_d_r.trigger_backup + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.trigger_backup.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.trigger_backup.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.trigger_backup.js` + + +----- + + + + +### Backup_d_r.update_backup + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup.js` + + +----- + + + + +### Backup_d_r.update_backup_vault + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup_vault.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup_vault.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup_vault.js` + + +----- + + + + +### Backup_d_r.update_data_source + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_data_source.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_data_source.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_data_source.js` + + +----- + + + + ### Quickstart View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/quickstart.js). diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.abandon_backup.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.abandon_backup.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.abandon_backup.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.abandon_backup.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan_association.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan_association.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan_association.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan_association.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_vault.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_vault.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_vault.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_vault.js diff --git a/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_management_server.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_management_server.js index 5670ead5da4..f14ca310e86 100644 --- a/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_management_server.js +++ b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_management_server.js @@ -30,8 +30,8 @@ function main(parent, managementServerId, managementServer) { */ /** * Required. The management server project and location in the format - * `projects/{project_id}/locations/{location}`. In Cloud Backup and DR - * locations map to GCP regions, for example **us-central1**. + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR + * locations map to Google Cloud regions, for example **us-central1**. */ // const parent = 'abc123' /** diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan_association.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan_association.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan_association.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan_association.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_vault.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_vault.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_vault.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_vault.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_access_token.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_access_token.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_access_token.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_access_token.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.finalize_backup.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.finalize_backup.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.finalize_backup.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.finalize_backup.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan_association.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan_association.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan_association.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan_association.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_vault.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_vault.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_vault.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_vault.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_data_source.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_data_source.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_data_source.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_data_source.js diff --git a/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_management_server.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_management_server.js index afa3ba0f8b2..11cc5ae277f 100644 --- a/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_management_server.js +++ b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_management_server.js @@ -30,7 +30,7 @@ function main(name) { */ /** * Required. Name of the management server resource name, in the format - * `projects/{project_id}/locations/{location}/managementServers/{resource_name}` + * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' */ // const name = 'abc123' diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.initiate_backup.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.initiate_backup.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.initiate_backup.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.initiate_backup.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plan_associations.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plan_associations.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plan_associations.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plan_associations.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plans.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plans.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plans.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plans.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_vaults.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_vaults.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_vaults.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_vaults.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backups.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backups.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backups.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backups.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_data_sources.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_sources.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_data_sources.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_sources.js diff --git a/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_management_servers.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_management_servers.js index 4acf62dd19c..262d1a29e3c 100644 --- a/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_management_servers.js +++ b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_management_servers.js @@ -30,10 +30,11 @@ function main(parent) { */ /** * Required. The project and location for which to retrieve management servers - * information, in the format `projects/{project_id}/locations/{location}`. In - * Cloud BackupDR, locations map to GCP regions, for example **us-central1**. - * To retrieve management servers for all locations, use "-" for the - * `{location}` value. + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud BackupDR, locations map to Google Cloud regions, for example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. */ // const parent = 'abc123' /** diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.remove_data_source.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.remove_data_source.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.remove_data_source.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.remove_data_source.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.restore_backup.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.restore_backup.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.set_internal_status.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.set_internal_status.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.set_internal_status.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.set_internal_status.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.test_iam_permissions.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.test_iam_permissions.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.test_iam_permissions.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.test_iam_permissions.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.trigger_backup.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.trigger_backup.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.trigger_backup.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.trigger_backup.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup_vault.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup_vault.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup_vault.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup_vault.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_data_source.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_data_source.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_data_source.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_data_source.js diff --git a/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json b/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json index b273e8759e1..582d6b86ec2 100644 --- a/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json +++ b/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 77, "type": "FULL" } ], @@ -202,6 +202,1506 @@ } } } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupVault_async", + "title": "BackupDR createBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Creates a new BackupVault in a given project and location.", + "canonical": true, + "file": "backup_d_r.create_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "backup_vault_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_vault", + "type": ".google.cloud.backupdr.v1.BackupVault" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "CreateBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListBackupVaults_async", + "title": "BackupDR listBackupVaults Sample", + "origin": "API_DEFINITION", + "description": " Lists BackupVaults in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_backup_vaults.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackupVaults", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", + "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" + }, + { + "name": "view", + "type": ".google.cloud.backupdr.v1.BackupVaultView" + } + ], + "resultType": ".google.cloud.backupdr.v1.ListBackupVaultsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListBackupVaults", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_async", + "title": "BackupDR fetchUsableBackupVaults Sample", + "origin": "API_DEFINITION", + "description": " FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.", + "canonical": true, + "file": "backup_d_r.fetch_usable_backup_vaults.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchUsableBackupVaults", + "fullName": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", + "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.backupdr.v1.FetchUsableBackupVaultsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "FetchUsableBackupVaults", + "fullName": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetBackupVault_async", + "title": "BackupDR getBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a BackupVault.", + "canonical": true, + "file": "backup_d_r.get_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.backupdr.v1.BackupVaultView" + } + ], + "resultType": ".google.cloud.backupdr.v1.BackupVault", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_UpdateBackupVault_async", + "title": "BackupDR updateBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings of a BackupVault.", + "canonical": true, + "file": "backup_d_r.update_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "backup_vault", + "type": ".google.cloud.backupdr.v1.BackupVault" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "UpdateBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupVault_async", + "title": "BackupDR deleteBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Deletes a BackupVault.", + "canonical": true, + "file": "backup_d_r.delete_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 89, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + }, + { + "name": "etag", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "DeleteBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_TestIamPermissions_async", + "title": "BackupDR testIamPermissions Sample", + "origin": "API_DEFINITION", + "description": " Returns the caller's permissions on a BackupVault resource. A caller is not required to have Google IAM permission to make this request.", + "canonical": true, + "file": "backup_d_r.test_iam_permissions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.backupdr.v1.BackupDR.TestIamPermissions", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "permissions", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.iam.v1.TestIamPermissionsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.backupdr.v1.BackupDR.TestIamPermissions", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListDataSources_async", + "title": "BackupDR listDataSources Sample", + "origin": "API_DEFINITION", + "description": " Lists DataSources in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_data_sources.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataSources", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListDataSources", + "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.backupdr.v1.ListDataSourcesResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListDataSources", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListDataSources", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetDataSource_async", + "title": "BackupDR getDataSource Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a DataSource.", + "canonical": true, + "file": "backup_d_r.get_data_source.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetDataSource", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.backupdr.v1.DataSource", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetDataSource", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_UpdateDataSource_async", + "title": "BackupDR updateDataSource Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings of a DataSource.", + "canonical": true, + "file": "backup_d_r.update_data_source.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "data_source", + "type": ".google.cloud.backupdr.v1.DataSource" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "UpdateDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_RemoveDataSource_async", + "title": "BackupDR removeDataSource Sample", + "origin": "API_DEFINITION", + "description": " Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.", + "canonical": true, + "file": "backup_d_r.remove_data_source.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RemoveDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.RemoveDataSource", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "RemoveDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.RemoveDataSource", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_SetInternalStatus_async", + "title": "BackupDR setInternalStatus Sample", + "origin": "API_DEFINITION", + "description": " Sets the internal status of a DataSource.", + "canonical": true, + "file": "backup_d_r.set_internal_status.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetInternalStatus", + "fullName": "google.cloud.backupdr.v1.BackupDR.SetInternalStatus", + "async": true, + "parameters": [ + { + "name": "data_source", + "type": "TYPE_STRING" + }, + { + "name": "value", + "type": "TYPE_BYTES" + }, + { + "name": "backup_config_state", + "type": ".google.cloud.backupdr.v1.BackupConfigState" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "SetInternalStatus", + "fullName": "google.cloud.backupdr.v1.BackupDR.SetInternalStatus", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_InitiateBackup_async", + "title": "BackupDR initiateBackup Sample", + "origin": "API_DEFINITION", + "description": " Internal only. Initiates a backup.", + "canonical": true, + "file": "backup_d_r.initiate_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "InitiateBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.InitiateBackup", + "async": true, + "parameters": [ + { + "name": "data_source", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.backupdr.v1.InitiateBackupResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "InitiateBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.InitiateBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_AbandonBackup_async", + "title": "BackupDR abandonBackup Sample", + "origin": "API_DEFINITION", + "description": " Internal only. Abandons a backup.", + "canonical": true, + "file": "backup_d_r.abandon_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AbandonBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.AbandonBackup", + "async": true, + "parameters": [ + { + "name": "data_source", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "AbandonBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.AbandonBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_FinalizeBackup_async", + "title": "BackupDR finalizeBackup Sample", + "origin": "API_DEFINITION", + "description": " Internal only. Finalize a backup that was started by a call to InitiateBackup.", + "canonical": true, + "file": "backup_d_r.finalize_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 101, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FinalizeBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.FinalizeBackup", + "async": true, + "parameters": [ + { + "name": "data_source", + "type": "TYPE_STRING" + }, + { + "name": "description", + "type": "TYPE_STRING" + }, + { + "name": "consistency_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_id", + "type": "TYPE_STRING" + }, + { + "name": "recovery_range_start_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "recovery_range_end_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "retention_duration", + "type": ".google.protobuf.Duration" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "FinalizeBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.FinalizeBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_FetchAccessToken_async", + "title": "BackupDR fetchAccessToken Sample", + "origin": "API_DEFINITION", + "description": " Internal only. Fetch access token for a given data source.", + "canonical": true, + "file": "backup_d_r.fetch_access_token.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchAccessToken", + "fullName": "google.cloud.backupdr.v1.BackupDR.FetchAccessToken", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "generation_id", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.cloud.backupdr.v1.FetchAccessTokenResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "FetchAccessToken", + "fullName": "google.cloud.backupdr.v1.BackupDR.FetchAccessToken", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListBackups_async", + "title": "BackupDR listBackups Sample", + "origin": "API_DEFINITION", + "description": " Lists Backups in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_backups.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackups", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackups", + "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" + }, + { + "name": "view", + "type": ".google.cloud.backupdr.v1.BackupView" + } + ], + "resultType": ".google.cloud.backupdr.v1.ListBackupsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListBackups", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackups", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetBackup_async", + "title": "BackupDR getBackup Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a Backup.", + "canonical": true, + "file": "backup_d_r.get_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.backupdr.v1.BackupView" + } + ], + "resultType": ".google.cloud.backupdr.v1.Backup", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_UpdateBackup_async", + "title": "BackupDR updateBackup Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings of a Backup.", + "canonical": true, + "file": "backup_d_r.update_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "backup", + "type": ".google.cloud.backupdr.v1.Backup" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "UpdateBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackup_async", + "title": "BackupDR deleteBackup Sample", + "origin": "API_DEFINITION", + "description": " Deletes a Backup.", + "canonical": true, + "file": "backup_d_r.delete_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "DeleteBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_RestoreBackup_async", + "title": "BackupDR restoreBackup Sample", + "origin": "API_DEFINITION", + "description": " Restore from a Backup", + "canonical": true, + "file": "backup_d_r.restore_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RestoreBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "compute_instance_target_environment", + "type": ".google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment" + }, + { + "name": "compute_instance_restore_properties", + "type": ".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "RestoreBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupPlan_async", + "title": "BackupDR createBackupPlan Sample", + "origin": "API_DEFINITION", + "description": " Create a BackupPlan", + "canonical": true, + "file": "backup_d_r.create_backup_plan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 83, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "backup_plan_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_plan", + "type": ".google.cloud.backupdr.v1.BackupPlan" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "CreateBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetBackupPlan_async", + "title": "BackupDR getBackupPlan Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single BackupPlan.", + "canonical": true, + "file": "backup_d_r.get_backup_plan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.backupdr.v1.BackupPlan", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListBackupPlans_async", + "title": "BackupDR listBackupPlans Sample", + "origin": "API_DEFINITION", + "description": " Lists BackupPlans in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_backup_plans.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackupPlans", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", + "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.backupdr.v1.ListBackupPlansResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListBackupPlans", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupPlan_async", + "title": "BackupDR deleteBackupPlan Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single BackupPlan.", + "canonical": true, + "file": "backup_d_r.delete_backup_plan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "DeleteBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async", + "title": "BackupDR createBackupPlanAssociation Sample", + "origin": "API_DEFINITION", + "description": " Create a BackupPlanAssociation", + "canonical": true, + "file": "backup_d_r.create_backup_plan_association.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "backup_plan_association_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_plan_association", + "type": ".google.cloud.backupdr.v1.BackupPlanAssociation" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "CreateBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_async", + "title": "BackupDR getBackupPlanAssociation Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single BackupPlanAssociation.", + "canonical": true, + "file": "backup_d_r.get_backup_plan_association.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.backupdr.v1.BackupPlanAssociation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_async", + "title": "BackupDR listBackupPlanAssociations Sample", + "origin": "API_DEFINITION", + "description": " Lists BackupPlanAssociations in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_backup_plan_associations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackupPlanAssociations", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", + "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" + } + ], + "resultType": ".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListBackupPlanAssociations", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async", + "title": "BackupDR deleteBackupPlanAssociation Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single BackupPlanAssociation.", + "canonical": true, + "file": "backup_d_r.delete_backup_plan_association.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "DeleteBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_TriggerBackup_async", + "title": "BackupDR triggerBackup Sample", + "origin": "API_DEFINITION", + "description": " Triggers a new Backup.", + "canonical": true, + "file": "backup_d_r.trigger_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TriggerBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "rule_id", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "TriggerBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts b/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts index f793a7c9a33..bab75752904 100644 --- a/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts +++ b/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts @@ -214,6 +214,21 @@ export class BackupDRClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { + backupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}' + ), + backupPlanPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupPlans/{backup_plan}' + ), + backupPlanAssociationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}' + ), + backupVaultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backupvault}' + ), + dataSourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}' + ), locationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), @@ -234,6 +249,36 @@ export class BackupDRClient { 'nextPageToken', 'managementServers' ), + listBackupVaults: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backupVaults' + ), + fetchUsableBackupVaults: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backupVaults' + ), + listDataSources: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'dataSources' + ), + listBackups: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backups' + ), + listBackupPlans: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backupPlans' + ), + listBackupPlanAssociations: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backupPlanAssociations' + ), }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); @@ -303,6 +348,102 @@ export class BackupDRClient { const deleteManagementServerMetadata = protoFilesRoot.lookup( '.google.cloud.backupdr.v1.OperationMetadata' ) as gax.protobuf.Type; + const createBackupVaultResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupVault' + ) as gax.protobuf.Type; + const createBackupVaultMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateBackupVaultResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupVault' + ) as gax.protobuf.Type; + const updateBackupVaultMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteBackupVaultResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteBackupVaultMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateDataSourceResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.DataSource' + ) as gax.protobuf.Type; + const updateDataSourceMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const removeDataSourceResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const removeDataSourceMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const setInternalStatusResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.SetInternalStatusResponse' + ) as gax.protobuf.Type; + const setInternalStatusMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const abandonBackupResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const abandonBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const finalizeBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.Backup' + ) as gax.protobuf.Type; + const finalizeBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.Backup' + ) as gax.protobuf.Type; + const updateBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.Backup' + ) as gax.protobuf.Type; + const deleteBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const restoreBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.RestoreBackupResponse' + ) as gax.protobuf.Type; + const restoreBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createBackupPlanResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupPlan' + ) as gax.protobuf.Type; + const createBackupPlanMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteBackupPlanResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteBackupPlanMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createBackupPlanAssociationResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupPlanAssociation' + ) as gax.protobuf.Type; + const createBackupPlanAssociationMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteBackupPlanAssociationResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteBackupPlanAssociationMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const triggerBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupPlanAssociation' + ) as gax.protobuf.Type; + const triggerBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { createManagementServer: new this._gaxModule.LongrunningDescriptor( @@ -323,6 +464,94 @@ export class BackupDRClient { deleteManagementServerMetadata ) ), + createBackupVault: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBackupVaultResponse.decode.bind(createBackupVaultResponse), + createBackupVaultMetadata.decode.bind(createBackupVaultMetadata) + ), + updateBackupVault: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateBackupVaultResponse.decode.bind(updateBackupVaultResponse), + updateBackupVaultMetadata.decode.bind(updateBackupVaultMetadata) + ), + deleteBackupVault: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupVaultResponse.decode.bind(deleteBackupVaultResponse), + deleteBackupVaultMetadata.decode.bind(deleteBackupVaultMetadata) + ), + updateDataSource: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateDataSourceResponse.decode.bind(updateDataSourceResponse), + updateDataSourceMetadata.decode.bind(updateDataSourceMetadata) + ), + removeDataSource: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + removeDataSourceResponse.decode.bind(removeDataSourceResponse), + removeDataSourceMetadata.decode.bind(removeDataSourceMetadata) + ), + setInternalStatus: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + setInternalStatusResponse.decode.bind(setInternalStatusResponse), + setInternalStatusMetadata.decode.bind(setInternalStatusMetadata) + ), + abandonBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + abandonBackupResponse.decode.bind(abandonBackupResponse), + abandonBackupMetadata.decode.bind(abandonBackupMetadata) + ), + finalizeBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + finalizeBackupResponse.decode.bind(finalizeBackupResponse), + finalizeBackupMetadata.decode.bind(finalizeBackupMetadata) + ), + updateBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateBackupResponse.decode.bind(updateBackupResponse), + updateBackupMetadata.decode.bind(updateBackupMetadata) + ), + deleteBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupResponse.decode.bind(deleteBackupResponse), + deleteBackupMetadata.decode.bind(deleteBackupMetadata) + ), + restoreBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + restoreBackupResponse.decode.bind(restoreBackupResponse), + restoreBackupMetadata.decode.bind(restoreBackupMetadata) + ), + createBackupPlan: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBackupPlanResponse.decode.bind(createBackupPlanResponse), + createBackupPlanMetadata.decode.bind(createBackupPlanMetadata) + ), + deleteBackupPlan: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupPlanResponse.decode.bind(deleteBackupPlanResponse), + deleteBackupPlanMetadata.decode.bind(deleteBackupPlanMetadata) + ), + createBackupPlanAssociation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBackupPlanAssociationResponse.decode.bind( + createBackupPlanAssociationResponse + ), + createBackupPlanAssociationMetadata.decode.bind( + createBackupPlanAssociationMetadata + ) + ), + deleteBackupPlanAssociation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupPlanAssociationResponse.decode.bind( + deleteBackupPlanAssociationResponse + ), + deleteBackupPlanAssociationMetadata.decode.bind( + deleteBackupPlanAssociationMetadata + ) + ), + triggerBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + triggerBackupResponse.decode.bind(triggerBackupResponse), + triggerBackupMetadata.decode.bind(triggerBackupMetadata) + ), }; // Put together the default options sent with requests. @@ -379,6 +608,36 @@ export class BackupDRClient { 'getManagementServer', 'createManagementServer', 'deleteManagementServer', + 'createBackupVault', + 'listBackupVaults', + 'fetchUsableBackupVaults', + 'getBackupVault', + 'updateBackupVault', + 'deleteBackupVault', + 'testIamPermissions', + 'listDataSources', + 'getDataSource', + 'updateDataSource', + 'removeDataSource', + 'setInternalStatus', + 'initiateBackup', + 'abandonBackup', + 'finalizeBackup', + 'fetchAccessToken', + 'listBackups', + 'getBackup', + 'updateBackup', + 'deleteBackup', + 'restoreBackup', + 'createBackupPlan', + 'getBackupPlan', + 'listBackupPlans', + 'deleteBackupPlan', + 'createBackupPlanAssociation', + 'getBackupPlanAssociation', + 'listBackupPlanAssociations', + 'deleteBackupPlanAssociation', + 'triggerBackup', ]; for (const methodName of backupDRStubMethods) { const callPromise = this.backupDRStub.then( @@ -503,7 +762,7 @@ export class BackupDRClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the management server resource name, in the format - * `projects/{project_id}/locations/{location}/managementServers/{resource_name}` + * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' * @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. @@ -587,110 +846,73 @@ export class BackupDRClient { this.initialize(); return this.innerApiCalls.getManagementServer(request, options, callback); } - /** - * Creates a new ManagementServer in a given project and location. + * Gets details of a BackupVault. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The management server project and location in the format - * `projects/{project_id}/locations/{location}`. In Cloud Backup and DR - * locations map to GCP regions, for example **us-central1**. - * @param {string} request.managementServerId - * Required. The name of the management server to create. The name must be - * unique for the specified project and location. - * @param {google.cloud.backupdr.v1.ManagementServer} request.managementServer - * Required. A [management server - * resource][google.cloud.backupdr.v1.ManagementServer] - * @param {string} [request.requestId] - * Optional. An optional 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 {string} request.name + * Required. Name of the backupvault store resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' + * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault * @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 } + * The first element of the array is an object representing {@link protos.google.cloud.backupdr.v1.BackupVault|BackupVault}. + * 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/backup_d_r.create_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_CreateManagementServer_async + * @example include:samples/generated/v1/backup_d_r.get_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_GetBackupVault_async */ - createManagementServer( - request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + getBackupVault( + request?: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest | undefined, {} | undefined, ] >; - createManagementServer( - request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + getBackupVault( + request: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest | null | undefined, {} | null | undefined > ): void; - createManagementServer( - request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + getBackupVault( + request: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, callback: Callback< - LROperation< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest | null | undefined, {} | null | undefined > ): void; - createManagementServer( - request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + getBackupVault( + request?: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.backupdr.v1.IBackupVault, + | protos.google.cloud.backupdr.v1.IGetBackupVaultRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest | null | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest | undefined, {} | undefined, ] > | void { @@ -707,144 +929,166 @@ export class BackupDRClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.createManagementServer( - request, - options, - callback - ); - } - /** - * Check the status of the long running operation returned by `createManagementServer()`. - * @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/backup_d_r.create_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_CreateManagementServer_async - */ - async checkCreateManagementServerProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.backupdr.v1.ManagementServer, - protos.google.cloud.backupdr.v1.OperationMetadata - > - > { - 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.createManagementServer, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.backupdr.v1.ManagementServer, - protos.google.cloud.backupdr.v1.OperationMetadata - >; + return this.innerApiCalls.getBackupVault(request, options, callback); } /** - * Deletes a single ManagementServer. + * Returns the caller's permissions on a BackupVault resource. + * + * A caller is not required to have Google IAM permission to make this + * request. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * Required. Name of the resource - * @param {string} [request.requestId] - * Optional. An optional 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 {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 + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). * @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 } + * The first element of the array is an object representing {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. + * 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/backup_d_r.delete_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteManagementServer_async + * @example include:samples/generated/v1/backup_d_r.test_iam_permissions.js + * region_tag:backupdr_v1_generated_BackupDR_TestIamPermissions_async */ - deleteManagementServer( - request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined, ] >; - deleteManagementServer( - request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined > ): void; - deleteManagementServer( - request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, callback: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined > ): void; - deleteManagementServer( - request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | 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({ + resource: request.resource ?? '', + }); + this.initialize(); + return this.innerApiCalls.testIamPermissions(request, options, callback); + } + /** + * Gets details of a DataSource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' + * @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.backupdr.v1.DataSource|DataSource}. + * 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/backup_d_r.get_data_source.js + * region_tag:backupdr_v1_generated_BackupDR_GetDataSource_async + */ + getDataSource( + request?: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest | undefined, + {} | undefined, + ] + >; + getDataSource( + request: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest | null | undefined, + {} | null | undefined + > + ): void; + getDataSource( + request: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest | null | undefined, + {} | null | undefined + > + ): void; + getDataSource( + request?: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1.IDataSource, + | protos.google.cloud.backupdr.v1.IGetDataSourceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest | undefined, {} | undefined, ] > | void { @@ -864,56 +1108,4656 @@ export class BackupDRClient { name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.deleteManagementServer( - request, - options, - callback - ); + return this.innerApiCalls.getDataSource(request, options, callback); } /** - * Check the status of the long running operation returned by `deleteManagementServer()`. - * @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 } + * Internal only. + * Initiates a backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.dataSource + * Required. The resource name of the instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/'. + * @param {string} [request.requestId] + * Optional. An optional 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 {string} request.backupId + * Required. Resource ID of the Backup resource. + * @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.backupdr.v1.InitiateBackupResponse|InitiateBackupResponse}. + * 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/backup_d_r.delete_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteManagementServer_async + * @example include:samples/generated/v1/backup_d_r.initiate_backup.js + * region_tag:backupdr_v1_generated_BackupDR_InitiateBackup_async */ - async checkDeleteManagementServerProgress( - name: string + initiateBackup( + request?: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, + options?: CallOptions ): Promise< - LROperation< - protos.google.protobuf.Empty, - protos.google.cloud.backupdr.v1.OperationMetadata + [ + protos.google.cloud.backupdr.v1.IInitiateBackupResponse, + protos.google.cloud.backupdr.v1.IInitiateBackupRequest | undefined, + {} | undefined, + ] + >; + initiateBackup( + request: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IInitiateBackupResponse, + protos.google.cloud.backupdr.v1.IInitiateBackupRequest | null | undefined, + {} | null | undefined > - > { - 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.deleteManagementServer, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.protobuf.Empty, - protos.google.cloud.backupdr.v1.OperationMetadata - >; + ): void; + initiateBackup( + request: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IInitiateBackupResponse, + protos.google.cloud.backupdr.v1.IInitiateBackupRequest | null | undefined, + {} | null | undefined + > + ): void; + initiateBackup( + request?: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1.IInitiateBackupResponse, + | protos.google.cloud.backupdr.v1.IInitiateBackupRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1.IInitiateBackupResponse, + protos.google.cloud.backupdr.v1.IInitiateBackupRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IInitiateBackupResponse, + protos.google.cloud.backupdr.v1.IInitiateBackupRequest | 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({ + data_source: request.dataSource ?? '', + }); + this.initialize(); + return this.innerApiCalls.initiateBackup(request, options, callback); + } + /** + * Internal only. + * Fetch access token for a given data source. + * + * @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/* /backupVaults/* /dataSources'. + * @param {number} request.generationId + * Required. The generation of the backup to update. + * @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.backupdr.v1.FetchAccessTokenResponse|FetchAccessTokenResponse}. + * 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/backup_d_r.fetch_access_token.js + * region_tag:backupdr_v1_generated_BackupDR_FetchAccessToken_async + */ + fetchAccessToken( + request?: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, + protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest | undefined, + {} | undefined, + ] + >; + fetchAccessToken( + request: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, + | protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchAccessToken( + request: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, + | protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchAccessToken( + request?: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, + | protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, + | protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, + protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest | 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.fetchAccessToken(request, options, callback); + } + /** + * Gets details of a Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @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.backupdr.v1.Backup|Backup}. + * 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/backup_d_r.get_backup.js + * region_tag:backupdr_v1_generated_BackupDR_GetBackup_async + */ + getBackup( + request?: protos.google.cloud.backupdr.v1.IGetBackupRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest | undefined, + {} | undefined, + ] + >; + getBackup( + request: protos.google.cloud.backupdr.v1.IGetBackupRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest | null | undefined, + {} | null | undefined + > + ): void; + getBackup( + request: protos.google.cloud.backupdr.v1.IGetBackupRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest | null | undefined, + {} | null | undefined + > + ): void; + getBackup( + request?: protos.google.cloud.backupdr.v1.IGetBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest | 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.getBackup(request, options, callback); + } + /** + * Gets details of a single BackupPlan. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the `BackupPlan` to retrieve. + * + * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + * @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.backupdr.v1.BackupPlan|BackupPlan}. + * 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/backup_d_r.get_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_GetBackupPlan_async + */ + getBackupPlan( + request?: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest | undefined, + {} | undefined, + ] + >; + getBackupPlan( + request: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest | null | undefined, + {} | null | undefined + > + ): void; + getBackupPlan( + request: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest | null | undefined, + {} | null | undefined + > + ): void; + getBackupPlan( + request?: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1.IBackupPlan, + | protos.google.cloud.backupdr.v1.IGetBackupPlanRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest | 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.getBackupPlan(request, options, callback); + } + /** + * Gets details of a single BackupPlanAssociation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. + * 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/backup_d_r.get_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_async + */ + getBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + ( + | protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest + | undefined + ), + {} | undefined, + ] + >; + getBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + | protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + | protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + | protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + | protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + ( + | protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest + | 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.getBackupPlanAssociation( + request, + options, + callback + ); + } + + /** + * Creates a new ManagementServer in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The management server project and location in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR + * locations map to Google Cloud regions, for example **us-central1**. + * @param {string} request.managementServerId + * Required. The name of the management server to create. The name must be + * unique for the specified project and location. + * @param {google.cloud.backupdr.v1.ManagementServer} request.managementServer + * Required. A [management server + * resource][google.cloud.backupdr.v1.ManagementServer] + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.create_management_server.js + * region_tag:backupdr_v1_generated_BackupDR_CreateManagementServer_async + */ + createManagementServer( + request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createManagementServer( + request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createManagementServer( + request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createManagementServer( + request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.createManagementServer( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `createManagementServer()`. + * @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/backup_d_r.create_management_server.js + * region_tag:backupdr_v1_generated_BackupDR_CreateManagementServer_async + */ + async checkCreateManagementServerProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.ManagementServer, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.createManagementServer, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.ManagementServer, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Deletes a single ManagementServer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.delete_management_server.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteManagementServer_async + */ + deleteManagementServer( + request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteManagementServer( + request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteManagementServer( + request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteManagementServer( + request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.deleteManagementServer( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `deleteManagementServer()`. + * @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/backup_d_r.delete_management_server.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteManagementServer_async + */ + async checkDeleteManagementServerProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.deleteManagementServer, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Creates a new BackupVault in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Value for parent. + * @param {string} request.backupVaultId + * Required. ID of the requesting object + * If auto-generating ID server-side, remove this field and + * backup_vault_id from the method_signature of Create RPC + * @param {google.cloud.backupdr.v1.BackupVault} request.backupVault + * Required. The resource being created + * @param {string} [request.requestId] + * Optional. An optional 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 request, but do not perform mutations. + * The default is 'false'. + * @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/backup_d_r.create_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupVault_async + */ + createBackupVault( + request?: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createBackupVault( + request: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createBackupVault( + request: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createBackupVault( + request?: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.createBackupVault(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createBackupVault()`. + * @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/backup_d_r.create_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupVault_async + */ + async checkCreateBackupVaultProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.BackupVault, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.createBackupVault, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.BackupVault, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Updates the settings of a BackupVault. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * BackupVault 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 the request will fail. + * @param {google.cloud.backupdr.v1.BackupVault} request.backupVault + * Required. The resource being updated + * @param {string} [request.requestId] + * Optional. An optional 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 request, but do not perform mutations. + * The default is 'false'. + * @param {boolean} [request.force] + * Optional. If set to true, will not check plan duration against backup vault + * enforcement duration. + * @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/backup_d_r.update_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateBackupVault_async + */ + updateBackupVault( + request?: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateBackupVault( + request: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateBackupVault( + request: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateBackupVault( + request?: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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({ + 'backup_vault.name': request.backupVault!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateBackupVault(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateBackupVault()`. + * @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/backup_d_r.update_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateBackupVault_async + */ + async checkUpdateBackupVaultProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.BackupVault, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.updateBackupVault, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.BackupVault, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Deletes a BackupVault. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {string} [request.requestId] + * Optional. An optional 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 data source from this backup vault will also + * be deleted. + * @param {string} request.etag + * The current etag of the backup vault. + * If an etag is provided and does not match the current etag of the + * connection, deletion will be blocked. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is 'false'. + * @param {boolean} [request.allowMissing] + * Optional. If true and the BackupVault is not found, the request will + * succeed but no action will be taken. + * @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/backup_d_r.delete_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupVault_async + */ + deleteBackupVault( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteBackupVault( + request: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteBackupVault( + request: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteBackupVault( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.deleteBackupVault(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteBackupVault()`. + * @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/backup_d_r.delete_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupVault_async + */ + async checkDeleteBackupVaultProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.deleteBackupVault, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Updates the settings of a DataSource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * DataSource 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 the request will fail. + * @param {google.cloud.backupdr.v1.DataSource} request.dataSource + * Required. The resource being updated + * @param {string} [request.requestId] + * Optional. An optional 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.allowMissing] + * Optional. Enable upsert. + * @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/backup_d_r.update_data_source.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateDataSource_async + */ + updateDataSource( + request?: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateDataSource( + request: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateDataSource( + request: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateDataSource( + request?: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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({ + 'data_source.name': request.dataSource!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateDataSource(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateDataSource()`. + * @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/backup_d_r.update_data_source.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateDataSource_async + */ + async checkUpdateDataSourceProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.DataSource, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.updateDataSource, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.DataSource, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Deletes a DataSource. This is a custom method instead of a standard delete + * method because external clients will not delete DataSources except for + * BackupDR backup appliances. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.remove_data_source.js + * region_tag:backupdr_v1_generated_BackupDR_RemoveDataSource_async + */ + removeDataSource( + request?: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + removeDataSource( + request: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + removeDataSource( + request: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + removeDataSource( + request?: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.removeDataSource(request, options, callback); + } + /** + * Check the status of the long running operation returned by `removeDataSource()`. + * @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/backup_d_r.remove_data_source.js + * region_tag:backupdr_v1_generated_BackupDR_RemoveDataSource_async + */ + async checkRemoveDataSourceProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.removeDataSource, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Sets the internal status of a DataSource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.dataSource + * Required. The resource name of the instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/'. + * @param {Buffer} request.value + * Required. The value required for this method to work. This field must be + * the 32-byte SHA256 hash of the DataSourceID. The DataSourceID used here is + * only the final piece of the fully qualified resource path for this + * DataSource (i.e. the part after '.../dataSources/'). This field exists to + * make this method difficult to call since it is intended for use only by + * Backup Appliances. + * @param {google.cloud.backupdr.v1.BackupConfigState} request.backupConfigState + * Required. Output only. The new BackupConfigState to set for the DataSource. + * @param {string} [request.requestId] + * Optional. An optional 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. 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/backup_d_r.set_internal_status.js + * region_tag:backupdr_v1_generated_BackupDR_SetInternalStatus_async + */ + setInternalStatus( + request?: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + setInternalStatus( + request: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + setInternalStatus( + request: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + setInternalStatus( + request?: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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({ + data_source: request.dataSource ?? '', + }); + this.initialize(); + return this.innerApiCalls.setInternalStatus(request, options, callback); + } + /** + * Check the status of the long running operation returned by `setInternalStatus()`. + * @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/backup_d_r.set_internal_status.js + * region_tag:backupdr_v1_generated_BackupDR_SetInternalStatus_async + */ + async checkSetInternalStatusProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.SetInternalStatusResponse, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.setInternalStatus, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.SetInternalStatusResponse, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Internal only. + * Abandons a backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.dataSource + * Required. The resource name of the instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/'. + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.abandon_backup.js + * region_tag:backupdr_v1_generated_BackupDR_AbandonBackup_async + */ + abandonBackup( + request?: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + abandonBackup( + request: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + abandonBackup( + request: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + abandonBackup( + request?: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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({ + data_source: request.dataSource ?? '', + }); + this.initialize(); + return this.innerApiCalls.abandonBackup(request, options, callback); + } + /** + * Check the status of the long running operation returned by `abandonBackup()`. + * @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/backup_d_r.abandon_backup.js + * region_tag:backupdr_v1_generated_BackupDR_AbandonBackup_async + */ + async checkAbandonBackupProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.abandonBackup, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Internal only. + * Finalize a backup that was started by a call to InitiateBackup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.dataSource + * Required. The resource name of the instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/'. + * @param {string} request.description + * This will be assigned to the description field of the newly created Backup. + * @param {google.protobuf.Timestamp} request.consistencyTime + * The point in time when this backup was captured from the source. This will + * be assigned to the consistency_time field of the newly created Backup. + * @param {string} [request.requestId] + * Optional. An optional 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 {string} request.backupId + * Required. Resource ID of the Backup resource to be finalized. This must be + * the same backup_id that was used in the InitiateBackupRequest. + * @param {google.protobuf.Timestamp} request.recoveryRangeStartTime + * The earliest timestamp of data available in this Backup. This will set on + * the newly created Backup. + * @param {google.protobuf.Timestamp} request.recoveryRangeEndTime + * The latest timestamp of data available in this Backup. This will be set on + * the newly created Backup. + * @param {google.protobuf.Duration} request.retentionDuration + * The ExpireTime on the backup will be set to FinalizeTime plus this + * duration. If the resulting ExpireTime is less than + * EnforcedRetentionEndTime, then ExpireTime is set to + * EnforcedRetentionEndTime. + * @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/backup_d_r.finalize_backup.js + * region_tag:backupdr_v1_generated_BackupDR_FinalizeBackup_async + */ + finalizeBackup( + request?: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + finalizeBackup( + request: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + finalizeBackup( + request: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + finalizeBackup( + request?: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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({ + data_source: request.dataSource ?? '', + }); + this.initialize(); + return this.innerApiCalls.finalizeBackup(request, options, callback); + } + /** + * Check the status of the long running operation returned by `finalizeBackup()`. + * @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/backup_d_r.finalize_backup.js + * region_tag:backupdr_v1_generated_BackupDR_FinalizeBackup_async + */ + async checkFinalizeBackupProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.Backup, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.finalizeBackup, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.Backup, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Updates the settings of a Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup 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 the request will fail. + * @param {google.cloud.backupdr.v1.Backup} request.backup + * Required. The resource being updated + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.update_backup.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateBackup_async + */ + updateBackup( + request?: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateBackup( + request: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateBackup( + request: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateBackup( + request?: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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({ + 'backup.name': request.backup!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateBackup(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateBackup()`. + * @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/backup_d_r.update_backup.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateBackup_async + */ + async checkUpdateBackupProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.Backup, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.updateBackup, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.Backup, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Deletes a Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.delete_backup.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackup_async + */ + deleteBackup( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteBackup( + request: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteBackup( + request: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteBackup( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.deleteBackup(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteBackup()`. + * @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/backup_d_r.delete_backup.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackup_async + */ + async checkDeleteBackupProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.Backup, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.deleteBackup, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.Backup, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Restore from a Backup + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Backup instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/* /backups/'. + * @param {string} [request.requestId] + * Optional. An optional 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 {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} request.computeInstanceTargetEnvironment + * Compute Engine target environment to be used during restore. + * @param {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} request.computeInstanceRestoreProperties + * Compute Engine instance properties to be overridden during restore. + * @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/backup_d_r.restore_backup.js + * region_tag:backupdr_v1_generated_BackupDR_RestoreBackup_async + */ + restoreBackup( + request?: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + restoreBackup( + request: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + restoreBackup( + request: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + restoreBackup( + request?: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.restoreBackup(request, options, callback); + } + /** + * Check the status of the long running operation returned by `restoreBackup()`. + * @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/backup_d_r.restore_backup.js + * region_tag:backupdr_v1_generated_BackupDR_RestoreBackup_async + */ + async checkRestoreBackupProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.RestoreBackupResponse, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.restoreBackup, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.RestoreBackupResponse, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Create a BackupPlan + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The `BackupPlan` project and location in the format + * `projects/{project}/locations/{location}`. In Cloud BackupDR locations + * map to GCP regions, for example **us-central1**. + * @param {string} request.backupPlanId + * Required. The name of the `BackupPlan` to create. The name must be unique + * for the specified project and location.The name must start with a lowercase + * letter followed by up to 62 lowercase letters, numbers, or hyphens. + * Pattern, /{@link protos.a-z0-9-|a-z}{,62}/. + * @param {google.cloud.backupdr.v1.BackupPlan} request.backupPlan + * Required. The `BackupPlan` resource object to create. + * @param {string} [request.requestId] + * Optional. An optional 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 t + * he 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/backup_d_r.create_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlan_async + */ + createBackupPlan( + request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createBackupPlan( + request: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createBackupPlan( + request: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createBackupPlan( + request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.createBackupPlan(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createBackupPlan()`. + * @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/backup_d_r.create_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlan_async + */ + async checkCreateBackupPlanProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.BackupPlan, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.createBackupPlan, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.BackupPlan, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Deletes a single BackupPlan. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the `BackupPlan` to delete. + * + * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.delete_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlan_async + */ + deleteBackupPlan( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteBackupPlan( + request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteBackupPlan( + request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteBackupPlan( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.deleteBackupPlan(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteBackupPlan()`. + * @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/backup_d_r.delete_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlan_async + */ + async checkDeleteBackupPlanProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.deleteBackupPlan, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Create a BackupPlanAssociation + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The backup plan association project and location in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations + * map to GCP regions, for example **us-central1**. + * @param {string} request.backupPlanAssociationId + * Required. The name of the backup plan association to create. The name must + * be unique for the specified project and location. + * @param {google.cloud.backupdr.v1.BackupPlanAssociation} request.backupPlanAssociation + * Required. The resource being created + * @param {string} [request.requestId] + * Optional. An optional 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 t + * he 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/backup_d_r.create_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async + */ + createBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.createBackupPlanAssociation( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `createBackupPlanAssociation()`. + * @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/backup_d_r.create_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async + */ + async checkCreateBackupPlanAssociationProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.BackupPlanAssociation, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.createBackupPlanAssociation, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.BackupPlanAssociation, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Deletes a single BackupPlanAssociation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.delete_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async + */ + deleteBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.deleteBackupPlanAssociation( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `deleteBackupPlanAssociation()`. + * @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/backup_d_r.delete_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async + */ + async checkDeleteBackupPlanAssociationProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.deleteBackupPlanAssociation, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Triggers a new Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @param {string} request.ruleId + * Required. backup rule_id for which a backup needs to be triggered. + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.trigger_backup.js + * region_tag:backupdr_v1_generated_BackupDR_TriggerBackup_async + */ + triggerBackup( + request?: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + triggerBackup( + request: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + triggerBackup( + request: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + triggerBackup( + request?: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.triggerBackup(request, options, callback); + } + /** + * Check the status of the long running operation returned by `triggerBackup()`. + * @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/backup_d_r.trigger_backup.js + * region_tag:backupdr_v1_generated_BackupDR_TriggerBackup_async + */ + async checkTriggerBackupProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.BackupPlanAssociation, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.triggerBackup, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.BackupPlanAssociation, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Lists ManagementServers in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud BackupDR, locations map to Google Cloud regions, for example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.ManagementServer|ManagementServer}. + * 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 `listManagementServersAsync()` + * 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. + */ + listManagementServers( + request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IManagementServer[], + protos.google.cloud.backupdr.v1.IListManagementServersRequest | null, + protos.google.cloud.backupdr.v1.IListManagementServersResponse, + ] + >; + listManagementServers( + request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListManagementServersRequest, + | protos.google.cloud.backupdr.v1.IListManagementServersResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IManagementServer + > + ): void; + listManagementServers( + request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListManagementServersRequest, + | protos.google.cloud.backupdr.v1.IListManagementServersResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IManagementServer + > + ): void; + listManagementServers( + request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1.IListManagementServersRequest, + | protos.google.cloud.backupdr.v1.IListManagementServersResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IManagementServer + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListManagementServersRequest, + | protos.google.cloud.backupdr.v1.IListManagementServersResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IManagementServer + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IManagementServer[], + protos.google.cloud.backupdr.v1.IListManagementServersRequest | null, + protos.google.cloud.backupdr.v1.IListManagementServersResponse, + ] + > | 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.listManagementServers(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 project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud BackupDR, locations map to Google Cloud regions, for example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.ManagementServer|ManagementServer} 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 `listManagementServersAsync()` + * 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. + */ + listManagementServersStream( + request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + 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['listManagementServers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listManagementServers.createStream( + this.innerApiCalls.listManagementServers as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listManagementServers`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud BackupDR, locations map to Google Cloud regions, for example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.ManagementServer|ManagementServer}. 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/backup_d_r.list_management_servers.js + * region_tag:backupdr_v1_generated_BackupDR_ListManagementServers_async + */ + listManagementServersAsync( + request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + 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['listManagementServers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listManagementServers.asyncIterate( + this.innerApiCalls['listManagementServers'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists BackupVaults in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault. + * @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.backupdr.v1.BackupVault|BackupVault}. + * 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 `listBackupVaultsAsync()` + * 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. + */ + listBackupVaults( + request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupVault[], + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest | null, + protos.google.cloud.backupdr.v1.IListBackupVaultsResponse, + ] + >; + listBackupVaults( + request: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + | protos.google.cloud.backupdr.v1.IListBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupVault + > + ): void; + listBackupVaults( + request: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + | protos.google.cloud.backupdr.v1.IListBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupVault + > + ): void; + listBackupVaults( + request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + | protos.google.cloud.backupdr.v1.IListBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupVault + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + | protos.google.cloud.backupdr.v1.IListBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupVault + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupVault[], + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest | null, + protos.google.cloud.backupdr.v1.IListBackupVaultsResponse, + ] + > | 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.listBackupVaults(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 project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault. + * @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.backupdr.v1.BackupVault|BackupVault} 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 `listBackupVaultsAsync()` + * 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. + */ + listBackupVaultsStream( + request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + 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['listBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupVaults.createStream( + this.innerApiCalls.listBackupVaults as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listBackupVaults`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault. + * @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.backupdr.v1.BackupVault|BackupVault}. 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/backup_d_r.list_backup_vaults.js + * region_tag:backupdr_v1_generated_BackupDR_ListBackupVaults_async + */ + listBackupVaultsAsync( + request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + 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['listBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupVaults.asyncIterate( + this.innerApiCalls['listBackupVaults'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * FetchUsableBackupVaults lists usable BackupVaults in a given project and + * location. Usable BackupVault are the ones that user has + * backupdr.backupVaults.get permission. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.BackupVault|BackupVault}. + * 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 `fetchUsableBackupVaultsAsync()` + * 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. + */ + fetchUsableBackupVaults( + request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupVault[], + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest | null, + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse, + ] + >; + fetchUsableBackupVaults( + request: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + | protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupVault + > + ): void; + fetchUsableBackupVaults( + request: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + | protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupVault + > + ): void; + fetchUsableBackupVaults( + request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + | protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupVault + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + | protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupVault + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupVault[], + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest | null, + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse, + ] + > | 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.fetchUsableBackupVaults( + 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 project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.BackupVault|BackupVault} 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 `fetchUsableBackupVaultsAsync()` + * 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. + */ + fetchUsableBackupVaultsStream( + request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + 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['fetchUsableBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.fetchUsableBackupVaults.createStream( + this.innerApiCalls.fetchUsableBackupVaults as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `fetchUsableBackupVaults`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.BackupVault|BackupVault}. 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/backup_d_r.fetch_usable_backup_vaults.js + * region_tag:backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_async + */ + fetchUsableBackupVaultsAsync( + request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + 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['fetchUsableBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.fetchUsableBackupVaults.asyncIterate( + this.innerApiCalls['fetchUsableBackupVaults'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists DataSources in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve data + * sources information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.DataSource|DataSource}. + * 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 `listDataSourcesAsync()` + * 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. + */ + listDataSources( + request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IDataSource[], + protos.google.cloud.backupdr.v1.IListDataSourcesRequest | null, + protos.google.cloud.backupdr.v1.IListDataSourcesResponse, + ] + >; + listDataSources( + request: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + | protos.google.cloud.backupdr.v1.IListDataSourcesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IDataSource + > + ): void; + listDataSources( + request: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + | protos.google.cloud.backupdr.v1.IListDataSourcesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IDataSource + > + ): void; + listDataSources( + request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + | protos.google.cloud.backupdr.v1.IListDataSourcesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IDataSource + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + | protos.google.cloud.backupdr.v1.IListDataSourcesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IDataSource + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IDataSource[], + protos.google.cloud.backupdr.v1.IListDataSourcesRequest | null, + protos.google.cloud.backupdr.v1.IListDataSourcesResponse, + ] + > | 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.listDataSources(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 project and location for which to retrieve data + * sources information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.DataSource|DataSource} 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 `listDataSourcesAsync()` + * 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. + */ + listDataSourcesStream( + request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + 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['listDataSources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataSources.createStream( + this.innerApiCalls.listDataSources as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listDataSources`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve data + * sources information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.DataSource|DataSource}. 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/backup_d_r.list_data_sources.js + * region_tag:backupdr_v1_generated_BackupDR_ListDataSources_async + */ + listDataSourcesAsync( + request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + 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['listDataSources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataSources.asyncIterate( + this.innerApiCalls['listDataSources'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Backups in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backup + * information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @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.backupdr.v1.Backup|Backup}. + * 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 `listBackupsAsync()` + * 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. + */ + listBackups( + request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackup[], + protos.google.cloud.backupdr.v1.IListBackupsRequest | null, + protos.google.cloud.backupdr.v1.IListBackupsResponse, + ] + >; + listBackups( + request: protos.google.cloud.backupdr.v1.IListBackupsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupsRequest, + protos.google.cloud.backupdr.v1.IListBackupsResponse | null | undefined, + protos.google.cloud.backupdr.v1.IBackup + > + ): void; + listBackups( + request: protos.google.cloud.backupdr.v1.IListBackupsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupsRequest, + protos.google.cloud.backupdr.v1.IListBackupsResponse | null | undefined, + protos.google.cloud.backupdr.v1.IBackup + > + ): void; + listBackups( + request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupsRequest, + | protos.google.cloud.backupdr.v1.IListBackupsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackup + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupsRequest, + protos.google.cloud.backupdr.v1.IListBackupsResponse | null | undefined, + protos.google.cloud.backupdr.v1.IBackup + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackup[], + protos.google.cloud.backupdr.v1.IListBackupsRequest | null, + protos.google.cloud.backupdr.v1.IListBackupsResponse, + ] + > | 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.listBackups(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 project and location for which to retrieve backup + * information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @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.backupdr.v1.Backup|Backup} 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 `listBackupsAsync()` + * 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. + */ + listBackupsStream( + request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, + 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['listBackups']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackups.createStream( + this.innerApiCalls.listBackups as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listBackups`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backup + * information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @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.backupdr.v1.Backup|Backup}. 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/backup_d_r.list_backups.js + * region_tag:backupdr_v1_generated_BackupDR_ListBackups_async + */ + listBackupsAsync( + request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, + 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['listBackups']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackups.asyncIterate( + this.innerApiCalls['listBackups'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists BackupPlans in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Cloud + * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + * retrieve backup plans for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Field match expression used to filter the results. + * @param {string} [request.orderBy] + * Optional. Field by which to sort the results. + * @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.backupdr.v1.BackupPlan|BackupPlan}. + * 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 `listBackupPlansAsync()` + * 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. + */ + listBackupPlans( + request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupPlan[], + protos.google.cloud.backupdr.v1.IListBackupPlansRequest | null, + protos.google.cloud.backupdr.v1.IListBackupPlansResponse, + ] + >; + listBackupPlans( + request: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + | protos.google.cloud.backupdr.v1.IListBackupPlansResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupPlan + > + ): void; + listBackupPlans( + request: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + | protos.google.cloud.backupdr.v1.IListBackupPlansResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupPlan + > + ): void; + listBackupPlans( + request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + | protos.google.cloud.backupdr.v1.IListBackupPlansResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupPlan + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + | protos.google.cloud.backupdr.v1.IListBackupPlansResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupPlan + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupPlan[], + protos.google.cloud.backupdr.v1.IListBackupPlansRequest | null, + protos.google.cloud.backupdr.v1.IListBackupPlansResponse, + ] + > | 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.listBackupPlans(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 project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Cloud + * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + * retrieve backup plans for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Field match expression used to filter the results. + * @param {string} [request.orderBy] + * Optional. Field by which to sort the results. + * @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.backupdr.v1.BackupPlan|BackupPlan} 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 `listBackupPlansAsync()` + * 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. + */ + listBackupPlansStream( + request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + 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['listBackupPlans']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupPlans.createStream( + this.innerApiCalls.listBackupPlans as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listBackupPlans`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Cloud + * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + * retrieve backup plans for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Field match expression used to filter the results. + * @param {string} [request.orderBy] + * Optional. Field by which to sort the results. + * @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.backupdr.v1.BackupPlan|BackupPlan}. 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/backup_d_r.list_backup_plans.js + * region_tag:backupdr_v1_generated_BackupDR_ListBackupPlans_async + */ + listBackupPlansAsync( + request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + 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['listBackupPlans']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupPlans.asyncIterate( + this.innerApiCalls['listBackupPlans'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; } /** - * Lists ManagementServers in a given project and location. + * Lists BackupPlanAssociations in a given project and location. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The project and location for which to retrieve management servers - * information, in the format `projects/{project_id}/locations/{location}`. In - * Cloud BackupDR, locations map to GCP regions, for example **us-central1**. - * To retrieve management servers for all locations, use "-" for the + * Required. The project and location for which to retrieve backup Plan + * Associations information, in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + * map to GCP regions, for example **us-central1**. To retrieve backup plan + * associations for all locations, use "-" for the * `{location}` value. * @param {number} [request.pageSize] * Optional. Requested page size. Server may return fewer items than @@ -921,75 +5765,73 @@ export class BackupDRClient { * @param {string} [request.pageToken] * Optional. A token identifying a page of results the server should return. * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. + * Optional. Filtering results * @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.backupdr.v1.ManagementServer|ManagementServer}. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. * 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 `listManagementServersAsync()` + * We recommend using `listBackupPlanAssociationsAsync()` * 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. */ - listManagementServers( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + listBackupPlanAssociations( + request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.backupdr.v1.IManagementServer[], - protos.google.cloud.backupdr.v1.IListManagementServersRequest | null, - protos.google.cloud.backupdr.v1.IListManagementServersResponse, + protos.google.cloud.backupdr.v1.IBackupPlanAssociation[], + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest | null, + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse, ] >; - listManagementServers( - request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + listBackupPlanAssociations( + request: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - | protos.google.cloud.backupdr.v1.IListManagementServersResponse + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + | protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse | null | undefined, - protos.google.cloud.backupdr.v1.IManagementServer + protos.google.cloud.backupdr.v1.IBackupPlanAssociation > ): void; - listManagementServers( - request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + listBackupPlanAssociations( + request: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - | protos.google.cloud.backupdr.v1.IListManagementServersResponse + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + | protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse | null | undefined, - protos.google.cloud.backupdr.v1.IManagementServer + protos.google.cloud.backupdr.v1.IBackupPlanAssociation > ): void; - listManagementServers( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + listBackupPlanAssociations( + request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - | protos.google.cloud.backupdr.v1.IListManagementServersResponse + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + | protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse | null | undefined, - protos.google.cloud.backupdr.v1.IManagementServer + protos.google.cloud.backupdr.v1.IBackupPlanAssociation >, callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - | protos.google.cloud.backupdr.v1.IListManagementServersResponse + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + | protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse | null | undefined, - protos.google.cloud.backupdr.v1.IManagementServer + protos.google.cloud.backupdr.v1.IBackupPlanAssociation > ): Promise< [ - protos.google.cloud.backupdr.v1.IManagementServer[], - protos.google.cloud.backupdr.v1.IListManagementServersRequest | null, - protos.google.cloud.backupdr.v1.IListManagementServersResponse, + protos.google.cloud.backupdr.v1.IBackupPlanAssociation[], + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest | null, + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse, ] > | void { request = request || {}; @@ -1008,7 +5850,11 @@ export class BackupDRClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listManagementServers(request, options, callback); + return this.innerApiCalls.listBackupPlanAssociations( + request, + options, + callback + ); } /** @@ -1016,10 +5862,11 @@ export class BackupDRClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The project and location for which to retrieve management servers - * information, in the format `projects/{project_id}/locations/{location}`. In - * Cloud BackupDR, locations map to GCP regions, for example **us-central1**. - * To retrieve management servers for all locations, use "-" for the + * Required. The project and location for which to retrieve backup Plan + * Associations information, in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + * map to GCP regions, for example **us-central1**. To retrieve backup plan + * associations for all locations, use "-" for the * `{location}` value. * @param {number} [request.pageSize] * Optional. Requested page size. Server may return fewer items than @@ -1027,22 +5874,20 @@ export class BackupDRClient { * @param {string} [request.pageToken] * Optional. A token identifying a page of results the server should return. * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. + * Optional. Filtering results * @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.backupdr.v1.ManagementServer|ManagementServer} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation} 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 `listManagementServersAsync()` + * We recommend using `listBackupPlanAssociationsAsync()` * 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. */ - listManagementServersStream( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + listBackupPlanAssociationsStream( + request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -1053,27 +5898,28 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listManagementServers']; + const defaultCallSettings = this._defaults['listBackupPlanAssociations']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listManagementServers.createStream( - this.innerApiCalls.listManagementServers as GaxCall, + return this.descriptors.page.listBackupPlanAssociations.createStream( + this.innerApiCalls.listBackupPlanAssociations as GaxCall, request, callSettings ); } /** - * Equivalent to `listManagementServers`, but returns an iterable object. + * Equivalent to `listBackupPlanAssociations`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The project and location for which to retrieve management servers - * information, in the format `projects/{project_id}/locations/{location}`. In - * Cloud BackupDR, locations map to GCP regions, for example **us-central1**. - * To retrieve management servers for all locations, use "-" for the + * Required. The project and location for which to retrieve backup Plan + * Associations information, in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + * map to GCP regions, for example **us-central1**. To retrieve backup plan + * associations for all locations, use "-" for the * `{location}` value. * @param {number} [request.pageSize] * Optional. Requested page size. Server may return fewer items than @@ -1081,25 +5927,23 @@ export class BackupDRClient { * @param {string} [request.pageToken] * Optional. A token identifying a page of results the server should return. * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. + * Optional. Filtering results * @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.backupdr.v1.ManagementServer|ManagementServer}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. 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/backup_d_r.list_management_servers.js - * region_tag:backupdr_v1_generated_BackupDR_ListManagementServers_async + * @example include:samples/generated/v1/backup_d_r.list_backup_plan_associations.js + * region_tag:backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_async */ - listManagementServersAsync( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + listBackupPlanAssociationsAsync( + request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1108,14 +5952,14 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listManagementServers']; + const defaultCallSettings = this._defaults['listBackupPlanAssociations']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listManagementServers.asyncIterate( - this.innerApiCalls['listManagementServers'] as GaxCall, + return this.descriptors.page.listBackupPlanAssociations.asyncIterate( + this.innerApiCalls['listBackupPlanAssociations'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** * Gets the access control policy for a resource. Returns an empty policy @@ -1512,6 +6356,325 @@ export class BackupDRClient { // -- Path templates -- // -------------------- + /** + * Return a fully-qualified backup resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backupvault + * @param {string} datasource + * @param {string} backup + * @returns {string} Resource name string. + */ + backupPath( + project: string, + location: string, + backupvault: string, + datasource: string, + backup: string + ) { + return this.pathTemplates.backupPathTemplate.render({ + project: project, + location: location, + backupvault: backupvault, + datasource: datasource, + backup: backup, + }); + } + + /** + * Parse the project from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).project; + } + + /** + * Parse the location from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).location; + } + + /** + * Parse the backupvault from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the backupvault. + */ + matchBackupvaultFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).backupvault; + } + + /** + * Parse the datasource from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the datasource. + */ + matchDatasourceFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).datasource; + } + + /** + * Parse the backup from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the backup. + */ + matchBackupFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).backup; + } + + /** + * Return a fully-qualified backupPlan resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backup_plan + * @returns {string} Resource name string. + */ + backupPlanPath(project: string, location: string, backupPlan: string) { + return this.pathTemplates.backupPlanPathTemplate.render({ + project: project, + location: location, + backup_plan: backupPlan, + }); + } + + /** + * Parse the project from BackupPlan resource. + * + * @param {string} backupPlanName + * A fully-qualified path representing BackupPlan resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupPlanName(backupPlanName: string) { + return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName) + .project; + } + + /** + * Parse the location from BackupPlan resource. + * + * @param {string} backupPlanName + * A fully-qualified path representing BackupPlan resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupPlanName(backupPlanName: string) { + return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName) + .location; + } + + /** + * Parse the backup_plan from BackupPlan resource. + * + * @param {string} backupPlanName + * A fully-qualified path representing BackupPlan resource. + * @returns {string} A string representing the backup_plan. + */ + matchBackupPlanFromBackupPlanName(backupPlanName: string) { + return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName) + .backup_plan; + } + + /** + * Return a fully-qualified backupPlanAssociation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backup_plan_association + * @returns {string} Resource name string. + */ + backupPlanAssociationPath( + project: string, + location: string, + backupPlanAssociation: string + ) { + return this.pathTemplates.backupPlanAssociationPathTemplate.render({ + project: project, + location: location, + backup_plan_association: backupPlanAssociation, + }); + } + + /** + * Parse the project from BackupPlanAssociation resource. + * + * @param {string} backupPlanAssociationName + * A fully-qualified path representing BackupPlanAssociation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupPlanAssociationName(backupPlanAssociationName: string) { + return this.pathTemplates.backupPlanAssociationPathTemplate.match( + backupPlanAssociationName + ).project; + } + + /** + * Parse the location from BackupPlanAssociation resource. + * + * @param {string} backupPlanAssociationName + * A fully-qualified path representing BackupPlanAssociation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupPlanAssociationName( + backupPlanAssociationName: string + ) { + return this.pathTemplates.backupPlanAssociationPathTemplate.match( + backupPlanAssociationName + ).location; + } + + /** + * Parse the backup_plan_association from BackupPlanAssociation resource. + * + * @param {string} backupPlanAssociationName + * A fully-qualified path representing BackupPlanAssociation resource. + * @returns {string} A string representing the backup_plan_association. + */ + matchBackupPlanAssociationFromBackupPlanAssociationName( + backupPlanAssociationName: string + ) { + return this.pathTemplates.backupPlanAssociationPathTemplate.match( + backupPlanAssociationName + ).backup_plan_association; + } + + /** + * Return a fully-qualified backupVault resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backupvault + * @returns {string} Resource name string. + */ + backupVaultPath(project: string, location: string, backupvault: string) { + return this.pathTemplates.backupVaultPathTemplate.render({ + project: project, + location: location, + backupvault: backupvault, + }); + } + + /** + * Parse the project from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName) + .project; + } + + /** + * Parse the location from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName) + .location; + } + + /** + * Parse the backupvault from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the backupvault. + */ + matchBackupvaultFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName) + .backupvault; + } + + /** + * Return a fully-qualified dataSource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backupvault + * @param {string} datasource + * @returns {string} Resource name string. + */ + dataSourcePath( + project: string, + location: string, + backupvault: string, + datasource: string + ) { + return this.pathTemplates.dataSourcePathTemplate.render({ + project: project, + location: location, + backupvault: backupvault, + datasource: datasource, + }); + } + + /** + * Parse the project from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName) + .project; + } + + /** + * Parse the location from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName) + .location; + } + + /** + * Parse the backupvault from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the backupvault. + */ + matchBackupvaultFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName) + .backupvault; + } + + /** + * Parse the datasource from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the datasource. + */ + matchDatasourceFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName) + .datasource; + } + /** * Return a fully-qualified location resource name string. * diff --git a/packages/google-cloud-backupdr/src/v1/backup_d_r_client_config.json b/packages/google-cloud-backupdr/src/v1/backup_d_r_client_config.json index 120fe4b7bcf..8b29881f031 100644 --- a/packages/google-cloud-backupdr/src/v1/backup_d_r_client_config.json +++ b/packages/google-cloud-backupdr/src/v1/backup_d_r_client_config.json @@ -51,6 +51,139 @@ "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "CreateBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListBackupVaults": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "FetchUsableBackupVaults": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "TestIamPermissions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListDataSources": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetDataSource": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateDataSource": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RemoveDataSource": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetInternalStatus": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "InitiateBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "AbandonBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FinalizeBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchAccessToken": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBackups": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetBackup": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RestoreBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBackupPlan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBackupPlan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBackupPlans": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackupPlan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBackupPlanAssociation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBackupPlanAssociation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBackupPlanAssociations": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackupPlanAssociation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "TriggerBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-backupdr/src/v1/backup_d_r_proto_list.json b/packages/google-cloud-backupdr/src/v1/backup_d_r_proto_list.json index 33bf9e3abd8..79496ec85e7 100644 --- a/packages/google-cloud-backupdr/src/v1/backup_d_r_proto_list.json +++ b/packages/google-cloud-backupdr/src/v1/backup_d_r_proto_list.json @@ -1,3 +1,8 @@ [ - "../../protos/google/cloud/backupdr/v1/backupdr.proto" + "../../protos/google/cloud/backupdr/v1/backupdr.proto", + "../../protos/google/cloud/backupdr/v1/backupplan.proto", + "../../protos/google/cloud/backupdr/v1/backupplanassociation.proto", + "../../protos/google/cloud/backupdr/v1/backupvault.proto", + "../../protos/google/cloud/backupdr/v1/backupvault_ba.proto", + "../../protos/google/cloud/backupdr/v1/backupvault_gce.proto" ] diff --git a/packages/google-cloud-backupdr/src/v1/gapic_metadata.json b/packages/google-cloud-backupdr/src/v1/gapic_metadata.json index dcbec27da8a..0407284a357 100644 --- a/packages/google-cloud-backupdr/src/v1/gapic_metadata.json +++ b/packages/google-cloud-backupdr/src/v1/gapic_metadata.json @@ -15,6 +15,46 @@ "getManagementServer" ] }, + "GetBackupVault": { + "methods": [ + "getBackupVault" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "GetDataSource": { + "methods": [ + "getDataSource" + ] + }, + "InitiateBackup": { + "methods": [ + "initiateBackup" + ] + }, + "FetchAccessToken": { + "methods": [ + "fetchAccessToken" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupPlan": { + "methods": [ + "getBackupPlan" + ] + }, + "GetBackupPlanAssociation": { + "methods": [ + "getBackupPlanAssociation" + ] + }, "CreateManagementServer": { "methods": [ "createManagementServer" @@ -25,12 +65,134 @@ "deleteManagementServer" ] }, + "CreateBackupVault": { + "methods": [ + "createBackupVault" + ] + }, + "UpdateBackupVault": { + "methods": [ + "updateBackupVault" + ] + }, + "DeleteBackupVault": { + "methods": [ + "deleteBackupVault" + ] + }, + "UpdateDataSource": { + "methods": [ + "updateDataSource" + ] + }, + "RemoveDataSource": { + "methods": [ + "removeDataSource" + ] + }, + "SetInternalStatus": { + "methods": [ + "setInternalStatus" + ] + }, + "AbandonBackup": { + "methods": [ + "abandonBackup" + ] + }, + "FinalizeBackup": { + "methods": [ + "finalizeBackup" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "RestoreBackup": { + "methods": [ + "restoreBackup" + ] + }, + "CreateBackupPlan": { + "methods": [ + "createBackupPlan" + ] + }, + "DeleteBackupPlan": { + "methods": [ + "deleteBackupPlan" + ] + }, + "CreateBackupPlanAssociation": { + "methods": [ + "createBackupPlanAssociation" + ] + }, + "DeleteBackupPlanAssociation": { + "methods": [ + "deleteBackupPlanAssociation" + ] + }, + "TriggerBackup": { + "methods": [ + "triggerBackup" + ] + }, "ListManagementServers": { "methods": [ "listManagementServers", "listManagementServersStream", "listManagementServersAsync" ] + }, + "ListBackupVaults": { + "methods": [ + "listBackupVaults", + "listBackupVaultsStream", + "listBackupVaultsAsync" + ] + }, + "FetchUsableBackupVaults": { + "methods": [ + "fetchUsableBackupVaults", + "fetchUsableBackupVaultsStream", + "fetchUsableBackupVaultsAsync" + ] + }, + "ListDataSources": { + "methods": [ + "listDataSources", + "listDataSourcesStream", + "listDataSourcesAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + }, + "ListBackupPlans": { + "methods": [ + "listBackupPlans", + "listBackupPlansStream", + "listBackupPlansAsync" + ] + }, + "ListBackupPlanAssociations": { + "methods": [ + "listBackupPlanAssociations", + "listBackupPlanAssociationsStream", + "listBackupPlanAssociationsAsync" + ] } } }, @@ -42,6 +204,46 @@ "getManagementServer" ] }, + "GetBackupVault": { + "methods": [ + "getBackupVault" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "GetDataSource": { + "methods": [ + "getDataSource" + ] + }, + "InitiateBackup": { + "methods": [ + "initiateBackup" + ] + }, + "FetchAccessToken": { + "methods": [ + "fetchAccessToken" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupPlan": { + "methods": [ + "getBackupPlan" + ] + }, + "GetBackupPlanAssociation": { + "methods": [ + "getBackupPlanAssociation" + ] + }, "CreateManagementServer": { "methods": [ "createManagementServer" @@ -52,12 +254,134 @@ "deleteManagementServer" ] }, + "CreateBackupVault": { + "methods": [ + "createBackupVault" + ] + }, + "UpdateBackupVault": { + "methods": [ + "updateBackupVault" + ] + }, + "DeleteBackupVault": { + "methods": [ + "deleteBackupVault" + ] + }, + "UpdateDataSource": { + "methods": [ + "updateDataSource" + ] + }, + "RemoveDataSource": { + "methods": [ + "removeDataSource" + ] + }, + "SetInternalStatus": { + "methods": [ + "setInternalStatus" + ] + }, + "AbandonBackup": { + "methods": [ + "abandonBackup" + ] + }, + "FinalizeBackup": { + "methods": [ + "finalizeBackup" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "RestoreBackup": { + "methods": [ + "restoreBackup" + ] + }, + "CreateBackupPlan": { + "methods": [ + "createBackupPlan" + ] + }, + "DeleteBackupPlan": { + "methods": [ + "deleteBackupPlan" + ] + }, + "CreateBackupPlanAssociation": { + "methods": [ + "createBackupPlanAssociation" + ] + }, + "DeleteBackupPlanAssociation": { + "methods": [ + "deleteBackupPlanAssociation" + ] + }, + "TriggerBackup": { + "methods": [ + "triggerBackup" + ] + }, "ListManagementServers": { "methods": [ "listManagementServers", "listManagementServersStream", "listManagementServersAsync" ] + }, + "ListBackupVaults": { + "methods": [ + "listBackupVaults", + "listBackupVaultsStream", + "listBackupVaultsAsync" + ] + }, + "FetchUsableBackupVaults": { + "methods": [ + "fetchUsableBackupVaults", + "fetchUsableBackupVaultsStream", + "fetchUsableBackupVaultsAsync" + ] + }, + "ListDataSources": { + "methods": [ + "listDataSources", + "listDataSourcesStream", + "listDataSourcesAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + }, + "ListBackupPlans": { + "methods": [ + "listBackupPlans", + "listBackupPlansStream", + "listBackupPlansAsync" + ] + }, + "ListBackupPlanAssociations": { + "methods": [ + "listBackupPlanAssociations", + "listBackupPlanAssociationsStream", + "listBackupPlanAssociationsAsync" + ] } } } diff --git a/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts b/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts index 3c35c290267..ca86dd90686 100644 --- a/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts +++ b/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts @@ -472,69 +472,64 @@ describe('v1.BackupDRClient', () => { }); }); - describe('createManagementServer', () => { - it('invokes createManagementServer without error', async () => { + describe('getBackupVault', () => { + it('invokes getBackupVault without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.CreateManagementServerRequest', - ['parent'] + '.google.cloud.backupdr.v1.GetBackupVaultRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.backupdr.v1.BackupVault() ); - client.innerApiCalls.createManagementServer = - stubLongRunningCall(expectedResponse); - const [operation] = await client.createManagementServer(request); - const [response] = await operation.promise(); + client.innerApiCalls.getBackupVault = stubSimpleCall(expectedResponse); + const [response] = await client.getBackupVault(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createManagementServer as SinonStub + client.innerApiCalls.getBackupVault as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createManagementServer as SinonStub + client.innerApiCalls.getBackupVault as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createManagementServer without error using callback', async () => { + it('invokes getBackupVault without error using callback', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.CreateManagementServerRequest', - ['parent'] + '.google.cloud.backupdr.v1.GetBackupVaultRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.backupdr.v1.BackupVault() ); - client.innerApiCalls.createManagementServer = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getBackupVault = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createManagementServer( + client.getBackupVault( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IOperationMetadata - > | null + result?: protos.google.cloud.backupdr.v1.IBackupVault | null ) => { if (err) { reject(err); @@ -544,194 +539,6188 @@ describe('v1.BackupDRClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IOperationMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createManagementServer as SinonStub + client.innerApiCalls.getBackupVault as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createManagementServer as SinonStub + client.innerApiCalls.getBackupVault as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createManagementServer with call error', async () => { + it('invokes getBackupVault with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.CreateManagementServerRequest', - ['parent'] + '.google.cloud.backupdr.v1.GetBackupVaultRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createManagementServer = stubLongRunningCall( + client.innerApiCalls.getBackupVault = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.createManagementServer(request), - expectedError - ); + await assert.rejects(client.getBackupVault(request), expectedError); const actualRequest = ( - client.innerApiCalls.createManagementServer as SinonStub + client.innerApiCalls.getBackupVault as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createManagementServer as SinonStub + client.innerApiCalls.getBackupVault as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createManagementServer with LRO error', async () => { + it('invokes getBackupVault with closed client', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.CreateManagementServerRequest', - ['parent'] + '.google.cloud.backupdr.v1.GetBackupVaultRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createManagementServer = stubLongRunningCall( - undefined, - undefined, - expectedError + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBackupVault(request), expectedError); + }); + }); + + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() ); - const [operation] = await client.createManagementServer(request); - await assert.rejects(operation.promise(), expectedError); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'] + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = + stubSimpleCall(expectedResponse); + const [response] = await client.testIamPermissions(request); + assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createManagementServer as SinonStub + client.innerApiCalls.testIamPermissions as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createManagementServer as SinonStub + client.innerApiCalls.testIamPermissions as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCreateManagementServerProgress without error', async () => { + it('invokes testIamPermissions without error using callback', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() ); - 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.checkCreateManagementServerProgress( - expectedResponse.name + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'] ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.ITestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCreateManagementServerProgress with error', async () => { + it('invokes testIamPermissions with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'] + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( + client.innerApiCalls.testIamPermissions = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.checkCreateManagementServerProgress(''), - expectedError + await assert.rejects(client.testIamPermissions(request), expectedError); + const actualRequest = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'] + ); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.testIamPermissions(request), expectedError); }); }); - describe('deleteManagementServer', () => { - it('invokes deleteManagementServer without error', async () => { + describe('getDataSource', () => { + it('invokes getDataSource without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.DeleteManagementServerRequest', + '.google.cloud.backupdr.v1.GetDataSourceRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.backupdr.v1.DataSource() ); - client.innerApiCalls.deleteManagementServer = - stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteManagementServer(request); - const [response] = await operation.promise(); + client.innerApiCalls.getDataSource = stubSimpleCall(expectedResponse); + const [response] = await client.getDataSource(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteManagementServer as SinonStub + client.innerApiCalls.getDataSource as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteManagementServer as SinonStub + client.innerApiCalls.getDataSource as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteManagementServer without error using callback', async () => { + it('invokes getDataSource without error using callback', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.DeleteManagementServerRequest', + '.google.cloud.backupdr.v1.GetDataSourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DataSource() + ); + client.innerApiCalls.getDataSource = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataSource( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IDataSource | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSource with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetDataSourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataSource = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getDataSource(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSource with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetDataSourceRequest', ['name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDataSource(request), expectedError); + }); + }); + + describe('initiateBackup', () => { + it('invokes initiateBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.InitiateBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.InitiateBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.InitiateBackupResponse() + ); + client.innerApiCalls.initiateBackup = stubSimpleCall(expectedResponse); + const [response] = await client.initiateBackup(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.initiateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.initiateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initiateBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.InitiateBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.InitiateBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.InitiateBackupResponse() + ); + client.innerApiCalls.initiateBackup = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.initiateBackup( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IInitiateBackupResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.initiateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.initiateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initiateBackup with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.InitiateBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.InitiateBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.initiateBackup = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.initiateBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.initiateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.initiateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initiateBackup with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.InitiateBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.InitiateBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.initiateBackup(request), expectedError); + }); + }); + + describe('fetchAccessToken', () => { + it('invokes fetchAccessToken without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchAccessTokenRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchAccessTokenResponse() + ); + client.innerApiCalls.fetchAccessToken = stubSimpleCall(expectedResponse); + const [response] = await client.fetchAccessToken(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchAccessToken as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchAccessToken as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchAccessToken without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchAccessTokenRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchAccessTokenResponse() + ); + client.innerApiCalls.fetchAccessToken = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchAccessToken( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchAccessToken as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchAccessToken as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchAccessToken with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchAccessTokenRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchAccessToken = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchAccessToken(request), expectedError); + const actualRequest = ( + client.innerApiCalls.fetchAccessToken as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchAccessToken as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchAccessToken with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchAccessTokenRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchAccessToken(request), expectedError); + }); + }); + + describe('getBackup', () => { + it('invokes getBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.Backup() + ); + client.innerApiCalls.getBackup = stubSimpleCall(expectedResponse); + const [response] = await client.getBackup(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.Backup() + ); + client.innerApiCalls.getBackup = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackup( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IBackup | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackup with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackup = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackup with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBackup(request), expectedError); + }); + }); + + describe('getBackupPlan', () => { + it('invokes getBackupPlan without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupPlanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupPlan() + ); + client.innerApiCalls.getBackupPlan = stubSimpleCall(expectedResponse); + const [response] = await client.getBackupPlan(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlan without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupPlanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupPlan() + ); + client.innerApiCalls.getBackupPlan = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackupPlan( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IBackupPlan | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlan with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupPlanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackupPlan = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getBackupPlan(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlan with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupPlanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBackupPlan(request), expectedError); + }); + }); + + describe('getBackupPlanAssociation', () => { + it('invokes getBackupPlanAssociation without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() + ); + client.innerApiCalls.getBackupPlanAssociation = + stubSimpleCall(expectedResponse); + const [response] = await client.getBackupPlanAssociation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlanAssociation without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() + ); + client.innerApiCalls.getBackupPlanAssociation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackupPlanAssociation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IBackupPlanAssociation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlanAssociation with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackupPlanAssociation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getBackupPlanAssociation(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlanAssociation with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getBackupPlanAssociation(request), + expectedError + ); + }); + }); + + describe('createManagementServer', () => { + it('invokes createManagementServer without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateManagementServerRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createManagementServer = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createManagementServer(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createManagementServer without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateManagementServerRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createManagementServer = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createManagementServer( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createManagementServer with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateManagementServerRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createManagementServer = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createManagementServer(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createManagementServer with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateManagementServerRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createManagementServer = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createManagementServer(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateManagementServerProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateManagementServerProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateManagementServerProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateManagementServerProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteManagementServer', () => { + it('invokes deleteManagementServer without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteManagementServerRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteManagementServer = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteManagementServer(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteManagementServer without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteManagementServerRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteManagementServer = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteManagementServer( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteManagementServer with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteManagementServerRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteManagementServer = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteManagementServer(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteManagementServer with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteManagementServerRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteManagementServer = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteManagementServer(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteManagementServerProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteManagementServerProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteManagementServerProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteManagementServerProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createBackupVault', () => { + it('invokes createBackupVault without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupVaultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupVault = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackupVault(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupVault without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupVaultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupVault = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createBackupVault( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupVault with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupVaultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupVault = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createBackupVault(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupVault with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupVaultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupVault = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createBackupVault(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupVaultProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupVaultProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupVaultProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupVaultProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateBackupVault', () => { + it('invokes updateBackupVault without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateBackupVaultRequest', + ['backupVault', 'name'] + ); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBackupVault = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateBackupVault(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupVault without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateBackupVaultRequest', + ['backupVault', 'name'] + ); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBackupVault = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateBackupVault( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupVault with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateBackupVaultRequest', + ['backupVault', 'name'] + ); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackupVault = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateBackupVault(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupVault with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateBackupVaultRequest', + ['backupVault', 'name'] + ); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackupVault = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateBackupVault(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateBackupVaultProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateBackupVaultProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateBackupVaultProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateBackupVaultProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteBackupVault', () => { + it('invokes deleteBackupVault without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupVaultRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupVault = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackupVault(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupVault without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupVaultRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupVault = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackupVault( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupVault with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupVaultRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupVault = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteBackupVault(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupVault with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupVaultRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupVault = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteBackupVault(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupVaultProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupVaultProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupVaultProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupVaultProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateDataSource', () => { + it('invokes updateDataSource without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + ); + request.dataSource ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateDataSourceRequest', + ['dataSource', 'name'] + ); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataSource = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateDataSource(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataSource without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + ); + request.dataSource ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateDataSourceRequest', + ['dataSource', 'name'] + ); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataSource = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataSource( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataSource with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + ); + request.dataSource ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateDataSourceRequest', + ['dataSource', 'name'] + ); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataSource = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateDataSource(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataSource with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + ); + request.dataSource ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateDataSourceRequest', + ['dataSource', 'name'] + ); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataSource = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateDataSource(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateDataSourceProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateDataSourceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateDataSourceProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateDataSourceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('removeDataSource', () => { + it('invokes removeDataSource without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.RemoveDataSourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.removeDataSource = + stubLongRunningCall(expectedResponse); + const [operation] = await client.removeDataSource(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.removeDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeDataSource without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.RemoveDataSourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.removeDataSource = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removeDataSource( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.removeDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeDataSource with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.RemoveDataSourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.removeDataSource = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.removeDataSource(request), expectedError); + const actualRequest = ( + client.innerApiCalls.removeDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeDataSource with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.RemoveDataSourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.removeDataSource = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.removeDataSource(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.removeDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRemoveDataSourceProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkRemoveDataSourceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRemoveDataSourceProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkRemoveDataSourceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('setInternalStatus', () => { + it('invokes setInternalStatus without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.SetInternalStatusRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.setInternalStatus = + stubLongRunningCall(expectedResponse); + const [operation] = await client.setInternalStatus(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.setInternalStatus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setInternalStatus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setInternalStatus without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.SetInternalStatusRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.setInternalStatus = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setInternalStatus( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.setInternalStatus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setInternalStatus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setInternalStatus with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.SetInternalStatusRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setInternalStatus = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.setInternalStatus(request), expectedError); + const actualRequest = ( + client.innerApiCalls.setInternalStatus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setInternalStatus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setInternalStatus with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.SetInternalStatusRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setInternalStatus = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.setInternalStatus(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.setInternalStatus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setInternalStatus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkSetInternalStatusProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkSetInternalStatusProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkSetInternalStatusProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkSetInternalStatusProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('abandonBackup', () => { + it('invokes abandonBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.AbandonBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.AbandonBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.abandonBackup = + stubLongRunningCall(expectedResponse); + const [operation] = await client.abandonBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.abandonBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.abandonBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes abandonBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.AbandonBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.AbandonBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.abandonBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.abandonBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.abandonBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.abandonBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes abandonBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.AbandonBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.AbandonBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.abandonBackup = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.abandonBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.abandonBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.abandonBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes abandonBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.AbandonBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.AbandonBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.abandonBackup = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.abandonBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.abandonBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.abandonBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkAbandonBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkAbandonBackupProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkAbandonBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkAbandonBackupProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('finalizeBackup', () => { + it('invokes finalizeBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FinalizeBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.finalizeBackup = + stubLongRunningCall(expectedResponse); + const [operation] = await client.finalizeBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.finalizeBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.finalizeBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes finalizeBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FinalizeBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.finalizeBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.finalizeBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.finalizeBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.finalizeBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes finalizeBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FinalizeBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.finalizeBackup = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.finalizeBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.finalizeBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.finalizeBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes finalizeBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FinalizeBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.finalizeBackup = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.finalizeBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.finalizeBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.finalizeBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkFinalizeBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkFinalizeBackupProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkFinalizeBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkFinalizeBackupProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateBackup', () => { + it('invokes updateBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateBackupRequest', + ['backup', 'name'] + ); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateBackupRequest', + ['backup', 'name'] + ); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateBackupRequest', + ['backup', 'name'] + ); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackup = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateBackupRequest', + ['backup', 'name'] + ); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackup = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateBackupProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteBackup', () => { + it('invokes deleteBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackup = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackup = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('restoreBackup', () => { + it('invokes restoreBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RestoreBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.RestoreBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.restoreBackup = + stubLongRunningCall(expectedResponse); + const [operation] = await client.restoreBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RestoreBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.RestoreBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.restoreBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.restoreBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RestoreBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.RestoreBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreBackup = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.restoreBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RestoreBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.RestoreBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreBackup = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.restoreBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRestoreBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkRestoreBackupProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRestoreBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkRestoreBackupProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createBackupPlan', () => { + it('invokes createBackupPlan without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupPlanRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupPlan = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackupPlan(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlan without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupPlanRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupPlan = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createBackupPlan( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlan with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupPlanRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlan = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createBackupPlan(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlan with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupPlanRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlan = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createBackupPlan(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupPlanProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupPlanProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupPlanProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupPlanProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteBackupPlan', () => { + it('invokes deleteBackupPlan without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupPlanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupPlan = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackupPlan(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlan without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupPlanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupPlan = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackupPlan( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlan with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupPlanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlan = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteBackupPlan(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlan with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupPlanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlan = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteBackupPlan(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupPlanProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupPlanProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupPlanProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupPlanProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createBackupPlanAssociation', () => { + it('invokes createBackupPlanAssociation without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupPlanAssociation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackupPlanAssociation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlanAssociation without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupPlanAssociation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createBackupPlanAssociation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlanAssociation with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createBackupPlanAssociation(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlanAssociation with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createBackupPlanAssociation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupPlanAssociationProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupPlanAssociationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupPlanAssociationProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupPlanAssociationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteBackupPlanAssociation', () => { + it('invokes deleteBackupPlanAssociation without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupPlanAssociation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackupPlanAssociation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlanAssociation without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupPlanAssociation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackupPlanAssociation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlanAssociation with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteBackupPlanAssociation(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlanAssociation with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteBackupPlanAssociation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupPlanAssociationProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupPlanAssociationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupPlanAssociationProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupPlanAssociationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('triggerBackup', () => { + it('invokes triggerBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.TriggerBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.TriggerBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.triggerBackup = + stubLongRunningCall(expectedResponse); + const [operation] = await client.triggerBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes triggerBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.TriggerBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.TriggerBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.triggerBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.triggerBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes triggerBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.TriggerBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.TriggerBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.triggerBackup = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.triggerBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes triggerBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.TriggerBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.TriggerBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.triggerBackup = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.triggerBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkTriggerBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkTriggerBackupProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkTriggerBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkTriggerBackupProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listManagementServers', () => { + it('invokes listManagementServers without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListManagementServersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + ]; + client.innerApiCalls.listManagementServers = + stubSimpleCall(expectedResponse); + const [response] = await client.listManagementServers(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listManagementServers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listManagementServers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listManagementServers without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListManagementServersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + ]; + client.innerApiCalls.listManagementServers = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listManagementServers( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IManagementServer[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listManagementServers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listManagementServers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listManagementServers with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListManagementServersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listManagementServers = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listManagementServers(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listManagementServers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listManagementServers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listManagementServersStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListManagementServersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + ]; + client.descriptors.page.listManagementServers.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listManagementServersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.ManagementServer[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.ManagementServer) => { + 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.listManagementServers + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listManagementServers, request) + ); + assert( + ( + client.descriptors.page.listManagementServers + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listManagementServersStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListManagementServersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listManagementServers.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listManagementServersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.ManagementServer[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.ManagementServer) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listManagementServers + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listManagementServers, request) + ); + assert( + ( + client.descriptors.page.listManagementServers + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listManagementServers without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListManagementServersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + ]; + client.descriptors.page.listManagementServers.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IManagementServer[] = []; + const iterable = client.listManagementServersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listManagementServers + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listManagementServers + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listManagementServers with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListManagementServersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listManagementServers.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listManagementServersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IManagementServer[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listManagementServers + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listManagementServers + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listBackupVaults', () => { + it('invokes listBackupVaults without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + ]; + client.innerApiCalls.listBackupVaults = stubSimpleCall(expectedResponse); + const [response] = await client.listBackupVaults(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackupVaults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupVaults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupVaults without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + ]; + client.innerApiCalls.listBackupVaults = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackupVaults( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IBackupVault[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackupVaults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupVaults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupVaults with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackupVaults = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listBackupVaults(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listBackupVaults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupVaults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupVaultsStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + ]; + client.descriptors.page.listBackupVaults.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.BackupVault) => { + 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.listBackupVaults.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackupVaults, request) + ); + assert( + (client.descriptors.page.listBackupVaults.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listBackupVaultsStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupVaults.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.BackupVault) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listBackupVaults.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackupVaults, request) + ); + assert( + (client.descriptors.page.listBackupVaults.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listBackupVaults without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + ]; + client.descriptors.page.listBackupVaults.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; + const iterable = client.listBackupVaultsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listBackupVaults.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listBackupVaults with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupVaults.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBackupVaultsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listBackupVaults.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('fetchUsableBackupVaults', () => { + it('invokes fetchUsableBackupVaults without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + ]; + client.innerApiCalls.fetchUsableBackupVaults = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchUsableBackupVaults(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchUsableBackupVaults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchUsableBackupVaults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchUsableBackupVaults without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + ]; + client.innerApiCalls.fetchUsableBackupVaults = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchUsableBackupVaults( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IBackupVault[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchUsableBackupVaults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchUsableBackupVaults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchUsableBackupVaults with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchUsableBackupVaults = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.fetchUsableBackupVaults(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.fetchUsableBackupVaults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchUsableBackupVaults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchUsableBackupVaultsStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + ]; + client.descriptors.page.fetchUsableBackupVaults.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.fetchUsableBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.BackupVault) => { + 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.fetchUsableBackupVaults + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.fetchUsableBackupVaults, request) + ); + assert( + ( + client.descriptors.page.fetchUsableBackupVaults + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes fetchUsableBackupVaultsStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchUsableBackupVaults.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.fetchUsableBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.BackupVault) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.fetchUsableBackupVaults + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.fetchUsableBackupVaults, request) + ); + assert( + ( + client.descriptors.page.fetchUsableBackupVaults + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with fetchUsableBackupVaults without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + ]; + client.descriptors.page.fetchUsableBackupVaults.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; + const iterable = client.fetchUsableBackupVaultsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.fetchUsableBackupVaults + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.fetchUsableBackupVaults + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with fetchUsableBackupVaults with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchUsableBackupVaults.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.fetchUsableBackupVaultsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.fetchUsableBackupVaults + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.fetchUsableBackupVaults + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listDataSources', () => { + it('invokes listDataSources without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListDataSourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + ]; + client.innerApiCalls.listDataSources = stubSimpleCall(expectedResponse); + const [response] = await client.listDataSources(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDataSources as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataSources as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSources without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListDataSourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + ]; + client.innerApiCalls.listDataSources = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataSources( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IDataSource[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDataSources as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataSources as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSources with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListDataSourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataSources = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listDataSources(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listDataSources as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataSources as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSourcesStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListDataSourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + ]; + client.descriptors.page.listDataSources.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listDataSourcesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.DataSource[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.DataSource) => { + 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.listDataSources.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDataSources, request) + ); + assert( + (client.descriptors.page.listDataSources.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listDataSourcesStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListDataSourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataSources.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataSourcesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.DataSource[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.DataSource) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listDataSources.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDataSources, request) + ); + assert( + (client.descriptors.page.listDataSources.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listDataSources without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListDataSourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + ]; + client.descriptors.page.listDataSources.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IDataSource[] = []; + const iterable = client.listDataSourcesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listDataSources.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listDataSources.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listDataSources with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListDataSourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataSources.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataSourcesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IDataSource[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listDataSources.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listDataSources.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('listBackups', () => { + it('invokes listBackups without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.innerApiCalls.listBackups = stubSimpleCall(expectedResponse); + const [response] = await client.listBackups(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackups without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.innerApiCalls.listBackups = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackups( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IBackup[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackups with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackups = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listBackups(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupsStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.descriptors.page.listBackups.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listBackupsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.Backup[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.Backup) => { + 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.listBackups.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackups, request) + ); + assert( + (client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listBackupsStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackups.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listBackupsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.Backup[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.Backup) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackups, request) + ); + assert( + (client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listBackups without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.descriptors.page.listBackups.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackup[] = []; + const iterable = client.listBackupsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBackups.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listBackups.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listBackups with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackups.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listBackupsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackup[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBackups.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listBackups.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('listBackupPlans', () => { + it('invokes listBackupPlans without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupPlansRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + ]; + client.innerApiCalls.listBackupPlans = stubSimpleCall(expectedResponse); + const [response] = await client.listBackupPlans(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackupPlans as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupPlans as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlans without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupPlansRequest', + ['parent'] ); - client.innerApiCalls.deleteManagementServer = - stubLongRunningCallWithCallback(expectedResponse); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + ]; + client.innerApiCalls.listBackupPlans = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deleteManagementServer( + client.listBackupPlans( request, ( err?: Error | null, - result?: LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - > | null + result?: protos.google.cloud.backupdr.v1.IBackupPlan[] | null ) => { if (err) { reject(err); @@ -741,206 +6730,313 @@ describe('v1.BackupDRClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteManagementServer as SinonStub + client.innerApiCalls.listBackupPlans as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteManagementServer as SinonStub + client.innerApiCalls.listBackupPlans as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteManagementServer with call error', async () => { + it('invokes listBackupPlans with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.DeleteManagementServerRequest', - ['name'] + '.google.cloud.backupdr.v1.ListBackupPlansRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteManagementServer = stubLongRunningCall( + client.innerApiCalls.listBackupPlans = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.deleteManagementServer(request), - expectedError - ); + await assert.rejects(client.listBackupPlans(request), expectedError); const actualRequest = ( - client.innerApiCalls.deleteManagementServer as SinonStub + client.innerApiCalls.listBackupPlans as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteManagementServer as SinonStub + client.innerApiCalls.listBackupPlans as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteManagementServer with LRO error', async () => { + it('invokes listBackupPlansStream without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.DeleteManagementServerRequest', - ['name'] + '.google.cloud.backupdr.v1.ListBackupPlansRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteManagementServer = stubLongRunningCall( - undefined, - undefined, - expectedError + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + ]; + client.descriptors.page.listBackupPlans.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listBackupPlansStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupPlan[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.BackupPlan) => { + 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.listBackupPlans.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackupPlans, request) + ); + assert( + (client.descriptors.page.listBackupPlans.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); - const [operation] = await client.deleteManagementServer(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteManagementServer as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteManagementServer as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkDeleteManagementServerProgress without error', async () => { + it('invokes listBackupPlansStream with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupPlansRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupPlans.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listBackupPlansStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupPlan[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.BackupPlan) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listBackupPlans.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackupPlans, request) + ); + assert( + (client.descriptors.page.listBackupPlans.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteManagementServerProgress( - expectedResponse.name + it('uses async iteration with listBackupPlans without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupPlansRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + ]; + client.descriptors.page.listBackupPlans.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackupPlan[] = []; + const iterable = client.listBackupPlansAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listBackupPlans.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkDeleteManagementServerProgress with error', async () => { + it('uses async iteration with listBackupPlans with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupPlansRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError + client.descriptors.page.listBackupPlans.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBackupPlansAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackupPlan[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listBackupPlans.asyncIterate as SinonStub + ).getCall(0).args[1], + request ); - await assert.rejects( - client.checkDeleteManagementServerProgress(''), - expectedError + assert( + (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('listManagementServers', () => { - it('invokes listManagementServers without error', async () => { + describe('listBackupPlanAssociations', () => { + it('invokes listBackupPlanAssociations without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.ListManagementServersRequest', + '.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), ]; - client.innerApiCalls.listManagementServers = + client.innerApiCalls.listBackupPlanAssociations = stubSimpleCall(expectedResponse); - const [response] = await client.listManagementServers(request); + const [response] = await client.listBackupPlanAssociations(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listManagementServers as SinonStub + client.innerApiCalls.listBackupPlanAssociations as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listManagementServers as SinonStub + client.innerApiCalls.listBackupPlanAssociations as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listManagementServers without error using callback', async () => { + it('invokes listBackupPlanAssociations without error using callback', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.ListManagementServersRequest', + '.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), ]; - client.innerApiCalls.listManagementServers = + client.innerApiCalls.listBackupPlanAssociations = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listManagementServers( + client.listBackupPlanAssociations( request, ( err?: Error | null, - result?: protos.google.cloud.backupdr.v1.IManagementServer[] | null + result?: + | protos.google.cloud.backupdr.v1.IBackupPlanAssociation[] + | null ) => { if (err) { reject(err); @@ -953,84 +7049,84 @@ describe('v1.BackupDRClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listManagementServers as SinonStub + client.innerApiCalls.listBackupPlanAssociations as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listManagementServers as SinonStub + client.innerApiCalls.listBackupPlanAssociations as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listManagementServers with error', async () => { + it('invokes listBackupPlanAssociations with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.ListManagementServersRequest', + '.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listManagementServers = stubSimpleCall( + client.innerApiCalls.listBackupPlanAssociations = stubSimpleCall( undefined, expectedError ); await assert.rejects( - client.listManagementServers(request), + client.listBackupPlanAssociations(request), expectedError ); const actualRequest = ( - client.innerApiCalls.listManagementServers as SinonStub + client.innerApiCalls.listBackupPlanAssociations as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listManagementServers as SinonStub + client.innerApiCalls.listBackupPlanAssociations as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listManagementServersStream without error', async () => { + it('invokes listBackupPlanAssociationsStream without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.ListManagementServersRequest', + '.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), ]; - client.descriptors.page.listManagementServers.createStream = + client.descriptors.page.listBackupPlanAssociations.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listManagementServersStream(request); + const stream = client.listBackupPlanAssociationsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.ManagementServer[] = + const responses: protos.google.cloud.backupdr.v1.BackupPlanAssociation[] = []; stream.on( 'data', - (response: protos.google.cloud.backupdr.v1.ManagementServer) => { + (response: protos.google.cloud.backupdr.v1.BackupPlanAssociation) => { responses.push(response); } ); @@ -1045,15 +7141,15 @@ describe('v1.BackupDRClient', () => { assert.deepStrictEqual(responses, expectedResponse); assert( ( - client.descriptors.page.listManagementServers + client.descriptors.page.listBackupPlanAssociations .createStream as SinonStub ) .getCall(0) - .calledWith(client.innerApiCalls.listManagementServers, request) + .calledWith(client.innerApiCalls.listBackupPlanAssociations, request) ); assert( ( - client.descriptors.page.listManagementServers + client.descriptors.page.listBackupPlanAssociations .createStream as SinonStub ) .getCall(0) @@ -1063,31 +7159,31 @@ describe('v1.BackupDRClient', () => { ); }); - it('invokes listManagementServersStream with error', async () => { + it('invokes listBackupPlanAssociationsStream with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.ListManagementServersRequest', + '.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listManagementServers.createStream = + client.descriptors.page.listBackupPlanAssociations.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listManagementServersStream(request); + const stream = client.listBackupPlanAssociationsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.ManagementServer[] = + const responses: protos.google.cloud.backupdr.v1.BackupPlanAssociation[] = []; stream.on( 'data', - (response: protos.google.cloud.backupdr.v1.ManagementServer) => { + (response: protos.google.cloud.backupdr.v1.BackupPlanAssociation) => { responses.push(response); } ); @@ -1101,15 +7197,15 @@ describe('v1.BackupDRClient', () => { await assert.rejects(promise, expectedError); assert( ( - client.descriptors.page.listManagementServers + client.descriptors.page.listBackupPlanAssociations .createStream as SinonStub ) .getCall(0) - .calledWith(client.innerApiCalls.listManagementServers, request) + .calledWith(client.innerApiCalls.listBackupPlanAssociations, request) ); assert( ( - client.descriptors.page.listManagementServers + client.descriptors.page.listBackupPlanAssociations .createStream as SinonStub ) .getCall(0) @@ -1119,50 +7215,51 @@ describe('v1.BackupDRClient', () => { ); }); - it('uses async iteration with listManagementServers without error', async () => { + it('uses async iteration with listBackupPlanAssociations without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.ListManagementServersRequest', + '.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), ]; - client.descriptors.page.listManagementServers.asyncIterate = + client.descriptors.page.listBackupPlanAssociations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IManagementServer[] = []; - const iterable = client.listManagementServersAsync(request); + const responses: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[] = + []; + const iterable = client.listBackupPlanAssociationsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listManagementServers + client.descriptors.page.listBackupPlanAssociations .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( ( - client.descriptors.page.listManagementServers + client.descriptors.page.listBackupPlanAssociations .asyncIterate as SinonStub ) .getCall(0) @@ -1172,27 +7269,27 @@ describe('v1.BackupDRClient', () => { ); }); - it('uses async iteration with listManagementServers with error', async () => { + it('uses async iteration with listBackupPlanAssociations with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.ListManagementServersRequest', + '.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listManagementServers.asyncIterate = + client.descriptors.page.listBackupPlanAssociations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listManagementServersAsync(request); + const iterable = client.listBackupPlanAssociationsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IManagementServer[] = + const responses: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -1200,14 +7297,14 @@ describe('v1.BackupDRClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listManagementServers + client.descriptors.page.listBackupPlanAssociations .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( ( - client.descriptors.page.listManagementServers + client.descriptors.page.listBackupPlanAssociations .asyncIterate as SinonStub ) .getCall(0) @@ -2046,6 +8143,379 @@ describe('v1.BackupDRClient', () => { }); describe('Path templates', () => { + describe('backup', () => { + const fakePath = '/rendered/path/backup'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backupvault: 'backupvaultValue', + datasource: 'datasourceValue', + backup: 'backupValue', + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.backupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPath', () => { + const result = client.backupPath( + 'projectValue', + 'locationValue', + 'backupvaultValue', + 'datasourceValue', + 'backupValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.backupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromBackupName', () => { + const result = client.matchProjectFromBackupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBackupName', () => { + const result = client.matchLocationFromBackupName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBackupvaultFromBackupName', () => { + const result = client.matchBackupvaultFromBackupName(fakePath); + assert.strictEqual(result, 'backupvaultValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasourceFromBackupName', () => { + const result = client.matchDatasourceFromBackupName(fakePath); + assert.strictEqual(result, 'datasourceValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBackupFromBackupName', () => { + const result = client.matchBackupFromBackupName(fakePath); + assert.strictEqual(result, 'backupValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('backupPlan', () => { + const fakePath = '/rendered/path/backupPlan'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backup_plan: 'backupPlanValue', + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.backupPlanPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPlanPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPlanPath', () => { + const result = client.backupPlanPath( + 'projectValue', + 'locationValue', + 'backupPlanValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.backupPlanPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromBackupPlanName', () => { + const result = client.matchProjectFromBackupPlanName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.backupPlanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBackupPlanName', () => { + const result = client.matchLocationFromBackupPlanName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.backupPlanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBackupPlanFromBackupPlanName', () => { + const result = client.matchBackupPlanFromBackupPlanName(fakePath); + assert.strictEqual(result, 'backupPlanValue'); + assert( + (client.pathTemplates.backupPlanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('backupPlanAssociation', () => { + const fakePath = '/rendered/path/backupPlanAssociation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backup_plan_association: 'backupPlanAssociationValue', + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.backupPlanAssociationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPlanAssociationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPlanAssociationPath', () => { + const result = client.backupPlanAssociationPath( + 'projectValue', + 'locationValue', + 'backupPlanAssociationValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.backupPlanAssociationPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromBackupPlanAssociationName', () => { + const result = + client.matchProjectFromBackupPlanAssociationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.backupPlanAssociationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBackupPlanAssociationName', () => { + const result = + client.matchLocationFromBackupPlanAssociationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.backupPlanAssociationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBackupPlanAssociationFromBackupPlanAssociationName', () => { + const result = + client.matchBackupPlanAssociationFromBackupPlanAssociationName( + fakePath + ); + assert.strictEqual(result, 'backupPlanAssociationValue'); + assert( + ( + client.pathTemplates.backupPlanAssociationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('backupVault', () => { + const fakePath = '/rendered/path/backupVault'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backupvault: 'backupvaultValue', + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.backupVaultPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupVaultPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupVaultPath', () => { + const result = client.backupVaultPath( + 'projectValue', + 'locationValue', + 'backupvaultValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.backupVaultPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromBackupVaultName', () => { + const result = client.matchProjectFromBackupVaultName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.backupVaultPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBackupVaultName', () => { + const result = client.matchLocationFromBackupVaultName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.backupVaultPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBackupvaultFromBackupVaultName', () => { + const result = client.matchBackupvaultFromBackupVaultName(fakePath); + assert.strictEqual(result, 'backupvaultValue'); + assert( + (client.pathTemplates.backupVaultPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataSource', () => { + const fakePath = '/rendered/path/dataSource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backupvault: 'backupvaultValue', + datasource: 'datasourceValue', + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataSourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataSourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataSourcePath', () => { + const result = client.dataSourcePath( + 'projectValue', + 'locationValue', + 'backupvaultValue', + 'datasourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataSourcePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDataSourceName', () => { + const result = client.matchProjectFromDataSourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDataSourceName', () => { + const result = client.matchLocationFromDataSourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBackupvaultFromDataSourceName', () => { + const result = client.matchBackupvaultFromDataSourceName(fakePath); + assert.strictEqual(result, 'backupvaultValue'); + assert( + (client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasourceFromDataSourceName', () => { + const result = client.matchDatasourceFromDataSourceName(fakePath); + assert.strictEqual(result, 'datasourceValue'); + assert( + (client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('location', () => { const fakePath = '/rendered/path/location'; const expectedParameters = { From 56005f5add28f4e8231a462f8ef13e01df383046 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 26 Sep 2024 00:13:26 +0000 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../google-cloud-backupdr/v1/.eslintignore | 7 - .../google-cloud-backupdr/v1/.eslintrc.json | 3 - .../google-cloud-backupdr/v1/.gitignore | 14 - .../google-cloud-backupdr/v1/.jsdoc.js | 55 - .../google-cloud-backupdr/v1/.mocharc.js | 33 - .../google-cloud-backupdr/v1/.prettierrc.js | 22 - .../google-cloud-backupdr/v1/README.md | 1 - .../google-cloud-backupdr/v1/package.json | 58 - .../google/cloud/backupdr/v1/backupdr.proto | 776 - .../v1/protos/protos.d.ts | 23288 ------ .../google-cloud-backupdr/v1/protos/protos.js | 61858 --------------- .../v1/protos/protos.json | 7871 -- .../v1/backup_d_r.create_management_server.js | 90 - .../v1/backup_d_r.delete_management_server.js | 76 - .../v1/backup_d_r.get_management_server.js | 62 - .../v1/backup_d_r.list_management_servers.js | 85 - ...pet_metadata_google.cloud.backupdr.v1.json | 1707 - .../google-cloud-backupdr/v1/src/index.ts | 25 - .../v1/src/v1/backup_d_r_client.ts | 5426 -- .../v1/src/v1/backup_d_r_client_config.json | 191 - .../v1/src/v1/backup_d_r_proto_list.json | 8 - .../v1/src/v1/gapic_metadata.json | 391 - .../google-cloud-backupdr/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_backup_d_r_v1.ts | 6816 -- .../google-cloud-backupdr/v1/tsconfig.json | 19 - .../v1/webpack.config.js | 64 - packages/google-cloud-backupdr/README.md | 34 +- .../google/cloud/backupdr/v1/backupdr.proto | 380 +- .../google/cloud/backupdr/v1/backupplan.proto | 0 .../backupdr/v1/backupplanassociation.proto | 0 .../cloud/backupdr/v1/backupvault.proto | 0 .../cloud/backupdr/v1/backupvault_ba.proto | 0 .../cloud/backupdr/v1/backupvault_gce.proto | 0 .../google-cloud-backupdr/protos/protos.d.ts | 24204 ++++-- .../google-cloud-backupdr/protos/protos.js | 65340 ++++++++++++---- .../google-cloud-backupdr/protos/protos.json | 5726 +- .../google-cloud-backupdr/samples/README.md | 540 + .../generated/v1/backup_d_r.abandon_backup.js | 0 .../v1/backup_d_r.create_backup_plan.js | 0 ...ckup_d_r.create_backup_plan_association.js | 0 .../v1/backup_d_r.create_backup_vault.js | 0 .../v1/backup_d_r.create_management_server.js | 4 +- .../generated/v1/backup_d_r.delete_backup.js | 0 .../v1/backup_d_r.delete_backup_plan.js | 0 ...ckup_d_r.delete_backup_plan_association.js | 0 .../v1/backup_d_r.delete_backup_vault.js | 0 .../v1/backup_d_r.fetch_access_token.js | 0 .../backup_d_r.fetch_usable_backup_vaults.js | 0 .../v1/backup_d_r.finalize_backup.js | 0 .../generated/v1/backup_d_r.get_backup.js | 0 .../v1/backup_d_r.get_backup_plan.js | 0 .../backup_d_r.get_backup_plan_association.js | 0 .../v1/backup_d_r.get_backup_vault.js | 0 .../v1/backup_d_r.get_data_source.js | 0 .../v1/backup_d_r.get_management_server.js | 2 +- .../v1/backup_d_r.initiate_backup.js | 0 ...ackup_d_r.list_backup_plan_associations.js | 0 .../v1/backup_d_r.list_backup_plans.js | 0 .../v1/backup_d_r.list_backup_vaults.js | 0 .../generated/v1/backup_d_r.list_backups.js | 0 .../v1/backup_d_r.list_data_sources.js | 0 .../v1/backup_d_r.list_management_servers.js | 9 +- .../v1/backup_d_r.remove_data_source.js | 0 .../generated/v1/backup_d_r.restore_backup.js | 0 .../v1/backup_d_r.set_internal_status.js | 0 .../v1/backup_d_r.test_iam_permissions.js | 0 .../generated/v1/backup_d_r.trigger_backup.js | 0 .../generated/v1/backup_d_r.update_backup.js | 0 .../v1/backup_d_r.update_backup_vault.js | 0 .../v1/backup_d_r.update_data_source.js | 0 ...pet_metadata_google.cloud.backupdr.v1.json | 1502 +- .../src/v1/backup_d_r_client.ts | 5711 +- .../src/v1/backup_d_r_client_config.json | 133 + .../src/v1/backup_d_r_proto_list.json | 7 +- .../src/v1/gapic_metadata.json | 324 + .../test/gapic_backup_d_r_v1.ts | 6952 +- 79 files changed, 89556 insertions(+), 130385 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/README.md delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/package.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client_config.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/test/gapic_backup_d_r_v1.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/webpack.config.js rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/protos/google/cloud/backupdr/v1/backupplan.proto (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/protos/google/cloud/backupdr/v1/backupplanassociation.proto (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/protos/google/cloud/backupdr/v1/backupvault.proto (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/protos/google/cloud/backupdr/v1/backupvault_ba.proto (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/protos/google/cloud/backupdr/v1/backupvault_gce.proto (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.abandon_backup.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.create_backup_plan.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.create_backup_plan_association.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.create_backup_vault.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.delete_backup.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.delete_backup_plan.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.delete_backup_plan_association.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.delete_backup_vault.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.fetch_access_token.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.finalize_backup.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.get_backup.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.get_backup_plan.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.get_backup_plan_association.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.get_backup_vault.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.get_data_source.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.initiate_backup.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.list_backup_plan_associations.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.list_backup_plans.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.list_backup_vaults.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.list_backups.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.list_data_sources.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.remove_data_source.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.restore_backup.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.set_internal_status.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.test_iam_permissions.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.trigger_backup.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.update_backup.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.update_backup_vault.js (100%) rename {owl-bot-staging/google-cloud-backupdr/v1 => packages/google-cloud-backupdr}/samples/generated/v1/backup_d_r.update_data_source.js (100%) diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.eslintignore b/owl-bot-staging/google-cloud-backupdr/v1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/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-backupdr/v1/.eslintrc.json b/owl-bot-staging/google-cloud-backupdr/v1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.gitignore b/owl-bot-staging/google-cloud-backupdr/v1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/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-backupdr/v1/.jsdoc.js b/owl-bot-staging/google-cloud-backupdr/v1/.jsdoc.js deleted file mode 100644 index 7b9ce99a79c..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/.jsdoc.js +++ /dev/null @@ -1,55 +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 -// -// 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 2024 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/backupdr', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js b/owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js deleted file mode 100644 index 13b67c34edc..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js +++ /dev/null @@ -1,33 +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 -// -// 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-backupdr/v1/.prettierrc.js b/owl-bot-staging/google-cloud-backupdr/v1/.prettierrc.js deleted file mode 100644 index 9a8fd690982..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/.prettierrc.js +++ /dev/null @@ -1,22 +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 -// -// 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-backupdr/v1/README.md b/owl-bot-staging/google-cloud-backupdr/v1/README.md deleted file mode 100644 index a01e3b46ff3..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/README.md +++ /dev/null @@ -1 +0,0 @@ -Backupdr: Nodejs Client diff --git a/owl-bot-staging/google-cloud-backupdr/v1/package.json b/owl-bot-staging/google-cloud-backupdr/v1/package.json deleted file mode 100644 index 0bb72fdc884..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@google-cloud/backupdr", - "version": "0.1.0", - "description": "Backupdr client for Node.js", - "repository": "googleapis/nodejs-backupdr", - "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 backupdr", - "backupdr", - "backup d r" - ], - "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-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto deleted file mode 100644 index eff6b77e762..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto +++ /dev/null @@ -1,776 +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.backupdr.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/field_info.proto"; -import "google/api/resource.proto"; -import "google/cloud/backupdr/v1/backupplan.proto"; -import "google/cloud/backupdr/v1/backupplanassociation.proto"; -import "google/cloud/backupdr/v1/backupvault.proto"; -import "google/iam/v1/iam_policy.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -option csharp_namespace = "Google.Cloud.BackupDR.V1"; -option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; -option java_multiple_files = true; -option java_outer_classname = "BackupDRProto"; -option java_package = "com.google.cloud.backupdr.v1"; -option php_namespace = "Google\\Cloud\\BackupDR\\V1"; -option ruby_package = "Google::Cloud::BackupDR::V1"; - -// The BackupDR Service -service BackupDR { - option (google.api.default_host) = "backupdr.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists ManagementServers in a given project and location. - rpc ListManagementServers(ListManagementServersRequest) - returns (ListManagementServersResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/managementServers" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a single ManagementServer. - rpc GetManagementServer(GetManagementServerRequest) - returns (ManagementServer) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/managementServers/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new ManagementServer in a given project and location. - rpc CreateManagementServer(CreateManagementServerRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/managementServers" - body: "management_server" - }; - option (google.api.method_signature) = - "parent,management_server,management_server_id"; - option (google.longrunning.operation_info) = { - response_type: "ManagementServer" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a single ManagementServer. - rpc DeleteManagementServer(DeleteManagementServerRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/managementServers/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Creates a new BackupVault in a given project and location. - rpc CreateBackupVault(CreateBackupVaultRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/backupVaults" - body: "backup_vault" - }; - option (google.api.method_signature) = - "parent,backup_vault,backup_vault_id"; - option (google.longrunning.operation_info) = { - response_type: "BackupVault" - metadata_type: "OperationMetadata" - }; - } - - // Lists BackupVaults in a given project and location. - rpc ListBackupVaults(ListBackupVaultsRequest) - returns (ListBackupVaultsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/backupVaults" - }; - option (google.api.method_signature) = "parent"; - } - - // FetchUsableBackupVaults lists usable BackupVaults in a given project and - // location. Usable BackupVault are the ones that user has - // backupdr.backupVaults.get permission. - rpc FetchUsableBackupVaults(FetchUsableBackupVaultsRequest) - returns (FetchUsableBackupVaultsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a BackupVault. - rpc GetBackupVault(GetBackupVaultRequest) returns (BackupVault) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backupVaults/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates the settings of a BackupVault. - rpc UpdateBackupVault(UpdateBackupVaultRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}" - body: "backup_vault" - }; - option (google.api.method_signature) = "backup_vault,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "BackupVault" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a BackupVault. - rpc DeleteBackupVault(DeleteBackupVaultRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/backupVaults/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Returns the caller's permissions on a BackupVault resource. - // - // A caller is not required to have Google IAM permission to make this - // request. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/backupVaults/*}:testIamPermissions" - body: "*" - }; - option (google.api.method_signature) = "resource, permissions"; - } - - // Lists DataSources in a given project and location. - rpc ListDataSources(ListDataSourcesRequest) - returns (ListDataSourcesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a DataSource. - rpc GetDataSource(GetDataSourceRequest) returns (DataSource) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates the settings of a DataSource. - rpc UpdateDataSource(UpdateDataSourceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}" - body: "data_source" - }; - option (google.api.method_signature) = "data_source,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "DataSource" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a DataSource. This is a custom method instead of a standard delete - // method because external clients will not delete DataSources except for - // BackupDR backup appliances. - rpc RemoveDataSource(RemoveDataSourceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:remove" - body: "*" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Sets the internal status of a DataSource. - rpc SetInternalStatus(SetInternalStatusRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:setInternalStatus" - body: "*" - }; - option (google.api.method_signature) = "data_source"; - option (google.longrunning.operation_info) = { - response_type: "SetInternalStatusResponse" - metadata_type: "OperationMetadata" - }; - } - - // Internal only. - // Initiates a backup. - rpc InitiateBackup(InitiateBackupRequest) returns (InitiateBackupResponse) { - option (google.api.http) = { - post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:initiateBackup" - body: "*" - }; - option (google.api.method_signature) = "data_source"; - } - - // Internal only. - // Abandons a backup. - rpc AbandonBackup(AbandonBackupRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:abandonBackup" - body: "*" - }; - option (google.api.method_signature) = "data_source"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Internal only. - // Finalize a backup that was started by a call to InitiateBackup. - rpc FinalizeBackup(FinalizeBackupRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:finalizeBackup" - body: "*" - }; - option (google.api.method_signature) = "data_source"; - option (google.longrunning.operation_info) = { - response_type: "Backup" - metadata_type: "OperationMetadata" - }; - } - - // Internal only. - // Fetch access token for a given data source. - rpc FetchAccessToken(FetchAccessTokenRequest) - returns (FetchAccessTokenResponse) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Lists Backups in a given project and location. - rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a Backup. - rpc GetBackup(GetBackupRequest) returns (Backup) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates the settings of a Backup. - rpc UpdateBackup(UpdateBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" - body: "backup" - }; - option (google.api.method_signature) = "backup,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Backup" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a Backup. - rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "Backup" - metadata_type: "OperationMetadata" - }; - } - - // Restore from a Backup - rpc RestoreBackup(RestoreBackupRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore" - body: "*" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "RestoreBackupResponse" - metadata_type: "OperationMetadata" - }; - } - - // Create a BackupPlan - rpc CreateBackupPlan(CreateBackupPlanRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/backupPlans" - body: "backup_plan" - }; - option (google.api.method_signature) = "parent,backup_plan,backup_plan_id"; - option (google.longrunning.operation_info) = { - response_type: "BackupPlan" - metadata_type: "OperationMetadata" - }; - } - - // Gets details of a single BackupPlan. - rpc GetBackupPlan(GetBackupPlanRequest) returns (BackupPlan) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backupPlans/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists BackupPlans in a given project and location. - rpc ListBackupPlans(ListBackupPlansRequest) - returns (ListBackupPlansResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/backupPlans" - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a single BackupPlan. - rpc DeleteBackupPlan(DeleteBackupPlanRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/backupPlans/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Create a BackupPlanAssociation - rpc CreateBackupPlanAssociation(CreateBackupPlanAssociationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" - body: "backup_plan_association" - }; - option (google.api.method_signature) = - "parent,backup_plan_association,backup_plan_association_id"; - option (google.longrunning.operation_info) = { - response_type: "BackupPlanAssociation" - metadata_type: "OperationMetadata" - }; - } - - // Gets details of a single BackupPlanAssociation. - rpc GetBackupPlanAssociation(GetBackupPlanAssociationRequest) - returns (BackupPlanAssociation) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists BackupPlanAssociations in a given project and location. - rpc ListBackupPlanAssociations(ListBackupPlanAssociationsRequest) - returns (ListBackupPlanAssociationsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a single BackupPlanAssociation. - rpc DeleteBackupPlanAssociation(DeleteBackupPlanAssociationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Triggers a new Backup. - rpc TriggerBackup(TriggerBackupRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup" - body: "*" - }; - option (google.api.method_signature) = "name,rule_id"; - option (google.longrunning.operation_info) = { - response_type: "BackupPlanAssociation" - metadata_type: "OperationMetadata" - }; - } -} - -// Network configuration for ManagementServer instance. -message NetworkConfig { - // VPC peering modes supported by Cloud BackupDR. - enum PeeringMode { - // Peering mode not set. - PEERING_MODE_UNSPECIFIED = 0; - - // Connect using Private Service Access to the Management Server. Private - // services access provides an IP address range for multiple Google Cloud - // services, including Cloud BackupDR. - PRIVATE_SERVICE_ACCESS = 1; - } - - // Optional. The resource name of the Google Compute Engine VPC network to - // which the ManagementServer instance is connected. - string network = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The network connect mode of the ManagementServer instance. For - // this version, only PRIVATE_SERVICE_ACCESS is supported. - PeeringMode peering_mode = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// ManagementURI for the Management Server resource. -message ManagementURI { - // Output only. The ManagementServer AGM/RD WebUI URL. - string web_ui = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The ManagementServer AGM/RD API URL. - string api = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// ManagementURI depending on the Workforce Identity i.e. either 1p or 3p. -message WorkforceIdentityBasedManagementURI { - // Output only. First party Management URI for Google Identities. - string first_party_management_uri = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Third party Management URI for External Identity Providers. - string third_party_management_uri = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// OAuth Client ID depending on the Workforce Identity i.e. either 1p or 3p, -message WorkforceIdentityBasedOAuth2ClientID { - // Output only. First party OAuth Client ID for Google Identities. - string first_party_oauth2_client_id = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Third party OAuth Client ID for External Identity Providers. - string third_party_oauth2_client_id = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// ManagementServer describes a single BackupDR ManagementServer instance. -message ManagementServer { - option (google.api.resource) = { - type: "backupdr.googleapis.com/ManagementServer" - pattern: "projects/{project}/locations/{location}/managementServers/{managementserver}" - plural: "managementServers" - singular: "managementServer" - }; - - // Type of backup service resource. - enum InstanceType { - // Instance type is not mentioned. - INSTANCE_TYPE_UNSPECIFIED = 0; - - // Instance for backup and restore management (i.e., AGM). - BACKUP_RESTORE = 1; - } - - // State of Management server instance. - enum InstanceState { - // State not set. - INSTANCE_STATE_UNSPECIFIED = 0; - - // The instance is being created. - CREATING = 1; - - // The instance has been created and is fully usable. - READY = 2; - - // The instance configuration is being updated. Certain kinds of updates - // may cause the instance to become unusable while the update is in - // progress. - UPDATING = 3; - - // The instance is being deleted. - DELETING = 4; - - // The instance is being repaired and may be unstable. - REPAIRING = 5; - - // Maintenance is being performed on this instance. - MAINTENANCE = 6; - - // The instance is experiencing an issue and might be unusable. You can get - // further details from the statusMessage field of Instance resource. - ERROR = 7; - } - - // Output only. Identifier. The resource name. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = IDENTIFIER - ]; - - // Optional. The description of the ManagementServer instance (2048 characters - // or less). - string description = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Resource labels to represent user provided metadata. - // Labels currently defined: - // 1. migrate_from_go= - // If set to true, the MS is created in migration ready mode. - map labels = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The time when the instance was created. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the instance was updated. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The type of the ManagementServer resource. - InstanceType type = 14 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The hostname or ip address of the exposed AGM endpoints, used - // by clients to connect to AGM/RD graphical user interface and APIs. - ManagementURI management_uri = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The hostnames of the exposed AGM endpoints for both types of - // user i.e. 1p and 3p, used to connect AGM/RM UI. - WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = - 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The ManagementServer state. - InstanceState state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. VPC networks to which the ManagementServer instance is connected. - // For this version, only a single network is supported. - repeated NetworkConfig networks = 8 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Server specified ETag for the ManagementServer resource to - // prevent simultaneous updates from overwiting each other. - string etag = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The OAuth 2.0 client id is required to make API calls to the - // BackupDR instance API of this ManagementServer. This is the value that - // should be provided in the 'aud' field of the OIDC ID Token (see openid - // specification - // https://openid.net/specs/openid-connect-core-1_0.html#IDToken). - string oauth2_client_id = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The OAuth client IDs for both types of user i.e. 1p and 3p. - WorkforceIdentityBasedOAuth2ClientID - workforce_identity_based_oauth2_client_id = 17 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The hostname or ip address of the exposed AGM endpoints, used - // by BAs to connect to BA proxy. - repeated string ba_proxy_uri = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Reserved for future use. - google.protobuf.BoolValue satisfies_pzs = 19 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Reserved for future use. - bool satisfies_pzi = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for listing management servers. -message ListManagementServersRequest { - // Required. The project and location for which to retrieve management servers - // information, in the format 'projects/{project_id}/locations/{location}'. In - // Cloud BackupDR, locations map to Google Cloud regions, for example - // **us-central1**. To retrieve management servers for all locations, use "-" - // for the - // '{location}' value. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "backupdr.googleapis.com/ManagementServer" - } - ]; - - // Optional. Requested page size. Server may return fewer items than - // requested. If unspecified, server will pick an appropriate default. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A token identifying a page of results the server should return. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filtering results. - optional string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Hint for how to order the results. - optional string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for listing management servers. -message ListManagementServersResponse { - // The list of ManagementServer instances in the project for the specified - // location. - // - // If the '{location}' value in the request is "-", the response contains a - // list of instances from all locations. In case any location is unreachable, - // the response will only return management servers in reachable locations and - // the 'unreachable' field will be populated with a list of unreachable - // locations. - repeated ManagementServer management_servers = 1; - - // A token identifying a page of results the server should return. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for getting a management server instance. -message GetManagementServerRequest { - // Required. Name of the management server resource name, in the format - // 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/ManagementServer" - } - ]; -} - -// Request message for creating a management server instance. -message CreateManagementServerRequest { - // Required. The management server project and location in the format - // 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR - // locations map to Google Cloud regions, for example **us-central1**. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "backupdr.googleapis.com/ManagementServer" - } - ]; - - // Required. The name of the management server to create. The name must be - // unique for the specified project and location. - string management_server_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. A [management server - // resource][google.cloud.backupdr.v1.ManagementServer] - ManagementServer management_server = 3 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. An optional 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]; -} - -// Request message for deleting a management server instance. -message DeleteManagementServerRequest { - // Required. Name of the resource - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/ManagementServer" - } - ]; - - // Optional. An optional 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. AdditionalInfo contains additional Info related to backup plan - // association resource. - map additional_info = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts deleted file mode 100644 index 3edeaca2872..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts +++ /dev/null @@ -1,23288 +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. - -import type {protobuf as $protobuf} from "google-gax"; -import Long = require("long"); -/** Namespace google. */ -export namespace google { - - /** Namespace cloud. */ - namespace cloud { - - /** Namespace backupdr. */ - namespace backupdr { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a BackupDR */ - class BackupDR extends $protobuf.rpc.Service { - - /** - * Constructs a new BackupDR 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 BackupDR 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): BackupDR; - - /** - * Calls ListManagementServers. - * @param request ListManagementServersRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListManagementServersResponse - */ - public listManagementServers(request: google.cloud.backupdr.v1.IListManagementServersRequest, callback: google.cloud.backupdr.v1.BackupDR.ListManagementServersCallback): void; - - /** - * Calls ListManagementServers. - * @param request ListManagementServersRequest message or plain object - * @returns Promise - */ - public listManagementServers(request: google.cloud.backupdr.v1.IListManagementServersRequest): Promise; - - /** - * Calls GetManagementServer. - * @param request GetManagementServerRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ManagementServer - */ - public getManagementServer(request: google.cloud.backupdr.v1.IGetManagementServerRequest, callback: google.cloud.backupdr.v1.BackupDR.GetManagementServerCallback): void; - - /** - * Calls GetManagementServer. - * @param request GetManagementServerRequest message or plain object - * @returns Promise - */ - public getManagementServer(request: google.cloud.backupdr.v1.IGetManagementServerRequest): Promise; - - /** - * Calls CreateManagementServer. - * @param request CreateManagementServerRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createManagementServer(request: google.cloud.backupdr.v1.ICreateManagementServerRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateManagementServerCallback): void; - - /** - * Calls CreateManagementServer. - * @param request CreateManagementServerRequest message or plain object - * @returns Promise - */ - public createManagementServer(request: google.cloud.backupdr.v1.ICreateManagementServerRequest): Promise; - - /** - * Calls DeleteManagementServer. - * @param request DeleteManagementServerRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteManagementServer(request: google.cloud.backupdr.v1.IDeleteManagementServerRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteManagementServerCallback): void; - - /** - * Calls DeleteManagementServer. - * @param request DeleteManagementServerRequest message or plain object - * @returns Promise - */ - public deleteManagementServer(request: google.cloud.backupdr.v1.IDeleteManagementServerRequest): Promise; - - /** - * Calls CreateBackupVault. - * @param request CreateBackupVaultRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createBackupVault(request: google.cloud.backupdr.v1.ICreateBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupVaultCallback): void; - - /** - * Calls CreateBackupVault. - * @param request CreateBackupVaultRequest message or plain object - * @returns Promise - */ - public createBackupVault(request: google.cloud.backupdr.v1.ICreateBackupVaultRequest): Promise; - - /** - * Calls ListBackupVaults. - * @param request ListBackupVaultsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBackupVaultsResponse - */ - public listBackupVaults(request: google.cloud.backupdr.v1.IListBackupVaultsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupVaultsCallback): void; - - /** - * Calls ListBackupVaults. - * @param request ListBackupVaultsRequest message or plain object - * @returns Promise - */ - public listBackupVaults(request: google.cloud.backupdr.v1.IListBackupVaultsRequest): Promise; - - /** - * Calls FetchUsableBackupVaults. - * @param request FetchUsableBackupVaultsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FetchUsableBackupVaultsResponse - */ - public fetchUsableBackupVaults(request: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, callback: google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaultsCallback): void; - - /** - * Calls FetchUsableBackupVaults. - * @param request FetchUsableBackupVaultsRequest message or plain object - * @returns Promise - */ - public fetchUsableBackupVaults(request: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest): Promise; - - /** - * Calls GetBackupVault. - * @param request GetBackupVaultRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BackupVault - */ - public getBackupVault(request: google.cloud.backupdr.v1.IGetBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupVaultCallback): void; - - /** - * Calls GetBackupVault. - * @param request GetBackupVaultRequest message or plain object - * @returns Promise - */ - public getBackupVault(request: google.cloud.backupdr.v1.IGetBackupVaultRequest): Promise; - - /** - * Calls UpdateBackupVault. - * @param request UpdateBackupVaultRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateBackupVault(request: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateBackupVaultCallback): void; - - /** - * Calls UpdateBackupVault. - * @param request UpdateBackupVaultRequest message or plain object - * @returns Promise - */ - public updateBackupVault(request: google.cloud.backupdr.v1.IUpdateBackupVaultRequest): Promise; - - /** - * Calls DeleteBackupVault. - * @param request DeleteBackupVaultRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteBackupVault(request: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupVaultCallback): void; - - /** - * Calls DeleteBackupVault. - * @param request DeleteBackupVaultRequest message or plain object - * @returns Promise - */ - public deleteBackupVault(request: google.cloud.backupdr.v1.IDeleteBackupVaultRequest): Promise; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.backupdr.v1.BackupDR.TestIamPermissionsCallback): void; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; - - /** - * Calls ListDataSources. - * @param request ListDataSourcesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDataSourcesResponse - */ - public listDataSources(request: google.cloud.backupdr.v1.IListDataSourcesRequest, callback: google.cloud.backupdr.v1.BackupDR.ListDataSourcesCallback): void; - - /** - * Calls ListDataSources. - * @param request ListDataSourcesRequest message or plain object - * @returns Promise - */ - public listDataSources(request: google.cloud.backupdr.v1.IListDataSourcesRequest): Promise; - - /** - * Calls GetDataSource. - * @param request GetDataSourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DataSource - */ - public getDataSource(request: google.cloud.backupdr.v1.IGetDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.GetDataSourceCallback): void; - - /** - * Calls GetDataSource. - * @param request GetDataSourceRequest message or plain object - * @returns Promise - */ - public getDataSource(request: google.cloud.backupdr.v1.IGetDataSourceRequest): Promise; - - /** - * Calls UpdateDataSource. - * @param request UpdateDataSourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateDataSource(request: google.cloud.backupdr.v1.IUpdateDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateDataSourceCallback): void; - - /** - * Calls UpdateDataSource. - * @param request UpdateDataSourceRequest message or plain object - * @returns Promise - */ - public updateDataSource(request: google.cloud.backupdr.v1.IUpdateDataSourceRequest): Promise; - - /** - * Calls RemoveDataSource. - * @param request RemoveDataSourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public removeDataSource(request: google.cloud.backupdr.v1.IRemoveDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.RemoveDataSourceCallback): void; - - /** - * Calls RemoveDataSource. - * @param request RemoveDataSourceRequest message or plain object - * @returns Promise - */ - public removeDataSource(request: google.cloud.backupdr.v1.IRemoveDataSourceRequest): Promise; - - /** - * Calls SetInternalStatus. - * @param request SetInternalStatusRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setInternalStatus(request: google.cloud.backupdr.v1.ISetInternalStatusRequest, callback: google.cloud.backupdr.v1.BackupDR.SetInternalStatusCallback): void; - - /** - * Calls SetInternalStatus. - * @param request SetInternalStatusRequest message or plain object - * @returns Promise - */ - public setInternalStatus(request: google.cloud.backupdr.v1.ISetInternalStatusRequest): Promise; - - /** - * Calls InitiateBackup. - * @param request InitiateBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and InitiateBackupResponse - */ - public initiateBackup(request: google.cloud.backupdr.v1.IInitiateBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.InitiateBackupCallback): void; - - /** - * Calls InitiateBackup. - * @param request InitiateBackupRequest message or plain object - * @returns Promise - */ - public initiateBackup(request: google.cloud.backupdr.v1.IInitiateBackupRequest): Promise; - - /** - * Calls AbandonBackup. - * @param request AbandonBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public abandonBackup(request: google.cloud.backupdr.v1.IAbandonBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.AbandonBackupCallback): void; - - /** - * Calls AbandonBackup. - * @param request AbandonBackupRequest message or plain object - * @returns Promise - */ - public abandonBackup(request: google.cloud.backupdr.v1.IAbandonBackupRequest): Promise; - - /** - * Calls FinalizeBackup. - * @param request FinalizeBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public finalizeBackup(request: google.cloud.backupdr.v1.IFinalizeBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.FinalizeBackupCallback): void; - - /** - * Calls FinalizeBackup. - * @param request FinalizeBackupRequest message or plain object - * @returns Promise - */ - public finalizeBackup(request: google.cloud.backupdr.v1.IFinalizeBackupRequest): Promise; - - /** - * Calls FetchAccessToken. - * @param request FetchAccessTokenRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FetchAccessTokenResponse - */ - public fetchAccessToken(request: google.cloud.backupdr.v1.IFetchAccessTokenRequest, callback: google.cloud.backupdr.v1.BackupDR.FetchAccessTokenCallback): void; - - /** - * Calls FetchAccessToken. - * @param request FetchAccessTokenRequest message or plain object - * @returns Promise - */ - public fetchAccessToken(request: google.cloud.backupdr.v1.IFetchAccessTokenRequest): Promise; - - /** - * Calls ListBackups. - * @param request ListBackupsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBackupsResponse - */ - public listBackups(request: google.cloud.backupdr.v1.IListBackupsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupsCallback): void; - - /** - * Calls ListBackups. - * @param request ListBackupsRequest message or plain object - * @returns Promise - */ - public listBackups(request: google.cloud.backupdr.v1.IListBackupsRequest): Promise; - - /** - * Calls GetBackup. - * @param request GetBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Backup - */ - public getBackup(request: google.cloud.backupdr.v1.IGetBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupCallback): void; - - /** - * Calls GetBackup. - * @param request GetBackupRequest message or plain object - * @returns Promise - */ - public getBackup(request: google.cloud.backupdr.v1.IGetBackupRequest): Promise; - - /** - * Calls UpdateBackup. - * @param request UpdateBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateBackup(request: google.cloud.backupdr.v1.IUpdateBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateBackupCallback): void; - - /** - * Calls UpdateBackup. - * @param request UpdateBackupRequest message or plain object - * @returns Promise - */ - public updateBackup(request: google.cloud.backupdr.v1.IUpdateBackupRequest): Promise; - - /** - * Calls DeleteBackup. - * @param request DeleteBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteBackup(request: google.cloud.backupdr.v1.IDeleteBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupCallback): void; - - /** - * Calls DeleteBackup. - * @param request DeleteBackupRequest message or plain object - * @returns Promise - */ - public deleteBackup(request: google.cloud.backupdr.v1.IDeleteBackupRequest): Promise; - - /** - * Calls RestoreBackup. - * @param request RestoreBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public restoreBackup(request: google.cloud.backupdr.v1.IRestoreBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.RestoreBackupCallback): void; - - /** - * Calls RestoreBackup. - * @param request RestoreBackupRequest message or plain object - * @returns Promise - */ - public restoreBackup(request: google.cloud.backupdr.v1.IRestoreBackupRequest): Promise; - - /** - * Calls CreateBackupPlan. - * @param request CreateBackupPlanRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createBackupPlan(request: google.cloud.backupdr.v1.ICreateBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupPlanCallback): void; - - /** - * Calls CreateBackupPlan. - * @param request CreateBackupPlanRequest message or plain object - * @returns Promise - */ - public createBackupPlan(request: google.cloud.backupdr.v1.ICreateBackupPlanRequest): Promise; - - /** - * Calls GetBackupPlan. - * @param request GetBackupPlanRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BackupPlan - */ - public getBackupPlan(request: google.cloud.backupdr.v1.IGetBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupPlanCallback): void; - - /** - * Calls GetBackupPlan. - * @param request GetBackupPlanRequest message or plain object - * @returns Promise - */ - public getBackupPlan(request: google.cloud.backupdr.v1.IGetBackupPlanRequest): Promise; - - /** - * Calls ListBackupPlans. - * @param request ListBackupPlansRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBackupPlansResponse - */ - public listBackupPlans(request: google.cloud.backupdr.v1.IListBackupPlansRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupPlansCallback): void; - - /** - * Calls ListBackupPlans. - * @param request ListBackupPlansRequest message or plain object - * @returns Promise - */ - public listBackupPlans(request: google.cloud.backupdr.v1.IListBackupPlansRequest): Promise; - - /** - * Calls DeleteBackupPlan. - * @param request DeleteBackupPlanRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteBackupPlan(request: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanCallback): void; - - /** - * Calls DeleteBackupPlan. - * @param request DeleteBackupPlanRequest message or plain object - * @returns Promise - */ - public deleteBackupPlan(request: google.cloud.backupdr.v1.IDeleteBackupPlanRequest): Promise; - - /** - * Calls CreateBackupPlanAssociation. - * @param request CreateBackupPlanAssociationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createBackupPlanAssociation(request: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociationCallback): void; - - /** - * Calls CreateBackupPlanAssociation. - * @param request CreateBackupPlanAssociationRequest message or plain object - * @returns Promise - */ - public createBackupPlanAssociation(request: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest): Promise; - - /** - * Calls GetBackupPlanAssociation. - * @param request GetBackupPlanAssociationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BackupPlanAssociation - */ - public getBackupPlanAssociation(request: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociationCallback): void; - - /** - * Calls GetBackupPlanAssociation. - * @param request GetBackupPlanAssociationRequest message or plain object - * @returns Promise - */ - public getBackupPlanAssociation(request: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest): Promise; - - /** - * Calls ListBackupPlanAssociations. - * @param request ListBackupPlanAssociationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBackupPlanAssociationsResponse - */ - public listBackupPlanAssociations(request: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociationsCallback): void; - - /** - * Calls ListBackupPlanAssociations. - * @param request ListBackupPlanAssociationsRequest message or plain object - * @returns Promise - */ - public listBackupPlanAssociations(request: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest): Promise; - - /** - * Calls DeleteBackupPlanAssociation. - * @param request DeleteBackupPlanAssociationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteBackupPlanAssociation(request: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociationCallback): void; - - /** - * Calls DeleteBackupPlanAssociation. - * @param request DeleteBackupPlanAssociationRequest message or plain object - * @returns Promise - */ - public deleteBackupPlanAssociation(request: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest): Promise; - - /** - * Calls TriggerBackup. - * @param request TriggerBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public triggerBackup(request: google.cloud.backupdr.v1.ITriggerBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.TriggerBackupCallback): void; - - /** - * Calls TriggerBackup. - * @param request TriggerBackupRequest message or plain object - * @returns Promise - */ - public triggerBackup(request: google.cloud.backupdr.v1.ITriggerBackupRequest): Promise; - } - - namespace BackupDR { - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listManagementServers}. - * @param error Error, if any - * @param [response] ListManagementServersResponse - */ - type ListManagementServersCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListManagementServersResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getManagementServer}. - * @param error Error, if any - * @param [response] ManagementServer - */ - type GetManagementServerCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ManagementServer) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createManagementServer}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteManagementServer}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupVault}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupVaults}. - * @param error Error, if any - * @param [response] ListBackupVaultsResponse - */ - type ListBackupVaultsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupVaultsResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchUsableBackupVaults}. - * @param error Error, if any - * @param [response] FetchUsableBackupVaultsResponse - */ - type FetchUsableBackupVaultsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupVault}. - * @param error Error, if any - * @param [response] BackupVault - */ - type GetBackupVaultCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupVault) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackupVault}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupVault}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse - */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listDataSources}. - * @param error Error, if any - * @param [response] ListDataSourcesResponse - */ - type ListDataSourcesCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListDataSourcesResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getDataSource}. - * @param error Error, if any - * @param [response] DataSource - */ - type GetDataSourceCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.DataSource) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateDataSource}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateDataSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|removeDataSource}. - * @param error Error, if any - * @param [response] Operation - */ - type RemoveDataSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|setInternalStatus}. - * @param error Error, if any - * @param [response] Operation - */ - type SetInternalStatusCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|initiateBackup}. - * @param error Error, if any - * @param [response] InitiateBackupResponse - */ - type InitiateBackupCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.InitiateBackupResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|abandonBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type AbandonBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|finalizeBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type FinalizeBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchAccessToken}. - * @param error Error, if any - * @param [response] FetchAccessTokenResponse - */ - type FetchAccessTokenCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.FetchAccessTokenResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackups}. - * @param error Error, if any - * @param [response] ListBackupsResponse - */ - type ListBackupsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupsResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackup}. - * @param error Error, if any - * @param [response] Backup - */ - type GetBackupCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.Backup) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|restoreBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type RestoreBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlan}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateBackupPlanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlan}. - * @param error Error, if any - * @param [response] BackupPlan - */ - type GetBackupPlanCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupPlan) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlans}. - * @param error Error, if any - * @param [response] ListBackupPlansResponse - */ - type ListBackupPlansCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupPlansResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlan}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteBackupPlanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlanAssociation}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateBackupPlanAssociationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlanAssociation}. - * @param error Error, if any - * @param [response] BackupPlanAssociation - */ - type GetBackupPlanAssociationCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupPlanAssociation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlanAssociations}. - * @param error Error, if any - * @param [response] ListBackupPlanAssociationsResponse - */ - type ListBackupPlanAssociationsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlanAssociation}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteBackupPlanAssociationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|triggerBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type TriggerBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of a NetworkConfig. */ - interface INetworkConfig { - - /** NetworkConfig network */ - network?: (string|null); - - /** NetworkConfig peeringMode */ - peeringMode?: (google.cloud.backupdr.v1.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1.NetworkConfig.PeeringMode|null); - } - - /** Represents a NetworkConfig. */ - class NetworkConfig implements INetworkConfig { - - /** - * Constructs a new NetworkConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.INetworkConfig); - - /** NetworkConfig network. */ - public network: string; - - /** NetworkConfig peeringMode. */ - public peeringMode: (google.cloud.backupdr.v1.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1.NetworkConfig.PeeringMode); - - /** - * Creates a new NetworkConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.INetworkConfig): google.cloud.backupdr.v1.NetworkConfig; - - /** - * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @param message NetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @param message NetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkConfig; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkConfig; - - /** - * Verifies a NetworkConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkConfig; - - /** - * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. - * @param message NetworkConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NetworkConfig { - - /** PeeringMode enum. */ - enum PeeringMode { - PEERING_MODE_UNSPECIFIED = 0, - PRIVATE_SERVICE_ACCESS = 1 - } - } - - /** Properties of a ManagementURI. */ - interface IManagementURI { - - /** ManagementURI webUi */ - webUi?: (string|null); - - /** ManagementURI api */ - api?: (string|null); - } - - /** Represents a ManagementURI. */ - class ManagementURI implements IManagementURI { - - /** - * Constructs a new ManagementURI. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IManagementURI); - - /** ManagementURI webUi. */ - public webUi: string; - - /** ManagementURI api. */ - public api: string; - - /** - * Creates a new ManagementURI instance using the specified properties. - * @param [properties] Properties to set - * @returns ManagementURI instance - */ - public static create(properties?: google.cloud.backupdr.v1.IManagementURI): google.cloud.backupdr.v1.ManagementURI; - - /** - * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @param message ManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @param message ManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ManagementURI message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ManagementURI; - - /** - * Decodes a ManagementURI message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ManagementURI; - - /** - * Verifies a ManagementURI message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ManagementURI - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ManagementURI; - - /** - * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. - * @param message ManagementURI - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ManagementURI to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ManagementURI - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkforceIdentityBasedManagementURI. */ - interface IWorkforceIdentityBasedManagementURI { - - /** WorkforceIdentityBasedManagementURI firstPartyManagementUri */ - firstPartyManagementUri?: (string|null); - - /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri */ - thirdPartyManagementUri?: (string|null); - } - - /** Represents a WorkforceIdentityBasedManagementURI. */ - class WorkforceIdentityBasedManagementURI implements IWorkforceIdentityBasedManagementURI { - - /** - * Constructs a new WorkforceIdentityBasedManagementURI. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI); - - /** WorkforceIdentityBasedManagementURI firstPartyManagementUri. */ - public firstPartyManagementUri: string; - - /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri. */ - public thirdPartyManagementUri: string; - - /** - * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkforceIdentityBasedManagementURI instance - */ - public static create(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; - - /** - * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. - * @param message WorkforceIdentityBasedManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. - * @param message WorkforceIdentityBasedManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkforceIdentityBasedManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; - - /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkforceIdentityBasedManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; - - /** - * Verifies a WorkforceIdentityBasedManagementURI message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkforceIdentityBasedManagementURI - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; - - /** - * Creates a plain object from a WorkforceIdentityBasedManagementURI message. Also converts values to other types if specified. - * @param message WorkforceIdentityBasedManagementURI - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkforceIdentityBasedManagementURI to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkforceIdentityBasedManagementURI - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkforceIdentityBasedOAuth2ClientID. */ - interface IWorkforceIdentityBasedOAuth2ClientID { - - /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId */ - firstPartyOauth2ClientId?: (string|null); - - /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId */ - thirdPartyOauth2ClientId?: (string|null); - } - - /** Represents a WorkforceIdentityBasedOAuth2ClientID. */ - class WorkforceIdentityBasedOAuth2ClientID implements IWorkforceIdentityBasedOAuth2ClientID { - - /** - * Constructs a new WorkforceIdentityBasedOAuth2ClientID. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID); - - /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId. */ - public firstPartyOauth2ClientId: string; - - /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId. */ - public thirdPartyOauth2ClientId: string; - - /** - * Creates a new WorkforceIdentityBasedOAuth2ClientID instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkforceIdentityBasedOAuth2ClientID instance - */ - public static create(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; - - /** - * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. - * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. - * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkforceIdentityBasedOAuth2ClientID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; - - /** - * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkforceIdentityBasedOAuth2ClientID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; - - /** - * Verifies a WorkforceIdentityBasedOAuth2ClientID message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkforceIdentityBasedOAuth2ClientID message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkforceIdentityBasedOAuth2ClientID - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; - - /** - * Creates a plain object from a WorkforceIdentityBasedOAuth2ClientID message. Also converts values to other types if specified. - * @param message WorkforceIdentityBasedOAuth2ClientID - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkforceIdentityBasedOAuth2ClientID to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkforceIdentityBasedOAuth2ClientID - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ManagementServer. */ - interface IManagementServer { - - /** ManagementServer name */ - name?: (string|null); - - /** ManagementServer description */ - description?: (string|null); - - /** ManagementServer labels */ - labels?: ({ [k: string]: string }|null); - - /** ManagementServer createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** ManagementServer updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** ManagementServer type */ - type?: (google.cloud.backupdr.v1.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceType|null); - - /** ManagementServer managementUri */ - managementUri?: (google.cloud.backupdr.v1.IManagementURI|null); - - /** ManagementServer workforceIdentityBasedManagementUri */ - workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null); - - /** ManagementServer state */ - state?: (google.cloud.backupdr.v1.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceState|null); - - /** ManagementServer networks */ - networks?: (google.cloud.backupdr.v1.INetworkConfig[]|null); - - /** ManagementServer etag */ - etag?: (string|null); - - /** ManagementServer oauth2ClientId */ - oauth2ClientId?: (string|null); - - /** ManagementServer workforceIdentityBasedOauth2ClientId */ - workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null); - - /** ManagementServer baProxyUri */ - baProxyUri?: (string[]|null); - - /** ManagementServer satisfiesPzs */ - satisfiesPzs?: (google.protobuf.IBoolValue|null); - - /** ManagementServer satisfiesPzi */ - satisfiesPzi?: (boolean|null); - } - - /** Represents a ManagementServer. */ - class ManagementServer implements IManagementServer { - - /** - * Constructs a new ManagementServer. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IManagementServer); - - /** ManagementServer name. */ - public name: string; - - /** ManagementServer description. */ - public description: string; - - /** ManagementServer labels. */ - public labels: { [k: string]: string }; - - /** ManagementServer createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** ManagementServer updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** ManagementServer type. */ - public type: (google.cloud.backupdr.v1.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceType); - - /** ManagementServer managementUri. */ - public managementUri?: (google.cloud.backupdr.v1.IManagementURI|null); - - /** ManagementServer workforceIdentityBasedManagementUri. */ - public workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null); - - /** ManagementServer state. */ - public state: (google.cloud.backupdr.v1.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceState); - - /** ManagementServer networks. */ - public networks: google.cloud.backupdr.v1.INetworkConfig[]; - - /** ManagementServer etag. */ - public etag: string; - - /** ManagementServer oauth2ClientId. */ - public oauth2ClientId: string; - - /** ManagementServer workforceIdentityBasedOauth2ClientId. */ - public workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null); - - /** ManagementServer baProxyUri. */ - public baProxyUri: string[]; - - /** ManagementServer satisfiesPzs. */ - public satisfiesPzs?: (google.protobuf.IBoolValue|null); - - /** ManagementServer satisfiesPzi. */ - public satisfiesPzi: boolean; - - /** - * Creates a new ManagementServer instance using the specified properties. - * @param [properties] Properties to set - * @returns ManagementServer instance - */ - public static create(properties?: google.cloud.backupdr.v1.IManagementServer): google.cloud.backupdr.v1.ManagementServer; - - /** - * Encodes the specified ManagementServer message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. - * @param message ManagementServer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ManagementServer message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. - * @param message ManagementServer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ManagementServer message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ManagementServer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ManagementServer; - - /** - * Decodes a ManagementServer message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ManagementServer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ManagementServer; - - /** - * Verifies a ManagementServer message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ManagementServer message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ManagementServer - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ManagementServer; - - /** - * Creates a plain object from a ManagementServer message. Also converts values to other types if specified. - * @param message ManagementServer - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ManagementServer, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ManagementServer to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ManagementServer - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ManagementServer { - - /** InstanceType enum. */ - enum InstanceType { - INSTANCE_TYPE_UNSPECIFIED = 0, - BACKUP_RESTORE = 1 - } - - /** InstanceState enum. */ - enum InstanceState { - INSTANCE_STATE_UNSPECIFIED = 0, - CREATING = 1, - READY = 2, - UPDATING = 3, - DELETING = 4, - REPAIRING = 5, - MAINTENANCE = 6, - ERROR = 7 - } - } - - /** Properties of a ListManagementServersRequest. */ - interface IListManagementServersRequest { - - /** ListManagementServersRequest parent */ - parent?: (string|null); - - /** ListManagementServersRequest pageSize */ - pageSize?: (number|null); - - /** ListManagementServersRequest pageToken */ - pageToken?: (string|null); - - /** ListManagementServersRequest filter */ - filter?: (string|null); - - /** ListManagementServersRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListManagementServersRequest. */ - class ListManagementServersRequest implements IListManagementServersRequest { - - /** - * Constructs a new ListManagementServersRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListManagementServersRequest); - - /** ListManagementServersRequest parent. */ - public parent: string; - - /** ListManagementServersRequest pageSize. */ - public pageSize: number; - - /** ListManagementServersRequest pageToken. */ - public pageToken: string; - - /** ListManagementServersRequest filter. */ - public filter?: (string|null); - - /** ListManagementServersRequest orderBy. */ - public orderBy?: (string|null); - - /** ListManagementServersRequest _filter. */ - public _filter?: "filter"; - - /** ListManagementServersRequest _orderBy. */ - public _orderBy?: "orderBy"; - - /** - * Creates a new ListManagementServersRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListManagementServersRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListManagementServersRequest): google.cloud.backupdr.v1.ListManagementServersRequest; - - /** - * Encodes the specified ListManagementServersRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. - * @param message ListManagementServersRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListManagementServersRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. - * @param message ListManagementServersRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListManagementServersRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListManagementServersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListManagementServersRequest; - - /** - * Decodes a ListManagementServersRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListManagementServersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListManagementServersRequest; - - /** - * Verifies a ListManagementServersRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListManagementServersRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListManagementServersRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListManagementServersRequest; - - /** - * Creates a plain object from a ListManagementServersRequest message. Also converts values to other types if specified. - * @param message ListManagementServersRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListManagementServersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListManagementServersRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListManagementServersRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListManagementServersResponse. */ - interface IListManagementServersResponse { - - /** ListManagementServersResponse managementServers */ - managementServers?: (google.cloud.backupdr.v1.IManagementServer[]|null); - - /** ListManagementServersResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListManagementServersResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListManagementServersResponse. */ - class ListManagementServersResponse implements IListManagementServersResponse { - - /** - * Constructs a new ListManagementServersResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListManagementServersResponse); - - /** ListManagementServersResponse managementServers. */ - public managementServers: google.cloud.backupdr.v1.IManagementServer[]; - - /** ListManagementServersResponse nextPageToken. */ - public nextPageToken: string; - - /** ListManagementServersResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListManagementServersResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListManagementServersResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListManagementServersResponse): google.cloud.backupdr.v1.ListManagementServersResponse; - - /** - * Encodes the specified ListManagementServersResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. - * @param message ListManagementServersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListManagementServersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListManagementServersResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. - * @param message ListManagementServersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListManagementServersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListManagementServersResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListManagementServersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListManagementServersResponse; - - /** - * Decodes a ListManagementServersResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListManagementServersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListManagementServersResponse; - - /** - * Verifies a ListManagementServersResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListManagementServersResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListManagementServersResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListManagementServersResponse; - - /** - * Creates a plain object from a ListManagementServersResponse message. Also converts values to other types if specified. - * @param message ListManagementServersResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListManagementServersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListManagementServersResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListManagementServersResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetManagementServerRequest. */ - interface IGetManagementServerRequest { - - /** GetManagementServerRequest name */ - name?: (string|null); - } - - /** Represents a GetManagementServerRequest. */ - class GetManagementServerRequest implements IGetManagementServerRequest { - - /** - * Constructs a new GetManagementServerRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetManagementServerRequest); - - /** GetManagementServerRequest name. */ - public name: string; - - /** - * Creates a new GetManagementServerRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetManagementServerRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetManagementServerRequest): google.cloud.backupdr.v1.GetManagementServerRequest; - - /** - * Encodes the specified GetManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. - * @param message GetManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. - * @param message GetManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetManagementServerRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetManagementServerRequest; - - /** - * Decodes a GetManagementServerRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetManagementServerRequest; - - /** - * Verifies a GetManagementServerRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetManagementServerRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetManagementServerRequest; - - /** - * Creates a plain object from a GetManagementServerRequest message. Also converts values to other types if specified. - * @param message GetManagementServerRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetManagementServerRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetManagementServerRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateManagementServerRequest. */ - interface ICreateManagementServerRequest { - - /** CreateManagementServerRequest parent */ - parent?: (string|null); - - /** CreateManagementServerRequest managementServerId */ - managementServerId?: (string|null); - - /** CreateManagementServerRequest managementServer */ - managementServer?: (google.cloud.backupdr.v1.IManagementServer|null); - - /** CreateManagementServerRequest requestId */ - requestId?: (string|null); - } - - /** Represents a CreateManagementServerRequest. */ - class CreateManagementServerRequest implements ICreateManagementServerRequest { - - /** - * Constructs a new CreateManagementServerRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ICreateManagementServerRequest); - - /** CreateManagementServerRequest parent. */ - public parent: string; - - /** CreateManagementServerRequest managementServerId. */ - public managementServerId: string; - - /** CreateManagementServerRequest managementServer. */ - public managementServer?: (google.cloud.backupdr.v1.IManagementServer|null); - - /** CreateManagementServerRequest requestId. */ - public requestId: string; - - /** - * Creates a new CreateManagementServerRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateManagementServerRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ICreateManagementServerRequest): google.cloud.backupdr.v1.CreateManagementServerRequest; - - /** - * Encodes the specified CreateManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. - * @param message CreateManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. - * @param message CreateManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateManagementServerRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateManagementServerRequest; - - /** - * Decodes a CreateManagementServerRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateManagementServerRequest; - - /** - * Verifies a CreateManagementServerRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateManagementServerRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateManagementServerRequest; - - /** - * Creates a plain object from a CreateManagementServerRequest message. Also converts values to other types if specified. - * @param message CreateManagementServerRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.CreateManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateManagementServerRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateManagementServerRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteManagementServerRequest. */ - interface IDeleteManagementServerRequest { - - /** DeleteManagementServerRequest name */ - name?: (string|null); - - /** DeleteManagementServerRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteManagementServerRequest. */ - class DeleteManagementServerRequest implements IDeleteManagementServerRequest { - - /** - * Constructs a new DeleteManagementServerRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDeleteManagementServerRequest); - - /** DeleteManagementServerRequest name. */ - public name: string; - - /** DeleteManagementServerRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteManagementServerRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteManagementServerRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDeleteManagementServerRequest): google.cloud.backupdr.v1.DeleteManagementServerRequest; - - /** - * Encodes the specified DeleteManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. - * @param message DeleteManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. - * @param message DeleteManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteManagementServerRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteManagementServerRequest; - - /** - * Decodes a DeleteManagementServerRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteManagementServerRequest; - - /** - * Verifies a DeleteManagementServerRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteManagementServerRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteManagementServerRequest; - - /** - * Creates a plain object from a DeleteManagementServerRequest message. Also converts values to other types if specified. - * @param message DeleteManagementServerRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DeleteManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteManagementServerRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteManagementServerRequest - * @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 additionalInfo */ - additionalInfo?: ({ [k: string]: string }|null); - } - - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { - - /** - * Constructs a new OperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.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 additionalInfo. */ - public additionalInfo: { [k: string]: string }; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationMetadata instance - */ - public static create(properties?: google.cloud.backupdr.v1.IOperationMetadata): google.cloud.backupdr.v1.OperationMetadata; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.backupdr.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.backupdr.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.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.backupdr.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.backupdr.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.backupdr.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.backupdr.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.backupdr.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 BackupPlan. */ - interface IBackupPlan { - - /** BackupPlan name */ - name?: (string|null); - - /** BackupPlan description */ - description?: (string|null); - - /** BackupPlan labels */ - labels?: ({ [k: string]: string }|null); - - /** BackupPlan createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlan updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlan backupRules */ - backupRules?: (google.cloud.backupdr.v1.IBackupRule[]|null); - - /** BackupPlan state */ - state?: (google.cloud.backupdr.v1.BackupPlan.State|keyof typeof google.cloud.backupdr.v1.BackupPlan.State|null); - - /** BackupPlan resourceType */ - resourceType?: (string|null); - - /** BackupPlan etag */ - etag?: (string|null); - - /** BackupPlan backupVault */ - backupVault?: (string|null); - - /** BackupPlan backupVaultServiceAccount */ - backupVaultServiceAccount?: (string|null); - } - - /** Represents a BackupPlan. */ - class BackupPlan implements IBackupPlan { - - /** - * Constructs a new BackupPlan. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupPlan); - - /** BackupPlan name. */ - public name: string; - - /** BackupPlan description. */ - public description: string; - - /** BackupPlan labels. */ - public labels: { [k: string]: string }; - - /** BackupPlan createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlan updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlan backupRules. */ - public backupRules: google.cloud.backupdr.v1.IBackupRule[]; - - /** BackupPlan state. */ - public state: (google.cloud.backupdr.v1.BackupPlan.State|keyof typeof google.cloud.backupdr.v1.BackupPlan.State); - - /** BackupPlan resourceType. */ - public resourceType: string; - - /** BackupPlan etag. */ - public etag: string; - - /** BackupPlan backupVault. */ - public backupVault: string; - - /** BackupPlan backupVaultServiceAccount. */ - public backupVaultServiceAccount: string; - - /** - * Creates a new BackupPlan instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupPlan instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupPlan): google.cloud.backupdr.v1.BackupPlan; - - /** - * Encodes the specified BackupPlan message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. - * @param message BackupPlan message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupPlan, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupPlan message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. - * @param message BackupPlan message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupPlan, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupPlan message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupPlan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupPlan; - - /** - * Decodes a BackupPlan message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupPlan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupPlan; - - /** - * Verifies a BackupPlan message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupPlan message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupPlan - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupPlan; - - /** - * Creates a plain object from a BackupPlan message. Also converts values to other types if specified. - * @param message BackupPlan - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupPlan, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupPlan to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupPlan - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BackupPlan { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - DELETING = 3, - INACTIVE = 4 - } - } - - /** Properties of a BackupRule. */ - interface IBackupRule { - - /** BackupRule ruleId */ - ruleId?: (string|null); - - /** BackupRule backupRetentionDays */ - backupRetentionDays?: (number|null); - - /** BackupRule standardSchedule */ - standardSchedule?: (google.cloud.backupdr.v1.IStandardSchedule|null); - } - - /** Represents a BackupRule. */ - class BackupRule implements IBackupRule { - - /** - * Constructs a new BackupRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupRule); - - /** BackupRule ruleId. */ - public ruleId: string; - - /** BackupRule backupRetentionDays. */ - public backupRetentionDays: number; - - /** BackupRule standardSchedule. */ - public standardSchedule?: (google.cloud.backupdr.v1.IStandardSchedule|null); - - /** BackupRule backupScheduleOneof. */ - public backupScheduleOneof?: "standardSchedule"; - - /** - * Creates a new BackupRule instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupRule instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupRule): google.cloud.backupdr.v1.BackupRule; - - /** - * Encodes the specified BackupRule message. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. - * @param message BackupRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupRule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. - * @param message BackupRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupRule; - - /** - * Decodes a BackupRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupRule; - - /** - * Verifies a BackupRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupRule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupRule; - - /** - * Creates a plain object from a BackupRule message. Also converts values to other types if specified. - * @param message BackupRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StandardSchedule. */ - interface IStandardSchedule { - - /** StandardSchedule recurrenceType */ - recurrenceType?: (google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|keyof typeof google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|null); - - /** StandardSchedule hourlyFrequency */ - hourlyFrequency?: (number|null); - - /** StandardSchedule daysOfWeek */ - daysOfWeek?: (google.type.DayOfWeek[]|null); - - /** StandardSchedule daysOfMonth */ - daysOfMonth?: (number[]|null); - - /** StandardSchedule weekDayOfMonth */ - weekDayOfMonth?: (google.cloud.backupdr.v1.IWeekDayOfMonth|null); - - /** StandardSchedule months */ - months?: (google.type.Month[]|null); - - /** StandardSchedule backupWindow */ - backupWindow?: (google.cloud.backupdr.v1.IBackupWindow|null); - - /** StandardSchedule timeZone */ - timeZone?: (string|null); - } - - /** Represents a StandardSchedule. */ - class StandardSchedule implements IStandardSchedule { - - /** - * Constructs a new StandardSchedule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IStandardSchedule); - - /** StandardSchedule recurrenceType. */ - public recurrenceType: (google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|keyof typeof google.cloud.backupdr.v1.StandardSchedule.RecurrenceType); - - /** StandardSchedule hourlyFrequency. */ - public hourlyFrequency: number; - - /** StandardSchedule daysOfWeek. */ - public daysOfWeek: google.type.DayOfWeek[]; - - /** StandardSchedule daysOfMonth. */ - public daysOfMonth: number[]; - - /** StandardSchedule weekDayOfMonth. */ - public weekDayOfMonth?: (google.cloud.backupdr.v1.IWeekDayOfMonth|null); - - /** StandardSchedule months. */ - public months: google.type.Month[]; - - /** StandardSchedule backupWindow. */ - public backupWindow?: (google.cloud.backupdr.v1.IBackupWindow|null); - - /** StandardSchedule timeZone. */ - public timeZone: string; - - /** - * Creates a new StandardSchedule instance using the specified properties. - * @param [properties] Properties to set - * @returns StandardSchedule instance - */ - public static create(properties?: google.cloud.backupdr.v1.IStandardSchedule): google.cloud.backupdr.v1.StandardSchedule; - - /** - * Encodes the specified StandardSchedule message. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. - * @param message StandardSchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IStandardSchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StandardSchedule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. - * @param message StandardSchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IStandardSchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StandardSchedule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StandardSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.StandardSchedule; - - /** - * Decodes a StandardSchedule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StandardSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.StandardSchedule; - - /** - * Verifies a StandardSchedule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StandardSchedule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StandardSchedule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.StandardSchedule; - - /** - * Creates a plain object from a StandardSchedule message. Also converts values to other types if specified. - * @param message StandardSchedule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.StandardSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StandardSchedule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StandardSchedule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace StandardSchedule { - - /** RecurrenceType enum. */ - enum RecurrenceType { - RECURRENCE_TYPE_UNSPECIFIED = 0, - HOURLY = 1, - DAILY = 2, - WEEKLY = 3, - MONTHLY = 4, - YEARLY = 5 - } - } - - /** Properties of a BackupWindow. */ - interface IBackupWindow { - - /** BackupWindow startHourOfDay */ - startHourOfDay?: (number|null); - - /** BackupWindow endHourOfDay */ - endHourOfDay?: (number|null); - } - - /** Represents a BackupWindow. */ - class BackupWindow implements IBackupWindow { - - /** - * Constructs a new BackupWindow. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupWindow); - - /** BackupWindow startHourOfDay. */ - public startHourOfDay: number; - - /** BackupWindow endHourOfDay. */ - public endHourOfDay: number; - - /** - * Creates a new BackupWindow instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupWindow instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupWindow): google.cloud.backupdr.v1.BackupWindow; - - /** - * Encodes the specified BackupWindow message. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. - * @param message BackupWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupWindow message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. - * @param message BackupWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupWindow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupWindow; - - /** - * Decodes a BackupWindow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupWindow; - - /** - * Verifies a BackupWindow message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupWindow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupWindow - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupWindow; - - /** - * Creates a plain object from a BackupWindow message. Also converts values to other types if specified. - * @param message BackupWindow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupWindow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupWindow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WeekDayOfMonth. */ - interface IWeekDayOfMonth { - - /** WeekDayOfMonth weekOfMonth */ - weekOfMonth?: (google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|keyof typeof google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|null); - - /** WeekDayOfMonth dayOfWeek */ - dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); - } - - /** Represents a WeekDayOfMonth. */ - class WeekDayOfMonth implements IWeekDayOfMonth { - - /** - * Constructs a new WeekDayOfMonth. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IWeekDayOfMonth); - - /** WeekDayOfMonth weekOfMonth. */ - public weekOfMonth: (google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|keyof typeof google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth); - - /** WeekDayOfMonth dayOfWeek. */ - public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); - - /** - * Creates a new WeekDayOfMonth instance using the specified properties. - * @param [properties] Properties to set - * @returns WeekDayOfMonth instance - */ - public static create(properties?: google.cloud.backupdr.v1.IWeekDayOfMonth): google.cloud.backupdr.v1.WeekDayOfMonth; - - /** - * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. - * @param message WeekDayOfMonth message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. - * @param message WeekDayOfMonth message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WeekDayOfMonth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WeekDayOfMonth; - - /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WeekDayOfMonth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WeekDayOfMonth; - - /** - * Verifies a WeekDayOfMonth message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WeekDayOfMonth - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WeekDayOfMonth; - - /** - * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. - * @param message WeekDayOfMonth - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.WeekDayOfMonth, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WeekDayOfMonth to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WeekDayOfMonth - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WeekDayOfMonth { - - /** WeekOfMonth enum. */ - enum WeekOfMonth { - WEEK_OF_MONTH_UNSPECIFIED = 0, - FIRST = 1, - SECOND = 2, - THIRD = 3, - FOURTH = 4, - LAST = 5 - } - } - - /** Properties of a CreateBackupPlanRequest. */ - interface ICreateBackupPlanRequest { - - /** CreateBackupPlanRequest parent */ - parent?: (string|null); - - /** CreateBackupPlanRequest backupPlanId */ - backupPlanId?: (string|null); - - /** CreateBackupPlanRequest backupPlan */ - backupPlan?: (google.cloud.backupdr.v1.IBackupPlan|null); - - /** CreateBackupPlanRequest requestId */ - requestId?: (string|null); - } - - /** Represents a CreateBackupPlanRequest. */ - class CreateBackupPlanRequest implements ICreateBackupPlanRequest { - - /** - * Constructs a new CreateBackupPlanRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ICreateBackupPlanRequest); - - /** CreateBackupPlanRequest parent. */ - public parent: string; - - /** CreateBackupPlanRequest backupPlanId. */ - public backupPlanId: string; - - /** CreateBackupPlanRequest backupPlan. */ - public backupPlan?: (google.cloud.backupdr.v1.IBackupPlan|null); - - /** CreateBackupPlanRequest requestId. */ - public requestId: string; - - /** - * Creates a new CreateBackupPlanRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateBackupPlanRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ICreateBackupPlanRequest): google.cloud.backupdr.v1.CreateBackupPlanRequest; - - /** - * Encodes the specified CreateBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. - * @param message CreateBackupPlanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ICreateBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. - * @param message CreateBackupPlanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateBackupPlanRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupPlanRequest; - - /** - * Decodes a CreateBackupPlanRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupPlanRequest; - - /** - * Verifies a CreateBackupPlanRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateBackupPlanRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateBackupPlanRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupPlanRequest; - - /** - * Creates a plain object from a CreateBackupPlanRequest message. Also converts values to other types if specified. - * @param message CreateBackupPlanRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.CreateBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateBackupPlanRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateBackupPlanRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupPlansRequest. */ - interface IListBackupPlansRequest { - - /** ListBackupPlansRequest parent */ - parent?: (string|null); - - /** ListBackupPlansRequest pageSize */ - pageSize?: (number|null); - - /** ListBackupPlansRequest pageToken */ - pageToken?: (string|null); - - /** ListBackupPlansRequest filter */ - filter?: (string|null); - - /** ListBackupPlansRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListBackupPlansRequest. */ - class ListBackupPlansRequest implements IListBackupPlansRequest { - - /** - * Constructs a new ListBackupPlansRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupPlansRequest); - - /** ListBackupPlansRequest parent. */ - public parent: string; - - /** ListBackupPlansRequest pageSize. */ - public pageSize: number; - - /** ListBackupPlansRequest pageToken. */ - public pageToken: string; - - /** ListBackupPlansRequest filter. */ - public filter: string; - - /** ListBackupPlansRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListBackupPlansRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupPlansRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupPlansRequest): google.cloud.backupdr.v1.ListBackupPlansRequest; - - /** - * Encodes the specified ListBackupPlansRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. - * @param message ListBackupPlansRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupPlansRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupPlansRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. - * @param message ListBackupPlansRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlansRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupPlansRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupPlansRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlansRequest; - - /** - * Decodes a ListBackupPlansRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupPlansRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlansRequest; - - /** - * Verifies a ListBackupPlansRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupPlansRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupPlansRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlansRequest; - - /** - * Creates a plain object from a ListBackupPlansRequest message. Also converts values to other types if specified. - * @param message ListBackupPlansRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupPlansRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupPlansRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupPlansRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupPlansResponse. */ - interface IListBackupPlansResponse { - - /** ListBackupPlansResponse backupPlans */ - backupPlans?: (google.cloud.backupdr.v1.IBackupPlan[]|null); - - /** ListBackupPlansResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListBackupPlansResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListBackupPlansResponse. */ - class ListBackupPlansResponse implements IListBackupPlansResponse { - - /** - * Constructs a new ListBackupPlansResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupPlansResponse); - - /** ListBackupPlansResponse backupPlans. */ - public backupPlans: google.cloud.backupdr.v1.IBackupPlan[]; - - /** ListBackupPlansResponse nextPageToken. */ - public nextPageToken: string; - - /** ListBackupPlansResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListBackupPlansResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupPlansResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupPlansResponse): google.cloud.backupdr.v1.ListBackupPlansResponse; - - /** - * Encodes the specified ListBackupPlansResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. - * @param message ListBackupPlansResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupPlansResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupPlansResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. - * @param message ListBackupPlansResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlansResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupPlansResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupPlansResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlansResponse; - - /** - * Decodes a ListBackupPlansResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupPlansResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlansResponse; - - /** - * Verifies a ListBackupPlansResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupPlansResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupPlansResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlansResponse; - - /** - * Creates a plain object from a ListBackupPlansResponse message. Also converts values to other types if specified. - * @param message ListBackupPlansResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupPlansResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupPlansResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupPlansResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetBackupPlanRequest. */ - interface IGetBackupPlanRequest { - - /** GetBackupPlanRequest name */ - name?: (string|null); - } - - /** Represents a GetBackupPlanRequest. */ - class GetBackupPlanRequest implements IGetBackupPlanRequest { - - /** - * Constructs a new GetBackupPlanRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetBackupPlanRequest); - - /** GetBackupPlanRequest name. */ - public name: string; - - /** - * Creates a new GetBackupPlanRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupPlanRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetBackupPlanRequest): google.cloud.backupdr.v1.GetBackupPlanRequest; - - /** - * Encodes the specified GetBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. - * @param message GetBackupPlanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. - * @param message GetBackupPlanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetBackupPlanRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupPlanRequest; - - /** - * Decodes a GetBackupPlanRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupPlanRequest; - - /** - * Verifies a GetBackupPlanRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetBackupPlanRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetBackupPlanRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupPlanRequest; - - /** - * Creates a plain object from a GetBackupPlanRequest message. Also converts values to other types if specified. - * @param message GetBackupPlanRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetBackupPlanRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetBackupPlanRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteBackupPlanRequest. */ - interface IDeleteBackupPlanRequest { - - /** DeleteBackupPlanRequest name */ - name?: (string|null); - - /** DeleteBackupPlanRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteBackupPlanRequest. */ - class DeleteBackupPlanRequest implements IDeleteBackupPlanRequest { - - /** - * Constructs a new DeleteBackupPlanRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanRequest); - - /** DeleteBackupPlanRequest name. */ - public name: string; - - /** DeleteBackupPlanRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteBackupPlanRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteBackupPlanRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanRequest): google.cloud.backupdr.v1.DeleteBackupPlanRequest; - - /** - * Encodes the specified DeleteBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. - * @param message DeleteBackupPlanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. - * @param message DeleteBackupPlanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupPlanRequest; - - /** - * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupPlanRequest; - - /** - * Verifies a DeleteBackupPlanRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteBackupPlanRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteBackupPlanRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupPlanRequest; - - /** - * Creates a plain object from a DeleteBackupPlanRequest message. Also converts values to other types if specified. - * @param message DeleteBackupPlanRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DeleteBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteBackupPlanRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteBackupPlanRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackupPlanAssociation. */ - interface IBackupPlanAssociation { - - /** BackupPlanAssociation name */ - name?: (string|null); - - /** BackupPlanAssociation resourceType */ - resourceType?: (string|null); - - /** BackupPlanAssociation resource */ - resource?: (string|null); - - /** BackupPlanAssociation backupPlan */ - backupPlan?: (string|null); - - /** BackupPlanAssociation createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlanAssociation updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlanAssociation state */ - state?: (google.cloud.backupdr.v1.BackupPlanAssociation.State|keyof typeof google.cloud.backupdr.v1.BackupPlanAssociation.State|null); - - /** BackupPlanAssociation rulesConfigInfo */ - rulesConfigInfo?: (google.cloud.backupdr.v1.IRuleConfigInfo[]|null); - - /** BackupPlanAssociation dataSource */ - dataSource?: (string|null); - } - - /** Represents a BackupPlanAssociation. */ - class BackupPlanAssociation implements IBackupPlanAssociation { - - /** - * Constructs a new BackupPlanAssociation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupPlanAssociation); - - /** BackupPlanAssociation name. */ - public name: string; - - /** BackupPlanAssociation resourceType. */ - public resourceType: string; - - /** BackupPlanAssociation resource. */ - public resource: string; - - /** BackupPlanAssociation backupPlan. */ - public backupPlan: string; - - /** BackupPlanAssociation createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlanAssociation updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlanAssociation state. */ - public state: (google.cloud.backupdr.v1.BackupPlanAssociation.State|keyof typeof google.cloud.backupdr.v1.BackupPlanAssociation.State); - - /** BackupPlanAssociation rulesConfigInfo. */ - public rulesConfigInfo: google.cloud.backupdr.v1.IRuleConfigInfo[]; - - /** BackupPlanAssociation dataSource. */ - public dataSource: string; - - /** - * Creates a new BackupPlanAssociation instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupPlanAssociation instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupPlanAssociation): google.cloud.backupdr.v1.BackupPlanAssociation; - - /** - * Encodes the specified BackupPlanAssociation message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. - * @param message BackupPlanAssociation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupPlanAssociation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupPlanAssociation message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. - * @param message BackupPlanAssociation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupPlanAssociation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupPlanAssociation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupPlanAssociation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupPlanAssociation; - - /** - * Decodes a BackupPlanAssociation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupPlanAssociation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupPlanAssociation; - - /** - * Verifies a BackupPlanAssociation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupPlanAssociation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupPlanAssociation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupPlanAssociation; - - /** - * Creates a plain object from a BackupPlanAssociation message. Also converts values to other types if specified. - * @param message BackupPlanAssociation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupPlanAssociation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupPlanAssociation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupPlanAssociation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BackupPlanAssociation { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - DELETING = 3, - INACTIVE = 4 - } - } - - /** Properties of a RuleConfigInfo. */ - interface IRuleConfigInfo { - - /** RuleConfigInfo ruleId */ - ruleId?: (string|null); - - /** RuleConfigInfo lastBackupState */ - lastBackupState?: (google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|null); - - /** RuleConfigInfo lastBackupError */ - lastBackupError?: (google.rpc.IStatus|null); - - /** RuleConfigInfo lastSuccessfulBackupConsistencyTime */ - lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a RuleConfigInfo. */ - class RuleConfigInfo implements IRuleConfigInfo { - - /** - * Constructs a new RuleConfigInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IRuleConfigInfo); - - /** RuleConfigInfo ruleId. */ - public ruleId: string; - - /** RuleConfigInfo lastBackupState. */ - public lastBackupState: (google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState); - - /** RuleConfigInfo lastBackupError. */ - public lastBackupError?: (google.rpc.IStatus|null); - - /** RuleConfigInfo lastSuccessfulBackupConsistencyTime. */ - public lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new RuleConfigInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RuleConfigInfo instance - */ - public static create(properties?: google.cloud.backupdr.v1.IRuleConfigInfo): google.cloud.backupdr.v1.RuleConfigInfo; - - /** - * Encodes the specified RuleConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. - * @param message RuleConfigInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IRuleConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RuleConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. - * @param message RuleConfigInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IRuleConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RuleConfigInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RuleConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RuleConfigInfo; - - /** - * Decodes a RuleConfigInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RuleConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RuleConfigInfo; - - /** - * Verifies a RuleConfigInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RuleConfigInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RuleConfigInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RuleConfigInfo; - - /** - * Creates a plain object from a RuleConfigInfo message. Also converts values to other types if specified. - * @param message RuleConfigInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.RuleConfigInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RuleConfigInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RuleConfigInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace RuleConfigInfo { - - /** LastBackupState enum. */ - enum LastBackupState { - LAST_BACKUP_STATE_UNSPECIFIED = 0, - FIRST_BACKUP_PENDING = 1, - PERMISSION_DENIED = 2, - SUCCEEDED = 3, - FAILED = 4 - } - } - - /** Properties of a CreateBackupPlanAssociationRequest. */ - interface ICreateBackupPlanAssociationRequest { - - /** CreateBackupPlanAssociationRequest parent */ - parent?: (string|null); - - /** CreateBackupPlanAssociationRequest backupPlanAssociationId */ - backupPlanAssociationId?: (string|null); - - /** CreateBackupPlanAssociationRequest backupPlanAssociation */ - backupPlanAssociation?: (google.cloud.backupdr.v1.IBackupPlanAssociation|null); - - /** CreateBackupPlanAssociationRequest requestId */ - requestId?: (string|null); - } - - /** Represents a CreateBackupPlanAssociationRequest. */ - class CreateBackupPlanAssociationRequest implements ICreateBackupPlanAssociationRequest { - - /** - * Constructs a new CreateBackupPlanAssociationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest); - - /** CreateBackupPlanAssociationRequest parent. */ - public parent: string; - - /** CreateBackupPlanAssociationRequest backupPlanAssociationId. */ - public backupPlanAssociationId: string; - - /** CreateBackupPlanAssociationRequest backupPlanAssociation. */ - public backupPlanAssociation?: (google.cloud.backupdr.v1.IBackupPlanAssociation|null); - - /** CreateBackupPlanAssociationRequest requestId. */ - public requestId: string; - - /** - * Creates a new CreateBackupPlanAssociationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateBackupPlanAssociationRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; - - /** - * Encodes the specified CreateBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. - * @param message CreateBackupPlanAssociationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. - * @param message CreateBackupPlanAssociationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; - - /** - * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; - - /** - * Verifies a CreateBackupPlanAssociationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateBackupPlanAssociationRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; - - /** - * Creates a plain object from a CreateBackupPlanAssociationRequest message. Also converts values to other types if specified. - * @param message CreateBackupPlanAssociationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateBackupPlanAssociationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateBackupPlanAssociationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupPlanAssociationsRequest. */ - interface IListBackupPlanAssociationsRequest { - - /** ListBackupPlanAssociationsRequest parent */ - parent?: (string|null); - - /** ListBackupPlanAssociationsRequest pageSize */ - pageSize?: (number|null); - - /** ListBackupPlanAssociationsRequest pageToken */ - pageToken?: (string|null); - - /** ListBackupPlanAssociationsRequest filter */ - filter?: (string|null); - } - - /** Represents a ListBackupPlanAssociationsRequest. */ - class ListBackupPlanAssociationsRequest implements IListBackupPlanAssociationsRequest { - - /** - * Constructs a new ListBackupPlanAssociationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest); - - /** ListBackupPlanAssociationsRequest parent. */ - public parent: string; - - /** ListBackupPlanAssociationsRequest pageSize. */ - public pageSize: number; - - /** ListBackupPlanAssociationsRequest pageToken. */ - public pageToken: string; - - /** ListBackupPlanAssociationsRequest filter. */ - public filter: string; - - /** - * Creates a new ListBackupPlanAssociationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupPlanAssociationsRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; - - /** - * Encodes the specified ListBackupPlanAssociationsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. - * @param message ListBackupPlanAssociationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupPlanAssociationsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. - * @param message ListBackupPlanAssociationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupPlanAssociationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; - - /** - * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupPlanAssociationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; - - /** - * Verifies a ListBackupPlanAssociationsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupPlanAssociationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupPlanAssociationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; - - /** - * Creates a plain object from a ListBackupPlanAssociationsRequest message. Also converts values to other types if specified. - * @param message ListBackupPlanAssociationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupPlanAssociationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupPlanAssociationsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupPlanAssociationsResponse. */ - interface IListBackupPlanAssociationsResponse { - - /** ListBackupPlanAssociationsResponse backupPlanAssociations */ - backupPlanAssociations?: (google.cloud.backupdr.v1.IBackupPlanAssociation[]|null); - - /** ListBackupPlanAssociationsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListBackupPlanAssociationsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListBackupPlanAssociationsResponse. */ - class ListBackupPlanAssociationsResponse implements IListBackupPlanAssociationsResponse { - - /** - * Constructs a new ListBackupPlanAssociationsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse); - - /** ListBackupPlanAssociationsResponse backupPlanAssociations. */ - public backupPlanAssociations: google.cloud.backupdr.v1.IBackupPlanAssociation[]; - - /** ListBackupPlanAssociationsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListBackupPlanAssociationsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListBackupPlanAssociationsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupPlanAssociationsResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; - - /** - * Encodes the specified ListBackupPlanAssociationsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. - * @param message ListBackupPlanAssociationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupPlanAssociationsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. - * @param message ListBackupPlanAssociationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupPlanAssociationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; - - /** - * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupPlanAssociationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; - - /** - * Verifies a ListBackupPlanAssociationsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupPlanAssociationsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupPlanAssociationsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; - - /** - * Creates a plain object from a ListBackupPlanAssociationsResponse message. Also converts values to other types if specified. - * @param message ListBackupPlanAssociationsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupPlanAssociationsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupPlanAssociationsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetBackupPlanAssociationRequest. */ - interface IGetBackupPlanAssociationRequest { - - /** GetBackupPlanAssociationRequest name */ - name?: (string|null); - } - - /** Represents a GetBackupPlanAssociationRequest. */ - class GetBackupPlanAssociationRequest implements IGetBackupPlanAssociationRequest { - - /** - * Constructs a new GetBackupPlanAssociationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest); - - /** GetBackupPlanAssociationRequest name. */ - public name: string; - - /** - * Creates a new GetBackupPlanAssociationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupPlanAssociationRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; - - /** - * Encodes the specified GetBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. - * @param message GetBackupPlanAssociationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. - * @param message GetBackupPlanAssociationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; - - /** - * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; - - /** - * Verifies a GetBackupPlanAssociationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetBackupPlanAssociationRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; - - /** - * Creates a plain object from a GetBackupPlanAssociationRequest message. Also converts values to other types if specified. - * @param message GetBackupPlanAssociationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetBackupPlanAssociationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetBackupPlanAssociationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteBackupPlanAssociationRequest. */ - interface IDeleteBackupPlanAssociationRequest { - - /** DeleteBackupPlanAssociationRequest name */ - name?: (string|null); - - /** DeleteBackupPlanAssociationRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteBackupPlanAssociationRequest. */ - class DeleteBackupPlanAssociationRequest implements IDeleteBackupPlanAssociationRequest { - - /** - * Constructs a new DeleteBackupPlanAssociationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest); - - /** DeleteBackupPlanAssociationRequest name. */ - public name: string; - - /** DeleteBackupPlanAssociationRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteBackupPlanAssociationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteBackupPlanAssociationRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; - - /** - * Encodes the specified DeleteBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. - * @param message DeleteBackupPlanAssociationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. - * @param message DeleteBackupPlanAssociationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; - - /** - * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; - - /** - * Verifies a DeleteBackupPlanAssociationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteBackupPlanAssociationRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; - - /** - * Creates a plain object from a DeleteBackupPlanAssociationRequest message. Also converts values to other types if specified. - * @param message DeleteBackupPlanAssociationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteBackupPlanAssociationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteBackupPlanAssociationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TriggerBackupRequest. */ - interface ITriggerBackupRequest { - - /** TriggerBackupRequest name */ - name?: (string|null); - - /** TriggerBackupRequest ruleId */ - ruleId?: (string|null); - - /** TriggerBackupRequest requestId */ - requestId?: (string|null); - } - - /** Represents a TriggerBackupRequest. */ - class TriggerBackupRequest implements ITriggerBackupRequest { - - /** - * Constructs a new TriggerBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ITriggerBackupRequest); - - /** TriggerBackupRequest name. */ - public name: string; - - /** TriggerBackupRequest ruleId. */ - public ruleId: string; - - /** TriggerBackupRequest requestId. */ - public requestId: string; - - /** - * Creates a new TriggerBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns TriggerBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ITriggerBackupRequest): google.cloud.backupdr.v1.TriggerBackupRequest; - - /** - * Encodes the specified TriggerBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. - * @param message TriggerBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ITriggerBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TriggerBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. - * @param message TriggerBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ITriggerBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TriggerBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TriggerBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.TriggerBackupRequest; - - /** - * Decodes a TriggerBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TriggerBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.TriggerBackupRequest; - - /** - * Verifies a TriggerBackupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TriggerBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TriggerBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.TriggerBackupRequest; - - /** - * Creates a plain object from a TriggerBackupRequest message. Also converts values to other types if specified. - * @param message TriggerBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.TriggerBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TriggerBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TriggerBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackupVault. */ - interface IBackupVault { - - /** BackupVault name */ - name?: (string|null); - - /** BackupVault description */ - description?: (string|null); - - /** BackupVault labels */ - labels?: ({ [k: string]: string }|null); - - /** BackupVault createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault backupMinimumEnforcedRetentionDuration */ - backupMinimumEnforcedRetentionDuration?: (google.protobuf.IDuration|null); - - /** BackupVault deletable */ - deletable?: (boolean|null); - - /** BackupVault etag */ - etag?: (string|null); - - /** BackupVault state */ - state?: (google.cloud.backupdr.v1.BackupVault.State|keyof typeof google.cloud.backupdr.v1.BackupVault.State|null); - - /** BackupVault effectiveTime */ - effectiveTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault backupCount */ - backupCount?: (number|Long|string|null); - - /** BackupVault serviceAccount */ - serviceAccount?: (string|null); - - /** BackupVault totalStoredBytes */ - totalStoredBytes?: (number|Long|string|null); - - /** BackupVault uid */ - uid?: (string|null); - - /** BackupVault annotations */ - annotations?: ({ [k: string]: string }|null); - - /** BackupVault accessRestriction */ - accessRestriction?: (google.cloud.backupdr.v1.BackupVault.AccessRestriction|keyof typeof google.cloud.backupdr.v1.BackupVault.AccessRestriction|null); - } - - /** Represents a BackupVault. */ - class BackupVault implements IBackupVault { - - /** - * Constructs a new BackupVault. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupVault); - - /** BackupVault name. */ - public name: string; - - /** BackupVault description. */ - public description?: (string|null); - - /** BackupVault labels. */ - public labels: { [k: string]: string }; - - /** BackupVault createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault backupMinimumEnforcedRetentionDuration. */ - public backupMinimumEnforcedRetentionDuration?: (google.protobuf.IDuration|null); - - /** BackupVault deletable. */ - public deletable?: (boolean|null); - - /** BackupVault etag. */ - public etag?: (string|null); - - /** BackupVault state. */ - public state: (google.cloud.backupdr.v1.BackupVault.State|keyof typeof google.cloud.backupdr.v1.BackupVault.State); - - /** BackupVault effectiveTime. */ - public effectiveTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault backupCount. */ - public backupCount: (number|Long|string); - - /** BackupVault serviceAccount. */ - public serviceAccount: string; - - /** BackupVault totalStoredBytes. */ - public totalStoredBytes: (number|Long|string); - - /** BackupVault uid. */ - public uid: string; - - /** BackupVault annotations. */ - public annotations: { [k: string]: string }; - - /** BackupVault accessRestriction. */ - public accessRestriction: (google.cloud.backupdr.v1.BackupVault.AccessRestriction|keyof typeof google.cloud.backupdr.v1.BackupVault.AccessRestriction); - - /** BackupVault _description. */ - public _description?: "description"; - - /** BackupVault _createTime. */ - public _createTime?: "createTime"; - - /** BackupVault _updateTime. */ - public _updateTime?: "updateTime"; - - /** BackupVault _backupMinimumEnforcedRetentionDuration. */ - public _backupMinimumEnforcedRetentionDuration?: "backupMinimumEnforcedRetentionDuration"; - - /** BackupVault _deletable. */ - public _deletable?: "deletable"; - - /** BackupVault _etag. */ - public _etag?: "etag"; - - /** BackupVault _effectiveTime. */ - public _effectiveTime?: "effectiveTime"; - - /** - * Creates a new BackupVault instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupVault instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupVault): google.cloud.backupdr.v1.BackupVault; - - /** - * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. - * @param message BackupVault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupVault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. - * @param message BackupVault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupVault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupVault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupVault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupVault; - - /** - * Decodes a BackupVault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupVault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupVault; - - /** - * Verifies a BackupVault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupVault - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupVault; - - /** - * Creates a plain object from a BackupVault message. Also converts values to other types if specified. - * @param message BackupVault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupVault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupVault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupVault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BackupVault { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - DELETING = 3, - ERROR = 4 - } - - /** AccessRestriction enum. */ - enum AccessRestriction { - ACCESS_RESTRICTION_UNSPECIFIED = 0, - WITHIN_PROJECT = 1, - WITHIN_ORGANIZATION = 2, - UNRESTRICTED = 3 - } - } - - /** Properties of a DataSource. */ - interface IDataSource { - - /** DataSource name */ - name?: (string|null); - - /** DataSource state */ - state?: (google.cloud.backupdr.v1.DataSource.State|keyof typeof google.cloud.backupdr.v1.DataSource.State|null); - - /** DataSource labels */ - labels?: ({ [k: string]: string }|null); - - /** DataSource createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** DataSource updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** DataSource backupCount */ - backupCount?: (number|Long|string|null); - - /** DataSource etag */ - etag?: (string|null); - - /** DataSource totalStoredBytes */ - totalStoredBytes?: (number|Long|string|null); - - /** DataSource configState */ - configState?: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState|null); - - /** DataSource backupConfigInfo */ - backupConfigInfo?: (google.cloud.backupdr.v1.IBackupConfigInfo|null); - - /** DataSource dataSourceGcpResource */ - dataSourceGcpResource?: (google.cloud.backupdr.v1.IDataSourceGcpResource|null); - - /** DataSource dataSourceBackupApplianceApplication */ - dataSourceBackupApplianceApplication?: (google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null); - } - - /** Represents a DataSource. */ - class DataSource implements IDataSource { - - /** - * Constructs a new DataSource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDataSource); - - /** DataSource name. */ - public name: string; - - /** DataSource state. */ - public state: (google.cloud.backupdr.v1.DataSource.State|keyof typeof google.cloud.backupdr.v1.DataSource.State); - - /** DataSource labels. */ - public labels: { [k: string]: string }; - - /** DataSource createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** DataSource updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** DataSource backupCount. */ - public backupCount?: (number|Long|string|null); - - /** DataSource etag. */ - public etag?: (string|null); - - /** DataSource totalStoredBytes. */ - public totalStoredBytes?: (number|Long|string|null); - - /** DataSource configState. */ - public configState: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState); - - /** DataSource backupConfigInfo. */ - public backupConfigInfo?: (google.cloud.backupdr.v1.IBackupConfigInfo|null); - - /** DataSource dataSourceGcpResource. */ - public dataSourceGcpResource?: (google.cloud.backupdr.v1.IDataSourceGcpResource|null); - - /** DataSource dataSourceBackupApplianceApplication. */ - public dataSourceBackupApplianceApplication?: (google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null); - - /** DataSource _createTime. */ - public _createTime?: "createTime"; - - /** DataSource _updateTime. */ - public _updateTime?: "updateTime"; - - /** DataSource _backupCount. */ - public _backupCount?: "backupCount"; - - /** DataSource _etag. */ - public _etag?: "etag"; - - /** DataSource _totalStoredBytes. */ - public _totalStoredBytes?: "totalStoredBytes"; - - /** DataSource sourceResource. */ - public sourceResource?: ("dataSourceGcpResource"|"dataSourceBackupApplianceApplication"); - - /** - * Creates a new DataSource instance using the specified properties. - * @param [properties] Properties to set - * @returns DataSource instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDataSource): google.cloud.backupdr.v1.DataSource; - - /** - * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. - * @param message DataSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. - * @param message DataSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSource; - - /** - * Decodes a DataSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSource; - - /** - * Verifies a DataSource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataSource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSource; - - /** - * Creates a plain object from a DataSource message. Also converts values to other types if specified. - * @param message DataSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DataSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DataSource { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - DELETING = 3, - ERROR = 4 - } - } - - /** Properties of a BackupConfigInfo. */ - interface IBackupConfigInfo { - - /** BackupConfigInfo lastBackupState */ - lastBackupState?: (google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|null); - - /** BackupConfigInfo lastSuccessfulBackupConsistencyTime */ - lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); - - /** BackupConfigInfo lastBackupError */ - lastBackupError?: (google.rpc.IStatus|null); - - /** BackupConfigInfo gcpBackupConfig */ - gcpBackupConfig?: (google.cloud.backupdr.v1.IGcpBackupConfig|null); - - /** BackupConfigInfo backupApplianceBackupConfig */ - backupApplianceBackupConfig?: (google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null); - } - - /** Represents a BackupConfigInfo. */ - class BackupConfigInfo implements IBackupConfigInfo { - - /** - * Constructs a new BackupConfigInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupConfigInfo); - - /** BackupConfigInfo lastBackupState. */ - public lastBackupState: (google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState); - - /** BackupConfigInfo lastSuccessfulBackupConsistencyTime. */ - public lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); - - /** BackupConfigInfo lastBackupError. */ - public lastBackupError?: (google.rpc.IStatus|null); - - /** BackupConfigInfo gcpBackupConfig. */ - public gcpBackupConfig?: (google.cloud.backupdr.v1.IGcpBackupConfig|null); - - /** BackupConfigInfo backupApplianceBackupConfig. */ - public backupApplianceBackupConfig?: (google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null); - - /** BackupConfigInfo backupConfig. */ - public backupConfig?: ("gcpBackupConfig"|"backupApplianceBackupConfig"); - - /** - * Creates a new BackupConfigInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupConfigInfo instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupConfigInfo): google.cloud.backupdr.v1.BackupConfigInfo; - - /** - * Encodes the specified BackupConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. - * @param message BackupConfigInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. - * @param message BackupConfigInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupConfigInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupConfigInfo; - - /** - * Decodes a BackupConfigInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupConfigInfo; - - /** - * Verifies a BackupConfigInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupConfigInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupConfigInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupConfigInfo; - - /** - * Creates a plain object from a BackupConfigInfo message. Also converts values to other types if specified. - * @param message BackupConfigInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupConfigInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupConfigInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupConfigInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BackupConfigInfo { - - /** LastBackupState enum. */ - enum LastBackupState { - LAST_BACKUP_STATE_UNSPECIFIED = 0, - FIRST_BACKUP_PENDING = 1, - SUCCEEDED = 2, - FAILED = 3, - PERMISSION_DENIED = 4 - } - } - - /** Properties of a GcpBackupConfig. */ - interface IGcpBackupConfig { - - /** GcpBackupConfig backupPlan */ - backupPlan?: (string|null); - - /** GcpBackupConfig backupPlanDescription */ - backupPlanDescription?: (string|null); - - /** GcpBackupConfig backupPlanAssociation */ - backupPlanAssociation?: (string|null); - - /** GcpBackupConfig backupPlanRules */ - backupPlanRules?: (string[]|null); - } - - /** Represents a GcpBackupConfig. */ - class GcpBackupConfig implements IGcpBackupConfig { - - /** - * Constructs a new GcpBackupConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGcpBackupConfig); - - /** GcpBackupConfig backupPlan. */ - public backupPlan: string; - - /** GcpBackupConfig backupPlanDescription. */ - public backupPlanDescription: string; - - /** GcpBackupConfig backupPlanAssociation. */ - public backupPlanAssociation: string; - - /** GcpBackupConfig backupPlanRules. */ - public backupPlanRules: string[]; - - /** - * Creates a new GcpBackupConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GcpBackupConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGcpBackupConfig): google.cloud.backupdr.v1.GcpBackupConfig; - - /** - * Encodes the specified GcpBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. - * @param message GcpBackupConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGcpBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcpBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. - * @param message GcpBackupConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGcpBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcpBackupConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcpBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GcpBackupConfig; - - /** - * Decodes a GcpBackupConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcpBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GcpBackupConfig; - - /** - * Verifies a GcpBackupConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcpBackupConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcpBackupConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GcpBackupConfig; - - /** - * Creates a plain object from a GcpBackupConfig message. Also converts values to other types if specified. - * @param message GcpBackupConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GcpBackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcpBackupConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcpBackupConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackupApplianceBackupConfig. */ - interface IBackupApplianceBackupConfig { - - /** BackupApplianceBackupConfig backupApplianceName */ - backupApplianceName?: (string|null); - - /** BackupApplianceBackupConfig backupApplianceId */ - backupApplianceId?: (number|Long|string|null); - - /** BackupApplianceBackupConfig slaId */ - slaId?: (number|Long|string|null); - - /** BackupApplianceBackupConfig applicationName */ - applicationName?: (string|null); - - /** BackupApplianceBackupConfig hostName */ - hostName?: (string|null); - - /** BackupApplianceBackupConfig sltName */ - sltName?: (string|null); - - /** BackupApplianceBackupConfig slpName */ - slpName?: (string|null); - } - - /** Represents a BackupApplianceBackupConfig. */ - class BackupApplianceBackupConfig implements IBackupApplianceBackupConfig { - - /** - * Constructs a new BackupApplianceBackupConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupConfig); - - /** BackupApplianceBackupConfig backupApplianceName. */ - public backupApplianceName: string; - - /** BackupApplianceBackupConfig backupApplianceId. */ - public backupApplianceId: (number|Long|string); - - /** BackupApplianceBackupConfig slaId. */ - public slaId: (number|Long|string); - - /** BackupApplianceBackupConfig applicationName. */ - public applicationName: string; - - /** BackupApplianceBackupConfig hostName. */ - public hostName: string; - - /** BackupApplianceBackupConfig sltName. */ - public sltName: string; - - /** BackupApplianceBackupConfig slpName. */ - public slpName: string; - - /** - * Creates a new BackupApplianceBackupConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupApplianceBackupConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupConfig): google.cloud.backupdr.v1.BackupApplianceBackupConfig; - - /** - * Encodes the specified BackupApplianceBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. - * @param message BackupApplianceBackupConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupApplianceBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupApplianceBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. - * @param message BackupApplianceBackupConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupApplianceBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceBackupConfig; - - /** - * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupApplianceBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceBackupConfig; - - /** - * Verifies a BackupApplianceBackupConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupApplianceBackupConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupApplianceBackupConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceBackupConfig; - - /** - * Creates a plain object from a BackupApplianceBackupConfig message. Also converts values to other types if specified. - * @param message BackupApplianceBackupConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupApplianceBackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupApplianceBackupConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupApplianceBackupConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataSourceGcpResource. */ - interface IDataSourceGcpResource { - - /** DataSourceGcpResource gcpResourcename */ - gcpResourcename?: (string|null); - - /** DataSourceGcpResource location */ - location?: (string|null); - - /** DataSourceGcpResource type */ - type?: (string|null); - - /** DataSourceGcpResource computeInstanceDatasourceProperties */ - computeInstanceDatasourceProperties?: (google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null); - } - - /** Represents a DataSourceGcpResource. */ - class DataSourceGcpResource implements IDataSourceGcpResource { - - /** - * Constructs a new DataSourceGcpResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDataSourceGcpResource); - - /** DataSourceGcpResource gcpResourcename. */ - public gcpResourcename: string; - - /** DataSourceGcpResource location. */ - public location: string; - - /** DataSourceGcpResource type. */ - public type: string; - - /** DataSourceGcpResource computeInstanceDatasourceProperties. */ - public computeInstanceDatasourceProperties?: (google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null); - - /** DataSourceGcpResource gcpResourceProperties. */ - public gcpResourceProperties?: "computeInstanceDatasourceProperties"; - - /** - * Creates a new DataSourceGcpResource instance using the specified properties. - * @param [properties] Properties to set - * @returns DataSourceGcpResource instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDataSourceGcpResource): google.cloud.backupdr.v1.DataSourceGcpResource; - - /** - * Encodes the specified DataSourceGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. - * @param message DataSourceGcpResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDataSourceGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataSourceGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. - * @param message DataSourceGcpResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSourceGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataSourceGcpResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataSourceGcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSourceGcpResource; - - /** - * Decodes a DataSourceGcpResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataSourceGcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSourceGcpResource; - - /** - * Verifies a DataSourceGcpResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataSourceGcpResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataSourceGcpResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSourceGcpResource; - - /** - * Creates a plain object from a DataSourceGcpResource message. Also converts values to other types if specified. - * @param message DataSourceGcpResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DataSourceGcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataSourceGcpResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataSourceGcpResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataSourceBackupApplianceApplication. */ - interface IDataSourceBackupApplianceApplication { - - /** DataSourceBackupApplianceApplication applicationName */ - applicationName?: (string|null); - - /** DataSourceBackupApplianceApplication backupAppliance */ - backupAppliance?: (string|null); - - /** DataSourceBackupApplianceApplication applianceId */ - applianceId?: (number|Long|string|null); - - /** DataSourceBackupApplianceApplication type */ - type?: (string|null); - - /** DataSourceBackupApplianceApplication applicationId */ - applicationId?: (number|Long|string|null); - - /** DataSourceBackupApplianceApplication hostname */ - hostname?: (string|null); - - /** DataSourceBackupApplianceApplication hostId */ - hostId?: (number|Long|string|null); - } - - /** Represents a DataSourceBackupApplianceApplication. */ - class DataSourceBackupApplianceApplication implements IDataSourceBackupApplianceApplication { - - /** - * Constructs a new DataSourceBackupApplianceApplication. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication); - - /** DataSourceBackupApplianceApplication applicationName. */ - public applicationName: string; - - /** DataSourceBackupApplianceApplication backupAppliance. */ - public backupAppliance: string; - - /** DataSourceBackupApplianceApplication applianceId. */ - public applianceId: (number|Long|string); - - /** DataSourceBackupApplianceApplication type. */ - public type: string; - - /** DataSourceBackupApplianceApplication applicationId. */ - public applicationId: (number|Long|string); - - /** DataSourceBackupApplianceApplication hostname. */ - public hostname: string; - - /** DataSourceBackupApplianceApplication hostId. */ - public hostId: (number|Long|string); - - /** - * Creates a new DataSourceBackupApplianceApplication instance using the specified properties. - * @param [properties] Properties to set - * @returns DataSourceBackupApplianceApplication instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; - - /** - * Encodes the specified DataSourceBackupApplianceApplication message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. - * @param message DataSourceBackupApplianceApplication message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataSourceBackupApplianceApplication message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. - * @param message DataSourceBackupApplianceApplication message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataSourceBackupApplianceApplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; - - /** - * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataSourceBackupApplianceApplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; - - /** - * Verifies a DataSourceBackupApplianceApplication message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataSourceBackupApplianceApplication message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataSourceBackupApplianceApplication - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; - - /** - * Creates a plain object from a DataSourceBackupApplianceApplication message. Also converts values to other types if specified. - * @param message DataSourceBackupApplianceApplication - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DataSourceBackupApplianceApplication, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataSourceBackupApplianceApplication to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataSourceBackupApplianceApplication - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceLockInfo. */ - interface IServiceLockInfo { - - /** ServiceLockInfo operation */ - operation?: (string|null); - } - - /** Represents a ServiceLockInfo. */ - class ServiceLockInfo implements IServiceLockInfo { - - /** - * Constructs a new ServiceLockInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IServiceLockInfo); - - /** ServiceLockInfo operation. */ - public operation: string; - - /** - * Creates a new ServiceLockInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceLockInfo instance - */ - public static create(properties?: google.cloud.backupdr.v1.IServiceLockInfo): google.cloud.backupdr.v1.ServiceLockInfo; - - /** - * Encodes the specified ServiceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. - * @param message ServiceLockInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IServiceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. - * @param message ServiceLockInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IServiceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceLockInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ServiceLockInfo; - - /** - * Decodes a ServiceLockInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ServiceLockInfo; - - /** - * Verifies a ServiceLockInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceLockInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceLockInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ServiceLockInfo; - - /** - * Creates a plain object from a ServiceLockInfo message. Also converts values to other types if specified. - * @param message ServiceLockInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ServiceLockInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceLockInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceLockInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackupApplianceLockInfo. */ - interface IBackupApplianceLockInfo { - - /** BackupApplianceLockInfo backupApplianceId */ - backupApplianceId?: (number|Long|string|null); - - /** BackupApplianceLockInfo backupApplianceName */ - backupApplianceName?: (string|null); - - /** BackupApplianceLockInfo lockReason */ - lockReason?: (string|null); - - /** BackupApplianceLockInfo jobName */ - jobName?: (string|null); - - /** BackupApplianceLockInfo backupImage */ - backupImage?: (string|null); - - /** BackupApplianceLockInfo slaId */ - slaId?: (number|Long|string|null); - } - - /** Represents a BackupApplianceLockInfo. */ - class BackupApplianceLockInfo implements IBackupApplianceLockInfo { - - /** - * Constructs a new BackupApplianceLockInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceLockInfo); - - /** BackupApplianceLockInfo backupApplianceId. */ - public backupApplianceId: (number|Long|string); - - /** BackupApplianceLockInfo backupApplianceName. */ - public backupApplianceName: string; - - /** BackupApplianceLockInfo lockReason. */ - public lockReason: string; - - /** BackupApplianceLockInfo jobName. */ - public jobName?: (string|null); - - /** BackupApplianceLockInfo backupImage. */ - public backupImage?: (string|null); - - /** BackupApplianceLockInfo slaId. */ - public slaId?: (number|Long|string|null); - - /** BackupApplianceLockInfo lockSource. */ - public lockSource?: ("jobName"|"backupImage"|"slaId"); - - /** - * Creates a new BackupApplianceLockInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupApplianceLockInfo instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceLockInfo): google.cloud.backupdr.v1.BackupApplianceLockInfo; - - /** - * Encodes the specified BackupApplianceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. - * @param message BackupApplianceLockInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupApplianceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupApplianceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. - * @param message BackupApplianceLockInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupApplianceLockInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupApplianceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceLockInfo; - - /** - * Decodes a BackupApplianceLockInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupApplianceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceLockInfo; - - /** - * Verifies a BackupApplianceLockInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupApplianceLockInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupApplianceLockInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceLockInfo; - - /** - * Creates a plain object from a BackupApplianceLockInfo message. Also converts values to other types if specified. - * @param message BackupApplianceLockInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupApplianceLockInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupApplianceLockInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupApplianceLockInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackupLock. */ - interface IBackupLock { - - /** BackupLock lockUntilTime */ - lockUntilTime?: (google.protobuf.ITimestamp|null); - - /** BackupLock backupApplianceLockInfo */ - backupApplianceLockInfo?: (google.cloud.backupdr.v1.IBackupApplianceLockInfo|null); - - /** BackupLock serviceLockInfo */ - serviceLockInfo?: (google.cloud.backupdr.v1.IServiceLockInfo|null); - } - - /** Represents a BackupLock. */ - class BackupLock implements IBackupLock { - - /** - * Constructs a new BackupLock. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupLock); - - /** BackupLock lockUntilTime. */ - public lockUntilTime?: (google.protobuf.ITimestamp|null); - - /** BackupLock backupApplianceLockInfo. */ - public backupApplianceLockInfo?: (google.cloud.backupdr.v1.IBackupApplianceLockInfo|null); - - /** BackupLock serviceLockInfo. */ - public serviceLockInfo?: (google.cloud.backupdr.v1.IServiceLockInfo|null); - - /** BackupLock ClientLockInfo. */ - public ClientLockInfo?: ("backupApplianceLockInfo"|"serviceLockInfo"); - - /** - * Creates a new BackupLock instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupLock instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupLock): google.cloud.backupdr.v1.BackupLock; - - /** - * Encodes the specified BackupLock message. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. - * @param message BackupLock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupLock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupLock message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. - * @param message BackupLock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupLock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupLock message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupLock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupLock; - - /** - * Decodes a BackupLock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupLock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupLock; - - /** - * Verifies a BackupLock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupLock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupLock - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupLock; - - /** - * Creates a plain object from a BackupLock message. Also converts values to other types if specified. - * @param message BackupLock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupLock, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupLock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupLock - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Backup. */ - interface IBackup { - - /** Backup name */ - name?: (string|null); - - /** Backup description */ - description?: (string|null); - - /** Backup createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Backup updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Backup labels */ - labels?: ({ [k: string]: string }|null); - - /** Backup enforcedRetentionEndTime */ - enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); - - /** Backup expireTime */ - expireTime?: (google.protobuf.ITimestamp|null); - - /** Backup consistencyTime */ - consistencyTime?: (google.protobuf.ITimestamp|null); - - /** Backup etag */ - etag?: (string|null); - - /** Backup state */ - state?: (google.cloud.backupdr.v1.Backup.State|keyof typeof google.cloud.backupdr.v1.Backup.State|null); - - /** Backup serviceLocks */ - serviceLocks?: (google.cloud.backupdr.v1.IBackupLock[]|null); - - /** Backup backupApplianceLocks */ - backupApplianceLocks?: (google.cloud.backupdr.v1.IBackupLock[]|null); - - /** Backup computeInstanceBackupProperties */ - computeInstanceBackupProperties?: (google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null); - - /** Backup backupApplianceBackupProperties */ - backupApplianceBackupProperties?: (google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null); - - /** Backup backupType */ - backupType?: (google.cloud.backupdr.v1.Backup.BackupType|keyof typeof google.cloud.backupdr.v1.Backup.BackupType|null); - - /** Backup gcpBackupPlanInfo */ - gcpBackupPlanInfo?: (google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null); - - /** Backup resourceSizeBytes */ - resourceSizeBytes?: (number|Long|string|null); - } - - /** Represents a Backup. */ - class Backup implements IBackup { - - /** - * Constructs a new Backup. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackup); - - /** Backup name. */ - public name: string; - - /** Backup description. */ - public description?: (string|null); - - /** Backup createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Backup updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Backup labels. */ - public labels: { [k: string]: string }; - - /** Backup enforcedRetentionEndTime. */ - public enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); - - /** Backup expireTime. */ - public expireTime?: (google.protobuf.ITimestamp|null); - - /** Backup consistencyTime. */ - public consistencyTime?: (google.protobuf.ITimestamp|null); - - /** Backup etag. */ - public etag?: (string|null); - - /** Backup state. */ - public state: (google.cloud.backupdr.v1.Backup.State|keyof typeof google.cloud.backupdr.v1.Backup.State); - - /** Backup serviceLocks. */ - public serviceLocks: google.cloud.backupdr.v1.IBackupLock[]; - - /** Backup backupApplianceLocks. */ - public backupApplianceLocks: google.cloud.backupdr.v1.IBackupLock[]; - - /** Backup computeInstanceBackupProperties. */ - public computeInstanceBackupProperties?: (google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null); - - /** Backup backupApplianceBackupProperties. */ - public backupApplianceBackupProperties?: (google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null); - - /** Backup backupType. */ - public backupType: (google.cloud.backupdr.v1.Backup.BackupType|keyof typeof google.cloud.backupdr.v1.Backup.BackupType); - - /** Backup gcpBackupPlanInfo. */ - public gcpBackupPlanInfo?: (google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null); - - /** Backup resourceSizeBytes. */ - public resourceSizeBytes: (number|Long|string); - - /** Backup _description. */ - public _description?: "description"; - - /** Backup _createTime. */ - public _createTime?: "createTime"; - - /** Backup _updateTime. */ - public _updateTime?: "updateTime"; - - /** Backup _enforcedRetentionEndTime. */ - public _enforcedRetentionEndTime?: "enforcedRetentionEndTime"; - - /** Backup _expireTime. */ - public _expireTime?: "expireTime"; - - /** Backup _consistencyTime. */ - public _consistencyTime?: "consistencyTime"; - - /** Backup _etag. */ - public _etag?: "etag"; - - /** Backup backupProperties. */ - public backupProperties?: ("computeInstanceBackupProperties"|"backupApplianceBackupProperties"); - - /** Backup planInfo. */ - public planInfo?: "gcpBackupPlanInfo"; - - /** - * Creates a new Backup instance using the specified properties. - * @param [properties] Properties to set - * @returns Backup instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackup): google.cloud.backupdr.v1.Backup; - - /** - * Encodes the specified Backup message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. - * @param message Backup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. - * @param message Backup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Backup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Backup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Backup; - - /** - * Decodes a Backup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Backup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Backup; - - /** - * Verifies a Backup message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Backup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Backup - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Backup; - - /** - * Creates a plain object from a Backup message. Also converts values to other types if specified. - * @param message Backup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Backup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Backup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Backup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Backup { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - DELETING = 3, - ERROR = 4 - } - - /** BackupType enum. */ - enum BackupType { - BACKUP_TYPE_UNSPECIFIED = 0, - SCHEDULED = 1, - ON_DEMAND = 2 - } - - /** Properties of a GCPBackupPlanInfo. */ - interface IGCPBackupPlanInfo { - - /** GCPBackupPlanInfo backupPlan */ - backupPlan?: (string|null); - - /** GCPBackupPlanInfo backupPlanRuleId */ - backupPlanRuleId?: (string|null); - } - - /** Represents a GCPBackupPlanInfo. */ - class GCPBackupPlanInfo implements IGCPBackupPlanInfo { - - /** - * Constructs a new GCPBackupPlanInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo); - - /** GCPBackupPlanInfo backupPlan. */ - public backupPlan: string; - - /** GCPBackupPlanInfo backupPlanRuleId. */ - public backupPlanRuleId: string; - - /** - * Creates a new GCPBackupPlanInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GCPBackupPlanInfo instance - */ - public static create(properties?: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; - - /** - * Encodes the specified GCPBackupPlanInfo message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. - * @param message GCPBackupPlanInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GCPBackupPlanInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. - * @param message GCPBackupPlanInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GCPBackupPlanInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GCPBackupPlanInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; - - /** - * Decodes a GCPBackupPlanInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GCPBackupPlanInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; - - /** - * Verifies a GCPBackupPlanInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GCPBackupPlanInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GCPBackupPlanInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; - - /** - * Creates a plain object from a GCPBackupPlanInfo message. Also converts values to other types if specified. - * @param message GCPBackupPlanInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GCPBackupPlanInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GCPBackupPlanInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a CreateBackupVaultRequest. */ - interface ICreateBackupVaultRequest { - - /** CreateBackupVaultRequest parent */ - parent?: (string|null); - - /** CreateBackupVaultRequest backupVaultId */ - backupVaultId?: (string|null); - - /** CreateBackupVaultRequest backupVault */ - backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); - - /** CreateBackupVaultRequest requestId */ - requestId?: (string|null); - - /** CreateBackupVaultRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateBackupVaultRequest. */ - class CreateBackupVaultRequest implements ICreateBackupVaultRequest { - - /** - * Constructs a new CreateBackupVaultRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ICreateBackupVaultRequest); - - /** CreateBackupVaultRequest parent. */ - public parent: string; - - /** CreateBackupVaultRequest backupVaultId. */ - public backupVaultId: string; - - /** CreateBackupVaultRequest backupVault. */ - public backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); - - /** CreateBackupVaultRequest requestId. */ - public requestId: string; - - /** CreateBackupVaultRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateBackupVaultRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateBackupVaultRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ICreateBackupVaultRequest): google.cloud.backupdr.v1.CreateBackupVaultRequest; - - /** - * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. - * @param message CreateBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ICreateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. - * @param message CreateBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupVaultRequest; - - /** - * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupVaultRequest; - - /** - * Verifies a CreateBackupVaultRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateBackupVaultRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupVaultRequest; - - /** - * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. - * @param message CreateBackupVaultRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.CreateBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateBackupVaultRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateBackupVaultRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupVaultsRequest. */ - interface IListBackupVaultsRequest { - - /** ListBackupVaultsRequest parent */ - parent?: (string|null); - - /** ListBackupVaultsRequest pageSize */ - pageSize?: (number|null); - - /** ListBackupVaultsRequest pageToken */ - pageToken?: (string|null); - - /** ListBackupVaultsRequest filter */ - filter?: (string|null); - - /** ListBackupVaultsRequest orderBy */ - orderBy?: (string|null); - - /** ListBackupVaultsRequest view */ - view?: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView|null); - } - - /** Represents a ListBackupVaultsRequest. */ - class ListBackupVaultsRequest implements IListBackupVaultsRequest { - - /** - * Constructs a new ListBackupVaultsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupVaultsRequest); - - /** ListBackupVaultsRequest parent. */ - public parent: string; - - /** ListBackupVaultsRequest pageSize. */ - public pageSize: number; - - /** ListBackupVaultsRequest pageToken. */ - public pageToken: string; - - /** ListBackupVaultsRequest filter. */ - public filter: string; - - /** ListBackupVaultsRequest orderBy. */ - public orderBy: string; - - /** ListBackupVaultsRequest view. */ - public view: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView); - - /** - * Creates a new ListBackupVaultsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupVaultsRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupVaultsRequest): google.cloud.backupdr.v1.ListBackupVaultsRequest; - - /** - * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. - * @param message ListBackupVaultsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. - * @param message ListBackupVaultsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupVaultsRequest; - - /** - * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupVaultsRequest; - - /** - * Verifies a ListBackupVaultsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupVaultsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupVaultsRequest; - - /** - * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. - * @param message ListBackupVaultsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupVaultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupVaultsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupVaultsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupVaultsResponse. */ - interface IListBackupVaultsResponse { - - /** ListBackupVaultsResponse backupVaults */ - backupVaults?: (google.cloud.backupdr.v1.IBackupVault[]|null); - - /** ListBackupVaultsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListBackupVaultsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListBackupVaultsResponse. */ - class ListBackupVaultsResponse implements IListBackupVaultsResponse { - - /** - * Constructs a new ListBackupVaultsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupVaultsResponse); - - /** ListBackupVaultsResponse backupVaults. */ - public backupVaults: google.cloud.backupdr.v1.IBackupVault[]; - - /** ListBackupVaultsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListBackupVaultsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListBackupVaultsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupVaultsResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupVaultsResponse): google.cloud.backupdr.v1.ListBackupVaultsResponse; - - /** - * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. - * @param message ListBackupVaultsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. - * @param message ListBackupVaultsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupVaultsResponse; - - /** - * Decodes a ListBackupVaultsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupVaultsResponse; - - /** - * Verifies a ListBackupVaultsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupVaultsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupVaultsResponse; - - /** - * Creates a plain object from a ListBackupVaultsResponse message. Also converts values to other types if specified. - * @param message ListBackupVaultsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupVaultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupVaultsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupVaultsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchUsableBackupVaultsRequest. */ - interface IFetchUsableBackupVaultsRequest { - - /** FetchUsableBackupVaultsRequest parent */ - parent?: (string|null); - - /** FetchUsableBackupVaultsRequest pageSize */ - pageSize?: (number|null); - - /** FetchUsableBackupVaultsRequest pageToken */ - pageToken?: (string|null); - - /** FetchUsableBackupVaultsRequest filter */ - filter?: (string|null); - - /** FetchUsableBackupVaultsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a FetchUsableBackupVaultsRequest. */ - class FetchUsableBackupVaultsRequest implements IFetchUsableBackupVaultsRequest { - - /** - * Constructs a new FetchUsableBackupVaultsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest); - - /** FetchUsableBackupVaultsRequest parent. */ - public parent: string; - - /** FetchUsableBackupVaultsRequest pageSize. */ - public pageSize: number; - - /** FetchUsableBackupVaultsRequest pageToken. */ - public pageToken: string; - - /** FetchUsableBackupVaultsRequest filter. */ - public filter: string; - - /** FetchUsableBackupVaultsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new FetchUsableBackupVaultsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchUsableBackupVaultsRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; - - /** - * Encodes the specified FetchUsableBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. - * @param message FetchUsableBackupVaultsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchUsableBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. - * @param message FetchUsableBackupVaultsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchUsableBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; - - /** - * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchUsableBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; - - /** - * Verifies a FetchUsableBackupVaultsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchUsableBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchUsableBackupVaultsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; - - /** - * Creates a plain object from a FetchUsableBackupVaultsRequest message. Also converts values to other types if specified. - * @param message FetchUsableBackupVaultsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchUsableBackupVaultsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchUsableBackupVaultsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchUsableBackupVaultsResponse. */ - interface IFetchUsableBackupVaultsResponse { - - /** FetchUsableBackupVaultsResponse backupVaults */ - backupVaults?: (google.cloud.backupdr.v1.IBackupVault[]|null); - - /** FetchUsableBackupVaultsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** FetchUsableBackupVaultsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a FetchUsableBackupVaultsResponse. */ - class FetchUsableBackupVaultsResponse implements IFetchUsableBackupVaultsResponse { - - /** - * Constructs a new FetchUsableBackupVaultsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse); - - /** FetchUsableBackupVaultsResponse backupVaults. */ - public backupVaults: google.cloud.backupdr.v1.IBackupVault[]; - - /** FetchUsableBackupVaultsResponse nextPageToken. */ - public nextPageToken: string; - - /** FetchUsableBackupVaultsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new FetchUsableBackupVaultsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchUsableBackupVaultsResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; - - /** - * Encodes the specified FetchUsableBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. - * @param message FetchUsableBackupVaultsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchUsableBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. - * @param message FetchUsableBackupVaultsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchUsableBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; - - /** - * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchUsableBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; - - /** - * Verifies a FetchUsableBackupVaultsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchUsableBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchUsableBackupVaultsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; - - /** - * Creates a plain object from a FetchUsableBackupVaultsResponse message. Also converts values to other types if specified. - * @param message FetchUsableBackupVaultsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchUsableBackupVaultsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchUsableBackupVaultsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetBackupVaultRequest. */ - interface IGetBackupVaultRequest { - - /** GetBackupVaultRequest name */ - name?: (string|null); - - /** GetBackupVaultRequest view */ - view?: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView|null); - } - - /** Represents a GetBackupVaultRequest. */ - class GetBackupVaultRequest implements IGetBackupVaultRequest { - - /** - * Constructs a new GetBackupVaultRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetBackupVaultRequest); - - /** GetBackupVaultRequest name. */ - public name: string; - - /** GetBackupVaultRequest view. */ - public view: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView); - - /** - * Creates a new GetBackupVaultRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupVaultRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetBackupVaultRequest): google.cloud.backupdr.v1.GetBackupVaultRequest; - - /** - * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. - * @param message GetBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. - * @param message GetBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetBackupVaultRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupVaultRequest; - - /** - * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupVaultRequest; - - /** - * Verifies a GetBackupVaultRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetBackupVaultRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupVaultRequest; - - /** - * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. - * @param message GetBackupVaultRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetBackupVaultRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetBackupVaultRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateBackupVaultRequest. */ - interface IUpdateBackupVaultRequest { - - /** UpdateBackupVaultRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateBackupVaultRequest backupVault */ - backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); - - /** UpdateBackupVaultRequest requestId */ - requestId?: (string|null); - - /** UpdateBackupVaultRequest validateOnly */ - validateOnly?: (boolean|null); - - /** UpdateBackupVaultRequest force */ - force?: (boolean|null); - } - - /** Represents an UpdateBackupVaultRequest. */ - class UpdateBackupVaultRequest implements IUpdateBackupVaultRequest { - - /** - * Constructs a new UpdateBackupVaultRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IUpdateBackupVaultRequest); - - /** UpdateBackupVaultRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateBackupVaultRequest backupVault. */ - public backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); - - /** UpdateBackupVaultRequest requestId. */ - public requestId: string; - - /** UpdateBackupVaultRequest validateOnly. */ - public validateOnly: boolean; - - /** UpdateBackupVaultRequest force. */ - public force: boolean; - - /** - * Creates a new UpdateBackupVaultRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateBackupVaultRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IUpdateBackupVaultRequest): google.cloud.backupdr.v1.UpdateBackupVaultRequest; - - /** - * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. - * @param message UpdateBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. - * @param message UpdateBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateBackupVaultRequest; - - /** - * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateBackupVaultRequest; - - /** - * Verifies an UpdateBackupVaultRequest message. - * @param message Plain 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 UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateBackupVaultRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateBackupVaultRequest; - - /** - * Creates a plain object from an UpdateBackupVaultRequest message. Also converts values to other types if specified. - * @param message UpdateBackupVaultRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.UpdateBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateBackupVaultRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateBackupVaultRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteBackupVaultRequest. */ - interface IDeleteBackupVaultRequest { - - /** DeleteBackupVaultRequest name */ - name?: (string|null); - - /** DeleteBackupVaultRequest requestId */ - requestId?: (string|null); - - /** DeleteBackupVaultRequest force */ - force?: (boolean|null); - - /** DeleteBackupVaultRequest etag */ - etag?: (string|null); - - /** DeleteBackupVaultRequest validateOnly */ - validateOnly?: (boolean|null); - - /** DeleteBackupVaultRequest allowMissing */ - allowMissing?: (boolean|null); - } - - /** Represents a DeleteBackupVaultRequest. */ - class DeleteBackupVaultRequest implements IDeleteBackupVaultRequest { - - /** - * Constructs a new DeleteBackupVaultRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupVaultRequest); - - /** DeleteBackupVaultRequest name. */ - public name: string; - - /** DeleteBackupVaultRequest requestId. */ - public requestId: string; - - /** DeleteBackupVaultRequest force. */ - public force: boolean; - - /** DeleteBackupVaultRequest etag. */ - public etag: string; - - /** DeleteBackupVaultRequest validateOnly. */ - public validateOnly: boolean; - - /** DeleteBackupVaultRequest allowMissing. */ - public allowMissing: boolean; - - /** - * Creates a new DeleteBackupVaultRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteBackupVaultRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupVaultRequest): google.cloud.backupdr.v1.DeleteBackupVaultRequest; - - /** - * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. - * @param message DeleteBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. - * @param message DeleteBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupVaultRequest; - - /** - * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupVaultRequest; - - /** - * Verifies a DeleteBackupVaultRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteBackupVaultRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupVaultRequest; - - /** - * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. - * @param message DeleteBackupVaultRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DeleteBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteBackupVaultRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteBackupVaultRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDataSourcesRequest. */ - interface IListDataSourcesRequest { - - /** ListDataSourcesRequest parent */ - parent?: (string|null); - - /** ListDataSourcesRequest pageSize */ - pageSize?: (number|null); - - /** ListDataSourcesRequest pageToken */ - pageToken?: (string|null); - - /** ListDataSourcesRequest filter */ - filter?: (string|null); - - /** ListDataSourcesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListDataSourcesRequest. */ - class ListDataSourcesRequest implements IListDataSourcesRequest { - - /** - * Constructs a new ListDataSourcesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListDataSourcesRequest); - - /** ListDataSourcesRequest parent. */ - public parent: string; - - /** ListDataSourcesRequest pageSize. */ - public pageSize: number; - - /** ListDataSourcesRequest pageToken. */ - public pageToken: string; - - /** ListDataSourcesRequest filter. */ - public filter: string; - - /** ListDataSourcesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListDataSourcesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDataSourcesRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListDataSourcesRequest): google.cloud.backupdr.v1.ListDataSourcesRequest; - - /** - * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. - * @param message ListDataSourcesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListDataSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. - * @param message ListDataSourcesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListDataSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDataSourcesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDataSourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListDataSourcesRequest; - - /** - * Decodes a ListDataSourcesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDataSourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListDataSourcesRequest; - - /** - * Verifies a ListDataSourcesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDataSourcesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListDataSourcesRequest; - - /** - * Creates a plain object from a ListDataSourcesRequest message. Also converts values to other types if specified. - * @param message ListDataSourcesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListDataSourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDataSourcesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDataSourcesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDataSourcesResponse. */ - interface IListDataSourcesResponse { - - /** ListDataSourcesResponse dataSources */ - dataSources?: (google.cloud.backupdr.v1.IDataSource[]|null); - - /** ListDataSourcesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListDataSourcesResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListDataSourcesResponse. */ - class ListDataSourcesResponse implements IListDataSourcesResponse { - - /** - * Constructs a new ListDataSourcesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListDataSourcesResponse); - - /** ListDataSourcesResponse dataSources. */ - public dataSources: google.cloud.backupdr.v1.IDataSource[]; - - /** ListDataSourcesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListDataSourcesResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListDataSourcesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDataSourcesResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListDataSourcesResponse): google.cloud.backupdr.v1.ListDataSourcesResponse; - - /** - * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. - * @param message ListDataSourcesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListDataSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. - * @param message ListDataSourcesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListDataSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDataSourcesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDataSourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListDataSourcesResponse; - - /** - * Decodes a ListDataSourcesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDataSourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListDataSourcesResponse; - - /** - * Verifies a ListDataSourcesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDataSourcesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListDataSourcesResponse; - - /** - * Creates a plain object from a ListDataSourcesResponse message. Also converts values to other types if specified. - * @param message ListDataSourcesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListDataSourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDataSourcesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDataSourcesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetDataSourceRequest. */ - interface IGetDataSourceRequest { - - /** GetDataSourceRequest name */ - name?: (string|null); - } - - /** Represents a GetDataSourceRequest. */ - class GetDataSourceRequest implements IGetDataSourceRequest { - - /** - * Constructs a new GetDataSourceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetDataSourceRequest); - - /** GetDataSourceRequest name. */ - public name: string; - - /** - * Creates a new GetDataSourceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetDataSourceRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetDataSourceRequest): google.cloud.backupdr.v1.GetDataSourceRequest; - - /** - * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. - * @param message GetDataSourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. - * @param message GetDataSourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetDataSourceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetDataSourceRequest; - - /** - * Decodes a GetDataSourceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetDataSourceRequest; - - /** - * Verifies a GetDataSourceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetDataSourceRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetDataSourceRequest; - - /** - * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. - * @param message GetDataSourceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetDataSourceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetDataSourceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateDataSourceRequest. */ - interface IUpdateDataSourceRequest { - - /** UpdateDataSourceRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateDataSourceRequest dataSource */ - dataSource?: (google.cloud.backupdr.v1.IDataSource|null); - - /** UpdateDataSourceRequest requestId */ - requestId?: (string|null); - - /** UpdateDataSourceRequest allowMissing */ - allowMissing?: (boolean|null); - } - - /** Represents an UpdateDataSourceRequest. */ - class UpdateDataSourceRequest implements IUpdateDataSourceRequest { - - /** - * Constructs a new UpdateDataSourceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IUpdateDataSourceRequest); - - /** UpdateDataSourceRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateDataSourceRequest dataSource. */ - public dataSource?: (google.cloud.backupdr.v1.IDataSource|null); - - /** UpdateDataSourceRequest requestId. */ - public requestId: string; - - /** UpdateDataSourceRequest allowMissing. */ - public allowMissing: boolean; - - /** - * Creates a new UpdateDataSourceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateDataSourceRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IUpdateDataSourceRequest): google.cloud.backupdr.v1.UpdateDataSourceRequest; - - /** - * Encodes the specified UpdateDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. - * @param message UpdateDataSourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IUpdateDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. - * @param message UpdateDataSourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateDataSourceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateDataSourceRequest; - - /** - * Decodes an UpdateDataSourceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateDataSourceRequest; - - /** - * Verifies an UpdateDataSourceRequest message. - * @param message Plain 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 UpdateDataSourceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateDataSourceRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateDataSourceRequest; - - /** - * Creates a plain object from an UpdateDataSourceRequest message. Also converts values to other types if specified. - * @param message UpdateDataSourceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.UpdateDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateDataSourceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateDataSourceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RemoveDataSourceRequest. */ - interface IRemoveDataSourceRequest { - - /** RemoveDataSourceRequest name */ - name?: (string|null); - - /** RemoveDataSourceRequest requestId */ - requestId?: (string|null); - } - - /** Represents a RemoveDataSourceRequest. */ - class RemoveDataSourceRequest implements IRemoveDataSourceRequest { - - /** - * Constructs a new RemoveDataSourceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IRemoveDataSourceRequest); - - /** RemoveDataSourceRequest name. */ - public name: string; - - /** RemoveDataSourceRequest requestId. */ - public requestId: string; - - /** - * Creates a new RemoveDataSourceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RemoveDataSourceRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IRemoveDataSourceRequest): google.cloud.backupdr.v1.RemoveDataSourceRequest; - - /** - * Encodes the specified RemoveDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. - * @param message RemoveDataSourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IRemoveDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RemoveDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. - * @param message RemoveDataSourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IRemoveDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RemoveDataSourceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RemoveDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RemoveDataSourceRequest; - - /** - * Decodes a RemoveDataSourceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RemoveDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RemoveDataSourceRequest; - - /** - * Verifies a RemoveDataSourceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RemoveDataSourceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RemoveDataSourceRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RemoveDataSourceRequest; - - /** - * Creates a plain object from a RemoveDataSourceRequest message. Also converts values to other types if specified. - * @param message RemoveDataSourceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.RemoveDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RemoveDataSourceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RemoveDataSourceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetInternalStatusRequest. */ - interface ISetInternalStatusRequest { - - /** SetInternalStatusRequest dataSource */ - dataSource?: (string|null); - - /** SetInternalStatusRequest value */ - value?: (Uint8Array|string|null); - - /** SetInternalStatusRequest backupConfigState */ - backupConfigState?: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState|null); - - /** SetInternalStatusRequest requestId */ - requestId?: (string|null); - } - - /** Represents a SetInternalStatusRequest. */ - class SetInternalStatusRequest implements ISetInternalStatusRequest { - - /** - * Constructs a new SetInternalStatusRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ISetInternalStatusRequest); - - /** SetInternalStatusRequest dataSource. */ - public dataSource: string; - - /** SetInternalStatusRequest value. */ - public value: (Uint8Array|string); - - /** SetInternalStatusRequest backupConfigState. */ - public backupConfigState: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState); - - /** SetInternalStatusRequest requestId. */ - public requestId: string; - - /** - * Creates a new SetInternalStatusRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetInternalStatusRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ISetInternalStatusRequest): google.cloud.backupdr.v1.SetInternalStatusRequest; - - /** - * Encodes the specified SetInternalStatusRequest message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. - * @param message SetInternalStatusRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ISetInternalStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetInternalStatusRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. - * @param message SetInternalStatusRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ISetInternalStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetInternalStatusRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetInternalStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SetInternalStatusRequest; - - /** - * Decodes a SetInternalStatusRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetInternalStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SetInternalStatusRequest; - - /** - * Verifies a SetInternalStatusRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetInternalStatusRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetInternalStatusRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SetInternalStatusRequest; - - /** - * Creates a plain object from a SetInternalStatusRequest message. Also converts values to other types if specified. - * @param message SetInternalStatusRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.SetInternalStatusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetInternalStatusRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetInternalStatusRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SetInternalStatusResponse. */ - interface ISetInternalStatusResponse { - } - - /** Represents a SetInternalStatusResponse. */ - class SetInternalStatusResponse implements ISetInternalStatusResponse { - - /** - * Constructs a new SetInternalStatusResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ISetInternalStatusResponse); - - /** - * Creates a new SetInternalStatusResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SetInternalStatusResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.ISetInternalStatusResponse): google.cloud.backupdr.v1.SetInternalStatusResponse; - - /** - * Encodes the specified SetInternalStatusResponse message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. - * @param message SetInternalStatusResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ISetInternalStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetInternalStatusResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. - * @param message SetInternalStatusResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ISetInternalStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetInternalStatusResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetInternalStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SetInternalStatusResponse; - - /** - * Decodes a SetInternalStatusResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetInternalStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SetInternalStatusResponse; - - /** - * Verifies a SetInternalStatusResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetInternalStatusResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetInternalStatusResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SetInternalStatusResponse; - - /** - * Creates a plain object from a SetInternalStatusResponse message. Also converts values to other types if specified. - * @param message SetInternalStatusResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.SetInternalStatusResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetInternalStatusResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetInternalStatusResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an InitiateBackupRequest. */ - interface IInitiateBackupRequest { - - /** InitiateBackupRequest dataSource */ - dataSource?: (string|null); - - /** InitiateBackupRequest requestId */ - requestId?: (string|null); - - /** InitiateBackupRequest backupId */ - backupId?: (string|null); - } - - /** Represents an InitiateBackupRequest. */ - class InitiateBackupRequest implements IInitiateBackupRequest { - - /** - * Constructs a new InitiateBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IInitiateBackupRequest); - - /** InitiateBackupRequest dataSource. */ - public dataSource: string; - - /** InitiateBackupRequest requestId. */ - public requestId: string; - - /** InitiateBackupRequest backupId. */ - public backupId: string; - - /** - * Creates a new InitiateBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns InitiateBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IInitiateBackupRequest): google.cloud.backupdr.v1.InitiateBackupRequest; - - /** - * Encodes the specified InitiateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. - * @param message InitiateBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IInitiateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InitiateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. - * @param message InitiateBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IInitiateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InitiateBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InitiateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InitiateBackupRequest; - - /** - * Decodes an InitiateBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InitiateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InitiateBackupRequest; - - /** - * Verifies an InitiateBackupRequest message. - * @param message Plain 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 InitiateBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InitiateBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InitiateBackupRequest; - - /** - * Creates a plain object from an InitiateBackupRequest message. Also converts values to other types if specified. - * @param message InitiateBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.InitiateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InitiateBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InitiateBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an InitiateBackupResponse. */ - interface IInitiateBackupResponse { - - /** InitiateBackupResponse backup */ - backup?: (string|null); - - /** InitiateBackupResponse newBackupGenerationId */ - newBackupGenerationId?: (number|null); - - /** InitiateBackupResponse baseBackupGenerationId */ - baseBackupGenerationId?: (number|null); - } - - /** Represents an InitiateBackupResponse. */ - class InitiateBackupResponse implements IInitiateBackupResponse { - - /** - * Constructs a new InitiateBackupResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IInitiateBackupResponse); - - /** InitiateBackupResponse backup. */ - public backup: string; - - /** InitiateBackupResponse newBackupGenerationId. */ - public newBackupGenerationId: number; - - /** InitiateBackupResponse baseBackupGenerationId. */ - public baseBackupGenerationId: number; - - /** - * Creates a new InitiateBackupResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns InitiateBackupResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IInitiateBackupResponse): google.cloud.backupdr.v1.InitiateBackupResponse; - - /** - * Encodes the specified InitiateBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. - * @param message InitiateBackupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IInitiateBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InitiateBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. - * @param message InitiateBackupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IInitiateBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InitiateBackupResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InitiateBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InitiateBackupResponse; - - /** - * Decodes an InitiateBackupResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InitiateBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InitiateBackupResponse; - - /** - * Verifies an InitiateBackupResponse message. - * @param message Plain 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 InitiateBackupResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InitiateBackupResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InitiateBackupResponse; - - /** - * Creates a plain object from an InitiateBackupResponse message. Also converts values to other types if specified. - * @param message InitiateBackupResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.InitiateBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InitiateBackupResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InitiateBackupResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AbandonBackupRequest. */ - interface IAbandonBackupRequest { - - /** AbandonBackupRequest dataSource */ - dataSource?: (string|null); - - /** AbandonBackupRequest requestId */ - requestId?: (string|null); - } - - /** Represents an AbandonBackupRequest. */ - class AbandonBackupRequest implements IAbandonBackupRequest { - - /** - * Constructs a new AbandonBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAbandonBackupRequest); - - /** AbandonBackupRequest dataSource. */ - public dataSource: string; - - /** AbandonBackupRequest requestId. */ - public requestId: string; - - /** - * Creates a new AbandonBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns AbandonBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAbandonBackupRequest): google.cloud.backupdr.v1.AbandonBackupRequest; - - /** - * Encodes the specified AbandonBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. - * @param message AbandonBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAbandonBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AbandonBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. - * @param message AbandonBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAbandonBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AbandonBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AbandonBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AbandonBackupRequest; - - /** - * Decodes an AbandonBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AbandonBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AbandonBackupRequest; - - /** - * Verifies an AbandonBackupRequest message. - * @param message Plain 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 AbandonBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AbandonBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AbandonBackupRequest; - - /** - * Creates a plain object from an AbandonBackupRequest message. Also converts values to other types if specified. - * @param message AbandonBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AbandonBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AbandonBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AbandonBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FinalizeBackupRequest. */ - interface IFinalizeBackupRequest { - - /** FinalizeBackupRequest dataSource */ - dataSource?: (string|null); - - /** FinalizeBackupRequest description */ - description?: (string|null); - - /** FinalizeBackupRequest consistencyTime */ - consistencyTime?: (google.protobuf.ITimestamp|null); - - /** FinalizeBackupRequest requestId */ - requestId?: (string|null); - - /** FinalizeBackupRequest backupId */ - backupId?: (string|null); - - /** FinalizeBackupRequest recoveryRangeStartTime */ - recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); - - /** FinalizeBackupRequest recoveryRangeEndTime */ - recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); - - /** FinalizeBackupRequest retentionDuration */ - retentionDuration?: (google.protobuf.IDuration|null); - } - - /** Represents a FinalizeBackupRequest. */ - class FinalizeBackupRequest implements IFinalizeBackupRequest { - - /** - * Constructs a new FinalizeBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IFinalizeBackupRequest); - - /** FinalizeBackupRequest dataSource. */ - public dataSource: string; - - /** FinalizeBackupRequest description. */ - public description?: (string|null); - - /** FinalizeBackupRequest consistencyTime. */ - public consistencyTime?: (google.protobuf.ITimestamp|null); - - /** FinalizeBackupRequest requestId. */ - public requestId: string; - - /** FinalizeBackupRequest backupId. */ - public backupId: string; - - /** FinalizeBackupRequest recoveryRangeStartTime. */ - public recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); - - /** FinalizeBackupRequest recoveryRangeEndTime. */ - public recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); - - /** FinalizeBackupRequest retentionDuration. */ - public retentionDuration?: (google.protobuf.IDuration|null); - - /** FinalizeBackupRequest _description. */ - public _description?: "description"; - - /** FinalizeBackupRequest _consistencyTime. */ - public _consistencyTime?: "consistencyTime"; - - /** FinalizeBackupRequest _recoveryRangeStartTime. */ - public _recoveryRangeStartTime?: "recoveryRangeStartTime"; - - /** FinalizeBackupRequest _recoveryRangeEndTime. */ - public _recoveryRangeEndTime?: "recoveryRangeEndTime"; - - /** FinalizeBackupRequest _retentionDuration. */ - public _retentionDuration?: "retentionDuration"; - - /** - * Creates a new FinalizeBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns FinalizeBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IFinalizeBackupRequest): google.cloud.backupdr.v1.FinalizeBackupRequest; - - /** - * Encodes the specified FinalizeBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. - * @param message FinalizeBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IFinalizeBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FinalizeBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. - * @param message FinalizeBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IFinalizeBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FinalizeBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FinalizeBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FinalizeBackupRequest; - - /** - * Decodes a FinalizeBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FinalizeBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FinalizeBackupRequest; - - /** - * Verifies a FinalizeBackupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FinalizeBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FinalizeBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FinalizeBackupRequest; - - /** - * Creates a plain object from a FinalizeBackupRequest message. Also converts values to other types if specified. - * @param message FinalizeBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.FinalizeBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FinalizeBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FinalizeBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchAccessTokenRequest. */ - interface IFetchAccessTokenRequest { - - /** FetchAccessTokenRequest name */ - name?: (string|null); - - /** FetchAccessTokenRequest generationId */ - generationId?: (number|null); - } - - /** Represents a FetchAccessTokenRequest. */ - class FetchAccessTokenRequest implements IFetchAccessTokenRequest { - - /** - * Constructs a new FetchAccessTokenRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IFetchAccessTokenRequest); - - /** FetchAccessTokenRequest name. */ - public name: string; - - /** FetchAccessTokenRequest generationId. */ - public generationId: number; - - /** - * Creates a new FetchAccessTokenRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchAccessTokenRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IFetchAccessTokenRequest): google.cloud.backupdr.v1.FetchAccessTokenRequest; - - /** - * Encodes the specified FetchAccessTokenRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. - * @param message FetchAccessTokenRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IFetchAccessTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchAccessTokenRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. - * @param message FetchAccessTokenRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchAccessTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchAccessTokenRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchAccessTokenRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchAccessTokenRequest; - - /** - * Decodes a FetchAccessTokenRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchAccessTokenRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchAccessTokenRequest; - - /** - * Verifies a FetchAccessTokenRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchAccessTokenRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchAccessTokenRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchAccessTokenRequest; - - /** - * Creates a plain object from a FetchAccessTokenRequest message. Also converts values to other types if specified. - * @param message FetchAccessTokenRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.FetchAccessTokenRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchAccessTokenRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchAccessTokenRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchAccessTokenResponse. */ - interface IFetchAccessTokenResponse { - - /** FetchAccessTokenResponse readLocation */ - readLocation?: (string|null); - - /** FetchAccessTokenResponse writeLocation */ - writeLocation?: (string|null); - - /** FetchAccessTokenResponse token */ - token?: (string|null); - - /** FetchAccessTokenResponse expireTime */ - expireTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a FetchAccessTokenResponse. */ - class FetchAccessTokenResponse implements IFetchAccessTokenResponse { - - /** - * Constructs a new FetchAccessTokenResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IFetchAccessTokenResponse); - - /** FetchAccessTokenResponse readLocation. */ - public readLocation: string; - - /** FetchAccessTokenResponse writeLocation. */ - public writeLocation: string; - - /** FetchAccessTokenResponse token. */ - public token: string; - - /** FetchAccessTokenResponse expireTime. */ - public expireTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new FetchAccessTokenResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchAccessTokenResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IFetchAccessTokenResponse): google.cloud.backupdr.v1.FetchAccessTokenResponse; - - /** - * Encodes the specified FetchAccessTokenResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. - * @param message FetchAccessTokenResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IFetchAccessTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchAccessTokenResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. - * @param message FetchAccessTokenResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchAccessTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchAccessTokenResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchAccessTokenResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchAccessTokenResponse; - - /** - * Decodes a FetchAccessTokenResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchAccessTokenResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchAccessTokenResponse; - - /** - * Verifies a FetchAccessTokenResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchAccessTokenResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchAccessTokenResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchAccessTokenResponse; - - /** - * Creates a plain object from a FetchAccessTokenResponse message. Also converts values to other types if specified. - * @param message FetchAccessTokenResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.FetchAccessTokenResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchAccessTokenResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchAccessTokenResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupsRequest. */ - interface IListBackupsRequest { - - /** ListBackupsRequest parent */ - parent?: (string|null); - - /** ListBackupsRequest pageSize */ - pageSize?: (number|null); - - /** ListBackupsRequest pageToken */ - pageToken?: (string|null); - - /** ListBackupsRequest filter */ - filter?: (string|null); - - /** ListBackupsRequest orderBy */ - orderBy?: (string|null); - - /** ListBackupsRequest view */ - view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); - } - - /** Represents a ListBackupsRequest. */ - class ListBackupsRequest implements IListBackupsRequest { - - /** - * Constructs a new ListBackupsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupsRequest); - - /** ListBackupsRequest parent. */ - public parent: string; - - /** ListBackupsRequest pageSize. */ - public pageSize: number; - - /** ListBackupsRequest pageToken. */ - public pageToken: string; - - /** ListBackupsRequest filter. */ - public filter: string; - - /** ListBackupsRequest orderBy. */ - public orderBy: string; - - /** ListBackupsRequest view. */ - public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); - - /** - * Creates a new ListBackupsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupsRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupsRequest): google.cloud.backupdr.v1.ListBackupsRequest; - - /** - * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. - * @param message ListBackupsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. - * @param message ListBackupsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupsRequest; - - /** - * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupsRequest; - - /** - * Verifies a ListBackupsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupsRequest; - - /** - * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. - * @param message ListBackupsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupsResponse. */ - interface IListBackupsResponse { - - /** ListBackupsResponse backups */ - backups?: (google.cloud.backupdr.v1.IBackup[]|null); - - /** ListBackupsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListBackupsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListBackupsResponse. */ - class ListBackupsResponse implements IListBackupsResponse { - - /** - * Constructs a new ListBackupsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupsResponse); - - /** ListBackupsResponse backups. */ - public backups: google.cloud.backupdr.v1.IBackup[]; - - /** ListBackupsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListBackupsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListBackupsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupsResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupsResponse): google.cloud.backupdr.v1.ListBackupsResponse; - - /** - * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. - * @param message ListBackupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. - * @param message ListBackupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupsResponse; - - /** - * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupsResponse; - - /** - * Verifies a ListBackupsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupsResponse; - - /** - * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. - * @param message ListBackupsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetBackupRequest. */ - interface IGetBackupRequest { - - /** GetBackupRequest name */ - name?: (string|null); - - /** GetBackupRequest view */ - view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); - } - - /** Represents a GetBackupRequest. */ - class GetBackupRequest implements IGetBackupRequest { - - /** - * Constructs a new GetBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetBackupRequest); - - /** GetBackupRequest name. */ - public name: string; - - /** GetBackupRequest view. */ - public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); - - /** - * Creates a new GetBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetBackupRequest): google.cloud.backupdr.v1.GetBackupRequest; - - /** - * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. - * @param message GetBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. - * @param message GetBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupRequest; - - /** - * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupRequest; - - /** - * Verifies a GetBackupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupRequest; - - /** - * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. - * @param message GetBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateBackupRequest. */ - interface IUpdateBackupRequest { - - /** UpdateBackupRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateBackupRequest backup */ - backup?: (google.cloud.backupdr.v1.IBackup|null); - - /** UpdateBackupRequest requestId */ - requestId?: (string|null); - } - - /** Represents an UpdateBackupRequest. */ - class UpdateBackupRequest implements IUpdateBackupRequest { - - /** - * Constructs a new UpdateBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IUpdateBackupRequest); - - /** UpdateBackupRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateBackupRequest backup. */ - public backup?: (google.cloud.backupdr.v1.IBackup|null); - - /** UpdateBackupRequest requestId. */ - public requestId: string; - - /** - * Creates a new UpdateBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IUpdateBackupRequest): google.cloud.backupdr.v1.UpdateBackupRequest; - - /** - * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. - * @param message UpdateBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. - * @param message UpdateBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateBackupRequest; - - /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateBackupRequest; - - /** - * Verifies an UpdateBackupRequest message. - * @param message Plain 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 UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateBackupRequest; - - /** - * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. - * @param message UpdateBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.UpdateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteBackupRequest. */ - interface IDeleteBackupRequest { - - /** DeleteBackupRequest name */ - name?: (string|null); - - /** DeleteBackupRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteBackupRequest. */ - class DeleteBackupRequest implements IDeleteBackupRequest { - - /** - * Constructs a new DeleteBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupRequest); - - /** DeleteBackupRequest name. */ - public name: string; - - /** DeleteBackupRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupRequest): google.cloud.backupdr.v1.DeleteBackupRequest; - - /** - * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. - * @param message DeleteBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. - * @param message DeleteBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupRequest; - - /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupRequest; - - /** - * Verifies a DeleteBackupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupRequest; - - /** - * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. - * @param message DeleteBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DeleteBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RestoreBackupRequest. */ - interface IRestoreBackupRequest { - - /** RestoreBackupRequest name */ - name?: (string|null); - - /** RestoreBackupRequest requestId */ - requestId?: (string|null); - - /** RestoreBackupRequest computeInstanceTargetEnvironment */ - computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null); - - /** RestoreBackupRequest computeInstanceRestoreProperties */ - computeInstanceRestoreProperties?: (google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null); - } - - /** Represents a RestoreBackupRequest. */ - class RestoreBackupRequest implements IRestoreBackupRequest { - - /** - * Constructs a new RestoreBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IRestoreBackupRequest); - - /** RestoreBackupRequest name. */ - public name: string; - - /** RestoreBackupRequest requestId. */ - public requestId: string; - - /** RestoreBackupRequest computeInstanceTargetEnvironment. */ - public computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null); - - /** RestoreBackupRequest computeInstanceRestoreProperties. */ - public computeInstanceRestoreProperties?: (google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null); - - /** RestoreBackupRequest targetEnvironment. */ - public targetEnvironment?: "computeInstanceTargetEnvironment"; - - /** RestoreBackupRequest instanceProperties. */ - public instanceProperties?: "computeInstanceRestoreProperties"; - - /** - * Creates a new RestoreBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RestoreBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IRestoreBackupRequest): google.cloud.backupdr.v1.RestoreBackupRequest; - - /** - * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. - * @param message RestoreBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. - * @param message RestoreBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RestoreBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RestoreBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RestoreBackupRequest; - - /** - * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RestoreBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RestoreBackupRequest; - - /** - * Verifies a RestoreBackupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RestoreBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RestoreBackupRequest; - - /** - * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. - * @param message RestoreBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.RestoreBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RestoreBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RestoreBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RestoreBackupResponse. */ - interface IRestoreBackupResponse { - - /** RestoreBackupResponse targetResource */ - targetResource?: (google.cloud.backupdr.v1.ITargetResource|null); - } - - /** Represents a RestoreBackupResponse. */ - class RestoreBackupResponse implements IRestoreBackupResponse { - - /** - * Constructs a new RestoreBackupResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IRestoreBackupResponse); - - /** RestoreBackupResponse targetResource. */ - public targetResource?: (google.cloud.backupdr.v1.ITargetResource|null); - - /** - * Creates a new RestoreBackupResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RestoreBackupResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IRestoreBackupResponse): google.cloud.backupdr.v1.RestoreBackupResponse; - - /** - * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. - * @param message RestoreBackupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. - * @param message RestoreBackupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RestoreBackupResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RestoreBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RestoreBackupResponse; - - /** - * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RestoreBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RestoreBackupResponse; - - /** - * Verifies a RestoreBackupResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RestoreBackupResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RestoreBackupResponse; - - /** - * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. - * @param message RestoreBackupResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.RestoreBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RestoreBackupResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RestoreBackupResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TargetResource. */ - interface ITargetResource { - - /** TargetResource gcpResource */ - gcpResource?: (google.cloud.backupdr.v1.IGcpResource|null); - } - - /** Represents a TargetResource. */ - class TargetResource implements ITargetResource { - - /** - * Constructs a new TargetResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ITargetResource); - - /** TargetResource gcpResource. */ - public gcpResource?: (google.cloud.backupdr.v1.IGcpResource|null); - - /** TargetResource targetResourceInfo. */ - public targetResourceInfo?: "gcpResource"; - - /** - * Creates a new TargetResource instance using the specified properties. - * @param [properties] Properties to set - * @returns TargetResource instance - */ - public static create(properties?: google.cloud.backupdr.v1.ITargetResource): google.cloud.backupdr.v1.TargetResource; - - /** - * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. - * @param message TargetResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. - * @param message TargetResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TargetResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TargetResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.TargetResource; - - /** - * Decodes a TargetResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TargetResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.TargetResource; - - /** - * Verifies a TargetResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TargetResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.TargetResource; - - /** - * Creates a plain object from a TargetResource message. Also converts values to other types if specified. - * @param message TargetResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.TargetResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TargetResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TargetResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GcpResource. */ - interface IGcpResource { - - /** GcpResource gcpResourcename */ - gcpResourcename?: (string|null); - - /** GcpResource location */ - location?: (string|null); - - /** GcpResource type */ - type?: (string|null); - } - - /** Represents a GcpResource. */ - class GcpResource implements IGcpResource { - - /** - * Constructs a new GcpResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGcpResource); - - /** GcpResource gcpResourcename. */ - public gcpResourcename: string; - - /** GcpResource location. */ - public location: string; - - /** GcpResource type. */ - public type: string; - - /** - * Creates a new GcpResource instance using the specified properties. - * @param [properties] Properties to set - * @returns GcpResource instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGcpResource): google.cloud.backupdr.v1.GcpResource; - - /** - * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. - * @param message GcpResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. - * @param message GcpResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcpResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GcpResource; - - /** - * Decodes a GcpResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GcpResource; - - /** - * Verifies a GcpResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcpResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GcpResource; - - /** - * Creates a plain object from a GcpResource message. Also converts values to other types if specified. - * @param message GcpResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcpResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcpResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** BackupConfigState enum. */ - enum BackupConfigState { - BACKUP_CONFIG_STATE_UNSPECIFIED = 0, - ACTIVE = 1, - PASSIVE = 2 - } - - /** BackupView enum. */ - enum BackupView { - BACKUP_VIEW_UNSPECIFIED = 0, - BACKUP_VIEW_BASIC = 1, - BACKUP_VIEW_FULL = 2 - } - - /** BackupVaultView enum. */ - enum BackupVaultView { - BACKUP_VAULT_VIEW_UNSPECIFIED = 0, - BACKUP_VAULT_VIEW_BASIC = 1, - BACKUP_VAULT_VIEW_FULL = 2 - } - - /** Properties of a BackupApplianceBackupProperties. */ - interface IBackupApplianceBackupProperties { - - /** BackupApplianceBackupProperties generationId */ - generationId?: (number|null); - - /** BackupApplianceBackupProperties finalizeTime */ - finalizeTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties recoveryRangeStartTime */ - recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties recoveryRangeEndTime */ - recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a BackupApplianceBackupProperties. */ - class BackupApplianceBackupProperties implements IBackupApplianceBackupProperties { - - /** - * Constructs a new BackupApplianceBackupProperties. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupProperties); - - /** BackupApplianceBackupProperties generationId. */ - public generationId?: (number|null); - - /** BackupApplianceBackupProperties finalizeTime. */ - public finalizeTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties recoveryRangeStartTime. */ - public recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties recoveryRangeEndTime. */ - public recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties _generationId. */ - public _generationId?: "generationId"; - - /** BackupApplianceBackupProperties _finalizeTime. */ - public _finalizeTime?: "finalizeTime"; - - /** BackupApplianceBackupProperties _recoveryRangeStartTime. */ - public _recoveryRangeStartTime?: "recoveryRangeStartTime"; - - /** BackupApplianceBackupProperties _recoveryRangeEndTime. */ - public _recoveryRangeEndTime?: "recoveryRangeEndTime"; - - /** - * Creates a new BackupApplianceBackupProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupApplianceBackupProperties instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupProperties): google.cloud.backupdr.v1.BackupApplianceBackupProperties; - - /** - * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. - * @param message BackupApplianceBackupProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. - * @param message BackupApplianceBackupProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupApplianceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceBackupProperties; - - /** - * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupApplianceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceBackupProperties; - - /** - * Verifies a BackupApplianceBackupProperties message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupApplianceBackupProperties - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceBackupProperties; - - /** - * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. - * @param message BackupApplianceBackupProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupApplianceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupApplianceBackupProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupApplianceBackupProperties - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ComputeInstanceBackupProperties. */ - interface IComputeInstanceBackupProperties { - - /** ComputeInstanceBackupProperties description */ - description?: (string|null); - - /** ComputeInstanceBackupProperties tags */ - tags?: (google.cloud.backupdr.v1.ITags|null); - - /** ComputeInstanceBackupProperties machineType */ - machineType?: (string|null); - - /** ComputeInstanceBackupProperties canIpForward */ - canIpForward?: (boolean|null); - - /** ComputeInstanceBackupProperties networkInterface */ - networkInterface?: (google.cloud.backupdr.v1.INetworkInterface[]|null); - - /** ComputeInstanceBackupProperties disk */ - disk?: (google.cloud.backupdr.v1.IAttachedDisk[]|null); - - /** ComputeInstanceBackupProperties metadata */ - metadata?: (google.cloud.backupdr.v1.IMetadata|null); - - /** ComputeInstanceBackupProperties serviceAccount */ - serviceAccount?: (google.cloud.backupdr.v1.IServiceAccount[]|null); - - /** ComputeInstanceBackupProperties scheduling */ - scheduling?: (google.cloud.backupdr.v1.IScheduling|null); - - /** ComputeInstanceBackupProperties guestAccelerator */ - guestAccelerator?: (google.cloud.backupdr.v1.IAcceleratorConfig[]|null); - - /** ComputeInstanceBackupProperties minCpuPlatform */ - minCpuPlatform?: (string|null); - - /** ComputeInstanceBackupProperties keyRevocationActionType */ - keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); - - /** ComputeInstanceBackupProperties sourceInstance */ - sourceInstance?: (string|null); - - /** ComputeInstanceBackupProperties labels */ - labels?: ({ [k: string]: string }|null); - } - - /** Represents a ComputeInstanceBackupProperties. */ - class ComputeInstanceBackupProperties implements IComputeInstanceBackupProperties { - - /** - * Constructs a new ComputeInstanceBackupProperties. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceBackupProperties); - - /** ComputeInstanceBackupProperties description. */ - public description?: (string|null); - - /** ComputeInstanceBackupProperties tags. */ - public tags?: (google.cloud.backupdr.v1.ITags|null); - - /** ComputeInstanceBackupProperties machineType. */ - public machineType?: (string|null); - - /** ComputeInstanceBackupProperties canIpForward. */ - public canIpForward?: (boolean|null); - - /** ComputeInstanceBackupProperties networkInterface. */ - public networkInterface: google.cloud.backupdr.v1.INetworkInterface[]; - - /** ComputeInstanceBackupProperties disk. */ - public disk: google.cloud.backupdr.v1.IAttachedDisk[]; - - /** ComputeInstanceBackupProperties metadata. */ - public metadata?: (google.cloud.backupdr.v1.IMetadata|null); - - /** ComputeInstanceBackupProperties serviceAccount. */ - public serviceAccount: google.cloud.backupdr.v1.IServiceAccount[]; - - /** ComputeInstanceBackupProperties scheduling. */ - public scheduling?: (google.cloud.backupdr.v1.IScheduling|null); - - /** ComputeInstanceBackupProperties guestAccelerator. */ - public guestAccelerator: google.cloud.backupdr.v1.IAcceleratorConfig[]; - - /** ComputeInstanceBackupProperties minCpuPlatform. */ - public minCpuPlatform?: (string|null); - - /** ComputeInstanceBackupProperties keyRevocationActionType. */ - public keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); - - /** ComputeInstanceBackupProperties sourceInstance. */ - public sourceInstance?: (string|null); - - /** ComputeInstanceBackupProperties labels. */ - public labels: { [k: string]: string }; - - /** ComputeInstanceBackupProperties _description. */ - public _description?: "description"; - - /** ComputeInstanceBackupProperties _tags. */ - public _tags?: "tags"; - - /** ComputeInstanceBackupProperties _machineType. */ - public _machineType?: "machineType"; - - /** ComputeInstanceBackupProperties _canIpForward. */ - public _canIpForward?: "canIpForward"; - - /** ComputeInstanceBackupProperties _metadata. */ - public _metadata?: "metadata"; - - /** ComputeInstanceBackupProperties _scheduling. */ - public _scheduling?: "scheduling"; - - /** ComputeInstanceBackupProperties _minCpuPlatform. */ - public _minCpuPlatform?: "minCpuPlatform"; - - /** ComputeInstanceBackupProperties _keyRevocationActionType. */ - public _keyRevocationActionType?: "keyRevocationActionType"; - - /** ComputeInstanceBackupProperties _sourceInstance. */ - public _sourceInstance?: "sourceInstance"; - - /** - * Creates a new ComputeInstanceBackupProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns ComputeInstanceBackupProperties instance - */ - public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceBackupProperties): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; - - /** - * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. - * @param message ComputeInstanceBackupProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. - * @param message ComputeInstanceBackupProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComputeInstanceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; - - /** - * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComputeInstanceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; - - /** - * Verifies a ComputeInstanceBackupProperties message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComputeInstanceBackupProperties - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; - - /** - * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. - * @param message ComputeInstanceBackupProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComputeInstanceBackupProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComputeInstanceBackupProperties - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ComputeInstanceRestoreProperties. */ - interface IComputeInstanceRestoreProperties { - - /** ComputeInstanceRestoreProperties name */ - name?: (string|null); - - /** ComputeInstanceRestoreProperties advancedMachineFeatures */ - advancedMachineFeatures?: (google.cloud.backupdr.v1.IAdvancedMachineFeatures|null); - - /** ComputeInstanceRestoreProperties canIpForward */ - canIpForward?: (boolean|null); - - /** ComputeInstanceRestoreProperties confidentialInstanceConfig */ - confidentialInstanceConfig?: (google.cloud.backupdr.v1.IConfidentialInstanceConfig|null); - - /** ComputeInstanceRestoreProperties deletionProtection */ - deletionProtection?: (boolean|null); - - /** ComputeInstanceRestoreProperties description */ - description?: (string|null); - - /** ComputeInstanceRestoreProperties disks */ - disks?: (google.cloud.backupdr.v1.IAttachedDisk[]|null); - - /** ComputeInstanceRestoreProperties displayDevice */ - displayDevice?: (google.cloud.backupdr.v1.IDisplayDevice|null); - - /** ComputeInstanceRestoreProperties guestAccelerators */ - guestAccelerators?: (google.cloud.backupdr.v1.IAcceleratorConfig[]|null); - - /** ComputeInstanceRestoreProperties hostname */ - hostname?: (string|null); - - /** ComputeInstanceRestoreProperties instanceEncryptionKey */ - instanceEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); - - /** ComputeInstanceRestoreProperties keyRevocationActionType */ - keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); - - /** ComputeInstanceRestoreProperties labels */ - labels?: ({ [k: string]: string }|null); - - /** ComputeInstanceRestoreProperties machineType */ - machineType?: (string|null); - - /** ComputeInstanceRestoreProperties metadata */ - metadata?: (google.cloud.backupdr.v1.IMetadata|null); - - /** ComputeInstanceRestoreProperties minCpuPlatform */ - minCpuPlatform?: (string|null); - - /** ComputeInstanceRestoreProperties networkInterfaces */ - networkInterfaces?: (google.cloud.backupdr.v1.INetworkInterface[]|null); - - /** ComputeInstanceRestoreProperties networkPerformanceConfig */ - networkPerformanceConfig?: (google.cloud.backupdr.v1.INetworkPerformanceConfig|null); - - /** ComputeInstanceRestoreProperties params */ - params?: (google.cloud.backupdr.v1.IInstanceParams|null); - - /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess */ - privateIpv6GoogleAccess?: (google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); - - /** ComputeInstanceRestoreProperties allocationAffinity */ - allocationAffinity?: (google.cloud.backupdr.v1.IAllocationAffinity|null); - - /** ComputeInstanceRestoreProperties resourcePolicies */ - resourcePolicies?: (string[]|null); - - /** ComputeInstanceRestoreProperties scheduling */ - scheduling?: (google.cloud.backupdr.v1.IScheduling|null); - - /** ComputeInstanceRestoreProperties serviceAccounts */ - serviceAccounts?: (google.cloud.backupdr.v1.IServiceAccount[]|null); - - /** ComputeInstanceRestoreProperties tags */ - tags?: (google.cloud.backupdr.v1.ITags|null); - } - - /** Represents a ComputeInstanceRestoreProperties. */ - class ComputeInstanceRestoreProperties implements IComputeInstanceRestoreProperties { - - /** - * Constructs a new ComputeInstanceRestoreProperties. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties); - - /** ComputeInstanceRestoreProperties name. */ - public name?: (string|null); - - /** ComputeInstanceRestoreProperties advancedMachineFeatures. */ - public advancedMachineFeatures?: (google.cloud.backupdr.v1.IAdvancedMachineFeatures|null); - - /** ComputeInstanceRestoreProperties canIpForward. */ - public canIpForward?: (boolean|null); - - /** ComputeInstanceRestoreProperties confidentialInstanceConfig. */ - public confidentialInstanceConfig?: (google.cloud.backupdr.v1.IConfidentialInstanceConfig|null); - - /** ComputeInstanceRestoreProperties deletionProtection. */ - public deletionProtection?: (boolean|null); - - /** ComputeInstanceRestoreProperties description. */ - public description?: (string|null); - - /** ComputeInstanceRestoreProperties disks. */ - public disks: google.cloud.backupdr.v1.IAttachedDisk[]; - - /** ComputeInstanceRestoreProperties displayDevice. */ - public displayDevice?: (google.cloud.backupdr.v1.IDisplayDevice|null); - - /** ComputeInstanceRestoreProperties guestAccelerators. */ - public guestAccelerators: google.cloud.backupdr.v1.IAcceleratorConfig[]; - - /** ComputeInstanceRestoreProperties hostname. */ - public hostname?: (string|null); - - /** ComputeInstanceRestoreProperties instanceEncryptionKey. */ - public instanceEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); - - /** ComputeInstanceRestoreProperties keyRevocationActionType. */ - public keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); - - /** ComputeInstanceRestoreProperties labels. */ - public labels: { [k: string]: string }; - - /** ComputeInstanceRestoreProperties machineType. */ - public machineType?: (string|null); - - /** ComputeInstanceRestoreProperties metadata. */ - public metadata?: (google.cloud.backupdr.v1.IMetadata|null); - - /** ComputeInstanceRestoreProperties minCpuPlatform. */ - public minCpuPlatform?: (string|null); - - /** ComputeInstanceRestoreProperties networkInterfaces. */ - public networkInterfaces: google.cloud.backupdr.v1.INetworkInterface[]; - - /** ComputeInstanceRestoreProperties networkPerformanceConfig. */ - public networkPerformanceConfig?: (google.cloud.backupdr.v1.INetworkPerformanceConfig|null); - - /** ComputeInstanceRestoreProperties params. */ - public params?: (google.cloud.backupdr.v1.IInstanceParams|null); - - /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess. */ - public privateIpv6GoogleAccess?: (google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); - - /** ComputeInstanceRestoreProperties allocationAffinity. */ - public allocationAffinity?: (google.cloud.backupdr.v1.IAllocationAffinity|null); - - /** ComputeInstanceRestoreProperties resourcePolicies. */ - public resourcePolicies: string[]; - - /** ComputeInstanceRestoreProperties scheduling. */ - public scheduling?: (google.cloud.backupdr.v1.IScheduling|null); - - /** ComputeInstanceRestoreProperties serviceAccounts. */ - public serviceAccounts: google.cloud.backupdr.v1.IServiceAccount[]; - - /** ComputeInstanceRestoreProperties tags. */ - public tags?: (google.cloud.backupdr.v1.ITags|null); - - /** ComputeInstanceRestoreProperties _name. */ - public _name?: "name"; - - /** ComputeInstanceRestoreProperties _advancedMachineFeatures. */ - public _advancedMachineFeatures?: "advancedMachineFeatures"; - - /** ComputeInstanceRestoreProperties _canIpForward. */ - public _canIpForward?: "canIpForward"; - - /** ComputeInstanceRestoreProperties _confidentialInstanceConfig. */ - public _confidentialInstanceConfig?: "confidentialInstanceConfig"; - - /** ComputeInstanceRestoreProperties _deletionProtection. */ - public _deletionProtection?: "deletionProtection"; - - /** ComputeInstanceRestoreProperties _description. */ - public _description?: "description"; - - /** ComputeInstanceRestoreProperties _displayDevice. */ - public _displayDevice?: "displayDevice"; - - /** ComputeInstanceRestoreProperties _hostname. */ - public _hostname?: "hostname"; - - /** ComputeInstanceRestoreProperties _instanceEncryptionKey. */ - public _instanceEncryptionKey?: "instanceEncryptionKey"; - - /** ComputeInstanceRestoreProperties _keyRevocationActionType. */ - public _keyRevocationActionType?: "keyRevocationActionType"; - - /** ComputeInstanceRestoreProperties _machineType. */ - public _machineType?: "machineType"; - - /** ComputeInstanceRestoreProperties _metadata. */ - public _metadata?: "metadata"; - - /** ComputeInstanceRestoreProperties _minCpuPlatform. */ - public _minCpuPlatform?: "minCpuPlatform"; - - /** ComputeInstanceRestoreProperties _networkPerformanceConfig. */ - public _networkPerformanceConfig?: "networkPerformanceConfig"; - - /** ComputeInstanceRestoreProperties _params. */ - public _params?: "params"; - - /** ComputeInstanceRestoreProperties _privateIpv6GoogleAccess. */ - public _privateIpv6GoogleAccess?: "privateIpv6GoogleAccess"; - - /** ComputeInstanceRestoreProperties _allocationAffinity. */ - public _allocationAffinity?: "allocationAffinity"; - - /** ComputeInstanceRestoreProperties _scheduling. */ - public _scheduling?: "scheduling"; - - /** ComputeInstanceRestoreProperties _tags. */ - public _tags?: "tags"; - - /** - * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns ComputeInstanceRestoreProperties instance - */ - public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; - - /** - * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. - * @param message ComputeInstanceRestoreProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. - * @param message ComputeInstanceRestoreProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComputeInstanceRestoreProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; - - /** - * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComputeInstanceRestoreProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; - - /** - * Verifies a ComputeInstanceRestoreProperties message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComputeInstanceRestoreProperties - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; - - /** - * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. - * @param message ComputeInstanceRestoreProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceRestoreProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComputeInstanceRestoreProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComputeInstanceRestoreProperties - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ComputeInstanceRestoreProperties { - - /** InstancePrivateIpv6GoogleAccess enum. */ - enum InstancePrivateIpv6GoogleAccess { - INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0, - INHERIT_FROM_SUBNETWORK = 1, - ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2, - ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3 - } - } - - /** Properties of a ComputeInstanceTargetEnvironment. */ - interface IComputeInstanceTargetEnvironment { - - /** ComputeInstanceTargetEnvironment project */ - project?: (string|null); - - /** ComputeInstanceTargetEnvironment zone */ - zone?: (string|null); - } - - /** Represents a ComputeInstanceTargetEnvironment. */ - class ComputeInstanceTargetEnvironment implements IComputeInstanceTargetEnvironment { - - /** - * Constructs a new ComputeInstanceTargetEnvironment. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment); - - /** ComputeInstanceTargetEnvironment project. */ - public project: string; - - /** ComputeInstanceTargetEnvironment zone. */ - public zone: string; - - /** - * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. - * @param [properties] Properties to set - * @returns ComputeInstanceTargetEnvironment instance - */ - public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; - - /** - * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. - * @param message ComputeInstanceTargetEnvironment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. - * @param message ComputeInstanceTargetEnvironment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComputeInstanceTargetEnvironment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; - - /** - * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComputeInstanceTargetEnvironment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; - - /** - * Verifies a ComputeInstanceTargetEnvironment message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComputeInstanceTargetEnvironment - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; - - /** - * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. - * @param message ComputeInstanceTargetEnvironment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComputeInstanceTargetEnvironment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComputeInstanceTargetEnvironment - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ComputeInstanceDataSourceProperties. */ - interface IComputeInstanceDataSourceProperties { - - /** ComputeInstanceDataSourceProperties name */ - name?: (string|null); - - /** ComputeInstanceDataSourceProperties description */ - description?: (string|null); - - /** ComputeInstanceDataSourceProperties machineType */ - machineType?: (string|null); - - /** ComputeInstanceDataSourceProperties totalDiskCount */ - totalDiskCount?: (number|Long|string|null); - - /** ComputeInstanceDataSourceProperties totalDiskSizeGb */ - totalDiskSizeGb?: (number|Long|string|null); - } - - /** Represents a ComputeInstanceDataSourceProperties. */ - class ComputeInstanceDataSourceProperties implements IComputeInstanceDataSourceProperties { - - /** - * Constructs a new ComputeInstanceDataSourceProperties. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties); - - /** ComputeInstanceDataSourceProperties name. */ - public name: string; - - /** ComputeInstanceDataSourceProperties description. */ - public description: string; - - /** ComputeInstanceDataSourceProperties machineType. */ - public machineType: string; - - /** ComputeInstanceDataSourceProperties totalDiskCount. */ - public totalDiskCount: (number|Long|string); - - /** ComputeInstanceDataSourceProperties totalDiskSizeGb. */ - public totalDiskSizeGb: (number|Long|string); - - /** - * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns ComputeInstanceDataSourceProperties instance - */ - public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; - - /** - * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. - * @param message ComputeInstanceDataSourceProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. - * @param message ComputeInstanceDataSourceProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComputeInstanceDataSourceProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; - - /** - * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComputeInstanceDataSourceProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; - - /** - * Verifies a ComputeInstanceDataSourceProperties message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComputeInstanceDataSourceProperties - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; - - /** - * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. - * @param message ComputeInstanceDataSourceProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComputeInstanceDataSourceProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComputeInstanceDataSourceProperties - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AdvancedMachineFeatures. */ - interface IAdvancedMachineFeatures { - - /** AdvancedMachineFeatures enableNestedVirtualization */ - enableNestedVirtualization?: (boolean|null); - - /** AdvancedMachineFeatures threadsPerCore */ - threadsPerCore?: (number|null); - - /** AdvancedMachineFeatures visibleCoreCount */ - visibleCoreCount?: (number|null); - - /** AdvancedMachineFeatures enableUefiNetworking */ - enableUefiNetworking?: (boolean|null); - } - - /** Represents an AdvancedMachineFeatures. */ - class AdvancedMachineFeatures implements IAdvancedMachineFeatures { - - /** - * Constructs a new AdvancedMachineFeatures. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAdvancedMachineFeatures); - - /** AdvancedMachineFeatures enableNestedVirtualization. */ - public enableNestedVirtualization?: (boolean|null); - - /** AdvancedMachineFeatures threadsPerCore. */ - public threadsPerCore?: (number|null); - - /** AdvancedMachineFeatures visibleCoreCount. */ - public visibleCoreCount?: (number|null); - - /** AdvancedMachineFeatures enableUefiNetworking. */ - public enableUefiNetworking?: (boolean|null); - - /** AdvancedMachineFeatures _enableNestedVirtualization. */ - public _enableNestedVirtualization?: "enableNestedVirtualization"; - - /** AdvancedMachineFeatures _threadsPerCore. */ - public _threadsPerCore?: "threadsPerCore"; - - /** AdvancedMachineFeatures _visibleCoreCount. */ - public _visibleCoreCount?: "visibleCoreCount"; - - /** AdvancedMachineFeatures _enableUefiNetworking. */ - public _enableUefiNetworking?: "enableUefiNetworking"; - - /** - * Creates a new AdvancedMachineFeatures instance using the specified properties. - * @param [properties] Properties to set - * @returns AdvancedMachineFeatures instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAdvancedMachineFeatures): google.cloud.backupdr.v1.AdvancedMachineFeatures; - - /** - * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. - * @param message AdvancedMachineFeatures message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. - * @param message AdvancedMachineFeatures message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AdvancedMachineFeatures; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AdvancedMachineFeatures; - - /** - * Verifies an AdvancedMachineFeatures message. - * @param message Plain 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 AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AdvancedMachineFeatures - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AdvancedMachineFeatures; - - /** - * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. - * @param message AdvancedMachineFeatures - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AdvancedMachineFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AdvancedMachineFeatures to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AdvancedMachineFeatures - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ConfidentialInstanceConfig. */ - interface IConfidentialInstanceConfig { - - /** ConfidentialInstanceConfig enableConfidentialCompute */ - enableConfidentialCompute?: (boolean|null); - } - - /** Represents a ConfidentialInstanceConfig. */ - class ConfidentialInstanceConfig implements IConfidentialInstanceConfig { - - /** - * Constructs a new ConfidentialInstanceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IConfidentialInstanceConfig); - - /** ConfidentialInstanceConfig enableConfidentialCompute. */ - public enableConfidentialCompute?: (boolean|null); - - /** ConfidentialInstanceConfig _enableConfidentialCompute. */ - public _enableConfidentialCompute?: "enableConfidentialCompute"; - - /** - * Creates a new ConfidentialInstanceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfidentialInstanceConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.IConfidentialInstanceConfig): google.cloud.backupdr.v1.ConfidentialInstanceConfig; - - /** - * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. - * @param message ConfidentialInstanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. - * @param message ConfidentialInstanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfidentialInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ConfidentialInstanceConfig; - - /** - * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfidentialInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ConfidentialInstanceConfig; - - /** - * Verifies a ConfidentialInstanceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfidentialInstanceConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ConfidentialInstanceConfig; - - /** - * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. - * @param message ConfidentialInstanceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ConfidentialInstanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConfidentialInstanceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConfidentialInstanceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DisplayDevice. */ - interface IDisplayDevice { - - /** DisplayDevice enableDisplay */ - enableDisplay?: (boolean|null); - } - - /** Represents a DisplayDevice. */ - class DisplayDevice implements IDisplayDevice { - - /** - * Constructs a new DisplayDevice. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDisplayDevice); - - /** DisplayDevice enableDisplay. */ - public enableDisplay?: (boolean|null); - - /** DisplayDevice _enableDisplay. */ - public _enableDisplay?: "enableDisplay"; - - /** - * Creates a new DisplayDevice instance using the specified properties. - * @param [properties] Properties to set - * @returns DisplayDevice instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDisplayDevice): google.cloud.backupdr.v1.DisplayDevice; - - /** - * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. - * @param message DisplayDevice message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. - * @param message DisplayDevice message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DisplayDevice message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DisplayDevice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DisplayDevice; - - /** - * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DisplayDevice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DisplayDevice; - - /** - * Verifies a DisplayDevice message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DisplayDevice - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DisplayDevice; - - /** - * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. - * @param message DisplayDevice - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DisplayDevice, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DisplayDevice to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DisplayDevice - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AcceleratorConfig. */ - interface IAcceleratorConfig { - - /** AcceleratorConfig acceleratorType */ - acceleratorType?: (string|null); - - /** AcceleratorConfig acceleratorCount */ - acceleratorCount?: (number|null); - } - - /** Represents an AcceleratorConfig. */ - class AcceleratorConfig implements IAcceleratorConfig { - - /** - * Constructs a new AcceleratorConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAcceleratorConfig); - - /** AcceleratorConfig acceleratorType. */ - public acceleratorType?: (string|null); - - /** AcceleratorConfig acceleratorCount. */ - public acceleratorCount?: (number|null); - - /** AcceleratorConfig _acceleratorType. */ - public _acceleratorType?: "acceleratorType"; - - /** AcceleratorConfig _acceleratorCount. */ - public _acceleratorCount?: "acceleratorCount"; - - /** - * Creates a new AcceleratorConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AcceleratorConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAcceleratorConfig): google.cloud.backupdr.v1.AcceleratorConfig; - - /** - * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. - * @param message AcceleratorConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. - * @param message AcceleratorConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AcceleratorConfig; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AcceleratorConfig; - - /** - * Verifies an AcceleratorConfig message. - * @param message Plain 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 AcceleratorConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AcceleratorConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AcceleratorConfig; - - /** - * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. - * @param message AcceleratorConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AcceleratorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AcceleratorConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AcceleratorConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CustomerEncryptionKey. */ - interface ICustomerEncryptionKey { - - /** CustomerEncryptionKey rawKey */ - rawKey?: (string|null); - - /** CustomerEncryptionKey rsaEncryptedKey */ - rsaEncryptedKey?: (string|null); - - /** CustomerEncryptionKey kmsKeyName */ - kmsKeyName?: (string|null); - - /** CustomerEncryptionKey kmsKeyServiceAccount */ - kmsKeyServiceAccount?: (string|null); - } - - /** Represents a CustomerEncryptionKey. */ - class CustomerEncryptionKey implements ICustomerEncryptionKey { - - /** - * Constructs a new CustomerEncryptionKey. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ICustomerEncryptionKey); - - /** CustomerEncryptionKey rawKey. */ - public rawKey?: (string|null); - - /** CustomerEncryptionKey rsaEncryptedKey. */ - public rsaEncryptedKey?: (string|null); - - /** CustomerEncryptionKey kmsKeyName. */ - public kmsKeyName?: (string|null); - - /** CustomerEncryptionKey kmsKeyServiceAccount. */ - public kmsKeyServiceAccount?: (string|null); - - /** CustomerEncryptionKey key. */ - public key?: ("rawKey"|"rsaEncryptedKey"|"kmsKeyName"); - - /** CustomerEncryptionKey _kmsKeyServiceAccount. */ - public _kmsKeyServiceAccount?: "kmsKeyServiceAccount"; - - /** - * Creates a new CustomerEncryptionKey instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomerEncryptionKey instance - */ - public static create(properties?: google.cloud.backupdr.v1.ICustomerEncryptionKey): google.cloud.backupdr.v1.CustomerEncryptionKey; - - /** - * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. - * @param message CustomerEncryptionKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. - * @param message CustomerEncryptionKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomerEncryptionKey message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomerEncryptionKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CustomerEncryptionKey; - - /** - * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomerEncryptionKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CustomerEncryptionKey; - - /** - * Verifies a CustomerEncryptionKey message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomerEncryptionKey - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CustomerEncryptionKey; - - /** - * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. - * @param message CustomerEncryptionKey - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.CustomerEncryptionKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomerEncryptionKey to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomerEncryptionKey - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Entry. */ - interface IEntry { - - /** Entry key */ - key?: (string|null); - - /** Entry value */ - value?: (string|null); - } - - /** Represents an Entry. */ - class Entry implements IEntry { - - /** - * Constructs a new Entry. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IEntry); - - /** Entry key. */ - public key?: (string|null); - - /** Entry value. */ - public value?: (string|null); - - /** Entry _key. */ - public _key?: "key"; - - /** Entry _value. */ - public _value?: "value"; - - /** - * Creates a new Entry instance using the specified properties. - * @param [properties] Properties to set - * @returns Entry instance - */ - public static create(properties?: google.cloud.backupdr.v1.IEntry): google.cloud.backupdr.v1.Entry; - - /** - * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. - * @param message Entry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. - * @param message Entry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Entry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Entry; - - /** - * Decodes an Entry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Entry; - - /** - * Verifies an Entry message. - * @param message Plain 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 Entry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Entry - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Entry; - - /** - * Creates a plain object from an Entry message. Also converts values to other types if specified. - * @param message Entry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Entry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Entry - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Metadata. */ - interface IMetadata { - - /** Metadata items */ - items?: (google.cloud.backupdr.v1.IEntry[]|null); - } - - /** Represents a Metadata. */ - class Metadata implements IMetadata { - - /** - * Constructs a new Metadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IMetadata); - - /** Metadata items. */ - public items: google.cloud.backupdr.v1.IEntry[]; - - /** - * Creates a new Metadata instance using the specified properties. - * @param [properties] Properties to set - * @returns Metadata instance - */ - public static create(properties?: google.cloud.backupdr.v1.IMetadata): google.cloud.backupdr.v1.Metadata; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Metadata; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Metadata; - - /** - * Verifies a Metadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Metadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Metadata; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @param message Metadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Metadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NetworkInterface. */ - interface INetworkInterface { - - /** NetworkInterface network */ - network?: (string|null); - - /** NetworkInterface subnetwork */ - subnetwork?: (string|null); - - /** NetworkInterface ipAddress */ - ipAddress?: (string|null); - - /** NetworkInterface ipv6Address */ - ipv6Address?: (string|null); - - /** NetworkInterface internalIpv6PrefixLength */ - internalIpv6PrefixLength?: (number|null); - - /** NetworkInterface name */ - name?: (string|null); - - /** NetworkInterface accessConfigs */ - accessConfigs?: (google.cloud.backupdr.v1.IAccessConfig[]|null); - - /** NetworkInterface ipv6AccessConfigs */ - ipv6AccessConfigs?: (google.cloud.backupdr.v1.IAccessConfig[]|null); - - /** NetworkInterface aliasIpRanges */ - aliasIpRanges?: (google.cloud.backupdr.v1.IAliasIpRange[]|null); - - /** NetworkInterface stackType */ - stackType?: (google.cloud.backupdr.v1.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.StackType|null); - - /** NetworkInterface ipv6AccessType */ - ipv6AccessType?: (google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null); - - /** NetworkInterface queueCount */ - queueCount?: (number|null); - - /** NetworkInterface nicType */ - nicType?: (google.cloud.backupdr.v1.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.NicType|null); - - /** NetworkInterface networkAttachment */ - networkAttachment?: (string|null); - } - - /** Represents a NetworkInterface. */ - class NetworkInterface implements INetworkInterface { - - /** - * Constructs a new NetworkInterface. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.INetworkInterface); - - /** NetworkInterface network. */ - public network?: (string|null); - - /** NetworkInterface subnetwork. */ - public subnetwork?: (string|null); - - /** NetworkInterface ipAddress. */ - public ipAddress?: (string|null); - - /** NetworkInterface ipv6Address. */ - public ipv6Address?: (string|null); - - /** NetworkInterface internalIpv6PrefixLength. */ - public internalIpv6PrefixLength?: (number|null); - - /** NetworkInterface name. */ - public name?: (string|null); - - /** NetworkInterface accessConfigs. */ - public accessConfigs: google.cloud.backupdr.v1.IAccessConfig[]; - - /** NetworkInterface ipv6AccessConfigs. */ - public ipv6AccessConfigs: google.cloud.backupdr.v1.IAccessConfig[]; - - /** NetworkInterface aliasIpRanges. */ - public aliasIpRanges: google.cloud.backupdr.v1.IAliasIpRange[]; - - /** NetworkInterface stackType. */ - public stackType?: (google.cloud.backupdr.v1.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.StackType|null); - - /** NetworkInterface ipv6AccessType. */ - public ipv6AccessType?: (google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null); - - /** NetworkInterface queueCount. */ - public queueCount?: (number|null); - - /** NetworkInterface nicType. */ - public nicType?: (google.cloud.backupdr.v1.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.NicType|null); - - /** NetworkInterface networkAttachment. */ - public networkAttachment?: (string|null); - - /** NetworkInterface _network. */ - public _network?: "network"; - - /** NetworkInterface _subnetwork. */ - public _subnetwork?: "subnetwork"; - - /** NetworkInterface _ipAddress. */ - public _ipAddress?: "ipAddress"; - - /** NetworkInterface _ipv6Address. */ - public _ipv6Address?: "ipv6Address"; - - /** NetworkInterface _internalIpv6PrefixLength. */ - public _internalIpv6PrefixLength?: "internalIpv6PrefixLength"; - - /** NetworkInterface _name. */ - public _name?: "name"; - - /** NetworkInterface _stackType. */ - public _stackType?: "stackType"; - - /** NetworkInterface _ipv6AccessType. */ - public _ipv6AccessType?: "ipv6AccessType"; - - /** NetworkInterface _queueCount. */ - public _queueCount?: "queueCount"; - - /** NetworkInterface _nicType. */ - public _nicType?: "nicType"; - - /** NetworkInterface _networkAttachment. */ - public _networkAttachment?: "networkAttachment"; - - /** - * Creates a new NetworkInterface instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkInterface instance - */ - public static create(properties?: google.cloud.backupdr.v1.INetworkInterface): google.cloud.backupdr.v1.NetworkInterface; - - /** - * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. - * @param message NetworkInterface message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. - * @param message NetworkInterface message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkInterface message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkInterface - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkInterface; - - /** - * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkInterface - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkInterface; - - /** - * Verifies a NetworkInterface message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkInterface - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkInterface; - - /** - * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. - * @param message NetworkInterface - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.NetworkInterface, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkInterface to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkInterface - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NetworkInterface { - - /** StackType enum. */ - enum StackType { - STACK_TYPE_UNSPECIFIED = 0, - IPV4_ONLY = 1, - IPV4_IPV6 = 2 - } - - /** Ipv6AccessType enum. */ - enum Ipv6AccessType { - UNSPECIFIED_IPV6_ACCESS_TYPE = 0, - INTERNAL = 1, - EXTERNAL = 2 - } - - /** NicType enum. */ - enum NicType { - NIC_TYPE_UNSPECIFIED = 0, - VIRTIO_NET = 1, - GVNIC = 2 - } - } - - /** Properties of a NetworkPerformanceConfig. */ - interface INetworkPerformanceConfig { - - /** NetworkPerformanceConfig totalEgressBandwidthTier */ - totalEgressBandwidthTier?: (google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null); - } - - /** Represents a NetworkPerformanceConfig. */ - class NetworkPerformanceConfig implements INetworkPerformanceConfig { - - /** - * Constructs a new NetworkPerformanceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.INetworkPerformanceConfig); - - /** NetworkPerformanceConfig totalEgressBandwidthTier. */ - public totalEgressBandwidthTier?: (google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null); - - /** NetworkPerformanceConfig _totalEgressBandwidthTier. */ - public _totalEgressBandwidthTier?: "totalEgressBandwidthTier"; - - /** - * Creates a new NetworkPerformanceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkPerformanceConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.INetworkPerformanceConfig): google.cloud.backupdr.v1.NetworkPerformanceConfig; - - /** - * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. - * @param message NetworkPerformanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. - * @param message NetworkPerformanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkPerformanceConfig; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkPerformanceConfig; - - /** - * Verifies a NetworkPerformanceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkPerformanceConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkPerformanceConfig; - - /** - * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. - * @param message NetworkPerformanceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.NetworkPerformanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkPerformanceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkPerformanceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NetworkPerformanceConfig { - - /** Tier enum. */ - enum Tier { - TIER_UNSPECIFIED = 0, - DEFAULT = 1, - TIER_1 = 2 - } - } - - /** Properties of an AccessConfig. */ - interface IAccessConfig { - - /** AccessConfig type */ - type?: (google.cloud.backupdr.v1.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1.AccessConfig.AccessType|null); - - /** AccessConfig name */ - name?: (string|null); - - /** AccessConfig externalIp */ - externalIp?: (string|null); - - /** AccessConfig externalIpv6 */ - externalIpv6?: (string|null); - - /** AccessConfig externalIpv6PrefixLength */ - externalIpv6PrefixLength?: (number|null); - - /** AccessConfig setPublicPtr */ - setPublicPtr?: (boolean|null); - - /** AccessConfig publicPtrDomainName */ - publicPtrDomainName?: (string|null); - - /** AccessConfig networkTier */ - networkTier?: (google.cloud.backupdr.v1.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1.AccessConfig.NetworkTier|null); - } - - /** Represents an AccessConfig. */ - class AccessConfig implements IAccessConfig { - - /** - * Constructs a new AccessConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAccessConfig); - - /** AccessConfig type. */ - public type?: (google.cloud.backupdr.v1.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1.AccessConfig.AccessType|null); - - /** AccessConfig name. */ - public name?: (string|null); - - /** AccessConfig externalIp. */ - public externalIp?: (string|null); - - /** AccessConfig externalIpv6. */ - public externalIpv6?: (string|null); - - /** AccessConfig externalIpv6PrefixLength. */ - public externalIpv6PrefixLength?: (number|null); - - /** AccessConfig setPublicPtr. */ - public setPublicPtr?: (boolean|null); - - /** AccessConfig publicPtrDomainName. */ - public publicPtrDomainName?: (string|null); - - /** AccessConfig networkTier. */ - public networkTier?: (google.cloud.backupdr.v1.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1.AccessConfig.NetworkTier|null); - - /** AccessConfig _type. */ - public _type?: "type"; - - /** AccessConfig _name. */ - public _name?: "name"; - - /** AccessConfig _externalIp. */ - public _externalIp?: "externalIp"; - - /** AccessConfig _externalIpv6. */ - public _externalIpv6?: "externalIpv6"; - - /** AccessConfig _externalIpv6PrefixLength. */ - public _externalIpv6PrefixLength?: "externalIpv6PrefixLength"; - - /** AccessConfig _setPublicPtr. */ - public _setPublicPtr?: "setPublicPtr"; - - /** AccessConfig _publicPtrDomainName. */ - public _publicPtrDomainName?: "publicPtrDomainName"; - - /** AccessConfig _networkTier. */ - public _networkTier?: "networkTier"; - - /** - * Creates a new AccessConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AccessConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAccessConfig): google.cloud.backupdr.v1.AccessConfig; - - /** - * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. - * @param message AccessConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. - * @param message AccessConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AccessConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AccessConfig; - - /** - * Decodes an AccessConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AccessConfig; - - /** - * Verifies an AccessConfig message. - * @param message Plain 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 AccessConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AccessConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AccessConfig; - - /** - * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. - * @param message AccessConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AccessConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AccessConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AccessConfig { - - /** AccessType enum. */ - enum AccessType { - ACCESS_TYPE_UNSPECIFIED = 0, - ONE_TO_ONE_NAT = 1, - DIRECT_IPV6 = 2 - } - - /** NetworkTier enum. */ - enum NetworkTier { - NETWORK_TIER_UNSPECIFIED = 0, - PREMIUM = 1, - STANDARD = 2 - } - } - - /** Properties of an AliasIpRange. */ - interface IAliasIpRange { - - /** AliasIpRange ipCidrRange */ - ipCidrRange?: (string|null); - - /** AliasIpRange subnetworkRangeName */ - subnetworkRangeName?: (string|null); - } - - /** Represents an AliasIpRange. */ - class AliasIpRange implements IAliasIpRange { - - /** - * Constructs a new AliasIpRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAliasIpRange); - - /** AliasIpRange ipCidrRange. */ - public ipCidrRange?: (string|null); - - /** AliasIpRange subnetworkRangeName. */ - public subnetworkRangeName?: (string|null); - - /** AliasIpRange _ipCidrRange. */ - public _ipCidrRange?: "ipCidrRange"; - - /** AliasIpRange _subnetworkRangeName. */ - public _subnetworkRangeName?: "subnetworkRangeName"; - - /** - * Creates a new AliasIpRange instance using the specified properties. - * @param [properties] Properties to set - * @returns AliasIpRange instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAliasIpRange): google.cloud.backupdr.v1.AliasIpRange; - - /** - * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. - * @param message AliasIpRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. - * @param message AliasIpRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AliasIpRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AliasIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AliasIpRange; - - /** - * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AliasIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AliasIpRange; - - /** - * Verifies an AliasIpRange message. - * @param message Plain 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 AliasIpRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AliasIpRange - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AliasIpRange; - - /** - * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. - * @param message AliasIpRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AliasIpRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AliasIpRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AliasIpRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an InstanceParams. */ - interface IInstanceParams { - - /** InstanceParams resourceManagerTags */ - resourceManagerTags?: ({ [k: string]: string }|null); - } - - /** Represents an InstanceParams. */ - class InstanceParams implements IInstanceParams { - - /** - * Constructs a new InstanceParams. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IInstanceParams); - - /** InstanceParams resourceManagerTags. */ - public resourceManagerTags: { [k: string]: string }; - - /** - * Creates a new InstanceParams instance using the specified properties. - * @param [properties] Properties to set - * @returns InstanceParams instance - */ - public static create(properties?: google.cloud.backupdr.v1.IInstanceParams): google.cloud.backupdr.v1.InstanceParams; - - /** - * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. - * @param message InstanceParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. - * @param message InstanceParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InstanceParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InstanceParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InstanceParams; - - /** - * Decodes an InstanceParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InstanceParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InstanceParams; - - /** - * Verifies an InstanceParams message. - * @param message Plain 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 InstanceParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InstanceParams - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InstanceParams; - - /** - * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. - * @param message InstanceParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.InstanceParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InstanceParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InstanceParams - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AllocationAffinity. */ - interface IAllocationAffinity { - - /** AllocationAffinity consumeAllocationType */ - consumeAllocationType?: (google.cloud.backupdr.v1.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1.AllocationAffinity.Type|null); - - /** AllocationAffinity key */ - key?: (string|null); - - /** AllocationAffinity values */ - values?: (string[]|null); - } - - /** Represents an AllocationAffinity. */ - class AllocationAffinity implements IAllocationAffinity { - - /** - * Constructs a new AllocationAffinity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAllocationAffinity); - - /** AllocationAffinity consumeAllocationType. */ - public consumeAllocationType?: (google.cloud.backupdr.v1.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1.AllocationAffinity.Type|null); - - /** AllocationAffinity key. */ - public key?: (string|null); - - /** AllocationAffinity values. */ - public values: string[]; - - /** AllocationAffinity _consumeAllocationType. */ - public _consumeAllocationType?: "consumeAllocationType"; - - /** AllocationAffinity _key. */ - public _key?: "key"; - - /** - * Creates a new AllocationAffinity instance using the specified properties. - * @param [properties] Properties to set - * @returns AllocationAffinity instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAllocationAffinity): google.cloud.backupdr.v1.AllocationAffinity; - - /** - * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. - * @param message AllocationAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. - * @param message AllocationAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AllocationAffinity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AllocationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AllocationAffinity; - - /** - * Decodes an AllocationAffinity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AllocationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AllocationAffinity; - - /** - * Verifies an AllocationAffinity message. - * @param message Plain 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 AllocationAffinity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AllocationAffinity - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AllocationAffinity; - - /** - * Creates a plain object from an AllocationAffinity message. Also converts values to other types if specified. - * @param message AllocationAffinity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AllocationAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AllocationAffinity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AllocationAffinity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AllocationAffinity { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - NO_RESERVATION = 1, - ANY_RESERVATION = 2, - SPECIFIC_RESERVATION = 3 - } - } - - /** Properties of a Scheduling. */ - interface IScheduling { - - /** Scheduling onHostMaintenance */ - onHostMaintenance?: (google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null); - - /** Scheduling automaticRestart */ - automaticRestart?: (boolean|null); - - /** Scheduling preemptible */ - preemptible?: (boolean|null); - - /** Scheduling nodeAffinities */ - nodeAffinities?: (google.cloud.backupdr.v1.Scheduling.INodeAffinity[]|null); - - /** Scheduling minNodeCpus */ - minNodeCpus?: (number|null); - - /** Scheduling provisioningModel */ - provisioningModel?: (google.cloud.backupdr.v1.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null); - - /** Scheduling instanceTerminationAction */ - instanceTerminationAction?: (google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null); - - /** Scheduling localSsdRecoveryTimeout */ - localSsdRecoveryTimeout?: (google.cloud.backupdr.v1.ISchedulingDuration|null); - } - - /** Represents a Scheduling. */ - class Scheduling implements IScheduling { - - /** - * Constructs a new Scheduling. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IScheduling); - - /** Scheduling onHostMaintenance. */ - public onHostMaintenance?: (google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null); - - /** Scheduling automaticRestart. */ - public automaticRestart?: (boolean|null); - - /** Scheduling preemptible. */ - public preemptible?: (boolean|null); - - /** Scheduling nodeAffinities. */ - public nodeAffinities: google.cloud.backupdr.v1.Scheduling.INodeAffinity[]; - - /** Scheduling minNodeCpus. */ - public minNodeCpus?: (number|null); - - /** Scheduling provisioningModel. */ - public provisioningModel?: (google.cloud.backupdr.v1.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null); - - /** Scheduling instanceTerminationAction. */ - public instanceTerminationAction?: (google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null); - - /** Scheduling localSsdRecoveryTimeout. */ - public localSsdRecoveryTimeout?: (google.cloud.backupdr.v1.ISchedulingDuration|null); - - /** Scheduling _onHostMaintenance. */ - public _onHostMaintenance?: "onHostMaintenance"; - - /** Scheduling _automaticRestart. */ - public _automaticRestart?: "automaticRestart"; - - /** Scheduling _preemptible. */ - public _preemptible?: "preemptible"; - - /** Scheduling _minNodeCpus. */ - public _minNodeCpus?: "minNodeCpus"; - - /** Scheduling _provisioningModel. */ - public _provisioningModel?: "provisioningModel"; - - /** Scheduling _instanceTerminationAction. */ - public _instanceTerminationAction?: "instanceTerminationAction"; - - /** Scheduling _localSsdRecoveryTimeout. */ - public _localSsdRecoveryTimeout?: "localSsdRecoveryTimeout"; - - /** - * Creates a new Scheduling instance using the specified properties. - * @param [properties] Properties to set - * @returns Scheduling instance - */ - public static create(properties?: google.cloud.backupdr.v1.IScheduling): google.cloud.backupdr.v1.Scheduling; - - /** - * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. - * @param message Scheduling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. - * @param message Scheduling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Scheduling message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Scheduling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Scheduling; - - /** - * Decodes a Scheduling message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Scheduling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Scheduling; - - /** - * Verifies a Scheduling message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Scheduling - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Scheduling; - - /** - * Creates a plain object from a Scheduling message. Also converts values to other types if specified. - * @param message Scheduling - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Scheduling, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Scheduling to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Scheduling - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Scheduling { - - /** OnHostMaintenance enum. */ - enum OnHostMaintenance { - ON_HOST_MAINTENANCE_UNSPECIFIED = 0, - TERMINATE = 1, - MIGRATE = 1000 - } - - /** Properties of a NodeAffinity. */ - interface INodeAffinity { - - /** NodeAffinity key */ - key?: (string|null); - - /** NodeAffinity operator */ - operator?: (google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null); - - /** NodeAffinity values */ - values?: (string[]|null); - } - - /** Represents a NodeAffinity. */ - class NodeAffinity implements INodeAffinity { - - /** - * Constructs a new NodeAffinity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.Scheduling.INodeAffinity); - - /** NodeAffinity key. */ - public key?: (string|null); - - /** NodeAffinity operator. */ - public operator?: (google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null); - - /** NodeAffinity values. */ - public values: string[]; - - /** NodeAffinity _key. */ - public _key?: "key"; - - /** NodeAffinity _operator. */ - public _operator?: "operator"; - - /** - * Creates a new NodeAffinity instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeAffinity instance - */ - public static create(properties?: google.cloud.backupdr.v1.Scheduling.INodeAffinity): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - - /** - * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. - * @param message NodeAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. - * @param message NodeAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - - /** - * Verifies a NodeAffinity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeAffinity - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - - /** - * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. - * @param message NodeAffinity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Scheduling.NodeAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeAffinity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeAffinity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NodeAffinity { - - /** Operator enum. */ - enum Operator { - OPERATOR_UNSPECIFIED = 0, - IN = 1, - NOT_IN = 2 - } - } - - /** ProvisioningModel enum. */ - enum ProvisioningModel { - PROVISIONING_MODEL_UNSPECIFIED = 0, - STANDARD = 1, - SPOT = 2 - } - - /** InstanceTerminationAction enum. */ - enum InstanceTerminationAction { - INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0, - DELETE = 1, - STOP = 2 - } - } - - /** Properties of a SchedulingDuration. */ - interface ISchedulingDuration { - - /** SchedulingDuration seconds */ - seconds?: (number|Long|string|null); - - /** SchedulingDuration nanos */ - nanos?: (number|null); - } - - /** Represents a SchedulingDuration. */ - class SchedulingDuration implements ISchedulingDuration { - - /** - * Constructs a new SchedulingDuration. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ISchedulingDuration); - - /** SchedulingDuration seconds. */ - public seconds?: (number|Long|string|null); - - /** SchedulingDuration nanos. */ - public nanos?: (number|null); - - /** SchedulingDuration _seconds. */ - public _seconds?: "seconds"; - - /** SchedulingDuration _nanos. */ - public _nanos?: "nanos"; - - /** - * Creates a new SchedulingDuration instance using the specified properties. - * @param [properties] Properties to set - * @returns SchedulingDuration instance - */ - public static create(properties?: google.cloud.backupdr.v1.ISchedulingDuration): google.cloud.backupdr.v1.SchedulingDuration; - - /** - * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. - * @param message SchedulingDuration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. - * @param message SchedulingDuration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SchedulingDuration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SchedulingDuration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SchedulingDuration; - - /** - * Decodes a SchedulingDuration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SchedulingDuration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SchedulingDuration; - - /** - * Verifies a SchedulingDuration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SchedulingDuration - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SchedulingDuration; - - /** - * Creates a plain object from a SchedulingDuration message. Also converts values to other types if specified. - * @param message SchedulingDuration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.SchedulingDuration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SchedulingDuration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SchedulingDuration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceAccount. */ - interface IServiceAccount { - - /** ServiceAccount email */ - email?: (string|null); - - /** ServiceAccount scopes */ - scopes?: (string[]|null); - } - - /** Represents a ServiceAccount. */ - class ServiceAccount implements IServiceAccount { - - /** - * Constructs a new ServiceAccount. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IServiceAccount); - - /** ServiceAccount email. */ - public email?: (string|null); - - /** ServiceAccount scopes. */ - public scopes: string[]; - - /** ServiceAccount _email. */ - public _email?: "email"; - - /** - * Creates a new ServiceAccount instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceAccount instance - */ - public static create(properties?: google.cloud.backupdr.v1.IServiceAccount): google.cloud.backupdr.v1.ServiceAccount; - - /** - * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. - * @param message ServiceAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. - * @param message ServiceAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ServiceAccount; - - /** - * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ServiceAccount; - - /** - * Verifies a ServiceAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceAccount - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ServiceAccount; - - /** - * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. - * @param message ServiceAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ServiceAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceAccount - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Tags. */ - interface ITags { - - /** Tags items */ - items?: (string[]|null); - } - - /** Represents a Tags. */ - class Tags implements ITags { - - /** - * Constructs a new Tags. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ITags); - - /** Tags items. */ - public items: string[]; - - /** - * Creates a new Tags instance using the specified properties. - * @param [properties] Properties to set - * @returns Tags instance - */ - public static create(properties?: google.cloud.backupdr.v1.ITags): google.cloud.backupdr.v1.Tags; - - /** - * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. - * @param message Tags message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ITags, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. - * @param message Tags message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ITags, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Tags message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Tags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Tags; - - /** - * Decodes a Tags message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Tags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Tags; - - /** - * Verifies a Tags message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Tags message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Tags - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Tags; - - /** - * Creates a plain object from a Tags message. Also converts values to other types if specified. - * @param message Tags - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Tags, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Tags to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Tags - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AttachedDisk. */ - interface IAttachedDisk { - - /** AttachedDisk initializeParams */ - initializeParams?: (google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null); - - /** AttachedDisk deviceName */ - deviceName?: (string|null); - - /** AttachedDisk kind */ - kind?: (string|null); - - /** AttachedDisk diskTypeDeprecated */ - diskTypeDeprecated?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); - - /** AttachedDisk mode */ - mode?: (google.cloud.backupdr.v1.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskMode|null); - - /** AttachedDisk source */ - source?: (string|null); - - /** AttachedDisk index */ - index?: (number|Long|string|null); - - /** AttachedDisk boot */ - boot?: (boolean|null); - - /** AttachedDisk autoDelete */ - autoDelete?: (boolean|null); - - /** AttachedDisk license */ - license?: (string[]|null); - - /** AttachedDisk diskInterface */ - diskInterface?: (google.cloud.backupdr.v1.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null); - - /** AttachedDisk guestOsFeature */ - guestOsFeature?: (google.cloud.backupdr.v1.IGuestOsFeature[]|null); - - /** AttachedDisk diskEncryptionKey */ - diskEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); - - /** AttachedDisk diskSizeGb */ - diskSizeGb?: (number|Long|string|null); - - /** AttachedDisk savedState */ - savedState?: (google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null); - - /** AttachedDisk diskType */ - diskType?: (string|null); - - /** AttachedDisk type */ - type?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); - } - - /** Represents an AttachedDisk. */ - class AttachedDisk implements IAttachedDisk { - - /** - * Constructs a new AttachedDisk. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAttachedDisk); - - /** AttachedDisk initializeParams. */ - public initializeParams?: (google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null); - - /** AttachedDisk deviceName. */ - public deviceName?: (string|null); - - /** AttachedDisk kind. */ - public kind?: (string|null); - - /** AttachedDisk diskTypeDeprecated. */ - public diskTypeDeprecated?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); - - /** AttachedDisk mode. */ - public mode?: (google.cloud.backupdr.v1.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskMode|null); - - /** AttachedDisk source. */ - public source?: (string|null); - - /** AttachedDisk index. */ - public index?: (number|Long|string|null); - - /** AttachedDisk boot. */ - public boot?: (boolean|null); - - /** AttachedDisk autoDelete. */ - public autoDelete?: (boolean|null); - - /** AttachedDisk license. */ - public license: string[]; - - /** AttachedDisk diskInterface. */ - public diskInterface?: (google.cloud.backupdr.v1.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null); - - /** AttachedDisk guestOsFeature. */ - public guestOsFeature: google.cloud.backupdr.v1.IGuestOsFeature[]; - - /** AttachedDisk diskEncryptionKey. */ - public diskEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); - - /** AttachedDisk diskSizeGb. */ - public diskSizeGb?: (number|Long|string|null); - - /** AttachedDisk savedState. */ - public savedState?: (google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null); - - /** AttachedDisk diskType. */ - public diskType?: (string|null); - - /** AttachedDisk type. */ - public type?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); - - /** AttachedDisk _initializeParams. */ - public _initializeParams?: "initializeParams"; - - /** AttachedDisk _deviceName. */ - public _deviceName?: "deviceName"; - - /** AttachedDisk _kind. */ - public _kind?: "kind"; - - /** AttachedDisk _diskTypeDeprecated. */ - public _diskTypeDeprecated?: "diskTypeDeprecated"; - - /** AttachedDisk _mode. */ - public _mode?: "mode"; - - /** AttachedDisk _source. */ - public _source?: "source"; - - /** AttachedDisk _index. */ - public _index?: "index"; - - /** AttachedDisk _boot. */ - public _boot?: "boot"; - - /** AttachedDisk _autoDelete. */ - public _autoDelete?: "autoDelete"; - - /** AttachedDisk _diskInterface. */ - public _diskInterface?: "diskInterface"; - - /** AttachedDisk _diskEncryptionKey. */ - public _diskEncryptionKey?: "diskEncryptionKey"; - - /** AttachedDisk _diskSizeGb. */ - public _diskSizeGb?: "diskSizeGb"; - - /** AttachedDisk _savedState. */ - public _savedState?: "savedState"; - - /** AttachedDisk _diskType. */ - public _diskType?: "diskType"; - - /** AttachedDisk _type. */ - public _type?: "type"; - - /** - * Creates a new AttachedDisk instance using the specified properties. - * @param [properties] Properties to set - * @returns AttachedDisk instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAttachedDisk): google.cloud.backupdr.v1.AttachedDisk; - - /** - * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. - * @param message AttachedDisk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. - * @param message AttachedDisk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AttachedDisk message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AttachedDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AttachedDisk; - - /** - * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AttachedDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AttachedDisk; - - /** - * Verifies an AttachedDisk message. - * @param message Plain 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 AttachedDisk message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AttachedDisk - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AttachedDisk; - - /** - * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. - * @param message AttachedDisk - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AttachedDisk, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AttachedDisk to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AttachedDisk - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AttachedDisk { - - /** Properties of an InitializeParams. */ - interface IInitializeParams { - - /** InitializeParams diskName */ - diskName?: (string|null); - - /** InitializeParams replicaZones */ - replicaZones?: (string[]|null); - } - - /** Represents an InitializeParams. */ - class InitializeParams implements IInitializeParams { - - /** - * Constructs a new InitializeParams. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams); - - /** InitializeParams diskName. */ - public diskName?: (string|null); - - /** InitializeParams replicaZones. */ - public replicaZones: string[]; - - /** InitializeParams _diskName. */ - public _diskName?: "diskName"; - - /** - * Creates a new InitializeParams instance using the specified properties. - * @param [properties] Properties to set - * @returns InitializeParams instance - */ - public static create(properties?: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; - - /** - * Encodes the specified InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. - * @param message InitializeParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. - * @param message InitializeParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InitializeParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InitializeParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; - - /** - * Decodes an InitializeParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InitializeParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; - - /** - * Verifies an InitializeParams message. - * @param message Plain 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 InitializeParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InitializeParams - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; - - /** - * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. - * @param message InitializeParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AttachedDisk.InitializeParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InitializeParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InitializeParams - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** DiskType enum. */ - enum DiskType { - DISK_TYPE_UNSPECIFIED = 0, - SCRATCH = 1, - PERSISTENT = 2 - } - - /** DiskMode enum. */ - enum DiskMode { - DISK_MODE_UNSPECIFIED = 0, - READ_WRITE = 1, - READ_ONLY = 2, - LOCKED = 3 - } - - /** DiskInterface enum. */ - enum DiskInterface { - DISK_INTERFACE_UNSPECIFIED = 0, - SCSI = 1, - NVME = 2, - NVDIMM = 3, - ISCSI = 4 - } - - /** DiskSavedState enum. */ - enum DiskSavedState { - DISK_SAVED_STATE_UNSPECIFIED = 0, - PRESERVED = 1 - } - } - - /** Properties of a GuestOsFeature. */ - interface IGuestOsFeature { - - /** GuestOsFeature type */ - type?: (google.cloud.backupdr.v1.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null); - } - - /** Represents a GuestOsFeature. */ - class GuestOsFeature implements IGuestOsFeature { - - /** - * Constructs a new GuestOsFeature. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGuestOsFeature); - - /** GuestOsFeature type. */ - public type?: (google.cloud.backupdr.v1.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null); - - /** GuestOsFeature _type. */ - public _type?: "type"; - - /** - * Creates a new GuestOsFeature instance using the specified properties. - * @param [properties] Properties to set - * @returns GuestOsFeature instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGuestOsFeature): google.cloud.backupdr.v1.GuestOsFeature; - - /** - * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. - * @param message GuestOsFeature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. - * @param message GuestOsFeature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GuestOsFeature message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GuestOsFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GuestOsFeature; - - /** - * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GuestOsFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GuestOsFeature; - - /** - * Verifies a GuestOsFeature message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GuestOsFeature - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GuestOsFeature; - - /** - * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. - * @param message GuestOsFeature - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GuestOsFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GuestOsFeature to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GuestOsFeature - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GuestOsFeature { - - /** FeatureType enum. */ - enum FeatureType { - FEATURE_TYPE_UNSPECIFIED = 0, - VIRTIO_SCSI_MULTIQUEUE = 1, - WINDOWS = 2, - MULTI_IP_SUBNET = 3, - UEFI_COMPATIBLE = 4, - SECURE_BOOT = 5, - GVNIC = 6, - SEV_CAPABLE = 7, - BARE_METAL_LINUX_COMPATIBLE = 8, - SUSPEND_RESUME_COMPATIBLE = 9, - SEV_LIVE_MIGRATABLE = 10, - SEV_SNP_CAPABLE = 11, - TDX_CAPABLE = 12, - IDPF = 13, - SEV_LIVE_MIGRATABLE_V2 = 14 - } - } - - /** KeyRevocationActionType enum. */ - enum KeyRevocationActionType { - KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0, - NONE = 1, - STOP = 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 FieldInfo. */ - interface IFieldInfo { - - /** FieldInfo format */ - format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); - } - - /** Represents a FieldInfo. */ - class FieldInfo implements IFieldInfo { - - /** - * Constructs a new FieldInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IFieldInfo); - - /** FieldInfo format. */ - public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); - - /** - * Creates a new FieldInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldInfo instance - */ - public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; - - /** - * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @param message FieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @param message FieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldInfo - * @throws {Error} If the payload is not 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.FieldInfo; - - /** - * Decodes a FieldInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldInfo - * @throws {Error} If the payload 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.FieldInfo; - - /** - * Verifies a FieldInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldInfo - */ - public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; - - /** - * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. - * @param message FieldInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldInfo { - - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - UUID4 = 1, - IPV4 = 2, - IPV6 = 3, - IPV4_OR_IPV6 = 4 - } - } - - /** 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.fieldInfo */ - ".google.api.fieldInfo"?: (google.api.IFieldInfo|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 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; - } - - /** 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 DoubleValue. */ - interface IDoubleValue { - - /** DoubleValue value */ - value?: (number|null); - } - - /** Represents a DoubleValue. */ - class DoubleValue implements IDoubleValue { - - /** - * Constructs a new DoubleValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDoubleValue); - - /** DoubleValue value. */ - public value: number; - - /** - * Creates a new DoubleValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DoubleValue instance - */ - public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; - - /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DoubleValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DoubleValue - * @throws {Error} If the payload is not 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.DoubleValue; - - /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DoubleValue - * @throws {Error} If the payload 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.DoubleValue; - - /** - * Verifies a DoubleValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DoubleValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; - - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @param message DoubleValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DoubleValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DoubleValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FloatValue. */ - interface IFloatValue { - - /** FloatValue value */ - value?: (number|null); - } - - /** Represents a FloatValue. */ - class FloatValue implements IFloatValue { - - /** - * Constructs a new FloatValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFloatValue); - - /** FloatValue value. */ - public value: number; - - /** - * Creates a new FloatValue instance using the specified properties. - * @param [properties] Properties to set - * @returns FloatValue instance - */ - public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; - - /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FloatValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FloatValue - * @throws {Error} If the payload is not 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.FloatValue; - - /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FloatValue - * @throws {Error} If the payload 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.FloatValue; - - /** - * Verifies a FloatValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FloatValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; - - /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @param message FloatValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FloatValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FloatValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Int64Value. */ - interface IInt64Value { - - /** Int64Value value */ - value?: (number|Long|string|null); - } - - /** Represents an Int64Value. */ - class Int64Value implements IInt64Value { - - /** - * Constructs a new Int64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt64Value); - - /** Int64Value value. */ - public value: (number|Long|string); - - /** - * Creates a new Int64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int64Value instance - */ - public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; - - /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Int64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int64Value - * @throws {Error} If the payload is not 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.Int64Value; - - /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int64Value - * @throws {Error} If the payload 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.Int64Value; - - /** - * Verifies an Int64Value message. - * @param message Plain 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 Int64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; - - /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @param message Int64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Int64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Int64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UInt64Value. */ - interface IUInt64Value { - - /** UInt64Value value */ - value?: (number|Long|string|null); - } - - /** Represents a UInt64Value. */ - class UInt64Value implements IUInt64Value { - - /** - * Constructs a new UInt64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt64Value); - - /** UInt64Value value. */ - public value: (number|Long|string); - - /** - * Creates a new UInt64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt64Value instance - */ - public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; - - /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UInt64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt64Value - * @throws {Error} If the payload is not 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.UInt64Value; - - /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt64Value - * @throws {Error} If the payload 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.UInt64Value; - - /** - * Verifies a UInt64Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; - - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @param message UInt64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UInt64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UInt64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Int32Value. */ - interface IInt32Value { - - /** Int32Value value */ - value?: (number|null); - } - - /** Represents an Int32Value. */ - class Int32Value implements IInt32Value { - - /** - * Constructs a new Int32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt32Value); - - /** Int32Value value. */ - public value: number; - - /** - * Creates a new Int32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int32Value instance - */ - public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; - - /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Int32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int32Value - * @throws {Error} If the payload is not 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.Int32Value; - - /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int32Value - * @throws {Error} If the payload 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.Int32Value; - - /** - * Verifies an Int32Value message. - * @param message Plain 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 Int32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; - - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @param message Int32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Int32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Int32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UInt32Value. */ - interface IUInt32Value { - - /** UInt32Value value */ - value?: (number|null); - } - - /** Represents a UInt32Value. */ - class UInt32Value implements IUInt32Value { - - /** - * Constructs a new UInt32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt32Value); - - /** UInt32Value value. */ - public value: number; - - /** - * Creates a new UInt32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt32Value instance - */ - public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; - - /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UInt32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt32Value - * @throws {Error} If the payload is not 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.UInt32Value; - - /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt32Value - * @throws {Error} If the payload 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.UInt32Value; - - /** - * Verifies a UInt32Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; - - /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @param message UInt32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UInt32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UInt32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BoolValue. */ - interface IBoolValue { - - /** BoolValue value */ - value?: (boolean|null); - } - - /** Represents a BoolValue. */ - class BoolValue implements IBoolValue { - - /** - * Constructs a new BoolValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBoolValue); - - /** BoolValue value. */ - public value: boolean; - - /** - * Creates a new BoolValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BoolValue instance - */ - public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; - - /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BoolValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BoolValue - * @throws {Error} If the payload is not 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.BoolValue; - - /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BoolValue - * @throws {Error} If the payload 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.BoolValue; - - /** - * Verifies a BoolValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BoolValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; - - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @param message BoolValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BoolValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BoolValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StringValue. */ - interface IStringValue { - - /** StringValue value */ - value?: (string|null); - } - - /** Represents a StringValue. */ - class StringValue implements IStringValue { - - /** - * Constructs a new StringValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStringValue); - - /** StringValue value. */ - public value: string; - - /** - * Creates a new StringValue instance using the specified properties. - * @param [properties] Properties to set - * @returns StringValue instance - */ - public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; - - /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StringValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringValue - * @throws {Error} If the payload is not 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.StringValue; - - /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringValue - * @throws {Error} If the payload 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.StringValue; - - /** - * Verifies a StringValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; - - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @param message StringValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StringValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StringValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BytesValue. */ - interface IBytesValue { - - /** BytesValue value */ - value?: (Uint8Array|string|null); - } - - /** Represents a BytesValue. */ - class BytesValue implements IBytesValue { - - /** - * Constructs a new BytesValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBytesValue); - - /** BytesValue value. */ - public value: (Uint8Array|string); - - /** - * Creates a new BytesValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BytesValue instance - */ - public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; - - /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BytesValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BytesValue - * @throws {Error} If the payload is not 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.BytesValue; - - /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BytesValue - * @throws {Error} If the payload 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.BytesValue; - - /** - * Verifies a BytesValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BytesValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; - - /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. - * @param message BytesValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BytesValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BytesValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace type. */ - namespace type { - - /** DayOfWeek enum. */ - enum DayOfWeek { - DAY_OF_WEEK_UNSPECIFIED = 0, - MONDAY = 1, - TUESDAY = 2, - WEDNESDAY = 3, - THURSDAY = 4, - FRIDAY = 5, - SATURDAY = 6, - SUNDAY = 7 - } - - /** Month enum. */ - enum Month { - MONTH_UNSPECIFIED = 0, - JANUARY = 1, - FEBRUARY = 2, - MARCH = 3, - APRIL = 4, - MAY = 5, - JUNE = 6, - JULY = 7, - AUGUST = 8, - SEPTEMBER = 9, - OCTOBER = 10, - NOVEMBER = 11, - DECEMBER = 12 - } - - /** Properties of an Expr. */ - interface IExpr { - - /** Expr expression */ - expression?: (string|null); - - /** Expr title */ - title?: (string|null); - - /** Expr description */ - description?: (string|null); - - /** Expr location */ - location?: (string|null); - } - - /** Represents an Expr. */ - class Expr implements IExpr { - - /** - * Constructs a new Expr. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.IExpr); - - /** Expr expression. */ - public expression: string; - - /** Expr title. */ - public title: string; - - /** Expr description. */ - public description: string; - - /** Expr location. */ - public location: string; - - /** - * Creates a new Expr instance using the specified properties. - * @param [properties] Properties to set - * @returns Expr instance - */ - public static create(properties?: google.type.IExpr): google.type.Expr; - - /** - * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @param message Expr message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @param message Expr message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Expr message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Expr - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Expr; - - /** - * Decodes an Expr message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Expr - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Expr; - - /** - * Verifies an Expr message. - * @param message Plain 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 Expr message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Expr - */ - public static fromObject(object: { [k: string]: any }): google.type.Expr; - - /** - * Creates a plain object from an Expr message. Also converts values to other types if specified. - * @param message Expr - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.Expr, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Expr to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Expr - * @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; - } - } - - /** Namespace iam. */ - namespace iam { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a IAMPolicy */ - class IAMPolicy extends $protobuf.rpc.Service { - - /** - * Constructs a new IAMPolicy 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 IAMPolicy 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): IAMPolicy; - - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.SetIamPolicyCallback): void; - - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @returns Promise - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; - - /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.GetIamPolicyCallback): void; - - /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @returns Promise - */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.iam.v1.IAMPolicy.TestIamPermissionsCallback): void; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; - } - - namespace IAMPolicy { - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse - */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; - } - - /** Properties of a SetIamPolicyRequest. */ - interface ISetIamPolicyRequest { - - /** SetIamPolicyRequest resource */ - resource?: (string|null); - - /** SetIamPolicyRequest policy */ - policy?: (google.iam.v1.IPolicy|null); - - /** SetIamPolicyRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents a SetIamPolicyRequest. */ - class SetIamPolicyRequest implements ISetIamPolicyRequest { - - /** - * Constructs a new SetIamPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.ISetIamPolicyRequest); - - /** SetIamPolicyRequest resource. */ - public resource: string; - - /** SetIamPolicyRequest policy. */ - public policy?: (google.iam.v1.IPolicy|null); - - /** SetIamPolicyRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new SetIamPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetIamPolicyRequest instance - */ - public static create(properties?: google.iam.v1.ISetIamPolicyRequest): google.iam.v1.SetIamPolicyRequest; - - /** - * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @param message SetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @param message SetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.SetIamPolicyRequest; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.SetIamPolicyRequest; - - /** - * Verifies a SetIamPolicyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetIamPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.SetIamPolicyRequest; - - /** - * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. - * @param message SetIamPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.SetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetIamPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetIamPolicyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetIamPolicyRequest. */ - interface IGetIamPolicyRequest { - - /** GetIamPolicyRequest resource */ - resource?: (string|null); - - /** GetIamPolicyRequest options */ - options?: (google.iam.v1.IGetPolicyOptions|null); - } - - /** Represents a GetIamPolicyRequest. */ - class GetIamPolicyRequest implements IGetIamPolicyRequest { - - /** - * Constructs a new GetIamPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IGetIamPolicyRequest); - - /** GetIamPolicyRequest resource. */ - public resource: string; - - /** GetIamPolicyRequest options. */ - public options?: (google.iam.v1.IGetPolicyOptions|null); - - /** - * Creates a new GetIamPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetIamPolicyRequest instance - */ - public static create(properties?: google.iam.v1.IGetIamPolicyRequest): google.iam.v1.GetIamPolicyRequest; - - /** - * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @param message GetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @param message GetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetIamPolicyRequest; - - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetIamPolicyRequest; - - /** - * Verifies a GetIamPolicyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetIamPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.GetIamPolicyRequest; - - /** - * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. - * @param message GetIamPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.GetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetIamPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetIamPolicyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TestIamPermissionsRequest. */ - interface ITestIamPermissionsRequest { - - /** TestIamPermissionsRequest resource */ - resource?: (string|null); - - /** TestIamPermissionsRequest permissions */ - permissions?: (string[]|null); - } - - /** Represents a TestIamPermissionsRequest. */ - class TestIamPermissionsRequest implements ITestIamPermissionsRequest { - - /** - * Constructs a new TestIamPermissionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.ITestIamPermissionsRequest); - - /** TestIamPermissionsRequest resource. */ - public resource: string; - - /** TestIamPermissionsRequest permissions. */ - public permissions: string[]; - - /** - * Creates a new TestIamPermissionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns TestIamPermissionsRequest instance - */ - public static create(properties?: google.iam.v1.ITestIamPermissionsRequest): google.iam.v1.TestIamPermissionsRequest; - - /** - * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @param message TestIamPermissionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @param message TestIamPermissionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsRequest; - - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsRequest; - - /** - * Verifies a TestIamPermissionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TestIamPermissionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsRequest; - - /** - * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. - * @param message TestIamPermissionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.TestIamPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TestIamPermissionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TestIamPermissionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TestIamPermissionsResponse. */ - interface ITestIamPermissionsResponse { - - /** TestIamPermissionsResponse permissions */ - permissions?: (string[]|null); - } - - /** Represents a TestIamPermissionsResponse. */ - class TestIamPermissionsResponse implements ITestIamPermissionsResponse { - - /** - * Constructs a new TestIamPermissionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.ITestIamPermissionsResponse); - - /** TestIamPermissionsResponse permissions. */ - public permissions: string[]; - - /** - * Creates a new TestIamPermissionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns TestIamPermissionsResponse instance - */ - public static create(properties?: google.iam.v1.ITestIamPermissionsResponse): google.iam.v1.TestIamPermissionsResponse; - - /** - * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @param message TestIamPermissionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @param message TestIamPermissionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsResponse; - - /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsResponse; - - /** - * Verifies a TestIamPermissionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TestIamPermissionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsResponse; - - /** - * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. - * @param message TestIamPermissionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.TestIamPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TestIamPermissionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TestIamPermissionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetPolicyOptions. */ - interface IGetPolicyOptions { - - /** GetPolicyOptions requestedPolicyVersion */ - requestedPolicyVersion?: (number|null); - } - - /** Represents a GetPolicyOptions. */ - class GetPolicyOptions implements IGetPolicyOptions { - - /** - * Constructs a new GetPolicyOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IGetPolicyOptions); - - /** GetPolicyOptions requestedPolicyVersion. */ - public requestedPolicyVersion: number; - - /** - * Creates a new GetPolicyOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPolicyOptions instance - */ - public static create(properties?: google.iam.v1.IGetPolicyOptions): google.iam.v1.GetPolicyOptions; - - /** - * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @param message GetPolicyOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @param message GetPolicyOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetPolicyOptions; - - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetPolicyOptions; - - /** - * Verifies a GetPolicyOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPolicyOptions - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.GetPolicyOptions; - - /** - * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. - * @param message GetPolicyOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.GetPolicyOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetPolicyOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetPolicyOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Policy. */ - interface IPolicy { - - /** Policy version */ - version?: (number|null); - - /** Policy bindings */ - bindings?: (google.iam.v1.IBinding[]|null); - - /** Policy auditConfigs */ - auditConfigs?: (google.iam.v1.IAuditConfig[]|null); - - /** Policy etag */ - etag?: (Uint8Array|string|null); - } - - /** Represents a Policy. */ - class Policy implements IPolicy { - - /** - * Constructs a new Policy. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IPolicy); - - /** Policy version. */ - public version: number; - - /** Policy bindings. */ - public bindings: google.iam.v1.IBinding[]; - - /** Policy auditConfigs. */ - public auditConfigs: google.iam.v1.IAuditConfig[]; - - /** Policy etag. */ - public etag: (Uint8Array|string); - - /** - * Creates a new Policy instance using the specified properties. - * @param [properties] Properties to set - * @returns Policy instance - */ - public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy; - - /** - * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @param message Policy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @param message Policy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Policy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy; - - /** - * Decodes a Policy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy; - - /** - * Verifies a Policy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Policy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Policy - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy; - - /** - * Creates a plain object from a Policy message. Also converts values to other types if specified. - * @param message Policy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Policy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Policy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Binding. */ - interface IBinding { - - /** Binding role */ - role?: (string|null); - - /** Binding members */ - members?: (string[]|null); - - /** Binding condition */ - condition?: (google.type.IExpr|null); - } - - /** Represents a Binding. */ - class Binding implements IBinding { - - /** - * Constructs a new Binding. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IBinding); - - /** Binding role. */ - public role: string; - - /** Binding members. */ - public members: string[]; - - /** Binding condition. */ - public condition?: (google.type.IExpr|null); - - /** - * Creates a new Binding instance using the specified properties. - * @param [properties] Properties to set - * @returns Binding instance - */ - public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding; - - /** - * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @param message Binding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @param message Binding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Binding message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Binding; - - /** - * Decodes a Binding message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Binding; - - /** - * Verifies a Binding message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Binding message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Binding - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding; - - /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. - * @param message Binding - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Binding to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Binding - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AuditConfig. */ - interface IAuditConfig { - - /** AuditConfig service */ - service?: (string|null); - - /** AuditConfig auditLogConfigs */ - auditLogConfigs?: (google.iam.v1.IAuditLogConfig[]|null); - } - - /** Represents an AuditConfig. */ - class AuditConfig implements IAuditConfig { - - /** - * Constructs a new AuditConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IAuditConfig); - - /** AuditConfig service. */ - public service: string; - - /** AuditConfig auditLogConfigs. */ - public auditLogConfigs: google.iam.v1.IAuditLogConfig[]; - - /** - * Creates a new AuditConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditConfig instance - */ - public static create(properties?: google.iam.v1.IAuditConfig): google.iam.v1.AuditConfig; - - /** - * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @param message AuditConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @param message AuditConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuditConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfig; - - /** - * Decodes an AuditConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfig; - - /** - * Verifies an AuditConfig message. - * @param message Plain 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 AuditConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditConfig - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfig; - - /** - * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. - * @param message AuditConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuditConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuditConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AuditLogConfig. */ - interface IAuditLogConfig { - - /** AuditLogConfig logType */ - logType?: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType|null); - - /** AuditLogConfig exemptedMembers */ - exemptedMembers?: (string[]|null); - } - - /** Represents an AuditLogConfig. */ - class AuditLogConfig implements IAuditLogConfig { - - /** - * Constructs a new AuditLogConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IAuditLogConfig); - - /** AuditLogConfig logType. */ - public logType: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType); - - /** AuditLogConfig exemptedMembers. */ - public exemptedMembers: string[]; - - /** - * Creates a new AuditLogConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditLogConfig instance - */ - public static create(properties?: google.iam.v1.IAuditLogConfig): google.iam.v1.AuditLogConfig; - - /** - * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @param message AuditLogConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @param message AuditLogConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditLogConfig; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditLogConfig; - - /** - * Verifies an AuditLogConfig message. - * @param message Plain 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 AuditLogConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditLogConfig - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditLogConfig; - - /** - * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. - * @param message AuditLogConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.AuditLogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuditLogConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuditLogConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AuditLogConfig { - - /** LogType enum. */ - enum LogType { - LOG_TYPE_UNSPECIFIED = 0, - ADMIN_READ = 1, - DATA_WRITE = 2, - DATA_READ = 3 - } - } - - /** Properties of a PolicyDelta. */ - interface IPolicyDelta { - - /** PolicyDelta bindingDeltas */ - bindingDeltas?: (google.iam.v1.IBindingDelta[]|null); - - /** PolicyDelta auditConfigDeltas */ - auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null); - } - - /** Represents a PolicyDelta. */ - class PolicyDelta implements IPolicyDelta { - - /** - * Constructs a new PolicyDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IPolicyDelta); - - /** PolicyDelta bindingDeltas. */ - public bindingDeltas: google.iam.v1.IBindingDelta[]; - - /** PolicyDelta auditConfigDeltas. */ - public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[]; - - /** - * Creates a new PolicyDelta instance using the specified properties. - * @param [properties] Properties to set - * @returns PolicyDelta instance - */ - public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta; - - /** - * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @param message PolicyDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @param message PolicyDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.PolicyDelta; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.PolicyDelta; - - /** - * Verifies a PolicyDelta message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PolicyDelta - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta; - - /** - * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. - * @param message PolicyDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PolicyDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PolicyDelta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BindingDelta. */ - interface IBindingDelta { - - /** BindingDelta action */ - action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null); - - /** BindingDelta role */ - role?: (string|null); - - /** BindingDelta member */ - member?: (string|null); - - /** BindingDelta condition */ - condition?: (google.type.IExpr|null); - } - - /** Represents a BindingDelta. */ - class BindingDelta implements IBindingDelta { - - /** - * Constructs a new BindingDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IBindingDelta); - - /** BindingDelta action. */ - public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action); - - /** BindingDelta role. */ - public role: string; - - /** BindingDelta member. */ - public member: string; - - /** BindingDelta condition. */ - public condition?: (google.type.IExpr|null); - - /** - * Creates a new BindingDelta instance using the specified properties. - * @param [properties] Properties to set - * @returns BindingDelta instance - */ - public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta; - - /** - * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @param message BindingDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @param message BindingDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BindingDelta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.BindingDelta; - - /** - * Decodes a BindingDelta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.BindingDelta; - - /** - * Verifies a BindingDelta message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BindingDelta - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta; - - /** - * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. - * @param message BindingDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BindingDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BindingDelta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BindingDelta { - - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - ADD = 1, - REMOVE = 2 - } - } - - /** Properties of an AuditConfigDelta. */ - interface IAuditConfigDelta { - - /** AuditConfigDelta action */ - action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null); - - /** AuditConfigDelta service */ - service?: (string|null); - - /** AuditConfigDelta exemptedMember */ - exemptedMember?: (string|null); - - /** AuditConfigDelta logType */ - logType?: (string|null); - } - - /** Represents an AuditConfigDelta. */ - class AuditConfigDelta implements IAuditConfigDelta { - - /** - * Constructs a new AuditConfigDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IAuditConfigDelta); - - /** AuditConfigDelta action. */ - public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action); - - /** AuditConfigDelta service. */ - public service: string; - - /** AuditConfigDelta exemptedMember. */ - public exemptedMember: string; - - /** AuditConfigDelta logType. */ - public logType: string; - - /** - * Creates a new AuditConfigDelta instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditConfigDelta instance - */ - public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta; - - /** - * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @param message AuditConfigDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @param message AuditConfigDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfigDelta; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfigDelta; - - /** - * Verifies an AuditConfigDelta message. - * @param message Plain 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 AuditConfigDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditConfigDelta - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta; - - /** - * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. - * @param message AuditConfigDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuditConfigDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AuditConfigDelta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AuditConfigDelta { - - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - ADD = 1, - REMOVE = 2 - } - } - } - } - - /** 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; - } - } -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js deleted file mode 100644 index f97790dd10a..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js +++ /dev/null @@ -1,61858 +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. - -/*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_backupdr_protos || ($protobuf.roots._google_cloud_backupdr_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.backupdr = (function() { - - /** - * Namespace backupdr. - * @memberof google.cloud - * @namespace - */ - var backupdr = {}; - - backupdr.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.cloud.backupdr - * @namespace - */ - var v1 = {}; - - v1.BackupDR = (function() { - - /** - * Constructs a new BackupDR service. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupDR - * @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 BackupDR(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (BackupDR.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = BackupDR; - - /** - * Creates new BackupDR service using the specified rpc implementation. - * @function create - * @memberof google.cloud.backupdr.v1.BackupDR - * @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 {BackupDR} RPC service. Useful where requests and/or responses are streamed. - */ - BackupDR.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listManagementServers}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef ListManagementServersCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ListManagementServersResponse} [response] ListManagementServersResponse - */ - - /** - * Calls ListManagementServers. - * @function listManagementServers - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListManagementServersRequest} request ListManagementServersRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.ListManagementServersCallback} callback Node-style callback called with the error, if any, and ListManagementServersResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.listManagementServers = function listManagementServers(request, callback) { - return this.rpcCall(listManagementServers, $root.google.cloud.backupdr.v1.ListManagementServersRequest, $root.google.cloud.backupdr.v1.ListManagementServersResponse, request, callback); - }, "name", { value: "ListManagementServers" }); - - /** - * Calls ListManagementServers. - * @function listManagementServers - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListManagementServersRequest} request ListManagementServersRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getManagementServer}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef GetManagementServerCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ManagementServer} [response] ManagementServer - */ - - /** - * Calls GetManagementServer. - * @function getManagementServer - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} request GetManagementServerRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.GetManagementServerCallback} callback Node-style callback called with the error, if any, and ManagementServer - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.getManagementServer = function getManagementServer(request, callback) { - return this.rpcCall(getManagementServer, $root.google.cloud.backupdr.v1.GetManagementServerRequest, $root.google.cloud.backupdr.v1.ManagementServer, request, callback); - }, "name", { value: "GetManagementServer" }); - - /** - * Calls GetManagementServer. - * @function getManagementServer - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} request GetManagementServerRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createManagementServer}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef CreateManagementServerCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateManagementServer. - * @function createManagementServer - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} request CreateManagementServerRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.CreateManagementServerCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.createManagementServer = function createManagementServer(request, callback) { - return this.rpcCall(createManagementServer, $root.google.cloud.backupdr.v1.CreateManagementServerRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateManagementServer" }); - - /** - * Calls CreateManagementServer. - * @function createManagementServer - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} request CreateManagementServerRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteManagementServer}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef DeleteManagementServerCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteManagementServer. - * @function deleteManagementServer - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} request DeleteManagementServerRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.DeleteManagementServerCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.deleteManagementServer = function deleteManagementServer(request, callback) { - return this.rpcCall(deleteManagementServer, $root.google.cloud.backupdr.v1.DeleteManagementServerRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteManagementServer" }); - - /** - * Calls DeleteManagementServer. - * @function deleteManagementServer - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} request DeleteManagementServerRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupVault}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef CreateBackupVaultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateBackupVault. - * @function createBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} request CreateBackupVaultRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.createBackupVault = function createBackupVault(request, callback) { - return this.rpcCall(createBackupVault, $root.google.cloud.backupdr.v1.CreateBackupVaultRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateBackupVault" }); - - /** - * Calls CreateBackupVault. - * @function createBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} request CreateBackupVaultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupVaults}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef ListBackupVaultsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ListBackupVaultsResponse} [response] ListBackupVaultsResponse - */ - - /** - * Calls ListBackupVaults. - * @function listBackupVaults - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} request ListBackupVaultsRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.ListBackupVaultsCallback} callback Node-style callback called with the error, if any, and ListBackupVaultsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.listBackupVaults = function listBackupVaults(request, callback) { - return this.rpcCall(listBackupVaults, $root.google.cloud.backupdr.v1.ListBackupVaultsRequest, $root.google.cloud.backupdr.v1.ListBackupVaultsResponse, request, callback); - }, "name", { value: "ListBackupVaults" }); - - /** - * Calls ListBackupVaults. - * @function listBackupVaults - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} request ListBackupVaultsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchUsableBackupVaults}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef FetchUsableBackupVaultsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} [response] FetchUsableBackupVaultsResponse - */ - - /** - * Calls FetchUsableBackupVaults. - * @function fetchUsableBackupVaults - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} request FetchUsableBackupVaultsRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaultsCallback} callback Node-style callback called with the error, if any, and FetchUsableBackupVaultsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.fetchUsableBackupVaults = function fetchUsableBackupVaults(request, callback) { - return this.rpcCall(fetchUsableBackupVaults, $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest, $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse, request, callback); - }, "name", { value: "FetchUsableBackupVaults" }); - - /** - * Calls FetchUsableBackupVaults. - * @function fetchUsableBackupVaults - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} request FetchUsableBackupVaultsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupVault}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef GetBackupVaultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.BackupVault} [response] BackupVault - */ - - /** - * Calls GetBackupVault. - * @function getBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} request GetBackupVaultRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.GetBackupVaultCallback} callback Node-style callback called with the error, if any, and BackupVault - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.getBackupVault = function getBackupVault(request, callback) { - return this.rpcCall(getBackupVault, $root.google.cloud.backupdr.v1.GetBackupVaultRequest, $root.google.cloud.backupdr.v1.BackupVault, request, callback); - }, "name", { value: "GetBackupVault" }); - - /** - * Calls GetBackupVault. - * @function getBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} request GetBackupVaultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackupVault}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef UpdateBackupVaultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateBackupVault. - * @function updateBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} request UpdateBackupVaultRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.UpdateBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.updateBackupVault = function updateBackupVault(request, callback) { - return this.rpcCall(updateBackupVault, $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateBackupVault" }); - - /** - * Calls UpdateBackupVault. - * @function updateBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} request UpdateBackupVaultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupVault}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef DeleteBackupVaultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteBackupVault. - * @function deleteBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} request DeleteBackupVaultRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.deleteBackupVault = function deleteBackupVault(request, callback) { - return this.rpcCall(deleteBackupVault, $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteBackupVault" }); - - /** - * Calls DeleteBackupVault. - * @function deleteBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} request DeleteBackupVaultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|testIamPermissions}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse - */ - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listDataSources}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef ListDataSourcesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ListDataSourcesResponse} [response] ListDataSourcesResponse - */ - - /** - * Calls ListDataSources. - * @function listDataSources - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} request ListDataSourcesRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.ListDataSourcesCallback} callback Node-style callback called with the error, if any, and ListDataSourcesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.listDataSources = function listDataSources(request, callback) { - return this.rpcCall(listDataSources, $root.google.cloud.backupdr.v1.ListDataSourcesRequest, $root.google.cloud.backupdr.v1.ListDataSourcesResponse, request, callback); - }, "name", { value: "ListDataSources" }); - - /** - * Calls ListDataSources. - * @function listDataSources - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} request ListDataSourcesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getDataSource}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef GetDataSourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.DataSource} [response] DataSource - */ - - /** - * Calls GetDataSource. - * @function getDataSource - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} request GetDataSourceRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.GetDataSourceCallback} callback Node-style callback called with the error, if any, and DataSource - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.getDataSource = function getDataSource(request, callback) { - return this.rpcCall(getDataSource, $root.google.cloud.backupdr.v1.GetDataSourceRequest, $root.google.cloud.backupdr.v1.DataSource, request, callback); - }, "name", { value: "GetDataSource" }); - - /** - * Calls GetDataSource. - * @function getDataSource - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} request GetDataSourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateDataSource}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef UpdateDataSourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateDataSource. - * @function updateDataSource - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} request UpdateDataSourceRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.UpdateDataSourceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.updateDataSource = function updateDataSource(request, callback) { - return this.rpcCall(updateDataSource, $root.google.cloud.backupdr.v1.UpdateDataSourceRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateDataSource" }); - - /** - * Calls UpdateDataSource. - * @function updateDataSource - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} request UpdateDataSourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|removeDataSource}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef RemoveDataSourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RemoveDataSource. - * @function removeDataSource - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} request RemoveDataSourceRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.RemoveDataSourceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.removeDataSource = function removeDataSource(request, callback) { - return this.rpcCall(removeDataSource, $root.google.cloud.backupdr.v1.RemoveDataSourceRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RemoveDataSource" }); - - /** - * Calls RemoveDataSource. - * @function removeDataSource - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} request RemoveDataSourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|setInternalStatus}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef SetInternalStatusCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls SetInternalStatus. - * @function setInternalStatus - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} request SetInternalStatusRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.SetInternalStatusCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.setInternalStatus = function setInternalStatus(request, callback) { - return this.rpcCall(setInternalStatus, $root.google.cloud.backupdr.v1.SetInternalStatusRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "SetInternalStatus" }); - - /** - * Calls SetInternalStatus. - * @function setInternalStatus - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} request SetInternalStatusRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|initiateBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef InitiateBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.InitiateBackupResponse} [response] InitiateBackupResponse - */ - - /** - * Calls InitiateBackup. - * @function initiateBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} request InitiateBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.InitiateBackupCallback} callback Node-style callback called with the error, if any, and InitiateBackupResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.initiateBackup = function initiateBackup(request, callback) { - return this.rpcCall(initiateBackup, $root.google.cloud.backupdr.v1.InitiateBackupRequest, $root.google.cloud.backupdr.v1.InitiateBackupResponse, request, callback); - }, "name", { value: "InitiateBackup" }); - - /** - * Calls InitiateBackup. - * @function initiateBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} request InitiateBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|abandonBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef AbandonBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls AbandonBackup. - * @function abandonBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} request AbandonBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.AbandonBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.abandonBackup = function abandonBackup(request, callback) { - return this.rpcCall(abandonBackup, $root.google.cloud.backupdr.v1.AbandonBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "AbandonBackup" }); - - /** - * Calls AbandonBackup. - * @function abandonBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} request AbandonBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|finalizeBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef FinalizeBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls FinalizeBackup. - * @function finalizeBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} request FinalizeBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.FinalizeBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.finalizeBackup = function finalizeBackup(request, callback) { - return this.rpcCall(finalizeBackup, $root.google.cloud.backupdr.v1.FinalizeBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "FinalizeBackup" }); - - /** - * Calls FinalizeBackup. - * @function finalizeBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} request FinalizeBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchAccessToken}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef FetchAccessTokenCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.FetchAccessTokenResponse} [response] FetchAccessTokenResponse - */ - - /** - * Calls FetchAccessToken. - * @function fetchAccessToken - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} request FetchAccessTokenRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.FetchAccessTokenCallback} callback Node-style callback called with the error, if any, and FetchAccessTokenResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.fetchAccessToken = function fetchAccessToken(request, callback) { - return this.rpcCall(fetchAccessToken, $root.google.cloud.backupdr.v1.FetchAccessTokenRequest, $root.google.cloud.backupdr.v1.FetchAccessTokenResponse, request, callback); - }, "name", { value: "FetchAccessToken" }); - - /** - * Calls FetchAccessToken. - * @function fetchAccessToken - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} request FetchAccessTokenRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackups}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef ListBackupsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ListBackupsResponse} [response] ListBackupsResponse - */ - - /** - * Calls ListBackups. - * @function listBackups - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupsRequest} request ListBackupsRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.ListBackupsCallback} callback Node-style callback called with the error, if any, and ListBackupsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.listBackups = function listBackups(request, callback) { - return this.rpcCall(listBackups, $root.google.cloud.backupdr.v1.ListBackupsRequest, $root.google.cloud.backupdr.v1.ListBackupsResponse, request, callback); - }, "name", { value: "ListBackups" }); - - /** - * Calls ListBackups. - * @function listBackups - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupsRequest} request ListBackupsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef GetBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.Backup} [response] Backup - */ - - /** - * Calls GetBackup. - * @function getBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupRequest} request GetBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.GetBackupCallback} callback Node-style callback called with the error, if any, and Backup - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.getBackup = function getBackup(request, callback) { - return this.rpcCall(getBackup, $root.google.cloud.backupdr.v1.GetBackupRequest, $root.google.cloud.backupdr.v1.Backup, request, callback); - }, "name", { value: "GetBackup" }); - - /** - * Calls GetBackup. - * @function getBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupRequest} request GetBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef UpdateBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateBackup. - * @function updateBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} request UpdateBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.UpdateBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.updateBackup = function updateBackup(request, callback) { - return this.rpcCall(updateBackup, $root.google.cloud.backupdr.v1.UpdateBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateBackup" }); - - /** - * Calls UpdateBackup. - * @function updateBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} request UpdateBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef DeleteBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteBackup. - * @function deleteBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} request DeleteBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.deleteBackup = function deleteBackup(request, callback) { - return this.rpcCall(deleteBackup, $root.google.cloud.backupdr.v1.DeleteBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteBackup" }); - - /** - * Calls DeleteBackup. - * @function deleteBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} request DeleteBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|restoreBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef RestoreBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RestoreBackup. - * @function restoreBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} request RestoreBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.RestoreBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.restoreBackup = function restoreBackup(request, callback) { - return this.rpcCall(restoreBackup, $root.google.cloud.backupdr.v1.RestoreBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RestoreBackup" }); - - /** - * Calls RestoreBackup. - * @function restoreBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} request RestoreBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlan}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef CreateBackupPlanCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateBackupPlan. - * @function createBackupPlan - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} request CreateBackupPlanRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupPlanCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.createBackupPlan = function createBackupPlan(request, callback) { - return this.rpcCall(createBackupPlan, $root.google.cloud.backupdr.v1.CreateBackupPlanRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateBackupPlan" }); - - /** - * Calls CreateBackupPlan. - * @function createBackupPlan - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} request CreateBackupPlanRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlan}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef GetBackupPlanCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.BackupPlan} [response] BackupPlan - */ - - /** - * Calls GetBackupPlan. - * @function getBackupPlan - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} request GetBackupPlanRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.GetBackupPlanCallback} callback Node-style callback called with the error, if any, and BackupPlan - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.getBackupPlan = function getBackupPlan(request, callback) { - return this.rpcCall(getBackupPlan, $root.google.cloud.backupdr.v1.GetBackupPlanRequest, $root.google.cloud.backupdr.v1.BackupPlan, request, callback); - }, "name", { value: "GetBackupPlan" }); - - /** - * Calls GetBackupPlan. - * @function getBackupPlan - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} request GetBackupPlanRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlans}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef ListBackupPlansCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ListBackupPlansResponse} [response] ListBackupPlansResponse - */ - - /** - * Calls ListBackupPlans. - * @function listBackupPlans - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} request ListBackupPlansRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.ListBackupPlansCallback} callback Node-style callback called with the error, if any, and ListBackupPlansResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.listBackupPlans = function listBackupPlans(request, callback) { - return this.rpcCall(listBackupPlans, $root.google.cloud.backupdr.v1.ListBackupPlansRequest, $root.google.cloud.backupdr.v1.ListBackupPlansResponse, request, callback); - }, "name", { value: "ListBackupPlans" }); - - /** - * Calls ListBackupPlans. - * @function listBackupPlans - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} request ListBackupPlansRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlan}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef DeleteBackupPlanCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteBackupPlan. - * @function deleteBackupPlan - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} request DeleteBackupPlanRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.deleteBackupPlan = function deleteBackupPlan(request, callback) { - return this.rpcCall(deleteBackupPlan, $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteBackupPlan" }); - - /** - * Calls DeleteBackupPlan. - * @function deleteBackupPlan - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} request DeleteBackupPlanRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlanAssociation}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef CreateBackupPlanAssociationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateBackupPlanAssociation. - * @function createBackupPlanAssociation - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} request CreateBackupPlanAssociationRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.createBackupPlanAssociation = function createBackupPlanAssociation(request, callback) { - return this.rpcCall(createBackupPlanAssociation, $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateBackupPlanAssociation" }); - - /** - * Calls CreateBackupPlanAssociation. - * @function createBackupPlanAssociation - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} request CreateBackupPlanAssociationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlanAssociation}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef GetBackupPlanAssociationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.BackupPlanAssociation} [response] BackupPlanAssociation - */ - - /** - * Calls GetBackupPlanAssociation. - * @function getBackupPlanAssociation - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} request GetBackupPlanAssociationRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and BackupPlanAssociation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.getBackupPlanAssociation = function getBackupPlanAssociation(request, callback) { - return this.rpcCall(getBackupPlanAssociation, $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest, $root.google.cloud.backupdr.v1.BackupPlanAssociation, request, callback); - }, "name", { value: "GetBackupPlanAssociation" }); - - /** - * Calls GetBackupPlanAssociation. - * @function getBackupPlanAssociation - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} request GetBackupPlanAssociationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlanAssociations}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef ListBackupPlanAssociationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} [response] ListBackupPlanAssociationsResponse - */ - - /** - * Calls ListBackupPlanAssociations. - * @function listBackupPlanAssociations - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} request ListBackupPlanAssociationsRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociationsCallback} callback Node-style callback called with the error, if any, and ListBackupPlanAssociationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.listBackupPlanAssociations = function listBackupPlanAssociations(request, callback) { - return this.rpcCall(listBackupPlanAssociations, $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest, $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse, request, callback); - }, "name", { value: "ListBackupPlanAssociations" }); - - /** - * Calls ListBackupPlanAssociations. - * @function listBackupPlanAssociations - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} request ListBackupPlanAssociationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlanAssociation}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef DeleteBackupPlanAssociationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteBackupPlanAssociation. - * @function deleteBackupPlanAssociation - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} request DeleteBackupPlanAssociationRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.deleteBackupPlanAssociation = function deleteBackupPlanAssociation(request, callback) { - return this.rpcCall(deleteBackupPlanAssociation, $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteBackupPlanAssociation" }); - - /** - * Calls DeleteBackupPlanAssociation. - * @function deleteBackupPlanAssociation - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} request DeleteBackupPlanAssociationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|triggerBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef TriggerBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls TriggerBackup. - * @function triggerBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} request TriggerBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.TriggerBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.triggerBackup = function triggerBackup(request, callback) { - return this.rpcCall(triggerBackup, $root.google.cloud.backupdr.v1.TriggerBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "TriggerBackup" }); - - /** - * Calls TriggerBackup. - * @function triggerBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} request TriggerBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return BackupDR; - })(); - - v1.NetworkConfig = (function() { - - /** - * Properties of a NetworkConfig. - * @memberof google.cloud.backupdr.v1 - * @interface INetworkConfig - * @property {string|null} [network] NetworkConfig network - * @property {google.cloud.backupdr.v1.NetworkConfig.PeeringMode|null} [peeringMode] NetworkConfig peeringMode - */ - - /** - * Constructs a new NetworkConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a NetworkConfig. - * @implements INetworkConfig - * @constructor - * @param {google.cloud.backupdr.v1.INetworkConfig=} [properties] Properties to set - */ - function NetworkConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkConfig network. - * @member {string} network - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.network = ""; - - /** - * NetworkConfig peeringMode. - * @member {google.cloud.backupdr.v1.NetworkConfig.PeeringMode} peeringMode - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.peeringMode = 0; - - /** - * Creates a new NetworkConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig instance - */ - NetworkConfig.create = function create(properties) { - return new NetworkConfig(properties); - }; - - /** - * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkConfig} message NetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); - if (message.peeringMode != null && Object.hasOwnProperty.call(message, "peeringMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.peeringMode); - return writer; - }; - - /** - * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkConfig} message NetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkConfig.decode = function 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.backupdr.v1.NetworkConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.network = reader.string(); - break; - } - case 2: { - message.peeringMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.peeringMode != null && message.hasOwnProperty("peeringMode")) - switch (message.peeringMode) { - default: - return "peeringMode: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig - */ - NetworkConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.NetworkConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.NetworkConfig(); - if (object.network != null) - message.network = String(object.network); - switch (object.peeringMode) { - default: - if (typeof object.peeringMode === "number") { - message.peeringMode = object.peeringMode; - break; - } - break; - case "PEERING_MODE_UNSPECIFIED": - case 0: - message.peeringMode = 0; - break; - case "PRIVATE_SERVICE_ACCESS": - case 1: - message.peeringMode = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.NetworkConfig} message NetworkConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.network = ""; - object.peeringMode = options.enums === String ? "PEERING_MODE_UNSPECIFIED" : 0; - } - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.peeringMode != null && message.hasOwnProperty("peeringMode")) - object.peeringMode = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode] === undefined ? message.peeringMode : $root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode] : message.peeringMode; - return object; - }; - - /** - * Converts this NetworkConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @instance - * @returns {Object.} JSON object - */ - NetworkConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkConfig"; - }; - - /** - * PeeringMode enum. - * @name google.cloud.backupdr.v1.NetworkConfig.PeeringMode - * @enum {number} - * @property {number} PEERING_MODE_UNSPECIFIED=0 PEERING_MODE_UNSPECIFIED value - * @property {number} PRIVATE_SERVICE_ACCESS=1 PRIVATE_SERVICE_ACCESS value - */ - NetworkConfig.PeeringMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PEERING_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRIVATE_SERVICE_ACCESS"] = 1; - return values; - })(); - - return NetworkConfig; - })(); - - v1.ManagementURI = (function() { - - /** - * Properties of a ManagementURI. - * @memberof google.cloud.backupdr.v1 - * @interface IManagementURI - * @property {string|null} [webUi] ManagementURI webUi - * @property {string|null} [api] ManagementURI api - */ - - /** - * Constructs a new ManagementURI. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ManagementURI. - * @implements IManagementURI - * @constructor - * @param {google.cloud.backupdr.v1.IManagementURI=} [properties] Properties to set - */ - function ManagementURI(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ManagementURI webUi. - * @member {string} webUi - * @memberof google.cloud.backupdr.v1.ManagementURI - * @instance - */ - ManagementURI.prototype.webUi = ""; - - /** - * ManagementURI api. - * @member {string} api - * @memberof google.cloud.backupdr.v1.ManagementURI - * @instance - */ - ManagementURI.prototype.api = ""; - - /** - * Creates a new ManagementURI instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.IManagementURI=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI instance - */ - ManagementURI.create = function create(properties) { - return new ManagementURI(properties); - }; - - /** - * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.IManagementURI} message ManagementURI message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ManagementURI.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.webUi != null && Object.hasOwnProperty.call(message, "webUi")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.webUi); - if (message.api != null && Object.hasOwnProperty.call(message, "api")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.api); - return writer; - }; - - /** - * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.IManagementURI} message ManagementURI message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ManagementURI.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ManagementURI message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ManagementURI.decode = function 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.backupdr.v1.ManagementURI(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.webUi = reader.string(); - break; - } - case 2: { - message.api = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ManagementURI message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ManagementURI.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ManagementURI message. - * @function verify - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ManagementURI.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.webUi != null && message.hasOwnProperty("webUi")) - if (!$util.isString(message.webUi)) - return "webUi: string expected"; - if (message.api != null && message.hasOwnProperty("api")) - if (!$util.isString(message.api)) - return "api: string expected"; - return null; - }; - - /** - * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI - */ - ManagementURI.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ManagementURI) - return object; - var message = new $root.google.cloud.backupdr.v1.ManagementURI(); - if (object.webUi != null) - message.webUi = String(object.webUi); - if (object.api != null) - message.api = String(object.api); - return message; - }; - - /** - * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.ManagementURI} message ManagementURI - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ManagementURI.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.webUi = ""; - object.api = ""; - } - if (message.webUi != null && message.hasOwnProperty("webUi")) - object.webUi = message.webUi; - if (message.api != null && message.hasOwnProperty("api")) - object.api = message.api; - return object; - }; - - /** - * Converts this ManagementURI to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ManagementURI - * @instance - * @returns {Object.} JSON object - */ - ManagementURI.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ManagementURI - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ManagementURI.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ManagementURI"; - }; - - return ManagementURI; - })(); - - v1.WorkforceIdentityBasedManagementURI = (function() { - - /** - * Properties of a WorkforceIdentityBasedManagementURI. - * @memberof google.cloud.backupdr.v1 - * @interface IWorkforceIdentityBasedManagementURI - * @property {string|null} [firstPartyManagementUri] WorkforceIdentityBasedManagementURI firstPartyManagementUri - * @property {string|null} [thirdPartyManagementUri] WorkforceIdentityBasedManagementURI thirdPartyManagementUri - */ - - /** - * Constructs a new WorkforceIdentityBasedManagementURI. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a WorkforceIdentityBasedManagementURI. - * @implements IWorkforceIdentityBasedManagementURI - * @constructor - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI=} [properties] Properties to set - */ - function WorkforceIdentityBasedManagementURI(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkforceIdentityBasedManagementURI firstPartyManagementUri. - * @member {string} firstPartyManagementUri - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @instance - */ - WorkforceIdentityBasedManagementURI.prototype.firstPartyManagementUri = ""; - - /** - * WorkforceIdentityBasedManagementURI thirdPartyManagementUri. - * @member {string} thirdPartyManagementUri - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @instance - */ - WorkforceIdentityBasedManagementURI.prototype.thirdPartyManagementUri = ""; - - /** - * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI instance - */ - WorkforceIdentityBasedManagementURI.create = function create(properties) { - return new WorkforceIdentityBasedManagementURI(properties); - }; - - /** - * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkforceIdentityBasedManagementURI.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.firstPartyManagementUri != null && Object.hasOwnProperty.call(message, "firstPartyManagementUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.firstPartyManagementUri); - if (message.thirdPartyManagementUri != null && Object.hasOwnProperty.call(message, "thirdPartyManagementUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.thirdPartyManagementUri); - return writer; - }; - - /** - * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkforceIdentityBasedManagementURI.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkforceIdentityBasedManagementURI.decode = function 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.backupdr.v1.WorkforceIdentityBasedManagementURI(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.firstPartyManagementUri = reader.string(); - break; - } - case 2: { - message.thirdPartyManagementUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkforceIdentityBasedManagementURI.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkforceIdentityBasedManagementURI message. - * @function verify - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkforceIdentityBasedManagementURI.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.firstPartyManagementUri != null && message.hasOwnProperty("firstPartyManagementUri")) - if (!$util.isString(message.firstPartyManagementUri)) - return "firstPartyManagementUri: string expected"; - if (message.thirdPartyManagementUri != null && message.hasOwnProperty("thirdPartyManagementUri")) - if (!$util.isString(message.thirdPartyManagementUri)) - return "thirdPartyManagementUri: string expected"; - return null; - }; - - /** - * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI - */ - WorkforceIdentityBasedManagementURI.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI) - return object; - var message = new $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI(); - if (object.firstPartyManagementUri != null) - message.firstPartyManagementUri = String(object.firstPartyManagementUri); - if (object.thirdPartyManagementUri != null) - message.thirdPartyManagementUri = String(object.thirdPartyManagementUri); - return message; - }; - - /** - * Creates a plain object from a WorkforceIdentityBasedManagementURI message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkforceIdentityBasedManagementURI.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.firstPartyManagementUri = ""; - object.thirdPartyManagementUri = ""; - } - if (message.firstPartyManagementUri != null && message.hasOwnProperty("firstPartyManagementUri")) - object.firstPartyManagementUri = message.firstPartyManagementUri; - if (message.thirdPartyManagementUri != null && message.hasOwnProperty("thirdPartyManagementUri")) - object.thirdPartyManagementUri = message.thirdPartyManagementUri; - return object; - }; - - /** - * Converts this WorkforceIdentityBasedManagementURI to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @instance - * @returns {Object.} JSON object - */ - WorkforceIdentityBasedManagementURI.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkforceIdentityBasedManagementURI - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkforceIdentityBasedManagementURI.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI"; - }; - - return WorkforceIdentityBasedManagementURI; - })(); - - v1.WorkforceIdentityBasedOAuth2ClientID = (function() { - - /** - * Properties of a WorkforceIdentityBasedOAuth2ClientID. - * @memberof google.cloud.backupdr.v1 - * @interface IWorkforceIdentityBasedOAuth2ClientID - * @property {string|null} [firstPartyOauth2ClientId] WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId - * @property {string|null} [thirdPartyOauth2ClientId] WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId - */ - - /** - * Constructs a new WorkforceIdentityBasedOAuth2ClientID. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a WorkforceIdentityBasedOAuth2ClientID. - * @implements IWorkforceIdentityBasedOAuth2ClientID - * @constructor - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID=} [properties] Properties to set - */ - function WorkforceIdentityBasedOAuth2ClientID(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId. - * @member {string} firstPartyOauth2ClientId - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @instance - */ - WorkforceIdentityBasedOAuth2ClientID.prototype.firstPartyOauth2ClientId = ""; - - /** - * WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId. - * @member {string} thirdPartyOauth2ClientId - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @instance - */ - WorkforceIdentityBasedOAuth2ClientID.prototype.thirdPartyOauth2ClientId = ""; - - /** - * Creates a new WorkforceIdentityBasedOAuth2ClientID instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID instance - */ - WorkforceIdentityBasedOAuth2ClientID.create = function create(properties) { - return new WorkforceIdentityBasedOAuth2ClientID(properties); - }; - - /** - * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID} message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkforceIdentityBasedOAuth2ClientID.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.firstPartyOauth2ClientId != null && Object.hasOwnProperty.call(message, "firstPartyOauth2ClientId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.firstPartyOauth2ClientId); - if (message.thirdPartyOauth2ClientId != null && Object.hasOwnProperty.call(message, "thirdPartyOauth2ClientId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.thirdPartyOauth2ClientId); - return writer; - }; - - /** - * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID} message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkforceIdentityBasedOAuth2ClientID.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkforceIdentityBasedOAuth2ClientID.decode = function 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.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.firstPartyOauth2ClientId = reader.string(); - break; - } - case 2: { - message.thirdPartyOauth2ClientId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkforceIdentityBasedOAuth2ClientID.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkforceIdentityBasedOAuth2ClientID message. - * @function verify - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkforceIdentityBasedOAuth2ClientID.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.firstPartyOauth2ClientId != null && message.hasOwnProperty("firstPartyOauth2ClientId")) - if (!$util.isString(message.firstPartyOauth2ClientId)) - return "firstPartyOauth2ClientId: string expected"; - if (message.thirdPartyOauth2ClientId != null && message.hasOwnProperty("thirdPartyOauth2ClientId")) - if (!$util.isString(message.thirdPartyOauth2ClientId)) - return "thirdPartyOauth2ClientId: string expected"; - return null; - }; - - /** - * Creates a WorkforceIdentityBasedOAuth2ClientID message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID - */ - WorkforceIdentityBasedOAuth2ClientID.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID) - return object; - var message = new $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID(); - if (object.firstPartyOauth2ClientId != null) - message.firstPartyOauth2ClientId = String(object.firstPartyOauth2ClientId); - if (object.thirdPartyOauth2ClientId != null) - message.thirdPartyOauth2ClientId = String(object.thirdPartyOauth2ClientId); - return message; - }; - - /** - * Creates a plain object from a WorkforceIdentityBasedOAuth2ClientID message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} message WorkforceIdentityBasedOAuth2ClientID - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkforceIdentityBasedOAuth2ClientID.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.firstPartyOauth2ClientId = ""; - object.thirdPartyOauth2ClientId = ""; - } - if (message.firstPartyOauth2ClientId != null && message.hasOwnProperty("firstPartyOauth2ClientId")) - object.firstPartyOauth2ClientId = message.firstPartyOauth2ClientId; - if (message.thirdPartyOauth2ClientId != null && message.hasOwnProperty("thirdPartyOauth2ClientId")) - object.thirdPartyOauth2ClientId = message.thirdPartyOauth2ClientId; - return object; - }; - - /** - * Converts this WorkforceIdentityBasedOAuth2ClientID to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @instance - * @returns {Object.} JSON object - */ - WorkforceIdentityBasedOAuth2ClientID.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkforceIdentityBasedOAuth2ClientID - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkforceIdentityBasedOAuth2ClientID.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID"; - }; - - return WorkforceIdentityBasedOAuth2ClientID; - })(); - - v1.ManagementServer = (function() { - - /** - * Properties of a ManagementServer. - * @memberof google.cloud.backupdr.v1 - * @interface IManagementServer - * @property {string|null} [name] ManagementServer name - * @property {string|null} [description] ManagementServer description - * @property {Object.|null} [labels] ManagementServer labels - * @property {google.protobuf.ITimestamp|null} [createTime] ManagementServer createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ManagementServer updateTime - * @property {google.cloud.backupdr.v1.ManagementServer.InstanceType|null} [type] ManagementServer type - * @property {google.cloud.backupdr.v1.IManagementURI|null} [managementUri] ManagementServer managementUri - * @property {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null} [workforceIdentityBasedManagementUri] ManagementServer workforceIdentityBasedManagementUri - * @property {google.cloud.backupdr.v1.ManagementServer.InstanceState|null} [state] ManagementServer state - * @property {Array.|null} [networks] ManagementServer networks - * @property {string|null} [etag] ManagementServer etag - * @property {string|null} [oauth2ClientId] ManagementServer oauth2ClientId - * @property {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null} [workforceIdentityBasedOauth2ClientId] ManagementServer workforceIdentityBasedOauth2ClientId - * @property {Array.|null} [baProxyUri] ManagementServer baProxyUri - * @property {google.protobuf.IBoolValue|null} [satisfiesPzs] ManagementServer satisfiesPzs - * @property {boolean|null} [satisfiesPzi] ManagementServer satisfiesPzi - */ - - /** - * Constructs a new ManagementServer. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ManagementServer. - * @implements IManagementServer - * @constructor - * @param {google.cloud.backupdr.v1.IManagementServer=} [properties] Properties to set - */ - function ManagementServer(properties) { - this.labels = {}; - this.networks = []; - this.baProxyUri = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ManagementServer name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.name = ""; - - /** - * ManagementServer description. - * @member {string} description - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.description = ""; - - /** - * ManagementServer labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.labels = $util.emptyObject; - - /** - * ManagementServer createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.createTime = null; - - /** - * ManagementServer updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.updateTime = null; - - /** - * ManagementServer type. - * @member {google.cloud.backupdr.v1.ManagementServer.InstanceType} type - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.type = 0; - - /** - * ManagementServer managementUri. - * @member {google.cloud.backupdr.v1.IManagementURI|null|undefined} managementUri - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.managementUri = null; - - /** - * ManagementServer workforceIdentityBasedManagementUri. - * @member {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null|undefined} workforceIdentityBasedManagementUri - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.workforceIdentityBasedManagementUri = null; - - /** - * ManagementServer state. - * @member {google.cloud.backupdr.v1.ManagementServer.InstanceState} state - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.state = 0; - - /** - * ManagementServer networks. - * @member {Array.} networks - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.networks = $util.emptyArray; - - /** - * ManagementServer etag. - * @member {string} etag - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.etag = ""; - - /** - * ManagementServer oauth2ClientId. - * @member {string} oauth2ClientId - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.oauth2ClientId = ""; - - /** - * ManagementServer workforceIdentityBasedOauth2ClientId. - * @member {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null|undefined} workforceIdentityBasedOauth2ClientId - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.workforceIdentityBasedOauth2ClientId = null; - - /** - * ManagementServer baProxyUri. - * @member {Array.} baProxyUri - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.baProxyUri = $util.emptyArray; - - /** - * ManagementServer satisfiesPzs. - * @member {google.protobuf.IBoolValue|null|undefined} satisfiesPzs - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.satisfiesPzs = null; - - /** - * ManagementServer satisfiesPzi. - * @member {boolean} satisfiesPzi - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.satisfiesPzi = false; - - /** - * Creates a new ManagementServer instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {google.cloud.backupdr.v1.IManagementServer=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer instance - */ - ManagementServer.create = function create(properties) { - return new ManagementServer(properties); - }; - - /** - * Encodes the specified ManagementServer message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {google.cloud.backupdr.v1.IManagementServer} message ManagementServer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ManagementServer.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.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); - if (message.networks != null && message.networks.length) - for (var i = 0; i < message.networks.length; ++i) - $root.google.cloud.backupdr.v1.NetworkConfig.encode(message.networks[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.description); - if (message.managementUri != null && Object.hasOwnProperty.call(message, "managementUri")) - $root.google.cloud.backupdr.v1.ManagementURI.encode(message.managementUri, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.etag); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.type); - if (message.oauth2ClientId != null && Object.hasOwnProperty.call(message, "oauth2ClientId")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.oauth2ClientId); - if (message.workforceIdentityBasedManagementUri != null && Object.hasOwnProperty.call(message, "workforceIdentityBasedManagementUri")) - $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.encode(message.workforceIdentityBasedManagementUri, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.workforceIdentityBasedOauth2ClientId != null && Object.hasOwnProperty.call(message, "workforceIdentityBasedOauth2ClientId")) - $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.encode(message.workforceIdentityBasedOauth2ClientId, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.baProxyUri != null && message.baProxyUri.length) - for (var i = 0; i < message.baProxyUri.length; ++i) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.baProxyUri[i]); - if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) - $root.google.protobuf.BoolValue.encode(message.satisfiesPzs, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.satisfiesPzi); - return writer; - }; - - /** - * Encodes the specified ManagementServer message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {google.cloud.backupdr.v1.IManagementServer} message ManagementServer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ManagementServer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ManagementServer message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ManagementServer.decode = function 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.backupdr.v1.ManagementServer(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 9: { - message.description = reader.string(); - 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 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 14: { - message.type = reader.int32(); - break; - } - case 11: { - message.managementUri = $root.google.cloud.backupdr.v1.ManagementURI.decode(reader, reader.uint32()); - break; - } - case 16: { - message.workforceIdentityBasedManagementUri = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.decode(reader, reader.uint32()); - break; - } - case 7: { - message.state = reader.int32(); - break; - } - case 8: { - if (!(message.networks && message.networks.length)) - message.networks = []; - message.networks.push($root.google.cloud.backupdr.v1.NetworkConfig.decode(reader, reader.uint32())); - break; - } - case 13: { - message.etag = reader.string(); - break; - } - case 15: { - message.oauth2ClientId = reader.string(); - break; - } - case 17: { - message.workforceIdentityBasedOauth2ClientId = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.decode(reader, reader.uint32()); - break; - } - case 18: { - if (!(message.baProxyUri && message.baProxyUri.length)) - message.baProxyUri = []; - message.baProxyUri.push(reader.string()); - break; - } - case 19: { - message.satisfiesPzs = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - } - case 20: { - message.satisfiesPzi = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ManagementServer message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ManagementServer.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ManagementServer message. - * @function verify - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ManagementServer.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - 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.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } - if (message.managementUri != null && message.hasOwnProperty("managementUri")) { - var error = $root.google.cloud.backupdr.v1.ManagementURI.verify(message.managementUri); - if (error) - return "managementUri." + error; - } - if (message.workforceIdentityBasedManagementUri != null && message.hasOwnProperty("workforceIdentityBasedManagementUri")) { - var error = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify(message.workforceIdentityBasedManagementUri); - if (error) - return "workforceIdentityBasedManagementUri." + 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: - break; - } - if (message.networks != null && message.hasOwnProperty("networks")) { - if (!Array.isArray(message.networks)) - return "networks: array expected"; - for (var i = 0; i < message.networks.length; ++i) { - var error = $root.google.cloud.backupdr.v1.NetworkConfig.verify(message.networks[i]); - if (error) - return "networks." + error; - } - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.oauth2ClientId != null && message.hasOwnProperty("oauth2ClientId")) - if (!$util.isString(message.oauth2ClientId)) - return "oauth2ClientId: string expected"; - if (message.workforceIdentityBasedOauth2ClientId != null && message.hasOwnProperty("workforceIdentityBasedOauth2ClientId")) { - var error = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify(message.workforceIdentityBasedOauth2ClientId); - if (error) - return "workforceIdentityBasedOauth2ClientId." + error; - } - if (message.baProxyUri != null && message.hasOwnProperty("baProxyUri")) { - if (!Array.isArray(message.baProxyUri)) - return "baProxyUri: array expected"; - for (var i = 0; i < message.baProxyUri.length; ++i) - if (!$util.isString(message.baProxyUri[i])) - return "baProxyUri: string[] expected"; - } - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { - var error = $root.google.protobuf.BoolValue.verify(message.satisfiesPzs); - if (error) - return "satisfiesPzs." + error; - } - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) - if (typeof message.satisfiesPzi !== "boolean") - return "satisfiesPzi: boolean expected"; - return null; - }; - - /** - * Creates a ManagementServer message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer - */ - ManagementServer.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ManagementServer) - return object; - var message = new $root.google.cloud.backupdr.v1.ManagementServer(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.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.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.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.backupdr.v1.ManagementServer.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "INSTANCE_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "BACKUP_RESTORE": - case 1: - message.type = 1; - break; - } - if (object.managementUri != null) { - if (typeof object.managementUri !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.managementUri: object expected"); - message.managementUri = $root.google.cloud.backupdr.v1.ManagementURI.fromObject(object.managementUri); - } - if (object.workforceIdentityBasedManagementUri != null) { - if (typeof object.workforceIdentityBasedManagementUri !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.workforceIdentityBasedManagementUri: object expected"); - message.workforceIdentityBasedManagementUri = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.fromObject(object.workforceIdentityBasedManagementUri); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "INSTANCE_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "CREATING": - case 1: - message.state = 1; - break; - case "READY": - case 2: - message.state = 2; - break; - case "UPDATING": - case 3: - message.state = 3; - break; - case "DELETING": - case 4: - message.state = 4; - break; - case "REPAIRING": - case 5: - message.state = 5; - break; - case "MAINTENANCE": - case 6: - message.state = 6; - break; - case "ERROR": - case 7: - message.state = 7; - break; - } - if (object.networks) { - if (!Array.isArray(object.networks)) - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.networks: array expected"); - message.networks = []; - for (var i = 0; i < object.networks.length; ++i) { - if (typeof object.networks[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.networks: object expected"); - message.networks[i] = $root.google.cloud.backupdr.v1.NetworkConfig.fromObject(object.networks[i]); - } - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.oauth2ClientId != null) - message.oauth2ClientId = String(object.oauth2ClientId); - if (object.workforceIdentityBasedOauth2ClientId != null) { - if (typeof object.workforceIdentityBasedOauth2ClientId !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.workforceIdentityBasedOauth2ClientId: object expected"); - message.workforceIdentityBasedOauth2ClientId = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.fromObject(object.workforceIdentityBasedOauth2ClientId); - } - if (object.baProxyUri) { - if (!Array.isArray(object.baProxyUri)) - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.baProxyUri: array expected"); - message.baProxyUri = []; - for (var i = 0; i < object.baProxyUri.length; ++i) - message.baProxyUri[i] = String(object.baProxyUri[i]); - } - if (object.satisfiesPzs != null) { - if (typeof object.satisfiesPzs !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.satisfiesPzs: object expected"); - message.satisfiesPzs = $root.google.protobuf.BoolValue.fromObject(object.satisfiesPzs); - } - if (object.satisfiesPzi != null) - message.satisfiesPzi = Boolean(object.satisfiesPzi); - return message; - }; - - /** - * Creates a plain object from a ManagementServer message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {google.cloud.backupdr.v1.ManagementServer} message ManagementServer - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ManagementServer.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.networks = []; - object.baProxyUri = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.state = options.enums === String ? "INSTANCE_STATE_UNSPECIFIED" : 0; - object.description = ""; - object.managementUri = null; - object.etag = ""; - object.type = options.enums === String ? "INSTANCE_TYPE_UNSPECIFIED" : 0; - object.oauth2ClientId = ""; - object.workforceIdentityBasedManagementUri = null; - object.workforceIdentityBasedOauth2ClientId = null; - object.satisfiesPzs = null; - object.satisfiesPzi = false; - } - 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.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.ManagementServer.InstanceState[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.ManagementServer.InstanceState[message.state] : message.state; - if (message.networks && message.networks.length) { - object.networks = []; - for (var j = 0; j < message.networks.length; ++j) - object.networks[j] = $root.google.cloud.backupdr.v1.NetworkConfig.toObject(message.networks[j], options); - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.managementUri != null && message.hasOwnProperty("managementUri")) - object.managementUri = $root.google.cloud.backupdr.v1.ManagementURI.toObject(message.managementUri, options); - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.backupdr.v1.ManagementServer.InstanceType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.ManagementServer.InstanceType[message.type] : message.type; - if (message.oauth2ClientId != null && message.hasOwnProperty("oauth2ClientId")) - object.oauth2ClientId = message.oauth2ClientId; - if (message.workforceIdentityBasedManagementUri != null && message.hasOwnProperty("workforceIdentityBasedManagementUri")) - object.workforceIdentityBasedManagementUri = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.toObject(message.workforceIdentityBasedManagementUri, options); - if (message.workforceIdentityBasedOauth2ClientId != null && message.hasOwnProperty("workforceIdentityBasedOauth2ClientId")) - object.workforceIdentityBasedOauth2ClientId = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.toObject(message.workforceIdentityBasedOauth2ClientId, options); - if (message.baProxyUri && message.baProxyUri.length) { - object.baProxyUri = []; - for (var j = 0; j < message.baProxyUri.length; ++j) - object.baProxyUri[j] = message.baProxyUri[j]; - } - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) - object.satisfiesPzs = $root.google.protobuf.BoolValue.toObject(message.satisfiesPzs, options); - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) - object.satisfiesPzi = message.satisfiesPzi; - return object; - }; - - /** - * Converts this ManagementServer to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - * @returns {Object.} JSON object - */ - ManagementServer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ManagementServer - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ManagementServer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ManagementServer"; - }; - - /** - * InstanceType enum. - * @name google.cloud.backupdr.v1.ManagementServer.InstanceType - * @enum {number} - * @property {number} INSTANCE_TYPE_UNSPECIFIED=0 INSTANCE_TYPE_UNSPECIFIED value - * @property {number} BACKUP_RESTORE=1 BACKUP_RESTORE value - */ - ManagementServer.InstanceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INSTANCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BACKUP_RESTORE"] = 1; - return values; - })(); - - /** - * InstanceState enum. - * @name google.cloud.backupdr.v1.ManagementServer.InstanceState - * @enum {number} - * @property {number} INSTANCE_STATE_UNSPECIFIED=0 INSTANCE_STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} READY=2 READY value - * @property {number} UPDATING=3 UPDATING value - * @property {number} DELETING=4 DELETING value - * @property {number} REPAIRING=5 REPAIRING value - * @property {number} MAINTENANCE=6 MAINTENANCE value - * @property {number} ERROR=7 ERROR value - */ - ManagementServer.InstanceState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INSTANCE_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "READY"] = 2; - values[valuesById[3] = "UPDATING"] = 3; - values[valuesById[4] = "DELETING"] = 4; - values[valuesById[5] = "REPAIRING"] = 5; - values[valuesById[6] = "MAINTENANCE"] = 6; - values[valuesById[7] = "ERROR"] = 7; - return values; - })(); - - return ManagementServer; - })(); - - v1.ListManagementServersRequest = (function() { - - /** - * Properties of a ListManagementServersRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListManagementServersRequest - * @property {string|null} [parent] ListManagementServersRequest parent - * @property {number|null} [pageSize] ListManagementServersRequest pageSize - * @property {string|null} [pageToken] ListManagementServersRequest pageToken - * @property {string|null} [filter] ListManagementServersRequest filter - * @property {string|null} [orderBy] ListManagementServersRequest orderBy - */ - - /** - * Constructs a new ListManagementServersRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListManagementServersRequest. - * @implements IListManagementServersRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListManagementServersRequest=} [properties] Properties to set - */ - function ListManagementServersRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListManagementServersRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - ListManagementServersRequest.prototype.parent = ""; - - /** - * ListManagementServersRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - ListManagementServersRequest.prototype.pageSize = 0; - - /** - * ListManagementServersRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - ListManagementServersRequest.prototype.pageToken = ""; - - /** - * ListManagementServersRequest filter. - * @member {string|null|undefined} filter - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - ListManagementServersRequest.prototype.filter = null; - - /** - * ListManagementServersRequest orderBy. - * @member {string|null|undefined} orderBy - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - ListManagementServersRequest.prototype.orderBy = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ListManagementServersRequest _filter. - * @member {"filter"|undefined} _filter - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - Object.defineProperty(ListManagementServersRequest.prototype, "_filter", { - get: $util.oneOfGetter($oneOfFields = ["filter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ListManagementServersRequest _orderBy. - * @member {"orderBy"|undefined} _orderBy - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - Object.defineProperty(ListManagementServersRequest.prototype, "_orderBy", { - get: $util.oneOfGetter($oneOfFields = ["orderBy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ListManagementServersRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {google.cloud.backupdr.v1.IListManagementServersRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest instance - */ - ListManagementServersRequest.create = function create(properties) { - return new ListManagementServersRequest(properties); - }; - - /** - * Encodes the specified ListManagementServersRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {google.cloud.backupdr.v1.IListManagementServersRequest} message ListManagementServersRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListManagementServersRequest.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 ListManagementServersRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {google.cloud.backupdr.v1.IListManagementServersRequest} message ListManagementServersRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListManagementServersRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListManagementServersRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListManagementServersRequest.decode = function 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.backupdr.v1.ListManagementServersRequest(); - 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 ListManagementServersRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListManagementServersRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListManagementServersRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListManagementServersRequest.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.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")) { - properties._filter = 1; - if (!$util.isString(message.filter)) - return "filter: string expected"; - } - if (message.orderBy != null && message.hasOwnProperty("orderBy")) { - properties._orderBy = 1; - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - } - return null; - }; - - /** - * Creates a ListManagementServersRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest - */ - ListManagementServersRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListManagementServersRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.ListManagementServersRequest(); - 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 ListManagementServersRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {google.cloud.backupdr.v1.ListManagementServersRequest} message ListManagementServersRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListManagementServersRequest.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; - if (message.filter != null && message.hasOwnProperty("filter")) { - object.filter = message.filter; - if (options.oneofs) - object._filter = "filter"; - } - if (message.orderBy != null && message.hasOwnProperty("orderBy")) { - object.orderBy = message.orderBy; - if (options.oneofs) - object._orderBy = "orderBy"; - } - return object; - }; - - /** - * Converts this ListManagementServersRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - * @returns {Object.} JSON object - */ - ListManagementServersRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListManagementServersRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListManagementServersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListManagementServersRequest"; - }; - - return ListManagementServersRequest; - })(); - - v1.ListManagementServersResponse = (function() { - - /** - * Properties of a ListManagementServersResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IListManagementServersResponse - * @property {Array.|null} [managementServers] ListManagementServersResponse managementServers - * @property {string|null} [nextPageToken] ListManagementServersResponse nextPageToken - * @property {Array.|null} [unreachable] ListManagementServersResponse unreachable - */ - - /** - * Constructs a new ListManagementServersResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListManagementServersResponse. - * @implements IListManagementServersResponse - * @constructor - * @param {google.cloud.backupdr.v1.IListManagementServersResponse=} [properties] Properties to set - */ - function ListManagementServersResponse(properties) { - this.managementServers = []; - 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]]; - } - - /** - * ListManagementServersResponse managementServers. - * @member {Array.} managementServers - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @instance - */ - ListManagementServersResponse.prototype.managementServers = $util.emptyArray; - - /** - * ListManagementServersResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @instance - */ - ListManagementServersResponse.prototype.nextPageToken = ""; - - /** - * ListManagementServersResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @instance - */ - ListManagementServersResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListManagementServersResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {google.cloud.backupdr.v1.IListManagementServersResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse instance - */ - ListManagementServersResponse.create = function create(properties) { - return new ListManagementServersResponse(properties); - }; - - /** - * Encodes the specified ListManagementServersResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {google.cloud.backupdr.v1.IListManagementServersResponse} message ListManagementServersResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListManagementServersResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.managementServers != null && message.managementServers.length) - for (var i = 0; i < message.managementServers.length; ++i) - $root.google.cloud.backupdr.v1.ManagementServer.encode(message.managementServers[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 ListManagementServersResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {google.cloud.backupdr.v1.IListManagementServersResponse} message ListManagementServersResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListManagementServersResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListManagementServersResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListManagementServersResponse.decode = function 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.backupdr.v1.ListManagementServersResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.managementServers && message.managementServers.length)) - message.managementServers = []; - message.managementServers.push($root.google.cloud.backupdr.v1.ManagementServer.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 ListManagementServersResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListManagementServersResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListManagementServersResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListManagementServersResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.managementServers != null && message.hasOwnProperty("managementServers")) { - if (!Array.isArray(message.managementServers)) - return "managementServers: array expected"; - for (var i = 0; i < message.managementServers.length; ++i) { - var error = $root.google.cloud.backupdr.v1.ManagementServer.verify(message.managementServers[i]); - if (error) - return "managementServers." + 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 ListManagementServersResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse - */ - ListManagementServersResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListManagementServersResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListManagementServersResponse(); - if (object.managementServers) { - if (!Array.isArray(object.managementServers)) - throw TypeError(".google.cloud.backupdr.v1.ListManagementServersResponse.managementServers: array expected"); - message.managementServers = []; - for (var i = 0; i < object.managementServers.length; ++i) { - if (typeof object.managementServers[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListManagementServersResponse.managementServers: object expected"); - message.managementServers[i] = $root.google.cloud.backupdr.v1.ManagementServer.fromObject(object.managementServers[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListManagementServersResponse.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 ListManagementServersResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {google.cloud.backupdr.v1.ListManagementServersResponse} message ListManagementServersResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListManagementServersResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.managementServers = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.managementServers && message.managementServers.length) { - object.managementServers = []; - for (var j = 0; j < message.managementServers.length; ++j) - object.managementServers[j] = $root.google.cloud.backupdr.v1.ManagementServer.toObject(message.managementServers[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 ListManagementServersResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @instance - * @returns {Object.} JSON object - */ - ListManagementServersResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListManagementServersResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListManagementServersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListManagementServersResponse"; - }; - - return ListManagementServersResponse; - })(); - - v1.GetManagementServerRequest = (function() { - - /** - * Properties of a GetManagementServerRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetManagementServerRequest - * @property {string|null} [name] GetManagementServerRequest name - */ - - /** - * Constructs a new GetManagementServerRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetManagementServerRequest. - * @implements IGetManagementServerRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetManagementServerRequest=} [properties] Properties to set - */ - function GetManagementServerRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetManagementServerRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @instance - */ - GetManagementServerRequest.prototype.name = ""; - - /** - * Creates a new GetManagementServerRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.IGetManagementServerRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest instance - */ - GetManagementServerRequest.create = function create(properties) { - return new GetManagementServerRequest(properties); - }; - - /** - * Encodes the specified GetManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} message GetManagementServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetManagementServerRequest.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 GetManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} message GetManagementServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetManagementServerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetManagementServerRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetManagementServerRequest.decode = function 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.backupdr.v1.GetManagementServerRequest(); - 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 GetManagementServerRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetManagementServerRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetManagementServerRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetManagementServerRequest.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 GetManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest - */ - GetManagementServerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetManagementServerRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.GetManagementServerRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetManagementServerRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.GetManagementServerRequest} message GetManagementServerRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetManagementServerRequest.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 GetManagementServerRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @instance - * @returns {Object.} JSON object - */ - GetManagementServerRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetManagementServerRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetManagementServerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetManagementServerRequest"; - }; - - return GetManagementServerRequest; - })(); - - v1.CreateManagementServerRequest = (function() { - - /** - * Properties of a CreateManagementServerRequest. - * @memberof google.cloud.backupdr.v1 - * @interface ICreateManagementServerRequest - * @property {string|null} [parent] CreateManagementServerRequest parent - * @property {string|null} [managementServerId] CreateManagementServerRequest managementServerId - * @property {google.cloud.backupdr.v1.IManagementServer|null} [managementServer] CreateManagementServerRequest managementServer - * @property {string|null} [requestId] CreateManagementServerRequest requestId - */ - - /** - * Constructs a new CreateManagementServerRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CreateManagementServerRequest. - * @implements ICreateManagementServerRequest - * @constructor - * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest=} [properties] Properties to set - */ - function CreateManagementServerRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateManagementServerRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @instance - */ - CreateManagementServerRequest.prototype.parent = ""; - - /** - * CreateManagementServerRequest managementServerId. - * @member {string} managementServerId - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @instance - */ - CreateManagementServerRequest.prototype.managementServerId = ""; - - /** - * CreateManagementServerRequest managementServer. - * @member {google.cloud.backupdr.v1.IManagementServer|null|undefined} managementServer - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @instance - */ - CreateManagementServerRequest.prototype.managementServer = null; - - /** - * CreateManagementServerRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @instance - */ - CreateManagementServerRequest.prototype.requestId = ""; - - /** - * Creates a new CreateManagementServerRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest instance - */ - CreateManagementServerRequest.create = function create(properties) { - return new CreateManagementServerRequest(properties); - }; - - /** - * Encodes the specified CreateManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} message CreateManagementServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateManagementServerRequest.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.managementServerId != null && Object.hasOwnProperty.call(message, "managementServerId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.managementServerId); - if (message.managementServer != null && Object.hasOwnProperty.call(message, "managementServer")) - $root.google.cloud.backupdr.v1.ManagementServer.encode(message.managementServer, 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 CreateManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} message CreateManagementServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateManagementServerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateManagementServerRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateManagementServerRequest.decode = function 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.backupdr.v1.CreateManagementServerRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.managementServerId = reader.string(); - break; - } - case 3: { - message.managementServer = $root.google.cloud.backupdr.v1.ManagementServer.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateManagementServerRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateManagementServerRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateManagementServerRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateManagementServerRequest.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.managementServerId != null && message.hasOwnProperty("managementServerId")) - if (!$util.isString(message.managementServerId)) - return "managementServerId: string expected"; - if (message.managementServer != null && message.hasOwnProperty("managementServer")) { - var error = $root.google.cloud.backupdr.v1.ManagementServer.verify(message.managementServer); - if (error) - return "managementServer." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a CreateManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest - */ - CreateManagementServerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CreateManagementServerRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.CreateManagementServerRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.managementServerId != null) - message.managementServerId = String(object.managementServerId); - if (object.managementServer != null) { - if (typeof object.managementServer !== "object") - throw TypeError(".google.cloud.backupdr.v1.CreateManagementServerRequest.managementServer: object expected"); - message.managementServer = $root.google.cloud.backupdr.v1.ManagementServer.fromObject(object.managementServer); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a CreateManagementServerRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.CreateManagementServerRequest} message CreateManagementServerRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateManagementServerRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.managementServerId = ""; - object.managementServer = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.managementServerId != null && message.hasOwnProperty("managementServerId")) - object.managementServerId = message.managementServerId; - if (message.managementServer != null && message.hasOwnProperty("managementServer")) - object.managementServer = $root.google.cloud.backupdr.v1.ManagementServer.toObject(message.managementServer, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this CreateManagementServerRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @instance - * @returns {Object.} JSON object - */ - CreateManagementServerRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateManagementServerRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateManagementServerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateManagementServerRequest"; - }; - - return CreateManagementServerRequest; - })(); - - v1.DeleteManagementServerRequest = (function() { - - /** - * Properties of a DeleteManagementServerRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IDeleteManagementServerRequest - * @property {string|null} [name] DeleteManagementServerRequest name - * @property {string|null} [requestId] DeleteManagementServerRequest requestId - */ - - /** - * Constructs a new DeleteManagementServerRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DeleteManagementServerRequest. - * @implements IDeleteManagementServerRequest - * @constructor - * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest=} [properties] Properties to set - */ - function DeleteManagementServerRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteManagementServerRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @instance - */ - DeleteManagementServerRequest.prototype.name = ""; - - /** - * DeleteManagementServerRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @instance - */ - DeleteManagementServerRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteManagementServerRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest instance - */ - DeleteManagementServerRequest.create = function create(properties) { - return new DeleteManagementServerRequest(properties); - }; - - /** - * Encodes the specified DeleteManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} message DeleteManagementServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteManagementServerRequest.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 DeleteManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} message DeleteManagementServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteManagementServerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteManagementServerRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteManagementServerRequest.decode = function 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.backupdr.v1.DeleteManagementServerRequest(); - 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 DeleteManagementServerRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteManagementServerRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteManagementServerRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteManagementServerRequest.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 DeleteManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest - */ - DeleteManagementServerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DeleteManagementServerRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.DeleteManagementServerRequest(); - 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 DeleteManagementServerRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.DeleteManagementServerRequest} message DeleteManagementServerRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteManagementServerRequest.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 DeleteManagementServerRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteManagementServerRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteManagementServerRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteManagementServerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteManagementServerRequest"; - }; - - return DeleteManagementServerRequest; - })(); - - v1.OperationMetadata = (function() { - - /** - * Properties of an OperationMetadata. - * @memberof google.cloud.backupdr.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 {Object.|null} [additionalInfo] OperationMetadata additionalInfo - */ - - /** - * Constructs a new OperationMetadata. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.cloud.backupdr.v1.IOperationMetadata=} [properties] Properties to set - */ - function OperationMetadata(properties) { - this.additionalInfo = {}; - if (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.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.verb = ""; - - /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.statusMessage = ""; - - /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.requestedCancellation = false; - - /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.apiVersion = ""; - - /** - * OperationMetadata additionalInfo. - * @member {Object.} additionalInfo - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.additionalInfo = $util.emptyObject; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @static - * @param {google.cloud.backupdr.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.OperationMetadata} OperationMetadata instance - */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.backupdr.v1.OperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @static - * @param {google.cloud.backupdr.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.additionalInfo != null && Object.hasOwnProperty.call(message, "additionalInfo")) - for (var keys = Object.keys(message.additionalInfo), i = 0; i < keys.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.additionalInfo[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.OperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @static - * @param {google.cloud.backupdr.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.backupdr.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.backupdr.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.backupdr.v1.OperationMetadata(), key, value; - 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: { - if (message.additionalInfo === $util.emptyObject) - message.additionalInfo = {}; - 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.additionalInfo[key] = value; - 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.backupdr.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.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.backupdr.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.additionalInfo != null && message.hasOwnProperty("additionalInfo")) { - if (!$util.isObject(message.additionalInfo)) - return "additionalInfo: object expected"; - var key = Object.keys(message.additionalInfo); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.additionalInfo[key[i]])) - return "additionalInfo: string{k:string} expected"; - } - return null; - }; - - /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.OperationMetadata} OperationMetadata - */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.OperationMetadata) - return object; - var message = new $root.google.cloud.backupdr.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.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.backupdr.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.additionalInfo) { - if (typeof object.additionalInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.OperationMetadata.additionalInfo: object expected"); - message.additionalInfo = {}; - for (var keys = Object.keys(object.additionalInfo), i = 0; i < keys.length; ++i) - message.additionalInfo[keys[i]] = String(object.additionalInfo[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @static - * @param {google.cloud.backupdr.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.objects || options.defaults) - object.additionalInfo = {}; - if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; - } - 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; - var keys2; - if (message.additionalInfo && (keys2 = Object.keys(message.additionalInfo)).length) { - object.additionalInfo = {}; - for (var j = 0; j < keys2.length; ++j) - object.additionalInfo[keys2[j]] = message.additionalInfo[keys2[j]]; - } - return object; - }; - - /** - * Converts this OperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.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.backupdr.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.backupdr.v1.OperationMetadata"; - }; - - return OperationMetadata; - })(); - - v1.BackupPlan = (function() { - - /** - * Properties of a BackupPlan. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupPlan - * @property {string|null} [name] BackupPlan name - * @property {string|null} [description] BackupPlan description - * @property {Object.|null} [labels] BackupPlan labels - * @property {google.protobuf.ITimestamp|null} [createTime] BackupPlan createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] BackupPlan updateTime - * @property {Array.|null} [backupRules] BackupPlan backupRules - * @property {google.cloud.backupdr.v1.BackupPlan.State|null} [state] BackupPlan state - * @property {string|null} [resourceType] BackupPlan resourceType - * @property {string|null} [etag] BackupPlan etag - * @property {string|null} [backupVault] BackupPlan backupVault - * @property {string|null} [backupVaultServiceAccount] BackupPlan backupVaultServiceAccount - */ - - /** - * Constructs a new BackupPlan. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupPlan. - * @implements IBackupPlan - * @constructor - * @param {google.cloud.backupdr.v1.IBackupPlan=} [properties] Properties to set - */ - function BackupPlan(properties) { - this.labels = {}; - this.backupRules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupPlan name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.name = ""; - - /** - * BackupPlan description. - * @member {string} description - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.description = ""; - - /** - * BackupPlan labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.labels = $util.emptyObject; - - /** - * BackupPlan createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.createTime = null; - - /** - * BackupPlan updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.updateTime = null; - - /** - * BackupPlan backupRules. - * @member {Array.} backupRules - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.backupRules = $util.emptyArray; - - /** - * BackupPlan state. - * @member {google.cloud.backupdr.v1.BackupPlan.State} state - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.state = 0; - - /** - * BackupPlan resourceType. - * @member {string} resourceType - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.resourceType = ""; - - /** - * BackupPlan etag. - * @member {string} etag - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.etag = ""; - - /** - * BackupPlan backupVault. - * @member {string} backupVault - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.backupVault = ""; - - /** - * BackupPlan backupVaultServiceAccount. - * @member {string} backupVaultServiceAccount - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.backupVaultServiceAccount = ""; - - /** - * Creates a new BackupPlan instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {google.cloud.backupdr.v1.IBackupPlan=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan instance - */ - BackupPlan.create = function create(properties) { - return new BackupPlan(properties); - }; - - /** - * Encodes the specified BackupPlan message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {google.cloud.backupdr.v1.IBackupPlan} message BackupPlan message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupPlan.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - 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 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.backupRules != null && message.backupRules.length) - for (var i = 0; i < message.backupRules.length; ++i) - $root.google.cloud.backupdr.v1.BackupRule.encode(message.backupRules[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); - if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceType); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.etag); - if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.backupVault); - if (message.backupVaultServiceAccount != null && Object.hasOwnProperty.call(message, "backupVaultServiceAccount")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.backupVaultServiceAccount); - return writer; - }; - - /** - * Encodes the specified BackupPlan message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {google.cloud.backupdr.v1.IBackupPlan} message BackupPlan message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupPlan.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupPlan message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupPlan.decode = function 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.backupdr.v1.BackupPlan(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - 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 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - if (!(message.backupRules && message.backupRules.length)) - message.backupRules = []; - message.backupRules.push($root.google.cloud.backupdr.v1.BackupRule.decode(reader, reader.uint32())); - break; - } - case 7: { - message.state = reader.int32(); - break; - } - case 8: { - message.resourceType = reader.string(); - break; - } - case 9: { - message.etag = reader.string(); - break; - } - case 10: { - message.backupVault = reader.string(); - break; - } - case 11: { - message.backupVaultServiceAccount = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupPlan message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupPlan.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupPlan message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupPlan.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - 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.backupRules != null && message.hasOwnProperty("backupRules")) { - if (!Array.isArray(message.backupRules)) - return "backupRules: array expected"; - for (var i = 0; i < message.backupRules.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupRule.verify(message.backupRules[i]); - if (error) - return "backupRules." + error; - } - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - if (!$util.isString(message.resourceType)) - return "resourceType: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.backupVault != null && message.hasOwnProperty("backupVault")) - if (!$util.isString(message.backupVault)) - return "backupVault: string expected"; - if (message.backupVaultServiceAccount != null && message.hasOwnProperty("backupVaultServiceAccount")) - if (!$util.isString(message.backupVaultServiceAccount)) - return "backupVaultServiceAccount: string expected"; - return null; - }; - - /** - * Creates a BackupPlan message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan - */ - BackupPlan.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupPlan) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupPlan(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupPlan.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.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupPlan.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.backupdr.v1.BackupPlan.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.backupRules) { - if (!Array.isArray(object.backupRules)) - throw TypeError(".google.cloud.backupdr.v1.BackupPlan.backupRules: array expected"); - message.backupRules = []; - for (var i = 0; i < object.backupRules.length; ++i) { - if (typeof object.backupRules[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupPlan.backupRules: object expected"); - message.backupRules[i] = $root.google.cloud.backupdr.v1.BackupRule.fromObject(object.backupRules[i]); - } - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "CREATING": - case 1: - message.state = 1; - break; - case "ACTIVE": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "INACTIVE": - case 4: - message.state = 4; - break; - } - if (object.resourceType != null) - message.resourceType = String(object.resourceType); - if (object.etag != null) - message.etag = String(object.etag); - if (object.backupVault != null) - message.backupVault = String(object.backupVault); - if (object.backupVaultServiceAccount != null) - message.backupVaultServiceAccount = String(object.backupVaultServiceAccount); - return message; - }; - - /** - * Creates a plain object from a BackupPlan message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {google.cloud.backupdr.v1.BackupPlan} message BackupPlan - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupPlan.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.backupRules = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.resourceType = ""; - object.etag = ""; - object.backupVault = ""; - object.backupVaultServiceAccount = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - 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.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.backupRules && message.backupRules.length) { - object.backupRules = []; - for (var j = 0; j < message.backupRules.length; ++j) - object.backupRules[j] = $root.google.cloud.backupdr.v1.BackupRule.toObject(message.backupRules[j], options); - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupPlan.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupPlan.State[message.state] : message.state; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = message.resourceType; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.backupVault != null && message.hasOwnProperty("backupVault")) - object.backupVault = message.backupVault; - if (message.backupVaultServiceAccount != null && message.hasOwnProperty("backupVaultServiceAccount")) - object.backupVaultServiceAccount = message.backupVaultServiceAccount; - return object; - }; - - /** - * Converts this BackupPlan to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - * @returns {Object.} JSON object - */ - BackupPlan.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupPlan - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupPlan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupPlan"; - }; - - /** - * State enum. - * @name google.cloud.backupdr.v1.BackupPlan.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} DELETING=3 DELETING value - * @property {number} INACTIVE=4 INACTIVE value - */ - BackupPlan.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "INACTIVE"] = 4; - return values; - })(); - - return BackupPlan; - })(); - - v1.BackupRule = (function() { - - /** - * Properties of a BackupRule. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupRule - * @property {string|null} [ruleId] BackupRule ruleId - * @property {number|null} [backupRetentionDays] BackupRule backupRetentionDays - * @property {google.cloud.backupdr.v1.IStandardSchedule|null} [standardSchedule] BackupRule standardSchedule - */ - - /** - * Constructs a new BackupRule. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupRule. - * @implements IBackupRule - * @constructor - * @param {google.cloud.backupdr.v1.IBackupRule=} [properties] Properties to set - */ - function BackupRule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupRule ruleId. - * @member {string} ruleId - * @memberof google.cloud.backupdr.v1.BackupRule - * @instance - */ - BackupRule.prototype.ruleId = ""; - - /** - * BackupRule backupRetentionDays. - * @member {number} backupRetentionDays - * @memberof google.cloud.backupdr.v1.BackupRule - * @instance - */ - BackupRule.prototype.backupRetentionDays = 0; - - /** - * BackupRule standardSchedule. - * @member {google.cloud.backupdr.v1.IStandardSchedule|null|undefined} standardSchedule - * @memberof google.cloud.backupdr.v1.BackupRule - * @instance - */ - BackupRule.prototype.standardSchedule = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupRule backupScheduleOneof. - * @member {"standardSchedule"|undefined} backupScheduleOneof - * @memberof google.cloud.backupdr.v1.BackupRule - * @instance - */ - Object.defineProperty(BackupRule.prototype, "backupScheduleOneof", { - get: $util.oneOfGetter($oneOfFields = ["standardSchedule"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupRule instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {google.cloud.backupdr.v1.IBackupRule=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule instance - */ - BackupRule.create = function create(properties) { - return new BackupRule(properties); - }; - - /** - * Encodes the specified BackupRule message. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {google.cloud.backupdr.v1.IBackupRule} message BackupRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ruleId); - if (message.backupRetentionDays != null && Object.hasOwnProperty.call(message, "backupRetentionDays")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.backupRetentionDays); - if (message.standardSchedule != null && Object.hasOwnProperty.call(message, "standardSchedule")) - $root.google.cloud.backupdr.v1.StandardSchedule.encode(message.standardSchedule, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BackupRule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {google.cloud.backupdr.v1.IBackupRule} message BackupRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupRule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupRule.decode = function 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.backupdr.v1.BackupRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ruleId = reader.string(); - break; - } - case 4: { - message.backupRetentionDays = reader.int32(); - break; - } - case 5: { - message.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupRule message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.ruleId != null && message.hasOwnProperty("ruleId")) - if (!$util.isString(message.ruleId)) - return "ruleId: string expected"; - if (message.backupRetentionDays != null && message.hasOwnProperty("backupRetentionDays")) - if (!$util.isInteger(message.backupRetentionDays)) - return "backupRetentionDays: integer expected"; - if (message.standardSchedule != null && message.hasOwnProperty("standardSchedule")) { - properties.backupScheduleOneof = 1; - { - var error = $root.google.cloud.backupdr.v1.StandardSchedule.verify(message.standardSchedule); - if (error) - return "standardSchedule." + error; - } - } - return null; - }; - - /** - * Creates a BackupRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule - */ - BackupRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupRule) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupRule(); - if (object.ruleId != null) - message.ruleId = String(object.ruleId); - if (object.backupRetentionDays != null) - message.backupRetentionDays = object.backupRetentionDays | 0; - if (object.standardSchedule != null) { - if (typeof object.standardSchedule !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupRule.standardSchedule: object expected"); - message.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.fromObject(object.standardSchedule); - } - return message; - }; - - /** - * Creates a plain object from a BackupRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {google.cloud.backupdr.v1.BackupRule} message BackupRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.ruleId = ""; - object.backupRetentionDays = 0; - } - if (message.ruleId != null && message.hasOwnProperty("ruleId")) - object.ruleId = message.ruleId; - if (message.backupRetentionDays != null && message.hasOwnProperty("backupRetentionDays")) - object.backupRetentionDays = message.backupRetentionDays; - if (message.standardSchedule != null && message.hasOwnProperty("standardSchedule")) { - object.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.toObject(message.standardSchedule, options); - if (options.oneofs) - object.backupScheduleOneof = "standardSchedule"; - } - return object; - }; - - /** - * Converts this BackupRule to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupRule - * @instance - * @returns {Object.} JSON object - */ - BackupRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupRule - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupRule"; - }; - - return BackupRule; - })(); - - v1.StandardSchedule = (function() { - - /** - * Properties of a StandardSchedule. - * @memberof google.cloud.backupdr.v1 - * @interface IStandardSchedule - * @property {google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|null} [recurrenceType] StandardSchedule recurrenceType - * @property {number|null} [hourlyFrequency] StandardSchedule hourlyFrequency - * @property {Array.|null} [daysOfWeek] StandardSchedule daysOfWeek - * @property {Array.|null} [daysOfMonth] StandardSchedule daysOfMonth - * @property {google.cloud.backupdr.v1.IWeekDayOfMonth|null} [weekDayOfMonth] StandardSchedule weekDayOfMonth - * @property {Array.|null} [months] StandardSchedule months - * @property {google.cloud.backupdr.v1.IBackupWindow|null} [backupWindow] StandardSchedule backupWindow - * @property {string|null} [timeZone] StandardSchedule timeZone - */ - - /** - * Constructs a new StandardSchedule. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a StandardSchedule. - * @implements IStandardSchedule - * @constructor - * @param {google.cloud.backupdr.v1.IStandardSchedule=} [properties] Properties to set - */ - function StandardSchedule(properties) { - this.daysOfWeek = []; - this.daysOfMonth = []; - this.months = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StandardSchedule recurrenceType. - * @member {google.cloud.backupdr.v1.StandardSchedule.RecurrenceType} recurrenceType - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.recurrenceType = 0; - - /** - * StandardSchedule hourlyFrequency. - * @member {number} hourlyFrequency - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.hourlyFrequency = 0; - - /** - * StandardSchedule daysOfWeek. - * @member {Array.} daysOfWeek - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.daysOfWeek = $util.emptyArray; - - /** - * StandardSchedule daysOfMonth. - * @member {Array.} daysOfMonth - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.daysOfMonth = $util.emptyArray; - - /** - * StandardSchedule weekDayOfMonth. - * @member {google.cloud.backupdr.v1.IWeekDayOfMonth|null|undefined} weekDayOfMonth - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.weekDayOfMonth = null; - - /** - * StandardSchedule months. - * @member {Array.} months - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.months = $util.emptyArray; - - /** - * StandardSchedule backupWindow. - * @member {google.cloud.backupdr.v1.IBackupWindow|null|undefined} backupWindow - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.backupWindow = null; - - /** - * StandardSchedule timeZone. - * @member {string} timeZone - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.timeZone = ""; - - /** - * Creates a new StandardSchedule instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {google.cloud.backupdr.v1.IStandardSchedule=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule instance - */ - StandardSchedule.create = function create(properties) { - return new StandardSchedule(properties); - }; - - /** - * Encodes the specified StandardSchedule message. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {google.cloud.backupdr.v1.IStandardSchedule} message StandardSchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StandardSchedule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.recurrenceType != null && Object.hasOwnProperty.call(message, "recurrenceType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.recurrenceType); - if (message.hourlyFrequency != null && Object.hasOwnProperty.call(message, "hourlyFrequency")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hourlyFrequency); - if (message.daysOfWeek != null && message.daysOfWeek.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.daysOfWeek.length; ++i) - writer.int32(message.daysOfWeek[i]); - writer.ldelim(); - } - if (message.daysOfMonth != null && message.daysOfMonth.length) { - writer.uint32(/* id 4, wireType 2 =*/34).fork(); - for (var i = 0; i < message.daysOfMonth.length; ++i) - writer.int32(message.daysOfMonth[i]); - writer.ldelim(); - } - if (message.weekDayOfMonth != null && Object.hasOwnProperty.call(message, "weekDayOfMonth")) - $root.google.cloud.backupdr.v1.WeekDayOfMonth.encode(message.weekDayOfMonth, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.months != null && message.months.length) { - writer.uint32(/* id 6, wireType 2 =*/50).fork(); - for (var i = 0; i < message.months.length; ++i) - writer.int32(message.months[i]); - writer.ldelim(); - } - if (message.backupWindow != null && Object.hasOwnProperty.call(message, "backupWindow")) - $root.google.cloud.backupdr.v1.BackupWindow.encode(message.backupWindow, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.timeZone); - return writer; - }; - - /** - * Encodes the specified StandardSchedule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {google.cloud.backupdr.v1.IStandardSchedule} message StandardSchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StandardSchedule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StandardSchedule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StandardSchedule.decode = function 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.backupdr.v1.StandardSchedule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.recurrenceType = reader.int32(); - break; - } - case 2: { - message.hourlyFrequency = reader.int32(); - break; - } - case 3: { - if (!(message.daysOfWeek && message.daysOfWeek.length)) - message.daysOfWeek = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.daysOfWeek.push(reader.int32()); - } else - message.daysOfWeek.push(reader.int32()); - break; - } - case 4: { - if (!(message.daysOfMonth && message.daysOfMonth.length)) - message.daysOfMonth = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.daysOfMonth.push(reader.int32()); - } else - message.daysOfMonth.push(reader.int32()); - break; - } - case 5: { - message.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.decode(reader, reader.uint32()); - break; - } - case 6: { - if (!(message.months && message.months.length)) - message.months = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.months.push(reader.int32()); - } else - message.months.push(reader.int32()); - break; - } - case 7: { - message.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.decode(reader, reader.uint32()); - break; - } - case 8: { - message.timeZone = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StandardSchedule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StandardSchedule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StandardSchedule message. - * @function verify - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StandardSchedule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.recurrenceType != null && message.hasOwnProperty("recurrenceType")) - switch (message.recurrenceType) { - default: - return "recurrenceType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.hourlyFrequency != null && message.hasOwnProperty("hourlyFrequency")) - if (!$util.isInteger(message.hourlyFrequency)) - return "hourlyFrequency: integer expected"; - if (message.daysOfWeek != null && message.hasOwnProperty("daysOfWeek")) { - if (!Array.isArray(message.daysOfWeek)) - return "daysOfWeek: array expected"; - for (var i = 0; i < message.daysOfWeek.length; ++i) - switch (message.daysOfWeek[i]) { - default: - return "daysOfWeek: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - } - if (message.daysOfMonth != null && message.hasOwnProperty("daysOfMonth")) { - if (!Array.isArray(message.daysOfMonth)) - return "daysOfMonth: array expected"; - for (var i = 0; i < message.daysOfMonth.length; ++i) - if (!$util.isInteger(message.daysOfMonth[i])) - return "daysOfMonth: integer[] expected"; - } - if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) { - var error = $root.google.cloud.backupdr.v1.WeekDayOfMonth.verify(message.weekDayOfMonth); - if (error) - return "weekDayOfMonth." + error; - } - if (message.months != null && message.hasOwnProperty("months")) { - if (!Array.isArray(message.months)) - return "months: array expected"; - for (var i = 0; i < message.months.length; ++i) - switch (message.months[i]) { - default: - return "months: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - break; - } - } - if (message.backupWindow != null && message.hasOwnProperty("backupWindow")) { - var error = $root.google.cloud.backupdr.v1.BackupWindow.verify(message.backupWindow); - if (error) - return "backupWindow." + error; - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - if (!$util.isString(message.timeZone)) - return "timeZone: string expected"; - return null; - }; - - /** - * Creates a StandardSchedule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule - */ - StandardSchedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.StandardSchedule) - return object; - var message = new $root.google.cloud.backupdr.v1.StandardSchedule(); - switch (object.recurrenceType) { - default: - if (typeof object.recurrenceType === "number") { - message.recurrenceType = object.recurrenceType; - break; - } - break; - case "RECURRENCE_TYPE_UNSPECIFIED": - case 0: - message.recurrenceType = 0; - break; - case "HOURLY": - case 1: - message.recurrenceType = 1; - break; - case "DAILY": - case 2: - message.recurrenceType = 2; - break; - case "WEEKLY": - case 3: - message.recurrenceType = 3; - break; - case "MONTHLY": - case 4: - message.recurrenceType = 4; - break; - case "YEARLY": - case 5: - message.recurrenceType = 5; - break; - } - if (object.hourlyFrequency != null) - message.hourlyFrequency = object.hourlyFrequency | 0; - if (object.daysOfWeek) { - if (!Array.isArray(object.daysOfWeek)) - throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.daysOfWeek: array expected"); - message.daysOfWeek = []; - for (var i = 0; i < object.daysOfWeek.length; ++i) - switch (object.daysOfWeek[i]) { - default: - if (typeof object.daysOfWeek[i] === "number") { - message.daysOfWeek[i] = object.daysOfWeek[i]; - break; - } - case "DAY_OF_WEEK_UNSPECIFIED": - case 0: - message.daysOfWeek[i] = 0; - break; - case "MONDAY": - case 1: - message.daysOfWeek[i] = 1; - break; - case "TUESDAY": - case 2: - message.daysOfWeek[i] = 2; - break; - case "WEDNESDAY": - case 3: - message.daysOfWeek[i] = 3; - break; - case "THURSDAY": - case 4: - message.daysOfWeek[i] = 4; - break; - case "FRIDAY": - case 5: - message.daysOfWeek[i] = 5; - break; - case "SATURDAY": - case 6: - message.daysOfWeek[i] = 6; - break; - case "SUNDAY": - case 7: - message.daysOfWeek[i] = 7; - break; - } - } - if (object.daysOfMonth) { - if (!Array.isArray(object.daysOfMonth)) - throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.daysOfMonth: array expected"); - message.daysOfMonth = []; - for (var i = 0; i < object.daysOfMonth.length; ++i) - message.daysOfMonth[i] = object.daysOfMonth[i] | 0; - } - if (object.weekDayOfMonth != null) { - if (typeof object.weekDayOfMonth !== "object") - throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.weekDayOfMonth: object expected"); - message.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.fromObject(object.weekDayOfMonth); - } - if (object.months) { - if (!Array.isArray(object.months)) - throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.months: array expected"); - message.months = []; - for (var i = 0; i < object.months.length; ++i) - switch (object.months[i]) { - default: - if (typeof object.months[i] === "number") { - message.months[i] = object.months[i]; - break; - } - case "MONTH_UNSPECIFIED": - case 0: - message.months[i] = 0; - break; - case "JANUARY": - case 1: - message.months[i] = 1; - break; - case "FEBRUARY": - case 2: - message.months[i] = 2; - break; - case "MARCH": - case 3: - message.months[i] = 3; - break; - case "APRIL": - case 4: - message.months[i] = 4; - break; - case "MAY": - case 5: - message.months[i] = 5; - break; - case "JUNE": - case 6: - message.months[i] = 6; - break; - case "JULY": - case 7: - message.months[i] = 7; - break; - case "AUGUST": - case 8: - message.months[i] = 8; - break; - case "SEPTEMBER": - case 9: - message.months[i] = 9; - break; - case "OCTOBER": - case 10: - message.months[i] = 10; - break; - case "NOVEMBER": - case 11: - message.months[i] = 11; - break; - case "DECEMBER": - case 12: - message.months[i] = 12; - break; - } - } - if (object.backupWindow != null) { - if (typeof object.backupWindow !== "object") - throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.backupWindow: object expected"); - message.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.fromObject(object.backupWindow); - } - if (object.timeZone != null) - message.timeZone = String(object.timeZone); - return message; - }; - - /** - * Creates a plain object from a StandardSchedule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {google.cloud.backupdr.v1.StandardSchedule} message StandardSchedule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StandardSchedule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.daysOfWeek = []; - object.daysOfMonth = []; - object.months = []; - } - if (options.defaults) { - object.recurrenceType = options.enums === String ? "RECURRENCE_TYPE_UNSPECIFIED" : 0; - object.hourlyFrequency = 0; - object.weekDayOfMonth = null; - object.backupWindow = null; - object.timeZone = ""; - } - if (message.recurrenceType != null && message.hasOwnProperty("recurrenceType")) - object.recurrenceType = options.enums === String ? $root.google.cloud.backupdr.v1.StandardSchedule.RecurrenceType[message.recurrenceType] === undefined ? message.recurrenceType : $root.google.cloud.backupdr.v1.StandardSchedule.RecurrenceType[message.recurrenceType] : message.recurrenceType; - if (message.hourlyFrequency != null && message.hasOwnProperty("hourlyFrequency")) - object.hourlyFrequency = message.hourlyFrequency; - if (message.daysOfWeek && message.daysOfWeek.length) { - object.daysOfWeek = []; - for (var j = 0; j < message.daysOfWeek.length; ++j) - object.daysOfWeek[j] = options.enums === String ? $root.google.type.DayOfWeek[message.daysOfWeek[j]] === undefined ? message.daysOfWeek[j] : $root.google.type.DayOfWeek[message.daysOfWeek[j]] : message.daysOfWeek[j]; - } - if (message.daysOfMonth && message.daysOfMonth.length) { - object.daysOfMonth = []; - for (var j = 0; j < message.daysOfMonth.length; ++j) - object.daysOfMonth[j] = message.daysOfMonth[j]; - } - if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) - object.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.toObject(message.weekDayOfMonth, options); - if (message.months && message.months.length) { - object.months = []; - for (var j = 0; j < message.months.length; ++j) - object.months[j] = options.enums === String ? $root.google.type.Month[message.months[j]] === undefined ? message.months[j] : $root.google.type.Month[message.months[j]] : message.months[j]; - } - if (message.backupWindow != null && message.hasOwnProperty("backupWindow")) - object.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.toObject(message.backupWindow, options); - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - object.timeZone = message.timeZone; - return object; - }; - - /** - * Converts this StandardSchedule to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - * @returns {Object.} JSON object - */ - StandardSchedule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StandardSchedule - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StandardSchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.StandardSchedule"; - }; - - /** - * RecurrenceType enum. - * @name google.cloud.backupdr.v1.StandardSchedule.RecurrenceType - * @enum {number} - * @property {number} RECURRENCE_TYPE_UNSPECIFIED=0 RECURRENCE_TYPE_UNSPECIFIED value - * @property {number} HOURLY=1 HOURLY value - * @property {number} DAILY=2 DAILY value - * @property {number} WEEKLY=3 WEEKLY value - * @property {number} MONTHLY=4 MONTHLY value - * @property {number} YEARLY=5 YEARLY value - */ - StandardSchedule.RecurrenceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RECURRENCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HOURLY"] = 1; - values[valuesById[2] = "DAILY"] = 2; - values[valuesById[3] = "WEEKLY"] = 3; - values[valuesById[4] = "MONTHLY"] = 4; - values[valuesById[5] = "YEARLY"] = 5; - return values; - })(); - - return StandardSchedule; - })(); - - v1.BackupWindow = (function() { - - /** - * Properties of a BackupWindow. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupWindow - * @property {number|null} [startHourOfDay] BackupWindow startHourOfDay - * @property {number|null} [endHourOfDay] BackupWindow endHourOfDay - */ - - /** - * Constructs a new BackupWindow. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupWindow. - * @implements IBackupWindow - * @constructor - * @param {google.cloud.backupdr.v1.IBackupWindow=} [properties] Properties to set - */ - function BackupWindow(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupWindow startHourOfDay. - * @member {number} startHourOfDay - * @memberof google.cloud.backupdr.v1.BackupWindow - * @instance - */ - BackupWindow.prototype.startHourOfDay = 0; - - /** - * BackupWindow endHourOfDay. - * @member {number} endHourOfDay - * @memberof google.cloud.backupdr.v1.BackupWindow - * @instance - */ - BackupWindow.prototype.endHourOfDay = 0; - - /** - * Creates a new BackupWindow instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {google.cloud.backupdr.v1.IBackupWindow=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow instance - */ - BackupWindow.create = function create(properties) { - return new BackupWindow(properties); - }; - - /** - * Encodes the specified BackupWindow message. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {google.cloud.backupdr.v1.IBackupWindow} message BackupWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupWindow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startHourOfDay != null && Object.hasOwnProperty.call(message, "startHourOfDay")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startHourOfDay); - if (message.endHourOfDay != null && Object.hasOwnProperty.call(message, "endHourOfDay")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endHourOfDay); - return writer; - }; - - /** - * Encodes the specified BackupWindow message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {google.cloud.backupdr.v1.IBackupWindow} message BackupWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupWindow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupWindow message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupWindow.decode = function 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.backupdr.v1.BackupWindow(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.startHourOfDay = reader.int32(); - break; - } - case 2: { - message.endHourOfDay = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupWindow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupWindow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupWindow message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupWindow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startHourOfDay != null && message.hasOwnProperty("startHourOfDay")) - if (!$util.isInteger(message.startHourOfDay)) - return "startHourOfDay: integer expected"; - if (message.endHourOfDay != null && message.hasOwnProperty("endHourOfDay")) - if (!$util.isInteger(message.endHourOfDay)) - return "endHourOfDay: integer expected"; - return null; - }; - - /** - * Creates a BackupWindow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow - */ - BackupWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupWindow) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupWindow(); - if (object.startHourOfDay != null) - message.startHourOfDay = object.startHourOfDay | 0; - if (object.endHourOfDay != null) - message.endHourOfDay = object.endHourOfDay | 0; - return message; - }; - - /** - * Creates a plain object from a BackupWindow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {google.cloud.backupdr.v1.BackupWindow} message BackupWindow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupWindow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startHourOfDay = 0; - object.endHourOfDay = 0; - } - if (message.startHourOfDay != null && message.hasOwnProperty("startHourOfDay")) - object.startHourOfDay = message.startHourOfDay; - if (message.endHourOfDay != null && message.hasOwnProperty("endHourOfDay")) - object.endHourOfDay = message.endHourOfDay; - return object; - }; - - /** - * Converts this BackupWindow to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupWindow - * @instance - * @returns {Object.} JSON object - */ - BackupWindow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupWindow - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupWindow"; - }; - - return BackupWindow; - })(); - - v1.WeekDayOfMonth = (function() { - - /** - * Properties of a WeekDayOfMonth. - * @memberof google.cloud.backupdr.v1 - * @interface IWeekDayOfMonth - * @property {google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|null} [weekOfMonth] WeekDayOfMonth weekOfMonth - * @property {google.type.DayOfWeek|null} [dayOfWeek] WeekDayOfMonth dayOfWeek - */ - - /** - * Constructs a new WeekDayOfMonth. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a WeekDayOfMonth. - * @implements IWeekDayOfMonth - * @constructor - * @param {google.cloud.backupdr.v1.IWeekDayOfMonth=} [properties] Properties to set - */ - function WeekDayOfMonth(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WeekDayOfMonth weekOfMonth. - * @member {google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth} weekOfMonth - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @instance - */ - WeekDayOfMonth.prototype.weekOfMonth = 0; - - /** - * WeekDayOfMonth dayOfWeek. - * @member {google.type.DayOfWeek} dayOfWeek - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @instance - */ - WeekDayOfMonth.prototype.dayOfWeek = 0; - - /** - * Creates a new WeekDayOfMonth instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {google.cloud.backupdr.v1.IWeekDayOfMonth=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth instance - */ - WeekDayOfMonth.create = function create(properties) { - return new WeekDayOfMonth(properties); - }; - - /** - * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {google.cloud.backupdr.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeekDayOfMonth.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.weekOfMonth != null && Object.hasOwnProperty.call(message, "weekOfMonth")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.weekOfMonth); - if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dayOfWeek); - return writer; - }; - - /** - * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {google.cloud.backupdr.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeekDayOfMonth.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeekDayOfMonth.decode = function 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.backupdr.v1.WeekDayOfMonth(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.weekOfMonth = reader.int32(); - break; - } - case 2: { - message.dayOfWeek = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeekDayOfMonth.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WeekDayOfMonth message. - * @function verify - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WeekDayOfMonth.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.weekOfMonth != null && message.hasOwnProperty("weekOfMonth")) - switch (message.weekOfMonth) { - default: - return "weekOfMonth: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - switch (message.dayOfWeek) { - default: - return "dayOfWeek: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - return null; - }; - - /** - * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth - */ - WeekDayOfMonth.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.WeekDayOfMonth) - return object; - var message = new $root.google.cloud.backupdr.v1.WeekDayOfMonth(); - switch (object.weekOfMonth) { - default: - if (typeof object.weekOfMonth === "number") { - message.weekOfMonth = object.weekOfMonth; - break; - } - break; - case "WEEK_OF_MONTH_UNSPECIFIED": - case 0: - message.weekOfMonth = 0; - break; - case "FIRST": - case 1: - message.weekOfMonth = 1; - break; - case "SECOND": - case 2: - message.weekOfMonth = 2; - break; - case "THIRD": - case 3: - message.weekOfMonth = 3; - break; - case "FOURTH": - case 4: - message.weekOfMonth = 4; - break; - case "LAST": - case 5: - message.weekOfMonth = 5; - break; - } - switch (object.dayOfWeek) { - default: - if (typeof object.dayOfWeek === "number") { - message.dayOfWeek = object.dayOfWeek; - break; - } - break; - case "DAY_OF_WEEK_UNSPECIFIED": - case 0: - message.dayOfWeek = 0; - break; - case "MONDAY": - case 1: - message.dayOfWeek = 1; - break; - case "TUESDAY": - case 2: - message.dayOfWeek = 2; - break; - case "WEDNESDAY": - case 3: - message.dayOfWeek = 3; - break; - case "THURSDAY": - case 4: - message.dayOfWeek = 4; - break; - case "FRIDAY": - case 5: - message.dayOfWeek = 5; - break; - case "SATURDAY": - case 6: - message.dayOfWeek = 6; - break; - case "SUNDAY": - case 7: - message.dayOfWeek = 7; - break; - } - return message; - }; - - /** - * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {google.cloud.backupdr.v1.WeekDayOfMonth} message WeekDayOfMonth - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WeekDayOfMonth.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.weekOfMonth = options.enums === String ? "WEEK_OF_MONTH_UNSPECIFIED" : 0; - object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; - } - if (message.weekOfMonth != null && message.hasOwnProperty("weekOfMonth")) - object.weekOfMonth = options.enums === String ? $root.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth] === undefined ? message.weekOfMonth : $root.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth] : message.weekOfMonth; - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] === undefined ? message.dayOfWeek : $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; - return object; - }; - - /** - * Converts this WeekDayOfMonth to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @instance - * @returns {Object.} JSON object - */ - WeekDayOfMonth.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WeekDayOfMonth - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WeekDayOfMonth.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.WeekDayOfMonth"; - }; - - /** - * WeekOfMonth enum. - * @name google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth - * @enum {number} - * @property {number} WEEK_OF_MONTH_UNSPECIFIED=0 WEEK_OF_MONTH_UNSPECIFIED value - * @property {number} FIRST=1 FIRST value - * @property {number} SECOND=2 SECOND value - * @property {number} THIRD=3 THIRD value - * @property {number} FOURTH=4 FOURTH value - * @property {number} LAST=5 LAST value - */ - WeekDayOfMonth.WeekOfMonth = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "WEEK_OF_MONTH_UNSPECIFIED"] = 0; - values[valuesById[1] = "FIRST"] = 1; - values[valuesById[2] = "SECOND"] = 2; - values[valuesById[3] = "THIRD"] = 3; - values[valuesById[4] = "FOURTH"] = 4; - values[valuesById[5] = "LAST"] = 5; - return values; - })(); - - return WeekDayOfMonth; - })(); - - v1.CreateBackupPlanRequest = (function() { - - /** - * Properties of a CreateBackupPlanRequest. - * @memberof google.cloud.backupdr.v1 - * @interface ICreateBackupPlanRequest - * @property {string|null} [parent] CreateBackupPlanRequest parent - * @property {string|null} [backupPlanId] CreateBackupPlanRequest backupPlanId - * @property {google.cloud.backupdr.v1.IBackupPlan|null} [backupPlan] CreateBackupPlanRequest backupPlan - * @property {string|null} [requestId] CreateBackupPlanRequest requestId - */ - - /** - * Constructs a new CreateBackupPlanRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CreateBackupPlanRequest. - * @implements ICreateBackupPlanRequest - * @constructor - * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest=} [properties] Properties to set - */ - function CreateBackupPlanRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateBackupPlanRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @instance - */ - CreateBackupPlanRequest.prototype.parent = ""; - - /** - * CreateBackupPlanRequest backupPlanId. - * @member {string} backupPlanId - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @instance - */ - CreateBackupPlanRequest.prototype.backupPlanId = ""; - - /** - * CreateBackupPlanRequest backupPlan. - * @member {google.cloud.backupdr.v1.IBackupPlan|null|undefined} backupPlan - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @instance - */ - CreateBackupPlanRequest.prototype.backupPlan = null; - - /** - * CreateBackupPlanRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @instance - */ - CreateBackupPlanRequest.prototype.requestId = ""; - - /** - * Creates a new CreateBackupPlanRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest instance - */ - CreateBackupPlanRequest.create = function create(properties) { - return new CreateBackupPlanRequest(properties); - }; - - /** - * Encodes the specified CreateBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} message CreateBackupPlanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupPlanRequest.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.backupPlanId != null && Object.hasOwnProperty.call(message, "backupPlanId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanId); - if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) - $root.google.cloud.backupdr.v1.BackupPlan.encode(message.backupPlan, 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 CreateBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} message CreateBackupPlanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateBackupPlanRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupPlanRequest.decode = function 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.backupdr.v1.CreateBackupPlanRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.backupPlanId = reader.string(); - break; - } - case 3: { - message.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateBackupPlanRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateBackupPlanRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateBackupPlanRequest.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.backupPlanId != null && message.hasOwnProperty("backupPlanId")) - if (!$util.isString(message.backupPlanId)) - return "backupPlanId: string expected"; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) { - var error = $root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlan); - if (error) - return "backupPlan." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a CreateBackupPlanRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest - */ - CreateBackupPlanRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupPlanRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.CreateBackupPlanRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.backupPlanId != null) - message.backupPlanId = String(object.backupPlanId); - if (object.backupPlan != null) { - if (typeof object.backupPlan !== "object") - throw TypeError(".google.cloud.backupdr.v1.CreateBackupPlanRequest.backupPlan: object expected"); - message.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlan); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a CreateBackupPlanRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.CreateBackupPlanRequest} message CreateBackupPlanRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateBackupPlanRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.backupPlanId = ""; - object.backupPlan = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.backupPlanId != null && message.hasOwnProperty("backupPlanId")) - object.backupPlanId = message.backupPlanId; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - object.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlan, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this CreateBackupPlanRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @instance - * @returns {Object.} JSON object - */ - CreateBackupPlanRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateBackupPlanRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupPlanRequest"; - }; - - return CreateBackupPlanRequest; - })(); - - v1.ListBackupPlansRequest = (function() { - - /** - * Properties of a ListBackupPlansRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupPlansRequest - * @property {string|null} [parent] ListBackupPlansRequest parent - * @property {number|null} [pageSize] ListBackupPlansRequest pageSize - * @property {string|null} [pageToken] ListBackupPlansRequest pageToken - * @property {string|null} [filter] ListBackupPlansRequest filter - * @property {string|null} [orderBy] ListBackupPlansRequest orderBy - */ - - /** - * Constructs a new ListBackupPlansRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupPlansRequest. - * @implements IListBackupPlansRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupPlansRequest=} [properties] Properties to set - */ - function ListBackupPlansRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListBackupPlansRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @instance - */ - ListBackupPlansRequest.prototype.parent = ""; - - /** - * ListBackupPlansRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @instance - */ - ListBackupPlansRequest.prototype.pageSize = 0; - - /** - * ListBackupPlansRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @instance - */ - ListBackupPlansRequest.prototype.pageToken = ""; - - /** - * ListBackupPlansRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @instance - */ - ListBackupPlansRequest.prototype.filter = ""; - - /** - * ListBackupPlansRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @instance - */ - ListBackupPlansRequest.prototype.orderBy = ""; - - /** - * Creates a new ListBackupPlansRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlansRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest instance - */ - ListBackupPlansRequest.create = function create(properties) { - return new ListBackupPlansRequest(properties); - }; - - /** - * Encodes the specified ListBackupPlansRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} message ListBackupPlansRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlansRequest.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 ListBackupPlansRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} message ListBackupPlansRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlansRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupPlansRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlansRequest.decode = function 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.backupdr.v1.ListBackupPlansRequest(); - 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 ListBackupPlansRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlansRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupPlansRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupPlansRequest.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 ListBackupPlansRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest - */ - ListBackupPlansRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlansRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupPlansRequest(); - 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 ListBackupPlansRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {google.cloud.backupdr.v1.ListBackupPlansRequest} message ListBackupPlansRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupPlansRequest.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 ListBackupPlansRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @instance - * @returns {Object.} JSON object - */ - ListBackupPlansRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupPlansRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupPlansRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlansRequest"; - }; - - return ListBackupPlansRequest; - })(); - - v1.ListBackupPlansResponse = (function() { - - /** - * Properties of a ListBackupPlansResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupPlansResponse - * @property {Array.|null} [backupPlans] ListBackupPlansResponse backupPlans - * @property {string|null} [nextPageToken] ListBackupPlansResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupPlansResponse unreachable - */ - - /** - * Constructs a new ListBackupPlansResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupPlansResponse. - * @implements IListBackupPlansResponse - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupPlansResponse=} [properties] Properties to set - */ - function ListBackupPlansResponse(properties) { - this.backupPlans = []; - 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]]; - } - - /** - * ListBackupPlansResponse backupPlans. - * @member {Array.} backupPlans - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @instance - */ - ListBackupPlansResponse.prototype.backupPlans = $util.emptyArray; - - /** - * ListBackupPlansResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @instance - */ - ListBackupPlansResponse.prototype.nextPageToken = ""; - - /** - * ListBackupPlansResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @instance - */ - ListBackupPlansResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListBackupPlansResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlansResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse instance - */ - ListBackupPlansResponse.create = function create(properties) { - return new ListBackupPlansResponse(properties); - }; - - /** - * Encodes the specified ListBackupPlansResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlansResponse} message ListBackupPlansResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlansResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupPlans != null && message.backupPlans.length) - for (var i = 0; i < message.backupPlans.length; ++i) - $root.google.cloud.backupdr.v1.BackupPlan.encode(message.backupPlans[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 ListBackupPlansResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlansResponse} message ListBackupPlansResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlansResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupPlansResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlansResponse.decode = function 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.backupdr.v1.ListBackupPlansResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.backupPlans && message.backupPlans.length)) - message.backupPlans = []; - message.backupPlans.push($root.google.cloud.backupdr.v1.BackupPlan.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 ListBackupPlansResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlansResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupPlansResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupPlansResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupPlans != null && message.hasOwnProperty("backupPlans")) { - if (!Array.isArray(message.backupPlans)) - return "backupPlans: array expected"; - for (var i = 0; i < message.backupPlans.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlans[i]); - if (error) - return "backupPlans." + 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 ListBackupPlansResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse - */ - ListBackupPlansResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlansResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupPlansResponse(); - if (object.backupPlans) { - if (!Array.isArray(object.backupPlans)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.backupPlans: array expected"); - message.backupPlans = []; - for (var i = 0; i < object.backupPlans.length; ++i) { - if (typeof object.backupPlans[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.backupPlans: object expected"); - message.backupPlans[i] = $root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlans[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.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 ListBackupPlansResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {google.cloud.backupdr.v1.ListBackupPlansResponse} message ListBackupPlansResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupPlansResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backupPlans = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backupPlans && message.backupPlans.length) { - object.backupPlans = []; - for (var j = 0; j < message.backupPlans.length; ++j) - object.backupPlans[j] = $root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlans[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 ListBackupPlansResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @instance - * @returns {Object.} JSON object - */ - ListBackupPlansResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupPlansResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupPlansResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlansResponse"; - }; - - return ListBackupPlansResponse; - })(); - - v1.GetBackupPlanRequest = (function() { - - /** - * Properties of a GetBackupPlanRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetBackupPlanRequest - * @property {string|null} [name] GetBackupPlanRequest name - */ - - /** - * Constructs a new GetBackupPlanRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetBackupPlanRequest. - * @implements IGetBackupPlanRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest=} [properties] Properties to set - */ - function GetBackupPlanRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetBackupPlanRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @instance - */ - GetBackupPlanRequest.prototype.name = ""; - - /** - * Creates a new GetBackupPlanRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest instance - */ - GetBackupPlanRequest.create = function create(properties) { - return new GetBackupPlanRequest(properties); - }; - - /** - * Encodes the specified GetBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} message GetBackupPlanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupPlanRequest.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 GetBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} message GetBackupPlanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetBackupPlanRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupPlanRequest.decode = function 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.backupdr.v1.GetBackupPlanRequest(); - 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 GetBackupPlanRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBackupPlanRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBackupPlanRequest.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 GetBackupPlanRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest - */ - GetBackupPlanRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.GetBackupPlanRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetBackupPlanRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.GetBackupPlanRequest} message GetBackupPlanRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetBackupPlanRequest.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 GetBackupPlanRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @instance - * @returns {Object.} JSON object - */ - GetBackupPlanRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetBackupPlanRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupPlanRequest"; - }; - - return GetBackupPlanRequest; - })(); - - v1.DeleteBackupPlanRequest = (function() { - - /** - * Properties of a DeleteBackupPlanRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IDeleteBackupPlanRequest - * @property {string|null} [name] DeleteBackupPlanRequest name - * @property {string|null} [requestId] DeleteBackupPlanRequest requestId - */ - - /** - * Constructs a new DeleteBackupPlanRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DeleteBackupPlanRequest. - * @implements IDeleteBackupPlanRequest - * @constructor - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest=} [properties] Properties to set - */ - function DeleteBackupPlanRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteBackupPlanRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @instance - */ - DeleteBackupPlanRequest.prototype.name = ""; - - /** - * DeleteBackupPlanRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @instance - */ - DeleteBackupPlanRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteBackupPlanRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest instance - */ - DeleteBackupPlanRequest.create = function create(properties) { - return new DeleteBackupPlanRequest(properties); - }; - - /** - * Encodes the specified DeleteBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} message DeleteBackupPlanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupPlanRequest.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 DeleteBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} message DeleteBackupPlanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupPlanRequest.decode = function 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.backupdr.v1.DeleteBackupPlanRequest(); - 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 DeleteBackupPlanRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteBackupPlanRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteBackupPlanRequest.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 DeleteBackupPlanRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest - */ - DeleteBackupPlanRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest(); - 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 DeleteBackupPlanRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.DeleteBackupPlanRequest} message DeleteBackupPlanRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteBackupPlanRequest.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 DeleteBackupPlanRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteBackupPlanRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteBackupPlanRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupPlanRequest"; - }; - - return DeleteBackupPlanRequest; - })(); - - v1.BackupPlanAssociation = (function() { - - /** - * Properties of a BackupPlanAssociation. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupPlanAssociation - * @property {string|null} [name] BackupPlanAssociation name - * @property {string|null} [resourceType] BackupPlanAssociation resourceType - * @property {string|null} [resource] BackupPlanAssociation resource - * @property {string|null} [backupPlan] BackupPlanAssociation backupPlan - * @property {google.protobuf.ITimestamp|null} [createTime] BackupPlanAssociation createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] BackupPlanAssociation updateTime - * @property {google.cloud.backupdr.v1.BackupPlanAssociation.State|null} [state] BackupPlanAssociation state - * @property {Array.|null} [rulesConfigInfo] BackupPlanAssociation rulesConfigInfo - * @property {string|null} [dataSource] BackupPlanAssociation dataSource - */ - - /** - * Constructs a new BackupPlanAssociation. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupPlanAssociation. - * @implements IBackupPlanAssociation - * @constructor - * @param {google.cloud.backupdr.v1.IBackupPlanAssociation=} [properties] Properties to set - */ - function BackupPlanAssociation(properties) { - this.rulesConfigInfo = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupPlanAssociation name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.name = ""; - - /** - * BackupPlanAssociation resourceType. - * @member {string} resourceType - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.resourceType = ""; - - /** - * BackupPlanAssociation resource. - * @member {string} resource - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.resource = ""; - - /** - * BackupPlanAssociation backupPlan. - * @member {string} backupPlan - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.backupPlan = ""; - - /** - * BackupPlanAssociation createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.createTime = null; - - /** - * BackupPlanAssociation updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.updateTime = null; - - /** - * BackupPlanAssociation state. - * @member {google.cloud.backupdr.v1.BackupPlanAssociation.State} state - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.state = 0; - - /** - * BackupPlanAssociation rulesConfigInfo. - * @member {Array.} rulesConfigInfo - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.rulesConfigInfo = $util.emptyArray; - - /** - * BackupPlanAssociation dataSource. - * @member {string} dataSource - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.dataSource = ""; - - /** - * Creates a new BackupPlanAssociation instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {google.cloud.backupdr.v1.IBackupPlanAssociation=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation instance - */ - BackupPlanAssociation.create = function create(properties) { - return new BackupPlanAssociation(properties); - }; - - /** - * Encodes the specified BackupPlanAssociation message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {google.cloud.backupdr.v1.IBackupPlanAssociation} message BackupPlanAssociation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupPlanAssociation.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.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceType); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); - if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.backupPlan); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); - if (message.rulesConfigInfo != null && message.rulesConfigInfo.length) - for (var i = 0; i < message.rulesConfigInfo.length; ++i) - $root.google.cloud.backupdr.v1.RuleConfigInfo.encode(message.rulesConfigInfo[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.dataSource); - return writer; - }; - - /** - * Encodes the specified BackupPlanAssociation message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {google.cloud.backupdr.v1.IBackupPlanAssociation} message BackupPlanAssociation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupPlanAssociation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupPlanAssociation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupPlanAssociation.decode = function 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.backupdr.v1.BackupPlanAssociation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.resourceType = reader.string(); - break; - } - case 3: { - message.resource = reader.string(); - break; - } - case 4: { - message.backupPlan = reader.string(); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.state = reader.int32(); - break; - } - case 8: { - if (!(message.rulesConfigInfo && message.rulesConfigInfo.length)) - message.rulesConfigInfo = []; - message.rulesConfigInfo.push($root.google.cloud.backupdr.v1.RuleConfigInfo.decode(reader, reader.uint32())); - break; - } - case 9: { - message.dataSource = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupPlanAssociation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupPlanAssociation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupPlanAssociation message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupPlanAssociation.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.resourceType != null && message.hasOwnProperty("resourceType")) - if (!$util.isString(message.resourceType)) - return "resourceType: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - if (!$util.isString(message.backupPlan)) - return "backupPlan: 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.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.rulesConfigInfo != null && message.hasOwnProperty("rulesConfigInfo")) { - if (!Array.isArray(message.rulesConfigInfo)) - return "rulesConfigInfo: array expected"; - for (var i = 0; i < message.rulesConfigInfo.length; ++i) { - var error = $root.google.cloud.backupdr.v1.RuleConfigInfo.verify(message.rulesConfigInfo[i]); - if (error) - return "rulesConfigInfo." + error; - } - } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: string expected"; - return null; - }; - - /** - * Creates a BackupPlanAssociation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation - */ - BackupPlanAssociation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupPlanAssociation) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupPlanAssociation(); - if (object.name != null) - message.name = String(object.name); - if (object.resourceType != null) - message.resourceType = String(object.resourceType); - if (object.resource != null) - message.resource = String(object.resource); - if (object.backupPlan != null) - message.backupPlan = String(object.backupPlan); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.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.backupdr.v1.BackupPlanAssociation.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - 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 "ACTIVE": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "INACTIVE": - case 4: - message.state = 4; - break; - } - if (object.rulesConfigInfo) { - if (!Array.isArray(object.rulesConfigInfo)) - throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.rulesConfigInfo: array expected"); - message.rulesConfigInfo = []; - for (var i = 0; i < object.rulesConfigInfo.length; ++i) { - if (typeof object.rulesConfigInfo[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.rulesConfigInfo: object expected"); - message.rulesConfigInfo[i] = $root.google.cloud.backupdr.v1.RuleConfigInfo.fromObject(object.rulesConfigInfo[i]); - } - } - if (object.dataSource != null) - message.dataSource = String(object.dataSource); - return message; - }; - - /** - * Creates a plain object from a BackupPlanAssociation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {google.cloud.backupdr.v1.BackupPlanAssociation} message BackupPlanAssociation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupPlanAssociation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rulesConfigInfo = []; - if (options.defaults) { - object.name = ""; - object.resourceType = ""; - object.resource = ""; - object.backupPlan = ""; - object.createTime = null; - object.updateTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.dataSource = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = message.resourceType; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - object.backupPlan = message.backupPlan; - 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.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupPlanAssociation.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupPlanAssociation.State[message.state] : message.state; - if (message.rulesConfigInfo && message.rulesConfigInfo.length) { - object.rulesConfigInfo = []; - for (var j = 0; j < message.rulesConfigInfo.length; ++j) - object.rulesConfigInfo[j] = $root.google.cloud.backupdr.v1.RuleConfigInfo.toObject(message.rulesConfigInfo[j], options); - } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; - return object; - }; - - /** - * Converts this BackupPlanAssociation to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - * @returns {Object.} JSON object - */ - BackupPlanAssociation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupPlanAssociation - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupPlanAssociation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupPlanAssociation"; - }; - - /** - * State enum. - * @name google.cloud.backupdr.v1.BackupPlanAssociation.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} DELETING=3 DELETING value - * @property {number} INACTIVE=4 INACTIVE value - */ - BackupPlanAssociation.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "INACTIVE"] = 4; - return values; - })(); - - return BackupPlanAssociation; - })(); - - v1.RuleConfigInfo = (function() { - - /** - * Properties of a RuleConfigInfo. - * @memberof google.cloud.backupdr.v1 - * @interface IRuleConfigInfo - * @property {string|null} [ruleId] RuleConfigInfo ruleId - * @property {google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|null} [lastBackupState] RuleConfigInfo lastBackupState - * @property {google.rpc.IStatus|null} [lastBackupError] RuleConfigInfo lastBackupError - * @property {google.protobuf.ITimestamp|null} [lastSuccessfulBackupConsistencyTime] RuleConfigInfo lastSuccessfulBackupConsistencyTime - */ - - /** - * Constructs a new RuleConfigInfo. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a RuleConfigInfo. - * @implements IRuleConfigInfo - * @constructor - * @param {google.cloud.backupdr.v1.IRuleConfigInfo=} [properties] Properties to set - */ - function RuleConfigInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RuleConfigInfo ruleId. - * @member {string} ruleId - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @instance - */ - RuleConfigInfo.prototype.ruleId = ""; - - /** - * RuleConfigInfo lastBackupState. - * @member {google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState} lastBackupState - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @instance - */ - RuleConfigInfo.prototype.lastBackupState = 0; - - /** - * RuleConfigInfo lastBackupError. - * @member {google.rpc.IStatus|null|undefined} lastBackupError - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @instance - */ - RuleConfigInfo.prototype.lastBackupError = null; - - /** - * RuleConfigInfo lastSuccessfulBackupConsistencyTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastSuccessfulBackupConsistencyTime - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @instance - */ - RuleConfigInfo.prototype.lastSuccessfulBackupConsistencyTime = null; - - /** - * Creates a new RuleConfigInfo instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IRuleConfigInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo instance - */ - RuleConfigInfo.create = function create(properties) { - return new RuleConfigInfo(properties); - }; - - /** - * Encodes the specified RuleConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IRuleConfigInfo} message RuleConfigInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RuleConfigInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ruleId); - if (message.lastBackupState != null && Object.hasOwnProperty.call(message, "lastBackupState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.lastBackupState); - if (message.lastBackupError != null && Object.hasOwnProperty.call(message, "lastBackupError")) - $root.google.rpc.Status.encode(message.lastBackupError, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.lastSuccessfulBackupConsistencyTime != null && Object.hasOwnProperty.call(message, "lastSuccessfulBackupConsistencyTime")) - $root.google.protobuf.Timestamp.encode(message.lastSuccessfulBackupConsistencyTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RuleConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IRuleConfigInfo} message RuleConfigInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RuleConfigInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RuleConfigInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RuleConfigInfo.decode = function 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.backupdr.v1.RuleConfigInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ruleId = reader.string(); - break; - } - case 3: { - message.lastBackupState = reader.int32(); - break; - } - case 4: { - message.lastBackupError = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 5: { - message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RuleConfigInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RuleConfigInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RuleConfigInfo message. - * @function verify - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RuleConfigInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ruleId != null && message.hasOwnProperty("ruleId")) - if (!$util.isString(message.ruleId)) - return "ruleId: string expected"; - if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) - switch (message.lastBackupState) { - default: - return "lastBackupState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) { - var error = $root.google.rpc.Status.verify(message.lastBackupError); - if (error) - return "lastBackupError." + error; - } - if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime); - if (error) - return "lastSuccessfulBackupConsistencyTime." + error; - } - return null; - }; - - /** - * Creates a RuleConfigInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo - */ - RuleConfigInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.RuleConfigInfo) - return object; - var message = new $root.google.cloud.backupdr.v1.RuleConfigInfo(); - if (object.ruleId != null) - message.ruleId = String(object.ruleId); - switch (object.lastBackupState) { - default: - if (typeof object.lastBackupState === "number") { - message.lastBackupState = object.lastBackupState; - break; - } - break; - case "LAST_BACKUP_STATE_UNSPECIFIED": - case 0: - message.lastBackupState = 0; - break; - case "FIRST_BACKUP_PENDING": - case 1: - message.lastBackupState = 1; - break; - case "PERMISSION_DENIED": - case 2: - message.lastBackupState = 2; - break; - case "SUCCEEDED": - case 3: - message.lastBackupState = 3; - break; - case "FAILED": - case 4: - message.lastBackupState = 4; - break; - } - if (object.lastBackupError != null) { - if (typeof object.lastBackupError !== "object") - throw TypeError(".google.cloud.backupdr.v1.RuleConfigInfo.lastBackupError: object expected"); - message.lastBackupError = $root.google.rpc.Status.fromObject(object.lastBackupError); - } - if (object.lastSuccessfulBackupConsistencyTime != null) { - if (typeof object.lastSuccessfulBackupConsistencyTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.RuleConfigInfo.lastSuccessfulBackupConsistencyTime: object expected"); - message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime); - } - return message; - }; - - /** - * Creates a plain object from a RuleConfigInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {google.cloud.backupdr.v1.RuleConfigInfo} message RuleConfigInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RuleConfigInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.ruleId = ""; - object.lastBackupState = options.enums === String ? "LAST_BACKUP_STATE_UNSPECIFIED" : 0; - object.lastBackupError = null; - object.lastSuccessfulBackupConsistencyTime = null; - } - if (message.ruleId != null && message.hasOwnProperty("ruleId")) - object.ruleId = message.ruleId; - if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) - object.lastBackupState = options.enums === String ? $root.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState[message.lastBackupState] === undefined ? message.lastBackupState : $root.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState[message.lastBackupState] : message.lastBackupState; - if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) - object.lastBackupError = $root.google.rpc.Status.toObject(message.lastBackupError, options); - if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) - object.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime, options); - return object; - }; - - /** - * Converts this RuleConfigInfo to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @instance - * @returns {Object.} JSON object - */ - RuleConfigInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RuleConfigInfo - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RuleConfigInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.RuleConfigInfo"; - }; - - /** - * LastBackupState enum. - * @name google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState - * @enum {number} - * @property {number} LAST_BACKUP_STATE_UNSPECIFIED=0 LAST_BACKUP_STATE_UNSPECIFIED value - * @property {number} FIRST_BACKUP_PENDING=1 FIRST_BACKUP_PENDING value - * @property {number} PERMISSION_DENIED=2 PERMISSION_DENIED value - * @property {number} SUCCEEDED=3 SUCCEEDED value - * @property {number} FAILED=4 FAILED value - */ - RuleConfigInfo.LastBackupState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAST_BACKUP_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FIRST_BACKUP_PENDING"] = 1; - values[valuesById[2] = "PERMISSION_DENIED"] = 2; - values[valuesById[3] = "SUCCEEDED"] = 3; - values[valuesById[4] = "FAILED"] = 4; - return values; - })(); - - return RuleConfigInfo; - })(); - - v1.CreateBackupPlanAssociationRequest = (function() { - - /** - * Properties of a CreateBackupPlanAssociationRequest. - * @memberof google.cloud.backupdr.v1 - * @interface ICreateBackupPlanAssociationRequest - * @property {string|null} [parent] CreateBackupPlanAssociationRequest parent - * @property {string|null} [backupPlanAssociationId] CreateBackupPlanAssociationRequest backupPlanAssociationId - * @property {google.cloud.backupdr.v1.IBackupPlanAssociation|null} [backupPlanAssociation] CreateBackupPlanAssociationRequest backupPlanAssociation - * @property {string|null} [requestId] CreateBackupPlanAssociationRequest requestId - */ - - /** - * Constructs a new CreateBackupPlanAssociationRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CreateBackupPlanAssociationRequest. - * @implements ICreateBackupPlanAssociationRequest - * @constructor - * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest=} [properties] Properties to set - */ - function CreateBackupPlanAssociationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateBackupPlanAssociationRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @instance - */ - CreateBackupPlanAssociationRequest.prototype.parent = ""; - - /** - * CreateBackupPlanAssociationRequest backupPlanAssociationId. - * @member {string} backupPlanAssociationId - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @instance - */ - CreateBackupPlanAssociationRequest.prototype.backupPlanAssociationId = ""; - - /** - * CreateBackupPlanAssociationRequest backupPlanAssociation. - * @member {google.cloud.backupdr.v1.IBackupPlanAssociation|null|undefined} backupPlanAssociation - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @instance - */ - CreateBackupPlanAssociationRequest.prototype.backupPlanAssociation = null; - - /** - * CreateBackupPlanAssociationRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @instance - */ - CreateBackupPlanAssociationRequest.prototype.requestId = ""; - - /** - * Creates a new CreateBackupPlanAssociationRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest instance - */ - CreateBackupPlanAssociationRequest.create = function create(properties) { - return new CreateBackupPlanAssociationRequest(properties); - }; - - /** - * Encodes the specified CreateBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupPlanAssociationRequest.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.backupPlanAssociationId != null && Object.hasOwnProperty.call(message, "backupPlanAssociationId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanAssociationId); - if (message.backupPlanAssociation != null && Object.hasOwnProperty.call(message, "backupPlanAssociation")) - $root.google.cloud.backupdr.v1.BackupPlanAssociation.encode(message.backupPlanAssociation, 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 CreateBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupPlanAssociationRequest.decode = function 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.backupdr.v1.CreateBackupPlanAssociationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.backupPlanAssociationId = reader.string(); - break; - } - case 3: { - message.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateBackupPlanAssociationRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateBackupPlanAssociationRequest.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.backupPlanAssociationId != null && message.hasOwnProperty("backupPlanAssociationId")) - if (!$util.isString(message.backupPlanAssociationId)) - return "backupPlanAssociationId: string expected"; - if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) { - var error = $root.google.cloud.backupdr.v1.BackupPlanAssociation.verify(message.backupPlanAssociation); - if (error) - return "backupPlanAssociation." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a CreateBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest - */ - CreateBackupPlanAssociationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.backupPlanAssociationId != null) - message.backupPlanAssociationId = String(object.backupPlanAssociationId); - if (object.backupPlanAssociation != null) { - if (typeof object.backupPlanAssociation !== "object") - throw TypeError(".google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.backupPlanAssociation: object expected"); - message.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.fromObject(object.backupPlanAssociation); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a CreateBackupPlanAssociationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateBackupPlanAssociationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.backupPlanAssociationId = ""; - object.backupPlanAssociation = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.backupPlanAssociationId != null && message.hasOwnProperty("backupPlanAssociationId")) - object.backupPlanAssociationId = message.backupPlanAssociationId; - if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) - object.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.toObject(message.backupPlanAssociation, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this CreateBackupPlanAssociationRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @instance - * @returns {Object.} JSON object - */ - CreateBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateBackupPlanAssociationRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest"; - }; - - return CreateBackupPlanAssociationRequest; - })(); - - v1.ListBackupPlanAssociationsRequest = (function() { - - /** - * Properties of a ListBackupPlanAssociationsRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupPlanAssociationsRequest - * @property {string|null} [parent] ListBackupPlanAssociationsRequest parent - * @property {number|null} [pageSize] ListBackupPlanAssociationsRequest pageSize - * @property {string|null} [pageToken] ListBackupPlanAssociationsRequest pageToken - * @property {string|null} [filter] ListBackupPlanAssociationsRequest filter - */ - - /** - * Constructs a new ListBackupPlanAssociationsRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupPlanAssociationsRequest. - * @implements IListBackupPlanAssociationsRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest=} [properties] Properties to set - */ - function ListBackupPlanAssociationsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListBackupPlanAssociationsRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @instance - */ - ListBackupPlanAssociationsRequest.prototype.parent = ""; - - /** - * ListBackupPlanAssociationsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @instance - */ - ListBackupPlanAssociationsRequest.prototype.pageSize = 0; - - /** - * ListBackupPlanAssociationsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @instance - */ - ListBackupPlanAssociationsRequest.prototype.pageToken = ""; - - /** - * ListBackupPlanAssociationsRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @instance - */ - ListBackupPlanAssociationsRequest.prototype.filter = ""; - - /** - * Creates a new ListBackupPlanAssociationsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest instance - */ - ListBackupPlanAssociationsRequest.create = function create(properties) { - return new ListBackupPlanAssociationsRequest(properties); - }; - - /** - * Encodes the specified ListBackupPlanAssociationsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlanAssociationsRequest.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); - return writer; - }; - - /** - * Encodes the specified ListBackupPlanAssociationsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlanAssociationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlanAssociationsRequest.decode = function 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.backupdr.v1.ListBackupPlanAssociationsRequest(); - 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; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlanAssociationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupPlanAssociationsRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupPlanAssociationsRequest.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"; - return null; - }; - - /** - * Creates a ListBackupPlanAssociationsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest - */ - ListBackupPlanAssociationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest(); - 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); - return message; - }; - - /** - * Creates a plain object from a ListBackupPlanAssociationsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupPlanAssociationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - 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; - return object; - }; - - /** - * Converts this ListBackupPlanAssociationsRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @instance - * @returns {Object.} JSON object - */ - ListBackupPlanAssociationsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupPlanAssociationsRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupPlanAssociationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest"; - }; - - return ListBackupPlanAssociationsRequest; - })(); - - v1.ListBackupPlanAssociationsResponse = (function() { - - /** - * Properties of a ListBackupPlanAssociationsResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupPlanAssociationsResponse - * @property {Array.|null} [backupPlanAssociations] ListBackupPlanAssociationsResponse backupPlanAssociations - * @property {string|null} [nextPageToken] ListBackupPlanAssociationsResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupPlanAssociationsResponse unreachable - */ - - /** - * Constructs a new ListBackupPlanAssociationsResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupPlanAssociationsResponse. - * @implements IListBackupPlanAssociationsResponse - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse=} [properties] Properties to set - */ - function ListBackupPlanAssociationsResponse(properties) { - this.backupPlanAssociations = []; - 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]]; - } - - /** - * ListBackupPlanAssociationsResponse backupPlanAssociations. - * @member {Array.} backupPlanAssociations - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @instance - */ - ListBackupPlanAssociationsResponse.prototype.backupPlanAssociations = $util.emptyArray; - - /** - * ListBackupPlanAssociationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @instance - */ - ListBackupPlanAssociationsResponse.prototype.nextPageToken = ""; - - /** - * ListBackupPlanAssociationsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @instance - */ - ListBackupPlanAssociationsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListBackupPlanAssociationsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse instance - */ - ListBackupPlanAssociationsResponse.create = function create(properties) { - return new ListBackupPlanAssociationsResponse(properties); - }; - - /** - * Encodes the specified ListBackupPlanAssociationsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlanAssociationsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupPlanAssociations != null && message.backupPlanAssociations.length) - for (var i = 0; i < message.backupPlanAssociations.length; ++i) - $root.google.cloud.backupdr.v1.BackupPlanAssociation.encode(message.backupPlanAssociations[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 ListBackupPlanAssociationsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlanAssociationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlanAssociationsResponse.decode = function 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.backupdr.v1.ListBackupPlanAssociationsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.backupPlanAssociations && message.backupPlanAssociations.length)) - message.backupPlanAssociations = []; - message.backupPlanAssociations.push($root.google.cloud.backupdr.v1.BackupPlanAssociation.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 ListBackupPlanAssociationsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlanAssociationsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupPlanAssociationsResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupPlanAssociationsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupPlanAssociations != null && message.hasOwnProperty("backupPlanAssociations")) { - if (!Array.isArray(message.backupPlanAssociations)) - return "backupPlanAssociations: array expected"; - for (var i = 0; i < message.backupPlanAssociations.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupPlanAssociation.verify(message.backupPlanAssociations[i]); - if (error) - return "backupPlanAssociations." + 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 ListBackupPlanAssociationsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse - */ - ListBackupPlanAssociationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse(); - if (object.backupPlanAssociations) { - if (!Array.isArray(object.backupPlanAssociations)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.backupPlanAssociations: array expected"); - message.backupPlanAssociations = []; - for (var i = 0; i < object.backupPlanAssociations.length; ++i) { - if (typeof object.backupPlanAssociations[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.backupPlanAssociations: object expected"); - message.backupPlanAssociations[i] = $root.google.cloud.backupdr.v1.BackupPlanAssociation.fromObject(object.backupPlanAssociations[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.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 ListBackupPlanAssociationsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupPlanAssociationsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backupPlanAssociations = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backupPlanAssociations && message.backupPlanAssociations.length) { - object.backupPlanAssociations = []; - for (var j = 0; j < message.backupPlanAssociations.length; ++j) - object.backupPlanAssociations[j] = $root.google.cloud.backupdr.v1.BackupPlanAssociation.toObject(message.backupPlanAssociations[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 ListBackupPlanAssociationsResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @instance - * @returns {Object.} JSON object - */ - ListBackupPlanAssociationsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupPlanAssociationsResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupPlanAssociationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse"; - }; - - return ListBackupPlanAssociationsResponse; - })(); - - v1.GetBackupPlanAssociationRequest = (function() { - - /** - * Properties of a GetBackupPlanAssociationRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetBackupPlanAssociationRequest - * @property {string|null} [name] GetBackupPlanAssociationRequest name - */ - - /** - * Constructs a new GetBackupPlanAssociationRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetBackupPlanAssociationRequest. - * @implements IGetBackupPlanAssociationRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest=} [properties] Properties to set - */ - function GetBackupPlanAssociationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetBackupPlanAssociationRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @instance - */ - GetBackupPlanAssociationRequest.prototype.name = ""; - - /** - * Creates a new GetBackupPlanAssociationRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest instance - */ - GetBackupPlanAssociationRequest.create = function create(properties) { - return new GetBackupPlanAssociationRequest(properties); - }; - - /** - * Encodes the specified GetBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupPlanAssociationRequest.decode = function 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.backupdr.v1.GetBackupPlanAssociationRequest(); - 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 GetBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBackupPlanAssociationRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest - */ - GetBackupPlanAssociationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetBackupPlanAssociationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @instance - * @returns {Object.} JSON object - */ - GetBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetBackupPlanAssociationRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupPlanAssociationRequest"; - }; - - return GetBackupPlanAssociationRequest; - })(); - - v1.DeleteBackupPlanAssociationRequest = (function() { - - /** - * Properties of a DeleteBackupPlanAssociationRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IDeleteBackupPlanAssociationRequest - * @property {string|null} [name] DeleteBackupPlanAssociationRequest name - * @property {string|null} [requestId] DeleteBackupPlanAssociationRequest requestId - */ - - /** - * Constructs a new DeleteBackupPlanAssociationRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DeleteBackupPlanAssociationRequest. - * @implements IDeleteBackupPlanAssociationRequest - * @constructor - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest=} [properties] Properties to set - */ - function DeleteBackupPlanAssociationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteBackupPlanAssociationRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @instance - */ - DeleteBackupPlanAssociationRequest.prototype.name = ""; - - /** - * DeleteBackupPlanAssociationRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @instance - */ - DeleteBackupPlanAssociationRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteBackupPlanAssociationRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest instance - */ - DeleteBackupPlanAssociationRequest.create = function create(properties) { - return new DeleteBackupPlanAssociationRequest(properties); - }; - - /** - * Encodes the specified DeleteBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupPlanAssociationRequest.decode = function 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.backupdr.v1.DeleteBackupPlanAssociationRequest(); - 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 DeleteBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteBackupPlanAssociationRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest - */ - DeleteBackupPlanAssociationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest(); - 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 DeleteBackupPlanAssociationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteBackupPlanAssociationRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest"; - }; - - return DeleteBackupPlanAssociationRequest; - })(); - - v1.TriggerBackupRequest = (function() { - - /** - * Properties of a TriggerBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface ITriggerBackupRequest - * @property {string|null} [name] TriggerBackupRequest name - * @property {string|null} [ruleId] TriggerBackupRequest ruleId - * @property {string|null} [requestId] TriggerBackupRequest requestId - */ - - /** - * Constructs a new TriggerBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a TriggerBackupRequest. - * @implements ITriggerBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.ITriggerBackupRequest=} [properties] Properties to set - */ - function TriggerBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TriggerBackupRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @instance - */ - TriggerBackupRequest.prototype.name = ""; - - /** - * TriggerBackupRequest ruleId. - * @member {string} ruleId - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @instance - */ - TriggerBackupRequest.prototype.ruleId = ""; - - /** - * TriggerBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @instance - */ - TriggerBackupRequest.prototype.requestId = ""; - - /** - * Creates a new TriggerBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {google.cloud.backupdr.v1.ITriggerBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest instance - */ - TriggerBackupRequest.create = function create(properties) { - return new TriggerBackupRequest(properties); - }; - - /** - * Encodes the specified TriggerBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} message TriggerBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TriggerBackupRequest.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.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ruleId); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified TriggerBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} message TriggerBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TriggerBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TriggerBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TriggerBackupRequest.decode = function 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.backupdr.v1.TriggerBackupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.ruleId = reader.string(); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TriggerBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TriggerBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TriggerBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TriggerBackupRequest.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.ruleId != null && message.hasOwnProperty("ruleId")) - if (!$util.isString(message.ruleId)) - return "ruleId: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a TriggerBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest - */ - TriggerBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.TriggerBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.TriggerBackupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.ruleId != null) - message.ruleId = String(object.ruleId); - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a TriggerBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {google.cloud.backupdr.v1.TriggerBackupRequest} message TriggerBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TriggerBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.ruleId = ""; - object.requestId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.ruleId != null && message.hasOwnProperty("ruleId")) - object.ruleId = message.ruleId; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this TriggerBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @instance - * @returns {Object.} JSON object - */ - TriggerBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TriggerBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TriggerBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.TriggerBackupRequest"; - }; - - return TriggerBackupRequest; - })(); - - v1.BackupVault = (function() { - - /** - * Properties of a BackupVault. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupVault - * @property {string|null} [name] BackupVault name - * @property {string|null} [description] BackupVault description - * @property {Object.|null} [labels] BackupVault labels - * @property {google.protobuf.ITimestamp|null} [createTime] BackupVault createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] BackupVault updateTime - * @property {google.protobuf.IDuration|null} [backupMinimumEnforcedRetentionDuration] BackupVault backupMinimumEnforcedRetentionDuration - * @property {boolean|null} [deletable] BackupVault deletable - * @property {string|null} [etag] BackupVault etag - * @property {google.cloud.backupdr.v1.BackupVault.State|null} [state] BackupVault state - * @property {google.protobuf.ITimestamp|null} [effectiveTime] BackupVault effectiveTime - * @property {number|Long|null} [backupCount] BackupVault backupCount - * @property {string|null} [serviceAccount] BackupVault serviceAccount - * @property {number|Long|null} [totalStoredBytes] BackupVault totalStoredBytes - * @property {string|null} [uid] BackupVault uid - * @property {Object.|null} [annotations] BackupVault annotations - * @property {google.cloud.backupdr.v1.BackupVault.AccessRestriction|null} [accessRestriction] BackupVault accessRestriction - */ - - /** - * Constructs a new BackupVault. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupVault. - * @implements IBackupVault - * @constructor - * @param {google.cloud.backupdr.v1.IBackupVault=} [properties] Properties to set - */ - function BackupVault(properties) { - this.labels = {}; - this.annotations = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupVault name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.name = ""; - - /** - * BackupVault description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.description = null; - - /** - * BackupVault labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.labels = $util.emptyObject; - - /** - * BackupVault createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.createTime = null; - - /** - * BackupVault updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.updateTime = null; - - /** - * BackupVault backupMinimumEnforcedRetentionDuration. - * @member {google.protobuf.IDuration|null|undefined} backupMinimumEnforcedRetentionDuration - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.backupMinimumEnforcedRetentionDuration = null; - - /** - * BackupVault deletable. - * @member {boolean|null|undefined} deletable - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.deletable = null; - - /** - * BackupVault etag. - * @member {string|null|undefined} etag - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.etag = null; - - /** - * BackupVault state. - * @member {google.cloud.backupdr.v1.BackupVault.State} state - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.state = 0; - - /** - * BackupVault effectiveTime. - * @member {google.protobuf.ITimestamp|null|undefined} effectiveTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.effectiveTime = null; - - /** - * BackupVault backupCount. - * @member {number|Long} backupCount - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.backupCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BackupVault serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.serviceAccount = ""; - - /** - * BackupVault totalStoredBytes. - * @member {number|Long} totalStoredBytes - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.totalStoredBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BackupVault uid. - * @member {string} uid - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.uid = ""; - - /** - * BackupVault annotations. - * @member {Object.} annotations - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.annotations = $util.emptyObject; - - /** - * BackupVault accessRestriction. - * @member {google.cloud.backupdr.v1.BackupVault.AccessRestriction} accessRestriction - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.accessRestriction = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupVault _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupVault _createTime. - * @member {"createTime"|undefined} _createTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_createTime", { - get: $util.oneOfGetter($oneOfFields = ["createTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupVault _updateTime. - * @member {"updateTime"|undefined} _updateTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_updateTime", { - get: $util.oneOfGetter($oneOfFields = ["updateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupVault _backupMinimumEnforcedRetentionDuration. - * @member {"backupMinimumEnforcedRetentionDuration"|undefined} _backupMinimumEnforcedRetentionDuration - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_backupMinimumEnforcedRetentionDuration", { - get: $util.oneOfGetter($oneOfFields = ["backupMinimumEnforcedRetentionDuration"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupVault _deletable. - * @member {"deletable"|undefined} _deletable - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_deletable", { - get: $util.oneOfGetter($oneOfFields = ["deletable"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupVault _etag. - * @member {"etag"|undefined} _etag - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_etag", { - get: $util.oneOfGetter($oneOfFields = ["etag"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupVault _effectiveTime. - * @member {"effectiveTime"|undefined} _effectiveTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_effectiveTime", { - get: $util.oneOfGetter($oneOfFields = ["effectiveTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupVault instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {google.cloud.backupdr.v1.IBackupVault=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault instance - */ - BackupVault.create = function create(properties) { - return new BackupVault(properties); - }; - - /** - * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {google.cloud.backupdr.v1.IBackupVault} message BackupVault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupVault.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - 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 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.deletable != null && Object.hasOwnProperty.call(message, "deletable")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.deletable); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.etag); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); - if (message.effectiveTime != null && Object.hasOwnProperty.call(message, "effectiveTime")) - $root.google.protobuf.Timestamp.encode(message.effectiveTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.backupCount != null && Object.hasOwnProperty.call(message, "backupCount")) - writer.uint32(/* id 17, wireType 0 =*/136).int64(message.backupCount); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.serviceAccount); - if (message.totalStoredBytes != null && Object.hasOwnProperty.call(message, "totalStoredBytes")) - writer.uint32(/* id 19, wireType 0 =*/152).int64(message.totalStoredBytes); - if (message.backupMinimumEnforcedRetentionDuration != null && Object.hasOwnProperty.call(message, "backupMinimumEnforcedRetentionDuration")) - $root.google.protobuf.Duration.encode(message.backupMinimumEnforcedRetentionDuration, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 21, wireType 2 =*/170).string(message.uid); - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) - for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) - writer.uint32(/* id 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); - if (message.accessRestriction != null && Object.hasOwnProperty.call(message, "accessRestriction")) - writer.uint32(/* id 24, wireType 0 =*/192).int32(message.accessRestriction); - return writer; - }; - - /** - * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {google.cloud.backupdr.v1.IBackupVault} message BackupVault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupVault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupVault message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupVault.decode = function 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.backupdr.v1.BackupVault(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - 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 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 20: { - message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 8: { - message.deletable = reader.bool(); - break; - } - case 9: { - message.etag = reader.string(); - break; - } - case 10: { - message.state = reader.int32(); - break; - } - case 12: { - message.effectiveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 17: { - message.backupCount = reader.int64(); - break; - } - case 18: { - message.serviceAccount = reader.string(); - break; - } - case 19: { - message.totalStoredBytes = reader.int64(); - break; - } - case 21: { - message.uid = reader.string(); - break; - } - case 22: { - if (message.annotations === $util.emptyObject) - message.annotations = {}; - 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.annotations[key] = value; - break; - } - case 24: { - message.accessRestriction = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupVault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupVault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupVault message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupVault.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.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - properties._createTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - properties._updateTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - } - if (message.backupMinimumEnforcedRetentionDuration != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDuration")) { - properties._backupMinimumEnforcedRetentionDuration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.backupMinimumEnforcedRetentionDuration); - if (error) - return "backupMinimumEnforcedRetentionDuration." + error; - } - } - if (message.deletable != null && message.hasOwnProperty("deletable")) { - properties._deletable = 1; - if (typeof message.deletable !== "boolean") - return "deletable: boolean expected"; - } - if (message.etag != null && message.hasOwnProperty("etag")) { - properties._etag = 1; - if (!$util.isString(message.etag)) - return "etag: 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.effectiveTime != null && message.hasOwnProperty("effectiveTime")) { - properties._effectiveTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.effectiveTime); - if (error) - return "effectiveTime." + error; - } - } - if (message.backupCount != null && message.hasOwnProperty("backupCount")) - if (!$util.isInteger(message.backupCount) && !(message.backupCount && $util.isInteger(message.backupCount.low) && $util.isInteger(message.backupCount.high))) - return "backupCount: integer|Long expected"; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) - if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) - return "totalStoredBytes: integer|Long expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.annotations != null && message.hasOwnProperty("annotations")) { - if (!$util.isObject(message.annotations)) - return "annotations: object expected"; - var key = Object.keys(message.annotations); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.annotations[key[i]])) - return "annotations: string{k:string} expected"; - } - if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) - switch (message.accessRestriction) { - default: - return "accessRestriction: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault - */ - BackupVault.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupVault) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupVault(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.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.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.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.backupdr.v1.BackupVault.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.backupMinimumEnforcedRetentionDuration != null) { - if (typeof object.backupMinimumEnforcedRetentionDuration !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.backupMinimumEnforcedRetentionDuration: object expected"); - message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.fromObject(object.backupMinimumEnforcedRetentionDuration); - } - if (object.deletable != null) - message.deletable = Boolean(object.deletable); - if (object.etag != null) - message.etag = String(object.etag); - 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 "ACTIVE": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ERROR": - case 4: - message.state = 4; - break; - } - if (object.effectiveTime != null) { - if (typeof object.effectiveTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.effectiveTime: object expected"); - message.effectiveTime = $root.google.protobuf.Timestamp.fromObject(object.effectiveTime); - } - if (object.backupCount != null) - if ($util.Long) - (message.backupCount = $util.Long.fromValue(object.backupCount)).unsigned = false; - else if (typeof object.backupCount === "string") - message.backupCount = parseInt(object.backupCount, 10); - else if (typeof object.backupCount === "number") - message.backupCount = object.backupCount; - else if (typeof object.backupCount === "object") - message.backupCount = new $util.LongBits(object.backupCount.low >>> 0, object.backupCount.high >>> 0).toNumber(); - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.totalStoredBytes != null) - if ($util.Long) - (message.totalStoredBytes = $util.Long.fromValue(object.totalStoredBytes)).unsigned = false; - else if (typeof object.totalStoredBytes === "string") - message.totalStoredBytes = parseInt(object.totalStoredBytes, 10); - else if (typeof object.totalStoredBytes === "number") - message.totalStoredBytes = object.totalStoredBytes; - else if (typeof object.totalStoredBytes === "object") - message.totalStoredBytes = new $util.LongBits(object.totalStoredBytes.low >>> 0, object.totalStoredBytes.high >>> 0).toNumber(); - if (object.uid != null) - message.uid = String(object.uid); - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.annotations: object expected"); - message.annotations = {}; - for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) - message.annotations[keys[i]] = String(object.annotations[keys[i]]); - } - switch (object.accessRestriction) { - default: - if (typeof object.accessRestriction === "number") { - message.accessRestriction = object.accessRestriction; - break; - } - break; - case "ACCESS_RESTRICTION_UNSPECIFIED": - case 0: - message.accessRestriction = 0; - break; - case "WITHIN_PROJECT": - case 1: - message.accessRestriction = 1; - break; - case "WITHIN_ORGANIZATION": - case 2: - message.accessRestriction = 2; - break; - case "UNRESTRICTED": - case 3: - message.accessRestriction = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a BackupVault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {google.cloud.backupdr.v1.BackupVault} message BackupVault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupVault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) { - object.labels = {}; - object.annotations = {}; - } - if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.backupCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.backupCount = options.longs === String ? "0" : 0; - object.serviceAccount = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalStoredBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalStoredBytes = options.longs === String ? "0" : 0; - object.uid = ""; - object.accessRestriction = options.enums === String ? "ACCESS_RESTRICTION_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - 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.createTime != null && message.hasOwnProperty("createTime")) { - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (options.oneofs) - object._createTime = "createTime"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (options.oneofs) - object._updateTime = "updateTime"; - } - if (message.deletable != null && message.hasOwnProperty("deletable")) { - object.deletable = message.deletable; - if (options.oneofs) - object._deletable = "deletable"; - } - if (message.etag != null && message.hasOwnProperty("etag")) { - object.etag = message.etag; - if (options.oneofs) - object._etag = "etag"; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupVault.State[message.state] : message.state; - if (message.effectiveTime != null && message.hasOwnProperty("effectiveTime")) { - object.effectiveTime = $root.google.protobuf.Timestamp.toObject(message.effectiveTime, options); - if (options.oneofs) - object._effectiveTime = "effectiveTime"; - } - if (message.backupCount != null && message.hasOwnProperty("backupCount")) - if (typeof message.backupCount === "number") - object.backupCount = options.longs === String ? String(message.backupCount) : message.backupCount; - else - object.backupCount = options.longs === String ? $util.Long.prototype.toString.call(message.backupCount) : options.longs === Number ? new $util.LongBits(message.backupCount.low >>> 0, message.backupCount.high >>> 0).toNumber() : message.backupCount; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) - if (typeof message.totalStoredBytes === "number") - object.totalStoredBytes = options.longs === String ? String(message.totalStoredBytes) : message.totalStoredBytes; - else - object.totalStoredBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStoredBytes) : options.longs === Number ? new $util.LongBits(message.totalStoredBytes.low >>> 0, message.totalStoredBytes.high >>> 0).toNumber() : message.totalStoredBytes; - if (message.backupMinimumEnforcedRetentionDuration != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDuration")) { - object.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.toObject(message.backupMinimumEnforcedRetentionDuration, options); - if (options.oneofs) - object._backupMinimumEnforcedRetentionDuration = "backupMinimumEnforcedRetentionDuration"; - } - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { - object.annotations = {}; - for (var j = 0; j < keys2.length; ++j) - object.annotations[keys2[j]] = message.annotations[keys2[j]]; - } - if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) - object.accessRestriction = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] === undefined ? message.accessRestriction : $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] : message.accessRestriction; - return object; - }; - - /** - * Converts this BackupVault to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - * @returns {Object.} JSON object - */ - BackupVault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupVault - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupVault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupVault"; - }; - - /** - * State enum. - * @name google.cloud.backupdr.v1.BackupVault.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} DELETING=3 DELETING value - * @property {number} ERROR=4 ERROR value - */ - BackupVault.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "ERROR"] = 4; - return values; - })(); - - /** - * AccessRestriction enum. - * @name google.cloud.backupdr.v1.BackupVault.AccessRestriction - * @enum {number} - * @property {number} ACCESS_RESTRICTION_UNSPECIFIED=0 ACCESS_RESTRICTION_UNSPECIFIED value - * @property {number} WITHIN_PROJECT=1 WITHIN_PROJECT value - * @property {number} WITHIN_ORGANIZATION=2 WITHIN_ORGANIZATION value - * @property {number} UNRESTRICTED=3 UNRESTRICTED value - */ - BackupVault.AccessRestriction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACCESS_RESTRICTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "WITHIN_PROJECT"] = 1; - values[valuesById[2] = "WITHIN_ORGANIZATION"] = 2; - values[valuesById[3] = "UNRESTRICTED"] = 3; - return values; - })(); - - return BackupVault; - })(); - - v1.DataSource = (function() { - - /** - * Properties of a DataSource. - * @memberof google.cloud.backupdr.v1 - * @interface IDataSource - * @property {string|null} [name] DataSource name - * @property {google.cloud.backupdr.v1.DataSource.State|null} [state] DataSource state - * @property {Object.|null} [labels] DataSource labels - * @property {google.protobuf.ITimestamp|null} [createTime] DataSource createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] DataSource updateTime - * @property {number|Long|null} [backupCount] DataSource backupCount - * @property {string|null} [etag] DataSource etag - * @property {number|Long|null} [totalStoredBytes] DataSource totalStoredBytes - * @property {google.cloud.backupdr.v1.BackupConfigState|null} [configState] DataSource configState - * @property {google.cloud.backupdr.v1.IBackupConfigInfo|null} [backupConfigInfo] DataSource backupConfigInfo - * @property {google.cloud.backupdr.v1.IDataSourceGcpResource|null} [dataSourceGcpResource] DataSource dataSourceGcpResource - * @property {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null} [dataSourceBackupApplianceApplication] DataSource dataSourceBackupApplianceApplication - */ - - /** - * Constructs a new DataSource. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DataSource. - * @implements IDataSource - * @constructor - * @param {google.cloud.backupdr.v1.IDataSource=} [properties] Properties to set - */ - function DataSource(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]]; - } - - /** - * DataSource name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.name = ""; - - /** - * DataSource state. - * @member {google.cloud.backupdr.v1.DataSource.State} state - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.state = 0; - - /** - * DataSource labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.labels = $util.emptyObject; - - /** - * DataSource createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.createTime = null; - - /** - * DataSource updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.updateTime = null; - - /** - * DataSource backupCount. - * @member {number|Long|null|undefined} backupCount - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.backupCount = null; - - /** - * DataSource etag. - * @member {string|null|undefined} etag - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.etag = null; - - /** - * DataSource totalStoredBytes. - * @member {number|Long|null|undefined} totalStoredBytes - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.totalStoredBytes = null; - - /** - * DataSource configState. - * @member {google.cloud.backupdr.v1.BackupConfigState} configState - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.configState = 0; - - /** - * DataSource backupConfigInfo. - * @member {google.cloud.backupdr.v1.IBackupConfigInfo|null|undefined} backupConfigInfo - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.backupConfigInfo = null; - - /** - * DataSource dataSourceGcpResource. - * @member {google.cloud.backupdr.v1.IDataSourceGcpResource|null|undefined} dataSourceGcpResource - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.dataSourceGcpResource = null; - - /** - * DataSource dataSourceBackupApplianceApplication. - * @member {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null|undefined} dataSourceBackupApplianceApplication - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.dataSourceBackupApplianceApplication = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataSource _createTime. - * @member {"createTime"|undefined} _createTime - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "_createTime", { - get: $util.oneOfGetter($oneOfFields = ["createTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DataSource _updateTime. - * @member {"updateTime"|undefined} _updateTime - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "_updateTime", { - get: $util.oneOfGetter($oneOfFields = ["updateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DataSource _backupCount. - * @member {"backupCount"|undefined} _backupCount - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "_backupCount", { - get: $util.oneOfGetter($oneOfFields = ["backupCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DataSource _etag. - * @member {"etag"|undefined} _etag - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "_etag", { - get: $util.oneOfGetter($oneOfFields = ["etag"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DataSource _totalStoredBytes. - * @member {"totalStoredBytes"|undefined} _totalStoredBytes - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "_totalStoredBytes", { - get: $util.oneOfGetter($oneOfFields = ["totalStoredBytes"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DataSource sourceResource. - * @member {"dataSourceGcpResource"|"dataSourceBackupApplianceApplication"|undefined} sourceResource - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "sourceResource", { - get: $util.oneOfGetter($oneOfFields = ["dataSourceGcpResource", "dataSourceBackupApplianceApplication"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataSource instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {google.cloud.backupdr.v1.IDataSource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DataSource} DataSource instance - */ - DataSource.create = function create(properties) { - return new DataSource(properties); - }; - - /** - * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {google.cloud.backupdr.v1.IDataSource} message DataSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.labels != null && 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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.backupCount != null && Object.hasOwnProperty.call(message, "backupCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.backupCount); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.etag); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 21, wireType 0 =*/168).int32(message.state); - if (message.totalStoredBytes != null && Object.hasOwnProperty.call(message, "totalStoredBytes")) - writer.uint32(/* id 23, wireType 0 =*/184).int64(message.totalStoredBytes); - if (message.configState != null && Object.hasOwnProperty.call(message, "configState")) - writer.uint32(/* id 24, wireType 0 =*/192).int32(message.configState); - if (message.backupConfigInfo != null && Object.hasOwnProperty.call(message, "backupConfigInfo")) - $root.google.cloud.backupdr.v1.BackupConfigInfo.encode(message.backupConfigInfo, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dataSourceGcpResource != null && Object.hasOwnProperty.call(message, "dataSourceGcpResource")) - $root.google.cloud.backupdr.v1.DataSourceGcpResource.encode(message.dataSourceGcpResource, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.dataSourceBackupApplianceApplication != null && Object.hasOwnProperty.call(message, "dataSourceBackupApplianceApplication")) - $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.encode(message.dataSourceBackupApplianceApplication, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {google.cloud.backupdr.v1.IDataSource} message DataSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataSource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DataSource} DataSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSource.decode = function 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.backupdr.v1.DataSource(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 21: { - message.state = reader.int32(); - 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.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.backupCount = reader.int64(); - break; - } - case 14: { - message.etag = reader.string(); - break; - } - case 23: { - message.totalStoredBytes = reader.int64(); - break; - } - case 24: { - message.configState = reader.int32(); - break; - } - case 25: { - message.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.decode(reader, reader.uint32()); - break; - } - case 26: { - message.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.decode(reader, reader.uint32()); - break; - } - case 27: { - message.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DataSource} DataSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataSource message. - * @function verify - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataSource.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.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.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.createTime != null && message.hasOwnProperty("createTime")) { - properties._createTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - properties._updateTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - } - if (message.backupCount != null && message.hasOwnProperty("backupCount")) { - properties._backupCount = 1; - if (!$util.isInteger(message.backupCount) && !(message.backupCount && $util.isInteger(message.backupCount.low) && $util.isInteger(message.backupCount.high))) - return "backupCount: integer|Long expected"; - } - if (message.etag != null && message.hasOwnProperty("etag")) { - properties._etag = 1; - if (!$util.isString(message.etag)) - return "etag: string expected"; - } - if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { - properties._totalStoredBytes = 1; - if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) - return "totalStoredBytes: integer|Long expected"; - } - if (message.configState != null && message.hasOwnProperty("configState")) - switch (message.configState) { - default: - return "configState: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.backupConfigInfo != null && message.hasOwnProperty("backupConfigInfo")) { - var error = $root.google.cloud.backupdr.v1.BackupConfigInfo.verify(message.backupConfigInfo); - if (error) - return "backupConfigInfo." + error; - } - if (message.dataSourceGcpResource != null && message.hasOwnProperty("dataSourceGcpResource")) { - properties.sourceResource = 1; - { - var error = $root.google.cloud.backupdr.v1.DataSourceGcpResource.verify(message.dataSourceGcpResource); - if (error) - return "dataSourceGcpResource." + error; - } - } - if (message.dataSourceBackupApplianceApplication != null && message.hasOwnProperty("dataSourceBackupApplianceApplication")) { - if (properties.sourceResource === 1) - return "sourceResource: multiple values"; - properties.sourceResource = 1; - { - var error = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify(message.dataSourceBackupApplianceApplication); - if (error) - return "dataSourceBackupApplianceApplication." + error; - } - } - return null; - }; - - /** - * Creates a DataSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DataSource} DataSource - */ - DataSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DataSource) - return object; - var message = new $root.google.cloud.backupdr.v1.DataSource(); - if (object.name != null) - message.name = String(object.name); - 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 "ACTIVE": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ERROR": - case 4: - message.state = 4; - break; - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.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.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.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.backupdr.v1.DataSource.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.backupCount != null) - if ($util.Long) - (message.backupCount = $util.Long.fromValue(object.backupCount)).unsigned = false; - else if (typeof object.backupCount === "string") - message.backupCount = parseInt(object.backupCount, 10); - else if (typeof object.backupCount === "number") - message.backupCount = object.backupCount; - else if (typeof object.backupCount === "object") - message.backupCount = new $util.LongBits(object.backupCount.low >>> 0, object.backupCount.high >>> 0).toNumber(); - if (object.etag != null) - message.etag = String(object.etag); - if (object.totalStoredBytes != null) - if ($util.Long) - (message.totalStoredBytes = $util.Long.fromValue(object.totalStoredBytes)).unsigned = false; - else if (typeof object.totalStoredBytes === "string") - message.totalStoredBytes = parseInt(object.totalStoredBytes, 10); - else if (typeof object.totalStoredBytes === "number") - message.totalStoredBytes = object.totalStoredBytes; - else if (typeof object.totalStoredBytes === "object") - message.totalStoredBytes = new $util.LongBits(object.totalStoredBytes.low >>> 0, object.totalStoredBytes.high >>> 0).toNumber(); - switch (object.configState) { - default: - if (typeof object.configState === "number") { - message.configState = object.configState; - break; - } - break; - case "BACKUP_CONFIG_STATE_UNSPECIFIED": - case 0: - message.configState = 0; - break; - case "ACTIVE": - case 1: - message.configState = 1; - break; - case "PASSIVE": - case 2: - message.configState = 2; - break; - } - if (object.backupConfigInfo != null) { - if (typeof object.backupConfigInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.backupConfigInfo: object expected"); - message.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.fromObject(object.backupConfigInfo); - } - if (object.dataSourceGcpResource != null) { - if (typeof object.dataSourceGcpResource !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.dataSourceGcpResource: object expected"); - message.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.fromObject(object.dataSourceGcpResource); - } - if (object.dataSourceBackupApplianceApplication != null) { - if (typeof object.dataSourceBackupApplianceApplication !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.dataSourceBackupApplianceApplication: object expected"); - message.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.fromObject(object.dataSourceBackupApplianceApplication); - } - return message; - }; - - /** - * Creates a plain object from a DataSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {google.cloud.backupdr.v1.DataSource} message DataSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.configState = options.enums === String ? "BACKUP_CONFIG_STATE_UNSPECIFIED" : 0; - object.backupConfigInfo = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - 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.createTime != null && message.hasOwnProperty("createTime")) { - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (options.oneofs) - object._createTime = "createTime"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (options.oneofs) - object._updateTime = "updateTime"; - } - if (message.backupCount != null && message.hasOwnProperty("backupCount")) { - if (typeof message.backupCount === "number") - object.backupCount = options.longs === String ? String(message.backupCount) : message.backupCount; - else - object.backupCount = options.longs === String ? $util.Long.prototype.toString.call(message.backupCount) : options.longs === Number ? new $util.LongBits(message.backupCount.low >>> 0, message.backupCount.high >>> 0).toNumber() : message.backupCount; - if (options.oneofs) - object._backupCount = "backupCount"; - } - if (message.etag != null && message.hasOwnProperty("etag")) { - object.etag = message.etag; - if (options.oneofs) - object._etag = "etag"; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.DataSource.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.DataSource.State[message.state] : message.state; - if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { - if (typeof message.totalStoredBytes === "number") - object.totalStoredBytes = options.longs === String ? String(message.totalStoredBytes) : message.totalStoredBytes; - else - object.totalStoredBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStoredBytes) : options.longs === Number ? new $util.LongBits(message.totalStoredBytes.low >>> 0, message.totalStoredBytes.high >>> 0).toNumber() : message.totalStoredBytes; - if (options.oneofs) - object._totalStoredBytes = "totalStoredBytes"; - } - if (message.configState != null && message.hasOwnProperty("configState")) - object.configState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigState[message.configState] === undefined ? message.configState : $root.google.cloud.backupdr.v1.BackupConfigState[message.configState] : message.configState; - if (message.backupConfigInfo != null && message.hasOwnProperty("backupConfigInfo")) - object.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.toObject(message.backupConfigInfo, options); - if (message.dataSourceGcpResource != null && message.hasOwnProperty("dataSourceGcpResource")) { - object.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.toObject(message.dataSourceGcpResource, options); - if (options.oneofs) - object.sourceResource = "dataSourceGcpResource"; - } - if (message.dataSourceBackupApplianceApplication != null && message.hasOwnProperty("dataSourceBackupApplianceApplication")) { - object.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.toObject(message.dataSourceBackupApplianceApplication, options); - if (options.oneofs) - object.sourceResource = "dataSourceBackupApplianceApplication"; - } - return object; - }; - - /** - * Converts this DataSource to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - * @returns {Object.} JSON object - */ - DataSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataSource - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSource"; - }; - - /** - * State enum. - * @name google.cloud.backupdr.v1.DataSource.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} DELETING=3 DELETING value - * @property {number} ERROR=4 ERROR value - */ - DataSource.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "ERROR"] = 4; - return values; - })(); - - return DataSource; - })(); - - v1.BackupConfigInfo = (function() { - - /** - * Properties of a BackupConfigInfo. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupConfigInfo - * @property {google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|null} [lastBackupState] BackupConfigInfo lastBackupState - * @property {google.protobuf.ITimestamp|null} [lastSuccessfulBackupConsistencyTime] BackupConfigInfo lastSuccessfulBackupConsistencyTime - * @property {google.rpc.IStatus|null} [lastBackupError] BackupConfigInfo lastBackupError - * @property {google.cloud.backupdr.v1.IGcpBackupConfig|null} [gcpBackupConfig] BackupConfigInfo gcpBackupConfig - * @property {google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null} [backupApplianceBackupConfig] BackupConfigInfo backupApplianceBackupConfig - */ - - /** - * Constructs a new BackupConfigInfo. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupConfigInfo. - * @implements IBackupConfigInfo - * @constructor - * @param {google.cloud.backupdr.v1.IBackupConfigInfo=} [properties] Properties to set - */ - function BackupConfigInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupConfigInfo lastBackupState. - * @member {google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState} lastBackupState - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.lastBackupState = 0; - - /** - * BackupConfigInfo lastSuccessfulBackupConsistencyTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastSuccessfulBackupConsistencyTime - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.lastSuccessfulBackupConsistencyTime = null; - - /** - * BackupConfigInfo lastBackupError. - * @member {google.rpc.IStatus|null|undefined} lastBackupError - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.lastBackupError = null; - - /** - * BackupConfigInfo gcpBackupConfig. - * @member {google.cloud.backupdr.v1.IGcpBackupConfig|null|undefined} gcpBackupConfig - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.gcpBackupConfig = null; - - /** - * BackupConfigInfo backupApplianceBackupConfig. - * @member {google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null|undefined} backupApplianceBackupConfig - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.backupApplianceBackupConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupConfigInfo backupConfig. - * @member {"gcpBackupConfig"|"backupApplianceBackupConfig"|undefined} backupConfig - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - Object.defineProperty(BackupConfigInfo.prototype, "backupConfig", { - get: $util.oneOfGetter($oneOfFields = ["gcpBackupConfig", "backupApplianceBackupConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupConfigInfo instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupConfigInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo instance - */ - BackupConfigInfo.create = function create(properties) { - return new BackupConfigInfo(properties); - }; - - /** - * Encodes the specified BackupConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupConfigInfo} message BackupConfigInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupConfigInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lastBackupState != null && Object.hasOwnProperty.call(message, "lastBackupState")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.lastBackupState); - if (message.lastSuccessfulBackupConsistencyTime != null && Object.hasOwnProperty.call(message, "lastSuccessfulBackupConsistencyTime")) - $root.google.protobuf.Timestamp.encode(message.lastSuccessfulBackupConsistencyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.lastBackupError != null && Object.hasOwnProperty.call(message, "lastBackupError")) - $root.google.rpc.Status.encode(message.lastBackupError, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.gcpBackupConfig != null && Object.hasOwnProperty.call(message, "gcpBackupConfig")) - $root.google.cloud.backupdr.v1.GcpBackupConfig.encode(message.gcpBackupConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.backupApplianceBackupConfig != null && Object.hasOwnProperty.call(message, "backupApplianceBackupConfig")) - $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.encode(message.backupApplianceBackupConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BackupConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupConfigInfo} message BackupConfigInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupConfigInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupConfigInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupConfigInfo.decode = function 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.backupdr.v1.BackupConfigInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.lastBackupState = reader.int32(); - break; - } - case 2: { - message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.lastBackupError = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 4: { - message.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupConfigInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupConfigInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupConfigInfo message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupConfigInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) - switch (message.lastBackupState) { - default: - return "lastBackupState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime); - if (error) - return "lastSuccessfulBackupConsistencyTime." + error; - } - if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) { - var error = $root.google.rpc.Status.verify(message.lastBackupError); - if (error) - return "lastBackupError." + error; - } - if (message.gcpBackupConfig != null && message.hasOwnProperty("gcpBackupConfig")) { - properties.backupConfig = 1; - { - var error = $root.google.cloud.backupdr.v1.GcpBackupConfig.verify(message.gcpBackupConfig); - if (error) - return "gcpBackupConfig." + error; - } - } - if (message.backupApplianceBackupConfig != null && message.hasOwnProperty("backupApplianceBackupConfig")) { - if (properties.backupConfig === 1) - return "backupConfig: multiple values"; - properties.backupConfig = 1; - { - var error = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify(message.backupApplianceBackupConfig); - if (error) - return "backupApplianceBackupConfig." + error; - } - } - return null; - }; - - /** - * Creates a BackupConfigInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo - */ - BackupConfigInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupConfigInfo) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupConfigInfo(); - switch (object.lastBackupState) { - default: - if (typeof object.lastBackupState === "number") { - message.lastBackupState = object.lastBackupState; - break; - } - break; - case "LAST_BACKUP_STATE_UNSPECIFIED": - case 0: - message.lastBackupState = 0; - break; - case "FIRST_BACKUP_PENDING": - case 1: - message.lastBackupState = 1; - break; - case "SUCCEEDED": - case 2: - message.lastBackupState = 2; - break; - case "FAILED": - case 3: - message.lastBackupState = 3; - break; - case "PERMISSION_DENIED": - case 4: - message.lastBackupState = 4; - break; - } - if (object.lastSuccessfulBackupConsistencyTime != null) { - if (typeof object.lastSuccessfulBackupConsistencyTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.lastSuccessfulBackupConsistencyTime: object expected"); - message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime); - } - if (object.lastBackupError != null) { - if (typeof object.lastBackupError !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.lastBackupError: object expected"); - message.lastBackupError = $root.google.rpc.Status.fromObject(object.lastBackupError); - } - if (object.gcpBackupConfig != null) { - if (typeof object.gcpBackupConfig !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.gcpBackupConfig: object expected"); - message.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.fromObject(object.gcpBackupConfig); - } - if (object.backupApplianceBackupConfig != null) { - if (typeof object.backupApplianceBackupConfig !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.backupApplianceBackupConfig: object expected"); - message.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.fromObject(object.backupApplianceBackupConfig); - } - return message; - }; - - /** - * Creates a plain object from a BackupConfigInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {google.cloud.backupdr.v1.BackupConfigInfo} message BackupConfigInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupConfigInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.lastBackupState = options.enums === String ? "LAST_BACKUP_STATE_UNSPECIFIED" : 0; - object.lastSuccessfulBackupConsistencyTime = null; - object.lastBackupError = null; - } - if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) - object.lastBackupState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState[message.lastBackupState] === undefined ? message.lastBackupState : $root.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState[message.lastBackupState] : message.lastBackupState; - if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) - object.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime, options); - if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) - object.lastBackupError = $root.google.rpc.Status.toObject(message.lastBackupError, options); - if (message.gcpBackupConfig != null && message.hasOwnProperty("gcpBackupConfig")) { - object.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.toObject(message.gcpBackupConfig, options); - if (options.oneofs) - object.backupConfig = "gcpBackupConfig"; - } - if (message.backupApplianceBackupConfig != null && message.hasOwnProperty("backupApplianceBackupConfig")) { - object.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.toObject(message.backupApplianceBackupConfig, options); - if (options.oneofs) - object.backupConfig = "backupApplianceBackupConfig"; - } - return object; - }; - - /** - * Converts this BackupConfigInfo to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - * @returns {Object.} JSON object - */ - BackupConfigInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupConfigInfo - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupConfigInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupConfigInfo"; - }; - - /** - * LastBackupState enum. - * @name google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState - * @enum {number} - * @property {number} LAST_BACKUP_STATE_UNSPECIFIED=0 LAST_BACKUP_STATE_UNSPECIFIED value - * @property {number} FIRST_BACKUP_PENDING=1 FIRST_BACKUP_PENDING value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} FAILED=3 FAILED value - * @property {number} PERMISSION_DENIED=4 PERMISSION_DENIED value - */ - BackupConfigInfo.LastBackupState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAST_BACKUP_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FIRST_BACKUP_PENDING"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - values[valuesById[4] = "PERMISSION_DENIED"] = 4; - return values; - })(); - - return BackupConfigInfo; - })(); - - v1.GcpBackupConfig = (function() { - - /** - * Properties of a GcpBackupConfig. - * @memberof google.cloud.backupdr.v1 - * @interface IGcpBackupConfig - * @property {string|null} [backupPlan] GcpBackupConfig backupPlan - * @property {string|null} [backupPlanDescription] GcpBackupConfig backupPlanDescription - * @property {string|null} [backupPlanAssociation] GcpBackupConfig backupPlanAssociation - * @property {Array.|null} [backupPlanRules] GcpBackupConfig backupPlanRules - */ - - /** - * Constructs a new GcpBackupConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GcpBackupConfig. - * @implements IGcpBackupConfig - * @constructor - * @param {google.cloud.backupdr.v1.IGcpBackupConfig=} [properties] Properties to set - */ - function GcpBackupConfig(properties) { - this.backupPlanRules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcpBackupConfig backupPlan. - * @member {string} backupPlan - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @instance - */ - GcpBackupConfig.prototype.backupPlan = ""; - - /** - * GcpBackupConfig backupPlanDescription. - * @member {string} backupPlanDescription - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @instance - */ - GcpBackupConfig.prototype.backupPlanDescription = ""; - - /** - * GcpBackupConfig backupPlanAssociation. - * @member {string} backupPlanAssociation - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @instance - */ - GcpBackupConfig.prototype.backupPlanAssociation = ""; - - /** - * GcpBackupConfig backupPlanRules. - * @member {Array.} backupPlanRules - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @instance - */ - GcpBackupConfig.prototype.backupPlanRules = $util.emptyArray; - - /** - * Creates a new GcpBackupConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {google.cloud.backupdr.v1.IGcpBackupConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig instance - */ - GcpBackupConfig.create = function create(properties) { - return new GcpBackupConfig(properties); - }; - - /** - * Encodes the specified GcpBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {google.cloud.backupdr.v1.IGcpBackupConfig} message GcpBackupConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcpBackupConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPlan); - if (message.backupPlanDescription != null && Object.hasOwnProperty.call(message, "backupPlanDescription")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanDescription); - if (message.backupPlanAssociation != null && Object.hasOwnProperty.call(message, "backupPlanAssociation")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.backupPlanAssociation); - if (message.backupPlanRules != null && message.backupPlanRules.length) - for (var i = 0; i < message.backupPlanRules.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.backupPlanRules[i]); - return writer; - }; - - /** - * Encodes the specified GcpBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {google.cloud.backupdr.v1.IGcpBackupConfig} message GcpBackupConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcpBackupConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcpBackupConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcpBackupConfig.decode = function 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.backupdr.v1.GcpBackupConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.backupPlan = reader.string(); - break; - } - case 2: { - message.backupPlanDescription = reader.string(); - break; - } - case 3: { - message.backupPlanAssociation = reader.string(); - break; - } - case 4: { - if (!(message.backupPlanRules && message.backupPlanRules.length)) - message.backupPlanRules = []; - message.backupPlanRules.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcpBackupConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcpBackupConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcpBackupConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcpBackupConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - if (!$util.isString(message.backupPlan)) - return "backupPlan: string expected"; - if (message.backupPlanDescription != null && message.hasOwnProperty("backupPlanDescription")) - if (!$util.isString(message.backupPlanDescription)) - return "backupPlanDescription: string expected"; - if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) - if (!$util.isString(message.backupPlanAssociation)) - return "backupPlanAssociation: string expected"; - if (message.backupPlanRules != null && message.hasOwnProperty("backupPlanRules")) { - if (!Array.isArray(message.backupPlanRules)) - return "backupPlanRules: array expected"; - for (var i = 0; i < message.backupPlanRules.length; ++i) - if (!$util.isString(message.backupPlanRules[i])) - return "backupPlanRules: string[] expected"; - } - return null; - }; - - /** - * Creates a GcpBackupConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig - */ - GcpBackupConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GcpBackupConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.GcpBackupConfig(); - if (object.backupPlan != null) - message.backupPlan = String(object.backupPlan); - if (object.backupPlanDescription != null) - message.backupPlanDescription = String(object.backupPlanDescription); - if (object.backupPlanAssociation != null) - message.backupPlanAssociation = String(object.backupPlanAssociation); - if (object.backupPlanRules) { - if (!Array.isArray(object.backupPlanRules)) - throw TypeError(".google.cloud.backupdr.v1.GcpBackupConfig.backupPlanRules: array expected"); - message.backupPlanRules = []; - for (var i = 0; i < object.backupPlanRules.length; ++i) - message.backupPlanRules[i] = String(object.backupPlanRules[i]); - } - return message; - }; - - /** - * Creates a plain object from a GcpBackupConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {google.cloud.backupdr.v1.GcpBackupConfig} message GcpBackupConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcpBackupConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.backupPlanRules = []; - if (options.defaults) { - object.backupPlan = ""; - object.backupPlanDescription = ""; - object.backupPlanAssociation = ""; - } - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - object.backupPlan = message.backupPlan; - if (message.backupPlanDescription != null && message.hasOwnProperty("backupPlanDescription")) - object.backupPlanDescription = message.backupPlanDescription; - if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) - object.backupPlanAssociation = message.backupPlanAssociation; - if (message.backupPlanRules && message.backupPlanRules.length) { - object.backupPlanRules = []; - for (var j = 0; j < message.backupPlanRules.length; ++j) - object.backupPlanRules[j] = message.backupPlanRules[j]; - } - return object; - }; - - /** - * Converts this GcpBackupConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @instance - * @returns {Object.} JSON object - */ - GcpBackupConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcpBackupConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcpBackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpBackupConfig"; - }; - - return GcpBackupConfig; - })(); - - v1.BackupApplianceBackupConfig = (function() { - - /** - * Properties of a BackupApplianceBackupConfig. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupApplianceBackupConfig - * @property {string|null} [backupApplianceName] BackupApplianceBackupConfig backupApplianceName - * @property {number|Long|null} [backupApplianceId] BackupApplianceBackupConfig backupApplianceId - * @property {number|Long|null} [slaId] BackupApplianceBackupConfig slaId - * @property {string|null} [applicationName] BackupApplianceBackupConfig applicationName - * @property {string|null} [hostName] BackupApplianceBackupConfig hostName - * @property {string|null} [sltName] BackupApplianceBackupConfig sltName - * @property {string|null} [slpName] BackupApplianceBackupConfig slpName - */ - - /** - * Constructs a new BackupApplianceBackupConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupApplianceBackupConfig. - * @implements IBackupApplianceBackupConfig - * @constructor - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig=} [properties] Properties to set - */ - function BackupApplianceBackupConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupApplianceBackupConfig backupApplianceName. - * @member {string} backupApplianceName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.backupApplianceName = ""; - - /** - * BackupApplianceBackupConfig backupApplianceId. - * @member {number|Long} backupApplianceId - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.backupApplianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BackupApplianceBackupConfig slaId. - * @member {number|Long} slaId - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.slaId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BackupApplianceBackupConfig applicationName. - * @member {string} applicationName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.applicationName = ""; - - /** - * BackupApplianceBackupConfig hostName. - * @member {string} hostName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.hostName = ""; - - /** - * BackupApplianceBackupConfig sltName. - * @member {string} sltName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.sltName = ""; - - /** - * BackupApplianceBackupConfig slpName. - * @member {string} slpName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.slpName = ""; - - /** - * Creates a new BackupApplianceBackupConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig instance - */ - BackupApplianceBackupConfig.create = function create(properties) { - return new BackupApplianceBackupConfig(properties); - }; - - /** - * Encodes the specified BackupApplianceBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig} message BackupApplianceBackupConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupApplianceBackupConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupApplianceName != null && Object.hasOwnProperty.call(message, "backupApplianceName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupApplianceName); - if (message.backupApplianceId != null && Object.hasOwnProperty.call(message, "backupApplianceId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.backupApplianceId); - if (message.slaId != null && Object.hasOwnProperty.call(message, "slaId")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.slaId); - if (message.applicationName != null && Object.hasOwnProperty.call(message, "applicationName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.applicationName); - if (message.hostName != null && Object.hasOwnProperty.call(message, "hostName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.hostName); - if (message.sltName != null && Object.hasOwnProperty.call(message, "sltName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sltName); - if (message.slpName != null && Object.hasOwnProperty.call(message, "slpName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.slpName); - return writer; - }; - - /** - * Encodes the specified BackupApplianceBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig} message BackupApplianceBackupConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupApplianceBackupConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupApplianceBackupConfig.decode = function 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.backupdr.v1.BackupApplianceBackupConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.backupApplianceName = reader.string(); - break; - } - case 2: { - message.backupApplianceId = reader.int64(); - break; - } - case 3: { - message.slaId = reader.int64(); - break; - } - case 4: { - message.applicationName = reader.string(); - break; - } - case 5: { - message.hostName = reader.string(); - break; - } - case 6: { - message.sltName = reader.string(); - break; - } - case 7: { - message.slpName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupApplianceBackupConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupApplianceBackupConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupApplianceBackupConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) - if (!$util.isString(message.backupApplianceName)) - return "backupApplianceName: string expected"; - if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) - if (!$util.isInteger(message.backupApplianceId) && !(message.backupApplianceId && $util.isInteger(message.backupApplianceId.low) && $util.isInteger(message.backupApplianceId.high))) - return "backupApplianceId: integer|Long expected"; - if (message.slaId != null && message.hasOwnProperty("slaId")) - if (!$util.isInteger(message.slaId) && !(message.slaId && $util.isInteger(message.slaId.low) && $util.isInteger(message.slaId.high))) - return "slaId: integer|Long expected"; - if (message.applicationName != null && message.hasOwnProperty("applicationName")) - if (!$util.isString(message.applicationName)) - return "applicationName: string expected"; - if (message.hostName != null && message.hasOwnProperty("hostName")) - if (!$util.isString(message.hostName)) - return "hostName: string expected"; - if (message.sltName != null && message.hasOwnProperty("sltName")) - if (!$util.isString(message.sltName)) - return "sltName: string expected"; - if (message.slpName != null && message.hasOwnProperty("slpName")) - if (!$util.isString(message.slpName)) - return "slpName: string expected"; - return null; - }; - - /** - * Creates a BackupApplianceBackupConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig - */ - BackupApplianceBackupConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig(); - if (object.backupApplianceName != null) - message.backupApplianceName = String(object.backupApplianceName); - if (object.backupApplianceId != null) - if ($util.Long) - (message.backupApplianceId = $util.Long.fromValue(object.backupApplianceId)).unsigned = false; - else if (typeof object.backupApplianceId === "string") - message.backupApplianceId = parseInt(object.backupApplianceId, 10); - else if (typeof object.backupApplianceId === "number") - message.backupApplianceId = object.backupApplianceId; - else if (typeof object.backupApplianceId === "object") - message.backupApplianceId = new $util.LongBits(object.backupApplianceId.low >>> 0, object.backupApplianceId.high >>> 0).toNumber(); - if (object.slaId != null) - if ($util.Long) - (message.slaId = $util.Long.fromValue(object.slaId)).unsigned = false; - else if (typeof object.slaId === "string") - message.slaId = parseInt(object.slaId, 10); - else if (typeof object.slaId === "number") - message.slaId = object.slaId; - else if (typeof object.slaId === "object") - message.slaId = new $util.LongBits(object.slaId.low >>> 0, object.slaId.high >>> 0).toNumber(); - if (object.applicationName != null) - message.applicationName = String(object.applicationName); - if (object.hostName != null) - message.hostName = String(object.hostName); - if (object.sltName != null) - message.sltName = String(object.sltName); - if (object.slpName != null) - message.slpName = String(object.slpName); - return message; - }; - - /** - * Creates a plain object from a BackupApplianceBackupConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {google.cloud.backupdr.v1.BackupApplianceBackupConfig} message BackupApplianceBackupConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupApplianceBackupConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.backupApplianceName = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.backupApplianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.backupApplianceId = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.slaId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.slaId = options.longs === String ? "0" : 0; - object.applicationName = ""; - object.hostName = ""; - object.sltName = ""; - object.slpName = ""; - } - if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) - object.backupApplianceName = message.backupApplianceName; - if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) - if (typeof message.backupApplianceId === "number") - object.backupApplianceId = options.longs === String ? String(message.backupApplianceId) : message.backupApplianceId; - else - object.backupApplianceId = options.longs === String ? $util.Long.prototype.toString.call(message.backupApplianceId) : options.longs === Number ? new $util.LongBits(message.backupApplianceId.low >>> 0, message.backupApplianceId.high >>> 0).toNumber() : message.backupApplianceId; - if (message.slaId != null && message.hasOwnProperty("slaId")) - if (typeof message.slaId === "number") - object.slaId = options.longs === String ? String(message.slaId) : message.slaId; - else - object.slaId = options.longs === String ? $util.Long.prototype.toString.call(message.slaId) : options.longs === Number ? new $util.LongBits(message.slaId.low >>> 0, message.slaId.high >>> 0).toNumber() : message.slaId; - if (message.applicationName != null && message.hasOwnProperty("applicationName")) - object.applicationName = message.applicationName; - if (message.hostName != null && message.hasOwnProperty("hostName")) - object.hostName = message.hostName; - if (message.sltName != null && message.hasOwnProperty("sltName")) - object.sltName = message.sltName; - if (message.slpName != null && message.hasOwnProperty("slpName")) - object.slpName = message.slpName; - return object; - }; - - /** - * Converts this BackupApplianceBackupConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - * @returns {Object.} JSON object - */ - BackupApplianceBackupConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupApplianceBackupConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupApplianceBackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceBackupConfig"; - }; - - return BackupApplianceBackupConfig; - })(); - - v1.DataSourceGcpResource = (function() { - - /** - * Properties of a DataSourceGcpResource. - * @memberof google.cloud.backupdr.v1 - * @interface IDataSourceGcpResource - * @property {string|null} [gcpResourcename] DataSourceGcpResource gcpResourcename - * @property {string|null} [location] DataSourceGcpResource location - * @property {string|null} [type] DataSourceGcpResource type - * @property {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null} [computeInstanceDatasourceProperties] DataSourceGcpResource computeInstanceDatasourceProperties - */ - - /** - * Constructs a new DataSourceGcpResource. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DataSourceGcpResource. - * @implements IDataSourceGcpResource - * @constructor - * @param {google.cloud.backupdr.v1.IDataSourceGcpResource=} [properties] Properties to set - */ - function DataSourceGcpResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataSourceGcpResource gcpResourcename. - * @member {string} gcpResourcename - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance - */ - DataSourceGcpResource.prototype.gcpResourcename = ""; - - /** - * DataSourceGcpResource location. - * @member {string} location - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance - */ - DataSourceGcpResource.prototype.location = ""; - - /** - * DataSourceGcpResource type. - * @member {string} type - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance - */ - DataSourceGcpResource.prototype.type = ""; - - /** - * DataSourceGcpResource computeInstanceDatasourceProperties. - * @member {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null|undefined} computeInstanceDatasourceProperties - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance - */ - DataSourceGcpResource.prototype.computeInstanceDatasourceProperties = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataSourceGcpResource gcpResourceProperties. - * @member {"computeInstanceDatasourceProperties"|undefined} gcpResourceProperties - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance - */ - Object.defineProperty(DataSourceGcpResource.prototype, "gcpResourceProperties", { - get: $util.oneOfGetter($oneOfFields = ["computeInstanceDatasourceProperties"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataSourceGcpResource instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {google.cloud.backupdr.v1.IDataSourceGcpResource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource instance - */ - DataSourceGcpResource.create = function create(properties) { - return new DataSourceGcpResource(properties); - }; - - /** - * Encodes the specified DataSourceGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {google.cloud.backupdr.v1.IDataSourceGcpResource} message DataSourceGcpResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSourceGcpResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.computeInstanceDatasourceProperties != null && Object.hasOwnProperty.call(message, "computeInstanceDatasourceProperties")) - $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.encode(message.computeInstanceDatasourceProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataSourceGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {google.cloud.backupdr.v1.IDataSourceGcpResource} message DataSourceGcpResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSourceGcpResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataSourceGcpResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSourceGcpResource.decode = function 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.backupdr.v1.DataSourceGcpResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.gcpResourcename = reader.string(); - break; - } - case 2: { - message.location = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 4: { - message.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataSourceGcpResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSourceGcpResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataSourceGcpResource message. - * @function verify - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataSourceGcpResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - if (!$util.isString(message.gcpResourcename)) - return "gcpResourcename: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.computeInstanceDatasourceProperties != null && message.hasOwnProperty("computeInstanceDatasourceProperties")) { - properties.gcpResourceProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify(message.computeInstanceDatasourceProperties); - if (error) - return "computeInstanceDatasourceProperties." + error; - } - } - return null; - }; - - /** - * Creates a DataSourceGcpResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource - */ - DataSourceGcpResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DataSourceGcpResource) - return object; - var message = new $root.google.cloud.backupdr.v1.DataSourceGcpResource(); - if (object.gcpResourcename != null) - message.gcpResourcename = String(object.gcpResourcename); - if (object.location != null) - message.location = String(object.location); - if (object.type != null) - message.type = String(object.type); - if (object.computeInstanceDatasourceProperties != null) { - if (typeof object.computeInstanceDatasourceProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSourceGcpResource.computeInstanceDatasourceProperties: object expected"); - message.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.fromObject(object.computeInstanceDatasourceProperties); - } - return message; - }; - - /** - * Creates a plain object from a DataSourceGcpResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {google.cloud.backupdr.v1.DataSourceGcpResource} message DataSourceGcpResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataSourceGcpResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.gcpResourcename = ""; - object.location = ""; - object.type = ""; - } - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - object.gcpResourcename = message.gcpResourcename; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.computeInstanceDatasourceProperties != null && message.hasOwnProperty("computeInstanceDatasourceProperties")) { - object.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.toObject(message.computeInstanceDatasourceProperties, options); - if (options.oneofs) - object.gcpResourceProperties = "computeInstanceDatasourceProperties"; - } - return object; - }; - - /** - * Converts this DataSourceGcpResource to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance - * @returns {Object.} JSON object - */ - DataSourceGcpResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataSourceGcpResource - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataSourceGcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSourceGcpResource"; - }; - - return DataSourceGcpResource; - })(); - - v1.DataSourceBackupApplianceApplication = (function() { - - /** - * Properties of a DataSourceBackupApplianceApplication. - * @memberof google.cloud.backupdr.v1 - * @interface IDataSourceBackupApplianceApplication - * @property {string|null} [applicationName] DataSourceBackupApplianceApplication applicationName - * @property {string|null} [backupAppliance] DataSourceBackupApplianceApplication backupAppliance - * @property {number|Long|null} [applianceId] DataSourceBackupApplianceApplication applianceId - * @property {string|null} [type] DataSourceBackupApplianceApplication type - * @property {number|Long|null} [applicationId] DataSourceBackupApplianceApplication applicationId - * @property {string|null} [hostname] DataSourceBackupApplianceApplication hostname - * @property {number|Long|null} [hostId] DataSourceBackupApplianceApplication hostId - */ - - /** - * Constructs a new DataSourceBackupApplianceApplication. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DataSourceBackupApplianceApplication. - * @implements IDataSourceBackupApplianceApplication - * @constructor - * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication=} [properties] Properties to set - */ - function DataSourceBackupApplianceApplication(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataSourceBackupApplianceApplication applicationName. - * @member {string} applicationName - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.applicationName = ""; - - /** - * DataSourceBackupApplianceApplication backupAppliance. - * @member {string} backupAppliance - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.backupAppliance = ""; - - /** - * DataSourceBackupApplianceApplication applianceId. - * @member {number|Long} applianceId - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.applianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DataSourceBackupApplianceApplication type. - * @member {string} type - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.type = ""; - - /** - * DataSourceBackupApplianceApplication applicationId. - * @member {number|Long} applicationId - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.applicationId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DataSourceBackupApplianceApplication hostname. - * @member {string} hostname - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.hostname = ""; - - /** - * DataSourceBackupApplianceApplication hostId. - * @member {number|Long} hostId - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.hostId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new DataSourceBackupApplianceApplication instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication instance - */ - DataSourceBackupApplianceApplication.create = function create(properties) { - return new DataSourceBackupApplianceApplication(properties); - }; - - /** - * Encodes the specified DataSourceBackupApplianceApplication message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSourceBackupApplianceApplication.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.applicationName != null && Object.hasOwnProperty.call(message, "applicationName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.applicationName); - if (message.backupAppliance != null && Object.hasOwnProperty.call(message, "backupAppliance")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupAppliance); - if (message.applianceId != null && Object.hasOwnProperty.call(message, "applianceId")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.applianceId); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.type); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.hostname); - if (message.hostId != null && Object.hasOwnProperty.call(message, "hostId")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.hostId); - if (message.applicationId != null && Object.hasOwnProperty.call(message, "applicationId")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.applicationId); - return writer; - }; - - /** - * Encodes the specified DataSourceBackupApplianceApplication message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSourceBackupApplianceApplication.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSourceBackupApplianceApplication.decode = function 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.backupdr.v1.DataSourceBackupApplianceApplication(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.applicationName = reader.string(); - break; - } - case 2: { - message.backupAppliance = reader.string(); - break; - } - case 3: { - message.applianceId = reader.int64(); - break; - } - case 4: { - message.type = reader.string(); - break; - } - case 8: { - message.applicationId = reader.int64(); - break; - } - case 6: { - message.hostname = reader.string(); - break; - } - case 7: { - message.hostId = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSourceBackupApplianceApplication.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataSourceBackupApplianceApplication message. - * @function verify - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataSourceBackupApplianceApplication.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.applicationName != null && message.hasOwnProperty("applicationName")) - if (!$util.isString(message.applicationName)) - return "applicationName: string expected"; - if (message.backupAppliance != null && message.hasOwnProperty("backupAppliance")) - if (!$util.isString(message.backupAppliance)) - return "backupAppliance: string expected"; - if (message.applianceId != null && message.hasOwnProperty("applianceId")) - if (!$util.isInteger(message.applianceId) && !(message.applianceId && $util.isInteger(message.applianceId.low) && $util.isInteger(message.applianceId.high))) - return "applianceId: integer|Long expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.applicationId != null && message.hasOwnProperty("applicationId")) - if (!$util.isInteger(message.applicationId) && !(message.applicationId && $util.isInteger(message.applicationId.low) && $util.isInteger(message.applicationId.high))) - return "applicationId: integer|Long expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - if (message.hostId != null && message.hasOwnProperty("hostId")) - if (!$util.isInteger(message.hostId) && !(message.hostId && $util.isInteger(message.hostId.low) && $util.isInteger(message.hostId.high))) - return "hostId: integer|Long expected"; - return null; - }; - - /** - * Creates a DataSourceBackupApplianceApplication message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication - */ - DataSourceBackupApplianceApplication.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication) - return object; - var message = new $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication(); - if (object.applicationName != null) - message.applicationName = String(object.applicationName); - if (object.backupAppliance != null) - message.backupAppliance = String(object.backupAppliance); - if (object.applianceId != null) - if ($util.Long) - (message.applianceId = $util.Long.fromValue(object.applianceId)).unsigned = false; - else if (typeof object.applianceId === "string") - message.applianceId = parseInt(object.applianceId, 10); - else if (typeof object.applianceId === "number") - message.applianceId = object.applianceId; - else if (typeof object.applianceId === "object") - message.applianceId = new $util.LongBits(object.applianceId.low >>> 0, object.applianceId.high >>> 0).toNumber(); - if (object.type != null) - message.type = String(object.type); - if (object.applicationId != null) - if ($util.Long) - (message.applicationId = $util.Long.fromValue(object.applicationId)).unsigned = false; - else if (typeof object.applicationId === "string") - message.applicationId = parseInt(object.applicationId, 10); - else if (typeof object.applicationId === "number") - message.applicationId = object.applicationId; - else if (typeof object.applicationId === "object") - message.applicationId = new $util.LongBits(object.applicationId.low >>> 0, object.applicationId.high >>> 0).toNumber(); - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.hostId != null) - if ($util.Long) - (message.hostId = $util.Long.fromValue(object.hostId)).unsigned = false; - else if (typeof object.hostId === "string") - message.hostId = parseInt(object.hostId, 10); - else if (typeof object.hostId === "number") - message.hostId = object.hostId; - else if (typeof object.hostId === "object") - message.hostId = new $util.LongBits(object.hostId.low >>> 0, object.hostId.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a DataSourceBackupApplianceApplication message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataSourceBackupApplianceApplication.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.applicationName = ""; - object.backupAppliance = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.applianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.applianceId = options.longs === String ? "0" : 0; - object.type = ""; - object.hostname = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.hostId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.hostId = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.applicationId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.applicationId = options.longs === String ? "0" : 0; - } - if (message.applicationName != null && message.hasOwnProperty("applicationName")) - object.applicationName = message.applicationName; - if (message.backupAppliance != null && message.hasOwnProperty("backupAppliance")) - object.backupAppliance = message.backupAppliance; - if (message.applianceId != null && message.hasOwnProperty("applianceId")) - if (typeof message.applianceId === "number") - object.applianceId = options.longs === String ? String(message.applianceId) : message.applianceId; - else - object.applianceId = options.longs === String ? $util.Long.prototype.toString.call(message.applianceId) : options.longs === Number ? new $util.LongBits(message.applianceId.low >>> 0, message.applianceId.high >>> 0).toNumber() : message.applianceId; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.hostname != null && message.hasOwnProperty("hostname")) - object.hostname = message.hostname; - if (message.hostId != null && message.hasOwnProperty("hostId")) - if (typeof message.hostId === "number") - object.hostId = options.longs === String ? String(message.hostId) : message.hostId; - else - object.hostId = options.longs === String ? $util.Long.prototype.toString.call(message.hostId) : options.longs === Number ? new $util.LongBits(message.hostId.low >>> 0, message.hostId.high >>> 0).toNumber() : message.hostId; - if (message.applicationId != null && message.hasOwnProperty("applicationId")) - if (typeof message.applicationId === "number") - object.applicationId = options.longs === String ? String(message.applicationId) : message.applicationId; - else - object.applicationId = options.longs === String ? $util.Long.prototype.toString.call(message.applicationId) : options.longs === Number ? new $util.LongBits(message.applicationId.low >>> 0, message.applicationId.high >>> 0).toNumber() : message.applicationId; - return object; - }; - - /** - * Converts this DataSourceBackupApplianceApplication to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - * @returns {Object.} JSON object - */ - DataSourceBackupApplianceApplication.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataSourceBackupApplianceApplication - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataSourceBackupApplianceApplication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSourceBackupApplianceApplication"; - }; - - return DataSourceBackupApplianceApplication; - })(); - - v1.ServiceLockInfo = (function() { - - /** - * Properties of a ServiceLockInfo. - * @memberof google.cloud.backupdr.v1 - * @interface IServiceLockInfo - * @property {string|null} [operation] ServiceLockInfo operation - */ - - /** - * Constructs a new ServiceLockInfo. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ServiceLockInfo. - * @implements IServiceLockInfo - * @constructor - * @param {google.cloud.backupdr.v1.IServiceLockInfo=} [properties] Properties to set - */ - function ServiceLockInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceLockInfo operation. - * @member {string} operation - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @instance - */ - ServiceLockInfo.prototype.operation = ""; - - /** - * Creates a new ServiceLockInfo instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IServiceLockInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo instance - */ - ServiceLockInfo.create = function create(properties) { - return new ServiceLockInfo(properties); - }; - - /** - * Encodes the specified ServiceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IServiceLockInfo} message ServiceLockInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceLockInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.operation); - return writer; - }; - - /** - * Encodes the specified ServiceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IServiceLockInfo} message ServiceLockInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceLockInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceLockInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceLockInfo.decode = function 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.backupdr.v1.ServiceLockInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.operation = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceLockInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceLockInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceLockInfo message. - * @function verify - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceLockInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operation != null && message.hasOwnProperty("operation")) - if (!$util.isString(message.operation)) - return "operation: string expected"; - return null; - }; - - /** - * Creates a ServiceLockInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo - */ - ServiceLockInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ServiceLockInfo) - return object; - var message = new $root.google.cloud.backupdr.v1.ServiceLockInfo(); - if (object.operation != null) - message.operation = String(object.operation); - return message; - }; - - /** - * Creates a plain object from a ServiceLockInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {google.cloud.backupdr.v1.ServiceLockInfo} message ServiceLockInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceLockInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.operation = ""; - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = message.operation; - return object; - }; - - /** - * Converts this ServiceLockInfo to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @instance - * @returns {Object.} JSON object - */ - ServiceLockInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceLockInfo - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceLockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ServiceLockInfo"; - }; - - return ServiceLockInfo; - })(); - - v1.BackupApplianceLockInfo = (function() { - - /** - * Properties of a BackupApplianceLockInfo. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupApplianceLockInfo - * @property {number|Long|null} [backupApplianceId] BackupApplianceLockInfo backupApplianceId - * @property {string|null} [backupApplianceName] BackupApplianceLockInfo backupApplianceName - * @property {string|null} [lockReason] BackupApplianceLockInfo lockReason - * @property {string|null} [jobName] BackupApplianceLockInfo jobName - * @property {string|null} [backupImage] BackupApplianceLockInfo backupImage - * @property {number|Long|null} [slaId] BackupApplianceLockInfo slaId - */ - - /** - * Constructs a new BackupApplianceLockInfo. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupApplianceLockInfo. - * @implements IBackupApplianceLockInfo - * @constructor - * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo=} [properties] Properties to set - */ - function BackupApplianceLockInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupApplianceLockInfo backupApplianceId. - * @member {number|Long} backupApplianceId - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - BackupApplianceLockInfo.prototype.backupApplianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BackupApplianceLockInfo backupApplianceName. - * @member {string} backupApplianceName - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - BackupApplianceLockInfo.prototype.backupApplianceName = ""; - - /** - * BackupApplianceLockInfo lockReason. - * @member {string} lockReason - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - BackupApplianceLockInfo.prototype.lockReason = ""; - - /** - * BackupApplianceLockInfo jobName. - * @member {string|null|undefined} jobName - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - BackupApplianceLockInfo.prototype.jobName = null; - - /** - * BackupApplianceLockInfo backupImage. - * @member {string|null|undefined} backupImage - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - BackupApplianceLockInfo.prototype.backupImage = null; - - /** - * BackupApplianceLockInfo slaId. - * @member {number|Long|null|undefined} slaId - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - BackupApplianceLockInfo.prototype.slaId = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupApplianceLockInfo lockSource. - * @member {"jobName"|"backupImage"|"slaId"|undefined} lockSource - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - Object.defineProperty(BackupApplianceLockInfo.prototype, "lockSource", { - get: $util.oneOfGetter($oneOfFields = ["jobName", "backupImage", "slaId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupApplianceLockInfo instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo instance - */ - BackupApplianceLockInfo.create = function create(properties) { - return new BackupApplianceLockInfo(properties); - }; - - /** - * Encodes the specified BackupApplianceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo} message BackupApplianceLockInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupApplianceLockInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupApplianceId != null && Object.hasOwnProperty.call(message, "backupApplianceId")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.backupApplianceId); - if (message.backupApplianceName != null && Object.hasOwnProperty.call(message, "backupApplianceName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupApplianceName); - if (message.lockReason != null && Object.hasOwnProperty.call(message, "lockReason")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.lockReason); - if (message.jobName != null && Object.hasOwnProperty.call(message, "jobName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.jobName); - if (message.backupImage != null && Object.hasOwnProperty.call(message, "backupImage")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.backupImage); - if (message.slaId != null && Object.hasOwnProperty.call(message, "slaId")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.slaId); - return writer; - }; - - /** - * Encodes the specified BackupApplianceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo} message BackupApplianceLockInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupApplianceLockInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupApplianceLockInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupApplianceLockInfo.decode = function 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.backupdr.v1.BackupApplianceLockInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.backupApplianceId = reader.int64(); - break; - } - case 2: { - message.backupApplianceName = reader.string(); - break; - } - case 5: { - message.lockReason = reader.string(); - break; - } - case 6: { - message.jobName = reader.string(); - break; - } - case 7: { - message.backupImage = reader.string(); - break; - } - case 8: { - message.slaId = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupApplianceLockInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupApplianceLockInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupApplianceLockInfo message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupApplianceLockInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) - if (!$util.isInteger(message.backupApplianceId) && !(message.backupApplianceId && $util.isInteger(message.backupApplianceId.low) && $util.isInteger(message.backupApplianceId.high))) - return "backupApplianceId: integer|Long expected"; - if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) - if (!$util.isString(message.backupApplianceName)) - return "backupApplianceName: string expected"; - if (message.lockReason != null && message.hasOwnProperty("lockReason")) - if (!$util.isString(message.lockReason)) - return "lockReason: string expected"; - if (message.jobName != null && message.hasOwnProperty("jobName")) { - properties.lockSource = 1; - if (!$util.isString(message.jobName)) - return "jobName: string expected"; - } - if (message.backupImage != null && message.hasOwnProperty("backupImage")) { - if (properties.lockSource === 1) - return "lockSource: multiple values"; - properties.lockSource = 1; - if (!$util.isString(message.backupImage)) - return "backupImage: string expected"; - } - if (message.slaId != null && message.hasOwnProperty("slaId")) { - if (properties.lockSource === 1) - return "lockSource: multiple values"; - properties.lockSource = 1; - if (!$util.isInteger(message.slaId) && !(message.slaId && $util.isInteger(message.slaId.low) && $util.isInteger(message.slaId.high))) - return "slaId: integer|Long expected"; - } - return null; - }; - - /** - * Creates a BackupApplianceLockInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo - */ - BackupApplianceLockInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceLockInfo) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupApplianceLockInfo(); - if (object.backupApplianceId != null) - if ($util.Long) - (message.backupApplianceId = $util.Long.fromValue(object.backupApplianceId)).unsigned = false; - else if (typeof object.backupApplianceId === "string") - message.backupApplianceId = parseInt(object.backupApplianceId, 10); - else if (typeof object.backupApplianceId === "number") - message.backupApplianceId = object.backupApplianceId; - else if (typeof object.backupApplianceId === "object") - message.backupApplianceId = new $util.LongBits(object.backupApplianceId.low >>> 0, object.backupApplianceId.high >>> 0).toNumber(); - if (object.backupApplianceName != null) - message.backupApplianceName = String(object.backupApplianceName); - if (object.lockReason != null) - message.lockReason = String(object.lockReason); - if (object.jobName != null) - message.jobName = String(object.jobName); - if (object.backupImage != null) - message.backupImage = String(object.backupImage); - if (object.slaId != null) - if ($util.Long) - (message.slaId = $util.Long.fromValue(object.slaId)).unsigned = false; - else if (typeof object.slaId === "string") - message.slaId = parseInt(object.slaId, 10); - else if (typeof object.slaId === "number") - message.slaId = object.slaId; - else if (typeof object.slaId === "object") - message.slaId = new $util.LongBits(object.slaId.low >>> 0, object.slaId.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a BackupApplianceLockInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {google.cloud.backupdr.v1.BackupApplianceLockInfo} message BackupApplianceLockInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupApplianceLockInfo.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.backupApplianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.backupApplianceId = options.longs === String ? "0" : 0; - object.backupApplianceName = ""; - object.lockReason = ""; - } - if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) - if (typeof message.backupApplianceId === "number") - object.backupApplianceId = options.longs === String ? String(message.backupApplianceId) : message.backupApplianceId; - else - object.backupApplianceId = options.longs === String ? $util.Long.prototype.toString.call(message.backupApplianceId) : options.longs === Number ? new $util.LongBits(message.backupApplianceId.low >>> 0, message.backupApplianceId.high >>> 0).toNumber() : message.backupApplianceId; - if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) - object.backupApplianceName = message.backupApplianceName; - if (message.lockReason != null && message.hasOwnProperty("lockReason")) - object.lockReason = message.lockReason; - if (message.jobName != null && message.hasOwnProperty("jobName")) { - object.jobName = message.jobName; - if (options.oneofs) - object.lockSource = "jobName"; - } - if (message.backupImage != null && message.hasOwnProperty("backupImage")) { - object.backupImage = message.backupImage; - if (options.oneofs) - object.lockSource = "backupImage"; - } - if (message.slaId != null && message.hasOwnProperty("slaId")) { - if (typeof message.slaId === "number") - object.slaId = options.longs === String ? String(message.slaId) : message.slaId; - else - object.slaId = options.longs === String ? $util.Long.prototype.toString.call(message.slaId) : options.longs === Number ? new $util.LongBits(message.slaId.low >>> 0, message.slaId.high >>> 0).toNumber() : message.slaId; - if (options.oneofs) - object.lockSource = "slaId"; - } - return object; - }; - - /** - * Converts this BackupApplianceLockInfo to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - * @returns {Object.} JSON object - */ - BackupApplianceLockInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupApplianceLockInfo - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupApplianceLockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceLockInfo"; - }; - - return BackupApplianceLockInfo; - })(); - - v1.BackupLock = (function() { - - /** - * Properties of a BackupLock. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupLock - * @property {google.protobuf.ITimestamp|null} [lockUntilTime] BackupLock lockUntilTime - * @property {google.cloud.backupdr.v1.IBackupApplianceLockInfo|null} [backupApplianceLockInfo] BackupLock backupApplianceLockInfo - * @property {google.cloud.backupdr.v1.IServiceLockInfo|null} [serviceLockInfo] BackupLock serviceLockInfo - */ - - /** - * Constructs a new BackupLock. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupLock. - * @implements IBackupLock - * @constructor - * @param {google.cloud.backupdr.v1.IBackupLock=} [properties] Properties to set - */ - function BackupLock(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupLock lockUntilTime. - * @member {google.protobuf.ITimestamp|null|undefined} lockUntilTime - * @memberof google.cloud.backupdr.v1.BackupLock - * @instance - */ - BackupLock.prototype.lockUntilTime = null; - - /** - * BackupLock backupApplianceLockInfo. - * @member {google.cloud.backupdr.v1.IBackupApplianceLockInfo|null|undefined} backupApplianceLockInfo - * @memberof google.cloud.backupdr.v1.BackupLock - * @instance - */ - BackupLock.prototype.backupApplianceLockInfo = null; - - /** - * BackupLock serviceLockInfo. - * @member {google.cloud.backupdr.v1.IServiceLockInfo|null|undefined} serviceLockInfo - * @memberof google.cloud.backupdr.v1.BackupLock - * @instance - */ - BackupLock.prototype.serviceLockInfo = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupLock ClientLockInfo. - * @member {"backupApplianceLockInfo"|"serviceLockInfo"|undefined} ClientLockInfo - * @memberof google.cloud.backupdr.v1.BackupLock - * @instance - */ - Object.defineProperty(BackupLock.prototype, "ClientLockInfo", { - get: $util.oneOfGetter($oneOfFields = ["backupApplianceLockInfo", "serviceLockInfo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupLock instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {google.cloud.backupdr.v1.IBackupLock=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock instance - */ - BackupLock.create = function create(properties) { - return new BackupLock(properties); - }; - - /** - * Encodes the specified BackupLock message. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {google.cloud.backupdr.v1.IBackupLock} message BackupLock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupLock.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lockUntilTime != null && Object.hasOwnProperty.call(message, "lockUntilTime")) - $root.google.protobuf.Timestamp.encode(message.lockUntilTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.backupApplianceLockInfo != null && Object.hasOwnProperty.call(message, "backupApplianceLockInfo")) - $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.encode(message.backupApplianceLockInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.serviceLockInfo != null && Object.hasOwnProperty.call(message, "serviceLockInfo")) - $root.google.cloud.backupdr.v1.ServiceLockInfo.encode(message.serviceLockInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BackupLock message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {google.cloud.backupdr.v1.IBackupLock} message BackupLock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupLock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupLock message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupLock.decode = function 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.backupdr.v1.BackupLock(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.lockUntilTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.decode(reader, reader.uint32()); - break; - } - case 4: { - message.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupLock message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupLock.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupLock message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupLock.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.lockUntilTime != null && message.hasOwnProperty("lockUntilTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lockUntilTime); - if (error) - return "lockUntilTime." + error; - } - if (message.backupApplianceLockInfo != null && message.hasOwnProperty("backupApplianceLockInfo")) { - properties.ClientLockInfo = 1; - { - var error = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.verify(message.backupApplianceLockInfo); - if (error) - return "backupApplianceLockInfo." + error; - } - } - if (message.serviceLockInfo != null && message.hasOwnProperty("serviceLockInfo")) { - if (properties.ClientLockInfo === 1) - return "ClientLockInfo: multiple values"; - properties.ClientLockInfo = 1; - { - var error = $root.google.cloud.backupdr.v1.ServiceLockInfo.verify(message.serviceLockInfo); - if (error) - return "serviceLockInfo." + error; - } - } - return null; - }; - - /** - * Creates a BackupLock message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock - */ - BackupLock.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupLock) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupLock(); - if (object.lockUntilTime != null) { - if (typeof object.lockUntilTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupLock.lockUntilTime: object expected"); - message.lockUntilTime = $root.google.protobuf.Timestamp.fromObject(object.lockUntilTime); - } - if (object.backupApplianceLockInfo != null) { - if (typeof object.backupApplianceLockInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupLock.backupApplianceLockInfo: object expected"); - message.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.fromObject(object.backupApplianceLockInfo); - } - if (object.serviceLockInfo != null) { - if (typeof object.serviceLockInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupLock.serviceLockInfo: object expected"); - message.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.fromObject(object.serviceLockInfo); - } - return message; - }; - - /** - * Creates a plain object from a BackupLock message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {google.cloud.backupdr.v1.BackupLock} message BackupLock - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupLock.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.lockUntilTime = null; - if (message.lockUntilTime != null && message.hasOwnProperty("lockUntilTime")) - object.lockUntilTime = $root.google.protobuf.Timestamp.toObject(message.lockUntilTime, options); - if (message.backupApplianceLockInfo != null && message.hasOwnProperty("backupApplianceLockInfo")) { - object.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.toObject(message.backupApplianceLockInfo, options); - if (options.oneofs) - object.ClientLockInfo = "backupApplianceLockInfo"; - } - if (message.serviceLockInfo != null && message.hasOwnProperty("serviceLockInfo")) { - object.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.toObject(message.serviceLockInfo, options); - if (options.oneofs) - object.ClientLockInfo = "serviceLockInfo"; - } - return object; - }; - - /** - * Converts this BackupLock to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupLock - * @instance - * @returns {Object.} JSON object - */ - BackupLock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupLock - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupLock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupLock"; - }; - - return BackupLock; - })(); - - v1.Backup = (function() { - - /** - * Properties of a Backup. - * @memberof google.cloud.backupdr.v1 - * @interface IBackup - * @property {string|null} [name] Backup name - * @property {string|null} [description] Backup description - * @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Backup updateTime - * @property {Object.|null} [labels] Backup labels - * @property {google.protobuf.ITimestamp|null} [enforcedRetentionEndTime] Backup enforcedRetentionEndTime - * @property {google.protobuf.ITimestamp|null} [expireTime] Backup expireTime - * @property {google.protobuf.ITimestamp|null} [consistencyTime] Backup consistencyTime - * @property {string|null} [etag] Backup etag - * @property {google.cloud.backupdr.v1.Backup.State|null} [state] Backup state - * @property {Array.|null} [serviceLocks] Backup serviceLocks - * @property {Array.|null} [backupApplianceLocks] Backup backupApplianceLocks - * @property {google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null} [computeInstanceBackupProperties] Backup computeInstanceBackupProperties - * @property {google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null} [backupApplianceBackupProperties] Backup backupApplianceBackupProperties - * @property {google.cloud.backupdr.v1.Backup.BackupType|null} [backupType] Backup backupType - * @property {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null} [gcpBackupPlanInfo] Backup gcpBackupPlanInfo - * @property {number|Long|null} [resourceSizeBytes] Backup resourceSizeBytes - */ - - /** - * Constructs a new Backup. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a Backup. - * @implements IBackup - * @constructor - * @param {google.cloud.backupdr.v1.IBackup=} [properties] Properties to set - */ - function Backup(properties) { - this.labels = {}; - this.serviceLocks = []; - this.backupApplianceLocks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Backup name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.name = ""; - - /** - * Backup description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.description = null; - - /** - * Backup createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.createTime = null; - - /** - * Backup updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.updateTime = null; - - /** - * Backup labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.labels = $util.emptyObject; - - /** - * Backup enforcedRetentionEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} enforcedRetentionEndTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.enforcedRetentionEndTime = null; - - /** - * Backup expireTime. - * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.expireTime = null; - - /** - * Backup consistencyTime. - * @member {google.protobuf.ITimestamp|null|undefined} consistencyTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.consistencyTime = null; - - /** - * Backup etag. - * @member {string|null|undefined} etag - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.etag = null; - - /** - * Backup state. - * @member {google.cloud.backupdr.v1.Backup.State} state - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.state = 0; - - /** - * Backup serviceLocks. - * @member {Array.} serviceLocks - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.serviceLocks = $util.emptyArray; - - /** - * Backup backupApplianceLocks. - * @member {Array.} backupApplianceLocks - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.backupApplianceLocks = $util.emptyArray; - - /** - * Backup computeInstanceBackupProperties. - * @member {google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null|undefined} computeInstanceBackupProperties - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.computeInstanceBackupProperties = null; - - /** - * Backup backupApplianceBackupProperties. - * @member {google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null|undefined} backupApplianceBackupProperties - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.backupApplianceBackupProperties = null; - - /** - * Backup backupType. - * @member {google.cloud.backupdr.v1.Backup.BackupType} backupType - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.backupType = 0; - - /** - * Backup gcpBackupPlanInfo. - * @member {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null|undefined} gcpBackupPlanInfo - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.gcpBackupPlanInfo = null; - - /** - * Backup resourceSizeBytes. - * @member {number|Long} resourceSizeBytes - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.resourceSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Backup _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup _createTime. - * @member {"createTime"|undefined} _createTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_createTime", { - get: $util.oneOfGetter($oneOfFields = ["createTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup _updateTime. - * @member {"updateTime"|undefined} _updateTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_updateTime", { - get: $util.oneOfGetter($oneOfFields = ["updateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup _enforcedRetentionEndTime. - * @member {"enforcedRetentionEndTime"|undefined} _enforcedRetentionEndTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_enforcedRetentionEndTime", { - get: $util.oneOfGetter($oneOfFields = ["enforcedRetentionEndTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup _expireTime. - * @member {"expireTime"|undefined} _expireTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_expireTime", { - get: $util.oneOfGetter($oneOfFields = ["expireTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup _consistencyTime. - * @member {"consistencyTime"|undefined} _consistencyTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_consistencyTime", { - get: $util.oneOfGetter($oneOfFields = ["consistencyTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup _etag. - * @member {"etag"|undefined} _etag - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_etag", { - get: $util.oneOfGetter($oneOfFields = ["etag"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup backupProperties. - * @member {"computeInstanceBackupProperties"|"backupApplianceBackupProperties"|undefined} backupProperties - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "backupProperties", { - get: $util.oneOfGetter($oneOfFields = ["computeInstanceBackupProperties", "backupApplianceBackupProperties"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup planInfo. - * @member {"gcpBackupPlanInfo"|undefined} planInfo - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "planInfo", { - get: $util.oneOfGetter($oneOfFields = ["gcpBackupPlanInfo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Backup instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {google.cloud.backupdr.v1.IBackup=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Backup} Backup instance - */ - Backup.create = function create(properties) { - return new Backup(properties); - }; - - /** - * Encodes the specified Backup message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {google.cloud.backupdr.v1.IBackup} message Backup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Backup.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).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 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.enforcedRetentionEndTime != null && Object.hasOwnProperty.call(message, "enforcedRetentionEndTime")) - $root.google.protobuf.Timestamp.encode(message.enforcedRetentionEndTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.consistencyTime != null && Object.hasOwnProperty.call(message, "consistencyTime")) - $root.google.protobuf.Timestamp.encode(message.consistencyTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.state); - if (message.serviceLocks != null && message.serviceLocks.length) - for (var i = 0; i < message.serviceLocks.length; ++i) - $root.google.cloud.backupdr.v1.BackupLock.encode(message.serviceLocks[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.backupApplianceLocks != null && message.backupApplianceLocks.length) - for (var i = 0; i < message.backupApplianceLocks.length; ++i) - $root.google.cloud.backupdr.v1.BackupLock.encode(message.backupApplianceLocks[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.computeInstanceBackupProperties != null && Object.hasOwnProperty.call(message, "computeInstanceBackupProperties")) - $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.encode(message.computeInstanceBackupProperties, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) - writer.uint32(/* id 20, wireType 0 =*/160).int32(message.backupType); - if (message.backupApplianceBackupProperties != null && Object.hasOwnProperty.call(message, "backupApplianceBackupProperties")) - $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.encode(message.backupApplianceBackupProperties, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.gcpBackupPlanInfo != null && Object.hasOwnProperty.call(message, "gcpBackupPlanInfo")) - $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.encode(message.gcpBackupPlanInfo, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.resourceSizeBytes != null && Object.hasOwnProperty.call(message, "resourceSizeBytes")) - writer.uint32(/* id 23, wireType 0 =*/184).int64(message.resourceSizeBytes); - return writer; - }; - - /** - * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {google.cloud.backupdr.v1.IBackup} message Backup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Backup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Backup message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Backup} Backup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Backup.decode = function 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.backupdr.v1.Backup(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - 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 6: { - message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.consistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - message.etag = reader.string(); - break; - } - case 15: { - message.state = reader.int32(); - break; - } - case 17: { - if (!(message.serviceLocks && message.serviceLocks.length)) - message.serviceLocks = []; - message.serviceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader, reader.uint32())); - break; - } - case 18: { - if (!(message.backupApplianceLocks && message.backupApplianceLocks.length)) - message.backupApplianceLocks = []; - message.backupApplianceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader, reader.uint32())); - break; - } - case 19: { - message.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.decode(reader, reader.uint32()); - break; - } - case 21: { - message.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.decode(reader, reader.uint32()); - break; - } - case 20: { - message.backupType = reader.int32(); - break; - } - case 22: { - message.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.decode(reader, reader.uint32()); - break; - } - case 23: { - message.resourceSizeBytes = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Backup message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Backup} Backup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Backup.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Backup message. - * @function verify - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Backup.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.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - properties._createTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - properties._updateTime = 1; - { - 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.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { - properties._enforcedRetentionEndTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.enforcedRetentionEndTime); - if (error) - return "enforcedRetentionEndTime." + error; - } - } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - properties._expireTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); - if (error) - return "expireTime." + error; - } - } - if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { - properties._consistencyTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.consistencyTime); - if (error) - return "consistencyTime." + error; - } - } - if (message.etag != null && message.hasOwnProperty("etag")) { - properties._etag = 1; - if (!$util.isString(message.etag)) - return "etag: 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.serviceLocks != null && message.hasOwnProperty("serviceLocks")) { - if (!Array.isArray(message.serviceLocks)) - return "serviceLocks: array expected"; - for (var i = 0; i < message.serviceLocks.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupLock.verify(message.serviceLocks[i]); - if (error) - return "serviceLocks." + error; - } - } - if (message.backupApplianceLocks != null && message.hasOwnProperty("backupApplianceLocks")) { - if (!Array.isArray(message.backupApplianceLocks)) - return "backupApplianceLocks: array expected"; - for (var i = 0; i < message.backupApplianceLocks.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupLock.verify(message.backupApplianceLocks[i]); - if (error) - return "backupApplianceLocks." + error; - } - } - if (message.computeInstanceBackupProperties != null && message.hasOwnProperty("computeInstanceBackupProperties")) { - properties.backupProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify(message.computeInstanceBackupProperties); - if (error) - return "computeInstanceBackupProperties." + error; - } - } - if (message.backupApplianceBackupProperties != null && message.hasOwnProperty("backupApplianceBackupProperties")) { - if (properties.backupProperties === 1) - return "backupProperties: multiple values"; - properties.backupProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify(message.backupApplianceBackupProperties); - if (error) - return "backupApplianceBackupProperties." + error; - } - } - if (message.backupType != null && message.hasOwnProperty("backupType")) - switch (message.backupType) { - default: - return "backupType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.gcpBackupPlanInfo != null && message.hasOwnProperty("gcpBackupPlanInfo")) { - properties.planInfo = 1; - { - var error = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify(message.gcpBackupPlanInfo); - if (error) - return "gcpBackupPlanInfo." + error; - } - } - if (message.resourceSizeBytes != null && message.hasOwnProperty("resourceSizeBytes")) - if (!$util.isInteger(message.resourceSizeBytes) && !(message.resourceSizeBytes && $util.isInteger(message.resourceSizeBytes.low) && $util.isInteger(message.resourceSizeBytes.high))) - return "resourceSizeBytes: integer|Long expected"; - return null; - }; - - /** - * Creates a Backup message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Backup} Backup - */ - Backup.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Backup) - return object; - var message = new $root.google.cloud.backupdr.v1.Backup(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.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.backupdr.v1.Backup.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.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.enforcedRetentionEndTime != null) { - if (typeof object.enforcedRetentionEndTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.enforcedRetentionEndTime: object expected"); - message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.fromObject(object.enforcedRetentionEndTime); - } - if (object.expireTime != null) { - if (typeof object.expireTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); - } - if (object.consistencyTime != null) { - if (typeof object.consistencyTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.consistencyTime: object expected"); - message.consistencyTime = $root.google.protobuf.Timestamp.fromObject(object.consistencyTime); - } - if (object.etag != null) - message.etag = String(object.etag); - 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 "ACTIVE": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ERROR": - case 4: - message.state = 4; - break; - } - if (object.serviceLocks) { - if (!Array.isArray(object.serviceLocks)) - throw TypeError(".google.cloud.backupdr.v1.Backup.serviceLocks: array expected"); - message.serviceLocks = []; - for (var i = 0; i < object.serviceLocks.length; ++i) { - if (typeof object.serviceLocks[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.serviceLocks: object expected"); - message.serviceLocks[i] = $root.google.cloud.backupdr.v1.BackupLock.fromObject(object.serviceLocks[i]); - } - } - if (object.backupApplianceLocks) { - if (!Array.isArray(object.backupApplianceLocks)) - throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceLocks: array expected"); - message.backupApplianceLocks = []; - for (var i = 0; i < object.backupApplianceLocks.length; ++i) { - if (typeof object.backupApplianceLocks[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceLocks: object expected"); - message.backupApplianceLocks[i] = $root.google.cloud.backupdr.v1.BackupLock.fromObject(object.backupApplianceLocks[i]); - } - } - if (object.computeInstanceBackupProperties != null) { - if (typeof object.computeInstanceBackupProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.computeInstanceBackupProperties: object expected"); - message.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.fromObject(object.computeInstanceBackupProperties); - } - if (object.backupApplianceBackupProperties != null) { - if (typeof object.backupApplianceBackupProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceBackupProperties: object expected"); - message.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.fromObject(object.backupApplianceBackupProperties); - } - switch (object.backupType) { - default: - if (typeof object.backupType === "number") { - message.backupType = object.backupType; - break; - } - break; - case "BACKUP_TYPE_UNSPECIFIED": - case 0: - message.backupType = 0; - break; - case "SCHEDULED": - case 1: - message.backupType = 1; - break; - case "ON_DEMAND": - case 2: - message.backupType = 2; - break; - } - if (object.gcpBackupPlanInfo != null) { - if (typeof object.gcpBackupPlanInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.gcpBackupPlanInfo: object expected"); - message.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.fromObject(object.gcpBackupPlanInfo); - } - if (object.resourceSizeBytes != null) - if ($util.Long) - (message.resourceSizeBytes = $util.Long.fromValue(object.resourceSizeBytes)).unsigned = false; - else if (typeof object.resourceSizeBytes === "string") - message.resourceSizeBytes = parseInt(object.resourceSizeBytes, 10); - else if (typeof object.resourceSizeBytes === "number") - message.resourceSizeBytes = object.resourceSizeBytes; - else if (typeof object.resourceSizeBytes === "object") - message.resourceSizeBytes = new $util.LongBits(object.resourceSizeBytes.low >>> 0, object.resourceSizeBytes.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a Backup message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {google.cloud.backupdr.v1.Backup} message Backup - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Backup.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.serviceLocks = []; - object.backupApplianceLocks = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.backupType = options.enums === String ? "BACKUP_TYPE_UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.resourceSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.resourceSizeBytes = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (options.oneofs) - object._createTime = "createTime"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (options.oneofs) - object._updateTime = "updateTime"; - } - 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.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { - object.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.toObject(message.enforcedRetentionEndTime, options); - if (options.oneofs) - object._enforcedRetentionEndTime = "enforcedRetentionEndTime"; - } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); - if (options.oneofs) - object._expireTime = "expireTime"; - } - if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { - object.consistencyTime = $root.google.protobuf.Timestamp.toObject(message.consistencyTime, options); - if (options.oneofs) - object._consistencyTime = "consistencyTime"; - } - if (message.etag != null && message.hasOwnProperty("etag")) { - object.etag = message.etag; - if (options.oneofs) - object._etag = "etag"; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.Backup.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.Backup.State[message.state] : message.state; - if (message.serviceLocks && message.serviceLocks.length) { - object.serviceLocks = []; - for (var j = 0; j < message.serviceLocks.length; ++j) - object.serviceLocks[j] = $root.google.cloud.backupdr.v1.BackupLock.toObject(message.serviceLocks[j], options); - } - if (message.backupApplianceLocks && message.backupApplianceLocks.length) { - object.backupApplianceLocks = []; - for (var j = 0; j < message.backupApplianceLocks.length; ++j) - object.backupApplianceLocks[j] = $root.google.cloud.backupdr.v1.BackupLock.toObject(message.backupApplianceLocks[j], options); - } - if (message.computeInstanceBackupProperties != null && message.hasOwnProperty("computeInstanceBackupProperties")) { - object.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.toObject(message.computeInstanceBackupProperties, options); - if (options.oneofs) - object.backupProperties = "computeInstanceBackupProperties"; - } - if (message.backupType != null && message.hasOwnProperty("backupType")) - object.backupType = options.enums === String ? $root.google.cloud.backupdr.v1.Backup.BackupType[message.backupType] === undefined ? message.backupType : $root.google.cloud.backupdr.v1.Backup.BackupType[message.backupType] : message.backupType; - if (message.backupApplianceBackupProperties != null && message.hasOwnProperty("backupApplianceBackupProperties")) { - object.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.toObject(message.backupApplianceBackupProperties, options); - if (options.oneofs) - object.backupProperties = "backupApplianceBackupProperties"; - } - if (message.gcpBackupPlanInfo != null && message.hasOwnProperty("gcpBackupPlanInfo")) { - object.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.toObject(message.gcpBackupPlanInfo, options); - if (options.oneofs) - object.planInfo = "gcpBackupPlanInfo"; - } - if (message.resourceSizeBytes != null && message.hasOwnProperty("resourceSizeBytes")) - if (typeof message.resourceSizeBytes === "number") - object.resourceSizeBytes = options.longs === String ? String(message.resourceSizeBytes) : message.resourceSizeBytes; - else - object.resourceSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resourceSizeBytes) : options.longs === Number ? new $util.LongBits(message.resourceSizeBytes.low >>> 0, message.resourceSizeBytes.high >>> 0).toNumber() : message.resourceSizeBytes; - return object; - }; - - /** - * Converts this Backup to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Backup - * @instance - * @returns {Object.} JSON object - */ - Backup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Backup - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Backup"; - }; - - /** - * State enum. - * @name google.cloud.backupdr.v1.Backup.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} DELETING=3 DELETING value - * @property {number} ERROR=4 ERROR value - */ - Backup.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "ERROR"] = 4; - return values; - })(); - - /** - * BackupType enum. - * @name google.cloud.backupdr.v1.Backup.BackupType - * @enum {number} - * @property {number} BACKUP_TYPE_UNSPECIFIED=0 BACKUP_TYPE_UNSPECIFIED value - * @property {number} SCHEDULED=1 SCHEDULED value - * @property {number} ON_DEMAND=2 ON_DEMAND value - */ - Backup.BackupType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCHEDULED"] = 1; - values[valuesById[2] = "ON_DEMAND"] = 2; - return values; - })(); - - Backup.GCPBackupPlanInfo = (function() { - - /** - * Properties of a GCPBackupPlanInfo. - * @memberof google.cloud.backupdr.v1.Backup - * @interface IGCPBackupPlanInfo - * @property {string|null} [backupPlan] GCPBackupPlanInfo backupPlan - * @property {string|null} [backupPlanRuleId] GCPBackupPlanInfo backupPlanRuleId - */ - - /** - * Constructs a new GCPBackupPlanInfo. - * @memberof google.cloud.backupdr.v1.Backup - * @classdesc Represents a GCPBackupPlanInfo. - * @implements IGCPBackupPlanInfo - * @constructor - * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo=} [properties] Properties to set - */ - function GCPBackupPlanInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GCPBackupPlanInfo backupPlan. - * @member {string} backupPlan - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @instance - */ - GCPBackupPlanInfo.prototype.backupPlan = ""; - - /** - * GCPBackupPlanInfo backupPlanRuleId. - * @member {string} backupPlanRuleId - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @instance - */ - GCPBackupPlanInfo.prototype.backupPlanRuleId = ""; - - /** - * Creates a new GCPBackupPlanInfo instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo instance - */ - GCPBackupPlanInfo.create = function create(properties) { - return new GCPBackupPlanInfo(properties); - }; - - /** - * Encodes the specified GCPBackupPlanInfo message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo} message GCPBackupPlanInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GCPBackupPlanInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPlan); - if (message.backupPlanRuleId != null && Object.hasOwnProperty.call(message, "backupPlanRuleId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanRuleId); - return writer; - }; - - /** - * Encodes the specified GCPBackupPlanInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo} message GCPBackupPlanInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GCPBackupPlanInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GCPBackupPlanInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GCPBackupPlanInfo.decode = function 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.backupdr.v1.Backup.GCPBackupPlanInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.backupPlan = reader.string(); - break; - } - case 2: { - message.backupPlanRuleId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GCPBackupPlanInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GCPBackupPlanInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GCPBackupPlanInfo message. - * @function verify - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GCPBackupPlanInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - if (!$util.isString(message.backupPlan)) - return "backupPlan: string expected"; - if (message.backupPlanRuleId != null && message.hasOwnProperty("backupPlanRuleId")) - if (!$util.isString(message.backupPlanRuleId)) - return "backupPlanRuleId: string expected"; - return null; - }; - - /** - * Creates a GCPBackupPlanInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo - */ - GCPBackupPlanInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo) - return object; - var message = new $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo(); - if (object.backupPlan != null) - message.backupPlan = String(object.backupPlan); - if (object.backupPlanRuleId != null) - message.backupPlanRuleId = String(object.backupPlanRuleId); - return message; - }; - - /** - * Creates a plain object from a GCPBackupPlanInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} message GCPBackupPlanInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GCPBackupPlanInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.backupPlan = ""; - object.backupPlanRuleId = ""; - } - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - object.backupPlan = message.backupPlan; - if (message.backupPlanRuleId != null && message.hasOwnProperty("backupPlanRuleId")) - object.backupPlanRuleId = message.backupPlanRuleId; - return object; - }; - - /** - * Converts this GCPBackupPlanInfo to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @instance - * @returns {Object.} JSON object - */ - GCPBackupPlanInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GCPBackupPlanInfo - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GCPBackupPlanInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo"; - }; - - return GCPBackupPlanInfo; - })(); - - return Backup; - })(); - - v1.CreateBackupVaultRequest = (function() { - - /** - * Properties of a CreateBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @interface ICreateBackupVaultRequest - * @property {string|null} [parent] CreateBackupVaultRequest parent - * @property {string|null} [backupVaultId] CreateBackupVaultRequest backupVaultId - * @property {google.cloud.backupdr.v1.IBackupVault|null} [backupVault] CreateBackupVaultRequest backupVault - * @property {string|null} [requestId] CreateBackupVaultRequest requestId - * @property {boolean|null} [validateOnly] CreateBackupVaultRequest validateOnly - */ - - /** - * Constructs a new CreateBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CreateBackupVaultRequest. - * @implements ICreateBackupVaultRequest - * @constructor - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest=} [properties] Properties to set - */ - function CreateBackupVaultRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateBackupVaultRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.parent = ""; - - /** - * CreateBackupVaultRequest backupVaultId. - * @member {string} backupVaultId - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.backupVaultId = ""; - - /** - * CreateBackupVaultRequest backupVault. - * @member {google.cloud.backupdr.v1.IBackupVault|null|undefined} backupVault - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.backupVault = null; - - /** - * CreateBackupVaultRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.requestId = ""; - - /** - * CreateBackupVaultRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateBackupVaultRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest instance - */ - CreateBackupVaultRequest.create = function create(properties) { - return new CreateBackupVaultRequest(properties); - }; - - /** - * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupVaultRequest.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.backupVaultId != null && Object.hasOwnProperty.call(message, "backupVaultId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupVaultId); - if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) - $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVault, 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); - return writer; - }; - - /** - * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupVaultRequest.decode = function 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.backupdr.v1.CreateBackupVaultRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.backupVaultId = reader.string(); - break; - } - case 3: { - message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - case 5: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateBackupVaultRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateBackupVaultRequest.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.backupVaultId != null && message.hasOwnProperty("backupVaultId")) - if (!$util.isString(message.backupVaultId)) - return "backupVaultId: string expected"; - if (message.backupVault != null && message.hasOwnProperty("backupVault")) { - var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault); - if (error) - return "backupVault." + 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"; - return null; - }; - - /** - * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest - */ - CreateBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupVaultRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.CreateBackupVaultRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.backupVaultId != null) - message.backupVaultId = String(object.backupVaultId); - if (object.backupVault != null) { - if (typeof object.backupVault !== "object") - throw TypeError(".google.cloud.backupdr.v1.CreateBackupVaultRequest.backupVault: object expected"); - message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVault); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.CreateBackupVaultRequest} message CreateBackupVaultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateBackupVaultRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.backupVaultId = ""; - object.backupVault = null; - object.requestId = ""; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.backupVaultId != null && message.hasOwnProperty("backupVaultId")) - object.backupVaultId = message.backupVaultId; - if (message.backupVault != null && message.hasOwnProperty("backupVault")) - object.backupVault = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVault, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateBackupVaultRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - * @returns {Object.} JSON object - */ - CreateBackupVaultRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateBackupVaultRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupVaultRequest"; - }; - - return CreateBackupVaultRequest; - })(); - - v1.ListBackupVaultsRequest = (function() { - - /** - * Properties of a ListBackupVaultsRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupVaultsRequest - * @property {string|null} [parent] ListBackupVaultsRequest parent - * @property {number|null} [pageSize] ListBackupVaultsRequest pageSize - * @property {string|null} [pageToken] ListBackupVaultsRequest pageToken - * @property {string|null} [filter] ListBackupVaultsRequest filter - * @property {string|null} [orderBy] ListBackupVaultsRequest orderBy - * @property {google.cloud.backupdr.v1.BackupVaultView|null} [view] ListBackupVaultsRequest view - */ - - /** - * Constructs a new ListBackupVaultsRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupVaultsRequest. - * @implements IListBackupVaultsRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest=} [properties] Properties to set - */ - function ListBackupVaultsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListBackupVaultsRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.parent = ""; - - /** - * ListBackupVaultsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.pageSize = 0; - - /** - * ListBackupVaultsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.pageToken = ""; - - /** - * ListBackupVaultsRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.filter = ""; - - /** - * ListBackupVaultsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.orderBy = ""; - - /** - * ListBackupVaultsRequest view. - * @member {google.cloud.backupdr.v1.BackupVaultView} view - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.view = 0; - - /** - * Creates a new ListBackupVaultsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest instance - */ - ListBackupVaultsRequest.create = function create(properties) { - return new ListBackupVaultsRequest(properties); - }; - - /** - * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupVaultsRequest.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); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); - return writer; - }; - - /** - * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupVaultsRequest.decode = function 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.backupdr.v1.ListBackupVaultsRequest(); - 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; - } - case 6: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupVaultsRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupVaultsRequest.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"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest - */ - ListBackupVaultsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupVaultsRequest(); - 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); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "BACKUP_VAULT_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BACKUP_VAULT_VIEW_BASIC": - case 1: - message.view = 1; - break; - case "BACKUP_VAULT_VIEW_FULL": - case 2: - message.view = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.ListBackupVaultsRequest} message ListBackupVaultsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupVaultsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - object.view = options.enums === String ? "BACKUP_VAULT_VIEW_UNSPECIFIED" : 0; - } - 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; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVaultView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupVaultView[message.view] : message.view; - return object; - }; - - /** - * Converts this ListBackupVaultsRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - * @returns {Object.} JSON object - */ - ListBackupVaultsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupVaultsRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupVaultsRequest"; - }; - - return ListBackupVaultsRequest; - })(); - - v1.ListBackupVaultsResponse = (function() { - - /** - * Properties of a ListBackupVaultsResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupVaultsResponse - * @property {Array.|null} [backupVaults] ListBackupVaultsResponse backupVaults - * @property {string|null} [nextPageToken] ListBackupVaultsResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupVaultsResponse unreachable - */ - - /** - * Constructs a new ListBackupVaultsResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupVaultsResponse. - * @implements IListBackupVaultsResponse - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse=} [properties] Properties to set - */ - function ListBackupVaultsResponse(properties) { - this.backupVaults = []; - 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]]; - } - - /** - * ListBackupVaultsResponse backupVaults. - * @member {Array.} backupVaults - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @instance - */ - ListBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; - - /** - * ListBackupVaultsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @instance - */ - ListBackupVaultsResponse.prototype.nextPageToken = ""; - - /** - * ListBackupVaultsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @instance - */ - ListBackupVaultsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListBackupVaultsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse instance - */ - ListBackupVaultsResponse.create = function create(properties) { - return new ListBackupVaultsResponse(properties); - }; - - /** - * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupVaultsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupVaults != null && message.backupVaults.length) - for (var i = 0; i < message.backupVaults.length; ++i) - $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVaults[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 ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupVaultsResponse.decode = function 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.backupdr.v1.ListBackupVaultsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.backupVaults && message.backupVaults.length)) - message.backupVaults = []; - message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.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 ListBackupVaultsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupVaultsResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupVaultsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { - if (!Array.isArray(message.backupVaults)) - return "backupVaults: array expected"; - for (var i = 0; i < message.backupVaults.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVaults[i]); - if (error) - return "backupVaults." + 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 ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse - */ - ListBackupVaultsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupVaultsResponse(); - if (object.backupVaults) { - if (!Array.isArray(object.backupVaults)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.backupVaults: array expected"); - message.backupVaults = []; - for (var i = 0; i < object.backupVaults.length; ++i) { - if (typeof object.backupVaults[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.backupVaults: object expected"); - message.backupVaults[i] = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVaults[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.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 ListBackupVaultsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.ListBackupVaultsResponse} message ListBackupVaultsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupVaultsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backupVaults = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backupVaults && message.backupVaults.length) { - object.backupVaults = []; - for (var j = 0; j < message.backupVaults.length; ++j) - object.backupVaults[j] = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVaults[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 ListBackupVaultsResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @instance - * @returns {Object.} JSON object - */ - ListBackupVaultsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupVaultsResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupVaultsResponse"; - }; - - return ListBackupVaultsResponse; - })(); - - v1.FetchUsableBackupVaultsRequest = (function() { - - /** - * Properties of a FetchUsableBackupVaultsRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IFetchUsableBackupVaultsRequest - * @property {string|null} [parent] FetchUsableBackupVaultsRequest parent - * @property {number|null} [pageSize] FetchUsableBackupVaultsRequest pageSize - * @property {string|null} [pageToken] FetchUsableBackupVaultsRequest pageToken - * @property {string|null} [filter] FetchUsableBackupVaultsRequest filter - * @property {string|null} [orderBy] FetchUsableBackupVaultsRequest orderBy - */ - - /** - * Constructs a new FetchUsableBackupVaultsRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FetchUsableBackupVaultsRequest. - * @implements IFetchUsableBackupVaultsRequest - * @constructor - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest=} [properties] Properties to set - */ - function FetchUsableBackupVaultsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FetchUsableBackupVaultsRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @instance - */ - FetchUsableBackupVaultsRequest.prototype.parent = ""; - - /** - * FetchUsableBackupVaultsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @instance - */ - FetchUsableBackupVaultsRequest.prototype.pageSize = 0; - - /** - * FetchUsableBackupVaultsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @instance - */ - FetchUsableBackupVaultsRequest.prototype.pageToken = ""; - - /** - * FetchUsableBackupVaultsRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @instance - */ - FetchUsableBackupVaultsRequest.prototype.filter = ""; - - /** - * FetchUsableBackupVaultsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @instance - */ - FetchUsableBackupVaultsRequest.prototype.orderBy = ""; - - /** - * Creates a new FetchUsableBackupVaultsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest instance - */ - FetchUsableBackupVaultsRequest.create = function create(properties) { - return new FetchUsableBackupVaultsRequest(properties); - }; - - /** - * Encodes the specified FetchUsableBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchUsableBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchUsableBackupVaultsRequest.decode = function 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.backupdr.v1.FetchUsableBackupVaultsRequest(); - 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 FetchUsableBackupVaultsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchUsableBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchUsableBackupVaultsRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest - */ - FetchUsableBackupVaultsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest(); - 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 FetchUsableBackupVaultsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @instance - * @returns {Object.} JSON object - */ - FetchUsableBackupVaultsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchUsableBackupVaultsRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchUsableBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest"; - }; - - return FetchUsableBackupVaultsRequest; - })(); - - v1.FetchUsableBackupVaultsResponse = (function() { - - /** - * Properties of a FetchUsableBackupVaultsResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IFetchUsableBackupVaultsResponse - * @property {Array.|null} [backupVaults] FetchUsableBackupVaultsResponse backupVaults - * @property {string|null} [nextPageToken] FetchUsableBackupVaultsResponse nextPageToken - * @property {Array.|null} [unreachable] FetchUsableBackupVaultsResponse unreachable - */ - - /** - * Constructs a new FetchUsableBackupVaultsResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FetchUsableBackupVaultsResponse. - * @implements IFetchUsableBackupVaultsResponse - * @constructor - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse=} [properties] Properties to set - */ - function FetchUsableBackupVaultsResponse(properties) { - this.backupVaults = []; - 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]]; - } - - /** - * FetchUsableBackupVaultsResponse backupVaults. - * @member {Array.} backupVaults - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @instance - */ - FetchUsableBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; - - /** - * FetchUsableBackupVaultsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @instance - */ - FetchUsableBackupVaultsResponse.prototype.nextPageToken = ""; - - /** - * FetchUsableBackupVaultsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @instance - */ - FetchUsableBackupVaultsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new FetchUsableBackupVaultsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse instance - */ - FetchUsableBackupVaultsResponse.create = function create(properties) { - return new FetchUsableBackupVaultsResponse(properties); - }; - - /** - * Encodes the specified FetchUsableBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchUsableBackupVaultsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupVaults != null && message.backupVaults.length) - for (var i = 0; i < message.backupVaults.length; ++i) - $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVaults[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 FetchUsableBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchUsableBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchUsableBackupVaultsResponse.decode = function 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.backupdr.v1.FetchUsableBackupVaultsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.backupVaults && message.backupVaults.length)) - message.backupVaults = []; - message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.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 FetchUsableBackupVaultsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchUsableBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchUsableBackupVaultsResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchUsableBackupVaultsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { - if (!Array.isArray(message.backupVaults)) - return "backupVaults: array expected"; - for (var i = 0; i < message.backupVaults.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVaults[i]); - if (error) - return "backupVaults." + 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 FetchUsableBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse - */ - FetchUsableBackupVaultsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse(); - if (object.backupVaults) { - if (!Array.isArray(object.backupVaults)) - throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.backupVaults: array expected"); - message.backupVaults = []; - for (var i = 0; i < object.backupVaults.length; ++i) { - if (typeof object.backupVaults[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.backupVaults: object expected"); - message.backupVaults[i] = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVaults[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.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 FetchUsableBackupVaultsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchUsableBackupVaultsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backupVaults = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backupVaults && message.backupVaults.length) { - object.backupVaults = []; - for (var j = 0; j < message.backupVaults.length; ++j) - object.backupVaults[j] = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVaults[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 FetchUsableBackupVaultsResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @instance - * @returns {Object.} JSON object - */ - FetchUsableBackupVaultsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchUsableBackupVaultsResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchUsableBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse"; - }; - - return FetchUsableBackupVaultsResponse; - })(); - - v1.GetBackupVaultRequest = (function() { - - /** - * Properties of a GetBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetBackupVaultRequest - * @property {string|null} [name] GetBackupVaultRequest name - * @property {google.cloud.backupdr.v1.BackupVaultView|null} [view] GetBackupVaultRequest view - */ - - /** - * Constructs a new GetBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetBackupVaultRequest. - * @implements IGetBackupVaultRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest=} [properties] Properties to set - */ - function GetBackupVaultRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetBackupVaultRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @instance - */ - GetBackupVaultRequest.prototype.name = ""; - - /** - * GetBackupVaultRequest view. - * @member {google.cloud.backupdr.v1.BackupVaultView} view - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @instance - */ - GetBackupVaultRequest.prototype.view = 0; - - /** - * Creates a new GetBackupVaultRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest instance - */ - GetBackupVaultRequest.create = function create(properties) { - return new GetBackupVaultRequest(properties); - }; - - /** - * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupVaultRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - return writer; - }; - - /** - * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetBackupVaultRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupVaultRequest.decode = function 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.backupdr.v1.GetBackupVaultRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBackupVaultRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBackupVaultRequest.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.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest - */ - GetBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetBackupVaultRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.GetBackupVaultRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "BACKUP_VAULT_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BACKUP_VAULT_VIEW_BASIC": - case 1: - message.view = 1; - break; - case "BACKUP_VAULT_VIEW_FULL": - case 2: - message.view = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.GetBackupVaultRequest} message GetBackupVaultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetBackupVaultRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "BACKUP_VAULT_VIEW_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVaultView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupVaultView[message.view] : message.view; - return object; - }; - - /** - * Converts this GetBackupVaultRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @instance - * @returns {Object.} JSON object - */ - GetBackupVaultRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetBackupVaultRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupVaultRequest"; - }; - - return GetBackupVaultRequest; - })(); - - v1.UpdateBackupVaultRequest = (function() { - - /** - * Properties of an UpdateBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IUpdateBackupVaultRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupVaultRequest updateMask - * @property {google.cloud.backupdr.v1.IBackupVault|null} [backupVault] UpdateBackupVaultRequest backupVault - * @property {string|null} [requestId] UpdateBackupVaultRequest requestId - * @property {boolean|null} [validateOnly] UpdateBackupVaultRequest validateOnly - * @property {boolean|null} [force] UpdateBackupVaultRequest force - */ - - /** - * Constructs a new UpdateBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an UpdateBackupVaultRequest. - * @implements IUpdateBackupVaultRequest - * @constructor - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest=} [properties] Properties to set - */ - function UpdateBackupVaultRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateBackupVaultRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.updateMask = null; - - /** - * UpdateBackupVaultRequest backupVault. - * @member {google.cloud.backupdr.v1.IBackupVault|null|undefined} backupVault - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.backupVault = null; - - /** - * UpdateBackupVaultRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.requestId = ""; - - /** - * UpdateBackupVaultRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.validateOnly = false; - - /** - * UpdateBackupVaultRequest force. - * @member {boolean} force - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.force = false; - - /** - * Creates a new UpdateBackupVaultRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest instance - */ - UpdateBackupVaultRequest.create = function create(properties) { - return new UpdateBackupVaultRequest(properties); - }; - - /** - * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBackupVaultRequest.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.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) - $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVault, 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 UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBackupVaultRequest.decode = function 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.backupdr.v1.UpdateBackupVaultRequest(); - 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.backupVault = $root.google.cloud.backupdr.v1.BackupVault.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 UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateBackupVaultRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateBackupVaultRequest.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.backupVault != null && message.hasOwnProperty("backupVault")) { - var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault); - if (error) - return "backupVault." + 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 UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest - */ - UpdateBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateBackupVaultRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.backupVault != null) { - if (typeof object.backupVault !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateBackupVaultRequest.backupVault: object expected"); - message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVault); - } - 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 UpdateBackupVaultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.UpdateBackupVaultRequest} message UpdateBackupVaultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateBackupVaultRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.backupVault = 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.backupVault != null && message.hasOwnProperty("backupVault")) - object.backupVault = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVault, 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 UpdateBackupVaultRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateBackupVaultRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateBackupVaultRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupVaultRequest"; - }; - - return UpdateBackupVaultRequest; - })(); - - v1.DeleteBackupVaultRequest = (function() { - - /** - * Properties of a DeleteBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IDeleteBackupVaultRequest - * @property {string|null} [name] DeleteBackupVaultRequest name - * @property {string|null} [requestId] DeleteBackupVaultRequest requestId - * @property {boolean|null} [force] DeleteBackupVaultRequest force - * @property {string|null} [etag] DeleteBackupVaultRequest etag - * @property {boolean|null} [validateOnly] DeleteBackupVaultRequest validateOnly - * @property {boolean|null} [allowMissing] DeleteBackupVaultRequest allowMissing - */ - - /** - * Constructs a new DeleteBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DeleteBackupVaultRequest. - * @implements IDeleteBackupVaultRequest - * @constructor - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest=} [properties] Properties to set - */ - function DeleteBackupVaultRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteBackupVaultRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.name = ""; - - /** - * DeleteBackupVaultRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.requestId = ""; - - /** - * DeleteBackupVaultRequest force. - * @member {boolean} force - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.force = false; - - /** - * DeleteBackupVaultRequest etag. - * @member {string} etag - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.etag = ""; - - /** - * DeleteBackupVaultRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.validateOnly = false; - - /** - * DeleteBackupVaultRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.allowMissing = false; - - /** - * Creates a new DeleteBackupVaultRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest instance - */ - DeleteBackupVaultRequest.create = function create(properties) { - return new DeleteBackupVaultRequest(properties); - }; - - /** - * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupVaultRequest.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); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.allowMissing); - return writer; - }; - - /** - * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupVaultRequest.decode = function 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.backupdr.v1.DeleteBackupVaultRequest(); - 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; - } - case 4: { - message.etag = reader.string(); - break; - } - case 5: { - message.validateOnly = reader.bool(); - break; - } - case 6: { - message.allowMissing = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteBackupVaultRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteBackupVaultRequest.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"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - if (typeof message.allowMissing !== "boolean") - return "allowMissing: boolean expected"; - return null; - }; - - /** - * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest - */ - DeleteBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest(); - 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); - if (object.etag != null) - message.etag = String(object.etag); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); - return message; - }; - - /** - * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.DeleteBackupVaultRequest} message DeleteBackupVaultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteBackupVaultRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.requestId = ""; - object.force = false; - object.etag = ""; - object.validateOnly = false; - object.allowMissing = 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; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; - return object; - }; - - /** - * Converts this DeleteBackupVaultRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteBackupVaultRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteBackupVaultRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupVaultRequest"; - }; - - return DeleteBackupVaultRequest; - })(); - - v1.ListDataSourcesRequest = (function() { - - /** - * Properties of a ListDataSourcesRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListDataSourcesRequest - * @property {string|null} [parent] ListDataSourcesRequest parent - * @property {number|null} [pageSize] ListDataSourcesRequest pageSize - * @property {string|null} [pageToken] ListDataSourcesRequest pageToken - * @property {string|null} [filter] ListDataSourcesRequest filter - * @property {string|null} [orderBy] ListDataSourcesRequest orderBy - */ - - /** - * Constructs a new ListDataSourcesRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListDataSourcesRequest. - * @implements IListDataSourcesRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest=} [properties] Properties to set - */ - function ListDataSourcesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDataSourcesRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @instance - */ - ListDataSourcesRequest.prototype.parent = ""; - - /** - * ListDataSourcesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @instance - */ - ListDataSourcesRequest.prototype.pageSize = 0; - - /** - * ListDataSourcesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @instance - */ - ListDataSourcesRequest.prototype.pageToken = ""; - - /** - * ListDataSourcesRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @instance - */ - ListDataSourcesRequest.prototype.filter = ""; - - /** - * ListDataSourcesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @instance - */ - ListDataSourcesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListDataSourcesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest instance - */ - ListDataSourcesRequest.create = function create(properties) { - return new ListDataSourcesRequest(properties); - }; - - /** - * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataSourcesRequest.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 ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataSourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDataSourcesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataSourcesRequest.decode = function 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.backupdr.v1.ListDataSourcesRequest(); - 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 ListDataSourcesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataSourcesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDataSourcesRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDataSourcesRequest.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 ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest - */ - ListDataSourcesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.ListDataSourcesRequest(); - 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 ListDataSourcesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {google.cloud.backupdr.v1.ListDataSourcesRequest} message ListDataSourcesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDataSourcesRequest.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 ListDataSourcesRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @instance - * @returns {Object.} JSON object - */ - ListDataSourcesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDataSourcesRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDataSourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourcesRequest"; - }; - - return ListDataSourcesRequest; - })(); - - v1.ListDataSourcesResponse = (function() { - - /** - * Properties of a ListDataSourcesResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IListDataSourcesResponse - * @property {Array.|null} [dataSources] ListDataSourcesResponse dataSources - * @property {string|null} [nextPageToken] ListDataSourcesResponse nextPageToken - * @property {Array.|null} [unreachable] ListDataSourcesResponse unreachable - */ - - /** - * Constructs a new ListDataSourcesResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListDataSourcesResponse. - * @implements IListDataSourcesResponse - * @constructor - * @param {google.cloud.backupdr.v1.IListDataSourcesResponse=} [properties] Properties to set - */ - function ListDataSourcesResponse(properties) { - this.dataSources = []; - 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]]; - } - - /** - * ListDataSourcesResponse dataSources. - * @member {Array.} dataSources - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @instance - */ - ListDataSourcesResponse.prototype.dataSources = $util.emptyArray; - - /** - * ListDataSourcesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @instance - */ - ListDataSourcesResponse.prototype.nextPageToken = ""; - - /** - * ListDataSourcesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @instance - */ - ListDataSourcesResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListDataSourcesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse instance - */ - ListDataSourcesResponse.create = function create(properties) { - return new ListDataSourcesResponse(properties); - }; - - /** - * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataSourcesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataSources != null && message.dataSources.length) - for (var i = 0; i < message.dataSources.length; ++i) - $root.google.cloud.backupdr.v1.DataSource.encode(message.dataSources[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 ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataSourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDataSourcesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataSourcesResponse.decode = function 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.backupdr.v1.ListDataSourcesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.dataSources && message.dataSources.length)) - message.dataSources = []; - message.dataSources.push($root.google.cloud.backupdr.v1.DataSource.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 ListDataSourcesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataSourcesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDataSourcesResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDataSourcesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataSources != null && message.hasOwnProperty("dataSources")) { - if (!Array.isArray(message.dataSources)) - return "dataSources: array expected"; - for (var i = 0; i < message.dataSources.length; ++i) { - var error = $root.google.cloud.backupdr.v1.DataSource.verify(message.dataSources[i]); - if (error) - return "dataSources." + 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 ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse - */ - ListDataSourcesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListDataSourcesResponse(); - if (object.dataSources) { - if (!Array.isArray(object.dataSources)) - throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.dataSources: array expected"); - message.dataSources = []; - for (var i = 0; i < object.dataSources.length; ++i) { - if (typeof object.dataSources[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.dataSources: object expected"); - message.dataSources[i] = $root.google.cloud.backupdr.v1.DataSource.fromObject(object.dataSources[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.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 ListDataSourcesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {google.cloud.backupdr.v1.ListDataSourcesResponse} message ListDataSourcesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDataSourcesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dataSources = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.dataSources && message.dataSources.length) { - object.dataSources = []; - for (var j = 0; j < message.dataSources.length; ++j) - object.dataSources[j] = $root.google.cloud.backupdr.v1.DataSource.toObject(message.dataSources[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 ListDataSourcesResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @instance - * @returns {Object.} JSON object - */ - ListDataSourcesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDataSourcesResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDataSourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourcesResponse"; - }; - - return ListDataSourcesResponse; - })(); - - v1.GetDataSourceRequest = (function() { - - /** - * Properties of a GetDataSourceRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetDataSourceRequest - * @property {string|null} [name] GetDataSourceRequest name - */ - - /** - * Constructs a new GetDataSourceRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetDataSourceRequest. - * @implements IGetDataSourceRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest=} [properties] Properties to set - */ - function GetDataSourceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetDataSourceRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @instance - */ - GetDataSourceRequest.prototype.name = ""; - - /** - * Creates a new GetDataSourceRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest instance - */ - GetDataSourceRequest.create = function create(properties) { - return new GetDataSourceRequest(properties); - }; - - /** - * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDataSourceRequest.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 GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetDataSourceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDataSourceRequest.decode = function 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.backupdr.v1.GetDataSourceRequest(); - 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 GetDataSourceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetDataSourceRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetDataSourceRequest.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 GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest - */ - GetDataSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetDataSourceRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.GetDataSourceRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.GetDataSourceRequest} message GetDataSourceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetDataSourceRequest.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 GetDataSourceRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @instance - * @returns {Object.} JSON object - */ - GetDataSourceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetDataSourceRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetDataSourceRequest"; - }; - - return GetDataSourceRequest; - })(); - - v1.UpdateDataSourceRequest = (function() { - - /** - * Properties of an UpdateDataSourceRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IUpdateDataSourceRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataSourceRequest updateMask - * @property {google.cloud.backupdr.v1.IDataSource|null} [dataSource] UpdateDataSourceRequest dataSource - * @property {string|null} [requestId] UpdateDataSourceRequest requestId - * @property {boolean|null} [allowMissing] UpdateDataSourceRequest allowMissing - */ - - /** - * Constructs a new UpdateDataSourceRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an UpdateDataSourceRequest. - * @implements IUpdateDataSourceRequest - * @constructor - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest=} [properties] Properties to set - */ - function UpdateDataSourceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateDataSourceRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @instance - */ - UpdateDataSourceRequest.prototype.updateMask = null; - - /** - * UpdateDataSourceRequest dataSource. - * @member {google.cloud.backupdr.v1.IDataSource|null|undefined} dataSource - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @instance - */ - UpdateDataSourceRequest.prototype.dataSource = null; - - /** - * UpdateDataSourceRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @instance - */ - UpdateDataSourceRequest.prototype.requestId = ""; - - /** - * UpdateDataSourceRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @instance - */ - UpdateDataSourceRequest.prototype.allowMissing = false; - - /** - * Creates a new UpdateDataSourceRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest instance - */ - UpdateDataSourceRequest.create = function create(properties) { - return new UpdateDataSourceRequest(properties); - }; - - /** - * Encodes the specified UpdateDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} message UpdateDataSourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDataSourceRequest.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.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - $root.google.cloud.backupdr.v1.DataSource.encode(message.dataSource, 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.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowMissing); - return writer; - }; - - /** - * Encodes the specified UpdateDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} message UpdateDataSourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateDataSourceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDataSourceRequest.decode = function 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.backupdr.v1.UpdateDataSourceRequest(); - 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.dataSource = $root.google.cloud.backupdr.v1.DataSource.decode(reader, reader.uint32()); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - case 4: { - message.allowMissing = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateDataSourceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateDataSourceRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateDataSourceRequest.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.dataSource != null && message.hasOwnProperty("dataSource")) { - var error = $root.google.cloud.backupdr.v1.DataSource.verify(message.dataSource); - if (error) - return "dataSource." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - if (typeof message.allowMissing !== "boolean") - return "allowMissing: boolean expected"; - return null; - }; - - /** - * Creates an UpdateDataSourceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest - */ - UpdateDataSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.UpdateDataSourceRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.UpdateDataSourceRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateDataSourceRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.dataSource != null) { - if (typeof object.dataSource !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateDataSourceRequest.dataSource: object expected"); - message.dataSource = $root.google.cloud.backupdr.v1.DataSource.fromObject(object.dataSource); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); - return message; - }; - - /** - * Creates a plain object from an UpdateDataSourceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.UpdateDataSourceRequest} message UpdateDataSourceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateDataSourceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.dataSource = null; - object.requestId = ""; - object.allowMissing = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = $root.google.cloud.backupdr.v1.DataSource.toObject(message.dataSource, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; - return object; - }; - - /** - * Converts this UpdateDataSourceRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateDataSourceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateDataSourceRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateDataSourceRequest"; - }; - - return UpdateDataSourceRequest; - })(); - - v1.RemoveDataSourceRequest = (function() { - - /** - * Properties of a RemoveDataSourceRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IRemoveDataSourceRequest - * @property {string|null} [name] RemoveDataSourceRequest name - * @property {string|null} [requestId] RemoveDataSourceRequest requestId - */ - - /** - * Constructs a new RemoveDataSourceRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a RemoveDataSourceRequest. - * @implements IRemoveDataSourceRequest - * @constructor - * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest=} [properties] Properties to set - */ - function RemoveDataSourceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RemoveDataSourceRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @instance - */ - RemoveDataSourceRequest.prototype.name = ""; - - /** - * RemoveDataSourceRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @instance - */ - RemoveDataSourceRequest.prototype.requestId = ""; - - /** - * Creates a new RemoveDataSourceRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest instance - */ - RemoveDataSourceRequest.create = function create(properties) { - return new RemoveDataSourceRequest(properties); - }; - - /** - * Encodes the specified RemoveDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} message RemoveDataSourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemoveDataSourceRequest.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 RemoveDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} message RemoveDataSourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RemoveDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RemoveDataSourceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemoveDataSourceRequest.decode = function 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.backupdr.v1.RemoveDataSourceRequest(); - 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 RemoveDataSourceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RemoveDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RemoveDataSourceRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RemoveDataSourceRequest.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 RemoveDataSourceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest - */ - RemoveDataSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.RemoveDataSourceRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.RemoveDataSourceRequest(); - 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 RemoveDataSourceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.RemoveDataSourceRequest} message RemoveDataSourceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RemoveDataSourceRequest.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 RemoveDataSourceRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @instance - * @returns {Object.} JSON object - */ - RemoveDataSourceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RemoveDataSourceRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RemoveDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.RemoveDataSourceRequest"; - }; - - return RemoveDataSourceRequest; - })(); - - v1.SetInternalStatusRequest = (function() { - - /** - * Properties of a SetInternalStatusRequest. - * @memberof google.cloud.backupdr.v1 - * @interface ISetInternalStatusRequest - * @property {string|null} [dataSource] SetInternalStatusRequest dataSource - * @property {Uint8Array|null} [value] SetInternalStatusRequest value - * @property {google.cloud.backupdr.v1.BackupConfigState|null} [backupConfigState] SetInternalStatusRequest backupConfigState - * @property {string|null} [requestId] SetInternalStatusRequest requestId - */ - - /** - * Constructs a new SetInternalStatusRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a SetInternalStatusRequest. - * @implements ISetInternalStatusRequest - * @constructor - * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest=} [properties] Properties to set - */ - function SetInternalStatusRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetInternalStatusRequest dataSource. - * @member {string} dataSource - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @instance - */ - SetInternalStatusRequest.prototype.dataSource = ""; - - /** - * SetInternalStatusRequest value. - * @member {Uint8Array} value - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @instance - */ - SetInternalStatusRequest.prototype.value = $util.newBuffer([]); - - /** - * SetInternalStatusRequest backupConfigState. - * @member {google.cloud.backupdr.v1.BackupConfigState} backupConfigState - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @instance - */ - SetInternalStatusRequest.prototype.backupConfigState = 0; - - /** - * SetInternalStatusRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @instance - */ - SetInternalStatusRequest.prototype.requestId = ""; - - /** - * Creates a new SetInternalStatusRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest instance - */ - SetInternalStatusRequest.create = function create(properties) { - return new SetInternalStatusRequest(properties); - }; - - /** - * Encodes the specified SetInternalStatusRequest message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} message SetInternalStatusRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetInternalStatusRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - if (message.backupConfigState != null && Object.hasOwnProperty.call(message, "backupConfigState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.backupConfigState); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified SetInternalStatusRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} message SetInternalStatusRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetInternalStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetInternalStatusRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetInternalStatusRequest.decode = function 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.backupdr.v1.SetInternalStatusRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataSource = reader.string(); - break; - } - case 2: { - message.value = reader.bytes(); - break; - } - case 3: { - message.backupConfigState = reader.int32(); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetInternalStatusRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetInternalStatusRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetInternalStatusRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetInternalStatusRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: 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"; - if (message.backupConfigState != null && message.hasOwnProperty("backupConfigState")) - switch (message.backupConfigState) { - default: - return "backupConfigState: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a SetInternalStatusRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest - */ - SetInternalStatusRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.SetInternalStatusRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.SetInternalStatusRequest(); - if (object.dataSource != null) - message.dataSource = String(object.dataSource); - 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; - switch (object.backupConfigState) { - default: - if (typeof object.backupConfigState === "number") { - message.backupConfigState = object.backupConfigState; - break; - } - break; - case "BACKUP_CONFIG_STATE_UNSPECIFIED": - case 0: - message.backupConfigState = 0; - break; - case "ACTIVE": - case 1: - message.backupConfigState = 1; - break; - case "PASSIVE": - case 2: - message.backupConfigState = 2; - break; - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a SetInternalStatusRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {google.cloud.backupdr.v1.SetInternalStatusRequest} message SetInternalStatusRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetInternalStatusRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dataSource = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - object.backupConfigState = options.enums === String ? "BACKUP_CONFIG_STATE_UNSPECIFIED" : 0; - object.requestId = ""; - } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; - 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; - if (message.backupConfigState != null && message.hasOwnProperty("backupConfigState")) - object.backupConfigState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigState[message.backupConfigState] === undefined ? message.backupConfigState : $root.google.cloud.backupdr.v1.BackupConfigState[message.backupConfigState] : message.backupConfigState; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this SetInternalStatusRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @instance - * @returns {Object.} JSON object - */ - SetInternalStatusRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetInternalStatusRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetInternalStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.SetInternalStatusRequest"; - }; - - return SetInternalStatusRequest; - })(); - - v1.SetInternalStatusResponse = (function() { - - /** - * Properties of a SetInternalStatusResponse. - * @memberof google.cloud.backupdr.v1 - * @interface ISetInternalStatusResponse - */ - - /** - * Constructs a new SetInternalStatusResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a SetInternalStatusResponse. - * @implements ISetInternalStatusResponse - * @constructor - * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse=} [properties] Properties to set - */ - function SetInternalStatusResponse(properties) { - if (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 SetInternalStatusResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @static - * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse instance - */ - SetInternalStatusResponse.create = function create(properties) { - return new SetInternalStatusResponse(properties); - }; - - /** - * Encodes the specified SetInternalStatusResponse message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @static - * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse} message SetInternalStatusResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetInternalStatusResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified SetInternalStatusResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @static - * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse} message SetInternalStatusResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetInternalStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetInternalStatusResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetInternalStatusResponse.decode = function 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.backupdr.v1.SetInternalStatusResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetInternalStatusResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetInternalStatusResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetInternalStatusResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetInternalStatusResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a SetInternalStatusResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse - */ - SetInternalStatusResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.SetInternalStatusResponse) - return object; - return new $root.google.cloud.backupdr.v1.SetInternalStatusResponse(); - }; - - /** - * Creates a plain object from a SetInternalStatusResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @static - * @param {google.cloud.backupdr.v1.SetInternalStatusResponse} message SetInternalStatusResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetInternalStatusResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this SetInternalStatusResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @instance - * @returns {Object.} JSON object - */ - SetInternalStatusResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetInternalStatusResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetInternalStatusResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.SetInternalStatusResponse"; - }; - - return SetInternalStatusResponse; - })(); - - v1.InitiateBackupRequest = (function() { - - /** - * Properties of an InitiateBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IInitiateBackupRequest - * @property {string|null} [dataSource] InitiateBackupRequest dataSource - * @property {string|null} [requestId] InitiateBackupRequest requestId - * @property {string|null} [backupId] InitiateBackupRequest backupId - */ - - /** - * Constructs a new InitiateBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an InitiateBackupRequest. - * @implements IInitiateBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IInitiateBackupRequest=} [properties] Properties to set - */ - function InitiateBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InitiateBackupRequest dataSource. - * @member {string} dataSource - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @instance - */ - InitiateBackupRequest.prototype.dataSource = ""; - - /** - * InitiateBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @instance - */ - InitiateBackupRequest.prototype.requestId = ""; - - /** - * InitiateBackupRequest backupId. - * @member {string} backupId - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @instance - */ - InitiateBackupRequest.prototype.backupId = ""; - - /** - * Creates a new InitiateBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IInitiateBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest instance - */ - InitiateBackupRequest.create = function create(properties) { - return new InitiateBackupRequest(properties); - }; - - /** - * Encodes the specified InitiateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} message InitiateBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitiateBackupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.backupId); - return writer; - }; - - /** - * Encodes the specified InitiateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} message InitiateBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitiateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InitiateBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitiateBackupRequest.decode = function 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.backupdr.v1.InitiateBackupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataSource = reader.string(); - break; - } - case 2: { - message.requestId = reader.string(); - break; - } - case 5: { - message.backupId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InitiateBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitiateBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InitiateBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InitiateBackupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.backupId != null && message.hasOwnProperty("backupId")) - if (!$util.isString(message.backupId)) - return "backupId: string expected"; - return null; - }; - - /** - * Creates an InitiateBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest - */ - InitiateBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.InitiateBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.InitiateBackupRequest(); - if (object.dataSource != null) - message.dataSource = String(object.dataSource); - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.backupId != null) - message.backupId = String(object.backupId); - return message; - }; - - /** - * Creates a plain object from an InitiateBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.InitiateBackupRequest} message InitiateBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InitiateBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dataSource = ""; - object.requestId = ""; - object.backupId = ""; - } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.backupId != null && message.hasOwnProperty("backupId")) - object.backupId = message.backupId; - return object; - }; - - /** - * Converts this InitiateBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @instance - * @returns {Object.} JSON object - */ - InitiateBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InitiateBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InitiateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.InitiateBackupRequest"; - }; - - return InitiateBackupRequest; - })(); - - v1.InitiateBackupResponse = (function() { - - /** - * Properties of an InitiateBackupResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IInitiateBackupResponse - * @property {string|null} [backup] InitiateBackupResponse backup - * @property {number|null} [newBackupGenerationId] InitiateBackupResponse newBackupGenerationId - * @property {number|null} [baseBackupGenerationId] InitiateBackupResponse baseBackupGenerationId - */ - - /** - * Constructs a new InitiateBackupResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an InitiateBackupResponse. - * @implements IInitiateBackupResponse - * @constructor - * @param {google.cloud.backupdr.v1.IInitiateBackupResponse=} [properties] Properties to set - */ - function InitiateBackupResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InitiateBackupResponse backup. - * @member {string} backup - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @instance - */ - InitiateBackupResponse.prototype.backup = ""; - - /** - * InitiateBackupResponse newBackupGenerationId. - * @member {number} newBackupGenerationId - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @instance - */ - InitiateBackupResponse.prototype.newBackupGenerationId = 0; - - /** - * InitiateBackupResponse baseBackupGenerationId. - * @member {number} baseBackupGenerationId - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @instance - */ - InitiateBackupResponse.prototype.baseBackupGenerationId = 0; - - /** - * Creates a new InitiateBackupResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @static - * @param {google.cloud.backupdr.v1.IInitiateBackupResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse instance - */ - InitiateBackupResponse.create = function create(properties) { - return new InitiateBackupResponse(properties); - }; - - /** - * Encodes the specified InitiateBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @static - * @param {google.cloud.backupdr.v1.IInitiateBackupResponse} message InitiateBackupResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitiateBackupResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.backup); - if (message.newBackupGenerationId != null && Object.hasOwnProperty.call(message, "newBackupGenerationId")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.newBackupGenerationId); - if (message.baseBackupGenerationId != null && Object.hasOwnProperty.call(message, "baseBackupGenerationId")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.baseBackupGenerationId); - return writer; - }; - - /** - * Encodes the specified InitiateBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @static - * @param {google.cloud.backupdr.v1.IInitiateBackupResponse} message InitiateBackupResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitiateBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InitiateBackupResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitiateBackupResponse.decode = function 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.backupdr.v1.InitiateBackupResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.backup = reader.string(); - break; - } - case 2: { - message.newBackupGenerationId = reader.int32(); - break; - } - case 3: { - message.baseBackupGenerationId = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InitiateBackupResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitiateBackupResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InitiateBackupResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InitiateBackupResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backup != null && message.hasOwnProperty("backup")) - if (!$util.isString(message.backup)) - return "backup: string expected"; - if (message.newBackupGenerationId != null && message.hasOwnProperty("newBackupGenerationId")) - if (!$util.isInteger(message.newBackupGenerationId)) - return "newBackupGenerationId: integer expected"; - if (message.baseBackupGenerationId != null && message.hasOwnProperty("baseBackupGenerationId")) - if (!$util.isInteger(message.baseBackupGenerationId)) - return "baseBackupGenerationId: integer expected"; - return null; - }; - - /** - * Creates an InitiateBackupResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse - */ - InitiateBackupResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.InitiateBackupResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.InitiateBackupResponse(); - if (object.backup != null) - message.backup = String(object.backup); - if (object.newBackupGenerationId != null) - message.newBackupGenerationId = object.newBackupGenerationId | 0; - if (object.baseBackupGenerationId != null) - message.baseBackupGenerationId = object.baseBackupGenerationId | 0; - return message; - }; - - /** - * Creates a plain object from an InitiateBackupResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @static - * @param {google.cloud.backupdr.v1.InitiateBackupResponse} message InitiateBackupResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InitiateBackupResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.backup = ""; - object.newBackupGenerationId = 0; - object.baseBackupGenerationId = 0; - } - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = message.backup; - if (message.newBackupGenerationId != null && message.hasOwnProperty("newBackupGenerationId")) - object.newBackupGenerationId = message.newBackupGenerationId; - if (message.baseBackupGenerationId != null && message.hasOwnProperty("baseBackupGenerationId")) - object.baseBackupGenerationId = message.baseBackupGenerationId; - return object; - }; - - /** - * Converts this InitiateBackupResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @instance - * @returns {Object.} JSON object - */ - InitiateBackupResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InitiateBackupResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InitiateBackupResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.InitiateBackupResponse"; - }; - - return InitiateBackupResponse; - })(); - - v1.AbandonBackupRequest = (function() { - - /** - * Properties of an AbandonBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IAbandonBackupRequest - * @property {string|null} [dataSource] AbandonBackupRequest dataSource - * @property {string|null} [requestId] AbandonBackupRequest requestId - */ - - /** - * Constructs a new AbandonBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AbandonBackupRequest. - * @implements IAbandonBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IAbandonBackupRequest=} [properties] Properties to set - */ - function AbandonBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AbandonBackupRequest dataSource. - * @member {string} dataSource - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @instance - */ - AbandonBackupRequest.prototype.dataSource = ""; - - /** - * AbandonBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @instance - */ - AbandonBackupRequest.prototype.requestId = ""; - - /** - * Creates a new AbandonBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IAbandonBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest instance - */ - AbandonBackupRequest.create = function create(properties) { - return new AbandonBackupRequest(properties); - }; - - /** - * Encodes the specified AbandonBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} message AbandonBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AbandonBackupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified AbandonBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} message AbandonBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AbandonBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AbandonBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AbandonBackupRequest.decode = function 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.backupdr.v1.AbandonBackupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataSource = reader.string(); - break; - } - case 2: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AbandonBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AbandonBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AbandonBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AbandonBackupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates an AbandonBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest - */ - AbandonBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AbandonBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.AbandonBackupRequest(); - if (object.dataSource != null) - message.dataSource = String(object.dataSource); - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from an AbandonBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {google.cloud.backupdr.v1.AbandonBackupRequest} message AbandonBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AbandonBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dataSource = ""; - object.requestId = ""; - } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this AbandonBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @instance - * @returns {Object.} JSON object - */ - AbandonBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AbandonBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AbandonBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AbandonBackupRequest"; - }; - - return AbandonBackupRequest; - })(); - - v1.FinalizeBackupRequest = (function() { - - /** - * Properties of a FinalizeBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IFinalizeBackupRequest - * @property {string|null} [dataSource] FinalizeBackupRequest dataSource - * @property {string|null} [description] FinalizeBackupRequest description - * @property {google.protobuf.ITimestamp|null} [consistencyTime] FinalizeBackupRequest consistencyTime - * @property {string|null} [requestId] FinalizeBackupRequest requestId - * @property {string|null} [backupId] FinalizeBackupRequest backupId - * @property {google.protobuf.ITimestamp|null} [recoveryRangeStartTime] FinalizeBackupRequest recoveryRangeStartTime - * @property {google.protobuf.ITimestamp|null} [recoveryRangeEndTime] FinalizeBackupRequest recoveryRangeEndTime - * @property {google.protobuf.IDuration|null} [retentionDuration] FinalizeBackupRequest retentionDuration - */ - - /** - * Constructs a new FinalizeBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FinalizeBackupRequest. - * @implements IFinalizeBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest=} [properties] Properties to set - */ - function FinalizeBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FinalizeBackupRequest dataSource. - * @member {string} dataSource - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.dataSource = ""; - - /** - * FinalizeBackupRequest description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.description = null; - - /** - * FinalizeBackupRequest consistencyTime. - * @member {google.protobuf.ITimestamp|null|undefined} consistencyTime - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.consistencyTime = null; - - /** - * FinalizeBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.requestId = ""; - - /** - * FinalizeBackupRequest backupId. - * @member {string} backupId - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.backupId = ""; - - /** - * FinalizeBackupRequest recoveryRangeStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeStartTime - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.recoveryRangeStartTime = null; - - /** - * FinalizeBackupRequest recoveryRangeEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeEndTime - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.recoveryRangeEndTime = null; - - /** - * FinalizeBackupRequest retentionDuration. - * @member {google.protobuf.IDuration|null|undefined} retentionDuration - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.retentionDuration = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FinalizeBackupRequest _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - Object.defineProperty(FinalizeBackupRequest.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FinalizeBackupRequest _consistencyTime. - * @member {"consistencyTime"|undefined} _consistencyTime - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - Object.defineProperty(FinalizeBackupRequest.prototype, "_consistencyTime", { - get: $util.oneOfGetter($oneOfFields = ["consistencyTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FinalizeBackupRequest _recoveryRangeStartTime. - * @member {"recoveryRangeStartTime"|undefined} _recoveryRangeStartTime - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - Object.defineProperty(FinalizeBackupRequest.prototype, "_recoveryRangeStartTime", { - get: $util.oneOfGetter($oneOfFields = ["recoveryRangeStartTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FinalizeBackupRequest _recoveryRangeEndTime. - * @member {"recoveryRangeEndTime"|undefined} _recoveryRangeEndTime - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - Object.defineProperty(FinalizeBackupRequest.prototype, "_recoveryRangeEndTime", { - get: $util.oneOfGetter($oneOfFields = ["recoveryRangeEndTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FinalizeBackupRequest _retentionDuration. - * @member {"retentionDuration"|undefined} _retentionDuration - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - Object.defineProperty(FinalizeBackupRequest.prototype, "_retentionDuration", { - get: $util.oneOfGetter($oneOfFields = ["retentionDuration"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new FinalizeBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest instance - */ - FinalizeBackupRequest.create = function create(properties) { - return new FinalizeBackupRequest(properties); - }; - - /** - * Encodes the specified FinalizeBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} message FinalizeBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FinalizeBackupRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.consistencyTime != null && Object.hasOwnProperty.call(message, "consistencyTime")) - $root.google.protobuf.Timestamp.encode(message.consistencyTime, 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.backupId != null && Object.hasOwnProperty.call(message, "backupId")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.backupId); - if (message.recoveryRangeStartTime != null && Object.hasOwnProperty.call(message, "recoveryRangeStartTime")) - $root.google.protobuf.Timestamp.encode(message.recoveryRangeStartTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.recoveryRangeEndTime != null && Object.hasOwnProperty.call(message, "recoveryRangeEndTime")) - $root.google.protobuf.Timestamp.encode(message.recoveryRangeEndTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.retentionDuration != null && Object.hasOwnProperty.call(message, "retentionDuration")) - $root.google.protobuf.Duration.encode(message.retentionDuration, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FinalizeBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} message FinalizeBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FinalizeBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FinalizeBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FinalizeBackupRequest.decode = function 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.backupdr.v1.FinalizeBackupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.dataSource = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.consistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - case 5: { - message.backupId = reader.string(); - break; - } - case 6: { - message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.retentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FinalizeBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FinalizeBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FinalizeBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FinalizeBackupRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: string expected"; - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { - properties._consistencyTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.consistencyTime); - if (error) - return "consistencyTime." + error; - } - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.backupId != null && message.hasOwnProperty("backupId")) - if (!$util.isString(message.backupId)) - return "backupId: string expected"; - if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { - properties._recoveryRangeStartTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeStartTime); - if (error) - return "recoveryRangeStartTime." + error; - } - } - if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { - properties._recoveryRangeEndTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeEndTime); - if (error) - return "recoveryRangeEndTime." + error; - } - } - if (message.retentionDuration != null && message.hasOwnProperty("retentionDuration")) { - properties._retentionDuration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.retentionDuration); - if (error) - return "retentionDuration." + error; - } - } - return null; - }; - - /** - * Creates a FinalizeBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest - */ - FinalizeBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FinalizeBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.FinalizeBackupRequest(); - if (object.dataSource != null) - message.dataSource = String(object.dataSource); - if (object.description != null) - message.description = String(object.description); - if (object.consistencyTime != null) { - if (typeof object.consistencyTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.consistencyTime: object expected"); - message.consistencyTime = $root.google.protobuf.Timestamp.fromObject(object.consistencyTime); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.backupId != null) - message.backupId = String(object.backupId); - if (object.recoveryRangeStartTime != null) { - if (typeof object.recoveryRangeStartTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.recoveryRangeStartTime: object expected"); - message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeStartTime); - } - if (object.recoveryRangeEndTime != null) { - if (typeof object.recoveryRangeEndTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.recoveryRangeEndTime: object expected"); - message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeEndTime); - } - if (object.retentionDuration != null) { - if (typeof object.retentionDuration !== "object") - throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.retentionDuration: object expected"); - message.retentionDuration = $root.google.protobuf.Duration.fromObject(object.retentionDuration); - } - return message; - }; - - /** - * Creates a plain object from a FinalizeBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @static - * @param {google.cloud.backupdr.v1.FinalizeBackupRequest} message FinalizeBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FinalizeBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.dataSource = ""; - object.requestId = ""; - object.backupId = ""; - } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { - object.consistencyTime = $root.google.protobuf.Timestamp.toObject(message.consistencyTime, options); - if (options.oneofs) - object._consistencyTime = "consistencyTime"; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.backupId != null && message.hasOwnProperty("backupId")) - object.backupId = message.backupId; - if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { - object.recoveryRangeStartTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeStartTime, options); - if (options.oneofs) - object._recoveryRangeStartTime = "recoveryRangeStartTime"; - } - if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { - object.recoveryRangeEndTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeEndTime, options); - if (options.oneofs) - object._recoveryRangeEndTime = "recoveryRangeEndTime"; - } - if (message.retentionDuration != null && message.hasOwnProperty("retentionDuration")) { - object.retentionDuration = $root.google.protobuf.Duration.toObject(message.retentionDuration, options); - if (options.oneofs) - object._retentionDuration = "retentionDuration"; - } - return object; - }; - - /** - * Converts this FinalizeBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - * @returns {Object.} JSON object - */ - FinalizeBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FinalizeBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FinalizeBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FinalizeBackupRequest"; - }; - - return FinalizeBackupRequest; - })(); - - v1.FetchAccessTokenRequest = (function() { - - /** - * Properties of a FetchAccessTokenRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IFetchAccessTokenRequest - * @property {string|null} [name] FetchAccessTokenRequest name - * @property {number|null} [generationId] FetchAccessTokenRequest generationId - */ - - /** - * Constructs a new FetchAccessTokenRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FetchAccessTokenRequest. - * @implements IFetchAccessTokenRequest - * @constructor - * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest=} [properties] Properties to set - */ - function FetchAccessTokenRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FetchAccessTokenRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @instance - */ - FetchAccessTokenRequest.prototype.name = ""; - - /** - * FetchAccessTokenRequest generationId. - * @member {number} generationId - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @instance - */ - FetchAccessTokenRequest.prototype.generationId = 0; - - /** - * Creates a new FetchAccessTokenRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @static - * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest instance - */ - FetchAccessTokenRequest.create = function create(properties) { - return new FetchAccessTokenRequest(properties); - }; - - /** - * Encodes the specified FetchAccessTokenRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @static - * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} message FetchAccessTokenRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchAccessTokenRequest.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.generationId != null && Object.hasOwnProperty.call(message, "generationId")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.generationId); - return writer; - }; - - /** - * Encodes the specified FetchAccessTokenRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @static - * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} message FetchAccessTokenRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchAccessTokenRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchAccessTokenRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchAccessTokenRequest.decode = function 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.backupdr.v1.FetchAccessTokenRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.generationId = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FetchAccessTokenRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchAccessTokenRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchAccessTokenRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchAccessTokenRequest.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.generationId != null && message.hasOwnProperty("generationId")) - if (!$util.isInteger(message.generationId)) - return "generationId: integer expected"; - return null; - }; - - /** - * Creates a FetchAccessTokenRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest - */ - FetchAccessTokenRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FetchAccessTokenRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.FetchAccessTokenRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.generationId != null) - message.generationId = object.generationId | 0; - return message; - }; - - /** - * Creates a plain object from a FetchAccessTokenRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @static - * @param {google.cloud.backupdr.v1.FetchAccessTokenRequest} message FetchAccessTokenRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchAccessTokenRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.generationId = 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.generationId != null && message.hasOwnProperty("generationId")) - object.generationId = message.generationId; - return object; - }; - - /** - * Converts this FetchAccessTokenRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @instance - * @returns {Object.} JSON object - */ - FetchAccessTokenRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchAccessTokenRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchAccessTokenRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchAccessTokenRequest"; - }; - - return FetchAccessTokenRequest; - })(); - - v1.FetchAccessTokenResponse = (function() { - - /** - * Properties of a FetchAccessTokenResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IFetchAccessTokenResponse - * @property {string|null} [readLocation] FetchAccessTokenResponse readLocation - * @property {string|null} [writeLocation] FetchAccessTokenResponse writeLocation - * @property {string|null} [token] FetchAccessTokenResponse token - * @property {google.protobuf.ITimestamp|null} [expireTime] FetchAccessTokenResponse expireTime - */ - - /** - * Constructs a new FetchAccessTokenResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FetchAccessTokenResponse. - * @implements IFetchAccessTokenResponse - * @constructor - * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse=} [properties] Properties to set - */ - function FetchAccessTokenResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FetchAccessTokenResponse readLocation. - * @member {string} readLocation - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @instance - */ - FetchAccessTokenResponse.prototype.readLocation = ""; - - /** - * FetchAccessTokenResponse writeLocation. - * @member {string} writeLocation - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @instance - */ - FetchAccessTokenResponse.prototype.writeLocation = ""; - - /** - * FetchAccessTokenResponse token. - * @member {string} token - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @instance - */ - FetchAccessTokenResponse.prototype.token = ""; - - /** - * FetchAccessTokenResponse expireTime. - * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @instance - */ - FetchAccessTokenResponse.prototype.expireTime = null; - - /** - * Creates a new FetchAccessTokenResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @static - * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse instance - */ - FetchAccessTokenResponse.create = function create(properties) { - return new FetchAccessTokenResponse(properties); - }; - - /** - * Encodes the specified FetchAccessTokenResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @static - * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse} message FetchAccessTokenResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchAccessTokenResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.readLocation != null && Object.hasOwnProperty.call(message, "readLocation")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.readLocation); - if (message.writeLocation != null && Object.hasOwnProperty.call(message, "writeLocation")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.writeLocation); - if (message.token != null && Object.hasOwnProperty.call(message, "token")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.token); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FetchAccessTokenResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @static - * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse} message FetchAccessTokenResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchAccessTokenResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchAccessTokenResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchAccessTokenResponse.decode = function 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.backupdr.v1.FetchAccessTokenResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.readLocation = reader.string(); - break; - } - case 2: { - message.writeLocation = reader.string(); - break; - } - case 3: { - message.token = reader.string(); - break; - } - case 4: { - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FetchAccessTokenResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchAccessTokenResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchAccessTokenResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchAccessTokenResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.readLocation != null && message.hasOwnProperty("readLocation")) - if (!$util.isString(message.readLocation)) - return "readLocation: string expected"; - if (message.writeLocation != null && message.hasOwnProperty("writeLocation")) - if (!$util.isString(message.writeLocation)) - return "writeLocation: string expected"; - if (message.token != null && message.hasOwnProperty("token")) - if (!$util.isString(message.token)) - return "token: string expected"; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); - if (error) - return "expireTime." + error; - } - return null; - }; - - /** - * Creates a FetchAccessTokenResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse - */ - FetchAccessTokenResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FetchAccessTokenResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.FetchAccessTokenResponse(); - if (object.readLocation != null) - message.readLocation = String(object.readLocation); - if (object.writeLocation != null) - message.writeLocation = String(object.writeLocation); - if (object.token != null) - message.token = String(object.token); - if (object.expireTime != null) { - if (typeof object.expireTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.FetchAccessTokenResponse.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); - } - return message; - }; - - /** - * Creates a plain object from a FetchAccessTokenResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @static - * @param {google.cloud.backupdr.v1.FetchAccessTokenResponse} message FetchAccessTokenResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchAccessTokenResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.readLocation = ""; - object.writeLocation = ""; - object.token = ""; - object.expireTime = null; - } - if (message.readLocation != null && message.hasOwnProperty("readLocation")) - object.readLocation = message.readLocation; - if (message.writeLocation != null && message.hasOwnProperty("writeLocation")) - object.writeLocation = message.writeLocation; - if (message.token != null && message.hasOwnProperty("token")) - object.token = message.token; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); - return object; - }; - - /** - * Converts this FetchAccessTokenResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @instance - * @returns {Object.} JSON object - */ - FetchAccessTokenResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchAccessTokenResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchAccessTokenResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchAccessTokenResponse"; - }; - - return FetchAccessTokenResponse; - })(); - - v1.ListBackupsRequest = (function() { - - /** - * Properties of a ListBackupsRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupsRequest - * @property {string|null} [parent] ListBackupsRequest parent - * @property {number|null} [pageSize] ListBackupsRequest pageSize - * @property {string|null} [pageToken] ListBackupsRequest pageToken - * @property {string|null} [filter] ListBackupsRequest filter - * @property {string|null} [orderBy] ListBackupsRequest orderBy - * @property {google.cloud.backupdr.v1.BackupView|null} [view] ListBackupsRequest view - */ - - /** - * Constructs a new ListBackupsRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupsRequest. - * @implements IListBackupsRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set - */ - function ListBackupsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListBackupsRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.parent = ""; - - /** - * ListBackupsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.pageSize = 0; - - /** - * ListBackupsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.pageToken = ""; - - /** - * ListBackupsRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.filter = ""; - - /** - * ListBackupsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.orderBy = ""; - - /** - * ListBackupsRequest view. - * @member {google.cloud.backupdr.v1.BackupView} view - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.view = 0; - - /** - * Creates a new ListBackupsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest instance - */ - ListBackupsRequest.create = function create(properties) { - return new ListBackupsRequest(properties); - }; - - /** - * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupsRequest.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); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); - return writer; - }; - - /** - * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupsRequest.decode = function 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.backupdr.v1.ListBackupsRequest(); - 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; - } - case 6: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupsRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupsRequest.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"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest - */ - ListBackupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupsRequest(); - 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); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "BACKUP_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BACKUP_VIEW_BASIC": - case 1: - message.view = 1; - break; - case "BACKUP_VIEW_FULL": - case 2: - message.view = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {google.cloud.backupdr.v1.ListBackupsRequest} message ListBackupsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; - } - 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; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; - return object; - }; - - /** - * Converts this ListBackupsRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - * @returns {Object.} JSON object - */ - ListBackupsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupsRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsRequest"; - }; - - return ListBackupsRequest; - })(); - - v1.ListBackupsResponse = (function() { - - /** - * Properties of a ListBackupsResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupsResponse - * @property {Array.|null} [backups] ListBackupsResponse backups - * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupsResponse unreachable - */ - - /** - * Constructs a new ListBackupsResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupsResponse. - * @implements IListBackupsResponse - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set - */ - function ListBackupsResponse(properties) { - this.backups = []; - 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]]; - } - - /** - * ListBackupsResponse backups. - * @member {Array.} backups - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @instance - */ - ListBackupsResponse.prototype.backups = $util.emptyArray; - - /** - * ListBackupsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @instance - */ - ListBackupsResponse.prototype.nextPageToken = ""; - - /** - * ListBackupsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @instance - */ - ListBackupsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListBackupsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse instance - */ - ListBackupsResponse.create = function create(properties) { - return new ListBackupsResponse(properties); - }; - - /** - * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backups != null && message.backups.length) - for (var i = 0; i < message.backups.length; ++i) - $root.google.cloud.backupdr.v1.Backup.encode(message.backups[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 ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupsResponse.decode = function 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.backupdr.v1.ListBackupsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.backups && message.backups.length)) - message.backups = []; - message.backups.push($root.google.cloud.backupdr.v1.Backup.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 ListBackupsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupsResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backups != null && message.hasOwnProperty("backups")) { - if (!Array.isArray(message.backups)) - return "backups: array expected"; - for (var i = 0; i < message.backups.length; ++i) { - var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backups[i]); - if (error) - return "backups." + 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 ListBackupsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse - */ - ListBackupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupsResponse(); - if (object.backups) { - if (!Array.isArray(object.backups)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: array expected"); - message.backups = []; - for (var i = 0; i < object.backups.length; ++i) { - if (typeof object.backups[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: object expected"); - message.backups[i] = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backups[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.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 ListBackupsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {google.cloud.backupdr.v1.ListBackupsResponse} message ListBackupsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backups = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backups && message.backups.length) { - object.backups = []; - for (var j = 0; j < message.backups.length; ++j) - object.backups[j] = $root.google.cloud.backupdr.v1.Backup.toObject(message.backups[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 ListBackupsResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @instance - * @returns {Object.} JSON object - */ - ListBackupsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupsResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsResponse"; - }; - - return ListBackupsResponse; - })(); - - v1.GetBackupRequest = (function() { - - /** - * Properties of a GetBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetBackupRequest - * @property {string|null} [name] GetBackupRequest name - * @property {google.cloud.backupdr.v1.BackupView|null} [view] GetBackupRequest view - */ - - /** - * Constructs a new GetBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetBackupRequest. - * @implements IGetBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set - */ - function GetBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetBackupRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @instance - */ - GetBackupRequest.prototype.name = ""; - - /** - * GetBackupRequest view. - * @member {google.cloud.backupdr.v1.BackupView} view - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @instance - */ - GetBackupRequest.prototype.view = 0; - - /** - * Creates a new GetBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest instance - */ - GetBackupRequest.create = function create(properties) { - return new GetBackupRequest(properties); - }; - - /** - * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - return writer; - }; - - /** - * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupRequest.decode = function 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.backupdr.v1.GetBackupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBackupRequest.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.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest - */ - GetBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.GetBackupRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "BACKUP_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BACKUP_VIEW_BASIC": - case 1: - message.view = 1; - break; - case "BACKUP_VIEW_FULL": - case 2: - message.view = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {google.cloud.backupdr.v1.GetBackupRequest} message GetBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; - return object; - }; - - /** - * Converts this GetBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @instance - * @returns {Object.} JSON object - */ - GetBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupRequest"; - }; - - return GetBackupRequest; - })(); - - v1.UpdateBackupRequest = (function() { - - /** - * Properties of an UpdateBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IUpdateBackupRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupRequest updateMask - * @property {google.cloud.backupdr.v1.IBackup|null} [backup] UpdateBackupRequest backup - * @property {string|null} [requestId] UpdateBackupRequest requestId - */ - - /** - * Constructs a new UpdateBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an UpdateBackupRequest. - * @implements IUpdateBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set - */ - function UpdateBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateBackupRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @instance - */ - UpdateBackupRequest.prototype.updateMask = null; - - /** - * UpdateBackupRequest backup. - * @member {google.cloud.backupdr.v1.IBackup|null|undefined} backup - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @instance - */ - UpdateBackupRequest.prototype.backup = null; - - /** - * UpdateBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @instance - */ - UpdateBackupRequest.prototype.requestId = ""; - - /** - * Creates a new UpdateBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest instance - */ - UpdateBackupRequest.create = function create(properties) { - return new UpdateBackupRequest(properties); - }; - - /** - * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBackupRequest.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.backup != null && Object.hasOwnProperty.call(message, "backup")) - $root.google.cloud.backupdr.v1.Backup.encode(message.backup, 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 UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBackupRequest.decode = function 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.backupdr.v1.UpdateBackupRequest(); - 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.backup = $root.google.cloud.backupdr.v1.Backup.decode(reader, reader.uint32()); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateBackupRequest.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.backup != null && message.hasOwnProperty("backup")) { - var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backup); - if (error) - return "backup." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates an UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest - */ - UpdateBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.UpdateBackupRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.backup != null) { - if (typeof object.backup !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.backup: object expected"); - message.backup = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backup); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.UpdateBackupRequest} message UpdateBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.backup = null; - object.requestId = ""; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = $root.google.cloud.backupdr.v1.Backup.toObject(message.backup, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this UpdateBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupRequest"; - }; - - return UpdateBackupRequest; - })(); - - v1.DeleteBackupRequest = (function() { - - /** - * Properties of a DeleteBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IDeleteBackupRequest - * @property {string|null} [name] DeleteBackupRequest name - * @property {string|null} [requestId] DeleteBackupRequest requestId - */ - - /** - * Constructs a new DeleteBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DeleteBackupRequest. - * @implements IDeleteBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set - */ - function DeleteBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteBackupRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @instance - */ - DeleteBackupRequest.prototype.name = ""; - - /** - * DeleteBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @instance - */ - DeleteBackupRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest instance - */ - DeleteBackupRequest.create = function create(properties) { - return new DeleteBackupRequest(properties); - }; - - /** - * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupRequest.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 DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupRequest.decode = function 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.backupdr.v1.DeleteBackupRequest(); - 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 DeleteBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteBackupRequest.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 DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest - */ - DeleteBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.DeleteBackupRequest(); - 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 DeleteBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {google.cloud.backupdr.v1.DeleteBackupRequest} message DeleteBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteBackupRequest.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 DeleteBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupRequest"; - }; - - return DeleteBackupRequest; - })(); - - v1.RestoreBackupRequest = (function() { - - /** - * Properties of a RestoreBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IRestoreBackupRequest - * @property {string|null} [name] RestoreBackupRequest name - * @property {string|null} [requestId] RestoreBackupRequest requestId - * @property {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null} [computeInstanceTargetEnvironment] RestoreBackupRequest computeInstanceTargetEnvironment - * @property {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null} [computeInstanceRestoreProperties] RestoreBackupRequest computeInstanceRestoreProperties - */ - - /** - * Constructs a new RestoreBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a RestoreBackupRequest. - * @implements IRestoreBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set - */ - function RestoreBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RestoreBackupRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.name = ""; - - /** - * RestoreBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.requestId = ""; - - /** - * RestoreBackupRequest computeInstanceTargetEnvironment. - * @member {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null|undefined} computeInstanceTargetEnvironment - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.computeInstanceTargetEnvironment = null; - - /** - * RestoreBackupRequest computeInstanceRestoreProperties. - * @member {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null|undefined} computeInstanceRestoreProperties - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.computeInstanceRestoreProperties = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * RestoreBackupRequest targetEnvironment. - * @member {"computeInstanceTargetEnvironment"|undefined} targetEnvironment - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - Object.defineProperty(RestoreBackupRequest.prototype, "targetEnvironment", { - get: $util.oneOfGetter($oneOfFields = ["computeInstanceTargetEnvironment"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * RestoreBackupRequest instanceProperties. - * @member {"computeInstanceRestoreProperties"|undefined} instanceProperties - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - Object.defineProperty(RestoreBackupRequest.prototype, "instanceProperties", { - get: $util.oneOfGetter($oneOfFields = ["computeInstanceRestoreProperties"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new RestoreBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest instance - */ - RestoreBackupRequest.create = function create(properties) { - return new RestoreBackupRequest(properties); - }; - - /** - * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreBackupRequest.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.computeInstanceTargetEnvironment != null && Object.hasOwnProperty.call(message, "computeInstanceTargetEnvironment")) - $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.encode(message.computeInstanceTargetEnvironment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.computeInstanceRestoreProperties != null && Object.hasOwnProperty.call(message, "computeInstanceRestoreProperties")) - $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.encode(message.computeInstanceRestoreProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RestoreBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreBackupRequest.decode = function 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.backupdr.v1.RestoreBackupRequest(); - 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.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.decode(reader, reader.uint32()); - break; - } - case 4: { - message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RestoreBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RestoreBackupRequest.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.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { - properties.targetEnvironment = 1; - { - var error = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify(message.computeInstanceTargetEnvironment); - if (error) - return "computeInstanceTargetEnvironment." + error; - } - } - if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { - properties.instanceProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify(message.computeInstanceRestoreProperties); - if (error) - return "computeInstanceRestoreProperties." + error; - } - } - return null; - }; - - /** - * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest - */ - RestoreBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.RestoreBackupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.computeInstanceTargetEnvironment != null) { - if (typeof object.computeInstanceTargetEnvironment !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceTargetEnvironment: object expected"); - message.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.fromObject(object.computeInstanceTargetEnvironment); - } - if (object.computeInstanceRestoreProperties != null) { - if (typeof object.computeInstanceRestoreProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceRestoreProperties: object expected"); - message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.fromObject(object.computeInstanceRestoreProperties); - } - return message; - }; - - /** - * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {google.cloud.backupdr.v1.RestoreBackupRequest} message RestoreBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RestoreBackupRequest.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; - if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { - object.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.toObject(message.computeInstanceTargetEnvironment, options); - if (options.oneofs) - object.targetEnvironment = "computeInstanceTargetEnvironment"; - } - if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { - object.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.toObject(message.computeInstanceRestoreProperties, options); - if (options.oneofs) - object.instanceProperties = "computeInstanceRestoreProperties"; - } - return object; - }; - - /** - * Converts this RestoreBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - * @returns {Object.} JSON object - */ - RestoreBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RestoreBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RestoreBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupRequest"; - }; - - return RestoreBackupRequest; - })(); - - v1.RestoreBackupResponse = (function() { - - /** - * Properties of a RestoreBackupResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IRestoreBackupResponse - * @property {google.cloud.backupdr.v1.ITargetResource|null} [targetResource] RestoreBackupResponse targetResource - */ - - /** - * Constructs a new RestoreBackupResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a RestoreBackupResponse. - * @implements IRestoreBackupResponse - * @constructor - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set - */ - function RestoreBackupResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RestoreBackupResponse targetResource. - * @member {google.cloud.backupdr.v1.ITargetResource|null|undefined} targetResource - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @instance - */ - RestoreBackupResponse.prototype.targetResource = null; - - /** - * Creates a new RestoreBackupResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse instance - */ - RestoreBackupResponse.create = function create(properties) { - return new RestoreBackupResponse(properties); - }; - - /** - * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreBackupResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.targetResource != null && Object.hasOwnProperty.call(message, "targetResource")) - $root.google.cloud.backupdr.v1.TargetResource.encode(message.targetResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RestoreBackupResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreBackupResponse.decode = function 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.backupdr.v1.RestoreBackupResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreBackupResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RestoreBackupResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RestoreBackupResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.targetResource != null && message.hasOwnProperty("targetResource")) { - var error = $root.google.cloud.backupdr.v1.TargetResource.verify(message.targetResource); - if (error) - return "targetResource." + error; - } - return null; - }; - - /** - * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse - */ - RestoreBackupResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.RestoreBackupResponse(); - if (object.targetResource != null) { - if (typeof object.targetResource !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupResponse.targetResource: object expected"); - message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.fromObject(object.targetResource); - } - return message; - }; - - /** - * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {google.cloud.backupdr.v1.RestoreBackupResponse} message RestoreBackupResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RestoreBackupResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.targetResource = null; - if (message.targetResource != null && message.hasOwnProperty("targetResource")) - object.targetResource = $root.google.cloud.backupdr.v1.TargetResource.toObject(message.targetResource, options); - return object; - }; - - /** - * Converts this RestoreBackupResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @instance - * @returns {Object.} JSON object - */ - RestoreBackupResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RestoreBackupResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RestoreBackupResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupResponse"; - }; - - return RestoreBackupResponse; - })(); - - v1.TargetResource = (function() { - - /** - * Properties of a TargetResource. - * @memberof google.cloud.backupdr.v1 - * @interface ITargetResource - * @property {google.cloud.backupdr.v1.IGcpResource|null} [gcpResource] TargetResource gcpResource - */ - - /** - * Constructs a new TargetResource. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a TargetResource. - * @implements ITargetResource - * @constructor - * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set - */ - function TargetResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TargetResource gcpResource. - * @member {google.cloud.backupdr.v1.IGcpResource|null|undefined} gcpResource - * @memberof google.cloud.backupdr.v1.TargetResource - * @instance - */ - TargetResource.prototype.gcpResource = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TargetResource targetResourceInfo. - * @member {"gcpResource"|undefined} targetResourceInfo - * @memberof google.cloud.backupdr.v1.TargetResource - * @instance - */ - Object.defineProperty(TargetResource.prototype, "targetResourceInfo", { - get: $util.oneOfGetter($oneOfFields = ["gcpResource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TargetResource instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource instance - */ - TargetResource.create = function create(properties) { - return new TargetResource(properties); - }; - - /** - * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TargetResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcpResource != null && Object.hasOwnProperty.call(message, "gcpResource")) - $root.google.cloud.backupdr.v1.GcpResource.encode(message.gcpResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TargetResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TargetResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetResource.decode = function 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.backupdr.v1.TargetResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TargetResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TargetResource message. - * @function verify - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TargetResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { - properties.targetResourceInfo = 1; - { - var error = $root.google.cloud.backupdr.v1.GcpResource.verify(message.gcpResource); - if (error) - return "gcpResource." + error; - } - } - return null; - }; - - /** - * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource - */ - TargetResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.TargetResource) - return object; - var message = new $root.google.cloud.backupdr.v1.TargetResource(); - if (object.gcpResource != null) { - if (typeof object.gcpResource !== "object") - throw TypeError(".google.cloud.backupdr.v1.TargetResource.gcpResource: object expected"); - message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.fromObject(object.gcpResource); - } - return message; - }; - - /** - * Creates a plain object from a TargetResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {google.cloud.backupdr.v1.TargetResource} message TargetResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TargetResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { - object.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.toObject(message.gcpResource, options); - if (options.oneofs) - object.targetResourceInfo = "gcpResource"; - } - return object; - }; - - /** - * Converts this TargetResource to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.TargetResource - * @instance - * @returns {Object.} JSON object - */ - TargetResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TargetResource - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TargetResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.TargetResource"; - }; - - return TargetResource; - })(); - - v1.GcpResource = (function() { - - /** - * Properties of a GcpResource. - * @memberof google.cloud.backupdr.v1 - * @interface IGcpResource - * @property {string|null} [gcpResourcename] GcpResource gcpResourcename - * @property {string|null} [location] GcpResource location - * @property {string|null} [type] GcpResource type - */ - - /** - * Constructs a new GcpResource. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GcpResource. - * @implements IGcpResource - * @constructor - * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set - */ - function GcpResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcpResource gcpResourcename. - * @member {string} gcpResourcename - * @memberof google.cloud.backupdr.v1.GcpResource - * @instance - */ - GcpResource.prototype.gcpResourcename = ""; - - /** - * GcpResource location. - * @member {string} location - * @memberof google.cloud.backupdr.v1.GcpResource - * @instance - */ - GcpResource.prototype.location = ""; - - /** - * GcpResource type. - * @member {string} type - * @memberof google.cloud.backupdr.v1.GcpResource - * @instance - */ - GcpResource.prototype.type = ""; - - /** - * Creates a new GcpResource instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource instance - */ - GcpResource.create = function create(properties) { - return new GcpResource(properties); - }; - - /** - * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcpResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - return writer; - }; - - /** - * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcpResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcpResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcpResource.decode = function 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.backupdr.v1.GcpResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.gcpResourcename = reader.string(); - break; - } - case 2: { - message.location = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcpResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcpResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcpResource message. - * @function verify - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcpResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - if (!$util.isString(message.gcpResourcename)) - return "gcpResourcename: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - return null; - }; - - /** - * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource - */ - GcpResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GcpResource) - return object; - var message = new $root.google.cloud.backupdr.v1.GcpResource(); - if (object.gcpResourcename != null) - message.gcpResourcename = String(object.gcpResourcename); - if (object.location != null) - message.location = String(object.location); - if (object.type != null) - message.type = String(object.type); - return message; - }; - - /** - * Creates a plain object from a GcpResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {google.cloud.backupdr.v1.GcpResource} message GcpResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcpResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.gcpResourcename = ""; - object.location = ""; - object.type = ""; - } - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - object.gcpResourcename = message.gcpResourcename; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - return object; - }; - - /** - * Converts this GcpResource to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GcpResource - * @instance - * @returns {Object.} JSON object - */ - GcpResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcpResource - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpResource"; - }; - - return GcpResource; - })(); - - /** - * BackupConfigState enum. - * @name google.cloud.backupdr.v1.BackupConfigState - * @enum {number} - * @property {number} BACKUP_CONFIG_STATE_UNSPECIFIED=0 BACKUP_CONFIG_STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} PASSIVE=2 PASSIVE value - */ - v1.BackupConfigState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_CONFIG_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "PASSIVE"] = 2; - return values; - })(); - - /** - * BackupView enum. - * @name google.cloud.backupdr.v1.BackupView - * @enum {number} - * @property {number} BACKUP_VIEW_UNSPECIFIED=0 BACKUP_VIEW_UNSPECIFIED value - * @property {number} BACKUP_VIEW_BASIC=1 BACKUP_VIEW_BASIC value - * @property {number} BACKUP_VIEW_FULL=2 BACKUP_VIEW_FULL value - */ - v1.BackupView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BACKUP_VIEW_BASIC"] = 1; - values[valuesById[2] = "BACKUP_VIEW_FULL"] = 2; - return values; - })(); - - /** - * BackupVaultView enum. - * @name google.cloud.backupdr.v1.BackupVaultView - * @enum {number} - * @property {number} BACKUP_VAULT_VIEW_UNSPECIFIED=0 BACKUP_VAULT_VIEW_UNSPECIFIED value - * @property {number} BACKUP_VAULT_VIEW_BASIC=1 BACKUP_VAULT_VIEW_BASIC value - * @property {number} BACKUP_VAULT_VIEW_FULL=2 BACKUP_VAULT_VIEW_FULL value - */ - v1.BackupVaultView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_VAULT_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BACKUP_VAULT_VIEW_BASIC"] = 1; - values[valuesById[2] = "BACKUP_VAULT_VIEW_FULL"] = 2; - return values; - })(); - - v1.BackupApplianceBackupProperties = (function() { - - /** - * Properties of a BackupApplianceBackupProperties. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupApplianceBackupProperties - * @property {number|null} [generationId] BackupApplianceBackupProperties generationId - * @property {google.protobuf.ITimestamp|null} [finalizeTime] BackupApplianceBackupProperties finalizeTime - * @property {google.protobuf.ITimestamp|null} [recoveryRangeStartTime] BackupApplianceBackupProperties recoveryRangeStartTime - * @property {google.protobuf.ITimestamp|null} [recoveryRangeEndTime] BackupApplianceBackupProperties recoveryRangeEndTime - */ - - /** - * Constructs a new BackupApplianceBackupProperties. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupApplianceBackupProperties. - * @implements IBackupApplianceBackupProperties - * @constructor - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties=} [properties] Properties to set - */ - function BackupApplianceBackupProperties(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupApplianceBackupProperties generationId. - * @member {number|null|undefined} generationId - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - BackupApplianceBackupProperties.prototype.generationId = null; - - /** - * BackupApplianceBackupProperties finalizeTime. - * @member {google.protobuf.ITimestamp|null|undefined} finalizeTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - BackupApplianceBackupProperties.prototype.finalizeTime = null; - - /** - * BackupApplianceBackupProperties recoveryRangeStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeStartTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - BackupApplianceBackupProperties.prototype.recoveryRangeStartTime = null; - - /** - * BackupApplianceBackupProperties recoveryRangeEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeEndTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - BackupApplianceBackupProperties.prototype.recoveryRangeEndTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupApplianceBackupProperties _generationId. - * @member {"generationId"|undefined} _generationId - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - Object.defineProperty(BackupApplianceBackupProperties.prototype, "_generationId", { - get: $util.oneOfGetter($oneOfFields = ["generationId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupApplianceBackupProperties _finalizeTime. - * @member {"finalizeTime"|undefined} _finalizeTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - Object.defineProperty(BackupApplianceBackupProperties.prototype, "_finalizeTime", { - get: $util.oneOfGetter($oneOfFields = ["finalizeTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupApplianceBackupProperties _recoveryRangeStartTime. - * @member {"recoveryRangeStartTime"|undefined} _recoveryRangeStartTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - Object.defineProperty(BackupApplianceBackupProperties.prototype, "_recoveryRangeStartTime", { - get: $util.oneOfGetter($oneOfFields = ["recoveryRangeStartTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupApplianceBackupProperties _recoveryRangeEndTime. - * @member {"recoveryRangeEndTime"|undefined} _recoveryRangeEndTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - Object.defineProperty(BackupApplianceBackupProperties.prototype, "_recoveryRangeEndTime", { - get: $util.oneOfGetter($oneOfFields = ["recoveryRangeEndTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupApplianceBackupProperties instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties instance - */ - BackupApplianceBackupProperties.create = function create(properties) { - return new BackupApplianceBackupProperties(properties); - }; - - /** - * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties} message BackupApplianceBackupProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupApplianceBackupProperties.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.generationId != null && Object.hasOwnProperty.call(message, "generationId")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.generationId); - if (message.finalizeTime != null && Object.hasOwnProperty.call(message, "finalizeTime")) - $root.google.protobuf.Timestamp.encode(message.finalizeTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.recoveryRangeStartTime != null && Object.hasOwnProperty.call(message, "recoveryRangeStartTime")) - $root.google.protobuf.Timestamp.encode(message.recoveryRangeStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.recoveryRangeEndTime != null && Object.hasOwnProperty.call(message, "recoveryRangeEndTime")) - $root.google.protobuf.Timestamp.encode(message.recoveryRangeEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties} message BackupApplianceBackupProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupApplianceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupApplianceBackupProperties.decode = function 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.backupdr.v1.BackupApplianceBackupProperties(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.generationId = reader.int32(); - break; - } - case 2: { - message.finalizeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupApplianceBackupProperties.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupApplianceBackupProperties message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupApplianceBackupProperties.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.generationId != null && message.hasOwnProperty("generationId")) { - properties._generationId = 1; - if (!$util.isInteger(message.generationId)) - return "generationId: integer expected"; - } - if (message.finalizeTime != null && message.hasOwnProperty("finalizeTime")) { - properties._finalizeTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.finalizeTime); - if (error) - return "finalizeTime." + error; - } - } - if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { - properties._recoveryRangeStartTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeStartTime); - if (error) - return "recoveryRangeStartTime." + error; - } - } - if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { - properties._recoveryRangeEndTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeEndTime); - if (error) - return "recoveryRangeEndTime." + error; - } - } - return null; - }; - - /** - * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties - */ - BackupApplianceBackupProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties(); - if (object.generationId != null) - message.generationId = object.generationId | 0; - if (object.finalizeTime != null) { - if (typeof object.finalizeTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.finalizeTime: object expected"); - message.finalizeTime = $root.google.protobuf.Timestamp.fromObject(object.finalizeTime); - } - if (object.recoveryRangeStartTime != null) { - if (typeof object.recoveryRangeStartTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeStartTime: object expected"); - message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeStartTime); - } - if (object.recoveryRangeEndTime != null) { - if (typeof object.recoveryRangeEndTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeEndTime: object expected"); - message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeEndTime); - } - return message; - }; - - /** - * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.BackupApplianceBackupProperties} message BackupApplianceBackupProperties - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupApplianceBackupProperties.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.generationId != null && message.hasOwnProperty("generationId")) { - object.generationId = message.generationId; - if (options.oneofs) - object._generationId = "generationId"; - } - if (message.finalizeTime != null && message.hasOwnProperty("finalizeTime")) { - object.finalizeTime = $root.google.protobuf.Timestamp.toObject(message.finalizeTime, options); - if (options.oneofs) - object._finalizeTime = "finalizeTime"; - } - if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { - object.recoveryRangeStartTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeStartTime, options); - if (options.oneofs) - object._recoveryRangeStartTime = "recoveryRangeStartTime"; - } - if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { - object.recoveryRangeEndTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeEndTime, options); - if (options.oneofs) - object._recoveryRangeEndTime = "recoveryRangeEndTime"; - } - return object; - }; - - /** - * Converts this BackupApplianceBackupProperties to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - * @returns {Object.} JSON object - */ - BackupApplianceBackupProperties.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupApplianceBackupProperties - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupApplianceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceBackupProperties"; - }; - - return BackupApplianceBackupProperties; - })(); - - v1.ComputeInstanceBackupProperties = (function() { - - /** - * Properties of a ComputeInstanceBackupProperties. - * @memberof google.cloud.backupdr.v1 - * @interface IComputeInstanceBackupProperties - * @property {string|null} [description] ComputeInstanceBackupProperties description - * @property {google.cloud.backupdr.v1.ITags|null} [tags] ComputeInstanceBackupProperties tags - * @property {string|null} [machineType] ComputeInstanceBackupProperties machineType - * @property {boolean|null} [canIpForward] ComputeInstanceBackupProperties canIpForward - * @property {Array.|null} [networkInterface] ComputeInstanceBackupProperties networkInterface - * @property {Array.|null} [disk] ComputeInstanceBackupProperties disk - * @property {google.cloud.backupdr.v1.IMetadata|null} [metadata] ComputeInstanceBackupProperties metadata - * @property {Array.|null} [serviceAccount] ComputeInstanceBackupProperties serviceAccount - * @property {google.cloud.backupdr.v1.IScheduling|null} [scheduling] ComputeInstanceBackupProperties scheduling - * @property {Array.|null} [guestAccelerator] ComputeInstanceBackupProperties guestAccelerator - * @property {string|null} [minCpuPlatform] ComputeInstanceBackupProperties minCpuPlatform - * @property {google.cloud.backupdr.v1.KeyRevocationActionType|null} [keyRevocationActionType] ComputeInstanceBackupProperties keyRevocationActionType - * @property {string|null} [sourceInstance] ComputeInstanceBackupProperties sourceInstance - * @property {Object.|null} [labels] ComputeInstanceBackupProperties labels - */ - - /** - * Constructs a new ComputeInstanceBackupProperties. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ComputeInstanceBackupProperties. - * @implements IComputeInstanceBackupProperties - * @constructor - * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties=} [properties] Properties to set - */ - function ComputeInstanceBackupProperties(properties) { - this.networkInterface = []; - this.disk = []; - this.serviceAccount = []; - this.guestAccelerator = []; - 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]]; - } - - /** - * ComputeInstanceBackupProperties description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.description = null; - - /** - * ComputeInstanceBackupProperties tags. - * @member {google.cloud.backupdr.v1.ITags|null|undefined} tags - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.tags = null; - - /** - * ComputeInstanceBackupProperties machineType. - * @member {string|null|undefined} machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.machineType = null; - - /** - * ComputeInstanceBackupProperties canIpForward. - * @member {boolean|null|undefined} canIpForward - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.canIpForward = null; - - /** - * ComputeInstanceBackupProperties networkInterface. - * @member {Array.} networkInterface - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.networkInterface = $util.emptyArray; - - /** - * ComputeInstanceBackupProperties disk. - * @member {Array.} disk - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.disk = $util.emptyArray; - - /** - * ComputeInstanceBackupProperties metadata. - * @member {google.cloud.backupdr.v1.IMetadata|null|undefined} metadata - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.metadata = null; - - /** - * ComputeInstanceBackupProperties serviceAccount. - * @member {Array.} serviceAccount - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.serviceAccount = $util.emptyArray; - - /** - * ComputeInstanceBackupProperties scheduling. - * @member {google.cloud.backupdr.v1.IScheduling|null|undefined} scheduling - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.scheduling = null; - - /** - * ComputeInstanceBackupProperties guestAccelerator. - * @member {Array.} guestAccelerator - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.guestAccelerator = $util.emptyArray; - - /** - * ComputeInstanceBackupProperties minCpuPlatform. - * @member {string|null|undefined} minCpuPlatform - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.minCpuPlatform = null; - - /** - * ComputeInstanceBackupProperties keyRevocationActionType. - * @member {google.cloud.backupdr.v1.KeyRevocationActionType|null|undefined} keyRevocationActionType - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.keyRevocationActionType = null; - - /** - * ComputeInstanceBackupProperties sourceInstance. - * @member {string|null|undefined} sourceInstance - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.sourceInstance = null; - - /** - * ComputeInstanceBackupProperties labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.labels = $util.emptyObject; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ComputeInstanceBackupProperties _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _tags. - * @member {"tags"|undefined} _tags - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_tags", { - get: $util.oneOfGetter($oneOfFields = ["tags"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _machineType. - * @member {"machineType"|undefined} _machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_machineType", { - get: $util.oneOfGetter($oneOfFields = ["machineType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _canIpForward. - * @member {"canIpForward"|undefined} _canIpForward - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_canIpForward", { - get: $util.oneOfGetter($oneOfFields = ["canIpForward"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _metadata. - * @member {"metadata"|undefined} _metadata - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_metadata", { - get: $util.oneOfGetter($oneOfFields = ["metadata"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _scheduling. - * @member {"scheduling"|undefined} _scheduling - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_scheduling", { - get: $util.oneOfGetter($oneOfFields = ["scheduling"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _minCpuPlatform. - * @member {"minCpuPlatform"|undefined} _minCpuPlatform - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_minCpuPlatform", { - get: $util.oneOfGetter($oneOfFields = ["minCpuPlatform"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _keyRevocationActionType. - * @member {"keyRevocationActionType"|undefined} _keyRevocationActionType - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_keyRevocationActionType", { - get: $util.oneOfGetter($oneOfFields = ["keyRevocationActionType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _sourceInstance. - * @member {"sourceInstance"|undefined} _sourceInstance - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_sourceInstance", { - get: $util.oneOfGetter($oneOfFields = ["sourceInstance"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ComputeInstanceBackupProperties instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties instance - */ - ComputeInstanceBackupProperties.create = function create(properties) { - return new ComputeInstanceBackupProperties(properties); - }; - - /** - * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties} message ComputeInstanceBackupProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceBackupProperties.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.tags != null && Object.hasOwnProperty.call(message, "tags")) - $root.google.cloud.backupdr.v1.Tags.encode(message.tags, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.machineType); - if (message.canIpForward != null && Object.hasOwnProperty.call(message, "canIpForward")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.canIpForward); - if (message.networkInterface != null && message.networkInterface.length) - for (var i = 0; i < message.networkInterface.length; ++i) - $root.google.cloud.backupdr.v1.NetworkInterface.encode(message.networkInterface[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.disk != null && message.disk.length) - for (var i = 0; i < message.disk.length; ++i) - $root.google.cloud.backupdr.v1.AttachedDisk.encode(message.disk[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.backupdr.v1.Metadata.encode(message.metadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.serviceAccount != null && message.serviceAccount.length) - for (var i = 0; i < message.serviceAccount.length; ++i) - $root.google.cloud.backupdr.v1.ServiceAccount.encode(message.serviceAccount[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) - $root.google.cloud.backupdr.v1.Scheduling.encode(message.scheduling, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.guestAccelerator != null && message.guestAccelerator.length) - for (var i = 0; i < message.guestAccelerator.length; ++i) - $root.google.cloud.backupdr.v1.AcceleratorConfig.encode(message.guestAccelerator[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.minCpuPlatform); - if (message.keyRevocationActionType != null && Object.hasOwnProperty.call(message, "keyRevocationActionType")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.keyRevocationActionType); - if (message.sourceInstance != null && Object.hasOwnProperty.call(message, "sourceInstance")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.sourceInstance); - 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 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties} message ComputeInstanceBackupProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceBackupProperties.decode = function 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.backupdr.v1.ComputeInstanceBackupProperties(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.description = reader.string(); - break; - } - case 2: { - message.tags = $root.google.cloud.backupdr.v1.Tags.decode(reader, reader.uint32()); - break; - } - case 3: { - message.machineType = reader.string(); - break; - } - case 4: { - message.canIpForward = reader.bool(); - break; - } - case 5: { - if (!(message.networkInterface && message.networkInterface.length)) - message.networkInterface = []; - message.networkInterface.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.disk && message.disk.length)) - message.disk = []; - message.disk.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader, reader.uint32())); - break; - } - case 7: { - message.metadata = $root.google.cloud.backupdr.v1.Metadata.decode(reader, reader.uint32()); - break; - } - case 8: { - if (!(message.serviceAccount && message.serviceAccount.length)) - message.serviceAccount = []; - message.serviceAccount.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader, reader.uint32())); - break; - } - case 9: { - message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.decode(reader, reader.uint32()); - break; - } - case 10: { - if (!(message.guestAccelerator && message.guestAccelerator.length)) - message.guestAccelerator = []; - message.guestAccelerator.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader, reader.uint32())); - break; - } - case 11: { - message.minCpuPlatform = reader.string(); - break; - } - case 12: { - message.keyRevocationActionType = reader.int32(); - break; - } - case 13: { - message.sourceInstance = reader.string(); - break; - } - case 14: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceBackupProperties.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComputeInstanceBackupProperties message. - * @function verify - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComputeInstanceBackupProperties.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.tags != null && message.hasOwnProperty("tags")) { - properties._tags = 1; - { - var error = $root.google.cloud.backupdr.v1.Tags.verify(message.tags); - if (error) - return "tags." + error; - } - } - if (message.machineType != null && message.hasOwnProperty("machineType")) { - properties._machineType = 1; - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - } - if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { - properties._canIpForward = 1; - if (typeof message.canIpForward !== "boolean") - return "canIpForward: boolean expected"; - } - if (message.networkInterface != null && message.hasOwnProperty("networkInterface")) { - if (!Array.isArray(message.networkInterface)) - return "networkInterface: array expected"; - for (var i = 0; i < message.networkInterface.length; ++i) { - var error = $root.google.cloud.backupdr.v1.NetworkInterface.verify(message.networkInterface[i]); - if (error) - return "networkInterface." + error; - } - } - if (message.disk != null && message.hasOwnProperty("disk")) { - if (!Array.isArray(message.disk)) - return "disk: array expected"; - for (var i = 0; i < message.disk.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AttachedDisk.verify(message.disk[i]); - if (error) - return "disk." + error; - } - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - properties._metadata = 1; - { - var error = $root.google.cloud.backupdr.v1.Metadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) { - if (!Array.isArray(message.serviceAccount)) - return "serviceAccount: array expected"; - for (var i = 0; i < message.serviceAccount.length; ++i) { - var error = $root.google.cloud.backupdr.v1.ServiceAccount.verify(message.serviceAccount[i]); - if (error) - return "serviceAccount." + error; - } - } - if (message.scheduling != null && message.hasOwnProperty("scheduling")) { - properties._scheduling = 1; - { - var error = $root.google.cloud.backupdr.v1.Scheduling.verify(message.scheduling); - if (error) - return "scheduling." + error; - } - } - if (message.guestAccelerator != null && message.hasOwnProperty("guestAccelerator")) { - if (!Array.isArray(message.guestAccelerator)) - return "guestAccelerator: array expected"; - for (var i = 0; i < message.guestAccelerator.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AcceleratorConfig.verify(message.guestAccelerator[i]); - if (error) - return "guestAccelerator." + error; - } - } - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { - properties._minCpuPlatform = 1; - if (!$util.isString(message.minCpuPlatform)) - return "minCpuPlatform: string expected"; - } - if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { - properties._keyRevocationActionType = 1; - switch (message.keyRevocationActionType) { - default: - return "keyRevocationActionType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) { - properties._sourceInstance = 1; - if (!$util.isString(message.sourceInstance)) - return "sourceInstance: string expected"; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties - */ - ComputeInstanceBackupProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties) - return object; - var message = new $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties(); - if (object.description != null) - message.description = String(object.description); - if (object.tags != null) { - if (typeof object.tags !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.tags: object expected"); - message.tags = $root.google.cloud.backupdr.v1.Tags.fromObject(object.tags); - } - if (object.machineType != null) - message.machineType = String(object.machineType); - if (object.canIpForward != null) - message.canIpForward = Boolean(object.canIpForward); - if (object.networkInterface) { - if (!Array.isArray(object.networkInterface)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: array expected"); - message.networkInterface = []; - for (var i = 0; i < object.networkInterface.length; ++i) { - if (typeof object.networkInterface[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: object expected"); - message.networkInterface[i] = $root.google.cloud.backupdr.v1.NetworkInterface.fromObject(object.networkInterface[i]); - } - } - if (object.disk) { - if (!Array.isArray(object.disk)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.disk: array expected"); - message.disk = []; - for (var i = 0; i < object.disk.length; ++i) { - if (typeof object.disk[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.disk: object expected"); - message.disk[i] = $root.google.cloud.backupdr.v1.AttachedDisk.fromObject(object.disk[i]); - } - } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.metadata: object expected"); - message.metadata = $root.google.cloud.backupdr.v1.Metadata.fromObject(object.metadata); - } - if (object.serviceAccount) { - if (!Array.isArray(object.serviceAccount)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.serviceAccount: array expected"); - message.serviceAccount = []; - for (var i = 0; i < object.serviceAccount.length; ++i) { - if (typeof object.serviceAccount[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.serviceAccount: object expected"); - message.serviceAccount[i] = $root.google.cloud.backupdr.v1.ServiceAccount.fromObject(object.serviceAccount[i]); - } - } - if (object.scheduling != null) { - if (typeof object.scheduling !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.scheduling: object expected"); - message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.fromObject(object.scheduling); - } - if (object.guestAccelerator) { - if (!Array.isArray(object.guestAccelerator)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.guestAccelerator: array expected"); - message.guestAccelerator = []; - for (var i = 0; i < object.guestAccelerator.length; ++i) { - if (typeof object.guestAccelerator[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.guestAccelerator: object expected"); - message.guestAccelerator[i] = $root.google.cloud.backupdr.v1.AcceleratorConfig.fromObject(object.guestAccelerator[i]); - } - } - if (object.minCpuPlatform != null) - message.minCpuPlatform = String(object.minCpuPlatform); - switch (object.keyRevocationActionType) { - default: - if (typeof object.keyRevocationActionType === "number") { - message.keyRevocationActionType = object.keyRevocationActionType; - break; - } - break; - case "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": - case 0: - message.keyRevocationActionType = 0; - break; - case "NONE": - case 1: - message.keyRevocationActionType = 1; - break; - case "STOP": - case 2: - message.keyRevocationActionType = 2; - break; - } - if (object.sourceInstance != null) - message.sourceInstance = String(object.sourceInstance); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} message ComputeInstanceBackupProperties - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComputeInstanceBackupProperties.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.networkInterface = []; - object.disk = []; - object.serviceAccount = []; - object.guestAccelerator = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.tags != null && message.hasOwnProperty("tags")) { - object.tags = $root.google.cloud.backupdr.v1.Tags.toObject(message.tags, options); - if (options.oneofs) - object._tags = "tags"; - } - if (message.machineType != null && message.hasOwnProperty("machineType")) { - object.machineType = message.machineType; - if (options.oneofs) - object._machineType = "machineType"; - } - if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { - object.canIpForward = message.canIpForward; - if (options.oneofs) - object._canIpForward = "canIpForward"; - } - if (message.networkInterface && message.networkInterface.length) { - object.networkInterface = []; - for (var j = 0; j < message.networkInterface.length; ++j) - object.networkInterface[j] = $root.google.cloud.backupdr.v1.NetworkInterface.toObject(message.networkInterface[j], options); - } - if (message.disk && message.disk.length) { - object.disk = []; - for (var j = 0; j < message.disk.length; ++j) - object.disk[j] = $root.google.cloud.backupdr.v1.AttachedDisk.toObject(message.disk[j], options); - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - object.metadata = $root.google.cloud.backupdr.v1.Metadata.toObject(message.metadata, options); - if (options.oneofs) - object._metadata = "metadata"; - } - if (message.serviceAccount && message.serviceAccount.length) { - object.serviceAccount = []; - for (var j = 0; j < message.serviceAccount.length; ++j) - object.serviceAccount[j] = $root.google.cloud.backupdr.v1.ServiceAccount.toObject(message.serviceAccount[j], options); - } - if (message.scheduling != null && message.hasOwnProperty("scheduling")) { - object.scheduling = $root.google.cloud.backupdr.v1.Scheduling.toObject(message.scheduling, options); - if (options.oneofs) - object._scheduling = "scheduling"; - } - if (message.guestAccelerator && message.guestAccelerator.length) { - object.guestAccelerator = []; - for (var j = 0; j < message.guestAccelerator.length; ++j) - object.guestAccelerator[j] = $root.google.cloud.backupdr.v1.AcceleratorConfig.toObject(message.guestAccelerator[j], options); - } - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { - object.minCpuPlatform = message.minCpuPlatform; - if (options.oneofs) - object._minCpuPlatform = "minCpuPlatform"; - } - if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { - object.keyRevocationActionType = options.enums === String ? $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] === undefined ? message.keyRevocationActionType : $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] : message.keyRevocationActionType; - if (options.oneofs) - object._keyRevocationActionType = "keyRevocationActionType"; - } - if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) { - object.sourceInstance = message.sourceInstance; - if (options.oneofs) - object._sourceInstance = "sourceInstance"; - } - 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]]; - } - return object; - }; - - /** - * Converts this ComputeInstanceBackupProperties to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - * @returns {Object.} JSON object - */ - ComputeInstanceBackupProperties.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComputeInstanceBackupProperties - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComputeInstanceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceBackupProperties"; - }; - - return ComputeInstanceBackupProperties; - })(); - - v1.ComputeInstanceRestoreProperties = (function() { - - /** - * Properties of a ComputeInstanceRestoreProperties. - * @memberof google.cloud.backupdr.v1 - * @interface IComputeInstanceRestoreProperties - * @property {string|null} [name] ComputeInstanceRestoreProperties name - * @property {google.cloud.backupdr.v1.IAdvancedMachineFeatures|null} [advancedMachineFeatures] ComputeInstanceRestoreProperties advancedMachineFeatures - * @property {boolean|null} [canIpForward] ComputeInstanceRestoreProperties canIpForward - * @property {google.cloud.backupdr.v1.IConfidentialInstanceConfig|null} [confidentialInstanceConfig] ComputeInstanceRestoreProperties confidentialInstanceConfig - * @property {boolean|null} [deletionProtection] ComputeInstanceRestoreProperties deletionProtection - * @property {string|null} [description] ComputeInstanceRestoreProperties description - * @property {Array.|null} [disks] ComputeInstanceRestoreProperties disks - * @property {google.cloud.backupdr.v1.IDisplayDevice|null} [displayDevice] ComputeInstanceRestoreProperties displayDevice - * @property {Array.|null} [guestAccelerators] ComputeInstanceRestoreProperties guestAccelerators - * @property {string|null} [hostname] ComputeInstanceRestoreProperties hostname - * @property {google.cloud.backupdr.v1.ICustomerEncryptionKey|null} [instanceEncryptionKey] ComputeInstanceRestoreProperties instanceEncryptionKey - * @property {google.cloud.backupdr.v1.KeyRevocationActionType|null} [keyRevocationActionType] ComputeInstanceRestoreProperties keyRevocationActionType - * @property {Object.|null} [labels] ComputeInstanceRestoreProperties labels - * @property {string|null} [machineType] ComputeInstanceRestoreProperties machineType - * @property {google.cloud.backupdr.v1.IMetadata|null} [metadata] ComputeInstanceRestoreProperties metadata - * @property {string|null} [minCpuPlatform] ComputeInstanceRestoreProperties minCpuPlatform - * @property {Array.|null} [networkInterfaces] ComputeInstanceRestoreProperties networkInterfaces - * @property {google.cloud.backupdr.v1.INetworkPerformanceConfig|null} [networkPerformanceConfig] ComputeInstanceRestoreProperties networkPerformanceConfig - * @property {google.cloud.backupdr.v1.IInstanceParams|null} [params] ComputeInstanceRestoreProperties params - * @property {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null} [privateIpv6GoogleAccess] ComputeInstanceRestoreProperties privateIpv6GoogleAccess - * @property {google.cloud.backupdr.v1.IAllocationAffinity|null} [allocationAffinity] ComputeInstanceRestoreProperties allocationAffinity - * @property {Array.|null} [resourcePolicies] ComputeInstanceRestoreProperties resourcePolicies - * @property {google.cloud.backupdr.v1.IScheduling|null} [scheduling] ComputeInstanceRestoreProperties scheduling - * @property {Array.|null} [serviceAccounts] ComputeInstanceRestoreProperties serviceAccounts - * @property {google.cloud.backupdr.v1.ITags|null} [tags] ComputeInstanceRestoreProperties tags - */ - - /** - * Constructs a new ComputeInstanceRestoreProperties. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ComputeInstanceRestoreProperties. - * @implements IComputeInstanceRestoreProperties - * @constructor - * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties=} [properties] Properties to set - */ - function ComputeInstanceRestoreProperties(properties) { - this.disks = []; - this.guestAccelerators = []; - this.labels = {}; - this.networkInterfaces = []; - this.resourcePolicies = []; - this.serviceAccounts = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComputeInstanceRestoreProperties name. - * @member {string|null|undefined} name - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.name = null; - - /** - * ComputeInstanceRestoreProperties advancedMachineFeatures. - * @member {google.cloud.backupdr.v1.IAdvancedMachineFeatures|null|undefined} advancedMachineFeatures - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.advancedMachineFeatures = null; - - /** - * ComputeInstanceRestoreProperties canIpForward. - * @member {boolean|null|undefined} canIpForward - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.canIpForward = null; - - /** - * ComputeInstanceRestoreProperties confidentialInstanceConfig. - * @member {google.cloud.backupdr.v1.IConfidentialInstanceConfig|null|undefined} confidentialInstanceConfig - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.confidentialInstanceConfig = null; - - /** - * ComputeInstanceRestoreProperties deletionProtection. - * @member {boolean|null|undefined} deletionProtection - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.deletionProtection = null; - - /** - * ComputeInstanceRestoreProperties description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.description = null; - - /** - * ComputeInstanceRestoreProperties disks. - * @member {Array.} disks - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.disks = $util.emptyArray; - - /** - * ComputeInstanceRestoreProperties displayDevice. - * @member {google.cloud.backupdr.v1.IDisplayDevice|null|undefined} displayDevice - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.displayDevice = null; - - /** - * ComputeInstanceRestoreProperties guestAccelerators. - * @member {Array.} guestAccelerators - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.guestAccelerators = $util.emptyArray; - - /** - * ComputeInstanceRestoreProperties hostname. - * @member {string|null|undefined} hostname - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.hostname = null; - - /** - * ComputeInstanceRestoreProperties instanceEncryptionKey. - * @member {google.cloud.backupdr.v1.ICustomerEncryptionKey|null|undefined} instanceEncryptionKey - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.instanceEncryptionKey = null; - - /** - * ComputeInstanceRestoreProperties keyRevocationActionType. - * @member {google.cloud.backupdr.v1.KeyRevocationActionType|null|undefined} keyRevocationActionType - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.keyRevocationActionType = null; - - /** - * ComputeInstanceRestoreProperties labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.labels = $util.emptyObject; - - /** - * ComputeInstanceRestoreProperties machineType. - * @member {string|null|undefined} machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.machineType = null; - - /** - * ComputeInstanceRestoreProperties metadata. - * @member {google.cloud.backupdr.v1.IMetadata|null|undefined} metadata - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.metadata = null; - - /** - * ComputeInstanceRestoreProperties minCpuPlatform. - * @member {string|null|undefined} minCpuPlatform - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.minCpuPlatform = null; - - /** - * ComputeInstanceRestoreProperties networkInterfaces. - * @member {Array.} networkInterfaces - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.networkInterfaces = $util.emptyArray; - - /** - * ComputeInstanceRestoreProperties networkPerformanceConfig. - * @member {google.cloud.backupdr.v1.INetworkPerformanceConfig|null|undefined} networkPerformanceConfig - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.networkPerformanceConfig = null; - - /** - * ComputeInstanceRestoreProperties params. - * @member {google.cloud.backupdr.v1.IInstanceParams|null|undefined} params - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.params = null; - - /** - * ComputeInstanceRestoreProperties privateIpv6GoogleAccess. - * @member {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null|undefined} privateIpv6GoogleAccess - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.privateIpv6GoogleAccess = null; - - /** - * ComputeInstanceRestoreProperties allocationAffinity. - * @member {google.cloud.backupdr.v1.IAllocationAffinity|null|undefined} allocationAffinity - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.allocationAffinity = null; - - /** - * ComputeInstanceRestoreProperties resourcePolicies. - * @member {Array.} resourcePolicies - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.resourcePolicies = $util.emptyArray; - - /** - * ComputeInstanceRestoreProperties scheduling. - * @member {google.cloud.backupdr.v1.IScheduling|null|undefined} scheduling - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.scheduling = null; - - /** - * ComputeInstanceRestoreProperties serviceAccounts. - * @member {Array.} serviceAccounts - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.serviceAccounts = $util.emptyArray; - - /** - * ComputeInstanceRestoreProperties tags. - * @member {google.cloud.backupdr.v1.ITags|null|undefined} tags - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.tags = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ComputeInstanceRestoreProperties _name. - * @member {"name"|undefined} _name - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _advancedMachineFeatures. - * @member {"advancedMachineFeatures"|undefined} _advancedMachineFeatures - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_advancedMachineFeatures", { - get: $util.oneOfGetter($oneOfFields = ["advancedMachineFeatures"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _canIpForward. - * @member {"canIpForward"|undefined} _canIpForward - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_canIpForward", { - get: $util.oneOfGetter($oneOfFields = ["canIpForward"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _confidentialInstanceConfig. - * @member {"confidentialInstanceConfig"|undefined} _confidentialInstanceConfig - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_confidentialInstanceConfig", { - get: $util.oneOfGetter($oneOfFields = ["confidentialInstanceConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _deletionProtection. - * @member {"deletionProtection"|undefined} _deletionProtection - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_deletionProtection", { - get: $util.oneOfGetter($oneOfFields = ["deletionProtection"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _displayDevice. - * @member {"displayDevice"|undefined} _displayDevice - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_displayDevice", { - get: $util.oneOfGetter($oneOfFields = ["displayDevice"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _hostname. - * @member {"hostname"|undefined} _hostname - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_hostname", { - get: $util.oneOfGetter($oneOfFields = ["hostname"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _instanceEncryptionKey. - * @member {"instanceEncryptionKey"|undefined} _instanceEncryptionKey - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_instanceEncryptionKey", { - get: $util.oneOfGetter($oneOfFields = ["instanceEncryptionKey"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _keyRevocationActionType. - * @member {"keyRevocationActionType"|undefined} _keyRevocationActionType - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_keyRevocationActionType", { - get: $util.oneOfGetter($oneOfFields = ["keyRevocationActionType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _machineType. - * @member {"machineType"|undefined} _machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_machineType", { - get: $util.oneOfGetter($oneOfFields = ["machineType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _metadata. - * @member {"metadata"|undefined} _metadata - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_metadata", { - get: $util.oneOfGetter($oneOfFields = ["metadata"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _minCpuPlatform. - * @member {"minCpuPlatform"|undefined} _minCpuPlatform - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_minCpuPlatform", { - get: $util.oneOfGetter($oneOfFields = ["minCpuPlatform"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _networkPerformanceConfig. - * @member {"networkPerformanceConfig"|undefined} _networkPerformanceConfig - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_networkPerformanceConfig", { - get: $util.oneOfGetter($oneOfFields = ["networkPerformanceConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _params. - * @member {"params"|undefined} _params - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_params", { - get: $util.oneOfGetter($oneOfFields = ["params"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _privateIpv6GoogleAccess. - * @member {"privateIpv6GoogleAccess"|undefined} _privateIpv6GoogleAccess - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_privateIpv6GoogleAccess", { - get: $util.oneOfGetter($oneOfFields = ["privateIpv6GoogleAccess"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _allocationAffinity. - * @member {"allocationAffinity"|undefined} _allocationAffinity - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_allocationAffinity", { - get: $util.oneOfGetter($oneOfFields = ["allocationAffinity"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _scheduling. - * @member {"scheduling"|undefined} _scheduling - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_scheduling", { - get: $util.oneOfGetter($oneOfFields = ["scheduling"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _tags. - * @member {"tags"|undefined} _tags - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_tags", { - get: $util.oneOfGetter($oneOfFields = ["tags"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties instance - */ - ComputeInstanceRestoreProperties.create = function create(properties) { - return new ComputeInstanceRestoreProperties(properties); - }; - - /** - * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceRestoreProperties.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.advancedMachineFeatures != null && Object.hasOwnProperty.call(message, "advancedMachineFeatures")) - $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.encode(message.advancedMachineFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.canIpForward != null && Object.hasOwnProperty.call(message, "canIpForward")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.canIpForward); - if (message.confidentialInstanceConfig != null && Object.hasOwnProperty.call(message, "confidentialInstanceConfig")) - $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.encode(message.confidentialInstanceConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.deletionProtection); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.disks != null && message.disks.length) - for (var i = 0; i < message.disks.length; ++i) - $root.google.cloud.backupdr.v1.AttachedDisk.encode(message.disks[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.displayDevice != null && Object.hasOwnProperty.call(message, "displayDevice")) - $root.google.cloud.backupdr.v1.DisplayDevice.encode(message.displayDevice, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.guestAccelerators != null && message.guestAccelerators.length) - for (var i = 0; i < message.guestAccelerators.length; ++i) - $root.google.cloud.backupdr.v1.AcceleratorConfig.encode(message.guestAccelerators[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.hostname); - if (message.instanceEncryptionKey != null && Object.hasOwnProperty.call(message, "instanceEncryptionKey")) - $root.google.cloud.backupdr.v1.CustomerEncryptionKey.encode(message.instanceEncryptionKey, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.keyRevocationActionType != null && Object.hasOwnProperty.call(message, "keyRevocationActionType")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.keyRevocationActionType); - 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 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.machineType); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.backupdr.v1.Metadata.encode(message.metadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.minCpuPlatform); - if (message.networkInterfaces != null && message.networkInterfaces.length) - for (var i = 0; i < message.networkInterfaces.length; ++i) - $root.google.cloud.backupdr.v1.NetworkInterface.encode(message.networkInterfaces[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.networkPerformanceConfig != null && Object.hasOwnProperty.call(message, "networkPerformanceConfig")) - $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.encode(message.networkPerformanceConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.google.cloud.backupdr.v1.InstanceParams.encode(message.params, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.privateIpv6GoogleAccess != null && Object.hasOwnProperty.call(message, "privateIpv6GoogleAccess")) - writer.uint32(/* id 20, wireType 0 =*/160).int32(message.privateIpv6GoogleAccess); - if (message.allocationAffinity != null && Object.hasOwnProperty.call(message, "allocationAffinity")) - $root.google.cloud.backupdr.v1.AllocationAffinity.encode(message.allocationAffinity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.resourcePolicies != null && message.resourcePolicies.length) - for (var i = 0; i < message.resourcePolicies.length; ++i) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.resourcePolicies[i]); - if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) - $root.google.cloud.backupdr.v1.Scheduling.encode(message.scheduling, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.serviceAccounts != null && message.serviceAccounts.length) - for (var i = 0; i < message.serviceAccounts.length; ++i) - $root.google.cloud.backupdr.v1.ServiceAccount.encode(message.serviceAccounts[i], writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) - $root.google.cloud.backupdr.v1.Tags.encode(message.tags, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceRestoreProperties.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceRestoreProperties.decode = function 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.backupdr.v1.ComputeInstanceRestoreProperties(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.decode(reader, reader.uint32()); - break; - } - case 3: { - message.canIpForward = reader.bool(); - break; - } - case 4: { - message.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.deletionProtection = reader.bool(); - break; - } - case 6: { - message.description = reader.string(); - break; - } - case 7: { - if (!(message.disks && message.disks.length)) - message.disks = []; - message.disks.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader, reader.uint32())); - break; - } - case 8: { - message.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.guestAccelerators && message.guestAccelerators.length)) - message.guestAccelerators = []; - message.guestAccelerators.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader, reader.uint32())); - break; - } - case 10: { - message.hostname = reader.string(); - break; - } - case 11: { - message.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader, reader.uint32()); - break; - } - case 12: { - message.keyRevocationActionType = reader.int32(); - break; - } - case 13: { - 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 14: { - message.machineType = reader.string(); - break; - } - case 15: { - message.metadata = $root.google.cloud.backupdr.v1.Metadata.decode(reader, reader.uint32()); - break; - } - case 16: { - message.minCpuPlatform = reader.string(); - break; - } - case 17: { - if (!(message.networkInterfaces && message.networkInterfaces.length)) - message.networkInterfaces = []; - message.networkInterfaces.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader, reader.uint32())); - break; - } - case 18: { - message.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.decode(reader, reader.uint32()); - break; - } - case 19: { - message.params = $root.google.cloud.backupdr.v1.InstanceParams.decode(reader, reader.uint32()); - break; - } - case 20: { - message.privateIpv6GoogleAccess = reader.int32(); - break; - } - case 21: { - message.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.decode(reader, reader.uint32()); - break; - } - case 22: { - if (!(message.resourcePolicies && message.resourcePolicies.length)) - message.resourcePolicies = []; - message.resourcePolicies.push(reader.string()); - break; - } - case 23: { - message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.decode(reader, reader.uint32()); - break; - } - case 24: { - if (!(message.serviceAccounts && message.serviceAccounts.length)) - message.serviceAccounts = []; - message.serviceAccounts.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader, reader.uint32())); - break; - } - case 26: { - message.tags = $root.google.cloud.backupdr.v1.Tags.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceRestoreProperties.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComputeInstanceRestoreProperties message. - * @function verify - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComputeInstanceRestoreProperties.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { - properties._advancedMachineFeatures = 1; - { - var error = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.verify(message.advancedMachineFeatures); - if (error) - return "advancedMachineFeatures." + error; - } - } - if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { - properties._canIpForward = 1; - if (typeof message.canIpForward !== "boolean") - return "canIpForward: boolean expected"; - } - if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) { - properties._confidentialInstanceConfig = 1; - { - var error = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify(message.confidentialInstanceConfig); - if (error) - return "confidentialInstanceConfig." + error; - } - } - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) { - properties._deletionProtection = 1; - if (typeof message.deletionProtection !== "boolean") - return "deletionProtection: boolean expected"; - } - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.disks != null && message.hasOwnProperty("disks")) { - if (!Array.isArray(message.disks)) - return "disks: array expected"; - for (var i = 0; i < message.disks.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AttachedDisk.verify(message.disks[i]); - if (error) - return "disks." + error; - } - } - if (message.displayDevice != null && message.hasOwnProperty("displayDevice")) { - properties._displayDevice = 1; - { - var error = $root.google.cloud.backupdr.v1.DisplayDevice.verify(message.displayDevice); - if (error) - return "displayDevice." + error; - } - } - if (message.guestAccelerators != null && message.hasOwnProperty("guestAccelerators")) { - if (!Array.isArray(message.guestAccelerators)) - return "guestAccelerators: array expected"; - for (var i = 0; i < message.guestAccelerators.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AcceleratorConfig.verify(message.guestAccelerators[i]); - if (error) - return "guestAccelerators." + error; - } - } - if (message.hostname != null && message.hasOwnProperty("hostname")) { - properties._hostname = 1; - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - } - if (message.instanceEncryptionKey != null && message.hasOwnProperty("instanceEncryptionKey")) { - properties._instanceEncryptionKey = 1; - { - var error = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.verify(message.instanceEncryptionKey); - if (error) - return "instanceEncryptionKey." + error; - } - } - if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { - properties._keyRevocationActionType = 1; - switch (message.keyRevocationActionType) { - default: - return "keyRevocationActionType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - 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.machineType != null && message.hasOwnProperty("machineType")) { - properties._machineType = 1; - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - properties._metadata = 1; - { - var error = $root.google.cloud.backupdr.v1.Metadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - } - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { - properties._minCpuPlatform = 1; - if (!$util.isString(message.minCpuPlatform)) - return "minCpuPlatform: string expected"; - } - if (message.networkInterfaces != null && message.hasOwnProperty("networkInterfaces")) { - if (!Array.isArray(message.networkInterfaces)) - return "networkInterfaces: array expected"; - for (var i = 0; i < message.networkInterfaces.length; ++i) { - var error = $root.google.cloud.backupdr.v1.NetworkInterface.verify(message.networkInterfaces[i]); - if (error) - return "networkInterfaces." + error; - } - } - if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { - properties._networkPerformanceConfig = 1; - { - var error = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.verify(message.networkPerformanceConfig); - if (error) - return "networkPerformanceConfig." + error; - } - } - if (message.params != null && message.hasOwnProperty("params")) { - properties._params = 1; - { - var error = $root.google.cloud.backupdr.v1.InstanceParams.verify(message.params); - if (error) - return "params." + error; - } - } - if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) { - properties._privateIpv6GoogleAccess = 1; - switch (message.privateIpv6GoogleAccess) { - default: - return "privateIpv6GoogleAccess: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.allocationAffinity != null && message.hasOwnProperty("allocationAffinity")) { - properties._allocationAffinity = 1; - { - var error = $root.google.cloud.backupdr.v1.AllocationAffinity.verify(message.allocationAffinity); - if (error) - return "allocationAffinity." + error; - } - } - if (message.resourcePolicies != null && message.hasOwnProperty("resourcePolicies")) { - if (!Array.isArray(message.resourcePolicies)) - return "resourcePolicies: array expected"; - for (var i = 0; i < message.resourcePolicies.length; ++i) - if (!$util.isString(message.resourcePolicies[i])) - return "resourcePolicies: string[] expected"; - } - if (message.scheduling != null && message.hasOwnProperty("scheduling")) { - properties._scheduling = 1; - { - var error = $root.google.cloud.backupdr.v1.Scheduling.verify(message.scheduling); - if (error) - return "scheduling." + error; - } - } - if (message.serviceAccounts != null && message.hasOwnProperty("serviceAccounts")) { - if (!Array.isArray(message.serviceAccounts)) - return "serviceAccounts: array expected"; - for (var i = 0; i < message.serviceAccounts.length; ++i) { - var error = $root.google.cloud.backupdr.v1.ServiceAccount.verify(message.serviceAccounts[i]); - if (error) - return "serviceAccounts." + error; - } - } - if (message.tags != null && message.hasOwnProperty("tags")) { - properties._tags = 1; - { - var error = $root.google.cloud.backupdr.v1.Tags.verify(message.tags); - if (error) - return "tags." + error; - } - } - return null; - }; - - /** - * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties - */ - ComputeInstanceRestoreProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties) - return object; - var message = new $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties(); - if (object.name != null) - message.name = String(object.name); - if (object.advancedMachineFeatures != null) { - if (typeof object.advancedMachineFeatures !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.advancedMachineFeatures: object expected"); - message.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.fromObject(object.advancedMachineFeatures); - } - if (object.canIpForward != null) - message.canIpForward = Boolean(object.canIpForward); - if (object.confidentialInstanceConfig != null) { - if (typeof object.confidentialInstanceConfig !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.confidentialInstanceConfig: object expected"); - message.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.fromObject(object.confidentialInstanceConfig); - } - if (object.deletionProtection != null) - message.deletionProtection = Boolean(object.deletionProtection); - if (object.description != null) - message.description = String(object.description); - if (object.disks) { - if (!Array.isArray(object.disks)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: array expected"); - message.disks = []; - for (var i = 0; i < object.disks.length; ++i) { - if (typeof object.disks[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: object expected"); - message.disks[i] = $root.google.cloud.backupdr.v1.AttachedDisk.fromObject(object.disks[i]); - } - } - if (object.displayDevice != null) { - if (typeof object.displayDevice !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.displayDevice: object expected"); - message.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.fromObject(object.displayDevice); - } - if (object.guestAccelerators) { - if (!Array.isArray(object.guestAccelerators)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.guestAccelerators: array expected"); - message.guestAccelerators = []; - for (var i = 0; i < object.guestAccelerators.length; ++i) { - if (typeof object.guestAccelerators[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.guestAccelerators: object expected"); - message.guestAccelerators[i] = $root.google.cloud.backupdr.v1.AcceleratorConfig.fromObject(object.guestAccelerators[i]); - } - } - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.instanceEncryptionKey != null) { - if (typeof object.instanceEncryptionKey !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.instanceEncryptionKey: object expected"); - message.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.fromObject(object.instanceEncryptionKey); - } - switch (object.keyRevocationActionType) { - default: - if (typeof object.keyRevocationActionType === "number") { - message.keyRevocationActionType = object.keyRevocationActionType; - break; - } - break; - case "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": - case 0: - message.keyRevocationActionType = 0; - break; - case "NONE": - case 1: - message.keyRevocationActionType = 1; - break; - case "STOP": - case 2: - message.keyRevocationActionType = 2; - break; - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.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.machineType != null) - message.machineType = String(object.machineType); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.metadata: object expected"); - message.metadata = $root.google.cloud.backupdr.v1.Metadata.fromObject(object.metadata); - } - if (object.minCpuPlatform != null) - message.minCpuPlatform = String(object.minCpuPlatform); - if (object.networkInterfaces) { - if (!Array.isArray(object.networkInterfaces)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkInterfaces: array expected"); - message.networkInterfaces = []; - for (var i = 0; i < object.networkInterfaces.length; ++i) { - if (typeof object.networkInterfaces[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkInterfaces: object expected"); - message.networkInterfaces[i] = $root.google.cloud.backupdr.v1.NetworkInterface.fromObject(object.networkInterfaces[i]); - } - } - if (object.networkPerformanceConfig != null) { - if (typeof object.networkPerformanceConfig !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkPerformanceConfig: object expected"); - message.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.fromObject(object.networkPerformanceConfig); - } - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.params: object expected"); - message.params = $root.google.cloud.backupdr.v1.InstanceParams.fromObject(object.params); - } - switch (object.privateIpv6GoogleAccess) { - default: - if (typeof object.privateIpv6GoogleAccess === "number") { - message.privateIpv6GoogleAccess = object.privateIpv6GoogleAccess; - break; - } - break; - case "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": - case 0: - message.privateIpv6GoogleAccess = 0; - break; - case "INHERIT_FROM_SUBNETWORK": - case 1: - message.privateIpv6GoogleAccess = 1; - break; - case "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE": - case 2: - message.privateIpv6GoogleAccess = 2; - break; - case "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE": - case 3: - message.privateIpv6GoogleAccess = 3; - break; - } - if (object.allocationAffinity != null) { - if (typeof object.allocationAffinity !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.allocationAffinity: object expected"); - message.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.fromObject(object.allocationAffinity); - } - if (object.resourcePolicies) { - if (!Array.isArray(object.resourcePolicies)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.resourcePolicies: array expected"); - message.resourcePolicies = []; - for (var i = 0; i < object.resourcePolicies.length; ++i) - message.resourcePolicies[i] = String(object.resourcePolicies[i]); - } - if (object.scheduling != null) { - if (typeof object.scheduling !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.scheduling: object expected"); - message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.fromObject(object.scheduling); - } - if (object.serviceAccounts) { - if (!Array.isArray(object.serviceAccounts)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.serviceAccounts: array expected"); - message.serviceAccounts = []; - for (var i = 0; i < object.serviceAccounts.length; ++i) { - if (typeof object.serviceAccounts[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.serviceAccounts: object expected"); - message.serviceAccounts[i] = $root.google.cloud.backupdr.v1.ServiceAccount.fromObject(object.serviceAccounts[i]); - } - } - if (object.tags != null) { - if (typeof object.tags !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.tags: object expected"); - message.tags = $root.google.cloud.backupdr.v1.Tags.fromObject(object.tags); - } - return message; - }; - - /** - * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComputeInstanceRestoreProperties.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.disks = []; - object.guestAccelerators = []; - object.networkInterfaces = []; - object.resourcePolicies = []; - object.serviceAccounts = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { - object.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.toObject(message.advancedMachineFeatures, options); - if (options.oneofs) - object._advancedMachineFeatures = "advancedMachineFeatures"; - } - if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { - object.canIpForward = message.canIpForward; - if (options.oneofs) - object._canIpForward = "canIpForward"; - } - if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) { - object.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.toObject(message.confidentialInstanceConfig, options); - if (options.oneofs) - object._confidentialInstanceConfig = "confidentialInstanceConfig"; - } - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) { - object.deletionProtection = message.deletionProtection; - if (options.oneofs) - object._deletionProtection = "deletionProtection"; - } - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.disks && message.disks.length) { - object.disks = []; - for (var j = 0; j < message.disks.length; ++j) - object.disks[j] = $root.google.cloud.backupdr.v1.AttachedDisk.toObject(message.disks[j], options); - } - if (message.displayDevice != null && message.hasOwnProperty("displayDevice")) { - object.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.toObject(message.displayDevice, options); - if (options.oneofs) - object._displayDevice = "displayDevice"; - } - if (message.guestAccelerators && message.guestAccelerators.length) { - object.guestAccelerators = []; - for (var j = 0; j < message.guestAccelerators.length; ++j) - object.guestAccelerators[j] = $root.google.cloud.backupdr.v1.AcceleratorConfig.toObject(message.guestAccelerators[j], options); - } - if (message.hostname != null && message.hasOwnProperty("hostname")) { - object.hostname = message.hostname; - if (options.oneofs) - object._hostname = "hostname"; - } - if (message.instanceEncryptionKey != null && message.hasOwnProperty("instanceEncryptionKey")) { - object.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.toObject(message.instanceEncryptionKey, options); - if (options.oneofs) - object._instanceEncryptionKey = "instanceEncryptionKey"; - } - if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { - object.keyRevocationActionType = options.enums === String ? $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] === undefined ? message.keyRevocationActionType : $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] : message.keyRevocationActionType; - if (options.oneofs) - object._keyRevocationActionType = "keyRevocationActionType"; - } - 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.machineType != null && message.hasOwnProperty("machineType")) { - object.machineType = message.machineType; - if (options.oneofs) - object._machineType = "machineType"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - object.metadata = $root.google.cloud.backupdr.v1.Metadata.toObject(message.metadata, options); - if (options.oneofs) - object._metadata = "metadata"; - } - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { - object.minCpuPlatform = message.minCpuPlatform; - if (options.oneofs) - object._minCpuPlatform = "minCpuPlatform"; - } - if (message.networkInterfaces && message.networkInterfaces.length) { - object.networkInterfaces = []; - for (var j = 0; j < message.networkInterfaces.length; ++j) - object.networkInterfaces[j] = $root.google.cloud.backupdr.v1.NetworkInterface.toObject(message.networkInterfaces[j], options); - } - if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { - object.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.toObject(message.networkPerformanceConfig, options); - if (options.oneofs) - object._networkPerformanceConfig = "networkPerformanceConfig"; - } - if (message.params != null && message.hasOwnProperty("params")) { - object.params = $root.google.cloud.backupdr.v1.InstanceParams.toObject(message.params, options); - if (options.oneofs) - object._params = "params"; - } - if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) { - object.privateIpv6GoogleAccess = options.enums === String ? $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess[message.privateIpv6GoogleAccess] === undefined ? message.privateIpv6GoogleAccess : $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess[message.privateIpv6GoogleAccess] : message.privateIpv6GoogleAccess; - if (options.oneofs) - object._privateIpv6GoogleAccess = "privateIpv6GoogleAccess"; - } - if (message.allocationAffinity != null && message.hasOwnProperty("allocationAffinity")) { - object.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.toObject(message.allocationAffinity, options); - if (options.oneofs) - object._allocationAffinity = "allocationAffinity"; - } - if (message.resourcePolicies && message.resourcePolicies.length) { - object.resourcePolicies = []; - for (var j = 0; j < message.resourcePolicies.length; ++j) - object.resourcePolicies[j] = message.resourcePolicies[j]; - } - if (message.scheduling != null && message.hasOwnProperty("scheduling")) { - object.scheduling = $root.google.cloud.backupdr.v1.Scheduling.toObject(message.scheduling, options); - if (options.oneofs) - object._scheduling = "scheduling"; - } - if (message.serviceAccounts && message.serviceAccounts.length) { - object.serviceAccounts = []; - for (var j = 0; j < message.serviceAccounts.length; ++j) - object.serviceAccounts[j] = $root.google.cloud.backupdr.v1.ServiceAccount.toObject(message.serviceAccounts[j], options); - } - if (message.tags != null && message.hasOwnProperty("tags")) { - object.tags = $root.google.cloud.backupdr.v1.Tags.toObject(message.tags, options); - if (options.oneofs) - object._tags = "tags"; - } - return object; - }; - - /** - * Converts this ComputeInstanceRestoreProperties to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - * @returns {Object.} JSON object - */ - ComputeInstanceRestoreProperties.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComputeInstanceRestoreProperties - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComputeInstanceRestoreProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceRestoreProperties"; - }; - - /** - * InstancePrivateIpv6GoogleAccess enum. - * @name google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess - * @enum {number} - * @property {number} INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED=0 INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED value - * @property {number} INHERIT_FROM_SUBNETWORK=1 INHERIT_FROM_SUBNETWORK value - * @property {number} ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE=2 ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE value - * @property {number} ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE=3 ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE value - */ - ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED"] = 0; - values[valuesById[1] = "INHERIT_FROM_SUBNETWORK"] = 1; - values[valuesById[2] = "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE"] = 2; - values[valuesById[3] = "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE"] = 3; - return values; - })(); - - return ComputeInstanceRestoreProperties; - })(); - - v1.ComputeInstanceTargetEnvironment = (function() { - - /** - * Properties of a ComputeInstanceTargetEnvironment. - * @memberof google.cloud.backupdr.v1 - * @interface IComputeInstanceTargetEnvironment - * @property {string|null} [project] ComputeInstanceTargetEnvironment project - * @property {string|null} [zone] ComputeInstanceTargetEnvironment zone - */ - - /** - * Constructs a new ComputeInstanceTargetEnvironment. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ComputeInstanceTargetEnvironment. - * @implements IComputeInstanceTargetEnvironment - * @constructor - * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment=} [properties] Properties to set - */ - function ComputeInstanceTargetEnvironment(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComputeInstanceTargetEnvironment project. - * @member {string} project - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @instance - */ - ComputeInstanceTargetEnvironment.prototype.project = ""; - - /** - * ComputeInstanceTargetEnvironment zone. - * @member {string} zone - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @instance - */ - ComputeInstanceTargetEnvironment.prototype.zone = ""; - - /** - * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment instance - */ - ComputeInstanceTargetEnvironment.create = function create(properties) { - return new ComputeInstanceTargetEnvironment(properties); - }; - - /** - * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceTargetEnvironment.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - return writer; - }; - - /** - * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceTargetEnvironment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceTargetEnvironment.decode = function 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.backupdr.v1.ComputeInstanceTargetEnvironment(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.project = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceTargetEnvironment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComputeInstanceTargetEnvironment message. - * @function verify - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComputeInstanceTargetEnvironment.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.project != null && message.hasOwnProperty("project")) - if (!$util.isString(message.project)) - return "project: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - return null; - }; - - /** - * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment - */ - ComputeInstanceTargetEnvironment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment) - return object; - var message = new $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment(); - if (object.project != null) - message.project = String(object.project); - if (object.zone != null) - message.zone = String(object.zone); - return message; - }; - - /** - * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComputeInstanceTargetEnvironment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.project = ""; - object.zone = ""; - } - if (message.project != null && message.hasOwnProperty("project")) - object.project = message.project; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - return object; - }; - - /** - * Converts this ComputeInstanceTargetEnvironment to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @instance - * @returns {Object.} JSON object - */ - ComputeInstanceTargetEnvironment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComputeInstanceTargetEnvironment - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComputeInstanceTargetEnvironment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment"; - }; - - return ComputeInstanceTargetEnvironment; - })(); - - v1.ComputeInstanceDataSourceProperties = (function() { - - /** - * Properties of a ComputeInstanceDataSourceProperties. - * @memberof google.cloud.backupdr.v1 - * @interface IComputeInstanceDataSourceProperties - * @property {string|null} [name] ComputeInstanceDataSourceProperties name - * @property {string|null} [description] ComputeInstanceDataSourceProperties description - * @property {string|null} [machineType] ComputeInstanceDataSourceProperties machineType - * @property {number|Long|null} [totalDiskCount] ComputeInstanceDataSourceProperties totalDiskCount - * @property {number|Long|null} [totalDiskSizeGb] ComputeInstanceDataSourceProperties totalDiskSizeGb - */ - - /** - * Constructs a new ComputeInstanceDataSourceProperties. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ComputeInstanceDataSourceProperties. - * @implements IComputeInstanceDataSourceProperties - * @constructor - * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties=} [properties] Properties to set - */ - function ComputeInstanceDataSourceProperties(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComputeInstanceDataSourceProperties name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @instance - */ - ComputeInstanceDataSourceProperties.prototype.name = ""; - - /** - * ComputeInstanceDataSourceProperties description. - * @member {string} description - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @instance - */ - ComputeInstanceDataSourceProperties.prototype.description = ""; - - /** - * ComputeInstanceDataSourceProperties machineType. - * @member {string} machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @instance - */ - ComputeInstanceDataSourceProperties.prototype.machineType = ""; - - /** - * ComputeInstanceDataSourceProperties totalDiskCount. - * @member {number|Long} totalDiskCount - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @instance - */ - ComputeInstanceDataSourceProperties.prototype.totalDiskCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ComputeInstanceDataSourceProperties totalDiskSizeGb. - * @member {number|Long} totalDiskSizeGb - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @instance - */ - ComputeInstanceDataSourceProperties.prototype.totalDiskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties instance - */ - ComputeInstanceDataSourceProperties.create = function create(properties) { - return new ComputeInstanceDataSourceProperties(properties); - }; - - /** - * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceDataSourceProperties.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.machineType); - if (message.totalDiskCount != null && Object.hasOwnProperty.call(message, "totalDiskCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.totalDiskCount); - if (message.totalDiskSizeGb != null && Object.hasOwnProperty.call(message, "totalDiskSizeGb")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.totalDiskSizeGb); - return writer; - }; - - /** - * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceDataSourceProperties.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceDataSourceProperties.decode = function 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.backupdr.v1.ComputeInstanceDataSourceProperties(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.machineType = reader.string(); - break; - } - case 4: { - message.totalDiskCount = reader.int64(); - break; - } - case 5: { - message.totalDiskSizeGb = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceDataSourceProperties.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComputeInstanceDataSourceProperties message. - * @function verify - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComputeInstanceDataSourceProperties.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.machineType != null && message.hasOwnProperty("machineType")) - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - if (message.totalDiskCount != null && message.hasOwnProperty("totalDiskCount")) - if (!$util.isInteger(message.totalDiskCount) && !(message.totalDiskCount && $util.isInteger(message.totalDiskCount.low) && $util.isInteger(message.totalDiskCount.high))) - return "totalDiskCount: integer|Long expected"; - if (message.totalDiskSizeGb != null && message.hasOwnProperty("totalDiskSizeGb")) - if (!$util.isInteger(message.totalDiskSizeGb) && !(message.totalDiskSizeGb && $util.isInteger(message.totalDiskSizeGb.low) && $util.isInteger(message.totalDiskSizeGb.high))) - return "totalDiskSizeGb: integer|Long expected"; - return null; - }; - - /** - * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties - */ - ComputeInstanceDataSourceProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties) - return object; - var message = new $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.machineType != null) - message.machineType = String(object.machineType); - if (object.totalDiskCount != null) - if ($util.Long) - (message.totalDiskCount = $util.Long.fromValue(object.totalDiskCount)).unsigned = false; - else if (typeof object.totalDiskCount === "string") - message.totalDiskCount = parseInt(object.totalDiskCount, 10); - else if (typeof object.totalDiskCount === "number") - message.totalDiskCount = object.totalDiskCount; - else if (typeof object.totalDiskCount === "object") - message.totalDiskCount = new $util.LongBits(object.totalDiskCount.low >>> 0, object.totalDiskCount.high >>> 0).toNumber(); - if (object.totalDiskSizeGb != null) - if ($util.Long) - (message.totalDiskSizeGb = $util.Long.fromValue(object.totalDiskSizeGb)).unsigned = false; - else if (typeof object.totalDiskSizeGb === "string") - message.totalDiskSizeGb = parseInt(object.totalDiskSizeGb, 10); - else if (typeof object.totalDiskSizeGb === "number") - message.totalDiskSizeGb = object.totalDiskSizeGb; - else if (typeof object.totalDiskSizeGb === "object") - message.totalDiskSizeGb = new $util.LongBits(object.totalDiskSizeGb.low >>> 0, object.totalDiskSizeGb.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComputeInstanceDataSourceProperties.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.machineType = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalDiskCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalDiskCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalDiskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalDiskSizeGb = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.machineType != null && message.hasOwnProperty("machineType")) - object.machineType = message.machineType; - if (message.totalDiskCount != null && message.hasOwnProperty("totalDiskCount")) - if (typeof message.totalDiskCount === "number") - object.totalDiskCount = options.longs === String ? String(message.totalDiskCount) : message.totalDiskCount; - else - object.totalDiskCount = options.longs === String ? $util.Long.prototype.toString.call(message.totalDiskCount) : options.longs === Number ? new $util.LongBits(message.totalDiskCount.low >>> 0, message.totalDiskCount.high >>> 0).toNumber() : message.totalDiskCount; - if (message.totalDiskSizeGb != null && message.hasOwnProperty("totalDiskSizeGb")) - if (typeof message.totalDiskSizeGb === "number") - object.totalDiskSizeGb = options.longs === String ? String(message.totalDiskSizeGb) : message.totalDiskSizeGb; - else - object.totalDiskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.totalDiskSizeGb) : options.longs === Number ? new $util.LongBits(message.totalDiskSizeGb.low >>> 0, message.totalDiskSizeGb.high >>> 0).toNumber() : message.totalDiskSizeGb; - return object; - }; - - /** - * Converts this ComputeInstanceDataSourceProperties to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @instance - * @returns {Object.} JSON object - */ - ComputeInstanceDataSourceProperties.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComputeInstanceDataSourceProperties - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComputeInstanceDataSourceProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties"; - }; - - return ComputeInstanceDataSourceProperties; - })(); - - v1.AdvancedMachineFeatures = (function() { - - /** - * Properties of an AdvancedMachineFeatures. - * @memberof google.cloud.backupdr.v1 - * @interface IAdvancedMachineFeatures - * @property {boolean|null} [enableNestedVirtualization] AdvancedMachineFeatures enableNestedVirtualization - * @property {number|null} [threadsPerCore] AdvancedMachineFeatures threadsPerCore - * @property {number|null} [visibleCoreCount] AdvancedMachineFeatures visibleCoreCount - * @property {boolean|null} [enableUefiNetworking] AdvancedMachineFeatures enableUefiNetworking - */ - - /** - * Constructs a new AdvancedMachineFeatures. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AdvancedMachineFeatures. - * @implements IAdvancedMachineFeatures - * @constructor - * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures=} [properties] Properties to set - */ - function AdvancedMachineFeatures(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AdvancedMachineFeatures enableNestedVirtualization. - * @member {boolean|null|undefined} enableNestedVirtualization - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.enableNestedVirtualization = null; - - /** - * AdvancedMachineFeatures threadsPerCore. - * @member {number|null|undefined} threadsPerCore - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.threadsPerCore = null; - - /** - * AdvancedMachineFeatures visibleCoreCount. - * @member {number|null|undefined} visibleCoreCount - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.visibleCoreCount = null; - - /** - * AdvancedMachineFeatures enableUefiNetworking. - * @member {boolean|null|undefined} enableUefiNetworking - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.enableUefiNetworking = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AdvancedMachineFeatures _enableNestedVirtualization. - * @member {"enableNestedVirtualization"|undefined} _enableNestedVirtualization - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableNestedVirtualization", { - get: $util.oneOfGetter($oneOfFields = ["enableNestedVirtualization"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AdvancedMachineFeatures _threadsPerCore. - * @member {"threadsPerCore"|undefined} _threadsPerCore - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_threadsPerCore", { - get: $util.oneOfGetter($oneOfFields = ["threadsPerCore"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AdvancedMachineFeatures _visibleCoreCount. - * @member {"visibleCoreCount"|undefined} _visibleCoreCount - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_visibleCoreCount", { - get: $util.oneOfGetter($oneOfFields = ["visibleCoreCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AdvancedMachineFeatures _enableUefiNetworking. - * @member {"enableUefiNetworking"|undefined} _enableUefiNetworking - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableUefiNetworking", { - get: $util.oneOfGetter($oneOfFields = ["enableUefiNetworking"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AdvancedMachineFeatures instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures instance - */ - AdvancedMachineFeatures.create = function create(properties) { - return new AdvancedMachineFeatures(properties); - }; - - /** - * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdvancedMachineFeatures.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableNestedVirtualization != null && Object.hasOwnProperty.call(message, "enableNestedVirtualization")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableNestedVirtualization); - if (message.threadsPerCore != null && Object.hasOwnProperty.call(message, "threadsPerCore")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.threadsPerCore); - if (message.visibleCoreCount != null && Object.hasOwnProperty.call(message, "visibleCoreCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.visibleCoreCount); - if (message.enableUefiNetworking != null && Object.hasOwnProperty.call(message, "enableUefiNetworking")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enableUefiNetworking); - return writer; - }; - - /** - * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdvancedMachineFeatures.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdvancedMachineFeatures.decode = function 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.backupdr.v1.AdvancedMachineFeatures(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableNestedVirtualization = reader.bool(); - break; - } - case 2: { - message.threadsPerCore = reader.int32(); - break; - } - case 3: { - message.visibleCoreCount = reader.int32(); - break; - } - case 4: { - message.enableUefiNetworking = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdvancedMachineFeatures.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AdvancedMachineFeatures message. - * @function verify - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AdvancedMachineFeatures.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { - properties._enableNestedVirtualization = 1; - if (typeof message.enableNestedVirtualization !== "boolean") - return "enableNestedVirtualization: boolean expected"; - } - if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { - properties._threadsPerCore = 1; - if (!$util.isInteger(message.threadsPerCore)) - return "threadsPerCore: integer expected"; - } - if (message.visibleCoreCount != null && message.hasOwnProperty("visibleCoreCount")) { - properties._visibleCoreCount = 1; - if (!$util.isInteger(message.visibleCoreCount)) - return "visibleCoreCount: integer expected"; - } - if (message.enableUefiNetworking != null && message.hasOwnProperty("enableUefiNetworking")) { - properties._enableUefiNetworking = 1; - if (typeof message.enableUefiNetworking !== "boolean") - return "enableUefiNetworking: boolean expected"; - } - return null; - }; - - /** - * Creates an AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures - */ - AdvancedMachineFeatures.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AdvancedMachineFeatures) - return object; - var message = new $root.google.cloud.backupdr.v1.AdvancedMachineFeatures(); - if (object.enableNestedVirtualization != null) - message.enableNestedVirtualization = Boolean(object.enableNestedVirtualization); - if (object.threadsPerCore != null) - message.threadsPerCore = object.threadsPerCore | 0; - if (object.visibleCoreCount != null) - message.visibleCoreCount = object.visibleCoreCount | 0; - if (object.enableUefiNetworking != null) - message.enableUefiNetworking = Boolean(object.enableUefiNetworking); - return message; - }; - - /** - * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {google.cloud.backupdr.v1.AdvancedMachineFeatures} message AdvancedMachineFeatures - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AdvancedMachineFeatures.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { - object.enableNestedVirtualization = message.enableNestedVirtualization; - if (options.oneofs) - object._enableNestedVirtualization = "enableNestedVirtualization"; - } - if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { - object.threadsPerCore = message.threadsPerCore; - if (options.oneofs) - object._threadsPerCore = "threadsPerCore"; - } - if (message.visibleCoreCount != null && message.hasOwnProperty("visibleCoreCount")) { - object.visibleCoreCount = message.visibleCoreCount; - if (options.oneofs) - object._visibleCoreCount = "visibleCoreCount"; - } - if (message.enableUefiNetworking != null && message.hasOwnProperty("enableUefiNetworking")) { - object.enableUefiNetworking = message.enableUefiNetworking; - if (options.oneofs) - object._enableUefiNetworking = "enableUefiNetworking"; - } - return object; - }; - - /** - * Converts this AdvancedMachineFeatures to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - * @returns {Object.} JSON object - */ - AdvancedMachineFeatures.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AdvancedMachineFeatures - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AdvancedMachineFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AdvancedMachineFeatures"; - }; - - return AdvancedMachineFeatures; - })(); - - v1.ConfidentialInstanceConfig = (function() { - - /** - * Properties of a ConfidentialInstanceConfig. - * @memberof google.cloud.backupdr.v1 - * @interface IConfidentialInstanceConfig - * @property {boolean|null} [enableConfidentialCompute] ConfidentialInstanceConfig enableConfidentialCompute - */ - - /** - * Constructs a new ConfidentialInstanceConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ConfidentialInstanceConfig. - * @implements IConfidentialInstanceConfig - * @constructor - * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig=} [properties] Properties to set - */ - function ConfidentialInstanceConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConfidentialInstanceConfig enableConfidentialCompute. - * @member {boolean|null|undefined} enableConfidentialCompute - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @instance - */ - ConfidentialInstanceConfig.prototype.enableConfidentialCompute = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ConfidentialInstanceConfig _enableConfidentialCompute. - * @member {"enableConfidentialCompute"|undefined} _enableConfidentialCompute - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @instance - */ - Object.defineProperty(ConfidentialInstanceConfig.prototype, "_enableConfidentialCompute", { - get: $util.oneOfGetter($oneOfFields = ["enableConfidentialCompute"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ConfidentialInstanceConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig instance - */ - ConfidentialInstanceConfig.create = function create(properties) { - return new ConfidentialInstanceConfig(properties); - }; - - /** - * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig} message ConfidentialInstanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidentialInstanceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableConfidentialCompute != null && Object.hasOwnProperty.call(message, "enableConfidentialCompute")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableConfidentialCompute); - return writer; - }; - - /** - * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig} message ConfidentialInstanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidentialInstanceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidentialInstanceConfig.decode = function 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.backupdr.v1.ConfidentialInstanceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableConfidentialCompute = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidentialInstanceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConfidentialInstanceConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConfidentialInstanceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enableConfidentialCompute != null && message.hasOwnProperty("enableConfidentialCompute")) { - properties._enableConfidentialCompute = 1; - if (typeof message.enableConfidentialCompute !== "boolean") - return "enableConfidentialCompute: boolean expected"; - } - return null; - }; - - /** - * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig - */ - ConfidentialInstanceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig(); - if (object.enableConfidentialCompute != null) - message.enableConfidentialCompute = Boolean(object.enableConfidentialCompute); - return message; - }; - - /** - * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {google.cloud.backupdr.v1.ConfidentialInstanceConfig} message ConfidentialInstanceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfidentialInstanceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.enableConfidentialCompute != null && message.hasOwnProperty("enableConfidentialCompute")) { - object.enableConfidentialCompute = message.enableConfidentialCompute; - if (options.oneofs) - object._enableConfidentialCompute = "enableConfidentialCompute"; - } - return object; - }; - - /** - * Converts this ConfidentialInstanceConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @instance - * @returns {Object.} JSON object - */ - ConfidentialInstanceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConfidentialInstanceConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConfidentialInstanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ConfidentialInstanceConfig"; - }; - - return ConfidentialInstanceConfig; - })(); - - v1.DisplayDevice = (function() { - - /** - * Properties of a DisplayDevice. - * @memberof google.cloud.backupdr.v1 - * @interface IDisplayDevice - * @property {boolean|null} [enableDisplay] DisplayDevice enableDisplay - */ - - /** - * Constructs a new DisplayDevice. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DisplayDevice. - * @implements IDisplayDevice - * @constructor - * @param {google.cloud.backupdr.v1.IDisplayDevice=} [properties] Properties to set - */ - function DisplayDevice(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DisplayDevice enableDisplay. - * @member {boolean|null|undefined} enableDisplay - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @instance - */ - DisplayDevice.prototype.enableDisplay = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DisplayDevice _enableDisplay. - * @member {"enableDisplay"|undefined} _enableDisplay - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @instance - */ - Object.defineProperty(DisplayDevice.prototype, "_enableDisplay", { - get: $util.oneOfGetter($oneOfFields = ["enableDisplay"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DisplayDevice instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {google.cloud.backupdr.v1.IDisplayDevice=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice instance - */ - DisplayDevice.create = function create(properties) { - return new DisplayDevice(properties); - }; - - /** - * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {google.cloud.backupdr.v1.IDisplayDevice} message DisplayDevice message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DisplayDevice.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableDisplay != null && Object.hasOwnProperty.call(message, "enableDisplay")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableDisplay); - return writer; - }; - - /** - * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {google.cloud.backupdr.v1.IDisplayDevice} message DisplayDevice message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DisplayDevice.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DisplayDevice message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DisplayDevice.decode = function 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.backupdr.v1.DisplayDevice(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableDisplay = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DisplayDevice.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DisplayDevice message. - * @function verify - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DisplayDevice.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enableDisplay != null && message.hasOwnProperty("enableDisplay")) { - properties._enableDisplay = 1; - if (typeof message.enableDisplay !== "boolean") - return "enableDisplay: boolean expected"; - } - return null; - }; - - /** - * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice - */ - DisplayDevice.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DisplayDevice) - return object; - var message = new $root.google.cloud.backupdr.v1.DisplayDevice(); - if (object.enableDisplay != null) - message.enableDisplay = Boolean(object.enableDisplay); - return message; - }; - - /** - * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {google.cloud.backupdr.v1.DisplayDevice} message DisplayDevice - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DisplayDevice.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.enableDisplay != null && message.hasOwnProperty("enableDisplay")) { - object.enableDisplay = message.enableDisplay; - if (options.oneofs) - object._enableDisplay = "enableDisplay"; - } - return object; - }; - - /** - * Converts this DisplayDevice to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @instance - * @returns {Object.} JSON object - */ - DisplayDevice.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DisplayDevice - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DisplayDevice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DisplayDevice"; - }; - - return DisplayDevice; - })(); - - v1.AcceleratorConfig = (function() { - - /** - * Properties of an AcceleratorConfig. - * @memberof google.cloud.backupdr.v1 - * @interface IAcceleratorConfig - * @property {string|null} [acceleratorType] AcceleratorConfig acceleratorType - * @property {number|null} [acceleratorCount] AcceleratorConfig acceleratorCount - */ - - /** - * Constructs a new AcceleratorConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AcceleratorConfig. - * @implements IAcceleratorConfig - * @constructor - * @param {google.cloud.backupdr.v1.IAcceleratorConfig=} [properties] Properties to set - */ - function AcceleratorConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AcceleratorConfig acceleratorType. - * @member {string|null|undefined} acceleratorType - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @instance - */ - AcceleratorConfig.prototype.acceleratorType = null; - - /** - * AcceleratorConfig acceleratorCount. - * @member {number|null|undefined} acceleratorCount - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @instance - */ - AcceleratorConfig.prototype.acceleratorCount = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AcceleratorConfig _acceleratorType. - * @member {"acceleratorType"|undefined} _acceleratorType - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @instance - */ - Object.defineProperty(AcceleratorConfig.prototype, "_acceleratorType", { - get: $util.oneOfGetter($oneOfFields = ["acceleratorType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AcceleratorConfig _acceleratorCount. - * @member {"acceleratorCount"|undefined} _acceleratorCount - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @instance - */ - Object.defineProperty(AcceleratorConfig.prototype, "_acceleratorCount", { - get: $util.oneOfGetter($oneOfFields = ["acceleratorCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AcceleratorConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {google.cloud.backupdr.v1.IAcceleratorConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig instance - */ - AcceleratorConfig.create = function create(properties) { - return new AcceleratorConfig(properties); - }; - - /** - * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {google.cloud.backupdr.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AcceleratorConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.acceleratorType != null && Object.hasOwnProperty.call(message, "acceleratorType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.acceleratorType); - if (message.acceleratorCount != null && Object.hasOwnProperty.call(message, "acceleratorCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.acceleratorCount); - return writer; - }; - - /** - * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {google.cloud.backupdr.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AcceleratorConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AcceleratorConfig.decode = function 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.backupdr.v1.AcceleratorConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.acceleratorType = reader.string(); - break; - } - case 2: { - message.acceleratorCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AcceleratorConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AcceleratorConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AcceleratorConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) { - properties._acceleratorType = 1; - if (!$util.isString(message.acceleratorType)) - return "acceleratorType: string expected"; - } - if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) { - properties._acceleratorCount = 1; - if (!$util.isInteger(message.acceleratorCount)) - return "acceleratorCount: integer expected"; - } - return null; - }; - - /** - * Creates an AcceleratorConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig - */ - AcceleratorConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AcceleratorConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.AcceleratorConfig(); - if (object.acceleratorType != null) - message.acceleratorType = String(object.acceleratorType); - if (object.acceleratorCount != null) - message.acceleratorCount = object.acceleratorCount | 0; - return message; - }; - - /** - * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {google.cloud.backupdr.v1.AcceleratorConfig} message AcceleratorConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AcceleratorConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) { - object.acceleratorType = message.acceleratorType; - if (options.oneofs) - object._acceleratorType = "acceleratorType"; - } - if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) { - object.acceleratorCount = message.acceleratorCount; - if (options.oneofs) - object._acceleratorCount = "acceleratorCount"; - } - return object; - }; - - /** - * Converts this AcceleratorConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @instance - * @returns {Object.} JSON object - */ - AcceleratorConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AcceleratorConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AcceleratorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AcceleratorConfig"; - }; - - return AcceleratorConfig; - })(); - - v1.CustomerEncryptionKey = (function() { - - /** - * Properties of a CustomerEncryptionKey. - * @memberof google.cloud.backupdr.v1 - * @interface ICustomerEncryptionKey - * @property {string|null} [rawKey] CustomerEncryptionKey rawKey - * @property {string|null} [rsaEncryptedKey] CustomerEncryptionKey rsaEncryptedKey - * @property {string|null} [kmsKeyName] CustomerEncryptionKey kmsKeyName - * @property {string|null} [kmsKeyServiceAccount] CustomerEncryptionKey kmsKeyServiceAccount - */ - - /** - * Constructs a new CustomerEncryptionKey. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CustomerEncryptionKey. - * @implements ICustomerEncryptionKey - * @constructor - * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey=} [properties] Properties to set - */ - function CustomerEncryptionKey(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomerEncryptionKey rawKey. - * @member {string|null|undefined} rawKey - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - CustomerEncryptionKey.prototype.rawKey = null; - - /** - * CustomerEncryptionKey rsaEncryptedKey. - * @member {string|null|undefined} rsaEncryptedKey - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - CustomerEncryptionKey.prototype.rsaEncryptedKey = null; - - /** - * CustomerEncryptionKey kmsKeyName. - * @member {string|null|undefined} kmsKeyName - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - CustomerEncryptionKey.prototype.kmsKeyName = null; - - /** - * CustomerEncryptionKey kmsKeyServiceAccount. - * @member {string|null|undefined} kmsKeyServiceAccount - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - CustomerEncryptionKey.prototype.kmsKeyServiceAccount = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CustomerEncryptionKey key. - * @member {"rawKey"|"rsaEncryptedKey"|"kmsKeyName"|undefined} key - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - Object.defineProperty(CustomerEncryptionKey.prototype, "key", { - get: $util.oneOfGetter($oneOfFields = ["rawKey", "rsaEncryptedKey", "kmsKeyName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * CustomerEncryptionKey _kmsKeyServiceAccount. - * @member {"kmsKeyServiceAccount"|undefined} _kmsKeyServiceAccount - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - Object.defineProperty(CustomerEncryptionKey.prototype, "_kmsKeyServiceAccount", { - get: $util.oneOfGetter($oneOfFields = ["kmsKeyServiceAccount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CustomerEncryptionKey instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey instance - */ - CustomerEncryptionKey.create = function create(properties) { - return new CustomerEncryptionKey(properties); - }; - - /** - * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey} message CustomerEncryptionKey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomerEncryptionKey.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rawKey != null && Object.hasOwnProperty.call(message, "rawKey")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.rawKey); - if (message.rsaEncryptedKey != null && Object.hasOwnProperty.call(message, "rsaEncryptedKey")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.rsaEncryptedKey); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyName); - if (message.kmsKeyServiceAccount != null && Object.hasOwnProperty.call(message, "kmsKeyServiceAccount")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.kmsKeyServiceAccount); - return writer; - }; - - /** - * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey} message CustomerEncryptionKey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomerEncryptionKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomerEncryptionKey message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomerEncryptionKey.decode = function 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.backupdr.v1.CustomerEncryptionKey(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rawKey = reader.string(); - break; - } - case 2: { - message.rsaEncryptedKey = reader.string(); - break; - } - case 3: { - message.kmsKeyName = reader.string(); - break; - } - case 4: { - message.kmsKeyServiceAccount = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomerEncryptionKey.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomerEncryptionKey message. - * @function verify - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomerEncryptionKey.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.rawKey != null && message.hasOwnProperty("rawKey")) { - properties.key = 1; - if (!$util.isString(message.rawKey)) - return "rawKey: string expected"; - } - if (message.rsaEncryptedKey != null && message.hasOwnProperty("rsaEncryptedKey")) { - if (properties.key === 1) - return "key: multiple values"; - properties.key = 1; - if (!$util.isString(message.rsaEncryptedKey)) - return "rsaEncryptedKey: string expected"; - } - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { - if (properties.key === 1) - return "key: multiple values"; - properties.key = 1; - if (!$util.isString(message.kmsKeyName)) - return "kmsKeyName: string expected"; - } - if (message.kmsKeyServiceAccount != null && message.hasOwnProperty("kmsKeyServiceAccount")) { - properties._kmsKeyServiceAccount = 1; - if (!$util.isString(message.kmsKeyServiceAccount)) - return "kmsKeyServiceAccount: string expected"; - } - return null; - }; - - /** - * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey - */ - CustomerEncryptionKey.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CustomerEncryptionKey) - return object; - var message = new $root.google.cloud.backupdr.v1.CustomerEncryptionKey(); - if (object.rawKey != null) - message.rawKey = String(object.rawKey); - if (object.rsaEncryptedKey != null) - message.rsaEncryptedKey = String(object.rsaEncryptedKey); - if (object.kmsKeyName != null) - message.kmsKeyName = String(object.kmsKeyName); - if (object.kmsKeyServiceAccount != null) - message.kmsKeyServiceAccount = String(object.kmsKeyServiceAccount); - return message; - }; - - /** - * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {google.cloud.backupdr.v1.CustomerEncryptionKey} message CustomerEncryptionKey - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomerEncryptionKey.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.rawKey != null && message.hasOwnProperty("rawKey")) { - object.rawKey = message.rawKey; - if (options.oneofs) - object.key = "rawKey"; - } - if (message.rsaEncryptedKey != null && message.hasOwnProperty("rsaEncryptedKey")) { - object.rsaEncryptedKey = message.rsaEncryptedKey; - if (options.oneofs) - object.key = "rsaEncryptedKey"; - } - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { - object.kmsKeyName = message.kmsKeyName; - if (options.oneofs) - object.key = "kmsKeyName"; - } - if (message.kmsKeyServiceAccount != null && message.hasOwnProperty("kmsKeyServiceAccount")) { - object.kmsKeyServiceAccount = message.kmsKeyServiceAccount; - if (options.oneofs) - object._kmsKeyServiceAccount = "kmsKeyServiceAccount"; - } - return object; - }; - - /** - * Converts this CustomerEncryptionKey to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - * @returns {Object.} JSON object - */ - CustomerEncryptionKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomerEncryptionKey - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomerEncryptionKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CustomerEncryptionKey"; - }; - - return CustomerEncryptionKey; - })(); - - v1.Entry = (function() { - - /** - * Properties of an Entry. - * @memberof google.cloud.backupdr.v1 - * @interface IEntry - * @property {string|null} [key] Entry key - * @property {string|null} [value] Entry value - */ - - /** - * Constructs a new Entry. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an Entry. - * @implements IEntry - * @constructor - * @param {google.cloud.backupdr.v1.IEntry=} [properties] Properties to set - */ - function Entry(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Entry key. - * @member {string|null|undefined} key - * @memberof google.cloud.backupdr.v1.Entry - * @instance - */ - Entry.prototype.key = null; - - /** - * Entry value. - * @member {string|null|undefined} value - * @memberof google.cloud.backupdr.v1.Entry - * @instance - */ - Entry.prototype.value = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Entry _key. - * @member {"key"|undefined} _key - * @memberof google.cloud.backupdr.v1.Entry - * @instance - */ - Object.defineProperty(Entry.prototype, "_key", { - get: $util.oneOfGetter($oneOfFields = ["key"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Entry _value. - * @member {"value"|undefined} _value - * @memberof google.cloud.backupdr.v1.Entry - * @instance - */ - Object.defineProperty(Entry.prototype, "_value", { - get: $util.oneOfGetter($oneOfFields = ["value"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Entry instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {google.cloud.backupdr.v1.IEntry=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Entry} Entry instance - */ - Entry.create = function create(properties) { - return new Entry(properties); - }; - - /** - * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {google.cloud.backupdr.v1.IEntry} message Entry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - return writer; - }; - - /** - * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {google.cloud.backupdr.v1.IEntry} message Entry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Entry message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Entry} Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entry.decode = function 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.backupdr.v1.Entry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.key = reader.string(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Entry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Entry} Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Entry message. - * @function verify - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Entry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.key != null && message.hasOwnProperty("key")) { - properties._key = 1; - if (!$util.isString(message.key)) - return "key: string expected"; - } - if (message.value != null && message.hasOwnProperty("value")) { - properties._value = 1; - if (!$util.isString(message.value)) - return "value: string expected"; - } - return null; - }; - - /** - * Creates an Entry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Entry} Entry - */ - Entry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Entry) - return object; - var message = new $root.google.cloud.backupdr.v1.Entry(); - if (object.key != null) - message.key = String(object.key); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an Entry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {google.cloud.backupdr.v1.Entry} message Entry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Entry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.key != null && message.hasOwnProperty("key")) { - object.key = message.key; - if (options.oneofs) - object._key = "key"; - } - if (message.value != null && message.hasOwnProperty("value")) { - object.value = message.value; - if (options.oneofs) - object._value = "value"; - } - return object; - }; - - /** - * Converts this Entry to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Entry - * @instance - * @returns {Object.} JSON object - */ - Entry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Entry - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Entry"; - }; - - return Entry; - })(); - - v1.Metadata = (function() { - - /** - * Properties of a Metadata. - * @memberof google.cloud.backupdr.v1 - * @interface IMetadata - * @property {Array.|null} [items] Metadata items - */ - - /** - * Constructs a new Metadata. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a Metadata. - * @implements IMetadata - * @constructor - * @param {google.cloud.backupdr.v1.IMetadata=} [properties] Properties to set - */ - function Metadata(properties) { - this.items = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Metadata items. - * @member {Array.} items - * @memberof google.cloud.backupdr.v1.Metadata - * @instance - */ - Metadata.prototype.items = $util.emptyArray; - - /** - * Creates a new Metadata instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {google.cloud.backupdr.v1.IMetadata=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Metadata} Metadata instance - */ - Metadata.create = function create(properties) { - return new Metadata(properties); - }; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {google.cloud.backupdr.v1.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.items != null && message.items.length) - for (var i = 0; i < message.items.length; ++i) - $root.google.cloud.backupdr.v1.Entry.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {google.cloud.backupdr.v1.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decode = function 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.backupdr.v1.Metadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.items && message.items.length)) - message.items = []; - message.items.push($root.google.cloud.backupdr.v1.Entry.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Metadata message. - * @function verify - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.items != null && message.hasOwnProperty("items")) { - if (!Array.isArray(message.items)) - return "items: array expected"; - for (var i = 0; i < message.items.length; ++i) { - var error = $root.google.cloud.backupdr.v1.Entry.verify(message.items[i]); - if (error) - return "items." + error; - } - } - return null; - }; - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Metadata} Metadata - */ - Metadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Metadata) - return object; - var message = new $root.google.cloud.backupdr.v1.Metadata(); - if (object.items) { - if (!Array.isArray(object.items)) - throw TypeError(".google.cloud.backupdr.v1.Metadata.items: array expected"); - message.items = []; - for (var i = 0; i < object.items.length; ++i) { - if (typeof object.items[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.Metadata.items: object expected"); - message.items[i] = $root.google.cloud.backupdr.v1.Entry.fromObject(object.items[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {google.cloud.backupdr.v1.Metadata} message Metadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.items = []; - if (message.items && message.items.length) { - object.items = []; - for (var j = 0; j < message.items.length; ++j) - object.items[j] = $root.google.cloud.backupdr.v1.Entry.toObject(message.items[j], options); - } - return object; - }; - - /** - * Converts this Metadata to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Metadata - * @instance - * @returns {Object.} JSON object - */ - Metadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Metadata - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Metadata"; - }; - - return Metadata; - })(); - - v1.NetworkInterface = (function() { - - /** - * Properties of a NetworkInterface. - * @memberof google.cloud.backupdr.v1 - * @interface INetworkInterface - * @property {string|null} [network] NetworkInterface network - * @property {string|null} [subnetwork] NetworkInterface subnetwork - * @property {string|null} [ipAddress] NetworkInterface ipAddress - * @property {string|null} [ipv6Address] NetworkInterface ipv6Address - * @property {number|null} [internalIpv6PrefixLength] NetworkInterface internalIpv6PrefixLength - * @property {string|null} [name] NetworkInterface name - * @property {Array.|null} [accessConfigs] NetworkInterface accessConfigs - * @property {Array.|null} [ipv6AccessConfigs] NetworkInterface ipv6AccessConfigs - * @property {Array.|null} [aliasIpRanges] NetworkInterface aliasIpRanges - * @property {google.cloud.backupdr.v1.NetworkInterface.StackType|null} [stackType] NetworkInterface stackType - * @property {google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null} [ipv6AccessType] NetworkInterface ipv6AccessType - * @property {number|null} [queueCount] NetworkInterface queueCount - * @property {google.cloud.backupdr.v1.NetworkInterface.NicType|null} [nicType] NetworkInterface nicType - * @property {string|null} [networkAttachment] NetworkInterface networkAttachment - */ - - /** - * Constructs a new NetworkInterface. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a NetworkInterface. - * @implements INetworkInterface - * @constructor - * @param {google.cloud.backupdr.v1.INetworkInterface=} [properties] Properties to set - */ - function NetworkInterface(properties) { - this.accessConfigs = []; - this.ipv6AccessConfigs = []; - this.aliasIpRanges = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkInterface network. - * @member {string|null|undefined} network - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.network = null; - - /** - * NetworkInterface subnetwork. - * @member {string|null|undefined} subnetwork - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.subnetwork = null; - - /** - * NetworkInterface ipAddress. - * @member {string|null|undefined} ipAddress - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.ipAddress = null; - - /** - * NetworkInterface ipv6Address. - * @member {string|null|undefined} ipv6Address - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.ipv6Address = null; - - /** - * NetworkInterface internalIpv6PrefixLength. - * @member {number|null|undefined} internalIpv6PrefixLength - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.internalIpv6PrefixLength = null; - - /** - * NetworkInterface name. - * @member {string|null|undefined} name - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.name = null; - - /** - * NetworkInterface accessConfigs. - * @member {Array.} accessConfigs - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.accessConfigs = $util.emptyArray; - - /** - * NetworkInterface ipv6AccessConfigs. - * @member {Array.} ipv6AccessConfigs - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.ipv6AccessConfigs = $util.emptyArray; - - /** - * NetworkInterface aliasIpRanges. - * @member {Array.} aliasIpRanges - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.aliasIpRanges = $util.emptyArray; - - /** - * NetworkInterface stackType. - * @member {google.cloud.backupdr.v1.NetworkInterface.StackType|null|undefined} stackType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.stackType = null; - - /** - * NetworkInterface ipv6AccessType. - * @member {google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null|undefined} ipv6AccessType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.ipv6AccessType = null; - - /** - * NetworkInterface queueCount. - * @member {number|null|undefined} queueCount - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.queueCount = null; - - /** - * NetworkInterface nicType. - * @member {google.cloud.backupdr.v1.NetworkInterface.NicType|null|undefined} nicType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.nicType = null; - - /** - * NetworkInterface networkAttachment. - * @member {string|null|undefined} networkAttachment - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.networkAttachment = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NetworkInterface _network. - * @member {"network"|undefined} _network - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_network", { - get: $util.oneOfGetter($oneOfFields = ["network"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _subnetwork. - * @member {"subnetwork"|undefined} _subnetwork - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_subnetwork", { - get: $util.oneOfGetter($oneOfFields = ["subnetwork"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _ipAddress. - * @member {"ipAddress"|undefined} _ipAddress - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_ipAddress", { - get: $util.oneOfGetter($oneOfFields = ["ipAddress"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _ipv6Address. - * @member {"ipv6Address"|undefined} _ipv6Address - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_ipv6Address", { - get: $util.oneOfGetter($oneOfFields = ["ipv6Address"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _internalIpv6PrefixLength. - * @member {"internalIpv6PrefixLength"|undefined} _internalIpv6PrefixLength - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_internalIpv6PrefixLength", { - get: $util.oneOfGetter($oneOfFields = ["internalIpv6PrefixLength"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _name. - * @member {"name"|undefined} _name - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _stackType. - * @member {"stackType"|undefined} _stackType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_stackType", { - get: $util.oneOfGetter($oneOfFields = ["stackType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _ipv6AccessType. - * @member {"ipv6AccessType"|undefined} _ipv6AccessType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_ipv6AccessType", { - get: $util.oneOfGetter($oneOfFields = ["ipv6AccessType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _queueCount. - * @member {"queueCount"|undefined} _queueCount - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_queueCount", { - get: $util.oneOfGetter($oneOfFields = ["queueCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _nicType. - * @member {"nicType"|undefined} _nicType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_nicType", { - get: $util.oneOfGetter($oneOfFields = ["nicType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _networkAttachment. - * @member {"networkAttachment"|undefined} _networkAttachment - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_networkAttachment", { - get: $util.oneOfGetter($oneOfFields = ["networkAttachment"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NetworkInterface instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {google.cloud.backupdr.v1.INetworkInterface=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface instance - */ - NetworkInterface.create = function create(properties) { - return new NetworkInterface(properties); - }; - - /** - * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {google.cloud.backupdr.v1.INetworkInterface} message NetworkInterface message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkInterface.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); - if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetwork); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); - if (message.ipv6Address != null && Object.hasOwnProperty.call(message, "ipv6Address")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipv6Address); - if (message.internalIpv6PrefixLength != null && Object.hasOwnProperty.call(message, "internalIpv6PrefixLength")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.internalIpv6PrefixLength); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - if (message.accessConfigs != null && message.accessConfigs.length) - for (var i = 0; i < message.accessConfigs.length; ++i) - $root.google.cloud.backupdr.v1.AccessConfig.encode(message.accessConfigs[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.ipv6AccessConfigs != null && message.ipv6AccessConfigs.length) - for (var i = 0; i < message.ipv6AccessConfigs.length; ++i) - $root.google.cloud.backupdr.v1.AccessConfig.encode(message.ipv6AccessConfigs[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.aliasIpRanges != null && message.aliasIpRanges.length) - for (var i = 0; i < message.aliasIpRanges.length; ++i) - $root.google.cloud.backupdr.v1.AliasIpRange.encode(message.aliasIpRanges[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.stackType != null && Object.hasOwnProperty.call(message, "stackType")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.stackType); - if (message.ipv6AccessType != null && Object.hasOwnProperty.call(message, "ipv6AccessType")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.ipv6AccessType); - if (message.queueCount != null && Object.hasOwnProperty.call(message, "queueCount")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.queueCount); - if (message.nicType != null && Object.hasOwnProperty.call(message, "nicType")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.nicType); - if (message.networkAttachment != null && Object.hasOwnProperty.call(message, "networkAttachment")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.networkAttachment); - return writer; - }; - - /** - * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {google.cloud.backupdr.v1.INetworkInterface} message NetworkInterface message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkInterface.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkInterface message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkInterface.decode = function 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.backupdr.v1.NetworkInterface(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.network = reader.string(); - break; - } - case 2: { - message.subnetwork = reader.string(); - break; - } - case 3: { - message.ipAddress = reader.string(); - break; - } - case 4: { - message.ipv6Address = reader.string(); - break; - } - case 5: { - message.internalIpv6PrefixLength = reader.int32(); - break; - } - case 6: { - message.name = reader.string(); - break; - } - case 7: { - if (!(message.accessConfigs && message.accessConfigs.length)) - message.accessConfigs = []; - message.accessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.ipv6AccessConfigs && message.ipv6AccessConfigs.length)) - message.ipv6AccessConfigs = []; - message.ipv6AccessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader, reader.uint32())); - break; - } - case 9: { - if (!(message.aliasIpRanges && message.aliasIpRanges.length)) - message.aliasIpRanges = []; - message.aliasIpRanges.push($root.google.cloud.backupdr.v1.AliasIpRange.decode(reader, reader.uint32())); - break; - } - case 10: { - message.stackType = reader.int32(); - break; - } - case 11: { - message.ipv6AccessType = reader.int32(); - break; - } - case 12: { - message.queueCount = reader.int32(); - break; - } - case 13: { - message.nicType = reader.int32(); - break; - } - case 14: { - message.networkAttachment = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkInterface.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkInterface message. - * @function verify - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkInterface.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.network != null && message.hasOwnProperty("network")) { - properties._network = 1; - if (!$util.isString(message.network)) - return "network: string expected"; - } - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { - properties._subnetwork = 1; - if (!$util.isString(message.subnetwork)) - return "subnetwork: string expected"; - } - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) { - properties._ipAddress = 1; - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - } - if (message.ipv6Address != null && message.hasOwnProperty("ipv6Address")) { - properties._ipv6Address = 1; - if (!$util.isString(message.ipv6Address)) - return "ipv6Address: string expected"; - } - if (message.internalIpv6PrefixLength != null && message.hasOwnProperty("internalIpv6PrefixLength")) { - properties._internalIpv6PrefixLength = 1; - if (!$util.isInteger(message.internalIpv6PrefixLength)) - return "internalIpv6PrefixLength: integer expected"; - } - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.accessConfigs != null && message.hasOwnProperty("accessConfigs")) { - if (!Array.isArray(message.accessConfigs)) - return "accessConfigs: array expected"; - for (var i = 0; i < message.accessConfigs.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AccessConfig.verify(message.accessConfigs[i]); - if (error) - return "accessConfigs." + error; - } - } - if (message.ipv6AccessConfigs != null && message.hasOwnProperty("ipv6AccessConfigs")) { - if (!Array.isArray(message.ipv6AccessConfigs)) - return "ipv6AccessConfigs: array expected"; - for (var i = 0; i < message.ipv6AccessConfigs.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AccessConfig.verify(message.ipv6AccessConfigs[i]); - if (error) - return "ipv6AccessConfigs." + error; - } - } - if (message.aliasIpRanges != null && message.hasOwnProperty("aliasIpRanges")) { - if (!Array.isArray(message.aliasIpRanges)) - return "aliasIpRanges: array expected"; - for (var i = 0; i < message.aliasIpRanges.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AliasIpRange.verify(message.aliasIpRanges[i]); - if (error) - return "aliasIpRanges." + error; - } - } - if (message.stackType != null && message.hasOwnProperty("stackType")) { - properties._stackType = 1; - switch (message.stackType) { - default: - return "stackType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { - properties._ipv6AccessType = 1; - switch (message.ipv6AccessType) { - default: - return "ipv6AccessType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.queueCount != null && message.hasOwnProperty("queueCount")) { - properties._queueCount = 1; - if (!$util.isInteger(message.queueCount)) - return "queueCount: integer expected"; - } - if (message.nicType != null && message.hasOwnProperty("nicType")) { - properties._nicType = 1; - switch (message.nicType) { - default: - return "nicType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) { - properties._networkAttachment = 1; - if (!$util.isString(message.networkAttachment)) - return "networkAttachment: string expected"; - } - return null; - }; - - /** - * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface - */ - NetworkInterface.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.NetworkInterface) - return object; - var message = new $root.google.cloud.backupdr.v1.NetworkInterface(); - if (object.network != null) - message.network = String(object.network); - if (object.subnetwork != null) - message.subnetwork = String(object.subnetwork); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.ipv6Address != null) - message.ipv6Address = String(object.ipv6Address); - if (object.internalIpv6PrefixLength != null) - message.internalIpv6PrefixLength = object.internalIpv6PrefixLength | 0; - if (object.name != null) - message.name = String(object.name); - if (object.accessConfigs) { - if (!Array.isArray(object.accessConfigs)) - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: array expected"); - message.accessConfigs = []; - for (var i = 0; i < object.accessConfigs.length; ++i) { - if (typeof object.accessConfigs[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: object expected"); - message.accessConfigs[i] = $root.google.cloud.backupdr.v1.AccessConfig.fromObject(object.accessConfigs[i]); - } - } - if (object.ipv6AccessConfigs) { - if (!Array.isArray(object.ipv6AccessConfigs)) - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.ipv6AccessConfigs: array expected"); - message.ipv6AccessConfigs = []; - for (var i = 0; i < object.ipv6AccessConfigs.length; ++i) { - if (typeof object.ipv6AccessConfigs[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.ipv6AccessConfigs: object expected"); - message.ipv6AccessConfigs[i] = $root.google.cloud.backupdr.v1.AccessConfig.fromObject(object.ipv6AccessConfigs[i]); - } - } - if (object.aliasIpRanges) { - if (!Array.isArray(object.aliasIpRanges)) - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.aliasIpRanges: array expected"); - message.aliasIpRanges = []; - for (var i = 0; i < object.aliasIpRanges.length; ++i) { - if (typeof object.aliasIpRanges[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.aliasIpRanges: object expected"); - message.aliasIpRanges[i] = $root.google.cloud.backupdr.v1.AliasIpRange.fromObject(object.aliasIpRanges[i]); - } - } - switch (object.stackType) { - default: - if (typeof object.stackType === "number") { - message.stackType = object.stackType; - break; - } - break; - case "STACK_TYPE_UNSPECIFIED": - case 0: - message.stackType = 0; - break; - case "IPV4_ONLY": - case 1: - message.stackType = 1; - break; - case "IPV4_IPV6": - case 2: - message.stackType = 2; - break; - } - switch (object.ipv6AccessType) { - default: - if (typeof object.ipv6AccessType === "number") { - message.ipv6AccessType = object.ipv6AccessType; - break; - } - break; - case "UNSPECIFIED_IPV6_ACCESS_TYPE": - case 0: - message.ipv6AccessType = 0; - break; - case "INTERNAL": - case 1: - message.ipv6AccessType = 1; - break; - case "EXTERNAL": - case 2: - message.ipv6AccessType = 2; - break; - } - if (object.queueCount != null) - message.queueCount = object.queueCount | 0; - switch (object.nicType) { - default: - if (typeof object.nicType === "number") { - message.nicType = object.nicType; - break; - } - break; - case "NIC_TYPE_UNSPECIFIED": - case 0: - message.nicType = 0; - break; - case "VIRTIO_NET": - case 1: - message.nicType = 1; - break; - case "GVNIC": - case 2: - message.nicType = 2; - break; - } - if (object.networkAttachment != null) - message.networkAttachment = String(object.networkAttachment); - return message; - }; - - /** - * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {google.cloud.backupdr.v1.NetworkInterface} message NetworkInterface - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkInterface.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.accessConfigs = []; - object.ipv6AccessConfigs = []; - object.aliasIpRanges = []; - } - if (message.network != null && message.hasOwnProperty("network")) { - object.network = message.network; - if (options.oneofs) - object._network = "network"; - } - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { - object.subnetwork = message.subnetwork; - if (options.oneofs) - object._subnetwork = "subnetwork"; - } - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) { - object.ipAddress = message.ipAddress; - if (options.oneofs) - object._ipAddress = "ipAddress"; - } - if (message.ipv6Address != null && message.hasOwnProperty("ipv6Address")) { - object.ipv6Address = message.ipv6Address; - if (options.oneofs) - object._ipv6Address = "ipv6Address"; - } - if (message.internalIpv6PrefixLength != null && message.hasOwnProperty("internalIpv6PrefixLength")) { - object.internalIpv6PrefixLength = message.internalIpv6PrefixLength; - if (options.oneofs) - object._internalIpv6PrefixLength = "internalIpv6PrefixLength"; - } - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.accessConfigs && message.accessConfigs.length) { - object.accessConfigs = []; - for (var j = 0; j < message.accessConfigs.length; ++j) - object.accessConfigs[j] = $root.google.cloud.backupdr.v1.AccessConfig.toObject(message.accessConfigs[j], options); - } - if (message.ipv6AccessConfigs && message.ipv6AccessConfigs.length) { - object.ipv6AccessConfigs = []; - for (var j = 0; j < message.ipv6AccessConfigs.length; ++j) - object.ipv6AccessConfigs[j] = $root.google.cloud.backupdr.v1.AccessConfig.toObject(message.ipv6AccessConfigs[j], options); - } - if (message.aliasIpRanges && message.aliasIpRanges.length) { - object.aliasIpRanges = []; - for (var j = 0; j < message.aliasIpRanges.length; ++j) - object.aliasIpRanges[j] = $root.google.cloud.backupdr.v1.AliasIpRange.toObject(message.aliasIpRanges[j], options); - } - if (message.stackType != null && message.hasOwnProperty("stackType")) { - object.stackType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.StackType[message.stackType] === undefined ? message.stackType : $root.google.cloud.backupdr.v1.NetworkInterface.StackType[message.stackType] : message.stackType; - if (options.oneofs) - object._stackType = "stackType"; - } - if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { - object.ipv6AccessType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType[message.ipv6AccessType] === undefined ? message.ipv6AccessType : $root.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType[message.ipv6AccessType] : message.ipv6AccessType; - if (options.oneofs) - object._ipv6AccessType = "ipv6AccessType"; - } - if (message.queueCount != null && message.hasOwnProperty("queueCount")) { - object.queueCount = message.queueCount; - if (options.oneofs) - object._queueCount = "queueCount"; - } - if (message.nicType != null && message.hasOwnProperty("nicType")) { - object.nicType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.NicType[message.nicType] === undefined ? message.nicType : $root.google.cloud.backupdr.v1.NetworkInterface.NicType[message.nicType] : message.nicType; - if (options.oneofs) - object._nicType = "nicType"; - } - if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) { - object.networkAttachment = message.networkAttachment; - if (options.oneofs) - object._networkAttachment = "networkAttachment"; - } - return object; - }; - - /** - * Converts this NetworkInterface to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - * @returns {Object.} JSON object - */ - NetworkInterface.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkInterface - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkInterface.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkInterface"; - }; - - /** - * StackType enum. - * @name google.cloud.backupdr.v1.NetworkInterface.StackType - * @enum {number} - * @property {number} STACK_TYPE_UNSPECIFIED=0 STACK_TYPE_UNSPECIFIED value - * @property {number} IPV4_ONLY=1 IPV4_ONLY value - * @property {number} IPV4_IPV6=2 IPV4_IPV6 value - */ - NetworkInterface.StackType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STACK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IPV4_ONLY"] = 1; - values[valuesById[2] = "IPV4_IPV6"] = 2; - return values; - })(); - - /** - * Ipv6AccessType enum. - * @name google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType - * @enum {number} - * @property {number} UNSPECIFIED_IPV6_ACCESS_TYPE=0 UNSPECIFIED_IPV6_ACCESS_TYPE value - * @property {number} INTERNAL=1 INTERNAL value - * @property {number} EXTERNAL=2 EXTERNAL value - */ - NetworkInterface.Ipv6AccessType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED_IPV6_ACCESS_TYPE"] = 0; - values[valuesById[1] = "INTERNAL"] = 1; - values[valuesById[2] = "EXTERNAL"] = 2; - return values; - })(); - - /** - * NicType enum. - * @name google.cloud.backupdr.v1.NetworkInterface.NicType - * @enum {number} - * @property {number} NIC_TYPE_UNSPECIFIED=0 NIC_TYPE_UNSPECIFIED value - * @property {number} VIRTIO_NET=1 VIRTIO_NET value - * @property {number} GVNIC=2 GVNIC value - */ - NetworkInterface.NicType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NIC_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "VIRTIO_NET"] = 1; - values[valuesById[2] = "GVNIC"] = 2; - return values; - })(); - - return NetworkInterface; - })(); - - v1.NetworkPerformanceConfig = (function() { - - /** - * Properties of a NetworkPerformanceConfig. - * @memberof google.cloud.backupdr.v1 - * @interface INetworkPerformanceConfig - * @property {google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null} [totalEgressBandwidthTier] NetworkPerformanceConfig totalEgressBandwidthTier - */ - - /** - * Constructs a new NetworkPerformanceConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a NetworkPerformanceConfig. - * @implements INetworkPerformanceConfig - * @constructor - * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig=} [properties] Properties to set - */ - function NetworkPerformanceConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkPerformanceConfig totalEgressBandwidthTier. - * @member {google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null|undefined} totalEgressBandwidthTier - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @instance - */ - NetworkPerformanceConfig.prototype.totalEgressBandwidthTier = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NetworkPerformanceConfig _totalEgressBandwidthTier. - * @member {"totalEgressBandwidthTier"|undefined} _totalEgressBandwidthTier - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @instance - */ - Object.defineProperty(NetworkPerformanceConfig.prototype, "_totalEgressBandwidthTier", { - get: $util.oneOfGetter($oneOfFields = ["totalEgressBandwidthTier"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NetworkPerformanceConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig instance - */ - NetworkPerformanceConfig.create = function create(properties) { - return new NetworkPerformanceConfig(properties); - }; - - /** - * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkPerformanceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.totalEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "totalEgressBandwidthTier")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalEgressBandwidthTier); - return writer; - }; - - /** - * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkPerformanceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkPerformanceConfig.decode = function 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.backupdr.v1.NetworkPerformanceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.totalEgressBandwidthTier = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkPerformanceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkPerformanceConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkPerformanceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { - properties._totalEgressBandwidthTier = 1; - switch (message.totalEgressBandwidthTier) { - default: - return "totalEgressBandwidthTier: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig - */ - NetworkPerformanceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.NetworkPerformanceConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.NetworkPerformanceConfig(); - switch (object.totalEgressBandwidthTier) { - default: - if (typeof object.totalEgressBandwidthTier === "number") { - message.totalEgressBandwidthTier = object.totalEgressBandwidthTier; - break; - } - break; - case "TIER_UNSPECIFIED": - case 0: - message.totalEgressBandwidthTier = 0; - break; - case "DEFAULT": - case 1: - message.totalEgressBandwidthTier = 1; - break; - case "TIER_1": - case 2: - message.totalEgressBandwidthTier = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {google.cloud.backupdr.v1.NetworkPerformanceConfig} message NetworkPerformanceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkPerformanceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { - object.totalEgressBandwidthTier = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] === undefined ? message.totalEgressBandwidthTier : $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] : message.totalEgressBandwidthTier; - if (options.oneofs) - object._totalEgressBandwidthTier = "totalEgressBandwidthTier"; - } - return object; - }; - - /** - * Converts this NetworkPerformanceConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @instance - * @returns {Object.} JSON object - */ - NetworkPerformanceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkPerformanceConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkPerformanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkPerformanceConfig"; - }; - - /** - * Tier enum. - * @name google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier - * @enum {number} - * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value - * @property {number} DEFAULT=1 DEFAULT value - * @property {number} TIER_1=2 TIER_1 value - */ - NetworkPerformanceConfig.Tier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEFAULT"] = 1; - values[valuesById[2] = "TIER_1"] = 2; - return values; - })(); - - return NetworkPerformanceConfig; - })(); - - v1.AccessConfig = (function() { - - /** - * Properties of an AccessConfig. - * @memberof google.cloud.backupdr.v1 - * @interface IAccessConfig - * @property {google.cloud.backupdr.v1.AccessConfig.AccessType|null} [type] AccessConfig type - * @property {string|null} [name] AccessConfig name - * @property {string|null} [externalIp] AccessConfig externalIp - * @property {string|null} [externalIpv6] AccessConfig externalIpv6 - * @property {number|null} [externalIpv6PrefixLength] AccessConfig externalIpv6PrefixLength - * @property {boolean|null} [setPublicPtr] AccessConfig setPublicPtr - * @property {string|null} [publicPtrDomainName] AccessConfig publicPtrDomainName - * @property {google.cloud.backupdr.v1.AccessConfig.NetworkTier|null} [networkTier] AccessConfig networkTier - */ - - /** - * Constructs a new AccessConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AccessConfig. - * @implements IAccessConfig - * @constructor - * @param {google.cloud.backupdr.v1.IAccessConfig=} [properties] Properties to set - */ - function AccessConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AccessConfig type. - * @member {google.cloud.backupdr.v1.AccessConfig.AccessType|null|undefined} type - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.type = null; - - /** - * AccessConfig name. - * @member {string|null|undefined} name - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.name = null; - - /** - * AccessConfig externalIp. - * @member {string|null|undefined} externalIp - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.externalIp = null; - - /** - * AccessConfig externalIpv6. - * @member {string|null|undefined} externalIpv6 - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.externalIpv6 = null; - - /** - * AccessConfig externalIpv6PrefixLength. - * @member {number|null|undefined} externalIpv6PrefixLength - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.externalIpv6PrefixLength = null; - - /** - * AccessConfig setPublicPtr. - * @member {boolean|null|undefined} setPublicPtr - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.setPublicPtr = null; - - /** - * AccessConfig publicPtrDomainName. - * @member {string|null|undefined} publicPtrDomainName - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.publicPtrDomainName = null; - - /** - * AccessConfig networkTier. - * @member {google.cloud.backupdr.v1.AccessConfig.NetworkTier|null|undefined} networkTier - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.networkTier = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AccessConfig _type. - * @member {"type"|undefined} _type - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_type", { - get: $util.oneOfGetter($oneOfFields = ["type"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _name. - * @member {"name"|undefined} _name - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _externalIp. - * @member {"externalIp"|undefined} _externalIp - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_externalIp", { - get: $util.oneOfGetter($oneOfFields = ["externalIp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _externalIpv6. - * @member {"externalIpv6"|undefined} _externalIpv6 - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_externalIpv6", { - get: $util.oneOfGetter($oneOfFields = ["externalIpv6"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _externalIpv6PrefixLength. - * @member {"externalIpv6PrefixLength"|undefined} _externalIpv6PrefixLength - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_externalIpv6PrefixLength", { - get: $util.oneOfGetter($oneOfFields = ["externalIpv6PrefixLength"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _setPublicPtr. - * @member {"setPublicPtr"|undefined} _setPublicPtr - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_setPublicPtr", { - get: $util.oneOfGetter($oneOfFields = ["setPublicPtr"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _publicPtrDomainName. - * @member {"publicPtrDomainName"|undefined} _publicPtrDomainName - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_publicPtrDomainName", { - get: $util.oneOfGetter($oneOfFields = ["publicPtrDomainName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _networkTier. - * @member {"networkTier"|undefined} _networkTier - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_networkTier", { - get: $util.oneOfGetter($oneOfFields = ["networkTier"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AccessConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {google.cloud.backupdr.v1.IAccessConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig instance - */ - AccessConfig.create = function create(properties) { - return new AccessConfig(properties); - }; - - /** - * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {google.cloud.backupdr.v1.IAccessConfig} message AccessConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AccessConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.externalIp); - if (message.externalIpv6 != null && Object.hasOwnProperty.call(message, "externalIpv6")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.externalIpv6); - if (message.externalIpv6PrefixLength != null && Object.hasOwnProperty.call(message, "externalIpv6PrefixLength")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.externalIpv6PrefixLength); - if (message.setPublicPtr != null && Object.hasOwnProperty.call(message, "setPublicPtr")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.setPublicPtr); - if (message.publicPtrDomainName != null && Object.hasOwnProperty.call(message, "publicPtrDomainName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.publicPtrDomainName); - if (message.networkTier != null && Object.hasOwnProperty.call(message, "networkTier")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.networkTier); - return writer; - }; - - /** - * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {google.cloud.backupdr.v1.IAccessConfig} message AccessConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AccessConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AccessConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AccessConfig.decode = function 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.backupdr.v1.AccessConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - message.externalIp = reader.string(); - break; - } - case 4: { - message.externalIpv6 = reader.string(); - break; - } - case 5: { - message.externalIpv6PrefixLength = reader.int32(); - break; - } - case 6: { - message.setPublicPtr = reader.bool(); - break; - } - case 7: { - message.publicPtrDomainName = reader.string(); - break; - } - case 8: { - message.networkTier = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AccessConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AccessConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AccessConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AccessConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.type != null && message.hasOwnProperty("type")) { - properties._type = 1; - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.externalIp != null && message.hasOwnProperty("externalIp")) { - properties._externalIp = 1; - if (!$util.isString(message.externalIp)) - return "externalIp: string expected"; - } - if (message.externalIpv6 != null && message.hasOwnProperty("externalIpv6")) { - properties._externalIpv6 = 1; - if (!$util.isString(message.externalIpv6)) - return "externalIpv6: string expected"; - } - if (message.externalIpv6PrefixLength != null && message.hasOwnProperty("externalIpv6PrefixLength")) { - properties._externalIpv6PrefixLength = 1; - if (!$util.isInteger(message.externalIpv6PrefixLength)) - return "externalIpv6PrefixLength: integer expected"; - } - if (message.setPublicPtr != null && message.hasOwnProperty("setPublicPtr")) { - properties._setPublicPtr = 1; - if (typeof message.setPublicPtr !== "boolean") - return "setPublicPtr: boolean expected"; - } - if (message.publicPtrDomainName != null && message.hasOwnProperty("publicPtrDomainName")) { - properties._publicPtrDomainName = 1; - if (!$util.isString(message.publicPtrDomainName)) - return "publicPtrDomainName: string expected"; - } - if (message.networkTier != null && message.hasOwnProperty("networkTier")) { - properties._networkTier = 1; - switch (message.networkTier) { - default: - return "networkTier: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates an AccessConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig - */ - AccessConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AccessConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.AccessConfig(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "ACCESS_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "ONE_TO_ONE_NAT": - case 1: - message.type = 1; - break; - case "DIRECT_IPV6": - case 2: - message.type = 2; - break; - } - if (object.name != null) - message.name = String(object.name); - if (object.externalIp != null) - message.externalIp = String(object.externalIp); - if (object.externalIpv6 != null) - message.externalIpv6 = String(object.externalIpv6); - if (object.externalIpv6PrefixLength != null) - message.externalIpv6PrefixLength = object.externalIpv6PrefixLength | 0; - if (object.setPublicPtr != null) - message.setPublicPtr = Boolean(object.setPublicPtr); - if (object.publicPtrDomainName != null) - message.publicPtrDomainName = String(object.publicPtrDomainName); - switch (object.networkTier) { - default: - if (typeof object.networkTier === "number") { - message.networkTier = object.networkTier; - break; - } - break; - case "NETWORK_TIER_UNSPECIFIED": - case 0: - message.networkTier = 0; - break; - case "PREMIUM": - case 1: - message.networkTier = 1; - break; - case "STANDARD": - case 2: - message.networkTier = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {google.cloud.backupdr.v1.AccessConfig} message AccessConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AccessConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.type != null && message.hasOwnProperty("type")) { - object.type = options.enums === String ? $root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type] : message.type; - if (options.oneofs) - object._type = "type"; - } - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.externalIp != null && message.hasOwnProperty("externalIp")) { - object.externalIp = message.externalIp; - if (options.oneofs) - object._externalIp = "externalIp"; - } - if (message.externalIpv6 != null && message.hasOwnProperty("externalIpv6")) { - object.externalIpv6 = message.externalIpv6; - if (options.oneofs) - object._externalIpv6 = "externalIpv6"; - } - if (message.externalIpv6PrefixLength != null && message.hasOwnProperty("externalIpv6PrefixLength")) { - object.externalIpv6PrefixLength = message.externalIpv6PrefixLength; - if (options.oneofs) - object._externalIpv6PrefixLength = "externalIpv6PrefixLength"; - } - if (message.setPublicPtr != null && message.hasOwnProperty("setPublicPtr")) { - object.setPublicPtr = message.setPublicPtr; - if (options.oneofs) - object._setPublicPtr = "setPublicPtr"; - } - if (message.publicPtrDomainName != null && message.hasOwnProperty("publicPtrDomainName")) { - object.publicPtrDomainName = message.publicPtrDomainName; - if (options.oneofs) - object._publicPtrDomainName = "publicPtrDomainName"; - } - if (message.networkTier != null && message.hasOwnProperty("networkTier")) { - object.networkTier = options.enums === String ? $root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier] === undefined ? message.networkTier : $root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier] : message.networkTier; - if (options.oneofs) - object._networkTier = "networkTier"; - } - return object; - }; - - /** - * Converts this AccessConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - * @returns {Object.} JSON object - */ - AccessConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AccessConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AccessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AccessConfig"; - }; - - /** - * AccessType enum. - * @name google.cloud.backupdr.v1.AccessConfig.AccessType - * @enum {number} - * @property {number} ACCESS_TYPE_UNSPECIFIED=0 ACCESS_TYPE_UNSPECIFIED value - * @property {number} ONE_TO_ONE_NAT=1 ONE_TO_ONE_NAT value - * @property {number} DIRECT_IPV6=2 DIRECT_IPV6 value - */ - AccessConfig.AccessType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACCESS_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ONE_TO_ONE_NAT"] = 1; - values[valuesById[2] = "DIRECT_IPV6"] = 2; - return values; - })(); - - /** - * NetworkTier enum. - * @name google.cloud.backupdr.v1.AccessConfig.NetworkTier - * @enum {number} - * @property {number} NETWORK_TIER_UNSPECIFIED=0 NETWORK_TIER_UNSPECIFIED value - * @property {number} PREMIUM=1 PREMIUM value - * @property {number} STANDARD=2 STANDARD value - */ - AccessConfig.NetworkTier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NETWORK_TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "PREMIUM"] = 1; - values[valuesById[2] = "STANDARD"] = 2; - return values; - })(); - - return AccessConfig; - })(); - - v1.AliasIpRange = (function() { - - /** - * Properties of an AliasIpRange. - * @memberof google.cloud.backupdr.v1 - * @interface IAliasIpRange - * @property {string|null} [ipCidrRange] AliasIpRange ipCidrRange - * @property {string|null} [subnetworkRangeName] AliasIpRange subnetworkRangeName - */ - - /** - * Constructs a new AliasIpRange. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AliasIpRange. - * @implements IAliasIpRange - * @constructor - * @param {google.cloud.backupdr.v1.IAliasIpRange=} [properties] Properties to set - */ - function AliasIpRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AliasIpRange ipCidrRange. - * @member {string|null|undefined} ipCidrRange - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - */ - AliasIpRange.prototype.ipCidrRange = null; - - /** - * AliasIpRange subnetworkRangeName. - * @member {string|null|undefined} subnetworkRangeName - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - */ - AliasIpRange.prototype.subnetworkRangeName = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AliasIpRange _ipCidrRange. - * @member {"ipCidrRange"|undefined} _ipCidrRange - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - */ - Object.defineProperty(AliasIpRange.prototype, "_ipCidrRange", { - get: $util.oneOfGetter($oneOfFields = ["ipCidrRange"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AliasIpRange _subnetworkRangeName. - * @member {"subnetworkRangeName"|undefined} _subnetworkRangeName - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - */ - Object.defineProperty(AliasIpRange.prototype, "_subnetworkRangeName", { - get: $util.oneOfGetter($oneOfFields = ["subnetworkRangeName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AliasIpRange instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {google.cloud.backupdr.v1.IAliasIpRange=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange instance - */ - AliasIpRange.create = function create(properties) { - return new AliasIpRange(properties); - }; - - /** - * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {google.cloud.backupdr.v1.IAliasIpRange} message AliasIpRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AliasIpRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ipCidrRange != null && Object.hasOwnProperty.call(message, "ipCidrRange")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipCidrRange); - if (message.subnetworkRangeName != null && Object.hasOwnProperty.call(message, "subnetworkRangeName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetworkRangeName); - return writer; - }; - - /** - * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {google.cloud.backupdr.v1.IAliasIpRange} message AliasIpRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AliasIpRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AliasIpRange message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AliasIpRange.decode = function 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.backupdr.v1.AliasIpRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ipCidrRange = reader.string(); - break; - } - case 2: { - message.subnetworkRangeName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AliasIpRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AliasIpRange message. - * @function verify - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AliasIpRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) { - properties._ipCidrRange = 1; - if (!$util.isString(message.ipCidrRange)) - return "ipCidrRange: string expected"; - } - if (message.subnetworkRangeName != null && message.hasOwnProperty("subnetworkRangeName")) { - properties._subnetworkRangeName = 1; - if (!$util.isString(message.subnetworkRangeName)) - return "subnetworkRangeName: string expected"; - } - return null; - }; - - /** - * Creates an AliasIpRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange - */ - AliasIpRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AliasIpRange) - return object; - var message = new $root.google.cloud.backupdr.v1.AliasIpRange(); - if (object.ipCidrRange != null) - message.ipCidrRange = String(object.ipCidrRange); - if (object.subnetworkRangeName != null) - message.subnetworkRangeName = String(object.subnetworkRangeName); - return message; - }; - - /** - * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {google.cloud.backupdr.v1.AliasIpRange} message AliasIpRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AliasIpRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) { - object.ipCidrRange = message.ipCidrRange; - if (options.oneofs) - object._ipCidrRange = "ipCidrRange"; - } - if (message.subnetworkRangeName != null && message.hasOwnProperty("subnetworkRangeName")) { - object.subnetworkRangeName = message.subnetworkRangeName; - if (options.oneofs) - object._subnetworkRangeName = "subnetworkRangeName"; - } - return object; - }; - - /** - * Converts this AliasIpRange to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - * @returns {Object.} JSON object - */ - AliasIpRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AliasIpRange - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AliasIpRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AliasIpRange"; - }; - - return AliasIpRange; - })(); - - v1.InstanceParams = (function() { - - /** - * Properties of an InstanceParams. - * @memberof google.cloud.backupdr.v1 - * @interface IInstanceParams - * @property {Object.|null} [resourceManagerTags] InstanceParams resourceManagerTags - */ - - /** - * Constructs a new InstanceParams. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an InstanceParams. - * @implements IInstanceParams - * @constructor - * @param {google.cloud.backupdr.v1.IInstanceParams=} [properties] Properties to set - */ - function InstanceParams(properties) { - this.resourceManagerTags = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InstanceParams resourceManagerTags. - * @member {Object.} resourceManagerTags - * @memberof google.cloud.backupdr.v1.InstanceParams - * @instance - */ - InstanceParams.prototype.resourceManagerTags = $util.emptyObject; - - /** - * Creates a new InstanceParams instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {google.cloud.backupdr.v1.IInstanceParams=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams instance - */ - InstanceParams.create = function create(properties) { - return new InstanceParams(properties); - }; - - /** - * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {google.cloud.backupdr.v1.IInstanceParams} message InstanceParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) - for (var keys = Object.keys(message.resourceManagerTags), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceManagerTags[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {google.cloud.backupdr.v1.IInstanceParams} message InstanceParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InstanceParams message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceParams.decode = function 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.backupdr.v1.InstanceParams(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.resourceManagerTags === $util.emptyObject) - message.resourceManagerTags = {}; - 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.resourceManagerTags[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InstanceParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InstanceParams message. - * @function verify - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InstanceParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { - if (!$util.isObject(message.resourceManagerTags)) - return "resourceManagerTags: object expected"; - var key = Object.keys(message.resourceManagerTags); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.resourceManagerTags[key[i]])) - return "resourceManagerTags: string{k:string} expected"; - } - return null; - }; - - /** - * Creates an InstanceParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams - */ - InstanceParams.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.InstanceParams) - return object; - var message = new $root.google.cloud.backupdr.v1.InstanceParams(); - if (object.resourceManagerTags) { - if (typeof object.resourceManagerTags !== "object") - throw TypeError(".google.cloud.backupdr.v1.InstanceParams.resourceManagerTags: object expected"); - message.resourceManagerTags = {}; - for (var keys = Object.keys(object.resourceManagerTags), i = 0; i < keys.length; ++i) - message.resourceManagerTags[keys[i]] = String(object.resourceManagerTags[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {google.cloud.backupdr.v1.InstanceParams} message InstanceParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InstanceParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.resourceManagerTags = {}; - var keys2; - if (message.resourceManagerTags && (keys2 = Object.keys(message.resourceManagerTags)).length) { - object.resourceManagerTags = {}; - for (var j = 0; j < keys2.length; ++j) - object.resourceManagerTags[keys2[j]] = message.resourceManagerTags[keys2[j]]; - } - return object; - }; - - /** - * Converts this InstanceParams to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.InstanceParams - * @instance - * @returns {Object.} JSON object - */ - InstanceParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InstanceParams - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InstanceParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.InstanceParams"; - }; - - return InstanceParams; - })(); - - v1.AllocationAffinity = (function() { - - /** - * Properties of an AllocationAffinity. - * @memberof google.cloud.backupdr.v1 - * @interface IAllocationAffinity - * @property {google.cloud.backupdr.v1.AllocationAffinity.Type|null} [consumeAllocationType] AllocationAffinity consumeAllocationType - * @property {string|null} [key] AllocationAffinity key - * @property {Array.|null} [values] AllocationAffinity values - */ - - /** - * Constructs a new AllocationAffinity. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AllocationAffinity. - * @implements IAllocationAffinity - * @constructor - * @param {google.cloud.backupdr.v1.IAllocationAffinity=} [properties] Properties to set - */ - function AllocationAffinity(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AllocationAffinity consumeAllocationType. - * @member {google.cloud.backupdr.v1.AllocationAffinity.Type|null|undefined} consumeAllocationType - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - AllocationAffinity.prototype.consumeAllocationType = null; - - /** - * AllocationAffinity key. - * @member {string|null|undefined} key - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - AllocationAffinity.prototype.key = null; - - /** - * AllocationAffinity values. - * @member {Array.} values - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - AllocationAffinity.prototype.values = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AllocationAffinity _consumeAllocationType. - * @member {"consumeAllocationType"|undefined} _consumeAllocationType - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - Object.defineProperty(AllocationAffinity.prototype, "_consumeAllocationType", { - get: $util.oneOfGetter($oneOfFields = ["consumeAllocationType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AllocationAffinity _key. - * @member {"key"|undefined} _key - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - Object.defineProperty(AllocationAffinity.prototype, "_key", { - get: $util.oneOfGetter($oneOfFields = ["key"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AllocationAffinity instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {google.cloud.backupdr.v1.IAllocationAffinity=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity instance - */ - AllocationAffinity.create = function create(properties) { - return new AllocationAffinity(properties); - }; - - /** - * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {google.cloud.backupdr.v1.IAllocationAffinity} message AllocationAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AllocationAffinity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consumeAllocationType != null && Object.hasOwnProperty.call(message, "consumeAllocationType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumeAllocationType); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); - return writer; - }; - - /** - * Encodes the specified AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {google.cloud.backupdr.v1.IAllocationAffinity} message AllocationAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AllocationAffinity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AllocationAffinity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AllocationAffinity.decode = function 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.backupdr.v1.AllocationAffinity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.consumeAllocationType = reader.int32(); - break; - } - case 2: { - message.key = reader.string(); - break; - } - case 3: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AllocationAffinity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AllocationAffinity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AllocationAffinity message. - * @function verify - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AllocationAffinity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.consumeAllocationType != null && message.hasOwnProperty("consumeAllocationType")) { - properties._consumeAllocationType = 1; - switch (message.consumeAllocationType) { - default: - return "consumeAllocationType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.key != null && message.hasOwnProperty("key")) { - properties._key = 1; - if (!$util.isString(message.key)) - return "key: string expected"; - } - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - return null; - }; - - /** - * Creates an AllocationAffinity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity - */ - AllocationAffinity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AllocationAffinity) - return object; - var message = new $root.google.cloud.backupdr.v1.AllocationAffinity(); - switch (object.consumeAllocationType) { - default: - if (typeof object.consumeAllocationType === "number") { - message.consumeAllocationType = object.consumeAllocationType; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.consumeAllocationType = 0; - break; - case "NO_RESERVATION": - case 1: - message.consumeAllocationType = 1; - break; - case "ANY_RESERVATION": - case 2: - message.consumeAllocationType = 2; - break; - case "SPECIFIC_RESERVATION": - case 3: - message.consumeAllocationType = 3; - break; - } - if (object.key != null) - message.key = String(object.key); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.cloud.backupdr.v1.AllocationAffinity.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - return message; - }; - - /** - * Creates a plain object from an AllocationAffinity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {google.cloud.backupdr.v1.AllocationAffinity} message AllocationAffinity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AllocationAffinity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.consumeAllocationType != null && message.hasOwnProperty("consumeAllocationType")) { - object.consumeAllocationType = options.enums === String ? $root.google.cloud.backupdr.v1.AllocationAffinity.Type[message.consumeAllocationType] === undefined ? message.consumeAllocationType : $root.google.cloud.backupdr.v1.AllocationAffinity.Type[message.consumeAllocationType] : message.consumeAllocationType; - if (options.oneofs) - object._consumeAllocationType = "consumeAllocationType"; - } - if (message.key != null && message.hasOwnProperty("key")) { - object.key = message.key; - if (options.oneofs) - object._key = "key"; - } - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - return object; - }; - - /** - * Converts this AllocationAffinity to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - * @returns {Object.} JSON object - */ - AllocationAffinity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AllocationAffinity - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AllocationAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AllocationAffinity"; - }; - - /** - * Type enum. - * @name google.cloud.backupdr.v1.AllocationAffinity.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} NO_RESERVATION=1 NO_RESERVATION value - * @property {number} ANY_RESERVATION=2 ANY_RESERVATION value - * @property {number} SPECIFIC_RESERVATION=3 SPECIFIC_RESERVATION value - */ - AllocationAffinity.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NO_RESERVATION"] = 1; - values[valuesById[2] = "ANY_RESERVATION"] = 2; - values[valuesById[3] = "SPECIFIC_RESERVATION"] = 3; - return values; - })(); - - return AllocationAffinity; - })(); - - v1.Scheduling = (function() { - - /** - * Properties of a Scheduling. - * @memberof google.cloud.backupdr.v1 - * @interface IScheduling - * @property {google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null} [onHostMaintenance] Scheduling onHostMaintenance - * @property {boolean|null} [automaticRestart] Scheduling automaticRestart - * @property {boolean|null} [preemptible] Scheduling preemptible - * @property {Array.|null} [nodeAffinities] Scheduling nodeAffinities - * @property {number|null} [minNodeCpus] Scheduling minNodeCpus - * @property {google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null} [provisioningModel] Scheduling provisioningModel - * @property {google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null} [instanceTerminationAction] Scheduling instanceTerminationAction - * @property {google.cloud.backupdr.v1.ISchedulingDuration|null} [localSsdRecoveryTimeout] Scheduling localSsdRecoveryTimeout - */ - - /** - * Constructs a new Scheduling. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a Scheduling. - * @implements IScheduling - * @constructor - * @param {google.cloud.backupdr.v1.IScheduling=} [properties] Properties to set - */ - function Scheduling(properties) { - this.nodeAffinities = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Scheduling onHostMaintenance. - * @member {google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null|undefined} onHostMaintenance - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.onHostMaintenance = null; - - /** - * Scheduling automaticRestart. - * @member {boolean|null|undefined} automaticRestart - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.automaticRestart = null; - - /** - * Scheduling preemptible. - * @member {boolean|null|undefined} preemptible - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.preemptible = null; - - /** - * Scheduling nodeAffinities. - * @member {Array.} nodeAffinities - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.nodeAffinities = $util.emptyArray; - - /** - * Scheduling minNodeCpus. - * @member {number|null|undefined} minNodeCpus - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.minNodeCpus = null; - - /** - * Scheduling provisioningModel. - * @member {google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null|undefined} provisioningModel - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.provisioningModel = null; - - /** - * Scheduling instanceTerminationAction. - * @member {google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null|undefined} instanceTerminationAction - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.instanceTerminationAction = null; - - /** - * Scheduling localSsdRecoveryTimeout. - * @member {google.cloud.backupdr.v1.ISchedulingDuration|null|undefined} localSsdRecoveryTimeout - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.localSsdRecoveryTimeout = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Scheduling _onHostMaintenance. - * @member {"onHostMaintenance"|undefined} _onHostMaintenance - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_onHostMaintenance", { - get: $util.oneOfGetter($oneOfFields = ["onHostMaintenance"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _automaticRestart. - * @member {"automaticRestart"|undefined} _automaticRestart - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_automaticRestart", { - get: $util.oneOfGetter($oneOfFields = ["automaticRestart"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _preemptible. - * @member {"preemptible"|undefined} _preemptible - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_preemptible", { - get: $util.oneOfGetter($oneOfFields = ["preemptible"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _minNodeCpus. - * @member {"minNodeCpus"|undefined} _minNodeCpus - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_minNodeCpus", { - get: $util.oneOfGetter($oneOfFields = ["minNodeCpus"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _provisioningModel. - * @member {"provisioningModel"|undefined} _provisioningModel - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_provisioningModel", { - get: $util.oneOfGetter($oneOfFields = ["provisioningModel"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _instanceTerminationAction. - * @member {"instanceTerminationAction"|undefined} _instanceTerminationAction - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_instanceTerminationAction", { - get: $util.oneOfGetter($oneOfFields = ["instanceTerminationAction"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _localSsdRecoveryTimeout. - * @member {"localSsdRecoveryTimeout"|undefined} _localSsdRecoveryTimeout - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_localSsdRecoveryTimeout", { - get: $util.oneOfGetter($oneOfFields = ["localSsdRecoveryTimeout"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Scheduling instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {google.cloud.backupdr.v1.IScheduling=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling instance - */ - Scheduling.create = function create(properties) { - return new Scheduling(properties); - }; - - /** - * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {google.cloud.backupdr.v1.IScheduling} message Scheduling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Scheduling.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.onHostMaintenance != null && Object.hasOwnProperty.call(message, "onHostMaintenance")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.onHostMaintenance); - if (message.automaticRestart != null && Object.hasOwnProperty.call(message, "automaticRestart")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.automaticRestart); - if (message.preemptible != null && Object.hasOwnProperty.call(message, "preemptible")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preemptible); - if (message.nodeAffinities != null && message.nodeAffinities.length) - for (var i = 0; i < message.nodeAffinities.length; ++i) - $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.encode(message.nodeAffinities[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.minNodeCpus != null && Object.hasOwnProperty.call(message, "minNodeCpus")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.minNodeCpus); - if (message.provisioningModel != null && Object.hasOwnProperty.call(message, "provisioningModel")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.provisioningModel); - if (message.instanceTerminationAction != null && Object.hasOwnProperty.call(message, "instanceTerminationAction")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.instanceTerminationAction); - if (message.localSsdRecoveryTimeout != null && Object.hasOwnProperty.call(message, "localSsdRecoveryTimeout")) - $root.google.cloud.backupdr.v1.SchedulingDuration.encode(message.localSsdRecoveryTimeout, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {google.cloud.backupdr.v1.IScheduling} message Scheduling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Scheduling.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Scheduling message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Scheduling.decode = function 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.backupdr.v1.Scheduling(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.onHostMaintenance = reader.int32(); - break; - } - case 2: { - message.automaticRestart = reader.bool(); - break; - } - case 3: { - message.preemptible = reader.bool(); - break; - } - case 4: { - if (!(message.nodeAffinities && message.nodeAffinities.length)) - message.nodeAffinities = []; - message.nodeAffinities.push($root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.decode(reader, reader.uint32())); - break; - } - case 5: { - message.minNodeCpus = reader.int32(); - break; - } - case 6: { - message.provisioningModel = reader.int32(); - break; - } - case 7: { - message.instanceTerminationAction = reader.int32(); - break; - } - case 10: { - message.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Scheduling message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Scheduling.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Scheduling message. - * @function verify - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Scheduling.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.onHostMaintenance != null && message.hasOwnProperty("onHostMaintenance")) { - properties._onHostMaintenance = 1; - switch (message.onHostMaintenance) { - default: - return "onHostMaintenance: enum value expected"; - case 0: - case 1: - case 1000: - break; - } - } - if (message.automaticRestart != null && message.hasOwnProperty("automaticRestart")) { - properties._automaticRestart = 1; - if (typeof message.automaticRestart !== "boolean") - return "automaticRestart: boolean expected"; - } - if (message.preemptible != null && message.hasOwnProperty("preemptible")) { - properties._preemptible = 1; - if (typeof message.preemptible !== "boolean") - return "preemptible: boolean expected"; - } - if (message.nodeAffinities != null && message.hasOwnProperty("nodeAffinities")) { - if (!Array.isArray(message.nodeAffinities)) - return "nodeAffinities: array expected"; - for (var i = 0; i < message.nodeAffinities.length; ++i) { - var error = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify(message.nodeAffinities[i]); - if (error) - return "nodeAffinities." + error; - } - } - if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { - properties._minNodeCpus = 1; - if (!$util.isInteger(message.minNodeCpus)) - return "minNodeCpus: integer expected"; - } - if (message.provisioningModel != null && message.hasOwnProperty("provisioningModel")) { - properties._provisioningModel = 1; - switch (message.provisioningModel) { - default: - return "provisioningModel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.instanceTerminationAction != null && message.hasOwnProperty("instanceTerminationAction")) { - properties._instanceTerminationAction = 1; - switch (message.instanceTerminationAction) { - default: - return "instanceTerminationAction: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.localSsdRecoveryTimeout != null && message.hasOwnProperty("localSsdRecoveryTimeout")) { - properties._localSsdRecoveryTimeout = 1; - { - var error = $root.google.cloud.backupdr.v1.SchedulingDuration.verify(message.localSsdRecoveryTimeout); - if (error) - return "localSsdRecoveryTimeout." + error; - } - } - return null; - }; - - /** - * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling - */ - Scheduling.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Scheduling) - return object; - var message = new $root.google.cloud.backupdr.v1.Scheduling(); - switch (object.onHostMaintenance) { - default: - if (typeof object.onHostMaintenance === "number") { - message.onHostMaintenance = object.onHostMaintenance; - break; - } - break; - case "ON_HOST_MAINTENANCE_UNSPECIFIED": - case 0: - message.onHostMaintenance = 0; - break; - case "TERMINATE": - case 1: - message.onHostMaintenance = 1; - break; - case "MIGRATE": - case 1000: - message.onHostMaintenance = 1000; - break; - } - if (object.automaticRestart != null) - message.automaticRestart = Boolean(object.automaticRestart); - if (object.preemptible != null) - message.preemptible = Boolean(object.preemptible); - if (object.nodeAffinities) { - if (!Array.isArray(object.nodeAffinities)) - throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: array expected"); - message.nodeAffinities = []; - for (var i = 0; i < object.nodeAffinities.length; ++i) { - if (typeof object.nodeAffinities[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: object expected"); - message.nodeAffinities[i] = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.fromObject(object.nodeAffinities[i]); - } - } - if (object.minNodeCpus != null) - message.minNodeCpus = object.minNodeCpus | 0; - switch (object.provisioningModel) { - default: - if (typeof object.provisioningModel === "number") { - message.provisioningModel = object.provisioningModel; - break; - } - break; - case "PROVISIONING_MODEL_UNSPECIFIED": - case 0: - message.provisioningModel = 0; - break; - case "STANDARD": - case 1: - message.provisioningModel = 1; - break; - case "SPOT": - case 2: - message.provisioningModel = 2; - break; - } - switch (object.instanceTerminationAction) { - default: - if (typeof object.instanceTerminationAction === "number") { - message.instanceTerminationAction = object.instanceTerminationAction; - break; - } - break; - case "INSTANCE_TERMINATION_ACTION_UNSPECIFIED": - case 0: - message.instanceTerminationAction = 0; - break; - case "DELETE": - case 1: - message.instanceTerminationAction = 1; - break; - case "STOP": - case 2: - message.instanceTerminationAction = 2; - break; - } - if (object.localSsdRecoveryTimeout != null) { - if (typeof object.localSsdRecoveryTimeout !== "object") - throw TypeError(".google.cloud.backupdr.v1.Scheduling.localSsdRecoveryTimeout: object expected"); - message.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.fromObject(object.localSsdRecoveryTimeout); - } - return message; - }; - - /** - * Creates a plain object from a Scheduling message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {google.cloud.backupdr.v1.Scheduling} message Scheduling - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Scheduling.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.nodeAffinities = []; - if (message.onHostMaintenance != null && message.hasOwnProperty("onHostMaintenance")) { - object.onHostMaintenance = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.OnHostMaintenance[message.onHostMaintenance] === undefined ? message.onHostMaintenance : $root.google.cloud.backupdr.v1.Scheduling.OnHostMaintenance[message.onHostMaintenance] : message.onHostMaintenance; - if (options.oneofs) - object._onHostMaintenance = "onHostMaintenance"; - } - if (message.automaticRestart != null && message.hasOwnProperty("automaticRestart")) { - object.automaticRestart = message.automaticRestart; - if (options.oneofs) - object._automaticRestart = "automaticRestart"; - } - if (message.preemptible != null && message.hasOwnProperty("preemptible")) { - object.preemptible = message.preemptible; - if (options.oneofs) - object._preemptible = "preemptible"; - } - if (message.nodeAffinities && message.nodeAffinities.length) { - object.nodeAffinities = []; - for (var j = 0; j < message.nodeAffinities.length; ++j) - object.nodeAffinities[j] = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.toObject(message.nodeAffinities[j], options); - } - if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { - object.minNodeCpus = message.minNodeCpus; - if (options.oneofs) - object._minNodeCpus = "minNodeCpus"; - } - if (message.provisioningModel != null && message.hasOwnProperty("provisioningModel")) { - object.provisioningModel = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.ProvisioningModel[message.provisioningModel] === undefined ? message.provisioningModel : $root.google.cloud.backupdr.v1.Scheduling.ProvisioningModel[message.provisioningModel] : message.provisioningModel; - if (options.oneofs) - object._provisioningModel = "provisioningModel"; - } - if (message.instanceTerminationAction != null && message.hasOwnProperty("instanceTerminationAction")) { - object.instanceTerminationAction = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction[message.instanceTerminationAction] === undefined ? message.instanceTerminationAction : $root.google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction[message.instanceTerminationAction] : message.instanceTerminationAction; - if (options.oneofs) - object._instanceTerminationAction = "instanceTerminationAction"; - } - if (message.localSsdRecoveryTimeout != null && message.hasOwnProperty("localSsdRecoveryTimeout")) { - object.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.toObject(message.localSsdRecoveryTimeout, options); - if (options.oneofs) - object._localSsdRecoveryTimeout = "localSsdRecoveryTimeout"; - } - return object; - }; - - /** - * Converts this Scheduling to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - * @returns {Object.} JSON object - */ - Scheduling.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Scheduling - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Scheduling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Scheduling"; - }; - - /** - * OnHostMaintenance enum. - * @name google.cloud.backupdr.v1.Scheduling.OnHostMaintenance - * @enum {number} - * @property {number} ON_HOST_MAINTENANCE_UNSPECIFIED=0 ON_HOST_MAINTENANCE_UNSPECIFIED value - * @property {number} TERMINATE=1 TERMINATE value - * @property {number} MIGRATE=1000 MIGRATE value - */ - Scheduling.OnHostMaintenance = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ON_HOST_MAINTENANCE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TERMINATE"] = 1; - values[valuesById[1000] = "MIGRATE"] = 1000; - return values; - })(); - - Scheduling.NodeAffinity = (function() { - - /** - * Properties of a NodeAffinity. - * @memberof google.cloud.backupdr.v1.Scheduling - * @interface INodeAffinity - * @property {string|null} [key] NodeAffinity key - * @property {google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null} [operator] NodeAffinity operator - * @property {Array.|null} [values] NodeAffinity values - */ - - /** - * Constructs a new NodeAffinity. - * @memberof google.cloud.backupdr.v1.Scheduling - * @classdesc Represents a NodeAffinity. - * @implements INodeAffinity - * @constructor - * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity=} [properties] Properties to set - */ - function NodeAffinity(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeAffinity key. - * @member {string|null|undefined} key - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - NodeAffinity.prototype.key = null; - - /** - * NodeAffinity operator. - * @member {google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null|undefined} operator - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - NodeAffinity.prototype.operator = null; - - /** - * NodeAffinity values. - * @member {Array.} values - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - NodeAffinity.prototype.values = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NodeAffinity _key. - * @member {"key"|undefined} _key - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - Object.defineProperty(NodeAffinity.prototype, "_key", { - get: $util.oneOfGetter($oneOfFields = ["key"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NodeAffinity _operator. - * @member {"operator"|undefined} _operator - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - Object.defineProperty(NodeAffinity.prototype, "_operator", { - get: $util.oneOfGetter($oneOfFields = ["operator"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NodeAffinity instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity instance - */ - NodeAffinity.create = function create(properties) { - return new NodeAffinity(properties); - }; - - /** - * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity} message NodeAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeAffinity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.operator != null && Object.hasOwnProperty.call(message, "operator")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operator); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); - return writer; - }; - - /** - * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity} message NodeAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeAffinity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeAffinity.decode = function 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.backupdr.v1.Scheduling.NodeAffinity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.key = reader.string(); - break; - } - case 2: { - message.operator = reader.int32(); - break; - } - case 3: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeAffinity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeAffinity message. - * @function verify - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeAffinity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.key != null && message.hasOwnProperty("key")) { - properties._key = 1; - if (!$util.isString(message.key)) - return "key: string expected"; - } - if (message.operator != null && message.hasOwnProperty("operator")) { - properties._operator = 1; - switch (message.operator) { - default: - return "operator: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - return null; - }; - - /** - * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity - */ - NodeAffinity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity) - return object; - var message = new $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity(); - if (object.key != null) - message.key = String(object.key); - switch (object.operator) { - default: - if (typeof object.operator === "number") { - message.operator = object.operator; - break; - } - break; - case "OPERATOR_UNSPECIFIED": - case 0: - message.operator = 0; - break; - case "IN": - case 1: - message.operator = 1; - break; - case "NOT_IN": - case 2: - message.operator = 2; - break; - } - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.cloud.backupdr.v1.Scheduling.NodeAffinity.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - return message; - }; - - /** - * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {google.cloud.backupdr.v1.Scheduling.NodeAffinity} message NodeAffinity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeAffinity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.key != null && message.hasOwnProperty("key")) { - object.key = message.key; - if (options.oneofs) - object._key = "key"; - } - if (message.operator != null && message.hasOwnProperty("operator")) { - object.operator = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator[message.operator] === undefined ? message.operator : $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator[message.operator] : message.operator; - if (options.oneofs) - object._operator = "operator"; - } - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - return object; - }; - - /** - * Converts this NodeAffinity to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - * @returns {Object.} JSON object - */ - NodeAffinity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeAffinity - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Scheduling.NodeAffinity"; - }; - - /** - * Operator enum. - * @name google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator - * @enum {number} - * @property {number} OPERATOR_UNSPECIFIED=0 OPERATOR_UNSPECIFIED value - * @property {number} IN=1 IN value - * @property {number} NOT_IN=2 NOT_IN value - */ - NodeAffinity.Operator = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OPERATOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "IN"] = 1; - values[valuesById[2] = "NOT_IN"] = 2; - return values; - })(); - - return NodeAffinity; - })(); - - /** - * ProvisioningModel enum. - * @name google.cloud.backupdr.v1.Scheduling.ProvisioningModel - * @enum {number} - * @property {number} PROVISIONING_MODEL_UNSPECIFIED=0 PROVISIONING_MODEL_UNSPECIFIED value - * @property {number} STANDARD=1 STANDARD value - * @property {number} SPOT=2 SPOT value - */ - Scheduling.ProvisioningModel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROVISIONING_MODEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "STANDARD"] = 1; - values[valuesById[2] = "SPOT"] = 2; - return values; - })(); - - /** - * InstanceTerminationAction enum. - * @name google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction - * @enum {number} - * @property {number} INSTANCE_TERMINATION_ACTION_UNSPECIFIED=0 INSTANCE_TERMINATION_ACTION_UNSPECIFIED value - * @property {number} DELETE=1 DELETE value - * @property {number} STOP=2 STOP value - */ - Scheduling.InstanceTerminationAction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INSTANCE_TERMINATION_ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "DELETE"] = 1; - values[valuesById[2] = "STOP"] = 2; - return values; - })(); - - return Scheduling; - })(); - - v1.SchedulingDuration = (function() { - - /** - * Properties of a SchedulingDuration. - * @memberof google.cloud.backupdr.v1 - * @interface ISchedulingDuration - * @property {number|Long|null} [seconds] SchedulingDuration seconds - * @property {number|null} [nanos] SchedulingDuration nanos - */ - - /** - * Constructs a new SchedulingDuration. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a SchedulingDuration. - * @implements ISchedulingDuration - * @constructor - * @param {google.cloud.backupdr.v1.ISchedulingDuration=} [properties] Properties to set - */ - function SchedulingDuration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SchedulingDuration seconds. - * @member {number|Long|null|undefined} seconds - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - */ - SchedulingDuration.prototype.seconds = null; - - /** - * SchedulingDuration nanos. - * @member {number|null|undefined} nanos - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - */ - SchedulingDuration.prototype.nanos = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SchedulingDuration _seconds. - * @member {"seconds"|undefined} _seconds - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - */ - Object.defineProperty(SchedulingDuration.prototype, "_seconds", { - get: $util.oneOfGetter($oneOfFields = ["seconds"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * SchedulingDuration _nanos. - * @member {"nanos"|undefined} _nanos - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - */ - Object.defineProperty(SchedulingDuration.prototype, "_nanos", { - get: $util.oneOfGetter($oneOfFields = ["nanos"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SchedulingDuration instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {google.cloud.backupdr.v1.ISchedulingDuration=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration instance - */ - SchedulingDuration.create = function create(properties) { - return new SchedulingDuration(properties); - }; - - /** - * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {google.cloud.backupdr.v1.ISchedulingDuration} message SchedulingDuration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchedulingDuration.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 SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {google.cloud.backupdr.v1.ISchedulingDuration} message SchedulingDuration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchedulingDuration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SchedulingDuration message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchedulingDuration.decode = function 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.backupdr.v1.SchedulingDuration(); - 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 SchedulingDuration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchedulingDuration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SchedulingDuration message. - * @function verify - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SchedulingDuration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.seconds != null && message.hasOwnProperty("seconds")) { - properties._seconds = 1; - 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")) { - properties._nanos = 1; - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - } - return null; - }; - - /** - * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration - */ - SchedulingDuration.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.SchedulingDuration) - return object; - var message = new $root.google.cloud.backupdr.v1.SchedulingDuration(); - 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 SchedulingDuration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {google.cloud.backupdr.v1.SchedulingDuration} message SchedulingDuration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SchedulingDuration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - 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 (options.oneofs) - object._seconds = "seconds"; - } - if (message.nanos != null && message.hasOwnProperty("nanos")) { - object.nanos = message.nanos; - if (options.oneofs) - object._nanos = "nanos"; - } - return object; - }; - - /** - * Converts this SchedulingDuration to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - * @returns {Object.} JSON object - */ - SchedulingDuration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SchedulingDuration - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SchedulingDuration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.SchedulingDuration"; - }; - - return SchedulingDuration; - })(); - - v1.ServiceAccount = (function() { - - /** - * Properties of a ServiceAccount. - * @memberof google.cloud.backupdr.v1 - * @interface IServiceAccount - * @property {string|null} [email] ServiceAccount email - * @property {Array.|null} [scopes] ServiceAccount scopes - */ - - /** - * Constructs a new ServiceAccount. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ServiceAccount. - * @implements IServiceAccount - * @constructor - * @param {google.cloud.backupdr.v1.IServiceAccount=} [properties] Properties to set - */ - function ServiceAccount(properties) { - this.scopes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceAccount email. - * @member {string|null|undefined} email - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @instance - */ - ServiceAccount.prototype.email = null; - - /** - * ServiceAccount scopes. - * @member {Array.} scopes - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @instance - */ - ServiceAccount.prototype.scopes = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ServiceAccount _email. - * @member {"email"|undefined} _email - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @instance - */ - Object.defineProperty(ServiceAccount.prototype, "_email", { - get: $util.oneOfGetter($oneOfFields = ["email"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ServiceAccount instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {google.cloud.backupdr.v1.IServiceAccount=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount instance - */ - ServiceAccount.create = function create(properties) { - return new ServiceAccount(properties); - }; - - /** - * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {google.cloud.backupdr.v1.IServiceAccount} message ServiceAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.email != null && Object.hasOwnProperty.call(message, "email")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.email); - if (message.scopes != null && message.scopes.length) - for (var i = 0; i < message.scopes.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.scopes[i]); - return writer; - }; - - /** - * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {google.cloud.backupdr.v1.IServiceAccount} message ServiceAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceAccount message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceAccount.decode = function 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.backupdr.v1.ServiceAccount(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.email = reader.string(); - break; - } - case 2: { - if (!(message.scopes && message.scopes.length)) - message.scopes = []; - message.scopes.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceAccount message. - * @function verify - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.email != null && message.hasOwnProperty("email")) { - properties._email = 1; - if (!$util.isString(message.email)) - return "email: string expected"; - } - if (message.scopes != null && message.hasOwnProperty("scopes")) { - if (!Array.isArray(message.scopes)) - return "scopes: array expected"; - for (var i = 0; i < message.scopes.length; ++i) - if (!$util.isString(message.scopes[i])) - return "scopes: string[] expected"; - } - return null; - }; - - /** - * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount - */ - ServiceAccount.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ServiceAccount) - return object; - var message = new $root.google.cloud.backupdr.v1.ServiceAccount(); - if (object.email != null) - message.email = String(object.email); - if (object.scopes) { - if (!Array.isArray(object.scopes)) - throw TypeError(".google.cloud.backupdr.v1.ServiceAccount.scopes: array expected"); - message.scopes = []; - for (var i = 0; i < object.scopes.length; ++i) - message.scopes[i] = String(object.scopes[i]); - } - return message; - }; - - /** - * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {google.cloud.backupdr.v1.ServiceAccount} message ServiceAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.scopes = []; - if (message.email != null && message.hasOwnProperty("email")) { - object.email = message.email; - if (options.oneofs) - object._email = "email"; - } - if (message.scopes && message.scopes.length) { - object.scopes = []; - for (var j = 0; j < message.scopes.length; ++j) - object.scopes[j] = message.scopes[j]; - } - return object; - }; - - /** - * Converts this ServiceAccount to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @instance - * @returns {Object.} JSON object - */ - ServiceAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceAccount - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceAccount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ServiceAccount"; - }; - - return ServiceAccount; - })(); - - v1.Tags = (function() { - - /** - * Properties of a Tags. - * @memberof google.cloud.backupdr.v1 - * @interface ITags - * @property {Array.|null} [items] Tags items - */ - - /** - * Constructs a new Tags. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a Tags. - * @implements ITags - * @constructor - * @param {google.cloud.backupdr.v1.ITags=} [properties] Properties to set - */ - function Tags(properties) { - this.items = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Tags items. - * @member {Array.} items - * @memberof google.cloud.backupdr.v1.Tags - * @instance - */ - Tags.prototype.items = $util.emptyArray; - - /** - * Creates a new Tags instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {google.cloud.backupdr.v1.ITags=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Tags} Tags instance - */ - Tags.create = function create(properties) { - return new Tags(properties); - }; - - /** - * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {google.cloud.backupdr.v1.ITags} message Tags message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tags.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.items != null && message.items.length) - for (var i = 0; i < message.items.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.items[i]); - return writer; - }; - - /** - * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {google.cloud.backupdr.v1.ITags} message Tags message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tags.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Tags message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Tags} Tags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tags.decode = function 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.backupdr.v1.Tags(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.items && message.items.length)) - message.items = []; - message.items.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Tags message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Tags} Tags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tags.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Tags message. - * @function verify - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Tags.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.items != null && message.hasOwnProperty("items")) { - if (!Array.isArray(message.items)) - return "items: array expected"; - for (var i = 0; i < message.items.length; ++i) - if (!$util.isString(message.items[i])) - return "items: string[] expected"; - } - return null; - }; - - /** - * Creates a Tags message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Tags} Tags - */ - Tags.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Tags) - return object; - var message = new $root.google.cloud.backupdr.v1.Tags(); - if (object.items) { - if (!Array.isArray(object.items)) - throw TypeError(".google.cloud.backupdr.v1.Tags.items: array expected"); - message.items = []; - for (var i = 0; i < object.items.length; ++i) - message.items[i] = String(object.items[i]); - } - return message; - }; - - /** - * Creates a plain object from a Tags message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {google.cloud.backupdr.v1.Tags} message Tags - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Tags.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.items = []; - if (message.items && message.items.length) { - object.items = []; - for (var j = 0; j < message.items.length; ++j) - object.items[j] = message.items[j]; - } - return object; - }; - - /** - * Converts this Tags to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Tags - * @instance - * @returns {Object.} JSON object - */ - Tags.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Tags - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Tags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Tags"; - }; - - return Tags; - })(); - - v1.AttachedDisk = (function() { - - /** - * Properties of an AttachedDisk. - * @memberof google.cloud.backupdr.v1 - * @interface IAttachedDisk - * @property {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null} [initializeParams] AttachedDisk initializeParams - * @property {string|null} [deviceName] AttachedDisk deviceName - * @property {string|null} [kind] AttachedDisk kind - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskType|null} [diskTypeDeprecated] AttachedDisk diskTypeDeprecated - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskMode|null} [mode] AttachedDisk mode - * @property {string|null} [source] AttachedDisk source - * @property {number|Long|null} [index] AttachedDisk index - * @property {boolean|null} [boot] AttachedDisk boot - * @property {boolean|null} [autoDelete] AttachedDisk autoDelete - * @property {Array.|null} [license] AttachedDisk license - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null} [diskInterface] AttachedDisk diskInterface - * @property {Array.|null} [guestOsFeature] AttachedDisk guestOsFeature - * @property {google.cloud.backupdr.v1.ICustomerEncryptionKey|null} [diskEncryptionKey] AttachedDisk diskEncryptionKey - * @property {number|Long|null} [diskSizeGb] AttachedDisk diskSizeGb - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null} [savedState] AttachedDisk savedState - * @property {string|null} [diskType] AttachedDisk diskType - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskType|null} [type] AttachedDisk type - */ - - /** - * Constructs a new AttachedDisk. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AttachedDisk. - * @implements IAttachedDisk - * @constructor - * @param {google.cloud.backupdr.v1.IAttachedDisk=} [properties] Properties to set - */ - function AttachedDisk(properties) { - this.license = []; - this.guestOsFeature = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AttachedDisk initializeParams. - * @member {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null|undefined} initializeParams - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.initializeParams = null; - - /** - * AttachedDisk deviceName. - * @member {string|null|undefined} deviceName - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.deviceName = null; - - /** - * AttachedDisk kind. - * @member {string|null|undefined} kind - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.kind = null; - - /** - * AttachedDisk diskTypeDeprecated. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskType|null|undefined} diskTypeDeprecated - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskTypeDeprecated = null; - - /** - * AttachedDisk mode. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskMode|null|undefined} mode - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.mode = null; - - /** - * AttachedDisk source. - * @member {string|null|undefined} source - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.source = null; - - /** - * AttachedDisk index. - * @member {number|Long|null|undefined} index - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.index = null; - - /** - * AttachedDisk boot. - * @member {boolean|null|undefined} boot - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.boot = null; - - /** - * AttachedDisk autoDelete. - * @member {boolean|null|undefined} autoDelete - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.autoDelete = null; - - /** - * AttachedDisk license. - * @member {Array.} license - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.license = $util.emptyArray; - - /** - * AttachedDisk diskInterface. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null|undefined} diskInterface - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskInterface = null; - - /** - * AttachedDisk guestOsFeature. - * @member {Array.} guestOsFeature - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.guestOsFeature = $util.emptyArray; - - /** - * AttachedDisk diskEncryptionKey. - * @member {google.cloud.backupdr.v1.ICustomerEncryptionKey|null|undefined} diskEncryptionKey - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskEncryptionKey = null; - - /** - * AttachedDisk diskSizeGb. - * @member {number|Long|null|undefined} diskSizeGb - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskSizeGb = null; - - /** - * AttachedDisk savedState. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null|undefined} savedState - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.savedState = null; - - /** - * AttachedDisk diskType. - * @member {string|null|undefined} diskType - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskType = null; - - /** - * AttachedDisk type. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskType|null|undefined} type - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.type = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AttachedDisk _initializeParams. - * @member {"initializeParams"|undefined} _initializeParams - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_initializeParams", { - get: $util.oneOfGetter($oneOfFields = ["initializeParams"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _deviceName. - * @member {"deviceName"|undefined} _deviceName - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_deviceName", { - get: $util.oneOfGetter($oneOfFields = ["deviceName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _kind. - * @member {"kind"|undefined} _kind - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_kind", { - get: $util.oneOfGetter($oneOfFields = ["kind"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskTypeDeprecated. - * @member {"diskTypeDeprecated"|undefined} _diskTypeDeprecated - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskTypeDeprecated", { - get: $util.oneOfGetter($oneOfFields = ["diskTypeDeprecated"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _mode. - * @member {"mode"|undefined} _mode - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_mode", { - get: $util.oneOfGetter($oneOfFields = ["mode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _source. - * @member {"source"|undefined} _source - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_source", { - get: $util.oneOfGetter($oneOfFields = ["source"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _index. - * @member {"index"|undefined} _index - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_index", { - get: $util.oneOfGetter($oneOfFields = ["index"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _boot. - * @member {"boot"|undefined} _boot - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_boot", { - get: $util.oneOfGetter($oneOfFields = ["boot"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _autoDelete. - * @member {"autoDelete"|undefined} _autoDelete - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_autoDelete", { - get: $util.oneOfGetter($oneOfFields = ["autoDelete"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskInterface. - * @member {"diskInterface"|undefined} _diskInterface - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskInterface", { - get: $util.oneOfGetter($oneOfFields = ["diskInterface"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskEncryptionKey. - * @member {"diskEncryptionKey"|undefined} _diskEncryptionKey - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskEncryptionKey", { - get: $util.oneOfGetter($oneOfFields = ["diskEncryptionKey"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskSizeGb. - * @member {"diskSizeGb"|undefined} _diskSizeGb - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskSizeGb", { - get: $util.oneOfGetter($oneOfFields = ["diskSizeGb"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _savedState. - * @member {"savedState"|undefined} _savedState - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_savedState", { - get: $util.oneOfGetter($oneOfFields = ["savedState"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskType. - * @member {"diskType"|undefined} _diskType - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskType", { - get: $util.oneOfGetter($oneOfFields = ["diskType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _type. - * @member {"type"|undefined} _type - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_type", { - get: $util.oneOfGetter($oneOfFields = ["type"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AttachedDisk instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {google.cloud.backupdr.v1.IAttachedDisk=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk instance - */ - AttachedDisk.create = function create(properties) { - return new AttachedDisk(properties); - }; - - /** - * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {google.cloud.backupdr.v1.IAttachedDisk} message AttachedDisk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AttachedDisk.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initializeParams != null && Object.hasOwnProperty.call(message, "initializeParams")) - $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.encode(message.initializeParams, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.deviceName); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.kind); - if (message.diskTypeDeprecated != null && Object.hasOwnProperty.call(message, "diskTypeDeprecated")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.diskTypeDeprecated); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.mode); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.source); - if (message.index != null && Object.hasOwnProperty.call(message, "index")) - writer.uint32(/* id 9, wireType 0 =*/72).int64(message.index); - if (message.boot != null && Object.hasOwnProperty.call(message, "boot")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.boot); - if (message.autoDelete != null && Object.hasOwnProperty.call(message, "autoDelete")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.autoDelete); - if (message.license != null && message.license.length) - for (var i = 0; i < message.license.length; ++i) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.license[i]); - if (message.diskInterface != null && Object.hasOwnProperty.call(message, "diskInterface")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.diskInterface); - if (message.guestOsFeature != null && message.guestOsFeature.length) - for (var i = 0; i < message.guestOsFeature.length; ++i) - $root.google.cloud.backupdr.v1.GuestOsFeature.encode(message.guestOsFeature[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.diskEncryptionKey != null && Object.hasOwnProperty.call(message, "diskEncryptionKey")) - $root.google.cloud.backupdr.v1.CustomerEncryptionKey.encode(message.diskEncryptionKey, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) - writer.uint32(/* id 16, wireType 0 =*/128).int64(message.diskSizeGb); - if (message.savedState != null && Object.hasOwnProperty.call(message, "savedState")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.savedState); - if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.diskType); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.type); - return writer; - }; - - /** - * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {google.cloud.backupdr.v1.IAttachedDisk} message AttachedDisk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AttachedDisk.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AttachedDisk message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AttachedDisk.decode = function 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.backupdr.v1.AttachedDisk(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.decode(reader, reader.uint32()); - break; - } - case 4: { - message.deviceName = reader.string(); - break; - } - case 5: { - message.kind = reader.string(); - break; - } - case 6: { - message.diskTypeDeprecated = reader.int32(); - break; - } - case 7: { - message.mode = reader.int32(); - break; - } - case 8: { - message.source = reader.string(); - break; - } - case 9: { - message.index = reader.int64(); - break; - } - case 10: { - message.boot = reader.bool(); - break; - } - case 11: { - message.autoDelete = reader.bool(); - break; - } - case 12: { - if (!(message.license && message.license.length)) - message.license = []; - message.license.push(reader.string()); - break; - } - case 13: { - message.diskInterface = reader.int32(); - break; - } - case 14: { - if (!(message.guestOsFeature && message.guestOsFeature.length)) - message.guestOsFeature = []; - message.guestOsFeature.push($root.google.cloud.backupdr.v1.GuestOsFeature.decode(reader, reader.uint32())); - break; - } - case 15: { - message.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader, reader.uint32()); - break; - } - case 16: { - message.diskSizeGb = reader.int64(); - break; - } - case 17: { - message.savedState = reader.int32(); - break; - } - case 18: { - message.diskType = reader.string(); - break; - } - case 19: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AttachedDisk.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AttachedDisk message. - * @function verify - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AttachedDisk.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.initializeParams != null && message.hasOwnProperty("initializeParams")) { - properties._initializeParams = 1; - { - var error = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify(message.initializeParams); - if (error) - return "initializeParams." + error; - } - } - if (message.deviceName != null && message.hasOwnProperty("deviceName")) { - properties._deviceName = 1; - if (!$util.isString(message.deviceName)) - return "deviceName: string expected"; - } - if (message.kind != null && message.hasOwnProperty("kind")) { - properties._kind = 1; - if (!$util.isString(message.kind)) - return "kind: string expected"; - } - if (message.diskTypeDeprecated != null && message.hasOwnProperty("diskTypeDeprecated")) { - properties._diskTypeDeprecated = 1; - switch (message.diskTypeDeprecated) { - default: - return "diskTypeDeprecated: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.mode != null && message.hasOwnProperty("mode")) { - properties._mode = 1; - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.source != null && message.hasOwnProperty("source")) { - properties._source = 1; - if (!$util.isString(message.source)) - return "source: string expected"; - } - if (message.index != null && message.hasOwnProperty("index")) { - properties._index = 1; - if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) - return "index: integer|Long expected"; - } - if (message.boot != null && message.hasOwnProperty("boot")) { - properties._boot = 1; - if (typeof message.boot !== "boolean") - return "boot: boolean expected"; - } - if (message.autoDelete != null && message.hasOwnProperty("autoDelete")) { - properties._autoDelete = 1; - if (typeof message.autoDelete !== "boolean") - return "autoDelete: boolean expected"; - } - if (message.license != null && message.hasOwnProperty("license")) { - if (!Array.isArray(message.license)) - return "license: array expected"; - for (var i = 0; i < message.license.length; ++i) - if (!$util.isString(message.license[i])) - return "license: string[] expected"; - } - if (message.diskInterface != null && message.hasOwnProperty("diskInterface")) { - properties._diskInterface = 1; - switch (message.diskInterface) { - default: - return "diskInterface: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.guestOsFeature != null && message.hasOwnProperty("guestOsFeature")) { - if (!Array.isArray(message.guestOsFeature)) - return "guestOsFeature: array expected"; - for (var i = 0; i < message.guestOsFeature.length; ++i) { - var error = $root.google.cloud.backupdr.v1.GuestOsFeature.verify(message.guestOsFeature[i]); - if (error) - return "guestOsFeature." + error; - } - } - if (message.diskEncryptionKey != null && message.hasOwnProperty("diskEncryptionKey")) { - properties._diskEncryptionKey = 1; - { - var error = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.verify(message.diskEncryptionKey); - if (error) - return "diskEncryptionKey." + error; - } - } - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) { - properties._diskSizeGb = 1; - if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) - return "diskSizeGb: integer|Long expected"; - } - if (message.savedState != null && message.hasOwnProperty("savedState")) { - properties._savedState = 1; - switch (message.savedState) { - default: - return "savedState: enum value expected"; - case 0: - case 1: - break; - } - } - if (message.diskType != null && message.hasOwnProperty("diskType")) { - properties._diskType = 1; - if (!$util.isString(message.diskType)) - return "diskType: string expected"; - } - if (message.type != null && message.hasOwnProperty("type")) { - properties._type = 1; - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates an AttachedDisk message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk - */ - AttachedDisk.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AttachedDisk) - return object; - var message = new $root.google.cloud.backupdr.v1.AttachedDisk(); - if (object.initializeParams != null) { - if (typeof object.initializeParams !== "object") - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.initializeParams: object expected"); - message.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.fromObject(object.initializeParams); - } - if (object.deviceName != null) - message.deviceName = String(object.deviceName); - if (object.kind != null) - message.kind = String(object.kind); - switch (object.diskTypeDeprecated) { - default: - if (typeof object.diskTypeDeprecated === "number") { - message.diskTypeDeprecated = object.diskTypeDeprecated; - break; - } - break; - case "DISK_TYPE_UNSPECIFIED": - case 0: - message.diskTypeDeprecated = 0; - break; - case "SCRATCH": - case 1: - message.diskTypeDeprecated = 1; - break; - case "PERSISTENT": - case 2: - message.diskTypeDeprecated = 2; - break; - } - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "DISK_MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "READ_WRITE": - case 1: - message.mode = 1; - break; - case "READ_ONLY": - case 2: - message.mode = 2; - break; - case "LOCKED": - case 3: - message.mode = 3; - break; - } - if (object.source != null) - message.source = String(object.source); - if (object.index != null) - if ($util.Long) - (message.index = $util.Long.fromValue(object.index)).unsigned = false; - else if (typeof object.index === "string") - message.index = parseInt(object.index, 10); - else if (typeof object.index === "number") - message.index = object.index; - else if (typeof object.index === "object") - message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); - if (object.boot != null) - message.boot = Boolean(object.boot); - if (object.autoDelete != null) - message.autoDelete = Boolean(object.autoDelete); - if (object.license) { - if (!Array.isArray(object.license)) - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.license: array expected"); - message.license = []; - for (var i = 0; i < object.license.length; ++i) - message.license[i] = String(object.license[i]); - } - switch (object.diskInterface) { - default: - if (typeof object.diskInterface === "number") { - message.diskInterface = object.diskInterface; - break; - } - break; - case "DISK_INTERFACE_UNSPECIFIED": - case 0: - message.diskInterface = 0; - break; - case "SCSI": - case 1: - message.diskInterface = 1; - break; - case "NVME": - case 2: - message.diskInterface = 2; - break; - case "NVDIMM": - case 3: - message.diskInterface = 3; - break; - case "ISCSI": - case 4: - message.diskInterface = 4; - break; - } - if (object.guestOsFeature) { - if (!Array.isArray(object.guestOsFeature)) - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.guestOsFeature: array expected"); - message.guestOsFeature = []; - for (var i = 0; i < object.guestOsFeature.length; ++i) { - if (typeof object.guestOsFeature[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.guestOsFeature: object expected"); - message.guestOsFeature[i] = $root.google.cloud.backupdr.v1.GuestOsFeature.fromObject(object.guestOsFeature[i]); - } - } - if (object.diskEncryptionKey != null) { - if (typeof object.diskEncryptionKey !== "object") - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.diskEncryptionKey: object expected"); - message.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.fromObject(object.diskEncryptionKey); - } - if (object.diskSizeGb != null) - if ($util.Long) - (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; - else if (typeof object.diskSizeGb === "string") - message.diskSizeGb = parseInt(object.diskSizeGb, 10); - else if (typeof object.diskSizeGb === "number") - message.diskSizeGb = object.diskSizeGb; - else if (typeof object.diskSizeGb === "object") - message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); - switch (object.savedState) { - default: - if (typeof object.savedState === "number") { - message.savedState = object.savedState; - break; - } - break; - case "DISK_SAVED_STATE_UNSPECIFIED": - case 0: - message.savedState = 0; - break; - case "PRESERVED": - case 1: - message.savedState = 1; - break; - } - if (object.diskType != null) - message.diskType = String(object.diskType); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "DISK_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "SCRATCH": - case 1: - message.type = 1; - break; - case "PERSISTENT": - case 2: - message.type = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk} message AttachedDisk - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AttachedDisk.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.license = []; - object.guestOsFeature = []; - } - if (message.initializeParams != null && message.hasOwnProperty("initializeParams")) { - object.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.toObject(message.initializeParams, options); - if (options.oneofs) - object._initializeParams = "initializeParams"; - } - if (message.deviceName != null && message.hasOwnProperty("deviceName")) { - object.deviceName = message.deviceName; - if (options.oneofs) - object._deviceName = "deviceName"; - } - if (message.kind != null && message.hasOwnProperty("kind")) { - object.kind = message.kind; - if (options.oneofs) - object._kind = "kind"; - } - if (message.diskTypeDeprecated != null && message.hasOwnProperty("diskTypeDeprecated")) { - object.diskTypeDeprecated = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated] === undefined ? message.diskTypeDeprecated : $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated] : message.diskTypeDeprecated; - if (options.oneofs) - object._diskTypeDeprecated = "diskTypeDeprecated"; - } - if (message.mode != null && message.hasOwnProperty("mode")) { - object.mode = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode] === undefined ? message.mode : $root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode] : message.mode; - if (options.oneofs) - object._mode = "mode"; - } - if (message.source != null && message.hasOwnProperty("source")) { - object.source = message.source; - if (options.oneofs) - object._source = "source"; - } - if (message.index != null && message.hasOwnProperty("index")) { - if (typeof message.index === "number") - object.index = options.longs === String ? String(message.index) : message.index; - else - object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; - if (options.oneofs) - object._index = "index"; - } - if (message.boot != null && message.hasOwnProperty("boot")) { - object.boot = message.boot; - if (options.oneofs) - object._boot = "boot"; - } - if (message.autoDelete != null && message.hasOwnProperty("autoDelete")) { - object.autoDelete = message.autoDelete; - if (options.oneofs) - object._autoDelete = "autoDelete"; - } - if (message.license && message.license.length) { - object.license = []; - for (var j = 0; j < message.license.length; ++j) - object.license[j] = message.license[j]; - } - if (message.diskInterface != null && message.hasOwnProperty("diskInterface")) { - object.diskInterface = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskInterface[message.diskInterface] === undefined ? message.diskInterface : $root.google.cloud.backupdr.v1.AttachedDisk.DiskInterface[message.diskInterface] : message.diskInterface; - if (options.oneofs) - object._diskInterface = "diskInterface"; - } - if (message.guestOsFeature && message.guestOsFeature.length) { - object.guestOsFeature = []; - for (var j = 0; j < message.guestOsFeature.length; ++j) - object.guestOsFeature[j] = $root.google.cloud.backupdr.v1.GuestOsFeature.toObject(message.guestOsFeature[j], options); - } - if (message.diskEncryptionKey != null && message.hasOwnProperty("diskEncryptionKey")) { - object.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.toObject(message.diskEncryptionKey, options); - if (options.oneofs) - object._diskEncryptionKey = "diskEncryptionKey"; - } - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) { - if (typeof message.diskSizeGb === "number") - object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; - else - object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; - if (options.oneofs) - object._diskSizeGb = "diskSizeGb"; - } - if (message.savedState != null && message.hasOwnProperty("savedState")) { - object.savedState = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState] === undefined ? message.savedState : $root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState] : message.savedState; - if (options.oneofs) - object._savedState = "savedState"; - } - if (message.diskType != null && message.hasOwnProperty("diskType")) { - object.diskType = message.diskType; - if (options.oneofs) - object._diskType = "diskType"; - } - if (message.type != null && message.hasOwnProperty("type")) { - object.type = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type] : message.type; - if (options.oneofs) - object._type = "type"; - } - return object; - }; - - /** - * Converts this AttachedDisk to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - * @returns {Object.} JSON object - */ - AttachedDisk.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AttachedDisk - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AttachedDisk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AttachedDisk"; - }; - - AttachedDisk.InitializeParams = (function() { - - /** - * Properties of an InitializeParams. - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @interface IInitializeParams - * @property {string|null} [diskName] InitializeParams diskName - * @property {Array.|null} [replicaZones] InitializeParams replicaZones - */ - - /** - * Constructs a new InitializeParams. - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @classdesc Represents an InitializeParams. - * @implements IInitializeParams - * @constructor - * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams=} [properties] Properties to set - */ - function InitializeParams(properties) { - this.replicaZones = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InitializeParams diskName. - * @member {string|null|undefined} diskName - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @instance - */ - InitializeParams.prototype.diskName = null; - - /** - * InitializeParams replicaZones. - * @member {Array.} replicaZones - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @instance - */ - InitializeParams.prototype.replicaZones = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * InitializeParams _diskName. - * @member {"diskName"|undefined} _diskName - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @instance - */ - Object.defineProperty(InitializeParams.prototype, "_diskName", { - get: $util.oneOfGetter($oneOfFields = ["diskName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new InitializeParams instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams instance - */ - InitializeParams.create = function create(properties) { - return new InitializeParams(properties); - }; - - /** - * Encodes the specified InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams} message InitializeParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitializeParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.diskName != null && Object.hasOwnProperty.call(message, "diskName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.diskName); - if (message.replicaZones != null && message.replicaZones.length) - for (var i = 0; i < message.replicaZones.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.replicaZones[i]); - return writer; - }; - - /** - * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams} message InitializeParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitializeParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InitializeParams message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitializeParams.decode = function 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.backupdr.v1.AttachedDisk.InitializeParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.diskName = reader.string(); - break; - } - case 2: { - if (!(message.replicaZones && message.replicaZones.length)) - message.replicaZones = []; - message.replicaZones.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InitializeParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitializeParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InitializeParams message. - * @function verify - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InitializeParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.diskName != null && message.hasOwnProperty("diskName")) { - properties._diskName = 1; - if (!$util.isString(message.diskName)) - return "diskName: string expected"; - } - if (message.replicaZones != null && message.hasOwnProperty("replicaZones")) { - if (!Array.isArray(message.replicaZones)) - return "replicaZones: array expected"; - for (var i = 0; i < message.replicaZones.length; ++i) - if (!$util.isString(message.replicaZones[i])) - return "replicaZones: string[] expected"; - } - return null; - }; - - /** - * Creates an InitializeParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams - */ - InitializeParams.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams) - return object; - var message = new $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams(); - if (object.diskName != null) - message.diskName = String(object.diskName); - if (object.replicaZones) { - if (!Array.isArray(object.replicaZones)) - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.InitializeParams.replicaZones: array expected"); - message.replicaZones = []; - for (var i = 0; i < object.replicaZones.length; ++i) - message.replicaZones[i] = String(object.replicaZones[i]); - } - return message; - }; - - /** - * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} message InitializeParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InitializeParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.replicaZones = []; - if (message.diskName != null && message.hasOwnProperty("diskName")) { - object.diskName = message.diskName; - if (options.oneofs) - object._diskName = "diskName"; - } - if (message.replicaZones && message.replicaZones.length) { - object.replicaZones = []; - for (var j = 0; j < message.replicaZones.length; ++j) - object.replicaZones[j] = message.replicaZones[j]; - } - return object; - }; - - /** - * Converts this InitializeParams to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @instance - * @returns {Object.} JSON object - */ - InitializeParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InitializeParams - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InitializeParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AttachedDisk.InitializeParams"; - }; - - return InitializeParams; - })(); - - /** - * DiskType enum. - * @name google.cloud.backupdr.v1.AttachedDisk.DiskType - * @enum {number} - * @property {number} DISK_TYPE_UNSPECIFIED=0 DISK_TYPE_UNSPECIFIED value - * @property {number} SCRATCH=1 SCRATCH value - * @property {number} PERSISTENT=2 PERSISTENT value - */ - AttachedDisk.DiskType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DISK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCRATCH"] = 1; - values[valuesById[2] = "PERSISTENT"] = 2; - return values; - })(); - - /** - * DiskMode enum. - * @name google.cloud.backupdr.v1.AttachedDisk.DiskMode - * @enum {number} - * @property {number} DISK_MODE_UNSPECIFIED=0 DISK_MODE_UNSPECIFIED value - * @property {number} READ_WRITE=1 READ_WRITE value - * @property {number} READ_ONLY=2 READ_ONLY value - * @property {number} LOCKED=3 LOCKED value - */ - AttachedDisk.DiskMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DISK_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "READ_WRITE"] = 1; - values[valuesById[2] = "READ_ONLY"] = 2; - values[valuesById[3] = "LOCKED"] = 3; - return values; - })(); - - /** - * DiskInterface enum. - * @name google.cloud.backupdr.v1.AttachedDisk.DiskInterface - * @enum {number} - * @property {number} DISK_INTERFACE_UNSPECIFIED=0 DISK_INTERFACE_UNSPECIFIED value - * @property {number} SCSI=1 SCSI value - * @property {number} NVME=2 NVME value - * @property {number} NVDIMM=3 NVDIMM value - * @property {number} ISCSI=4 ISCSI value - */ - AttachedDisk.DiskInterface = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DISK_INTERFACE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCSI"] = 1; - values[valuesById[2] = "NVME"] = 2; - values[valuesById[3] = "NVDIMM"] = 3; - values[valuesById[4] = "ISCSI"] = 4; - return values; - })(); - - /** - * DiskSavedState enum. - * @name google.cloud.backupdr.v1.AttachedDisk.DiskSavedState - * @enum {number} - * @property {number} DISK_SAVED_STATE_UNSPECIFIED=0 DISK_SAVED_STATE_UNSPECIFIED value - * @property {number} PRESERVED=1 PRESERVED value - */ - AttachedDisk.DiskSavedState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DISK_SAVED_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRESERVED"] = 1; - return values; - })(); - - return AttachedDisk; - })(); - - v1.GuestOsFeature = (function() { - - /** - * Properties of a GuestOsFeature. - * @memberof google.cloud.backupdr.v1 - * @interface IGuestOsFeature - * @property {google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null} [type] GuestOsFeature type - */ - - /** - * Constructs a new GuestOsFeature. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GuestOsFeature. - * @implements IGuestOsFeature - * @constructor - * @param {google.cloud.backupdr.v1.IGuestOsFeature=} [properties] Properties to set - */ - function GuestOsFeature(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GuestOsFeature type. - * @member {google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null|undefined} type - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @instance - */ - GuestOsFeature.prototype.type = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * GuestOsFeature _type. - * @member {"type"|undefined} _type - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @instance - */ - Object.defineProperty(GuestOsFeature.prototype, "_type", { - get: $util.oneOfGetter($oneOfFields = ["type"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GuestOsFeature instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {google.cloud.backupdr.v1.IGuestOsFeature=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature instance - */ - GuestOsFeature.create = function create(properties) { - return new GuestOsFeature(properties); - }; - - /** - * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {google.cloud.backupdr.v1.IGuestOsFeature} message GuestOsFeature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GuestOsFeature.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - return writer; - }; - - /** - * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {google.cloud.backupdr.v1.IGuestOsFeature} message GuestOsFeature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GuestOsFeature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GuestOsFeature message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GuestOsFeature.decode = function 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.backupdr.v1.GuestOsFeature(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GuestOsFeature.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GuestOsFeature message. - * @function verify - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GuestOsFeature.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.type != null && message.hasOwnProperty("type")) { - properties._type = 1; - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - break; - } - } - return null; - }; - - /** - * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature - */ - GuestOsFeature.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GuestOsFeature) - return object; - var message = new $root.google.cloud.backupdr.v1.GuestOsFeature(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "FEATURE_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "VIRTIO_SCSI_MULTIQUEUE": - case 1: - message.type = 1; - break; - case "WINDOWS": - case 2: - message.type = 2; - break; - case "MULTI_IP_SUBNET": - case 3: - message.type = 3; - break; - case "UEFI_COMPATIBLE": - case 4: - message.type = 4; - break; - case "SECURE_BOOT": - case 5: - message.type = 5; - break; - case "GVNIC": - case 6: - message.type = 6; - break; - case "SEV_CAPABLE": - case 7: - message.type = 7; - break; - case "BARE_METAL_LINUX_COMPATIBLE": - case 8: - message.type = 8; - break; - case "SUSPEND_RESUME_COMPATIBLE": - case 9: - message.type = 9; - break; - case "SEV_LIVE_MIGRATABLE": - case 10: - message.type = 10; - break; - case "SEV_SNP_CAPABLE": - case 11: - message.type = 11; - break; - case "TDX_CAPABLE": - case 12: - message.type = 12; - break; - case "IDPF": - case 13: - message.type = 13; - break; - case "SEV_LIVE_MIGRATABLE_V2": - case 14: - message.type = 14; - break; - } - return message; - }; - - /** - * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {google.cloud.backupdr.v1.GuestOsFeature} message GuestOsFeature - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GuestOsFeature.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.type != null && message.hasOwnProperty("type")) { - object.type = options.enums === String ? $root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type] : message.type; - if (options.oneofs) - object._type = "type"; - } - return object; - }; - - /** - * Converts this GuestOsFeature to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @instance - * @returns {Object.} JSON object - */ - GuestOsFeature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GuestOsFeature - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GuestOsFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GuestOsFeature"; - }; - - /** - * FeatureType enum. - * @name google.cloud.backupdr.v1.GuestOsFeature.FeatureType - * @enum {number} - * @property {number} FEATURE_TYPE_UNSPECIFIED=0 FEATURE_TYPE_UNSPECIFIED value - * @property {number} VIRTIO_SCSI_MULTIQUEUE=1 VIRTIO_SCSI_MULTIQUEUE value - * @property {number} WINDOWS=2 WINDOWS value - * @property {number} MULTI_IP_SUBNET=3 MULTI_IP_SUBNET value - * @property {number} UEFI_COMPATIBLE=4 UEFI_COMPATIBLE value - * @property {number} SECURE_BOOT=5 SECURE_BOOT value - * @property {number} GVNIC=6 GVNIC value - * @property {number} SEV_CAPABLE=7 SEV_CAPABLE value - * @property {number} BARE_METAL_LINUX_COMPATIBLE=8 BARE_METAL_LINUX_COMPATIBLE value - * @property {number} SUSPEND_RESUME_COMPATIBLE=9 SUSPEND_RESUME_COMPATIBLE value - * @property {number} SEV_LIVE_MIGRATABLE=10 SEV_LIVE_MIGRATABLE value - * @property {number} SEV_SNP_CAPABLE=11 SEV_SNP_CAPABLE value - * @property {number} TDX_CAPABLE=12 TDX_CAPABLE value - * @property {number} IDPF=13 IDPF value - * @property {number} SEV_LIVE_MIGRATABLE_V2=14 SEV_LIVE_MIGRATABLE_V2 value - */ - GuestOsFeature.FeatureType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FEATURE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "VIRTIO_SCSI_MULTIQUEUE"] = 1; - values[valuesById[2] = "WINDOWS"] = 2; - values[valuesById[3] = "MULTI_IP_SUBNET"] = 3; - values[valuesById[4] = "UEFI_COMPATIBLE"] = 4; - values[valuesById[5] = "SECURE_BOOT"] = 5; - values[valuesById[6] = "GVNIC"] = 6; - values[valuesById[7] = "SEV_CAPABLE"] = 7; - values[valuesById[8] = "BARE_METAL_LINUX_COMPATIBLE"] = 8; - values[valuesById[9] = "SUSPEND_RESUME_COMPATIBLE"] = 9; - values[valuesById[10] = "SEV_LIVE_MIGRATABLE"] = 10; - values[valuesById[11] = "SEV_SNP_CAPABLE"] = 11; - values[valuesById[12] = "TDX_CAPABLE"] = 12; - values[valuesById[13] = "IDPF"] = 13; - values[valuesById[14] = "SEV_LIVE_MIGRATABLE_V2"] = 14; - return values; - })(); - - return GuestOsFeature; - })(); - - /** - * KeyRevocationActionType enum. - * @name google.cloud.backupdr.v1.KeyRevocationActionType - * @enum {number} - * @property {number} KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED=0 KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED value - * @property {number} NONE=1 NONE value - * @property {number} STOP=2 STOP value - */ - v1.KeyRevocationActionType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NONE"] = 1; - values[valuesById[2] = "STOP"] = 2; - return values; - })(); - - return v1; - })(); - - return backupdr; - })(); - - 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.FieldInfo = (function() { - - /** - * Properties of a FieldInfo. - * @memberof google.api - * @interface IFieldInfo - * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format - */ - - /** - * Constructs a new FieldInfo. - * @memberof google.api - * @classdesc Represents a FieldInfo. - * @implements IFieldInfo - * @constructor - * @param {google.api.IFieldInfo=} [properties] Properties to set - */ - function FieldInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldInfo format. - * @member {google.api.FieldInfo.Format} format - * @memberof google.api.FieldInfo - * @instance - */ - FieldInfo.prototype.format = 0; - - /** - * Creates a new FieldInfo instance using the specified properties. - * @function create - * @memberof google.api.FieldInfo - * @static - * @param {google.api.IFieldInfo=} [properties] Properties to set - * @returns {google.api.FieldInfo} FieldInfo instance - */ - FieldInfo.create = function create(properties) { - return new FieldInfo(properties); - }; - - /** - * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @function encode - * @memberof google.api.FieldInfo - * @static - * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); - return writer; - }; - - /** - * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.FieldInfo - * @static - * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldInfo message from the specified reader or buffer. - * @function decode - * @memberof google.api.FieldInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.FieldInfo} FieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldInfo.decode = function 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.FieldInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.format = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.FieldInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.FieldInfo} FieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldInfo message. - * @function verify - * @memberof google.api.FieldInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.FieldInfo - * @static - * @param {Object.} object Plain object - * @returns {google.api.FieldInfo} FieldInfo - */ - FieldInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.FieldInfo) - return object; - var message = new $root.google.api.FieldInfo(); - switch (object.format) { - default: - if (typeof object.format === "number") { - message.format = object.format; - break; - } - break; - case "FORMAT_UNSPECIFIED": - case 0: - message.format = 0; - break; - case "UUID4": - case 1: - message.format = 1; - break; - case "IPV4": - case 2: - message.format = 2; - break; - case "IPV6": - case 3: - message.format = 3; - break; - case "IPV4_OR_IPV6": - case 4: - message.format = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.FieldInfo - * @static - * @param {google.api.FieldInfo} message FieldInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; - return object; - }; - - /** - * Converts this FieldInfo to JSON. - * @function toJSON - * @memberof google.api.FieldInfo - * @instance - * @returns {Object.} JSON object - */ - FieldInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldInfo - * @function getTypeUrl - * @memberof google.api.FieldInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.FieldInfo"; - }; - - /** - * Format enum. - * @name google.api.FieldInfo.Format - * @enum {number} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} UUID4=1 UUID4 value - * @property {number} IPV4=2 IPV4 value - * @property {number} IPV6=3 IPV6 value - * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value - */ - FieldInfo.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "UUID4"] = 1; - values[valuesById[2] = "IPV4"] = 2; - values[valuesById[3] = "IPV6"] = 3; - values[valuesById[4] = "IPV4_OR_IPV6"] = 4; - return values; - })(); - - return FieldInfo; - })(); - - 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.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo - * @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.fieldInfo. - * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldInfo"] = null; - - /** - * 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(); - if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) - $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).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 291403980: { - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); - 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.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { - var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); - if (error) - return ".google.api.fieldInfo." + error; - } - 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.fieldInfo"] != null) { - if (typeof object[".google.api.fieldInfo"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); - } - 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; - object[".google.api.fieldInfo"] = 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); - if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) - object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], 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.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; - })(); - - 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.DoubleValue = (function() { - - /** - * Properties of a DoubleValue. - * @memberof google.protobuf - * @interface IDoubleValue - * @property {number|null} [value] DoubleValue value - */ - - /** - * Constructs a new DoubleValue. - * @memberof google.protobuf - * @classdesc Represents a DoubleValue. - * @implements IDoubleValue - * @constructor - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set - */ - function DoubleValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DoubleValue value. - * @member {number} value - * @memberof google.protobuf.DoubleValue - * @instance - */ - DoubleValue.prototype.value = 0; - - /** - * Creates a new DoubleValue instance using the specified properties. - * @function create - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set - * @returns {google.protobuf.DoubleValue} DoubleValue instance - */ - DoubleValue.create = function create(properties) { - return new DoubleValue(properties); - }; - - /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DoubleValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); - return writer; - }; - - /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DoubleValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DoubleValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DoubleValue} DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DoubleValue.decode = function 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.DoubleValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DoubleValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DoubleValue} DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DoubleValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DoubleValue message. - * @function verify - * @memberof google.protobuf.DoubleValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DoubleValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - return null; - }; - - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DoubleValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DoubleValue} DoubleValue - */ - DoubleValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DoubleValue) - return object; - var message = new $root.google.protobuf.DoubleValue(); - if (object.value != null) - message.value = Number(object.value); - return message; - }; - - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.DoubleValue} message DoubleValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DoubleValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; - - /** - * Converts this DoubleValue to JSON. - * @function toJSON - * @memberof google.protobuf.DoubleValue - * @instance - * @returns {Object.} JSON object - */ - DoubleValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DoubleValue - * @function getTypeUrl - * @memberof google.protobuf.DoubleValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DoubleValue"; - }; - - return DoubleValue; - })(); - - protobuf.FloatValue = (function() { - - /** - * Properties of a FloatValue. - * @memberof google.protobuf - * @interface IFloatValue - * @property {number|null} [value] FloatValue value - */ - - /** - * Constructs a new FloatValue. - * @memberof google.protobuf - * @classdesc Represents a FloatValue. - * @implements IFloatValue - * @constructor - * @param {google.protobuf.IFloatValue=} [properties] Properties to set - */ - function FloatValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FloatValue value. - * @member {number} value - * @memberof google.protobuf.FloatValue - * @instance - */ - FloatValue.prototype.value = 0; - - /** - * Creates a new FloatValue instance using the specified properties. - * @function create - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue=} [properties] Properties to set - * @returns {google.protobuf.FloatValue} FloatValue instance - */ - FloatValue.create = function create(properties) { - return new FloatValue(properties); - }; - - /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FloatValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); - return writer; - }; - - /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FloatValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FloatValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FloatValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FloatValue} FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FloatValue.decode = function 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.FloatValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FloatValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FloatValue} FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FloatValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FloatValue message. - * @function verify - * @memberof google.protobuf.FloatValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FloatValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - return null; - }; - - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FloatValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FloatValue} FloatValue - */ - FloatValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FloatValue) - return object; - var message = new $root.google.protobuf.FloatValue(); - if (object.value != null) - message.value = Number(object.value); - return message; - }; - - /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.FloatValue} message FloatValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FloatValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; - - /** - * Converts this FloatValue to JSON. - * @function toJSON - * @memberof google.protobuf.FloatValue - * @instance - * @returns {Object.} JSON object - */ - FloatValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FloatValue - * @function getTypeUrl - * @memberof google.protobuf.FloatValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FloatValue"; - }; - - return FloatValue; - })(); - - protobuf.Int64Value = (function() { - - /** - * Properties of an Int64Value. - * @memberof google.protobuf - * @interface IInt64Value - * @property {number|Long|null} [value] Int64Value value - */ - - /** - * Constructs a new Int64Value. - * @memberof google.protobuf - * @classdesc Represents an Int64Value. - * @implements IInt64Value - * @constructor - * @param {google.protobuf.IInt64Value=} [properties] Properties to set - */ - function Int64Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Int64Value value. - * @member {number|Long} value - * @memberof google.protobuf.Int64Value - * @instance - */ - Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new Int64Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value=} [properties] Properties to set - * @returns {google.protobuf.Int64Value} Int64Value instance - */ - Int64Value.create = function create(properties) { - return new Int64Value(properties); - }; - - /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int64Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); - return writer; - }; - - /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Int64Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Int64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Int64Value} Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int64Value.decode = function 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.Int64Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Int64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Int64Value} Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int64Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Int64Value message. - * @function verify - * @memberof google.protobuf.Int64Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Int64Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; - return null; - }; - - /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int64Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int64Value} Int64Value - */ - Int64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int64Value) - return object; - var message = new $root.google.protobuf.Int64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = false; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.Int64Value} message Int64Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Int64Value.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.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; - return object; - }; - - /** - * Converts this Int64Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int64Value - * @instance - * @returns {Object.} JSON object - */ - Int64Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Int64Value - * @function getTypeUrl - * @memberof google.protobuf.Int64Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Int64Value"; - }; - - return Int64Value; - })(); - - protobuf.UInt64Value = (function() { - - /** - * Properties of a UInt64Value. - * @memberof google.protobuf - * @interface IUInt64Value - * @property {number|Long|null} [value] UInt64Value value - */ - - /** - * Constructs a new UInt64Value. - * @memberof google.protobuf - * @classdesc Represents a UInt64Value. - * @implements IUInt64Value - * @constructor - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set - */ - function UInt64Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UInt64Value value. - * @member {number|Long} value - * @memberof google.protobuf.UInt64Value - * @instance - */ - UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new UInt64Value instance using the specified properties. - * @function create - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set - * @returns {google.protobuf.UInt64Value} UInt64Value instance - */ - UInt64Value.create = function create(properties) { - return new UInt64Value(properties); - }; - - /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt64Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); - return writer; - }; - - /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UInt64Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UInt64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UInt64Value} UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt64Value.decode = function 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.UInt64Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.uint64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UInt64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UInt64Value} UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt64Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UInt64Value message. - * @function verify - * @memberof google.protobuf.UInt64Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UInt64Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; - return null; - }; - - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UInt64Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UInt64Value} UInt64Value - */ - UInt64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt64Value) - return object; - var message = new $root.google.protobuf.UInt64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = true; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.UInt64Value} message UInt64Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UInt64Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; - return object; - }; - - /** - * Converts this UInt64Value to JSON. - * @function toJSON - * @memberof google.protobuf.UInt64Value - * @instance - * @returns {Object.} JSON object - */ - UInt64Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UInt64Value - * @function getTypeUrl - * @memberof google.protobuf.UInt64Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UInt64Value"; - }; - - return UInt64Value; - })(); - - protobuf.Int32Value = (function() { - - /** - * Properties of an Int32Value. - * @memberof google.protobuf - * @interface IInt32Value - * @property {number|null} [value] Int32Value value - */ - - /** - * Constructs a new Int32Value. - * @memberof google.protobuf - * @classdesc Represents an Int32Value. - * @implements IInt32Value - * @constructor - * @param {google.protobuf.IInt32Value=} [properties] Properties to set - */ - function Int32Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Int32Value value. - * @member {number} value - * @memberof google.protobuf.Int32Value - * @instance - */ - Int32Value.prototype.value = 0; - - /** - * Creates a new Int32Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value=} [properties] Properties to set - * @returns {google.protobuf.Int32Value} Int32Value instance - */ - Int32Value.create = function create(properties) { - return new Int32Value(properties); - }; - - /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int32Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); - return writer; - }; - - /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Int32Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Int32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Int32Value} Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int32Value.decode = function 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.Int32Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Int32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Int32Value} Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int32Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Int32Value message. - * @function verify - * @memberof google.protobuf.Int32Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Int32Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; - return null; - }; - - /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int32Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int32Value} Int32Value - */ - Int32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int32Value) - return object; - var message = new $root.google.protobuf.Int32Value(); - if (object.value != null) - message.value = object.value | 0; - return message; - }; - - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.Int32Value} message Int32Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Int32Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this Int32Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int32Value - * @instance - * @returns {Object.} JSON object - */ - Int32Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Int32Value - * @function getTypeUrl - * @memberof google.protobuf.Int32Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Int32Value"; - }; - - return Int32Value; - })(); - - protobuf.UInt32Value = (function() { - - /** - * Properties of a UInt32Value. - * @memberof google.protobuf - * @interface IUInt32Value - * @property {number|null} [value] UInt32Value value - */ - - /** - * Constructs a new UInt32Value. - * @memberof google.protobuf - * @classdesc Represents a UInt32Value. - * @implements IUInt32Value - * @constructor - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set - */ - function UInt32Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UInt32Value value. - * @member {number} value - * @memberof google.protobuf.UInt32Value - * @instance - */ - UInt32Value.prototype.value = 0; - - /** - * Creates a new UInt32Value instance using the specified properties. - * @function create - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set - * @returns {google.protobuf.UInt32Value} UInt32Value instance - */ - UInt32Value.create = function create(properties) { - return new UInt32Value(properties); - }; - - /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt32Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); - return writer; - }; - - /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UInt32Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UInt32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UInt32Value} UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt32Value.decode = function 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.UInt32Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UInt32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UInt32Value} UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt32Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UInt32Value message. - * @function verify - * @memberof google.protobuf.UInt32Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UInt32Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; - return null; - }; - - /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UInt32Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UInt32Value} UInt32Value - */ - UInt32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt32Value) - return object; - var message = new $root.google.protobuf.UInt32Value(); - if (object.value != null) - message.value = object.value >>> 0; - return message; - }; - - /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.UInt32Value} message UInt32Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UInt32Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this UInt32Value to JSON. - * @function toJSON - * @memberof google.protobuf.UInt32Value - * @instance - * @returns {Object.} JSON object - */ - UInt32Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UInt32Value - * @function getTypeUrl - * @memberof google.protobuf.UInt32Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UInt32Value"; - }; - - return UInt32Value; - })(); - - protobuf.BoolValue = (function() { - - /** - * Properties of a BoolValue. - * @memberof google.protobuf - * @interface IBoolValue - * @property {boolean|null} [value] BoolValue value - */ - - /** - * Constructs a new BoolValue. - * @memberof google.protobuf - * @classdesc Represents a BoolValue. - * @implements IBoolValue - * @constructor - * @param {google.protobuf.IBoolValue=} [properties] Properties to set - */ - function BoolValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BoolValue value. - * @member {boolean} value - * @memberof google.protobuf.BoolValue - * @instance - */ - BoolValue.prototype.value = false; - - /** - * Creates a new BoolValue instance using the specified properties. - * @function create - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue=} [properties] Properties to set - * @returns {google.protobuf.BoolValue} BoolValue instance - */ - BoolValue.create = function create(properties) { - return new BoolValue(properties); - }; - - /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BoolValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); - return writer; - }; - - /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BoolValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BoolValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.BoolValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.BoolValue} BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BoolValue.decode = function 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.BoolValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.BoolValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.BoolValue} BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BoolValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BoolValue message. - * @function verify - * @memberof google.protobuf.BoolValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BoolValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "boolean") - return "value: boolean expected"; - return null; - }; - - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.BoolValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.BoolValue} BoolValue - */ - BoolValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BoolValue) - return object; - var message = new $root.google.protobuf.BoolValue(); - if (object.value != null) - message.value = Boolean(object.value); - return message; - }; - - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.BoolValue} message BoolValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BoolValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = false; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this BoolValue to JSON. - * @function toJSON - * @memberof google.protobuf.BoolValue - * @instance - * @returns {Object.} JSON object - */ - BoolValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BoolValue - * @function getTypeUrl - * @memberof google.protobuf.BoolValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.BoolValue"; - }; - - return BoolValue; - })(); - - protobuf.StringValue = (function() { - - /** - * Properties of a StringValue. - * @memberof google.protobuf - * @interface IStringValue - * @property {string|null} [value] StringValue value - */ - - /** - * Constructs a new StringValue. - * @memberof google.protobuf - * @classdesc Represents a StringValue. - * @implements IStringValue - * @constructor - * @param {google.protobuf.IStringValue=} [properties] Properties to set - */ - function StringValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StringValue value. - * @member {string} value - * @memberof google.protobuf.StringValue - * @instance - */ - StringValue.prototype.value = ""; - - /** - * Creates a new StringValue instance using the specified properties. - * @function create - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue=} [properties] Properties to set - * @returns {google.protobuf.StringValue} StringValue instance - */ - StringValue.create = function create(properties) { - return new StringValue(properties); - }; - - /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - return writer; - }; - - /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StringValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.StringValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.StringValue} StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringValue.decode = function 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.StringValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.StringValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.StringValue} StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StringValue message. - * @function verify - * @memberof google.protobuf.StringValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.StringValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.StringValue} StringValue - */ - StringValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.StringValue) - return object; - var message = new $root.google.protobuf.StringValue(); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.StringValue} message StringValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this StringValue to JSON. - * @function toJSON - * @memberof google.protobuf.StringValue - * @instance - * @returns {Object.} JSON object - */ - StringValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StringValue - * @function getTypeUrl - * @memberof google.protobuf.StringValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.StringValue"; - }; - - return StringValue; - })(); - - protobuf.BytesValue = (function() { - - /** - * Properties of a BytesValue. - * @memberof google.protobuf - * @interface IBytesValue - * @property {Uint8Array|null} [value] BytesValue value - */ - - /** - * Constructs a new BytesValue. - * @memberof google.protobuf - * @classdesc Represents a BytesValue. - * @implements IBytesValue - * @constructor - * @param {google.protobuf.IBytesValue=} [properties] Properties to set - */ - function BytesValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BytesValue value. - * @member {Uint8Array} value - * @memberof google.protobuf.BytesValue - * @instance - */ - BytesValue.prototype.value = $util.newBuffer([]); - - /** - * Creates a new BytesValue instance using the specified properties. - * @function create - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue=} [properties] Properties to set - * @returns {google.protobuf.BytesValue} BytesValue instance - */ - BytesValue.create = function create(properties) { - return new BytesValue(properties); - }; - - /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BytesValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BytesValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BytesValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.BytesValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.BytesValue} BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BytesValue.decode = function 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.BytesValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.BytesValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.BytesValue} BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BytesValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BytesValue message. - * @function verify - * @memberof google.protobuf.BytesValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BytesValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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 a BytesValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.BytesValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.BytesValue} BytesValue - */ - BytesValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BytesValue) - return object; - var message = new $root.google.protobuf.BytesValue(); - 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 a BytesValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.BytesValue} message BytesValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BytesValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - 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 BytesValue to JSON. - * @function toJSON - * @memberof google.protobuf.BytesValue - * @instance - * @returns {Object.} JSON object - */ - BytesValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BytesValue - * @function getTypeUrl - * @memberof google.protobuf.BytesValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.BytesValue"; - }; - - return BytesValue; - })(); - - return protobuf; - })(); - - google.type = (function() { - - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; - - /** - * DayOfWeek enum. - * @name google.type.DayOfWeek - * @enum {number} - * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value - * @property {number} MONDAY=1 MONDAY value - * @property {number} TUESDAY=2 TUESDAY value - * @property {number} WEDNESDAY=3 WEDNESDAY value - * @property {number} THURSDAY=4 THURSDAY value - * @property {number} FRIDAY=5 FRIDAY value - * @property {number} SATURDAY=6 SATURDAY value - * @property {number} SUNDAY=7 SUNDAY value - */ - type.DayOfWeek = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; - values[valuesById[1] = "MONDAY"] = 1; - values[valuesById[2] = "TUESDAY"] = 2; - values[valuesById[3] = "WEDNESDAY"] = 3; - values[valuesById[4] = "THURSDAY"] = 4; - values[valuesById[5] = "FRIDAY"] = 5; - values[valuesById[6] = "SATURDAY"] = 6; - values[valuesById[7] = "SUNDAY"] = 7; - return values; - })(); - - /** - * Month enum. - * @name google.type.Month - * @enum {number} - * @property {number} MONTH_UNSPECIFIED=0 MONTH_UNSPECIFIED value - * @property {number} JANUARY=1 JANUARY value - * @property {number} FEBRUARY=2 FEBRUARY value - * @property {number} MARCH=3 MARCH value - * @property {number} APRIL=4 APRIL value - * @property {number} MAY=5 MAY value - * @property {number} JUNE=6 JUNE value - * @property {number} JULY=7 JULY value - * @property {number} AUGUST=8 AUGUST value - * @property {number} SEPTEMBER=9 SEPTEMBER value - * @property {number} OCTOBER=10 OCTOBER value - * @property {number} NOVEMBER=11 NOVEMBER value - * @property {number} DECEMBER=12 DECEMBER value - */ - type.Month = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MONTH_UNSPECIFIED"] = 0; - values[valuesById[1] = "JANUARY"] = 1; - values[valuesById[2] = "FEBRUARY"] = 2; - values[valuesById[3] = "MARCH"] = 3; - values[valuesById[4] = "APRIL"] = 4; - values[valuesById[5] = "MAY"] = 5; - values[valuesById[6] = "JUNE"] = 6; - values[valuesById[7] = "JULY"] = 7; - values[valuesById[8] = "AUGUST"] = 8; - values[valuesById[9] = "SEPTEMBER"] = 9; - values[valuesById[10] = "OCTOBER"] = 10; - values[valuesById[11] = "NOVEMBER"] = 11; - values[valuesById[12] = "DECEMBER"] = 12; - return values; - })(); - - type.Expr = (function() { - - /** - * Properties of an Expr. - * @memberof google.type - * @interface IExpr - * @property {string|null} [expression] Expr expression - * @property {string|null} [title] Expr title - * @property {string|null} [description] Expr description - * @property {string|null} [location] Expr location - */ - - /** - * Constructs a new Expr. - * @memberof google.type - * @classdesc Represents an Expr. - * @implements IExpr - * @constructor - * @param {google.type.IExpr=} [properties] Properties to set - */ - function Expr(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Expr expression. - * @member {string} expression - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.expression = ""; - - /** - * Expr title. - * @member {string} title - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.title = ""; - - /** - * Expr description. - * @member {string} description - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.description = ""; - - /** - * Expr location. - * @member {string} location - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.location = ""; - - /** - * Creates a new Expr instance using the specified properties. - * @function create - * @memberof google.type.Expr - * @static - * @param {google.type.IExpr=} [properties] Properties to set - * @returns {google.type.Expr} Expr instance - */ - Expr.create = function create(properties) { - return new Expr(properties); - }; - - /** - * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @function encode - * @memberof google.type.Expr - * @static - * @param {google.type.IExpr} message Expr message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Expr.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); - return writer; - }; - - /** - * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @function encodeDelimited - * @memberof google.type.Expr - * @static - * @param {google.type.IExpr} message Expr message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Expr.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Expr message from the specified reader or buffer. - * @function decode - * @memberof google.type.Expr - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.type.Expr} Expr - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Expr.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Expr(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.expression = reader.string(); - break; - } - case 2: { - message.title = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.location = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Expr message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.type.Expr - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.Expr} Expr - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Expr.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Expr message. - * @function verify - * @memberof google.type.Expr - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Expr.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.expression != null && message.hasOwnProperty("expression")) - if (!$util.isString(message.expression)) - return "expression: string expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - return null; - }; - - /** - * Creates an Expr message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.type.Expr - * @static - * @param {Object.} object Plain object - * @returns {google.type.Expr} Expr - */ - Expr.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.Expr) - return object; - var message = new $root.google.type.Expr(); - if (object.expression != null) - message.expression = String(object.expression); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.location != null) - message.location = String(object.location); - return message; - }; - - /** - * Creates a plain object from an Expr message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.Expr - * @static - * @param {google.type.Expr} message Expr - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Expr.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.expression = ""; - object.title = ""; - object.description = ""; - object.location = ""; - } - if (message.expression != null && message.hasOwnProperty("expression")) - object.expression = message.expression; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - return object; - }; - - /** - * Converts this Expr to JSON. - * @function toJSON - * @memberof google.type.Expr - * @instance - * @returns {Object.} JSON object - */ - Expr.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Expr - * @function getTypeUrl - * @memberof google.type.Expr - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Expr.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.type.Expr"; - }; - - return Expr; - })(); - - return type; - })(); - - 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; - })(); - - google.iam = (function() { - - /** - * Namespace iam. - * @memberof google - * @namespace - */ - var iam = {}; - - iam.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.iam - * @namespace - */ - var v1 = {}; - - v1.IAMPolicy = (function() { - - /** - * Constructs a new IAMPolicy service. - * @memberof google.iam.v1 - * @classdesc Represents a IAMPolicy - * @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 IAMPolicy(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (IAMPolicy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IAMPolicy; - - /** - * Creates new IAMPolicy service using the specified rpc implementation. - * @function create - * @memberof google.iam.v1.IAMPolicy - * @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 {IAMPolicy} RPC service. Useful where requests and/or responses are streamed. - */ - IAMPolicy.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. - * @memberof google.iam.v1.IAMPolicy - * @typedef SetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.iam.v1.IAMPolicy.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IAMPolicy.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "SetIamPolicy" }); - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. - * @memberof google.iam.v1.IAMPolicy - * @typedef GetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.iam.v1.IAMPolicy.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IAMPolicy.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "GetIamPolicy" }); - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. - * @memberof google.iam.v1.IAMPolicy - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse - */ - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.iam.v1.IAMPolicy.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IAMPolicy.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return IAMPolicy; - })(); - - v1.SetIamPolicyRequest = (function() { - - /** - * Properties of a SetIamPolicyRequest. - * @memberof google.iam.v1 - * @interface ISetIamPolicyRequest - * @property {string|null} [resource] SetIamPolicyRequest resource - * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy - * @property {google.protobuf.IFieldMask|null} [updateMask] SetIamPolicyRequest updateMask - */ - - /** - * Constructs a new SetIamPolicyRequest. - * @memberof google.iam.v1 - * @classdesc Represents a SetIamPolicyRequest. - * @implements ISetIamPolicyRequest - * @constructor - * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set - */ - function SetIamPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetIamPolicyRequest resource. - * @member {string} resource - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - */ - SetIamPolicyRequest.prototype.resource = ""; - - /** - * SetIamPolicyRequest policy. - * @member {google.iam.v1.IPolicy|null|undefined} policy - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - */ - SetIamPolicyRequest.prototype.policy = null; - - /** - * SetIamPolicyRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - */ - SetIamPolicyRequest.prototype.updateMask = null; - - /** - * Creates a new SetIamPolicyRequest instance using the specified properties. - * @function create - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest instance - */ - SetIamPolicyRequest.create = function create(properties) { - return new SetIamPolicyRequest(properties); - }; - - /** - * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetIamPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) - $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetIamPolicyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.SetIamPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetIamPolicyRequest message. - * @function verify - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetIamPolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.policy != null && message.hasOwnProperty("policy")) { - var error = $root.google.iam.v1.Policy.verify(message.policy); - if (error) - return "policy." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; - - /** - * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest - */ - SetIamPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.SetIamPolicyRequest) - return object; - var message = new $root.google.iam.v1.SetIamPolicyRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.policy != null) { - if (typeof object.policy !== "object") - throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); - message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.SetIamPolicyRequest} message SetIamPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetIamPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resource = ""; - object.policy = null; - object.updateMask = null; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.policy != null && message.hasOwnProperty("policy")) - object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this SetIamPolicyRequest to JSON. - * @function toJSON - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - SetIamPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetIamPolicyRequest - * @function getTypeUrl - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.SetIamPolicyRequest"; - }; - - return SetIamPolicyRequest; - })(); - - v1.GetIamPolicyRequest = (function() { - - /** - * Properties of a GetIamPolicyRequest. - * @memberof google.iam.v1 - * @interface IGetIamPolicyRequest - * @property {string|null} [resource] GetIamPolicyRequest resource - * @property {google.iam.v1.IGetPolicyOptions|null} [options] GetIamPolicyRequest options - */ - - /** - * Constructs a new GetIamPolicyRequest. - * @memberof google.iam.v1 - * @classdesc Represents a GetIamPolicyRequest. - * @implements IGetIamPolicyRequest - * @constructor - * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set - */ - function GetIamPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetIamPolicyRequest resource. - * @member {string} resource - * @memberof google.iam.v1.GetIamPolicyRequest - * @instance - */ - GetIamPolicyRequest.prototype.resource = ""; - - /** - * GetIamPolicyRequest options. - * @member {google.iam.v1.IGetPolicyOptions|null|undefined} options - * @memberof google.iam.v1.GetIamPolicyRequest - * @instance - */ - GetIamPolicyRequest.prototype.options = null; - - /** - * Creates a new GetIamPolicyRequest instance using the specified properties. - * @function create - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest instance - */ - GetIamPolicyRequest.create = function create(properties) { - return new GetIamPolicyRequest(properties); - }; - - /** - * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetIamPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetIamPolicyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetIamPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetIamPolicyRequest message. - * @function verify - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetIamPolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest - */ - GetIamPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.GetIamPolicyRequest) - return object; - var message = new $root.google.iam.v1.GetIamPolicyRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected"); - message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.GetIamPolicyRequest} message GetIamPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetIamPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resource = ""; - object.options = null; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this GetIamPolicyRequest to JSON. - * @function toJSON - * @memberof google.iam.v1.GetIamPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - GetIamPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetIamPolicyRequest - * @function getTypeUrl - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.GetIamPolicyRequest"; - }; - - return GetIamPolicyRequest; - })(); - - v1.TestIamPermissionsRequest = (function() { - - /** - * Properties of a TestIamPermissionsRequest. - * @memberof google.iam.v1 - * @interface ITestIamPermissionsRequest - * @property {string|null} [resource] TestIamPermissionsRequest resource - * @property {Array.|null} [permissions] TestIamPermissionsRequest permissions - */ - - /** - * Constructs a new TestIamPermissionsRequest. - * @memberof google.iam.v1 - * @classdesc Represents a TestIamPermissionsRequest. - * @implements ITestIamPermissionsRequest - * @constructor - * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set - */ - function TestIamPermissionsRequest(properties) { - this.permissions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TestIamPermissionsRequest resource. - * @member {string} resource - * @memberof google.iam.v1.TestIamPermissionsRequest - * @instance - */ - TestIamPermissionsRequest.prototype.resource = ""; - - /** - * TestIamPermissionsRequest permissions. - * @member {Array.} permissions - * @memberof google.iam.v1.TestIamPermissionsRequest - * @instance - */ - TestIamPermissionsRequest.prototype.permissions = $util.emptyArray; - - /** - * Creates a new TestIamPermissionsRequest instance using the specified properties. - * @function create - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest instance - */ - TestIamPermissionsRequest.create = function create(properties) { - return new TestIamPermissionsRequest(properties); - }; - - /** - * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.permissions != null && message.permissions.length) - for (var i = 0; i < message.permissions.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.permissions[i]); - return writer; - }; - - /** - * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TestIamPermissionsRequest message. - * @function verify - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TestIamPermissionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - if (!Array.isArray(message.permissions)) - return "permissions: array expected"; - for (var i = 0; i < message.permissions.length; ++i) - if (!$util.isString(message.permissions[i])) - return "permissions: string[] expected"; - } - return null; - }; - - /** - * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest - */ - TestIamPermissionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest) - return object; - var message = new $root.google.iam.v1.TestIamPermissionsRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.permissions) { - if (!Array.isArray(object.permissions)) - throw TypeError(".google.iam.v1.TestIamPermissionsRequest.permissions: array expected"); - message.permissions = []; - for (var i = 0; i < object.permissions.length; ++i) - message.permissions[i] = String(object.permissions[i]); - } - return message; - }; - - /** - * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.TestIamPermissionsRequest} message TestIamPermissionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TestIamPermissionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.permissions = []; - if (options.defaults) - object.resource = ""; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.permissions && message.permissions.length) { - object.permissions = []; - for (var j = 0; j < message.permissions.length; ++j) - object.permissions[j] = message.permissions[j]; - } - return object; - }; - - /** - * Converts this TestIamPermissionsRequest to JSON. - * @function toJSON - * @memberof google.iam.v1.TestIamPermissionsRequest - * @instance - * @returns {Object.} JSON object - */ - TestIamPermissionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TestIamPermissionsRequest - * @function getTypeUrl - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TestIamPermissionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsRequest"; - }; - - return TestIamPermissionsRequest; - })(); - - v1.TestIamPermissionsResponse = (function() { - - /** - * Properties of a TestIamPermissionsResponse. - * @memberof google.iam.v1 - * @interface ITestIamPermissionsResponse - * @property {Array.|null} [permissions] TestIamPermissionsResponse permissions - */ - - /** - * Constructs a new TestIamPermissionsResponse. - * @memberof google.iam.v1 - * @classdesc Represents a TestIamPermissionsResponse. - * @implements ITestIamPermissionsResponse - * @constructor - * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set - */ - function TestIamPermissionsResponse(properties) { - this.permissions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TestIamPermissionsResponse permissions. - * @member {Array.} permissions - * @memberof google.iam.v1.TestIamPermissionsResponse - * @instance - */ - TestIamPermissionsResponse.prototype.permissions = $util.emptyArray; - - /** - * Creates a new TestIamPermissionsResponse instance using the specified properties. - * @function create - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse instance - */ - TestIamPermissionsResponse.create = function create(properties) { - return new TestIamPermissionsResponse(properties); - }; - - /** - * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.permissions != null && message.permissions.length) - for (var i = 0; i < message.permissions.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.permissions[i]); - return writer; - }; - - /** - * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TestIamPermissionsResponse message. - * @function verify - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TestIamPermissionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - if (!Array.isArray(message.permissions)) - return "permissions: array expected"; - for (var i = 0; i < message.permissions.length; ++i) - if (!$util.isString(message.permissions[i])) - return "permissions: string[] expected"; - } - return null; - }; - - /** - * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse - */ - TestIamPermissionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse) - return object; - var message = new $root.google.iam.v1.TestIamPermissionsResponse(); - if (object.permissions) { - if (!Array.isArray(object.permissions)) - throw TypeError(".google.iam.v1.TestIamPermissionsResponse.permissions: array expected"); - message.permissions = []; - for (var i = 0; i < object.permissions.length; ++i) - message.permissions[i] = String(object.permissions[i]); - } - return message; - }; - - /** - * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.TestIamPermissionsResponse} message TestIamPermissionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TestIamPermissionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.permissions = []; - if (message.permissions && message.permissions.length) { - object.permissions = []; - for (var j = 0; j < message.permissions.length; ++j) - object.permissions[j] = message.permissions[j]; - } - return object; - }; - - /** - * Converts this TestIamPermissionsResponse to JSON. - * @function toJSON - * @memberof google.iam.v1.TestIamPermissionsResponse - * @instance - * @returns {Object.} JSON object - */ - TestIamPermissionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TestIamPermissionsResponse - * @function getTypeUrl - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TestIamPermissionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsResponse"; - }; - - return TestIamPermissionsResponse; - })(); - - v1.GetPolicyOptions = (function() { - - /** - * Properties of a GetPolicyOptions. - * @memberof google.iam.v1 - * @interface IGetPolicyOptions - * @property {number|null} [requestedPolicyVersion] GetPolicyOptions requestedPolicyVersion - */ - - /** - * Constructs a new GetPolicyOptions. - * @memberof google.iam.v1 - * @classdesc Represents a GetPolicyOptions. - * @implements IGetPolicyOptions - * @constructor - * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set - */ - function GetPolicyOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetPolicyOptions requestedPolicyVersion. - * @member {number} requestedPolicyVersion - * @memberof google.iam.v1.GetPolicyOptions - * @instance - */ - GetPolicyOptions.prototype.requestedPolicyVersion = 0; - - /** - * Creates a new GetPolicyOptions instance using the specified properties. - * @function create - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions instance - */ - GetPolicyOptions.create = function create(properties) { - return new GetPolicyOptions(properties); - }; - - /** - * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPolicyOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.requestedPolicyVersion); - return writer; - }; - - /** - * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPolicyOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPolicyOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetPolicyOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.requestedPolicyVersion = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPolicyOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPolicyOptions message. - * @function verify - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPolicyOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) - if (!$util.isInteger(message.requestedPolicyVersion)) - return "requestedPolicyVersion: integer expected"; - return null; - }; - - /** - * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions - */ - GetPolicyOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.GetPolicyOptions) - return object; - var message = new $root.google.iam.v1.GetPolicyOptions(); - if (object.requestedPolicyVersion != null) - message.requestedPolicyVersion = object.requestedPolicyVersion | 0; - return message; - }; - - /** - * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.GetPolicyOptions} message GetPolicyOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPolicyOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.requestedPolicyVersion = 0; - if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) - object.requestedPolicyVersion = message.requestedPolicyVersion; - return object; - }; - - /** - * Converts this GetPolicyOptions to JSON. - * @function toJSON - * @memberof google.iam.v1.GetPolicyOptions - * @instance - * @returns {Object.} JSON object - */ - GetPolicyOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetPolicyOptions - * @function getTypeUrl - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPolicyOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.GetPolicyOptions"; - }; - - return GetPolicyOptions; - })(); - - v1.Policy = (function() { - - /** - * Properties of a Policy. - * @memberof google.iam.v1 - * @interface IPolicy - * @property {number|null} [version] Policy version - * @property {Array.|null} [bindings] Policy bindings - * @property {Array.|null} [auditConfigs] Policy auditConfigs - * @property {Uint8Array|null} [etag] Policy etag - */ - - /** - * Constructs a new Policy. - * @memberof google.iam.v1 - * @classdesc Represents a Policy. - * @implements IPolicy - * @constructor - * @param {google.iam.v1.IPolicy=} [properties] Properties to set - */ - function Policy(properties) { - this.bindings = []; - this.auditConfigs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Policy version. - * @member {number} version - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.version = 0; - - /** - * Policy bindings. - * @member {Array.} bindings - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.bindings = $util.emptyArray; - - /** - * Policy auditConfigs. - * @member {Array.} auditConfigs - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.auditConfigs = $util.emptyArray; - - /** - * Policy etag. - * @member {Uint8Array} etag - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.etag = $util.newBuffer([]); - - /** - * Creates a new Policy instance using the specified properties. - * @function create - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.IPolicy=} [properties] Properties to set - * @returns {google.iam.v1.Policy} Policy instance - */ - Policy.create = function create(properties) { - return new Policy(properties); - }; - - /** - * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Policy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); - if (message.bindings != null && message.bindings.length) - for (var i = 0; i < message.bindings.length; ++i) - $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.auditConfigs != null && message.auditConfigs.length) - for (var i = 0; i < message.auditConfigs.length; ++i) - $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Policy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Policy message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.Policy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.Policy} Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Policy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.int32(); - break; - } - case 4: { - if (!(message.bindings && message.bindings.length)) - message.bindings = []; - message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.auditConfigs && message.auditConfigs.length)) - message.auditConfigs = []; - message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32())); - break; - } - case 3: { - message.etag = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Policy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.Policy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.Policy} Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Policy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Policy message. - * @function verify - * @memberof google.iam.v1.Policy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Policy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isInteger(message.version)) - return "version: integer expected"; - if (message.bindings != null && message.hasOwnProperty("bindings")) { - if (!Array.isArray(message.bindings)) - return "bindings: array expected"; - for (var i = 0; i < message.bindings.length; ++i) { - var error = $root.google.iam.v1.Binding.verify(message.bindings[i]); - if (error) - return "bindings." + error; - } - } - if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) { - if (!Array.isArray(message.auditConfigs)) - return "auditConfigs: array expected"; - for (var i = 0; i < message.auditConfigs.length; ++i) { - var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]); - if (error) - return "auditConfigs." + error; - } - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) - return "etag: buffer expected"; - return null; - }; - - /** - * Creates a Policy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.Policy - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.Policy} Policy - */ - Policy.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.Policy) - return object; - var message = new $root.google.iam.v1.Policy(); - if (object.version != null) - message.version = object.version | 0; - if (object.bindings) { - if (!Array.isArray(object.bindings)) - throw TypeError(".google.iam.v1.Policy.bindings: array expected"); - message.bindings = []; - for (var i = 0; i < object.bindings.length; ++i) { - if (typeof object.bindings[i] !== "object") - throw TypeError(".google.iam.v1.Policy.bindings: object expected"); - message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); - } - } - if (object.auditConfigs) { - if (!Array.isArray(object.auditConfigs)) - throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected"); - message.auditConfigs = []; - for (var i = 0; i < object.auditConfigs.length; ++i) { - if (typeof object.auditConfigs[i] !== "object") - throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); - message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]); - } - } - if (object.etag != null) - if (typeof object.etag === "string") - $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); - else if (object.etag.length >= 0) - message.etag = object.etag; - return message; - }; - - /** - * Creates a plain object from a Policy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.Policy} message Policy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Policy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.bindings = []; - object.auditConfigs = []; - } - if (options.defaults) { - object.version = 0; - if (options.bytes === String) - object.etag = ""; - else { - object.etag = []; - if (options.bytes !== Array) - object.etag = $util.newBuffer(object.etag); - } - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; - if (message.bindings && message.bindings.length) { - object.bindings = []; - for (var j = 0; j < message.bindings.length; ++j) - object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); - } - if (message.auditConfigs && message.auditConfigs.length) { - object.auditConfigs = []; - for (var j = 0; j < message.auditConfigs.length; ++j) - object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options); - } - return object; - }; - - /** - * Converts this Policy to JSON. - * @function toJSON - * @memberof google.iam.v1.Policy - * @instance - * @returns {Object.} JSON object - */ - Policy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Policy - * @function getTypeUrl - * @memberof google.iam.v1.Policy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Policy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.Policy"; - }; - - return Policy; - })(); - - v1.Binding = (function() { - - /** - * Properties of a Binding. - * @memberof google.iam.v1 - * @interface IBinding - * @property {string|null} [role] Binding role - * @property {Array.|null} [members] Binding members - * @property {google.type.IExpr|null} [condition] Binding condition - */ - - /** - * Constructs a new Binding. - * @memberof google.iam.v1 - * @classdesc Represents a Binding. - * @implements IBinding - * @constructor - * @param {google.iam.v1.IBinding=} [properties] Properties to set - */ - function Binding(properties) { - this.members = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Binding role. - * @member {string} role - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.role = ""; - - /** - * Binding members. - * @member {Array.} members - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.members = $util.emptyArray; - - /** - * Binding condition. - * @member {google.type.IExpr|null|undefined} condition - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.condition = null; - - /** - * Creates a new Binding instance using the specified properties. - * @function create - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.IBinding=} [properties] Properties to set - * @returns {google.iam.v1.Binding} Binding instance - */ - Binding.create = function create(properties) { - return new Binding(properties); - }; - - /** - * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.IBinding} message Binding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Binding.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); - if (message.members != null && message.members.length) - for (var i = 0; i < message.members.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.IBinding} message Binding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Binding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Binding message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.Binding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.Binding} Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Binding.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.role = reader.string(); - break; - } - case 2: { - if (!(message.members && message.members.length)) - message.members = []; - message.members.push(reader.string()); - break; - } - case 3: { - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Binding message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.Binding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.Binding} Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Binding.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Binding message. - * @function verify - * @memberof google.iam.v1.Binding - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Binding.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string expected"; - if (message.members != null && message.hasOwnProperty("members")) { - if (!Array.isArray(message.members)) - return "members: array expected"; - for (var i = 0; i < message.members.length; ++i) - if (!$util.isString(message.members[i])) - return "members: string[] expected"; - } - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.google.type.Expr.verify(message.condition); - if (error) - return "condition." + error; - } - return null; - }; - - /** - * Creates a Binding message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.Binding - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.Binding} Binding - */ - Binding.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.Binding) - return object; - var message = new $root.google.iam.v1.Binding(); - if (object.role != null) - message.role = String(object.role); - if (object.members) { - if (!Array.isArray(object.members)) - throw TypeError(".google.iam.v1.Binding.members: array expected"); - message.members = []; - for (var i = 0; i < object.members.length; ++i) - message.members[i] = String(object.members[i]); - } - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.iam.v1.Binding.condition: object expected"); - message.condition = $root.google.type.Expr.fromObject(object.condition); - } - return message; - }; - - /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.Binding} message Binding - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Binding.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.members = []; - if (options.defaults) { - object.role = ""; - object.condition = null; - } - if (message.role != null && message.hasOwnProperty("role")) - object.role = message.role; - if (message.members && message.members.length) { - object.members = []; - for (var j = 0; j < message.members.length; ++j) - object.members[j] = message.members[j]; - } - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); - return object; - }; - - /** - * Converts this Binding to JSON. - * @function toJSON - * @memberof google.iam.v1.Binding - * @instance - * @returns {Object.} JSON object - */ - Binding.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Binding - * @function getTypeUrl - * @memberof google.iam.v1.Binding - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.Binding"; - }; - - return Binding; - })(); - - v1.AuditConfig = (function() { - - /** - * Properties of an AuditConfig. - * @memberof google.iam.v1 - * @interface IAuditConfig - * @property {string|null} [service] AuditConfig service - * @property {Array.|null} [auditLogConfigs] AuditConfig auditLogConfigs - */ - - /** - * Constructs a new AuditConfig. - * @memberof google.iam.v1 - * @classdesc Represents an AuditConfig. - * @implements IAuditConfig - * @constructor - * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set - */ - function AuditConfig(properties) { - this.auditLogConfigs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AuditConfig service. - * @member {string} service - * @memberof google.iam.v1.AuditConfig - * @instance - */ - AuditConfig.prototype.service = ""; - - /** - * AuditConfig auditLogConfigs. - * @member {Array.} auditLogConfigs - * @memberof google.iam.v1.AuditConfig - * @instance - */ - AuditConfig.prototype.auditLogConfigs = $util.emptyArray; - - /** - * Creates a new AuditConfig instance using the specified properties. - * @function create - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set - * @returns {google.iam.v1.AuditConfig} AuditConfig instance - */ - AuditConfig.create = function create(properties) { - return new AuditConfig(properties); - }; - - /** - * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); - if (message.auditLogConfigs != null && message.auditLogConfigs.length) - for (var i = 0; i < message.auditLogConfigs.length; ++i) - $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuditConfig message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.AuditConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditConfig} AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.service = reader.string(); - break; - } - case 3: { - if (!(message.auditLogConfigs && message.auditLogConfigs.length)) - message.auditLogConfigs = []; - message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuditConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.AuditConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditConfig} AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuditConfig message. - * @function verify - * @memberof google.iam.v1.AuditConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) { - if (!Array.isArray(message.auditLogConfigs)) - return "auditLogConfigs: array expected"; - for (var i = 0; i < message.auditLogConfigs.length; ++i) { - var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]); - if (error) - return "auditLogConfigs." + error; - } - } - return null; - }; - - /** - * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.AuditConfig - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditConfig} AuditConfig - */ - AuditConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditConfig) - return object; - var message = new $root.google.iam.v1.AuditConfig(); - if (object.service != null) - message.service = String(object.service); - if (object.auditLogConfigs) { - if (!Array.isArray(object.auditLogConfigs)) - throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected"); - message.auditLogConfigs = []; - for (var i = 0; i < object.auditLogConfigs.length; ++i) { - if (typeof object.auditLogConfigs[i] !== "object") - throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); - message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.AuditConfig} message AuditConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.auditLogConfigs = []; - if (options.defaults) - object.service = ""; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.auditLogConfigs && message.auditLogConfigs.length) { - object.auditLogConfigs = []; - for (var j = 0; j < message.auditLogConfigs.length; ++j) - object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options); - } - return object; - }; - - /** - * Converts this AuditConfig to JSON. - * @function toJSON - * @memberof google.iam.v1.AuditConfig - * @instance - * @returns {Object.} JSON object - */ - AuditConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuditConfig - * @function getTypeUrl - * @memberof google.iam.v1.AuditConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.AuditConfig"; - }; - - return AuditConfig; - })(); - - v1.AuditLogConfig = (function() { - - /** - * Properties of an AuditLogConfig. - * @memberof google.iam.v1 - * @interface IAuditLogConfig - * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType - * @property {Array.|null} [exemptedMembers] AuditLogConfig exemptedMembers - */ - - /** - * Constructs a new AuditLogConfig. - * @memberof google.iam.v1 - * @classdesc Represents an AuditLogConfig. - * @implements IAuditLogConfig - * @constructor - * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set - */ - function AuditLogConfig(properties) { - this.exemptedMembers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AuditLogConfig logType. - * @member {google.iam.v1.AuditLogConfig.LogType} logType - * @memberof google.iam.v1.AuditLogConfig - * @instance - */ - AuditLogConfig.prototype.logType = 0; - - /** - * AuditLogConfig exemptedMembers. - * @member {Array.} exemptedMembers - * @memberof google.iam.v1.AuditLogConfig - * @instance - */ - AuditLogConfig.prototype.exemptedMembers = $util.emptyArray; - - /** - * Creates a new AuditLogConfig instance using the specified properties. - * @function create - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance - */ - AuditLogConfig.create = function create(properties) { - return new AuditLogConfig(properties); - }; - - /** - * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditLogConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType); - if (message.exemptedMembers != null && message.exemptedMembers.length) - for (var i = 0; i < message.exemptedMembers.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]); - return writer; - }; - - /** - * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditLogConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.logType = reader.int32(); - break; - } - case 2: { - if (!(message.exemptedMembers && message.exemptedMembers.length)) - message.exemptedMembers = []; - message.exemptedMembers.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditLogConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuditLogConfig message. - * @function verify - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditLogConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.logType != null && message.hasOwnProperty("logType")) - switch (message.logType) { - default: - return "logType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) { - if (!Array.isArray(message.exemptedMembers)) - return "exemptedMembers: array expected"; - for (var i = 0; i < message.exemptedMembers.length; ++i) - if (!$util.isString(message.exemptedMembers[i])) - return "exemptedMembers: string[] expected"; - } - return null; - }; - - /** - * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig - */ - AuditLogConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditLogConfig) - return object; - var message = new $root.google.iam.v1.AuditLogConfig(); - switch (object.logType) { - default: - if (typeof object.logType === "number") { - message.logType = object.logType; - break; - } - break; - case "LOG_TYPE_UNSPECIFIED": - case 0: - message.logType = 0; - break; - case "ADMIN_READ": - case 1: - message.logType = 1; - break; - case "DATA_WRITE": - case 2: - message.logType = 2; - break; - case "DATA_READ": - case 3: - message.logType = 3; - break; - } - if (object.exemptedMembers) { - if (!Array.isArray(object.exemptedMembers)) - throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected"); - message.exemptedMembers = []; - for (var i = 0; i < object.exemptedMembers.length; ++i) - message.exemptedMembers[i] = String(object.exemptedMembers[i]); - } - return message; - }; - - /** - * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditLogConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.exemptedMembers = []; - if (options.defaults) - object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0; - if (message.logType != null && message.hasOwnProperty("logType")) - object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] === undefined ? message.logType : $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; - if (message.exemptedMembers && message.exemptedMembers.length) { - object.exemptedMembers = []; - for (var j = 0; j < message.exemptedMembers.length; ++j) - object.exemptedMembers[j] = message.exemptedMembers[j]; - } - return object; - }; - - /** - * Converts this AuditLogConfig to JSON. - * @function toJSON - * @memberof google.iam.v1.AuditLogConfig - * @instance - * @returns {Object.} JSON object - */ - AuditLogConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuditLogConfig - * @function getTypeUrl - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditLogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.AuditLogConfig"; - }; - - /** - * LogType enum. - * @name google.iam.v1.AuditLogConfig.LogType - * @enum {number} - * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value - * @property {number} ADMIN_READ=1 ADMIN_READ value - * @property {number} DATA_WRITE=2 DATA_WRITE value - * @property {number} DATA_READ=3 DATA_READ value - */ - AuditLogConfig.LogType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADMIN_READ"] = 1; - values[valuesById[2] = "DATA_WRITE"] = 2; - values[valuesById[3] = "DATA_READ"] = 3; - return values; - })(); - - return AuditLogConfig; - })(); - - v1.PolicyDelta = (function() { - - /** - * Properties of a PolicyDelta. - * @memberof google.iam.v1 - * @interface IPolicyDelta - * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas - * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas - */ - - /** - * Constructs a new PolicyDelta. - * @memberof google.iam.v1 - * @classdesc Represents a PolicyDelta. - * @implements IPolicyDelta - * @constructor - * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set - */ - function PolicyDelta(properties) { - this.bindingDeltas = []; - this.auditConfigDeltas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PolicyDelta bindingDeltas. - * @member {Array.} bindingDeltas - * @memberof google.iam.v1.PolicyDelta - * @instance - */ - PolicyDelta.prototype.bindingDeltas = $util.emptyArray; - - /** - * PolicyDelta auditConfigDeltas. - * @member {Array.} auditConfigDeltas - * @memberof google.iam.v1.PolicyDelta - * @instance - */ - PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray; - - /** - * Creates a new PolicyDelta instance using the specified properties. - * @function create - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set - * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance - */ - PolicyDelta.create = function create(properties) { - return new PolicyDelta(properties); - }; - - /** - * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyDelta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bindingDeltas != null && message.bindingDeltas.length) - for (var i = 0; i < message.bindingDeltas.length; ++i) - $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) - for (var i = 0; i < message.auditConfigDeltas.length; ++i) - $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.PolicyDelta} PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyDelta.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.bindingDeltas && message.bindingDeltas.length)) - message.bindingDeltas = []; - message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) - message.auditConfigDeltas = []; - message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.PolicyDelta} PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyDelta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PolicyDelta message. - * @function verify - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PolicyDelta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) { - if (!Array.isArray(message.bindingDeltas)) - return "bindingDeltas: array expected"; - for (var i = 0; i < message.bindingDeltas.length; ++i) { - var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i]); - if (error) - return "bindingDeltas." + error; - } - } - if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) { - if (!Array.isArray(message.auditConfigDeltas)) - return "auditConfigDeltas: array expected"; - for (var i = 0; i < message.auditConfigDeltas.length; ++i) { - var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i]); - if (error) - return "auditConfigDeltas." + error; - } - } - return null; - }; - - /** - * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.PolicyDelta} PolicyDelta - */ - PolicyDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.PolicyDelta) - return object; - var message = new $root.google.iam.v1.PolicyDelta(); - if (object.bindingDeltas) { - if (!Array.isArray(object.bindingDeltas)) - throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); - message.bindingDeltas = []; - for (var i = 0; i < object.bindingDeltas.length; ++i) { - if (typeof object.bindingDeltas[i] !== "object") - throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); - message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); - } - } - if (object.auditConfigDeltas) { - if (!Array.isArray(object.auditConfigDeltas)) - throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); - message.auditConfigDeltas = []; - for (var i = 0; i < object.auditConfigDeltas.length; ++i) { - if (typeof object.auditConfigDeltas[i] !== "object") - throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); - message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.PolicyDelta} message PolicyDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PolicyDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.bindingDeltas = []; - object.auditConfigDeltas = []; - } - if (message.bindingDeltas && message.bindingDeltas.length) { - object.bindingDeltas = []; - for (var j = 0; j < message.bindingDeltas.length; ++j) - object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options); - } - if (message.auditConfigDeltas && message.auditConfigDeltas.length) { - object.auditConfigDeltas = []; - for (var j = 0; j < message.auditConfigDeltas.length; ++j) - object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options); - } - return object; - }; - - /** - * Converts this PolicyDelta to JSON. - * @function toJSON - * @memberof google.iam.v1.PolicyDelta - * @instance - * @returns {Object.} JSON object - */ - PolicyDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PolicyDelta - * @function getTypeUrl - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PolicyDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.PolicyDelta"; - }; - - return PolicyDelta; - })(); - - v1.BindingDelta = (function() { - - /** - * Properties of a BindingDelta. - * @memberof google.iam.v1 - * @interface IBindingDelta - * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action - * @property {string|null} [role] BindingDelta role - * @property {string|null} [member] BindingDelta member - * @property {google.type.IExpr|null} [condition] BindingDelta condition - */ - - /** - * Constructs a new BindingDelta. - * @memberof google.iam.v1 - * @classdesc Represents a BindingDelta. - * @implements IBindingDelta - * @constructor - * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set - */ - function BindingDelta(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BindingDelta action. - * @member {google.iam.v1.BindingDelta.Action} action - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.action = 0; - - /** - * BindingDelta role. - * @member {string} role - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.role = ""; - - /** - * BindingDelta member. - * @member {string} member - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.member = ""; - - /** - * BindingDelta condition. - * @member {google.type.IExpr|null|undefined} condition - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.condition = null; - - /** - * Creates a new BindingDelta instance using the specified properties. - * @function create - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set - * @returns {google.iam.v1.BindingDelta} BindingDelta instance - */ - BindingDelta.create = function create(properties) { - return new BindingDelta(properties); - }; - - /** - * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BindingDelta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); - if (message.member != null && Object.hasOwnProperty.call(message, "member")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BindingDelta message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.BindingDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.BindingDelta} BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BindingDelta.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.action = reader.int32(); - break; - } - case 2: { - message.role = reader.string(); - break; - } - case 3: { - message.member = reader.string(); - break; - } - case 4: { - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BindingDelta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.BindingDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.BindingDelta} BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BindingDelta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BindingDelta message. - * @function verify - * @memberof google.iam.v1.BindingDelta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BindingDelta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string expected"; - if (message.member != null && message.hasOwnProperty("member")) - if (!$util.isString(message.member)) - return "member: string expected"; - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.google.type.Expr.verify(message.condition); - if (error) - return "condition." + error; - } - return null; - }; - - /** - * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.BindingDelta - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.BindingDelta} BindingDelta - */ - BindingDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.BindingDelta) - return object; - var message = new $root.google.iam.v1.BindingDelta(); - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "ADD": - case 1: - message.action = 1; - break; - case "REMOVE": - case 2: - message.action = 2; - break; - } - if (object.role != null) - message.role = String(object.role); - if (object.member != null) - message.member = String(object.member); - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); - message.condition = $root.google.type.Expr.fromObject(object.condition); - } - return message; - }; - - /** - * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.BindingDelta} message BindingDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BindingDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.role = ""; - object.member = ""; - object.condition = null; - } - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; - if (message.role != null && message.hasOwnProperty("role")) - object.role = message.role; - if (message.member != null && message.hasOwnProperty("member")) - object.member = message.member; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); - return object; - }; - - /** - * Converts this BindingDelta to JSON. - * @function toJSON - * @memberof google.iam.v1.BindingDelta - * @instance - * @returns {Object.} JSON object - */ - BindingDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BindingDelta - * @function getTypeUrl - * @memberof google.iam.v1.BindingDelta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BindingDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.BindingDelta"; - }; - - /** - * Action enum. - * @name google.iam.v1.BindingDelta.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} ADD=1 ADD value - * @property {number} REMOVE=2 REMOVE value - */ - BindingDelta.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADD"] = 1; - values[valuesById[2] = "REMOVE"] = 2; - return values; - })(); - - return BindingDelta; - })(); - - v1.AuditConfigDelta = (function() { - - /** - * Properties of an AuditConfigDelta. - * @memberof google.iam.v1 - * @interface IAuditConfigDelta - * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action - * @property {string|null} [service] AuditConfigDelta service - * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember - * @property {string|null} [logType] AuditConfigDelta logType - */ - - /** - * Constructs a new AuditConfigDelta. - * @memberof google.iam.v1 - * @classdesc Represents an AuditConfigDelta. - * @implements IAuditConfigDelta - * @constructor - * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set - */ - function AuditConfigDelta(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AuditConfigDelta action. - * @member {google.iam.v1.AuditConfigDelta.Action} action - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.action = 0; - - /** - * AuditConfigDelta service. - * @member {string} service - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.service = ""; - - /** - * AuditConfigDelta exemptedMember. - * @member {string} exemptedMember - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.exemptedMember = ""; - - /** - * AuditConfigDelta logType. - * @member {string} logType - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.logType = ""; - - /** - * Creates a new AuditConfigDelta instance using the specified properties. - * @function create - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance - */ - AuditConfigDelta.create = function create(properties) { - return new AuditConfigDelta(properties); - }; - - /** - * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfigDelta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); - if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); - if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); - return writer; - }; - - /** - * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfigDelta.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.action = reader.int32(); - break; - } - case 2: { - message.service = reader.string(); - break; - } - case 3: { - message.exemptedMember = reader.string(); - break; - } - case 4: { - message.logType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuditConfigDelta message. - * @function verify - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditConfigDelta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) - if (!$util.isString(message.exemptedMember)) - return "exemptedMember: string expected"; - if (message.logType != null && message.hasOwnProperty("logType")) - if (!$util.isString(message.logType)) - return "logType: string expected"; - return null; - }; - - /** - * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta - */ - AuditConfigDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditConfigDelta) - return object; - var message = new $root.google.iam.v1.AuditConfigDelta(); - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "ADD": - case 1: - message.action = 1; - break; - case "REMOVE": - case 2: - message.action = 2; - break; - } - if (object.service != null) - message.service = String(object.service); - if (object.exemptedMember != null) - message.exemptedMember = String(object.exemptedMember); - if (object.logType != null) - message.logType = String(object.logType); - return message; - }; - - /** - * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditConfigDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.service = ""; - object.exemptedMember = ""; - object.logType = ""; - } - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) - object.exemptedMember = message.exemptedMember; - if (message.logType != null && message.hasOwnProperty("logType")) - object.logType = message.logType; - return object; - }; - - /** - * Converts this AuditConfigDelta to JSON. - * @function toJSON - * @memberof google.iam.v1.AuditConfigDelta - * @instance - * @returns {Object.} JSON object - */ - AuditConfigDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AuditConfigDelta - * @function getTypeUrl - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.AuditConfigDelta"; - }; - - /** - * Action enum. - * @name google.iam.v1.AuditConfigDelta.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} ADD=1 ADD value - * @property {number} REMOVE=2 REMOVE value - */ - AuditConfigDelta.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADD"] = 1; - values[valuesById[2] = "REMOVE"] = 2; - return values; - })(); - - return AuditConfigDelta; - })(); - - return v1; - })(); - - return iam; - })(); - - 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; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json deleted file mode 100644 index cf4a8cc6cff..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json +++ /dev/null @@ -1,7871 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "backupdr": { - "nested": { - "v1": { - "options": { - "csharp_namespace": "Google.Cloud.BackupDR.V1", - "go_package": "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb", - "java_multiple_files": true, - "java_outer_classname": "BackupvaultGceProto", - "java_package": "com.google.cloud.backupdr.v1", - "php_namespace": "Google\\Cloud\\BackupDR\\V1", - "ruby_package": "Google::Cloud::BackupDR::V1" - }, - "nested": { - "BackupDR": { - "options": { - "(google.api.default_host)": "backupdr.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListManagementServers": { - "requestType": "ListManagementServersRequest", - "responseType": "ListManagementServersResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/managementServers", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/managementServers" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetManagementServer": { - "requestType": "GetManagementServerRequest", - "responseType": "ManagementServer", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/managementServers/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/managementServers/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateManagementServer": { - "requestType": "CreateManagementServerRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/managementServers", - "(google.api.http).body": "management_server", - "(google.api.method_signature)": "parent,management_server,management_server_id", - "(google.longrunning.operation_info).response_type": "ManagementServer", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/managementServers", - "body": "management_server" - } - }, - { - "(google.api.method_signature)": "parent,management_server,management_server_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "ManagementServer", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteManagementServer": { - "requestType": "DeleteManagementServerRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/managementServers/*}", - "(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/*/managementServers/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "CreateBackupVault": { - "requestType": "CreateBackupVaultRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupVaults", - "(google.api.http).body": "backup_vault", - "(google.api.method_signature)": "parent,backup_vault,backup_vault_id", - "(google.longrunning.operation_info).response_type": "BackupVault", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/backupVaults", - "body": "backup_vault" - } - }, - { - "(google.api.method_signature)": "parent,backup_vault,backup_vault_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "BackupVault", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListBackupVaults": { - "requestType": "ListBackupVaultsRequest", - "responseType": "ListBackupVaultsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupVaults", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/backupVaults" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "FetchUsableBackupVaults": { - "requestType": "FetchUsableBackupVaultsRequest", - "responseType": "FetchUsableBackupVaultsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetBackupVault": { - "requestType": "GetBackupVaultRequest", - "responseType": "BackupVault", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/backupVaults/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateBackupVault": { - "requestType": "UpdateBackupVaultRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}", - "(google.api.http).body": "backup_vault", - "(google.api.method_signature)": "backup_vault,update_mask", - "(google.longrunning.operation_info).response_type": "BackupVault", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}", - "body": "backup_vault" - } - }, - { - "(google.api.method_signature)": "backup_vault,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "BackupVault", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteBackupVault": { - "requestType": "DeleteBackupVaultRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupVaults/*}", - "(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/*/backupVaults/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "TestIamPermissions": { - "requestType": "google.iam.v1.TestIamPermissionsRequest", - "responseType": "google.iam.v1.TestIamPermissionsResponse", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/locations/*/backupVaults/*}:testIamPermissions", - "(google.api.http).body": "*", - "(google.api.method_signature)": "resource, permissions" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=projects/*/locations/*/backupVaults/*}:testIamPermissions", - "body": "*" - } - }, - { - "(google.api.method_signature)": "resource, permissions" - } - ] - }, - "ListDataSources": { - "requestType": "ListDataSourcesRequest", - "responseType": "ListDataSourcesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetDataSource": { - "requestType": "GetDataSourceRequest", - "responseType": "DataSource", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateDataSource": { - "requestType": "UpdateDataSourceRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}", - "(google.api.http).body": "data_source", - "(google.api.method_signature)": "data_source,update_mask", - "(google.longrunning.operation_info).response_type": "DataSource", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}", - "body": "data_source" - } - }, - { - "(google.api.method_signature)": "data_source,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "DataSource", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "RemoveDataSource": { - "requestType": "RemoveDataSourceRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:remove", - "(google.api.http).body": "*", - "(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)": { - "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:remove", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "SetInternalStatus": { - "requestType": "SetInternalStatusRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:setInternalStatus", - "(google.api.http).body": "*", - "(google.api.method_signature)": "data_source", - "(google.longrunning.operation_info).response_type": "SetInternalStatusResponse", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:setInternalStatus", - "body": "*" - } - }, - { - "(google.api.method_signature)": "data_source" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "SetInternalStatusResponse", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "InitiateBackup": { - "requestType": "InitiateBackupRequest", - "responseType": "InitiateBackupResponse", - "options": { - "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:initiateBackup", - "(google.api.http).body": "*", - "(google.api.method_signature)": "data_source" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:initiateBackup", - "body": "*" - } - }, - { - "(google.api.method_signature)": "data_source" - } - ] - }, - "AbandonBackup": { - "requestType": "AbandonBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:abandonBackup", - "(google.api.http).body": "*", - "(google.api.method_signature)": "data_source", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:abandonBackup", - "body": "*" - } - }, - { - "(google.api.method_signature)": "data_source" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "FinalizeBackup": { - "requestType": "FinalizeBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:finalizeBackup", - "(google.api.http).body": "*", - "(google.api.method_signature)": "data_source", - "(google.longrunning.operation_info).response_type": "Backup", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:finalizeBackup", - "body": "*" - } - }, - { - "(google.api.method_signature)": "data_source" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Backup", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "FetchAccessToken": { - "requestType": "FetchAccessTokenRequest", - "responseType": "FetchAccessTokenResponse", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListBackups": { - "requestType": "ListBackupsRequest", - "responseType": "ListBackupsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetBackup": { - "requestType": "GetBackupRequest", - "responseType": "Backup", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateBackup": { - "requestType": "UpdateBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", - "(google.api.http).body": "backup", - "(google.api.method_signature)": "backup,update_mask", - "(google.longrunning.operation_info).response_type": "Backup", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", - "body": "backup" - } - }, - { - "(google.api.method_signature)": "backup,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Backup", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteBackup": { - "requestType": "DeleteBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "Backup", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Backup", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "RestoreBackup": { - "requestType": "RestoreBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "RestoreBackupResponse", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "RestoreBackupResponse", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "CreateBackupPlan": { - "requestType": "CreateBackupPlanRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupPlans", - "(google.api.http).body": "backup_plan", - "(google.api.method_signature)": "parent,backup_plan,backup_plan_id", - "(google.longrunning.operation_info).response_type": "BackupPlan", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/backupPlans", - "body": "backup_plan" - } - }, - { - "(google.api.method_signature)": "parent,backup_plan,backup_plan_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "BackupPlan", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "GetBackupPlan": { - "requestType": "GetBackupPlanRequest", - "responseType": "BackupPlan", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupPlans/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/backupPlans/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListBackupPlans": { - "requestType": "ListBackupPlansRequest", - "responseType": "ListBackupPlansResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupPlans", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/backupPlans" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "DeleteBackupPlan": { - "requestType": "DeleteBackupPlanRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupPlans/*}", - "(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/*/backupPlans/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "CreateBackupPlanAssociation": { - "requestType": "CreateBackupPlanAssociationRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", - "(google.api.http).body": "backup_plan_association", - "(google.api.method_signature)": "parent,backup_plan_association,backup_plan_association_id", - "(google.longrunning.operation_info).response_type": "BackupPlanAssociation", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", - "body": "backup_plan_association" - } - }, - { - "(google.api.method_signature)": "parent,backup_plan_association,backup_plan_association_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "BackupPlanAssociation", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "GetBackupPlanAssociation": { - "requestType": "GetBackupPlanAssociationRequest", - "responseType": "BackupPlanAssociation", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListBackupPlanAssociations": { - "requestType": "ListBackupPlanAssociationsRequest", - "responseType": "ListBackupPlanAssociationsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "DeleteBackupPlanAssociation": { - "requestType": "DeleteBackupPlanAssociationRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}", - "(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/*/backupPlanAssociations/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "TriggerBackup": { - "requestType": "TriggerBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name,rule_id", - "(google.longrunning.operation_info).response_type": "BackupPlanAssociation", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name,rule_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "BackupPlanAssociation", - "metadata_type": "OperationMetadata" - } - } - ] - } - } - }, - "NetworkConfig": { - "fields": { - "network": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "peeringMode": { - "type": "PeeringMode", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "PeeringMode": { - "values": { - "PEERING_MODE_UNSPECIFIED": 0, - "PRIVATE_SERVICE_ACCESS": 1 - } - } - } - }, - "ManagementURI": { - "fields": { - "webUi": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "api": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "WorkforceIdentityBasedManagementURI": { - "fields": { - "firstPartyManagementUri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "thirdPartyManagementUri": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "WorkforceIdentityBasedOAuth2ClientID": { - "fields": { - "firstPartyOauth2ClientId": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "thirdPartyOauth2ClientId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ManagementServer": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/ManagementServer", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/managementServers/{managementserver}", - "(google.api.resource).plural": "managementServers", - "(google.api.resource).singular": "managementServer" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "description": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "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" - } - }, - "type": { - "type": "InstanceType", - "id": 14, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "managementUri": { - "type": "ManagementURI", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "workforceIdentityBasedManagementUri": { - "type": "WorkforceIdentityBasedManagementURI", - "id": 16, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "state": { - "type": "InstanceState", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "networks": { - "rule": "repeated", - "type": "NetworkConfig", - "id": 8, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "etag": { - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "oauth2ClientId": { - "type": "string", - "id": 15, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "workforceIdentityBasedOauth2ClientId": { - "type": "WorkforceIdentityBasedOAuth2ClientID", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "baProxyUri": { - "rule": "repeated", - "type": "string", - "id": 18, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "satisfiesPzs": { - "type": "google.protobuf.BoolValue", - "id": 19, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "satisfiesPzi": { - "type": "bool", - "id": 20, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "InstanceType": { - "values": { - "INSTANCE_TYPE_UNSPECIFIED": 0, - "BACKUP_RESTORE": 1 - } - }, - "InstanceState": { - "values": { - "INSTANCE_STATE_UNSPECIFIED": 0, - "CREATING": 1, - "READY": 2, - "UPDATING": 3, - "DELETING": 4, - "REPAIRING": 5, - "MAINTENANCE": 6, - "ERROR": 7 - } - } - } - }, - "ListManagementServersRequest": { - "oneofs": { - "_filter": { - "oneof": [ - "filter" - ] - }, - "_orderBy": { - "oneof": [ - "orderBy" - ] - } - }, - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "ListManagementServersResponse": { - "fields": { - "managementServers": { - "rule": "repeated", - "type": "ManagementServer", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetManagementServerRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" - } - } - } - }, - "CreateManagementServerRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" - } - }, - "managementServerId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "managementServer": { - "type": "ManagementServer", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteManagementServerRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" - } - }, - "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" - } - }, - "additionalInfo": { - "keyType": "string", - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "BackupPlan": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/BackupPlan", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPlans/{backup_plan}", - "(google.api.resource).plural": "backupPlans", - "(google.api.resource).singular": "backupPlan" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backupRules": { - "rule": "repeated", - "type": "BackupRule", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "state": { - "type": "State", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "resourceType": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "etag": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "backupVault": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" - } - }, - "backupVaultServiceAccount": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "DELETING": 3, - "INACTIVE": 4 - } - } - } - }, - "BackupRule": { - "oneofs": { - "backupScheduleOneof": { - "oneof": [ - "standardSchedule" - ] - } - }, - "fields": { - "ruleId": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "backupRetentionDays": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "standardSchedule": { - "type": "StandardSchedule", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "StandardSchedule": { - "fields": { - "recurrenceType": { - "type": "RecurrenceType", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "hourlyFrequency": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "daysOfWeek": { - "rule": "repeated", - "type": "google.type.DayOfWeek", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "daysOfMonth": { - "rule": "repeated", - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "weekDayOfMonth": { - "type": "WeekDayOfMonth", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "months": { - "rule": "repeated", - "type": "google.type.Month", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "backupWindow": { - "type": "BackupWindow", - "id": 7, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "timeZone": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - }, - "nested": { - "RecurrenceType": { - "values": { - "RECURRENCE_TYPE_UNSPECIFIED": 0, - "HOURLY": 1, - "DAILY": 2, - "WEEKLY": 3, - "MONTHLY": 4, - "YEARLY": 5 - } - } - } - }, - "BackupWindow": { - "fields": { - "startHourOfDay": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "endHourOfDay": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "WeekDayOfMonth": { - "fields": { - "weekOfMonth": { - "type": "WeekOfMonth", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dayOfWeek": { - "type": "google.type.DayOfWeek", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - }, - "nested": { - "WeekOfMonth": { - "values": { - "WEEK_OF_MONTH_UNSPECIFIED": 0, - "FIRST": 1, - "SECOND": 2, - "THIRD": 3, - "FOURTH": 4, - "LAST": 5 - } - } - } - }, - "CreateBackupPlanRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlan" - } - }, - "backupPlanId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupPlan": { - "type": "BackupPlan", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupPlansRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlan" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupPlansResponse": { - "fields": { - "backupPlans": { - "rule": "repeated", - "type": "BackupPlan", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetBackupPlanRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" - } - } - } - }, - "DeleteBackupPlanRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "BackupPlanAssociation": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/BackupPlanAssociation", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}", - "(google.api.resource).plural": "backupPlanAssociations", - "(google.api.resource).singular": "backupPlanAssociation" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "resourceType": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "resource": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupPlan": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "state": { - "type": "State", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "rulesConfigInfo": { - "rule": "repeated", - "type": "RuleConfigInfo", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dataSource": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "DELETING": 3, - "INACTIVE": 4 - } - } - } - }, - "RuleConfigInfo": { - "fields": { - "ruleId": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastBackupState": { - "type": "LastBackupState", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastBackupError": { - "type": "google.rpc.Status", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastSuccessfulBackupConsistencyTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "LastBackupState": { - "values": { - "LAST_BACKUP_STATE_UNSPECIFIED": 0, - "FIRST_BACKUP_PENDING": 1, - "PERMISSION_DENIED": 2, - "SUCCEEDED": 3, - "FAILED": 4 - } - } - } - }, - "CreateBackupPlanAssociationRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlanAssociation" - } - }, - "backupPlanAssociationId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupPlanAssociation": { - "type": "BackupPlanAssociation", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupPlanAssociationsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlanAssociation" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupPlanAssociationsResponse": { - "fields": { - "backupPlanAssociations": { - "rule": "repeated", - "type": "BackupPlanAssociation", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetBackupPlanAssociationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" - } - } - } - }, - "DeleteBackupPlanAssociationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "TriggerBackupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" - } - }, - "ruleId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "BackupVault": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/BackupVault", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}", - "(google.api.resource).plural": "backupVaults", - "(google.api.resource).singular": "backupVault" - }, - "oneofs": { - "_description": { - "oneof": [ - "description" - ] - }, - "_createTime": { - "oneof": [ - "createTime" - ] - }, - "_updateTime": { - "oneof": [ - "updateTime" - ] - }, - "_backupMinimumEnforcedRetentionDuration": { - "oneof": [ - "backupMinimumEnforcedRetentionDuration" - ] - }, - "_deletable": { - "oneof": [ - "deletable" - ] - }, - "_etag": { - "oneof": [ - "etag" - ] - }, - "_effectiveTime": { - "oneof": [ - "effectiveTime" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "backupMinimumEnforcedRetentionDuration": { - "type": "google.protobuf.Duration", - "id": 20, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "proto3_optional": true - } - }, - "deletable": { - "type": "bool", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "etag": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "state": { - "type": "State", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "effectiveTime": { - "type": "google.protobuf.Timestamp", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "backupCount": { - "type": "int64", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "serviceAccount": { - "type": "string", - "id": 18, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "totalStoredBytes": { - "type": "int64", - "id": 19, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "uid": { - "type": "string", - "id": 21, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "annotations": { - "keyType": "string", - "type": "string", - "id": 22, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "accessRestriction": { - "type": "AccessRestriction", - "id": 24, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "DELETING": 3, - "ERROR": 4 - } - }, - "AccessRestriction": { - "values": { - "ACCESS_RESTRICTION_UNSPECIFIED": 0, - "WITHIN_PROJECT": 1, - "WITHIN_ORGANIZATION": 2, - "UNRESTRICTED": 3 - } - } - } - }, - "DataSource": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/DataSource", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}", - "(google.api.resource).plural": "dataSources", - "(google.api.resource).singular": "dataSource" - }, - "oneofs": { - "_createTime": { - "oneof": [ - "createTime" - ] - }, - "_updateTime": { - "oneof": [ - "updateTime" - ] - }, - "_backupCount": { - "oneof": [ - "backupCount" - ] - }, - "_etag": { - "oneof": [ - "etag" - ] - }, - "_totalStoredBytes": { - "oneof": [ - "totalStoredBytes" - ] - }, - "sourceResource": { - "oneof": [ - "dataSourceGcpResource", - "dataSourceBackupApplianceApplication" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "state": { - "type": "State", - "id": 21, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "backupCount": { - "type": "int64", - "id": 7, - "options": { - "proto3_optional": true - } - }, - "etag": { - "type": "string", - "id": 14, - "options": { - "proto3_optional": true - } - }, - "totalStoredBytes": { - "type": "int64", - "id": 23, - "options": { - "proto3_optional": true - } - }, - "configState": { - "type": "BackupConfigState", - "id": 24, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backupConfigInfo": { - "type": "BackupConfigInfo", - "id": 25, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dataSourceGcpResource": { - "type": "DataSourceGcpResource", - "id": 26 - }, - "dataSourceBackupApplianceApplication": { - "type": "DataSourceBackupApplianceApplication", - "id": 27 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "DELETING": 3, - "ERROR": 4 - } - } - } - }, - "BackupConfigInfo": { - "oneofs": { - "backupConfig": { - "oneof": [ - "gcpBackupConfig", - "backupApplianceBackupConfig" - ] - } - }, - "fields": { - "lastBackupState": { - "type": "LastBackupState", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastSuccessfulBackupConsistencyTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastBackupError": { - "type": "google.rpc.Status", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "gcpBackupConfig": { - "type": "GcpBackupConfig", - "id": 4 - }, - "backupApplianceBackupConfig": { - "type": "BackupApplianceBackupConfig", - "id": 5 - } - }, - "nested": { - "LastBackupState": { - "values": { - "LAST_BACKUP_STATE_UNSPECIFIED": 0, - "FIRST_BACKUP_PENDING": 1, - "SUCCEEDED": 2, - "FAILED": 3, - "PERMISSION_DENIED": 4 - } - } - } - }, - "GcpBackupConfig": { - "fields": { - "backupPlan": { - "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" - } - }, - "backupPlanDescription": { - "type": "string", - "id": 2 - }, - "backupPlanAssociation": { - "type": "string", - "id": 3, - "options": { - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" - } - }, - "backupPlanRules": { - "rule": "repeated", - "type": "string", - "id": 4 - } - } - }, - "BackupApplianceBackupConfig": { - "fields": { - "backupApplianceName": { - "type": "string", - "id": 1 - }, - "backupApplianceId": { - "type": "int64", - "id": 2 - }, - "slaId": { - "type": "int64", - "id": 3 - }, - "applicationName": { - "type": "string", - "id": 4 - }, - "hostName": { - "type": "string", - "id": 5 - }, - "sltName": { - "type": "string", - "id": 6 - }, - "slpName": { - "type": "string", - "id": 7 - } - } - }, - "DataSourceGcpResource": { - "oneofs": { - "gcpResourceProperties": { - "oneof": [ - "computeInstanceDatasourceProperties" - ] - } - }, - "fields": { - "gcpResourcename": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "location": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "computeInstanceDatasourceProperties": { - "type": "ComputeInstanceDataSourceProperties", - "id": 4 - } - } - }, - "DataSourceBackupApplianceApplication": { - "fields": { - "applicationName": { - "type": "string", - "id": 1 - }, - "backupAppliance": { - "type": "string", - "id": 2 - }, - "applianceId": { - "type": "int64", - "id": 3 - }, - "type": { - "type": "string", - "id": 4 - }, - "applicationId": { - "type": "int64", - "id": 8 - }, - "hostname": { - "type": "string", - "id": 6 - }, - "hostId": { - "type": "int64", - "id": 7 - } - } - }, - "ServiceLockInfo": { - "fields": { - "operation": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "BackupApplianceLockInfo": { - "oneofs": { - "lockSource": { - "oneof": [ - "jobName", - "backupImage", - "slaId" - ] - } - }, - "fields": { - "backupApplianceId": { - "type": "int64", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupApplianceName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "lockReason": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "jobName": { - "type": "string", - "id": 6 - }, - "backupImage": { - "type": "string", - "id": 7 - }, - "slaId": { - "type": "int64", - "id": 8 - } - } - }, - "BackupLock": { - "oneofs": { - "ClientLockInfo": { - "oneof": [ - "backupApplianceLockInfo", - "serviceLockInfo" - ] - } - }, - "fields": { - "lockUntilTime": { - "type": "google.protobuf.Timestamp", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupApplianceLockInfo": { - "type": "BackupApplianceLockInfo", - "id": 3 - }, - "serviceLockInfo": { - "type": "ServiceLockInfo", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "Backup": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/Backup", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}", - "(google.api.resource).plural": "backups", - "(google.api.resource).singular": "backup" - }, - "oneofs": { - "_description": { - "oneof": [ - "description" - ] - }, - "_createTime": { - "oneof": [ - "createTime" - ] - }, - "_updateTime": { - "oneof": [ - "updateTime" - ] - }, - "_enforcedRetentionEndTime": { - "oneof": [ - "enforcedRetentionEndTime" - ] - }, - "_expireTime": { - "oneof": [ - "expireTime" - ] - }, - "_consistencyTime": { - "oneof": [ - "consistencyTime" - ] - }, - "_etag": { - "oneof": [ - "etag" - ] - }, - "backupProperties": { - "oneof": [ - "computeInstanceBackupProperties", - "backupApplianceBackupProperties" - ] - }, - "planInfo": { - "oneof": [ - "gcpBackupPlanInfo" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "enforcedRetentionEndTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "expireTime": { - "type": "google.protobuf.Timestamp", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "consistencyTime": { - "type": "google.protobuf.Timestamp", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "etag": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "state": { - "type": "State", - "id": 15, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "serviceLocks": { - "rule": "repeated", - "type": "BackupLock", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backupApplianceLocks": { - "rule": "repeated", - "type": "BackupLock", - "id": 18, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "computeInstanceBackupProperties": { - "type": "ComputeInstanceBackupProperties", - "id": 19, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backupApplianceBackupProperties": { - "type": "BackupApplianceBackupProperties", - "id": 21, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backupType": { - "type": "BackupType", - "id": 20, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "gcpBackupPlanInfo": { - "type": "GCPBackupPlanInfo", - "id": 22, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "resourceSizeBytes": { - "type": "int64", - "id": 23, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "DELETING": 3, - "ERROR": 4 - } - }, - "BackupType": { - "values": { - "BACKUP_TYPE_UNSPECIFIED": 0, - "SCHEDULED": 1, - "ON_DEMAND": 2 - } - }, - "GCPBackupPlanInfo": { - "fields": { - "backupPlan": { - "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" - } - }, - "backupPlanRuleId": { - "type": "string", - "id": 2 - } - } - } - } - }, - "CreateBackupVaultRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" - } - }, - "backupVaultId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupVault": { - "type": "BackupVault", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "validateOnly": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupVaultsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "view": { - "type": "BackupVaultView", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupVaultsResponse": { - "fields": { - "backupVaults": { - "rule": "repeated", - "type": "BackupVault", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "FetchUsableBackupVaultsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "FetchUsableBackupVaultsResponse": { - "fields": { - "backupVaults": { - "rule": "repeated", - "type": "BackupVault", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetBackupVaultRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" - } - }, - "view": { - "type": "BackupVaultView", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateBackupVaultRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupVault": { - "type": "BackupVault", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "UUID4", - "(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" - } - } - } - }, - "DeleteBackupVaultRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "force": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "etag": { - "type": "string", - "id": 4 - }, - "validateOnly": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "allowMissing": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListDataSourcesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/DataSource" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListDataSourcesResponse": { - "fields": { - "dataSources": { - "rule": "repeated", - "type": "DataSource", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetDataSourceRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - } - } - }, - "UpdateDataSourceRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dataSource": { - "type": "DataSource", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "allowMissing": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "RemoveDataSourceRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "SetInternalStatusRequest": { - "fields": { - "dataSource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - }, - "value": { - "type": "bytes", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupConfigState": { - "type": "BackupConfigState", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "SetInternalStatusResponse": { - "fields": {} - }, - "InitiateBackupRequest": { - "fields": { - "dataSource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "backupId": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "InitiateBackupResponse": { - "fields": { - "backup": { - "type": "string", - "id": 1 - }, - "newBackupGenerationId": { - "type": "int32", - "id": 2 - }, - "baseBackupGenerationId": { - "type": "int32", - "id": 3 - } - } - }, - "AbandonBackupRequest": { - "fields": { - "dataSource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "FinalizeBackupRequest": { - "oneofs": { - "_description": { - "oneof": [ - "description" - ] - }, - "_consistencyTime": { - "oneof": [ - "consistencyTime" - ] - }, - "_recoveryRangeStartTime": { - "oneof": [ - "recoveryRangeStartTime" - ] - }, - "_recoveryRangeEndTime": { - "oneof": [ - "recoveryRangeEndTime" - ] - }, - "_retentionDuration": { - "oneof": [ - "retentionDuration" - ] - } - }, - "fields": { - "dataSource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "consistencyTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "backupId": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "recoveryRangeStartTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "proto3_optional": true - } - }, - "recoveryRangeEndTime": { - "type": "google.protobuf.Timestamp", - "id": 7, - "options": { - "proto3_optional": true - } - }, - "retentionDuration": { - "type": "google.protobuf.Duration", - "id": 9, - "options": { - "proto3_optional": true - } - } - } - }, - "FetchAccessTokenRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - }, - "generationId": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "FetchAccessTokenResponse": { - "fields": { - "readLocation": { - "type": "string", - "id": 1 - }, - "writeLocation": { - "type": "string", - "id": 2 - }, - "token": { - "type": "string", - "id": 3 - }, - "expireTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - } - } - }, - "ListBackupsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/Backup" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "view": { - "type": "BackupView", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupsResponse": { - "fields": { - "backups": { - "rule": "repeated", - "type": "Backup", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetBackupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" - } - }, - "view": { - "type": "BackupView", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateBackupRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backup": { - "type": "Backup", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteBackupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "RestoreBackupRequest": { - "oneofs": { - "targetEnvironment": { - "oneof": [ - "computeInstanceTargetEnvironment" - ] - }, - "instanceProperties": { - "oneof": [ - "computeInstanceRestoreProperties" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "computeInstanceTargetEnvironment": { - "type": "ComputeInstanceTargetEnvironment", - "id": 3 - }, - "computeInstanceRestoreProperties": { - "type": "ComputeInstanceRestoreProperties", - "id": 4 - } - } - }, - "RestoreBackupResponse": { - "fields": { - "targetResource": { - "type": "TargetResource", - "id": 1 - } - } - }, - "TargetResource": { - "oneofs": { - "targetResourceInfo": { - "oneof": [ - "gcpResource" - ] - } - }, - "fields": { - "gcpResource": { - "type": "GcpResource", - "id": 1 - } - } - }, - "GcpResource": { - "fields": { - "gcpResourcename": { - "type": "string", - "id": 1 - }, - "location": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - } - } - }, - "BackupConfigState": { - "values": { - "BACKUP_CONFIG_STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "PASSIVE": 2 - } - }, - "BackupView": { - "values": { - "BACKUP_VIEW_UNSPECIFIED": 0, - "BACKUP_VIEW_BASIC": 1, - "BACKUP_VIEW_FULL": 2 - } - }, - "BackupVaultView": { - "values": { - "BACKUP_VAULT_VIEW_UNSPECIFIED": 0, - "BACKUP_VAULT_VIEW_BASIC": 1, - "BACKUP_VAULT_VIEW_FULL": 2 - } - }, - "BackupApplianceBackupProperties": { - "oneofs": { - "_generationId": { - "oneof": [ - "generationId" - ] - }, - "_finalizeTime": { - "oneof": [ - "finalizeTime" - ] - }, - "_recoveryRangeStartTime": { - "oneof": [ - "recoveryRangeStartTime" - ] - }, - "_recoveryRangeEndTime": { - "oneof": [ - "recoveryRangeEndTime" - ] - } - }, - "fields": { - "generationId": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "finalizeTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "recoveryRangeStartTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "recoveryRangeEndTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "ComputeInstanceBackupProperties": { - "oneofs": { - "_description": { - "oneof": [ - "description" - ] - }, - "_tags": { - "oneof": [ - "tags" - ] - }, - "_machineType": { - "oneof": [ - "machineType" - ] - }, - "_canIpForward": { - "oneof": [ - "canIpForward" - ] - }, - "_metadata": { - "oneof": [ - "metadata" - ] - }, - "_scheduling": { - "oneof": [ - "scheduling" - ] - }, - "_minCpuPlatform": { - "oneof": [ - "minCpuPlatform" - ] - }, - "_keyRevocationActionType": { - "oneof": [ - "keyRevocationActionType" - ] - }, - "_sourceInstance": { - "oneof": [ - "sourceInstance" - ] - } - }, - "fields": { - "description": { - "type": "string", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "tags": { - "type": "Tags", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "machineType": { - "type": "string", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "canIpForward": { - "type": "bool", - "id": 4, - "options": { - "proto3_optional": true - } - }, - "networkInterface": { - "rule": "repeated", - "type": "NetworkInterface", - "id": 5 - }, - "disk": { - "rule": "repeated", - "type": "AttachedDisk", - "id": 6 - }, - "metadata": { - "type": "Metadata", - "id": 7, - "options": { - "proto3_optional": true - } - }, - "serviceAccount": { - "rule": "repeated", - "type": "ServiceAccount", - "id": 8 - }, - "scheduling": { - "type": "Scheduling", - "id": 9, - "options": { - "proto3_optional": true - } - }, - "guestAccelerator": { - "rule": "repeated", - "type": "AcceleratorConfig", - "id": 10 - }, - "minCpuPlatform": { - "type": "string", - "id": 11, - "options": { - "proto3_optional": true - } - }, - "keyRevocationActionType": { - "type": "KeyRevocationActionType", - "id": 12, - "options": { - "proto3_optional": true - } - }, - "sourceInstance": { - "type": "string", - "id": 13, - "options": { - "proto3_optional": true - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 14 - } - } - }, - "ComputeInstanceRestoreProperties": { - "oneofs": { - "_name": { - "oneof": [ - "name" - ] - }, - "_advancedMachineFeatures": { - "oneof": [ - "advancedMachineFeatures" - ] - }, - "_canIpForward": { - "oneof": [ - "canIpForward" - ] - }, - "_confidentialInstanceConfig": { - "oneof": [ - "confidentialInstanceConfig" - ] - }, - "_deletionProtection": { - "oneof": [ - "deletionProtection" - ] - }, - "_description": { - "oneof": [ - "description" - ] - }, - "_displayDevice": { - "oneof": [ - "displayDevice" - ] - }, - "_hostname": { - "oneof": [ - "hostname" - ] - }, - "_instanceEncryptionKey": { - "oneof": [ - "instanceEncryptionKey" - ] - }, - "_keyRevocationActionType": { - "oneof": [ - "keyRevocationActionType" - ] - }, - "_machineType": { - "oneof": [ - "machineType" - ] - }, - "_metadata": { - "oneof": [ - "metadata" - ] - }, - "_minCpuPlatform": { - "oneof": [ - "minCpuPlatform" - ] - }, - "_networkPerformanceConfig": { - "oneof": [ - "networkPerformanceConfig" - ] - }, - "_params": { - "oneof": [ - "params" - ] - }, - "_privateIpv6GoogleAccess": { - "oneof": [ - "privateIpv6GoogleAccess" - ] - }, - "_allocationAffinity": { - "oneof": [ - "allocationAffinity" - ] - }, - "_scheduling": { - "oneof": [ - "scheduling" - ] - }, - "_tags": { - "oneof": [ - "tags" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "proto3_optional": true - } - }, - "advancedMachineFeatures": { - "type": "AdvancedMachineFeatures", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "canIpForward": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "confidentialInstanceConfig": { - "type": "ConfidentialInstanceConfig", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "deletionProtection": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "description": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "disks": { - "rule": "repeated", - "type": "AttachedDisk", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "displayDevice": { - "type": "DisplayDevice", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "guestAccelerators": { - "rule": "repeated", - "type": "AcceleratorConfig", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "hostname": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "instanceEncryptionKey": { - "type": "CustomerEncryptionKey", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "keyRevocationActionType": { - "type": "KeyRevocationActionType", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "machineType": { - "type": "string", - "id": 14, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "metadata": { - "type": "Metadata", - "id": 15, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "minCpuPlatform": { - "type": "string", - "id": 16, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "networkInterfaces": { - "rule": "repeated", - "type": "NetworkInterface", - "id": 17, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "networkPerformanceConfig": { - "type": "NetworkPerformanceConfig", - "id": 18, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "params": { - "type": "InstanceParams", - "id": 19, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY", - "proto3_optional": true - } - }, - "privateIpv6GoogleAccess": { - "type": "InstancePrivateIpv6GoogleAccess", - "id": 20, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "allocationAffinity": { - "type": "AllocationAffinity", - "id": 21, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "resourcePolicies": { - "rule": "repeated", - "type": "string", - "id": 22, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "scheduling": { - "type": "Scheduling", - "id": 23, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "serviceAccounts": { - "rule": "repeated", - "type": "ServiceAccount", - "id": 24, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "tags": { - "type": "Tags", - "id": 26, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "InstancePrivateIpv6GoogleAccess": { - "values": { - "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": 0, - "INHERIT_FROM_SUBNETWORK": 1, - "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE": 2, - "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE": 3 - } - } - } - }, - "ComputeInstanceTargetEnvironment": { - "fields": { - "project": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ComputeInstanceDataSourceProperties": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "description": { - "type": "string", - "id": 2 - }, - "machineType": { - "type": "string", - "id": 3 - }, - "totalDiskCount": { - "type": "int64", - "id": 4 - }, - "totalDiskSizeGb": { - "type": "int64", - "id": 5 - } - } - }, - "AdvancedMachineFeatures": { - "oneofs": { - "_enableNestedVirtualization": { - "oneof": [ - "enableNestedVirtualization" - ] - }, - "_threadsPerCore": { - "oneof": [ - "threadsPerCore" - ] - }, - "_visibleCoreCount": { - "oneof": [ - "visibleCoreCount" - ] - }, - "_enableUefiNetworking": { - "oneof": [ - "enableUefiNetworking" - ] - } - }, - "fields": { - "enableNestedVirtualization": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "threadsPerCore": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "visibleCoreCount": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "enableUefiNetworking": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "ConfidentialInstanceConfig": { - "oneofs": { - "_enableConfidentialCompute": { - "oneof": [ - "enableConfidentialCompute" - ] - } - }, - "fields": { - "enableConfidentialCompute": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "DisplayDevice": { - "oneofs": { - "_enableDisplay": { - "oneof": [ - "enableDisplay" - ] - } - }, - "fields": { - "enableDisplay": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "AcceleratorConfig": { - "oneofs": { - "_acceleratorType": { - "oneof": [ - "acceleratorType" - ] - }, - "_acceleratorCount": { - "oneof": [ - "acceleratorCount" - ] - } - }, - "fields": { - "acceleratorType": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "acceleratorCount": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "CustomerEncryptionKey": { - "oneofs": { - "key": { - "oneof": [ - "rawKey", - "rsaEncryptedKey", - "kmsKeyName" - ] - }, - "_kmsKeyServiceAccount": { - "oneof": [ - "kmsKeyServiceAccount" - ] - } - }, - "fields": { - "rawKey": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "rsaEncryptedKey": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "kmsKeyName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "kmsKeyServiceAccount": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "Entry": { - "oneofs": { - "_key": { - "oneof": [ - "key" - ] - }, - "_value": { - "oneof": [ - "value" - ] - } - }, - "fields": { - "key": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "value": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "Metadata": { - "fields": { - "items": { - "rule": "repeated", - "type": "Entry", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "NetworkInterface": { - "oneofs": { - "_network": { - "oneof": [ - "network" - ] - }, - "_subnetwork": { - "oneof": [ - "subnetwork" - ] - }, - "_ipAddress": { - "oneof": [ - "ipAddress" - ] - }, - "_ipv6Address": { - "oneof": [ - "ipv6Address" - ] - }, - "_internalIpv6PrefixLength": { - "oneof": [ - "internalIpv6PrefixLength" - ] - }, - "_name": { - "oneof": [ - "name" - ] - }, - "_stackType": { - "oneof": [ - "stackType" - ] - }, - "_ipv6AccessType": { - "oneof": [ - "ipv6AccessType" - ] - }, - "_queueCount": { - "oneof": [ - "queueCount" - ] - }, - "_nicType": { - "oneof": [ - "nicType" - ] - }, - "_networkAttachment": { - "oneof": [ - "networkAttachment" - ] - } - }, - "fields": { - "network": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "subnetwork": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "ipAddress": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "IPV4", - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "ipv6Address": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "IPV6", - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "internalIpv6PrefixLength": { - "type": "int32", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "name": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "accessConfigs": { - "rule": "repeated", - "type": "AccessConfig", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "ipv6AccessConfigs": { - "rule": "repeated", - "type": "AccessConfig", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "aliasIpRanges": { - "rule": "repeated", - "type": "AliasIpRange", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "stackType": { - "type": "StackType", - "id": 10, - "options": { - "proto3_optional": true - } - }, - "ipv6AccessType": { - "type": "Ipv6AccessType", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "queueCount": { - "type": "int32", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "nicType": { - "type": "NicType", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "networkAttachment": { - "type": "string", - "id": 14, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "StackType": { - "values": { - "STACK_TYPE_UNSPECIFIED": 0, - "IPV4_ONLY": 1, - "IPV4_IPV6": 2 - } - }, - "Ipv6AccessType": { - "values": { - "UNSPECIFIED_IPV6_ACCESS_TYPE": 0, - "INTERNAL": 1, - "EXTERNAL": 2 - } - }, - "NicType": { - "values": { - "NIC_TYPE_UNSPECIFIED": 0, - "VIRTIO_NET": 1, - "GVNIC": 2 - } - } - } - }, - "NetworkPerformanceConfig": { - "oneofs": { - "_totalEgressBandwidthTier": { - "oneof": [ - "totalEgressBandwidthTier" - ] - } - }, - "fields": { - "totalEgressBandwidthTier": { - "type": "Tier", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "Tier": { - "values": { - "TIER_UNSPECIFIED": 0, - "DEFAULT": 1, - "TIER_1": 2 - } - } - } - }, - "AccessConfig": { - "oneofs": { - "_type": { - "oneof": [ - "type" - ] - }, - "_name": { - "oneof": [ - "name" - ] - }, - "_externalIp": { - "oneof": [ - "externalIp" - ] - }, - "_externalIpv6": { - "oneof": [ - "externalIpv6" - ] - }, - "_externalIpv6PrefixLength": { - "oneof": [ - "externalIpv6PrefixLength" - ] - }, - "_setPublicPtr": { - "oneof": [ - "setPublicPtr" - ] - }, - "_publicPtrDomainName": { - "oneof": [ - "publicPtrDomainName" - ] - }, - "_networkTier": { - "oneof": [ - "networkTier" - ] - } - }, - "fields": { - "type": { - "type": "AccessType", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "name": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "externalIp": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "externalIpv6": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "externalIpv6PrefixLength": { - "type": "int32", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "setPublicPtr": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "publicPtrDomainName": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "networkTier": { - "type": "NetworkTier", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "AccessType": { - "values": { - "ACCESS_TYPE_UNSPECIFIED": 0, - "ONE_TO_ONE_NAT": 1, - "DIRECT_IPV6": 2 - } - }, - "NetworkTier": { - "values": { - "NETWORK_TIER_UNSPECIFIED": 0, - "PREMIUM": 1, - "STANDARD": 2 - } - } - } - }, - "AliasIpRange": { - "oneofs": { - "_ipCidrRange": { - "oneof": [ - "ipCidrRange" - ] - }, - "_subnetworkRangeName": { - "oneof": [ - "subnetworkRangeName" - ] - } - }, - "fields": { - "ipCidrRange": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "subnetworkRangeName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "InstanceParams": { - "fields": { - "resourceManagerTags": { - "keyType": "string", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "AllocationAffinity": { - "oneofs": { - "_consumeAllocationType": { - "oneof": [ - "consumeAllocationType" - ] - }, - "_key": { - "oneof": [ - "key" - ] - } - }, - "fields": { - "consumeAllocationType": { - "type": "Type", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "key": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "values": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "NO_RESERVATION": 1, - "ANY_RESERVATION": 2, - "SPECIFIC_RESERVATION": 3 - } - } - } - }, - "Scheduling": { - "oneofs": { - "_onHostMaintenance": { - "oneof": [ - "onHostMaintenance" - ] - }, - "_automaticRestart": { - "oneof": [ - "automaticRestart" - ] - }, - "_preemptible": { - "oneof": [ - "preemptible" - ] - }, - "_minNodeCpus": { - "oneof": [ - "minNodeCpus" - ] - }, - "_provisioningModel": { - "oneof": [ - "provisioningModel" - ] - }, - "_instanceTerminationAction": { - "oneof": [ - "instanceTerminationAction" - ] - }, - "_localSsdRecoveryTimeout": { - "oneof": [ - "localSsdRecoveryTimeout" - ] - } - }, - "fields": { - "onHostMaintenance": { - "type": "OnHostMaintenance", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "automaticRestart": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "preemptible": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "nodeAffinities": { - "rule": "repeated", - "type": "NodeAffinity", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "minNodeCpus": { - "type": "int32", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "provisioningModel": { - "type": "ProvisioningModel", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "instanceTerminationAction": { - "type": "InstanceTerminationAction", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "localSsdRecoveryTimeout": { - "type": "SchedulingDuration", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "OnHostMaintenance": { - "values": { - "ON_HOST_MAINTENANCE_UNSPECIFIED": 0, - "TERMINATE": 1, - "MIGRATE": 1000 - } - }, - "NodeAffinity": { - "oneofs": { - "_key": { - "oneof": [ - "key" - ] - }, - "_operator": { - "oneof": [ - "operator" - ] - } - }, - "fields": { - "key": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "operator": { - "type": "Operator", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "values": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Operator": { - "values": { - "OPERATOR_UNSPECIFIED": 0, - "IN": 1, - "NOT_IN": 2 - } - } - } - }, - "ProvisioningModel": { - "values": { - "PROVISIONING_MODEL_UNSPECIFIED": 0, - "STANDARD": 1, - "SPOT": 2 - } - }, - "InstanceTerminationAction": { - "values": { - "INSTANCE_TERMINATION_ACTION_UNSPECIFIED": 0, - "DELETE": 1, - "STOP": 2 - } - } - } - }, - "SchedulingDuration": { - "oneofs": { - "_seconds": { - "oneof": [ - "seconds" - ] - }, - "_nanos": { - "oneof": [ - "nanos" - ] - } - }, - "fields": { - "seconds": { - "type": "int64", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "nanos": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "ServiceAccount": { - "oneofs": { - "_email": { - "oneof": [ - "email" - ] - } - }, - "fields": { - "email": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "scopes": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "Tags": { - "fields": { - "items": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "AttachedDisk": { - "oneofs": { - "_initializeParams": { - "oneof": [ - "initializeParams" - ] - }, - "_deviceName": { - "oneof": [ - "deviceName" - ] - }, - "_kind": { - "oneof": [ - "kind" - ] - }, - "_diskTypeDeprecated": { - "oneof": [ - "diskTypeDeprecated" - ] - }, - "_mode": { - "oneof": [ - "mode" - ] - }, - "_source": { - "oneof": [ - "source" - ] - }, - "_index": { - "oneof": [ - "index" - ] - }, - "_boot": { - "oneof": [ - "boot" - ] - }, - "_autoDelete": { - "oneof": [ - "autoDelete" - ] - }, - "_diskInterface": { - "oneof": [ - "diskInterface" - ] - }, - "_diskEncryptionKey": { - "oneof": [ - "diskEncryptionKey" - ] - }, - "_diskSizeGb": { - "oneof": [ - "diskSizeGb" - ] - }, - "_savedState": { - "oneof": [ - "savedState" - ] - }, - "_diskType": { - "oneof": [ - "diskType" - ] - }, - "_type": { - "oneof": [ - "type" - ] - } - }, - "fields": { - "initializeParams": { - "type": "InitializeParams", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "deviceName": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "kind": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "diskTypeDeprecated": { - "type": "DiskType", - "id": 6, - "options": { - "deprecated": true, - "proto3_optional": true - } - }, - "mode": { - "type": "DiskMode", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "source": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "index": { - "type": "int64", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "boot": { - "type": "bool", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "autoDelete": { - "type": "bool", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "license": { - "rule": "repeated", - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "diskInterface": { - "type": "DiskInterface", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "guestOsFeature": { - "rule": "repeated", - "type": "GuestOsFeature", - "id": 14, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "diskEncryptionKey": { - "type": "CustomerEncryptionKey", - "id": 15, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "diskSizeGb": { - "type": "int64", - "id": 16, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "savedState": { - "type": "DiskSavedState", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "diskType": { - "type": "string", - "id": 18, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "type": { - "type": "DiskType", - "id": 19, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "InitializeParams": { - "oneofs": { - "_diskName": { - "oneof": [ - "diskName" - ] - } - }, - "fields": { - "diskName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "replicaZones": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DiskType": { - "values": { - "DISK_TYPE_UNSPECIFIED": 0, - "SCRATCH": 1, - "PERSISTENT": 2 - } - }, - "DiskMode": { - "values": { - "DISK_MODE_UNSPECIFIED": 0, - "READ_WRITE": 1, - "READ_ONLY": 2, - "LOCKED": 3 - } - }, - "DiskInterface": { - "values": { - "DISK_INTERFACE_UNSPECIFIED": 0, - "SCSI": 1, - "NVME": 2, - "NVDIMM": 3, - "ISCSI": 4 - } - }, - "DiskSavedState": { - "values": { - "DISK_SAVED_STATE_UNSPECIFIED": 0, - "PRESERVED": 1 - } - } - } - }, - "GuestOsFeature": { - "oneofs": { - "_type": { - "oneof": [ - "type" - ] - } - }, - "fields": { - "type": { - "type": "FeatureType", - "id": 1, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "FeatureType": { - "values": { - "FEATURE_TYPE_UNSPECIFIED": 0, - "VIRTIO_SCSI_MULTIQUEUE": 1, - "WINDOWS": 2, - "MULTI_IP_SUBNET": 3, - "UEFI_COMPATIBLE": 4, - "SECURE_BOOT": 5, - "GVNIC": 6, - "SEV_CAPABLE": 7, - "BARE_METAL_LINUX_COMPATIBLE": 8, - "SUSPEND_RESUME_COMPATIBLE": 9, - "SEV_LIVE_MIGRATABLE": 10, - "SEV_SNP_CAPABLE": 11, - "TDX_CAPABLE": 12, - "IDPF": 13, - "SEV_LIVE_MIGRATABLE_V2": 14 - } - } - } - }, - "KeyRevocationActionType": { - "values": { - "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": 0, - "NONE": 1, - "STOP": 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 - } - }, - "fieldInfo": { - "type": "google.api.FieldInfo", - "id": 291403980, - "extend": "google.protobuf.FieldOptions" - }, - "FieldInfo": { - "fields": { - "format": { - "type": "Format", - "id": 1 - } - }, - "nested": { - "Format": { - "values": { - "FORMAT_UNSPECIFIED": 0, - "UUID4": 1, - "IPV4": 2, - "IPV6": 3, - "IPV4_OR_IPV6": 4 - } - } - } - }, - "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 - } - } - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "Empty": { - "fields": {} - }, - "DoubleValue": { - "fields": { - "value": { - "type": "double", - "id": 1 - } - } - }, - "FloatValue": { - "fields": { - "value": { - "type": "float", - "id": 1 - } - } - }, - "Int64Value": { - "fields": { - "value": { - "type": "int64", - "id": 1 - } - } - }, - "UInt64Value": { - "fields": { - "value": { - "type": "uint64", - "id": 1 - } - } - }, - "Int32Value": { - "fields": { - "value": { - "type": "int32", - "id": 1 - } - } - }, - "UInt32Value": { - "fields": { - "value": { - "type": "uint32", - "id": 1 - } - } - }, - "BoolValue": { - "fields": { - "value": { - "type": "bool", - "id": 1 - } - } - }, - "StringValue": { - "fields": { - "value": { - "type": "string", - "id": 1 - } - } - }, - "BytesValue": { - "fields": { - "value": { - "type": "bytes", - "id": 1 - } - } - } - } - }, - "type": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/type/expr;expr", - "java_multiple_files": true, - "java_outer_classname": "ExprProto", - "java_package": "com.google.type", - "objc_class_prefix": "GTP" - }, - "nested": { - "DayOfWeek": { - "values": { - "DAY_OF_WEEK_UNSPECIFIED": 0, - "MONDAY": 1, - "TUESDAY": 2, - "WEDNESDAY": 3, - "THURSDAY": 4, - "FRIDAY": 5, - "SATURDAY": 6, - "SUNDAY": 7 - } - }, - "Month": { - "values": { - "MONTH_UNSPECIFIED": 0, - "JANUARY": 1, - "FEBRUARY": 2, - "MARCH": 3, - "APRIL": 4, - "MAY": 5, - "JUNE": 6, - "JULY": 7, - "AUGUST": 8, - "SEPTEMBER": 9, - "OCTOBER": 10, - "NOVEMBER": 11, - "DECEMBER": 12 - } - }, - "Expr": { - "fields": { - "expression": { - "type": "string", - "id": 1 - }, - "title": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "location": { - "type": "string", - "id": 4 - } - } - } - } - }, - "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 - } - } - } - } - }, - "iam": { - "nested": { - "v1": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.Cloud.Iam.V1", - "go_package": "cloud.google.com/go/iam/apiv1/iampb;iampb", - "java_multiple_files": true, - "java_outer_classname": "PolicyProto", - "java_package": "com.google.iam.v1", - "php_namespace": "Google\\Cloud\\Iam\\V1" - }, - "nested": { - "IAMPolicy": { - "options": { - "(google.api.default_host)": "iam-meta-api.googleapis.com" - }, - "methods": { - "SetIamPolicy": { - "requestType": "SetIamPolicyRequest", - "responseType": "Policy", - "options": { - "(google.api.http).post": "/v1/{resource=**}:setIamPolicy", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=**}:setIamPolicy", - "body": "*" - } - } - ] - }, - "GetIamPolicy": { - "requestType": "GetIamPolicyRequest", - "responseType": "Policy", - "options": { - "(google.api.http).post": "/v1/{resource=**}:getIamPolicy", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=**}:getIamPolicy", - "body": "*" - } - } - ] - }, - "TestIamPermissions": { - "requestType": "TestIamPermissionsRequest", - "responseType": "TestIamPermissionsResponse", - "options": { - "(google.api.http).post": "/v1/{resource=**}:testIamPermissions", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=**}:testIamPermissions", - "body": "*" - } - } - ] - } - } - }, - "SetIamPolicyRequest": { - "fields": { - "resource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "*" - } - }, - "policy": { - "type": "Policy", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 3 - } - } - }, - "GetIamPolicyRequest": { - "fields": { - "resource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "*" - } - }, - "options": { - "type": "GetPolicyOptions", - "id": 2 - } - } - }, - "TestIamPermissionsRequest": { - "fields": { - "resource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "*" - } - }, - "permissions": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "TestIamPermissionsResponse": { - "fields": { - "permissions": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "GetPolicyOptions": { - "fields": { - "requestedPolicyVersion": { - "type": "int32", - "id": 1 - } - } - }, - "Policy": { - "fields": { - "version": { - "type": "int32", - "id": 1 - }, - "bindings": { - "rule": "repeated", - "type": "Binding", - "id": 4 - }, - "auditConfigs": { - "rule": "repeated", - "type": "AuditConfig", - "id": 6 - }, - "etag": { - "type": "bytes", - "id": 3 - } - } - }, - "Binding": { - "fields": { - "role": { - "type": "string", - "id": 1 - }, - "members": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "condition": { - "type": "google.type.Expr", - "id": 3 - } - } - }, - "AuditConfig": { - "fields": { - "service": { - "type": "string", - "id": 1 - }, - "auditLogConfigs": { - "rule": "repeated", - "type": "AuditLogConfig", - "id": 3 - } - } - }, - "AuditLogConfig": { - "fields": { - "logType": { - "type": "LogType", - "id": 1 - }, - "exemptedMembers": { - "rule": "repeated", - "type": "string", - "id": 2 - } - }, - "nested": { - "LogType": { - "values": { - "LOG_TYPE_UNSPECIFIED": 0, - "ADMIN_READ": 1, - "DATA_WRITE": 2, - "DATA_READ": 3 - } - } - } - }, - "PolicyDelta": { - "fields": { - "bindingDeltas": { - "rule": "repeated", - "type": "BindingDelta", - "id": 1 - }, - "auditConfigDeltas": { - "rule": "repeated", - "type": "AuditConfigDelta", - "id": 2 - } - } - }, - "BindingDelta": { - "fields": { - "action": { - "type": "Action", - "id": 1 - }, - "role": { - "type": "string", - "id": 2 - }, - "member": { - "type": "string", - "id": 3 - }, - "condition": { - "type": "google.type.Expr", - "id": 4 - } - }, - "nested": { - "Action": { - "values": { - "ACTION_UNSPECIFIED": 0, - "ADD": 1, - "REMOVE": 2 - } - } - } - }, - "AuditConfigDelta": { - "fields": { - "action": { - "type": "Action", - "id": 1 - }, - "service": { - "type": "string", - "id": 2 - }, - "exemptedMember": { - "type": "string", - "id": 3 - }, - "logType": { - "type": "string", - "id": 4 - } - }, - "nested": { - "Action": { - "values": { - "ACTION_UNSPECIFIED": 0, - "ADD": 1, - "REMOVE": 2 - } - } - } - } - } - } - } - }, - "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 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js deleted file mode 100644 index f14ca310e86..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js +++ /dev/null @@ -1,90 +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 -// -// 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, managementServerId, managementServer) { - // [START backupdr_v1_generated_BackupDR_CreateManagementServer_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 management server project and location in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR - * locations map to Google Cloud regions, for example **us-central1**. - */ - // const parent = 'abc123' - /** - * Required. The name of the management server to create. The name must be - * unique for the specified project and location. - */ - // const managementServerId = 'abc123' - /** - * Required. A management server - * resource google.cloud.backupdr.v1.ManagementServer - */ - // const managementServer = {} - /** - * Optional. An optional 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 Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callCreateManagementServer() { - // Construct request - const request = { - parent, - managementServerId, - managementServer, - }; - - // Run request - const [operation] = await backupdrClient.createManagementServer(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateManagementServer(); - // [END backupdr_v1_generated_BackupDR_CreateManagementServer_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-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js deleted file mode 100644 index c27febd63fd..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js +++ /dev/null @@ -1,76 +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 -// -// 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 backupdr_v1_generated_BackupDR_DeleteManagementServer_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 resource - */ - // const name = 'abc123' - /** - * Optional. An optional 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 Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callDeleteManagementServer() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await backupdrClient.deleteManagementServer(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteManagementServer(); - // [END backupdr_v1_generated_BackupDR_DeleteManagementServer_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-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js deleted file mode 100644 index 11cc5ae277f..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js +++ /dev/null @@ -1,62 +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 -// -// 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 backupdr_v1_generated_BackupDR_GetManagementServer_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 management server resource name, in the format - * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' - */ - // const name = 'abc123' - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callGetManagementServer() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await backupdrClient.getManagementServer(request); - console.log(response); - } - - callGetManagementServer(); - // [END backupdr_v1_generated_BackupDR_GetManagementServer_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-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js deleted file mode 100644 index 262d1a29e3c..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js +++ /dev/null @@ -1,85 +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 -// -// 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 backupdr_v1_generated_BackupDR_ListManagementServers_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The project and location for which to retrieve management servers - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud BackupDR, locations map to Google Cloud regions, for example - * **us-central1**. To retrieve management servers for all locations, use "-" - * for the - * '{location}' value. - */ - // const parent = 'abc123' - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - */ - // const pageSize = 1234 - /** - * Optional. A token identifying a page of results the server should return. - */ - // const pageToken = 'abc123' - /** - * Optional. Filtering results. - */ - // const filter = 'abc123' - /** - * Optional. Hint for how to order the results. - */ - // const orderBy = 'abc123' - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callListManagementServers() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = backupdrClient.listManagementServersAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListManagementServers(); - // [END backupdr_v1_generated_BackupDR_ListManagementServers_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-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json deleted file mode 100644 index 9a1269e985f..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json +++ /dev/null @@ -1,1707 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-backupdr", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.backupdr.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "backupdr_v1_generated_BackupDR_ListManagementServers_async", - "title": "BackupDR listManagementServers Sample", - "origin": "API_DEFINITION", - "description": " Lists ManagementServers in a given project and location.", - "canonical": true, - "file": "backup_d_r.list_management_servers.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListManagementServers", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListManagementServers", - "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.backupdr.v1.ListManagementServersResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "ListManagementServers", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListManagementServers", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_GetManagementServer_async", - "title": "BackupDR getManagementServer Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single ManagementServer.", - "canonical": true, - "file": "backup_d_r.get_management_server.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetManagementServer", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetManagementServer", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.backupdr.v1.ManagementServer", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "GetManagementServer", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetManagementServer", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_CreateManagementServer_async", - "title": "BackupDR createManagementServer Sample", - "origin": "API_DEFINITION", - "description": " Creates a new ManagementServer in a given project and location.", - "canonical": true, - "file": "backup_d_r.create_management_server.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateManagementServer", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateManagementServer", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "management_server_id", - "type": "TYPE_STRING" - }, - { - "name": "management_server", - "type": ".google.cloud.backupdr.v1.ManagementServer" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "CreateManagementServer", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateManagementServer", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_DeleteManagementServer_async", - "title": "BackupDR deleteManagementServer Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single ManagementServer.", - "canonical": true, - "file": "backup_d_r.delete_management_server.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteManagementServer", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteManagementServer", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "DeleteManagementServer", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteManagementServer", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupVault_async", - "title": "BackupDR createBackupVault Sample", - "origin": "API_DEFINITION", - "description": " Creates a new BackupVault in a given project and location.", - "canonical": true, - "file": "backup_d_r.create_backup_vault.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "backup_vault_id", - "type": "TYPE_STRING" - }, - { - "name": "backup_vault", - "type": ".google.cloud.backupdr.v1.BackupVault" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "CreateBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_ListBackupVaults_async", - "title": "BackupDR listBackupVaults Sample", - "origin": "API_DEFINITION", - "description": " Lists BackupVaults in a given project and location.", - "canonical": true, - "file": "backup_d_r.list_backup_vaults.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBackupVaults", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", - "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" - }, - { - "name": "view", - "type": ".google.cloud.backupdr.v1.BackupVaultView" - } - ], - "resultType": ".google.cloud.backupdr.v1.ListBackupVaultsResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "ListBackupVaults", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_async", - "title": "BackupDR fetchUsableBackupVaults Sample", - "origin": "API_DEFINITION", - "description": " FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.", - "canonical": true, - "file": "backup_d_r.fetch_usable_backup_vaults.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "FetchUsableBackupVaults", - "fullName": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", - "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.backupdr.v1.FetchUsableBackupVaultsResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "FetchUsableBackupVaults", - "fullName": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_GetBackupVault_async", - "title": "BackupDR getBackupVault Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a BackupVault.", - "canonical": true, - "file": "backup_d_r.get_backup_vault.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.backupdr.v1.BackupVaultView" - } - ], - "resultType": ".google.cloud.backupdr.v1.BackupVault", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "GetBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_UpdateBackupVault_async", - "title": "BackupDR updateBackupVault Sample", - "origin": "API_DEFINITION", - "description": " Updates the settings of a BackupVault.", - "canonical": true, - "file": "backup_d_r.update_backup_vault.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "backup_vault", - "type": ".google.cloud.backupdr.v1.BackupVault" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "UpdateBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupVault_async", - "title": "BackupDR deleteBackupVault Sample", - "origin": "API_DEFINITION", - "description": " Deletes a BackupVault.", - "canonical": true, - "file": "backup_d_r.delete_backup_vault.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 89, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - }, - { - "name": "etag", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "DeleteBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_TestIamPermissions_async", - "title": "BackupDR testIamPermissions Sample", - "origin": "API_DEFINITION", - "description": " Returns the caller's permissions on a BackupVault resource. A caller is not required to have Google IAM permission to make this request.", - "canonical": true, - "file": "backup_d_r.test_iam_permissions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TestIamPermissions", - "fullName": "google.cloud.backupdr.v1.BackupDR.TestIamPermissions", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "permissions", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.iam.v1.TestIamPermissionsResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "TestIamPermissions", - "fullName": "google.cloud.backupdr.v1.BackupDR.TestIamPermissions", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_ListDataSources_async", - "title": "BackupDR listDataSources Sample", - "origin": "API_DEFINITION", - "description": " Lists DataSources in a given project and location.", - "canonical": true, - "file": "backup_d_r.list_data_sources.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDataSources", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListDataSources", - "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.backupdr.v1.ListDataSourcesResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "ListDataSources", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListDataSources", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_GetDataSource_async", - "title": "BackupDR getDataSource Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a DataSource.", - "canonical": true, - "file": "backup_d_r.get_data_source.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDataSource", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetDataSource", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.backupdr.v1.DataSource", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "GetDataSource", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetDataSource", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_UpdateDataSource_async", - "title": "BackupDR updateDataSource Sample", - "origin": "API_DEFINITION", - "description": " Updates the settings of a DataSource.", - "canonical": true, - "file": "backup_d_r.update_data_source.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 81, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateDataSource", - "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "data_source", - "type": ".google.cloud.backupdr.v1.DataSource" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "UpdateDataSource", - "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_RemoveDataSource_async", - "title": "BackupDR removeDataSource Sample", - "origin": "API_DEFINITION", - "description": " Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.", - "canonical": true, - "file": "backup_d_r.remove_data_source.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RemoveDataSource", - "fullName": "google.cloud.backupdr.v1.BackupDR.RemoveDataSource", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "RemoveDataSource", - "fullName": "google.cloud.backupdr.v1.BackupDR.RemoveDataSource", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_SetInternalStatus_async", - "title": "BackupDR setInternalStatus Sample", - "origin": "API_DEFINITION", - "description": " Sets the internal status of a DataSource.", - "canonical": true, - "file": "backup_d_r.set_internal_status.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetInternalStatus", - "fullName": "google.cloud.backupdr.v1.BackupDR.SetInternalStatus", - "async": true, - "parameters": [ - { - "name": "data_source", - "type": "TYPE_STRING" - }, - { - "name": "value", - "type": "TYPE_BYTES" - }, - { - "name": "backup_config_state", - "type": ".google.cloud.backupdr.v1.BackupConfigState" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "SetInternalStatus", - "fullName": "google.cloud.backupdr.v1.BackupDR.SetInternalStatus", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_InitiateBackup_async", - "title": "BackupDR initiateBackup Sample", - "origin": "API_DEFINITION", - "description": " Internal only. Initiates a backup.", - "canonical": true, - "file": "backup_d_r.initiate_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "InitiateBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.InitiateBackup", - "async": true, - "parameters": [ - { - "name": "data_source", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "backup_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.backupdr.v1.InitiateBackupResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "InitiateBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.InitiateBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_AbandonBackup_async", - "title": "BackupDR abandonBackup Sample", - "origin": "API_DEFINITION", - "description": " Internal only. Abandons a backup.", - "canonical": true, - "file": "backup_d_r.abandon_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AbandonBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.AbandonBackup", - "async": true, - "parameters": [ - { - "name": "data_source", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "AbandonBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.AbandonBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_FinalizeBackup_async", - "title": "BackupDR finalizeBackup Sample", - "origin": "API_DEFINITION", - "description": " Internal only. Finalize a backup that was started by a call to InitiateBackup.", - "canonical": true, - "file": "backup_d_r.finalize_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 101, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "FinalizeBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.FinalizeBackup", - "async": true, - "parameters": [ - { - "name": "data_source", - "type": "TYPE_STRING" - }, - { - "name": "description", - "type": "TYPE_STRING" - }, - { - "name": "consistency_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "backup_id", - "type": "TYPE_STRING" - }, - { - "name": "recovery_range_start_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "recovery_range_end_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "retention_duration", - "type": ".google.protobuf.Duration" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "FinalizeBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.FinalizeBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_FetchAccessToken_async", - "title": "BackupDR fetchAccessToken Sample", - "origin": "API_DEFINITION", - "description": " Internal only. Fetch access token for a given data source.", - "canonical": true, - "file": "backup_d_r.fetch_access_token.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "FetchAccessToken", - "fullName": "google.cloud.backupdr.v1.BackupDR.FetchAccessToken", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "generation_id", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.cloud.backupdr.v1.FetchAccessTokenResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "FetchAccessToken", - "fullName": "google.cloud.backupdr.v1.BackupDR.FetchAccessToken", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_ListBackups_async", - "title": "BackupDR listBackups Sample", - "origin": "API_DEFINITION", - "description": " Lists Backups in a given project and location.", - "canonical": true, - "file": "backup_d_r.list_backups.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBackups", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackups", - "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" - }, - { - "name": "view", - "type": ".google.cloud.backupdr.v1.BackupView" - } - ], - "resultType": ".google.cloud.backupdr.v1.ListBackupsResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "ListBackups", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackups", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_GetBackup_async", - "title": "BackupDR getBackup Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a Backup.", - "canonical": true, - "file": "backup_d_r.get_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.backupdr.v1.BackupView" - } - ], - "resultType": ".google.cloud.backupdr.v1.Backup", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "GetBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_UpdateBackup_async", - "title": "BackupDR updateBackup Sample", - "origin": "API_DEFINITION", - "description": " Updates the settings of a Backup.", - "canonical": true, - "file": "backup_d_r.update_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "backup", - "type": ".google.cloud.backupdr.v1.Backup" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "UpdateBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackup_async", - "title": "BackupDR deleteBackup Sample", - "origin": "API_DEFINITION", - "description": " Deletes a Backup.", - "canonical": true, - "file": "backup_d_r.delete_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "DeleteBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_RestoreBackup_async", - "title": "BackupDR restoreBackup Sample", - "origin": "API_DEFINITION", - "description": " Restore from a Backup", - "canonical": true, - "file": "backup_d_r.restore_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RestoreBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "compute_instance_target_environment", - "type": ".google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment" - }, - { - "name": "compute_instance_restore_properties", - "type": ".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "RestoreBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupPlan_async", - "title": "BackupDR createBackupPlan Sample", - "origin": "API_DEFINITION", - "description": " Create a BackupPlan", - "canonical": true, - "file": "backup_d_r.create_backup_plan.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 83, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBackupPlan", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "backup_plan_id", - "type": "TYPE_STRING" - }, - { - "name": "backup_plan", - "type": ".google.cloud.backupdr.v1.BackupPlan" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "CreateBackupPlan", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_GetBackupPlan_async", - "title": "BackupDR getBackupPlan Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single BackupPlan.", - "canonical": true, - "file": "backup_d_r.get_backup_plan.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBackupPlan", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.backupdr.v1.BackupPlan", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "GetBackupPlan", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_ListBackupPlans_async", - "title": "BackupDR listBackupPlans Sample", - "origin": "API_DEFINITION", - "description": " Lists BackupPlans in a given project and location.", - "canonical": true, - "file": "backup_d_r.list_backup_plans.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBackupPlans", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", - "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.backupdr.v1.ListBackupPlansResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "ListBackupPlans", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupPlan_async", - "title": "BackupDR deleteBackupPlan Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single BackupPlan.", - "canonical": true, - "file": "backup_d_r.delete_backup_plan.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBackupPlan", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "DeleteBackupPlan", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async", - "title": "BackupDR createBackupPlanAssociation Sample", - "origin": "API_DEFINITION", - "description": " Create a BackupPlanAssociation", - "canonical": true, - "file": "backup_d_r.create_backup_plan_association.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 81, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBackupPlanAssociation", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "backup_plan_association_id", - "type": "TYPE_STRING" - }, - { - "name": "backup_plan_association", - "type": ".google.cloud.backupdr.v1.BackupPlanAssociation" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "CreateBackupPlanAssociation", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_async", - "title": "BackupDR getBackupPlanAssociation Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single BackupPlanAssociation.", - "canonical": true, - "file": "backup_d_r.get_backup_plan_association.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBackupPlanAssociation", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.backupdr.v1.BackupPlanAssociation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "GetBackupPlanAssociation", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_async", - "title": "BackupDR listBackupPlanAssociations Sample", - "origin": "API_DEFINITION", - "description": " Lists BackupPlanAssociations in a given project and location.", - "canonical": true, - "file": "backup_d_r.list_backup_plan_associations.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBackupPlanAssociations", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", - "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" - } - ], - "resultType": ".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "ListBackupPlanAssociations", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async", - "title": "BackupDR deleteBackupPlanAssociation Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single BackupPlanAssociation.", - "canonical": true, - "file": "backup_d_r.delete_backup_plan_association.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBackupPlanAssociation", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "DeleteBackupPlanAssociation", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_TriggerBackup_async", - "title": "BackupDR triggerBackup Sample", - "origin": "API_DEFINITION", - "description": " Triggers a new Backup.", - "canonical": true, - "file": "backup_d_r.trigger_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TriggerBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "rule_id", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "TriggerBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/index.ts b/owl-bot-staging/google-cloud-backupdr/v1/src/index.ts deleted file mode 100644 index 025ea882aeb..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/src/index.ts +++ /dev/null @@ -1,25 +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 -// -// 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 BackupDRClient = v1.BackupDRClient; -type BackupDRClient = v1.BackupDRClient; -export {v1, BackupDRClient}; -export default {v1, BackupDRClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts deleted file mode 100644 index 97cd950b4c8..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts +++ /dev/null @@ -1,5426 +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 -// -// 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/backup_d_r_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './backup_d_r_client_config.json'; -const version = require('../../../package.json').version; - -/** - * The BackupDR Service - * @class - * @memberof v1 - */ -export class BackupDRClient { - 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; - backupDRStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of BackupDRClient. - * - * @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 BackupDRClient({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 BackupDRClient; - 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 = 'backupdr.' + 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 = { - backupPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}' - ), - backupPlanPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/backupPlans/{backup_plan}' - ), - backupPlanAssociationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}' - ), - backupVaultPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/backupVaults/{backupvault}' - ), - dataSourcePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - managementServerPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/managementServers/{managementserver}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - }; - - // 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 = { - listManagementServers: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'managementServers'), - listBackupVaults: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupVaults'), - fetchUsableBackupVaults: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupVaults'), - listDataSources: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataSources'), - listBackups: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backups'), - listBackupPlans: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupPlans'), - listBackupPlanAssociations: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupPlanAssociations') - }; - - 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.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/managementServers/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/managementServers/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/managementServers/*}:testIamPermissions',body: '*',},{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 createManagementServerResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.ManagementServer') as gax.protobuf.Type; - const createManagementServerMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const deleteManagementServerResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteManagementServerMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const createBackupVaultResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.BackupVault') as gax.protobuf.Type; - const createBackupVaultMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const updateBackupVaultResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.BackupVault') as gax.protobuf.Type; - const updateBackupVaultMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const deleteBackupVaultResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteBackupVaultMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const updateDataSourceResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.DataSource') as gax.protobuf.Type; - const updateDataSourceMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const removeDataSourceResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const removeDataSourceMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const setInternalStatusResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.SetInternalStatusResponse') as gax.protobuf.Type; - const setInternalStatusMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const abandonBackupResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const abandonBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const finalizeBackupResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.Backup') as gax.protobuf.Type; - const finalizeBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const updateBackupResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.Backup') as gax.protobuf.Type; - const updateBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const deleteBackupResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.Backup') as gax.protobuf.Type; - const deleteBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const restoreBackupResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.RestoreBackupResponse') as gax.protobuf.Type; - const restoreBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const createBackupPlanResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.BackupPlan') as gax.protobuf.Type; - const createBackupPlanMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const deleteBackupPlanResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteBackupPlanMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const createBackupPlanAssociationResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.BackupPlanAssociation') as gax.protobuf.Type; - const createBackupPlanAssociationMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const deleteBackupPlanAssociationResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteBackupPlanAssociationMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const triggerBackupResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.BackupPlanAssociation') as gax.protobuf.Type; - const triggerBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createManagementServer: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createManagementServerResponse.decode.bind(createManagementServerResponse), - createManagementServerMetadata.decode.bind(createManagementServerMetadata)), - deleteManagementServer: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteManagementServerResponse.decode.bind(deleteManagementServerResponse), - deleteManagementServerMetadata.decode.bind(deleteManagementServerMetadata)), - createBackupVault: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createBackupVaultResponse.decode.bind(createBackupVaultResponse), - createBackupVaultMetadata.decode.bind(createBackupVaultMetadata)), - updateBackupVault: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateBackupVaultResponse.decode.bind(updateBackupVaultResponse), - updateBackupVaultMetadata.decode.bind(updateBackupVaultMetadata)), - deleteBackupVault: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteBackupVaultResponse.decode.bind(deleteBackupVaultResponse), - deleteBackupVaultMetadata.decode.bind(deleteBackupVaultMetadata)), - updateDataSource: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateDataSourceResponse.decode.bind(updateDataSourceResponse), - updateDataSourceMetadata.decode.bind(updateDataSourceMetadata)), - removeDataSource: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - removeDataSourceResponse.decode.bind(removeDataSourceResponse), - removeDataSourceMetadata.decode.bind(removeDataSourceMetadata)), - setInternalStatus: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - setInternalStatusResponse.decode.bind(setInternalStatusResponse), - setInternalStatusMetadata.decode.bind(setInternalStatusMetadata)), - abandonBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - abandonBackupResponse.decode.bind(abandonBackupResponse), - abandonBackupMetadata.decode.bind(abandonBackupMetadata)), - finalizeBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - finalizeBackupResponse.decode.bind(finalizeBackupResponse), - finalizeBackupMetadata.decode.bind(finalizeBackupMetadata)), - updateBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateBackupResponse.decode.bind(updateBackupResponse), - updateBackupMetadata.decode.bind(updateBackupMetadata)), - deleteBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteBackupResponse.decode.bind(deleteBackupResponse), - deleteBackupMetadata.decode.bind(deleteBackupMetadata)), - restoreBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - restoreBackupResponse.decode.bind(restoreBackupResponse), - restoreBackupMetadata.decode.bind(restoreBackupMetadata)), - createBackupPlan: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createBackupPlanResponse.decode.bind(createBackupPlanResponse), - createBackupPlanMetadata.decode.bind(createBackupPlanMetadata)), - deleteBackupPlan: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteBackupPlanResponse.decode.bind(deleteBackupPlanResponse), - deleteBackupPlanMetadata.decode.bind(deleteBackupPlanMetadata)), - createBackupPlanAssociation: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createBackupPlanAssociationResponse.decode.bind(createBackupPlanAssociationResponse), - createBackupPlanAssociationMetadata.decode.bind(createBackupPlanAssociationMetadata)), - deleteBackupPlanAssociation: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteBackupPlanAssociationResponse.decode.bind(deleteBackupPlanAssociationResponse), - deleteBackupPlanAssociationMetadata.decode.bind(deleteBackupPlanAssociationMetadata)), - triggerBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - triggerBackupResponse.decode.bind(triggerBackupResponse), - triggerBackupMetadata.decode.bind(triggerBackupMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.backupdr.v1.BackupDR', 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.backupDRStub) { - return this.backupDRStub; - } - - // Put together the "service stub" for - // google.cloud.backupdr.v1.BackupDR. - this.backupDRStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.backupdr.v1.BackupDR') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.backupdr.v1.BackupDR, - 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 backupDRStubMethods = - ['listManagementServers', 'getManagementServer', 'createManagementServer', 'deleteManagementServer', 'createBackupVault', 'listBackupVaults', 'fetchUsableBackupVaults', 'getBackupVault', 'updateBackupVault', 'deleteBackupVault', 'testIamPermissions', 'listDataSources', 'getDataSource', 'updateDataSource', 'removeDataSource', 'setInternalStatus', 'initiateBackup', 'abandonBackup', 'finalizeBackup', 'fetchAccessToken', 'listBackups', 'getBackup', 'updateBackup', 'deleteBackup', 'restoreBackup', 'createBackupPlan', 'getBackupPlan', 'listBackupPlans', 'deleteBackupPlan', 'createBackupPlanAssociation', 'getBackupPlanAssociation', 'listBackupPlanAssociations', 'deleteBackupPlanAssociation', 'triggerBackup']; - for (const methodName of backupDRStubMethods) { - const callPromise = this.backupDRStub.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.backupDRStub; - } - - /** - * 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 'backupdr.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 'backupdr.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 -- - // ------------------- -/** - * Gets details of a single ManagementServer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the management server resource name, in the format - * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' - * @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.backupdr.v1.ManagementServer|ManagementServer}. - * 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/backup_d_r.get_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_GetManagementServer_async - */ - getManagementServer( - request?: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IGetManagementServerRequest|undefined, {}|undefined - ]>; - getManagementServer( - request: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, - {}|null|undefined>): void; - getManagementServer( - request: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, - {}|null|undefined>): void; - getManagementServer( - request?: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IGetManagementServerRequest|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.getManagementServer(request, options, callback); - } -/** - * Gets details of a BackupVault. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the backupvault store resource name, in the format - * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' - * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * Vault - * @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.backupdr.v1.BackupVault|BackupVault}. - * 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/backup_d_r.get_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_GetBackupVault_async - */ - getBackupVault( - request?: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|undefined, {}|undefined - ]>; - getBackupVault( - request: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, - {}|null|undefined>): void; - getBackupVault( - request: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, - {}|null|undefined>): void; - getBackupVault( - request?: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|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.getBackupVault(request, options, callback); - } -/** - * Returns the caller's permissions on a BackupVault resource. - * - * A caller is not required to have Google IAM permission to make this - * request. - * - * @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 - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @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.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. - * 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/backup_d_r.test_iam_permissions.js - * region_tag:backupdr_v1_generated_BackupDR_TestIamPermissions_async - */ - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - options?: CallOptions): - Promise<[ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|undefined, {}|undefined - ]>; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>): void; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>): void; - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest|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({ - 'resource': request.resource ?? '', - }); - this.initialize(); - return this.innerApiCalls.testIamPermissions(request, options, callback); - } -/** - * Gets details of a DataSource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the data source resource name, in the format - * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' - * @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.backupdr.v1.DataSource|DataSource}. - * 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/backup_d_r.get_data_source.js - * region_tag:backupdr_v1_generated_BackupDR_GetDataSource_async - */ - getDataSource( - request?: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IDataSource, - protos.google.cloud.backupdr.v1.IGetDataSourceRequest|undefined, {}|undefined - ]>; - getDataSource( - request: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IDataSource, - protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, - {}|null|undefined>): void; - getDataSource( - request: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IDataSource, - protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, - {}|null|undefined>): void; - getDataSource( - request?: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IDataSource, - protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IDataSource, - protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IDataSource, - protos.google.cloud.backupdr.v1.IGetDataSourceRequest|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.getDataSource(request, options, callback); - } -/** - * Internal only. - * Initiates a backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.dataSource - * Required. The resource name of the instance, in the format - * 'projects/* /locations/* /backupVaults/* /dataSources/'. - * @param {string} [request.requestId] - * Optional. An optional 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 {string} request.backupId - * Required. Resource ID of the Backup resource. - * @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.backupdr.v1.InitiateBackupResponse|InitiateBackupResponse}. - * 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/backup_d_r.initiate_backup.js - * region_tag:backupdr_v1_generated_BackupDR_InitiateBackup_async - */ - initiateBackup( - request?: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IInitiateBackupResponse, - protos.google.cloud.backupdr.v1.IInitiateBackupRequest|undefined, {}|undefined - ]>; - initiateBackup( - request: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IInitiateBackupResponse, - protos.google.cloud.backupdr.v1.IInitiateBackupRequest|null|undefined, - {}|null|undefined>): void; - initiateBackup( - request: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IInitiateBackupResponse, - protos.google.cloud.backupdr.v1.IInitiateBackupRequest|null|undefined, - {}|null|undefined>): void; - initiateBackup( - request?: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IInitiateBackupResponse, - protos.google.cloud.backupdr.v1.IInitiateBackupRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IInitiateBackupResponse, - protos.google.cloud.backupdr.v1.IInitiateBackupRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IInitiateBackupResponse, - protos.google.cloud.backupdr.v1.IInitiateBackupRequest|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({ - 'data_source': request.dataSource ?? '', - }); - this.initialize(); - return this.innerApiCalls.initiateBackup(request, options, callback); - } -/** - * Internal only. - * Fetch access token for a given data source. - * - * @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/* /backupVaults/* /dataSources'. - * @param {number} request.generationId - * Required. The generation of the backup to update. - * @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.backupdr.v1.FetchAccessTokenResponse|FetchAccessTokenResponse}. - * 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/backup_d_r.fetch_access_token.js - * region_tag:backupdr_v1_generated_BackupDR_FetchAccessToken_async - */ - fetchAccessToken( - request?: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, - protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest|undefined, {}|undefined - ]>; - fetchAccessToken( - request: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, - protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest|null|undefined, - {}|null|undefined>): void; - fetchAccessToken( - request: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, - protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest|null|undefined, - {}|null|undefined>): void; - fetchAccessToken( - request?: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, - protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, - protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, - protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest|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.fetchAccessToken(request, options, callback); - } -/** - * Gets details of a Backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the data source resource name, in the format - * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' - * @param {google.cloud.backupdr.v1.BackupView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * resource. - * @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.backupdr.v1.Backup|Backup}. - * 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/backup_d_r.get_backup.js - * region_tag:backupdr_v1_generated_BackupDR_GetBackup_async - */ - getBackup( - request?: protos.google.cloud.backupdr.v1.IGetBackupRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IGetBackupRequest|undefined, {}|undefined - ]>; - getBackup( - request: protos.google.cloud.backupdr.v1.IGetBackupRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, - {}|null|undefined>): void; - getBackup( - request: protos.google.cloud.backupdr.v1.IGetBackupRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, - {}|null|undefined>): void; - getBackup( - request?: protos.google.cloud.backupdr.v1.IGetBackupRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IGetBackupRequest|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.getBackup(request, options, callback); - } -/** - * Gets details of a single BackupPlan. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the `BackupPlan` to retrieve. - * - * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - * @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.backupdr.v1.BackupPlan|BackupPlan}. - * 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/backup_d_r.get_backup_plan.js - * region_tag:backupdr_v1_generated_BackupDR_GetBackupPlan_async - */ - getBackupPlan( - request?: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlan, - protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|undefined, {}|undefined - ]>; - getBackupPlan( - request: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackupPlan, - protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, - {}|null|undefined>): void; - getBackupPlan( - request: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackupPlan, - protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, - {}|null|undefined>): void; - getBackupPlan( - request?: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IBackupPlan, - protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IBackupPlan, - protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlan, - protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|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.getBackupPlan(request, options, callback); - } -/** - * Gets details of a single BackupPlanAssociation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the backup plan association resource, in the format - * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. - * 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/backup_d_r.get_backup_plan_association.js - * region_tag:backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_async - */ - getBackupPlanAssociation( - request?: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlanAssociation, - protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|undefined, {}|undefined - ]>; - getBackupPlanAssociation( - request: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackupPlanAssociation, - protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, - {}|null|undefined>): void; - getBackupPlanAssociation( - request: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackupPlanAssociation, - protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, - {}|null|undefined>): void; - getBackupPlanAssociation( - request?: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IBackupPlanAssociation, - protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IBackupPlanAssociation, - protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlanAssociation, - protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|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.getBackupPlanAssociation(request, options, callback); - } - -/** - * Creates a new ManagementServer in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The management server project and location in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR - * locations map to Google Cloud regions, for example **us-central1**. - * @param {string} request.managementServerId - * Required. The name of the management server to create. The name must be - * unique for the specified project and location. - * @param {google.cloud.backupdr.v1.ManagementServer} request.managementServer - * Required. A [management server - * resource][google.cloud.backupdr.v1.ManagementServer] - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.create_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_CreateManagementServer_async - */ - createManagementServer( - request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createManagementServer( - request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createManagementServer( - request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createManagementServer( - request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, - 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.createManagementServer(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createManagementServer()`. - * @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/backup_d_r.create_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_CreateManagementServer_async - */ - async checkCreateManagementServerProgress(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.createManagementServer, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a single ManagementServer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the resource - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.delete_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteManagementServer_async - */ - deleteManagementServer( - request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteManagementServer( - request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteManagementServer( - request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteManagementServer( - request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, - 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.deleteManagementServer(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteManagementServer()`. - * @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/backup_d_r.delete_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteManagementServer_async - */ - async checkDeleteManagementServerProgress(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.deleteManagementServer, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a new BackupVault in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Value for parent. - * @param {string} request.backupVaultId - * Required. ID of the requesting object - * If auto-generating ID server-side, remove this field and - * backup_vault_id from the method_signature of Create RPC - * @param {google.cloud.backupdr.v1.BackupVault} request.backupVault - * Required. The resource being created - * @param {string} [request.requestId] - * Optional. An optional 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 request, but do not perform mutations. - * The default is 'false'. - * @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/backup_d_r.create_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_CreateBackupVault_async - */ - createBackupVault( - request?: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createBackupVault( - request: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupVault( - request: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupVault( - request?: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, - 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.createBackupVault(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createBackupVault()`. - * @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/backup_d_r.create_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_CreateBackupVault_async - */ - async checkCreateBackupVaultProgress(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.createBackupVault, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the settings of a BackupVault. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * BackupVault 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 the request will fail. - * @param {google.cloud.backupdr.v1.BackupVault} request.backupVault - * Required. The resource being updated - * @param {string} [request.requestId] - * Optional. An optional 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 request, but do not perform mutations. - * The default is 'false'. - * @param {boolean} [request.force] - * Optional. If set to true, will not check plan duration against backup vault - * enforcement duration. - * @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/backup_d_r.update_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_UpdateBackupVault_async - */ - updateBackupVault( - request?: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateBackupVault( - request: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateBackupVault( - request: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateBackupVault( - request?: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, - 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({ - 'backup_vault.name': request.backupVault!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateBackupVault(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateBackupVault()`. - * @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/backup_d_r.update_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_UpdateBackupVault_async - */ - async checkUpdateBackupVaultProgress(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.updateBackupVault, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a BackupVault. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the resource. - * @param {string} [request.requestId] - * Optional. An optional 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 data source from this backup vault will also - * be deleted. - * @param {string} request.etag - * The current etag of the backup vault. - * If an etag is provided and does not match the current etag of the - * connection, deletion will be blocked. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is 'false'. - * @param {boolean} [request.allowMissing] - * Optional. If true and the BackupVault is not found, the request will - * succeed but no action will be taken. - * @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/backup_d_r.delete_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupVault_async - */ - deleteBackupVault( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteBackupVault( - request: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupVault( - request: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupVault( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, - 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.deleteBackupVault(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteBackupVault()`. - * @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/backup_d_r.delete_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupVault_async - */ - async checkDeleteBackupVaultProgress(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.deleteBackupVault, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the settings of a DataSource. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * DataSource 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 the request will fail. - * @param {google.cloud.backupdr.v1.DataSource} request.dataSource - * Required. The resource being updated - * @param {string} [request.requestId] - * Optional. An optional 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.allowMissing] - * Optional. Enable upsert. - * @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/backup_d_r.update_data_source.js - * region_tag:backupdr_v1_generated_BackupDR_UpdateDataSource_async - */ - updateDataSource( - request?: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateDataSource( - request: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateDataSource( - request: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateDataSource( - request?: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, - 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({ - 'data_source.name': request.dataSource!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateDataSource(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateDataSource()`. - * @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/backup_d_r.update_data_source.js - * region_tag:backupdr_v1_generated_BackupDR_UpdateDataSource_async - */ - async checkUpdateDataSourceProgress(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.updateDataSource, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a DataSource. This is a custom method instead of a standard delete - * method because external clients will not delete DataSources except for - * BackupDR backup appliances. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the resource. - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.remove_data_source.js - * region_tag:backupdr_v1_generated_BackupDR_RemoveDataSource_async - */ - removeDataSource( - request?: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - removeDataSource( - request: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - removeDataSource( - request: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - removeDataSource( - request?: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, - 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.removeDataSource(request, options, callback); - } -/** - * Check the status of the long running operation returned by `removeDataSource()`. - * @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/backup_d_r.remove_data_source.js - * region_tag:backupdr_v1_generated_BackupDR_RemoveDataSource_async - */ - async checkRemoveDataSourceProgress(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.removeDataSource, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Sets the internal status of a DataSource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.dataSource - * Required. The resource name of the instance, in the format - * 'projects/* /locations/* /backupVaults/* /dataSources/'. - * @param {Buffer} request.value - * Required. The value required for this method to work. This field must be - * the 32-byte SHA256 hash of the DataSourceID. The DataSourceID used here is - * only the final piece of the fully qualified resource path for this - * DataSource (i.e. the part after '.../dataSources/'). This field exists to - * make this method difficult to call since it is intended for use only by - * Backup Appliances. - * @param {google.cloud.backupdr.v1.BackupConfigState} request.backupConfigState - * Required. Output only. The new BackupConfigState to set for the DataSource. - * @param {string} [request.requestId] - * Optional. An optional 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. 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/backup_d_r.set_internal_status.js - * region_tag:backupdr_v1_generated_BackupDR_SetInternalStatus_async - */ - setInternalStatus( - request?: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - setInternalStatus( - request: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - setInternalStatus( - request: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - setInternalStatus( - request?: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, - 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({ - 'data_source': request.dataSource ?? '', - }); - this.initialize(); - return this.innerApiCalls.setInternalStatus(request, options, callback); - } -/** - * Check the status of the long running operation returned by `setInternalStatus()`. - * @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/backup_d_r.set_internal_status.js - * region_tag:backupdr_v1_generated_BackupDR_SetInternalStatus_async - */ - async checkSetInternalStatusProgress(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.setInternalStatus, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Internal only. - * Abandons a backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.dataSource - * Required. The resource name of the instance, in the format - * 'projects/* /locations/* /backupVaults/* /dataSources/'. - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.abandon_backup.js - * region_tag:backupdr_v1_generated_BackupDR_AbandonBackup_async - */ - abandonBackup( - request?: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - abandonBackup( - request: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - abandonBackup( - request: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - abandonBackup( - request?: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, - 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({ - 'data_source': request.dataSource ?? '', - }); - this.initialize(); - return this.innerApiCalls.abandonBackup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `abandonBackup()`. - * @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/backup_d_r.abandon_backup.js - * region_tag:backupdr_v1_generated_BackupDR_AbandonBackup_async - */ - async checkAbandonBackupProgress(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.abandonBackup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Internal only. - * Finalize a backup that was started by a call to InitiateBackup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.dataSource - * Required. The resource name of the instance, in the format - * 'projects/* /locations/* /backupVaults/* /dataSources/'. - * @param {string} request.description - * This will be assigned to the description field of the newly created Backup. - * @param {google.protobuf.Timestamp} request.consistencyTime - * The point in time when this backup was captured from the source. This will - * be assigned to the consistency_time field of the newly created Backup. - * @param {string} [request.requestId] - * Optional. An optional 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 {string} request.backupId - * Required. Resource ID of the Backup resource to be finalized. This must be - * the same backup_id that was used in the InitiateBackupRequest. - * @param {google.protobuf.Timestamp} request.recoveryRangeStartTime - * The earliest timestamp of data available in this Backup. This will set on - * the newly created Backup. - * @param {google.protobuf.Timestamp} request.recoveryRangeEndTime - * The latest timestamp of data available in this Backup. This will be set on - * the newly created Backup. - * @param {google.protobuf.Duration} request.retentionDuration - * The ExpireTime on the backup will be set to FinalizeTime plus this - * duration. If the resulting ExpireTime is less than - * EnforcedRetentionEndTime, then ExpireTime is set to - * EnforcedRetentionEndTime. - * @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/backup_d_r.finalize_backup.js - * region_tag:backupdr_v1_generated_BackupDR_FinalizeBackup_async - */ - finalizeBackup( - request?: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - finalizeBackup( - request: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - finalizeBackup( - request: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - finalizeBackup( - request?: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, - 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({ - 'data_source': request.dataSource ?? '', - }); - this.initialize(); - return this.innerApiCalls.finalizeBackup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `finalizeBackup()`. - * @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/backup_d_r.finalize_backup.js - * region_tag:backupdr_v1_generated_BackupDR_FinalizeBackup_async - */ - async checkFinalizeBackupProgress(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.finalizeBackup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the settings of a Backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * Backup 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 the request will fail. - * @param {google.cloud.backupdr.v1.Backup} request.backup - * Required. The resource being updated - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.update_backup.js - * region_tag:backupdr_v1_generated_BackupDR_UpdateBackup_async - */ - updateBackup( - request?: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateBackup( - request: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateBackup( - request: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateBackup( - request?: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, - 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({ - 'backup.name': request.backup!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateBackup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateBackup()`. - * @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/backup_d_r.update_backup.js - * region_tag:backupdr_v1_generated_BackupDR_UpdateBackup_async - */ - async checkUpdateBackupProgress(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.updateBackup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a Backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the resource. - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.delete_backup.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackup_async - */ - deleteBackup( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteBackup( - request: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackup( - request: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackup( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, - 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.deleteBackup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteBackup()`. - * @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/backup_d_r.delete_backup.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackup_async - */ - async checkDeleteBackupProgress(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.deleteBackup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Restore from a Backup - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the Backup instance, in the format - * 'projects/* /locations/* /backupVaults/* /dataSources/* /backups/'. - * @param {string} [request.requestId] - * Optional. An optional 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 {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} request.computeInstanceTargetEnvironment - * Compute Engine target environment to be used during restore. - * @param {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} request.computeInstanceRestoreProperties - * Compute Engine instance properties to be overridden during restore. - * @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/backup_d_r.restore_backup.js - * region_tag:backupdr_v1_generated_BackupDR_RestoreBackup_async - */ - restoreBackup( - request?: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - restoreBackup( - request: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - restoreBackup( - request: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - restoreBackup( - request?: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, - 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.restoreBackup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `restoreBackup()`. - * @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/backup_d_r.restore_backup.js - * region_tag:backupdr_v1_generated_BackupDR_RestoreBackup_async - */ - async checkRestoreBackupProgress(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.restoreBackup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Create a BackupPlan - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The `BackupPlan` project and location in the format - * `projects/{project}/locations/{location}`. In Cloud BackupDR locations - * map to GCP regions, for example **us-central1**. - * @param {string} request.backupPlanId - * Required. The name of the `BackupPlan` to create. The name must be unique - * for the specified project and location.The name must start with a lowercase - * letter followed by up to 62 lowercase letters, numbers, or hyphens. - * Pattern, /{@link protos.a-z0-9-|a-z}{,62}/. - * @param {google.cloud.backupdr.v1.BackupPlan} request.backupPlan - * Required. The `BackupPlan` resource object to create. - * @param {string} [request.requestId] - * Optional. An optional 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 t - * he 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/backup_d_r.create_backup_plan.js - * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlan_async - */ - createBackupPlan( - request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createBackupPlan( - request: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupPlan( - request: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupPlan( - request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, - 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.createBackupPlan(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createBackupPlan()`. - * @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/backup_d_r.create_backup_plan.js - * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlan_async - */ - async checkCreateBackupPlanProgress(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.createBackupPlan, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a single BackupPlan. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the `BackupPlan` to delete. - * - * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.delete_backup_plan.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlan_async - */ - deleteBackupPlan( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteBackupPlan( - request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupPlan( - request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupPlan( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, - 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.deleteBackupPlan(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteBackupPlan()`. - * @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/backup_d_r.delete_backup_plan.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlan_async - */ - async checkDeleteBackupPlanProgress(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.deleteBackupPlan, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Create a BackupPlanAssociation - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The backup plan association project and location in the format - * `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations - * map to GCP regions, for example **us-central1**. - * @param {string} request.backupPlanAssociationId - * Required. The name of the backup plan association to create. The name must - * be unique for the specified project and location. - * @param {google.cloud.backupdr.v1.BackupPlanAssociation} request.backupPlanAssociation - * Required. The resource being created - * @param {string} [request.requestId] - * Optional. An optional 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 t - * he 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/backup_d_r.create_backup_plan_association.js - * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async - */ - createBackupPlanAssociation( - request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createBackupPlanAssociation( - request: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupPlanAssociation( - request: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupPlanAssociation( - request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, - 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.createBackupPlanAssociation(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createBackupPlanAssociation()`. - * @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/backup_d_r.create_backup_plan_association.js - * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async - */ - async checkCreateBackupPlanAssociationProgress(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.createBackupPlanAssociation, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a single BackupPlanAssociation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the backup plan association resource, in the format - * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.delete_backup_plan_association.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async - */ - deleteBackupPlanAssociation( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteBackupPlanAssociation( - request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupPlanAssociation( - request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupPlanAssociation( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, - 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.deleteBackupPlanAssociation(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteBackupPlanAssociation()`. - * @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/backup_d_r.delete_backup_plan_association.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async - */ - async checkDeleteBackupPlanAssociationProgress(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.deleteBackupPlanAssociation, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Triggers a new Backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the backup plan association resource, in the format - * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - * @param {string} request.ruleId - * Required. backup rule_id for which a backup needs to be triggered. - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.trigger_backup.js - * region_tag:backupdr_v1_generated_BackupDR_TriggerBackup_async - */ - triggerBackup( - request?: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - triggerBackup( - request: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - triggerBackup( - request: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - triggerBackup( - request?: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, - 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.triggerBackup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `triggerBackup()`. - * @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/backup_d_r.trigger_backup.js - * region_tag:backupdr_v1_generated_BackupDR_TriggerBackup_async - */ - async checkTriggerBackupProgress(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.triggerBackup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists ManagementServers in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve management servers - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud BackupDR, locations map to Google Cloud regions, for example - * **us-central1**. To retrieve management servers for all locations, use "-" - * for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.ManagementServer|ManagementServer}. - * 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 `listManagementServersAsync()` - * 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. - */ - listManagementServers( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IManagementServer[], - protos.google.cloud.backupdr.v1.IListManagementServersRequest|null, - protos.google.cloud.backupdr.v1.IListManagementServersResponse - ]>; - listManagementServers( - request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, - protos.google.cloud.backupdr.v1.IManagementServer>): void; - listManagementServers( - request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, - protos.google.cloud.backupdr.v1.IManagementServer>): void; - listManagementServers( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, - protos.google.cloud.backupdr.v1.IManagementServer>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, - protos.google.cloud.backupdr.v1.IManagementServer>): - Promise<[ - protos.google.cloud.backupdr.v1.IManagementServer[], - protos.google.cloud.backupdr.v1.IListManagementServersRequest|null, - protos.google.cloud.backupdr.v1.IListManagementServersResponse - ]>|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.listManagementServers(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 project and location for which to retrieve management servers - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud BackupDR, locations map to Google Cloud regions, for example - * **us-central1**. To retrieve management servers for all locations, use "-" - * for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.ManagementServer|ManagementServer} 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 `listManagementServersAsync()` - * 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. - */ - listManagementServersStream( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, - 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['listManagementServers']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listManagementServers.createStream( - this.innerApiCalls.listManagementServers as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listManagementServers`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve management servers - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud BackupDR, locations map to Google Cloud regions, for example - * **us-central1**. To retrieve management servers for all locations, use "-" - * for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.ManagementServer|ManagementServer}. 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/backup_d_r.list_management_servers.js - * region_tag:backupdr_v1_generated_BackupDR_ListManagementServers_async - */ - listManagementServersAsync( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, - 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['listManagementServers']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listManagementServers.asyncIterate( - this.innerApiCalls['listManagementServers'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists BackupVaults in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * Vault. - * @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.backupdr.v1.BackupVault|BackupVault}. - * 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 `listBackupVaultsAsync()` - * 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. - */ - listBackupVaults( - request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupVault[], - protos.google.cloud.backupdr.v1.IListBackupVaultsRequest|null, - protos.google.cloud.backupdr.v1.IListBackupVaultsResponse - ]>; - listBackupVaults( - request: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>): void; - listBackupVaults( - request: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>): void; - listBackupVaults( - request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupVault[], - protos.google.cloud.backupdr.v1.IListBackupVaultsRequest|null, - protos.google.cloud.backupdr.v1.IListBackupVaultsResponse - ]>|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.listBackupVaults(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 project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * Vault. - * @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.backupdr.v1.BackupVault|BackupVault} 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 `listBackupVaultsAsync()` - * 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. - */ - listBackupVaultsStream( - request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - 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['listBackupVaults']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackupVaults.createStream( - this.innerApiCalls.listBackupVaults as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listBackupVaults`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * Vault. - * @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.backupdr.v1.BackupVault|BackupVault}. 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/backup_d_r.list_backup_vaults.js - * region_tag:backupdr_v1_generated_BackupDR_ListBackupVaults_async - */ - listBackupVaultsAsync( - request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - 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['listBackupVaults']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackupVaults.asyncIterate( - this.innerApiCalls['listBackupVaults'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * FetchUsableBackupVaults lists usable BackupVaults in a given project and - * location. Usable BackupVault are the ones that user has - * backupdr.backupVaults.get permission. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.BackupVault|BackupVault}. - * 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 `fetchUsableBackupVaultsAsync()` - * 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. - */ - fetchUsableBackupVaults( - request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupVault[], - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest|null, - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse - ]>; - fetchUsableBackupVaults( - request: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>): void; - fetchUsableBackupVaults( - request: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>): void; - fetchUsableBackupVaults( - request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupVault[], - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest|null, - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse - ]>|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.fetchUsableBackupVaults(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 project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.BackupVault|BackupVault} 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 `fetchUsableBackupVaultsAsync()` - * 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. - */ - fetchUsableBackupVaultsStream( - request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - 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['fetchUsableBackupVaults']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.fetchUsableBackupVaults.createStream( - this.innerApiCalls.fetchUsableBackupVaults as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `fetchUsableBackupVaults`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.BackupVault|BackupVault}. 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/backup_d_r.fetch_usable_backup_vaults.js - * region_tag:backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_async - */ - fetchUsableBackupVaultsAsync( - request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - 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['fetchUsableBackupVaults']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.fetchUsableBackupVaults.asyncIterate( - this.innerApiCalls['fetchUsableBackupVaults'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists DataSources in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve data - * sources information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.DataSource|DataSource}. - * 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 `listDataSourcesAsync()` - * 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. - */ - listDataSources( - request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IDataSource[], - protos.google.cloud.backupdr.v1.IListDataSourcesRequest|null, - protos.google.cloud.backupdr.v1.IListDataSourcesResponse - ]>; - listDataSources( - request: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, - protos.google.cloud.backupdr.v1.IDataSource>): void; - listDataSources( - request: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, - protos.google.cloud.backupdr.v1.IDataSource>): void; - listDataSources( - request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, - protos.google.cloud.backupdr.v1.IDataSource>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, - protos.google.cloud.backupdr.v1.IDataSource>): - Promise<[ - protos.google.cloud.backupdr.v1.IDataSource[], - protos.google.cloud.backupdr.v1.IListDataSourcesRequest|null, - protos.google.cloud.backupdr.v1.IListDataSourcesResponse - ]>|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.listDataSources(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 project and location for which to retrieve data - * sources information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.DataSource|DataSource} 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 `listDataSourcesAsync()` - * 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. - */ - listDataSourcesStream( - request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - 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['listDataSources']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDataSources.createStream( - this.innerApiCalls.listDataSources as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listDataSources`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve data - * sources information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.DataSource|DataSource}. 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/backup_d_r.list_data_sources.js - * region_tag:backupdr_v1_generated_BackupDR_ListDataSources_async - */ - listDataSourcesAsync( - request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - 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['listDataSources']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDataSources.asyncIterate( - this.innerApiCalls['listDataSources'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists Backups in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backup - * information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @param {google.cloud.backupdr.v1.BackupView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * resource. - * @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.backupdr.v1.Backup|Backup}. - * 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 `listBackupsAsync()` - * 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. - */ - listBackups( - request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackup[], - protos.google.cloud.backupdr.v1.IListBackupsRequest|null, - protos.google.cloud.backupdr.v1.IListBackupsResponse - ]>; - listBackups( - request: protos.google.cloud.backupdr.v1.IListBackupsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupsRequest, - protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackup>): void; - listBackups( - request: protos.google.cloud.backupdr.v1.IListBackupsRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupsRequest, - protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackup>): void; - listBackups( - request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupsRequest, - protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackup>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupsRequest, - protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackup>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackup[], - protos.google.cloud.backupdr.v1.IListBackupsRequest|null, - protos.google.cloud.backupdr.v1.IListBackupsResponse - ]>|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.listBackups(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 project and location for which to retrieve backup - * information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @param {google.cloud.backupdr.v1.BackupView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * resource. - * @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.backupdr.v1.Backup|Backup} 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 `listBackupsAsync()` - * 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. - */ - listBackupsStream( - request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, - 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['listBackups']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackups.createStream( - this.innerApiCalls.listBackups as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listBackups`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backup - * information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @param {google.cloud.backupdr.v1.BackupView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * resource. - * @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.backupdr.v1.Backup|Backup}. 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/backup_d_r.list_backups.js - * region_tag:backupdr_v1_generated_BackupDR_ListBackups_async - */ - listBackupsAsync( - request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, - 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['listBackups']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackups.asyncIterate( - this.innerApiCalls['listBackups'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists BackupPlans in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve `BackupPlans` - * information. Format: `projects/{project}/locations/{location}`. In Cloud - * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To - * retrieve backup plans for all locations, use "-" for the - * `{location}` value. - * @param {number} [request.pageSize] - * Optional. The maximum number of `BackupPlans` to return in a single - * response. If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} - * to determine if there are more instances left to be queried. - * @param {string} [request.pageToken] - * Optional. The value of - * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} - * received from a previous `ListBackupPlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackupPlans` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Field match expression used to filter the results. - * @param {string} [request.orderBy] - * Optional. Field by which to sort the results. - * @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.backupdr.v1.BackupPlan|BackupPlan}. - * 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 `listBackupPlansAsync()` - * 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. - */ - listBackupPlans( - request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlan[], - protos.google.cloud.backupdr.v1.IListBackupPlansRequest|null, - protos.google.cloud.backupdr.v1.IListBackupPlansResponse - ]>; - listBackupPlans( - request: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlan>): void; - listBackupPlans( - request: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlan>): void; - listBackupPlans( - request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlan>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlan>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlan[], - protos.google.cloud.backupdr.v1.IListBackupPlansRequest|null, - protos.google.cloud.backupdr.v1.IListBackupPlansResponse - ]>|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.listBackupPlans(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 project and location for which to retrieve `BackupPlans` - * information. Format: `projects/{project}/locations/{location}`. In Cloud - * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To - * retrieve backup plans for all locations, use "-" for the - * `{location}` value. - * @param {number} [request.pageSize] - * Optional. The maximum number of `BackupPlans` to return in a single - * response. If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} - * to determine if there are more instances left to be queried. - * @param {string} [request.pageToken] - * Optional. The value of - * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} - * received from a previous `ListBackupPlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackupPlans` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Field match expression used to filter the results. - * @param {string} [request.orderBy] - * Optional. Field by which to sort the results. - * @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.backupdr.v1.BackupPlan|BackupPlan} 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 `listBackupPlansAsync()` - * 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. - */ - listBackupPlansStream( - request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - 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['listBackupPlans']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackupPlans.createStream( - this.innerApiCalls.listBackupPlans as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listBackupPlans`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve `BackupPlans` - * information. Format: `projects/{project}/locations/{location}`. In Cloud - * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To - * retrieve backup plans for all locations, use "-" for the - * `{location}` value. - * @param {number} [request.pageSize] - * Optional. The maximum number of `BackupPlans` to return in a single - * response. If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} - * to determine if there are more instances left to be queried. - * @param {string} [request.pageToken] - * Optional. The value of - * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} - * received from a previous `ListBackupPlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackupPlans` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Field match expression used to filter the results. - * @param {string} [request.orderBy] - * Optional. Field by which to sort the results. - * @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.backupdr.v1.BackupPlan|BackupPlan}. 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/backup_d_r.list_backup_plans.js - * region_tag:backupdr_v1_generated_BackupDR_ListBackupPlans_async - */ - listBackupPlansAsync( - request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - 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['listBackupPlans']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackupPlans.asyncIterate( - this.innerApiCalls['listBackupPlans'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists BackupPlanAssociations in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backup Plan - * Associations information, in the format - * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations - * map to GCP regions, for example **us-central1**. To retrieve backup plan - * associations for all locations, use "-" for the - * `{location}` value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results - * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. - * 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 `listBackupPlanAssociationsAsync()` - * 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. - */ - listBackupPlanAssociations( - request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlanAssociation[], - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest|null, - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse - ]>; - listBackupPlanAssociations( - request: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): void; - listBackupPlanAssociations( - request: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): void; - listBackupPlanAssociations( - request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlanAssociation>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlanAssociation[], - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest|null, - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse - ]>|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.listBackupPlanAssociations(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 project and location for which to retrieve backup Plan - * Associations information, in the format - * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations - * map to GCP regions, for example **us-central1**. To retrieve backup plan - * associations for all locations, use "-" for the - * `{location}` value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results - * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation} 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 `listBackupPlanAssociationsAsync()` - * 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. - */ - listBackupPlanAssociationsStream( - request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - 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['listBackupPlanAssociations']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackupPlanAssociations.createStream( - this.innerApiCalls.listBackupPlanAssociations as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listBackupPlanAssociations`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backup Plan - * Associations information, in the format - * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations - * map to GCP regions, for example **us-central1**. To retrieve backup plan - * associations for all locations, use "-" for the - * `{location}` value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results - * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. 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/backup_d_r.list_backup_plan_associations.js - * region_tag:backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_async - */ - listBackupPlanAssociationsAsync( - request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - 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['listBackupPlanAssociations']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackupPlanAssociations.asyncIterate( - this.innerApiCalls['listBackupPlanAssociations'] 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 backup resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} backupvault - * @param {string} datasource - * @param {string} backup - * @returns {string} Resource name string. - */ - backupPath(project:string,location:string,backupvault:string,datasource:string,backup:string) { - return this.pathTemplates.backupPathTemplate.render({ - project: project, - location: location, - backupvault: backupvault, - datasource: datasource, - backup: backup, - }); - } - - /** - * Parse the project from Backup resource. - * - * @param {string} backupName - * A fully-qualified path representing Backup resource. - * @returns {string} A string representing the project. - */ - matchProjectFromBackupName(backupName: string) { - return this.pathTemplates.backupPathTemplate.match(backupName).project; - } - - /** - * Parse the location from Backup resource. - * - * @param {string} backupName - * A fully-qualified path representing Backup resource. - * @returns {string} A string representing the location. - */ - matchLocationFromBackupName(backupName: string) { - return this.pathTemplates.backupPathTemplate.match(backupName).location; - } - - /** - * Parse the backupvault from Backup resource. - * - * @param {string} backupName - * A fully-qualified path representing Backup resource. - * @returns {string} A string representing the backupvault. - */ - matchBackupvaultFromBackupName(backupName: string) { - return this.pathTemplates.backupPathTemplate.match(backupName).backupvault; - } - - /** - * Parse the datasource from Backup resource. - * - * @param {string} backupName - * A fully-qualified path representing Backup resource. - * @returns {string} A string representing the datasource. - */ - matchDatasourceFromBackupName(backupName: string) { - return this.pathTemplates.backupPathTemplate.match(backupName).datasource; - } - - /** - * Parse the backup from Backup resource. - * - * @param {string} backupName - * A fully-qualified path representing Backup resource. - * @returns {string} A string representing the backup. - */ - matchBackupFromBackupName(backupName: string) { - return this.pathTemplates.backupPathTemplate.match(backupName).backup; - } - - /** - * Return a fully-qualified backupPlan resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} backup_plan - * @returns {string} Resource name string. - */ - backupPlanPath(project:string,location:string,backupPlan:string) { - return this.pathTemplates.backupPlanPathTemplate.render({ - project: project, - location: location, - backup_plan: backupPlan, - }); - } - - /** - * Parse the project from BackupPlan resource. - * - * @param {string} backupPlanName - * A fully-qualified path representing BackupPlan resource. - * @returns {string} A string representing the project. - */ - matchProjectFromBackupPlanName(backupPlanName: string) { - return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName).project; - } - - /** - * Parse the location from BackupPlan resource. - * - * @param {string} backupPlanName - * A fully-qualified path representing BackupPlan resource. - * @returns {string} A string representing the location. - */ - matchLocationFromBackupPlanName(backupPlanName: string) { - return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName).location; - } - - /** - * Parse the backup_plan from BackupPlan resource. - * - * @param {string} backupPlanName - * A fully-qualified path representing BackupPlan resource. - * @returns {string} A string representing the backup_plan. - */ - matchBackupPlanFromBackupPlanName(backupPlanName: string) { - return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName).backup_plan; - } - - /** - * Return a fully-qualified backupPlanAssociation resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} backup_plan_association - * @returns {string} Resource name string. - */ - backupPlanAssociationPath(project:string,location:string,backupPlanAssociation:string) { - return this.pathTemplates.backupPlanAssociationPathTemplate.render({ - project: project, - location: location, - backup_plan_association: backupPlanAssociation, - }); - } - - /** - * Parse the project from BackupPlanAssociation resource. - * - * @param {string} backupPlanAssociationName - * A fully-qualified path representing BackupPlanAssociation resource. - * @returns {string} A string representing the project. - */ - matchProjectFromBackupPlanAssociationName(backupPlanAssociationName: string) { - return this.pathTemplates.backupPlanAssociationPathTemplate.match(backupPlanAssociationName).project; - } - - /** - * Parse the location from BackupPlanAssociation resource. - * - * @param {string} backupPlanAssociationName - * A fully-qualified path representing BackupPlanAssociation resource. - * @returns {string} A string representing the location. - */ - matchLocationFromBackupPlanAssociationName(backupPlanAssociationName: string) { - return this.pathTemplates.backupPlanAssociationPathTemplate.match(backupPlanAssociationName).location; - } - - /** - * Parse the backup_plan_association from BackupPlanAssociation resource. - * - * @param {string} backupPlanAssociationName - * A fully-qualified path representing BackupPlanAssociation resource. - * @returns {string} A string representing the backup_plan_association. - */ - matchBackupPlanAssociationFromBackupPlanAssociationName(backupPlanAssociationName: string) { - return this.pathTemplates.backupPlanAssociationPathTemplate.match(backupPlanAssociationName).backup_plan_association; - } - - /** - * Return a fully-qualified backupVault resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} backupvault - * @returns {string} Resource name string. - */ - backupVaultPath(project:string,location:string,backupvault:string) { - return this.pathTemplates.backupVaultPathTemplate.render({ - project: project, - location: location, - backupvault: backupvault, - }); - } - - /** - * Parse the project from BackupVault resource. - * - * @param {string} backupVaultName - * A fully-qualified path representing BackupVault resource. - * @returns {string} A string representing the project. - */ - matchProjectFromBackupVaultName(backupVaultName: string) { - return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName).project; - } - - /** - * Parse the location from BackupVault resource. - * - * @param {string} backupVaultName - * A fully-qualified path representing BackupVault resource. - * @returns {string} A string representing the location. - */ - matchLocationFromBackupVaultName(backupVaultName: string) { - return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName).location; - } - - /** - * Parse the backupvault from BackupVault resource. - * - * @param {string} backupVaultName - * A fully-qualified path representing BackupVault resource. - * @returns {string} A string representing the backupvault. - */ - matchBackupvaultFromBackupVaultName(backupVaultName: string) { - return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName).backupvault; - } - - /** - * Return a fully-qualified dataSource resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} backupvault - * @param {string} datasource - * @returns {string} Resource name string. - */ - dataSourcePath(project:string,location:string,backupvault:string,datasource:string) { - return this.pathTemplates.dataSourcePathTemplate.render({ - project: project, - location: location, - backupvault: backupvault, - datasource: datasource, - }); - } - - /** - * Parse the project from DataSource resource. - * - * @param {string} dataSourceName - * A fully-qualified path representing DataSource resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataSourceName(dataSourceName: string) { - return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).project; - } - - /** - * Parse the location from DataSource resource. - * - * @param {string} dataSourceName - * A fully-qualified path representing DataSource resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataSourceName(dataSourceName: string) { - return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).location; - } - - /** - * Parse the backupvault from DataSource resource. - * - * @param {string} dataSourceName - * A fully-qualified path representing DataSource resource. - * @returns {string} A string representing the backupvault. - */ - matchBackupvaultFromDataSourceName(dataSourceName: string) { - return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).backupvault; - } - - /** - * Parse the datasource from DataSource resource. - * - * @param {string} dataSourceName - * A fully-qualified path representing DataSource resource. - * @returns {string} A string representing the datasource. - */ - matchDatasourceFromDataSourceName(dataSourceName: string) { - return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).datasource; - } - - /** - * 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 managementServer resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} managementserver - * @returns {string} Resource name string. - */ - managementServerPath(project:string,location:string,managementserver:string) { - return this.pathTemplates.managementServerPathTemplate.render({ - project: project, - location: location, - managementserver: managementserver, - }); - } - - /** - * Parse the project from ManagementServer resource. - * - * @param {string} managementServerName - * A fully-qualified path representing ManagementServer resource. - * @returns {string} A string representing the project. - */ - matchProjectFromManagementServerName(managementServerName: string) { - return this.pathTemplates.managementServerPathTemplate.match(managementServerName).project; - } - - /** - * Parse the location from ManagementServer resource. - * - * @param {string} managementServerName - * A fully-qualified path representing ManagementServer resource. - * @returns {string} A string representing the location. - */ - matchLocationFromManagementServerName(managementServerName: string) { - return this.pathTemplates.managementServerPathTemplate.match(managementServerName).location; - } - - /** - * Parse the managementserver from ManagementServer resource. - * - * @param {string} managementServerName - * A fully-qualified path representing ManagementServer resource. - * @returns {string} A string representing the managementserver. - */ - matchManagementserverFromManagementServerName(managementServerName: string) { - return this.pathTemplates.managementServerPathTemplate.match(managementServerName).managementserver; - } - - /** - * 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; - } - - /** - * 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.backupDRStub && !this._terminated) { - return this.backupDRStub.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-backupdr/v1/src/v1/backup_d_r_client_config.json b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client_config.json deleted file mode 100644 index 8b29881f031..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client_config.json +++ /dev/null @@ -1,191 +0,0 @@ -{ - "interfaces": { - "google.cloud.backupdr.v1.BackupDR": { - "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": { - "ListManagementServers": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetManagementServer": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateManagementServer": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteManagementServer": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateBackupVault": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListBackupVaults": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "FetchUsableBackupVaults": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetBackupVault": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "UpdateBackupVault": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteBackupVault": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "TestIamPermissions": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListDataSources": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetDataSource": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "UpdateDataSource": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RemoveDataSource": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetInternalStatus": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "InitiateBackup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "AbandonBackup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "FinalizeBackup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "FetchAccessToken": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListBackups": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetBackup": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "UpdateBackup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteBackup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RestoreBackup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateBackupPlan": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetBackupPlan": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListBackupPlans": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteBackupPlan": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateBackupPlanAssociation": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetBackupPlanAssociation": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListBackupPlanAssociations": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteBackupPlanAssociation": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "TriggerBackup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json deleted file mode 100644 index 79496ec85e7..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - "../../protos/google/cloud/backupdr/v1/backupdr.proto", - "../../protos/google/cloud/backupdr/v1/backupplan.proto", - "../../protos/google/cloud/backupdr/v1/backupplanassociation.proto", - "../../protos/google/cloud/backupdr/v1/backupvault.proto", - "../../protos/google/cloud/backupdr/v1/backupvault_ba.proto", - "../../protos/google/cloud/backupdr/v1/backupvault_gce.proto" -] diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json deleted file mode 100644 index 0407284a357..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json +++ /dev/null @@ -1,391 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.backupdr.v1", - "libraryPackage": "@google-cloud/backupdr", - "services": { - "BackupDR": { - "clients": { - "grpc": { - "libraryClient": "BackupDRClient", - "rpcs": { - "GetManagementServer": { - "methods": [ - "getManagementServer" - ] - }, - "GetBackupVault": { - "methods": [ - "getBackupVault" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "GetDataSource": { - "methods": [ - "getDataSource" - ] - }, - "InitiateBackup": { - "methods": [ - "initiateBackup" - ] - }, - "FetchAccessToken": { - "methods": [ - "fetchAccessToken" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetBackupPlan": { - "methods": [ - "getBackupPlan" - ] - }, - "GetBackupPlanAssociation": { - "methods": [ - "getBackupPlanAssociation" - ] - }, - "CreateManagementServer": { - "methods": [ - "createManagementServer" - ] - }, - "DeleteManagementServer": { - "methods": [ - "deleteManagementServer" - ] - }, - "CreateBackupVault": { - "methods": [ - "createBackupVault" - ] - }, - "UpdateBackupVault": { - "methods": [ - "updateBackupVault" - ] - }, - "DeleteBackupVault": { - "methods": [ - "deleteBackupVault" - ] - }, - "UpdateDataSource": { - "methods": [ - "updateDataSource" - ] - }, - "RemoveDataSource": { - "methods": [ - "removeDataSource" - ] - }, - "SetInternalStatus": { - "methods": [ - "setInternalStatus" - ] - }, - "AbandonBackup": { - "methods": [ - "abandonBackup" - ] - }, - "FinalizeBackup": { - "methods": [ - "finalizeBackup" - ] - }, - "UpdateBackup": { - "methods": [ - "updateBackup" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "RestoreBackup": { - "methods": [ - "restoreBackup" - ] - }, - "CreateBackupPlan": { - "methods": [ - "createBackupPlan" - ] - }, - "DeleteBackupPlan": { - "methods": [ - "deleteBackupPlan" - ] - }, - "CreateBackupPlanAssociation": { - "methods": [ - "createBackupPlanAssociation" - ] - }, - "DeleteBackupPlanAssociation": { - "methods": [ - "deleteBackupPlanAssociation" - ] - }, - "TriggerBackup": { - "methods": [ - "triggerBackup" - ] - }, - "ListManagementServers": { - "methods": [ - "listManagementServers", - "listManagementServersStream", - "listManagementServersAsync" - ] - }, - "ListBackupVaults": { - "methods": [ - "listBackupVaults", - "listBackupVaultsStream", - "listBackupVaultsAsync" - ] - }, - "FetchUsableBackupVaults": { - "methods": [ - "fetchUsableBackupVaults", - "fetchUsableBackupVaultsStream", - "fetchUsableBackupVaultsAsync" - ] - }, - "ListDataSources": { - "methods": [ - "listDataSources", - "listDataSourcesStream", - "listDataSourcesAsync" - ] - }, - "ListBackups": { - "methods": [ - "listBackups", - "listBackupsStream", - "listBackupsAsync" - ] - }, - "ListBackupPlans": { - "methods": [ - "listBackupPlans", - "listBackupPlansStream", - "listBackupPlansAsync" - ] - }, - "ListBackupPlanAssociations": { - "methods": [ - "listBackupPlanAssociations", - "listBackupPlanAssociationsStream", - "listBackupPlanAssociationsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "BackupDRClient", - "rpcs": { - "GetManagementServer": { - "methods": [ - "getManagementServer" - ] - }, - "GetBackupVault": { - "methods": [ - "getBackupVault" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "GetDataSource": { - "methods": [ - "getDataSource" - ] - }, - "InitiateBackup": { - "methods": [ - "initiateBackup" - ] - }, - "FetchAccessToken": { - "methods": [ - "fetchAccessToken" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetBackupPlan": { - "methods": [ - "getBackupPlan" - ] - }, - "GetBackupPlanAssociation": { - "methods": [ - "getBackupPlanAssociation" - ] - }, - "CreateManagementServer": { - "methods": [ - "createManagementServer" - ] - }, - "DeleteManagementServer": { - "methods": [ - "deleteManagementServer" - ] - }, - "CreateBackupVault": { - "methods": [ - "createBackupVault" - ] - }, - "UpdateBackupVault": { - "methods": [ - "updateBackupVault" - ] - }, - "DeleteBackupVault": { - "methods": [ - "deleteBackupVault" - ] - }, - "UpdateDataSource": { - "methods": [ - "updateDataSource" - ] - }, - "RemoveDataSource": { - "methods": [ - "removeDataSource" - ] - }, - "SetInternalStatus": { - "methods": [ - "setInternalStatus" - ] - }, - "AbandonBackup": { - "methods": [ - "abandonBackup" - ] - }, - "FinalizeBackup": { - "methods": [ - "finalizeBackup" - ] - }, - "UpdateBackup": { - "methods": [ - "updateBackup" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "RestoreBackup": { - "methods": [ - "restoreBackup" - ] - }, - "CreateBackupPlan": { - "methods": [ - "createBackupPlan" - ] - }, - "DeleteBackupPlan": { - "methods": [ - "deleteBackupPlan" - ] - }, - "CreateBackupPlanAssociation": { - "methods": [ - "createBackupPlanAssociation" - ] - }, - "DeleteBackupPlanAssociation": { - "methods": [ - "deleteBackupPlanAssociation" - ] - }, - "TriggerBackup": { - "methods": [ - "triggerBackup" - ] - }, - "ListManagementServers": { - "methods": [ - "listManagementServers", - "listManagementServersStream", - "listManagementServersAsync" - ] - }, - "ListBackupVaults": { - "methods": [ - "listBackupVaults", - "listBackupVaultsStream", - "listBackupVaultsAsync" - ] - }, - "FetchUsableBackupVaults": { - "methods": [ - "fetchUsableBackupVaults", - "fetchUsableBackupVaultsStream", - "fetchUsableBackupVaultsAsync" - ] - }, - "ListDataSources": { - "methods": [ - "listDataSources", - "listDataSourcesStream", - "listDataSourcesAsync" - ] - }, - "ListBackups": { - "methods": [ - "listBackups", - "listBackupsStream", - "listBackupsAsync" - ] - }, - "ListBackupPlans": { - "methods": [ - "listBackupPlans", - "listBackupPlansStream", - "listBackupPlansAsync" - ] - }, - "ListBackupPlanAssociations": { - "methods": [ - "listBackupPlanAssociations", - "listBackupPlanAssociationsStream", - "listBackupPlanAssociationsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts deleted file mode 100644 index ba4dc25d2f3..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts +++ /dev/null @@ -1,19 +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 -// -// 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 {BackupDRClient} from './backup_d_r_client'; diff --git a/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 5c5ec9c7cf0..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,27 +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 -// -// 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 backupdr = require('@google-cloud/backupdr'); - -function main() { - const backupDRClient = new backupdr.BackupDRClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 229588cfd57..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,32 +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 -// -// 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 {BackupDRClient} from '@google-cloud/backupdr'; - -// check that the client class type name can be used -function doStuffWithBackupDRClient(client: BackupDRClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const backupDRClient = new BackupDRClient(); - doStuffWithBackupDRClient(backupDRClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts b/owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts deleted file mode 100644 index fd5bfdc71d5..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts +++ /dev/null @@ -1,49 +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 -// -// 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-backupdr/v1/test/gapic_backup_d_r_v1.ts b/owl-bot-staging/google-cloud-backupdr/v1/test/gapic_backup_d_r_v1.ts deleted file mode 100644 index 451d7bee0fe..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/test/gapic_backup_d_r_v1.ts +++ /dev/null @@ -1,6816 +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 -// -// 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 backupdrModule 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.BackupDRClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new backupdrModule.v1.BackupDRClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'backupdr.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new backupdrModule.v1.BackupDRClient(); - 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 = backupdrModule.v1.BackupDRClient.servicePath; - assert.strictEqual(servicePath, 'backupdr.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = backupdrModule.v1.BackupDRClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'backupdr.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new backupdrModule.v1.BackupDRClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'backupdr.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new backupdrModule.v1.BackupDRClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'backupdr.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 backupdrModule.v1.BackupDRClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'backupdr.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 backupdrModule.v1.BackupDRClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'backupdr.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 backupdrModule.v1.BackupDRClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = backupdrModule.v1.BackupDRClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new backupdrModule.v1.BackupDRClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new backupdrModule.v1.BackupDRClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.backupDRStub, undefined); - await client.initialize(); - assert(client.backupDRStub); - }); - - it('has close method for the initialized client', done => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.backupDRStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.backupDRStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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('getManagementServer', () => { - it('invokes getManagementServer without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() - ); - client.innerApiCalls.getManagementServer = stubSimpleCall(expectedResponse); - const [response] = await client.getManagementServer(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getManagementServer without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() - ); - client.innerApiCalls.getManagementServer = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getManagementServer( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IManagementServer|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getManagementServer with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getManagementServer = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getManagementServer(request), expectedError); - const actualRequest = (client.innerApiCalls.getManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getManagementServer with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getManagementServer(request), expectedError); - }); - }); - - describe('getBackupVault', () => { - it('invokes getBackupVault without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupVault() - ); - client.innerApiCalls.getBackupVault = stubSimpleCall(expectedResponse); - const [response] = await client.getBackupVault(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupVault without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupVault() - ); - client.innerApiCalls.getBackupVault = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getBackupVault( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupVault|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupVault with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getBackupVault = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getBackupVault(request), expectedError); - const actualRequest = (client.innerApiCalls.getBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupVault with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getBackupVault(request), expectedError); - }); - }); - - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = stubSimpleCall(expectedResponse); - const [response] = await client.testIamPermissions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() - ); - client.innerApiCalls.testIamPermissions = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.testIamPermissions( - request, - (err?: Error|null, result?: protos.google.iam.v1.ITestIamPermissionsResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.testIamPermissions = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.testIamPermissions(request), expectedError); - const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes testIamPermissions with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); - request.resource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.testIamPermissions(request), expectedError); - }); - }); - - describe('getDataSource', () => { - it('invokes getDataSource without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DataSource() - ); - client.innerApiCalls.getDataSource = stubSimpleCall(expectedResponse); - const [response] = await client.getDataSource(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataSource without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DataSource() - ); - client.innerApiCalls.getDataSource = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getDataSource( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IDataSource|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataSource with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getDataSource = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getDataSource(request), expectedError); - const actualRequest = (client.innerApiCalls.getDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataSource with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getDataSource(request), expectedError); - }); - }); - - describe('initiateBackup', () => { - it('invokes initiateBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.InitiateBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.InitiateBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.InitiateBackupResponse() - ); - client.innerApiCalls.initiateBackup = stubSimpleCall(expectedResponse); - const [response] = await client.initiateBackup(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.initiateBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.initiateBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes initiateBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.InitiateBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.InitiateBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.InitiateBackupResponse() - ); - client.innerApiCalls.initiateBackup = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.initiateBackup( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IInitiateBackupResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.initiateBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.initiateBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes initiateBackup with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.InitiateBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.InitiateBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.initiateBackup = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.initiateBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.initiateBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.initiateBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes initiateBackup with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.InitiateBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.InitiateBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.initiateBackup(request), expectedError); - }); - }); - - describe('fetchAccessToken', () => { - it('invokes fetchAccessToken without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchAccessTokenRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchAccessTokenResponse() - ); - client.innerApiCalls.fetchAccessToken = stubSimpleCall(expectedResponse); - const [response] = await client.fetchAccessToken(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchAccessToken as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchAccessToken as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchAccessToken without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchAccessTokenRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchAccessTokenResponse() - ); - client.innerApiCalls.fetchAccessToken = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.fetchAccessToken( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchAccessToken as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchAccessToken as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchAccessToken with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchAccessTokenRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.fetchAccessToken = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.fetchAccessToken(request), expectedError); - const actualRequest = (client.innerApiCalls.fetchAccessToken as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchAccessToken as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchAccessToken with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchAccessTokenRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.fetchAccessToken(request), expectedError); - }); - }); - - describe('getBackup', () => { - it('invokes getBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.Backup() - ); - client.innerApiCalls.getBackup = stubSimpleCall(expectedResponse); - const [response] = await client.getBackup(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.Backup() - ); - client.innerApiCalls.getBackup = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getBackup( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackup|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackup with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getBackup = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.getBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackup with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getBackup(request), expectedError); - }); - }); - - describe('getBackupPlan', () => { - it('invokes getBackupPlan without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupPlan() - ); - client.innerApiCalls.getBackupPlan = stubSimpleCall(expectedResponse); - const [response] = await client.getBackupPlan(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlan without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupPlan() - ); - client.innerApiCalls.getBackupPlan = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getBackupPlan( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlan|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlan with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getBackupPlan = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getBackupPlan(request), expectedError); - const actualRequest = (client.innerApiCalls.getBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlan with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getBackupPlan(request), expectedError); - }); - }); - - describe('getBackupPlanAssociation', () => { - it('invokes getBackupPlanAssociation without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupPlanAssociation() - ); - client.innerApiCalls.getBackupPlanAssociation = stubSimpleCall(expectedResponse); - const [response] = await client.getBackupPlanAssociation(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlanAssociation without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupPlanAssociation() - ); - client.innerApiCalls.getBackupPlanAssociation = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getBackupPlanAssociation( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlanAssociation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlanAssociation with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getBackupPlanAssociation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getBackupPlanAssociation(request), expectedError); - const actualRequest = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlanAssociation with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getBackupPlanAssociation(request), expectedError); - }); - }); - - describe('createManagementServer', () => { - it('invokes createManagementServer without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createManagementServer = stubLongRunningCall(expectedResponse); - const [operation] = await client.createManagementServer(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createManagementServer without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createManagementServer = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createManagementServer( - 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.createManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createManagementServer with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createManagementServer = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createManagementServer(request), expectedError); - const actualRequest = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createManagementServer with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createManagementServer = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createManagementServer(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateManagementServerProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateManagementServerProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateManagementServerProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateManagementServerProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteManagementServer', () => { - it('invokes deleteManagementServer without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteManagementServer = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteManagementServer(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteManagementServer without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteManagementServer = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteManagementServer( - 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.deleteManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteManagementServer with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteManagementServer = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteManagementServer(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteManagementServer with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteManagementServer = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteManagementServer(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteManagementServerProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteManagementServerProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteManagementServerProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteManagementServerProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createBackupVault', () => { - it('invokes createBackupVault without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupVault = stubLongRunningCall(expectedResponse); - const [operation] = await client.createBackupVault(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupVault without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupVault = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createBackupVault( - 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.createBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupVault with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupVault = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createBackupVault(request), expectedError); - const actualRequest = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupVault with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupVault = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createBackupVault(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateBackupVaultProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupVaultProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateBackupVaultProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupVaultProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateBackupVault', () => { - it('invokes updateBackupVault without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); - request.backupVault.name = defaultValue1; - const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateBackupVault = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateBackupVault(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackupVault without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); - request.backupVault.name = defaultValue1; - const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateBackupVault = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateBackupVault( - 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.updateBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackupVault with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); - request.backupVault.name = defaultValue1; - const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateBackupVault = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateBackupVault(request), expectedError); - const actualRequest = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackupVault with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); - request.backupVault.name = defaultValue1; - const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateBackupVault = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateBackupVault(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateBackupVaultProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateBackupVaultProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateBackupVaultProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateBackupVaultProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteBackupVault', () => { - it('invokes deleteBackupVault without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupVault = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteBackupVault(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupVault without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupVault = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteBackupVault( - 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.deleteBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupVault with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupVault = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteBackupVault(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupVault with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupVault = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteBackupVault(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteBackupVaultProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupVaultProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteBackupVaultProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupVaultProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateDataSource', () => { - it('invokes updateDataSource without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() - ); - request.dataSource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); - request.dataSource.name = defaultValue1; - const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateDataSource = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateDataSource(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataSource without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() - ); - request.dataSource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); - request.dataSource.name = defaultValue1; - const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateDataSource = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateDataSource( - 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.updateDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataSource with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() - ); - request.dataSource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); - request.dataSource.name = defaultValue1; - const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDataSource = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateDataSource(request), expectedError); - const actualRequest = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataSource with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() - ); - request.dataSource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); - request.dataSource.name = defaultValue1; - const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDataSource = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateDataSource(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateDataSourceProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateDataSourceProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateDataSourceProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateDataSourceProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('removeDataSource', () => { - it('invokes removeDataSource without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RemoveDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.removeDataSource = stubLongRunningCall(expectedResponse); - const [operation] = await client.removeDataSource(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.removeDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.removeDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes removeDataSource without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RemoveDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.removeDataSource = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.removeDataSource( - 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.removeDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.removeDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes removeDataSource with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RemoveDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.removeDataSource = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.removeDataSource(request), expectedError); - const actualRequest = (client.innerApiCalls.removeDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.removeDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes removeDataSource with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RemoveDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.removeDataSource = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.removeDataSource(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.removeDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.removeDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkRemoveDataSourceProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkRemoveDataSourceProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkRemoveDataSourceProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkRemoveDataSourceProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('setInternalStatus', () => { - it('invokes setInternalStatus without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.SetInternalStatusRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.setInternalStatus = stubLongRunningCall(expectedResponse); - const [operation] = await client.setInternalStatus(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.setInternalStatus as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setInternalStatus as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setInternalStatus without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.SetInternalStatusRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.setInternalStatus = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.setInternalStatus( - 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.setInternalStatus as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setInternalStatus as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setInternalStatus with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.SetInternalStatusRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setInternalStatus = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.setInternalStatus(request), expectedError); - const actualRequest = (client.innerApiCalls.setInternalStatus as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setInternalStatus as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes setInternalStatus with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.SetInternalStatusRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.setInternalStatus = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.setInternalStatus(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.setInternalStatus as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.setInternalStatus as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkSetInternalStatusProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkSetInternalStatusProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkSetInternalStatusProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkSetInternalStatusProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('abandonBackup', () => { - it('invokes abandonBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.AbandonBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.AbandonBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.abandonBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.abandonBackup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.abandonBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.abandonBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes abandonBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.AbandonBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.AbandonBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.abandonBackup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.abandonBackup( - 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.abandonBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.abandonBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes abandonBackup with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.AbandonBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.AbandonBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.abandonBackup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.abandonBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.abandonBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.abandonBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes abandonBackup with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.AbandonBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.AbandonBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.abandonBackup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.abandonBackup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.abandonBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.abandonBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkAbandonBackupProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkAbandonBackupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkAbandonBackupProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkAbandonBackupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('finalizeBackup', () => { - it('invokes finalizeBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FinalizeBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.finalizeBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.finalizeBackup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.finalizeBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.finalizeBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes finalizeBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FinalizeBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.finalizeBackup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.finalizeBackup( - 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.finalizeBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.finalizeBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes finalizeBackup with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FinalizeBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.finalizeBackup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.finalizeBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.finalizeBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.finalizeBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes finalizeBackup with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FinalizeBackupRequest', ['dataSource']); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.finalizeBackup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.finalizeBackup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.finalizeBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.finalizeBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkFinalizeBackupProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkFinalizeBackupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkFinalizeBackupProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkFinalizeBackupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateBackup', () => { - it('invokes updateBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupRequest() - ); - request.backup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); - request.backup.name = defaultValue1; - const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateBackup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupRequest() - ); - request.backup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); - request.backup.name = defaultValue1; - const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateBackup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateBackup( - 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.updateBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackup with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupRequest() - ); - request.backup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); - request.backup.name = defaultValue1; - const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateBackup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackup with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupRequest() - ); - request.backup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); - request.backup.name = defaultValue1; - const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateBackup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateBackup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateBackupProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateBackupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateBackupProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateBackupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteBackup', () => { - it('invokes deleteBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteBackup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteBackup( - 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.deleteBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackup with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackup with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteBackup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteBackupProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteBackupProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('restoreBackup', () => { - it('invokes restoreBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RestoreBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.restoreBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.restoreBackup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes restoreBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RestoreBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.restoreBackup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.restoreBackup( - 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.restoreBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes restoreBackup with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RestoreBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.restoreBackup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.restoreBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes restoreBackup with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RestoreBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.restoreBackup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.restoreBackup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkRestoreBackupProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkRestoreBackupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkRestoreBackupProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkRestoreBackupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createBackupPlan', () => { - it('invokes createBackupPlan without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupPlan = stubLongRunningCall(expectedResponse); - const [operation] = await client.createBackupPlan(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPlan without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupPlan = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createBackupPlan( - 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.createBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPlan with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupPlan = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createBackupPlan(request), expectedError); - const actualRequest = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPlan with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupPlan = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createBackupPlan(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateBackupPlanProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupPlanProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateBackupPlanProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupPlanProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteBackupPlan', () => { - it('invokes deleteBackupPlan without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupPlan = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteBackupPlan(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPlan without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupPlan = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteBackupPlan( - 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.deleteBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPlan with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupPlan = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteBackupPlan(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPlan with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupPlan = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteBackupPlan(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteBackupPlanProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupPlanProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteBackupPlanProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupPlanProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createBackupPlanAssociation', () => { - it('invokes createBackupPlanAssociation without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall(expectedResponse); - const [operation] = await client.createBackupPlanAssociation(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPlanAssociation without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createBackupPlanAssociation( - 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.createBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPlanAssociation with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createBackupPlanAssociation(request), expectedError); - const actualRequest = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPlanAssociation with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createBackupPlanAssociation(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateBackupPlanAssociationProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupPlanAssociationProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateBackupPlanAssociationProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupPlanAssociationProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteBackupPlanAssociation', () => { - it('invokes deleteBackupPlanAssociation without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteBackupPlanAssociation(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPlanAssociation without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteBackupPlanAssociation( - 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.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPlanAssociation with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteBackupPlanAssociation(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPlanAssociation with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteBackupPlanAssociation(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteBackupPlanAssociationProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupPlanAssociationProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteBackupPlanAssociationProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupPlanAssociationProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('triggerBackup', () => { - it('invokes triggerBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.TriggerBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.triggerBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.triggerBackup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes triggerBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.TriggerBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.triggerBackup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.triggerBackup( - 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.triggerBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes triggerBackup with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.TriggerBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.triggerBackup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.triggerBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes triggerBackup with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.TriggerBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.triggerBackup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.triggerBackup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkTriggerBackupProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkTriggerBackupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkTriggerBackupProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkTriggerBackupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listManagementServers', () => { - it('invokes listManagementServers without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - ]; - client.innerApiCalls.listManagementServers = stubSimpleCall(expectedResponse); - const [response] = await client.listManagementServers(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listManagementServers as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listManagementServers as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listManagementServers without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - ]; - client.innerApiCalls.listManagementServers = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listManagementServers( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IManagementServer[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listManagementServers as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listManagementServers as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listManagementServers with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listManagementServers = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listManagementServers(request), expectedError); - const actualRequest = (client.innerApiCalls.listManagementServers as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listManagementServers as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listManagementServersStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - ]; - client.descriptors.page.listManagementServers.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listManagementServersStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.ManagementServer[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.ManagementServer) => { - 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.listManagementServers.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listManagementServers, request)); - assert( - (client.descriptors.page.listManagementServers.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listManagementServersStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listManagementServers.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listManagementServersStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.ManagementServer[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.ManagementServer) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listManagementServers.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listManagementServers, request)); - assert( - (client.descriptors.page.listManagementServers.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listManagementServers without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - ]; - client.descriptors.page.listManagementServers.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IManagementServer[] = []; - const iterable = client.listManagementServersAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listManagementServers with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listManagementServers.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listManagementServersAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IManagementServer[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listBackupVaults', () => { - it('invokes listBackupVaults without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.innerApiCalls.listBackupVaults = stubSimpleCall(expectedResponse); - const [response] = await client.listBackupVaults(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupVaults as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupVaults as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupVaults without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.innerApiCalls.listBackupVaults = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listBackupVaults( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupVault[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupVaults as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupVaults as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupVaults with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listBackupVaults = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listBackupVaults(request), expectedError); - const actualRequest = (client.innerApiCalls.listBackupVaults as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupVaults as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupVaultsStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.descriptors.page.listBackupVaults.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBackupVaultsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { - 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.listBackupVaults.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupVaults, request)); - assert( - (client.descriptors.page.listBackupVaults.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listBackupVaultsStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupVaults.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listBackupVaultsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listBackupVaults.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupVaults, request)); - assert( - (client.descriptors.page.listBackupVaults.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupVaults without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.descriptors.page.listBackupVaults.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; - const iterable = client.listBackupVaultsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupVaults with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupVaults.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listBackupVaultsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('fetchUsableBackupVaults', () => { - it('invokes fetchUsableBackupVaults without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.innerApiCalls.fetchUsableBackupVaults = stubSimpleCall(expectedResponse); - const [response] = await client.fetchUsableBackupVaults(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchUsableBackupVaults without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.innerApiCalls.fetchUsableBackupVaults = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.fetchUsableBackupVaults( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupVault[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchUsableBackupVaults with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.fetchUsableBackupVaults = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.fetchUsableBackupVaults(request), expectedError); - const actualRequest = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchUsableBackupVaultsStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.descriptors.page.fetchUsableBackupVaults.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.fetchUsableBackupVaultsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { - 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.fetchUsableBackupVaults.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.fetchUsableBackupVaults, request)); - assert( - (client.descriptors.page.fetchUsableBackupVaults.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes fetchUsableBackupVaultsStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.fetchUsableBackupVaults.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.fetchUsableBackupVaultsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.fetchUsableBackupVaults.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.fetchUsableBackupVaults, request)); - assert( - (client.descriptors.page.fetchUsableBackupVaults.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with fetchUsableBackupVaults without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.descriptors.page.fetchUsableBackupVaults.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; - const iterable = client.fetchUsableBackupVaultsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with fetchUsableBackupVaults with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.fetchUsableBackupVaults.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.fetchUsableBackupVaultsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listDataSources', () => { - it('invokes listDataSources without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - ]; - client.innerApiCalls.listDataSources = stubSimpleCall(expectedResponse); - const [response] = await client.listDataSources(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDataSources as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataSources as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataSources without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - ]; - client.innerApiCalls.listDataSources = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listDataSources( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IDataSource[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDataSources as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataSources as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataSources with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listDataSources = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listDataSources(request), expectedError); - const actualRequest = (client.innerApiCalls.listDataSources as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataSources as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataSourcesStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - ]; - client.descriptors.page.listDataSources.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDataSourcesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.DataSource[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.DataSource) => { - 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.listDataSources.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDataSources, request)); - assert( - (client.descriptors.page.listDataSources.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listDataSourcesStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDataSources.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDataSourcesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.DataSource[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.DataSource) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listDataSources.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDataSources, request)); - assert( - (client.descriptors.page.listDataSources.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDataSources without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - ]; - client.descriptors.page.listDataSources.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IDataSource[] = []; - const iterable = client.listDataSourcesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listDataSources.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDataSources.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDataSources with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDataSources.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDataSourcesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IDataSource[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listDataSources.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDataSources.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listBackups', () => { - it('invokes listBackups without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - ]; - client.innerApiCalls.listBackups = stubSimpleCall(expectedResponse); - const [response] = await client.listBackups(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackups as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackups as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackups without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - ]; - client.innerApiCalls.listBackups = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listBackups( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackup[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackups as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackups as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackups with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listBackups = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listBackups(request), expectedError); - const actualRequest = (client.innerApiCalls.listBackups as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackups as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupsStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - ]; - client.descriptors.page.listBackups.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBackupsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.Backup[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.Backup) => { - 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.listBackups.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackups, request)); - assert( - (client.descriptors.page.listBackups.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listBackupsStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackups.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listBackupsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.Backup[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.Backup) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listBackups.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackups, request)); - assert( - (client.descriptors.page.listBackups.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackups without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - ]; - client.descriptors.page.listBackups.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IBackup[] = []; - const iterable = client.listBackupsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listBackups.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackups.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackups with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackups.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listBackupsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IBackup[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listBackups.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackups.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listBackupPlans', () => { - it('invokes listBackupPlans without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - ]; - client.innerApiCalls.listBackupPlans = stubSimpleCall(expectedResponse); - const [response] = await client.listBackupPlans(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupPlans as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlans as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPlans without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - ]; - client.innerApiCalls.listBackupPlans = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listBackupPlans( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlan[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupPlans as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlans as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPlans with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listBackupPlans = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listBackupPlans(request), expectedError); - const actualRequest = (client.innerApiCalls.listBackupPlans as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlans as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPlansStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - ]; - client.descriptors.page.listBackupPlans.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBackupPlansStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupPlan[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlan) => { - 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.listBackupPlans.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupPlans, request)); - assert( - (client.descriptors.page.listBackupPlans.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listBackupPlansStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupPlans.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listBackupPlansStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupPlan[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlan) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listBackupPlans.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupPlans, request)); - assert( - (client.descriptors.page.listBackupPlans.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupPlans without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - ]; - client.descriptors.page.listBackupPlans.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IBackupPlan[] = []; - const iterable = client.listBackupPlansAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupPlans with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupPlans.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listBackupPlansAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IBackupPlan[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listBackupPlanAssociations', () => { - it('invokes listBackupPlanAssociations without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - ]; - client.innerApiCalls.listBackupPlanAssociations = stubSimpleCall(expectedResponse); - const [response] = await client.listBackupPlanAssociations(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPlanAssociations without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - ]; - client.innerApiCalls.listBackupPlanAssociations = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listBackupPlanAssociations( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPlanAssociations with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listBackupPlanAssociations = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listBackupPlanAssociations(request), expectedError); - const actualRequest = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPlanAssociationsStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - ]; - client.descriptors.page.listBackupPlanAssociations.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBackupPlanAssociationsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupPlanAssociation[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlanAssociation) => { - 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.listBackupPlanAssociations.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupPlanAssociations, request)); - assert( - (client.descriptors.page.listBackupPlanAssociations.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listBackupPlanAssociationsStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupPlanAssociations.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listBackupPlanAssociationsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupPlanAssociation[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlanAssociation) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listBackupPlanAssociations.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupPlanAssociations, request)); - assert( - (client.descriptors.page.listBackupPlanAssociations.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupPlanAssociations without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - ]; - client.descriptors.page.listBackupPlanAssociations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[] = []; - const iterable = client.listBackupPlanAssociationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listBackupPlanAssociations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupPlanAssociations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupPlanAssociations with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupPlanAssociations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listBackupPlanAssociationsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listBackupPlanAssociations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupPlanAssociations.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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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('backup', () => { - const fakePath = "/rendered/path/backup"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - backupvault: "backupvaultValue", - datasource: "datasourceValue", - backup: "backupValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.backupPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.backupPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('backupPath', () => { - const result = client.backupPath("projectValue", "locationValue", "backupvaultValue", "datasourceValue", "backupValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.backupPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromBackupName', () => { - const result = client.matchProjectFromBackupName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.backupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromBackupName', () => { - const result = client.matchLocationFromBackupName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.backupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupvaultFromBackupName', () => { - const result = client.matchBackupvaultFromBackupName(fakePath); - assert.strictEqual(result, "backupvaultValue"); - assert((client.pathTemplates.backupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDatasourceFromBackupName', () => { - const result = client.matchDatasourceFromBackupName(fakePath); - assert.strictEqual(result, "datasourceValue"); - assert((client.pathTemplates.backupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupFromBackupName', () => { - const result = client.matchBackupFromBackupName(fakePath); - assert.strictEqual(result, "backupValue"); - assert((client.pathTemplates.backupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('backupPlan', () => { - const fakePath = "/rendered/path/backupPlan"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - backup_plan: "backupPlanValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.backupPlanPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.backupPlanPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('backupPlanPath', () => { - const result = client.backupPlanPath("projectValue", "locationValue", "backupPlanValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.backupPlanPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromBackupPlanName', () => { - const result = client.matchProjectFromBackupPlanName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.backupPlanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromBackupPlanName', () => { - const result = client.matchLocationFromBackupPlanName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.backupPlanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupPlanFromBackupPlanName', () => { - const result = client.matchBackupPlanFromBackupPlanName(fakePath); - assert.strictEqual(result, "backupPlanValue"); - assert((client.pathTemplates.backupPlanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('backupPlanAssociation', () => { - const fakePath = "/rendered/path/backupPlanAssociation"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - backup_plan_association: "backupPlanAssociationValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.backupPlanAssociationPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.backupPlanAssociationPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('backupPlanAssociationPath', () => { - const result = client.backupPlanAssociationPath("projectValue", "locationValue", "backupPlanAssociationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.backupPlanAssociationPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromBackupPlanAssociationName', () => { - const result = client.matchProjectFromBackupPlanAssociationName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.backupPlanAssociationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromBackupPlanAssociationName', () => { - const result = client.matchLocationFromBackupPlanAssociationName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.backupPlanAssociationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupPlanAssociationFromBackupPlanAssociationName', () => { - const result = client.matchBackupPlanAssociationFromBackupPlanAssociationName(fakePath); - assert.strictEqual(result, "backupPlanAssociationValue"); - assert((client.pathTemplates.backupPlanAssociationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('backupVault', () => { - const fakePath = "/rendered/path/backupVault"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - backupvault: "backupvaultValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.backupVaultPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.backupVaultPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('backupVaultPath', () => { - const result = client.backupVaultPath("projectValue", "locationValue", "backupvaultValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.backupVaultPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromBackupVaultName', () => { - const result = client.matchProjectFromBackupVaultName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.backupVaultPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromBackupVaultName', () => { - const result = client.matchLocationFromBackupVaultName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.backupVaultPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupvaultFromBackupVaultName', () => { - const result = client.matchBackupvaultFromBackupVaultName(fakePath); - assert.strictEqual(result, "backupvaultValue"); - assert((client.pathTemplates.backupVaultPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataSource', () => { - const fakePath = "/rendered/path/dataSource"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - backupvault: "backupvaultValue", - datasource: "datasourceValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataSourcePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataSourcePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataSourcePath', () => { - const result = client.dataSourcePath("projectValue", "locationValue", "backupvaultValue", "datasourceValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataSourcePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataSourceName', () => { - const result = client.matchProjectFromDataSourceName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataSourceName', () => { - const result = client.matchLocationFromDataSourceName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupvaultFromDataSourceName', () => { - const result = client.matchBackupvaultFromDataSourceName(fakePath); - assert.strictEqual(result, "backupvaultValue"); - assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDatasourceFromDataSourceName', () => { - const result = client.matchDatasourceFromDataSourceName(fakePath); - assert.strictEqual(result, "datasourceValue"); - assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - 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('managementServer', () => { - const fakePath = "/rendered/path/managementServer"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - managementserver: "managementserverValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.managementServerPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.managementServerPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('managementServerPath', () => { - const result = client.managementServerPath("projectValue", "locationValue", "managementserverValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.managementServerPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromManagementServerName', () => { - const result = client.matchProjectFromManagementServerName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.managementServerPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromManagementServerName', () => { - const result = client.matchLocationFromManagementServerName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.managementServerPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchManagementserverFromManagementServerName', () => { - const result = client.matchManagementserverFromManagementServerName(fakePath); - assert.strictEqual(result, "managementserverValue"); - assert((client.pathTemplates.managementServerPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('project', () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - 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)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/tsconfig.json b/owl-bot-staging/google-cloud-backupdr/v1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/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-backupdr/v1/webpack.config.js b/owl-bot-staging/google-cloud-backupdr/v1/webpack.config.js deleted file mode 100644 index 72a35713b8c..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/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: 'BackupDR', - filename: './backup-d-r.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-backupdr/README.md b/packages/google-cloud-backupdr/README.md index 3b6f181ce15..ece189b44ea 100644 --- a/packages/google-cloud-backupdr/README.md +++ b/packages/google-cloud-backupdr/README.md @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Backup and DR Service API API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Set up authentication][auth] so you can access the API from your local workstation. ### Installing the client library @@ -120,10 +120,40 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Backup_d_r.abandon_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.abandon_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.abandon_backup.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.create_backup_plan | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.create_backup_plan_association | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan_association.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan_association.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.create_backup_vault | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_vault.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_vault.js,packages/google-cloud-backupdr/samples/README.md) | | Backup_d_r.create_management_server | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_management_server.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_management_server.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.delete_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.delete_backup_plan | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.delete_backup_plan_association | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan_association.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan_association.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.delete_backup_vault | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_vault.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_vault.js,packages/google-cloud-backupdr/samples/README.md) | | Backup_d_r.delete_management_server | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_management_server.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_management_server.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.fetch_access_token | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_access_token.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_access_token.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.fetch_usable_backup_vaults | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.finalize_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.finalize_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.finalize_backup.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.get_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.get_backup_plan | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.get_backup_plan_association | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan_association.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan_association.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.get_backup_vault | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_vault.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_vault.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.get_data_source | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_data_source.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_data_source.js,packages/google-cloud-backupdr/samples/README.md) | | Backup_d_r.get_management_server | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_management_server.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_management_server.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.initiate_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.initiate_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.initiate_backup.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.list_backup_plan_associations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plan_associations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plan_associations.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.list_backup_plans | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plans.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plans.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.list_backup_vaults | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_vaults.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_vaults.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.list_backups | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backups.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backups.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.list_data_sources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_sources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_sources.js,packages/google-cloud-backupdr/samples/README.md) | | Backup_d_r.list_management_servers | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_management_servers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_management_servers.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.remove_data_source | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.remove_data_source.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.remove_data_source.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.restore_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.set_internal_status | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.set_internal_status.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.set_internal_status.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.test_iam_permissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.test_iam_permissions.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.trigger_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.trigger_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.trigger_backup.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.update_backup | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.update_backup_vault | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup_vault.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup_vault.js,packages/google-cloud-backupdr/samples/README.md) | +| Backup_d_r.update_data_source | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_data_source.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_data_source.js,packages/google-cloud-backupdr/samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/quickstart.js,packages/google-cloud-backupdr/samples/README.md) | @@ -194,4 +224,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=backupdr.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupdr.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupdr.proto index 42b798458b1..eff6b77e762 100644 --- a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupdr.proto +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupdr.proto @@ -19,7 +19,12 @@ package google.cloud.backupdr.v1; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; import "google/api/resource.proto"; +import "google/cloud/backupdr/v1/backupplan.proto"; +import "google/cloud/backupdr/v1/backupplanassociation.proto"; +import "google/cloud/backupdr/v1/backupvault.proto"; +import "google/iam/v1/iam_policy.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; @@ -84,6 +89,360 @@ service BackupDR { metadata_type: "OperationMetadata" }; } + + // Creates a new BackupVault in a given project and location. + rpc CreateBackupVault(CreateBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/backupVaults" + body: "backup_vault" + }; + option (google.api.method_signature) = + "parent,backup_vault,backup_vault_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupVault" + metadata_type: "OperationMetadata" + }; + } + + // Lists BackupVaults in a given project and location. + rpc ListBackupVaults(ListBackupVaultsRequest) + returns (ListBackupVaultsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupVaults" + }; + option (google.api.method_signature) = "parent"; + } + + // FetchUsableBackupVaults lists usable BackupVaults in a given project and + // location. Usable BackupVault are the ones that user has + // backupdr.backupVaults.get permission. + rpc FetchUsableBackupVaults(FetchUsableBackupVaultsRequest) + returns (FetchUsableBackupVaultsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a BackupVault. + rpc GetBackupVault(GetBackupVaultRequest) returns (BackupVault) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupVaults/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings of a BackupVault. + rpc UpdateBackupVault(UpdateBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}" + body: "backup_vault" + }; + option (google.api.method_signature) = "backup_vault,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "BackupVault" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a BackupVault. + rpc DeleteBackupVault(DeleteBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupVaults/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Returns the caller's permissions on a BackupVault resource. + // + // A caller is not required to have Google IAM permission to make this + // request. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v1/{resource=projects/*/locations/*/backupVaults/*}:testIamPermissions" + body: "*" + }; + option (google.api.method_signature) = "resource, permissions"; + } + + // Lists DataSources in a given project and location. + rpc ListDataSources(ListDataSourcesRequest) + returns (ListDataSourcesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a DataSource. + rpc GetDataSource(GetDataSourceRequest) returns (DataSource) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings of a DataSource. + rpc UpdateDataSource(UpdateDataSourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}" + body: "data_source" + }; + option (google.api.method_signature) = "data_source,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DataSource" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a DataSource. This is a custom method instead of a standard delete + // method because external clients will not delete DataSources except for + // BackupDR backup appliances. + rpc RemoveDataSource(RemoveDataSourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:remove" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Sets the internal status of a DataSource. + rpc SetInternalStatus(SetInternalStatusRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:setInternalStatus" + body: "*" + }; + option (google.api.method_signature) = "data_source"; + option (google.longrunning.operation_info) = { + response_type: "SetInternalStatusResponse" + metadata_type: "OperationMetadata" + }; + } + + // Internal only. + // Initiates a backup. + rpc InitiateBackup(InitiateBackupRequest) returns (InitiateBackupResponse) { + option (google.api.http) = { + post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:initiateBackup" + body: "*" + }; + option (google.api.method_signature) = "data_source"; + } + + // Internal only. + // Abandons a backup. + rpc AbandonBackup(AbandonBackupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:abandonBackup" + body: "*" + }; + option (google.api.method_signature) = "data_source"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Internal only. + // Finalize a backup that was started by a call to InitiateBackup. + rpc FinalizeBackup(FinalizeBackupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:finalizeBackup" + body: "*" + }; + option (google.api.method_signature) = "data_source"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Internal only. + // Fetch access token for a given data source. + rpc FetchAccessToken(FetchAccessTokenRequest) + returns (FetchAccessTokenResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Backups in a given project and location. + rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a Backup. + rpc GetBackup(GetBackupRequest) returns (Backup) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings of a Backup. + rpc UpdateBackup(UpdateBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + body: "backup" + }; + option (google.api.method_signature) = "backup,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a Backup. + rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Restore from a Backup + rpc RestoreBackup(RestoreBackupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "RestoreBackupResponse" + metadata_type: "OperationMetadata" + }; + } + + // Create a BackupPlan + rpc CreateBackupPlan(CreateBackupPlanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/backupPlans" + body: "backup_plan" + }; + option (google.api.method_signature) = "parent,backup_plan,backup_plan_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlan" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single BackupPlan. + rpc GetBackupPlan(GetBackupPlanRequest) returns (BackupPlan) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupPlans/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists BackupPlans in a given project and location. + rpc ListBackupPlans(ListBackupPlansRequest) + returns (ListBackupPlansResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupPlans" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a single BackupPlan. + rpc DeleteBackupPlan(DeleteBackupPlanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupPlans/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Create a BackupPlanAssociation + rpc CreateBackupPlanAssociation(CreateBackupPlanAssociationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" + body: "backup_plan_association" + }; + option (google.api.method_signature) = + "parent,backup_plan_association,backup_plan_association_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlanAssociation" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single BackupPlanAssociation. + rpc GetBackupPlanAssociation(GetBackupPlanAssociationRequest) + returns (BackupPlanAssociation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists BackupPlanAssociations in a given project and location. + rpc ListBackupPlanAssociations(ListBackupPlanAssociationsRequest) + returns (ListBackupPlanAssociationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a single BackupPlanAssociation. + rpc DeleteBackupPlanAssociation(DeleteBackupPlanAssociationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Triggers a new Backup. + rpc TriggerBackup(TriggerBackupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup" + body: "*" + }; + option (google.api.method_signature) = "name,rule_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlanAssociation" + metadata_type: "OperationMetadata" + }; + } } // Network configuration for ManagementServer instance. @@ -236,7 +595,7 @@ message ManagementServer { // Output only. The OAuth 2.0 client id is required to make API calls to the // BackupDR instance API of this ManagementServer. This is the value that - // should be provided in the ‘aud’ field of the OIDC ID Token (see openid + // should be provided in the 'aud' field of the OIDC ID Token (see openid // specification // https://openid.net/specs/openid-connect-core-1_0.html#IDToken). string oauth2_client_id = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -261,10 +620,11 @@ message ManagementServer { // Request message for listing management servers. message ListManagementServersRequest { // Required. The project and location for which to retrieve management servers - // information, in the format `projects/{project_id}/locations/{location}`. In - // Cloud BackupDR, locations map to GCP regions, for example **us-central1**. - // To retrieve management servers for all locations, use "-" for the - // `{location}` value. + // information, in the format 'projects/{project_id}/locations/{location}'. In + // Cloud BackupDR, locations map to Google Cloud regions, for example + // **us-central1**. To retrieve management servers for all locations, use "-" + // for the + // '{location}' value. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -291,7 +651,7 @@ message ListManagementServersResponse { // The list of ManagementServer instances in the project for the specified // location. // - // If the `{location}` value in the request is "-", the response contains a + // If the '{location}' value in the request is "-", the response contains a // list of instances from all locations. In case any location is unreachable, // the response will only return management servers in reachable locations and // the 'unreachable' field will be populated with a list of unreachable @@ -308,7 +668,7 @@ message ListManagementServersResponse { // Request message for getting a management server instance. message GetManagementServerRequest { // Required. Name of the management server resource name, in the format - // `projects/{project_id}/locations/{location}/managementServers/{resource_name}` + // 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -320,8 +680,8 @@ message GetManagementServerRequest { // Request message for creating a management server instance. message CreateManagementServerRequest { // Required. The management server project and location in the format - // `projects/{project_id}/locations/{location}`. In Cloud Backup and DR - // locations map to GCP regions, for example **us-central1**. + // 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR + // locations map to Google Cloud regions, for example **us-central1**. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -403,7 +763,7 @@ message OperationMetadata { // 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`. + // 'Code.CANCELLED'. bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. API version used to start the operation. diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplan.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupplan.proto similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplan.proto rename to packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupplan.proto diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplanassociation.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupplanassociation.proto similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplanassociation.proto rename to packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupplanassociation.proto diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault.proto similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault.proto rename to packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault.proto diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_ba.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault_ba.proto similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_ba.proto rename to packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault_ba.proto diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_gce.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault_gce.proto similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_gce.proto rename to packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault_gce.proto diff --git a/packages/google-cloud-backupdr/protos/protos.d.ts b/packages/google-cloud-backupdr/protos/protos.d.ts index 5506c3035be..22fd9adfdfd 100644 --- a/packages/google-cloud-backupdr/protos/protos.d.ts +++ b/packages/google-cloud-backupdr/protos/protos.d.ts @@ -101,4884 +101,18333 @@ export namespace google { * @returns Promise */ public deleteManagementServer(request: google.cloud.backupdr.v1.IDeleteManagementServerRequest): Promise; - } - - namespace BackupDR { /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listManagementServers}. - * @param error Error, if any - * @param [response] ListManagementServersResponse + * Calls CreateBackupVault. + * @param request CreateBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - type ListManagementServersCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListManagementServersResponse) => void; + public createBackupVault(request: google.cloud.backupdr.v1.ICreateBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupVaultCallback): void; /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getManagementServer}. - * @param error Error, if any - * @param [response] ManagementServer + * Calls CreateBackupVault. + * @param request CreateBackupVaultRequest message or plain object + * @returns Promise */ - type GetManagementServerCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ManagementServer) => void; + public createBackupVault(request: google.cloud.backupdr.v1.ICreateBackupVaultRequest): Promise; /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createManagementServer}. - * @param error Error, if any - * @param [response] Operation + * Calls ListBackupVaults. + * @param request ListBackupVaultsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupVaultsResponse */ - type CreateManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public listBackupVaults(request: google.cloud.backupdr.v1.IListBackupVaultsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupVaultsCallback): void; /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteManagementServer}. - * @param error Error, if any - * @param [response] Operation + * Calls ListBackupVaults. + * @param request ListBackupVaultsRequest message or plain object + * @returns Promise */ - type DeleteManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of a NetworkConfig. */ - interface INetworkConfig { - - /** NetworkConfig network */ - network?: (string|null); - - /** NetworkConfig peeringMode */ - peeringMode?: (google.cloud.backupdr.v1.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1.NetworkConfig.PeeringMode|null); - } - - /** Represents a NetworkConfig. */ - class NetworkConfig implements INetworkConfig { + public listBackupVaults(request: google.cloud.backupdr.v1.IListBackupVaultsRequest): Promise; /** - * Constructs a new NetworkConfig. - * @param [properties] Properties to set + * Calls FetchUsableBackupVaults. + * @param request FetchUsableBackupVaultsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchUsableBackupVaultsResponse */ - constructor(properties?: google.cloud.backupdr.v1.INetworkConfig); + public fetchUsableBackupVaults(request: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, callback: google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaultsCallback): void; - /** NetworkConfig network. */ - public network: string; + /** + * Calls FetchUsableBackupVaults. + * @param request FetchUsableBackupVaultsRequest message or plain object + * @returns Promise + */ + public fetchUsableBackupVaults(request: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest): Promise; - /** NetworkConfig peeringMode. */ - public peeringMode: (google.cloud.backupdr.v1.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1.NetworkConfig.PeeringMode); + /** + * Calls GetBackupVault. + * @param request GetBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BackupVault + */ + public getBackupVault(request: google.cloud.backupdr.v1.IGetBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupVaultCallback): void; /** - * Creates a new NetworkConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkConfig instance + * Calls GetBackupVault. + * @param request GetBackupVaultRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.backupdr.v1.INetworkConfig): google.cloud.backupdr.v1.NetworkConfig; + public getBackupVault(request: google.cloud.backupdr.v1.IGetBackupVaultRequest): Promise; /** - * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @param message NetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateBackupVault. + * @param request UpdateBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static encode(message: google.cloud.backupdr.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public updateBackupVault(request: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateBackupVaultCallback): void; /** - * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @param message NetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls UpdateBackupVault. + * @param request UpdateBackupVaultRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public updateBackupVault(request: google.cloud.backupdr.v1.IUpdateBackupVaultRequest): Promise; /** - * Decodes a NetworkConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteBackupVault. + * @param request DeleteBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkConfig; + public deleteBackupVault(request: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupVaultCallback): void; /** - * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls DeleteBackupVault. + * @param request DeleteBackupVaultRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkConfig; + public deleteBackupVault(request: google.cloud.backupdr.v1.IDeleteBackupVaultRequest): Promise; /** - * Verifies a NetworkConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.backupdr.v1.BackupDR.TestIamPermissionsCallback): void; /** - * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkConfig + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkConfig; + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; /** - * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. - * @param message NetworkConfig - * @param [options] Conversion options - * @returns Plain object + * Calls ListDataSources. + * @param request ListDataSourcesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataSourcesResponse */ - public static toObject(message: google.cloud.backupdr.v1.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public listDataSources(request: google.cloud.backupdr.v1.IListDataSourcesRequest, callback: google.cloud.backupdr.v1.BackupDR.ListDataSourcesCallback): void; /** - * Converts this NetworkConfig to JSON. - * @returns JSON object + * Calls ListDataSources. + * @param request ListDataSourcesRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public listDataSources(request: google.cloud.backupdr.v1.IListDataSourcesRequest): Promise; /** - * Gets the default type url for NetworkConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls GetDataSource. + * @param request GetDataSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataSource */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + public getDataSource(request: google.cloud.backupdr.v1.IGetDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.GetDataSourceCallback): void; - namespace NetworkConfig { + /** + * Calls GetDataSource. + * @param request GetDataSourceRequest message or plain object + * @returns Promise + */ + public getDataSource(request: google.cloud.backupdr.v1.IGetDataSourceRequest): Promise; - /** PeeringMode enum. */ - enum PeeringMode { - PEERING_MODE_UNSPECIFIED = 0, - PRIVATE_SERVICE_ACCESS = 1 - } - } + /** + * Calls UpdateDataSource. + * @param request UpdateDataSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDataSource(request: google.cloud.backupdr.v1.IUpdateDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateDataSourceCallback): void; - /** Properties of a ManagementURI. */ - interface IManagementURI { + /** + * Calls UpdateDataSource. + * @param request UpdateDataSourceRequest message or plain object + * @returns Promise + */ + public updateDataSource(request: google.cloud.backupdr.v1.IUpdateDataSourceRequest): Promise; - /** ManagementURI webUi */ - webUi?: (string|null); + /** + * Calls RemoveDataSource. + * @param request RemoveDataSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public removeDataSource(request: google.cloud.backupdr.v1.IRemoveDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.RemoveDataSourceCallback): void; - /** ManagementURI api */ - api?: (string|null); - } + /** + * Calls RemoveDataSource. + * @param request RemoveDataSourceRequest message or plain object + * @returns Promise + */ + public removeDataSource(request: google.cloud.backupdr.v1.IRemoveDataSourceRequest): Promise; - /** Represents a ManagementURI. */ - class ManagementURI implements IManagementURI { + /** + * Calls SetInternalStatus. + * @param request SetInternalStatusRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public setInternalStatus(request: google.cloud.backupdr.v1.ISetInternalStatusRequest, callback: google.cloud.backupdr.v1.BackupDR.SetInternalStatusCallback): void; /** - * Constructs a new ManagementURI. - * @param [properties] Properties to set + * Calls SetInternalStatus. + * @param request SetInternalStatusRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.backupdr.v1.IManagementURI); + public setInternalStatus(request: google.cloud.backupdr.v1.ISetInternalStatusRequest): Promise; - /** ManagementURI webUi. */ - public webUi: string; + /** + * Calls InitiateBackup. + * @param request InitiateBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and InitiateBackupResponse + */ + public initiateBackup(request: google.cloud.backupdr.v1.IInitiateBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.InitiateBackupCallback): void; - /** ManagementURI api. */ - public api: string; + /** + * Calls InitiateBackup. + * @param request InitiateBackupRequest message or plain object + * @returns Promise + */ + public initiateBackup(request: google.cloud.backupdr.v1.IInitiateBackupRequest): Promise; /** - * Creates a new ManagementURI instance using the specified properties. - * @param [properties] Properties to set - * @returns ManagementURI instance + * Calls AbandonBackup. + * @param request AbandonBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static create(properties?: google.cloud.backupdr.v1.IManagementURI): google.cloud.backupdr.v1.ManagementURI; + public abandonBackup(request: google.cloud.backupdr.v1.IAbandonBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.AbandonBackupCallback): void; /** - * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @param message ManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls AbandonBackup. + * @param request AbandonBackupRequest message or plain object + * @returns Promise */ - public static encode(message: google.cloud.backupdr.v1.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + public abandonBackup(request: google.cloud.backupdr.v1.IAbandonBackupRequest): Promise; /** - * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @param message ManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls FinalizeBackup. + * @param request FinalizeBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + public finalizeBackup(request: google.cloud.backupdr.v1.IFinalizeBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.FinalizeBackupCallback): void; /** - * Decodes a ManagementURI message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls FinalizeBackup. + * @param request FinalizeBackupRequest message or plain object + * @returns Promise */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ManagementURI; + public finalizeBackup(request: google.cloud.backupdr.v1.IFinalizeBackupRequest): Promise; /** - * Decodes a ManagementURI message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls FetchAccessToken. + * @param request FetchAccessTokenRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchAccessTokenResponse */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ManagementURI; + public fetchAccessToken(request: google.cloud.backupdr.v1.IFetchAccessTokenRequest, callback: google.cloud.backupdr.v1.BackupDR.FetchAccessTokenCallback): void; /** - * Verifies a ManagementURI message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls FetchAccessToken. + * @param request FetchAccessTokenRequest message or plain object + * @returns Promise */ - public static verify(message: { [k: string]: any }): (string|null); + public fetchAccessToken(request: google.cloud.backupdr.v1.IFetchAccessTokenRequest): Promise; /** - * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ManagementURI + * Calls ListBackups. + * @param request ListBackupsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ManagementURI; + public listBackups(request: google.cloud.backupdr.v1.IListBackupsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupsCallback): void; /** - * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. - * @param message ManagementURI - * @param [options] Conversion options - * @returns Plain object + * Calls ListBackups. + * @param request ListBackupsRequest message or plain object + * @returns Promise */ - public static toObject(message: google.cloud.backupdr.v1.ManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public listBackups(request: google.cloud.backupdr.v1.IListBackupsRequest): Promise; /** - * Converts this ManagementURI to JSON. - * @returns JSON object + * Calls GetBackup. + * @param request GetBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Backup */ - public toJSON(): { [k: string]: any }; + public getBackup(request: google.cloud.backupdr.v1.IGetBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupCallback): void; /** - * Gets the default type url for ManagementURI - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls GetBackup. + * @param request GetBackupRequest message or plain object + * @returns Promise */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + public getBackup(request: google.cloud.backupdr.v1.IGetBackupRequest): Promise; - /** Properties of a WorkforceIdentityBasedManagementURI. */ - interface IWorkforceIdentityBasedManagementURI { + /** + * Calls UpdateBackup. + * @param request UpdateBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateBackup(request: google.cloud.backupdr.v1.IUpdateBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateBackupCallback): void; - /** WorkforceIdentityBasedManagementURI firstPartyManagementUri */ - firstPartyManagementUri?: (string|null); + /** + * Calls UpdateBackup. + * @param request UpdateBackupRequest message or plain object + * @returns Promise + */ + public updateBackup(request: google.cloud.backupdr.v1.IUpdateBackupRequest): Promise; - /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri */ - thirdPartyManagementUri?: (string|null); - } + /** + * Calls DeleteBackup. + * @param request DeleteBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteBackup(request: google.cloud.backupdr.v1.IDeleteBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupCallback): void; - /** Represents a WorkforceIdentityBasedManagementURI. */ - class WorkforceIdentityBasedManagementURI implements IWorkforceIdentityBasedManagementURI { + /** + * Calls DeleteBackup. + * @param request DeleteBackupRequest message or plain object + * @returns Promise + */ + public deleteBackup(request: google.cloud.backupdr.v1.IDeleteBackupRequest): Promise; /** - * Constructs a new WorkforceIdentityBasedManagementURI. - * @param [properties] Properties to set + * Calls RestoreBackup. + * @param request RestoreBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - constructor(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI); + public restoreBackup(request: google.cloud.backupdr.v1.IRestoreBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.RestoreBackupCallback): void; - /** WorkforceIdentityBasedManagementURI firstPartyManagementUri. */ - public firstPartyManagementUri: string; + /** + * Calls RestoreBackup. + * @param request RestoreBackupRequest message or plain object + * @returns Promise + */ + public restoreBackup(request: google.cloud.backupdr.v1.IRestoreBackupRequest): Promise; - /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri. */ - public thirdPartyManagementUri: string; + /** + * Calls CreateBackupPlan. + * @param request CreateBackupPlanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createBackupPlan(request: google.cloud.backupdr.v1.ICreateBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupPlanCallback): void; /** - * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkforceIdentityBasedManagementURI instance + * Calls CreateBackupPlan. + * @param request CreateBackupPlanRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; + public createBackupPlan(request: google.cloud.backupdr.v1.ICreateBackupPlanRequest): Promise; /** - * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. - * @param message WorkforceIdentityBasedManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetBackupPlan. + * @param request GetBackupPlanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BackupPlan */ - public static encode(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + public getBackupPlan(request: google.cloud.backupdr.v1.IGetBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupPlanCallback): void; /** - * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. - * @param message WorkforceIdentityBasedManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls GetBackupPlan. + * @param request GetBackupPlanRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + public getBackupPlan(request: google.cloud.backupdr.v1.IGetBackupPlanRequest): Promise; /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkforceIdentityBasedManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListBackupPlans. + * @param request ListBackupPlansRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupPlansResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; + public listBackupPlans(request: google.cloud.backupdr.v1.IListBackupPlansRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupPlansCallback): void; /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkforceIdentityBasedManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListBackupPlans. + * @param request ListBackupPlansRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; + public listBackupPlans(request: google.cloud.backupdr.v1.IListBackupPlansRequest): Promise; /** - * Verifies a WorkforceIdentityBasedManagementURI message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Calls DeleteBackupPlan. + * @param request DeleteBackupPlanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static verify(message: { [k: string]: any }): (string|null); + public deleteBackupPlan(request: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanCallback): void; /** - * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkforceIdentityBasedManagementURI + * Calls DeleteBackupPlan. + * @param request DeleteBackupPlanRequest message or plain object + * @returns Promise */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; + public deleteBackupPlan(request: google.cloud.backupdr.v1.IDeleteBackupPlanRequest): Promise; /** - * Creates a plain object from a WorkforceIdentityBasedManagementURI message. Also converts values to other types if specified. - * @param message WorkforceIdentityBasedManagementURI - * @param [options] Conversion options - * @returns Plain object + * Calls CreateBackupPlanAssociation. + * @param request CreateBackupPlanAssociationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation */ - public static toObject(message: google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public createBackupPlanAssociation(request: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociationCallback): void; /** - * Converts this WorkforceIdentityBasedManagementURI to JSON. - * @returns JSON object + * Calls CreateBackupPlanAssociation. + * @param request CreateBackupPlanAssociationRequest message or plain object + * @returns Promise */ - public toJSON(): { [k: string]: any }; + public createBackupPlanAssociation(request: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest): Promise; /** - * Gets the default type url for WorkforceIdentityBasedManagementURI - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Calls GetBackupPlanAssociation. + * @param request GetBackupPlanAssociationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BackupPlanAssociation */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + public getBackupPlanAssociation(request: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociationCallback): void; - /** Properties of a WorkforceIdentityBasedOAuth2ClientID. */ - interface IWorkforceIdentityBasedOAuth2ClientID { + /** + * Calls GetBackupPlanAssociation. + * @param request GetBackupPlanAssociationRequest message or plain object + * @returns Promise + */ + public getBackupPlanAssociation(request: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest): Promise; - /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId */ - firstPartyOauth2ClientId?: (string|null); + /** + * Calls ListBackupPlanAssociations. + * @param request ListBackupPlanAssociationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupPlanAssociationsResponse + */ + public listBackupPlanAssociations(request: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociationsCallback): void; - /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId */ - thirdPartyOauth2ClientId?: (string|null); - } + /** + * Calls ListBackupPlanAssociations. + * @param request ListBackupPlanAssociationsRequest message or plain object + * @returns Promise + */ + public listBackupPlanAssociations(request: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest): Promise; - /** Represents a WorkforceIdentityBasedOAuth2ClientID. */ - class WorkforceIdentityBasedOAuth2ClientID implements IWorkforceIdentityBasedOAuth2ClientID { + /** + * Calls DeleteBackupPlanAssociation. + * @param request DeleteBackupPlanAssociationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteBackupPlanAssociation(request: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociationCallback): void; /** - * Constructs a new WorkforceIdentityBasedOAuth2ClientID. - * @param [properties] Properties to set + * Calls DeleteBackupPlanAssociation. + * @param request DeleteBackupPlanAssociationRequest message or plain object + * @returns Promise */ - constructor(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID); + public deleteBackupPlanAssociation(request: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest): Promise; - /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId. */ - public firstPartyOauth2ClientId: string; + /** + * Calls TriggerBackup. + * @param request TriggerBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public triggerBackup(request: google.cloud.backupdr.v1.ITriggerBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.TriggerBackupCallback): void; - /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId. */ - public thirdPartyOauth2ClientId: string; + /** + * Calls TriggerBackup. + * @param request TriggerBackupRequest message or plain object + * @returns Promise + */ + public triggerBackup(request: google.cloud.backupdr.v1.ITriggerBackupRequest): Promise; + } + + namespace BackupDR { /** - * Creates a new WorkforceIdentityBasedOAuth2ClientID instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkforceIdentityBasedOAuth2ClientID instance + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listManagementServers}. + * @param error Error, if any + * @param [response] ListManagementServersResponse */ - public static create(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; + type ListManagementServersCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListManagementServersResponse) => void; /** - * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. - * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getManagementServer}. + * @param error Error, if any + * @param [response] ManagementServer */ - public static encode(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; + type GetManagementServerCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ManagementServer) => void; /** - * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. - * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createManagementServer}. + * @param error Error, if any + * @param [response] Operation */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; + type CreateManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkforceIdentityBasedOAuth2ClientID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteManagementServer}. + * @param error Error, if any + * @param [response] Operation */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; + type DeleteManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkforceIdentityBasedOAuth2ClientID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupVault}. + * @param error Error, if any + * @param [response] Operation */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; + type CreateBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Verifies a WorkforceIdentityBasedOAuth2ClientID message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupVaults}. + * @param error Error, if any + * @param [response] ListBackupVaultsResponse */ - public static verify(message: { [k: string]: any }): (string|null); + type ListBackupVaultsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupVaultsResponse) => void; /** - * Creates a WorkforceIdentityBasedOAuth2ClientID message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkforceIdentityBasedOAuth2ClientID + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchUsableBackupVaults}. + * @param error Error, if any + * @param [response] FetchUsableBackupVaultsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; + type FetchUsableBackupVaultsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse) => void; /** - * Creates a plain object from a WorkforceIdentityBasedOAuth2ClientID message. Also converts values to other types if specified. - * @param message WorkforceIdentityBasedOAuth2ClientID - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupVault}. + * @param error Error, if any + * @param [response] BackupVault */ - public static toObject(message: google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type GetBackupVaultCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupVault) => void; /** - * Converts this WorkforceIdentityBasedOAuth2ClientID to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackupVault}. + * @param error Error, if any + * @param [response] Operation */ - public toJSON(): { [k: string]: any }; + type UpdateBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Gets the default type url for WorkforceIdentityBasedOAuth2ClientID - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupVault}. + * @param error Error, if any + * @param [response] Operation */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + type DeleteBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** Properties of a ManagementServer. */ - interface IManagementServer { + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; - /** ManagementServer name */ - name?: (string|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listDataSources}. + * @param error Error, if any + * @param [response] ListDataSourcesResponse + */ + type ListDataSourcesCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListDataSourcesResponse) => void; - /** ManagementServer description */ - description?: (string|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getDataSource}. + * @param error Error, if any + * @param [response] DataSource + */ + type GetDataSourceCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.DataSource) => void; - /** ManagementServer labels */ - labels?: ({ [k: string]: string }|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateDataSource}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDataSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|removeDataSource}. + * @param error Error, if any + * @param [response] Operation + */ + type RemoveDataSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|setInternalStatus}. + * @param error Error, if any + * @param [response] Operation + */ + type SetInternalStatusCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer type */ - type?: (google.cloud.backupdr.v1.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceType|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|initiateBackup}. + * @param error Error, if any + * @param [response] InitiateBackupResponse + */ + type InitiateBackupCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.InitiateBackupResponse) => void; - /** ManagementServer managementUri */ - managementUri?: (google.cloud.backupdr.v1.IManagementURI|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|abandonBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type AbandonBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer workforceIdentityBasedManagementUri */ - workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|finalizeBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type FinalizeBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer state */ - state?: (google.cloud.backupdr.v1.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceState|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchAccessToken}. + * @param error Error, if any + * @param [response] FetchAccessTokenResponse + */ + type FetchAccessTokenCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.FetchAccessTokenResponse) => void; - /** ManagementServer networks */ - networks?: (google.cloud.backupdr.v1.INetworkConfig[]|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackups}. + * @param error Error, if any + * @param [response] ListBackupsResponse + */ + type ListBackupsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupsResponse) => void; - /** ManagementServer etag */ - etag?: (string|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackup}. + * @param error Error, if any + * @param [response] Backup + */ + type GetBackupCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.Backup) => void; - /** ManagementServer oauth2ClientId */ - oauth2ClientId?: (string|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer workforceIdentityBasedOauth2ClientId */ - workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer baProxyUri */ - baProxyUri?: (string[]|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|restoreBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type RestoreBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer satisfiesPzs */ - satisfiesPzs?: (google.protobuf.IBoolValue|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlan}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBackupPlanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer satisfiesPzi */ - satisfiesPzi?: (boolean|null); - } + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlan}. + * @param error Error, if any + * @param [response] BackupPlan + */ + type GetBackupPlanCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupPlan) => void; - /** Represents a ManagementServer. */ - class ManagementServer implements IManagementServer { + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlans}. + * @param error Error, if any + * @param [response] ListBackupPlansResponse + */ + type ListBackupPlansCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupPlansResponse) => void; /** - * Constructs a new ManagementServer. - * @param [properties] Properties to set + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlan}. + * @param error Error, if any + * @param [response] Operation */ - constructor(properties?: google.cloud.backupdr.v1.IManagementServer); + type DeleteBackupPlanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer name. */ - public name: string; - - /** ManagementServer description. */ - public description: string; - - /** ManagementServer labels. */ - public labels: { [k: string]: string }; - - /** ManagementServer createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** ManagementServer updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlanAssociation}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBackupPlanAssociationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer type. */ - public type: (google.cloud.backupdr.v1.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceType); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlanAssociation}. + * @param error Error, if any + * @param [response] BackupPlanAssociation + */ + type GetBackupPlanAssociationCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupPlanAssociation) => void; - /** ManagementServer managementUri. */ - public managementUri?: (google.cloud.backupdr.v1.IManagementURI|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlanAssociations}. + * @param error Error, if any + * @param [response] ListBackupPlanAssociationsResponse + */ + type ListBackupPlanAssociationsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse) => void; - /** ManagementServer workforceIdentityBasedManagementUri. */ - public workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlanAssociation}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteBackupPlanAssociationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** ManagementServer state. */ - public state: (google.cloud.backupdr.v1.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceState); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|triggerBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type TriggerBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } - /** ManagementServer networks. */ - public networks: google.cloud.backupdr.v1.INetworkConfig[]; + /** Properties of a NetworkConfig. */ + interface INetworkConfig { - /** ManagementServer etag. */ - public etag: string; + /** NetworkConfig network */ + network?: (string|null); - /** ManagementServer oauth2ClientId. */ - public oauth2ClientId: string; + /** NetworkConfig peeringMode */ + peeringMode?: (google.cloud.backupdr.v1.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1.NetworkConfig.PeeringMode|null); + } - /** ManagementServer workforceIdentityBasedOauth2ClientId. */ - public workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null); + /** Represents a NetworkConfig. */ + class NetworkConfig implements INetworkConfig { - /** ManagementServer baProxyUri. */ - public baProxyUri: string[]; + /** + * Constructs a new NetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.INetworkConfig); - /** ManagementServer satisfiesPzs. */ - public satisfiesPzs?: (google.protobuf.IBoolValue|null); + /** NetworkConfig network. */ + public network: string; - /** ManagementServer satisfiesPzi. */ - public satisfiesPzi: boolean; + /** NetworkConfig peeringMode. */ + public peeringMode: (google.cloud.backupdr.v1.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1.NetworkConfig.PeeringMode); /** - * Creates a new ManagementServer instance using the specified properties. + * Creates a new NetworkConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ManagementServer instance + * @returns NetworkConfig instance */ - public static create(properties?: google.cloud.backupdr.v1.IManagementServer): google.cloud.backupdr.v1.ManagementServer; + public static create(properties?: google.cloud.backupdr.v1.INetworkConfig): google.cloud.backupdr.v1.NetworkConfig; /** - * Encodes the specified ManagementServer message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. - * @param message ManagementServer message or plain object to encode + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ManagementServer message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. - * @param message ManagementServer message or plain object to encode + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ManagementServer message from the specified reader or buffer. + * Decodes a NetworkConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ManagementServer + * @returns NetworkConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ManagementServer; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkConfig; /** - * Decodes a ManagementServer message from the specified reader or buffer, length delimited. + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ManagementServer + * @returns NetworkConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ManagementServer; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkConfig; /** - * Verifies a ManagementServer message. + * Verifies a NetworkConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ManagementServer message from a plain object. Also converts values to their respective internal types. + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ManagementServer + * @returns NetworkConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ManagementServer; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkConfig; /** - * Creates a plain object from a ManagementServer message. Also converts values to other types if specified. - * @param message ManagementServer + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @param message NetworkConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.ManagementServer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ManagementServer to JSON. + * Converts this NetworkConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ManagementServer + * Gets the default type url for NetworkConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ManagementServer { - - /** InstanceType enum. */ - enum InstanceType { - INSTANCE_TYPE_UNSPECIFIED = 0, - BACKUP_RESTORE = 1 - } + namespace NetworkConfig { - /** InstanceState enum. */ - enum InstanceState { - INSTANCE_STATE_UNSPECIFIED = 0, - CREATING = 1, - READY = 2, - UPDATING = 3, - DELETING = 4, - REPAIRING = 5, - MAINTENANCE = 6, - ERROR = 7 + /** PeeringMode enum. */ + enum PeeringMode { + PEERING_MODE_UNSPECIFIED = 0, + PRIVATE_SERVICE_ACCESS = 1 } } - /** Properties of a ListManagementServersRequest. */ - interface IListManagementServersRequest { - - /** ListManagementServersRequest parent */ - parent?: (string|null); - - /** ListManagementServersRequest pageSize */ - pageSize?: (number|null); - - /** ListManagementServersRequest pageToken */ - pageToken?: (string|null); + /** Properties of a ManagementURI. */ + interface IManagementURI { - /** ListManagementServersRequest filter */ - filter?: (string|null); + /** ManagementURI webUi */ + webUi?: (string|null); - /** ListManagementServersRequest orderBy */ - orderBy?: (string|null); + /** ManagementURI api */ + api?: (string|null); } - /** Represents a ListManagementServersRequest. */ - class ListManagementServersRequest implements IListManagementServersRequest { + /** Represents a ManagementURI. */ + class ManagementURI implements IManagementURI { /** - * Constructs a new ListManagementServersRequest. + * Constructs a new ManagementURI. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IListManagementServersRequest); - - /** ListManagementServersRequest parent. */ - public parent: string; - - /** ListManagementServersRequest pageSize. */ - public pageSize: number; - - /** ListManagementServersRequest pageToken. */ - public pageToken: string; - - /** ListManagementServersRequest filter. */ - public filter?: (string|null); - - /** ListManagementServersRequest orderBy. */ - public orderBy?: (string|null); + constructor(properties?: google.cloud.backupdr.v1.IManagementURI); - /** ListManagementServersRequest _filter. */ - public _filter?: "filter"; + /** ManagementURI webUi. */ + public webUi: string; - /** ListManagementServersRequest _orderBy. */ - public _orderBy?: "orderBy"; + /** ManagementURI api. */ + public api: string; /** - * Creates a new ListManagementServersRequest instance using the specified properties. + * Creates a new ManagementURI instance using the specified properties. * @param [properties] Properties to set - * @returns ListManagementServersRequest instance + * @returns ManagementURI instance */ - public static create(properties?: google.cloud.backupdr.v1.IListManagementServersRequest): google.cloud.backupdr.v1.ListManagementServersRequest; + public static create(properties?: google.cloud.backupdr.v1.IManagementURI): google.cloud.backupdr.v1.ManagementURI; /** - * Encodes the specified ListManagementServersRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. - * @param message ListManagementServersRequest message or plain object to encode + * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. + * @param message ManagementURI message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListManagementServersRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. - * @param message ListManagementServersRequest message or plain object to encode + * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. + * @param message ManagementURI message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListManagementServersRequest message from the specified reader or buffer. + * Decodes a ManagementURI message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListManagementServersRequest + * @returns ManagementURI * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListManagementServersRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ManagementURI; /** - * Decodes a ListManagementServersRequest message from the specified reader or buffer, length delimited. + * Decodes a ManagementURI message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListManagementServersRequest + * @returns ManagementURI * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListManagementServersRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ManagementURI; /** - * Verifies a ListManagementServersRequest message. + * Verifies a ManagementURI message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListManagementServersRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListManagementServersRequest + * @returns ManagementURI */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListManagementServersRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ManagementURI; /** - * Creates a plain object from a ListManagementServersRequest message. Also converts values to other types if specified. - * @param message ListManagementServersRequest + * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. + * @param message ManagementURI * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.ListManagementServersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.ManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListManagementServersRequest to JSON. + * Converts this ManagementURI to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListManagementServersRequest + * Gets the default type url for ManagementURI * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListManagementServersResponse. */ - interface IListManagementServersResponse { - - /** ListManagementServersResponse managementServers */ - managementServers?: (google.cloud.backupdr.v1.IManagementServer[]|null); + /** Properties of a WorkforceIdentityBasedManagementURI. */ + interface IWorkforceIdentityBasedManagementURI { - /** ListManagementServersResponse nextPageToken */ - nextPageToken?: (string|null); + /** WorkforceIdentityBasedManagementURI firstPartyManagementUri */ + firstPartyManagementUri?: (string|null); - /** ListManagementServersResponse unreachable */ - unreachable?: (string[]|null); + /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri */ + thirdPartyManagementUri?: (string|null); } - /** Represents a ListManagementServersResponse. */ - class ListManagementServersResponse implements IListManagementServersResponse { + /** Represents a WorkforceIdentityBasedManagementURI. */ + class WorkforceIdentityBasedManagementURI implements IWorkforceIdentityBasedManagementURI { /** - * Constructs a new ListManagementServersResponse. + * Constructs a new WorkforceIdentityBasedManagementURI. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IListManagementServersResponse); - - /** ListManagementServersResponse managementServers. */ - public managementServers: google.cloud.backupdr.v1.IManagementServer[]; + constructor(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI); - /** ListManagementServersResponse nextPageToken. */ - public nextPageToken: string; + /** WorkforceIdentityBasedManagementURI firstPartyManagementUri. */ + public firstPartyManagementUri: string; - /** ListManagementServersResponse unreachable. */ - public unreachable: string[]; + /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri. */ + public thirdPartyManagementUri: string; /** - * Creates a new ListManagementServersResponse instance using the specified properties. + * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. * @param [properties] Properties to set - * @returns ListManagementServersResponse instance + * @returns WorkforceIdentityBasedManagementURI instance */ - public static create(properties?: google.cloud.backupdr.v1.IListManagementServersResponse): google.cloud.backupdr.v1.ListManagementServersResponse; + public static create(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; /** - * Encodes the specified ListManagementServersResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. - * @param message ListManagementServersResponse message or plain object to encode + * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * @param message WorkforceIdentityBasedManagementURI message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IListManagementServersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListManagementServersResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. - * @param message ListManagementServersResponse message or plain object to encode + * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * @param message WorkforceIdentityBasedManagementURI message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListManagementServersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListManagementServersResponse message from the specified reader or buffer. + * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListManagementServersResponse + * @returns WorkforceIdentityBasedManagementURI * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListManagementServersResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; /** - * Decodes a ListManagementServersResponse message from the specified reader or buffer, length delimited. + * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListManagementServersResponse + * @returns WorkforceIdentityBasedManagementURI * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListManagementServersResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; /** - * Verifies a ListManagementServersResponse message. + * Verifies a WorkforceIdentityBasedManagementURI message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListManagementServersResponse message from a plain object. Also converts values to their respective internal types. + * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListManagementServersResponse + * @returns WorkforceIdentityBasedManagementURI */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListManagementServersResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; /** - * Creates a plain object from a ListManagementServersResponse message. Also converts values to other types if specified. - * @param message ListManagementServersResponse + * Creates a plain object from a WorkforceIdentityBasedManagementURI message. Also converts values to other types if specified. + * @param message WorkforceIdentityBasedManagementURI * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.ListManagementServersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListManagementServersResponse to JSON. + * Converts this WorkforceIdentityBasedManagementURI to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListManagementServersResponse + * Gets the default type url for WorkforceIdentityBasedManagementURI * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetManagementServerRequest. */ - interface IGetManagementServerRequest { + /** Properties of a WorkforceIdentityBasedOAuth2ClientID. */ + interface IWorkforceIdentityBasedOAuth2ClientID { - /** GetManagementServerRequest name */ - name?: (string|null); + /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId */ + firstPartyOauth2ClientId?: (string|null); + + /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId */ + thirdPartyOauth2ClientId?: (string|null); } - /** Represents a GetManagementServerRequest. */ - class GetManagementServerRequest implements IGetManagementServerRequest { + /** Represents a WorkforceIdentityBasedOAuth2ClientID. */ + class WorkforceIdentityBasedOAuth2ClientID implements IWorkforceIdentityBasedOAuth2ClientID { /** - * Constructs a new GetManagementServerRequest. + * Constructs a new WorkforceIdentityBasedOAuth2ClientID. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IGetManagementServerRequest); + constructor(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID); - /** GetManagementServerRequest name. */ - public name: string; + /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId. */ + public firstPartyOauth2ClientId: string; + + /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId. */ + public thirdPartyOauth2ClientId: string; /** - * Creates a new GetManagementServerRequest instance using the specified properties. + * Creates a new WorkforceIdentityBasedOAuth2ClientID instance using the specified properties. * @param [properties] Properties to set - * @returns GetManagementServerRequest instance + * @returns WorkforceIdentityBasedOAuth2ClientID instance */ - public static create(properties?: google.cloud.backupdr.v1.IGetManagementServerRequest): google.cloud.backupdr.v1.GetManagementServerRequest; + public static create(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; /** - * Encodes the specified GetManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. - * @param message GetManagementServerRequest message or plain object to encode + * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. + * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. - * @param message GetManagementServerRequest message or plain object to encode + * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. + * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetManagementServerRequest message from the specified reader or buffer. + * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetManagementServerRequest + * @returns WorkforceIdentityBasedOAuth2ClientID * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetManagementServerRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; /** - * Decodes a GetManagementServerRequest message from the specified reader or buffer, length delimited. + * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetManagementServerRequest + * @returns WorkforceIdentityBasedOAuth2ClientID * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetManagementServerRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; /** - * Verifies a GetManagementServerRequest message. + * Verifies a WorkforceIdentityBasedOAuth2ClientID message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a WorkforceIdentityBasedOAuth2ClientID message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetManagementServerRequest + * @returns WorkforceIdentityBasedOAuth2ClientID */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetManagementServerRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; /** - * Creates a plain object from a GetManagementServerRequest message. Also converts values to other types if specified. - * @param message GetManagementServerRequest + * Creates a plain object from a WorkforceIdentityBasedOAuth2ClientID message. Also converts values to other types if specified. + * @param message WorkforceIdentityBasedOAuth2ClientID * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.GetManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetManagementServerRequest to JSON. + * Converts this WorkforceIdentityBasedOAuth2ClientID to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetManagementServerRequest + * Gets the default type url for WorkforceIdentityBasedOAuth2ClientID * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateManagementServerRequest. */ - interface ICreateManagementServerRequest { + /** Properties of a ManagementServer. */ + interface IManagementServer { - /** CreateManagementServerRequest parent */ - parent?: (string|null); + /** ManagementServer name */ + name?: (string|null); - /** CreateManagementServerRequest managementServerId */ - managementServerId?: (string|null); + /** ManagementServer description */ + description?: (string|null); - /** CreateManagementServerRequest managementServer */ - managementServer?: (google.cloud.backupdr.v1.IManagementServer|null); + /** ManagementServer labels */ + labels?: ({ [k: string]: string }|null); - /** CreateManagementServerRequest requestId */ - requestId?: (string|null); - } + /** ManagementServer createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** Represents a CreateManagementServerRequest. */ - class CreateManagementServerRequest implements ICreateManagementServerRequest { + /** ManagementServer updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); - /** - * Constructs a new CreateManagementServerRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ICreateManagementServerRequest); + /** ManagementServer type */ + type?: (google.cloud.backupdr.v1.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceType|null); - /** CreateManagementServerRequest parent. */ - public parent: string; + /** ManagementServer managementUri */ + managementUri?: (google.cloud.backupdr.v1.IManagementURI|null); - /** CreateManagementServerRequest managementServerId. */ - public managementServerId: string; + /** ManagementServer workforceIdentityBasedManagementUri */ + workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null); - /** CreateManagementServerRequest managementServer. */ - public managementServer?: (google.cloud.backupdr.v1.IManagementServer|null); + /** ManagementServer state */ + state?: (google.cloud.backupdr.v1.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceState|null); - /** CreateManagementServerRequest requestId. */ - public requestId: string; + /** ManagementServer networks */ + networks?: (google.cloud.backupdr.v1.INetworkConfig[]|null); - /** - * Creates a new CreateManagementServerRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateManagementServerRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ICreateManagementServerRequest): google.cloud.backupdr.v1.CreateManagementServerRequest; + /** ManagementServer etag */ + etag?: (string|null); - /** - * Encodes the specified CreateManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. - * @param message CreateManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** ManagementServer oauth2ClientId */ + oauth2ClientId?: (string|null); - /** - * Encodes the specified CreateManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. - * @param message CreateManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** ManagementServer workforceIdentityBasedOauth2ClientId */ + workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null); - /** - * Decodes a CreateManagementServerRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateManagementServerRequest; + /** ManagementServer baProxyUri */ + baProxyUri?: (string[]|null); - /** - * Decodes a CreateManagementServerRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateManagementServerRequest; + /** ManagementServer satisfiesPzs */ + satisfiesPzs?: (google.protobuf.IBoolValue|null); - /** - * Verifies a CreateManagementServerRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ManagementServer satisfiesPzi */ + satisfiesPzi?: (boolean|null); + } + + /** Represents a ManagementServer. */ + class ManagementServer implements IManagementServer { /** - * Creates a CreateManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateManagementServerRequest + * Constructs a new ManagementServer. + * @param [properties] Properties to set */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateManagementServerRequest; + constructor(properties?: google.cloud.backupdr.v1.IManagementServer); - /** - * Creates a plain object from a CreateManagementServerRequest message. Also converts values to other types if specified. - * @param message CreateManagementServerRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.CreateManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ManagementServer name. */ + public name: string; - /** - * Converts this CreateManagementServerRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ManagementServer description. */ + public description: string; - /** - * Gets the default type url for CreateManagementServerRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** ManagementServer labels. */ + public labels: { [k: string]: string }; - /** Properties of a DeleteManagementServerRequest. */ - interface IDeleteManagementServerRequest { + /** ManagementServer createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** DeleteManagementServerRequest name */ - name?: (string|null); + /** ManagementServer updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** DeleteManagementServerRequest requestId */ - requestId?: (string|null); - } + /** ManagementServer type. */ + public type: (google.cloud.backupdr.v1.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceType); - /** Represents a DeleteManagementServerRequest. */ - class DeleteManagementServerRequest implements IDeleteManagementServerRequest { + /** ManagementServer managementUri. */ + public managementUri?: (google.cloud.backupdr.v1.IManagementURI|null); - /** - * Constructs a new DeleteManagementServerRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDeleteManagementServerRequest); + /** ManagementServer workforceIdentityBasedManagementUri. */ + public workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null); - /** DeleteManagementServerRequest name. */ - public name: string; + /** ManagementServer state. */ + public state: (google.cloud.backupdr.v1.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceState); - /** DeleteManagementServerRequest requestId. */ - public requestId: string; + /** ManagementServer networks. */ + public networks: google.cloud.backupdr.v1.INetworkConfig[]; + + /** ManagementServer etag. */ + public etag: string; + + /** ManagementServer oauth2ClientId. */ + public oauth2ClientId: string; + + /** ManagementServer workforceIdentityBasedOauth2ClientId. */ + public workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null); + + /** ManagementServer baProxyUri. */ + public baProxyUri: string[]; + + /** ManagementServer satisfiesPzs. */ + public satisfiesPzs?: (google.protobuf.IBoolValue|null); + + /** ManagementServer satisfiesPzi. */ + public satisfiesPzi: boolean; /** - * Creates a new DeleteManagementServerRequest instance using the specified properties. + * Creates a new ManagementServer instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteManagementServerRequest instance + * @returns ManagementServer instance */ - public static create(properties?: google.cloud.backupdr.v1.IDeleteManagementServerRequest): google.cloud.backupdr.v1.DeleteManagementServerRequest; + public static create(properties?: google.cloud.backupdr.v1.IManagementServer): google.cloud.backupdr.v1.ManagementServer; /** - * Encodes the specified DeleteManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. - * @param message DeleteManagementServerRequest message or plain object to encode + * Encodes the specified ManagementServer message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. + * @param message ManagementServer message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. - * @param message DeleteManagementServerRequest message or plain object to encode + * Encodes the specified ManagementServer message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. + * @param message ManagementServer message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteManagementServerRequest message from the specified reader or buffer. + * Decodes a ManagementServer message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteManagementServerRequest + * @returns ManagementServer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteManagementServerRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ManagementServer; /** - * Decodes a DeleteManagementServerRequest message from the specified reader or buffer, length delimited. + * Decodes a ManagementServer message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteManagementServerRequest + * @returns ManagementServer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteManagementServerRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ManagementServer; /** - * Verifies a DeleteManagementServerRequest message. + * Verifies a ManagementServer message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ManagementServer message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteManagementServerRequest + * @returns ManagementServer */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteManagementServerRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ManagementServer; /** - * Creates a plain object from a DeleteManagementServerRequest message. Also converts values to other types if specified. - * @param message DeleteManagementServerRequest + * Creates a plain object from a ManagementServer message. Also converts values to other types if specified. + * @param message ManagementServer * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.DeleteManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.ManagementServer, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteManagementServerRequest to JSON. + * Converts this ManagementServer to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteManagementServerRequest + * Gets the default type url for ManagementServer * @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 { + namespace ManagementServer { - /** OperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** InstanceType enum. */ + enum InstanceType { + INSTANCE_TYPE_UNSPECIFIED = 0, + BACKUP_RESTORE = 1 + } - /** OperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** InstanceState enum. */ + enum InstanceState { + INSTANCE_STATE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2, + UPDATING = 3, + DELETING = 4, + REPAIRING = 5, + MAINTENANCE = 6, + ERROR = 7 + } + } - /** OperationMetadata target */ - target?: (string|null); + /** Properties of a ListManagementServersRequest. */ + interface IListManagementServersRequest { - /** OperationMetadata verb */ - verb?: (string|null); + /** ListManagementServersRequest parent */ + parent?: (string|null); - /** OperationMetadata statusMessage */ - statusMessage?: (string|null); + /** ListManagementServersRequest pageSize */ + pageSize?: (number|null); - /** OperationMetadata requestedCancellation */ - requestedCancellation?: (boolean|null); + /** ListManagementServersRequest pageToken */ + pageToken?: (string|null); - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); + /** ListManagementServersRequest filter */ + filter?: (string|null); - /** OperationMetadata additionalInfo */ - additionalInfo?: ({ [k: string]: string }|null); + /** ListManagementServersRequest orderBy */ + orderBy?: (string|null); } - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { + /** Represents a ListManagementServersRequest. */ + class ListManagementServersRequest implements IListManagementServersRequest { /** - * Constructs a new OperationMetadata. + * Constructs a new ListManagementServersRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IOperationMetadata); - - /** OperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + constructor(properties?: google.cloud.backupdr.v1.IListManagementServersRequest); - /** OperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** ListManagementServersRequest parent. */ + public parent: string; - /** OperationMetadata target. */ - public target: string; + /** ListManagementServersRequest pageSize. */ + public pageSize: number; - /** OperationMetadata verb. */ - public verb: string; + /** ListManagementServersRequest pageToken. */ + public pageToken: string; - /** OperationMetadata statusMessage. */ - public statusMessage: string; + /** ListManagementServersRequest filter. */ + public filter?: (string|null); - /** OperationMetadata requestedCancellation. */ - public requestedCancellation: boolean; + /** ListManagementServersRequest orderBy. */ + public orderBy?: (string|null); - /** OperationMetadata apiVersion. */ - public apiVersion: string; + /** ListManagementServersRequest _filter. */ + public _filter?: "filter"; - /** OperationMetadata additionalInfo. */ - public additionalInfo: { [k: string]: string }; + /** ListManagementServersRequest _orderBy. */ + public _orderBy?: "orderBy"; /** - * Creates a new OperationMetadata instance using the specified properties. + * Creates a new ListManagementServersRequest instance using the specified properties. * @param [properties] Properties to set - * @returns OperationMetadata instance + * @returns ListManagementServersRequest instance */ - public static create(properties?: google.cloud.backupdr.v1.IOperationMetadata): google.cloud.backupdr.v1.OperationMetadata; + public static create(properties?: google.cloud.backupdr.v1.IListManagementServersRequest): google.cloud.backupdr.v1.ListManagementServersRequest; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.backupdr.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified ListManagementServersRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. + * @param message ListManagementServersRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.OperationMetadata.verify|verify} messages. - * @param message OperationMetadata message or plain object to encode + * Encodes the specified ListManagementServersRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. + * @param message ListManagementServersRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a ListManagementServersRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OperationMetadata + * @returns ListManagementServersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.OperationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListManagementServersRequest; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a ListManagementServersRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OperationMetadata + * @returns ListManagementServersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.OperationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListManagementServersRequest; /** - * Verifies an OperationMetadata message. + * Verifies a ListManagementServersRequest message. * @param message Plain 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. + * Creates a ListManagementServersRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OperationMetadata + * @returns ListManagementServersRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.OperationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListManagementServersRequest; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @param message OperationMetadata + * Creates a plain object from a ListManagementServersRequest message. Also converts values to other types if specified. + * @param message ListManagementServersRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.ListManagementServersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OperationMetadata to JSON. + * Converts this ListManagementServersRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for ListManagementServersRequest * @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 ListManagementServersResponse. */ + interface IListManagementServersResponse { - /** Properties of a Http. */ - interface IHttp { + /** ListManagementServersResponse managementServers */ + managementServers?: (google.cloud.backupdr.v1.IManagementServer[]|null); - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** ListManagementServersResponse nextPageToken */ + nextPageToken?: (string|null); - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } + /** ListManagementServersResponse unreachable */ + unreachable?: (string[]|null); + } - /** Represents a Http. */ - class Http implements IHttp { + /** Represents a ListManagementServersResponse. */ + class ListManagementServersResponse implements IListManagementServersResponse { - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); + /** + * Constructs a new ListManagementServersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListManagementServersResponse); - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** ListManagementServersResponse managementServers. */ + public managementServers: google.cloud.backupdr.v1.IManagementServer[]; - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** ListManagementServersResponse nextPageToken. */ + public nextPageToken: string; - /** - * 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; + /** ListManagementServersResponse unreachable. */ + public unreachable: string[]; - /** - * 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; + /** + * Creates a new ListManagementServersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListManagementServersResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListManagementServersResponse): google.cloud.backupdr.v1.ListManagementServersResponse; - /** - * 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; + /** + * Encodes the specified ListManagementServersResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. + * @param message ListManagementServersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListManagementServersResponse, 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; + /** + * Encodes the specified ListManagementServersResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. + * @param message ListManagementServersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListManagementServersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes a ListManagementServersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListManagementServersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListManagementServersResponse; - /** - * 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); + /** + * Decodes a ListManagementServersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListManagementServersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListManagementServersResponse; - /** - * 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; + /** + * Verifies a ListManagementServersResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * 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 }; + /** + * Creates a ListManagementServersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListManagementServersResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListManagementServersResponse; - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a ListManagementServersResponse message. Also converts values to other types if specified. + * @param message ListManagementServersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListManagementServersResponse, options?: $protobuf.IConversionOptions): { [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; - } + /** + * Converts this ListManagementServersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a HttpRule. */ - interface IHttpRule { + /** + * Gets the default type url for ListManagementServersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** HttpRule selector */ - selector?: (string|null); + /** Properties of a GetManagementServerRequest. */ + interface IGetManagementServerRequest { - /** HttpRule get */ - get?: (string|null); + /** GetManagementServerRequest name */ + name?: (string|null); + } - /** HttpRule put */ - put?: (string|null); + /** Represents a GetManagementServerRequest. */ + class GetManagementServerRequest implements IGetManagementServerRequest { - /** HttpRule post */ - post?: (string|null); + /** + * Constructs a new GetManagementServerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetManagementServerRequest); - /** HttpRule delete */ - "delete"?: (string|null); + /** GetManagementServerRequest name. */ + public name: string; - /** HttpRule patch */ - patch?: (string|null); + /** + * Creates a new GetManagementServerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetManagementServerRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetManagementServerRequest): google.cloud.backupdr.v1.GetManagementServerRequest; - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); + /** + * Encodes the specified GetManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. + * @param message GetManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRule body */ - body?: (string|null); + /** + * Encodes the specified GetManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. + * @param message GetManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRule responseBody */ - responseBody?: (string|null); + /** + * Decodes a GetManagementServerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetManagementServerRequest; - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } + /** + * Decodes a GetManagementServerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetManagementServerRequest; - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); + /** + * Verifies a GetManagementServerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** HttpRule selector. */ - public selector: string; + /** + * Creates a GetManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetManagementServerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetManagementServerRequest; - /** HttpRule get. */ - public get?: (string|null); + /** + * Creates a plain object from a GetManagementServerRequest message. Also converts values to other types if specified. + * @param message GetManagementServerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** HttpRule put. */ - public put?: (string|null); + /** + * Converts this GetManagementServerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** HttpRule post. */ - public post?: (string|null); + /** + * Gets the default type url for GetManagementServerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** HttpRule delete. */ - public delete?: (string|null); + /** Properties of a CreateManagementServerRequest. */ + interface ICreateManagementServerRequest { - /** HttpRule patch. */ - public patch?: (string|null); + /** CreateManagementServerRequest parent */ + parent?: (string|null); - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); + /** CreateManagementServerRequest managementServerId */ + managementServerId?: (string|null); - /** HttpRule body. */ - public body: string; + /** CreateManagementServerRequest managementServer */ + managementServer?: (google.cloud.backupdr.v1.IManagementServer|null); - /** HttpRule responseBody. */ - public responseBody: string; + /** CreateManagementServerRequest requestId */ + requestId?: (string|null); + } - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + /** Represents a CreateManagementServerRequest. */ + class CreateManagementServerRequest implements ICreateManagementServerRequest { - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** + * Constructs a new CreateManagementServerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICreateManagementServerRequest); - /** - * 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; + /** CreateManagementServerRequest parent. */ + public parent: string; - /** - * 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; + /** CreateManagementServerRequest managementServerId. */ + public managementServerId: string; - /** - * 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; + /** CreateManagementServerRequest managementServer. */ + public managementServer?: (google.cloud.backupdr.v1.IManagementServer|null); - /** - * 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; + /** CreateManagementServerRequest requestId. */ + public requestId: string; - /** - * 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; + /** + * Creates a new CreateManagementServerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateManagementServerRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICreateManagementServerRequest): google.cloud.backupdr.v1.CreateManagementServerRequest; - /** - * 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); + /** + * Encodes the specified CreateManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. + * @param message CreateManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Encodes the specified CreateManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. + * @param message CreateManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Decodes a CreateManagementServerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateManagementServerRequest; - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a CreateManagementServerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateManagementServerRequest; - /** - * 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; - } + /** + * Verifies a CreateManagementServerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + /** + * Creates a CreateManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateManagementServerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateManagementServerRequest; - /** CustomHttpPattern kind */ - kind?: (string|null); + /** + * Creates a plain object from a CreateManagementServerRequest message. Also converts values to other types if specified. + * @param message CreateManagementServerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CreateManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** CustomHttpPattern path */ - path?: (string|null); - } + /** + * Converts this CreateManagementServerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** + * Gets the default type url for CreateManagementServerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); + /** Properties of a DeleteManagementServerRequest. */ + interface IDeleteManagementServerRequest { - /** CustomHttpPattern kind. */ - public kind: string; + /** DeleteManagementServerRequest name */ + name?: (string|null); - /** CustomHttpPattern path. */ - public path: string; + /** DeleteManagementServerRequest requestId */ + requestId?: (string|null); + } - /** - * 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; + /** Represents a DeleteManagementServerRequest. */ + class DeleteManagementServerRequest implements IDeleteManagementServerRequest { + + /** + * Constructs a new DeleteManagementServerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteManagementServerRequest); + + /** DeleteManagementServerRequest name. */ + public name: string; + + /** DeleteManagementServerRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteManagementServerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteManagementServerRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteManagementServerRequest): google.cloud.backupdr.v1.DeleteManagementServerRequest; + + /** + * Encodes the specified DeleteManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. + * @param message DeleteManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. + * @param message DeleteManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteManagementServerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteManagementServerRequest; + + /** + * Decodes a DeleteManagementServerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteManagementServerRequest; + + /** + * Verifies a DeleteManagementServerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteManagementServerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteManagementServerRequest; + + /** + * Creates a plain object from a DeleteManagementServerRequest message. Also converts values to other types if specified. + * @param message DeleteManagementServerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteManagementServerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteManagementServerRequest + * @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 additionalInfo */ + additionalInfo?: ({ [k: string]: string }|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.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 additionalInfo. */ + public additionalInfo: { [k: string]: string }; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.backupdr.v1.IOperationMetadata): google.cloud.backupdr.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.backupdr.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.backupdr.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.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.backupdr.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.backupdr.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.backupdr.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.backupdr.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.backupdr.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 BackupPlan. */ + interface IBackupPlan { + + /** BackupPlan name */ + name?: (string|null); + + /** BackupPlan description */ + description?: (string|null); + + /** BackupPlan labels */ + labels?: ({ [k: string]: string }|null); + + /** BackupPlan createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan backupRules */ + backupRules?: (google.cloud.backupdr.v1.IBackupRule[]|null); + + /** BackupPlan state */ + state?: (google.cloud.backupdr.v1.BackupPlan.State|keyof typeof google.cloud.backupdr.v1.BackupPlan.State|null); + + /** BackupPlan resourceType */ + resourceType?: (string|null); + + /** BackupPlan etag */ + etag?: (string|null); + + /** BackupPlan backupVault */ + backupVault?: (string|null); + + /** BackupPlan backupVaultServiceAccount */ + backupVaultServiceAccount?: (string|null); + } + + /** Represents a BackupPlan. */ + class BackupPlan implements IBackupPlan { + + /** + * Constructs a new BackupPlan. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupPlan); + + /** BackupPlan name. */ + public name: string; + + /** BackupPlan description. */ + public description: string; + + /** BackupPlan labels. */ + public labels: { [k: string]: string }; + + /** BackupPlan createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan backupRules. */ + public backupRules: google.cloud.backupdr.v1.IBackupRule[]; + + /** BackupPlan state. */ + public state: (google.cloud.backupdr.v1.BackupPlan.State|keyof typeof google.cloud.backupdr.v1.BackupPlan.State); + + /** BackupPlan resourceType. */ + public resourceType: string; + + /** BackupPlan etag. */ + public etag: string; + + /** BackupPlan backupVault. */ + public backupVault: string; + + /** BackupPlan backupVaultServiceAccount. */ + public backupVaultServiceAccount: string; + + /** + * Creates a new BackupPlan instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupPlan instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupPlan): google.cloud.backupdr.v1.BackupPlan; + + /** + * Encodes the specified BackupPlan message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. + * @param message BackupPlan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupPlan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupPlan message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. + * @param message BackupPlan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupPlan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupPlan message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupPlan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupPlan; + + /** + * Decodes a BackupPlan message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupPlan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupPlan; + + /** + * Verifies a BackupPlan message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupPlan message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupPlan + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupPlan; + + /** + * Creates a plain object from a BackupPlan message. Also converts values to other types if specified. + * @param message BackupPlan + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupPlan, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupPlan to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupPlan + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupPlan { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + INACTIVE = 4 + } + } + + /** Properties of a BackupRule. */ + interface IBackupRule { + + /** BackupRule ruleId */ + ruleId?: (string|null); + + /** BackupRule backupRetentionDays */ + backupRetentionDays?: (number|null); + + /** BackupRule standardSchedule */ + standardSchedule?: (google.cloud.backupdr.v1.IStandardSchedule|null); + } + + /** Represents a BackupRule. */ + class BackupRule implements IBackupRule { + + /** + * Constructs a new BackupRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupRule); + + /** BackupRule ruleId. */ + public ruleId: string; + + /** BackupRule backupRetentionDays. */ + public backupRetentionDays: number; + + /** BackupRule standardSchedule. */ + public standardSchedule?: (google.cloud.backupdr.v1.IStandardSchedule|null); + + /** BackupRule backupScheduleOneof. */ + public backupScheduleOneof?: "standardSchedule"; + + /** + * Creates a new BackupRule instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupRule instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupRule): google.cloud.backupdr.v1.BackupRule; + + /** + * Encodes the specified BackupRule message. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. + * @param message BackupRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupRule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. + * @param message BackupRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupRule; + + /** + * Decodes a BackupRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupRule; + + /** + * Verifies a BackupRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupRule; + + /** + * Creates a plain object from a BackupRule message. Also converts values to other types if specified. + * @param message BackupRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StandardSchedule. */ + interface IStandardSchedule { + + /** StandardSchedule recurrenceType */ + recurrenceType?: (google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|keyof typeof google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|null); + + /** StandardSchedule hourlyFrequency */ + hourlyFrequency?: (number|null); + + /** StandardSchedule daysOfWeek */ + daysOfWeek?: (google.type.DayOfWeek[]|null); + + /** StandardSchedule daysOfMonth */ + daysOfMonth?: (number[]|null); + + /** StandardSchedule weekDayOfMonth */ + weekDayOfMonth?: (google.cloud.backupdr.v1.IWeekDayOfMonth|null); + + /** StandardSchedule months */ + months?: (google.type.Month[]|null); + + /** StandardSchedule backupWindow */ + backupWindow?: (google.cloud.backupdr.v1.IBackupWindow|null); + + /** StandardSchedule timeZone */ + timeZone?: (string|null); + } + + /** Represents a StandardSchedule. */ + class StandardSchedule implements IStandardSchedule { + + /** + * Constructs a new StandardSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IStandardSchedule); + + /** StandardSchedule recurrenceType. */ + public recurrenceType: (google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|keyof typeof google.cloud.backupdr.v1.StandardSchedule.RecurrenceType); + + /** StandardSchedule hourlyFrequency. */ + public hourlyFrequency: number; + + /** StandardSchedule daysOfWeek. */ + public daysOfWeek: google.type.DayOfWeek[]; + + /** StandardSchedule daysOfMonth. */ + public daysOfMonth: number[]; + + /** StandardSchedule weekDayOfMonth. */ + public weekDayOfMonth?: (google.cloud.backupdr.v1.IWeekDayOfMonth|null); + + /** StandardSchedule months. */ + public months: google.type.Month[]; + + /** StandardSchedule backupWindow. */ + public backupWindow?: (google.cloud.backupdr.v1.IBackupWindow|null); + + /** StandardSchedule timeZone. */ + public timeZone: string; + + /** + * Creates a new StandardSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns StandardSchedule instance + */ + public static create(properties?: google.cloud.backupdr.v1.IStandardSchedule): google.cloud.backupdr.v1.StandardSchedule; + + /** + * Encodes the specified StandardSchedule message. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. + * @param message StandardSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IStandardSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StandardSchedule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. + * @param message StandardSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IStandardSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StandardSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StandardSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.StandardSchedule; + + /** + * Decodes a StandardSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StandardSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.StandardSchedule; + + /** + * Verifies a StandardSchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StandardSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StandardSchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.StandardSchedule; + + /** + * Creates a plain object from a StandardSchedule message. Also converts values to other types if specified. + * @param message StandardSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.StandardSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StandardSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StandardSchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StandardSchedule { + + /** RecurrenceType enum. */ + enum RecurrenceType { + RECURRENCE_TYPE_UNSPECIFIED = 0, + HOURLY = 1, + DAILY = 2, + WEEKLY = 3, + MONTHLY = 4, + YEARLY = 5 + } + } + + /** Properties of a BackupWindow. */ + interface IBackupWindow { + + /** BackupWindow startHourOfDay */ + startHourOfDay?: (number|null); + + /** BackupWindow endHourOfDay */ + endHourOfDay?: (number|null); + } + + /** Represents a BackupWindow. */ + class BackupWindow implements IBackupWindow { + + /** + * Constructs a new BackupWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupWindow); + + /** BackupWindow startHourOfDay. */ + public startHourOfDay: number; + + /** BackupWindow endHourOfDay. */ + public endHourOfDay: number; + + /** + * Creates a new BackupWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupWindow instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupWindow): google.cloud.backupdr.v1.BackupWindow; + + /** + * Encodes the specified BackupWindow message. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. + * @param message BackupWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupWindow message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. + * @param message BackupWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupWindow; + + /** + * Decodes a BackupWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupWindow; + + /** + * Verifies a BackupWindow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupWindow + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupWindow; + + /** + * Creates a plain object from a BackupWindow message. Also converts values to other types if specified. + * @param message BackupWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupWindow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WeekDayOfMonth. */ + interface IWeekDayOfMonth { + + /** WeekDayOfMonth weekOfMonth */ + weekOfMonth?: (google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|keyof typeof google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|null); + + /** WeekDayOfMonth dayOfWeek */ + dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + } + + /** Represents a WeekDayOfMonth. */ + class WeekDayOfMonth implements IWeekDayOfMonth { + + /** + * Constructs a new WeekDayOfMonth. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IWeekDayOfMonth); + + /** WeekDayOfMonth weekOfMonth. */ + public weekOfMonth: (google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|keyof typeof google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth); + + /** WeekDayOfMonth dayOfWeek. */ + public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); + + /** + * Creates a new WeekDayOfMonth instance using the specified properties. + * @param [properties] Properties to set + * @returns WeekDayOfMonth instance + */ + public static create(properties?: google.cloud.backupdr.v1.IWeekDayOfMonth): google.cloud.backupdr.v1.WeekDayOfMonth; + + /** + * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. + * @param message WeekDayOfMonth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. + * @param message WeekDayOfMonth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WeekDayOfMonth; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WeekDayOfMonth; + + /** + * Verifies a WeekDayOfMonth message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WeekDayOfMonth + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WeekDayOfMonth; + + /** + * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. + * @param message WeekDayOfMonth + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.WeekDayOfMonth, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WeekDayOfMonth to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WeekDayOfMonth + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WeekDayOfMonth { + + /** WeekOfMonth enum. */ + enum WeekOfMonth { + WEEK_OF_MONTH_UNSPECIFIED = 0, + FIRST = 1, + SECOND = 2, + THIRD = 3, + FOURTH = 4, + LAST = 5 + } + } + + /** Properties of a CreateBackupPlanRequest. */ + interface ICreateBackupPlanRequest { + + /** CreateBackupPlanRequest parent */ + parent?: (string|null); + + /** CreateBackupPlanRequest backupPlanId */ + backupPlanId?: (string|null); + + /** CreateBackupPlanRequest backupPlan */ + backupPlan?: (google.cloud.backupdr.v1.IBackupPlan|null); + + /** CreateBackupPlanRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateBackupPlanRequest. */ + class CreateBackupPlanRequest implements ICreateBackupPlanRequest { + + /** + * Constructs a new CreateBackupPlanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICreateBackupPlanRequest); + + /** CreateBackupPlanRequest parent. */ + public parent: string; + + /** CreateBackupPlanRequest backupPlanId. */ + public backupPlanId: string; + + /** CreateBackupPlanRequest backupPlan. */ + public backupPlan?: (google.cloud.backupdr.v1.IBackupPlan|null); + + /** CreateBackupPlanRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateBackupPlanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupPlanRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICreateBackupPlanRequest): google.cloud.backupdr.v1.CreateBackupPlanRequest; + + /** + * Encodes the specified CreateBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. + * @param message CreateBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICreateBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. + * @param message CreateBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupPlanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupPlanRequest; + + /** + * Decodes a CreateBackupPlanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupPlanRequest; + + /** + * Verifies a CreateBackupPlanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupPlanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupPlanRequest; + + /** + * Creates a plain object from a CreateBackupPlanRequest message. Also converts values to other types if specified. + * @param message CreateBackupPlanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CreateBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupPlanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupPlanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlansRequest. */ + interface IListBackupPlansRequest { + + /** ListBackupPlansRequest parent */ + parent?: (string|null); + + /** ListBackupPlansRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupPlansRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupPlansRequest filter */ + filter?: (string|null); + + /** ListBackupPlansRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListBackupPlansRequest. */ + class ListBackupPlansRequest implements IListBackupPlansRequest { + + /** + * Constructs a new ListBackupPlansRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupPlansRequest); + + /** ListBackupPlansRequest parent. */ + public parent: string; + + /** ListBackupPlansRequest pageSize. */ + public pageSize: number; + + /** ListBackupPlansRequest pageToken. */ + public pageToken: string; + + /** ListBackupPlansRequest filter. */ + public filter: string; + + /** ListBackupPlansRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListBackupPlansRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlansRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupPlansRequest): google.cloud.backupdr.v1.ListBackupPlansRequest; + + /** + * Encodes the specified ListBackupPlansRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. + * @param message ListBackupPlansRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupPlansRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlansRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. + * @param message ListBackupPlansRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlansRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlansRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlansRequest; + + /** + * Decodes a ListBackupPlansRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlansRequest; + + /** + * Verifies a ListBackupPlansRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlansRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlansRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlansRequest; + + /** + * Creates a plain object from a ListBackupPlansRequest message. Also converts values to other types if specified. + * @param message ListBackupPlansRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupPlansRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlansRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlansRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlansResponse. */ + interface IListBackupPlansResponse { + + /** ListBackupPlansResponse backupPlans */ + backupPlans?: (google.cloud.backupdr.v1.IBackupPlan[]|null); + + /** ListBackupPlansResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupPlansResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupPlansResponse. */ + class ListBackupPlansResponse implements IListBackupPlansResponse { + + /** + * Constructs a new ListBackupPlansResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupPlansResponse); + + /** ListBackupPlansResponse backupPlans. */ + public backupPlans: google.cloud.backupdr.v1.IBackupPlan[]; + + /** ListBackupPlansResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupPlansResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupPlansResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlansResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupPlansResponse): google.cloud.backupdr.v1.ListBackupPlansResponse; + + /** + * Encodes the specified ListBackupPlansResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. + * @param message ListBackupPlansResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupPlansResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlansResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. + * @param message ListBackupPlansResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlansResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlansResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlansResponse; + + /** + * Decodes a ListBackupPlansResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlansResponse; + + /** + * Verifies a ListBackupPlansResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlansResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlansResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlansResponse; + + /** + * Creates a plain object from a ListBackupPlansResponse message. Also converts values to other types if specified. + * @param message ListBackupPlansResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupPlansResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlansResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlansResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupPlanRequest. */ + interface IGetBackupPlanRequest { + + /** GetBackupPlanRequest name */ + name?: (string|null); + } + + /** Represents a GetBackupPlanRequest. */ + class GetBackupPlanRequest implements IGetBackupPlanRequest { + + /** + * Constructs a new GetBackupPlanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetBackupPlanRequest); + + /** GetBackupPlanRequest name. */ + public name: string; + + /** + * Creates a new GetBackupPlanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupPlanRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetBackupPlanRequest): google.cloud.backupdr.v1.GetBackupPlanRequest; + + /** + * Encodes the specified GetBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. + * @param message GetBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. + * @param message GetBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupPlanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupPlanRequest; + + /** + * Decodes a GetBackupPlanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupPlanRequest; + + /** + * Verifies a GetBackupPlanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupPlanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupPlanRequest; + + /** + * Creates a plain object from a GetBackupPlanRequest message. Also converts values to other types if specified. + * @param message GetBackupPlanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupPlanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupPlanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupPlanRequest. */ + interface IDeleteBackupPlanRequest { + + /** DeleteBackupPlanRequest name */ + name?: (string|null); + + /** DeleteBackupPlanRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteBackupPlanRequest. */ + class DeleteBackupPlanRequest implements IDeleteBackupPlanRequest { + + /** + * Constructs a new DeleteBackupPlanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanRequest); + + /** DeleteBackupPlanRequest name. */ + public name: string; + + /** DeleteBackupPlanRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteBackupPlanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupPlanRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanRequest): google.cloud.backupdr.v1.DeleteBackupPlanRequest; + + /** + * Encodes the specified DeleteBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. + * @param message DeleteBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. + * @param message DeleteBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupPlanRequest; + + /** + * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupPlanRequest; + + /** + * Verifies a DeleteBackupPlanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupPlanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupPlanRequest; + + /** + * Creates a plain object from a DeleteBackupPlanRequest message. Also converts values to other types if specified. + * @param message DeleteBackupPlanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupPlanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupPlanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupPlanAssociation. */ + interface IBackupPlanAssociation { + + /** BackupPlanAssociation name */ + name?: (string|null); + + /** BackupPlanAssociation resourceType */ + resourceType?: (string|null); + + /** BackupPlanAssociation resource */ + resource?: (string|null); + + /** BackupPlanAssociation backupPlan */ + backupPlan?: (string|null); + + /** BackupPlanAssociation createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation state */ + state?: (google.cloud.backupdr.v1.BackupPlanAssociation.State|keyof typeof google.cloud.backupdr.v1.BackupPlanAssociation.State|null); + + /** BackupPlanAssociation rulesConfigInfo */ + rulesConfigInfo?: (google.cloud.backupdr.v1.IRuleConfigInfo[]|null); + + /** BackupPlanAssociation dataSource */ + dataSource?: (string|null); + } + + /** Represents a BackupPlanAssociation. */ + class BackupPlanAssociation implements IBackupPlanAssociation { + + /** + * Constructs a new BackupPlanAssociation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupPlanAssociation); + + /** BackupPlanAssociation name. */ + public name: string; + + /** BackupPlanAssociation resourceType. */ + public resourceType: string; + + /** BackupPlanAssociation resource. */ + public resource: string; + + /** BackupPlanAssociation backupPlan. */ + public backupPlan: string; + + /** BackupPlanAssociation createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation state. */ + public state: (google.cloud.backupdr.v1.BackupPlanAssociation.State|keyof typeof google.cloud.backupdr.v1.BackupPlanAssociation.State); + + /** BackupPlanAssociation rulesConfigInfo. */ + public rulesConfigInfo: google.cloud.backupdr.v1.IRuleConfigInfo[]; + + /** BackupPlanAssociation dataSource. */ + public dataSource: string; + + /** + * Creates a new BackupPlanAssociation instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupPlanAssociation instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupPlanAssociation): google.cloud.backupdr.v1.BackupPlanAssociation; + + /** + * Encodes the specified BackupPlanAssociation message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. + * @param message BackupPlanAssociation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupPlanAssociation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupPlanAssociation message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. + * @param message BackupPlanAssociation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupPlanAssociation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupPlanAssociation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupPlanAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupPlanAssociation; + + /** + * Decodes a BackupPlanAssociation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupPlanAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupPlanAssociation; + + /** + * Verifies a BackupPlanAssociation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupPlanAssociation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupPlanAssociation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupPlanAssociation; + + /** + * Creates a plain object from a BackupPlanAssociation message. Also converts values to other types if specified. + * @param message BackupPlanAssociation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupPlanAssociation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupPlanAssociation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupPlanAssociation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupPlanAssociation { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + INACTIVE = 4 + } + } + + /** Properties of a RuleConfigInfo. */ + interface IRuleConfigInfo { + + /** RuleConfigInfo ruleId */ + ruleId?: (string|null); + + /** RuleConfigInfo lastBackupState */ + lastBackupState?: (google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|null); + + /** RuleConfigInfo lastBackupError */ + lastBackupError?: (google.rpc.IStatus|null); + + /** RuleConfigInfo lastSuccessfulBackupConsistencyTime */ + lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a RuleConfigInfo. */ + class RuleConfigInfo implements IRuleConfigInfo { + + /** + * Constructs a new RuleConfigInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IRuleConfigInfo); + + /** RuleConfigInfo ruleId. */ + public ruleId: string; + + /** RuleConfigInfo lastBackupState. */ + public lastBackupState: (google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState); + + /** RuleConfigInfo lastBackupError. */ + public lastBackupError?: (google.rpc.IStatus|null); + + /** RuleConfigInfo lastSuccessfulBackupConsistencyTime. */ + public lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new RuleConfigInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RuleConfigInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.IRuleConfigInfo): google.cloud.backupdr.v1.RuleConfigInfo; + + /** + * Encodes the specified RuleConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. + * @param message RuleConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IRuleConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RuleConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. + * @param message RuleConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IRuleConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RuleConfigInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RuleConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RuleConfigInfo; + + /** + * Decodes a RuleConfigInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RuleConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RuleConfigInfo; + + /** + * Verifies a RuleConfigInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RuleConfigInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RuleConfigInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RuleConfigInfo; + + /** + * Creates a plain object from a RuleConfigInfo message. Also converts values to other types if specified. + * @param message RuleConfigInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.RuleConfigInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RuleConfigInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RuleConfigInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RuleConfigInfo { + + /** LastBackupState enum. */ + enum LastBackupState { + LAST_BACKUP_STATE_UNSPECIFIED = 0, + FIRST_BACKUP_PENDING = 1, + PERMISSION_DENIED = 2, + SUCCEEDED = 3, + FAILED = 4 + } + } + + /** Properties of a CreateBackupPlanAssociationRequest. */ + interface ICreateBackupPlanAssociationRequest { + + /** CreateBackupPlanAssociationRequest parent */ + parent?: (string|null); + + /** CreateBackupPlanAssociationRequest backupPlanAssociationId */ + backupPlanAssociationId?: (string|null); + + /** CreateBackupPlanAssociationRequest backupPlanAssociation */ + backupPlanAssociation?: (google.cloud.backupdr.v1.IBackupPlanAssociation|null); + + /** CreateBackupPlanAssociationRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateBackupPlanAssociationRequest. */ + class CreateBackupPlanAssociationRequest implements ICreateBackupPlanAssociationRequest { + + /** + * Constructs a new CreateBackupPlanAssociationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest); + + /** CreateBackupPlanAssociationRequest parent. */ + public parent: string; + + /** CreateBackupPlanAssociationRequest backupPlanAssociationId. */ + public backupPlanAssociationId: string; + + /** CreateBackupPlanAssociationRequest backupPlanAssociation. */ + public backupPlanAssociation?: (google.cloud.backupdr.v1.IBackupPlanAssociation|null); + + /** CreateBackupPlanAssociationRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateBackupPlanAssociationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupPlanAssociationRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; + + /** + * Encodes the specified CreateBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. + * @param message CreateBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. + * @param message CreateBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; + + /** + * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; + + /** + * Verifies a CreateBackupPlanAssociationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupPlanAssociationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; + + /** + * Creates a plain object from a CreateBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @param message CreateBackupPlanAssociationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupPlanAssociationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupPlanAssociationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlanAssociationsRequest. */ + interface IListBackupPlanAssociationsRequest { + + /** ListBackupPlanAssociationsRequest parent */ + parent?: (string|null); + + /** ListBackupPlanAssociationsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupPlanAssociationsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupPlanAssociationsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListBackupPlanAssociationsRequest. */ + class ListBackupPlanAssociationsRequest implements IListBackupPlanAssociationsRequest { + + /** + * Constructs a new ListBackupPlanAssociationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest); + + /** ListBackupPlanAssociationsRequest parent. */ + public parent: string; + + /** ListBackupPlanAssociationsRequest pageSize. */ + public pageSize: number; + + /** ListBackupPlanAssociationsRequest pageToken. */ + public pageToken: string; + + /** ListBackupPlanAssociationsRequest filter. */ + public filter: string; + + /** + * Creates a new ListBackupPlanAssociationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlanAssociationsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; + + /** + * Encodes the specified ListBackupPlanAssociationsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. + * @param message ListBackupPlanAssociationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlanAssociationsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. + * @param message ListBackupPlanAssociationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlanAssociationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; + + /** + * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlanAssociationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; + + /** + * Verifies a ListBackupPlanAssociationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlanAssociationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlanAssociationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; + + /** + * Creates a plain object from a ListBackupPlanAssociationsRequest message. Also converts values to other types if specified. + * @param message ListBackupPlanAssociationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlanAssociationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlanAssociationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlanAssociationsResponse. */ + interface IListBackupPlanAssociationsResponse { + + /** ListBackupPlanAssociationsResponse backupPlanAssociations */ + backupPlanAssociations?: (google.cloud.backupdr.v1.IBackupPlanAssociation[]|null); + + /** ListBackupPlanAssociationsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupPlanAssociationsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupPlanAssociationsResponse. */ + class ListBackupPlanAssociationsResponse implements IListBackupPlanAssociationsResponse { + + /** + * Constructs a new ListBackupPlanAssociationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse); + + /** ListBackupPlanAssociationsResponse backupPlanAssociations. */ + public backupPlanAssociations: google.cloud.backupdr.v1.IBackupPlanAssociation[]; + + /** ListBackupPlanAssociationsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupPlanAssociationsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupPlanAssociationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlanAssociationsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; + + /** + * Encodes the specified ListBackupPlanAssociationsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. + * @param message ListBackupPlanAssociationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlanAssociationsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. + * @param message ListBackupPlanAssociationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlanAssociationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; + + /** + * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlanAssociationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; + + /** + * Verifies a ListBackupPlanAssociationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlanAssociationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlanAssociationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; + + /** + * Creates a plain object from a ListBackupPlanAssociationsResponse message. Also converts values to other types if specified. + * @param message ListBackupPlanAssociationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlanAssociationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlanAssociationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupPlanAssociationRequest. */ + interface IGetBackupPlanAssociationRequest { + + /** GetBackupPlanAssociationRequest name */ + name?: (string|null); + } + + /** Represents a GetBackupPlanAssociationRequest. */ + class GetBackupPlanAssociationRequest implements IGetBackupPlanAssociationRequest { + + /** + * Constructs a new GetBackupPlanAssociationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest); + + /** GetBackupPlanAssociationRequest name. */ + public name: string; + + /** + * Creates a new GetBackupPlanAssociationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupPlanAssociationRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; + + /** + * Encodes the specified GetBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. + * @param message GetBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. + * @param message GetBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; + + /** + * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; + + /** + * Verifies a GetBackupPlanAssociationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupPlanAssociationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; + + /** + * Creates a plain object from a GetBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @param message GetBackupPlanAssociationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupPlanAssociationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupPlanAssociationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupPlanAssociationRequest. */ + interface IDeleteBackupPlanAssociationRequest { + + /** DeleteBackupPlanAssociationRequest name */ + name?: (string|null); + + /** DeleteBackupPlanAssociationRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteBackupPlanAssociationRequest. */ + class DeleteBackupPlanAssociationRequest implements IDeleteBackupPlanAssociationRequest { + + /** + * Constructs a new DeleteBackupPlanAssociationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest); + + /** DeleteBackupPlanAssociationRequest name. */ + public name: string; + + /** DeleteBackupPlanAssociationRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteBackupPlanAssociationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupPlanAssociationRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; + + /** + * Encodes the specified DeleteBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. + * @param message DeleteBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. + * @param message DeleteBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; + + /** + * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; + + /** + * Verifies a DeleteBackupPlanAssociationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupPlanAssociationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; + + /** + * Creates a plain object from a DeleteBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @param message DeleteBackupPlanAssociationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupPlanAssociationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupPlanAssociationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TriggerBackupRequest. */ + interface ITriggerBackupRequest { + + /** TriggerBackupRequest name */ + name?: (string|null); + + /** TriggerBackupRequest ruleId */ + ruleId?: (string|null); + + /** TriggerBackupRequest requestId */ + requestId?: (string|null); + } + + /** Represents a TriggerBackupRequest. */ + class TriggerBackupRequest implements ITriggerBackupRequest { + + /** + * Constructs a new TriggerBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ITriggerBackupRequest); + + /** TriggerBackupRequest name. */ + public name: string; + + /** TriggerBackupRequest ruleId. */ + public ruleId: string; + + /** TriggerBackupRequest requestId. */ + public requestId: string; + + /** + * Creates a new TriggerBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TriggerBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ITriggerBackupRequest): google.cloud.backupdr.v1.TriggerBackupRequest; + + /** + * Encodes the specified TriggerBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. + * @param message TriggerBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ITriggerBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TriggerBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. + * @param message TriggerBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ITriggerBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TriggerBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TriggerBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.TriggerBackupRequest; + + /** + * Decodes a TriggerBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TriggerBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.TriggerBackupRequest; + + /** + * Verifies a TriggerBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TriggerBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TriggerBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.TriggerBackupRequest; + + /** + * Creates a plain object from a TriggerBackupRequest message. Also converts values to other types if specified. + * @param message TriggerBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.TriggerBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TriggerBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TriggerBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupVault. */ + interface IBackupVault { + + /** BackupVault name */ + name?: (string|null); + + /** BackupVault description */ + description?: (string|null); + + /** BackupVault labels */ + labels?: ({ [k: string]: string }|null); + + /** BackupVault createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupMinimumEnforcedRetentionDuration */ + backupMinimumEnforcedRetentionDuration?: (google.protobuf.IDuration|null); + + /** BackupVault deletable */ + deletable?: (boolean|null); + + /** BackupVault etag */ + etag?: (string|null); + + /** BackupVault state */ + state?: (google.cloud.backupdr.v1.BackupVault.State|keyof typeof google.cloud.backupdr.v1.BackupVault.State|null); + + /** BackupVault effectiveTime */ + effectiveTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupCount */ + backupCount?: (number|Long|string|null); + + /** BackupVault serviceAccount */ + serviceAccount?: (string|null); + + /** BackupVault totalStoredBytes */ + totalStoredBytes?: (number|Long|string|null); + + /** BackupVault uid */ + uid?: (string|null); + + /** BackupVault annotations */ + annotations?: ({ [k: string]: string }|null); + + /** BackupVault accessRestriction */ + accessRestriction?: (google.cloud.backupdr.v1.BackupVault.AccessRestriction|keyof typeof google.cloud.backupdr.v1.BackupVault.AccessRestriction|null); + } + + /** Represents a BackupVault. */ + class BackupVault implements IBackupVault { + + /** + * Constructs a new BackupVault. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupVault); + + /** BackupVault name. */ + public name: string; + + /** BackupVault description. */ + public description?: (string|null); + + /** BackupVault labels. */ + public labels: { [k: string]: string }; + + /** BackupVault createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupMinimumEnforcedRetentionDuration. */ + public backupMinimumEnforcedRetentionDuration?: (google.protobuf.IDuration|null); + + /** BackupVault deletable. */ + public deletable?: (boolean|null); + + /** BackupVault etag. */ + public etag?: (string|null); + + /** BackupVault state. */ + public state: (google.cloud.backupdr.v1.BackupVault.State|keyof typeof google.cloud.backupdr.v1.BackupVault.State); + + /** BackupVault effectiveTime. */ + public effectiveTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupCount. */ + public backupCount: (number|Long|string); + + /** BackupVault serviceAccount. */ + public serviceAccount: string; + + /** BackupVault totalStoredBytes. */ + public totalStoredBytes: (number|Long|string); + + /** BackupVault uid. */ + public uid: string; + + /** BackupVault annotations. */ + public annotations: { [k: string]: string }; + + /** BackupVault accessRestriction. */ + public accessRestriction: (google.cloud.backupdr.v1.BackupVault.AccessRestriction|keyof typeof google.cloud.backupdr.v1.BackupVault.AccessRestriction); + + /** BackupVault _description. */ + public _description?: "description"; + + /** BackupVault _createTime. */ + public _createTime?: "createTime"; + + /** BackupVault _updateTime. */ + public _updateTime?: "updateTime"; + + /** BackupVault _backupMinimumEnforcedRetentionDuration. */ + public _backupMinimumEnforcedRetentionDuration?: "backupMinimumEnforcedRetentionDuration"; + + /** BackupVault _deletable. */ + public _deletable?: "deletable"; + + /** BackupVault _etag. */ + public _etag?: "etag"; + + /** BackupVault _effectiveTime. */ + public _effectiveTime?: "effectiveTime"; + + /** + * Creates a new BackupVault instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupVault instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupVault): google.cloud.backupdr.v1.BackupVault; + + /** + * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. + * @param message BackupVault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupVault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. + * @param message BackupVault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupVault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupVault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupVault; + + /** + * Decodes a BackupVault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupVault; + + /** + * Verifies a BackupVault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupVault + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupVault; + + /** + * Creates a plain object from a BackupVault message. Also converts values to other types if specified. + * @param message BackupVault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupVault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupVault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupVault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupVault { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + ERROR = 4 + } + + /** AccessRestriction enum. */ + enum AccessRestriction { + ACCESS_RESTRICTION_UNSPECIFIED = 0, + WITHIN_PROJECT = 1, + WITHIN_ORGANIZATION = 2, + UNRESTRICTED = 3 + } + } + + /** Properties of a DataSource. */ + interface IDataSource { + + /** DataSource name */ + name?: (string|null); + + /** DataSource state */ + state?: (google.cloud.backupdr.v1.DataSource.State|keyof typeof google.cloud.backupdr.v1.DataSource.State|null); + + /** DataSource labels */ + labels?: ({ [k: string]: string }|null); + + /** DataSource createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataSource updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DataSource backupCount */ + backupCount?: (number|Long|string|null); + + /** DataSource etag */ + etag?: (string|null); + + /** DataSource totalStoredBytes */ + totalStoredBytes?: (number|Long|string|null); + + /** DataSource configState */ + configState?: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState|null); + + /** DataSource backupConfigInfo */ + backupConfigInfo?: (google.cloud.backupdr.v1.IBackupConfigInfo|null); + + /** DataSource dataSourceGcpResource */ + dataSourceGcpResource?: (google.cloud.backupdr.v1.IDataSourceGcpResource|null); + + /** DataSource dataSourceBackupApplianceApplication */ + dataSourceBackupApplianceApplication?: (google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null); + } + + /** Represents a DataSource. */ + class DataSource implements IDataSource { + + /** + * Constructs a new DataSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDataSource); + + /** DataSource name. */ + public name: string; + + /** DataSource state. */ + public state: (google.cloud.backupdr.v1.DataSource.State|keyof typeof google.cloud.backupdr.v1.DataSource.State); + + /** DataSource labels. */ + public labels: { [k: string]: string }; + + /** DataSource createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataSource updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DataSource backupCount. */ + public backupCount?: (number|Long|string|null); + + /** DataSource etag. */ + public etag?: (string|null); + + /** DataSource totalStoredBytes. */ + public totalStoredBytes?: (number|Long|string|null); + + /** DataSource configState. */ + public configState: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState); + + /** DataSource backupConfigInfo. */ + public backupConfigInfo?: (google.cloud.backupdr.v1.IBackupConfigInfo|null); + + /** DataSource dataSourceGcpResource. */ + public dataSourceGcpResource?: (google.cloud.backupdr.v1.IDataSourceGcpResource|null); + + /** DataSource dataSourceBackupApplianceApplication. */ + public dataSourceBackupApplianceApplication?: (google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null); + + /** DataSource _createTime. */ + public _createTime?: "createTime"; + + /** DataSource _updateTime. */ + public _updateTime?: "updateTime"; + + /** DataSource _backupCount. */ + public _backupCount?: "backupCount"; + + /** DataSource _etag. */ + public _etag?: "etag"; + + /** DataSource _totalStoredBytes. */ + public _totalStoredBytes?: "totalStoredBytes"; + + /** DataSource sourceResource. */ + public sourceResource?: ("dataSourceGcpResource"|"dataSourceBackupApplianceApplication"); + + /** + * Creates a new DataSource instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSource instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDataSource): google.cloud.backupdr.v1.DataSource; + + /** + * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. + * @param message DataSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. + * @param message DataSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSource; + + /** + * Decodes a DataSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSource; + + /** + * Verifies a DataSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSource; + + /** + * Creates a plain object from a DataSource message. Also converts values to other types if specified. + * @param message DataSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DataSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataSource { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + ERROR = 4 + } + } + + /** Properties of a BackupConfigInfo. */ + interface IBackupConfigInfo { + + /** BackupConfigInfo lastBackupState */ + lastBackupState?: (google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|null); + + /** BackupConfigInfo lastSuccessfulBackupConsistencyTime */ + lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + + /** BackupConfigInfo lastBackupError */ + lastBackupError?: (google.rpc.IStatus|null); + + /** BackupConfigInfo gcpBackupConfig */ + gcpBackupConfig?: (google.cloud.backupdr.v1.IGcpBackupConfig|null); + + /** BackupConfigInfo backupApplianceBackupConfig */ + backupApplianceBackupConfig?: (google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null); + } + + /** Represents a BackupConfigInfo. */ + class BackupConfigInfo implements IBackupConfigInfo { + + /** + * Constructs a new BackupConfigInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupConfigInfo); + + /** BackupConfigInfo lastBackupState. */ + public lastBackupState: (google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState); + + /** BackupConfigInfo lastSuccessfulBackupConsistencyTime. */ + public lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + + /** BackupConfigInfo lastBackupError. */ + public lastBackupError?: (google.rpc.IStatus|null); + + /** BackupConfigInfo gcpBackupConfig. */ + public gcpBackupConfig?: (google.cloud.backupdr.v1.IGcpBackupConfig|null); + + /** BackupConfigInfo backupApplianceBackupConfig. */ + public backupApplianceBackupConfig?: (google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null); + + /** BackupConfigInfo backupConfig. */ + public backupConfig?: ("gcpBackupConfig"|"backupApplianceBackupConfig"); + + /** + * Creates a new BackupConfigInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupConfigInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupConfigInfo): google.cloud.backupdr.v1.BackupConfigInfo; + + /** + * Encodes the specified BackupConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. + * @param message BackupConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. + * @param message BackupConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupConfigInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupConfigInfo; + + /** + * Decodes a BackupConfigInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupConfigInfo; + + /** + * Verifies a BackupConfigInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupConfigInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupConfigInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupConfigInfo; + + /** + * Creates a plain object from a BackupConfigInfo message. Also converts values to other types if specified. + * @param message BackupConfigInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupConfigInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupConfigInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupConfigInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupConfigInfo { + + /** LastBackupState enum. */ + enum LastBackupState { + LAST_BACKUP_STATE_UNSPECIFIED = 0, + FIRST_BACKUP_PENDING = 1, + SUCCEEDED = 2, + FAILED = 3, + PERMISSION_DENIED = 4 + } + } + + /** Properties of a GcpBackupConfig. */ + interface IGcpBackupConfig { + + /** GcpBackupConfig backupPlan */ + backupPlan?: (string|null); + + /** GcpBackupConfig backupPlanDescription */ + backupPlanDescription?: (string|null); + + /** GcpBackupConfig backupPlanAssociation */ + backupPlanAssociation?: (string|null); + + /** GcpBackupConfig backupPlanRules */ + backupPlanRules?: (string[]|null); + } + + /** Represents a GcpBackupConfig. */ + class GcpBackupConfig implements IGcpBackupConfig { + + /** + * Constructs a new GcpBackupConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGcpBackupConfig); + + /** GcpBackupConfig backupPlan. */ + public backupPlan: string; + + /** GcpBackupConfig backupPlanDescription. */ + public backupPlanDescription: string; + + /** GcpBackupConfig backupPlanAssociation. */ + public backupPlanAssociation: string; + + /** GcpBackupConfig backupPlanRules. */ + public backupPlanRules: string[]; + + /** + * Creates a new GcpBackupConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GcpBackupConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGcpBackupConfig): google.cloud.backupdr.v1.GcpBackupConfig; + + /** + * Encodes the specified GcpBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * @param message GcpBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGcpBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcpBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * @param message GcpBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGcpBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcpBackupConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcpBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GcpBackupConfig; + + /** + * Decodes a GcpBackupConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcpBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GcpBackupConfig; + + /** + * Verifies a GcpBackupConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcpBackupConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcpBackupConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GcpBackupConfig; + + /** + * Creates a plain object from a GcpBackupConfig message. Also converts values to other types if specified. + * @param message GcpBackupConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GcpBackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcpBackupConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcpBackupConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupApplianceBackupConfig. */ + interface IBackupApplianceBackupConfig { + + /** BackupApplianceBackupConfig backupApplianceName */ + backupApplianceName?: (string|null); + + /** BackupApplianceBackupConfig backupApplianceId */ + backupApplianceId?: (number|Long|string|null); + + /** BackupApplianceBackupConfig slaId */ + slaId?: (number|Long|string|null); + + /** BackupApplianceBackupConfig applicationName */ + applicationName?: (string|null); + + /** BackupApplianceBackupConfig hostName */ + hostName?: (string|null); + + /** BackupApplianceBackupConfig sltName */ + sltName?: (string|null); + + /** BackupApplianceBackupConfig slpName */ + slpName?: (string|null); + } + + /** Represents a BackupApplianceBackupConfig. */ + class BackupApplianceBackupConfig implements IBackupApplianceBackupConfig { + + /** + * Constructs a new BackupApplianceBackupConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupConfig); + + /** BackupApplianceBackupConfig backupApplianceName. */ + public backupApplianceName: string; + + /** BackupApplianceBackupConfig backupApplianceId. */ + public backupApplianceId: (number|Long|string); + + /** BackupApplianceBackupConfig slaId. */ + public slaId: (number|Long|string); + + /** BackupApplianceBackupConfig applicationName. */ + public applicationName: string; + + /** BackupApplianceBackupConfig hostName. */ + public hostName: string; + + /** BackupApplianceBackupConfig sltName. */ + public sltName: string; + + /** BackupApplianceBackupConfig slpName. */ + public slpName: string; + + /** + * Creates a new BackupApplianceBackupConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupApplianceBackupConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupConfig): google.cloud.backupdr.v1.BackupApplianceBackupConfig; + + /** + * Encodes the specified BackupApplianceBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. + * @param message BackupApplianceBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupApplianceBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupApplianceBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. + * @param message BackupApplianceBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupApplianceBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceBackupConfig; + + /** + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupApplianceBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceBackupConfig; + + /** + * Verifies a BackupApplianceBackupConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupApplianceBackupConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupApplianceBackupConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceBackupConfig; + + /** + * Creates a plain object from a BackupApplianceBackupConfig message. Also converts values to other types if specified. + * @param message BackupApplianceBackupConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupApplianceBackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupApplianceBackupConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupApplianceBackupConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataSourceGcpResource. */ + interface IDataSourceGcpResource { + + /** DataSourceGcpResource gcpResourcename */ + gcpResourcename?: (string|null); + + /** DataSourceGcpResource location */ + location?: (string|null); + + /** DataSourceGcpResource type */ + type?: (string|null); + + /** DataSourceGcpResource computeInstanceDatasourceProperties */ + computeInstanceDatasourceProperties?: (google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null); + } + + /** Represents a DataSourceGcpResource. */ + class DataSourceGcpResource implements IDataSourceGcpResource { + + /** + * Constructs a new DataSourceGcpResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDataSourceGcpResource); + + /** DataSourceGcpResource gcpResourcename. */ + public gcpResourcename: string; + + /** DataSourceGcpResource location. */ + public location: string; + + /** DataSourceGcpResource type. */ + public type: string; + + /** DataSourceGcpResource computeInstanceDatasourceProperties. */ + public computeInstanceDatasourceProperties?: (google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null); + + /** DataSourceGcpResource gcpResourceProperties. */ + public gcpResourceProperties?: "computeInstanceDatasourceProperties"; + + /** + * Creates a new DataSourceGcpResource instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSourceGcpResource instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDataSourceGcpResource): google.cloud.backupdr.v1.DataSourceGcpResource; + + /** + * Encodes the specified DataSourceGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * @param message DataSourceGcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDataSourceGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSourceGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * @param message DataSourceGcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSourceGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSourceGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSourceGcpResource; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSourceGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSourceGcpResource; + + /** + * Verifies a DataSourceGcpResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSourceGcpResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSourceGcpResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSourceGcpResource; + + /** + * Creates a plain object from a DataSourceGcpResource message. Also converts values to other types if specified. + * @param message DataSourceGcpResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DataSourceGcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSourceGcpResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSourceGcpResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataSourceBackupApplianceApplication. */ + interface IDataSourceBackupApplianceApplication { + + /** DataSourceBackupApplianceApplication applicationName */ + applicationName?: (string|null); + + /** DataSourceBackupApplianceApplication backupAppliance */ + backupAppliance?: (string|null); + + /** DataSourceBackupApplianceApplication applianceId */ + applianceId?: (number|Long|string|null); + + /** DataSourceBackupApplianceApplication type */ + type?: (string|null); + + /** DataSourceBackupApplianceApplication applicationId */ + applicationId?: (number|Long|string|null); + + /** DataSourceBackupApplianceApplication hostname */ + hostname?: (string|null); + + /** DataSourceBackupApplianceApplication hostId */ + hostId?: (number|Long|string|null); + } + + /** Represents a DataSourceBackupApplianceApplication. */ + class DataSourceBackupApplianceApplication implements IDataSourceBackupApplianceApplication { + + /** + * Constructs a new DataSourceBackupApplianceApplication. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication); + + /** DataSourceBackupApplianceApplication applicationName. */ + public applicationName: string; + + /** DataSourceBackupApplianceApplication backupAppliance. */ + public backupAppliance: string; + + /** DataSourceBackupApplianceApplication applianceId. */ + public applianceId: (number|Long|string); + + /** DataSourceBackupApplianceApplication type. */ + public type: string; + + /** DataSourceBackupApplianceApplication applicationId. */ + public applicationId: (number|Long|string); + + /** DataSourceBackupApplianceApplication hostname. */ + public hostname: string; + + /** DataSourceBackupApplianceApplication hostId. */ + public hostId: (number|Long|string); + + /** + * Creates a new DataSourceBackupApplianceApplication instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSourceBackupApplianceApplication instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; + + /** + * Encodes the specified DataSourceBackupApplianceApplication message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. + * @param message DataSourceBackupApplianceApplication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSourceBackupApplianceApplication message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. + * @param message DataSourceBackupApplianceApplication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSourceBackupApplianceApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; + + /** + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSourceBackupApplianceApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; + + /** + * Verifies a DataSourceBackupApplianceApplication message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSourceBackupApplianceApplication message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSourceBackupApplianceApplication + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; + + /** + * Creates a plain object from a DataSourceBackupApplianceApplication message. Also converts values to other types if specified. + * @param message DataSourceBackupApplianceApplication + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DataSourceBackupApplianceApplication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSourceBackupApplianceApplication to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSourceBackupApplianceApplication + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceLockInfo. */ + interface IServiceLockInfo { + + /** ServiceLockInfo operation */ + operation?: (string|null); + } + + /** Represents a ServiceLockInfo. */ + class ServiceLockInfo implements IServiceLockInfo { + + /** + * Constructs a new ServiceLockInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IServiceLockInfo); + + /** ServiceLockInfo operation. */ + public operation: string; + + /** + * Creates a new ServiceLockInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceLockInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.IServiceLockInfo): google.cloud.backupdr.v1.ServiceLockInfo; + + /** + * Encodes the specified ServiceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. + * @param message ServiceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IServiceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. + * @param message ServiceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IServiceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceLockInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ServiceLockInfo; + + /** + * Decodes a ServiceLockInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ServiceLockInfo; + + /** + * Verifies a ServiceLockInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceLockInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceLockInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ServiceLockInfo; + + /** + * Creates a plain object from a ServiceLockInfo message. Also converts values to other types if specified. + * @param message ServiceLockInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ServiceLockInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceLockInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceLockInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupApplianceLockInfo. */ + interface IBackupApplianceLockInfo { + + /** BackupApplianceLockInfo backupApplianceId */ + backupApplianceId?: (number|Long|string|null); + + /** BackupApplianceLockInfo backupApplianceName */ + backupApplianceName?: (string|null); + + /** BackupApplianceLockInfo lockReason */ + lockReason?: (string|null); + + /** BackupApplianceLockInfo jobName */ + jobName?: (string|null); + + /** BackupApplianceLockInfo backupImage */ + backupImage?: (string|null); + + /** BackupApplianceLockInfo slaId */ + slaId?: (number|Long|string|null); + } + + /** Represents a BackupApplianceLockInfo. */ + class BackupApplianceLockInfo implements IBackupApplianceLockInfo { + + /** + * Constructs a new BackupApplianceLockInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceLockInfo); + + /** BackupApplianceLockInfo backupApplianceId. */ + public backupApplianceId: (number|Long|string); + + /** BackupApplianceLockInfo backupApplianceName. */ + public backupApplianceName: string; + + /** BackupApplianceLockInfo lockReason. */ + public lockReason: string; + + /** BackupApplianceLockInfo jobName. */ + public jobName?: (string|null); + + /** BackupApplianceLockInfo backupImage. */ + public backupImage?: (string|null); + + /** BackupApplianceLockInfo slaId. */ + public slaId?: (number|Long|string|null); + + /** BackupApplianceLockInfo lockSource. */ + public lockSource?: ("jobName"|"backupImage"|"slaId"); + + /** + * Creates a new BackupApplianceLockInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupApplianceLockInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceLockInfo): google.cloud.backupdr.v1.BackupApplianceLockInfo; + + /** + * Encodes the specified BackupApplianceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * @param message BackupApplianceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupApplianceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupApplianceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * @param message BackupApplianceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupApplianceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceLockInfo; + + /** + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupApplianceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceLockInfo; + + /** + * Verifies a BackupApplianceLockInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupApplianceLockInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupApplianceLockInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceLockInfo; + + /** + * Creates a plain object from a BackupApplianceLockInfo message. Also converts values to other types if specified. + * @param message BackupApplianceLockInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupApplianceLockInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupApplianceLockInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupApplianceLockInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupLock. */ + interface IBackupLock { + + /** BackupLock lockUntilTime */ + lockUntilTime?: (google.protobuf.ITimestamp|null); + + /** BackupLock backupApplianceLockInfo */ + backupApplianceLockInfo?: (google.cloud.backupdr.v1.IBackupApplianceLockInfo|null); + + /** BackupLock serviceLockInfo */ + serviceLockInfo?: (google.cloud.backupdr.v1.IServiceLockInfo|null); + } + + /** Represents a BackupLock. */ + class BackupLock implements IBackupLock { + + /** + * Constructs a new BackupLock. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupLock); + + /** BackupLock lockUntilTime. */ + public lockUntilTime?: (google.protobuf.ITimestamp|null); + + /** BackupLock backupApplianceLockInfo. */ + public backupApplianceLockInfo?: (google.cloud.backupdr.v1.IBackupApplianceLockInfo|null); + + /** BackupLock serviceLockInfo. */ + public serviceLockInfo?: (google.cloud.backupdr.v1.IServiceLockInfo|null); + + /** BackupLock ClientLockInfo. */ + public ClientLockInfo?: ("backupApplianceLockInfo"|"serviceLockInfo"); + + /** + * Creates a new BackupLock instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupLock instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupLock): google.cloud.backupdr.v1.BackupLock; + + /** + * Encodes the specified BackupLock message. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. + * @param message BackupLock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupLock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupLock message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. + * @param message BackupLock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupLock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupLock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupLock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupLock; + + /** + * Decodes a BackupLock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupLock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupLock; + + /** + * Verifies a BackupLock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupLock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupLock + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupLock; + + /** + * Creates a plain object from a BackupLock message. Also converts values to other types if specified. + * @param message BackupLock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupLock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupLock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupLock + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Backup. */ + interface IBackup { + + /** Backup name */ + name?: (string|null); + + /** Backup description */ + description?: (string|null); + + /** Backup createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Backup updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Backup labels */ + labels?: ({ [k: string]: string }|null); + + /** Backup enforcedRetentionEndTime */ + enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); + + /** Backup expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + + /** Backup consistencyTime */ + consistencyTime?: (google.protobuf.ITimestamp|null); + + /** Backup etag */ + etag?: (string|null); + + /** Backup state */ + state?: (google.cloud.backupdr.v1.Backup.State|keyof typeof google.cloud.backupdr.v1.Backup.State|null); + + /** Backup serviceLocks */ + serviceLocks?: (google.cloud.backupdr.v1.IBackupLock[]|null); + + /** Backup backupApplianceLocks */ + backupApplianceLocks?: (google.cloud.backupdr.v1.IBackupLock[]|null); + + /** Backup computeInstanceBackupProperties */ + computeInstanceBackupProperties?: (google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null); + + /** Backup backupApplianceBackupProperties */ + backupApplianceBackupProperties?: (google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null); + + /** Backup backupType */ + backupType?: (google.cloud.backupdr.v1.Backup.BackupType|keyof typeof google.cloud.backupdr.v1.Backup.BackupType|null); + + /** Backup gcpBackupPlanInfo */ + gcpBackupPlanInfo?: (google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null); + + /** Backup resourceSizeBytes */ + resourceSizeBytes?: (number|Long|string|null); + } + + /** Represents a Backup. */ + class Backup implements IBackup { + + /** + * Constructs a new Backup. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackup); + + /** Backup name. */ + public name: string; + + /** Backup description. */ + public description?: (string|null); + + /** Backup createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Backup updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Backup labels. */ + public labels: { [k: string]: string }; + + /** Backup enforcedRetentionEndTime. */ + public enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); + + /** Backup expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** Backup consistencyTime. */ + public consistencyTime?: (google.protobuf.ITimestamp|null); + + /** Backup etag. */ + public etag?: (string|null); + + /** Backup state. */ + public state: (google.cloud.backupdr.v1.Backup.State|keyof typeof google.cloud.backupdr.v1.Backup.State); + + /** Backup serviceLocks. */ + public serviceLocks: google.cloud.backupdr.v1.IBackupLock[]; + + /** Backup backupApplianceLocks. */ + public backupApplianceLocks: google.cloud.backupdr.v1.IBackupLock[]; + + /** Backup computeInstanceBackupProperties. */ + public computeInstanceBackupProperties?: (google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null); + + /** Backup backupApplianceBackupProperties. */ + public backupApplianceBackupProperties?: (google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null); + + /** Backup backupType. */ + public backupType: (google.cloud.backupdr.v1.Backup.BackupType|keyof typeof google.cloud.backupdr.v1.Backup.BackupType); + + /** Backup gcpBackupPlanInfo. */ + public gcpBackupPlanInfo?: (google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null); + + /** Backup resourceSizeBytes. */ + public resourceSizeBytes: (number|Long|string); + + /** Backup _description. */ + public _description?: "description"; + + /** Backup _createTime. */ + public _createTime?: "createTime"; + + /** Backup _updateTime. */ + public _updateTime?: "updateTime"; + + /** Backup _enforcedRetentionEndTime. */ + public _enforcedRetentionEndTime?: "enforcedRetentionEndTime"; + + /** Backup _expireTime. */ + public _expireTime?: "expireTime"; + + /** Backup _consistencyTime. */ + public _consistencyTime?: "consistencyTime"; + + /** Backup _etag. */ + public _etag?: "etag"; + + /** Backup backupProperties. */ + public backupProperties?: ("computeInstanceBackupProperties"|"backupApplianceBackupProperties"); + + /** Backup planInfo. */ + public planInfo?: "gcpBackupPlanInfo"; + + /** + * Creates a new Backup instance using the specified properties. + * @param [properties] Properties to set + * @returns Backup instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackup): google.cloud.backupdr.v1.Backup; + + /** + * Encodes the specified Backup message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Backup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Backup; + + /** + * Decodes a Backup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Backup; + + /** + * Verifies a Backup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Backup + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Backup; + + /** + * Creates a plain object from a Backup message. Also converts values to other types if specified. + * @param message Backup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Backup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Backup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Backup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Backup { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + ERROR = 4 + } + + /** BackupType enum. */ + enum BackupType { + BACKUP_TYPE_UNSPECIFIED = 0, + SCHEDULED = 1, + ON_DEMAND = 2 + } + + /** Properties of a GCPBackupPlanInfo. */ + interface IGCPBackupPlanInfo { + + /** GCPBackupPlanInfo backupPlan */ + backupPlan?: (string|null); + + /** GCPBackupPlanInfo backupPlanRuleId */ + backupPlanRuleId?: (string|null); + } + + /** Represents a GCPBackupPlanInfo. */ + class GCPBackupPlanInfo implements IGCPBackupPlanInfo { + + /** + * Constructs a new GCPBackupPlanInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo); + + /** GCPBackupPlanInfo backupPlan. */ + public backupPlan: string; + + /** GCPBackupPlanInfo backupPlanRuleId. */ + public backupPlanRuleId: string; + + /** + * Creates a new GCPBackupPlanInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GCPBackupPlanInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; + + /** + * Encodes the specified GCPBackupPlanInfo message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @param message GCPBackupPlanInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GCPBackupPlanInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @param message GCPBackupPlanInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GCPBackupPlanInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; + + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GCPBackupPlanInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; + + /** + * Verifies a GCPBackupPlanInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GCPBackupPlanInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GCPBackupPlanInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; + + /** + * Creates a plain object from a GCPBackupPlanInfo message. Also converts values to other types if specified. + * @param message GCPBackupPlanInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GCPBackupPlanInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GCPBackupPlanInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateBackupVaultRequest. */ + interface ICreateBackupVaultRequest { + + /** CreateBackupVaultRequest parent */ + parent?: (string|null); + + /** CreateBackupVaultRequest backupVaultId */ + backupVaultId?: (string|null); + + /** CreateBackupVaultRequest backupVault */ + backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); + + /** CreateBackupVaultRequest requestId */ + requestId?: (string|null); + + /** CreateBackupVaultRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateBackupVaultRequest. */ + class CreateBackupVaultRequest implements ICreateBackupVaultRequest { + + /** + * Constructs a new CreateBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICreateBackupVaultRequest); + + /** CreateBackupVaultRequest parent. */ + public parent: string; + + /** CreateBackupVaultRequest backupVaultId. */ + public backupVaultId: string; + + /** CreateBackupVaultRequest backupVault. */ + public backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); + + /** CreateBackupVaultRequest requestId. */ + public requestId: string; + + /** CreateBackupVaultRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICreateBackupVaultRequest): google.cloud.backupdr.v1.CreateBackupVaultRequest; + + /** + * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. + * @param message CreateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICreateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. + * @param message CreateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupVaultRequest; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupVaultRequest; + + /** + * Verifies a CreateBackupVaultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupVaultRequest; + + /** + * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. + * @param message CreateBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CreateBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupVaultsRequest. */ + interface IListBackupVaultsRequest { + + /** ListBackupVaultsRequest parent */ + parent?: (string|null); + + /** ListBackupVaultsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupVaultsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupVaultsRequest filter */ + filter?: (string|null); + + /** ListBackupVaultsRequest orderBy */ + orderBy?: (string|null); + + /** ListBackupVaultsRequest view */ + view?: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView|null); + } + + /** Represents a ListBackupVaultsRequest. */ + class ListBackupVaultsRequest implements IListBackupVaultsRequest { + + /** + * Constructs a new ListBackupVaultsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupVaultsRequest); + + /** ListBackupVaultsRequest parent. */ + public parent: string; + + /** ListBackupVaultsRequest pageSize. */ + public pageSize: number; + + /** ListBackupVaultsRequest pageToken. */ + public pageToken: string; + + /** ListBackupVaultsRequest filter. */ + public filter: string; + + /** ListBackupVaultsRequest orderBy. */ + public orderBy: string; + + /** ListBackupVaultsRequest view. */ + public view: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView); + + /** + * Creates a new ListBackupVaultsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupVaultsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupVaultsRequest): google.cloud.backupdr.v1.ListBackupVaultsRequest; + + /** + * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. + * @param message ListBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. + * @param message ListBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupVaultsRequest; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupVaultsRequest; + + /** + * Verifies a ListBackupVaultsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupVaultsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupVaultsRequest; + + /** + * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. + * @param message ListBackupVaultsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupVaultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupVaultsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupVaultsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupVaultsResponse. */ + interface IListBackupVaultsResponse { + + /** ListBackupVaultsResponse backupVaults */ + backupVaults?: (google.cloud.backupdr.v1.IBackupVault[]|null); + + /** ListBackupVaultsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupVaultsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupVaultsResponse. */ + class ListBackupVaultsResponse implements IListBackupVaultsResponse { + + /** + * Constructs a new ListBackupVaultsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupVaultsResponse); + + /** ListBackupVaultsResponse backupVaults. */ + public backupVaults: google.cloud.backupdr.v1.IBackupVault[]; + + /** ListBackupVaultsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupVaultsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupVaultsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupVaultsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupVaultsResponse): google.cloud.backupdr.v1.ListBackupVaultsResponse; + + /** + * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. + * @param message ListBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. + * @param message ListBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupVaultsResponse; + + /** + * Decodes a ListBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupVaultsResponse; + + /** + * Verifies a ListBackupVaultsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupVaultsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupVaultsResponse; + + /** + * Creates a plain object from a ListBackupVaultsResponse message. Also converts values to other types if specified. + * @param message ListBackupVaultsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupVaultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupVaultsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupVaultsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchUsableBackupVaultsRequest. */ + interface IFetchUsableBackupVaultsRequest { + + /** FetchUsableBackupVaultsRequest parent */ + parent?: (string|null); + + /** FetchUsableBackupVaultsRequest pageSize */ + pageSize?: (number|null); + + /** FetchUsableBackupVaultsRequest pageToken */ + pageToken?: (string|null); + + /** FetchUsableBackupVaultsRequest filter */ + filter?: (string|null); + + /** FetchUsableBackupVaultsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a FetchUsableBackupVaultsRequest. */ + class FetchUsableBackupVaultsRequest implements IFetchUsableBackupVaultsRequest { + + /** + * Constructs a new FetchUsableBackupVaultsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest); + + /** FetchUsableBackupVaultsRequest parent. */ + public parent: string; + + /** FetchUsableBackupVaultsRequest pageSize. */ + public pageSize: number; + + /** FetchUsableBackupVaultsRequest pageToken. */ + public pageToken: string; + + /** FetchUsableBackupVaultsRequest filter. */ + public filter: string; + + /** FetchUsableBackupVaultsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new FetchUsableBackupVaultsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchUsableBackupVaultsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; + + /** + * Encodes the specified FetchUsableBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. + * @param message FetchUsableBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchUsableBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. + * @param message FetchUsableBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchUsableBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; + + /** + * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchUsableBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; + + /** + * Verifies a FetchUsableBackupVaultsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchUsableBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchUsableBackupVaultsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; + + /** + * Creates a plain object from a FetchUsableBackupVaultsRequest message. Also converts values to other types if specified. + * @param message FetchUsableBackupVaultsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchUsableBackupVaultsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchUsableBackupVaultsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchUsableBackupVaultsResponse. */ + interface IFetchUsableBackupVaultsResponse { + + /** FetchUsableBackupVaultsResponse backupVaults */ + backupVaults?: (google.cloud.backupdr.v1.IBackupVault[]|null); + + /** FetchUsableBackupVaultsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** FetchUsableBackupVaultsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a FetchUsableBackupVaultsResponse. */ + class FetchUsableBackupVaultsResponse implements IFetchUsableBackupVaultsResponse { + + /** + * Constructs a new FetchUsableBackupVaultsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse); + + /** FetchUsableBackupVaultsResponse backupVaults. */ + public backupVaults: google.cloud.backupdr.v1.IBackupVault[]; + + /** FetchUsableBackupVaultsResponse nextPageToken. */ + public nextPageToken: string; + + /** FetchUsableBackupVaultsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new FetchUsableBackupVaultsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchUsableBackupVaultsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; + + /** + * Encodes the specified FetchUsableBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. + * @param message FetchUsableBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchUsableBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. + * @param message FetchUsableBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchUsableBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; + + /** + * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchUsableBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; + + /** + * Verifies a FetchUsableBackupVaultsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchUsableBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchUsableBackupVaultsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; + + /** + * Creates a plain object from a FetchUsableBackupVaultsResponse message. Also converts values to other types if specified. + * @param message FetchUsableBackupVaultsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchUsableBackupVaultsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchUsableBackupVaultsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupVaultRequest. */ + interface IGetBackupVaultRequest { + + /** GetBackupVaultRequest name */ + name?: (string|null); + + /** GetBackupVaultRequest view */ + view?: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView|null); + } + + /** Represents a GetBackupVaultRequest. */ + class GetBackupVaultRequest implements IGetBackupVaultRequest { + + /** + * Constructs a new GetBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetBackupVaultRequest); + + /** GetBackupVaultRequest name. */ + public name: string; + + /** GetBackupVaultRequest view. */ + public view: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView); + + /** + * Creates a new GetBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetBackupVaultRequest): google.cloud.backupdr.v1.GetBackupVaultRequest; + + /** + * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. + * @param message GetBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. + * @param message GetBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupVaultRequest; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupVaultRequest; + + /** + * Verifies a GetBackupVaultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupVaultRequest; + + /** + * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. + * @param message GetBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateBackupVaultRequest. */ + interface IUpdateBackupVaultRequest { + + /** UpdateBackupVaultRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupVaultRequest backupVault */ + backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); + + /** UpdateBackupVaultRequest requestId */ + requestId?: (string|null); + + /** UpdateBackupVaultRequest validateOnly */ + validateOnly?: (boolean|null); + + /** UpdateBackupVaultRequest force */ + force?: (boolean|null); + } + + /** Represents an UpdateBackupVaultRequest. */ + class UpdateBackupVaultRequest implements IUpdateBackupVaultRequest { + + /** + * Constructs a new UpdateBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IUpdateBackupVaultRequest); + + /** UpdateBackupVaultRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupVaultRequest backupVault. */ + public backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); + + /** UpdateBackupVaultRequest requestId. */ + public requestId: string; + + /** UpdateBackupVaultRequest validateOnly. */ + public validateOnly: boolean; + + /** UpdateBackupVaultRequest force. */ + public force: boolean; + + /** + * Creates a new UpdateBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IUpdateBackupVaultRequest): google.cloud.backupdr.v1.UpdateBackupVaultRequest; + + /** + * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. + * @param message UpdateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. + * @param message UpdateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateBackupVaultRequest; + + /** + * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateBackupVaultRequest; + + /** + * Verifies an UpdateBackupVaultRequest message. + * @param message Plain 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 UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateBackupVaultRequest; + + /** + * Creates a plain object from an UpdateBackupVaultRequest message. Also converts values to other types if specified. + * @param message UpdateBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.UpdateBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupVaultRequest. */ + interface IDeleteBackupVaultRequest { + + /** DeleteBackupVaultRequest name */ + name?: (string|null); + + /** DeleteBackupVaultRequest requestId */ + requestId?: (string|null); + + /** DeleteBackupVaultRequest force */ + force?: (boolean|null); + + /** DeleteBackupVaultRequest etag */ + etag?: (string|null); + + /** DeleteBackupVaultRequest validateOnly */ + validateOnly?: (boolean|null); + + /** DeleteBackupVaultRequest allowMissing */ + allowMissing?: (boolean|null); + } + + /** Represents a DeleteBackupVaultRequest. */ + class DeleteBackupVaultRequest implements IDeleteBackupVaultRequest { + + /** + * Constructs a new DeleteBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupVaultRequest); + + /** DeleteBackupVaultRequest name. */ + public name: string; + + /** DeleteBackupVaultRequest requestId. */ + public requestId: string; + + /** DeleteBackupVaultRequest force. */ + public force: boolean; + + /** DeleteBackupVaultRequest etag. */ + public etag: string; + + /** DeleteBackupVaultRequest validateOnly. */ + public validateOnly: boolean; + + /** DeleteBackupVaultRequest allowMissing. */ + public allowMissing: boolean; + + /** + * Creates a new DeleteBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupVaultRequest): google.cloud.backupdr.v1.DeleteBackupVaultRequest; + + /** + * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. + * @param message DeleteBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. + * @param message DeleteBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupVaultRequest; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupVaultRequest; + + /** + * Verifies a DeleteBackupVaultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupVaultRequest; + + /** + * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. + * @param message DeleteBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataSourcesRequest. */ + interface IListDataSourcesRequest { + + /** ListDataSourcesRequest parent */ + parent?: (string|null); + + /** ListDataSourcesRequest pageSize */ + pageSize?: (number|null); + + /** ListDataSourcesRequest pageToken */ + pageToken?: (string|null); + + /** ListDataSourcesRequest filter */ + filter?: (string|null); + + /** ListDataSourcesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListDataSourcesRequest. */ + class ListDataSourcesRequest implements IListDataSourcesRequest { + + /** + * Constructs a new ListDataSourcesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListDataSourcesRequest); + + /** ListDataSourcesRequest parent. */ + public parent: string; + + /** ListDataSourcesRequest pageSize. */ + public pageSize: number; + + /** ListDataSourcesRequest pageToken. */ + public pageToken: string; + + /** ListDataSourcesRequest filter. */ + public filter: string; + + /** ListDataSourcesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListDataSourcesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataSourcesRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListDataSourcesRequest): google.cloud.backupdr.v1.ListDataSourcesRequest; + + /** + * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. + * @param message ListDataSourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListDataSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. + * @param message ListDataSourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListDataSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataSourcesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListDataSourcesRequest; + + /** + * Decodes a ListDataSourcesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListDataSourcesRequest; + + /** + * Verifies a ListDataSourcesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataSourcesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListDataSourcesRequest; + + /** + * Creates a plain object from a ListDataSourcesRequest message. Also converts values to other types if specified. + * @param message ListDataSourcesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListDataSourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataSourcesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataSourcesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataSourcesResponse. */ + interface IListDataSourcesResponse { + + /** ListDataSourcesResponse dataSources */ + dataSources?: (google.cloud.backupdr.v1.IDataSource[]|null); + + /** ListDataSourcesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListDataSourcesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListDataSourcesResponse. */ + class ListDataSourcesResponse implements IListDataSourcesResponse { + + /** + * Constructs a new ListDataSourcesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListDataSourcesResponse); + + /** ListDataSourcesResponse dataSources. */ + public dataSources: google.cloud.backupdr.v1.IDataSource[]; + + /** ListDataSourcesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListDataSourcesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListDataSourcesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataSourcesResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListDataSourcesResponse): google.cloud.backupdr.v1.ListDataSourcesResponse; + + /** + * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. + * @param message ListDataSourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListDataSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. + * @param message ListDataSourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListDataSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataSourcesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListDataSourcesResponse; + + /** + * Decodes a ListDataSourcesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListDataSourcesResponse; + + /** + * Verifies a ListDataSourcesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataSourcesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListDataSourcesResponse; + + /** + * Creates a plain object from a ListDataSourcesResponse message. Also converts values to other types if specified. + * @param message ListDataSourcesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListDataSourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataSourcesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataSourcesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataSourceRequest. */ + interface IGetDataSourceRequest { + + /** GetDataSourceRequest name */ + name?: (string|null); + } + + /** Represents a GetDataSourceRequest. */ + class GetDataSourceRequest implements IGetDataSourceRequest { + + /** + * Constructs a new GetDataSourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetDataSourceRequest); + + /** GetDataSourceRequest name. */ + public name: string; + + /** + * Creates a new GetDataSourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataSourceRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetDataSourceRequest): google.cloud.backupdr.v1.GetDataSourceRequest; + + /** + * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. + * @param message GetDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. + * @param message GetDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataSourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetDataSourceRequest; + + /** + * Decodes a GetDataSourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetDataSourceRequest; + + /** + * Verifies a GetDataSourceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataSourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetDataSourceRequest; + + /** + * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. + * @param message GetDataSourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataSourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataSourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataSourceRequest. */ + interface IUpdateDataSourceRequest { + + /** UpdateDataSourceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataSourceRequest dataSource */ + dataSource?: (google.cloud.backupdr.v1.IDataSource|null); + + /** UpdateDataSourceRequest requestId */ + requestId?: (string|null); + + /** UpdateDataSourceRequest allowMissing */ + allowMissing?: (boolean|null); + } + + /** Represents an UpdateDataSourceRequest. */ + class UpdateDataSourceRequest implements IUpdateDataSourceRequest { + + /** + * Constructs a new UpdateDataSourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IUpdateDataSourceRequest); + + /** UpdateDataSourceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataSourceRequest dataSource. */ + public dataSource?: (google.cloud.backupdr.v1.IDataSource|null); + + /** UpdateDataSourceRequest requestId. */ + public requestId: string; + + /** UpdateDataSourceRequest allowMissing. */ + public allowMissing: boolean; + + /** + * Creates a new UpdateDataSourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataSourceRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IUpdateDataSourceRequest): google.cloud.backupdr.v1.UpdateDataSourceRequest; + + /** + * Encodes the specified UpdateDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. + * @param message UpdateDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IUpdateDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. + * @param message UpdateDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateDataSourceRequest; + + /** + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateDataSourceRequest; + + /** + * Verifies an UpdateDataSourceRequest message. + * @param message Plain 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 UpdateDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataSourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateDataSourceRequest; + + /** + * Creates a plain object from an UpdateDataSourceRequest message. Also converts values to other types if specified. + * @param message UpdateDataSourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.UpdateDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataSourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataSourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemoveDataSourceRequest. */ + interface IRemoveDataSourceRequest { + + /** RemoveDataSourceRequest name */ + name?: (string|null); + + /** RemoveDataSourceRequest requestId */ + requestId?: (string|null); + } + + /** Represents a RemoveDataSourceRequest. */ + class RemoveDataSourceRequest implements IRemoveDataSourceRequest { + + /** + * Constructs a new RemoveDataSourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IRemoveDataSourceRequest); + + /** RemoveDataSourceRequest name. */ + public name: string; + + /** RemoveDataSourceRequest requestId. */ + public requestId: string; + + /** + * Creates a new RemoveDataSourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveDataSourceRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IRemoveDataSourceRequest): google.cloud.backupdr.v1.RemoveDataSourceRequest; + + /** + * Encodes the specified RemoveDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. + * @param message RemoveDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IRemoveDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. + * @param message RemoveDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IRemoveDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveDataSourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RemoveDataSourceRequest; + + /** + * Decodes a RemoveDataSourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RemoveDataSourceRequest; + + /** + * Verifies a RemoveDataSourceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemoveDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveDataSourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RemoveDataSourceRequest; + + /** + * Creates a plain object from a RemoveDataSourceRequest message. Also converts values to other types if specified. + * @param message RemoveDataSourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.RemoveDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveDataSourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveDataSourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetInternalStatusRequest. */ + interface ISetInternalStatusRequest { + + /** SetInternalStatusRequest dataSource */ + dataSource?: (string|null); + + /** SetInternalStatusRequest value */ + value?: (Uint8Array|string|null); + + /** SetInternalStatusRequest backupConfigState */ + backupConfigState?: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState|null); + + /** SetInternalStatusRequest requestId */ + requestId?: (string|null); + } + + /** Represents a SetInternalStatusRequest. */ + class SetInternalStatusRequest implements ISetInternalStatusRequest { + + /** + * Constructs a new SetInternalStatusRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ISetInternalStatusRequest); + + /** SetInternalStatusRequest dataSource. */ + public dataSource: string; + + /** SetInternalStatusRequest value. */ + public value: (Uint8Array|string); + + /** SetInternalStatusRequest backupConfigState. */ + public backupConfigState: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState); + + /** SetInternalStatusRequest requestId. */ + public requestId: string; + + /** + * Creates a new SetInternalStatusRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetInternalStatusRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ISetInternalStatusRequest): google.cloud.backupdr.v1.SetInternalStatusRequest; + + /** + * Encodes the specified SetInternalStatusRequest message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. + * @param message SetInternalStatusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ISetInternalStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetInternalStatusRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. + * @param message SetInternalStatusRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ISetInternalStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetInternalStatusRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetInternalStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SetInternalStatusRequest; + + /** + * Decodes a SetInternalStatusRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetInternalStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SetInternalStatusRequest; + + /** + * Verifies a SetInternalStatusRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetInternalStatusRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetInternalStatusRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SetInternalStatusRequest; + + /** + * Creates a plain object from a SetInternalStatusRequest message. Also converts values to other types if specified. + * @param message SetInternalStatusRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.SetInternalStatusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetInternalStatusRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetInternalStatusRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetInternalStatusResponse. */ + interface ISetInternalStatusResponse { + } + + /** Represents a SetInternalStatusResponse. */ + class SetInternalStatusResponse implements ISetInternalStatusResponse { + + /** + * Constructs a new SetInternalStatusResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ISetInternalStatusResponse); + + /** + * Creates a new SetInternalStatusResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SetInternalStatusResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.ISetInternalStatusResponse): google.cloud.backupdr.v1.SetInternalStatusResponse; + + /** + * Encodes the specified SetInternalStatusResponse message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. + * @param message SetInternalStatusResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ISetInternalStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetInternalStatusResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. + * @param message SetInternalStatusResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ISetInternalStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetInternalStatusResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetInternalStatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SetInternalStatusResponse; + + /** + * Decodes a SetInternalStatusResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetInternalStatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SetInternalStatusResponse; + + /** + * Verifies a SetInternalStatusResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetInternalStatusResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetInternalStatusResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SetInternalStatusResponse; + + /** + * Creates a plain object from a SetInternalStatusResponse message. Also converts values to other types if specified. + * @param message SetInternalStatusResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.SetInternalStatusResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetInternalStatusResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetInternalStatusResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InitiateBackupRequest. */ + interface IInitiateBackupRequest { + + /** InitiateBackupRequest dataSource */ + dataSource?: (string|null); + + /** InitiateBackupRequest requestId */ + requestId?: (string|null); + + /** InitiateBackupRequest backupId */ + backupId?: (string|null); + } + + /** Represents an InitiateBackupRequest. */ + class InitiateBackupRequest implements IInitiateBackupRequest { + + /** + * Constructs a new InitiateBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IInitiateBackupRequest); + + /** InitiateBackupRequest dataSource. */ + public dataSource: string; + + /** InitiateBackupRequest requestId. */ + public requestId: string; + + /** InitiateBackupRequest backupId. */ + public backupId: string; + + /** + * Creates a new InitiateBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns InitiateBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IInitiateBackupRequest): google.cloud.backupdr.v1.InitiateBackupRequest; + + /** + * Encodes the specified InitiateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. + * @param message InitiateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IInitiateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InitiateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. + * @param message InitiateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IInitiateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InitiateBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InitiateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InitiateBackupRequest; + + /** + * Decodes an InitiateBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InitiateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InitiateBackupRequest; + + /** + * Verifies an InitiateBackupRequest message. + * @param message Plain 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 InitiateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InitiateBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InitiateBackupRequest; + + /** + * Creates a plain object from an InitiateBackupRequest message. Also converts values to other types if specified. + * @param message InitiateBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.InitiateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InitiateBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InitiateBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InitiateBackupResponse. */ + interface IInitiateBackupResponse { + + /** InitiateBackupResponse backup */ + backup?: (string|null); + + /** InitiateBackupResponse newBackupGenerationId */ + newBackupGenerationId?: (number|null); + + /** InitiateBackupResponse baseBackupGenerationId */ + baseBackupGenerationId?: (number|null); + } + + /** Represents an InitiateBackupResponse. */ + class InitiateBackupResponse implements IInitiateBackupResponse { + + /** + * Constructs a new InitiateBackupResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IInitiateBackupResponse); + + /** InitiateBackupResponse backup. */ + public backup: string; + + /** InitiateBackupResponse newBackupGenerationId. */ + public newBackupGenerationId: number; + + /** InitiateBackupResponse baseBackupGenerationId. */ + public baseBackupGenerationId: number; + + /** + * Creates a new InitiateBackupResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns InitiateBackupResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IInitiateBackupResponse): google.cloud.backupdr.v1.InitiateBackupResponse; + + /** + * Encodes the specified InitiateBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. + * @param message InitiateBackupResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IInitiateBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InitiateBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. + * @param message InitiateBackupResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IInitiateBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InitiateBackupResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InitiateBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InitiateBackupResponse; + + /** + * Decodes an InitiateBackupResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InitiateBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InitiateBackupResponse; + + /** + * Verifies an InitiateBackupResponse message. + * @param message Plain 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 InitiateBackupResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InitiateBackupResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InitiateBackupResponse; + + /** + * Creates a plain object from an InitiateBackupResponse message. Also converts values to other types if specified. + * @param message InitiateBackupResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.InitiateBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InitiateBackupResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InitiateBackupResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AbandonBackupRequest. */ + interface IAbandonBackupRequest { + + /** AbandonBackupRequest dataSource */ + dataSource?: (string|null); + + /** AbandonBackupRequest requestId */ + requestId?: (string|null); + } + + /** Represents an AbandonBackupRequest. */ + class AbandonBackupRequest implements IAbandonBackupRequest { + + /** + * Constructs a new AbandonBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAbandonBackupRequest); + + /** AbandonBackupRequest dataSource. */ + public dataSource: string; + + /** AbandonBackupRequest requestId. */ + public requestId: string; + + /** + * Creates a new AbandonBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AbandonBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAbandonBackupRequest): google.cloud.backupdr.v1.AbandonBackupRequest; + + /** + * Encodes the specified AbandonBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. + * @param message AbandonBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAbandonBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AbandonBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. + * @param message AbandonBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAbandonBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AbandonBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AbandonBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AbandonBackupRequest; + + /** + * Decodes an AbandonBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AbandonBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AbandonBackupRequest; + + /** + * Verifies an AbandonBackupRequest message. + * @param message Plain 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 AbandonBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AbandonBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AbandonBackupRequest; + + /** + * Creates a plain object from an AbandonBackupRequest message. Also converts values to other types if specified. + * @param message AbandonBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AbandonBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AbandonBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AbandonBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FinalizeBackupRequest. */ + interface IFinalizeBackupRequest { + + /** FinalizeBackupRequest dataSource */ + dataSource?: (string|null); + + /** FinalizeBackupRequest description */ + description?: (string|null); + + /** FinalizeBackupRequest consistencyTime */ + consistencyTime?: (google.protobuf.ITimestamp|null); + + /** FinalizeBackupRequest requestId */ + requestId?: (string|null); + + /** FinalizeBackupRequest backupId */ + backupId?: (string|null); + + /** FinalizeBackupRequest recoveryRangeStartTime */ + recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); + + /** FinalizeBackupRequest recoveryRangeEndTime */ + recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); + + /** FinalizeBackupRequest retentionDuration */ + retentionDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a FinalizeBackupRequest. */ + class FinalizeBackupRequest implements IFinalizeBackupRequest { + + /** + * Constructs a new FinalizeBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFinalizeBackupRequest); + + /** FinalizeBackupRequest dataSource. */ + public dataSource: string; + + /** FinalizeBackupRequest description. */ + public description?: (string|null); + + /** FinalizeBackupRequest consistencyTime. */ + public consistencyTime?: (google.protobuf.ITimestamp|null); + + /** FinalizeBackupRequest requestId. */ + public requestId: string; + + /** FinalizeBackupRequest backupId. */ + public backupId: string; + + /** FinalizeBackupRequest recoveryRangeStartTime. */ + public recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); + + /** FinalizeBackupRequest recoveryRangeEndTime. */ + public recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); + + /** FinalizeBackupRequest retentionDuration. */ + public retentionDuration?: (google.protobuf.IDuration|null); + + /** FinalizeBackupRequest _description. */ + public _description?: "description"; + + /** FinalizeBackupRequest _consistencyTime. */ + public _consistencyTime?: "consistencyTime"; + + /** FinalizeBackupRequest _recoveryRangeStartTime. */ + public _recoveryRangeStartTime?: "recoveryRangeStartTime"; + + /** FinalizeBackupRequest _recoveryRangeEndTime. */ + public _recoveryRangeEndTime?: "recoveryRangeEndTime"; + + /** FinalizeBackupRequest _retentionDuration. */ + public _retentionDuration?: "retentionDuration"; + + /** + * Creates a new FinalizeBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FinalizeBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFinalizeBackupRequest): google.cloud.backupdr.v1.FinalizeBackupRequest; + + /** + * Encodes the specified FinalizeBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. + * @param message FinalizeBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFinalizeBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FinalizeBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. + * @param message FinalizeBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFinalizeBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FinalizeBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FinalizeBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FinalizeBackupRequest; + + /** + * Decodes a FinalizeBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FinalizeBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FinalizeBackupRequest; + + /** + * Verifies a FinalizeBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FinalizeBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FinalizeBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FinalizeBackupRequest; + + /** + * Creates a plain object from a FinalizeBackupRequest message. Also converts values to other types if specified. + * @param message FinalizeBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FinalizeBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FinalizeBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FinalizeBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchAccessTokenRequest. */ + interface IFetchAccessTokenRequest { + + /** FetchAccessTokenRequest name */ + name?: (string|null); + + /** FetchAccessTokenRequest generationId */ + generationId?: (number|null); + } + + /** Represents a FetchAccessTokenRequest. */ + class FetchAccessTokenRequest implements IFetchAccessTokenRequest { + + /** + * Constructs a new FetchAccessTokenRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFetchAccessTokenRequest); + + /** FetchAccessTokenRequest name. */ + public name: string; + + /** FetchAccessTokenRequest generationId. */ + public generationId: number; + + /** + * Creates a new FetchAccessTokenRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchAccessTokenRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFetchAccessTokenRequest): google.cloud.backupdr.v1.FetchAccessTokenRequest; + + /** + * Encodes the specified FetchAccessTokenRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. + * @param message FetchAccessTokenRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFetchAccessTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchAccessTokenRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. + * @param message FetchAccessTokenRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchAccessTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchAccessTokenRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchAccessTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchAccessTokenRequest; + + /** + * Decodes a FetchAccessTokenRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchAccessTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchAccessTokenRequest; + + /** + * Verifies a FetchAccessTokenRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchAccessTokenRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchAccessTokenRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchAccessTokenRequest; + + /** + * Creates a plain object from a FetchAccessTokenRequest message. Also converts values to other types if specified. + * @param message FetchAccessTokenRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FetchAccessTokenRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchAccessTokenRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchAccessTokenRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchAccessTokenResponse. */ + interface IFetchAccessTokenResponse { + + /** FetchAccessTokenResponse readLocation */ + readLocation?: (string|null); + + /** FetchAccessTokenResponse writeLocation */ + writeLocation?: (string|null); + + /** FetchAccessTokenResponse token */ + token?: (string|null); + + /** FetchAccessTokenResponse expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a FetchAccessTokenResponse. */ + class FetchAccessTokenResponse implements IFetchAccessTokenResponse { + + /** + * Constructs a new FetchAccessTokenResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFetchAccessTokenResponse); + + /** FetchAccessTokenResponse readLocation. */ + public readLocation: string; + + /** FetchAccessTokenResponse writeLocation. */ + public writeLocation: string; + + /** FetchAccessTokenResponse token. */ + public token: string; + + /** FetchAccessTokenResponse expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new FetchAccessTokenResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchAccessTokenResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFetchAccessTokenResponse): google.cloud.backupdr.v1.FetchAccessTokenResponse; + + /** + * Encodes the specified FetchAccessTokenResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. + * @param message FetchAccessTokenResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFetchAccessTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchAccessTokenResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. + * @param message FetchAccessTokenResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchAccessTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchAccessTokenResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchAccessTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchAccessTokenResponse; + + /** + * Decodes a FetchAccessTokenResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchAccessTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchAccessTokenResponse; + + /** + * Verifies a FetchAccessTokenResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchAccessTokenResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchAccessTokenResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchAccessTokenResponse; + + /** + * Creates a plain object from a FetchAccessTokenResponse message. Also converts values to other types if specified. + * @param message FetchAccessTokenResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FetchAccessTokenResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchAccessTokenResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchAccessTokenResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupsRequest. */ + interface IListBackupsRequest { + + /** ListBackupsRequest parent */ + parent?: (string|null); + + /** ListBackupsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupsRequest filter */ + filter?: (string|null); + + /** ListBackupsRequest orderBy */ + orderBy?: (string|null); + + /** ListBackupsRequest view */ + view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); + } + + /** Represents a ListBackupsRequest. */ + class ListBackupsRequest implements IListBackupsRequest { + + /** + * Constructs a new ListBackupsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupsRequest); + + /** ListBackupsRequest parent. */ + public parent: string; + + /** ListBackupsRequest pageSize. */ + public pageSize: number; + + /** ListBackupsRequest pageToken. */ + public pageToken: string; + + /** ListBackupsRequest filter. */ + public filter: string; + + /** ListBackupsRequest orderBy. */ + public orderBy: string; + + /** ListBackupsRequest view. */ + public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); + + /** + * Creates a new ListBackupsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupsRequest): google.cloud.backupdr.v1.ListBackupsRequest; + + /** + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupsRequest; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupsRequest; + + /** + * Verifies a ListBackupsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupsRequest; + + /** + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * @param message ListBackupsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupsResponse. */ + interface IListBackupsResponse { + + /** ListBackupsResponse backups */ + backups?: (google.cloud.backupdr.v1.IBackup[]|null); + + /** ListBackupsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupsResponse. */ + class ListBackupsResponse implements IListBackupsResponse { + + /** + * Constructs a new ListBackupsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupsResponse); + + /** ListBackupsResponse backups. */ + public backups: google.cloud.backupdr.v1.IBackup[]; + + /** ListBackupsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupsResponse): google.cloud.backupdr.v1.ListBackupsResponse; + + /** + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupsResponse; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupsResponse; + + /** + * Verifies a ListBackupsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupsResponse; + + /** + * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. + * @param message ListBackupsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupRequest. */ + interface IGetBackupRequest { + + /** GetBackupRequest name */ + name?: (string|null); + + /** GetBackupRequest view */ + view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); + } + + /** Represents a GetBackupRequest. */ + class GetBackupRequest implements IGetBackupRequest { + + /** + * Constructs a new GetBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetBackupRequest); + + /** GetBackupRequest name. */ + public name: string; + + /** GetBackupRequest view. */ + public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); + + /** + * Creates a new GetBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetBackupRequest): google.cloud.backupdr.v1.GetBackupRequest; + + /** + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupRequest; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupRequest; + + /** + * Verifies a GetBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupRequest; + + /** + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * @param message GetBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateBackupRequest. */ + interface IUpdateBackupRequest { + + /** UpdateBackupRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupRequest backup */ + backup?: (google.cloud.backupdr.v1.IBackup|null); + + /** UpdateBackupRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateBackupRequest. */ + class UpdateBackupRequest implements IUpdateBackupRequest { + + /** + * Constructs a new UpdateBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IUpdateBackupRequest); + + /** UpdateBackupRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupRequest backup. */ + public backup?: (google.cloud.backupdr.v1.IBackup|null); + + /** UpdateBackupRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IUpdateBackupRequest): google.cloud.backupdr.v1.UpdateBackupRequest; + + /** + * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * @param message UpdateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * @param message UpdateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateBackupRequest; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateBackupRequest; + + /** + * Verifies an UpdateBackupRequest message. + * @param message Plain 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 UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateBackupRequest; + + /** + * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. + * @param message UpdateBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.UpdateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupRequest. */ + interface IDeleteBackupRequest { + + /** DeleteBackupRequest name */ + name?: (string|null); + + /** DeleteBackupRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteBackupRequest. */ + class DeleteBackupRequest implements IDeleteBackupRequest { + + /** + * Constructs a new DeleteBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupRequest); + + /** DeleteBackupRequest name. */ + public name: string; + + /** DeleteBackupRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupRequest): google.cloud.backupdr.v1.DeleteBackupRequest; + + /** + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupRequest; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupRequest; + + /** + * Verifies a DeleteBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupRequest; + + /** + * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. + * @param message DeleteBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestoreBackupRequest. */ + interface IRestoreBackupRequest { + + /** RestoreBackupRequest name */ + name?: (string|null); + + /** RestoreBackupRequest requestId */ + requestId?: (string|null); + + /** RestoreBackupRequest computeInstanceTargetEnvironment */ + computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null); + + /** RestoreBackupRequest computeInstanceRestoreProperties */ + computeInstanceRestoreProperties?: (google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null); + } + + /** Represents a RestoreBackupRequest. */ + class RestoreBackupRequest implements IRestoreBackupRequest { + + /** + * Constructs a new RestoreBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IRestoreBackupRequest); + + /** RestoreBackupRequest name. */ + public name: string; + + /** RestoreBackupRequest requestId. */ + public requestId: string; + + /** RestoreBackupRequest computeInstanceTargetEnvironment. */ + public computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null); + + /** RestoreBackupRequest computeInstanceRestoreProperties. */ + public computeInstanceRestoreProperties?: (google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null); + + /** RestoreBackupRequest targetEnvironment. */ + public targetEnvironment?: "computeInstanceTargetEnvironment"; + + /** RestoreBackupRequest instanceProperties. */ + public instanceProperties?: "computeInstanceRestoreProperties"; + + /** + * Creates a new RestoreBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IRestoreBackupRequest): google.cloud.backupdr.v1.RestoreBackupRequest; + + /** + * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * @param message RestoreBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * @param message RestoreBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RestoreBackupRequest; + + /** + * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RestoreBackupRequest; + + /** + * Verifies a RestoreBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RestoreBackupRequest; + + /** + * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. + * @param message RestoreBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.RestoreBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestoreBackupResponse. */ + interface IRestoreBackupResponse { + + /** RestoreBackupResponse targetResource */ + targetResource?: (google.cloud.backupdr.v1.ITargetResource|null); + } + + /** Represents a RestoreBackupResponse. */ + class RestoreBackupResponse implements IRestoreBackupResponse { + + /** + * Constructs a new RestoreBackupResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IRestoreBackupResponse); + + /** RestoreBackupResponse targetResource. */ + public targetResource?: (google.cloud.backupdr.v1.ITargetResource|null); + + /** + * Creates a new RestoreBackupResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreBackupResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IRestoreBackupResponse): google.cloud.backupdr.v1.RestoreBackupResponse; + + /** + * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * @param message RestoreBackupResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * @param message RestoreBackupResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreBackupResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RestoreBackupResponse; + + /** + * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RestoreBackupResponse; + + /** + * Verifies a RestoreBackupResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreBackupResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RestoreBackupResponse; + + /** + * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. + * @param message RestoreBackupResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.RestoreBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreBackupResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreBackupResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TargetResource. */ + interface ITargetResource { + + /** TargetResource gcpResource */ + gcpResource?: (google.cloud.backupdr.v1.IGcpResource|null); + } + + /** Represents a TargetResource. */ + class TargetResource implements ITargetResource { + + /** + * Constructs a new TargetResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ITargetResource); + + /** TargetResource gcpResource. */ + public gcpResource?: (google.cloud.backupdr.v1.IGcpResource|null); + + /** TargetResource targetResourceInfo. */ + public targetResourceInfo?: "gcpResource"; + + /** + * Creates a new TargetResource instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetResource instance + */ + public static create(properties?: google.cloud.backupdr.v1.ITargetResource): google.cloud.backupdr.v1.TargetResource; + + /** + * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * @param message TargetResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * @param message TargetResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.TargetResource; + + /** + * Decodes a TargetResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.TargetResource; + + /** + * Verifies a TargetResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.TargetResource; + + /** + * Creates a plain object from a TargetResource message. Also converts values to other types if specified. + * @param message TargetResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.TargetResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcpResource. */ + interface IGcpResource { + + /** GcpResource gcpResourcename */ + gcpResourcename?: (string|null); + + /** GcpResource location */ + location?: (string|null); + + /** GcpResource type */ + type?: (string|null); + } + + /** Represents a GcpResource. */ + class GcpResource implements IGcpResource { + + /** + * Constructs a new GcpResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGcpResource); + + /** GcpResource gcpResourcename. */ + public gcpResourcename: string; + + /** GcpResource location. */ + public location: string; + + /** GcpResource type. */ + public type: string; + + /** + * Creates a new GcpResource instance using the specified properties. + * @param [properties] Properties to set + * @returns GcpResource instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGcpResource): google.cloud.backupdr.v1.GcpResource; + + /** + * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * @param message GcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * @param message GcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcpResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GcpResource; + + /** + * Decodes a GcpResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GcpResource; + + /** + * Verifies a GcpResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcpResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GcpResource; + + /** + * Creates a plain object from a GcpResource message. Also converts values to other types if specified. + * @param message GcpResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcpResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcpResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** BackupConfigState enum. */ + enum BackupConfigState { + BACKUP_CONFIG_STATE_UNSPECIFIED = 0, + ACTIVE = 1, + PASSIVE = 2 + } + + /** BackupView enum. */ + enum BackupView { + BACKUP_VIEW_UNSPECIFIED = 0, + BACKUP_VIEW_BASIC = 1, + BACKUP_VIEW_FULL = 2 + } + + /** BackupVaultView enum. */ + enum BackupVaultView { + BACKUP_VAULT_VIEW_UNSPECIFIED = 0, + BACKUP_VAULT_VIEW_BASIC = 1, + BACKUP_VAULT_VIEW_FULL = 2 + } + + /** Properties of a BackupApplianceBackupProperties. */ + interface IBackupApplianceBackupProperties { + + /** BackupApplianceBackupProperties generationId */ + generationId?: (number|null); + + /** BackupApplianceBackupProperties finalizeTime */ + finalizeTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeStartTime */ + recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeEndTime */ + recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a BackupApplianceBackupProperties. */ + class BackupApplianceBackupProperties implements IBackupApplianceBackupProperties { + + /** + * Constructs a new BackupApplianceBackupProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupProperties); + + /** BackupApplianceBackupProperties generationId. */ + public generationId?: (number|null); + + /** BackupApplianceBackupProperties finalizeTime. */ + public finalizeTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeStartTime. */ + public recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeEndTime. */ + public recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties _generationId. */ + public _generationId?: "generationId"; + + /** BackupApplianceBackupProperties _finalizeTime. */ + public _finalizeTime?: "finalizeTime"; + + /** BackupApplianceBackupProperties _recoveryRangeStartTime. */ + public _recoveryRangeStartTime?: "recoveryRangeStartTime"; + + /** BackupApplianceBackupProperties _recoveryRangeEndTime. */ + public _recoveryRangeEndTime?: "recoveryRangeEndTime"; + + /** + * Creates a new BackupApplianceBackupProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupApplianceBackupProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupProperties): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + + /** + * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * @param message BackupApplianceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * @param message BackupApplianceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupApplianceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + + /** + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupApplianceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + + /** + * Verifies a BackupApplianceBackupProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupApplianceBackupProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + + /** + * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. + * @param message BackupApplianceBackupProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupApplianceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupApplianceBackupProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupApplianceBackupProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ComputeInstanceBackupProperties. */ + interface IComputeInstanceBackupProperties { + + /** ComputeInstanceBackupProperties description */ + description?: (string|null); + + /** ComputeInstanceBackupProperties tags */ + tags?: (google.cloud.backupdr.v1.ITags|null); + + /** ComputeInstanceBackupProperties machineType */ + machineType?: (string|null); + + /** ComputeInstanceBackupProperties canIpForward */ + canIpForward?: (boolean|null); + + /** ComputeInstanceBackupProperties networkInterface */ + networkInterface?: (google.cloud.backupdr.v1.INetworkInterface[]|null); + + /** ComputeInstanceBackupProperties disk */ + disk?: (google.cloud.backupdr.v1.IAttachedDisk[]|null); + + /** ComputeInstanceBackupProperties metadata */ + metadata?: (google.cloud.backupdr.v1.IMetadata|null); + + /** ComputeInstanceBackupProperties serviceAccount */ + serviceAccount?: (google.cloud.backupdr.v1.IServiceAccount[]|null); + + /** ComputeInstanceBackupProperties scheduling */ + scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + + /** ComputeInstanceBackupProperties guestAccelerator */ + guestAccelerator?: (google.cloud.backupdr.v1.IAcceleratorConfig[]|null); + + /** ComputeInstanceBackupProperties minCpuPlatform */ + minCpuPlatform?: (string|null); + + /** ComputeInstanceBackupProperties keyRevocationActionType */ + keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + + /** ComputeInstanceBackupProperties sourceInstance */ + sourceInstance?: (string|null); + + /** ComputeInstanceBackupProperties labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a ComputeInstanceBackupProperties. */ + class ComputeInstanceBackupProperties implements IComputeInstanceBackupProperties { + + /** + * Constructs a new ComputeInstanceBackupProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceBackupProperties); + + /** ComputeInstanceBackupProperties description. */ + public description?: (string|null); + + /** ComputeInstanceBackupProperties tags. */ + public tags?: (google.cloud.backupdr.v1.ITags|null); + + /** ComputeInstanceBackupProperties machineType. */ + public machineType?: (string|null); + + /** ComputeInstanceBackupProperties canIpForward. */ + public canIpForward?: (boolean|null); + + /** ComputeInstanceBackupProperties networkInterface. */ + public networkInterface: google.cloud.backupdr.v1.INetworkInterface[]; + + /** ComputeInstanceBackupProperties disk. */ + public disk: google.cloud.backupdr.v1.IAttachedDisk[]; + + /** ComputeInstanceBackupProperties metadata. */ + public metadata?: (google.cloud.backupdr.v1.IMetadata|null); + + /** ComputeInstanceBackupProperties serviceAccount. */ + public serviceAccount: google.cloud.backupdr.v1.IServiceAccount[]; + + /** ComputeInstanceBackupProperties scheduling. */ + public scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + + /** ComputeInstanceBackupProperties guestAccelerator. */ + public guestAccelerator: google.cloud.backupdr.v1.IAcceleratorConfig[]; + + /** ComputeInstanceBackupProperties minCpuPlatform. */ + public minCpuPlatform?: (string|null); + + /** ComputeInstanceBackupProperties keyRevocationActionType. */ + public keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + + /** ComputeInstanceBackupProperties sourceInstance. */ + public sourceInstance?: (string|null); + + /** ComputeInstanceBackupProperties labels. */ + public labels: { [k: string]: string }; + + /** ComputeInstanceBackupProperties _description. */ + public _description?: "description"; + + /** ComputeInstanceBackupProperties _tags. */ + public _tags?: "tags"; + + /** ComputeInstanceBackupProperties _machineType. */ + public _machineType?: "machineType"; + + /** ComputeInstanceBackupProperties _canIpForward. */ + public _canIpForward?: "canIpForward"; + + /** ComputeInstanceBackupProperties _metadata. */ + public _metadata?: "metadata"; + + /** ComputeInstanceBackupProperties _scheduling. */ + public _scheduling?: "scheduling"; + + /** ComputeInstanceBackupProperties _minCpuPlatform. */ + public _minCpuPlatform?: "minCpuPlatform"; + + /** ComputeInstanceBackupProperties _keyRevocationActionType. */ + public _keyRevocationActionType?: "keyRevocationActionType"; + + /** ComputeInstanceBackupProperties _sourceInstance. */ + public _sourceInstance?: "sourceInstance"; + + /** + * Creates a new ComputeInstanceBackupProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceBackupProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceBackupProperties): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + + /** + * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * @param message ComputeInstanceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * @param message ComputeInstanceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + + /** + * Verifies a ComputeInstanceBackupProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceBackupProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + + /** + * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceBackupProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceBackupProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceBackupProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ComputeInstanceRestoreProperties. */ + interface IComputeInstanceRestoreProperties { + + /** ComputeInstanceRestoreProperties name */ + name?: (string|null); + + /** ComputeInstanceRestoreProperties advancedMachineFeatures */ + advancedMachineFeatures?: (google.cloud.backupdr.v1.IAdvancedMachineFeatures|null); + + /** ComputeInstanceRestoreProperties canIpForward */ + canIpForward?: (boolean|null); + + /** ComputeInstanceRestoreProperties confidentialInstanceConfig */ + confidentialInstanceConfig?: (google.cloud.backupdr.v1.IConfidentialInstanceConfig|null); + + /** ComputeInstanceRestoreProperties deletionProtection */ + deletionProtection?: (boolean|null); + + /** ComputeInstanceRestoreProperties description */ + description?: (string|null); + + /** ComputeInstanceRestoreProperties disks */ + disks?: (google.cloud.backupdr.v1.IAttachedDisk[]|null); + + /** ComputeInstanceRestoreProperties displayDevice */ + displayDevice?: (google.cloud.backupdr.v1.IDisplayDevice|null); + + /** ComputeInstanceRestoreProperties guestAccelerators */ + guestAccelerators?: (google.cloud.backupdr.v1.IAcceleratorConfig[]|null); + + /** ComputeInstanceRestoreProperties hostname */ + hostname?: (string|null); + + /** ComputeInstanceRestoreProperties instanceEncryptionKey */ + instanceEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** ComputeInstanceRestoreProperties keyRevocationActionType */ + keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + + /** ComputeInstanceRestoreProperties labels */ + labels?: ({ [k: string]: string }|null); + + /** ComputeInstanceRestoreProperties machineType */ + machineType?: (string|null); + + /** ComputeInstanceRestoreProperties metadata */ + metadata?: (google.cloud.backupdr.v1.IMetadata|null); + + /** ComputeInstanceRestoreProperties minCpuPlatform */ + minCpuPlatform?: (string|null); + + /** ComputeInstanceRestoreProperties networkInterfaces */ + networkInterfaces?: (google.cloud.backupdr.v1.INetworkInterface[]|null); + + /** ComputeInstanceRestoreProperties networkPerformanceConfig */ + networkPerformanceConfig?: (google.cloud.backupdr.v1.INetworkPerformanceConfig|null); + + /** ComputeInstanceRestoreProperties params */ + params?: (google.cloud.backupdr.v1.IInstanceParams|null); + + /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess */ + privateIpv6GoogleAccess?: (google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); + + /** ComputeInstanceRestoreProperties allocationAffinity */ + allocationAffinity?: (google.cloud.backupdr.v1.IAllocationAffinity|null); + + /** ComputeInstanceRestoreProperties resourcePolicies */ + resourcePolicies?: (string[]|null); + + /** ComputeInstanceRestoreProperties scheduling */ + scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + + /** ComputeInstanceRestoreProperties serviceAccounts */ + serviceAccounts?: (google.cloud.backupdr.v1.IServiceAccount[]|null); + + /** ComputeInstanceRestoreProperties tags */ + tags?: (google.cloud.backupdr.v1.ITags|null); + } + + /** Represents a ComputeInstanceRestoreProperties. */ + class ComputeInstanceRestoreProperties implements IComputeInstanceRestoreProperties { + + /** + * Constructs a new ComputeInstanceRestoreProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties); + + /** ComputeInstanceRestoreProperties name. */ + public name?: (string|null); + + /** ComputeInstanceRestoreProperties advancedMachineFeatures. */ + public advancedMachineFeatures?: (google.cloud.backupdr.v1.IAdvancedMachineFeatures|null); + + /** ComputeInstanceRestoreProperties canIpForward. */ + public canIpForward?: (boolean|null); + + /** ComputeInstanceRestoreProperties confidentialInstanceConfig. */ + public confidentialInstanceConfig?: (google.cloud.backupdr.v1.IConfidentialInstanceConfig|null); + + /** ComputeInstanceRestoreProperties deletionProtection. */ + public deletionProtection?: (boolean|null); + + /** ComputeInstanceRestoreProperties description. */ + public description?: (string|null); + + /** ComputeInstanceRestoreProperties disks. */ + public disks: google.cloud.backupdr.v1.IAttachedDisk[]; + + /** ComputeInstanceRestoreProperties displayDevice. */ + public displayDevice?: (google.cloud.backupdr.v1.IDisplayDevice|null); + + /** ComputeInstanceRestoreProperties guestAccelerators. */ + public guestAccelerators: google.cloud.backupdr.v1.IAcceleratorConfig[]; + + /** ComputeInstanceRestoreProperties hostname. */ + public hostname?: (string|null); + + /** ComputeInstanceRestoreProperties instanceEncryptionKey. */ + public instanceEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** ComputeInstanceRestoreProperties keyRevocationActionType. */ + public keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + + /** ComputeInstanceRestoreProperties labels. */ + public labels: { [k: string]: string }; + + /** ComputeInstanceRestoreProperties machineType. */ + public machineType?: (string|null); + + /** ComputeInstanceRestoreProperties metadata. */ + public metadata?: (google.cloud.backupdr.v1.IMetadata|null); + + /** ComputeInstanceRestoreProperties minCpuPlatform. */ + public minCpuPlatform?: (string|null); + + /** ComputeInstanceRestoreProperties networkInterfaces. */ + public networkInterfaces: google.cloud.backupdr.v1.INetworkInterface[]; + + /** ComputeInstanceRestoreProperties networkPerformanceConfig. */ + public networkPerformanceConfig?: (google.cloud.backupdr.v1.INetworkPerformanceConfig|null); + + /** ComputeInstanceRestoreProperties params. */ + public params?: (google.cloud.backupdr.v1.IInstanceParams|null); + + /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess. */ + public privateIpv6GoogleAccess?: (google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); + + /** ComputeInstanceRestoreProperties allocationAffinity. */ + public allocationAffinity?: (google.cloud.backupdr.v1.IAllocationAffinity|null); + + /** ComputeInstanceRestoreProperties resourcePolicies. */ + public resourcePolicies: string[]; + + /** ComputeInstanceRestoreProperties scheduling. */ + public scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + + /** ComputeInstanceRestoreProperties serviceAccounts. */ + public serviceAccounts: google.cloud.backupdr.v1.IServiceAccount[]; + + /** ComputeInstanceRestoreProperties tags. */ + public tags?: (google.cloud.backupdr.v1.ITags|null); + + /** ComputeInstanceRestoreProperties _name. */ + public _name?: "name"; + + /** ComputeInstanceRestoreProperties _advancedMachineFeatures. */ + public _advancedMachineFeatures?: "advancedMachineFeatures"; + + /** ComputeInstanceRestoreProperties _canIpForward. */ + public _canIpForward?: "canIpForward"; + + /** ComputeInstanceRestoreProperties _confidentialInstanceConfig. */ + public _confidentialInstanceConfig?: "confidentialInstanceConfig"; + + /** ComputeInstanceRestoreProperties _deletionProtection. */ + public _deletionProtection?: "deletionProtection"; + + /** ComputeInstanceRestoreProperties _description. */ + public _description?: "description"; + + /** ComputeInstanceRestoreProperties _displayDevice. */ + public _displayDevice?: "displayDevice"; + + /** ComputeInstanceRestoreProperties _hostname. */ + public _hostname?: "hostname"; + + /** ComputeInstanceRestoreProperties _instanceEncryptionKey. */ + public _instanceEncryptionKey?: "instanceEncryptionKey"; + + /** ComputeInstanceRestoreProperties _keyRevocationActionType. */ + public _keyRevocationActionType?: "keyRevocationActionType"; + + /** ComputeInstanceRestoreProperties _machineType. */ + public _machineType?: "machineType"; + + /** ComputeInstanceRestoreProperties _metadata. */ + public _metadata?: "metadata"; + + /** ComputeInstanceRestoreProperties _minCpuPlatform. */ + public _minCpuPlatform?: "minCpuPlatform"; + + /** ComputeInstanceRestoreProperties _networkPerformanceConfig. */ + public _networkPerformanceConfig?: "networkPerformanceConfig"; + + /** ComputeInstanceRestoreProperties _params. */ + public _params?: "params"; + + /** ComputeInstanceRestoreProperties _privateIpv6GoogleAccess. */ + public _privateIpv6GoogleAccess?: "privateIpv6GoogleAccess"; + + /** ComputeInstanceRestoreProperties _allocationAffinity. */ + public _allocationAffinity?: "allocationAffinity"; + + /** ComputeInstanceRestoreProperties _scheduling. */ + public _scheduling?: "scheduling"; + + /** ComputeInstanceRestoreProperties _tags. */ + public _tags?: "tags"; + + /** + * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceRestoreProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * @param message ComputeInstanceRestoreProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * @param message ComputeInstanceRestoreProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceRestoreProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + + /** + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceRestoreProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + + /** + * Verifies a ComputeInstanceRestoreProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceRestoreProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + + /** + * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceRestoreProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceRestoreProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceRestoreProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceRestoreProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ComputeInstanceRestoreProperties { + + /** InstancePrivateIpv6GoogleAccess enum. */ + enum InstancePrivateIpv6GoogleAccess { + INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0, + INHERIT_FROM_SUBNETWORK = 1, + ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2, + ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3 + } + } + + /** Properties of a ComputeInstanceTargetEnvironment. */ + interface IComputeInstanceTargetEnvironment { + + /** ComputeInstanceTargetEnvironment project */ + project?: (string|null); + + /** ComputeInstanceTargetEnvironment zone */ + zone?: (string|null); + } + + /** Represents a ComputeInstanceTargetEnvironment. */ + class ComputeInstanceTargetEnvironment implements IComputeInstanceTargetEnvironment { + + /** + * Constructs a new ComputeInstanceTargetEnvironment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment); + + /** ComputeInstanceTargetEnvironment project. */ + public project: string; + + /** ComputeInstanceTargetEnvironment zone. */ + public zone: string; + + /** + * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceTargetEnvironment instance + */ + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + + /** + * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @param message ComputeInstanceTargetEnvironment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @param message ComputeInstanceTargetEnvironment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceTargetEnvironment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + + /** + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceTargetEnvironment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + + /** + * Verifies a ComputeInstanceTargetEnvironment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceTargetEnvironment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + + /** + * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. + * @param message ComputeInstanceTargetEnvironment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceTargetEnvironment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceTargetEnvironment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ComputeInstanceDataSourceProperties. */ + interface IComputeInstanceDataSourceProperties { + + /** ComputeInstanceDataSourceProperties name */ + name?: (string|null); + + /** ComputeInstanceDataSourceProperties description */ + description?: (string|null); + + /** ComputeInstanceDataSourceProperties machineType */ + machineType?: (string|null); + + /** ComputeInstanceDataSourceProperties totalDiskCount */ + totalDiskCount?: (number|Long|string|null); + + /** ComputeInstanceDataSourceProperties totalDiskSizeGb */ + totalDiskSizeGb?: (number|Long|string|null); + } + + /** Represents a ComputeInstanceDataSourceProperties. */ + class ComputeInstanceDataSourceProperties implements IComputeInstanceDataSourceProperties { + + /** + * Constructs a new ComputeInstanceDataSourceProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties); + + /** ComputeInstanceDataSourceProperties name. */ + public name: string; + + /** ComputeInstanceDataSourceProperties description. */ + public description: string; + + /** ComputeInstanceDataSourceProperties machineType. */ + public machineType: string; + + /** ComputeInstanceDataSourceProperties totalDiskCount. */ + public totalDiskCount: (number|Long|string); + + /** ComputeInstanceDataSourceProperties totalDiskSizeGb. */ + public totalDiskSizeGb: (number|Long|string); + + /** + * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceDataSourceProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + + /** + * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @param message ComputeInstanceDataSourceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @param message ComputeInstanceDataSourceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceDataSourceProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + + /** + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceDataSourceProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + + /** + * Verifies a ComputeInstanceDataSourceProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceDataSourceProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + + /** + * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceDataSourceProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceDataSourceProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceDataSourceProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdvancedMachineFeatures. */ + interface IAdvancedMachineFeatures { + + /** AdvancedMachineFeatures enableNestedVirtualization */ + enableNestedVirtualization?: (boolean|null); + + /** AdvancedMachineFeatures threadsPerCore */ + threadsPerCore?: (number|null); + + /** AdvancedMachineFeatures visibleCoreCount */ + visibleCoreCount?: (number|null); + + /** AdvancedMachineFeatures enableUefiNetworking */ + enableUefiNetworking?: (boolean|null); + } + + /** Represents an AdvancedMachineFeatures. */ + class AdvancedMachineFeatures implements IAdvancedMachineFeatures { + + /** + * Constructs a new AdvancedMachineFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAdvancedMachineFeatures); + + /** AdvancedMachineFeatures enableNestedVirtualization. */ + public enableNestedVirtualization?: (boolean|null); + + /** AdvancedMachineFeatures threadsPerCore. */ + public threadsPerCore?: (number|null); + + /** AdvancedMachineFeatures visibleCoreCount. */ + public visibleCoreCount?: (number|null); + + /** AdvancedMachineFeatures enableUefiNetworking. */ + public enableUefiNetworking?: (boolean|null); + + /** AdvancedMachineFeatures _enableNestedVirtualization. */ + public _enableNestedVirtualization?: "enableNestedVirtualization"; + + /** AdvancedMachineFeatures _threadsPerCore. */ + public _threadsPerCore?: "threadsPerCore"; + + /** AdvancedMachineFeatures _visibleCoreCount. */ + public _visibleCoreCount?: "visibleCoreCount"; + + /** AdvancedMachineFeatures _enableUefiNetworking. */ + public _enableUefiNetworking?: "enableUefiNetworking"; + + /** + * Creates a new AdvancedMachineFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns AdvancedMachineFeatures instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAdvancedMachineFeatures): google.cloud.backupdr.v1.AdvancedMachineFeatures; + + /** + * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @param message AdvancedMachineFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @param message AdvancedMachineFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AdvancedMachineFeatures; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AdvancedMachineFeatures; + + /** + * Verifies an AdvancedMachineFeatures message. + * @param message Plain 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 AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdvancedMachineFeatures + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AdvancedMachineFeatures; + + /** + * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. + * @param message AdvancedMachineFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AdvancedMachineFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdvancedMachineFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdvancedMachineFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConfidentialInstanceConfig. */ + interface IConfidentialInstanceConfig { + + /** ConfidentialInstanceConfig enableConfidentialCompute */ + enableConfidentialCompute?: (boolean|null); + } + + /** Represents a ConfidentialInstanceConfig. */ + class ConfidentialInstanceConfig implements IConfidentialInstanceConfig { + + /** + * Constructs a new ConfidentialInstanceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IConfidentialInstanceConfig); + + /** ConfidentialInstanceConfig enableConfidentialCompute. */ + public enableConfidentialCompute?: (boolean|null); + + /** ConfidentialInstanceConfig _enableConfidentialCompute. */ + public _enableConfidentialCompute?: "enableConfidentialCompute"; + + /** + * Creates a new ConfidentialInstanceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfidentialInstanceConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IConfidentialInstanceConfig): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + + /** + * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * @param message ConfidentialInstanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * @param message ConfidentialInstanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfidentialInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + + /** + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfidentialInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + + /** + * Verifies a ConfidentialInstanceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfidentialInstanceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + + /** + * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. + * @param message ConfidentialInstanceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ConfidentialInstanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfidentialInstanceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfidentialInstanceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DisplayDevice. */ + interface IDisplayDevice { + + /** DisplayDevice enableDisplay */ + enableDisplay?: (boolean|null); + } + + /** Represents a DisplayDevice. */ + class DisplayDevice implements IDisplayDevice { + + /** + * Constructs a new DisplayDevice. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDisplayDevice); + + /** DisplayDevice enableDisplay. */ + public enableDisplay?: (boolean|null); + + /** DisplayDevice _enableDisplay. */ + public _enableDisplay?: "enableDisplay"; + + /** + * Creates a new DisplayDevice instance using the specified properties. + * @param [properties] Properties to set + * @returns DisplayDevice instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDisplayDevice): google.cloud.backupdr.v1.DisplayDevice; + + /** + * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @param message DisplayDevice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @param message DisplayDevice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DisplayDevice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DisplayDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DisplayDevice; + + /** + * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DisplayDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DisplayDevice; + + /** + * Verifies a DisplayDevice message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DisplayDevice + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DisplayDevice; + + /** + * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. + * @param message DisplayDevice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DisplayDevice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DisplayDevice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DisplayDevice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcceleratorConfig. */ + interface IAcceleratorConfig { + + /** AcceleratorConfig acceleratorType */ + acceleratorType?: (string|null); + + /** AcceleratorConfig acceleratorCount */ + acceleratorCount?: (number|null); + } + + /** Represents an AcceleratorConfig. */ + class AcceleratorConfig implements IAcceleratorConfig { + + /** + * Constructs a new AcceleratorConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAcceleratorConfig); + + /** AcceleratorConfig acceleratorType. */ + public acceleratorType?: (string|null); + + /** AcceleratorConfig acceleratorCount. */ + public acceleratorCount?: (number|null); + + /** AcceleratorConfig _acceleratorType. */ + public _acceleratorType?: "acceleratorType"; + + /** AcceleratorConfig _acceleratorCount. */ + public _acceleratorCount?: "acceleratorCount"; + + /** + * Creates a new AcceleratorConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AcceleratorConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAcceleratorConfig): google.cloud.backupdr.v1.AcceleratorConfig; + + /** + * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * @param message AcceleratorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * @param message AcceleratorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AcceleratorConfig; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AcceleratorConfig; + + /** + * Verifies an AcceleratorConfig message. + * @param message Plain 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 AcceleratorConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcceleratorConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AcceleratorConfig; + + /** + * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. + * @param message AcceleratorConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AcceleratorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcceleratorConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcceleratorConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomerEncryptionKey. */ + interface ICustomerEncryptionKey { + + /** CustomerEncryptionKey rawKey */ + rawKey?: (string|null); + + /** CustomerEncryptionKey rsaEncryptedKey */ + rsaEncryptedKey?: (string|null); + + /** CustomerEncryptionKey kmsKeyName */ + kmsKeyName?: (string|null); + + /** CustomerEncryptionKey kmsKeyServiceAccount */ + kmsKeyServiceAccount?: (string|null); + } + + /** Represents a CustomerEncryptionKey. */ + class CustomerEncryptionKey implements ICustomerEncryptionKey { + + /** + * Constructs a new CustomerEncryptionKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICustomerEncryptionKey); + + /** CustomerEncryptionKey rawKey. */ + public rawKey?: (string|null); + + /** CustomerEncryptionKey rsaEncryptedKey. */ + public rsaEncryptedKey?: (string|null); + + /** CustomerEncryptionKey kmsKeyName. */ + public kmsKeyName?: (string|null); + + /** CustomerEncryptionKey kmsKeyServiceAccount. */ + public kmsKeyServiceAccount?: (string|null); + + /** CustomerEncryptionKey key. */ + public key?: ("rawKey"|"rsaEncryptedKey"|"kmsKeyName"); + + /** CustomerEncryptionKey _kmsKeyServiceAccount. */ + public _kmsKeyServiceAccount?: "kmsKeyServiceAccount"; + + /** + * Creates a new CustomerEncryptionKey instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomerEncryptionKey instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICustomerEncryptionKey): google.cloud.backupdr.v1.CustomerEncryptionKey; + + /** + * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @param message CustomerEncryptionKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @param message CustomerEncryptionKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomerEncryptionKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomerEncryptionKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CustomerEncryptionKey; + + /** + * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomerEncryptionKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CustomerEncryptionKey; + + /** + * Verifies a CustomerEncryptionKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomerEncryptionKey + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CustomerEncryptionKey; + + /** + * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. + * @param message CustomerEncryptionKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CustomerEncryptionKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomerEncryptionKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomerEncryptionKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Entry. */ + interface IEntry { + + /** Entry key */ + key?: (string|null); + + /** Entry value */ + value?: (string|null); + } + + /** Represents an Entry. */ + class Entry implements IEntry { + + /** + * Constructs a new Entry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IEntry); + + /** Entry key. */ + public key?: (string|null); + + /** Entry value. */ + public value?: (string|null); + + /** Entry _key. */ + public _key?: "key"; + + /** Entry _value. */ + public _value?: "value"; + + /** + * Creates a new Entry instance using the specified properties. + * @param [properties] Properties to set + * @returns Entry instance + */ + public static create(properties?: google.cloud.backupdr.v1.IEntry): google.cloud.backupdr.v1.Entry; + + /** + * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Entry; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Entry; + + /** + * Verifies an Entry message. + * @param message Plain 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 Entry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Entry; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @param message Entry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Entry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Metadata. */ + interface IMetadata { + + /** Metadata items */ + items?: (google.cloud.backupdr.v1.IEntry[]|null); + } + + /** Represents a Metadata. */ + class Metadata implements IMetadata { + + /** + * Constructs a new Metadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IMetadata); + + /** Metadata items. */ + public items: google.cloud.backupdr.v1.IEntry[]; + + /** + * Creates a new Metadata instance using the specified properties. + * @param [properties] Properties to set + * @returns Metadata instance + */ + public static create(properties?: google.cloud.backupdr.v1.IMetadata): google.cloud.backupdr.v1.Metadata; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Metadata; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Metadata; + + /** + * Verifies a Metadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Metadata; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @param message Metadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkInterface. */ + interface INetworkInterface { + + /** NetworkInterface network */ + network?: (string|null); + + /** NetworkInterface subnetwork */ + subnetwork?: (string|null); + + /** NetworkInterface ipAddress */ + ipAddress?: (string|null); + + /** NetworkInterface ipv6Address */ + ipv6Address?: (string|null); + + /** NetworkInterface internalIpv6PrefixLength */ + internalIpv6PrefixLength?: (number|null); + + /** NetworkInterface name */ + name?: (string|null); + + /** NetworkInterface accessConfigs */ + accessConfigs?: (google.cloud.backupdr.v1.IAccessConfig[]|null); + + /** NetworkInterface ipv6AccessConfigs */ + ipv6AccessConfigs?: (google.cloud.backupdr.v1.IAccessConfig[]|null); + + /** NetworkInterface aliasIpRanges */ + aliasIpRanges?: (google.cloud.backupdr.v1.IAliasIpRange[]|null); + + /** NetworkInterface stackType */ + stackType?: (google.cloud.backupdr.v1.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.StackType|null); + + /** NetworkInterface ipv6AccessType */ + ipv6AccessType?: (google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null); + + /** NetworkInterface queueCount */ + queueCount?: (number|null); + + /** NetworkInterface nicType */ + nicType?: (google.cloud.backupdr.v1.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.NicType|null); + + /** NetworkInterface networkAttachment */ + networkAttachment?: (string|null); + } + + /** Represents a NetworkInterface. */ + class NetworkInterface implements INetworkInterface { + + /** + * Constructs a new NetworkInterface. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.INetworkInterface); + + /** NetworkInterface network. */ + public network?: (string|null); + + /** NetworkInterface subnetwork. */ + public subnetwork?: (string|null); + + /** NetworkInterface ipAddress. */ + public ipAddress?: (string|null); + + /** NetworkInterface ipv6Address. */ + public ipv6Address?: (string|null); + + /** NetworkInterface internalIpv6PrefixLength. */ + public internalIpv6PrefixLength?: (number|null); + + /** NetworkInterface name. */ + public name?: (string|null); + + /** NetworkInterface accessConfigs. */ + public accessConfigs: google.cloud.backupdr.v1.IAccessConfig[]; + + /** NetworkInterface ipv6AccessConfigs. */ + public ipv6AccessConfigs: google.cloud.backupdr.v1.IAccessConfig[]; + + /** NetworkInterface aliasIpRanges. */ + public aliasIpRanges: google.cloud.backupdr.v1.IAliasIpRange[]; + + /** NetworkInterface stackType. */ + public stackType?: (google.cloud.backupdr.v1.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.StackType|null); + + /** NetworkInterface ipv6AccessType. */ + public ipv6AccessType?: (google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null); + + /** NetworkInterface queueCount. */ + public queueCount?: (number|null); + + /** NetworkInterface nicType. */ + public nicType?: (google.cloud.backupdr.v1.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.NicType|null); + + /** NetworkInterface networkAttachment. */ + public networkAttachment?: (string|null); + + /** NetworkInterface _network. */ + public _network?: "network"; + + /** NetworkInterface _subnetwork. */ + public _subnetwork?: "subnetwork"; + + /** NetworkInterface _ipAddress. */ + public _ipAddress?: "ipAddress"; + + /** NetworkInterface _ipv6Address. */ + public _ipv6Address?: "ipv6Address"; + + /** NetworkInterface _internalIpv6PrefixLength. */ + public _internalIpv6PrefixLength?: "internalIpv6PrefixLength"; + + /** NetworkInterface _name. */ + public _name?: "name"; + + /** NetworkInterface _stackType. */ + public _stackType?: "stackType"; + + /** NetworkInterface _ipv6AccessType. */ + public _ipv6AccessType?: "ipv6AccessType"; + + /** NetworkInterface _queueCount. */ + public _queueCount?: "queueCount"; + + /** NetworkInterface _nicType. */ + public _nicType?: "nicType"; + + /** NetworkInterface _networkAttachment. */ + public _networkAttachment?: "networkAttachment"; + + /** + * Creates a new NetworkInterface instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkInterface instance + */ + public static create(properties?: google.cloud.backupdr.v1.INetworkInterface): google.cloud.backupdr.v1.NetworkInterface; + + /** + * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * @param message NetworkInterface message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * @param message NetworkInterface message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkInterface message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkInterface + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkInterface; + + /** + * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkInterface + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkInterface; + + /** + * Verifies a NetworkInterface message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkInterface + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkInterface; + + /** + * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. + * @param message NetworkInterface + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.NetworkInterface, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkInterface to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkInterface + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkInterface { + + /** StackType enum. */ + enum StackType { + STACK_TYPE_UNSPECIFIED = 0, + IPV4_ONLY = 1, + IPV4_IPV6 = 2 + } + + /** Ipv6AccessType enum. */ + enum Ipv6AccessType { + UNSPECIFIED_IPV6_ACCESS_TYPE = 0, + INTERNAL = 1, + EXTERNAL = 2 + } + + /** NicType enum. */ + enum NicType { + NIC_TYPE_UNSPECIFIED = 0, + VIRTIO_NET = 1, + GVNIC = 2 + } + } + + /** Properties of a NetworkPerformanceConfig. */ + interface INetworkPerformanceConfig { + + /** NetworkPerformanceConfig totalEgressBandwidthTier */ + totalEgressBandwidthTier?: (google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null); + } + + /** Represents a NetworkPerformanceConfig. */ + class NetworkPerformanceConfig implements INetworkPerformanceConfig { + + /** + * Constructs a new NetworkPerformanceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.INetworkPerformanceConfig); + + /** NetworkPerformanceConfig totalEgressBandwidthTier. */ + public totalEgressBandwidthTier?: (google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null); + + /** NetworkPerformanceConfig _totalEgressBandwidthTier. */ + public _totalEgressBandwidthTier?: "totalEgressBandwidthTier"; + + /** + * Creates a new NetworkPerformanceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkPerformanceConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.INetworkPerformanceConfig): google.cloud.backupdr.v1.NetworkPerformanceConfig; + + /** + * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * @param message NetworkPerformanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * @param message NetworkPerformanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkPerformanceConfig; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkPerformanceConfig; + + /** + * Verifies a NetworkPerformanceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkPerformanceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkPerformanceConfig; + + /** + * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. + * @param message NetworkPerformanceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.NetworkPerformanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkPerformanceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkPerformanceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkPerformanceConfig { + + /** Tier enum. */ + enum Tier { + TIER_UNSPECIFIED = 0, + DEFAULT = 1, + TIER_1 = 2 + } + } + + /** Properties of an AccessConfig. */ + interface IAccessConfig { + + /** AccessConfig type */ + type?: (google.cloud.backupdr.v1.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1.AccessConfig.AccessType|null); + + /** AccessConfig name */ + name?: (string|null); + + /** AccessConfig externalIp */ + externalIp?: (string|null); + + /** AccessConfig externalIpv6 */ + externalIpv6?: (string|null); + + /** AccessConfig externalIpv6PrefixLength */ + externalIpv6PrefixLength?: (number|null); + + /** AccessConfig setPublicPtr */ + setPublicPtr?: (boolean|null); + + /** AccessConfig publicPtrDomainName */ + publicPtrDomainName?: (string|null); + + /** AccessConfig networkTier */ + networkTier?: (google.cloud.backupdr.v1.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1.AccessConfig.NetworkTier|null); + } + + /** Represents an AccessConfig. */ + class AccessConfig implements IAccessConfig { + + /** + * Constructs a new AccessConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAccessConfig); + + /** AccessConfig type. */ + public type?: (google.cloud.backupdr.v1.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1.AccessConfig.AccessType|null); + + /** AccessConfig name. */ + public name?: (string|null); + + /** AccessConfig externalIp. */ + public externalIp?: (string|null); + + /** AccessConfig externalIpv6. */ + public externalIpv6?: (string|null); + + /** AccessConfig externalIpv6PrefixLength. */ + public externalIpv6PrefixLength?: (number|null); + + /** AccessConfig setPublicPtr. */ + public setPublicPtr?: (boolean|null); + + /** AccessConfig publicPtrDomainName. */ + public publicPtrDomainName?: (string|null); + + /** AccessConfig networkTier. */ + public networkTier?: (google.cloud.backupdr.v1.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1.AccessConfig.NetworkTier|null); + + /** AccessConfig _type. */ + public _type?: "type"; + + /** AccessConfig _name. */ + public _name?: "name"; + + /** AccessConfig _externalIp. */ + public _externalIp?: "externalIp"; + + /** AccessConfig _externalIpv6. */ + public _externalIpv6?: "externalIpv6"; + + /** AccessConfig _externalIpv6PrefixLength. */ + public _externalIpv6PrefixLength?: "externalIpv6PrefixLength"; + + /** AccessConfig _setPublicPtr. */ + public _setPublicPtr?: "setPublicPtr"; + + /** AccessConfig _publicPtrDomainName. */ + public _publicPtrDomainName?: "publicPtrDomainName"; + + /** AccessConfig _networkTier. */ + public _networkTier?: "networkTier"; + + /** + * Creates a new AccessConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAccessConfig): google.cloud.backupdr.v1.AccessConfig; + + /** + * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * @param message AccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * @param message AccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AccessConfig; + + /** + * Decodes an AccessConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AccessConfig; + + /** + * Verifies an AccessConfig message. + * @param message Plain 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 AccessConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AccessConfig; + + /** + * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. + * @param message AccessConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AccessConfig { + + /** AccessType enum. */ + enum AccessType { + ACCESS_TYPE_UNSPECIFIED = 0, + ONE_TO_ONE_NAT = 1, + DIRECT_IPV6 = 2 + } + + /** NetworkTier enum. */ + enum NetworkTier { + NETWORK_TIER_UNSPECIFIED = 0, + PREMIUM = 1, + STANDARD = 2 + } + } + + /** Properties of an AliasIpRange. */ + interface IAliasIpRange { + + /** AliasIpRange ipCidrRange */ + ipCidrRange?: (string|null); + + /** AliasIpRange subnetworkRangeName */ + subnetworkRangeName?: (string|null); + } + + /** Represents an AliasIpRange. */ + class AliasIpRange implements IAliasIpRange { + + /** + * Constructs a new AliasIpRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAliasIpRange); + + /** AliasIpRange ipCidrRange. */ + public ipCidrRange?: (string|null); + + /** AliasIpRange subnetworkRangeName. */ + public subnetworkRangeName?: (string|null); + + /** AliasIpRange _ipCidrRange. */ + public _ipCidrRange?: "ipCidrRange"; + + /** AliasIpRange _subnetworkRangeName. */ + public _subnetworkRangeName?: "subnetworkRangeName"; + + /** + * Creates a new AliasIpRange instance using the specified properties. + * @param [properties] Properties to set + * @returns AliasIpRange instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAliasIpRange): google.cloud.backupdr.v1.AliasIpRange; + + /** + * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. + * @param message AliasIpRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. + * @param message AliasIpRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AliasIpRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AliasIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AliasIpRange; + + /** + * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AliasIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AliasIpRange; + + /** + * Verifies an AliasIpRange message. + * @param message Plain 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 AliasIpRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AliasIpRange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AliasIpRange; + + /** + * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. + * @param message AliasIpRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AliasIpRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AliasIpRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AliasIpRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InstanceParams. */ + interface IInstanceParams { + + /** InstanceParams resourceManagerTags */ + resourceManagerTags?: ({ [k: string]: string }|null); + } + + /** Represents an InstanceParams. */ + class InstanceParams implements IInstanceParams { + + /** + * Constructs a new InstanceParams. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IInstanceParams); + + /** InstanceParams resourceManagerTags. */ + public resourceManagerTags: { [k: string]: string }; + + /** + * Creates a new InstanceParams instance using the specified properties. + * @param [properties] Properties to set + * @returns InstanceParams instance + */ + public static create(properties?: google.cloud.backupdr.v1.IInstanceParams): google.cloud.backupdr.v1.InstanceParams; + + /** + * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @param message InstanceParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @param message InstanceParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstanceParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstanceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InstanceParams; + + /** + * Decodes an InstanceParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstanceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InstanceParams; + + /** + * Verifies an InstanceParams message. + * @param message Plain 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 InstanceParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstanceParams + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InstanceParams; + + /** + * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. + * @param message InstanceParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.InstanceParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstanceParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstanceParams + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AllocationAffinity. */ + interface IAllocationAffinity { + + /** AllocationAffinity consumeAllocationType */ + consumeAllocationType?: (google.cloud.backupdr.v1.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1.AllocationAffinity.Type|null); + + /** AllocationAffinity key */ + key?: (string|null); + + /** AllocationAffinity values */ + values?: (string[]|null); + } + + /** Represents an AllocationAffinity. */ + class AllocationAffinity implements IAllocationAffinity { + + /** + * Constructs a new AllocationAffinity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAllocationAffinity); + + /** AllocationAffinity consumeAllocationType. */ + public consumeAllocationType?: (google.cloud.backupdr.v1.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1.AllocationAffinity.Type|null); + + /** AllocationAffinity key. */ + public key?: (string|null); + + /** AllocationAffinity values. */ + public values: string[]; + + /** AllocationAffinity _consumeAllocationType. */ + public _consumeAllocationType?: "consumeAllocationType"; + + /** AllocationAffinity _key. */ + public _key?: "key"; + + /** + * Creates a new AllocationAffinity instance using the specified properties. + * @param [properties] Properties to set + * @returns AllocationAffinity instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAllocationAffinity): google.cloud.backupdr.v1.AllocationAffinity; + + /** + * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. + * @param message AllocationAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. + * @param message AllocationAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllocationAffinity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllocationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AllocationAffinity; + + /** + * Decodes an AllocationAffinity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllocationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AllocationAffinity; + + /** + * Verifies an AllocationAffinity message. + * @param message Plain 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 AllocationAffinity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllocationAffinity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AllocationAffinity; + + /** + * Creates a plain object from an AllocationAffinity message. Also converts values to other types if specified. + * @param message AllocationAffinity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AllocationAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllocationAffinity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllocationAffinity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AllocationAffinity { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + NO_RESERVATION = 1, + ANY_RESERVATION = 2, + SPECIFIC_RESERVATION = 3 + } + } + + /** Properties of a Scheduling. */ + interface IScheduling { + + /** Scheduling onHostMaintenance */ + onHostMaintenance?: (google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null); + + /** Scheduling automaticRestart */ + automaticRestart?: (boolean|null); + + /** Scheduling preemptible */ + preemptible?: (boolean|null); + + /** Scheduling nodeAffinities */ + nodeAffinities?: (google.cloud.backupdr.v1.Scheduling.INodeAffinity[]|null); + + /** Scheduling minNodeCpus */ + minNodeCpus?: (number|null); + + /** Scheduling provisioningModel */ + provisioningModel?: (google.cloud.backupdr.v1.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null); + + /** Scheduling instanceTerminationAction */ + instanceTerminationAction?: (google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null); + + /** Scheduling localSsdRecoveryTimeout */ + localSsdRecoveryTimeout?: (google.cloud.backupdr.v1.ISchedulingDuration|null); + } + + /** Represents a Scheduling. */ + class Scheduling implements IScheduling { + + /** + * Constructs a new Scheduling. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IScheduling); + + /** Scheduling onHostMaintenance. */ + public onHostMaintenance?: (google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null); + + /** Scheduling automaticRestart. */ + public automaticRestart?: (boolean|null); + + /** Scheduling preemptible. */ + public preemptible?: (boolean|null); + + /** Scheduling nodeAffinities. */ + public nodeAffinities: google.cloud.backupdr.v1.Scheduling.INodeAffinity[]; + + /** Scheduling minNodeCpus. */ + public minNodeCpus?: (number|null); + + /** Scheduling provisioningModel. */ + public provisioningModel?: (google.cloud.backupdr.v1.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null); + + /** Scheduling instanceTerminationAction. */ + public instanceTerminationAction?: (google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null); + + /** Scheduling localSsdRecoveryTimeout. */ + public localSsdRecoveryTimeout?: (google.cloud.backupdr.v1.ISchedulingDuration|null); + + /** Scheduling _onHostMaintenance. */ + public _onHostMaintenance?: "onHostMaintenance"; + + /** Scheduling _automaticRestart. */ + public _automaticRestart?: "automaticRestart"; + + /** Scheduling _preemptible. */ + public _preemptible?: "preemptible"; + + /** Scheduling _minNodeCpus. */ + public _minNodeCpus?: "minNodeCpus"; + + /** Scheduling _provisioningModel. */ + public _provisioningModel?: "provisioningModel"; + + /** Scheduling _instanceTerminationAction. */ + public _instanceTerminationAction?: "instanceTerminationAction"; + + /** Scheduling _localSsdRecoveryTimeout. */ + public _localSsdRecoveryTimeout?: "localSsdRecoveryTimeout"; + + /** + * Creates a new Scheduling instance using the specified properties. + * @param [properties] Properties to set + * @returns Scheduling instance + */ + public static create(properties?: google.cloud.backupdr.v1.IScheduling): google.cloud.backupdr.v1.Scheduling; + + /** + * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. + * @param message Scheduling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. + * @param message Scheduling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Scheduling message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Scheduling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Scheduling; + + /** + * Decodes a Scheduling message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Scheduling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Scheduling; + + /** + * Verifies a Scheduling message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Scheduling + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Scheduling; + + /** + * Creates a plain object from a Scheduling message. Also converts values to other types if specified. + * @param message Scheduling + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Scheduling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Scheduling to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Scheduling + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Scheduling { + + /** OnHostMaintenance enum. */ + enum OnHostMaintenance { + ON_HOST_MAINTENANCE_UNSPECIFIED = 0, + TERMINATE = 1, + MIGRATE = 1000 + } + + /** Properties of a NodeAffinity. */ + interface INodeAffinity { + + /** NodeAffinity key */ + key?: (string|null); + + /** NodeAffinity operator */ + operator?: (google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null); + + /** NodeAffinity values */ + values?: (string[]|null); + } + + /** Represents a NodeAffinity. */ + class NodeAffinity implements INodeAffinity { + + /** + * Constructs a new NodeAffinity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.Scheduling.INodeAffinity); + + /** NodeAffinity key. */ + public key?: (string|null); + + /** NodeAffinity operator. */ + public operator?: (google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null); + + /** NodeAffinity values. */ + public values: string[]; + + /** NodeAffinity _key. */ + public _key?: "key"; + + /** NodeAffinity _operator. */ + public _operator?: "operator"; + + /** + * Creates a new NodeAffinity instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeAffinity instance + */ + public static create(properties?: google.cloud.backupdr.v1.Scheduling.INodeAffinity): google.cloud.backupdr.v1.Scheduling.NodeAffinity; + + /** + * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @param message NodeAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @param message NodeAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Scheduling.NodeAffinity; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Scheduling.NodeAffinity; + + /** + * Verifies a NodeAffinity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeAffinity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Scheduling.NodeAffinity; + + /** + * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. + * @param message NodeAffinity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Scheduling.NodeAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeAffinity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeAffinity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NodeAffinity { + + /** Operator enum. */ + enum Operator { + OPERATOR_UNSPECIFIED = 0, + IN = 1, + NOT_IN = 2 + } + } + + /** ProvisioningModel enum. */ + enum ProvisioningModel { + PROVISIONING_MODEL_UNSPECIFIED = 0, + STANDARD = 1, + SPOT = 2 + } + + /** InstanceTerminationAction enum. */ + enum InstanceTerminationAction { + INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0, + DELETE = 1, + STOP = 2 + } + } + + /** Properties of a SchedulingDuration. */ + interface ISchedulingDuration { + + /** SchedulingDuration seconds */ + seconds?: (number|Long|string|null); + + /** SchedulingDuration nanos */ + nanos?: (number|null); + } + + /** Represents a SchedulingDuration. */ + class SchedulingDuration implements ISchedulingDuration { + + /** + * Constructs a new SchedulingDuration. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ISchedulingDuration); + + /** SchedulingDuration seconds. */ + public seconds?: (number|Long|string|null); + + /** SchedulingDuration nanos. */ + public nanos?: (number|null); + + /** SchedulingDuration _seconds. */ + public _seconds?: "seconds"; + + /** SchedulingDuration _nanos. */ + public _nanos?: "nanos"; + + /** + * Creates a new SchedulingDuration instance using the specified properties. + * @param [properties] Properties to set + * @returns SchedulingDuration instance + */ + public static create(properties?: google.cloud.backupdr.v1.ISchedulingDuration): google.cloud.backupdr.v1.SchedulingDuration; + + /** + * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. + * @param message SchedulingDuration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. + * @param message SchedulingDuration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchedulingDuration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchedulingDuration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SchedulingDuration; + + /** + * Decodes a SchedulingDuration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchedulingDuration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SchedulingDuration; + + /** + * Verifies a SchedulingDuration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchedulingDuration + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SchedulingDuration; + + /** + * Creates a plain object from a SchedulingDuration message. Also converts values to other types if specified. + * @param message SchedulingDuration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.SchedulingDuration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchedulingDuration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchedulingDuration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceAccount. */ + interface IServiceAccount { + + /** ServiceAccount email */ + email?: (string|null); + + /** ServiceAccount scopes */ + scopes?: (string[]|null); + } + + /** Represents a ServiceAccount. */ + class ServiceAccount implements IServiceAccount { + + /** + * Constructs a new ServiceAccount. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IServiceAccount); + + /** ServiceAccount email. */ + public email?: (string|null); + + /** ServiceAccount scopes. */ + public scopes: string[]; + + /** ServiceAccount _email. */ + public _email?: "email"; + + /** + * Creates a new ServiceAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceAccount instance + */ + public static create(properties?: google.cloud.backupdr.v1.IServiceAccount): google.cloud.backupdr.v1.ServiceAccount; + + /** + * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. + * @param message ServiceAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. + * @param message ServiceAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ServiceAccount; + + /** + * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ServiceAccount; + + /** + * Verifies a ServiceAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceAccount + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ServiceAccount; + + /** + * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. + * @param message ServiceAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ServiceAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceAccount + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Tags. */ + interface ITags { + + /** Tags items */ + items?: (string[]|null); + } + + /** Represents a Tags. */ + class Tags implements ITags { + + /** + * Constructs a new Tags. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ITags); + + /** Tags items. */ + public items: string[]; + + /** + * Creates a new Tags instance using the specified properties. + * @param [properties] Properties to set + * @returns Tags instance + */ + public static create(properties?: google.cloud.backupdr.v1.ITags): google.cloud.backupdr.v1.Tags; + + /** + * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. + * @param message Tags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ITags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. + * @param message Tags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ITags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Tags message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Tags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Tags; + + /** + * Decodes a Tags message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Tags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Tags; + + /** + * Verifies a Tags message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Tags message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Tags + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Tags; + + /** + * Creates a plain object from a Tags message. Also converts values to other types if specified. + * @param message Tags + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Tags, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Tags to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Tags + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AttachedDisk. */ + interface IAttachedDisk { + + /** AttachedDisk initializeParams */ + initializeParams?: (google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null); + + /** AttachedDisk deviceName */ + deviceName?: (string|null); + + /** AttachedDisk kind */ + kind?: (string|null); + + /** AttachedDisk diskTypeDeprecated */ + diskTypeDeprecated?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); + + /** AttachedDisk mode */ + mode?: (google.cloud.backupdr.v1.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskMode|null); + + /** AttachedDisk source */ + source?: (string|null); + + /** AttachedDisk index */ + index?: (number|Long|string|null); + + /** AttachedDisk boot */ + boot?: (boolean|null); + + /** AttachedDisk autoDelete */ + autoDelete?: (boolean|null); + + /** AttachedDisk license */ + license?: (string[]|null); + + /** AttachedDisk diskInterface */ + diskInterface?: (google.cloud.backupdr.v1.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null); + + /** AttachedDisk guestOsFeature */ + guestOsFeature?: (google.cloud.backupdr.v1.IGuestOsFeature[]|null); + + /** AttachedDisk diskEncryptionKey */ + diskEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** AttachedDisk diskSizeGb */ + diskSizeGb?: (number|Long|string|null); + + /** AttachedDisk savedState */ + savedState?: (google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null); + + /** AttachedDisk diskType */ + diskType?: (string|null); + + /** AttachedDisk type */ + type?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); + } + + /** Represents an AttachedDisk. */ + class AttachedDisk implements IAttachedDisk { + + /** + * Constructs a new AttachedDisk. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAttachedDisk); + + /** AttachedDisk initializeParams. */ + public initializeParams?: (google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null); + + /** AttachedDisk deviceName. */ + public deviceName?: (string|null); + + /** AttachedDisk kind. */ + public kind?: (string|null); + + /** AttachedDisk diskTypeDeprecated. */ + public diskTypeDeprecated?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); + + /** AttachedDisk mode. */ + public mode?: (google.cloud.backupdr.v1.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskMode|null); + + /** AttachedDisk source. */ + public source?: (string|null); + + /** AttachedDisk index. */ + public index?: (number|Long|string|null); + + /** AttachedDisk boot. */ + public boot?: (boolean|null); + + /** AttachedDisk autoDelete. */ + public autoDelete?: (boolean|null); + + /** AttachedDisk license. */ + public license: string[]; + + /** AttachedDisk diskInterface. */ + public diskInterface?: (google.cloud.backupdr.v1.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null); + + /** AttachedDisk guestOsFeature. */ + public guestOsFeature: google.cloud.backupdr.v1.IGuestOsFeature[]; + + /** AttachedDisk diskEncryptionKey. */ + public diskEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** AttachedDisk diskSizeGb. */ + public diskSizeGb?: (number|Long|string|null); + + /** AttachedDisk savedState. */ + public savedState?: (google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null); + + /** AttachedDisk diskType. */ + public diskType?: (string|null); + + /** AttachedDisk type. */ + public type?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); + + /** AttachedDisk _initializeParams. */ + public _initializeParams?: "initializeParams"; + + /** AttachedDisk _deviceName. */ + public _deviceName?: "deviceName"; + + /** AttachedDisk _kind. */ + public _kind?: "kind"; + + /** AttachedDisk _diskTypeDeprecated. */ + public _diskTypeDeprecated?: "diskTypeDeprecated"; + + /** AttachedDisk _mode. */ + public _mode?: "mode"; + + /** AttachedDisk _source. */ + public _source?: "source"; + + /** AttachedDisk _index. */ + public _index?: "index"; + + /** AttachedDisk _boot. */ + public _boot?: "boot"; + + /** AttachedDisk _autoDelete. */ + public _autoDelete?: "autoDelete"; + + /** AttachedDisk _diskInterface. */ + public _diskInterface?: "diskInterface"; + + /** AttachedDisk _diskEncryptionKey. */ + public _diskEncryptionKey?: "diskEncryptionKey"; + + /** AttachedDisk _diskSizeGb. */ + public _diskSizeGb?: "diskSizeGb"; + + /** AttachedDisk _savedState. */ + public _savedState?: "savedState"; + + /** AttachedDisk _diskType. */ + public _diskType?: "diskType"; + + /** AttachedDisk _type. */ + public _type?: "type"; + + /** + * Creates a new AttachedDisk instance using the specified properties. + * @param [properties] Properties to set + * @returns AttachedDisk instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAttachedDisk): google.cloud.backupdr.v1.AttachedDisk; + + /** + * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. + * @param message AttachedDisk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. + * @param message AttachedDisk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AttachedDisk message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AttachedDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AttachedDisk; + + /** + * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AttachedDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AttachedDisk; + + /** + * Verifies an AttachedDisk message. + * @param message Plain 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 AttachedDisk message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AttachedDisk + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AttachedDisk; + + /** + * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. + * @param message AttachedDisk + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AttachedDisk, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AttachedDisk to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AttachedDisk + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AttachedDisk { + + /** Properties of an InitializeParams. */ + interface IInitializeParams { + + /** InitializeParams diskName */ + diskName?: (string|null); + + /** InitializeParams replicaZones */ + replicaZones?: (string[]|null); + } + + /** Represents an InitializeParams. */ + class InitializeParams implements IInitializeParams { + + /** + * Constructs a new InitializeParams. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams); + + /** InitializeParams diskName. */ + public diskName?: (string|null); + + /** InitializeParams replicaZones. */ + public replicaZones: string[]; + + /** InitializeParams _diskName. */ + public _diskName?: "diskName"; + + /** + * Creates a new InitializeParams instance using the specified properties. + * @param [properties] Properties to set + * @returns InitializeParams instance + */ + public static create(properties?: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Encodes the specified InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @param message InitializeParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @param message InitializeParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InitializeParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Decodes an InitializeParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Verifies an InitializeParams message. + * @param message Plain 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 InitializeParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InitializeParams + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. + * @param message InitializeParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AttachedDisk.InitializeParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InitializeParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InitializeParams + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** DiskType enum. */ + enum DiskType { + DISK_TYPE_UNSPECIFIED = 0, + SCRATCH = 1, + PERSISTENT = 2 + } + + /** DiskMode enum. */ + enum DiskMode { + DISK_MODE_UNSPECIFIED = 0, + READ_WRITE = 1, + READ_ONLY = 2, + LOCKED = 3 + } + + /** DiskInterface enum. */ + enum DiskInterface { + DISK_INTERFACE_UNSPECIFIED = 0, + SCSI = 1, + NVME = 2, + NVDIMM = 3, + ISCSI = 4 + } + + /** DiskSavedState enum. */ + enum DiskSavedState { + DISK_SAVED_STATE_UNSPECIFIED = 0, + PRESERVED = 1 + } + } + + /** Properties of a GuestOsFeature. */ + interface IGuestOsFeature { + + /** GuestOsFeature type */ + type?: (google.cloud.backupdr.v1.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null); + } + + /** Represents a GuestOsFeature. */ + class GuestOsFeature implements IGuestOsFeature { + + /** + * Constructs a new GuestOsFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGuestOsFeature); + + /** GuestOsFeature type. */ + public type?: (google.cloud.backupdr.v1.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null); + + /** GuestOsFeature _type. */ + public _type?: "type"; + + /** + * Creates a new GuestOsFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns GuestOsFeature instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGuestOsFeature): google.cloud.backupdr.v1.GuestOsFeature; + + /** + * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @param message GuestOsFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @param message GuestOsFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GuestOsFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GuestOsFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GuestOsFeature; + + /** + * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GuestOsFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GuestOsFeature; + + /** + * Verifies a GuestOsFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GuestOsFeature + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GuestOsFeature; + + /** + * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. + * @param message GuestOsFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GuestOsFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GuestOsFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GuestOsFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GuestOsFeature { + + /** FeatureType enum. */ + enum FeatureType { + FEATURE_TYPE_UNSPECIFIED = 0, + VIRTIO_SCSI_MULTIQUEUE = 1, + WINDOWS = 2, + MULTI_IP_SUBNET = 3, + UEFI_COMPATIBLE = 4, + SECURE_BOOT = 5, + GVNIC = 6, + SEV_CAPABLE = 7, + BARE_METAL_LINUX_COMPATIBLE = 8, + SUSPEND_RESUME_COMPATIBLE = 9, + SEV_LIVE_MIGRATABLE = 10, + SEV_SNP_CAPABLE = 11, + TDX_CAPABLE = 12, + IDPF = 13, + SEV_LIVE_MIGRATABLE_V2 = 14 + } + } + + /** KeyRevocationActionType enum. */ + enum KeyRevocationActionType { + KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0, + NONE = 1, + STOP = 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); + } + + /** 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; + + /** + * 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 FieldInfo. */ + interface IFieldInfo { + + /** FieldInfo format */ + format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); + } + + /** Represents a FieldInfo. */ + class FieldInfo implements IFieldInfo { + + /** + * Constructs a new FieldInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IFieldInfo); + + /** FieldInfo format. */ + public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); + + /** + * Creates a new FieldInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldInfo instance + */ + public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldInfo + * @throws {Error} If the payload is not 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.FieldInfo; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldInfo + * @throws {Error} If the payload 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.FieldInfo; + + /** + * Verifies a FieldInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldInfo + */ + public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @param message FieldInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldInfo { + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + UUID4 = 1, + IPV4 = 2, + IPV6 = 3, + IPV4_OR_IPV6 = 4 + } + } + + /** 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.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceDescriptor, 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 + * 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.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * 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 CustomHttpPattern + * @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.CustomHttpPattern; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern + * @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.CustomHttpPattern; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; /** - * Verifies a CustomHttpPattern message. + * 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomHttpPattern + * @returns ResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern + * 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.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this ResourceDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomHttpPattern + * 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; } - /** Properties of a CommonLanguageSettings. */ - interface ICommonLanguageSettings { + namespace ResourceDescriptor { - /** CommonLanguageSettings referenceDocsUri */ - referenceDocsUri?: (string|null); + /** 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 { - /** CommonLanguageSettings destinations */ - destinations?: (google.api.ClientLibraryDestination[]|null); + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); } - /** Represents a CommonLanguageSettings. */ - class CommonLanguageSettings implements ICommonLanguageSettings { + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { /** - * Constructs a new CommonLanguageSettings. + * Constructs a new FileDescriptorSet. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICommonLanguageSettings); - - /** CommonLanguageSettings referenceDocsUri. */ - public referenceDocsUri: string; + constructor(properties?: google.protobuf.IFileDescriptorSet); - /** CommonLanguageSettings destinations. */ - public destinations: google.api.ClientLibraryDestination[]; + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; /** - * Creates a new CommonLanguageSettings instance using the specified properties. + * Creates a new FileDescriptorSet instance using the specified properties. * @param [properties] Properties to set - * @returns CommonLanguageSettings instance + * @returns FileDescriptorSet instance */ - public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode + * 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.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFileDescriptorSet, 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 + * 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.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * 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 CommonLanguageSettings + * @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.api.CommonLanguageSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CommonLanguageSettings + * @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.api.CommonLanguageSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; /** - * Verifies a CommonLanguageSettings message. + * 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 CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CommonLanguageSettings + * @returns FileDescriptorSet */ - public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @param message CommonLanguageSettings + * 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.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CommonLanguageSettings to JSON. + * Converts this FileDescriptorSet to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CommonLanguageSettings + * 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; } - /** Properties of a ClientLibrarySettings. */ - interface IClientLibrarySettings { + /** 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 + } - /** ClientLibrarySettings version */ - version?: (string|null); + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { - /** ClientLibrarySettings launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + /** FileDescriptorProto name */ + name?: (string|null); - /** ClientLibrarySettings restNumericEnums */ - restNumericEnums?: (boolean|null); + /** FileDescriptorProto package */ + "package"?: (string|null); - /** ClientLibrarySettings javaSettings */ - javaSettings?: (google.api.IJavaSettings|null); + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); - /** ClientLibrarySettings cppSettings */ - cppSettings?: (google.api.ICppSettings|null); + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); - /** ClientLibrarySettings phpSettings */ - phpSettings?: (google.api.IPhpSettings|null); + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); - /** ClientLibrarySettings pythonSettings */ - pythonSettings?: (google.api.IPythonSettings|null); + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); - /** ClientLibrarySettings nodeSettings */ - nodeSettings?: (google.api.INodeSettings|null); + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** ClientLibrarySettings dotnetSettings */ - dotnetSettings?: (google.api.IDotnetSettings|null); + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); - /** ClientLibrarySettings rubySettings */ - rubySettings?: (google.api.IRubySettings|null); + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** ClientLibrarySettings goSettings */ - goSettings?: (google.api.IGoSettings|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 ClientLibrarySettings. */ - class ClientLibrarySettings implements IClientLibrarySettings { + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { /** - * Constructs a new ClientLibrarySettings. + * Constructs a new FileDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.IClientLibrarySettings); + constructor(properties?: google.protobuf.IFileDescriptorProto); - /** ClientLibrarySettings version. */ - public version: string; + /** FileDescriptorProto name. */ + public name: string; - /** ClientLibrarySettings launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + /** FileDescriptorProto package. */ + public package: string; - /** ClientLibrarySettings restNumericEnums. */ - public restNumericEnums: boolean; + /** FileDescriptorProto dependency. */ + public dependency: string[]; - /** ClientLibrarySettings javaSettings. */ - public javaSettings?: (google.api.IJavaSettings|null); + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; - /** ClientLibrarySettings cppSettings. */ - public cppSettings?: (google.api.ICppSettings|null); + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; - /** ClientLibrarySettings phpSettings. */ - public phpSettings?: (google.api.IPhpSettings|null); + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; - /** ClientLibrarySettings pythonSettings. */ - public pythonSettings?: (google.api.IPythonSettings|null); + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** ClientLibrarySettings nodeSettings. */ - public nodeSettings?: (google.api.INodeSettings|null); + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; - /** ClientLibrarySettings dotnetSettings. */ - public dotnetSettings?: (google.api.IDotnetSettings|null); + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** ClientLibrarySettings rubySettings. */ - public rubySettings?: (google.api.IRubySettings|null); + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); - /** ClientLibrarySettings goSettings. */ - public goSettings?: (google.api.IGoSettings|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 ClientLibrarySettings instance using the specified properties. + * Creates a new FileDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns ClientLibrarySettings instance + * @returns FileDescriptorProto instance */ - public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode + * 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.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFileDescriptorProto, 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 + * 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.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * 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 ClientLibrarySettings + * @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.api.ClientLibrarySettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ClientLibrarySettings + * @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.api.ClientLibrarySettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; /** - * Verifies a ClientLibrarySettings message. + * 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 ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ClientLibrarySettings + * @returns FileDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @param message ClientLibrarySettings + * 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.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ClientLibrarySettings to JSON. + * Converts this FileDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ClientLibrarySettings + * 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 Publishing. */ - interface IPublishing { + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { - /** Publishing methodSettings */ - methodSettings?: (google.api.IMethodSettings[]|null); + /** DescriptorProto name */ + name?: (string|null); - /** Publishing newIssueUri */ - newIssueUri?: (string|null); + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); - /** Publishing documentationUri */ - documentationUri?: (string|null); + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** Publishing apiShortName */ - apiShortName?: (string|null); + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); - /** Publishing githubLabel */ - githubLabel?: (string|null); + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** Publishing codeownerGithubTeams */ - codeownerGithubTeams?: (string[]|null); + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - /** Publishing docTagPrefix */ - docTagPrefix?: (string|null); + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - /** Publishing organization */ - organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); - /** Publishing librarySettings */ - librarySettings?: (google.api.IClientLibrarySettings[]|null); + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - /** Publishing protoReferenceDocumentationUri */ - protoReferenceDocumentationUri?: (string|null); + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); } - /** Represents a Publishing. */ - class Publishing implements IPublishing { + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { /** - * Constructs a new Publishing. + * Constructs a new DescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.IPublishing); + constructor(properties?: google.protobuf.IDescriptorProto); - /** Publishing methodSettings. */ - public methodSettings: google.api.IMethodSettings[]; + /** DescriptorProto name. */ + public name: string; - /** Publishing newIssueUri. */ - public newIssueUri: string; + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; - /** Publishing documentationUri. */ - public documentationUri: string; + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** Publishing apiShortName. */ - public apiShortName: string; + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; - /** Publishing githubLabel. */ - public githubLabel: string; + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** Publishing codeownerGithubTeams. */ - public codeownerGithubTeams: string[]; + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - /** Publishing docTagPrefix. */ - public docTagPrefix: string; + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - /** Publishing organization. */ - public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); - /** Publishing librarySettings. */ - public librarySettings: google.api.IClientLibrarySettings[]; + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - /** Publishing protoReferenceDocumentationUri. */ - public protoReferenceDocumentationUri: string; + /** DescriptorProto reservedName. */ + public reservedName: string[]; /** - * Creates a new Publishing instance using the specified properties. + * Creates a new DescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns Publishing instance + * @returns DescriptorProto instance */ - public static create(properties?: google.api.IPublishing): google.api.Publishing; + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode + * 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.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDescriptorProto, 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 + * 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.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Publishing message from the specified reader or buffer. + * 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 Publishing + * @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.api.Publishing; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Publishing + * @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.api.Publishing; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; /** - * Verifies a Publishing message. + * 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 Publishing message from a plain object. Also converts values to their respective internal types. + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Publishing + * @returns DescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.Publishing; + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @param message Publishing + * 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.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Publishing to JSON. + * Converts this DescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Publishing + * 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; } - /** Properties of a JavaSettings. */ - interface IJavaSettings { + namespace DescriptorProto { - /** JavaSettings libraryPackage */ - libraryPackage?: (string|null); + /** Properties of an ExtensionRange. */ + interface IExtensionRange { - /** JavaSettings serviceClassNames */ - serviceClassNames?: ({ [k: string]: string }|null); + /** ExtensionRange start */ + start?: (number|null); - /** JavaSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } + /** ExtensionRange end */ + end?: (number|null); - /** Represents a JavaSettings. */ - class JavaSettings implements IJavaSettings { + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } - /** - * Constructs a new JavaSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IJavaSettings); + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { - /** JavaSettings libraryPackage. */ - public libraryPackage: string; + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - /** JavaSettings serviceClassNames. */ - public serviceClassNames: { [k: string]: string }; + /** ExtensionRange start. */ + public start: number; - /** JavaSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** ExtensionRange end. */ + public end: number; - /** - * 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; + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); - /** - * 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; + /** + * 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 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; + /** + * 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; - /** - * 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; + /** + * 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 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; + /** + * 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; - /** - * 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 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 }; - /** - * 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; + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * 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 }; + /** + * 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; + } - /** - * Converts this JavaSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Properties of a ReservedRange. */ + interface IReservedRange { - /** - * 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; - } + /** ReservedRange start */ + start?: (number|null); - /** Properties of a CppSettings. */ - interface ICppSettings { + /** ReservedRange end */ + end?: (number|null); + } - /** CppSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { - /** Represents a CppSettings. */ - class CppSettings implements ICppSettings { + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - /** - * Constructs a new CppSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICppSettings); + /** ReservedRange start. */ + public start: number; - /** CppSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** ReservedRange end. */ + public end: number; - /** - * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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; + /** + * 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 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); + /** + * 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 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 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 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 }; + /** + * 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 CppSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this ReservedRange 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; + /** + * 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 a PhpSettings. */ - interface IPhpSettings { + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { - /** PhpSettings common */ - common?: (google.api.ICommonLanguageSettings|null); + /** 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 a PhpSettings. */ - class PhpSettings implements IPhpSettings { + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { /** - * Constructs a new PhpSettings. + * Constructs a new ExtensionRangeOptions. * @param [properties] Properties to set */ - constructor(properties?: google.api.IPhpSettings); + constructor(properties?: google.protobuf.IExtensionRangeOptions); - /** PhpSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** 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 PhpSettings instance using the specified properties. + * Creates a new ExtensionRangeOptions instance using the specified properties. * @param [properties] Properties to set - * @returns PhpSettings instance + * @returns ExtensionRangeOptions instance */ - public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode + * 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.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IExtensionRangeOptions, 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 + * 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.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PhpSettings message from the specified reader or buffer. + * 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 PhpSettings + * @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.api.PhpSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PhpSettings + * @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.api.PhpSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; /** - * Verifies a PhpSettings message. + * 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 a PhpSettings message from a plain object. Also converts values to their respective internal types. + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PhpSettings + * @returns ExtensionRangeOptions */ - public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @param message PhpSettings + * 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.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PhpSettings to JSON. + * Converts this ExtensionRangeOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PhpSettings + * 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; } - /** Properties of a PythonSettings. */ - interface IPythonSettings { + namespace ExtensionRangeOptions { - /** PythonSettings common */ - common?: (google.api.ICommonLanguageSettings|null); + /** 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 + } } - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { - /** - * Constructs a new PythonSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPythonSettings); + /** FieldDescriptorProto name */ + name?: (string|null); - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** FieldDescriptorProto number */ + number?: (number|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; + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - /** - * 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; + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - /** - * 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; + /** FieldDescriptorProto typeName */ + typeName?: (string|null); - /** - * 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; + /** FieldDescriptorProto extendee */ + extendee?: (string|null); - /** - * 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; + /** 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); + } - /** - * 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); + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonSettings + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + constructor(properties?: google.protobuf.IFieldDescriptorProto); - /** - * 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 }; + /** FieldDescriptorProto name. */ + public name: string; - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** FieldDescriptorProto number. */ + public number: number; - /** - * 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; - } + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - /** Properties of a NodeSettings. */ - interface INodeSettings { + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } + /** FieldDescriptorProto typeName. */ + public typeName: string; - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { + /** FieldDescriptorProto extendee. */ + public extendee: string; - /** - * Constructs a new NodeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.INodeSettings); + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** 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 NodeSettings instance using the specified properties. + * Creates a new FieldDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns NodeSettings instance + * @returns FieldDescriptorProto instance */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode + * 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.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldDescriptorProto, 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 + * 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.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NodeSettings message from the specified reader or buffer. + * 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 NodeSettings + * @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.api.NodeSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NodeSettings + * @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.api.NodeSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; /** - * Verifies a NodeSettings message. + * 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 NodeSettings message from a plain object. Also converts values to their respective internal types. + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NodeSettings + * @returns FieldDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings + * 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.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NodeSettings to JSON. + * Converts this FieldDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NodeSettings + * 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; } - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); + namespace FieldDescriptorProto { - /** DotnetSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); + /** 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 + } - /** DotnetSettings renamedResources */ - renamedResources?: ({ [k: string]: string }|null); + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } - /** DotnetSettings ignoredResources */ - ignoredResources?: (string[]|null); + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { - /** DotnetSettings forcedNamespaceAliases */ - forcedNamespaceAliases?: (string[]|null); + /** OneofDescriptorProto name */ + name?: (string|null); - /** DotnetSettings handwrittenSignatures */ - handwrittenSignatures?: (string[]|null); + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); } - /** Represents a DotnetSettings. */ - class DotnetSettings implements IDotnetSettings { + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { /** - * Constructs a new DotnetSettings. + * Constructs a new OneofDescriptorProto. * @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[]; + constructor(properties?: google.protobuf.IOneofDescriptorProto); - /** DotnetSettings forcedNamespaceAliases. */ - public forcedNamespaceAliases: string[]; + /** OneofDescriptorProto name. */ + public name: string; - /** DotnetSettings handwrittenSignatures. */ - public handwrittenSignatures: string[]; + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); /** - * Creates a new DotnetSettings instance using the specified properties. + * Creates a new OneofDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns DotnetSettings instance + * @returns OneofDescriptorProto instance */ - public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode + * 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.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IOneofDescriptorProto, 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 + * 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.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DotnetSettings message from the specified reader or buffer. + * 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 DotnetSettings + * @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.api.DotnetSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DotnetSettings + * @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.api.DotnetSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; /** - * Verifies a DotnetSettings message. + * 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 a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DotnetSettings + * @returns OneofDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @param message DotnetSettings + * 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.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DotnetSettings to JSON. + * Converts this OneofDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DotnetSettings + * 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 a RubySettings. */ - interface IRubySettings { + /** 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); - /** RubySettings common */ - common?: (google.api.ICommonLanguageSettings|null); + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); } - /** Represents a RubySettings. */ - class RubySettings implements IRubySettings { + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { /** - * Constructs a new RubySettings. + * Constructs a new EnumDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.IRubySettings); + constructor(properties?: google.protobuf.IEnumDescriptorProto); - /** RubySettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** 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 RubySettings instance using the specified properties. + * Creates a new EnumDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns RubySettings instance + * @returns EnumDescriptorProto instance */ - public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode + * 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.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumDescriptorProto, 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 + * 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.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RubySettings message from the specified reader or buffer. + * 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 RubySettings + * @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.api.RubySettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RubySettings + * @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.api.RubySettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; /** - * Verifies a RubySettings message. + * 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 a RubySettings message from a plain object. Also converts values to their respective internal types. + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RubySettings + * @returns EnumDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @param message RubySettings + * 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.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RubySettings to JSON. + * Converts this EnumDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RubySettings + * 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; } - /** Properties of a GoSettings. */ - interface IGoSettings { + namespace EnumDescriptorProto { - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); + /** 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; + } } - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { + /** 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 GoSettings. + * Constructs a new EnumValueDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.IGoSettings); + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); /** - * Creates a new GoSettings instance using the specified properties. + * Creates a new EnumValueDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns GoSettings instance + * @returns EnumValueDescriptorProto instance */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode + * 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.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumValueDescriptorProto, 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 + * 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.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GoSettings message from the specified reader or buffer. + * 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 GoSettings + * @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.api.GoSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GoSettings + * @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.api.GoSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; /** - * Verifies a GoSettings message. + * 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 a GoSettings message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GoSettings + * @returns EnumValueDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings + * 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.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GoSettings to JSON. + * Converts this EnumValueDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GoSettings + * 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 MethodSettings. */ - interface IMethodSettings { + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { - /** MethodSettings selector */ - selector?: (string|null); + /** ServiceDescriptorProto name */ + name?: (string|null); - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); } - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { /** - * Constructs a new MethodSettings. + * Constructs a new ServiceDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMethodSettings); + constructor(properties?: google.protobuf.IServiceDescriptorProto); - /** MethodSettings selector. */ - public selector: string; + /** ServiceDescriptorProto name. */ + public name: string; - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: string[]; + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); /** - * Creates a new MethodSettings instance using the specified properties. + * Creates a new ServiceDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns MethodSettings instance + * @returns ServiceDescriptorProto instance */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode + * 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.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IServiceDescriptorProto, 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 + * 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.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MethodSettings message from the specified reader or buffer. + * 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 MethodSettings + * @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.api.MethodSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MethodSettings + * @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.api.MethodSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; /** - * Verifies a MethodSettings message. + * 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 MethodSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodSettings + * @returns ServiceDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings + * 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.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 - } + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** 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 - } + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { + /** + * 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; + } - /** ResourceDescriptor type */ - type?: (string|null); + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); + /** MethodDescriptorProto name */ + name?: (string|null); - /** ResourceDescriptor nameField */ - nameField?: (string|null); + /** MethodDescriptorProto inputType */ + inputType?: (string|null); - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + /** MethodDescriptorProto outputType */ + outputType?: (string|null); - /** ResourceDescriptor plural */ - plural?: (string|null); + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); - /** ResourceDescriptor singular */ - singular?: (string|null); + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); } - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { /** - * Constructs a new ResourceDescriptor. + * Constructs a new MethodDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; + constructor(properties?: google.protobuf.IMethodDescriptorProto); - /** ResourceDescriptor pattern. */ - public pattern: string[]; + /** MethodDescriptorProto name. */ + public name: string; - /** ResourceDescriptor nameField. */ - public nameField: string; + /** MethodDescriptorProto inputType. */ + public inputType: string; - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + /** MethodDescriptorProto outputType. */ + public outputType: string; - /** ResourceDescriptor plural. */ - public plural: string; + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); - /** ResourceDescriptor singular. */ - public singular: string; + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new MethodDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceDescriptor instance + * @returns MethodDescriptorProto instance */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * 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.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMethodDescriptorProto, 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 + * 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.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * 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 ResourceDescriptor + * @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.api.ResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; /** - * Verifies a ResourceDescriptor message. + * 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceDescriptor + * @returns MethodDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor + * 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.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this MethodDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResourceDescriptor + * 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; } - namespace ResourceDescriptor { + /** Properties of a FileOptions. */ + interface IFileOptions { - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } + /** FileOptions javaPackage */ + javaPackage?: (string|null); - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); - /** Properties of a ResourceReference. */ - interface IResourceReference { + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); - /** ResourceReference type */ - type?: (string|null); + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); - /** ResourceReference childType */ - childType?: (string|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 ResourceReference. */ - class ResourceReference implements IResourceReference { + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { /** - * Constructs a new ResourceReference. + * Constructs a new FileOptions. * @param [properties] Properties to set */ - constructor(properties?: google.api.IResourceReference); + constructor(properties?: google.protobuf.IFileOptions); - /** ResourceReference type. */ - public type: string; + /** FileOptions javaPackage. */ + public javaPackage: string; - /** ResourceReference childType. */ - public childType: string; + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: 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; + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; - /** - * 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; + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; - /** - * 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; + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - /** - * 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; + /** FileOptions goPackage. */ + public goPackage: string; - /** - * 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; + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; - /** - * 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); + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; - /** - * 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; + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; - /** - * 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 }; + /** FileOptions deprecated. */ + public deprecated: boolean; - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; - /** - * 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; - } - } + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; - /** Namespace protobuf. */ - namespace protobuf { + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { + /** FileOptions phpNamespace. */ + public phpNamespace: string; - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new FileDescriptorSet instance using the specified properties. + * Creates a new FileOptions instance using the specified properties. * @param [properties] Properties to set - * @returns FileDescriptorSet instance + * @returns FileOptions instance */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode + * 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.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFileOptions, 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 + * 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.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. + * 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 FileDescriptorSet + * @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.FileDescriptorSet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * Decodes a FileOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet + * @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.FileDescriptorSet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; /** - * Verifies a FileDescriptorSet message. + * 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileDescriptorSet + * @returns FileOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet + * 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.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileDescriptorSet to JSON. + * Converts this FileOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FileDescriptorSet + * 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; } - /** 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); + namespace FileOptions { - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); + /** Properties of a MessageOptions. */ + interface IMessageOptions { - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); + /** MessageOptions deprecated */ + deprecated?: (boolean|null); - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); - /** FileDescriptorProto syntax */ - syntax?: (string|null); + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); } - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { /** - * Constructs a new FileDescriptorProto. + * Constructs a new MessageOptions. * @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[]; + constructor(properties?: google.protobuf.IMessageOptions); - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; + /** MessageOptions deprecated. */ + public deprecated: boolean; - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); + /** MessageOptions mapEntry. */ + public mapEntry: boolean; - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; - /** FileDescriptorProto syntax. */ - public syntax: string; + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new FileDescriptorProto instance using the specified properties. + * Creates a new MessageOptions instance using the specified properties. * @param [properties] Properties to set - * @returns FileDescriptorProto instance + * @returns MessageOptions instance */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode + * 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.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMessageOptions, 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 + * 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.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. + * 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 FileDescriptorProto + * @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.FileDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto + * @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.FileDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; /** - * Verifies a FileDescriptorProto message. + * 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileDescriptorProto + * @returns MessageOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto + * 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.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileDescriptorProto to JSON. + * Converts this MessageOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FileDescriptorProto + * 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 DescriptorProto. */ - interface IDescriptorProto { + /** Properties of a FieldOptions. */ + interface IFieldOptions { - /** DescriptorProto name */ - name?: (string|null); + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); + /** FieldOptions packed */ + packed?: (boolean|null); - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); + /** FieldOptions lazy */ + lazy?: (boolean|null); - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + /** FieldOptions deprecated */ + deprecated?: (boolean|null); - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + /** FieldOptions weak */ + weak?: (boolean|null); - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - /** DescriptorProto reservedName */ - reservedName?: (string[]|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.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); } - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { /** - * Constructs a new DescriptorProto. + * Constructs a new FieldOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDescriptorProto); + constructor(properties?: google.protobuf.IFieldOptions); - /** DescriptorProto name. */ - public name: string; + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; + /** FieldOptions packed. */ + public packed: boolean; - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; + /** FieldOptions lazy. */ + public lazy: boolean; - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + /** FieldOptions deprecated. */ + public deprecated: boolean; - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + /** FieldOptions weak. */ + public weak: boolean; - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); + /** FieldOptions debugRedact. */ + public debugRedact: boolean; - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - /** DescriptorProto reservedName. */ - public reservedName: string[]; + /** 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 DescriptorProto instance using the specified properties. + * Creates a new FieldOptions instance using the specified properties. * @param [properties] Properties to set - * @returns DescriptorProto instance + * @returns FieldOptions instance */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode + * 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.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldOptions, 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 + * 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.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DescriptorProto message from the specified reader or buffer. + * 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 DescriptorProto + * @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.DescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DescriptorProto + * @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.DescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; /** - * Verifies a DescriptorProto message. + * 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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DescriptorProto + * @returns FieldOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto + * 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.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DescriptorProto to JSON. + * Converts this FieldOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DescriptorProto + * 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 DescriptorProto { + 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 + } - /** Properties of an ExtensionRange. */ - interface IExtensionRange { + /** 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 + } - /** ExtensionRange start */ - start?: (number|null); + /** Properties of an EditionDefault. */ + interface IEditionDefault { - /** ExtensionRange end */ - end?: (number|null); + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); + /** EditionDefault value */ + value?: (string|null); } - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { /** - * Constructs a new ExtensionRange. + * Constructs a new EditionDefault. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); - /** ExtensionRange end. */ - public end: number; + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); + /** EditionDefault value. */ + public value: string; /** - * Creates a new ExtensionRange instance using the specified properties. + * Creates a new EditionDefault instance using the specified properties. * @param [properties] Properties to set - * @returns ExtensionRange instance + * @returns EditionDefault instance */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; /** - * 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 + * 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.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, 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 + * 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.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExtensionRange message from the specified reader or buffer. + * 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 ExtensionRange + * @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.DescriptorProto.ExtensionRange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExtensionRange + * @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.DescriptorProto.ExtensionRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; /** - * Verifies an ExtensionRange message. + * 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 ExtensionRange message from a plain object. Also converts values to their respective internal types. + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExtensionRange + * @returns EditionDefault */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange + * 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.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExtensionRange to JSON. + * Converts this EditionDefault to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExtensionRange + * Gets the default type url for EditionDefault * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } - /** Properties of a ReservedRange. */ - interface IReservedRange { + /** Properties of an OneofOptions. */ + interface IOneofOptions { - /** ReservedRange start */ - start?: (number|null); + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); - /** ReservedRange end */ - end?: (number|null); - } + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); - /** ReservedRange start. */ - public start: number; + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); - /** ReservedRange end. */ - public end: number; + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** - * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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; + /** + * 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 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); + /** + * 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 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 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 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 }; + /** + * 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 ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this OneofOptions 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; - } + /** + * 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 ExtensionRangeOptions. */ - interface IExtensionRangeOptions { + /** Properties of an EnumOptions. */ + interface IEnumOptions { - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + /** EnumOptions deprecated */ + deprecated?: (boolean|null); - /** ExtensionRangeOptions features */ + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ features?: (google.protobuf.IFeatureSet|null); - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { /** - * Constructs a new ExtensionRangeOptions. + * Constructs a new EnumOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); + constructor(properties?: google.protobuf.IEnumOptions); - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** EnumOptions allowAlias. */ + public allowAlias: boolean; - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + /** EnumOptions deprecated. */ + public deprecated: boolean; - /** ExtensionRangeOptions features. */ + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ public features?: (google.protobuf.IFeatureSet|null); - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new ExtensionRangeOptions instance using the specified properties. + * Creates a new EnumOptions instance using the specified properties. * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance + * @returns EnumOptions instance */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode + * 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.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumOptions, 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 + * 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.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * 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 ExtensionRangeOptions + * @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.ExtensionRangeOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions + * @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.ExtensionRangeOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; /** - * Verifies an ExtensionRangeOptions message. + * 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 ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExtensionRangeOptions + * @returns EnumOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions + * 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.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExtensionRangeOptions to JSON. + * Converts this EnumOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExtensionRangeOptions + * 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; } - 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; + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { - /** - * 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); + /** EnumValueOptions deprecated */ + deprecated?: (boolean|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; + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); - /** - * 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 }; + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** - * 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; - } + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { + /** EnumValueOptions deprecated. */ + public deprecated: boolean; - /** FieldDescriptorProto name */ - name?: (string|null); + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); - /** FieldDescriptorProto number */ - number?: (number|null); + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + /** + * 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; - /** FieldDescriptorProto typeName */ - typeName?: (string|null); + /** + * 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; - /** FieldDescriptorProto extendee */ - extendee?: (string|null); + /** + * 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; - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); + /** + * 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; - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); + /** + * 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; - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); + /** + * 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); - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|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; - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } + /** + * 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 }; - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FieldDescriptorProto name. */ - public name: string; + /** Properties of a ServiceOptions. */ + interface IServiceOptions { - /** FieldDescriptorProto number. */ - public number: number; + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** FieldDescriptorProto typeName. */ - public typeName: string; + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); - /** FieldDescriptorProto extendee. */ - public extendee: string; + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); - /** FieldDescriptorProto jsonName. */ - public jsonName: string; + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); + /** ServiceOptions deprecated. */ + public deprecated: boolean; - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new FieldDescriptorProto instance using the specified properties. + * Creates a new ServiceOptions instance using the specified properties. * @param [properties] Properties to set - * @returns FieldDescriptorProto instance + * @returns ServiceOptions instance */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode + * 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.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IServiceOptions, 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 + * 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.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * 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 FieldDescriptorProto + * @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.FieldDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto + * @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.FieldDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; /** - * Verifies a FieldDescriptorProto message. + * 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldDescriptorProto + * @returns ServiceOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto + * 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.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldDescriptorProto to JSON. + * Converts this ServiceOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FieldDescriptorProto + * 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; } - namespace FieldDescriptorProto { + /** Properties of a MethodOptions. */ + interface IMethodOptions { - /** 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 - } + /** MethodOptions deprecated */ + deprecated?: (boolean|null); - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); - /** OneofDescriptorProto name */ - name?: (string|null); + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|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 an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { /** - * Constructs a new OneofDescriptorProto. + * Constructs a new MethodOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; - /** OneofDescriptorProto name. */ - public name: string; + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new OneofDescriptorProto instance using the specified properties. + * Creates a new MethodOptions instance using the specified properties. * @param [properties] Properties to set - * @returns OneofDescriptorProto instance + * @returns MethodOptions instance */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode + * 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.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMethodOptions, 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 + * 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.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * 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 OneofDescriptorProto + * @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.OneofDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto + * @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.OneofDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; /** - * Verifies an OneofDescriptorProto message. + * 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 an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OneofDescriptorProto + * @returns MethodOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto + * 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.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OneofDescriptorProto to JSON. + * Converts this MethodOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OneofDescriptorProto + * 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; } - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { + namespace MethodOptions { - /** EnumDescriptorProto name */ - name?: (string|null); + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); - /** EnumDescriptorProto reservedName */ - reservedName?: (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 EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { /** - * Constructs a new EnumDescriptorProto. + * Constructs a new UninterpretedOption. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); + constructor(properties?: google.protobuf.IUninterpretedOption); - /** EnumDescriptorProto name. */ - public name: string; + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; + /** UninterpretedOption identifierValue. */ + public identifierValue: string; - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; /** - * Creates a new EnumDescriptorProto instance using the specified properties. + * Creates a new UninterpretedOption instance using the specified properties. * @param [properties] Properties to set - * @returns EnumDescriptorProto instance + * @returns UninterpretedOption instance */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode + * 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.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IUninterpretedOption, 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 + * 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.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * 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 EnumDescriptorProto + * @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.EnumDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto + * @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.EnumDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; /** - * Verifies an EnumDescriptorProto message. + * 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 EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumDescriptorProto + * @returns UninterpretedOption */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto + * 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.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumDescriptorProto to JSON. + * Converts this UninterpretedOption to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumDescriptorProto + * 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 EnumDescriptorProto { + namespace UninterpretedOption { - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { + /** Properties of a NamePart. */ + interface INamePart { - /** EnumReservedRange start */ - start?: (number|null); + /** NamePart namePart */ + namePart: string; - /** EnumReservedRange end */ - end?: (number|null); + /** NamePart isExtension */ + isExtension: boolean; } - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { + /** Represents a NamePart. */ + class NamePart implements INamePart { /** - * Constructs a new EnumReservedRange. + * Constructs a new NamePart. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - /** EnumReservedRange start. */ - public start: number; + /** NamePart namePart. */ + public namePart: string; - /** EnumReservedRange end. */ - public end: number; + /** NamePart isExtension. */ + public isExtension: boolean; /** - * Creates a new EnumReservedRange instance using the specified properties. + * Creates a new NamePart instance using the specified properties. * @param [properties] Properties to set - * @returns EnumReservedRange instance + * @returns NamePart instance */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; /** - * 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 + * 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.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.UninterpretedOption.INamePart, 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 + * 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.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumReservedRange message from the specified reader or buffer. + * 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 EnumReservedRange + * @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.EnumDescriptorProto.EnumReservedRange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * Decodes a NamePart message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumReservedRange + * @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.EnumDescriptorProto.EnumReservedRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; /** - * Verifies an EnumReservedRange message. + * 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 an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumReservedRange + * @returns NamePart */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange + * 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.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumReservedRange to JSON. + * Converts this NamePart to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumReservedRange + * Gets the default type url for NamePart * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -4986,3971 +18435,3873 @@ export namespace google { } } - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); + /** Properties of a FeatureSet. */ + interface IFeatureSet { - /** EnumValueDescriptorProto number */ - number?: (number|null); + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); - /** EnumValueDescriptorProto name. */ - public name: string; + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); - /** EnumValueDescriptorProto number. */ - public number: number; + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. + * Constructs a new FeatureSet. * @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); + constructor(properties?: google.protobuf.IFeatureSet); - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); - /** ServiceDescriptorProto name. */ - public name: string; + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); /** - * Creates a new ServiceDescriptorProto instance using the specified properties. + * Creates a new FeatureSet instance using the specified properties. * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance + * @returns FeatureSet instance */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode + * 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.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFeatureSet, 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 + * 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.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * 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 ServiceDescriptorProto + * @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.ServiceDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto + * @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.ServiceDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; /** - * Verifies a ServiceDescriptorProto message. + * 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ServiceDescriptorProto + * @returns FeatureSet */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto + * 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.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ServiceDescriptorProto to JSON. + * Converts this FeatureSet to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ServiceDescriptorProto + * 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; } - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { + namespace FeatureSet { - /** MethodDescriptorProto name */ - name?: (string|null); + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } - /** MethodDescriptorProto inputType */ - inputType?: (string|null); + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } - /** MethodDescriptorProto outputType */ - outputType?: (string|null); + /** 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 { - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); } - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { /** - * Constructs a new MethodDescriptorProto. + * Constructs a new FeatureSetDefaults. * @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; + constructor(properties?: google.protobuf.IFeatureSetDefaults); - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); /** - * Creates a new MethodDescriptorProto instance using the specified properties. + * Creates a new FeatureSetDefaults instance using the specified properties. * @param [properties] Properties to set - * @returns MethodDescriptorProto instance + * @returns FeatureSetDefaults instance */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode + * 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.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFeatureSetDefaults, 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 + * 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.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * 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 MethodDescriptorProto + * @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.MethodDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto + * @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.MethodDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; /** - * Verifies a MethodDescriptorProto message. + * 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodDescriptorProto + * @returns FeatureSetDefaults */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto + * 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.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MethodDescriptorProto to JSON. + * Converts this FeatureSetDefaults to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MethodDescriptorProto + * 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; } - /** 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 { + namespace FeatureSetDefaults { - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { - /** FileOptions javaPackage. */ - public javaPackage: string; + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); - /** FileOptions goPackage. */ - public goPackage: string; + /** + * 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; - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; + /** + * 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; - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; + /** + * 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; - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; + /** + * 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; - /** FileOptions deprecated. */ - public deprecated: boolean; + /** + * 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; - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; + /** + * 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); - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; + /** + * 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; - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; + /** + * 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 }; - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; + /** + * 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; + } + } - /** FileOptions phpNamespace. */ - public phpNamespace: string; + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } - /** FileOptions rubyPackage. */ - public rubyPackage: string; + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; /** - * Creates a new FileOptions instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @param [properties] Properties to set - * @returns FileOptions instance + * @returns SourceCodeInfo instance */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode + * 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.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ISourceCodeInfo, 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 + * 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.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileOptions message from the specified reader or buffer. + * 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 FileOptions + * @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.FileOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileOptions + * @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.FileOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; /** - * Verifies a FileOptions message. + * 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 FileOptions message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileOptions + * @returns SourceCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions + * 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.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileOptions to JSON. + * Converts this SourceCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FileOptions + * 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 FileOptions { + namespace SourceCodeInfo { - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 + /** 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); } - } - /** Properties of a MessageOptions. */ - interface IMessageOptions { + /** Represents a Location. */ + class Location implements ILocation { - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); + /** Location path. */ + public path: number[]; - /** MessageOptions deprecated */ - deprecated?: (boolean|null); + /** Location span. */ + public span: number[]; - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); + /** Location leadingComments. */ + public leadingComments: string; - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); + /** Location trailingComments. */ + public trailingComments: string; - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * 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; - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } + /** + * 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; - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { + /** + * 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; - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); + /** + * 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; - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; + /** + * 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; - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; + /** + * 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); - /** MessageOptions deprecated. */ - public deprecated: boolean; + /** + * 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; - /** MessageOptions mapEntry. */ - public mapEntry: boolean; + /** + * 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); + } - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; /** - * Creates a new MessageOptions instance using the specified properties. + * Creates a new GeneratedCodeInfo instance using the specified properties. * @param [properties] Properties to set - * @returns MessageOptions instance + * @returns GeneratedCodeInfo instance */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode + * 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.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IGeneratedCodeInfo, 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 + * 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.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MessageOptions message from the specified reader or buffer. + * 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 MessageOptions + * @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.MessageOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MessageOptions + * @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.MessageOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; /** - * Verifies a MessageOptions message. + * 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 MessageOptions message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MessageOptions + * @returns GeneratedCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions + * 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.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MessageOptions to JSON. + * Converts this GeneratedCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MessageOptions + * 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; } - /** Properties of a FieldOptions. */ - interface IFieldOptions { + namespace GeneratedCodeInfo { - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + /** Properties of an Annotation. */ + interface IAnnotation { - /** FieldOptions packed */ - packed?: (boolean|null); + /** Annotation path */ + path?: (number[]|null); - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + /** Annotation sourceFile */ + sourceFile?: (string|null); - /** FieldOptions lazy */ - lazy?: (boolean|null); + /** Annotation begin */ + begin?: (number|null); - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); + /** Annotation end */ + end?: (number|null); - /** FieldOptions deprecated */ - deprecated?: (boolean|null); + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } - /** FieldOptions weak */ - weak?: (boolean|null); + /** Represents an Annotation. */ + class Annotation implements IAnnotation { - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + /** Annotation path. */ + public path: number[]; - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + /** Annotation sourceFile. */ + public sourceFile: string; - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + /** Annotation begin. */ + public begin: number; - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** Annotation end. */ + public end: number; - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + /** + * 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; - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - } + /** + * 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; - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { + /** + * 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; - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); + /** + * 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; - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + /** + * 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; - /** FieldOptions packed. */ - public packed: boolean; + /** + * 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); - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + /** + * 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; - /** FieldOptions lazy. */ - public lazy: boolean; + /** + * 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 }; - /** FieldOptions unverifiedLazy. */ - public unverifiedLazy: boolean; + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FieldOptions deprecated. */ - public deprecated: boolean; + /** + * 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; + } - /** FieldOptions weak. */ - public weak: boolean; + namespace Annotation { - /** FieldOptions debugRedact. */ - public debugRedact: boolean; + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } - /** FieldOptions retention. */ - public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + /** Properties of a Duration. */ + interface IDuration { - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; + /** Duration seconds */ + seconds?: (number|Long|string|null); - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + /** Duration nanos */ + nanos?: (number|null); + } - /** FieldOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** Represents a Duration. */ + class Duration implements IDuration { - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * 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 FieldOptions instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @param [properties] Properties to set - * @returns FieldOptions instance + * @returns Duration instance */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode + * 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.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDuration, 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 + * 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.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldOptions message from the specified reader or buffer. + * 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 FieldOptions + * @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.FieldOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldOptions + * @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.FieldOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; /** - * Verifies a FieldOptions message. + * 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldOptions + * @returns Duration */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions + * 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.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldOptions to JSON. + * Converts this Duration to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FieldOptions + * 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; } - 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 { + /** Properties of a Timestamp. */ + interface ITimestamp { - /** EditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + /** Timestamp seconds */ + seconds?: (number|Long|string|null); - /** EditionDefault value */ - value?: (string|null); - } + /** Timestamp nanos */ + nanos?: (number|null); + } - /** Represents an EditionDefault. */ - class EditionDefault implements IEditionDefault { + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { - /** - * Constructs a new EditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); - /** EditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** Timestamp seconds. */ + public seconds: (number|Long|string); - /** EditionDefault value. */ - public value: string; + /** Timestamp nanos. */ + public nanos: number; - /** - * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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; + /** + * 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 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); + /** + * 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 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 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 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 }; + /** + * 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 EditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this Timestamp 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; - } + /** + * 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 OneofOptions. */ - interface IOneofOptions { + /** Properties of an Any. */ + interface IAny { - /** OneofOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** Any type_url */ + type_url?: (string|null); - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Any value */ + value?: (Uint8Array|string|null); } - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { + /** Represents an Any. */ + class Any implements IAny { /** - * Constructs a new OneofOptions. + * Constructs a new Any. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IOneofOptions); + constructor(properties?: google.protobuf.IAny); - /** OneofOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** Any type_url. */ + public type_url: string; - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Any value. */ + public value: (Uint8Array|string); /** - * Creates a new OneofOptions instance using the specified properties. + * Creates a new Any instance using the specified properties. * @param [properties] Properties to set - * @returns OneofOptions instance + * @returns Any instance */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode + * 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.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IAny, 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 + * 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.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OneofOptions message from the specified reader or buffer. + * 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 OneofOptions + * @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.OneofOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OneofOptions + * @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.OneofOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; /** - * Verifies an OneofOptions message. + * 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OneofOptions + * @returns Any */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions + * 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.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OneofOptions to JSON. + * Converts this Any to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OneofOptions + * 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 EnumOptions. */ - interface IEnumOptions { + /** Properties of a FieldMask. */ + interface IFieldMask { - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); + /** FieldMask paths */ + paths?: (string[]|null); + } - /** EnumOptions deprecated */ - deprecated?: (boolean|null); + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { - /** EnumOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); - /** EnumOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** FieldMask paths. */ + public paths: string[]; - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** + * 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; - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { + /** + * 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; /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set + * 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 */ - constructor(properties?: google.protobuf.IEnumOptions); + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - /** EnumOptions allowAlias. */ - public allowAlias: boolean; + /** + * 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; - /** EnumOptions deprecated. */ - public deprecated: boolean; + /** + * 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; - /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; + /** + * 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); - /** EnumOptions features. */ - public features?: (google.protobuf.IFeatureSet|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; - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * 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 }; /** - * Creates a new EnumOptions instance using the specified properties. + * 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; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. * @param [properties] Properties to set - * @returns EnumOptions instance */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + constructor(properties?: google.protobuf.IEmpty); /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode + * 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.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEmpty, 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 + * 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.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumOptions message from the specified reader or buffer. + * 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 EnumOptions + * @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.EnumOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumOptions + * @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.EnumOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; /** - * Verifies an EnumOptions message. + * 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumOptions + * @returns Empty */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions + * 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.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumOptions to JSON. + * Converts this Empty to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumOptions + * 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 an EnumValueOptions. */ - interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact */ - debugRedact?: (boolean|null); + /** Properties of a DoubleValue. */ + interface IDoubleValue { - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** DoubleValue value */ + value?: (number|null); } - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { /** - * Constructs a new EnumValueOptions. + * Constructs a new DoubleValue. * @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; + constructor(properties?: google.protobuf.IDoubleValue); - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** DoubleValue value. */ + public value: number; /** - * Creates a new EnumValueOptions instance using the specified properties. + * Creates a new DoubleValue instance using the specified properties. * @param [properties] Properties to set - * @returns EnumValueOptions instance + * @returns DoubleValue instance */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue 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; + public static encode(message: google.protobuf.IDoubleValue, 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 + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue 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; + public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumValueOptions message from the specified reader or buffer. + * Decodes a DoubleValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns EnumValueOptions + * @returns DoubleValue * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DoubleValue; /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumValueOptions + * @returns DoubleValue * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DoubleValue; /** - * Verifies an EnumValueOptions message. + * Verifies a DoubleValue message. * @param message Plain 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. + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumValueOptions + * @returns DoubleValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumValueOptions to JSON. + * Converts this DoubleValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumValueOptions + * Gets the default type url for DoubleValue * @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); + /** Properties of a FloatValue. */ + interface IFloatValue { - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); + /** FloatValue value */ + value?: (number|null); } - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { /** - * Constructs a new ServiceOptions. + * Constructs a new FloatValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; + constructor(properties?: google.protobuf.IFloatValue); - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** FloatValue value. */ + public value: number; /** - * Creates a new ServiceOptions instance using the specified properties. + * Creates a new FloatValue instance using the specified properties. * @param [properties] Properties to set - * @returns ServiceOptions instance + * @returns FloatValue instance */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue 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; + public static encode(message: google.protobuf.IFloatValue, 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 + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue 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; + public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ServiceOptions message from the specified reader or buffer. + * Decodes a FloatValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ServiceOptions + * @returns FloatValue * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FloatValue; /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * Decodes a FloatValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ServiceOptions + * @returns FloatValue * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FloatValue; /** - * Verifies a ServiceOptions message. + * Verifies a FloatValue message. * @param message Plain object 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. + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ServiceOptions + * @returns FloatValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ServiceOptions to JSON. + * Converts this FloatValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ServiceOptions + * Gets the default type url for FloatValue * @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); + /** Properties of an Int64Value. */ + interface IInt64Value { - /** MethodOptions .google.longrunning.operationInfo */ - ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + /** Int64Value value */ + value?: (number|Long|string|null); } - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { /** - * Constructs a new MethodOptions. + * Constructs a new Int64Value. * @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); + constructor(properties?: google.protobuf.IInt64Value); - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Int64Value value. */ + public value: (number|Long|string); /** - * Creates a new MethodOptions instance using the specified properties. + * Creates a new Int64Value instance using the specified properties. * @param [properties] Properties to set - * @returns MethodOptions instance + * @returns Int64Value instance */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value 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; + public static encode(message: google.protobuf.IInt64Value, 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 + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value 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; + public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MethodOptions message from the specified reader or buffer. + * Decodes an Int64Value message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MethodOptions + * @returns Int64Value * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int64Value; /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * Decodes an Int64Value message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MethodOptions + * @returns Int64Value * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int64Value; /** - * Verifies a MethodOptions message. + * Verifies an Int64Value message. * @param message Plain object 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. + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodOptions + * @returns Int64Value */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MethodOptions to JSON. + * Converts this Int64Value to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MethodOptions + * Gets the default type url for Int64Value * @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); + /** Properties of a UInt64Value. */ + interface IUInt64Value { - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); + /** UInt64Value value */ + value?: (number|Long|string|null); } - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { /** - * Constructs a new UninterpretedOption. + * Constructs a new UInt64Value. * @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); + constructor(properties?: google.protobuf.IUInt64Value); - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; + /** UInt64Value value. */ + public value: (number|Long|string); /** - * Creates a new UninterpretedOption instance using the specified properties. + * Creates a new UInt64Value instance using the specified properties. * @param [properties] Properties to set - * @returns UninterpretedOption instance + * @returns UInt64Value instance */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value 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; + public static encode(message: google.protobuf.IUInt64Value, 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 + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value 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; + public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * Decodes a UInt64Value message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UninterpretedOption + * @returns UInt64Value * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt64Value; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UninterpretedOption + * @returns UInt64Value * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt64Value; /** - * Verifies an UninterpretedOption message. + * Verifies a UInt64Value message. * @param message Plain 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. + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UninterpretedOption + * @returns UInt64Value */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UninterpretedOption to JSON. + * Converts this UInt64Value to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UninterpretedOption + * Gets the default type url for UInt64Value * @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); + /** Properties of an Int32Value. */ + interface IInt32Value { - /** - * 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; + /** Int32Value value */ + value?: (number|null); + } - /** - * 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 }; + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); - /** - * 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; - } - } + /** Int32Value value. */ + public value: number; - /** Properties of a FeatureSet. */ - interface IFeatureSet { + /** + * Creates a new Int32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int32Value instance + */ + public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int32Value + * @throws {Error} If the payload is not 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.Int32Value; - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int32Value + * @throws {Error} If the payload 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.Int32Value; - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + /** + * Verifies an Int32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); - } + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; - /** Represents a FeatureSet. */ - class FeatureSet implements IFeatureSet { + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Constructs a new FeatureSet. - * @param [properties] Properties to set + * Converts this Int32Value to JSON. + * @returns JSON object */ - constructor(properties?: google.protobuf.IFeatureSet); + public toJSON(): { [k: string]: any }; - /** FeatureSet fieldPresence. */ - public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + /** + * Gets the default type url for Int32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FeatureSet enumType. */ - public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + /** Properties of a UInt32Value. */ + interface IUInt32Value { - /** FeatureSet repeatedFieldEncoding. */ - public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + /** UInt32Value value */ + value?: (number|null); + } - /** FeatureSet utf8Validation. */ - public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { - /** FeatureSet messageEncoding. */ - public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + /** + * Constructs a new UInt32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt32Value); - /** FeatureSet jsonFormat. */ - public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + /** UInt32Value value. */ + public value: number; /** - * Creates a new FeatureSet instance using the specified properties. + * Creates a new UInt32Value instance using the specified properties. * @param [properties] Properties to set - * @returns FeatureSet instance + * @returns UInt32Value instance */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value 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; + public static encode(message: google.protobuf.IUInt32Value, 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 + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value 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; + public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FeatureSet message from the specified reader or buffer. + * Decodes a UInt32Value message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FeatureSet + * @returns UInt32Value * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt32Value; /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FeatureSet + * @returns UInt32Value * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt32Value; /** - * Verifies a FeatureSet message. + * Verifies a UInt32Value message. * @param message Plain object 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. + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FeatureSet + * @returns UInt32Value */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FeatureSet to JSON. + * Converts this UInt32Value to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FeatureSet + * Gets the default type url for UInt32Value * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace FeatureSet { + /** Properties of a BoolValue. */ + interface IBoolValue { - /** FieldPresence enum. */ - enum FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3 - } + /** BoolValue value */ + value?: (boolean|null); + } - /** EnumType enum. */ - enum EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2 - } + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { - /** RepeatedFieldEncoding enum. */ - enum RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2 - } + /** + * Constructs a new BoolValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBoolValue); - /** Utf8Validation enum. */ - enum Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - VERIFY = 2, - NONE = 3 - } + /** BoolValue value. */ + public value: boolean; - /** MessageEncoding enum. */ - enum MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2 - } + /** + * Creates a new BoolValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BoolValue instance + */ + public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - } + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoolValue + * @throws {Error} If the payload is not 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.BoolValue; - /** FeatureSetDefaults minimumEdition */ - minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoolValue + * @throws {Error} If the payload 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.BoolValue; - /** FeatureSetDefaults maximumEdition */ - maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } + /** + * Verifies a BoolValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents a FeatureSetDefaults. */ - class FeatureSetDefaults implements IFeatureSetDefaults { + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoolValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; /** - * Constructs a new FeatureSetDefaults. - * @param [properties] Properties to set + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue + * @param [options] Conversion options + * @returns Plain object */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + /** + * Converts this BoolValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FeatureSetDefaults minimumEdition. */ - public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** + * Gets the default type url for BoolValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringValue. */ + interface IStringValue { + + /** StringValue value */ + value?: (string|null); + } + + /** Represents a StringValue. */ + class StringValue implements IStringValue { + + /** + * Constructs a new StringValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStringValue); - /** FeatureSetDefaults maximumEdition. */ - public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** StringValue value. */ + public value: string; /** - * Creates a new FeatureSetDefaults instance using the specified properties. + * Creates a new StringValue instance using the specified properties. * @param [properties] Properties to set - * @returns FeatureSetDefaults instance + * @returns StringValue instance */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue 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; + public static encode(message: google.protobuf.IStringValue, 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 + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue 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; + public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * Decodes a StringValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FeatureSetDefaults + * @returns StringValue * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.StringValue; /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * Decodes a StringValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults + * @returns StringValue * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.StringValue; /** - * Verifies a FeatureSetDefaults message. + * Verifies a StringValue message. * @param message Plain object 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. + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FeatureSetDefaults + * @returns StringValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FeatureSetDefaults to JSON. + * Converts this StringValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FeatureSetDefaults + * Gets the default type url for StringValue * @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 { + /** Properties of a BytesValue. */ + interface IBytesValue { - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + /** BytesValue value */ + value?: (Uint8Array|string|null); + } - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); - } + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { - /** Represents a FeatureSetEditionDefault. */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + /** + * Constructs a new BytesValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBytesValue); - /** - * Constructs a new FeatureSetEditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + /** BytesValue value. */ + public value: (Uint8Array|string); - /** FeatureSetEditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** + * Creates a new BytesValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BytesValue instance + */ + public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BytesValue + * @throws {Error} If the payload is not 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.BytesValue; - /** - * 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 BytesValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BytesValue + * @throws {Error} If the payload 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.BytesValue; - /** - * 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; + /** + * Verifies a BytesValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * 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; + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BytesValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; - /** - * 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 plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this BytesValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * 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 }; + /** + * Gets the default type url for BytesValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** - * Converts this FeatureSetEditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Namespace type. */ + namespace type { + + /** DayOfWeek enum. */ + enum DayOfWeek { + DAY_OF_WEEK_UNSPECIFIED = 0, + MONDAY = 1, + TUESDAY = 2, + WEDNESDAY = 3, + THURSDAY = 4, + FRIDAY = 5, + SATURDAY = 6, + SUNDAY = 7 + } - /** - * 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; - } + /** Month enum. */ + enum Month { + MONTH_UNSPECIFIED = 0, + JANUARY = 1, + FEBRUARY = 2, + MARCH = 3, + APRIL = 4, + MAY = 5, + JUNE = 6, + JULY = 7, + AUGUST = 8, + SEPTEMBER = 9, + OCTOBER = 10, + NOVEMBER = 11, + DECEMBER = 12 } - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { + /** Properties of an Expr. */ + interface IExpr { - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + /** Expr expression */ + expression?: (string|null); + + /** Expr title */ + title?: (string|null); + + /** Expr description */ + description?: (string|null); + + /** Expr location */ + location?: (string|null); } - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { + /** Represents an Expr. */ + class Expr implements IExpr { /** - * Constructs a new SourceCodeInfo. + * Constructs a new Expr. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.ISourceCodeInfo); + constructor(properties?: google.type.IExpr); - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; + /** Expr expression. */ + public expression: string; + + /** Expr title. */ + public title: string; + + /** Expr description. */ + public description: string; + + /** Expr location. */ + public location: string; /** - * Creates a new SourceCodeInfo instance using the specified properties. + * Creates a new Expr instance using the specified properties. * @param [properties] Properties to set - * @returns SourceCodeInfo instance + * @returns Expr instance */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + public static create(properties?: google.type.IExpr): google.type.Expr; /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr 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; + public static encode(message: google.type.IExpr, 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 + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr 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; + public static encodeDelimited(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. + * Decodes an Expr message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SourceCodeInfo + * @returns Expr * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Expr; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * Decodes an Expr message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo + * @returns Expr * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Expr; /** - * Verifies a SourceCodeInfo message. + * Verifies an Expr message. * @param message Plain object 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. + * Creates an Expr message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SourceCodeInfo + * @returns Expr */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + public static fromObject(object: { [k: string]: any }): google.type.Expr; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @param message Expr * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.type.Expr, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SourceCodeInfo to JSON. + * Converts this Expr to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SourceCodeInfo + * Gets the default type url for Expr * @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 }; + /** Namespace rpc. */ + namespace rpc { - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Properties of a Status. */ + interface IStatus { - /** - * 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; - } - } + /** Status code */ + code?: (number|null); - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { + /** Status message */ + message?: (string|null); - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + /** Status details */ + details?: (google.protobuf.IAny[]|null); } - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { + /** Represents a Status. */ + class Status implements IStatus { /** - * Constructs a new GeneratedCodeInfo. + * Constructs a new Status. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); + constructor(properties?: google.rpc.IStatus); - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * Creates a new Status instance using the specified properties. * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance + * @returns Status instance */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + public static create(properties?: google.rpc.IStatus): google.rpc.Status; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode + * 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.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.rpc.IStatus, 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 + * 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.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * 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 GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a Status message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; /** - * Verifies a GeneratedCodeInfo message. + * 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a Status message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GeneratedCodeInfo + * @returns Status */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + public static fromObject(object: { [k: string]: any }): google.rpc.Status; /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo + * 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.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this Status to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GeneratedCodeInfo + * 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; } + } - namespace GeneratedCodeInfo { + /** Namespace iam. */ + namespace iam { - /** Properties of an Annotation. */ - interface IAnnotation { + /** Namespace v1. */ + namespace v1 { - /** Annotation path */ - path?: (number[]|null); + /** Represents a IAMPolicy */ + class IAMPolicy extends $protobuf.rpc.Service { - /** Annotation sourceFile */ - sourceFile?: (string|null); + /** + * Constructs a new IAMPolicy 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 IAMPolicy 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): IAMPolicy; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.SetIamPolicyCallback): void; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.GetIamPolicyCallback): void; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.iam.v1.IAMPolicy.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + } + + namespace IAMPolicy { + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + } - /** Annotation begin */ - begin?: (number|null); + /** Properties of a SetIamPolicyRequest. */ + interface ISetIamPolicyRequest { - /** Annotation end */ - end?: (number|null); + /** SetIamPolicyRequest resource */ + resource?: (string|null); - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + /** SetIamPolicyRequest policy */ + policy?: (google.iam.v1.IPolicy|null); + + /** SetIamPolicyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents an Annotation. */ - class Annotation implements IAnnotation { + /** Represents a SetIamPolicyRequest. */ + class SetIamPolicyRequest implements ISetIamPolicyRequest { /** - * Constructs a new Annotation. + * Constructs a new SetIamPolicyRequest. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** Annotation path. */ - public path: number[]; - - /** Annotation sourceFile. */ - public sourceFile: string; + constructor(properties?: google.iam.v1.ISetIamPolicyRequest); - /** Annotation begin. */ - public begin: number; + /** SetIamPolicyRequest resource. */ + public resource: string; - /** Annotation end. */ - public end: number; + /** SetIamPolicyRequest policy. */ + public policy?: (google.iam.v1.IPolicy|null); - /** Annotation semantic. */ - public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + /** SetIamPolicyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new Annotation instance using the specified properties. + * Creates a new SetIamPolicyRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Annotation instance + * @returns SetIamPolicyRequest instance */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + public static create(properties?: google.iam.v1.ISetIamPolicyRequest): google.iam.v1.SetIamPolicyRequest; /** - * 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 + * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @param message SetIamPolicyRequest 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; + public static encode(message: google.iam.v1.ISetIamPolicyRequest, 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 + * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @param message SetIamPolicyRequest 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; + public static encodeDelimited(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Annotation message from the specified reader or buffer. + * Decodes a SetIamPolicyRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Annotation + * @returns SetIamPolicyRequest * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.SetIamPolicyRequest; /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. + * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Annotation + * @returns SetIamPolicyRequest * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.SetIamPolicyRequest; /** - * Verifies an Annotation message. + * Verifies a SetIamPolicyRequest message. * @param message Plain 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. + * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Annotation + * @returns SetIamPolicyRequest */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + public static fromObject(object: { [k: string]: any }): google.iam.v1.SetIamPolicyRequest; /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation + * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. + * @param message SetIamPolicyRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.iam.v1.SetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Annotation to JSON. + * Converts this SetIamPolicyRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Annotation + * Gets the default type url for SetIamPolicyRequest * @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); + /** Properties of a GetIamPolicyRequest. */ + interface IGetIamPolicyRequest { - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; + /** GetIamPolicyRequest resource */ + resource?: (string|null); - /** - * 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; + /** GetIamPolicyRequest options */ + options?: (google.iam.v1.IGetPolicyOptions|null); + } - /** - * 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; + /** Represents a GetIamPolicyRequest. */ + class GetIamPolicyRequest implements IGetIamPolicyRequest { - /** - * 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; + /** + * Constructs a new GetIamPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IGetIamPolicyRequest); - /** - * 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; + /** GetIamPolicyRequest resource. */ + public resource: string; - /** - * 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; + /** GetIamPolicyRequest options. */ + public options?: (google.iam.v1.IGetPolicyOptions|null); - /** - * 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 new GetIamPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetIamPolicyRequest instance + */ + public static create(properties?: google.iam.v1.IGetIamPolicyRequest): google.iam.v1.GetIamPolicyRequest; - /** - * 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; + /** + * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @param message GetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @param message GetIamPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetIamPolicyRequest; - /** - * 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; - } + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetIamPolicyRequest; - /** Properties of an Any. */ - interface IAny { + /** + * Verifies a GetIamPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Any type_url */ - type_url?: (string|null); + /** + * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetIamPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.GetIamPolicyRequest; - /** Any value */ - value?: (Uint8Array|string|null); - } + /** + * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. + * @param message GetIamPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.GetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents an Any. */ - class Any implements IAny { + /** + * Converts this GetIamPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); + /** + * Gets the default type url for GetIamPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Any type_url. */ - public type_url: string; + /** Properties of a TestIamPermissionsRequest. */ + interface ITestIamPermissionsRequest { - /** Any value. */ - public value: (Uint8Array|string); + /** TestIamPermissionsRequest resource */ + resource?: (string|null); - /** - * 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; + /** TestIamPermissionsRequest permissions */ + permissions?: (string[]|null); + } - /** - * 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; + /** Represents a TestIamPermissionsRequest. */ + class TestIamPermissionsRequest implements ITestIamPermissionsRequest { - /** - * 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; + /** + * Constructs a new TestIamPermissionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ITestIamPermissionsRequest); - /** - * 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; + /** TestIamPermissionsRequest resource. */ + public resource: string; - /** - * 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; + /** TestIamPermissionsRequest permissions. */ + public permissions: string[]; - /** - * 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 a new TestIamPermissionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TestIamPermissionsRequest instance + */ + public static create(properties?: google.iam.v1.ITestIamPermissionsRequest): google.iam.v1.TestIamPermissionsRequest; - /** - * 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; + /** + * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @param message TestIamPermissionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @param message TestIamPermissionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsRequest; - /** - * 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; - } + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsRequest; - /** Properties of an Empty. */ - interface IEmpty { - } + /** + * Verifies a TestIamPermissionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents an Empty. */ - class Empty implements IEmpty { + /** + * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TestIamPermissionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsRequest; - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); + /** + * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. + * @param message TestIamPermissionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.TestIamPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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; + /** + * Converts this TestIamPermissionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * 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; + /** + * Gets the default type url for TestIamPermissionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * 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; + /** Properties of a TestIamPermissionsResponse. */ + interface ITestIamPermissionsResponse { - /** - * 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; + /** TestIamPermissionsResponse permissions */ + permissions?: (string[]|null); + } - /** - * 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; + /** Represents a TestIamPermissionsResponse. */ + class TestIamPermissionsResponse implements ITestIamPermissionsResponse { - /** - * 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); + /** + * Constructs a new TestIamPermissionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.ITestIamPermissionsResponse); - /** - * 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; + /** TestIamPermissionsResponse permissions. */ + public permissions: string[]; - /** - * 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 }; + /** + * Creates a new TestIamPermissionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns TestIamPermissionsResponse instance + */ + public static create(properties?: google.iam.v1.ITestIamPermissionsResponse): google.iam.v1.TestIamPermissionsResponse; - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @param message TestIamPermissionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; - } + /** + * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @param message TestIamPermissionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a Timestamp. */ - interface ITimestamp { + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsResponse; - /** Timestamp seconds */ - seconds?: (number|Long|string|null); + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsResponse; - /** Timestamp nanos */ - nanos?: (number|null); - } + /** + * Verifies a TestIamPermissionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { + /** + * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TestIamPermissionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsResponse; - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); + /** + * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. + * @param message TestIamPermissionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.TestIamPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Timestamp seconds. */ - public seconds: (number|Long|string); + /** + * Converts this TestIamPermissionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Timestamp nanos. */ - public nanos: number; + /** + * Gets the default type url for TestIamPermissionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * 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; + /** Properties of a GetPolicyOptions. */ + interface IGetPolicyOptions { - /** - * 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; + /** GetPolicyOptions requestedPolicyVersion */ + requestedPolicyVersion?: (number|null); + } - /** - * 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; + /** Represents a GetPolicyOptions. */ + class GetPolicyOptions implements IGetPolicyOptions { - /** - * 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; + /** + * Constructs a new GetPolicyOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IGetPolicyOptions); + + /** GetPolicyOptions requestedPolicyVersion. */ + public requestedPolicyVersion: number; + + /** + * Creates a new GetPolicyOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPolicyOptions instance + */ + public static create(properties?: google.iam.v1.IGetPolicyOptions): google.iam.v1.GetPolicyOptions; - /** - * 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; + /** + * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @param message GetPolicyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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); + /** + * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @param message GetPolicyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetPolicyOptions; - /** - * 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 }; + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetPolicyOptions; - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Verifies a GetPolicyOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * 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; - } + /** + * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPolicyOptions + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.GetPolicyOptions; - /** Properties of a DoubleValue. */ - interface IDoubleValue { + /** + * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. + * @param message GetPolicyOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.GetPolicyOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** DoubleValue value */ - value?: (number|null); - } + /** + * Converts this GetPolicyOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a DoubleValue. */ - class DoubleValue implements IDoubleValue { + /** + * Gets the default type url for GetPolicyOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Constructs a new DoubleValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDoubleValue); + /** Properties of a Policy. */ + interface IPolicy { - /** DoubleValue value. */ - public value: number; + /** Policy version */ + version?: (number|null); - /** - * Creates a new DoubleValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DoubleValue instance - */ - public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; + /** Policy bindings */ + bindings?: (google.iam.v1.IBinding[]|null); - /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** Policy auditConfigs */ + auditConfigs?: (google.iam.v1.IAuditConfig[]|null); - /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** Policy etag */ + etag?: (Uint8Array|string|null); + } - /** - * Decodes a DoubleValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DoubleValue - * @throws {Error} If the payload is not 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.DoubleValue; + /** Represents a Policy. */ + class Policy implements IPolicy { - /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DoubleValue - * @throws {Error} If the payload 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.DoubleValue; + /** + * Constructs a new Policy. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicy); - /** - * Verifies a DoubleValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Policy version. */ + public version: number; - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DoubleValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + /** Policy bindings. */ + public bindings: google.iam.v1.IBinding[]; - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @param message DoubleValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Policy auditConfigs. */ + public auditConfigs: google.iam.v1.IAuditConfig[]; - /** - * Converts this DoubleValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Policy etag. */ + public etag: (Uint8Array|string); - /** - * Gets the default type url for DoubleValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a new Policy instance using the specified properties. + * @param [properties] Properties to set + * @returns Policy instance + */ + public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy; - /** Properties of a FloatValue. */ - interface IFloatValue { + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - /** FloatValue value */ - value?: (number|null); - } + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @param message Policy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a FloatValue. */ - class FloatValue implements IFloatValue { + /** + * Decodes a Policy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy; - /** - * Constructs a new FloatValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFloatValue); + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy; - /** FloatValue value. */ - public value: number; + /** + * Verifies a Policy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a new FloatValue instance using the specified properties. - * @param [properties] Properties to set - * @returns FloatValue instance - */ - public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Policy + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy; - /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @param message Policy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this Policy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a FloatValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FloatValue - * @throws {Error} If the payload is not 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.FloatValue; + /** + * Gets the default type url for Policy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Binding. */ + interface IBinding { + + /** Binding role */ + role?: (string|null); - /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FloatValue - * @throws {Error} If the payload 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.FloatValue; + /** Binding members */ + members?: (string[]|null); - /** - * Verifies a FloatValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Binding condition */ + condition?: (google.type.IExpr|null); + } - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FloatValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + /** Represents a Binding. */ + class Binding implements IBinding { - /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @param message FloatValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new Binding. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBinding); - /** - * Converts this FloatValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Binding role. */ + public role: string; - /** - * Gets the default type url for FloatValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Binding members. */ + public members: string[]; - /** Properties of an Int64Value. */ - interface IInt64Value { + /** Binding condition. */ + public condition?: (google.type.IExpr|null); - /** Int64Value value */ - value?: (number|Long|string|null); - } + /** + * Creates a new Binding instance using the specified properties. + * @param [properties] Properties to set + * @returns Binding instance + */ + public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding; - /** Represents an Int64Value. */ - class Int64Value implements IInt64Value { + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new Int64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt64Value); + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @param message Binding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; - /** Int64Value value. */ - public value: (number|Long|string); + /** + * Decodes a Binding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Binding; - /** - * Creates a new Int64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int64Value instance - */ - public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Binding; - /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a Binding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Binding + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding; - /** - * Decodes an Int64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int64Value - * @throws {Error} If the payload is not 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.Int64Value; + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @param message Binding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int64Value - * @throws {Error} If the payload 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.Int64Value; + /** + * Converts this Binding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Verifies an Int64Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Gets the default type url for Binding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + /** Properties of an AuditConfig. */ + interface IAuditConfig { - /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @param message Int64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** AuditConfig service */ + service?: (string|null); - /** - * Converts this Int64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** AuditConfig auditLogConfigs */ + auditLogConfigs?: (google.iam.v1.IAuditLogConfig[]|null); + } - /** - * Gets the default type url for Int64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Represents an AuditConfig. */ + class AuditConfig implements IAuditConfig { - /** Properties of a UInt64Value. */ - interface IUInt64Value { + /** + * Constructs a new AuditConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfig); - /** UInt64Value value */ - value?: (number|Long|string|null); - } + /** AuditConfig service. */ + public service: string; - /** Represents a UInt64Value. */ - class UInt64Value implements IUInt64Value { + /** AuditConfig auditLogConfigs. */ + public auditLogConfigs: google.iam.v1.IAuditLogConfig[]; - /** - * Constructs a new UInt64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt64Value); + /** + * Creates a new AuditConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfig instance + */ + public static create(properties?: google.iam.v1.IAuditConfig): google.iam.v1.AuditConfig; - /** UInt64Value value. */ - public value: (number|Long|string); + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new UInt64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt64Value instance - */ - public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @param message AuditConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfig; - /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfig; - /** - * Decodes a UInt64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt64Value - * @throws {Error} If the payload is not 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.UInt64Value; + /** + * Verifies an AuditConfig message. + * @param message Plain 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 AuditConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfig; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @param message AuditConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt64Value - * @throws {Error} If the payload 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.UInt64Value; + /** + * Gets the default type url for AuditConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Verifies a UInt64Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Properties of an AuditLogConfig. */ + interface IAuditLogConfig { - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + /** AuditLogConfig logType */ + logType?: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType|null); - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @param message UInt64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** AuditLogConfig exemptedMembers */ + exemptedMembers?: (string[]|null); + } - /** - * Converts this UInt64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Represents an AuditLogConfig. */ + class AuditLogConfig implements IAuditLogConfig { - /** - * Gets the default type url for UInt64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Constructs a new AuditLogConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditLogConfig); - /** Properties of an Int32Value. */ - interface IInt32Value { + /** AuditLogConfig logType. */ + public logType: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType); - /** Int32Value value */ - value?: (number|null); - } + /** AuditLogConfig exemptedMembers. */ + public exemptedMembers: string[]; - /** Represents an Int32Value. */ - class Int32Value implements IInt32Value { + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditLogConfig instance + */ + public static create(properties?: google.iam.v1.IAuditLogConfig): google.iam.v1.AuditLogConfig; - /** - * Constructs a new Int32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt32Value); + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** Int32Value value. */ - public value: number; + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @param message AuditLogConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new Int32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int32Value instance - */ - public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditLogConfig; - /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditLogConfig; - /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies an AuditLogConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes an Int32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int32Value - * @throws {Error} If the payload is not 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.Int32Value; + /** + * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditLogConfig + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditLogConfig; - /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int32Value - * @throws {Error} If the payload 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.Int32Value; + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @param message AuditLogConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditLogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies an Int32Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this AuditLogConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + /** + * Gets the default type url for AuditLogConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @param message Int32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + namespace AuditLogConfig { - /** - * Converts this Int32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** LogType enum. */ + enum LogType { + LOG_TYPE_UNSPECIFIED = 0, + ADMIN_READ = 1, + DATA_WRITE = 2, + DATA_READ = 3 + } + } - /** - * Gets the default type url for Int32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Properties of a PolicyDelta. */ + interface IPolicyDelta { - /** Properties of a UInt32Value. */ - interface IUInt32Value { + /** PolicyDelta bindingDeltas */ + bindingDeltas?: (google.iam.v1.IBindingDelta[]|null); - /** UInt32Value value */ - value?: (number|null); - } + /** PolicyDelta auditConfigDeltas */ + auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null); + } - /** Represents a UInt32Value. */ - class UInt32Value implements IUInt32Value { + /** Represents a PolicyDelta. */ + class PolicyDelta implements IPolicyDelta { - /** - * Constructs a new UInt32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt32Value); + /** + * Constructs a new PolicyDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IPolicyDelta); - /** UInt32Value value. */ - public value: number; + /** PolicyDelta bindingDeltas. */ + public bindingDeltas: google.iam.v1.IBindingDelta[]; - /** - * Creates a new UInt32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt32Value instance - */ - public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; + /** PolicyDelta auditConfigDeltas. */ + public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[]; - /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new PolicyDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns PolicyDelta instance + */ + public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta; - /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a UInt32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt32Value - * @throws {Error} If the payload is not 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.UInt32Value; + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @param message PolicyDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt32Value - * @throws {Error} If the payload 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.UInt32Value; + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.PolicyDelta; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.PolicyDelta; - /** - * Verifies a UInt32Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a PolicyDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PolicyDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta; - /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @param message UInt32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @param message PolicyDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this UInt32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this PolicyDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for UInt32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for PolicyDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of a BoolValue. */ - interface IBoolValue { + /** Properties of a BindingDelta. */ + interface IBindingDelta { - /** BoolValue value */ - value?: (boolean|null); - } + /** BindingDelta action */ + action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null); - /** Represents a BoolValue. */ - class BoolValue implements IBoolValue { + /** BindingDelta role */ + role?: (string|null); - /** - * Constructs a new BoolValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBoolValue); + /** BindingDelta member */ + member?: (string|null); - /** BoolValue value. */ - public value: boolean; + /** BindingDelta condition */ + condition?: (google.type.IExpr|null); + } - /** - * Creates a new BoolValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BoolValue instance - */ - public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; + /** Represents a BindingDelta. */ + class BindingDelta implements IBindingDelta { - /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new BindingDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IBindingDelta); - /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** BindingDelta action. */ + public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action); - /** - * Decodes a BoolValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BoolValue - * @throws {Error} If the payload is not 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.BoolValue; + /** BindingDelta role. */ + public role: string; - /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BoolValue - * @throws {Error} If the payload 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.BoolValue; + /** BindingDelta member. */ + public member: string; - /** - * Verifies a BoolValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** BindingDelta condition. */ + public condition?: (google.type.IExpr|null); - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BoolValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + /** + * Creates a new BindingDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns BindingDelta instance + */ + public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta; - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @param message BoolValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this BoolValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @param message BindingDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Gets the default type url for BoolValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.BindingDelta; - /** Properties of a StringValue. */ - interface IStringValue { + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.BindingDelta; - /** StringValue value */ - value?: (string|null); - } + /** + * Verifies a BindingDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Represents a StringValue. */ - class StringValue implements IStringValue { + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BindingDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta; - /** - * Constructs a new StringValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStringValue); + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @param message BindingDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** StringValue value. */ - public value: string; + /** + * Converts this BindingDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a new StringValue instance using the specified properties. - * @param [properties] Properties to set - * @returns StringValue instance - */ - public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; + /** + * Gets the default type url for BindingDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + namespace BindingDelta { - /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } - /** - * Decodes a StringValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringValue - * @throws {Error} If the payload is not 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.StringValue; + /** Properties of an AuditConfigDelta. */ + interface IAuditConfigDelta { - /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringValue - * @throws {Error} If the payload 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.StringValue; + /** AuditConfigDelta action */ + action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null); - /** - * Verifies a StringValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** AuditConfigDelta service */ + service?: (string|null); - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + /** AuditConfigDelta exemptedMember */ + exemptedMember?: (string|null); - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @param message StringValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** AuditConfigDelta logType */ + logType?: (string|null); + } - /** - * Converts this StringValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Represents an AuditConfigDelta. */ + class AuditConfigDelta implements IAuditConfigDelta { - /** - * Gets the default type url for StringValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Constructs a new AuditConfigDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.iam.v1.IAuditConfigDelta); - /** Properties of a BytesValue. */ - interface IBytesValue { + /** AuditConfigDelta action. */ + public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action); - /** BytesValue value */ - value?: (Uint8Array|string|null); - } + /** AuditConfigDelta service. */ + public service: string; - /** Represents a BytesValue. */ - class BytesValue implements IBytesValue { + /** AuditConfigDelta exemptedMember. */ + public exemptedMember: string; - /** - * Constructs a new BytesValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBytesValue); + /** AuditConfigDelta logType. */ + public logType: string; - /** BytesValue value. */ - public value: (Uint8Array|string); + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditConfigDelta instance + */ + public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta; - /** - * Creates a new BytesValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BytesValue instance - */ - public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @param message AuditConfigDelta message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfigDelta; - /** - * Decodes a BytesValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BytesValue - * @throws {Error} If the payload is not 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.BytesValue; + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfigDelta; - /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BytesValue - * @throws {Error} If the payload 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.BytesValue; + /** + * Verifies an AuditConfigDelta message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies a BytesValue message. - * @param message Plain 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 AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditConfigDelta + */ + public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta; - /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BytesValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @param message AuditConfigDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. - * @param message BytesValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this AuditConfigDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this BytesValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Gets the default type url for AuditConfigDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Gets the default type url for BytesValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; + namespace AuditConfigDelta { + + /** Action enum. */ + enum Action { + ACTION_UNSPECIFIED = 0, + ADD = 1, + REMOVE = 2 + } + } } } @@ -9925,117 +23276,4 @@ export namespace google { 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/packages/google-cloud-backupdr/protos/protos.js b/packages/google-cloud-backupdr/protos/protos.js index cd28ca533aa..ba2ac5f0c52 100644 --- a/packages/google-cloud-backupdr/protos/protos.js +++ b/packages/google-cloud-backupdr/protos/protos.js @@ -230,515 +230,1018 @@ * @variation 2 */ - return BackupDR; - })(); + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupVault}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef CreateBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - v1.NetworkConfig = (function() { + /** + * Calls CreateBackupVault. + * @function createBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} request CreateBackupVaultRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.createBackupVault = function createBackupVault(request, callback) { + return this.rpcCall(createBackupVault, $root.google.cloud.backupdr.v1.CreateBackupVaultRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBackupVault" }); /** - * Properties of a NetworkConfig. - * @memberof google.cloud.backupdr.v1 - * @interface INetworkConfig - * @property {string|null} [network] NetworkConfig network - * @property {google.cloud.backupdr.v1.NetworkConfig.PeeringMode|null} [peeringMode] NetworkConfig peeringMode + * Calls CreateBackupVault. + * @function createBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} request CreateBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new NetworkConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a NetworkConfig. - * @implements INetworkConfig - * @constructor - * @param {google.cloud.backupdr.v1.INetworkConfig=} [properties] Properties to set + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupVaults}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListBackupVaultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListBackupVaultsResponse} [response] ListBackupVaultsResponse */ - function NetworkConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * NetworkConfig network. - * @member {string} network - * @memberof google.cloud.backupdr.v1.NetworkConfig + * Calls ListBackupVaults. + * @function listBackupVaults + * @memberof google.cloud.backupdr.v1.BackupDR * @instance + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} request ListBackupVaultsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListBackupVaultsCallback} callback Node-style callback called with the error, if any, and ListBackupVaultsResponse + * @returns {undefined} + * @variation 1 */ - NetworkConfig.prototype.network = ""; + Object.defineProperty(BackupDR.prototype.listBackupVaults = function listBackupVaults(request, callback) { + return this.rpcCall(listBackupVaults, $root.google.cloud.backupdr.v1.ListBackupVaultsRequest, $root.google.cloud.backupdr.v1.ListBackupVaultsResponse, request, callback); + }, "name", { value: "ListBackupVaults" }); /** - * NetworkConfig peeringMode. - * @member {google.cloud.backupdr.v1.NetworkConfig.PeeringMode} peeringMode - * @memberof google.cloud.backupdr.v1.NetworkConfig + * Calls ListBackupVaults. + * @function listBackupVaults + * @memberof google.cloud.backupdr.v1.BackupDR * @instance + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} request ListBackupVaultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - NetworkConfig.prototype.peeringMode = 0; /** - * Creates a new NetworkConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig instance + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchUsableBackupVaults}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef FetchUsableBackupVaultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} [response] FetchUsableBackupVaultsResponse */ - NetworkConfig.create = function create(properties) { - return new NetworkConfig(properties); - }; /** - * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkConfig} message NetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls FetchUsableBackupVaults. + * @function fetchUsableBackupVaults + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} request FetchUsableBackupVaultsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaultsCallback} callback Node-style callback called with the error, if any, and FetchUsableBackupVaultsResponse + * @returns {undefined} + * @variation 1 */ - NetworkConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); - if (message.peeringMode != null && Object.hasOwnProperty.call(message, "peeringMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.peeringMode); - return writer; - }; + Object.defineProperty(BackupDR.prototype.fetchUsableBackupVaults = function fetchUsableBackupVaults(request, callback) { + return this.rpcCall(fetchUsableBackupVaults, $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest, $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse, request, callback); + }, "name", { value: "FetchUsableBackupVaults" }); /** - * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkConfig} message NetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls FetchUsableBackupVaults. + * @function fetchUsableBackupVaults + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} request FetchUsableBackupVaultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a NetworkConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupVault}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.BackupVault} [response] BackupVault */ - NetworkConfig.decode = function 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.backupdr.v1.NetworkConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.network = reader.string(); - break; - } - case 2: { - message.peeringMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetBackupVault. + * @function getBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} request GetBackupVaultRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetBackupVaultCallback} callback Node-style callback called with the error, if any, and BackupVault + * @returns {undefined} + * @variation 1 */ - NetworkConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(BackupDR.prototype.getBackupVault = function getBackupVault(request, callback) { + return this.rpcCall(getBackupVault, $root.google.cloud.backupdr.v1.GetBackupVaultRequest, $root.google.cloud.backupdr.v1.BackupVault, request, callback); + }, "name", { value: "GetBackupVault" }); /** - * Verifies a NetworkConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetBackupVault. + * @function getBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} request GetBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - NetworkConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.peeringMode != null && message.hasOwnProperty("peeringMode")) - switch (message.peeringMode) { - default: - return "peeringMode: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; /** - * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackupVault}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef UpdateBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - NetworkConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.NetworkConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.NetworkConfig(); - if (object.network != null) - message.network = String(object.network); - switch (object.peeringMode) { - default: - if (typeof object.peeringMode === "number") { - message.peeringMode = object.peeringMode; - break; - } - break; - case "PEERING_MODE_UNSPECIFIED": - case 0: - message.peeringMode = 0; - break; - case "PRIVATE_SERVICE_ACCESS": - case 1: - message.peeringMode = 1; - break; - } - return message; - }; /** - * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.NetworkConfig} message NetworkConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls UpdateBackupVault. + * @function updateBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} request UpdateBackupVaultRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.UpdateBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - NetworkConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.network = ""; - object.peeringMode = options.enums === String ? "PEERING_MODE_UNSPECIFIED" : 0; - } - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.peeringMode != null && message.hasOwnProperty("peeringMode")) - object.peeringMode = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode] === undefined ? message.peeringMode : $root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode] : message.peeringMode; - return object; - }; + Object.defineProperty(BackupDR.prototype.updateBackupVault = function updateBackupVault(request, callback) { + return this.rpcCall(updateBackupVault, $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateBackupVault" }); /** - * Converts this NetworkConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.NetworkConfig + * Calls UpdateBackupVault. + * @function updateBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR * @instance - * @returns {Object.} JSON object + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} request UpdateBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - NetworkConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for NetworkConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupVault}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef DeleteBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkConfig"; - }; /** - * PeeringMode enum. - * @name google.cloud.backupdr.v1.NetworkConfig.PeeringMode - * @enum {number} - * @property {number} PEERING_MODE_UNSPECIFIED=0 PEERING_MODE_UNSPECIFIED value - * @property {number} PRIVATE_SERVICE_ACCESS=1 PRIVATE_SERVICE_ACCESS value + * Calls DeleteBackupVault. + * @function deleteBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} request DeleteBackupVaultRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - NetworkConfig.PeeringMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PEERING_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRIVATE_SERVICE_ACCESS"] = 1; - return values; - })(); - - return NetworkConfig; - })(); - - v1.ManagementURI = (function() { + Object.defineProperty(BackupDR.prototype.deleteBackupVault = function deleteBackupVault(request, callback) { + return this.rpcCall(deleteBackupVault, $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackupVault" }); /** - * Properties of a ManagementURI. - * @memberof google.cloud.backupdr.v1 - * @interface IManagementURI - * @property {string|null} [webUi] ManagementURI webUi - * @property {string|null} [api] ManagementURI api + * Calls DeleteBackupVault. + * @function deleteBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} request DeleteBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new ManagementURI. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ManagementURI. - * @implements IManagementURI - * @constructor - * @param {google.cloud.backupdr.v1.IManagementURI=} [properties] Properties to set + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|testIamPermissions}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse */ - function ManagementURI(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * ManagementURI webUi. - * @member {string} webUi - * @memberof google.cloud.backupdr.v1.ManagementURI + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.backupdr.v1.BackupDR * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 */ - ManagementURI.prototype.webUi = ""; + Object.defineProperty(BackupDR.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); /** - * ManagementURI api. - * @member {string} api - * @memberof google.cloud.backupdr.v1.ManagementURI + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.backupdr.v1.BackupDR * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ManagementURI.prototype.api = ""; /** - * Creates a new ManagementURI instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.IManagementURI=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI instance + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listDataSources}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListDataSourcesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListDataSourcesResponse} [response] ListDataSourcesResponse */ - ManagementURI.create = function create(properties) { - return new ManagementURI(properties); - }; /** - * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.IManagementURI} message ManagementURI message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListDataSources. + * @function listDataSources + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} request ListDataSourcesRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListDataSourcesCallback} callback Node-style callback called with the error, if any, and ListDataSourcesResponse + * @returns {undefined} + * @variation 1 */ - ManagementURI.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.webUi != null && Object.hasOwnProperty.call(message, "webUi")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.webUi); - if (message.api != null && Object.hasOwnProperty.call(message, "api")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.api); - return writer; - }; + Object.defineProperty(BackupDR.prototype.listDataSources = function listDataSources(request, callback) { + return this.rpcCall(listDataSources, $root.google.cloud.backupdr.v1.ListDataSourcesRequest, $root.google.cloud.backupdr.v1.ListDataSourcesResponse, request, callback); + }, "name", { value: "ListDataSources" }); /** - * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.IManagementURI} message ManagementURI message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListDataSources. + * @function listDataSources + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} request ListDataSourcesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ManagementURI.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes a ManagementURI message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getDataSource}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetDataSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.DataSource} [response] DataSource */ - ManagementURI.decode = function 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.backupdr.v1.ManagementURI(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.webUi = reader.string(); - break; - } - case 2: { - message.api = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ManagementURI message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetDataSource. + * @function getDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} request GetDataSourceRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetDataSourceCallback} callback Node-style callback called with the error, if any, and DataSource + * @returns {undefined} + * @variation 1 */ - ManagementURI.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(BackupDR.prototype.getDataSource = function getDataSource(request, callback) { + return this.rpcCall(getDataSource, $root.google.cloud.backupdr.v1.GetDataSourceRequest, $root.google.cloud.backupdr.v1.DataSource, request, callback); + }, "name", { value: "GetDataSource" }); /** - * Verifies a ManagementURI message. - * @function verify - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls GetDataSource. + * @function getDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} request GetDataSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ManagementURI.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.webUi != null && message.hasOwnProperty("webUi")) - if (!$util.isString(message.webUi)) - return "webUi: string expected"; - if (message.api != null && message.hasOwnProperty("api")) - if (!$util.isString(message.api)) - return "api: string expected"; - return null; - }; /** - * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateDataSource}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef UpdateDataSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ManagementURI.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ManagementURI) - return object; - var message = new $root.google.cloud.backupdr.v1.ManagementURI(); - if (object.webUi != null) - message.webUi = String(object.webUi); - if (object.api != null) - message.api = String(object.api); - return message; - }; /** - * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.ManagementURI} message ManagementURI - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls UpdateDataSource. + * @function updateDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} request UpdateDataSourceRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.UpdateDataSourceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ManagementURI.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.webUi = ""; - object.api = ""; - } - if (message.webUi != null && message.hasOwnProperty("webUi")) - object.webUi = message.webUi; - if (message.api != null && message.hasOwnProperty("api")) - object.api = message.api; - return object; - }; + Object.defineProperty(BackupDR.prototype.updateDataSource = function updateDataSource(request, callback) { + return this.rpcCall(updateDataSource, $root.google.cloud.backupdr.v1.UpdateDataSourceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateDataSource" }); /** - * Converts this ManagementURI to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ManagementURI + * Calls UpdateDataSource. + * @function updateDataSource + * @memberof google.cloud.backupdr.v1.BackupDR * @instance - * @returns {Object.} JSON object + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} request UpdateDataSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ManagementURI.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for ManagementURI - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|removeDataSource}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef RemoveDataSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ManagementURI.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ManagementURI"; - }; - - return ManagementURI; - })(); - v1.WorkforceIdentityBasedManagementURI = (function() { + /** + * Calls RemoveDataSource. + * @function removeDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} request RemoveDataSourceRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.RemoveDataSourceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.removeDataSource = function removeDataSource(request, callback) { + return this.rpcCall(removeDataSource, $root.google.cloud.backupdr.v1.RemoveDataSourceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RemoveDataSource" }); /** - * Properties of a WorkforceIdentityBasedManagementURI. + * Calls RemoveDataSource. + * @function removeDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} request RemoveDataSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|setInternalStatus}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef SetInternalStatusCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls SetInternalStatus. + * @function setInternalStatus + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} request SetInternalStatusRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.SetInternalStatusCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.setInternalStatus = function setInternalStatus(request, callback) { + return this.rpcCall(setInternalStatus, $root.google.cloud.backupdr.v1.SetInternalStatusRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "SetInternalStatus" }); + + /** + * Calls SetInternalStatus. + * @function setInternalStatus + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} request SetInternalStatusRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|initiateBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef InitiateBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.InitiateBackupResponse} [response] InitiateBackupResponse + */ + + /** + * Calls InitiateBackup. + * @function initiateBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} request InitiateBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.InitiateBackupCallback} callback Node-style callback called with the error, if any, and InitiateBackupResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.initiateBackup = function initiateBackup(request, callback) { + return this.rpcCall(initiateBackup, $root.google.cloud.backupdr.v1.InitiateBackupRequest, $root.google.cloud.backupdr.v1.InitiateBackupResponse, request, callback); + }, "name", { value: "InitiateBackup" }); + + /** + * Calls InitiateBackup. + * @function initiateBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} request InitiateBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|abandonBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef AbandonBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls AbandonBackup. + * @function abandonBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} request AbandonBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.AbandonBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.abandonBackup = function abandonBackup(request, callback) { + return this.rpcCall(abandonBackup, $root.google.cloud.backupdr.v1.AbandonBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "AbandonBackup" }); + + /** + * Calls AbandonBackup. + * @function abandonBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} request AbandonBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|finalizeBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef FinalizeBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls FinalizeBackup. + * @function finalizeBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} request FinalizeBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.FinalizeBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.finalizeBackup = function finalizeBackup(request, callback) { + return this.rpcCall(finalizeBackup, $root.google.cloud.backupdr.v1.FinalizeBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "FinalizeBackup" }); + + /** + * Calls FinalizeBackup. + * @function finalizeBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} request FinalizeBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchAccessToken}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef FetchAccessTokenCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.FetchAccessTokenResponse} [response] FetchAccessTokenResponse + */ + + /** + * Calls FetchAccessToken. + * @function fetchAccessToken + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} request FetchAccessTokenRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.FetchAccessTokenCallback} callback Node-style callback called with the error, if any, and FetchAccessTokenResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.fetchAccessToken = function fetchAccessToken(request, callback) { + return this.rpcCall(fetchAccessToken, $root.google.cloud.backupdr.v1.FetchAccessTokenRequest, $root.google.cloud.backupdr.v1.FetchAccessTokenResponse, request, callback); + }, "name", { value: "FetchAccessToken" }); + + /** + * Calls FetchAccessToken. + * @function fetchAccessToken + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} request FetchAccessTokenRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackups}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListBackupsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListBackupsResponse} [response] ListBackupsResponse + */ + + /** + * Calls ListBackups. + * @function listBackups + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupsRequest} request ListBackupsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListBackupsCallback} callback Node-style callback called with the error, if any, and ListBackupsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listBackups = function listBackups(request, callback) { + return this.rpcCall(listBackups, $root.google.cloud.backupdr.v1.ListBackupsRequest, $root.google.cloud.backupdr.v1.ListBackupsResponse, request, callback); + }, "name", { value: "ListBackups" }); + + /** + * Calls ListBackups. + * @function listBackups + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupsRequest} request ListBackupsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.Backup} [response] Backup + */ + + /** + * Calls GetBackup. + * @function getBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupRequest} request GetBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetBackupCallback} callback Node-style callback called with the error, if any, and Backup + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.getBackup = function getBackup(request, callback) { + return this.rpcCall(getBackup, $root.google.cloud.backupdr.v1.GetBackupRequest, $root.google.cloud.backupdr.v1.Backup, request, callback); + }, "name", { value: "GetBackup" }); + + /** + * Calls GetBackup. + * @function getBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupRequest} request GetBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef UpdateBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateBackup. + * @function updateBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} request UpdateBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.UpdateBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.updateBackup = function updateBackup(request, callback) { + return this.rpcCall(updateBackup, $root.google.cloud.backupdr.v1.UpdateBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateBackup" }); + + /** + * Calls UpdateBackup. + * @function updateBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} request UpdateBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef DeleteBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteBackup. + * @function deleteBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} request DeleteBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.deleteBackup = function deleteBackup(request, callback) { + return this.rpcCall(deleteBackup, $root.google.cloud.backupdr.v1.DeleteBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackup" }); + + /** + * Calls DeleteBackup. + * @function deleteBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} request DeleteBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|restoreBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef RestoreBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RestoreBackup. + * @function restoreBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} request RestoreBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.RestoreBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.restoreBackup = function restoreBackup(request, callback) { + return this.rpcCall(restoreBackup, $root.google.cloud.backupdr.v1.RestoreBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RestoreBackup" }); + + /** + * Calls RestoreBackup. + * @function restoreBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} request RestoreBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlan}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef CreateBackupPlanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateBackupPlan. + * @function createBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} request CreateBackupPlanRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupPlanCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.createBackupPlan = function createBackupPlan(request, callback) { + return this.rpcCall(createBackupPlan, $root.google.cloud.backupdr.v1.CreateBackupPlanRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBackupPlan" }); + + /** + * Calls CreateBackupPlan. + * @function createBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} request CreateBackupPlanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlan}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetBackupPlanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.BackupPlan} [response] BackupPlan + */ + + /** + * Calls GetBackupPlan. + * @function getBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} request GetBackupPlanRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetBackupPlanCallback} callback Node-style callback called with the error, if any, and BackupPlan + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.getBackupPlan = function getBackupPlan(request, callback) { + return this.rpcCall(getBackupPlan, $root.google.cloud.backupdr.v1.GetBackupPlanRequest, $root.google.cloud.backupdr.v1.BackupPlan, request, callback); + }, "name", { value: "GetBackupPlan" }); + + /** + * Calls GetBackupPlan. + * @function getBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} request GetBackupPlanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlans}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListBackupPlansCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListBackupPlansResponse} [response] ListBackupPlansResponse + */ + + /** + * Calls ListBackupPlans. + * @function listBackupPlans + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} request ListBackupPlansRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListBackupPlansCallback} callback Node-style callback called with the error, if any, and ListBackupPlansResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listBackupPlans = function listBackupPlans(request, callback) { + return this.rpcCall(listBackupPlans, $root.google.cloud.backupdr.v1.ListBackupPlansRequest, $root.google.cloud.backupdr.v1.ListBackupPlansResponse, request, callback); + }, "name", { value: "ListBackupPlans" }); + + /** + * Calls ListBackupPlans. + * @function listBackupPlans + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} request ListBackupPlansRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlan}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef DeleteBackupPlanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteBackupPlan. + * @function deleteBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} request DeleteBackupPlanRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.deleteBackupPlan = function deleteBackupPlan(request, callback) { + return this.rpcCall(deleteBackupPlan, $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackupPlan" }); + + /** + * Calls DeleteBackupPlan. + * @function deleteBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} request DeleteBackupPlanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlanAssociation}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef CreateBackupPlanAssociationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateBackupPlanAssociation. + * @function createBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} request CreateBackupPlanAssociationRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.createBackupPlanAssociation = function createBackupPlanAssociation(request, callback) { + return this.rpcCall(createBackupPlanAssociation, $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBackupPlanAssociation" }); + + /** + * Calls CreateBackupPlanAssociation. + * @function createBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} request CreateBackupPlanAssociationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlanAssociation}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetBackupPlanAssociationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.BackupPlanAssociation} [response] BackupPlanAssociation + */ + + /** + * Calls GetBackupPlanAssociation. + * @function getBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} request GetBackupPlanAssociationRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and BackupPlanAssociation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.getBackupPlanAssociation = function getBackupPlanAssociation(request, callback) { + return this.rpcCall(getBackupPlanAssociation, $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest, $root.google.cloud.backupdr.v1.BackupPlanAssociation, request, callback); + }, "name", { value: "GetBackupPlanAssociation" }); + + /** + * Calls GetBackupPlanAssociation. + * @function getBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} request GetBackupPlanAssociationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlanAssociations}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListBackupPlanAssociationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} [response] ListBackupPlanAssociationsResponse + */ + + /** + * Calls ListBackupPlanAssociations. + * @function listBackupPlanAssociations + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} request ListBackupPlanAssociationsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociationsCallback} callback Node-style callback called with the error, if any, and ListBackupPlanAssociationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listBackupPlanAssociations = function listBackupPlanAssociations(request, callback) { + return this.rpcCall(listBackupPlanAssociations, $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest, $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse, request, callback); + }, "name", { value: "ListBackupPlanAssociations" }); + + /** + * Calls ListBackupPlanAssociations. + * @function listBackupPlanAssociations + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} request ListBackupPlanAssociationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlanAssociation}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef DeleteBackupPlanAssociationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteBackupPlanAssociation. + * @function deleteBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} request DeleteBackupPlanAssociationRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.deleteBackupPlanAssociation = function deleteBackupPlanAssociation(request, callback) { + return this.rpcCall(deleteBackupPlanAssociation, $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackupPlanAssociation" }); + + /** + * Calls DeleteBackupPlanAssociation. + * @function deleteBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} request DeleteBackupPlanAssociationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|triggerBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef TriggerBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls TriggerBackup. + * @function triggerBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} request TriggerBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.TriggerBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.triggerBackup = function triggerBackup(request, callback) { + return this.rpcCall(triggerBackup, $root.google.cloud.backupdr.v1.TriggerBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "TriggerBackup" }); + + /** + * Calls TriggerBackup. + * @function triggerBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} request TriggerBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return BackupDR; + })(); + + v1.NetworkConfig = (function() { + + /** + * Properties of a NetworkConfig. * @memberof google.cloud.backupdr.v1 - * @interface IWorkforceIdentityBasedManagementURI - * @property {string|null} [firstPartyManagementUri] WorkforceIdentityBasedManagementURI firstPartyManagementUri - * @property {string|null} [thirdPartyManagementUri] WorkforceIdentityBasedManagementURI thirdPartyManagementUri + * @interface INetworkConfig + * @property {string|null} [network] NetworkConfig network + * @property {google.cloud.backupdr.v1.NetworkConfig.PeeringMode|null} [peeringMode] NetworkConfig peeringMode */ /** - * Constructs a new WorkforceIdentityBasedManagementURI. + * Constructs a new NetworkConfig. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a WorkforceIdentityBasedManagementURI. - * @implements IWorkforceIdentityBasedManagementURI + * @classdesc Represents a NetworkConfig. + * @implements INetworkConfig * @constructor - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.INetworkConfig=} [properties] Properties to set */ - function WorkforceIdentityBasedManagementURI(properties) { + function NetworkConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -746,89 +1249,89 @@ } /** - * WorkforceIdentityBasedManagementURI firstPartyManagementUri. - * @member {string} firstPartyManagementUri - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * NetworkConfig network. + * @member {string} network + * @memberof google.cloud.backupdr.v1.NetworkConfig * @instance */ - WorkforceIdentityBasedManagementURI.prototype.firstPartyManagementUri = ""; + NetworkConfig.prototype.network = ""; /** - * WorkforceIdentityBasedManagementURI thirdPartyManagementUri. - * @member {string} thirdPartyManagementUri - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * NetworkConfig peeringMode. + * @member {google.cloud.backupdr.v1.NetworkConfig.PeeringMode} peeringMode + * @memberof google.cloud.backupdr.v1.NetworkConfig * @instance */ - WorkforceIdentityBasedManagementURI.prototype.thirdPartyManagementUri = ""; + NetworkConfig.prototype.peeringMode = 0; /** - * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. + * Creates a new NetworkConfig instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @memberof google.cloud.backupdr.v1.NetworkConfig * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI instance + * @param {google.cloud.backupdr.v1.INetworkConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig instance */ - WorkforceIdentityBasedManagementURI.create = function create(properties) { - return new WorkforceIdentityBasedManagementURI(properties); + NetworkConfig.create = function create(properties) { + return new NetworkConfig(properties); }; /** - * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @memberof google.cloud.backupdr.v1.NetworkConfig * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI message or plain object to encode + * @param {google.cloud.backupdr.v1.INetworkConfig} message NetworkConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WorkforceIdentityBasedManagementURI.encode = function encode(message, writer) { + NetworkConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.firstPartyManagementUri != null && Object.hasOwnProperty.call(message, "firstPartyManagementUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.firstPartyManagementUri); - if (message.thirdPartyManagementUri != null && Object.hasOwnProperty.call(message, "thirdPartyManagementUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.thirdPartyManagementUri); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); + if (message.peeringMode != null && Object.hasOwnProperty.call(message, "peeringMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.peeringMode); return writer; }; /** - * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @memberof google.cloud.backupdr.v1.NetworkConfig * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI message or plain object to encode + * @param {google.cloud.backupdr.v1.INetworkConfig} message NetworkConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WorkforceIdentityBasedManagementURI.encodeDelimited = function encodeDelimited(message, writer) { + NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. + * Decodes a NetworkConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @memberof google.cloud.backupdr.v1.NetworkConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI + * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WorkforceIdentityBasedManagementURI.decode = function decode(reader, length) { + NetworkConfig.decode = function 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.backupdr.v1.WorkforceIdentityBasedManagementURI(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.NetworkConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.firstPartyManagementUri = reader.string(); + message.network = reader.string(); break; } case 2: { - message.thirdPartyManagementUri = reader.string(); + message.peeringMode = reader.int32(); break; } default: @@ -840,43 +1343,530 @@ }; /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @memberof google.cloud.backupdr.v1.NetworkConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI + * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WorkforceIdentityBasedManagementURI.decodeDelimited = function decodeDelimited(reader) { + NetworkConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WorkforceIdentityBasedManagementURI message. + * Verifies a NetworkConfig message. * @function verify - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @memberof google.cloud.backupdr.v1.NetworkConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WorkforceIdentityBasedManagementURI.verify = function verify(message) { + NetworkConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.firstPartyManagementUri != null && message.hasOwnProperty("firstPartyManagementUri")) - if (!$util.isString(message.firstPartyManagementUri)) - return "firstPartyManagementUri: string expected"; - if (message.thirdPartyManagementUri != null && message.hasOwnProperty("thirdPartyManagementUri")) - if (!$util.isString(message.thirdPartyManagementUri)) - return "thirdPartyManagementUri: string expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.peeringMode != null && message.hasOwnProperty("peeringMode")) + switch (message.peeringMode) { + default: + return "peeringMode: enum value expected"; + case 0: + case 1: + break; + } return null; }; /** - * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig + */ + NetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.NetworkConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.NetworkConfig(); + if (object.network != null) + message.network = String(object.network); + switch (object.peeringMode) { + default: + if (typeof object.peeringMode === "number") { + message.peeringMode = object.peeringMode; + break; + } + break; + case "PEERING_MODE_UNSPECIFIED": + case 0: + message.peeringMode = 0; + break; + case "PRIVATE_SERVICE_ACCESS": + case 1: + message.peeringMode = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {google.cloud.backupdr.v1.NetworkConfig} message NetworkConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.network = ""; + object.peeringMode = options.enums === String ? "PEERING_MODE_UNSPECIFIED" : 0; + } + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.peeringMode != null && message.hasOwnProperty("peeringMode")) + object.peeringMode = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode] === undefined ? message.peeringMode : $root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode] : message.peeringMode; + return object; + }; + + /** + * Converts this NetworkConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkConfig"; + }; + + /** + * PeeringMode enum. + * @name google.cloud.backupdr.v1.NetworkConfig.PeeringMode + * @enum {number} + * @property {number} PEERING_MODE_UNSPECIFIED=0 PEERING_MODE_UNSPECIFIED value + * @property {number} PRIVATE_SERVICE_ACCESS=1 PRIVATE_SERVICE_ACCESS value + */ + NetworkConfig.PeeringMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PEERING_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRIVATE_SERVICE_ACCESS"] = 1; + return values; + })(); + + return NetworkConfig; + })(); + + v1.ManagementURI = (function() { + + /** + * Properties of a ManagementURI. + * @memberof google.cloud.backupdr.v1 + * @interface IManagementURI + * @property {string|null} [webUi] ManagementURI webUi + * @property {string|null} [api] ManagementURI api + */ + + /** + * Constructs a new ManagementURI. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ManagementURI. + * @implements IManagementURI + * @constructor + * @param {google.cloud.backupdr.v1.IManagementURI=} [properties] Properties to set + */ + function ManagementURI(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ManagementURI webUi. + * @member {string} webUi + * @memberof google.cloud.backupdr.v1.ManagementURI + * @instance + */ + ManagementURI.prototype.webUi = ""; + + /** + * ManagementURI api. + * @member {string} api + * @memberof google.cloud.backupdr.v1.ManagementURI + * @instance + */ + ManagementURI.prototype.api = ""; + + /** + * Creates a new ManagementURI instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {google.cloud.backupdr.v1.IManagementURI=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI instance + */ + ManagementURI.create = function create(properties) { + return new ManagementURI(properties); + }; + + /** + * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {google.cloud.backupdr.v1.IManagementURI} message ManagementURI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagementURI.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.webUi != null && Object.hasOwnProperty.call(message, "webUi")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.webUi); + if (message.api != null && Object.hasOwnProperty.call(message, "api")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.api); + return writer; + }; + + /** + * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {google.cloud.backupdr.v1.IManagementURI} message ManagementURI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagementURI.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ManagementURI message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagementURI.decode = function 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.backupdr.v1.ManagementURI(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.webUi = reader.string(); + break; + } + case 2: { + message.api = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ManagementURI message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagementURI.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ManagementURI message. + * @function verify + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ManagementURI.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.webUi != null && message.hasOwnProperty("webUi")) + if (!$util.isString(message.webUi)) + return "webUi: string expected"; + if (message.api != null && message.hasOwnProperty("api")) + if (!$util.isString(message.api)) + return "api: string expected"; + return null; + }; + + /** + * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI + */ + ManagementURI.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ManagementURI) + return object; + var message = new $root.google.cloud.backupdr.v1.ManagementURI(); + if (object.webUi != null) + message.webUi = String(object.webUi); + if (object.api != null) + message.api = String(object.api); + return message; + }; + + /** + * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {google.cloud.backupdr.v1.ManagementURI} message ManagementURI + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ManagementURI.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.webUi = ""; + object.api = ""; + } + if (message.webUi != null && message.hasOwnProperty("webUi")) + object.webUi = message.webUi; + if (message.api != null && message.hasOwnProperty("api")) + object.api = message.api; + return object; + }; + + /** + * Converts this ManagementURI to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ManagementURI + * @instance + * @returns {Object.} JSON object + */ + ManagementURI.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ManagementURI + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ManagementURI.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ManagementURI"; + }; + + return ManagementURI; + })(); + + v1.WorkforceIdentityBasedManagementURI = (function() { + + /** + * Properties of a WorkforceIdentityBasedManagementURI. + * @memberof google.cloud.backupdr.v1 + * @interface IWorkforceIdentityBasedManagementURI + * @property {string|null} [firstPartyManagementUri] WorkforceIdentityBasedManagementURI firstPartyManagementUri + * @property {string|null} [thirdPartyManagementUri] WorkforceIdentityBasedManagementURI thirdPartyManagementUri + */ + + /** + * Constructs a new WorkforceIdentityBasedManagementURI. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a WorkforceIdentityBasedManagementURI. + * @implements IWorkforceIdentityBasedManagementURI + * @constructor + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI=} [properties] Properties to set + */ + function WorkforceIdentityBasedManagementURI(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkforceIdentityBasedManagementURI firstPartyManagementUri. + * @member {string} firstPartyManagementUri + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @instance + */ + WorkforceIdentityBasedManagementURI.prototype.firstPartyManagementUri = ""; + + /** + * WorkforceIdentityBasedManagementURI thirdPartyManagementUri. + * @member {string} thirdPartyManagementUri + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @instance + */ + WorkforceIdentityBasedManagementURI.prototype.thirdPartyManagementUri = ""; + + /** + * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI instance + */ + WorkforceIdentityBasedManagementURI.create = function create(properties) { + return new WorkforceIdentityBasedManagementURI(properties); + }; + + /** + * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkforceIdentityBasedManagementURI.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.firstPartyManagementUri != null && Object.hasOwnProperty.call(message, "firstPartyManagementUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.firstPartyManagementUri); + if (message.thirdPartyManagementUri != null && Object.hasOwnProperty.call(message, "thirdPartyManagementUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.thirdPartyManagementUri); + return writer; + }; + + /** + * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkforceIdentityBasedManagementURI.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkforceIdentityBasedManagementURI.decode = function 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.backupdr.v1.WorkforceIdentityBasedManagementURI(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.firstPartyManagementUri = reader.string(); + break; + } + case 2: { + message.thirdPartyManagementUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkforceIdentityBasedManagementURI.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkforceIdentityBasedManagementURI message. + * @function verify + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkforceIdentityBasedManagementURI.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.firstPartyManagementUri != null && message.hasOwnProperty("firstPartyManagementUri")) + if (!$util.isString(message.firstPartyManagementUri)) + return "firstPartyManagementUri: string expected"; + if (message.thirdPartyManagementUri != null && message.hasOwnProperty("thirdPartyManagementUri")) + if (!$util.isString(message.thirdPartyManagementUri)) + return "thirdPartyManagementUri: string expected"; + return null; + }; + + /** + * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI * @static @@ -3673,44 +4663,34000 @@ return OperationMetadata; })(); + v1.BackupPlan = (function() { + + /** + * Properties of a BackupPlan. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupPlan + * @property {string|null} [name] BackupPlan name + * @property {string|null} [description] BackupPlan description + * @property {Object.|null} [labels] BackupPlan labels + * @property {google.protobuf.ITimestamp|null} [createTime] BackupPlan createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] BackupPlan updateTime + * @property {Array.|null} [backupRules] BackupPlan backupRules + * @property {google.cloud.backupdr.v1.BackupPlan.State|null} [state] BackupPlan state + * @property {string|null} [resourceType] BackupPlan resourceType + * @property {string|null} [etag] BackupPlan etag + * @property {string|null} [backupVault] BackupPlan backupVault + * @property {string|null} [backupVaultServiceAccount] BackupPlan backupVaultServiceAccount + */ + + /** + * Constructs a new BackupPlan. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupPlan. + * @implements IBackupPlan + * @constructor + * @param {google.cloud.backupdr.v1.IBackupPlan=} [properties] Properties to set + */ + function BackupPlan(properties) { + this.labels = {}; + this.backupRules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupPlan name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.name = ""; + + /** + * BackupPlan description. + * @member {string} description + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.description = ""; + + /** + * BackupPlan labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.labels = $util.emptyObject; + + /** + * BackupPlan createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.createTime = null; + + /** + * BackupPlan updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.updateTime = null; + + /** + * BackupPlan backupRules. + * @member {Array.} backupRules + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.backupRules = $util.emptyArray; + + /** + * BackupPlan state. + * @member {google.cloud.backupdr.v1.BackupPlan.State} state + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.state = 0; + + /** + * BackupPlan resourceType. + * @member {string} resourceType + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.resourceType = ""; + + /** + * BackupPlan etag. + * @member {string} etag + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.etag = ""; + + /** + * BackupPlan backupVault. + * @member {string} backupVault + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.backupVault = ""; + + /** + * BackupPlan backupVaultServiceAccount. + * @member {string} backupVaultServiceAccount + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.backupVaultServiceAccount = ""; + + /** + * Creates a new BackupPlan instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {google.cloud.backupdr.v1.IBackupPlan=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan instance + */ + BackupPlan.create = function create(properties) { + return new BackupPlan(properties); + }; + + /** + * Encodes the specified BackupPlan message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {google.cloud.backupdr.v1.IBackupPlan} message BackupPlan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupPlan.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + 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 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.backupRules != null && message.backupRules.length) + for (var i = 0; i < message.backupRules.length; ++i) + $root.google.cloud.backupdr.v1.BackupRule.encode(message.backupRules[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceType); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.etag); + if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.backupVault); + if (message.backupVaultServiceAccount != null && Object.hasOwnProperty.call(message, "backupVaultServiceAccount")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.backupVaultServiceAccount); + return writer; + }; + + /** + * Encodes the specified BackupPlan message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {google.cloud.backupdr.v1.IBackupPlan} message BackupPlan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupPlan.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupPlan message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupPlan.decode = function 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.backupdr.v1.BackupPlan(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + 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 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.backupRules && message.backupRules.length)) + message.backupRules = []; + message.backupRules.push($root.google.cloud.backupdr.v1.BackupRule.decode(reader, reader.uint32())); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 8: { + message.resourceType = reader.string(); + break; + } + case 9: { + message.etag = reader.string(); + break; + } + case 10: { + message.backupVault = reader.string(); + break; + } + case 11: { + message.backupVaultServiceAccount = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupPlan message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupPlan.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupPlan message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupPlan.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + 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.backupRules != null && message.hasOwnProperty("backupRules")) { + if (!Array.isArray(message.backupRules)) + return "backupRules: array expected"; + for (var i = 0; i < message.backupRules.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupRule.verify(message.backupRules[i]); + if (error) + return "backupRules." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) + if (!$util.isString(message.backupVault)) + return "backupVault: string expected"; + if (message.backupVaultServiceAccount != null && message.hasOwnProperty("backupVaultServiceAccount")) + if (!$util.isString(message.backupVaultServiceAccount)) + return "backupVaultServiceAccount: string expected"; + return null; + }; + + /** + * Creates a BackupPlan message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan + */ + BackupPlan.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupPlan) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupPlan(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlan.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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlan.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.backupdr.v1.BackupPlan.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.backupRules) { + if (!Array.isArray(object.backupRules)) + throw TypeError(".google.cloud.backupdr.v1.BackupPlan.backupRules: array expected"); + message.backupRules = []; + for (var i = 0; i < object.backupRules.length; ++i) { + if (typeof object.backupRules[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlan.backupRules: object expected"); + message.backupRules[i] = $root.google.cloud.backupdr.v1.BackupRule.fromObject(object.backupRules[i]); + } + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "INACTIVE": + case 4: + message.state = 4; + break; + } + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.etag != null) + message.etag = String(object.etag); + if (object.backupVault != null) + message.backupVault = String(object.backupVault); + if (object.backupVaultServiceAccount != null) + message.backupVaultServiceAccount = String(object.backupVaultServiceAccount); + return message; + }; + + /** + * Creates a plain object from a BackupPlan message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {google.cloud.backupdr.v1.BackupPlan} message BackupPlan + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupPlan.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.backupRules = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.resourceType = ""; + object.etag = ""; + object.backupVault = ""; + object.backupVaultServiceAccount = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + 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.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.backupRules && message.backupRules.length) { + object.backupRules = []; + for (var j = 0; j < message.backupRules.length; ++j) + object.backupRules[j] = $root.google.cloud.backupdr.v1.BackupRule.toObject(message.backupRules[j], options); + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupPlan.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupPlan.State[message.state] : message.state; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) + object.backupVault = message.backupVault; + if (message.backupVaultServiceAccount != null && message.hasOwnProperty("backupVaultServiceAccount")) + object.backupVaultServiceAccount = message.backupVaultServiceAccount; + return object; + }; + + /** + * Converts this BackupPlan to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + * @returns {Object.} JSON object + */ + BackupPlan.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupPlan + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupPlan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupPlan"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.BackupPlan.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} INACTIVE=4 INACTIVE value + */ + BackupPlan.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "INACTIVE"] = 4; + return values; + })(); + + return BackupPlan; + })(); + + v1.BackupRule = (function() { + + /** + * Properties of a BackupRule. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupRule + * @property {string|null} [ruleId] BackupRule ruleId + * @property {number|null} [backupRetentionDays] BackupRule backupRetentionDays + * @property {google.cloud.backupdr.v1.IStandardSchedule|null} [standardSchedule] BackupRule standardSchedule + */ + + /** + * Constructs a new BackupRule. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupRule. + * @implements IBackupRule + * @constructor + * @param {google.cloud.backupdr.v1.IBackupRule=} [properties] Properties to set + */ + function BackupRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupRule ruleId. + * @member {string} ruleId + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + */ + BackupRule.prototype.ruleId = ""; + + /** + * BackupRule backupRetentionDays. + * @member {number} backupRetentionDays + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + */ + BackupRule.prototype.backupRetentionDays = 0; + + /** + * BackupRule standardSchedule. + * @member {google.cloud.backupdr.v1.IStandardSchedule|null|undefined} standardSchedule + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + */ + BackupRule.prototype.standardSchedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupRule backupScheduleOneof. + * @member {"standardSchedule"|undefined} backupScheduleOneof + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + */ + Object.defineProperty(BackupRule.prototype, "backupScheduleOneof", { + get: $util.oneOfGetter($oneOfFields = ["standardSchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupRule instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {google.cloud.backupdr.v1.IBackupRule=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule instance + */ + BackupRule.create = function create(properties) { + return new BackupRule(properties); + }; + + /** + * Encodes the specified BackupRule message. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {google.cloud.backupdr.v1.IBackupRule} message BackupRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ruleId); + if (message.backupRetentionDays != null && Object.hasOwnProperty.call(message, "backupRetentionDays")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.backupRetentionDays); + if (message.standardSchedule != null && Object.hasOwnProperty.call(message, "standardSchedule")) + $root.google.cloud.backupdr.v1.StandardSchedule.encode(message.standardSchedule, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BackupRule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {google.cloud.backupdr.v1.IBackupRule} message BackupRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupRule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupRule.decode = function 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.backupdr.v1.BackupRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ruleId = reader.string(); + break; + } + case 4: { + message.backupRetentionDays = reader.int32(); + break; + } + case 5: { + message.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupRule message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + if (!$util.isString(message.ruleId)) + return "ruleId: string expected"; + if (message.backupRetentionDays != null && message.hasOwnProperty("backupRetentionDays")) + if (!$util.isInteger(message.backupRetentionDays)) + return "backupRetentionDays: integer expected"; + if (message.standardSchedule != null && message.hasOwnProperty("standardSchedule")) { + properties.backupScheduleOneof = 1; + { + var error = $root.google.cloud.backupdr.v1.StandardSchedule.verify(message.standardSchedule); + if (error) + return "standardSchedule." + error; + } + } + return null; + }; + + /** + * Creates a BackupRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule + */ + BackupRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupRule) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupRule(); + if (object.ruleId != null) + message.ruleId = String(object.ruleId); + if (object.backupRetentionDays != null) + message.backupRetentionDays = object.backupRetentionDays | 0; + if (object.standardSchedule != null) { + if (typeof object.standardSchedule !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupRule.standardSchedule: object expected"); + message.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.fromObject(object.standardSchedule); + } + return message; + }; + + /** + * Creates a plain object from a BackupRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {google.cloud.backupdr.v1.BackupRule} message BackupRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.ruleId = ""; + object.backupRetentionDays = 0; + } + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + object.ruleId = message.ruleId; + if (message.backupRetentionDays != null && message.hasOwnProperty("backupRetentionDays")) + object.backupRetentionDays = message.backupRetentionDays; + if (message.standardSchedule != null && message.hasOwnProperty("standardSchedule")) { + object.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.toObject(message.standardSchedule, options); + if (options.oneofs) + object.backupScheduleOneof = "standardSchedule"; + } + return object; + }; + + /** + * Converts this BackupRule to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + * @returns {Object.} JSON object + */ + BackupRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupRule + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupRule"; + }; + + return BackupRule; + })(); + + v1.StandardSchedule = (function() { + + /** + * Properties of a StandardSchedule. + * @memberof google.cloud.backupdr.v1 + * @interface IStandardSchedule + * @property {google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|null} [recurrenceType] StandardSchedule recurrenceType + * @property {number|null} [hourlyFrequency] StandardSchedule hourlyFrequency + * @property {Array.|null} [daysOfWeek] StandardSchedule daysOfWeek + * @property {Array.|null} [daysOfMonth] StandardSchedule daysOfMonth + * @property {google.cloud.backupdr.v1.IWeekDayOfMonth|null} [weekDayOfMonth] StandardSchedule weekDayOfMonth + * @property {Array.|null} [months] StandardSchedule months + * @property {google.cloud.backupdr.v1.IBackupWindow|null} [backupWindow] StandardSchedule backupWindow + * @property {string|null} [timeZone] StandardSchedule timeZone + */ + + /** + * Constructs a new StandardSchedule. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a StandardSchedule. + * @implements IStandardSchedule + * @constructor + * @param {google.cloud.backupdr.v1.IStandardSchedule=} [properties] Properties to set + */ + function StandardSchedule(properties) { + this.daysOfWeek = []; + this.daysOfMonth = []; + this.months = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StandardSchedule recurrenceType. + * @member {google.cloud.backupdr.v1.StandardSchedule.RecurrenceType} recurrenceType + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.recurrenceType = 0; + + /** + * StandardSchedule hourlyFrequency. + * @member {number} hourlyFrequency + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.hourlyFrequency = 0; + + /** + * StandardSchedule daysOfWeek. + * @member {Array.} daysOfWeek + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.daysOfWeek = $util.emptyArray; + + /** + * StandardSchedule daysOfMonth. + * @member {Array.} daysOfMonth + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.daysOfMonth = $util.emptyArray; + + /** + * StandardSchedule weekDayOfMonth. + * @member {google.cloud.backupdr.v1.IWeekDayOfMonth|null|undefined} weekDayOfMonth + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.weekDayOfMonth = null; + + /** + * StandardSchedule months. + * @member {Array.} months + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.months = $util.emptyArray; + + /** + * StandardSchedule backupWindow. + * @member {google.cloud.backupdr.v1.IBackupWindow|null|undefined} backupWindow + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.backupWindow = null; + + /** + * StandardSchedule timeZone. + * @member {string} timeZone + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.timeZone = ""; + + /** + * Creates a new StandardSchedule instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {google.cloud.backupdr.v1.IStandardSchedule=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule instance + */ + StandardSchedule.create = function create(properties) { + return new StandardSchedule(properties); + }; + + /** + * Encodes the specified StandardSchedule message. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {google.cloud.backupdr.v1.IStandardSchedule} message StandardSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StandardSchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recurrenceType != null && Object.hasOwnProperty.call(message, "recurrenceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.recurrenceType); + if (message.hourlyFrequency != null && Object.hasOwnProperty.call(message, "hourlyFrequency")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hourlyFrequency); + if (message.daysOfWeek != null && message.daysOfWeek.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.daysOfWeek.length; ++i) + writer.int32(message.daysOfWeek[i]); + writer.ldelim(); + } + if (message.daysOfMonth != null && message.daysOfMonth.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (var i = 0; i < message.daysOfMonth.length; ++i) + writer.int32(message.daysOfMonth[i]); + writer.ldelim(); + } + if (message.weekDayOfMonth != null && Object.hasOwnProperty.call(message, "weekDayOfMonth")) + $root.google.cloud.backupdr.v1.WeekDayOfMonth.encode(message.weekDayOfMonth, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.months != null && message.months.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (var i = 0; i < message.months.length; ++i) + writer.int32(message.months[i]); + writer.ldelim(); + } + if (message.backupWindow != null && Object.hasOwnProperty.call(message, "backupWindow")) + $root.google.cloud.backupdr.v1.BackupWindow.encode(message.backupWindow, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.timeZone); + return writer; + }; + + /** + * Encodes the specified StandardSchedule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {google.cloud.backupdr.v1.IStandardSchedule} message StandardSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StandardSchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StandardSchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StandardSchedule.decode = function 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.backupdr.v1.StandardSchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.recurrenceType = reader.int32(); + break; + } + case 2: { + message.hourlyFrequency = reader.int32(); + break; + } + case 3: { + if (!(message.daysOfWeek && message.daysOfWeek.length)) + message.daysOfWeek = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.daysOfWeek.push(reader.int32()); + } else + message.daysOfWeek.push(reader.int32()); + break; + } + case 4: { + if (!(message.daysOfMonth && message.daysOfMonth.length)) + message.daysOfMonth = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.daysOfMonth.push(reader.int32()); + } else + message.daysOfMonth.push(reader.int32()); + break; + } + case 5: { + message.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.months && message.months.length)) + message.months = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.months.push(reader.int32()); + } else + message.months.push(reader.int32()); + break; + } + case 7: { + message.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.decode(reader, reader.uint32()); + break; + } + case 8: { + message.timeZone = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StandardSchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StandardSchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StandardSchedule message. + * @function verify + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StandardSchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recurrenceType != null && message.hasOwnProperty("recurrenceType")) + switch (message.recurrenceType) { + default: + return "recurrenceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.hourlyFrequency != null && message.hasOwnProperty("hourlyFrequency")) + if (!$util.isInteger(message.hourlyFrequency)) + return "hourlyFrequency: integer expected"; + if (message.daysOfWeek != null && message.hasOwnProperty("daysOfWeek")) { + if (!Array.isArray(message.daysOfWeek)) + return "daysOfWeek: array expected"; + for (var i = 0; i < message.daysOfWeek.length; ++i) + switch (message.daysOfWeek[i]) { + default: + return "daysOfWeek: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + if (message.daysOfMonth != null && message.hasOwnProperty("daysOfMonth")) { + if (!Array.isArray(message.daysOfMonth)) + return "daysOfMonth: array expected"; + for (var i = 0; i < message.daysOfMonth.length; ++i) + if (!$util.isInteger(message.daysOfMonth[i])) + return "daysOfMonth: integer[] expected"; + } + if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) { + var error = $root.google.cloud.backupdr.v1.WeekDayOfMonth.verify(message.weekDayOfMonth); + if (error) + return "weekDayOfMonth." + error; + } + if (message.months != null && message.hasOwnProperty("months")) { + if (!Array.isArray(message.months)) + return "months: array expected"; + for (var i = 0; i < message.months.length; ++i) + switch (message.months[i]) { + default: + return "months: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + } + if (message.backupWindow != null && message.hasOwnProperty("backupWindow")) { + var error = $root.google.cloud.backupdr.v1.BackupWindow.verify(message.backupWindow); + if (error) + return "backupWindow." + error; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + return null; + }; + + /** + * Creates a StandardSchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule + */ + StandardSchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.StandardSchedule) + return object; + var message = new $root.google.cloud.backupdr.v1.StandardSchedule(); + switch (object.recurrenceType) { + default: + if (typeof object.recurrenceType === "number") { + message.recurrenceType = object.recurrenceType; + break; + } + break; + case "RECURRENCE_TYPE_UNSPECIFIED": + case 0: + message.recurrenceType = 0; + break; + case "HOURLY": + case 1: + message.recurrenceType = 1; + break; + case "DAILY": + case 2: + message.recurrenceType = 2; + break; + case "WEEKLY": + case 3: + message.recurrenceType = 3; + break; + case "MONTHLY": + case 4: + message.recurrenceType = 4; + break; + case "YEARLY": + case 5: + message.recurrenceType = 5; + break; + } + if (object.hourlyFrequency != null) + message.hourlyFrequency = object.hourlyFrequency | 0; + if (object.daysOfWeek) { + if (!Array.isArray(object.daysOfWeek)) + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.daysOfWeek: array expected"); + message.daysOfWeek = []; + for (var i = 0; i < object.daysOfWeek.length; ++i) + switch (object.daysOfWeek[i]) { + default: + if (typeof object.daysOfWeek[i] === "number") { + message.daysOfWeek[i] = object.daysOfWeek[i]; + break; + } + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.daysOfWeek[i] = 0; + break; + case "MONDAY": + case 1: + message.daysOfWeek[i] = 1; + break; + case "TUESDAY": + case 2: + message.daysOfWeek[i] = 2; + break; + case "WEDNESDAY": + case 3: + message.daysOfWeek[i] = 3; + break; + case "THURSDAY": + case 4: + message.daysOfWeek[i] = 4; + break; + case "FRIDAY": + case 5: + message.daysOfWeek[i] = 5; + break; + case "SATURDAY": + case 6: + message.daysOfWeek[i] = 6; + break; + case "SUNDAY": + case 7: + message.daysOfWeek[i] = 7; + break; + } + } + if (object.daysOfMonth) { + if (!Array.isArray(object.daysOfMonth)) + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.daysOfMonth: array expected"); + message.daysOfMonth = []; + for (var i = 0; i < object.daysOfMonth.length; ++i) + message.daysOfMonth[i] = object.daysOfMonth[i] | 0; + } + if (object.weekDayOfMonth != null) { + if (typeof object.weekDayOfMonth !== "object") + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.weekDayOfMonth: object expected"); + message.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.fromObject(object.weekDayOfMonth); + } + if (object.months) { + if (!Array.isArray(object.months)) + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.months: array expected"); + message.months = []; + for (var i = 0; i < object.months.length; ++i) + switch (object.months[i]) { + default: + if (typeof object.months[i] === "number") { + message.months[i] = object.months[i]; + break; + } + case "MONTH_UNSPECIFIED": + case 0: + message.months[i] = 0; + break; + case "JANUARY": + case 1: + message.months[i] = 1; + break; + case "FEBRUARY": + case 2: + message.months[i] = 2; + break; + case "MARCH": + case 3: + message.months[i] = 3; + break; + case "APRIL": + case 4: + message.months[i] = 4; + break; + case "MAY": + case 5: + message.months[i] = 5; + break; + case "JUNE": + case 6: + message.months[i] = 6; + break; + case "JULY": + case 7: + message.months[i] = 7; + break; + case "AUGUST": + case 8: + message.months[i] = 8; + break; + case "SEPTEMBER": + case 9: + message.months[i] = 9; + break; + case "OCTOBER": + case 10: + message.months[i] = 10; + break; + case "NOVEMBER": + case 11: + message.months[i] = 11; + break; + case "DECEMBER": + case 12: + message.months[i] = 12; + break; + } + } + if (object.backupWindow != null) { + if (typeof object.backupWindow !== "object") + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.backupWindow: object expected"); + message.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.fromObject(object.backupWindow); + } + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + return message; + }; + + /** + * Creates a plain object from a StandardSchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {google.cloud.backupdr.v1.StandardSchedule} message StandardSchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StandardSchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.daysOfWeek = []; + object.daysOfMonth = []; + object.months = []; + } + if (options.defaults) { + object.recurrenceType = options.enums === String ? "RECURRENCE_TYPE_UNSPECIFIED" : 0; + object.hourlyFrequency = 0; + object.weekDayOfMonth = null; + object.backupWindow = null; + object.timeZone = ""; + } + if (message.recurrenceType != null && message.hasOwnProperty("recurrenceType")) + object.recurrenceType = options.enums === String ? $root.google.cloud.backupdr.v1.StandardSchedule.RecurrenceType[message.recurrenceType] === undefined ? message.recurrenceType : $root.google.cloud.backupdr.v1.StandardSchedule.RecurrenceType[message.recurrenceType] : message.recurrenceType; + if (message.hourlyFrequency != null && message.hasOwnProperty("hourlyFrequency")) + object.hourlyFrequency = message.hourlyFrequency; + if (message.daysOfWeek && message.daysOfWeek.length) { + object.daysOfWeek = []; + for (var j = 0; j < message.daysOfWeek.length; ++j) + object.daysOfWeek[j] = options.enums === String ? $root.google.type.DayOfWeek[message.daysOfWeek[j]] === undefined ? message.daysOfWeek[j] : $root.google.type.DayOfWeek[message.daysOfWeek[j]] : message.daysOfWeek[j]; + } + if (message.daysOfMonth && message.daysOfMonth.length) { + object.daysOfMonth = []; + for (var j = 0; j < message.daysOfMonth.length; ++j) + object.daysOfMonth[j] = message.daysOfMonth[j]; + } + if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) + object.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.toObject(message.weekDayOfMonth, options); + if (message.months && message.months.length) { + object.months = []; + for (var j = 0; j < message.months.length; ++j) + object.months[j] = options.enums === String ? $root.google.type.Month[message.months[j]] === undefined ? message.months[j] : $root.google.type.Month[message.months[j]] : message.months[j]; + } + if (message.backupWindow != null && message.hasOwnProperty("backupWindow")) + object.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.toObject(message.backupWindow, options); + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + return object; + }; + + /** + * Converts this StandardSchedule to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + * @returns {Object.} JSON object + */ + StandardSchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StandardSchedule + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StandardSchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.StandardSchedule"; + }; + + /** + * RecurrenceType enum. + * @name google.cloud.backupdr.v1.StandardSchedule.RecurrenceType + * @enum {number} + * @property {number} RECURRENCE_TYPE_UNSPECIFIED=0 RECURRENCE_TYPE_UNSPECIFIED value + * @property {number} HOURLY=1 HOURLY value + * @property {number} DAILY=2 DAILY value + * @property {number} WEEKLY=3 WEEKLY value + * @property {number} MONTHLY=4 MONTHLY value + * @property {number} YEARLY=5 YEARLY value + */ + StandardSchedule.RecurrenceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RECURRENCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HOURLY"] = 1; + values[valuesById[2] = "DAILY"] = 2; + values[valuesById[3] = "WEEKLY"] = 3; + values[valuesById[4] = "MONTHLY"] = 4; + values[valuesById[5] = "YEARLY"] = 5; + return values; + })(); + + return StandardSchedule; + })(); + + v1.BackupWindow = (function() { + + /** + * Properties of a BackupWindow. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupWindow + * @property {number|null} [startHourOfDay] BackupWindow startHourOfDay + * @property {number|null} [endHourOfDay] BackupWindow endHourOfDay + */ + + /** + * Constructs a new BackupWindow. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupWindow. + * @implements IBackupWindow + * @constructor + * @param {google.cloud.backupdr.v1.IBackupWindow=} [properties] Properties to set + */ + function BackupWindow(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupWindow startHourOfDay. + * @member {number} startHourOfDay + * @memberof google.cloud.backupdr.v1.BackupWindow + * @instance + */ + BackupWindow.prototype.startHourOfDay = 0; + + /** + * BackupWindow endHourOfDay. + * @member {number} endHourOfDay + * @memberof google.cloud.backupdr.v1.BackupWindow + * @instance + */ + BackupWindow.prototype.endHourOfDay = 0; + + /** + * Creates a new BackupWindow instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {google.cloud.backupdr.v1.IBackupWindow=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow instance + */ + BackupWindow.create = function create(properties) { + return new BackupWindow(properties); + }; + + /** + * Encodes the specified BackupWindow message. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {google.cloud.backupdr.v1.IBackupWindow} message BackupWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupWindow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startHourOfDay != null && Object.hasOwnProperty.call(message, "startHourOfDay")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startHourOfDay); + if (message.endHourOfDay != null && Object.hasOwnProperty.call(message, "endHourOfDay")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endHourOfDay); + return writer; + }; + + /** + * Encodes the specified BackupWindow message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {google.cloud.backupdr.v1.IBackupWindow} message BackupWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupWindow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupWindow message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupWindow.decode = function 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.backupdr.v1.BackupWindow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startHourOfDay = reader.int32(); + break; + } + case 2: { + message.endHourOfDay = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupWindow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupWindow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupWindow message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupWindow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startHourOfDay != null && message.hasOwnProperty("startHourOfDay")) + if (!$util.isInteger(message.startHourOfDay)) + return "startHourOfDay: integer expected"; + if (message.endHourOfDay != null && message.hasOwnProperty("endHourOfDay")) + if (!$util.isInteger(message.endHourOfDay)) + return "endHourOfDay: integer expected"; + return null; + }; + + /** + * Creates a BackupWindow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow + */ + BackupWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupWindow) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupWindow(); + if (object.startHourOfDay != null) + message.startHourOfDay = object.startHourOfDay | 0; + if (object.endHourOfDay != null) + message.endHourOfDay = object.endHourOfDay | 0; + return message; + }; + + /** + * Creates a plain object from a BackupWindow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {google.cloud.backupdr.v1.BackupWindow} message BackupWindow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupWindow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startHourOfDay = 0; + object.endHourOfDay = 0; + } + if (message.startHourOfDay != null && message.hasOwnProperty("startHourOfDay")) + object.startHourOfDay = message.startHourOfDay; + if (message.endHourOfDay != null && message.hasOwnProperty("endHourOfDay")) + object.endHourOfDay = message.endHourOfDay; + return object; + }; + + /** + * Converts this BackupWindow to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupWindow + * @instance + * @returns {Object.} JSON object + */ + BackupWindow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupWindow + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupWindow"; + }; + + return BackupWindow; + })(); + + v1.WeekDayOfMonth = (function() { + + /** + * Properties of a WeekDayOfMonth. + * @memberof google.cloud.backupdr.v1 + * @interface IWeekDayOfMonth + * @property {google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|null} [weekOfMonth] WeekDayOfMonth weekOfMonth + * @property {google.type.DayOfWeek|null} [dayOfWeek] WeekDayOfMonth dayOfWeek + */ + + /** + * Constructs a new WeekDayOfMonth. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a WeekDayOfMonth. + * @implements IWeekDayOfMonth + * @constructor + * @param {google.cloud.backupdr.v1.IWeekDayOfMonth=} [properties] Properties to set + */ + function WeekDayOfMonth(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WeekDayOfMonth weekOfMonth. + * @member {google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth} weekOfMonth + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @instance + */ + WeekDayOfMonth.prototype.weekOfMonth = 0; + + /** + * WeekDayOfMonth dayOfWeek. + * @member {google.type.DayOfWeek} dayOfWeek + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @instance + */ + WeekDayOfMonth.prototype.dayOfWeek = 0; + + /** + * Creates a new WeekDayOfMonth instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {google.cloud.backupdr.v1.IWeekDayOfMonth=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth instance + */ + WeekDayOfMonth.create = function create(properties) { + return new WeekDayOfMonth(properties); + }; + + /** + * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {google.cloud.backupdr.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeekDayOfMonth.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weekOfMonth != null && Object.hasOwnProperty.call(message, "weekOfMonth")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.weekOfMonth); + if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dayOfWeek); + return writer; + }; + + /** + * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {google.cloud.backupdr.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeekDayOfMonth.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeekDayOfMonth.decode = function 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.backupdr.v1.WeekDayOfMonth(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.weekOfMonth = reader.int32(); + break; + } + case 2: { + message.dayOfWeek = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeekDayOfMonth.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WeekDayOfMonth message. + * @function verify + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WeekDayOfMonth.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weekOfMonth != null && message.hasOwnProperty("weekOfMonth")) + switch (message.weekOfMonth) { + default: + return "weekOfMonth: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + switch (message.dayOfWeek) { + default: + return "dayOfWeek: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + return null; + }; + + /** + * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth + */ + WeekDayOfMonth.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.WeekDayOfMonth) + return object; + var message = new $root.google.cloud.backupdr.v1.WeekDayOfMonth(); + switch (object.weekOfMonth) { + default: + if (typeof object.weekOfMonth === "number") { + message.weekOfMonth = object.weekOfMonth; + break; + } + break; + case "WEEK_OF_MONTH_UNSPECIFIED": + case 0: + message.weekOfMonth = 0; + break; + case "FIRST": + case 1: + message.weekOfMonth = 1; + break; + case "SECOND": + case 2: + message.weekOfMonth = 2; + break; + case "THIRD": + case 3: + message.weekOfMonth = 3; + break; + case "FOURTH": + case 4: + message.weekOfMonth = 4; + break; + case "LAST": + case 5: + message.weekOfMonth = 5; + break; + } + switch (object.dayOfWeek) { + default: + if (typeof object.dayOfWeek === "number") { + message.dayOfWeek = object.dayOfWeek; + break; + } + break; + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.dayOfWeek = 0; + break; + case "MONDAY": + case 1: + message.dayOfWeek = 1; + break; + case "TUESDAY": + case 2: + message.dayOfWeek = 2; + break; + case "WEDNESDAY": + case 3: + message.dayOfWeek = 3; + break; + case "THURSDAY": + case 4: + message.dayOfWeek = 4; + break; + case "FRIDAY": + case 5: + message.dayOfWeek = 5; + break; + case "SATURDAY": + case 6: + message.dayOfWeek = 6; + break; + case "SUNDAY": + case 7: + message.dayOfWeek = 7; + break; + } + return message; + }; + + /** + * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {google.cloud.backupdr.v1.WeekDayOfMonth} message WeekDayOfMonth + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WeekDayOfMonth.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.weekOfMonth = options.enums === String ? "WEEK_OF_MONTH_UNSPECIFIED" : 0; + object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; + } + if (message.weekOfMonth != null && message.hasOwnProperty("weekOfMonth")) + object.weekOfMonth = options.enums === String ? $root.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth] === undefined ? message.weekOfMonth : $root.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth] : message.weekOfMonth; + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] === undefined ? message.dayOfWeek : $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; + return object; + }; + + /** + * Converts this WeekDayOfMonth to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @instance + * @returns {Object.} JSON object + */ + WeekDayOfMonth.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WeekDayOfMonth + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WeekDayOfMonth.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.WeekDayOfMonth"; + }; + + /** + * WeekOfMonth enum. + * @name google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth + * @enum {number} + * @property {number} WEEK_OF_MONTH_UNSPECIFIED=0 WEEK_OF_MONTH_UNSPECIFIED value + * @property {number} FIRST=1 FIRST value + * @property {number} SECOND=2 SECOND value + * @property {number} THIRD=3 THIRD value + * @property {number} FOURTH=4 FOURTH value + * @property {number} LAST=5 LAST value + */ + WeekDayOfMonth.WeekOfMonth = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "WEEK_OF_MONTH_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIRST"] = 1; + values[valuesById[2] = "SECOND"] = 2; + values[valuesById[3] = "THIRD"] = 3; + values[valuesById[4] = "FOURTH"] = 4; + values[valuesById[5] = "LAST"] = 5; + return values; + })(); + + return WeekDayOfMonth; + })(); + + v1.CreateBackupPlanRequest = (function() { + + /** + * Properties of a CreateBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ICreateBackupPlanRequest + * @property {string|null} [parent] CreateBackupPlanRequest parent + * @property {string|null} [backupPlanId] CreateBackupPlanRequest backupPlanId + * @property {google.cloud.backupdr.v1.IBackupPlan|null} [backupPlan] CreateBackupPlanRequest backupPlan + * @property {string|null} [requestId] CreateBackupPlanRequest requestId + */ + + /** + * Constructs a new CreateBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CreateBackupPlanRequest. + * @implements ICreateBackupPlanRequest + * @constructor + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest=} [properties] Properties to set + */ + function CreateBackupPlanRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBackupPlanRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + */ + CreateBackupPlanRequest.prototype.parent = ""; + + /** + * CreateBackupPlanRequest backupPlanId. + * @member {string} backupPlanId + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + */ + CreateBackupPlanRequest.prototype.backupPlanId = ""; + + /** + * CreateBackupPlanRequest backupPlan. + * @member {google.cloud.backupdr.v1.IBackupPlan|null|undefined} backupPlan + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + */ + CreateBackupPlanRequest.prototype.backupPlan = null; + + /** + * CreateBackupPlanRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + */ + CreateBackupPlanRequest.prototype.requestId = ""; + + /** + * Creates a new CreateBackupPlanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest instance + */ + CreateBackupPlanRequest.create = function create(properties) { + return new CreateBackupPlanRequest(properties); + }; + + /** + * Encodes the specified CreateBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} message CreateBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupPlanRequest.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.backupPlanId != null && Object.hasOwnProperty.call(message, "backupPlanId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanId); + if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) + $root.google.cloud.backupdr.v1.BackupPlan.encode(message.backupPlan, 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 CreateBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} message CreateBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBackupPlanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupPlanRequest.decode = function 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.backupdr.v1.CreateBackupPlanRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.backupPlanId = reader.string(); + break; + } + case 3: { + message.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBackupPlanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBackupPlanRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBackupPlanRequest.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.backupPlanId != null && message.hasOwnProperty("backupPlanId")) + if (!$util.isString(message.backupPlanId)) + return "backupPlanId: string expected"; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) { + var error = $root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlan); + if (error) + return "backupPlan." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest + */ + CreateBackupPlanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupPlanRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.CreateBackupPlanRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupPlanId != null) + message.backupPlanId = String(object.backupPlanId); + if (object.backupPlan != null) { + if (typeof object.backupPlan !== "object") + throw TypeError(".google.cloud.backupdr.v1.CreateBackupPlanRequest.backupPlan: object expected"); + message.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlan); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateBackupPlanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.CreateBackupPlanRequest} message CreateBackupPlanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBackupPlanRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupPlanId = ""; + object.backupPlan = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupPlanId != null && message.hasOwnProperty("backupPlanId")) + object.backupPlanId = message.backupPlanId; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + object.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlan, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateBackupPlanRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBackupPlanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateBackupPlanRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupPlanRequest"; + }; + + return CreateBackupPlanRequest; + })(); + + v1.ListBackupPlansRequest = (function() { + + /** + * Properties of a ListBackupPlansRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupPlansRequest + * @property {string|null} [parent] ListBackupPlansRequest parent + * @property {number|null} [pageSize] ListBackupPlansRequest pageSize + * @property {string|null} [pageToken] ListBackupPlansRequest pageToken + * @property {string|null} [filter] ListBackupPlansRequest filter + * @property {string|null} [orderBy] ListBackupPlansRequest orderBy + */ + + /** + * Constructs a new ListBackupPlansRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupPlansRequest. + * @implements IListBackupPlansRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest=} [properties] Properties to set + */ + function ListBackupPlansRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupPlansRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.parent = ""; + + /** + * ListBackupPlansRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.pageSize = 0; + + /** + * ListBackupPlansRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.pageToken = ""; + + /** + * ListBackupPlansRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.filter = ""; + + /** + * ListBackupPlansRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.orderBy = ""; + + /** + * Creates a new ListBackupPlansRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest instance + */ + ListBackupPlansRequest.create = function create(properties) { + return new ListBackupPlansRequest(properties); + }; + + /** + * Encodes the specified ListBackupPlansRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} message ListBackupPlansRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlansRequest.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 ListBackupPlansRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} message ListBackupPlansRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlansRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupPlansRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlansRequest.decode = function 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.backupdr.v1.ListBackupPlansRequest(); + 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 ListBackupPlansRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlansRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupPlansRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupPlansRequest.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 ListBackupPlansRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest + */ + ListBackupPlansRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlansRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupPlansRequest(); + 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 ListBackupPlansRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {google.cloud.backupdr.v1.ListBackupPlansRequest} message ListBackupPlansRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupPlansRequest.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 ListBackupPlansRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupPlansRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupPlansRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupPlansRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlansRequest"; + }; + + return ListBackupPlansRequest; + })(); + + v1.ListBackupPlansResponse = (function() { + + /** + * Properties of a ListBackupPlansResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupPlansResponse + * @property {Array.|null} [backupPlans] ListBackupPlansResponse backupPlans + * @property {string|null} [nextPageToken] ListBackupPlansResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupPlansResponse unreachable + */ + + /** + * Constructs a new ListBackupPlansResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupPlansResponse. + * @implements IListBackupPlansResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupPlansResponse=} [properties] Properties to set + */ + function ListBackupPlansResponse(properties) { + this.backupPlans = []; + 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]]; + } + + /** + * ListBackupPlansResponse backupPlans. + * @member {Array.} backupPlans + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @instance + */ + ListBackupPlansResponse.prototype.backupPlans = $util.emptyArray; + + /** + * ListBackupPlansResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @instance + */ + ListBackupPlansResponse.prototype.nextPageToken = ""; + + /** + * ListBackupPlansResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @instance + */ + ListBackupPlansResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupPlansResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse instance + */ + ListBackupPlansResponse.create = function create(properties) { + return new ListBackupPlansResponse(properties); + }; + + /** + * Encodes the specified ListBackupPlansResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansResponse} message ListBackupPlansResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlansResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPlans != null && message.backupPlans.length) + for (var i = 0; i < message.backupPlans.length; ++i) + $root.google.cloud.backupdr.v1.BackupPlan.encode(message.backupPlans[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 ListBackupPlansResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansResponse} message ListBackupPlansResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlansResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupPlansResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlansResponse.decode = function 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.backupdr.v1.ListBackupPlansResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backupPlans && message.backupPlans.length)) + message.backupPlans = []; + message.backupPlans.push($root.google.cloud.backupdr.v1.BackupPlan.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 ListBackupPlansResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlansResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupPlansResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupPlansResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupPlans != null && message.hasOwnProperty("backupPlans")) { + if (!Array.isArray(message.backupPlans)) + return "backupPlans: array expected"; + for (var i = 0; i < message.backupPlans.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlans[i]); + if (error) + return "backupPlans." + 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 ListBackupPlansResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse + */ + ListBackupPlansResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlansResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupPlansResponse(); + if (object.backupPlans) { + if (!Array.isArray(object.backupPlans)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.backupPlans: array expected"); + message.backupPlans = []; + for (var i = 0; i < object.backupPlans.length; ++i) { + if (typeof object.backupPlans[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.backupPlans: object expected"); + message.backupPlans[i] = $root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlans[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.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 ListBackupPlansResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {google.cloud.backupdr.v1.ListBackupPlansResponse} message ListBackupPlansResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupPlansResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupPlans = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backupPlans && message.backupPlans.length) { + object.backupPlans = []; + for (var j = 0; j < message.backupPlans.length; ++j) + object.backupPlans[j] = $root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlans[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 ListBackupPlansResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupPlansResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupPlansResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupPlansResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlansResponse"; + }; + + return ListBackupPlansResponse; + })(); + + v1.GetBackupPlanRequest = (function() { + + /** + * Properties of a GetBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetBackupPlanRequest + * @property {string|null} [name] GetBackupPlanRequest name + */ + + /** + * Constructs a new GetBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetBackupPlanRequest. + * @implements IGetBackupPlanRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest=} [properties] Properties to set + */ + function GetBackupPlanRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupPlanRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @instance + */ + GetBackupPlanRequest.prototype.name = ""; + + /** + * Creates a new GetBackupPlanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest instance + */ + GetBackupPlanRequest.create = function create(properties) { + return new GetBackupPlanRequest(properties); + }; + + /** + * Encodes the specified GetBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} message GetBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupPlanRequest.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 GetBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} message GetBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupPlanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupPlanRequest.decode = function 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.backupdr.v1.GetBackupPlanRequest(); + 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 GetBackupPlanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupPlanRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupPlanRequest.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 GetBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest + */ + GetBackupPlanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetBackupPlanRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetBackupPlanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.GetBackupPlanRequest} message GetBackupPlanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupPlanRequest.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 GetBackupPlanRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupPlanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupPlanRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupPlanRequest"; + }; + + return GetBackupPlanRequest; + })(); + + v1.DeleteBackupPlanRequest = (function() { + + /** + * Properties of a DeleteBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IDeleteBackupPlanRequest + * @property {string|null} [name] DeleteBackupPlanRequest name + * @property {string|null} [requestId] DeleteBackupPlanRequest requestId + */ + + /** + * Constructs a new DeleteBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DeleteBackupPlanRequest. + * @implements IDeleteBackupPlanRequest + * @constructor + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest=} [properties] Properties to set + */ + function DeleteBackupPlanRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupPlanRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @instance + */ + DeleteBackupPlanRequest.prototype.name = ""; + + /** + * DeleteBackupPlanRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @instance + */ + DeleteBackupPlanRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteBackupPlanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest instance + */ + DeleteBackupPlanRequest.create = function create(properties) { + return new DeleteBackupPlanRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} message DeleteBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupPlanRequest.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 DeleteBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} message DeleteBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupPlanRequest.decode = function 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.backupdr.v1.DeleteBackupPlanRequest(); + 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 DeleteBackupPlanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupPlanRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupPlanRequest.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 DeleteBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest + */ + DeleteBackupPlanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest(); + 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 DeleteBackupPlanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.DeleteBackupPlanRequest} message DeleteBackupPlanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupPlanRequest.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 DeleteBackupPlanRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupPlanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupPlanRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupPlanRequest"; + }; + + return DeleteBackupPlanRequest; + })(); + + v1.BackupPlanAssociation = (function() { + + /** + * Properties of a BackupPlanAssociation. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupPlanAssociation + * @property {string|null} [name] BackupPlanAssociation name + * @property {string|null} [resourceType] BackupPlanAssociation resourceType + * @property {string|null} [resource] BackupPlanAssociation resource + * @property {string|null} [backupPlan] BackupPlanAssociation backupPlan + * @property {google.protobuf.ITimestamp|null} [createTime] BackupPlanAssociation createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] BackupPlanAssociation updateTime + * @property {google.cloud.backupdr.v1.BackupPlanAssociation.State|null} [state] BackupPlanAssociation state + * @property {Array.|null} [rulesConfigInfo] BackupPlanAssociation rulesConfigInfo + * @property {string|null} [dataSource] BackupPlanAssociation dataSource + */ + + /** + * Constructs a new BackupPlanAssociation. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupPlanAssociation. + * @implements IBackupPlanAssociation + * @constructor + * @param {google.cloud.backupdr.v1.IBackupPlanAssociation=} [properties] Properties to set + */ + function BackupPlanAssociation(properties) { + this.rulesConfigInfo = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupPlanAssociation name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.name = ""; + + /** + * BackupPlanAssociation resourceType. + * @member {string} resourceType + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.resourceType = ""; + + /** + * BackupPlanAssociation resource. + * @member {string} resource + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.resource = ""; + + /** + * BackupPlanAssociation backupPlan. + * @member {string} backupPlan + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.backupPlan = ""; + + /** + * BackupPlanAssociation createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.createTime = null; + + /** + * BackupPlanAssociation updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.updateTime = null; + + /** + * BackupPlanAssociation state. + * @member {google.cloud.backupdr.v1.BackupPlanAssociation.State} state + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.state = 0; + + /** + * BackupPlanAssociation rulesConfigInfo. + * @member {Array.} rulesConfigInfo + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.rulesConfigInfo = $util.emptyArray; + + /** + * BackupPlanAssociation dataSource. + * @member {string} dataSource + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.dataSource = ""; + + /** + * Creates a new BackupPlanAssociation instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {google.cloud.backupdr.v1.IBackupPlanAssociation=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation instance + */ + BackupPlanAssociation.create = function create(properties) { + return new BackupPlanAssociation(properties); + }; + + /** + * Encodes the specified BackupPlanAssociation message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {google.cloud.backupdr.v1.IBackupPlanAssociation} message BackupPlanAssociation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupPlanAssociation.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.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceType); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); + if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.backupPlan); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.rulesConfigInfo != null && message.rulesConfigInfo.length) + for (var i = 0; i < message.rulesConfigInfo.length; ++i) + $root.google.cloud.backupdr.v1.RuleConfigInfo.encode(message.rulesConfigInfo[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.dataSource); + return writer; + }; + + /** + * Encodes the specified BackupPlanAssociation message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {google.cloud.backupdr.v1.IBackupPlanAssociation} message BackupPlanAssociation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupPlanAssociation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupPlanAssociation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupPlanAssociation.decode = function 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.backupdr.v1.BackupPlanAssociation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.resourceType = reader.string(); + break; + } + case 3: { + message.resource = reader.string(); + break; + } + case 4: { + message.backupPlan = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 8: { + if (!(message.rulesConfigInfo && message.rulesConfigInfo.length)) + message.rulesConfigInfo = []; + message.rulesConfigInfo.push($root.google.cloud.backupdr.v1.RuleConfigInfo.decode(reader, reader.uint32())); + break; + } + case 9: { + message.dataSource = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupPlanAssociation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupPlanAssociation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupPlanAssociation message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupPlanAssociation.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.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + if (!$util.isString(message.backupPlan)) + return "backupPlan: 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.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.rulesConfigInfo != null && message.hasOwnProperty("rulesConfigInfo")) { + if (!Array.isArray(message.rulesConfigInfo)) + return "rulesConfigInfo: array expected"; + for (var i = 0; i < message.rulesConfigInfo.length; ++i) { + var error = $root.google.cloud.backupdr.v1.RuleConfigInfo.verify(message.rulesConfigInfo[i]); + if (error) + return "rulesConfigInfo." + error; + } + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + return null; + }; + + /** + * Creates a BackupPlanAssociation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation + */ + BackupPlanAssociation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupPlanAssociation) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupPlanAssociation(); + if (object.name != null) + message.name = String(object.name); + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.resource != null) + message.resource = String(object.resource); + if (object.backupPlan != null) + message.backupPlan = String(object.backupPlan); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.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.backupdr.v1.BackupPlanAssociation.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + 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 "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "INACTIVE": + case 4: + message.state = 4; + break; + } + if (object.rulesConfigInfo) { + if (!Array.isArray(object.rulesConfigInfo)) + throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.rulesConfigInfo: array expected"); + message.rulesConfigInfo = []; + for (var i = 0; i < object.rulesConfigInfo.length; ++i) { + if (typeof object.rulesConfigInfo[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.rulesConfigInfo: object expected"); + message.rulesConfigInfo[i] = $root.google.cloud.backupdr.v1.RuleConfigInfo.fromObject(object.rulesConfigInfo[i]); + } + } + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + return message; + }; + + /** + * Creates a plain object from a BackupPlanAssociation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {google.cloud.backupdr.v1.BackupPlanAssociation} message BackupPlanAssociation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupPlanAssociation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rulesConfigInfo = []; + if (options.defaults) { + object.name = ""; + object.resourceType = ""; + object.resource = ""; + object.backupPlan = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.dataSource = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + object.backupPlan = message.backupPlan; + 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.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupPlanAssociation.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupPlanAssociation.State[message.state] : message.state; + if (message.rulesConfigInfo && message.rulesConfigInfo.length) { + object.rulesConfigInfo = []; + for (var j = 0; j < message.rulesConfigInfo.length; ++j) + object.rulesConfigInfo[j] = $root.google.cloud.backupdr.v1.RuleConfigInfo.toObject(message.rulesConfigInfo[j], options); + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + return object; + }; + + /** + * Converts this BackupPlanAssociation to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + * @returns {Object.} JSON object + */ + BackupPlanAssociation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupPlanAssociation + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupPlanAssociation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupPlanAssociation"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.BackupPlanAssociation.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} INACTIVE=4 INACTIVE value + */ + BackupPlanAssociation.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "INACTIVE"] = 4; + return values; + })(); + + return BackupPlanAssociation; + })(); + + v1.RuleConfigInfo = (function() { + + /** + * Properties of a RuleConfigInfo. + * @memberof google.cloud.backupdr.v1 + * @interface IRuleConfigInfo + * @property {string|null} [ruleId] RuleConfigInfo ruleId + * @property {google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|null} [lastBackupState] RuleConfigInfo lastBackupState + * @property {google.rpc.IStatus|null} [lastBackupError] RuleConfigInfo lastBackupError + * @property {google.protobuf.ITimestamp|null} [lastSuccessfulBackupConsistencyTime] RuleConfigInfo lastSuccessfulBackupConsistencyTime + */ + + /** + * Constructs a new RuleConfigInfo. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a RuleConfigInfo. + * @implements IRuleConfigInfo + * @constructor + * @param {google.cloud.backupdr.v1.IRuleConfigInfo=} [properties] Properties to set + */ + function RuleConfigInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RuleConfigInfo ruleId. + * @member {string} ruleId + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + */ + RuleConfigInfo.prototype.ruleId = ""; + + /** + * RuleConfigInfo lastBackupState. + * @member {google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState} lastBackupState + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + */ + RuleConfigInfo.prototype.lastBackupState = 0; + + /** + * RuleConfigInfo lastBackupError. + * @member {google.rpc.IStatus|null|undefined} lastBackupError + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + */ + RuleConfigInfo.prototype.lastBackupError = null; + + /** + * RuleConfigInfo lastSuccessfulBackupConsistencyTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastSuccessfulBackupConsistencyTime + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + */ + RuleConfigInfo.prototype.lastSuccessfulBackupConsistencyTime = null; + + /** + * Creates a new RuleConfigInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IRuleConfigInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo instance + */ + RuleConfigInfo.create = function create(properties) { + return new RuleConfigInfo(properties); + }; + + /** + * Encodes the specified RuleConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IRuleConfigInfo} message RuleConfigInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RuleConfigInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ruleId); + if (message.lastBackupState != null && Object.hasOwnProperty.call(message, "lastBackupState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.lastBackupState); + if (message.lastBackupError != null && Object.hasOwnProperty.call(message, "lastBackupError")) + $root.google.rpc.Status.encode(message.lastBackupError, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.lastSuccessfulBackupConsistencyTime != null && Object.hasOwnProperty.call(message, "lastSuccessfulBackupConsistencyTime")) + $root.google.protobuf.Timestamp.encode(message.lastSuccessfulBackupConsistencyTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RuleConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IRuleConfigInfo} message RuleConfigInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RuleConfigInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RuleConfigInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RuleConfigInfo.decode = function 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.backupdr.v1.RuleConfigInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ruleId = reader.string(); + break; + } + case 3: { + message.lastBackupState = reader.int32(); + break; + } + case 4: { + message.lastBackupError = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RuleConfigInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RuleConfigInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RuleConfigInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RuleConfigInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + if (!$util.isString(message.ruleId)) + return "ruleId: string expected"; + if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) + switch (message.lastBackupState) { + default: + return "lastBackupState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) { + var error = $root.google.rpc.Status.verify(message.lastBackupError); + if (error) + return "lastBackupError." + error; + } + if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime); + if (error) + return "lastSuccessfulBackupConsistencyTime." + error; + } + return null; + }; + + /** + * Creates a RuleConfigInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo + */ + RuleConfigInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RuleConfigInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.RuleConfigInfo(); + if (object.ruleId != null) + message.ruleId = String(object.ruleId); + switch (object.lastBackupState) { + default: + if (typeof object.lastBackupState === "number") { + message.lastBackupState = object.lastBackupState; + break; + } + break; + case "LAST_BACKUP_STATE_UNSPECIFIED": + case 0: + message.lastBackupState = 0; + break; + case "FIRST_BACKUP_PENDING": + case 1: + message.lastBackupState = 1; + break; + case "PERMISSION_DENIED": + case 2: + message.lastBackupState = 2; + break; + case "SUCCEEDED": + case 3: + message.lastBackupState = 3; + break; + case "FAILED": + case 4: + message.lastBackupState = 4; + break; + } + if (object.lastBackupError != null) { + if (typeof object.lastBackupError !== "object") + throw TypeError(".google.cloud.backupdr.v1.RuleConfigInfo.lastBackupError: object expected"); + message.lastBackupError = $root.google.rpc.Status.fromObject(object.lastBackupError); + } + if (object.lastSuccessfulBackupConsistencyTime != null) { + if (typeof object.lastSuccessfulBackupConsistencyTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.RuleConfigInfo.lastSuccessfulBackupConsistencyTime: object expected"); + message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime); + } + return message; + }; + + /** + * Creates a plain object from a RuleConfigInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {google.cloud.backupdr.v1.RuleConfigInfo} message RuleConfigInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RuleConfigInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.ruleId = ""; + object.lastBackupState = options.enums === String ? "LAST_BACKUP_STATE_UNSPECIFIED" : 0; + object.lastBackupError = null; + object.lastSuccessfulBackupConsistencyTime = null; + } + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + object.ruleId = message.ruleId; + if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) + object.lastBackupState = options.enums === String ? $root.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState[message.lastBackupState] === undefined ? message.lastBackupState : $root.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState[message.lastBackupState] : message.lastBackupState; + if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) + object.lastBackupError = $root.google.rpc.Status.toObject(message.lastBackupError, options); + if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) + object.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime, options); + return object; + }; + + /** + * Converts this RuleConfigInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + * @returns {Object.} JSON object + */ + RuleConfigInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RuleConfigInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RuleConfigInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.RuleConfigInfo"; + }; + + /** + * LastBackupState enum. + * @name google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState + * @enum {number} + * @property {number} LAST_BACKUP_STATE_UNSPECIFIED=0 LAST_BACKUP_STATE_UNSPECIFIED value + * @property {number} FIRST_BACKUP_PENDING=1 FIRST_BACKUP_PENDING value + * @property {number} PERMISSION_DENIED=2 PERMISSION_DENIED value + * @property {number} SUCCEEDED=3 SUCCEEDED value + * @property {number} FAILED=4 FAILED value + */ + RuleConfigInfo.LastBackupState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAST_BACKUP_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIRST_BACKUP_PENDING"] = 1; + values[valuesById[2] = "PERMISSION_DENIED"] = 2; + values[valuesById[3] = "SUCCEEDED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + return values; + })(); + + return RuleConfigInfo; + })(); + + v1.CreateBackupPlanAssociationRequest = (function() { + + /** + * Properties of a CreateBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ICreateBackupPlanAssociationRequest + * @property {string|null} [parent] CreateBackupPlanAssociationRequest parent + * @property {string|null} [backupPlanAssociationId] CreateBackupPlanAssociationRequest backupPlanAssociationId + * @property {google.cloud.backupdr.v1.IBackupPlanAssociation|null} [backupPlanAssociation] CreateBackupPlanAssociationRequest backupPlanAssociation + * @property {string|null} [requestId] CreateBackupPlanAssociationRequest requestId + */ + + /** + * Constructs a new CreateBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CreateBackupPlanAssociationRequest. + * @implements ICreateBackupPlanAssociationRequest + * @constructor + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest=} [properties] Properties to set + */ + function CreateBackupPlanAssociationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBackupPlanAssociationRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + */ + CreateBackupPlanAssociationRequest.prototype.parent = ""; + + /** + * CreateBackupPlanAssociationRequest backupPlanAssociationId. + * @member {string} backupPlanAssociationId + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + */ + CreateBackupPlanAssociationRequest.prototype.backupPlanAssociationId = ""; + + /** + * CreateBackupPlanAssociationRequest backupPlanAssociation. + * @member {google.cloud.backupdr.v1.IBackupPlanAssociation|null|undefined} backupPlanAssociation + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + */ + CreateBackupPlanAssociationRequest.prototype.backupPlanAssociation = null; + + /** + * CreateBackupPlanAssociationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + */ + CreateBackupPlanAssociationRequest.prototype.requestId = ""; + + /** + * Creates a new CreateBackupPlanAssociationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest instance + */ + CreateBackupPlanAssociationRequest.create = function create(properties) { + return new CreateBackupPlanAssociationRequest(properties); + }; + + /** + * Encodes the specified CreateBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupPlanAssociationRequest.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.backupPlanAssociationId != null && Object.hasOwnProperty.call(message, "backupPlanAssociationId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanAssociationId); + if (message.backupPlanAssociation != null && Object.hasOwnProperty.call(message, "backupPlanAssociation")) + $root.google.cloud.backupdr.v1.BackupPlanAssociation.encode(message.backupPlanAssociation, 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 CreateBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupPlanAssociationRequest.decode = function 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.backupdr.v1.CreateBackupPlanAssociationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.backupPlanAssociationId = reader.string(); + break; + } + case 3: { + message.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBackupPlanAssociationRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBackupPlanAssociationRequest.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.backupPlanAssociationId != null && message.hasOwnProperty("backupPlanAssociationId")) + if (!$util.isString(message.backupPlanAssociationId)) + return "backupPlanAssociationId: string expected"; + if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) { + var error = $root.google.cloud.backupdr.v1.BackupPlanAssociation.verify(message.backupPlanAssociation); + if (error) + return "backupPlanAssociation." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest + */ + CreateBackupPlanAssociationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupPlanAssociationId != null) + message.backupPlanAssociationId = String(object.backupPlanAssociationId); + if (object.backupPlanAssociation != null) { + if (typeof object.backupPlanAssociation !== "object") + throw TypeError(".google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.backupPlanAssociation: object expected"); + message.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.fromObject(object.backupPlanAssociation); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBackupPlanAssociationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupPlanAssociationId = ""; + object.backupPlanAssociation = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupPlanAssociationId != null && message.hasOwnProperty("backupPlanAssociationId")) + object.backupPlanAssociationId = message.backupPlanAssociationId; + if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) + object.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.toObject(message.backupPlanAssociation, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateBackupPlanAssociationRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateBackupPlanAssociationRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest"; + }; + + return CreateBackupPlanAssociationRequest; + })(); + + v1.ListBackupPlanAssociationsRequest = (function() { + + /** + * Properties of a ListBackupPlanAssociationsRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupPlanAssociationsRequest + * @property {string|null} [parent] ListBackupPlanAssociationsRequest parent + * @property {number|null} [pageSize] ListBackupPlanAssociationsRequest pageSize + * @property {string|null} [pageToken] ListBackupPlanAssociationsRequest pageToken + * @property {string|null} [filter] ListBackupPlanAssociationsRequest filter + */ + + /** + * Constructs a new ListBackupPlanAssociationsRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupPlanAssociationsRequest. + * @implements IListBackupPlanAssociationsRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest=} [properties] Properties to set + */ + function ListBackupPlanAssociationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupPlanAssociationsRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + */ + ListBackupPlanAssociationsRequest.prototype.parent = ""; + + /** + * ListBackupPlanAssociationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + */ + ListBackupPlanAssociationsRequest.prototype.pageSize = 0; + + /** + * ListBackupPlanAssociationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + */ + ListBackupPlanAssociationsRequest.prototype.pageToken = ""; + + /** + * ListBackupPlanAssociationsRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + */ + ListBackupPlanAssociationsRequest.prototype.filter = ""; + + /** + * Creates a new ListBackupPlanAssociationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest instance + */ + ListBackupPlanAssociationsRequest.create = function create(properties) { + return new ListBackupPlanAssociationsRequest(properties); + }; + + /** + * Encodes the specified ListBackupPlanAssociationsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlanAssociationsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListBackupPlanAssociationsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlanAssociationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlanAssociationsRequest.decode = function 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.backupdr.v1.ListBackupPlanAssociationsRequest(); + 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlanAssociationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupPlanAssociationsRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupPlanAssociationsRequest.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"; + return null; + }; + + /** + * Creates a ListBackupPlanAssociationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest + */ + ListBackupPlanAssociationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest(); + 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); + return message; + }; + + /** + * Creates a plain object from a ListBackupPlanAssociationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupPlanAssociationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + 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; + return object; + }; + + /** + * Converts this ListBackupPlanAssociationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupPlanAssociationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupPlanAssociationsRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupPlanAssociationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest"; + }; + + return ListBackupPlanAssociationsRequest; + })(); + + v1.ListBackupPlanAssociationsResponse = (function() { + + /** + * Properties of a ListBackupPlanAssociationsResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupPlanAssociationsResponse + * @property {Array.|null} [backupPlanAssociations] ListBackupPlanAssociationsResponse backupPlanAssociations + * @property {string|null} [nextPageToken] ListBackupPlanAssociationsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupPlanAssociationsResponse unreachable + */ + + /** + * Constructs a new ListBackupPlanAssociationsResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupPlanAssociationsResponse. + * @implements IListBackupPlanAssociationsResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse=} [properties] Properties to set + */ + function ListBackupPlanAssociationsResponse(properties) { + this.backupPlanAssociations = []; + 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]]; + } + + /** + * ListBackupPlanAssociationsResponse backupPlanAssociations. + * @member {Array.} backupPlanAssociations + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @instance + */ + ListBackupPlanAssociationsResponse.prototype.backupPlanAssociations = $util.emptyArray; + + /** + * ListBackupPlanAssociationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @instance + */ + ListBackupPlanAssociationsResponse.prototype.nextPageToken = ""; + + /** + * ListBackupPlanAssociationsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @instance + */ + ListBackupPlanAssociationsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupPlanAssociationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse instance + */ + ListBackupPlanAssociationsResponse.create = function create(properties) { + return new ListBackupPlanAssociationsResponse(properties); + }; + + /** + * Encodes the specified ListBackupPlanAssociationsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlanAssociationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPlanAssociations != null && message.backupPlanAssociations.length) + for (var i = 0; i < message.backupPlanAssociations.length; ++i) + $root.google.cloud.backupdr.v1.BackupPlanAssociation.encode(message.backupPlanAssociations[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 ListBackupPlanAssociationsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlanAssociationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlanAssociationsResponse.decode = function 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.backupdr.v1.ListBackupPlanAssociationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backupPlanAssociations && message.backupPlanAssociations.length)) + message.backupPlanAssociations = []; + message.backupPlanAssociations.push($root.google.cloud.backupdr.v1.BackupPlanAssociation.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 ListBackupPlanAssociationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlanAssociationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupPlanAssociationsResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupPlanAssociationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupPlanAssociations != null && message.hasOwnProperty("backupPlanAssociations")) { + if (!Array.isArray(message.backupPlanAssociations)) + return "backupPlanAssociations: array expected"; + for (var i = 0; i < message.backupPlanAssociations.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupPlanAssociation.verify(message.backupPlanAssociations[i]); + if (error) + return "backupPlanAssociations." + 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 ListBackupPlanAssociationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse + */ + ListBackupPlanAssociationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse(); + if (object.backupPlanAssociations) { + if (!Array.isArray(object.backupPlanAssociations)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.backupPlanAssociations: array expected"); + message.backupPlanAssociations = []; + for (var i = 0; i < object.backupPlanAssociations.length; ++i) { + if (typeof object.backupPlanAssociations[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.backupPlanAssociations: object expected"); + message.backupPlanAssociations[i] = $root.google.cloud.backupdr.v1.BackupPlanAssociation.fromObject(object.backupPlanAssociations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.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 ListBackupPlanAssociationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupPlanAssociationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupPlanAssociations = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backupPlanAssociations && message.backupPlanAssociations.length) { + object.backupPlanAssociations = []; + for (var j = 0; j < message.backupPlanAssociations.length; ++j) + object.backupPlanAssociations[j] = $root.google.cloud.backupdr.v1.BackupPlanAssociation.toObject(message.backupPlanAssociations[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 ListBackupPlanAssociationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupPlanAssociationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupPlanAssociationsResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupPlanAssociationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse"; + }; + + return ListBackupPlanAssociationsResponse; + })(); + + v1.GetBackupPlanAssociationRequest = (function() { + + /** + * Properties of a GetBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetBackupPlanAssociationRequest + * @property {string|null} [name] GetBackupPlanAssociationRequest name + */ + + /** + * Constructs a new GetBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetBackupPlanAssociationRequest. + * @implements IGetBackupPlanAssociationRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest=} [properties] Properties to set + */ + function GetBackupPlanAssociationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupPlanAssociationRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @instance + */ + GetBackupPlanAssociationRequest.prototype.name = ""; + + /** + * Creates a new GetBackupPlanAssociationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest instance + */ + GetBackupPlanAssociationRequest.create = function create(properties) { + return new GetBackupPlanAssociationRequest(properties); + }; + + /** + * Encodes the specified GetBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupPlanAssociationRequest.decode = function 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.backupdr.v1.GetBackupPlanAssociationRequest(); + 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 GetBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupPlanAssociationRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest + */ + GetBackupPlanAssociationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupPlanAssociationRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupPlanAssociationRequest"; + }; + + return GetBackupPlanAssociationRequest; + })(); + + v1.DeleteBackupPlanAssociationRequest = (function() { + + /** + * Properties of a DeleteBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IDeleteBackupPlanAssociationRequest + * @property {string|null} [name] DeleteBackupPlanAssociationRequest name + * @property {string|null} [requestId] DeleteBackupPlanAssociationRequest requestId + */ + + /** + * Constructs a new DeleteBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DeleteBackupPlanAssociationRequest. + * @implements IDeleteBackupPlanAssociationRequest + * @constructor + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest=} [properties] Properties to set + */ + function DeleteBackupPlanAssociationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupPlanAssociationRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @instance + */ + DeleteBackupPlanAssociationRequest.prototype.name = ""; + + /** + * DeleteBackupPlanAssociationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @instance + */ + DeleteBackupPlanAssociationRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteBackupPlanAssociationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest instance + */ + DeleteBackupPlanAssociationRequest.create = function create(properties) { + return new DeleteBackupPlanAssociationRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupPlanAssociationRequest.decode = function 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.backupdr.v1.DeleteBackupPlanAssociationRequest(); + 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 DeleteBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupPlanAssociationRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest + */ + DeleteBackupPlanAssociationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest(); + 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 DeleteBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupPlanAssociationRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest"; + }; + + return DeleteBackupPlanAssociationRequest; + })(); + + v1.TriggerBackupRequest = (function() { + + /** + * Properties of a TriggerBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ITriggerBackupRequest + * @property {string|null} [name] TriggerBackupRequest name + * @property {string|null} [ruleId] TriggerBackupRequest ruleId + * @property {string|null} [requestId] TriggerBackupRequest requestId + */ + + /** + * Constructs a new TriggerBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a TriggerBackupRequest. + * @implements ITriggerBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest=} [properties] Properties to set + */ + function TriggerBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TriggerBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @instance + */ + TriggerBackupRequest.prototype.name = ""; + + /** + * TriggerBackupRequest ruleId. + * @member {string} ruleId + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @instance + */ + TriggerBackupRequest.prototype.ruleId = ""; + + /** + * TriggerBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @instance + */ + TriggerBackupRequest.prototype.requestId = ""; + + /** + * Creates a new TriggerBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest instance + */ + TriggerBackupRequest.create = function create(properties) { + return new TriggerBackupRequest(properties); + }; + + /** + * Encodes the specified TriggerBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} message TriggerBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerBackupRequest.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.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ruleId); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified TriggerBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} message TriggerBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TriggerBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerBackupRequest.decode = function 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.backupdr.v1.TriggerBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.ruleId = reader.string(); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TriggerBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TriggerBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TriggerBackupRequest.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.ruleId != null && message.hasOwnProperty("ruleId")) + if (!$util.isString(message.ruleId)) + return "ruleId: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a TriggerBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest + */ + TriggerBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.TriggerBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.TriggerBackupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.ruleId != null) + message.ruleId = String(object.ruleId); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a TriggerBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {google.cloud.backupdr.v1.TriggerBackupRequest} message TriggerBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TriggerBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.ruleId = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + object.ruleId = message.ruleId; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this TriggerBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @instance + * @returns {Object.} JSON object + */ + TriggerBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TriggerBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TriggerBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.TriggerBackupRequest"; + }; + + return TriggerBackupRequest; + })(); + + v1.BackupVault = (function() { + + /** + * Properties of a BackupVault. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupVault + * @property {string|null} [name] BackupVault name + * @property {string|null} [description] BackupVault description + * @property {Object.|null} [labels] BackupVault labels + * @property {google.protobuf.ITimestamp|null} [createTime] BackupVault createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] BackupVault updateTime + * @property {google.protobuf.IDuration|null} [backupMinimumEnforcedRetentionDuration] BackupVault backupMinimumEnforcedRetentionDuration + * @property {boolean|null} [deletable] BackupVault deletable + * @property {string|null} [etag] BackupVault etag + * @property {google.cloud.backupdr.v1.BackupVault.State|null} [state] BackupVault state + * @property {google.protobuf.ITimestamp|null} [effectiveTime] BackupVault effectiveTime + * @property {number|Long|null} [backupCount] BackupVault backupCount + * @property {string|null} [serviceAccount] BackupVault serviceAccount + * @property {number|Long|null} [totalStoredBytes] BackupVault totalStoredBytes + * @property {string|null} [uid] BackupVault uid + * @property {Object.|null} [annotations] BackupVault annotations + * @property {google.cloud.backupdr.v1.BackupVault.AccessRestriction|null} [accessRestriction] BackupVault accessRestriction + */ + + /** + * Constructs a new BackupVault. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupVault. + * @implements IBackupVault + * @constructor + * @param {google.cloud.backupdr.v1.IBackupVault=} [properties] Properties to set + */ + function BackupVault(properties) { + this.labels = {}; + this.annotations = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupVault name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.name = ""; + + /** + * BackupVault description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.description = null; + + /** + * BackupVault labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.labels = $util.emptyObject; + + /** + * BackupVault createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.createTime = null; + + /** + * BackupVault updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.updateTime = null; + + /** + * BackupVault backupMinimumEnforcedRetentionDuration. + * @member {google.protobuf.IDuration|null|undefined} backupMinimumEnforcedRetentionDuration + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.backupMinimumEnforcedRetentionDuration = null; + + /** + * BackupVault deletable. + * @member {boolean|null|undefined} deletable + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.deletable = null; + + /** + * BackupVault etag. + * @member {string|null|undefined} etag + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.etag = null; + + /** + * BackupVault state. + * @member {google.cloud.backupdr.v1.BackupVault.State} state + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.state = 0; + + /** + * BackupVault effectiveTime. + * @member {google.protobuf.ITimestamp|null|undefined} effectiveTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.effectiveTime = null; + + /** + * BackupVault backupCount. + * @member {number|Long} backupCount + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.backupCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupVault serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.serviceAccount = ""; + + /** + * BackupVault totalStoredBytes. + * @member {number|Long} totalStoredBytes + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.totalStoredBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupVault uid. + * @member {string} uid + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.uid = ""; + + /** + * BackupVault annotations. + * @member {Object.} annotations + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.annotations = $util.emptyObject; + + /** + * BackupVault accessRestriction. + * @member {google.cloud.backupdr.v1.BackupVault.AccessRestriction} accessRestriction + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.accessRestriction = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupVault _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _createTime. + * @member {"createTime"|undefined} _createTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_createTime", { + get: $util.oneOfGetter($oneOfFields = ["createTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _updateTime. + * @member {"updateTime"|undefined} _updateTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _backupMinimumEnforcedRetentionDuration. + * @member {"backupMinimumEnforcedRetentionDuration"|undefined} _backupMinimumEnforcedRetentionDuration + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_backupMinimumEnforcedRetentionDuration", { + get: $util.oneOfGetter($oneOfFields = ["backupMinimumEnforcedRetentionDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _deletable. + * @member {"deletable"|undefined} _deletable + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_deletable", { + get: $util.oneOfGetter($oneOfFields = ["deletable"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _etag. + * @member {"etag"|undefined} _etag + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_etag", { + get: $util.oneOfGetter($oneOfFields = ["etag"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _effectiveTime. + * @member {"effectiveTime"|undefined} _effectiveTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_effectiveTime", { + get: $util.oneOfGetter($oneOfFields = ["effectiveTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupVault instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {google.cloud.backupdr.v1.IBackupVault=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault instance + */ + BackupVault.create = function create(properties) { + return new BackupVault(properties); + }; + + /** + * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {google.cloud.backupdr.v1.IBackupVault} message BackupVault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupVault.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + 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 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.deletable != null && Object.hasOwnProperty.call(message, "deletable")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.deletable); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.etag); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); + if (message.effectiveTime != null && Object.hasOwnProperty.call(message, "effectiveTime")) + $root.google.protobuf.Timestamp.encode(message.effectiveTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.backupCount != null && Object.hasOwnProperty.call(message, "backupCount")) + writer.uint32(/* id 17, wireType 0 =*/136).int64(message.backupCount); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.serviceAccount); + if (message.totalStoredBytes != null && Object.hasOwnProperty.call(message, "totalStoredBytes")) + writer.uint32(/* id 19, wireType 0 =*/152).int64(message.totalStoredBytes); + if (message.backupMinimumEnforcedRetentionDuration != null && Object.hasOwnProperty.call(message, "backupMinimumEnforcedRetentionDuration")) + $root.google.protobuf.Duration.encode(message.backupMinimumEnforcedRetentionDuration, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.uid); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.accessRestriction != null && Object.hasOwnProperty.call(message, "accessRestriction")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.accessRestriction); + return writer; + }; + + /** + * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {google.cloud.backupdr.v1.IBackupVault} message BackupVault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupVault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupVault message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupVault.decode = function 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.backupdr.v1.BackupVault(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + 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 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 20: { + message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 8: { + message.deletable = reader.bool(); + break; + } + case 9: { + message.etag = reader.string(); + break; + } + case 10: { + message.state = reader.int32(); + break; + } + case 12: { + message.effectiveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 17: { + message.backupCount = reader.int64(); + break; + } + case 18: { + message.serviceAccount = reader.string(); + break; + } + case 19: { + message.totalStoredBytes = reader.int64(); + break; + } + case 21: { + message.uid = reader.string(); + break; + } + case 22: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + 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.annotations[key] = value; + break; + } + case 24: { + message.accessRestriction = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupVault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupVault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupVault message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupVault.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.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + properties._createTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + } + if (message.backupMinimumEnforcedRetentionDuration != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDuration")) { + properties._backupMinimumEnforcedRetentionDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.backupMinimumEnforcedRetentionDuration); + if (error) + return "backupMinimumEnforcedRetentionDuration." + error; + } + } + if (message.deletable != null && message.hasOwnProperty("deletable")) { + properties._deletable = 1; + if (typeof message.deletable !== "boolean") + return "deletable: boolean expected"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + properties._etag = 1; + if (!$util.isString(message.etag)) + return "etag: 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.effectiveTime != null && message.hasOwnProperty("effectiveTime")) { + properties._effectiveTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.effectiveTime); + if (error) + return "effectiveTime." + error; + } + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) + if (!$util.isInteger(message.backupCount) && !(message.backupCount && $util.isInteger(message.backupCount.low) && $util.isInteger(message.backupCount.high))) + return "backupCount: integer|Long expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) + if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) + return "totalStoredBytes: integer|Long expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) + switch (message.accessRestriction) { + default: + return "accessRestriction: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault + */ + BackupVault.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupVault) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupVault(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.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.backupdr.v1.BackupVault.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.backupMinimumEnforcedRetentionDuration != null) { + if (typeof object.backupMinimumEnforcedRetentionDuration !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.backupMinimumEnforcedRetentionDuration: object expected"); + message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.fromObject(object.backupMinimumEnforcedRetentionDuration); + } + if (object.deletable != null) + message.deletable = Boolean(object.deletable); + if (object.etag != null) + message.etag = String(object.etag); + 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 "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.effectiveTime != null) { + if (typeof object.effectiveTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.effectiveTime: object expected"); + message.effectiveTime = $root.google.protobuf.Timestamp.fromObject(object.effectiveTime); + } + if (object.backupCount != null) + if ($util.Long) + (message.backupCount = $util.Long.fromValue(object.backupCount)).unsigned = false; + else if (typeof object.backupCount === "string") + message.backupCount = parseInt(object.backupCount, 10); + else if (typeof object.backupCount === "number") + message.backupCount = object.backupCount; + else if (typeof object.backupCount === "object") + message.backupCount = new $util.LongBits(object.backupCount.low >>> 0, object.backupCount.high >>> 0).toNumber(); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.totalStoredBytes != null) + if ($util.Long) + (message.totalStoredBytes = $util.Long.fromValue(object.totalStoredBytes)).unsigned = false; + else if (typeof object.totalStoredBytes === "string") + message.totalStoredBytes = parseInt(object.totalStoredBytes, 10); + else if (typeof object.totalStoredBytes === "number") + message.totalStoredBytes = object.totalStoredBytes; + else if (typeof object.totalStoredBytes === "object") + message.totalStoredBytes = new $util.LongBits(object.totalStoredBytes.low >>> 0, object.totalStoredBytes.high >>> 0).toNumber(); + if (object.uid != null) + message.uid = String(object.uid); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + switch (object.accessRestriction) { + default: + if (typeof object.accessRestriction === "number") { + message.accessRestriction = object.accessRestriction; + break; + } + break; + case "ACCESS_RESTRICTION_UNSPECIFIED": + case 0: + message.accessRestriction = 0; + break; + case "WITHIN_PROJECT": + case 1: + message.accessRestriction = 1; + break; + case "WITHIN_ORGANIZATION": + case 2: + message.accessRestriction = 2; + break; + case "UNRESTRICTED": + case 3: + message.accessRestriction = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a BackupVault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {google.cloud.backupdr.v1.BackupVault} message BackupVault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupVault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.labels = {}; + object.annotations = {}; + } + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.backupCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.backupCount = options.longs === String ? "0" : 0; + object.serviceAccount = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalStoredBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalStoredBytes = options.longs === String ? "0" : 0; + object.uid = ""; + object.accessRestriction = options.enums === String ? "ACCESS_RESTRICTION_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + 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.createTime != null && message.hasOwnProperty("createTime")) { + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (options.oneofs) + object._createTime = "createTime"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + if (message.deletable != null && message.hasOwnProperty("deletable")) { + object.deletable = message.deletable; + if (options.oneofs) + object._deletable = "deletable"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + object.etag = message.etag; + if (options.oneofs) + object._etag = "etag"; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupVault.State[message.state] : message.state; + if (message.effectiveTime != null && message.hasOwnProperty("effectiveTime")) { + object.effectiveTime = $root.google.protobuf.Timestamp.toObject(message.effectiveTime, options); + if (options.oneofs) + object._effectiveTime = "effectiveTime"; + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) + if (typeof message.backupCount === "number") + object.backupCount = options.longs === String ? String(message.backupCount) : message.backupCount; + else + object.backupCount = options.longs === String ? $util.Long.prototype.toString.call(message.backupCount) : options.longs === Number ? new $util.LongBits(message.backupCount.low >>> 0, message.backupCount.high >>> 0).toNumber() : message.backupCount; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) + if (typeof message.totalStoredBytes === "number") + object.totalStoredBytes = options.longs === String ? String(message.totalStoredBytes) : message.totalStoredBytes; + else + object.totalStoredBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStoredBytes) : options.longs === Number ? new $util.LongBits(message.totalStoredBytes.low >>> 0, message.totalStoredBytes.high >>> 0).toNumber() : message.totalStoredBytes; + if (message.backupMinimumEnforcedRetentionDuration != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDuration")) { + object.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.toObject(message.backupMinimumEnforcedRetentionDuration, options); + if (options.oneofs) + object._backupMinimumEnforcedRetentionDuration = "backupMinimumEnforcedRetentionDuration"; + } + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) + object.accessRestriction = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] === undefined ? message.accessRestriction : $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] : message.accessRestriction; + return object; + }; + + /** + * Converts this BackupVault to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + * @returns {Object.} JSON object + */ + BackupVault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupVault + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupVault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupVault"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.BackupVault.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} ERROR=4 ERROR value + */ + BackupVault.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + /** + * AccessRestriction enum. + * @name google.cloud.backupdr.v1.BackupVault.AccessRestriction + * @enum {number} + * @property {number} ACCESS_RESTRICTION_UNSPECIFIED=0 ACCESS_RESTRICTION_UNSPECIFIED value + * @property {number} WITHIN_PROJECT=1 WITHIN_PROJECT value + * @property {number} WITHIN_ORGANIZATION=2 WITHIN_ORGANIZATION value + * @property {number} UNRESTRICTED=3 UNRESTRICTED value + */ + BackupVault.AccessRestriction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_RESTRICTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "WITHIN_PROJECT"] = 1; + values[valuesById[2] = "WITHIN_ORGANIZATION"] = 2; + values[valuesById[3] = "UNRESTRICTED"] = 3; + return values; + })(); + + return BackupVault; + })(); + + v1.DataSource = (function() { + + /** + * Properties of a DataSource. + * @memberof google.cloud.backupdr.v1 + * @interface IDataSource + * @property {string|null} [name] DataSource name + * @property {google.cloud.backupdr.v1.DataSource.State|null} [state] DataSource state + * @property {Object.|null} [labels] DataSource labels + * @property {google.protobuf.ITimestamp|null} [createTime] DataSource createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DataSource updateTime + * @property {number|Long|null} [backupCount] DataSource backupCount + * @property {string|null} [etag] DataSource etag + * @property {number|Long|null} [totalStoredBytes] DataSource totalStoredBytes + * @property {google.cloud.backupdr.v1.BackupConfigState|null} [configState] DataSource configState + * @property {google.cloud.backupdr.v1.IBackupConfigInfo|null} [backupConfigInfo] DataSource backupConfigInfo + * @property {google.cloud.backupdr.v1.IDataSourceGcpResource|null} [dataSourceGcpResource] DataSource dataSourceGcpResource + * @property {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null} [dataSourceBackupApplianceApplication] DataSource dataSourceBackupApplianceApplication + */ + + /** + * Constructs a new DataSource. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DataSource. + * @implements IDataSource + * @constructor + * @param {google.cloud.backupdr.v1.IDataSource=} [properties] Properties to set + */ + function DataSource(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]]; + } + + /** + * DataSource name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.name = ""; + + /** + * DataSource state. + * @member {google.cloud.backupdr.v1.DataSource.State} state + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.state = 0; + + /** + * DataSource labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.labels = $util.emptyObject; + + /** + * DataSource createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.createTime = null; + + /** + * DataSource updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.updateTime = null; + + /** + * DataSource backupCount. + * @member {number|Long|null|undefined} backupCount + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.backupCount = null; + + /** + * DataSource etag. + * @member {string|null|undefined} etag + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.etag = null; + + /** + * DataSource totalStoredBytes. + * @member {number|Long|null|undefined} totalStoredBytes + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.totalStoredBytes = null; + + /** + * DataSource configState. + * @member {google.cloud.backupdr.v1.BackupConfigState} configState + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.configState = 0; + + /** + * DataSource backupConfigInfo. + * @member {google.cloud.backupdr.v1.IBackupConfigInfo|null|undefined} backupConfigInfo + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.backupConfigInfo = null; + + /** + * DataSource dataSourceGcpResource. + * @member {google.cloud.backupdr.v1.IDataSourceGcpResource|null|undefined} dataSourceGcpResource + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.dataSourceGcpResource = null; + + /** + * DataSource dataSourceBackupApplianceApplication. + * @member {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null|undefined} dataSourceBackupApplianceApplication + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.dataSourceBackupApplianceApplication = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataSource _createTime. + * @member {"createTime"|undefined} _createTime + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_createTime", { + get: $util.oneOfGetter($oneOfFields = ["createTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource _updateTime. + * @member {"updateTime"|undefined} _updateTime + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource _backupCount. + * @member {"backupCount"|undefined} _backupCount + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_backupCount", { + get: $util.oneOfGetter($oneOfFields = ["backupCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource _etag. + * @member {"etag"|undefined} _etag + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_etag", { + get: $util.oneOfGetter($oneOfFields = ["etag"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource _totalStoredBytes. + * @member {"totalStoredBytes"|undefined} _totalStoredBytes + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_totalStoredBytes", { + get: $util.oneOfGetter($oneOfFields = ["totalStoredBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource sourceResource. + * @member {"dataSourceGcpResource"|"dataSourceBackupApplianceApplication"|undefined} sourceResource + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "sourceResource", { + get: $util.oneOfGetter($oneOfFields = ["dataSourceGcpResource", "dataSourceBackupApplianceApplication"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataSource instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {google.cloud.backupdr.v1.IDataSource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DataSource} DataSource instance + */ + DataSource.create = function create(properties) { + return new DataSource(properties); + }; + + /** + * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {google.cloud.backupdr.v1.IDataSource} message DataSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.labels != null && 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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.backupCount != null && Object.hasOwnProperty.call(message, "backupCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.backupCount); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.etag); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.state); + if (message.totalStoredBytes != null && Object.hasOwnProperty.call(message, "totalStoredBytes")) + writer.uint32(/* id 23, wireType 0 =*/184).int64(message.totalStoredBytes); + if (message.configState != null && Object.hasOwnProperty.call(message, "configState")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.configState); + if (message.backupConfigInfo != null && Object.hasOwnProperty.call(message, "backupConfigInfo")) + $root.google.cloud.backupdr.v1.BackupConfigInfo.encode(message.backupConfigInfo, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dataSourceGcpResource != null && Object.hasOwnProperty.call(message, "dataSourceGcpResource")) + $root.google.cloud.backupdr.v1.DataSourceGcpResource.encode(message.dataSourceGcpResource, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.dataSourceBackupApplianceApplication != null && Object.hasOwnProperty.call(message, "dataSourceBackupApplianceApplication")) + $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.encode(message.dataSourceBackupApplianceApplication, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {google.cloud.backupdr.v1.IDataSource} message DataSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DataSource} DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSource.decode = function 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.backupdr.v1.DataSource(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 21: { + message.state = reader.int32(); + 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.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.backupCount = reader.int64(); + break; + } + case 14: { + message.etag = reader.string(); + break; + } + case 23: { + message.totalStoredBytes = reader.int64(); + break; + } + case 24: { + message.configState = reader.int32(); + break; + } + case 25: { + message.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.decode(reader, reader.uint32()); + break; + } + case 27: { + message.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DataSource} DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSource message. + * @function verify + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSource.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.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.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.createTime != null && message.hasOwnProperty("createTime")) { + properties._createTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) { + properties._backupCount = 1; + if (!$util.isInteger(message.backupCount) && !(message.backupCount && $util.isInteger(message.backupCount.low) && $util.isInteger(message.backupCount.high))) + return "backupCount: integer|Long expected"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + properties._etag = 1; + if (!$util.isString(message.etag)) + return "etag: string expected"; + } + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { + properties._totalStoredBytes = 1; + if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) + return "totalStoredBytes: integer|Long expected"; + } + if (message.configState != null && message.hasOwnProperty("configState")) + switch (message.configState) { + default: + return "configState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.backupConfigInfo != null && message.hasOwnProperty("backupConfigInfo")) { + var error = $root.google.cloud.backupdr.v1.BackupConfigInfo.verify(message.backupConfigInfo); + if (error) + return "backupConfigInfo." + error; + } + if (message.dataSourceGcpResource != null && message.hasOwnProperty("dataSourceGcpResource")) { + properties.sourceResource = 1; + { + var error = $root.google.cloud.backupdr.v1.DataSourceGcpResource.verify(message.dataSourceGcpResource); + if (error) + return "dataSourceGcpResource." + error; + } + } + if (message.dataSourceBackupApplianceApplication != null && message.hasOwnProperty("dataSourceBackupApplianceApplication")) { + if (properties.sourceResource === 1) + return "sourceResource: multiple values"; + properties.sourceResource = 1; + { + var error = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify(message.dataSourceBackupApplianceApplication); + if (error) + return "dataSourceBackupApplianceApplication." + error; + } + } + return null; + }; + + /** + * Creates a DataSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DataSource} DataSource + */ + DataSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DataSource) + return object; + var message = new $root.google.cloud.backupdr.v1.DataSource(); + if (object.name != null) + message.name = String(object.name); + 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 "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.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.backupdr.v1.DataSource.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.backupCount != null) + if ($util.Long) + (message.backupCount = $util.Long.fromValue(object.backupCount)).unsigned = false; + else if (typeof object.backupCount === "string") + message.backupCount = parseInt(object.backupCount, 10); + else if (typeof object.backupCount === "number") + message.backupCount = object.backupCount; + else if (typeof object.backupCount === "object") + message.backupCount = new $util.LongBits(object.backupCount.low >>> 0, object.backupCount.high >>> 0).toNumber(); + if (object.etag != null) + message.etag = String(object.etag); + if (object.totalStoredBytes != null) + if ($util.Long) + (message.totalStoredBytes = $util.Long.fromValue(object.totalStoredBytes)).unsigned = false; + else if (typeof object.totalStoredBytes === "string") + message.totalStoredBytes = parseInt(object.totalStoredBytes, 10); + else if (typeof object.totalStoredBytes === "number") + message.totalStoredBytes = object.totalStoredBytes; + else if (typeof object.totalStoredBytes === "object") + message.totalStoredBytes = new $util.LongBits(object.totalStoredBytes.low >>> 0, object.totalStoredBytes.high >>> 0).toNumber(); + switch (object.configState) { + default: + if (typeof object.configState === "number") { + message.configState = object.configState; + break; + } + break; + case "BACKUP_CONFIG_STATE_UNSPECIFIED": + case 0: + message.configState = 0; + break; + case "ACTIVE": + case 1: + message.configState = 1; + break; + case "PASSIVE": + case 2: + message.configState = 2; + break; + } + if (object.backupConfigInfo != null) { + if (typeof object.backupConfigInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.backupConfigInfo: object expected"); + message.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.fromObject(object.backupConfigInfo); + } + if (object.dataSourceGcpResource != null) { + if (typeof object.dataSourceGcpResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.dataSourceGcpResource: object expected"); + message.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.fromObject(object.dataSourceGcpResource); + } + if (object.dataSourceBackupApplianceApplication != null) { + if (typeof object.dataSourceBackupApplianceApplication !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.dataSourceBackupApplianceApplication: object expected"); + message.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.fromObject(object.dataSourceBackupApplianceApplication); + } + return message; + }; + + /** + * Creates a plain object from a DataSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {google.cloud.backupdr.v1.DataSource} message DataSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.configState = options.enums === String ? "BACKUP_CONFIG_STATE_UNSPECIFIED" : 0; + object.backupConfigInfo = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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.createTime != null && message.hasOwnProperty("createTime")) { + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (options.oneofs) + object._createTime = "createTime"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) { + if (typeof message.backupCount === "number") + object.backupCount = options.longs === String ? String(message.backupCount) : message.backupCount; + else + object.backupCount = options.longs === String ? $util.Long.prototype.toString.call(message.backupCount) : options.longs === Number ? new $util.LongBits(message.backupCount.low >>> 0, message.backupCount.high >>> 0).toNumber() : message.backupCount; + if (options.oneofs) + object._backupCount = "backupCount"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + object.etag = message.etag; + if (options.oneofs) + object._etag = "etag"; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.DataSource.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.DataSource.State[message.state] : message.state; + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { + if (typeof message.totalStoredBytes === "number") + object.totalStoredBytes = options.longs === String ? String(message.totalStoredBytes) : message.totalStoredBytes; + else + object.totalStoredBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStoredBytes) : options.longs === Number ? new $util.LongBits(message.totalStoredBytes.low >>> 0, message.totalStoredBytes.high >>> 0).toNumber() : message.totalStoredBytes; + if (options.oneofs) + object._totalStoredBytes = "totalStoredBytes"; + } + if (message.configState != null && message.hasOwnProperty("configState")) + object.configState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigState[message.configState] === undefined ? message.configState : $root.google.cloud.backupdr.v1.BackupConfigState[message.configState] : message.configState; + if (message.backupConfigInfo != null && message.hasOwnProperty("backupConfigInfo")) + object.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.toObject(message.backupConfigInfo, options); + if (message.dataSourceGcpResource != null && message.hasOwnProperty("dataSourceGcpResource")) { + object.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.toObject(message.dataSourceGcpResource, options); + if (options.oneofs) + object.sourceResource = "dataSourceGcpResource"; + } + if (message.dataSourceBackupApplianceApplication != null && message.hasOwnProperty("dataSourceBackupApplianceApplication")) { + object.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.toObject(message.dataSourceBackupApplianceApplication, options); + if (options.oneofs) + object.sourceResource = "dataSourceBackupApplianceApplication"; + } + return object; + }; + + /** + * Converts this DataSource to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + * @returns {Object.} JSON object + */ + DataSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataSource + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSource"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.DataSource.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} ERROR=4 ERROR value + */ + DataSource.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + return DataSource; + })(); + + v1.BackupConfigInfo = (function() { + + /** + * Properties of a BackupConfigInfo. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupConfigInfo + * @property {google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|null} [lastBackupState] BackupConfigInfo lastBackupState + * @property {google.protobuf.ITimestamp|null} [lastSuccessfulBackupConsistencyTime] BackupConfigInfo lastSuccessfulBackupConsistencyTime + * @property {google.rpc.IStatus|null} [lastBackupError] BackupConfigInfo lastBackupError + * @property {google.cloud.backupdr.v1.IGcpBackupConfig|null} [gcpBackupConfig] BackupConfigInfo gcpBackupConfig + * @property {google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null} [backupApplianceBackupConfig] BackupConfigInfo backupApplianceBackupConfig + */ + + /** + * Constructs a new BackupConfigInfo. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupConfigInfo. + * @implements IBackupConfigInfo + * @constructor + * @param {google.cloud.backupdr.v1.IBackupConfigInfo=} [properties] Properties to set + */ + function BackupConfigInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupConfigInfo lastBackupState. + * @member {google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState} lastBackupState + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.lastBackupState = 0; + + /** + * BackupConfigInfo lastSuccessfulBackupConsistencyTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastSuccessfulBackupConsistencyTime + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.lastSuccessfulBackupConsistencyTime = null; + + /** + * BackupConfigInfo lastBackupError. + * @member {google.rpc.IStatus|null|undefined} lastBackupError + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.lastBackupError = null; + + /** + * BackupConfigInfo gcpBackupConfig. + * @member {google.cloud.backupdr.v1.IGcpBackupConfig|null|undefined} gcpBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.gcpBackupConfig = null; + + /** + * BackupConfigInfo backupApplianceBackupConfig. + * @member {google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null|undefined} backupApplianceBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.backupApplianceBackupConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupConfigInfo backupConfig. + * @member {"gcpBackupConfig"|"backupApplianceBackupConfig"|undefined} backupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + Object.defineProperty(BackupConfigInfo.prototype, "backupConfig", { + get: $util.oneOfGetter($oneOfFields = ["gcpBackupConfig", "backupApplianceBackupConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupConfigInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupConfigInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo instance + */ + BackupConfigInfo.create = function create(properties) { + return new BackupConfigInfo(properties); + }; + + /** + * Encodes the specified BackupConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupConfigInfo} message BackupConfigInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupConfigInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lastBackupState != null && Object.hasOwnProperty.call(message, "lastBackupState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.lastBackupState); + if (message.lastSuccessfulBackupConsistencyTime != null && Object.hasOwnProperty.call(message, "lastSuccessfulBackupConsistencyTime")) + $root.google.protobuf.Timestamp.encode(message.lastSuccessfulBackupConsistencyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.lastBackupError != null && Object.hasOwnProperty.call(message, "lastBackupError")) + $root.google.rpc.Status.encode(message.lastBackupError, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.gcpBackupConfig != null && Object.hasOwnProperty.call(message, "gcpBackupConfig")) + $root.google.cloud.backupdr.v1.GcpBackupConfig.encode(message.gcpBackupConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.backupApplianceBackupConfig != null && Object.hasOwnProperty.call(message, "backupApplianceBackupConfig")) + $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.encode(message.backupApplianceBackupConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BackupConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupConfigInfo} message BackupConfigInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupConfigInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupConfigInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupConfigInfo.decode = function 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.backupdr.v1.BackupConfigInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.lastBackupState = reader.int32(); + break; + } + case 2: { + message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.lastBackupError = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 4: { + message.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupConfigInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupConfigInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupConfigInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupConfigInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) + switch (message.lastBackupState) { + default: + return "lastBackupState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime); + if (error) + return "lastSuccessfulBackupConsistencyTime." + error; + } + if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) { + var error = $root.google.rpc.Status.verify(message.lastBackupError); + if (error) + return "lastBackupError." + error; + } + if (message.gcpBackupConfig != null && message.hasOwnProperty("gcpBackupConfig")) { + properties.backupConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.GcpBackupConfig.verify(message.gcpBackupConfig); + if (error) + return "gcpBackupConfig." + error; + } + } + if (message.backupApplianceBackupConfig != null && message.hasOwnProperty("backupApplianceBackupConfig")) { + if (properties.backupConfig === 1) + return "backupConfig: multiple values"; + properties.backupConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify(message.backupApplianceBackupConfig); + if (error) + return "backupApplianceBackupConfig." + error; + } + } + return null; + }; + + /** + * Creates a BackupConfigInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo + */ + BackupConfigInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupConfigInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupConfigInfo(); + switch (object.lastBackupState) { + default: + if (typeof object.lastBackupState === "number") { + message.lastBackupState = object.lastBackupState; + break; + } + break; + case "LAST_BACKUP_STATE_UNSPECIFIED": + case 0: + message.lastBackupState = 0; + break; + case "FIRST_BACKUP_PENDING": + case 1: + message.lastBackupState = 1; + break; + case "SUCCEEDED": + case 2: + message.lastBackupState = 2; + break; + case "FAILED": + case 3: + message.lastBackupState = 3; + break; + case "PERMISSION_DENIED": + case 4: + message.lastBackupState = 4; + break; + } + if (object.lastSuccessfulBackupConsistencyTime != null) { + if (typeof object.lastSuccessfulBackupConsistencyTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.lastSuccessfulBackupConsistencyTime: object expected"); + message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime); + } + if (object.lastBackupError != null) { + if (typeof object.lastBackupError !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.lastBackupError: object expected"); + message.lastBackupError = $root.google.rpc.Status.fromObject(object.lastBackupError); + } + if (object.gcpBackupConfig != null) { + if (typeof object.gcpBackupConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.gcpBackupConfig: object expected"); + message.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.fromObject(object.gcpBackupConfig); + } + if (object.backupApplianceBackupConfig != null) { + if (typeof object.backupApplianceBackupConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.backupApplianceBackupConfig: object expected"); + message.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.fromObject(object.backupApplianceBackupConfig); + } + return message; + }; + + /** + * Creates a plain object from a BackupConfigInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {google.cloud.backupdr.v1.BackupConfigInfo} message BackupConfigInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupConfigInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lastBackupState = options.enums === String ? "LAST_BACKUP_STATE_UNSPECIFIED" : 0; + object.lastSuccessfulBackupConsistencyTime = null; + object.lastBackupError = null; + } + if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) + object.lastBackupState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState[message.lastBackupState] === undefined ? message.lastBackupState : $root.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState[message.lastBackupState] : message.lastBackupState; + if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) + object.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime, options); + if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) + object.lastBackupError = $root.google.rpc.Status.toObject(message.lastBackupError, options); + if (message.gcpBackupConfig != null && message.hasOwnProperty("gcpBackupConfig")) { + object.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.toObject(message.gcpBackupConfig, options); + if (options.oneofs) + object.backupConfig = "gcpBackupConfig"; + } + if (message.backupApplianceBackupConfig != null && message.hasOwnProperty("backupApplianceBackupConfig")) { + object.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.toObject(message.backupApplianceBackupConfig, options); + if (options.oneofs) + object.backupConfig = "backupApplianceBackupConfig"; + } + return object; + }; + + /** + * Converts this BackupConfigInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + * @returns {Object.} JSON object + */ + BackupConfigInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupConfigInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupConfigInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupConfigInfo"; + }; + + /** + * LastBackupState enum. + * @name google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState + * @enum {number} + * @property {number} LAST_BACKUP_STATE_UNSPECIFIED=0 LAST_BACKUP_STATE_UNSPECIFIED value + * @property {number} FIRST_BACKUP_PENDING=1 FIRST_BACKUP_PENDING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + * @property {number} PERMISSION_DENIED=4 PERMISSION_DENIED value + */ + BackupConfigInfo.LastBackupState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAST_BACKUP_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIRST_BACKUP_PENDING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "PERMISSION_DENIED"] = 4; + return values; + })(); + + return BackupConfigInfo; + })(); + + v1.GcpBackupConfig = (function() { + + /** + * Properties of a GcpBackupConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IGcpBackupConfig + * @property {string|null} [backupPlan] GcpBackupConfig backupPlan + * @property {string|null} [backupPlanDescription] GcpBackupConfig backupPlanDescription + * @property {string|null} [backupPlanAssociation] GcpBackupConfig backupPlanAssociation + * @property {Array.|null} [backupPlanRules] GcpBackupConfig backupPlanRules + */ + + /** + * Constructs a new GcpBackupConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GcpBackupConfig. + * @implements IGcpBackupConfig + * @constructor + * @param {google.cloud.backupdr.v1.IGcpBackupConfig=} [properties] Properties to set + */ + function GcpBackupConfig(properties) { + this.backupPlanRules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcpBackupConfig backupPlan. + * @member {string} backupPlan + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + */ + GcpBackupConfig.prototype.backupPlan = ""; + + /** + * GcpBackupConfig backupPlanDescription. + * @member {string} backupPlanDescription + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + */ + GcpBackupConfig.prototype.backupPlanDescription = ""; + + /** + * GcpBackupConfig backupPlanAssociation. + * @member {string} backupPlanAssociation + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + */ + GcpBackupConfig.prototype.backupPlanAssociation = ""; + + /** + * GcpBackupConfig backupPlanRules. + * @member {Array.} backupPlanRules + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + */ + GcpBackupConfig.prototype.backupPlanRules = $util.emptyArray; + + /** + * Creates a new GcpBackupConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IGcpBackupConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig instance + */ + GcpBackupConfig.create = function create(properties) { + return new GcpBackupConfig(properties); + }; + + /** + * Encodes the specified GcpBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IGcpBackupConfig} message GcpBackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpBackupConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPlan); + if (message.backupPlanDescription != null && Object.hasOwnProperty.call(message, "backupPlanDescription")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanDescription); + if (message.backupPlanAssociation != null && Object.hasOwnProperty.call(message, "backupPlanAssociation")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.backupPlanAssociation); + if (message.backupPlanRules != null && message.backupPlanRules.length) + for (var i = 0; i < message.backupPlanRules.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.backupPlanRules[i]); + return writer; + }; + + /** + * Encodes the specified GcpBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IGcpBackupConfig} message GcpBackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpBackupConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcpBackupConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpBackupConfig.decode = function 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.backupdr.v1.GcpBackupConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backupPlan = reader.string(); + break; + } + case 2: { + message.backupPlanDescription = reader.string(); + break; + } + case 3: { + message.backupPlanAssociation = reader.string(); + break; + } + case 4: { + if (!(message.backupPlanRules && message.backupPlanRules.length)) + message.backupPlanRules = []; + message.backupPlanRules.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcpBackupConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpBackupConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcpBackupConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcpBackupConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + if (!$util.isString(message.backupPlan)) + return "backupPlan: string expected"; + if (message.backupPlanDescription != null && message.hasOwnProperty("backupPlanDescription")) + if (!$util.isString(message.backupPlanDescription)) + return "backupPlanDescription: string expected"; + if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) + if (!$util.isString(message.backupPlanAssociation)) + return "backupPlanAssociation: string expected"; + if (message.backupPlanRules != null && message.hasOwnProperty("backupPlanRules")) { + if (!Array.isArray(message.backupPlanRules)) + return "backupPlanRules: array expected"; + for (var i = 0; i < message.backupPlanRules.length; ++i) + if (!$util.isString(message.backupPlanRules[i])) + return "backupPlanRules: string[] expected"; + } + return null; + }; + + /** + * Creates a GcpBackupConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig + */ + GcpBackupConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GcpBackupConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.GcpBackupConfig(); + if (object.backupPlan != null) + message.backupPlan = String(object.backupPlan); + if (object.backupPlanDescription != null) + message.backupPlanDescription = String(object.backupPlanDescription); + if (object.backupPlanAssociation != null) + message.backupPlanAssociation = String(object.backupPlanAssociation); + if (object.backupPlanRules) { + if (!Array.isArray(object.backupPlanRules)) + throw TypeError(".google.cloud.backupdr.v1.GcpBackupConfig.backupPlanRules: array expected"); + message.backupPlanRules = []; + for (var i = 0; i < object.backupPlanRules.length; ++i) + message.backupPlanRules[i] = String(object.backupPlanRules[i]); + } + return message; + }; + + /** + * Creates a plain object from a GcpBackupConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {google.cloud.backupdr.v1.GcpBackupConfig} message GcpBackupConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcpBackupConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.backupPlanRules = []; + if (options.defaults) { + object.backupPlan = ""; + object.backupPlanDescription = ""; + object.backupPlanAssociation = ""; + } + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + object.backupPlan = message.backupPlan; + if (message.backupPlanDescription != null && message.hasOwnProperty("backupPlanDescription")) + object.backupPlanDescription = message.backupPlanDescription; + if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) + object.backupPlanAssociation = message.backupPlanAssociation; + if (message.backupPlanRules && message.backupPlanRules.length) { + object.backupPlanRules = []; + for (var j = 0; j < message.backupPlanRules.length; ++j) + object.backupPlanRules[j] = message.backupPlanRules[j]; + } + return object; + }; + + /** + * Converts this GcpBackupConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + * @returns {Object.} JSON object + */ + GcpBackupConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcpBackupConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcpBackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpBackupConfig"; + }; + + return GcpBackupConfig; + })(); + + v1.BackupApplianceBackupConfig = (function() { + + /** + * Properties of a BackupApplianceBackupConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupApplianceBackupConfig + * @property {string|null} [backupApplianceName] BackupApplianceBackupConfig backupApplianceName + * @property {number|Long|null} [backupApplianceId] BackupApplianceBackupConfig backupApplianceId + * @property {number|Long|null} [slaId] BackupApplianceBackupConfig slaId + * @property {string|null} [applicationName] BackupApplianceBackupConfig applicationName + * @property {string|null} [hostName] BackupApplianceBackupConfig hostName + * @property {string|null} [sltName] BackupApplianceBackupConfig sltName + * @property {string|null} [slpName] BackupApplianceBackupConfig slpName + */ + + /** + * Constructs a new BackupApplianceBackupConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupApplianceBackupConfig. + * @implements IBackupApplianceBackupConfig + * @constructor + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig=} [properties] Properties to set + */ + function BackupApplianceBackupConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupApplianceBackupConfig backupApplianceName. + * @member {string} backupApplianceName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.backupApplianceName = ""; + + /** + * BackupApplianceBackupConfig backupApplianceId. + * @member {number|Long} backupApplianceId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.backupApplianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupApplianceBackupConfig slaId. + * @member {number|Long} slaId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.slaId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupApplianceBackupConfig applicationName. + * @member {string} applicationName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.applicationName = ""; + + /** + * BackupApplianceBackupConfig hostName. + * @member {string} hostName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.hostName = ""; + + /** + * BackupApplianceBackupConfig sltName. + * @member {string} sltName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.sltName = ""; + + /** + * BackupApplianceBackupConfig slpName. + * @member {string} slpName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.slpName = ""; + + /** + * Creates a new BackupApplianceBackupConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig instance + */ + BackupApplianceBackupConfig.create = function create(properties) { + return new BackupApplianceBackupConfig(properties); + }; + + /** + * Encodes the specified BackupApplianceBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig} message BackupApplianceBackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceBackupConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupApplianceName != null && Object.hasOwnProperty.call(message, "backupApplianceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupApplianceName); + if (message.backupApplianceId != null && Object.hasOwnProperty.call(message, "backupApplianceId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.backupApplianceId); + if (message.slaId != null && Object.hasOwnProperty.call(message, "slaId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.slaId); + if (message.applicationName != null && Object.hasOwnProperty.call(message, "applicationName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.applicationName); + if (message.hostName != null && Object.hasOwnProperty.call(message, "hostName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.hostName); + if (message.sltName != null && Object.hasOwnProperty.call(message, "sltName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sltName); + if (message.slpName != null && Object.hasOwnProperty.call(message, "slpName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.slpName); + return writer; + }; + + /** + * Encodes the specified BackupApplianceBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig} message BackupApplianceBackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceBackupConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceBackupConfig.decode = function 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.backupdr.v1.BackupApplianceBackupConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backupApplianceName = reader.string(); + break; + } + case 2: { + message.backupApplianceId = reader.int64(); + break; + } + case 3: { + message.slaId = reader.int64(); + break; + } + case 4: { + message.applicationName = reader.string(); + break; + } + case 5: { + message.hostName = reader.string(); + break; + } + case 6: { + message.sltName = reader.string(); + break; + } + case 7: { + message.slpName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceBackupConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupApplianceBackupConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupApplianceBackupConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + if (!$util.isString(message.backupApplianceName)) + return "backupApplianceName: string expected"; + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (!$util.isInteger(message.backupApplianceId) && !(message.backupApplianceId && $util.isInteger(message.backupApplianceId.low) && $util.isInteger(message.backupApplianceId.high))) + return "backupApplianceId: integer|Long expected"; + if (message.slaId != null && message.hasOwnProperty("slaId")) + if (!$util.isInteger(message.slaId) && !(message.slaId && $util.isInteger(message.slaId.low) && $util.isInteger(message.slaId.high))) + return "slaId: integer|Long expected"; + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + if (!$util.isString(message.applicationName)) + return "applicationName: string expected"; + if (message.hostName != null && message.hasOwnProperty("hostName")) + if (!$util.isString(message.hostName)) + return "hostName: string expected"; + if (message.sltName != null && message.hasOwnProperty("sltName")) + if (!$util.isString(message.sltName)) + return "sltName: string expected"; + if (message.slpName != null && message.hasOwnProperty("slpName")) + if (!$util.isString(message.slpName)) + return "slpName: string expected"; + return null; + }; + + /** + * Creates a BackupApplianceBackupConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig + */ + BackupApplianceBackupConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig(); + if (object.backupApplianceName != null) + message.backupApplianceName = String(object.backupApplianceName); + if (object.backupApplianceId != null) + if ($util.Long) + (message.backupApplianceId = $util.Long.fromValue(object.backupApplianceId)).unsigned = false; + else if (typeof object.backupApplianceId === "string") + message.backupApplianceId = parseInt(object.backupApplianceId, 10); + else if (typeof object.backupApplianceId === "number") + message.backupApplianceId = object.backupApplianceId; + else if (typeof object.backupApplianceId === "object") + message.backupApplianceId = new $util.LongBits(object.backupApplianceId.low >>> 0, object.backupApplianceId.high >>> 0).toNumber(); + if (object.slaId != null) + if ($util.Long) + (message.slaId = $util.Long.fromValue(object.slaId)).unsigned = false; + else if (typeof object.slaId === "string") + message.slaId = parseInt(object.slaId, 10); + else if (typeof object.slaId === "number") + message.slaId = object.slaId; + else if (typeof object.slaId === "object") + message.slaId = new $util.LongBits(object.slaId.low >>> 0, object.slaId.high >>> 0).toNumber(); + if (object.applicationName != null) + message.applicationName = String(object.applicationName); + if (object.hostName != null) + message.hostName = String(object.hostName); + if (object.sltName != null) + message.sltName = String(object.sltName); + if (object.slpName != null) + message.slpName = String(object.slpName); + return message; + }; + + /** + * Creates a plain object from a BackupApplianceBackupConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {google.cloud.backupdr.v1.BackupApplianceBackupConfig} message BackupApplianceBackupConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupApplianceBackupConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.backupApplianceName = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.backupApplianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.backupApplianceId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.slaId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.slaId = options.longs === String ? "0" : 0; + object.applicationName = ""; + object.hostName = ""; + object.sltName = ""; + object.slpName = ""; + } + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + object.backupApplianceName = message.backupApplianceName; + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (typeof message.backupApplianceId === "number") + object.backupApplianceId = options.longs === String ? String(message.backupApplianceId) : message.backupApplianceId; + else + object.backupApplianceId = options.longs === String ? $util.Long.prototype.toString.call(message.backupApplianceId) : options.longs === Number ? new $util.LongBits(message.backupApplianceId.low >>> 0, message.backupApplianceId.high >>> 0).toNumber() : message.backupApplianceId; + if (message.slaId != null && message.hasOwnProperty("slaId")) + if (typeof message.slaId === "number") + object.slaId = options.longs === String ? String(message.slaId) : message.slaId; + else + object.slaId = options.longs === String ? $util.Long.prototype.toString.call(message.slaId) : options.longs === Number ? new $util.LongBits(message.slaId.low >>> 0, message.slaId.high >>> 0).toNumber() : message.slaId; + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + object.applicationName = message.applicationName; + if (message.hostName != null && message.hasOwnProperty("hostName")) + object.hostName = message.hostName; + if (message.sltName != null && message.hasOwnProperty("sltName")) + object.sltName = message.sltName; + if (message.slpName != null && message.hasOwnProperty("slpName")) + object.slpName = message.slpName; + return object; + }; + + /** + * Converts this BackupApplianceBackupConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + * @returns {Object.} JSON object + */ + BackupApplianceBackupConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupApplianceBackupConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupApplianceBackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceBackupConfig"; + }; + + return BackupApplianceBackupConfig; + })(); + + v1.DataSourceGcpResource = (function() { + + /** + * Properties of a DataSourceGcpResource. + * @memberof google.cloud.backupdr.v1 + * @interface IDataSourceGcpResource + * @property {string|null} [gcpResourcename] DataSourceGcpResource gcpResourcename + * @property {string|null} [location] DataSourceGcpResource location + * @property {string|null} [type] DataSourceGcpResource type + * @property {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null} [computeInstanceDatasourceProperties] DataSourceGcpResource computeInstanceDatasourceProperties + */ + + /** + * Constructs a new DataSourceGcpResource. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DataSourceGcpResource. + * @implements IDataSourceGcpResource + * @constructor + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource=} [properties] Properties to set + */ + function DataSourceGcpResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataSourceGcpResource gcpResourcename. + * @member {string} gcpResourcename + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + DataSourceGcpResource.prototype.gcpResourcename = ""; + + /** + * DataSourceGcpResource location. + * @member {string} location + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + DataSourceGcpResource.prototype.location = ""; + + /** + * DataSourceGcpResource type. + * @member {string} type + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + DataSourceGcpResource.prototype.type = ""; + + /** + * DataSourceGcpResource computeInstanceDatasourceProperties. + * @member {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null|undefined} computeInstanceDatasourceProperties + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + DataSourceGcpResource.prototype.computeInstanceDatasourceProperties = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataSourceGcpResource gcpResourceProperties. + * @member {"computeInstanceDatasourceProperties"|undefined} gcpResourceProperties + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + Object.defineProperty(DataSourceGcpResource.prototype, "gcpResourceProperties", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceDatasourceProperties"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataSourceGcpResource instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource instance + */ + DataSourceGcpResource.create = function create(properties) { + return new DataSourceGcpResource(properties); + }; + + /** + * Encodes the specified DataSourceGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource} message DataSourceGcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceGcpResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.computeInstanceDatasourceProperties != null && Object.hasOwnProperty.call(message, "computeInstanceDatasourceProperties")) + $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.encode(message.computeInstanceDatasourceProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataSourceGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource} message DataSourceGcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceGcpResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceGcpResource.decode = function 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.backupdr.v1.DataSourceGcpResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcpResourcename = reader.string(); + break; + } + case 2: { + message.location = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 4: { + message.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceGcpResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSourceGcpResource message. + * @function verify + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSourceGcpResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + if (!$util.isString(message.gcpResourcename)) + return "gcpResourcename: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.computeInstanceDatasourceProperties != null && message.hasOwnProperty("computeInstanceDatasourceProperties")) { + properties.gcpResourceProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify(message.computeInstanceDatasourceProperties); + if (error) + return "computeInstanceDatasourceProperties." + error; + } + } + return null; + }; + + /** + * Creates a DataSourceGcpResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource + */ + DataSourceGcpResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DataSourceGcpResource) + return object; + var message = new $root.google.cloud.backupdr.v1.DataSourceGcpResource(); + if (object.gcpResourcename != null) + message.gcpResourcename = String(object.gcpResourcename); + if (object.location != null) + message.location = String(object.location); + if (object.type != null) + message.type = String(object.type); + if (object.computeInstanceDatasourceProperties != null) { + if (typeof object.computeInstanceDatasourceProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSourceGcpResource.computeInstanceDatasourceProperties: object expected"); + message.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.fromObject(object.computeInstanceDatasourceProperties); + } + return message; + }; + + /** + * Creates a plain object from a DataSourceGcpResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.DataSourceGcpResource} message DataSourceGcpResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSourceGcpResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gcpResourcename = ""; + object.location = ""; + object.type = ""; + } + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + object.gcpResourcename = message.gcpResourcename; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.computeInstanceDatasourceProperties != null && message.hasOwnProperty("computeInstanceDatasourceProperties")) { + object.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.toObject(message.computeInstanceDatasourceProperties, options); + if (options.oneofs) + object.gcpResourceProperties = "computeInstanceDatasourceProperties"; + } + return object; + }; + + /** + * Converts this DataSourceGcpResource to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + * @returns {Object.} JSON object + */ + DataSourceGcpResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataSourceGcpResource + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSourceGcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSourceGcpResource"; + }; + + return DataSourceGcpResource; + })(); + + v1.DataSourceBackupApplianceApplication = (function() { + + /** + * Properties of a DataSourceBackupApplianceApplication. + * @memberof google.cloud.backupdr.v1 + * @interface IDataSourceBackupApplianceApplication + * @property {string|null} [applicationName] DataSourceBackupApplianceApplication applicationName + * @property {string|null} [backupAppliance] DataSourceBackupApplianceApplication backupAppliance + * @property {number|Long|null} [applianceId] DataSourceBackupApplianceApplication applianceId + * @property {string|null} [type] DataSourceBackupApplianceApplication type + * @property {number|Long|null} [applicationId] DataSourceBackupApplianceApplication applicationId + * @property {string|null} [hostname] DataSourceBackupApplianceApplication hostname + * @property {number|Long|null} [hostId] DataSourceBackupApplianceApplication hostId + */ + + /** + * Constructs a new DataSourceBackupApplianceApplication. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DataSourceBackupApplianceApplication. + * @implements IDataSourceBackupApplianceApplication + * @constructor + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication=} [properties] Properties to set + */ + function DataSourceBackupApplianceApplication(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataSourceBackupApplianceApplication applicationName. + * @member {string} applicationName + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.applicationName = ""; + + /** + * DataSourceBackupApplianceApplication backupAppliance. + * @member {string} backupAppliance + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.backupAppliance = ""; + + /** + * DataSourceBackupApplianceApplication applianceId. + * @member {number|Long} applianceId + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.applianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataSourceBackupApplianceApplication type. + * @member {string} type + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.type = ""; + + /** + * DataSourceBackupApplianceApplication applicationId. + * @member {number|Long} applicationId + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.applicationId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataSourceBackupApplianceApplication hostname. + * @member {string} hostname + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.hostname = ""; + + /** + * DataSourceBackupApplianceApplication hostId. + * @member {number|Long} hostId + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.hostId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new DataSourceBackupApplianceApplication instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication instance + */ + DataSourceBackupApplianceApplication.create = function create(properties) { + return new DataSourceBackupApplianceApplication(properties); + }; + + /** + * Encodes the specified DataSourceBackupApplianceApplication message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceBackupApplianceApplication.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.applicationName != null && Object.hasOwnProperty.call(message, "applicationName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.applicationName); + if (message.backupAppliance != null && Object.hasOwnProperty.call(message, "backupAppliance")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupAppliance); + if (message.applianceId != null && Object.hasOwnProperty.call(message, "applianceId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.applianceId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.type); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.hostname); + if (message.hostId != null && Object.hasOwnProperty.call(message, "hostId")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.hostId); + if (message.applicationId != null && Object.hasOwnProperty.call(message, "applicationId")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.applicationId); + return writer; + }; + + /** + * Encodes the specified DataSourceBackupApplianceApplication message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceBackupApplianceApplication.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceBackupApplianceApplication.decode = function 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.backupdr.v1.DataSourceBackupApplianceApplication(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.applicationName = reader.string(); + break; + } + case 2: { + message.backupAppliance = reader.string(); + break; + } + case 3: { + message.applianceId = reader.int64(); + break; + } + case 4: { + message.type = reader.string(); + break; + } + case 8: { + message.applicationId = reader.int64(); + break; + } + case 6: { + message.hostname = reader.string(); + break; + } + case 7: { + message.hostId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceBackupApplianceApplication.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSourceBackupApplianceApplication message. + * @function verify + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSourceBackupApplianceApplication.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + if (!$util.isString(message.applicationName)) + return "applicationName: string expected"; + if (message.backupAppliance != null && message.hasOwnProperty("backupAppliance")) + if (!$util.isString(message.backupAppliance)) + return "backupAppliance: string expected"; + if (message.applianceId != null && message.hasOwnProperty("applianceId")) + if (!$util.isInteger(message.applianceId) && !(message.applianceId && $util.isInteger(message.applianceId.low) && $util.isInteger(message.applianceId.high))) + return "applianceId: integer|Long expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.applicationId != null && message.hasOwnProperty("applicationId")) + if (!$util.isInteger(message.applicationId) && !(message.applicationId && $util.isInteger(message.applicationId.low) && $util.isInteger(message.applicationId.high))) + return "applicationId: integer|Long expected"; + if (message.hostname != null && message.hasOwnProperty("hostname")) + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + if (message.hostId != null && message.hasOwnProperty("hostId")) + if (!$util.isInteger(message.hostId) && !(message.hostId && $util.isInteger(message.hostId.low) && $util.isInteger(message.hostId.high))) + return "hostId: integer|Long expected"; + return null; + }; + + /** + * Creates a DataSourceBackupApplianceApplication message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication + */ + DataSourceBackupApplianceApplication.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication) + return object; + var message = new $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication(); + if (object.applicationName != null) + message.applicationName = String(object.applicationName); + if (object.backupAppliance != null) + message.backupAppliance = String(object.backupAppliance); + if (object.applianceId != null) + if ($util.Long) + (message.applianceId = $util.Long.fromValue(object.applianceId)).unsigned = false; + else if (typeof object.applianceId === "string") + message.applianceId = parseInt(object.applianceId, 10); + else if (typeof object.applianceId === "number") + message.applianceId = object.applianceId; + else if (typeof object.applianceId === "object") + message.applianceId = new $util.LongBits(object.applianceId.low >>> 0, object.applianceId.high >>> 0).toNumber(); + if (object.type != null) + message.type = String(object.type); + if (object.applicationId != null) + if ($util.Long) + (message.applicationId = $util.Long.fromValue(object.applicationId)).unsigned = false; + else if (typeof object.applicationId === "string") + message.applicationId = parseInt(object.applicationId, 10); + else if (typeof object.applicationId === "number") + message.applicationId = object.applicationId; + else if (typeof object.applicationId === "object") + message.applicationId = new $util.LongBits(object.applicationId.low >>> 0, object.applicationId.high >>> 0).toNumber(); + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.hostId != null) + if ($util.Long) + (message.hostId = $util.Long.fromValue(object.hostId)).unsigned = false; + else if (typeof object.hostId === "string") + message.hostId = parseInt(object.hostId, 10); + else if (typeof object.hostId === "number") + message.hostId = object.hostId; + else if (typeof object.hostId === "object") + message.hostId = new $util.LongBits(object.hostId.low >>> 0, object.hostId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a DataSourceBackupApplianceApplication message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSourceBackupApplianceApplication.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.applicationName = ""; + object.backupAppliance = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.applianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.applianceId = options.longs === String ? "0" : 0; + object.type = ""; + object.hostname = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.hostId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.hostId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.applicationId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.applicationId = options.longs === String ? "0" : 0; + } + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + object.applicationName = message.applicationName; + if (message.backupAppliance != null && message.hasOwnProperty("backupAppliance")) + object.backupAppliance = message.backupAppliance; + if (message.applianceId != null && message.hasOwnProperty("applianceId")) + if (typeof message.applianceId === "number") + object.applianceId = options.longs === String ? String(message.applianceId) : message.applianceId; + else + object.applianceId = options.longs === String ? $util.Long.prototype.toString.call(message.applianceId) : options.longs === Number ? new $util.LongBits(message.applianceId.low >>> 0, message.applianceId.high >>> 0).toNumber() : message.applianceId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.hostname != null && message.hasOwnProperty("hostname")) + object.hostname = message.hostname; + if (message.hostId != null && message.hasOwnProperty("hostId")) + if (typeof message.hostId === "number") + object.hostId = options.longs === String ? String(message.hostId) : message.hostId; + else + object.hostId = options.longs === String ? $util.Long.prototype.toString.call(message.hostId) : options.longs === Number ? new $util.LongBits(message.hostId.low >>> 0, message.hostId.high >>> 0).toNumber() : message.hostId; + if (message.applicationId != null && message.hasOwnProperty("applicationId")) + if (typeof message.applicationId === "number") + object.applicationId = options.longs === String ? String(message.applicationId) : message.applicationId; + else + object.applicationId = options.longs === String ? $util.Long.prototype.toString.call(message.applicationId) : options.longs === Number ? new $util.LongBits(message.applicationId.low >>> 0, message.applicationId.high >>> 0).toNumber() : message.applicationId; + return object; + }; + + /** + * Converts this DataSourceBackupApplianceApplication to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + * @returns {Object.} JSON object + */ + DataSourceBackupApplianceApplication.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataSourceBackupApplianceApplication + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSourceBackupApplianceApplication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSourceBackupApplianceApplication"; + }; + + return DataSourceBackupApplianceApplication; + })(); + + v1.ServiceLockInfo = (function() { + + /** + * Properties of a ServiceLockInfo. + * @memberof google.cloud.backupdr.v1 + * @interface IServiceLockInfo + * @property {string|null} [operation] ServiceLockInfo operation + */ + + /** + * Constructs a new ServiceLockInfo. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ServiceLockInfo. + * @implements IServiceLockInfo + * @constructor + * @param {google.cloud.backupdr.v1.IServiceLockInfo=} [properties] Properties to set + */ + function ServiceLockInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceLockInfo operation. + * @member {string} operation + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @instance + */ + ServiceLockInfo.prototype.operation = ""; + + /** + * Creates a new ServiceLockInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IServiceLockInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo instance + */ + ServiceLockInfo.create = function create(properties) { + return new ServiceLockInfo(properties); + }; + + /** + * Encodes the specified ServiceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IServiceLockInfo} message ServiceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceLockInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.operation); + return writer; + }; + + /** + * Encodes the specified ServiceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IServiceLockInfo} message ServiceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceLockInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceLockInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceLockInfo.decode = function 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.backupdr.v1.ServiceLockInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.operation = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceLockInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceLockInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceLockInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceLockInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) + if (!$util.isString(message.operation)) + return "operation: string expected"; + return null; + }; + + /** + * Creates a ServiceLockInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo + */ + ServiceLockInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ServiceLockInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.ServiceLockInfo(); + if (object.operation != null) + message.operation = String(object.operation); + return message; + }; + + /** + * Creates a plain object from a ServiceLockInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {google.cloud.backupdr.v1.ServiceLockInfo} message ServiceLockInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceLockInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.operation = ""; + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = message.operation; + return object; + }; + + /** + * Converts this ServiceLockInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @instance + * @returns {Object.} JSON object + */ + ServiceLockInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceLockInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceLockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ServiceLockInfo"; + }; + + return ServiceLockInfo; + })(); + + v1.BackupApplianceLockInfo = (function() { + + /** + * Properties of a BackupApplianceLockInfo. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupApplianceLockInfo + * @property {number|Long|null} [backupApplianceId] BackupApplianceLockInfo backupApplianceId + * @property {string|null} [backupApplianceName] BackupApplianceLockInfo backupApplianceName + * @property {string|null} [lockReason] BackupApplianceLockInfo lockReason + * @property {string|null} [jobName] BackupApplianceLockInfo jobName + * @property {string|null} [backupImage] BackupApplianceLockInfo backupImage + * @property {number|Long|null} [slaId] BackupApplianceLockInfo slaId + */ + + /** + * Constructs a new BackupApplianceLockInfo. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupApplianceLockInfo. + * @implements IBackupApplianceLockInfo + * @constructor + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo=} [properties] Properties to set + */ + function BackupApplianceLockInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupApplianceLockInfo backupApplianceId. + * @member {number|Long} backupApplianceId + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.backupApplianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupApplianceLockInfo backupApplianceName. + * @member {string} backupApplianceName + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.backupApplianceName = ""; + + /** + * BackupApplianceLockInfo lockReason. + * @member {string} lockReason + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.lockReason = ""; + + /** + * BackupApplianceLockInfo jobName. + * @member {string|null|undefined} jobName + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.jobName = null; + + /** + * BackupApplianceLockInfo backupImage. + * @member {string|null|undefined} backupImage + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.backupImage = null; + + /** + * BackupApplianceLockInfo slaId. + * @member {number|Long|null|undefined} slaId + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.slaId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupApplianceLockInfo lockSource. + * @member {"jobName"|"backupImage"|"slaId"|undefined} lockSource + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + Object.defineProperty(BackupApplianceLockInfo.prototype, "lockSource", { + get: $util.oneOfGetter($oneOfFields = ["jobName", "backupImage", "slaId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupApplianceLockInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo instance + */ + BackupApplianceLockInfo.create = function create(properties) { + return new BackupApplianceLockInfo(properties); + }; + + /** + * Encodes the specified BackupApplianceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo} message BackupApplianceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceLockInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupApplianceId != null && Object.hasOwnProperty.call(message, "backupApplianceId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.backupApplianceId); + if (message.backupApplianceName != null && Object.hasOwnProperty.call(message, "backupApplianceName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupApplianceName); + if (message.lockReason != null && Object.hasOwnProperty.call(message, "lockReason")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.lockReason); + if (message.jobName != null && Object.hasOwnProperty.call(message, "jobName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.jobName); + if (message.backupImage != null && Object.hasOwnProperty.call(message, "backupImage")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.backupImage); + if (message.slaId != null && Object.hasOwnProperty.call(message, "slaId")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.slaId); + return writer; + }; + + /** + * Encodes the specified BackupApplianceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo} message BackupApplianceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceLockInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceLockInfo.decode = function 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.backupdr.v1.BackupApplianceLockInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backupApplianceId = reader.int64(); + break; + } + case 2: { + message.backupApplianceName = reader.string(); + break; + } + case 5: { + message.lockReason = reader.string(); + break; + } + case 6: { + message.jobName = reader.string(); + break; + } + case 7: { + message.backupImage = reader.string(); + break; + } + case 8: { + message.slaId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceLockInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupApplianceLockInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupApplianceLockInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (!$util.isInteger(message.backupApplianceId) && !(message.backupApplianceId && $util.isInteger(message.backupApplianceId.low) && $util.isInteger(message.backupApplianceId.high))) + return "backupApplianceId: integer|Long expected"; + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + if (!$util.isString(message.backupApplianceName)) + return "backupApplianceName: string expected"; + if (message.lockReason != null && message.hasOwnProperty("lockReason")) + if (!$util.isString(message.lockReason)) + return "lockReason: string expected"; + if (message.jobName != null && message.hasOwnProperty("jobName")) { + properties.lockSource = 1; + if (!$util.isString(message.jobName)) + return "jobName: string expected"; + } + if (message.backupImage != null && message.hasOwnProperty("backupImage")) { + if (properties.lockSource === 1) + return "lockSource: multiple values"; + properties.lockSource = 1; + if (!$util.isString(message.backupImage)) + return "backupImage: string expected"; + } + if (message.slaId != null && message.hasOwnProperty("slaId")) { + if (properties.lockSource === 1) + return "lockSource: multiple values"; + properties.lockSource = 1; + if (!$util.isInteger(message.slaId) && !(message.slaId && $util.isInteger(message.slaId.low) && $util.isInteger(message.slaId.high))) + return "slaId: integer|Long expected"; + } + return null; + }; + + /** + * Creates a BackupApplianceLockInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo + */ + BackupApplianceLockInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceLockInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupApplianceLockInfo(); + if (object.backupApplianceId != null) + if ($util.Long) + (message.backupApplianceId = $util.Long.fromValue(object.backupApplianceId)).unsigned = false; + else if (typeof object.backupApplianceId === "string") + message.backupApplianceId = parseInt(object.backupApplianceId, 10); + else if (typeof object.backupApplianceId === "number") + message.backupApplianceId = object.backupApplianceId; + else if (typeof object.backupApplianceId === "object") + message.backupApplianceId = new $util.LongBits(object.backupApplianceId.low >>> 0, object.backupApplianceId.high >>> 0).toNumber(); + if (object.backupApplianceName != null) + message.backupApplianceName = String(object.backupApplianceName); + if (object.lockReason != null) + message.lockReason = String(object.lockReason); + if (object.jobName != null) + message.jobName = String(object.jobName); + if (object.backupImage != null) + message.backupImage = String(object.backupImage); + if (object.slaId != null) + if ($util.Long) + (message.slaId = $util.Long.fromValue(object.slaId)).unsigned = false; + else if (typeof object.slaId === "string") + message.slaId = parseInt(object.slaId, 10); + else if (typeof object.slaId === "number") + message.slaId = object.slaId; + else if (typeof object.slaId === "object") + message.slaId = new $util.LongBits(object.slaId.low >>> 0, object.slaId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BackupApplianceLockInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.BackupApplianceLockInfo} message BackupApplianceLockInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupApplianceLockInfo.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.backupApplianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.backupApplianceId = options.longs === String ? "0" : 0; + object.backupApplianceName = ""; + object.lockReason = ""; + } + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (typeof message.backupApplianceId === "number") + object.backupApplianceId = options.longs === String ? String(message.backupApplianceId) : message.backupApplianceId; + else + object.backupApplianceId = options.longs === String ? $util.Long.prototype.toString.call(message.backupApplianceId) : options.longs === Number ? new $util.LongBits(message.backupApplianceId.low >>> 0, message.backupApplianceId.high >>> 0).toNumber() : message.backupApplianceId; + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + object.backupApplianceName = message.backupApplianceName; + if (message.lockReason != null && message.hasOwnProperty("lockReason")) + object.lockReason = message.lockReason; + if (message.jobName != null && message.hasOwnProperty("jobName")) { + object.jobName = message.jobName; + if (options.oneofs) + object.lockSource = "jobName"; + } + if (message.backupImage != null && message.hasOwnProperty("backupImage")) { + object.backupImage = message.backupImage; + if (options.oneofs) + object.lockSource = "backupImage"; + } + if (message.slaId != null && message.hasOwnProperty("slaId")) { + if (typeof message.slaId === "number") + object.slaId = options.longs === String ? String(message.slaId) : message.slaId; + else + object.slaId = options.longs === String ? $util.Long.prototype.toString.call(message.slaId) : options.longs === Number ? new $util.LongBits(message.slaId.low >>> 0, message.slaId.high >>> 0).toNumber() : message.slaId; + if (options.oneofs) + object.lockSource = "slaId"; + } + return object; + }; + + /** + * Converts this BackupApplianceLockInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + * @returns {Object.} JSON object + */ + BackupApplianceLockInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupApplianceLockInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupApplianceLockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceLockInfo"; + }; + + return BackupApplianceLockInfo; + })(); + + v1.BackupLock = (function() { + + /** + * Properties of a BackupLock. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupLock + * @property {google.protobuf.ITimestamp|null} [lockUntilTime] BackupLock lockUntilTime + * @property {google.cloud.backupdr.v1.IBackupApplianceLockInfo|null} [backupApplianceLockInfo] BackupLock backupApplianceLockInfo + * @property {google.cloud.backupdr.v1.IServiceLockInfo|null} [serviceLockInfo] BackupLock serviceLockInfo + */ + + /** + * Constructs a new BackupLock. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupLock. + * @implements IBackupLock + * @constructor + * @param {google.cloud.backupdr.v1.IBackupLock=} [properties] Properties to set + */ + function BackupLock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupLock lockUntilTime. + * @member {google.protobuf.ITimestamp|null|undefined} lockUntilTime + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + */ + BackupLock.prototype.lockUntilTime = null; + + /** + * BackupLock backupApplianceLockInfo. + * @member {google.cloud.backupdr.v1.IBackupApplianceLockInfo|null|undefined} backupApplianceLockInfo + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + */ + BackupLock.prototype.backupApplianceLockInfo = null; + + /** + * BackupLock serviceLockInfo. + * @member {google.cloud.backupdr.v1.IServiceLockInfo|null|undefined} serviceLockInfo + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + */ + BackupLock.prototype.serviceLockInfo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupLock ClientLockInfo. + * @member {"backupApplianceLockInfo"|"serviceLockInfo"|undefined} ClientLockInfo + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + */ + Object.defineProperty(BackupLock.prototype, "ClientLockInfo", { + get: $util.oneOfGetter($oneOfFields = ["backupApplianceLockInfo", "serviceLockInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupLock instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.IBackupLock=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock instance + */ + BackupLock.create = function create(properties) { + return new BackupLock(properties); + }; + + /** + * Encodes the specified BackupLock message. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.IBackupLock} message BackupLock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupLock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lockUntilTime != null && Object.hasOwnProperty.call(message, "lockUntilTime")) + $root.google.protobuf.Timestamp.encode(message.lockUntilTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.backupApplianceLockInfo != null && Object.hasOwnProperty.call(message, "backupApplianceLockInfo")) + $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.encode(message.backupApplianceLockInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.serviceLockInfo != null && Object.hasOwnProperty.call(message, "serviceLockInfo")) + $root.google.cloud.backupdr.v1.ServiceLockInfo.encode(message.serviceLockInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BackupLock message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.IBackupLock} message BackupLock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupLock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupLock message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupLock.decode = function 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.backupdr.v1.BackupLock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.lockUntilTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.decode(reader, reader.uint32()); + break; + } + case 4: { + message.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupLock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupLock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupLock message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupLock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.lockUntilTime != null && message.hasOwnProperty("lockUntilTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lockUntilTime); + if (error) + return "lockUntilTime." + error; + } + if (message.backupApplianceLockInfo != null && message.hasOwnProperty("backupApplianceLockInfo")) { + properties.ClientLockInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.verify(message.backupApplianceLockInfo); + if (error) + return "backupApplianceLockInfo." + error; + } + } + if (message.serviceLockInfo != null && message.hasOwnProperty("serviceLockInfo")) { + if (properties.ClientLockInfo === 1) + return "ClientLockInfo: multiple values"; + properties.ClientLockInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.ServiceLockInfo.verify(message.serviceLockInfo); + if (error) + return "serviceLockInfo." + error; + } + } + return null; + }; + + /** + * Creates a BackupLock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock + */ + BackupLock.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupLock) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupLock(); + if (object.lockUntilTime != null) { + if (typeof object.lockUntilTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupLock.lockUntilTime: object expected"); + message.lockUntilTime = $root.google.protobuf.Timestamp.fromObject(object.lockUntilTime); + } + if (object.backupApplianceLockInfo != null) { + if (typeof object.backupApplianceLockInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupLock.backupApplianceLockInfo: object expected"); + message.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.fromObject(object.backupApplianceLockInfo); + } + if (object.serviceLockInfo != null) { + if (typeof object.serviceLockInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupLock.serviceLockInfo: object expected"); + message.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.fromObject(object.serviceLockInfo); + } + return message; + }; + + /** + * Creates a plain object from a BackupLock message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.BackupLock} message BackupLock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupLock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.lockUntilTime = null; + if (message.lockUntilTime != null && message.hasOwnProperty("lockUntilTime")) + object.lockUntilTime = $root.google.protobuf.Timestamp.toObject(message.lockUntilTime, options); + if (message.backupApplianceLockInfo != null && message.hasOwnProperty("backupApplianceLockInfo")) { + object.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.toObject(message.backupApplianceLockInfo, options); + if (options.oneofs) + object.ClientLockInfo = "backupApplianceLockInfo"; + } + if (message.serviceLockInfo != null && message.hasOwnProperty("serviceLockInfo")) { + object.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.toObject(message.serviceLockInfo, options); + if (options.oneofs) + object.ClientLockInfo = "serviceLockInfo"; + } + return object; + }; + + /** + * Converts this BackupLock to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + * @returns {Object.} JSON object + */ + BackupLock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupLock + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupLock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupLock"; + }; + + return BackupLock; + })(); + + v1.Backup = (function() { + + /** + * Properties of a Backup. + * @memberof google.cloud.backupdr.v1 + * @interface IBackup + * @property {string|null} [name] Backup name + * @property {string|null} [description] Backup description + * @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Backup updateTime + * @property {Object.|null} [labels] Backup labels + * @property {google.protobuf.ITimestamp|null} [enforcedRetentionEndTime] Backup enforcedRetentionEndTime + * @property {google.protobuf.ITimestamp|null} [expireTime] Backup expireTime + * @property {google.protobuf.ITimestamp|null} [consistencyTime] Backup consistencyTime + * @property {string|null} [etag] Backup etag + * @property {google.cloud.backupdr.v1.Backup.State|null} [state] Backup state + * @property {Array.|null} [serviceLocks] Backup serviceLocks + * @property {Array.|null} [backupApplianceLocks] Backup backupApplianceLocks + * @property {google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null} [computeInstanceBackupProperties] Backup computeInstanceBackupProperties + * @property {google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null} [backupApplianceBackupProperties] Backup backupApplianceBackupProperties + * @property {google.cloud.backupdr.v1.Backup.BackupType|null} [backupType] Backup backupType + * @property {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null} [gcpBackupPlanInfo] Backup gcpBackupPlanInfo + * @property {number|Long|null} [resourceSizeBytes] Backup resourceSizeBytes + */ + + /** + * Constructs a new Backup. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Backup. + * @implements IBackup + * @constructor + * @param {google.cloud.backupdr.v1.IBackup=} [properties] Properties to set + */ + function Backup(properties) { + this.labels = {}; + this.serviceLocks = []; + this.backupApplianceLocks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Backup name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.name = ""; + + /** + * Backup description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.description = null; + + /** + * Backup createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.createTime = null; + + /** + * Backup updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.updateTime = null; + + /** + * Backup labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.labels = $util.emptyObject; + + /** + * Backup enforcedRetentionEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} enforcedRetentionEndTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.enforcedRetentionEndTime = null; + + /** + * Backup expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.expireTime = null; + + /** + * Backup consistencyTime. + * @member {google.protobuf.ITimestamp|null|undefined} consistencyTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.consistencyTime = null; + + /** + * Backup etag. + * @member {string|null|undefined} etag + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.etag = null; + + /** + * Backup state. + * @member {google.cloud.backupdr.v1.Backup.State} state + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.state = 0; + + /** + * Backup serviceLocks. + * @member {Array.} serviceLocks + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.serviceLocks = $util.emptyArray; + + /** + * Backup backupApplianceLocks. + * @member {Array.} backupApplianceLocks + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.backupApplianceLocks = $util.emptyArray; + + /** + * Backup computeInstanceBackupProperties. + * @member {google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null|undefined} computeInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.computeInstanceBackupProperties = null; + + /** + * Backup backupApplianceBackupProperties. + * @member {google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null|undefined} backupApplianceBackupProperties + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.backupApplianceBackupProperties = null; + + /** + * Backup backupType. + * @member {google.cloud.backupdr.v1.Backup.BackupType} backupType + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.backupType = 0; + + /** + * Backup gcpBackupPlanInfo. + * @member {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null|undefined} gcpBackupPlanInfo + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.gcpBackupPlanInfo = null; + + /** + * Backup resourceSizeBytes. + * @member {number|Long} resourceSizeBytes + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.resourceSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Backup _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _createTime. + * @member {"createTime"|undefined} _createTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_createTime", { + get: $util.oneOfGetter($oneOfFields = ["createTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _updateTime. + * @member {"updateTime"|undefined} _updateTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _enforcedRetentionEndTime. + * @member {"enforcedRetentionEndTime"|undefined} _enforcedRetentionEndTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_enforcedRetentionEndTime", { + get: $util.oneOfGetter($oneOfFields = ["enforcedRetentionEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _expireTime. + * @member {"expireTime"|undefined} _expireTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_expireTime", { + get: $util.oneOfGetter($oneOfFields = ["expireTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _consistencyTime. + * @member {"consistencyTime"|undefined} _consistencyTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_consistencyTime", { + get: $util.oneOfGetter($oneOfFields = ["consistencyTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _etag. + * @member {"etag"|undefined} _etag + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_etag", { + get: $util.oneOfGetter($oneOfFields = ["etag"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup backupProperties. + * @member {"computeInstanceBackupProperties"|"backupApplianceBackupProperties"|undefined} backupProperties + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "backupProperties", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceBackupProperties", "backupApplianceBackupProperties"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup planInfo. + * @member {"gcpBackupPlanInfo"|undefined} planInfo + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "planInfo", { + get: $util.oneOfGetter($oneOfFields = ["gcpBackupPlanInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Backup instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.IBackup=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Backup} Backup instance + */ + Backup.create = function create(properties) { + return new Backup(properties); + }; + + /** + * Encodes the specified Backup message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.IBackup} message Backup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Backup.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).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 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.enforcedRetentionEndTime != null && Object.hasOwnProperty.call(message, "enforcedRetentionEndTime")) + $root.google.protobuf.Timestamp.encode(message.enforcedRetentionEndTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.consistencyTime != null && Object.hasOwnProperty.call(message, "consistencyTime")) + $root.google.protobuf.Timestamp.encode(message.consistencyTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.state); + if (message.serviceLocks != null && message.serviceLocks.length) + for (var i = 0; i < message.serviceLocks.length; ++i) + $root.google.cloud.backupdr.v1.BackupLock.encode(message.serviceLocks[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.backupApplianceLocks != null && message.backupApplianceLocks.length) + for (var i = 0; i < message.backupApplianceLocks.length; ++i) + $root.google.cloud.backupdr.v1.BackupLock.encode(message.backupApplianceLocks[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.computeInstanceBackupProperties != null && Object.hasOwnProperty.call(message, "computeInstanceBackupProperties")) + $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.encode(message.computeInstanceBackupProperties, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.backupType); + if (message.backupApplianceBackupProperties != null && Object.hasOwnProperty.call(message, "backupApplianceBackupProperties")) + $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.encode(message.backupApplianceBackupProperties, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.gcpBackupPlanInfo != null && Object.hasOwnProperty.call(message, "gcpBackupPlanInfo")) + $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.encode(message.gcpBackupPlanInfo, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.resourceSizeBytes != null && Object.hasOwnProperty.call(message, "resourceSizeBytes")) + writer.uint32(/* id 23, wireType 0 =*/184).int64(message.resourceSizeBytes); + return writer; + }; + + /** + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.IBackup} message Backup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Backup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Backup message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Backup} Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Backup.decode = function 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.backupdr.v1.Backup(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + 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 6: { + message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.consistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.etag = reader.string(); + break; + } + case 15: { + message.state = reader.int32(); + break; + } + case 17: { + if (!(message.serviceLocks && message.serviceLocks.length)) + message.serviceLocks = []; + message.serviceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader, reader.uint32())); + break; + } + case 18: { + if (!(message.backupApplianceLocks && message.backupApplianceLocks.length)) + message.backupApplianceLocks = []; + message.backupApplianceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader, reader.uint32())); + break; + } + case 19: { + message.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.decode(reader, reader.uint32()); + break; + } + case 21: { + message.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.decode(reader, reader.uint32()); + break; + } + case 20: { + message.backupType = reader.int32(); + break; + } + case 22: { + message.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.decode(reader, reader.uint32()); + break; + } + case 23: { + message.resourceSizeBytes = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Backup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Backup} Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Backup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Backup message. + * @function verify + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Backup.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.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + properties._createTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + 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.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { + properties._enforcedRetentionEndTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.enforcedRetentionEndTime); + if (error) + return "enforcedRetentionEndTime." + error; + } + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + properties._expireTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + } + if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { + properties._consistencyTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.consistencyTime); + if (error) + return "consistencyTime." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) { + properties._etag = 1; + if (!$util.isString(message.etag)) + return "etag: 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.serviceLocks != null && message.hasOwnProperty("serviceLocks")) { + if (!Array.isArray(message.serviceLocks)) + return "serviceLocks: array expected"; + for (var i = 0; i < message.serviceLocks.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupLock.verify(message.serviceLocks[i]); + if (error) + return "serviceLocks." + error; + } + } + if (message.backupApplianceLocks != null && message.hasOwnProperty("backupApplianceLocks")) { + if (!Array.isArray(message.backupApplianceLocks)) + return "backupApplianceLocks: array expected"; + for (var i = 0; i < message.backupApplianceLocks.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupLock.verify(message.backupApplianceLocks[i]); + if (error) + return "backupApplianceLocks." + error; + } + } + if (message.computeInstanceBackupProperties != null && message.hasOwnProperty("computeInstanceBackupProperties")) { + properties.backupProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify(message.computeInstanceBackupProperties); + if (error) + return "computeInstanceBackupProperties." + error; + } + } + if (message.backupApplianceBackupProperties != null && message.hasOwnProperty("backupApplianceBackupProperties")) { + if (properties.backupProperties === 1) + return "backupProperties: multiple values"; + properties.backupProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify(message.backupApplianceBackupProperties); + if (error) + return "backupApplianceBackupProperties." + error; + } + } + if (message.backupType != null && message.hasOwnProperty("backupType")) + switch (message.backupType) { + default: + return "backupType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.gcpBackupPlanInfo != null && message.hasOwnProperty("gcpBackupPlanInfo")) { + properties.planInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify(message.gcpBackupPlanInfo); + if (error) + return "gcpBackupPlanInfo." + error; + } + } + if (message.resourceSizeBytes != null && message.hasOwnProperty("resourceSizeBytes")) + if (!$util.isInteger(message.resourceSizeBytes) && !(message.resourceSizeBytes && $util.isInteger(message.resourceSizeBytes.low) && $util.isInteger(message.resourceSizeBytes.high))) + return "resourceSizeBytes: integer|Long expected"; + return null; + }; + + /** + * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Backup} Backup + */ + Backup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Backup) + return object; + var message = new $root.google.cloud.backupdr.v1.Backup(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.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.backupdr.v1.Backup.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.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.enforcedRetentionEndTime != null) { + if (typeof object.enforcedRetentionEndTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.enforcedRetentionEndTime: object expected"); + message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.fromObject(object.enforcedRetentionEndTime); + } + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + if (object.consistencyTime != null) { + if (typeof object.consistencyTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.consistencyTime: object expected"); + message.consistencyTime = $root.google.protobuf.Timestamp.fromObject(object.consistencyTime); + } + if (object.etag != null) + message.etag = String(object.etag); + 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 "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.serviceLocks) { + if (!Array.isArray(object.serviceLocks)) + throw TypeError(".google.cloud.backupdr.v1.Backup.serviceLocks: array expected"); + message.serviceLocks = []; + for (var i = 0; i < object.serviceLocks.length; ++i) { + if (typeof object.serviceLocks[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.serviceLocks: object expected"); + message.serviceLocks[i] = $root.google.cloud.backupdr.v1.BackupLock.fromObject(object.serviceLocks[i]); + } + } + if (object.backupApplianceLocks) { + if (!Array.isArray(object.backupApplianceLocks)) + throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceLocks: array expected"); + message.backupApplianceLocks = []; + for (var i = 0; i < object.backupApplianceLocks.length; ++i) { + if (typeof object.backupApplianceLocks[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceLocks: object expected"); + message.backupApplianceLocks[i] = $root.google.cloud.backupdr.v1.BackupLock.fromObject(object.backupApplianceLocks[i]); + } + } + if (object.computeInstanceBackupProperties != null) { + if (typeof object.computeInstanceBackupProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.computeInstanceBackupProperties: object expected"); + message.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.fromObject(object.computeInstanceBackupProperties); + } + if (object.backupApplianceBackupProperties != null) { + if (typeof object.backupApplianceBackupProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceBackupProperties: object expected"); + message.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.fromObject(object.backupApplianceBackupProperties); + } + switch (object.backupType) { + default: + if (typeof object.backupType === "number") { + message.backupType = object.backupType; + break; + } + break; + case "BACKUP_TYPE_UNSPECIFIED": + case 0: + message.backupType = 0; + break; + case "SCHEDULED": + case 1: + message.backupType = 1; + break; + case "ON_DEMAND": + case 2: + message.backupType = 2; + break; + } + if (object.gcpBackupPlanInfo != null) { + if (typeof object.gcpBackupPlanInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.gcpBackupPlanInfo: object expected"); + message.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.fromObject(object.gcpBackupPlanInfo); + } + if (object.resourceSizeBytes != null) + if ($util.Long) + (message.resourceSizeBytes = $util.Long.fromValue(object.resourceSizeBytes)).unsigned = false; + else if (typeof object.resourceSizeBytes === "string") + message.resourceSizeBytes = parseInt(object.resourceSizeBytes, 10); + else if (typeof object.resourceSizeBytes === "number") + message.resourceSizeBytes = object.resourceSizeBytes; + else if (typeof object.resourceSizeBytes === "object") + message.resourceSizeBytes = new $util.LongBits(object.resourceSizeBytes.low >>> 0, object.resourceSizeBytes.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Backup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.Backup} message Backup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Backup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.serviceLocks = []; + object.backupApplianceLocks = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.backupType = options.enums === String ? "BACKUP_TYPE_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.resourceSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.resourceSizeBytes = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (options.oneofs) + object._createTime = "createTime"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + 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.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { + object.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.toObject(message.enforcedRetentionEndTime, options); + if (options.oneofs) + object._enforcedRetentionEndTime = "enforcedRetentionEndTime"; + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (options.oneofs) + object._expireTime = "expireTime"; + } + if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { + object.consistencyTime = $root.google.protobuf.Timestamp.toObject(message.consistencyTime, options); + if (options.oneofs) + object._consistencyTime = "consistencyTime"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + object.etag = message.etag; + if (options.oneofs) + object._etag = "etag"; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.Backup.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.Backup.State[message.state] : message.state; + if (message.serviceLocks && message.serviceLocks.length) { + object.serviceLocks = []; + for (var j = 0; j < message.serviceLocks.length; ++j) + object.serviceLocks[j] = $root.google.cloud.backupdr.v1.BackupLock.toObject(message.serviceLocks[j], options); + } + if (message.backupApplianceLocks && message.backupApplianceLocks.length) { + object.backupApplianceLocks = []; + for (var j = 0; j < message.backupApplianceLocks.length; ++j) + object.backupApplianceLocks[j] = $root.google.cloud.backupdr.v1.BackupLock.toObject(message.backupApplianceLocks[j], options); + } + if (message.computeInstanceBackupProperties != null && message.hasOwnProperty("computeInstanceBackupProperties")) { + object.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.toObject(message.computeInstanceBackupProperties, options); + if (options.oneofs) + object.backupProperties = "computeInstanceBackupProperties"; + } + if (message.backupType != null && message.hasOwnProperty("backupType")) + object.backupType = options.enums === String ? $root.google.cloud.backupdr.v1.Backup.BackupType[message.backupType] === undefined ? message.backupType : $root.google.cloud.backupdr.v1.Backup.BackupType[message.backupType] : message.backupType; + if (message.backupApplianceBackupProperties != null && message.hasOwnProperty("backupApplianceBackupProperties")) { + object.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.toObject(message.backupApplianceBackupProperties, options); + if (options.oneofs) + object.backupProperties = "backupApplianceBackupProperties"; + } + if (message.gcpBackupPlanInfo != null && message.hasOwnProperty("gcpBackupPlanInfo")) { + object.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.toObject(message.gcpBackupPlanInfo, options); + if (options.oneofs) + object.planInfo = "gcpBackupPlanInfo"; + } + if (message.resourceSizeBytes != null && message.hasOwnProperty("resourceSizeBytes")) + if (typeof message.resourceSizeBytes === "number") + object.resourceSizeBytes = options.longs === String ? String(message.resourceSizeBytes) : message.resourceSizeBytes; + else + object.resourceSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resourceSizeBytes) : options.longs === Number ? new $util.LongBits(message.resourceSizeBytes.low >>> 0, message.resourceSizeBytes.high >>> 0).toNumber() : message.resourceSizeBytes; + return object; + }; + + /** + * Converts this Backup to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Backup + * @instance + * @returns {Object.} JSON object + */ + Backup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Backup + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Backup"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.Backup.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} ERROR=4 ERROR value + */ + Backup.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + /** + * BackupType enum. + * @name google.cloud.backupdr.v1.Backup.BackupType + * @enum {number} + * @property {number} BACKUP_TYPE_UNSPECIFIED=0 BACKUP_TYPE_UNSPECIFIED value + * @property {number} SCHEDULED=1 SCHEDULED value + * @property {number} ON_DEMAND=2 ON_DEMAND value + */ + Backup.BackupType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCHEDULED"] = 1; + values[valuesById[2] = "ON_DEMAND"] = 2; + return values; + })(); + + Backup.GCPBackupPlanInfo = (function() { + + /** + * Properties of a GCPBackupPlanInfo. + * @memberof google.cloud.backupdr.v1.Backup + * @interface IGCPBackupPlanInfo + * @property {string|null} [backupPlan] GCPBackupPlanInfo backupPlan + * @property {string|null} [backupPlanRuleId] GCPBackupPlanInfo backupPlanRuleId + */ + + /** + * Constructs a new GCPBackupPlanInfo. + * @memberof google.cloud.backupdr.v1.Backup + * @classdesc Represents a GCPBackupPlanInfo. + * @implements IGCPBackupPlanInfo + * @constructor + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo=} [properties] Properties to set + */ + function GCPBackupPlanInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GCPBackupPlanInfo backupPlan. + * @member {string} backupPlan + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @instance + */ + GCPBackupPlanInfo.prototype.backupPlan = ""; + + /** + * GCPBackupPlanInfo backupPlanRuleId. + * @member {string} backupPlanRuleId + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @instance + */ + GCPBackupPlanInfo.prototype.backupPlanRuleId = ""; + + /** + * Creates a new GCPBackupPlanInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo instance + */ + GCPBackupPlanInfo.create = function create(properties) { + return new GCPBackupPlanInfo(properties); + }; + + /** + * Encodes the specified GCPBackupPlanInfo message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo} message GCPBackupPlanInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GCPBackupPlanInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPlan); + if (message.backupPlanRuleId != null && Object.hasOwnProperty.call(message, "backupPlanRuleId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanRuleId); + return writer; + }; + + /** + * Encodes the specified GCPBackupPlanInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo} message GCPBackupPlanInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GCPBackupPlanInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GCPBackupPlanInfo.decode = function 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.backupdr.v1.Backup.GCPBackupPlanInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backupPlan = reader.string(); + break; + } + case 2: { + message.backupPlanRuleId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GCPBackupPlanInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GCPBackupPlanInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GCPBackupPlanInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + if (!$util.isString(message.backupPlan)) + return "backupPlan: string expected"; + if (message.backupPlanRuleId != null && message.hasOwnProperty("backupPlanRuleId")) + if (!$util.isString(message.backupPlanRuleId)) + return "backupPlanRuleId: string expected"; + return null; + }; + + /** + * Creates a GCPBackupPlanInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo + */ + GCPBackupPlanInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo(); + if (object.backupPlan != null) + message.backupPlan = String(object.backupPlan); + if (object.backupPlanRuleId != null) + message.backupPlanRuleId = String(object.backupPlanRuleId); + return message; + }; + + /** + * Creates a plain object from a GCPBackupPlanInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} message GCPBackupPlanInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GCPBackupPlanInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.backupPlan = ""; + object.backupPlanRuleId = ""; + } + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + object.backupPlan = message.backupPlan; + if (message.backupPlanRuleId != null && message.hasOwnProperty("backupPlanRuleId")) + object.backupPlanRuleId = message.backupPlanRuleId; + return object; + }; + + /** + * Converts this GCPBackupPlanInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @instance + * @returns {Object.} JSON object + */ + GCPBackupPlanInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GCPBackupPlanInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GCPBackupPlanInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo"; + }; + + return GCPBackupPlanInfo; + })(); + + return Backup; + })(); + + v1.CreateBackupVaultRequest = (function() { + + /** + * Properties of a CreateBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ICreateBackupVaultRequest + * @property {string|null} [parent] CreateBackupVaultRequest parent + * @property {string|null} [backupVaultId] CreateBackupVaultRequest backupVaultId + * @property {google.cloud.backupdr.v1.IBackupVault|null} [backupVault] CreateBackupVaultRequest backupVault + * @property {string|null} [requestId] CreateBackupVaultRequest requestId + * @property {boolean|null} [validateOnly] CreateBackupVaultRequest validateOnly + */ + + /** + * Constructs a new CreateBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CreateBackupVaultRequest. + * @implements ICreateBackupVaultRequest + * @constructor + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest=} [properties] Properties to set + */ + function CreateBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBackupVaultRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.parent = ""; + + /** + * CreateBackupVaultRequest backupVaultId. + * @member {string} backupVaultId + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.backupVaultId = ""; + + /** + * CreateBackupVaultRequest backupVault. + * @member {google.cloud.backupdr.v1.IBackupVault|null|undefined} backupVault + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.backupVault = null; + + /** + * CreateBackupVaultRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.requestId = ""; + + /** + * CreateBackupVaultRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest instance + */ + CreateBackupVaultRequest.create = function create(properties) { + return new CreateBackupVaultRequest(properties); + }; + + /** + * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupVaultRequest.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.backupVaultId != null && Object.hasOwnProperty.call(message, "backupVaultId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupVaultId); + if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVault, 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); + return writer; + }; + + /** + * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupVaultRequest.decode = function 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.backupdr.v1.CreateBackupVaultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.backupVaultId = reader.string(); + break; + } + case 3: { + message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBackupVaultRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBackupVaultRequest.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.backupVaultId != null && message.hasOwnProperty("backupVaultId")) + if (!$util.isString(message.backupVaultId)) + return "backupVaultId: string expected"; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault); + if (error) + return "backupVault." + 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"; + return null; + }; + + /** + * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest + */ + CreateBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupVaultRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.CreateBackupVaultRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupVaultId != null) + message.backupVaultId = String(object.backupVaultId); + if (object.backupVault != null) { + if (typeof object.backupVault !== "object") + throw TypeError(".google.cloud.backupdr.v1.CreateBackupVaultRequest.backupVault: object expected"); + message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVault); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.CreateBackupVaultRequest} message CreateBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupVaultId = ""; + object.backupVault = null; + object.requestId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupVaultId != null && message.hasOwnProperty("backupVaultId")) + object.backupVaultId = message.backupVaultId; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) + object.backupVault = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVault, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupVaultRequest"; + }; + + return CreateBackupVaultRequest; + })(); + + v1.ListBackupVaultsRequest = (function() { + + /** + * Properties of a ListBackupVaultsRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupVaultsRequest + * @property {string|null} [parent] ListBackupVaultsRequest parent + * @property {number|null} [pageSize] ListBackupVaultsRequest pageSize + * @property {string|null} [pageToken] ListBackupVaultsRequest pageToken + * @property {string|null} [filter] ListBackupVaultsRequest filter + * @property {string|null} [orderBy] ListBackupVaultsRequest orderBy + * @property {google.cloud.backupdr.v1.BackupVaultView|null} [view] ListBackupVaultsRequest view + */ + + /** + * Constructs a new ListBackupVaultsRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupVaultsRequest. + * @implements IListBackupVaultsRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest=} [properties] Properties to set + */ + function ListBackupVaultsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupVaultsRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.parent = ""; + + /** + * ListBackupVaultsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.pageSize = 0; + + /** + * ListBackupVaultsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.pageToken = ""; + + /** + * ListBackupVaultsRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.filter = ""; + + /** + * ListBackupVaultsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.orderBy = ""; + + /** + * ListBackupVaultsRequest view. + * @member {google.cloud.backupdr.v1.BackupVaultView} view + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.view = 0; + + /** + * Creates a new ListBackupVaultsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest instance + */ + ListBackupVaultsRequest.create = function create(properties) { + return new ListBackupVaultsRequest(properties); + }; + + /** + * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsRequest.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); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); + return writer; + }; + + /** + * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsRequest.decode = function 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.backupdr.v1.ListBackupVaultsRequest(); + 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; + } + case 6: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupVaultsRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupVaultsRequest.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"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest + */ + ListBackupVaultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupVaultsRequest(); + 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); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VAULT_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VAULT_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VAULT_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.ListBackupVaultsRequest} message ListBackupVaultsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupVaultsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.view = options.enums === String ? "BACKUP_VAULT_VIEW_UNSPECIFIED" : 0; + } + 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; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVaultView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupVaultView[message.view] : message.view; + return object; + }; + + /** + * Converts this ListBackupVaultsRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupVaultsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupVaultsRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupVaultsRequest"; + }; + + return ListBackupVaultsRequest; + })(); + + v1.ListBackupVaultsResponse = (function() { + + /** + * Properties of a ListBackupVaultsResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupVaultsResponse + * @property {Array.|null} [backupVaults] ListBackupVaultsResponse backupVaults + * @property {string|null} [nextPageToken] ListBackupVaultsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupVaultsResponse unreachable + */ + + /** + * Constructs a new ListBackupVaultsResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupVaultsResponse. + * @implements IListBackupVaultsResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse=} [properties] Properties to set + */ + function ListBackupVaultsResponse(properties) { + this.backupVaults = []; + 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]]; + } + + /** + * ListBackupVaultsResponse backupVaults. + * @member {Array.} backupVaults + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @instance + */ + ListBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; + + /** + * ListBackupVaultsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @instance + */ + ListBackupVaultsResponse.prototype.nextPageToken = ""; + + /** + * ListBackupVaultsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @instance + */ + ListBackupVaultsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupVaultsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse instance + */ + ListBackupVaultsResponse.create = function create(properties) { + return new ListBackupVaultsResponse(properties); + }; + + /** + * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupVaults != null && message.backupVaults.length) + for (var i = 0; i < message.backupVaults.length; ++i) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVaults[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 ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsResponse.decode = function 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.backupdr.v1.ListBackupVaultsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backupVaults && message.backupVaults.length)) + message.backupVaults = []; + message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.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 ListBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupVaultsResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupVaultsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { + if (!Array.isArray(message.backupVaults)) + return "backupVaults: array expected"; + for (var i = 0; i < message.backupVaults.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVaults[i]); + if (error) + return "backupVaults." + 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 ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse + */ + ListBackupVaultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupVaultsResponse(); + if (object.backupVaults) { + if (!Array.isArray(object.backupVaults)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.backupVaults: array expected"); + message.backupVaults = []; + for (var i = 0; i < object.backupVaults.length; ++i) { + if (typeof object.backupVaults[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.backupVaults: object expected"); + message.backupVaults[i] = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVaults[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.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 ListBackupVaultsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.ListBackupVaultsResponse} message ListBackupVaultsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupVaultsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupVaults = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backupVaults && message.backupVaults.length) { + object.backupVaults = []; + for (var j = 0; j < message.backupVaults.length; ++j) + object.backupVaults[j] = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVaults[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 ListBackupVaultsResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupVaultsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupVaultsResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupVaultsResponse"; + }; + + return ListBackupVaultsResponse; + })(); + + v1.FetchUsableBackupVaultsRequest = (function() { + + /** + * Properties of a FetchUsableBackupVaultsRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IFetchUsableBackupVaultsRequest + * @property {string|null} [parent] FetchUsableBackupVaultsRequest parent + * @property {number|null} [pageSize] FetchUsableBackupVaultsRequest pageSize + * @property {string|null} [pageToken] FetchUsableBackupVaultsRequest pageToken + * @property {string|null} [filter] FetchUsableBackupVaultsRequest filter + * @property {string|null} [orderBy] FetchUsableBackupVaultsRequest orderBy + */ + + /** + * Constructs a new FetchUsableBackupVaultsRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FetchUsableBackupVaultsRequest. + * @implements IFetchUsableBackupVaultsRequest + * @constructor + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest=} [properties] Properties to set + */ + function FetchUsableBackupVaultsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchUsableBackupVaultsRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.parent = ""; + + /** + * FetchUsableBackupVaultsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.pageSize = 0; + + /** + * FetchUsableBackupVaultsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.pageToken = ""; + + /** + * FetchUsableBackupVaultsRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.filter = ""; + + /** + * FetchUsableBackupVaultsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.orderBy = ""; + + /** + * Creates a new FetchUsableBackupVaultsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest instance + */ + FetchUsableBackupVaultsRequest.create = function create(properties) { + return new FetchUsableBackupVaultsRequest(properties); + }; + + /** + * Encodes the specified FetchUsableBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchUsableBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchUsableBackupVaultsRequest.decode = function 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.backupdr.v1.FetchUsableBackupVaultsRequest(); + 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 FetchUsableBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchUsableBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchUsableBackupVaultsRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest + */ + FetchUsableBackupVaultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest(); + 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 FetchUsableBackupVaultsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + * @returns {Object.} JSON object + */ + FetchUsableBackupVaultsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchUsableBackupVaultsRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchUsableBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest"; + }; + + return FetchUsableBackupVaultsRequest; + })(); + + v1.FetchUsableBackupVaultsResponse = (function() { + + /** + * Properties of a FetchUsableBackupVaultsResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IFetchUsableBackupVaultsResponse + * @property {Array.|null} [backupVaults] FetchUsableBackupVaultsResponse backupVaults + * @property {string|null} [nextPageToken] FetchUsableBackupVaultsResponse nextPageToken + * @property {Array.|null} [unreachable] FetchUsableBackupVaultsResponse unreachable + */ + + /** + * Constructs a new FetchUsableBackupVaultsResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FetchUsableBackupVaultsResponse. + * @implements IFetchUsableBackupVaultsResponse + * @constructor + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse=} [properties] Properties to set + */ + function FetchUsableBackupVaultsResponse(properties) { + this.backupVaults = []; + 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]]; + } + + /** + * FetchUsableBackupVaultsResponse backupVaults. + * @member {Array.} backupVaults + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @instance + */ + FetchUsableBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; + + /** + * FetchUsableBackupVaultsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @instance + */ + FetchUsableBackupVaultsResponse.prototype.nextPageToken = ""; + + /** + * FetchUsableBackupVaultsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @instance + */ + FetchUsableBackupVaultsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new FetchUsableBackupVaultsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse instance + */ + FetchUsableBackupVaultsResponse.create = function create(properties) { + return new FetchUsableBackupVaultsResponse(properties); + }; + + /** + * Encodes the specified FetchUsableBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchUsableBackupVaultsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupVaults != null && message.backupVaults.length) + for (var i = 0; i < message.backupVaults.length; ++i) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVaults[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 FetchUsableBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchUsableBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchUsableBackupVaultsResponse.decode = function 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.backupdr.v1.FetchUsableBackupVaultsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backupVaults && message.backupVaults.length)) + message.backupVaults = []; + message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.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 FetchUsableBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchUsableBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchUsableBackupVaultsResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchUsableBackupVaultsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { + if (!Array.isArray(message.backupVaults)) + return "backupVaults: array expected"; + for (var i = 0; i < message.backupVaults.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVaults[i]); + if (error) + return "backupVaults." + 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 FetchUsableBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse + */ + FetchUsableBackupVaultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse(); + if (object.backupVaults) { + if (!Array.isArray(object.backupVaults)) + throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.backupVaults: array expected"); + message.backupVaults = []; + for (var i = 0; i < object.backupVaults.length; ++i) { + if (typeof object.backupVaults[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.backupVaults: object expected"); + message.backupVaults[i] = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVaults[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.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 FetchUsableBackupVaultsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchUsableBackupVaultsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupVaults = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backupVaults && message.backupVaults.length) { + object.backupVaults = []; + for (var j = 0; j < message.backupVaults.length; ++j) + object.backupVaults[j] = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVaults[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 FetchUsableBackupVaultsResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @instance + * @returns {Object.} JSON object + */ + FetchUsableBackupVaultsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchUsableBackupVaultsResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchUsableBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse"; + }; + + return FetchUsableBackupVaultsResponse; + })(); + + v1.GetBackupVaultRequest = (function() { + + /** + * Properties of a GetBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetBackupVaultRequest + * @property {string|null} [name] GetBackupVaultRequest name + * @property {google.cloud.backupdr.v1.BackupVaultView|null} [view] GetBackupVaultRequest view + */ + + /** + * Constructs a new GetBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetBackupVaultRequest. + * @implements IGetBackupVaultRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest=} [properties] Properties to set + */ + function GetBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupVaultRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @instance + */ + GetBackupVaultRequest.prototype.name = ""; + + /** + * GetBackupVaultRequest view. + * @member {google.cloud.backupdr.v1.BackupVaultView} view + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @instance + */ + GetBackupVaultRequest.prototype.view = 0; + + /** + * Creates a new GetBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest instance + */ + GetBackupVaultRequest.create = function create(properties) { + return new GetBackupVaultRequest(properties); + }; + + /** + * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupVaultRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupVaultRequest.decode = function 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.backupdr.v1.GetBackupVaultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupVaultRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupVaultRequest.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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest + */ + GetBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupVaultRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetBackupVaultRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VAULT_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VAULT_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VAULT_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.GetBackupVaultRequest} message GetBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "BACKUP_VAULT_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVaultView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupVaultView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupVaultRequest"; + }; + + return GetBackupVaultRequest; + })(); + + v1.UpdateBackupVaultRequest = (function() { + + /** + * Properties of an UpdateBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IUpdateBackupVaultRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupVaultRequest updateMask + * @property {google.cloud.backupdr.v1.IBackupVault|null} [backupVault] UpdateBackupVaultRequest backupVault + * @property {string|null} [requestId] UpdateBackupVaultRequest requestId + * @property {boolean|null} [validateOnly] UpdateBackupVaultRequest validateOnly + * @property {boolean|null} [force] UpdateBackupVaultRequest force + */ + + /** + * Constructs a new UpdateBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an UpdateBackupVaultRequest. + * @implements IUpdateBackupVaultRequest + * @constructor + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest=} [properties] Properties to set + */ + function UpdateBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateBackupVaultRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.updateMask = null; + + /** + * UpdateBackupVaultRequest backupVault. + * @member {google.cloud.backupdr.v1.IBackupVault|null|undefined} backupVault + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.backupVault = null; + + /** + * UpdateBackupVaultRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.requestId = ""; + + /** + * UpdateBackupVaultRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.validateOnly = false; + + /** + * UpdateBackupVaultRequest force. + * @member {boolean} force + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.force = false; + + /** + * Creates a new UpdateBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest instance + */ + UpdateBackupVaultRequest.create = function create(properties) { + return new UpdateBackupVaultRequest(properties); + }; + + /** + * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupVaultRequest.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.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVault, 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 UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupVaultRequest.decode = function 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.backupdr.v1.UpdateBackupVaultRequest(); + 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.backupVault = $root.google.cloud.backupdr.v1.BackupVault.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 UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateBackupVaultRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateBackupVaultRequest.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.backupVault != null && message.hasOwnProperty("backupVault")) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault); + if (error) + return "backupVault." + 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 UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest + */ + UpdateBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupVaultRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.backupVault != null) { + if (typeof object.backupVault !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupVaultRequest.backupVault: object expected"); + message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVault); + } + 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 UpdateBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.UpdateBackupVaultRequest} message UpdateBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.backupVault = 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.backupVault != null && message.hasOwnProperty("backupVault")) + object.backupVault = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVault, 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 UpdateBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupVaultRequest"; + }; + + return UpdateBackupVaultRequest; + })(); + + v1.DeleteBackupVaultRequest = (function() { + + /** + * Properties of a DeleteBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IDeleteBackupVaultRequest + * @property {string|null} [name] DeleteBackupVaultRequest name + * @property {string|null} [requestId] DeleteBackupVaultRequest requestId + * @property {boolean|null} [force] DeleteBackupVaultRequest force + * @property {string|null} [etag] DeleteBackupVaultRequest etag + * @property {boolean|null} [validateOnly] DeleteBackupVaultRequest validateOnly + * @property {boolean|null} [allowMissing] DeleteBackupVaultRequest allowMissing + */ + + /** + * Constructs a new DeleteBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DeleteBackupVaultRequest. + * @implements IDeleteBackupVaultRequest + * @constructor + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest=} [properties] Properties to set + */ + function DeleteBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupVaultRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.name = ""; + + /** + * DeleteBackupVaultRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.requestId = ""; + + /** + * DeleteBackupVaultRequest force. + * @member {boolean} force + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.force = false; + + /** + * DeleteBackupVaultRequest etag. + * @member {string} etag + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.etag = ""; + + /** + * DeleteBackupVaultRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.validateOnly = false; + + /** + * DeleteBackupVaultRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.allowMissing = false; + + /** + * Creates a new DeleteBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest instance + */ + DeleteBackupVaultRequest.create = function create(properties) { + return new DeleteBackupVaultRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupVaultRequest.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); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.allowMissing); + return writer; + }; + + /** + * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupVaultRequest.decode = function 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.backupdr.v1.DeleteBackupVaultRequest(); + 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; + } + case 4: { + message.etag = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } + case 6: { + message.allowMissing = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupVaultRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupVaultRequest.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"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + return null; + }; + + /** + * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest + */ + DeleteBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest(); + 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); + if (object.etag != null) + message.etag = String(object.etag); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + return message; + }; + + /** + * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.DeleteBackupVaultRequest} message DeleteBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + object.force = false; + object.etag = ""; + object.validateOnly = false; + object.allowMissing = 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; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + return object; + }; + + /** + * Converts this DeleteBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupVaultRequest"; + }; + + return DeleteBackupVaultRequest; + })(); + + v1.ListDataSourcesRequest = (function() { + + /** + * Properties of a ListDataSourcesRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListDataSourcesRequest + * @property {string|null} [parent] ListDataSourcesRequest parent + * @property {number|null} [pageSize] ListDataSourcesRequest pageSize + * @property {string|null} [pageToken] ListDataSourcesRequest pageToken + * @property {string|null} [filter] ListDataSourcesRequest filter + * @property {string|null} [orderBy] ListDataSourcesRequest orderBy + */ + + /** + * Constructs a new ListDataSourcesRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListDataSourcesRequest. + * @implements IListDataSourcesRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest=} [properties] Properties to set + */ + function ListDataSourcesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataSourcesRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.parent = ""; + + /** + * ListDataSourcesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.pageSize = 0; + + /** + * ListDataSourcesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.pageToken = ""; + + /** + * ListDataSourcesRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.filter = ""; + + /** + * ListDataSourcesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListDataSourcesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest instance + */ + ListDataSourcesRequest.create = function create(properties) { + return new ListDataSourcesRequest(properties); + }; + + /** + * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesRequest.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 ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataSourcesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesRequest.decode = function 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.backupdr.v1.ListDataSourcesRequest(); + 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 ListDataSourcesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataSourcesRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataSourcesRequest.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 ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest + */ + ListDataSourcesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListDataSourcesRequest(); + 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 ListDataSourcesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.backupdr.v1.ListDataSourcesRequest} message ListDataSourcesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataSourcesRequest.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 ListDataSourcesRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataSourcesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataSourcesRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataSourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourcesRequest"; + }; + + return ListDataSourcesRequest; + })(); + + v1.ListDataSourcesResponse = (function() { + + /** + * Properties of a ListDataSourcesResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListDataSourcesResponse + * @property {Array.|null} [dataSources] ListDataSourcesResponse dataSources + * @property {string|null} [nextPageToken] ListDataSourcesResponse nextPageToken + * @property {Array.|null} [unreachable] ListDataSourcesResponse unreachable + */ + + /** + * Constructs a new ListDataSourcesResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListDataSourcesResponse. + * @implements IListDataSourcesResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse=} [properties] Properties to set + */ + function ListDataSourcesResponse(properties) { + this.dataSources = []; + 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]]; + } + + /** + * ListDataSourcesResponse dataSources. + * @member {Array.} dataSources + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @instance + */ + ListDataSourcesResponse.prototype.dataSources = $util.emptyArray; + + /** + * ListDataSourcesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @instance + */ + ListDataSourcesResponse.prototype.nextPageToken = ""; + + /** + * ListDataSourcesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @instance + */ + ListDataSourcesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListDataSourcesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse instance + */ + ListDataSourcesResponse.create = function create(properties) { + return new ListDataSourcesResponse(properties); + }; + + /** + * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSources != null && message.dataSources.length) + for (var i = 0; i < message.dataSources.length; ++i) + $root.google.cloud.backupdr.v1.DataSource.encode(message.dataSources[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 ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataSourcesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesResponse.decode = function 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.backupdr.v1.ListDataSourcesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataSources && message.dataSources.length)) + message.dataSources = []; + message.dataSources.push($root.google.cloud.backupdr.v1.DataSource.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 ListDataSourcesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataSourcesResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataSourcesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSources != null && message.hasOwnProperty("dataSources")) { + if (!Array.isArray(message.dataSources)) + return "dataSources: array expected"; + for (var i = 0; i < message.dataSources.length; ++i) { + var error = $root.google.cloud.backupdr.v1.DataSource.verify(message.dataSources[i]); + if (error) + return "dataSources." + 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 ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse + */ + ListDataSourcesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListDataSourcesResponse(); + if (object.dataSources) { + if (!Array.isArray(object.dataSources)) + throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.dataSources: array expected"); + message.dataSources = []; + for (var i = 0; i < object.dataSources.length; ++i) { + if (typeof object.dataSources[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.dataSources: object expected"); + message.dataSources[i] = $root.google.cloud.backupdr.v1.DataSource.fromObject(object.dataSources[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.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 ListDataSourcesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.backupdr.v1.ListDataSourcesResponse} message ListDataSourcesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataSourcesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataSources = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.dataSources && message.dataSources.length) { + object.dataSources = []; + for (var j = 0; j < message.dataSources.length; ++j) + object.dataSources[j] = $root.google.cloud.backupdr.v1.DataSource.toObject(message.dataSources[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 ListDataSourcesResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataSourcesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataSourcesResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataSourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourcesResponse"; + }; + + return ListDataSourcesResponse; + })(); + + v1.GetDataSourceRequest = (function() { + + /** + * Properties of a GetDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetDataSourceRequest + * @property {string|null} [name] GetDataSourceRequest name + */ + + /** + * Constructs a new GetDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetDataSourceRequest. + * @implements IGetDataSourceRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest=} [properties] Properties to set + */ + function GetDataSourceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataSourceRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @instance + */ + GetDataSourceRequest.prototype.name = ""; + + /** + * Creates a new GetDataSourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest instance + */ + GetDataSourceRequest.create = function create(properties) { + return new GetDataSourceRequest(properties); + }; + + /** + * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataSourceRequest.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 GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataSourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataSourceRequest.decode = function 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.backupdr.v1.GetDataSourceRequest(); + 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 GetDataSourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataSourceRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataSourceRequest.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 GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest + */ + GetDataSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetDataSourceRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetDataSourceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.GetDataSourceRequest} message GetDataSourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataSourceRequest.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 GetDataSourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataSourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataSourceRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetDataSourceRequest"; + }; + + return GetDataSourceRequest; + })(); + + v1.UpdateDataSourceRequest = (function() { + + /** + * Properties of an UpdateDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IUpdateDataSourceRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataSourceRequest updateMask + * @property {google.cloud.backupdr.v1.IDataSource|null} [dataSource] UpdateDataSourceRequest dataSource + * @property {string|null} [requestId] UpdateDataSourceRequest requestId + * @property {boolean|null} [allowMissing] UpdateDataSourceRequest allowMissing + */ + + /** + * Constructs a new UpdateDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an UpdateDataSourceRequest. + * @implements IUpdateDataSourceRequest + * @constructor + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest=} [properties] Properties to set + */ + function UpdateDataSourceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDataSourceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + */ + UpdateDataSourceRequest.prototype.updateMask = null; + + /** + * UpdateDataSourceRequest dataSource. + * @member {google.cloud.backupdr.v1.IDataSource|null|undefined} dataSource + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + */ + UpdateDataSourceRequest.prototype.dataSource = null; + + /** + * UpdateDataSourceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + */ + UpdateDataSourceRequest.prototype.requestId = ""; + + /** + * UpdateDataSourceRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + */ + UpdateDataSourceRequest.prototype.allowMissing = false; + + /** + * Creates a new UpdateDataSourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest instance + */ + UpdateDataSourceRequest.create = function create(properties) { + return new UpdateDataSourceRequest(properties); + }; + + /** + * Encodes the specified UpdateDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} message UpdateDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataSourceRequest.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.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + $root.google.cloud.backupdr.v1.DataSource.encode(message.dataSource, 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.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowMissing); + return writer; + }; + + /** + * Encodes the specified UpdateDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} message UpdateDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataSourceRequest.decode = function 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.backupdr.v1.UpdateDataSourceRequest(); + 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.dataSource = $root.google.cloud.backupdr.v1.DataSource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + case 4: { + message.allowMissing = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDataSourceRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDataSourceRequest.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.dataSource != null && message.hasOwnProperty("dataSource")) { + var error = $root.google.cloud.backupdr.v1.DataSource.verify(message.dataSource); + if (error) + return "dataSource." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + return null; + }; + + /** + * Creates an UpdateDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest + */ + UpdateDataSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.UpdateDataSourceRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.UpdateDataSourceRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateDataSourceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.dataSource != null) { + if (typeof object.dataSource !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateDataSourceRequest.dataSource: object expected"); + message.dataSource = $root.google.cloud.backupdr.v1.DataSource.fromObject(object.dataSource); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + return message; + }; + + /** + * Creates a plain object from an UpdateDataSourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.UpdateDataSourceRequest} message UpdateDataSourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDataSourceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.dataSource = null; + object.requestId = ""; + object.allowMissing = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = $root.google.cloud.backupdr.v1.DataSource.toObject(message.dataSource, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + return object; + }; + + /** + * Converts this UpdateDataSourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDataSourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDataSourceRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateDataSourceRequest"; + }; + + return UpdateDataSourceRequest; + })(); + + v1.RemoveDataSourceRequest = (function() { + + /** + * Properties of a RemoveDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IRemoveDataSourceRequest + * @property {string|null} [name] RemoveDataSourceRequest name + * @property {string|null} [requestId] RemoveDataSourceRequest requestId + */ + + /** + * Constructs a new RemoveDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a RemoveDataSourceRequest. + * @implements IRemoveDataSourceRequest + * @constructor + * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest=} [properties] Properties to set + */ + function RemoveDataSourceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemoveDataSourceRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @instance + */ + RemoveDataSourceRequest.prototype.name = ""; + + /** + * RemoveDataSourceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @instance + */ + RemoveDataSourceRequest.prototype.requestId = ""; + + /** + * Creates a new RemoveDataSourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest instance + */ + RemoveDataSourceRequest.create = function create(properties) { + return new RemoveDataSourceRequest(properties); + }; + + /** + * Encodes the specified RemoveDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} message RemoveDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveDataSourceRequest.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 RemoveDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} message RemoveDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveDataSourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveDataSourceRequest.decode = function 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.backupdr.v1.RemoveDataSourceRequest(); + 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 RemoveDataSourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveDataSourceRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveDataSourceRequest.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 RemoveDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest + */ + RemoveDataSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RemoveDataSourceRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.RemoveDataSourceRequest(); + 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 RemoveDataSourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.RemoveDataSourceRequest} message RemoveDataSourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveDataSourceRequest.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 RemoveDataSourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @instance + * @returns {Object.} JSON object + */ + RemoveDataSourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemoveDataSourceRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.RemoveDataSourceRequest"; + }; + + return RemoveDataSourceRequest; + })(); + + v1.SetInternalStatusRequest = (function() { + + /** + * Properties of a SetInternalStatusRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ISetInternalStatusRequest + * @property {string|null} [dataSource] SetInternalStatusRequest dataSource + * @property {Uint8Array|null} [value] SetInternalStatusRequest value + * @property {google.cloud.backupdr.v1.BackupConfigState|null} [backupConfigState] SetInternalStatusRequest backupConfigState + * @property {string|null} [requestId] SetInternalStatusRequest requestId + */ + + /** + * Constructs a new SetInternalStatusRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a SetInternalStatusRequest. + * @implements ISetInternalStatusRequest + * @constructor + * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest=} [properties] Properties to set + */ + function SetInternalStatusRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetInternalStatusRequest dataSource. + * @member {string} dataSource + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @instance + */ + SetInternalStatusRequest.prototype.dataSource = ""; + + /** + * SetInternalStatusRequest value. + * @member {Uint8Array} value + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @instance + */ + SetInternalStatusRequest.prototype.value = $util.newBuffer([]); + + /** + * SetInternalStatusRequest backupConfigState. + * @member {google.cloud.backupdr.v1.BackupConfigState} backupConfigState + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @instance + */ + SetInternalStatusRequest.prototype.backupConfigState = 0; + + /** + * SetInternalStatusRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @instance + */ + SetInternalStatusRequest.prototype.requestId = ""; + + /** + * Creates a new SetInternalStatusRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest instance + */ + SetInternalStatusRequest.create = function create(properties) { + return new SetInternalStatusRequest(properties); + }; + + /** + * Encodes the specified SetInternalStatusRequest message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} message SetInternalStatusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetInternalStatusRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + if (message.backupConfigState != null && Object.hasOwnProperty.call(message, "backupConfigState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.backupConfigState); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified SetInternalStatusRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} message SetInternalStatusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetInternalStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetInternalStatusRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetInternalStatusRequest.decode = function 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.backupdr.v1.SetInternalStatusRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataSource = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + case 3: { + message.backupConfigState = reader.int32(); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetInternalStatusRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetInternalStatusRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetInternalStatusRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetInternalStatusRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: 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"; + if (message.backupConfigState != null && message.hasOwnProperty("backupConfigState")) + switch (message.backupConfigState) { + default: + return "backupConfigState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a SetInternalStatusRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest + */ + SetInternalStatusRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.SetInternalStatusRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.SetInternalStatusRequest(); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + 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; + switch (object.backupConfigState) { + default: + if (typeof object.backupConfigState === "number") { + message.backupConfigState = object.backupConfigState; + break; + } + break; + case "BACKUP_CONFIG_STATE_UNSPECIFIED": + case 0: + message.backupConfigState = 0; + break; + case "ACTIVE": + case 1: + message.backupConfigState = 1; + break; + case "PASSIVE": + case 2: + message.backupConfigState = 2; + break; + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a SetInternalStatusRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {google.cloud.backupdr.v1.SetInternalStatusRequest} message SetInternalStatusRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetInternalStatusRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataSource = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + object.backupConfigState = options.enums === String ? "BACKUP_CONFIG_STATE_UNSPECIFIED" : 0; + object.requestId = ""; + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + 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; + if (message.backupConfigState != null && message.hasOwnProperty("backupConfigState")) + object.backupConfigState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigState[message.backupConfigState] === undefined ? message.backupConfigState : $root.google.cloud.backupdr.v1.BackupConfigState[message.backupConfigState] : message.backupConfigState; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this SetInternalStatusRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @instance + * @returns {Object.} JSON object + */ + SetInternalStatusRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetInternalStatusRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetInternalStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.SetInternalStatusRequest"; + }; + + return SetInternalStatusRequest; + })(); + + v1.SetInternalStatusResponse = (function() { + + /** + * Properties of a SetInternalStatusResponse. + * @memberof google.cloud.backupdr.v1 + * @interface ISetInternalStatusResponse + */ + + /** + * Constructs a new SetInternalStatusResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a SetInternalStatusResponse. + * @implements ISetInternalStatusResponse + * @constructor + * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse=} [properties] Properties to set + */ + function SetInternalStatusResponse(properties) { + if (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 SetInternalStatusResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse instance + */ + SetInternalStatusResponse.create = function create(properties) { + return new SetInternalStatusResponse(properties); + }; + + /** + * Encodes the specified SetInternalStatusResponse message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse} message SetInternalStatusResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetInternalStatusResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified SetInternalStatusResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse} message SetInternalStatusResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetInternalStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetInternalStatusResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetInternalStatusResponse.decode = function 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.backupdr.v1.SetInternalStatusResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetInternalStatusResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetInternalStatusResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetInternalStatusResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetInternalStatusResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a SetInternalStatusResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse + */ + SetInternalStatusResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.SetInternalStatusResponse) + return object; + return new $root.google.cloud.backupdr.v1.SetInternalStatusResponse(); + }; + + /** + * Creates a plain object from a SetInternalStatusResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {google.cloud.backupdr.v1.SetInternalStatusResponse} message SetInternalStatusResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetInternalStatusResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SetInternalStatusResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @instance + * @returns {Object.} JSON object + */ + SetInternalStatusResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetInternalStatusResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetInternalStatusResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.SetInternalStatusResponse"; + }; + + return SetInternalStatusResponse; + })(); + + v1.InitiateBackupRequest = (function() { + + /** + * Properties of an InitiateBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IInitiateBackupRequest + * @property {string|null} [dataSource] InitiateBackupRequest dataSource + * @property {string|null} [requestId] InitiateBackupRequest requestId + * @property {string|null} [backupId] InitiateBackupRequest backupId + */ + + /** + * Constructs a new InitiateBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an InitiateBackupRequest. + * @implements IInitiateBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IInitiateBackupRequest=} [properties] Properties to set + */ + function InitiateBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InitiateBackupRequest dataSource. + * @member {string} dataSource + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @instance + */ + InitiateBackupRequest.prototype.dataSource = ""; + + /** + * InitiateBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @instance + */ + InitiateBackupRequest.prototype.requestId = ""; + + /** + * InitiateBackupRequest backupId. + * @member {string} backupId + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @instance + */ + InitiateBackupRequest.prototype.backupId = ""; + + /** + * Creates a new InitiateBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IInitiateBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest instance + */ + InitiateBackupRequest.create = function create(properties) { + return new InitiateBackupRequest(properties); + }; + + /** + * Encodes the specified InitiateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} message InitiateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitiateBackupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.backupId); + return writer; + }; + + /** + * Encodes the specified InitiateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} message InitiateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitiateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InitiateBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitiateBackupRequest.decode = function 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.backupdr.v1.InitiateBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataSource = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + case 5: { + message.backupId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InitiateBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitiateBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InitiateBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InitiateBackupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.backupId != null && message.hasOwnProperty("backupId")) + if (!$util.isString(message.backupId)) + return "backupId: string expected"; + return null; + }; + + /** + * Creates an InitiateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest + */ + InitiateBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.InitiateBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.InitiateBackupRequest(); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.backupId != null) + message.backupId = String(object.backupId); + return message; + }; + + /** + * Creates a plain object from an InitiateBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.InitiateBackupRequest} message InitiateBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InitiateBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataSource = ""; + object.requestId = ""; + object.backupId = ""; + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.backupId != null && message.hasOwnProperty("backupId")) + object.backupId = message.backupId; + return object; + }; + + /** + * Converts this InitiateBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @instance + * @returns {Object.} JSON object + */ + InitiateBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InitiateBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InitiateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.InitiateBackupRequest"; + }; + + return InitiateBackupRequest; + })(); + + v1.InitiateBackupResponse = (function() { + + /** + * Properties of an InitiateBackupResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IInitiateBackupResponse + * @property {string|null} [backup] InitiateBackupResponse backup + * @property {number|null} [newBackupGenerationId] InitiateBackupResponse newBackupGenerationId + * @property {number|null} [baseBackupGenerationId] InitiateBackupResponse baseBackupGenerationId + */ + + /** + * Constructs a new InitiateBackupResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an InitiateBackupResponse. + * @implements IInitiateBackupResponse + * @constructor + * @param {google.cloud.backupdr.v1.IInitiateBackupResponse=} [properties] Properties to set + */ + function InitiateBackupResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InitiateBackupResponse backup. + * @member {string} backup + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @instance + */ + InitiateBackupResponse.prototype.backup = ""; + + /** + * InitiateBackupResponse newBackupGenerationId. + * @member {number} newBackupGenerationId + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @instance + */ + InitiateBackupResponse.prototype.newBackupGenerationId = 0; + + /** + * InitiateBackupResponse baseBackupGenerationId. + * @member {number} baseBackupGenerationId + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @instance + */ + InitiateBackupResponse.prototype.baseBackupGenerationId = 0; + + /** + * Creates a new InitiateBackupResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IInitiateBackupResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse instance + */ + InitiateBackupResponse.create = function create(properties) { + return new InitiateBackupResponse(properties); + }; + + /** + * Encodes the specified InitiateBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IInitiateBackupResponse} message InitiateBackupResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitiateBackupResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backup); + if (message.newBackupGenerationId != null && Object.hasOwnProperty.call(message, "newBackupGenerationId")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.newBackupGenerationId); + if (message.baseBackupGenerationId != null && Object.hasOwnProperty.call(message, "baseBackupGenerationId")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.baseBackupGenerationId); + return writer; + }; + + /** + * Encodes the specified InitiateBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IInitiateBackupResponse} message InitiateBackupResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitiateBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InitiateBackupResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitiateBackupResponse.decode = function 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.backupdr.v1.InitiateBackupResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backup = reader.string(); + break; + } + case 2: { + message.newBackupGenerationId = reader.int32(); + break; + } + case 3: { + message.baseBackupGenerationId = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InitiateBackupResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitiateBackupResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InitiateBackupResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InitiateBackupResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backup != null && message.hasOwnProperty("backup")) + if (!$util.isString(message.backup)) + return "backup: string expected"; + if (message.newBackupGenerationId != null && message.hasOwnProperty("newBackupGenerationId")) + if (!$util.isInteger(message.newBackupGenerationId)) + return "newBackupGenerationId: integer expected"; + if (message.baseBackupGenerationId != null && message.hasOwnProperty("baseBackupGenerationId")) + if (!$util.isInteger(message.baseBackupGenerationId)) + return "baseBackupGenerationId: integer expected"; + return null; + }; + + /** + * Creates an InitiateBackupResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse + */ + InitiateBackupResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.InitiateBackupResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.InitiateBackupResponse(); + if (object.backup != null) + message.backup = String(object.backup); + if (object.newBackupGenerationId != null) + message.newBackupGenerationId = object.newBackupGenerationId | 0; + if (object.baseBackupGenerationId != null) + message.baseBackupGenerationId = object.baseBackupGenerationId | 0; + return message; + }; + + /** + * Creates a plain object from an InitiateBackupResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {google.cloud.backupdr.v1.InitiateBackupResponse} message InitiateBackupResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InitiateBackupResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.backup = ""; + object.newBackupGenerationId = 0; + object.baseBackupGenerationId = 0; + } + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = message.backup; + if (message.newBackupGenerationId != null && message.hasOwnProperty("newBackupGenerationId")) + object.newBackupGenerationId = message.newBackupGenerationId; + if (message.baseBackupGenerationId != null && message.hasOwnProperty("baseBackupGenerationId")) + object.baseBackupGenerationId = message.baseBackupGenerationId; + return object; + }; + + /** + * Converts this InitiateBackupResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @instance + * @returns {Object.} JSON object + */ + InitiateBackupResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InitiateBackupResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InitiateBackupResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.InitiateBackupResponse"; + }; + + return InitiateBackupResponse; + })(); + + v1.AbandonBackupRequest = (function() { + + /** + * Properties of an AbandonBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IAbandonBackupRequest + * @property {string|null} [dataSource] AbandonBackupRequest dataSource + * @property {string|null} [requestId] AbandonBackupRequest requestId + */ + + /** + * Constructs a new AbandonBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AbandonBackupRequest. + * @implements IAbandonBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IAbandonBackupRequest=} [properties] Properties to set + */ + function AbandonBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AbandonBackupRequest dataSource. + * @member {string} dataSource + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @instance + */ + AbandonBackupRequest.prototype.dataSource = ""; + + /** + * AbandonBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @instance + */ + AbandonBackupRequest.prototype.requestId = ""; + + /** + * Creates a new AbandonBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IAbandonBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest instance + */ + AbandonBackupRequest.create = function create(properties) { + return new AbandonBackupRequest(properties); + }; + + /** + * Encodes the specified AbandonBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} message AbandonBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AbandonBackupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified AbandonBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} message AbandonBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AbandonBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AbandonBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AbandonBackupRequest.decode = function 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.backupdr.v1.AbandonBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataSource = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AbandonBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AbandonBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AbandonBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AbandonBackupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an AbandonBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest + */ + AbandonBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AbandonBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.AbandonBackupRequest(); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an AbandonBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {google.cloud.backupdr.v1.AbandonBackupRequest} message AbandonBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AbandonBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataSource = ""; + object.requestId = ""; + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this AbandonBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @instance + * @returns {Object.} JSON object + */ + AbandonBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AbandonBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AbandonBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AbandonBackupRequest"; + }; + + return AbandonBackupRequest; + })(); + + v1.FinalizeBackupRequest = (function() { + + /** + * Properties of a FinalizeBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IFinalizeBackupRequest + * @property {string|null} [dataSource] FinalizeBackupRequest dataSource + * @property {string|null} [description] FinalizeBackupRequest description + * @property {google.protobuf.ITimestamp|null} [consistencyTime] FinalizeBackupRequest consistencyTime + * @property {string|null} [requestId] FinalizeBackupRequest requestId + * @property {string|null} [backupId] FinalizeBackupRequest backupId + * @property {google.protobuf.ITimestamp|null} [recoveryRangeStartTime] FinalizeBackupRequest recoveryRangeStartTime + * @property {google.protobuf.ITimestamp|null} [recoveryRangeEndTime] FinalizeBackupRequest recoveryRangeEndTime + * @property {google.protobuf.IDuration|null} [retentionDuration] FinalizeBackupRequest retentionDuration + */ + + /** + * Constructs a new FinalizeBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FinalizeBackupRequest. + * @implements IFinalizeBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest=} [properties] Properties to set + */ + function FinalizeBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FinalizeBackupRequest dataSource. + * @member {string} dataSource + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.dataSource = ""; + + /** + * FinalizeBackupRequest description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.description = null; + + /** + * FinalizeBackupRequest consistencyTime. + * @member {google.protobuf.ITimestamp|null|undefined} consistencyTime + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.consistencyTime = null; + + /** + * FinalizeBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.requestId = ""; + + /** + * FinalizeBackupRequest backupId. + * @member {string} backupId + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.backupId = ""; + + /** + * FinalizeBackupRequest recoveryRangeStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeStartTime + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.recoveryRangeStartTime = null; + + /** + * FinalizeBackupRequest recoveryRangeEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeEndTime + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.recoveryRangeEndTime = null; + + /** + * FinalizeBackupRequest retentionDuration. + * @member {google.protobuf.IDuration|null|undefined} retentionDuration + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + FinalizeBackupRequest.prototype.retentionDuration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FinalizeBackupRequest _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + Object.defineProperty(FinalizeBackupRequest.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FinalizeBackupRequest _consistencyTime. + * @member {"consistencyTime"|undefined} _consistencyTime + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + Object.defineProperty(FinalizeBackupRequest.prototype, "_consistencyTime", { + get: $util.oneOfGetter($oneOfFields = ["consistencyTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FinalizeBackupRequest _recoveryRangeStartTime. + * @member {"recoveryRangeStartTime"|undefined} _recoveryRangeStartTime + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + Object.defineProperty(FinalizeBackupRequest.prototype, "_recoveryRangeStartTime", { + get: $util.oneOfGetter($oneOfFields = ["recoveryRangeStartTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FinalizeBackupRequest _recoveryRangeEndTime. + * @member {"recoveryRangeEndTime"|undefined} _recoveryRangeEndTime + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + Object.defineProperty(FinalizeBackupRequest.prototype, "_recoveryRangeEndTime", { + get: $util.oneOfGetter($oneOfFields = ["recoveryRangeEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * FinalizeBackupRequest _retentionDuration. + * @member {"retentionDuration"|undefined} _retentionDuration + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + */ + Object.defineProperty(FinalizeBackupRequest.prototype, "_retentionDuration", { + get: $util.oneOfGetter($oneOfFields = ["retentionDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FinalizeBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest instance + */ + FinalizeBackupRequest.create = function create(properties) { + return new FinalizeBackupRequest(properties); + }; + + /** + * Encodes the specified FinalizeBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} message FinalizeBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FinalizeBackupRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.consistencyTime != null && Object.hasOwnProperty.call(message, "consistencyTime")) + $root.google.protobuf.Timestamp.encode(message.consistencyTime, 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.backupId != null && Object.hasOwnProperty.call(message, "backupId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.backupId); + if (message.recoveryRangeStartTime != null && Object.hasOwnProperty.call(message, "recoveryRangeStartTime")) + $root.google.protobuf.Timestamp.encode(message.recoveryRangeStartTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.recoveryRangeEndTime != null && Object.hasOwnProperty.call(message, "recoveryRangeEndTime")) + $root.google.protobuf.Timestamp.encode(message.recoveryRangeEndTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.retentionDuration != null && Object.hasOwnProperty.call(message, "retentionDuration")) + $root.google.protobuf.Duration.encode(message.retentionDuration, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FinalizeBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} message FinalizeBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FinalizeBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FinalizeBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FinalizeBackupRequest.decode = function 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.backupdr.v1.FinalizeBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataSource = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.consistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.backupId = reader.string(); + break; + } + case 6: { + message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.retentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FinalizeBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FinalizeBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FinalizeBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FinalizeBackupRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { + properties._consistencyTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.consistencyTime); + if (error) + return "consistencyTime." + error; + } + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.backupId != null && message.hasOwnProperty("backupId")) + if (!$util.isString(message.backupId)) + return "backupId: string expected"; + if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { + properties._recoveryRangeStartTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeStartTime); + if (error) + return "recoveryRangeStartTime." + error; + } + } + if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { + properties._recoveryRangeEndTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeEndTime); + if (error) + return "recoveryRangeEndTime." + error; + } + } + if (message.retentionDuration != null && message.hasOwnProperty("retentionDuration")) { + properties._retentionDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.retentionDuration); + if (error) + return "retentionDuration." + error; + } + } + return null; + }; + + /** + * Creates a FinalizeBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest + */ + FinalizeBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FinalizeBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.FinalizeBackupRequest(); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + if (object.description != null) + message.description = String(object.description); + if (object.consistencyTime != null) { + if (typeof object.consistencyTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.consistencyTime: object expected"); + message.consistencyTime = $root.google.protobuf.Timestamp.fromObject(object.consistencyTime); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.backupId != null) + message.backupId = String(object.backupId); + if (object.recoveryRangeStartTime != null) { + if (typeof object.recoveryRangeStartTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.recoveryRangeStartTime: object expected"); + message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeStartTime); + } + if (object.recoveryRangeEndTime != null) { + if (typeof object.recoveryRangeEndTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.recoveryRangeEndTime: object expected"); + message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeEndTime); + } + if (object.retentionDuration != null) { + if (typeof object.retentionDuration !== "object") + throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.retentionDuration: object expected"); + message.retentionDuration = $root.google.protobuf.Duration.fromObject(object.retentionDuration); + } + return message; + }; + + /** + * Creates a plain object from a FinalizeBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {google.cloud.backupdr.v1.FinalizeBackupRequest} message FinalizeBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FinalizeBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataSource = ""; + object.requestId = ""; + object.backupId = ""; + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { + object.consistencyTime = $root.google.protobuf.Timestamp.toObject(message.consistencyTime, options); + if (options.oneofs) + object._consistencyTime = "consistencyTime"; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.backupId != null && message.hasOwnProperty("backupId")) + object.backupId = message.backupId; + if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { + object.recoveryRangeStartTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeStartTime, options); + if (options.oneofs) + object._recoveryRangeStartTime = "recoveryRangeStartTime"; + } + if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { + object.recoveryRangeEndTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeEndTime, options); + if (options.oneofs) + object._recoveryRangeEndTime = "recoveryRangeEndTime"; + } + if (message.retentionDuration != null && message.hasOwnProperty("retentionDuration")) { + object.retentionDuration = $root.google.protobuf.Duration.toObject(message.retentionDuration, options); + if (options.oneofs) + object._retentionDuration = "retentionDuration"; + } + return object; + }; + + /** + * Converts this FinalizeBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @instance + * @returns {Object.} JSON object + */ + FinalizeBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FinalizeBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FinalizeBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FinalizeBackupRequest"; + }; + + return FinalizeBackupRequest; + })(); + + v1.FetchAccessTokenRequest = (function() { + + /** + * Properties of a FetchAccessTokenRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IFetchAccessTokenRequest + * @property {string|null} [name] FetchAccessTokenRequest name + * @property {number|null} [generationId] FetchAccessTokenRequest generationId + */ + + /** + * Constructs a new FetchAccessTokenRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FetchAccessTokenRequest. + * @implements IFetchAccessTokenRequest + * @constructor + * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest=} [properties] Properties to set + */ + function FetchAccessTokenRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchAccessTokenRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @instance + */ + FetchAccessTokenRequest.prototype.name = ""; + + /** + * FetchAccessTokenRequest generationId. + * @member {number} generationId + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @instance + */ + FetchAccessTokenRequest.prototype.generationId = 0; + + /** + * Creates a new FetchAccessTokenRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest instance + */ + FetchAccessTokenRequest.create = function create(properties) { + return new FetchAccessTokenRequest(properties); + }; + + /** + * Encodes the specified FetchAccessTokenRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} message FetchAccessTokenRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchAccessTokenRequest.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.generationId != null && Object.hasOwnProperty.call(message, "generationId")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.generationId); + return writer; + }; + + /** + * Encodes the specified FetchAccessTokenRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} message FetchAccessTokenRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchAccessTokenRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchAccessTokenRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchAccessTokenRequest.decode = function 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.backupdr.v1.FetchAccessTokenRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.generationId = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchAccessTokenRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchAccessTokenRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchAccessTokenRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchAccessTokenRequest.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.generationId != null && message.hasOwnProperty("generationId")) + if (!$util.isInteger(message.generationId)) + return "generationId: integer expected"; + return null; + }; + + /** + * Creates a FetchAccessTokenRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest + */ + FetchAccessTokenRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchAccessTokenRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.FetchAccessTokenRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.generationId != null) + message.generationId = object.generationId | 0; + return message; + }; + + /** + * Creates a plain object from a FetchAccessTokenRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {google.cloud.backupdr.v1.FetchAccessTokenRequest} message FetchAccessTokenRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchAccessTokenRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.generationId = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.generationId != null && message.hasOwnProperty("generationId")) + object.generationId = message.generationId; + return object; + }; + + /** + * Converts this FetchAccessTokenRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @instance + * @returns {Object.} JSON object + */ + FetchAccessTokenRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchAccessTokenRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchAccessTokenRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchAccessTokenRequest"; + }; + + return FetchAccessTokenRequest; + })(); + + v1.FetchAccessTokenResponse = (function() { + + /** + * Properties of a FetchAccessTokenResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IFetchAccessTokenResponse + * @property {string|null} [readLocation] FetchAccessTokenResponse readLocation + * @property {string|null} [writeLocation] FetchAccessTokenResponse writeLocation + * @property {string|null} [token] FetchAccessTokenResponse token + * @property {google.protobuf.ITimestamp|null} [expireTime] FetchAccessTokenResponse expireTime + */ + + /** + * Constructs a new FetchAccessTokenResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FetchAccessTokenResponse. + * @implements IFetchAccessTokenResponse + * @constructor + * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse=} [properties] Properties to set + */ + function FetchAccessTokenResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchAccessTokenResponse readLocation. + * @member {string} readLocation + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @instance + */ + FetchAccessTokenResponse.prototype.readLocation = ""; + + /** + * FetchAccessTokenResponse writeLocation. + * @member {string} writeLocation + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @instance + */ + FetchAccessTokenResponse.prototype.writeLocation = ""; + + /** + * FetchAccessTokenResponse token. + * @member {string} token + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @instance + */ + FetchAccessTokenResponse.prototype.token = ""; + + /** + * FetchAccessTokenResponse expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @instance + */ + FetchAccessTokenResponse.prototype.expireTime = null; + + /** + * Creates a new FetchAccessTokenResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse instance + */ + FetchAccessTokenResponse.create = function create(properties) { + return new FetchAccessTokenResponse(properties); + }; + + /** + * Encodes the specified FetchAccessTokenResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse} message FetchAccessTokenResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchAccessTokenResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.readLocation != null && Object.hasOwnProperty.call(message, "readLocation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.readLocation); + if (message.writeLocation != null && Object.hasOwnProperty.call(message, "writeLocation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.writeLocation); + if (message.token != null && Object.hasOwnProperty.call(message, "token")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.token); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FetchAccessTokenResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse} message FetchAccessTokenResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchAccessTokenResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchAccessTokenResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchAccessTokenResponse.decode = function 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.backupdr.v1.FetchAccessTokenResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.readLocation = reader.string(); + break; + } + case 2: { + message.writeLocation = reader.string(); + break; + } + case 3: { + message.token = reader.string(); + break; + } + case 4: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchAccessTokenResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchAccessTokenResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchAccessTokenResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchAccessTokenResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.readLocation != null && message.hasOwnProperty("readLocation")) + if (!$util.isString(message.readLocation)) + return "readLocation: string expected"; + if (message.writeLocation != null && message.hasOwnProperty("writeLocation")) + if (!$util.isString(message.writeLocation)) + return "writeLocation: string expected"; + if (message.token != null && message.hasOwnProperty("token")) + if (!$util.isString(message.token)) + return "token: string expected"; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + return null; + }; + + /** + * Creates a FetchAccessTokenResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse + */ + FetchAccessTokenResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchAccessTokenResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.FetchAccessTokenResponse(); + if (object.readLocation != null) + message.readLocation = String(object.readLocation); + if (object.writeLocation != null) + message.writeLocation = String(object.writeLocation); + if (object.token != null) + message.token = String(object.token); + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.FetchAccessTokenResponse.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + return message; + }; + + /** + * Creates a plain object from a FetchAccessTokenResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {google.cloud.backupdr.v1.FetchAccessTokenResponse} message FetchAccessTokenResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchAccessTokenResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.readLocation = ""; + object.writeLocation = ""; + object.token = ""; + object.expireTime = null; + } + if (message.readLocation != null && message.hasOwnProperty("readLocation")) + object.readLocation = message.readLocation; + if (message.writeLocation != null && message.hasOwnProperty("writeLocation")) + object.writeLocation = message.writeLocation; + if (message.token != null && message.hasOwnProperty("token")) + object.token = message.token; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + return object; + }; + + /** + * Converts this FetchAccessTokenResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @instance + * @returns {Object.} JSON object + */ + FetchAccessTokenResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchAccessTokenResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchAccessTokenResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchAccessTokenResponse"; + }; + + return FetchAccessTokenResponse; + })(); + + v1.ListBackupsRequest = (function() { + + /** + * Properties of a ListBackupsRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupsRequest + * @property {string|null} [parent] ListBackupsRequest parent + * @property {number|null} [pageSize] ListBackupsRequest pageSize + * @property {string|null} [pageToken] ListBackupsRequest pageToken + * @property {string|null} [filter] ListBackupsRequest filter + * @property {string|null} [orderBy] ListBackupsRequest orderBy + * @property {google.cloud.backupdr.v1.BackupView|null} [view] ListBackupsRequest view + */ + + /** + * Constructs a new ListBackupsRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupsRequest. + * @implements IListBackupsRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set + */ + function ListBackupsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupsRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.parent = ""; + + /** + * ListBackupsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.pageSize = 0; + + /** + * ListBackupsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.pageToken = ""; + + /** + * ListBackupsRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.filter = ""; + + /** + * ListBackupsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.orderBy = ""; + + /** + * ListBackupsRequest view. + * @member {google.cloud.backupdr.v1.BackupView} view + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.view = 0; + + /** + * Creates a new ListBackupsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest instance + */ + ListBackupsRequest.create = function create(properties) { + return new ListBackupsRequest(properties); + }; + + /** + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsRequest.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); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); + return writer; + }; + + /** + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsRequest.decode = function 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.backupdr.v1.ListBackupsRequest(); + 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; + } + case 6: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupsRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupsRequest.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"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest + */ + ListBackupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupsRequest(); + 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); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {google.cloud.backupdr.v1.ListBackupsRequest} message ListBackupsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; + } + 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; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; + return object; + }; + + /** + * Converts this ListBackupsRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupsRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsRequest"; + }; + + return ListBackupsRequest; + })(); + + v1.ListBackupsResponse = (function() { + + /** + * Properties of a ListBackupsResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupsResponse + * @property {Array.|null} [backups] ListBackupsResponse backups + * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupsResponse unreachable + */ + + /** + * Constructs a new ListBackupsResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupsResponse. + * @implements IListBackupsResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set + */ + function ListBackupsResponse(properties) { + this.backups = []; + 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]]; + } + + /** + * ListBackupsResponse backups. + * @member {Array.} backups + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.backups = $util.emptyArray; + + /** + * ListBackupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.nextPageToken = ""; + + /** + * ListBackupsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse instance + */ + ListBackupsResponse.create = function create(properties) { + return new ListBackupsResponse(properties); + }; + + /** + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backups != null && message.backups.length) + for (var i = 0; i < message.backups.length; ++i) + $root.google.cloud.backupdr.v1.Backup.encode(message.backups[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 ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsResponse.decode = function 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.backupdr.v1.ListBackupsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backups && message.backups.length)) + message.backups = []; + message.backups.push($root.google.cloud.backupdr.v1.Backup.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 ListBackupsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupsResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backups != null && message.hasOwnProperty("backups")) { + if (!Array.isArray(message.backups)) + return "backups: array expected"; + for (var i = 0; i < message.backups.length; ++i) { + var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backups[i]); + if (error) + return "backups." + 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 ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse + */ + ListBackupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupsResponse(); + if (object.backups) { + if (!Array.isArray(object.backups)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: array expected"); + message.backups = []; + for (var i = 0; i < object.backups.length; ++i) { + if (typeof object.backups[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: object expected"); + message.backups[i] = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backups[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.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 ListBackupsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {google.cloud.backupdr.v1.ListBackupsResponse} message ListBackupsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backups = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backups && message.backups.length) { + object.backups = []; + for (var j = 0; j < message.backups.length; ++j) + object.backups[j] = $root.google.cloud.backupdr.v1.Backup.toObject(message.backups[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 ListBackupsResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupsResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsResponse"; + }; + + return ListBackupsResponse; + })(); + + v1.GetBackupRequest = (function() { + + /** + * Properties of a GetBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetBackupRequest + * @property {string|null} [name] GetBackupRequest name + * @property {google.cloud.backupdr.v1.BackupView|null} [view] GetBackupRequest view + */ + + /** + * Constructs a new GetBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetBackupRequest. + * @implements IGetBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set + */ + function GetBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @instance + */ + GetBackupRequest.prototype.name = ""; + + /** + * GetBackupRequest view. + * @member {google.cloud.backupdr.v1.BackupView} view + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @instance + */ + GetBackupRequest.prototype.view = 0; + + /** + * Creates a new GetBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest instance + */ + GetBackupRequest.create = function create(properties) { + return new GetBackupRequest(properties); + }; + + /** + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupRequest.decode = function 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.backupdr.v1.GetBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupRequest.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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest + */ + GetBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetBackupRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {google.cloud.backupdr.v1.GetBackupRequest} message GetBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupRequest"; + }; + + return GetBackupRequest; + })(); + + v1.UpdateBackupRequest = (function() { + + /** + * Properties of an UpdateBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IUpdateBackupRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupRequest updateMask + * @property {google.cloud.backupdr.v1.IBackup|null} [backup] UpdateBackupRequest backup + * @property {string|null} [requestId] UpdateBackupRequest requestId + */ + + /** + * Constructs a new UpdateBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an UpdateBackupRequest. + * @implements IUpdateBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set + */ + function UpdateBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateBackupRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @instance + */ + UpdateBackupRequest.prototype.updateMask = null; + + /** + * UpdateBackupRequest backup. + * @member {google.cloud.backupdr.v1.IBackup|null|undefined} backup + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @instance + */ + UpdateBackupRequest.prototype.backup = null; + + /** + * UpdateBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @instance + */ + UpdateBackupRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest instance + */ + UpdateBackupRequest.create = function create(properties) { + return new UpdateBackupRequest(properties); + }; + + /** + * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupRequest.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.backup != null && Object.hasOwnProperty.call(message, "backup")) + $root.google.cloud.backupdr.v1.Backup.encode(message.backup, 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 UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupRequest.decode = function 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.backupdr.v1.UpdateBackupRequest(); + 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.backup = $root.google.cloud.backupdr.v1.Backup.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateBackupRequest.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.backup != null && message.hasOwnProperty("backup")) { + var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backup); + if (error) + return "backup." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest + */ + UpdateBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.UpdateBackupRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.backup != null) { + if (typeof object.backup !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.backup: object expected"); + message.backup = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backup); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.UpdateBackupRequest} message UpdateBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.backup = null; + object.requestId = ""; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = $root.google.cloud.backupdr.v1.Backup.toObject(message.backup, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupRequest"; + }; + + return UpdateBackupRequest; + })(); + + v1.DeleteBackupRequest = (function() { + + /** + * Properties of a DeleteBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IDeleteBackupRequest + * @property {string|null} [name] DeleteBackupRequest name + * @property {string|null} [requestId] DeleteBackupRequest requestId + */ + + /** + * Constructs a new DeleteBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DeleteBackupRequest. + * @implements IDeleteBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set + */ + function DeleteBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @instance + */ + DeleteBackupRequest.prototype.name = ""; + + /** + * DeleteBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @instance + */ + DeleteBackupRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest instance + */ + DeleteBackupRequest.create = function create(properties) { + return new DeleteBackupRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupRequest.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 DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupRequest.decode = function 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.backupdr.v1.DeleteBackupRequest(); + 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 DeleteBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupRequest.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 DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest + */ + DeleteBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.DeleteBackupRequest(); + 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 DeleteBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {google.cloud.backupdr.v1.DeleteBackupRequest} message DeleteBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupRequest.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 DeleteBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupRequest"; + }; + + return DeleteBackupRequest; + })(); + + v1.RestoreBackupRequest = (function() { + + /** + * Properties of a RestoreBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IRestoreBackupRequest + * @property {string|null} [name] RestoreBackupRequest name + * @property {string|null} [requestId] RestoreBackupRequest requestId + * @property {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null} [computeInstanceTargetEnvironment] RestoreBackupRequest computeInstanceTargetEnvironment + * @property {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null} [computeInstanceRestoreProperties] RestoreBackupRequest computeInstanceRestoreProperties + */ + + /** + * Constructs a new RestoreBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a RestoreBackupRequest. + * @implements IRestoreBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set + */ + function RestoreBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestoreBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.name = ""; + + /** + * RestoreBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.requestId = ""; + + /** + * RestoreBackupRequest computeInstanceTargetEnvironment. + * @member {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null|undefined} computeInstanceTargetEnvironment + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.computeInstanceTargetEnvironment = null; + + /** + * RestoreBackupRequest computeInstanceRestoreProperties. + * @member {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null|undefined} computeInstanceRestoreProperties + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.computeInstanceRestoreProperties = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RestoreBackupRequest targetEnvironment. + * @member {"computeInstanceTargetEnvironment"|undefined} targetEnvironment + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + Object.defineProperty(RestoreBackupRequest.prototype, "targetEnvironment", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceTargetEnvironment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RestoreBackupRequest instanceProperties. + * @member {"computeInstanceRestoreProperties"|undefined} instanceProperties + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + Object.defineProperty(RestoreBackupRequest.prototype, "instanceProperties", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceRestoreProperties"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RestoreBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest instance + */ + RestoreBackupRequest.create = function create(properties) { + return new RestoreBackupRequest(properties); + }; + + /** + * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupRequest.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.computeInstanceTargetEnvironment != null && Object.hasOwnProperty.call(message, "computeInstanceTargetEnvironment")) + $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.encode(message.computeInstanceTargetEnvironment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.computeInstanceRestoreProperties != null && Object.hasOwnProperty.call(message, "computeInstanceRestoreProperties")) + $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.encode(message.computeInstanceRestoreProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestoreBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupRequest.decode = function 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.backupdr.v1.RestoreBackupRequest(); + 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.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestoreBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreBackupRequest.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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { + properties.targetEnvironment = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify(message.computeInstanceTargetEnvironment); + if (error) + return "computeInstanceTargetEnvironment." + error; + } + } + if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { + properties.instanceProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify(message.computeInstanceRestoreProperties); + if (error) + return "computeInstanceRestoreProperties." + error; + } + } + return null; + }; + + /** + * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest + */ + RestoreBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.RestoreBackupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.computeInstanceTargetEnvironment != null) { + if (typeof object.computeInstanceTargetEnvironment !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceTargetEnvironment: object expected"); + message.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.fromObject(object.computeInstanceTargetEnvironment); + } + if (object.computeInstanceRestoreProperties != null) { + if (typeof object.computeInstanceRestoreProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceRestoreProperties: object expected"); + message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.fromObject(object.computeInstanceRestoreProperties); + } + return message; + }; + + /** + * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {google.cloud.backupdr.v1.RestoreBackupRequest} message RestoreBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestoreBackupRequest.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; + if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { + object.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.toObject(message.computeInstanceTargetEnvironment, options); + if (options.oneofs) + object.targetEnvironment = "computeInstanceTargetEnvironment"; + } + if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { + object.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.toObject(message.computeInstanceRestoreProperties, options); + if (options.oneofs) + object.instanceProperties = "computeInstanceRestoreProperties"; + } + return object; + }; + + /** + * Converts this RestoreBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + * @returns {Object.} JSON object + */ + RestoreBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestoreBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestoreBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupRequest"; + }; + + return RestoreBackupRequest; + })(); + + v1.RestoreBackupResponse = (function() { + + /** + * Properties of a RestoreBackupResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IRestoreBackupResponse + * @property {google.cloud.backupdr.v1.ITargetResource|null} [targetResource] RestoreBackupResponse targetResource + */ + + /** + * Constructs a new RestoreBackupResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a RestoreBackupResponse. + * @implements IRestoreBackupResponse + * @constructor + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set + */ + function RestoreBackupResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestoreBackupResponse targetResource. + * @member {google.cloud.backupdr.v1.ITargetResource|null|undefined} targetResource + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @instance + */ + RestoreBackupResponse.prototype.targetResource = null; + + /** + * Creates a new RestoreBackupResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse instance + */ + RestoreBackupResponse.create = function create(properties) { + return new RestoreBackupResponse(properties); + }; + + /** + * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetResource != null && Object.hasOwnProperty.call(message, "targetResource")) + $root.google.cloud.backupdr.v1.TargetResource.encode(message.targetResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestoreBackupResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupResponse.decode = function 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.backupdr.v1.RestoreBackupResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestoreBackupResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreBackupResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetResource != null && message.hasOwnProperty("targetResource")) { + var error = $root.google.cloud.backupdr.v1.TargetResource.verify(message.targetResource); + if (error) + return "targetResource." + error; + } + return null; + }; + + /** + * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse + */ + RestoreBackupResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.RestoreBackupResponse(); + if (object.targetResource != null) { + if (typeof object.targetResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupResponse.targetResource: object expected"); + message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.fromObject(object.targetResource); + } + return message; + }; + + /** + * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {google.cloud.backupdr.v1.RestoreBackupResponse} message RestoreBackupResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestoreBackupResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.targetResource = null; + if (message.targetResource != null && message.hasOwnProperty("targetResource")) + object.targetResource = $root.google.cloud.backupdr.v1.TargetResource.toObject(message.targetResource, options); + return object; + }; + + /** + * Converts this RestoreBackupResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @instance + * @returns {Object.} JSON object + */ + RestoreBackupResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestoreBackupResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestoreBackupResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupResponse"; + }; + + return RestoreBackupResponse; + })(); + + v1.TargetResource = (function() { + + /** + * Properties of a TargetResource. + * @memberof google.cloud.backupdr.v1 + * @interface ITargetResource + * @property {google.cloud.backupdr.v1.IGcpResource|null} [gcpResource] TargetResource gcpResource + */ + + /** + * Constructs a new TargetResource. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a TargetResource. + * @implements ITargetResource + * @constructor + * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set + */ + function TargetResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TargetResource gcpResource. + * @member {google.cloud.backupdr.v1.IGcpResource|null|undefined} gcpResource + * @memberof google.cloud.backupdr.v1.TargetResource + * @instance + */ + TargetResource.prototype.gcpResource = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TargetResource targetResourceInfo. + * @member {"gcpResource"|undefined} targetResourceInfo + * @memberof google.cloud.backupdr.v1.TargetResource + * @instance + */ + Object.defineProperty(TargetResource.prototype, "targetResourceInfo", { + get: $util.oneOfGetter($oneOfFields = ["gcpResource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TargetResource instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource instance + */ + TargetResource.create = function create(properties) { + return new TargetResource(properties); + }; + + /** + * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcpResource != null && Object.hasOwnProperty.call(message, "gcpResource")) + $root.google.cloud.backupdr.v1.GcpResource.encode(message.gcpResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetResource.decode = function 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.backupdr.v1.TargetResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TargetResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetResource message. + * @function verify + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { + properties.targetResourceInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.GcpResource.verify(message.gcpResource); + if (error) + return "gcpResource." + error; + } + } + return null; + }; + + /** + * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource + */ + TargetResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.TargetResource) + return object; + var message = new $root.google.cloud.backupdr.v1.TargetResource(); + if (object.gcpResource != null) { + if (typeof object.gcpResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.TargetResource.gcpResource: object expected"); + message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.fromObject(object.gcpResource); + } + return message; + }; + + /** + * Creates a plain object from a TargetResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {google.cloud.backupdr.v1.TargetResource} message TargetResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { + object.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.toObject(message.gcpResource, options); + if (options.oneofs) + object.targetResourceInfo = "gcpResource"; + } + return object; + }; + + /** + * Converts this TargetResource to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.TargetResource + * @instance + * @returns {Object.} JSON object + */ + TargetResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TargetResource + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.TargetResource"; + }; + + return TargetResource; + })(); + + v1.GcpResource = (function() { + + /** + * Properties of a GcpResource. + * @memberof google.cloud.backupdr.v1 + * @interface IGcpResource + * @property {string|null} [gcpResourcename] GcpResource gcpResourcename + * @property {string|null} [location] GcpResource location + * @property {string|null} [type] GcpResource type + */ + + /** + * Constructs a new GcpResource. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GcpResource. + * @implements IGcpResource + * @constructor + * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set + */ + function GcpResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcpResource gcpResourcename. + * @member {string} gcpResourcename + * @memberof google.cloud.backupdr.v1.GcpResource + * @instance + */ + GcpResource.prototype.gcpResourcename = ""; + + /** + * GcpResource location. + * @member {string} location + * @memberof google.cloud.backupdr.v1.GcpResource + * @instance + */ + GcpResource.prototype.location = ""; + + /** + * GcpResource type. + * @member {string} type + * @memberof google.cloud.backupdr.v1.GcpResource + * @instance + */ + GcpResource.prototype.type = ""; + + /** + * Creates a new GcpResource instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource instance + */ + GcpResource.create = function create(properties) { + return new GcpResource(properties); + }; + + /** + * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + return writer; + }; + + /** + * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcpResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpResource.decode = function 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.backupdr.v1.GcpResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcpResourcename = reader.string(); + break; + } + case 2: { + message.location = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcpResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcpResource message. + * @function verify + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcpResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + if (!$util.isString(message.gcpResourcename)) + return "gcpResourcename: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + return null; + }; + + /** + * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource + */ + GcpResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GcpResource) + return object; + var message = new $root.google.cloud.backupdr.v1.GcpResource(); + if (object.gcpResourcename != null) + message.gcpResourcename = String(object.gcpResourcename); + if (object.location != null) + message.location = String(object.location); + if (object.type != null) + message.type = String(object.type); + return message; + }; + + /** + * Creates a plain object from a GcpResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {google.cloud.backupdr.v1.GcpResource} message GcpResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcpResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gcpResourcename = ""; + object.location = ""; + object.type = ""; + } + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + object.gcpResourcename = message.gcpResourcename; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; + + /** + * Converts this GcpResource to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GcpResource + * @instance + * @returns {Object.} JSON object + */ + GcpResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcpResource + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpResource"; + }; + + return GcpResource; + })(); + + /** + * BackupConfigState enum. + * @name google.cloud.backupdr.v1.BackupConfigState + * @enum {number} + * @property {number} BACKUP_CONFIG_STATE_UNSPECIFIED=0 BACKUP_CONFIG_STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} PASSIVE=2 PASSIVE value + */ + v1.BackupConfigState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_CONFIG_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "PASSIVE"] = 2; + return values; + })(); + + /** + * BackupView enum. + * @name google.cloud.backupdr.v1.BackupView + * @enum {number} + * @property {number} BACKUP_VIEW_UNSPECIFIED=0 BACKUP_VIEW_UNSPECIFIED value + * @property {number} BACKUP_VIEW_BASIC=1 BACKUP_VIEW_BASIC value + * @property {number} BACKUP_VIEW_FULL=2 BACKUP_VIEW_FULL value + */ + v1.BackupView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKUP_VIEW_BASIC"] = 1; + values[valuesById[2] = "BACKUP_VIEW_FULL"] = 2; + return values; + })(); + + /** + * BackupVaultView enum. + * @name google.cloud.backupdr.v1.BackupVaultView + * @enum {number} + * @property {number} BACKUP_VAULT_VIEW_UNSPECIFIED=0 BACKUP_VAULT_VIEW_UNSPECIFIED value + * @property {number} BACKUP_VAULT_VIEW_BASIC=1 BACKUP_VAULT_VIEW_BASIC value + * @property {number} BACKUP_VAULT_VIEW_FULL=2 BACKUP_VAULT_VIEW_FULL value + */ + v1.BackupVaultView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_VAULT_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKUP_VAULT_VIEW_BASIC"] = 1; + values[valuesById[2] = "BACKUP_VAULT_VIEW_FULL"] = 2; + return values; + })(); + + v1.BackupApplianceBackupProperties = (function() { + + /** + * Properties of a BackupApplianceBackupProperties. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupApplianceBackupProperties + * @property {number|null} [generationId] BackupApplianceBackupProperties generationId + * @property {google.protobuf.ITimestamp|null} [finalizeTime] BackupApplianceBackupProperties finalizeTime + * @property {google.protobuf.ITimestamp|null} [recoveryRangeStartTime] BackupApplianceBackupProperties recoveryRangeStartTime + * @property {google.protobuf.ITimestamp|null} [recoveryRangeEndTime] BackupApplianceBackupProperties recoveryRangeEndTime + */ + + /** + * Constructs a new BackupApplianceBackupProperties. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupApplianceBackupProperties. + * @implements IBackupApplianceBackupProperties + * @constructor + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties=} [properties] Properties to set + */ + function BackupApplianceBackupProperties(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupApplianceBackupProperties generationId. + * @member {number|null|undefined} generationId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + BackupApplianceBackupProperties.prototype.generationId = null; + + /** + * BackupApplianceBackupProperties finalizeTime. + * @member {google.protobuf.ITimestamp|null|undefined} finalizeTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + BackupApplianceBackupProperties.prototype.finalizeTime = null; + + /** + * BackupApplianceBackupProperties recoveryRangeStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeStartTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + BackupApplianceBackupProperties.prototype.recoveryRangeStartTime = null; + + /** + * BackupApplianceBackupProperties recoveryRangeEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeEndTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + BackupApplianceBackupProperties.prototype.recoveryRangeEndTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupApplianceBackupProperties _generationId. + * @member {"generationId"|undefined} _generationId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_generationId", { + get: $util.oneOfGetter($oneOfFields = ["generationId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupApplianceBackupProperties _finalizeTime. + * @member {"finalizeTime"|undefined} _finalizeTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_finalizeTime", { + get: $util.oneOfGetter($oneOfFields = ["finalizeTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupApplianceBackupProperties _recoveryRangeStartTime. + * @member {"recoveryRangeStartTime"|undefined} _recoveryRangeStartTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_recoveryRangeStartTime", { + get: $util.oneOfGetter($oneOfFields = ["recoveryRangeStartTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupApplianceBackupProperties _recoveryRangeEndTime. + * @member {"recoveryRangeEndTime"|undefined} _recoveryRangeEndTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_recoveryRangeEndTime", { + get: $util.oneOfGetter($oneOfFields = ["recoveryRangeEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupApplianceBackupProperties instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties instance + */ + BackupApplianceBackupProperties.create = function create(properties) { + return new BackupApplianceBackupProperties(properties); + }; + + /** + * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties} message BackupApplianceBackupProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceBackupProperties.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.generationId != null && Object.hasOwnProperty.call(message, "generationId")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.generationId); + if (message.finalizeTime != null && Object.hasOwnProperty.call(message, "finalizeTime")) + $root.google.protobuf.Timestamp.encode(message.finalizeTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.recoveryRangeStartTime != null && Object.hasOwnProperty.call(message, "recoveryRangeStartTime")) + $root.google.protobuf.Timestamp.encode(message.recoveryRangeStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.recoveryRangeEndTime != null && Object.hasOwnProperty.call(message, "recoveryRangeEndTime")) + $root.google.protobuf.Timestamp.encode(message.recoveryRangeEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties} message BackupApplianceBackupProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceBackupProperties.decode = function 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.backupdr.v1.BackupApplianceBackupProperties(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.generationId = reader.int32(); + break; + } + case 2: { + message.finalizeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceBackupProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupApplianceBackupProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupApplianceBackupProperties.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.generationId != null && message.hasOwnProperty("generationId")) { + properties._generationId = 1; + if (!$util.isInteger(message.generationId)) + return "generationId: integer expected"; + } + if (message.finalizeTime != null && message.hasOwnProperty("finalizeTime")) { + properties._finalizeTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.finalizeTime); + if (error) + return "finalizeTime." + error; + } + } + if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { + properties._recoveryRangeStartTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeStartTime); + if (error) + return "recoveryRangeStartTime." + error; + } + } + if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { + properties._recoveryRangeEndTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeEndTime); + if (error) + return "recoveryRangeEndTime." + error; + } + } + return null; + }; + + /** + * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties + */ + BackupApplianceBackupProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties(); + if (object.generationId != null) + message.generationId = object.generationId | 0; + if (object.finalizeTime != null) { + if (typeof object.finalizeTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.finalizeTime: object expected"); + message.finalizeTime = $root.google.protobuf.Timestamp.fromObject(object.finalizeTime); + } + if (object.recoveryRangeStartTime != null) { + if (typeof object.recoveryRangeStartTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeStartTime: object expected"); + message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeStartTime); + } + if (object.recoveryRangeEndTime != null) { + if (typeof object.recoveryRangeEndTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeEndTime: object expected"); + message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeEndTime); + } + return message; + }; + + /** + * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.BackupApplianceBackupProperties} message BackupApplianceBackupProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupApplianceBackupProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.generationId != null && message.hasOwnProperty("generationId")) { + object.generationId = message.generationId; + if (options.oneofs) + object._generationId = "generationId"; + } + if (message.finalizeTime != null && message.hasOwnProperty("finalizeTime")) { + object.finalizeTime = $root.google.protobuf.Timestamp.toObject(message.finalizeTime, options); + if (options.oneofs) + object._finalizeTime = "finalizeTime"; + } + if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { + object.recoveryRangeStartTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeStartTime, options); + if (options.oneofs) + object._recoveryRangeStartTime = "recoveryRangeStartTime"; + } + if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { + object.recoveryRangeEndTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeEndTime, options); + if (options.oneofs) + object._recoveryRangeEndTime = "recoveryRangeEndTime"; + } + return object; + }; + + /** + * Converts this BackupApplianceBackupProperties to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + * @returns {Object.} JSON object + */ + BackupApplianceBackupProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupApplianceBackupProperties + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupApplianceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceBackupProperties"; + }; + + return BackupApplianceBackupProperties; + })(); + + v1.ComputeInstanceBackupProperties = (function() { + + /** + * Properties of a ComputeInstanceBackupProperties. + * @memberof google.cloud.backupdr.v1 + * @interface IComputeInstanceBackupProperties + * @property {string|null} [description] ComputeInstanceBackupProperties description + * @property {google.cloud.backupdr.v1.ITags|null} [tags] ComputeInstanceBackupProperties tags + * @property {string|null} [machineType] ComputeInstanceBackupProperties machineType + * @property {boolean|null} [canIpForward] ComputeInstanceBackupProperties canIpForward + * @property {Array.|null} [networkInterface] ComputeInstanceBackupProperties networkInterface + * @property {Array.|null} [disk] ComputeInstanceBackupProperties disk + * @property {google.cloud.backupdr.v1.IMetadata|null} [metadata] ComputeInstanceBackupProperties metadata + * @property {Array.|null} [serviceAccount] ComputeInstanceBackupProperties serviceAccount + * @property {google.cloud.backupdr.v1.IScheduling|null} [scheduling] ComputeInstanceBackupProperties scheduling + * @property {Array.|null} [guestAccelerator] ComputeInstanceBackupProperties guestAccelerator + * @property {string|null} [minCpuPlatform] ComputeInstanceBackupProperties minCpuPlatform + * @property {google.cloud.backupdr.v1.KeyRevocationActionType|null} [keyRevocationActionType] ComputeInstanceBackupProperties keyRevocationActionType + * @property {string|null} [sourceInstance] ComputeInstanceBackupProperties sourceInstance + * @property {Object.|null} [labels] ComputeInstanceBackupProperties labels + */ + + /** + * Constructs a new ComputeInstanceBackupProperties. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ComputeInstanceBackupProperties. + * @implements IComputeInstanceBackupProperties + * @constructor + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties=} [properties] Properties to set + */ + function ComputeInstanceBackupProperties(properties) { + this.networkInterface = []; + this.disk = []; + this.serviceAccount = []; + this.guestAccelerator = []; + 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]]; + } + + /** + * ComputeInstanceBackupProperties description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.description = null; + + /** + * ComputeInstanceBackupProperties tags. + * @member {google.cloud.backupdr.v1.ITags|null|undefined} tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.tags = null; + + /** + * ComputeInstanceBackupProperties machineType. + * @member {string|null|undefined} machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.machineType = null; + + /** + * ComputeInstanceBackupProperties canIpForward. + * @member {boolean|null|undefined} canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.canIpForward = null; + + /** + * ComputeInstanceBackupProperties networkInterface. + * @member {Array.} networkInterface + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.networkInterface = $util.emptyArray; + + /** + * ComputeInstanceBackupProperties disk. + * @member {Array.} disk + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.disk = $util.emptyArray; + + /** + * ComputeInstanceBackupProperties metadata. + * @member {google.cloud.backupdr.v1.IMetadata|null|undefined} metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.metadata = null; + + /** + * ComputeInstanceBackupProperties serviceAccount. + * @member {Array.} serviceAccount + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.serviceAccount = $util.emptyArray; + + /** + * ComputeInstanceBackupProperties scheduling. + * @member {google.cloud.backupdr.v1.IScheduling|null|undefined} scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.scheduling = null; + + /** + * ComputeInstanceBackupProperties guestAccelerator. + * @member {Array.} guestAccelerator + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.guestAccelerator = $util.emptyArray; + + /** + * ComputeInstanceBackupProperties minCpuPlatform. + * @member {string|null|undefined} minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.minCpuPlatform = null; + + /** + * ComputeInstanceBackupProperties keyRevocationActionType. + * @member {google.cloud.backupdr.v1.KeyRevocationActionType|null|undefined} keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.keyRevocationActionType = null; + + /** + * ComputeInstanceBackupProperties sourceInstance. + * @member {string|null|undefined} sourceInstance + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.sourceInstance = null; + + /** + * ComputeInstanceBackupProperties labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.labels = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ComputeInstanceBackupProperties _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _tags. + * @member {"tags"|undefined} _tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_tags", { + get: $util.oneOfGetter($oneOfFields = ["tags"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _machineType. + * @member {"machineType"|undefined} _machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_machineType", { + get: $util.oneOfGetter($oneOfFields = ["machineType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _canIpForward. + * @member {"canIpForward"|undefined} _canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_canIpForward", { + get: $util.oneOfGetter($oneOfFields = ["canIpForward"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _scheduling. + * @member {"scheduling"|undefined} _scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_scheduling", { + get: $util.oneOfGetter($oneOfFields = ["scheduling"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _minCpuPlatform. + * @member {"minCpuPlatform"|undefined} _minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_minCpuPlatform", { + get: $util.oneOfGetter($oneOfFields = ["minCpuPlatform"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _keyRevocationActionType. + * @member {"keyRevocationActionType"|undefined} _keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_keyRevocationActionType", { + get: $util.oneOfGetter($oneOfFields = ["keyRevocationActionType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _sourceInstance. + * @member {"sourceInstance"|undefined} _sourceInstance + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_sourceInstance", { + get: $util.oneOfGetter($oneOfFields = ["sourceInstance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ComputeInstanceBackupProperties instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties instance + */ + ComputeInstanceBackupProperties.create = function create(properties) { + return new ComputeInstanceBackupProperties(properties); + }; + + /** + * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties} message ComputeInstanceBackupProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceBackupProperties.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.tags != null && Object.hasOwnProperty.call(message, "tags")) + $root.google.cloud.backupdr.v1.Tags.encode(message.tags, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.machineType); + if (message.canIpForward != null && Object.hasOwnProperty.call(message, "canIpForward")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.canIpForward); + if (message.networkInterface != null && message.networkInterface.length) + for (var i = 0; i < message.networkInterface.length; ++i) + $root.google.cloud.backupdr.v1.NetworkInterface.encode(message.networkInterface[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.disk != null && message.disk.length) + for (var i = 0; i < message.disk.length; ++i) + $root.google.cloud.backupdr.v1.AttachedDisk.encode(message.disk[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.cloud.backupdr.v1.Metadata.encode(message.metadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.serviceAccount != null && message.serviceAccount.length) + for (var i = 0; i < message.serviceAccount.length; ++i) + $root.google.cloud.backupdr.v1.ServiceAccount.encode(message.serviceAccount[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) + $root.google.cloud.backupdr.v1.Scheduling.encode(message.scheduling, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.guestAccelerator != null && message.guestAccelerator.length) + for (var i = 0; i < message.guestAccelerator.length; ++i) + $root.google.cloud.backupdr.v1.AcceleratorConfig.encode(message.guestAccelerator[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.minCpuPlatform); + if (message.keyRevocationActionType != null && Object.hasOwnProperty.call(message, "keyRevocationActionType")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.keyRevocationActionType); + if (message.sourceInstance != null && Object.hasOwnProperty.call(message, "sourceInstance")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.sourceInstance); + 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 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties} message ComputeInstanceBackupProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceBackupProperties.decode = function 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.backupdr.v1.ComputeInstanceBackupProperties(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.description = reader.string(); + break; + } + case 2: { + message.tags = $root.google.cloud.backupdr.v1.Tags.decode(reader, reader.uint32()); + break; + } + case 3: { + message.machineType = reader.string(); + break; + } + case 4: { + message.canIpForward = reader.bool(); + break; + } + case 5: { + if (!(message.networkInterface && message.networkInterface.length)) + message.networkInterface = []; + message.networkInterface.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.disk && message.disk.length)) + message.disk = []; + message.disk.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader, reader.uint32())); + break; + } + case 7: { + message.metadata = $root.google.cloud.backupdr.v1.Metadata.decode(reader, reader.uint32()); + break; + } + case 8: { + if (!(message.serviceAccount && message.serviceAccount.length)) + message.serviceAccount = []; + message.serviceAccount.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader, reader.uint32())); + break; + } + case 9: { + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.decode(reader, reader.uint32()); + break; + } + case 10: { + if (!(message.guestAccelerator && message.guestAccelerator.length)) + message.guestAccelerator = []; + message.guestAccelerator.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader, reader.uint32())); + break; + } + case 11: { + message.minCpuPlatform = reader.string(); + break; + } + case 12: { + message.keyRevocationActionType = reader.int32(); + break; + } + case 13: { + message.sourceInstance = reader.string(); + break; + } + case 14: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceBackupProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputeInstanceBackupProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeInstanceBackupProperties.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + properties._tags = 1; + { + var error = $root.google.cloud.backupdr.v1.Tags.verify(message.tags); + if (error) + return "tags." + error; + } + } + if (message.machineType != null && message.hasOwnProperty("machineType")) { + properties._machineType = 1; + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + properties._canIpForward = 1; + if (typeof message.canIpForward !== "boolean") + return "canIpForward: boolean expected"; + } + if (message.networkInterface != null && message.hasOwnProperty("networkInterface")) { + if (!Array.isArray(message.networkInterface)) + return "networkInterface: array expected"; + for (var i = 0; i < message.networkInterface.length; ++i) { + var error = $root.google.cloud.backupdr.v1.NetworkInterface.verify(message.networkInterface[i]); + if (error) + return "networkInterface." + error; + } + } + if (message.disk != null && message.hasOwnProperty("disk")) { + if (!Array.isArray(message.disk)) + return "disk: array expected"; + for (var i = 0; i < message.disk.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AttachedDisk.verify(message.disk[i]); + if (error) + return "disk." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + { + var error = $root.google.cloud.backupdr.v1.Metadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) { + if (!Array.isArray(message.serviceAccount)) + return "serviceAccount: array expected"; + for (var i = 0; i < message.serviceAccount.length; ++i) { + var error = $root.google.cloud.backupdr.v1.ServiceAccount.verify(message.serviceAccount[i]); + if (error) + return "serviceAccount." + error; + } + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + properties._scheduling = 1; + { + var error = $root.google.cloud.backupdr.v1.Scheduling.verify(message.scheduling); + if (error) + return "scheduling." + error; + } + } + if (message.guestAccelerator != null && message.hasOwnProperty("guestAccelerator")) { + if (!Array.isArray(message.guestAccelerator)) + return "guestAccelerator: array expected"; + for (var i = 0; i < message.guestAccelerator.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AcceleratorConfig.verify(message.guestAccelerator[i]); + if (error) + return "guestAccelerator." + error; + } + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + properties._minCpuPlatform = 1; + if (!$util.isString(message.minCpuPlatform)) + return "minCpuPlatform: string expected"; + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + properties._keyRevocationActionType = 1; + switch (message.keyRevocationActionType) { + default: + return "keyRevocationActionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) { + properties._sourceInstance = 1; + if (!$util.isString(message.sourceInstance)) + return "sourceInstance: string expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties + */ + ComputeInstanceBackupProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties(); + if (object.description != null) + message.description = String(object.description); + if (object.tags != null) { + if (typeof object.tags !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.tags: object expected"); + message.tags = $root.google.cloud.backupdr.v1.Tags.fromObject(object.tags); + } + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.canIpForward != null) + message.canIpForward = Boolean(object.canIpForward); + if (object.networkInterface) { + if (!Array.isArray(object.networkInterface)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: array expected"); + message.networkInterface = []; + for (var i = 0; i < object.networkInterface.length; ++i) { + if (typeof object.networkInterface[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: object expected"); + message.networkInterface[i] = $root.google.cloud.backupdr.v1.NetworkInterface.fromObject(object.networkInterface[i]); + } + } + if (object.disk) { + if (!Array.isArray(object.disk)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.disk: array expected"); + message.disk = []; + for (var i = 0; i < object.disk.length; ++i) { + if (typeof object.disk[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.disk: object expected"); + message.disk[i] = $root.google.cloud.backupdr.v1.AttachedDisk.fromObject(object.disk[i]); + } + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.metadata: object expected"); + message.metadata = $root.google.cloud.backupdr.v1.Metadata.fromObject(object.metadata); + } + if (object.serviceAccount) { + if (!Array.isArray(object.serviceAccount)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.serviceAccount: array expected"); + message.serviceAccount = []; + for (var i = 0; i < object.serviceAccount.length; ++i) { + if (typeof object.serviceAccount[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.serviceAccount: object expected"); + message.serviceAccount[i] = $root.google.cloud.backupdr.v1.ServiceAccount.fromObject(object.serviceAccount[i]); + } + } + if (object.scheduling != null) { + if (typeof object.scheduling !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.scheduling: object expected"); + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.fromObject(object.scheduling); + } + if (object.guestAccelerator) { + if (!Array.isArray(object.guestAccelerator)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.guestAccelerator: array expected"); + message.guestAccelerator = []; + for (var i = 0; i < object.guestAccelerator.length; ++i) { + if (typeof object.guestAccelerator[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.guestAccelerator: object expected"); + message.guestAccelerator[i] = $root.google.cloud.backupdr.v1.AcceleratorConfig.fromObject(object.guestAccelerator[i]); + } + } + if (object.minCpuPlatform != null) + message.minCpuPlatform = String(object.minCpuPlatform); + switch (object.keyRevocationActionType) { + default: + if (typeof object.keyRevocationActionType === "number") { + message.keyRevocationActionType = object.keyRevocationActionType; + break; + } + break; + case "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": + case 0: + message.keyRevocationActionType = 0; + break; + case "NONE": + case 1: + message.keyRevocationActionType = 1; + break; + case "STOP": + case 2: + message.keyRevocationActionType = 2; + break; + } + if (object.sourceInstance != null) + message.sourceInstance = String(object.sourceInstance); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} message ComputeInstanceBackupProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeInstanceBackupProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.networkInterface = []; + object.disk = []; + object.serviceAccount = []; + object.guestAccelerator = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + object.tags = $root.google.cloud.backupdr.v1.Tags.toObject(message.tags, options); + if (options.oneofs) + object._tags = "tags"; + } + if (message.machineType != null && message.hasOwnProperty("machineType")) { + object.machineType = message.machineType; + if (options.oneofs) + object._machineType = "machineType"; + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + object.canIpForward = message.canIpForward; + if (options.oneofs) + object._canIpForward = "canIpForward"; + } + if (message.networkInterface && message.networkInterface.length) { + object.networkInterface = []; + for (var j = 0; j < message.networkInterface.length; ++j) + object.networkInterface[j] = $root.google.cloud.backupdr.v1.NetworkInterface.toObject(message.networkInterface[j], options); + } + if (message.disk && message.disk.length) { + object.disk = []; + for (var j = 0; j < message.disk.length; ++j) + object.disk[j] = $root.google.cloud.backupdr.v1.AttachedDisk.toObject(message.disk[j], options); + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = $root.google.cloud.backupdr.v1.Metadata.toObject(message.metadata, options); + if (options.oneofs) + object._metadata = "metadata"; + } + if (message.serviceAccount && message.serviceAccount.length) { + object.serviceAccount = []; + for (var j = 0; j < message.serviceAccount.length; ++j) + object.serviceAccount[j] = $root.google.cloud.backupdr.v1.ServiceAccount.toObject(message.serviceAccount[j], options); + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + object.scheduling = $root.google.cloud.backupdr.v1.Scheduling.toObject(message.scheduling, options); + if (options.oneofs) + object._scheduling = "scheduling"; + } + if (message.guestAccelerator && message.guestAccelerator.length) { + object.guestAccelerator = []; + for (var j = 0; j < message.guestAccelerator.length; ++j) + object.guestAccelerator[j] = $root.google.cloud.backupdr.v1.AcceleratorConfig.toObject(message.guestAccelerator[j], options); + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + object.minCpuPlatform = message.minCpuPlatform; + if (options.oneofs) + object._minCpuPlatform = "minCpuPlatform"; + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + object.keyRevocationActionType = options.enums === String ? $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] === undefined ? message.keyRevocationActionType : $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] : message.keyRevocationActionType; + if (options.oneofs) + object._keyRevocationActionType = "keyRevocationActionType"; + } + if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) { + object.sourceInstance = message.sourceInstance; + if (options.oneofs) + object._sourceInstance = "sourceInstance"; + } + 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]]; + } + return object; + }; + + /** + * Converts this ComputeInstanceBackupProperties to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + * @returns {Object.} JSON object + */ + ComputeInstanceBackupProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComputeInstanceBackupProperties + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputeInstanceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceBackupProperties"; + }; + + return ComputeInstanceBackupProperties; + })(); + + v1.ComputeInstanceRestoreProperties = (function() { + + /** + * Properties of a ComputeInstanceRestoreProperties. + * @memberof google.cloud.backupdr.v1 + * @interface IComputeInstanceRestoreProperties + * @property {string|null} [name] ComputeInstanceRestoreProperties name + * @property {google.cloud.backupdr.v1.IAdvancedMachineFeatures|null} [advancedMachineFeatures] ComputeInstanceRestoreProperties advancedMachineFeatures + * @property {boolean|null} [canIpForward] ComputeInstanceRestoreProperties canIpForward + * @property {google.cloud.backupdr.v1.IConfidentialInstanceConfig|null} [confidentialInstanceConfig] ComputeInstanceRestoreProperties confidentialInstanceConfig + * @property {boolean|null} [deletionProtection] ComputeInstanceRestoreProperties deletionProtection + * @property {string|null} [description] ComputeInstanceRestoreProperties description + * @property {Array.|null} [disks] ComputeInstanceRestoreProperties disks + * @property {google.cloud.backupdr.v1.IDisplayDevice|null} [displayDevice] ComputeInstanceRestoreProperties displayDevice + * @property {Array.|null} [guestAccelerators] ComputeInstanceRestoreProperties guestAccelerators + * @property {string|null} [hostname] ComputeInstanceRestoreProperties hostname + * @property {google.cloud.backupdr.v1.ICustomerEncryptionKey|null} [instanceEncryptionKey] ComputeInstanceRestoreProperties instanceEncryptionKey + * @property {google.cloud.backupdr.v1.KeyRevocationActionType|null} [keyRevocationActionType] ComputeInstanceRestoreProperties keyRevocationActionType + * @property {Object.|null} [labels] ComputeInstanceRestoreProperties labels + * @property {string|null} [machineType] ComputeInstanceRestoreProperties machineType + * @property {google.cloud.backupdr.v1.IMetadata|null} [metadata] ComputeInstanceRestoreProperties metadata + * @property {string|null} [minCpuPlatform] ComputeInstanceRestoreProperties minCpuPlatform + * @property {Array.|null} [networkInterfaces] ComputeInstanceRestoreProperties networkInterfaces + * @property {google.cloud.backupdr.v1.INetworkPerformanceConfig|null} [networkPerformanceConfig] ComputeInstanceRestoreProperties networkPerformanceConfig + * @property {google.cloud.backupdr.v1.IInstanceParams|null} [params] ComputeInstanceRestoreProperties params + * @property {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null} [privateIpv6GoogleAccess] ComputeInstanceRestoreProperties privateIpv6GoogleAccess + * @property {google.cloud.backupdr.v1.IAllocationAffinity|null} [allocationAffinity] ComputeInstanceRestoreProperties allocationAffinity + * @property {Array.|null} [resourcePolicies] ComputeInstanceRestoreProperties resourcePolicies + * @property {google.cloud.backupdr.v1.IScheduling|null} [scheduling] ComputeInstanceRestoreProperties scheduling + * @property {Array.|null} [serviceAccounts] ComputeInstanceRestoreProperties serviceAccounts + * @property {google.cloud.backupdr.v1.ITags|null} [tags] ComputeInstanceRestoreProperties tags + */ + + /** + * Constructs a new ComputeInstanceRestoreProperties. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ComputeInstanceRestoreProperties. + * @implements IComputeInstanceRestoreProperties + * @constructor + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties=} [properties] Properties to set + */ + function ComputeInstanceRestoreProperties(properties) { + this.disks = []; + this.guestAccelerators = []; + this.labels = {}; + this.networkInterfaces = []; + this.resourcePolicies = []; + this.serviceAccounts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComputeInstanceRestoreProperties name. + * @member {string|null|undefined} name + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.name = null; + + /** + * ComputeInstanceRestoreProperties advancedMachineFeatures. + * @member {google.cloud.backupdr.v1.IAdvancedMachineFeatures|null|undefined} advancedMachineFeatures + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.advancedMachineFeatures = null; + + /** + * ComputeInstanceRestoreProperties canIpForward. + * @member {boolean|null|undefined} canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.canIpForward = null; + + /** + * ComputeInstanceRestoreProperties confidentialInstanceConfig. + * @member {google.cloud.backupdr.v1.IConfidentialInstanceConfig|null|undefined} confidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.confidentialInstanceConfig = null; + + /** + * ComputeInstanceRestoreProperties deletionProtection. + * @member {boolean|null|undefined} deletionProtection + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.deletionProtection = null; + + /** + * ComputeInstanceRestoreProperties description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.description = null; + + /** + * ComputeInstanceRestoreProperties disks. + * @member {Array.} disks + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.disks = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties displayDevice. + * @member {google.cloud.backupdr.v1.IDisplayDevice|null|undefined} displayDevice + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.displayDevice = null; + + /** + * ComputeInstanceRestoreProperties guestAccelerators. + * @member {Array.} guestAccelerators + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.guestAccelerators = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties hostname. + * @member {string|null|undefined} hostname + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.hostname = null; + + /** + * ComputeInstanceRestoreProperties instanceEncryptionKey. + * @member {google.cloud.backupdr.v1.ICustomerEncryptionKey|null|undefined} instanceEncryptionKey + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.instanceEncryptionKey = null; + + /** + * ComputeInstanceRestoreProperties keyRevocationActionType. + * @member {google.cloud.backupdr.v1.KeyRevocationActionType|null|undefined} keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.keyRevocationActionType = null; + + /** + * ComputeInstanceRestoreProperties labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.labels = $util.emptyObject; + + /** + * ComputeInstanceRestoreProperties machineType. + * @member {string|null|undefined} machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.machineType = null; + + /** + * ComputeInstanceRestoreProperties metadata. + * @member {google.cloud.backupdr.v1.IMetadata|null|undefined} metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.metadata = null; + + /** + * ComputeInstanceRestoreProperties minCpuPlatform. + * @member {string|null|undefined} minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.minCpuPlatform = null; + + /** + * ComputeInstanceRestoreProperties networkInterfaces. + * @member {Array.} networkInterfaces + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.networkInterfaces = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties networkPerformanceConfig. + * @member {google.cloud.backupdr.v1.INetworkPerformanceConfig|null|undefined} networkPerformanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.networkPerformanceConfig = null; + + /** + * ComputeInstanceRestoreProperties params. + * @member {google.cloud.backupdr.v1.IInstanceParams|null|undefined} params + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.params = null; + + /** + * ComputeInstanceRestoreProperties privateIpv6GoogleAccess. + * @member {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null|undefined} privateIpv6GoogleAccess + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.privateIpv6GoogleAccess = null; + + /** + * ComputeInstanceRestoreProperties allocationAffinity. + * @member {google.cloud.backupdr.v1.IAllocationAffinity|null|undefined} allocationAffinity + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.allocationAffinity = null; + + /** + * ComputeInstanceRestoreProperties resourcePolicies. + * @member {Array.} resourcePolicies + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.resourcePolicies = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties scheduling. + * @member {google.cloud.backupdr.v1.IScheduling|null|undefined} scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.scheduling = null; + + /** + * ComputeInstanceRestoreProperties serviceAccounts. + * @member {Array.} serviceAccounts + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.serviceAccounts = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties tags. + * @member {google.cloud.backupdr.v1.ITags|null|undefined} tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.tags = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ComputeInstanceRestoreProperties _name. + * @member {"name"|undefined} _name + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _advancedMachineFeatures. + * @member {"advancedMachineFeatures"|undefined} _advancedMachineFeatures + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_advancedMachineFeatures", { + get: $util.oneOfGetter($oneOfFields = ["advancedMachineFeatures"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _canIpForward. + * @member {"canIpForward"|undefined} _canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_canIpForward", { + get: $util.oneOfGetter($oneOfFields = ["canIpForward"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _confidentialInstanceConfig. + * @member {"confidentialInstanceConfig"|undefined} _confidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_confidentialInstanceConfig", { + get: $util.oneOfGetter($oneOfFields = ["confidentialInstanceConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _deletionProtection. + * @member {"deletionProtection"|undefined} _deletionProtection + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_deletionProtection", { + get: $util.oneOfGetter($oneOfFields = ["deletionProtection"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _displayDevice. + * @member {"displayDevice"|undefined} _displayDevice + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_displayDevice", { + get: $util.oneOfGetter($oneOfFields = ["displayDevice"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _hostname. + * @member {"hostname"|undefined} _hostname + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_hostname", { + get: $util.oneOfGetter($oneOfFields = ["hostname"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _instanceEncryptionKey. + * @member {"instanceEncryptionKey"|undefined} _instanceEncryptionKey + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_instanceEncryptionKey", { + get: $util.oneOfGetter($oneOfFields = ["instanceEncryptionKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _keyRevocationActionType. + * @member {"keyRevocationActionType"|undefined} _keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_keyRevocationActionType", { + get: $util.oneOfGetter($oneOfFields = ["keyRevocationActionType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _machineType. + * @member {"machineType"|undefined} _machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_machineType", { + get: $util.oneOfGetter($oneOfFields = ["machineType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _minCpuPlatform. + * @member {"minCpuPlatform"|undefined} _minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_minCpuPlatform", { + get: $util.oneOfGetter($oneOfFields = ["minCpuPlatform"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _networkPerformanceConfig. + * @member {"networkPerformanceConfig"|undefined} _networkPerformanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_networkPerformanceConfig", { + get: $util.oneOfGetter($oneOfFields = ["networkPerformanceConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _params. + * @member {"params"|undefined} _params + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_params", { + get: $util.oneOfGetter($oneOfFields = ["params"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _privateIpv6GoogleAccess. + * @member {"privateIpv6GoogleAccess"|undefined} _privateIpv6GoogleAccess + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_privateIpv6GoogleAccess", { + get: $util.oneOfGetter($oneOfFields = ["privateIpv6GoogleAccess"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _allocationAffinity. + * @member {"allocationAffinity"|undefined} _allocationAffinity + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_allocationAffinity", { + get: $util.oneOfGetter($oneOfFields = ["allocationAffinity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _scheduling. + * @member {"scheduling"|undefined} _scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_scheduling", { + get: $util.oneOfGetter($oneOfFields = ["scheduling"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _tags. + * @member {"tags"|undefined} _tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_tags", { + get: $util.oneOfGetter($oneOfFields = ["tags"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties instance + */ + ComputeInstanceRestoreProperties.create = function create(properties) { + return new ComputeInstanceRestoreProperties(properties); + }; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceRestoreProperties.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.advancedMachineFeatures != null && Object.hasOwnProperty.call(message, "advancedMachineFeatures")) + $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.encode(message.advancedMachineFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.canIpForward != null && Object.hasOwnProperty.call(message, "canIpForward")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.canIpForward); + if (message.confidentialInstanceConfig != null && Object.hasOwnProperty.call(message, "confidentialInstanceConfig")) + $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.encode(message.confidentialInstanceConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.deletionProtection); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.disks != null && message.disks.length) + for (var i = 0; i < message.disks.length; ++i) + $root.google.cloud.backupdr.v1.AttachedDisk.encode(message.disks[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.displayDevice != null && Object.hasOwnProperty.call(message, "displayDevice")) + $root.google.cloud.backupdr.v1.DisplayDevice.encode(message.displayDevice, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.guestAccelerators != null && message.guestAccelerators.length) + for (var i = 0; i < message.guestAccelerators.length; ++i) + $root.google.cloud.backupdr.v1.AcceleratorConfig.encode(message.guestAccelerators[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.hostname); + if (message.instanceEncryptionKey != null && Object.hasOwnProperty.call(message, "instanceEncryptionKey")) + $root.google.cloud.backupdr.v1.CustomerEncryptionKey.encode(message.instanceEncryptionKey, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.keyRevocationActionType != null && Object.hasOwnProperty.call(message, "keyRevocationActionType")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.keyRevocationActionType); + 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 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.machineType); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.cloud.backupdr.v1.Metadata.encode(message.metadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.minCpuPlatform); + if (message.networkInterfaces != null && message.networkInterfaces.length) + for (var i = 0; i < message.networkInterfaces.length; ++i) + $root.google.cloud.backupdr.v1.NetworkInterface.encode(message.networkInterfaces[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.networkPerformanceConfig != null && Object.hasOwnProperty.call(message, "networkPerformanceConfig")) + $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.encode(message.networkPerformanceConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.google.cloud.backupdr.v1.InstanceParams.encode(message.params, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.privateIpv6GoogleAccess != null && Object.hasOwnProperty.call(message, "privateIpv6GoogleAccess")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.privateIpv6GoogleAccess); + if (message.allocationAffinity != null && Object.hasOwnProperty.call(message, "allocationAffinity")) + $root.google.cloud.backupdr.v1.AllocationAffinity.encode(message.allocationAffinity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.resourcePolicies != null && message.resourcePolicies.length) + for (var i = 0; i < message.resourcePolicies.length; ++i) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.resourcePolicies[i]); + if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) + $root.google.cloud.backupdr.v1.Scheduling.encode(message.scheduling, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.serviceAccounts != null && message.serviceAccounts.length) + for (var i = 0; i < message.serviceAccounts.length; ++i) + $root.google.cloud.backupdr.v1.ServiceAccount.encode(message.serviceAccounts[i], writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + $root.google.cloud.backupdr.v1.Tags.encode(message.tags, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceRestoreProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceRestoreProperties.decode = function 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.backupdr.v1.ComputeInstanceRestoreProperties(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.decode(reader, reader.uint32()); + break; + } + case 3: { + message.canIpForward = reader.bool(); + break; + } + case 4: { + message.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.deletionProtection = reader.bool(); + break; + } + case 6: { + message.description = reader.string(); + break; + } + case 7: { + if (!(message.disks && message.disks.length)) + message.disks = []; + message.disks.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader, reader.uint32())); + break; + } + case 8: { + message.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.guestAccelerators && message.guestAccelerators.length)) + message.guestAccelerators = []; + message.guestAccelerators.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader, reader.uint32())); + break; + } + case 10: { + message.hostname = reader.string(); + break; + } + case 11: { + message.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader, reader.uint32()); + break; + } + case 12: { + message.keyRevocationActionType = reader.int32(); + break; + } + case 13: { + 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 14: { + message.machineType = reader.string(); + break; + } + case 15: { + message.metadata = $root.google.cloud.backupdr.v1.Metadata.decode(reader, reader.uint32()); + break; + } + case 16: { + message.minCpuPlatform = reader.string(); + break; + } + case 17: { + if (!(message.networkInterfaces && message.networkInterfaces.length)) + message.networkInterfaces = []; + message.networkInterfaces.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader, reader.uint32())); + break; + } + case 18: { + message.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.decode(reader, reader.uint32()); + break; + } + case 19: { + message.params = $root.google.cloud.backupdr.v1.InstanceParams.decode(reader, reader.uint32()); + break; + } + case 20: { + message.privateIpv6GoogleAccess = reader.int32(); + break; + } + case 21: { + message.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.decode(reader, reader.uint32()); + break; + } + case 22: { + if (!(message.resourcePolicies && message.resourcePolicies.length)) + message.resourcePolicies = []; + message.resourcePolicies.push(reader.string()); + break; + } + case 23: { + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.decode(reader, reader.uint32()); + break; + } + case 24: { + if (!(message.serviceAccounts && message.serviceAccounts.length)) + message.serviceAccounts = []; + message.serviceAccounts.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader, reader.uint32())); + break; + } + case 26: { + message.tags = $root.google.cloud.backupdr.v1.Tags.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceRestoreProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputeInstanceRestoreProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeInstanceRestoreProperties.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { + properties._advancedMachineFeatures = 1; + { + var error = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.verify(message.advancedMachineFeatures); + if (error) + return "advancedMachineFeatures." + error; + } + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + properties._canIpForward = 1; + if (typeof message.canIpForward !== "boolean") + return "canIpForward: boolean expected"; + } + if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) { + properties._confidentialInstanceConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify(message.confidentialInstanceConfig); + if (error) + return "confidentialInstanceConfig." + error; + } + } + if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) { + properties._deletionProtection = 1; + if (typeof message.deletionProtection !== "boolean") + return "deletionProtection: boolean expected"; + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.disks != null && message.hasOwnProperty("disks")) { + if (!Array.isArray(message.disks)) + return "disks: array expected"; + for (var i = 0; i < message.disks.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AttachedDisk.verify(message.disks[i]); + if (error) + return "disks." + error; + } + } + if (message.displayDevice != null && message.hasOwnProperty("displayDevice")) { + properties._displayDevice = 1; + { + var error = $root.google.cloud.backupdr.v1.DisplayDevice.verify(message.displayDevice); + if (error) + return "displayDevice." + error; + } + } + if (message.guestAccelerators != null && message.hasOwnProperty("guestAccelerators")) { + if (!Array.isArray(message.guestAccelerators)) + return "guestAccelerators: array expected"; + for (var i = 0; i < message.guestAccelerators.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AcceleratorConfig.verify(message.guestAccelerators[i]); + if (error) + return "guestAccelerators." + error; + } + } + if (message.hostname != null && message.hasOwnProperty("hostname")) { + properties._hostname = 1; + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + } + if (message.instanceEncryptionKey != null && message.hasOwnProperty("instanceEncryptionKey")) { + properties._instanceEncryptionKey = 1; + { + var error = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.verify(message.instanceEncryptionKey); + if (error) + return "instanceEncryptionKey." + error; + } + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + properties._keyRevocationActionType = 1; + switch (message.keyRevocationActionType) { + default: + return "keyRevocationActionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + 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.machineType != null && message.hasOwnProperty("machineType")) { + properties._machineType = 1; + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + { + var error = $root.google.cloud.backupdr.v1.Metadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + properties._minCpuPlatform = 1; + if (!$util.isString(message.minCpuPlatform)) + return "minCpuPlatform: string expected"; + } + if (message.networkInterfaces != null && message.hasOwnProperty("networkInterfaces")) { + if (!Array.isArray(message.networkInterfaces)) + return "networkInterfaces: array expected"; + for (var i = 0; i < message.networkInterfaces.length; ++i) { + var error = $root.google.cloud.backupdr.v1.NetworkInterface.verify(message.networkInterfaces[i]); + if (error) + return "networkInterfaces." + error; + } + } + if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { + properties._networkPerformanceConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.verify(message.networkPerformanceConfig); + if (error) + return "networkPerformanceConfig." + error; + } + } + if (message.params != null && message.hasOwnProperty("params")) { + properties._params = 1; + { + var error = $root.google.cloud.backupdr.v1.InstanceParams.verify(message.params); + if (error) + return "params." + error; + } + } + if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) { + properties._privateIpv6GoogleAccess = 1; + switch (message.privateIpv6GoogleAccess) { + default: + return "privateIpv6GoogleAccess: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.allocationAffinity != null && message.hasOwnProperty("allocationAffinity")) { + properties._allocationAffinity = 1; + { + var error = $root.google.cloud.backupdr.v1.AllocationAffinity.verify(message.allocationAffinity); + if (error) + return "allocationAffinity." + error; + } + } + if (message.resourcePolicies != null && message.hasOwnProperty("resourcePolicies")) { + if (!Array.isArray(message.resourcePolicies)) + return "resourcePolicies: array expected"; + for (var i = 0; i < message.resourcePolicies.length; ++i) + if (!$util.isString(message.resourcePolicies[i])) + return "resourcePolicies: string[] expected"; + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + properties._scheduling = 1; + { + var error = $root.google.cloud.backupdr.v1.Scheduling.verify(message.scheduling); + if (error) + return "scheduling." + error; + } + } + if (message.serviceAccounts != null && message.hasOwnProperty("serviceAccounts")) { + if (!Array.isArray(message.serviceAccounts)) + return "serviceAccounts: array expected"; + for (var i = 0; i < message.serviceAccounts.length; ++i) { + var error = $root.google.cloud.backupdr.v1.ServiceAccount.verify(message.serviceAccounts[i]); + if (error) + return "serviceAccounts." + error; + } + } + if (message.tags != null && message.hasOwnProperty("tags")) { + properties._tags = 1; + { + var error = $root.google.cloud.backupdr.v1.Tags.verify(message.tags); + if (error) + return "tags." + error; + } + } + return null; + }; + + /** + * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties + */ + ComputeInstanceRestoreProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties(); + if (object.name != null) + message.name = String(object.name); + if (object.advancedMachineFeatures != null) { + if (typeof object.advancedMachineFeatures !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.advancedMachineFeatures: object expected"); + message.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.fromObject(object.advancedMachineFeatures); + } + if (object.canIpForward != null) + message.canIpForward = Boolean(object.canIpForward); + if (object.confidentialInstanceConfig != null) { + if (typeof object.confidentialInstanceConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.confidentialInstanceConfig: object expected"); + message.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.fromObject(object.confidentialInstanceConfig); + } + if (object.deletionProtection != null) + message.deletionProtection = Boolean(object.deletionProtection); + if (object.description != null) + message.description = String(object.description); + if (object.disks) { + if (!Array.isArray(object.disks)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: array expected"); + message.disks = []; + for (var i = 0; i < object.disks.length; ++i) { + if (typeof object.disks[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: object expected"); + message.disks[i] = $root.google.cloud.backupdr.v1.AttachedDisk.fromObject(object.disks[i]); + } + } + if (object.displayDevice != null) { + if (typeof object.displayDevice !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.displayDevice: object expected"); + message.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.fromObject(object.displayDevice); + } + if (object.guestAccelerators) { + if (!Array.isArray(object.guestAccelerators)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.guestAccelerators: array expected"); + message.guestAccelerators = []; + for (var i = 0; i < object.guestAccelerators.length; ++i) { + if (typeof object.guestAccelerators[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.guestAccelerators: object expected"); + message.guestAccelerators[i] = $root.google.cloud.backupdr.v1.AcceleratorConfig.fromObject(object.guestAccelerators[i]); + } + } + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.instanceEncryptionKey != null) { + if (typeof object.instanceEncryptionKey !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.instanceEncryptionKey: object expected"); + message.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.fromObject(object.instanceEncryptionKey); + } + switch (object.keyRevocationActionType) { + default: + if (typeof object.keyRevocationActionType === "number") { + message.keyRevocationActionType = object.keyRevocationActionType; + break; + } + break; + case "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": + case 0: + message.keyRevocationActionType = 0; + break; + case "NONE": + case 1: + message.keyRevocationActionType = 1; + break; + case "STOP": + case 2: + message.keyRevocationActionType = 2; + break; + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.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.machineType != null) + message.machineType = String(object.machineType); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.metadata: object expected"); + message.metadata = $root.google.cloud.backupdr.v1.Metadata.fromObject(object.metadata); + } + if (object.minCpuPlatform != null) + message.minCpuPlatform = String(object.minCpuPlatform); + if (object.networkInterfaces) { + if (!Array.isArray(object.networkInterfaces)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkInterfaces: array expected"); + message.networkInterfaces = []; + for (var i = 0; i < object.networkInterfaces.length; ++i) { + if (typeof object.networkInterfaces[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkInterfaces: object expected"); + message.networkInterfaces[i] = $root.google.cloud.backupdr.v1.NetworkInterface.fromObject(object.networkInterfaces[i]); + } + } + if (object.networkPerformanceConfig != null) { + if (typeof object.networkPerformanceConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkPerformanceConfig: object expected"); + message.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.fromObject(object.networkPerformanceConfig); + } + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.params: object expected"); + message.params = $root.google.cloud.backupdr.v1.InstanceParams.fromObject(object.params); + } + switch (object.privateIpv6GoogleAccess) { + default: + if (typeof object.privateIpv6GoogleAccess === "number") { + message.privateIpv6GoogleAccess = object.privateIpv6GoogleAccess; + break; + } + break; + case "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": + case 0: + message.privateIpv6GoogleAccess = 0; + break; + case "INHERIT_FROM_SUBNETWORK": + case 1: + message.privateIpv6GoogleAccess = 1; + break; + case "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE": + case 2: + message.privateIpv6GoogleAccess = 2; + break; + case "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE": + case 3: + message.privateIpv6GoogleAccess = 3; + break; + } + if (object.allocationAffinity != null) { + if (typeof object.allocationAffinity !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.allocationAffinity: object expected"); + message.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.fromObject(object.allocationAffinity); + } + if (object.resourcePolicies) { + if (!Array.isArray(object.resourcePolicies)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.resourcePolicies: array expected"); + message.resourcePolicies = []; + for (var i = 0; i < object.resourcePolicies.length; ++i) + message.resourcePolicies[i] = String(object.resourcePolicies[i]); + } + if (object.scheduling != null) { + if (typeof object.scheduling !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.scheduling: object expected"); + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.fromObject(object.scheduling); + } + if (object.serviceAccounts) { + if (!Array.isArray(object.serviceAccounts)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.serviceAccounts: array expected"); + message.serviceAccounts = []; + for (var i = 0; i < object.serviceAccounts.length; ++i) { + if (typeof object.serviceAccounts[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.serviceAccounts: object expected"); + message.serviceAccounts[i] = $root.google.cloud.backupdr.v1.ServiceAccount.fromObject(object.serviceAccounts[i]); + } + } + if (object.tags != null) { + if (typeof object.tags !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.tags: object expected"); + message.tags = $root.google.cloud.backupdr.v1.Tags.fromObject(object.tags); + } + return message; + }; + + /** + * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeInstanceRestoreProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.disks = []; + object.guestAccelerators = []; + object.networkInterfaces = []; + object.resourcePolicies = []; + object.serviceAccounts = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { + object.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.toObject(message.advancedMachineFeatures, options); + if (options.oneofs) + object._advancedMachineFeatures = "advancedMachineFeatures"; + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + object.canIpForward = message.canIpForward; + if (options.oneofs) + object._canIpForward = "canIpForward"; + } + if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) { + object.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.toObject(message.confidentialInstanceConfig, options); + if (options.oneofs) + object._confidentialInstanceConfig = "confidentialInstanceConfig"; + } + if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) { + object.deletionProtection = message.deletionProtection; + if (options.oneofs) + object._deletionProtection = "deletionProtection"; + } + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.disks && message.disks.length) { + object.disks = []; + for (var j = 0; j < message.disks.length; ++j) + object.disks[j] = $root.google.cloud.backupdr.v1.AttachedDisk.toObject(message.disks[j], options); + } + if (message.displayDevice != null && message.hasOwnProperty("displayDevice")) { + object.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.toObject(message.displayDevice, options); + if (options.oneofs) + object._displayDevice = "displayDevice"; + } + if (message.guestAccelerators && message.guestAccelerators.length) { + object.guestAccelerators = []; + for (var j = 0; j < message.guestAccelerators.length; ++j) + object.guestAccelerators[j] = $root.google.cloud.backupdr.v1.AcceleratorConfig.toObject(message.guestAccelerators[j], options); + } + if (message.hostname != null && message.hasOwnProperty("hostname")) { + object.hostname = message.hostname; + if (options.oneofs) + object._hostname = "hostname"; + } + if (message.instanceEncryptionKey != null && message.hasOwnProperty("instanceEncryptionKey")) { + object.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.toObject(message.instanceEncryptionKey, options); + if (options.oneofs) + object._instanceEncryptionKey = "instanceEncryptionKey"; + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + object.keyRevocationActionType = options.enums === String ? $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] === undefined ? message.keyRevocationActionType : $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] : message.keyRevocationActionType; + if (options.oneofs) + object._keyRevocationActionType = "keyRevocationActionType"; + } + 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.machineType != null && message.hasOwnProperty("machineType")) { + object.machineType = message.machineType; + if (options.oneofs) + object._machineType = "machineType"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = $root.google.cloud.backupdr.v1.Metadata.toObject(message.metadata, options); + if (options.oneofs) + object._metadata = "metadata"; + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + object.minCpuPlatform = message.minCpuPlatform; + if (options.oneofs) + object._minCpuPlatform = "minCpuPlatform"; + } + if (message.networkInterfaces && message.networkInterfaces.length) { + object.networkInterfaces = []; + for (var j = 0; j < message.networkInterfaces.length; ++j) + object.networkInterfaces[j] = $root.google.cloud.backupdr.v1.NetworkInterface.toObject(message.networkInterfaces[j], options); + } + if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { + object.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.toObject(message.networkPerformanceConfig, options); + if (options.oneofs) + object._networkPerformanceConfig = "networkPerformanceConfig"; + } + if (message.params != null && message.hasOwnProperty("params")) { + object.params = $root.google.cloud.backupdr.v1.InstanceParams.toObject(message.params, options); + if (options.oneofs) + object._params = "params"; + } + if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) { + object.privateIpv6GoogleAccess = options.enums === String ? $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess[message.privateIpv6GoogleAccess] === undefined ? message.privateIpv6GoogleAccess : $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess[message.privateIpv6GoogleAccess] : message.privateIpv6GoogleAccess; + if (options.oneofs) + object._privateIpv6GoogleAccess = "privateIpv6GoogleAccess"; + } + if (message.allocationAffinity != null && message.hasOwnProperty("allocationAffinity")) { + object.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.toObject(message.allocationAffinity, options); + if (options.oneofs) + object._allocationAffinity = "allocationAffinity"; + } + if (message.resourcePolicies && message.resourcePolicies.length) { + object.resourcePolicies = []; + for (var j = 0; j < message.resourcePolicies.length; ++j) + object.resourcePolicies[j] = message.resourcePolicies[j]; + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + object.scheduling = $root.google.cloud.backupdr.v1.Scheduling.toObject(message.scheduling, options); + if (options.oneofs) + object._scheduling = "scheduling"; + } + if (message.serviceAccounts && message.serviceAccounts.length) { + object.serviceAccounts = []; + for (var j = 0; j < message.serviceAccounts.length; ++j) + object.serviceAccounts[j] = $root.google.cloud.backupdr.v1.ServiceAccount.toObject(message.serviceAccounts[j], options); + } + if (message.tags != null && message.hasOwnProperty("tags")) { + object.tags = $root.google.cloud.backupdr.v1.Tags.toObject(message.tags, options); + if (options.oneofs) + object._tags = "tags"; + } + return object; + }; + + /** + * Converts this ComputeInstanceRestoreProperties to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + * @returns {Object.} JSON object + */ + ComputeInstanceRestoreProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComputeInstanceRestoreProperties + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputeInstanceRestoreProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceRestoreProperties"; + }; + + /** + * InstancePrivateIpv6GoogleAccess enum. + * @name google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess + * @enum {number} + * @property {number} INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED=0 INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED value + * @property {number} INHERIT_FROM_SUBNETWORK=1 INHERIT_FROM_SUBNETWORK value + * @property {number} ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE=2 ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE value + * @property {number} ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE=3 ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE value + */ + ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED"] = 0; + values[valuesById[1] = "INHERIT_FROM_SUBNETWORK"] = 1; + values[valuesById[2] = "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE"] = 2; + values[valuesById[3] = "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE"] = 3; + return values; + })(); + + return ComputeInstanceRestoreProperties; + })(); + + v1.ComputeInstanceTargetEnvironment = (function() { + + /** + * Properties of a ComputeInstanceTargetEnvironment. + * @memberof google.cloud.backupdr.v1 + * @interface IComputeInstanceTargetEnvironment + * @property {string|null} [project] ComputeInstanceTargetEnvironment project + * @property {string|null} [zone] ComputeInstanceTargetEnvironment zone + */ + + /** + * Constructs a new ComputeInstanceTargetEnvironment. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ComputeInstanceTargetEnvironment. + * @implements IComputeInstanceTargetEnvironment + * @constructor + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment=} [properties] Properties to set + */ + function ComputeInstanceTargetEnvironment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComputeInstanceTargetEnvironment project. + * @member {string} project + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @instance + */ + ComputeInstanceTargetEnvironment.prototype.project = ""; + + /** + * ComputeInstanceTargetEnvironment zone. + * @member {string} zone + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @instance + */ + ComputeInstanceTargetEnvironment.prototype.zone = ""; + + /** + * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment instance + */ + ComputeInstanceTargetEnvironment.create = function create(properties) { + return new ComputeInstanceTargetEnvironment(properties); + }; + + /** + * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceTargetEnvironment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + return writer; + }; + + /** + * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceTargetEnvironment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceTargetEnvironment.decode = function 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.backupdr.v1.ComputeInstanceTargetEnvironment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.project = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceTargetEnvironment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputeInstanceTargetEnvironment message. + * @function verify + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeInstanceTargetEnvironment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + return null; + }; + + /** + * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment + */ + ComputeInstanceTargetEnvironment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment) + return object; + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment(); + if (object.project != null) + message.project = String(object.project); + if (object.zone != null) + message.zone = String(object.zone); + return message; + }; + + /** + * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeInstanceTargetEnvironment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.project = ""; + object.zone = ""; + } + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + return object; + }; + + /** + * Converts this ComputeInstanceTargetEnvironment to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @instance + * @returns {Object.} JSON object + */ + ComputeInstanceTargetEnvironment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComputeInstanceTargetEnvironment + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputeInstanceTargetEnvironment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment"; + }; + + return ComputeInstanceTargetEnvironment; + })(); + + v1.ComputeInstanceDataSourceProperties = (function() { + + /** + * Properties of a ComputeInstanceDataSourceProperties. + * @memberof google.cloud.backupdr.v1 + * @interface IComputeInstanceDataSourceProperties + * @property {string|null} [name] ComputeInstanceDataSourceProperties name + * @property {string|null} [description] ComputeInstanceDataSourceProperties description + * @property {string|null} [machineType] ComputeInstanceDataSourceProperties machineType + * @property {number|Long|null} [totalDiskCount] ComputeInstanceDataSourceProperties totalDiskCount + * @property {number|Long|null} [totalDiskSizeGb] ComputeInstanceDataSourceProperties totalDiskSizeGb + */ + + /** + * Constructs a new ComputeInstanceDataSourceProperties. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ComputeInstanceDataSourceProperties. + * @implements IComputeInstanceDataSourceProperties + * @constructor + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties=} [properties] Properties to set + */ + function ComputeInstanceDataSourceProperties(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComputeInstanceDataSourceProperties name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.name = ""; + + /** + * ComputeInstanceDataSourceProperties description. + * @member {string} description + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.description = ""; + + /** + * ComputeInstanceDataSourceProperties machineType. + * @member {string} machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.machineType = ""; + + /** + * ComputeInstanceDataSourceProperties totalDiskCount. + * @member {number|Long} totalDiskCount + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.totalDiskCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ComputeInstanceDataSourceProperties totalDiskSizeGb. + * @member {number|Long} totalDiskSizeGb + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.totalDiskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties instance + */ + ComputeInstanceDataSourceProperties.create = function create(properties) { + return new ComputeInstanceDataSourceProperties(properties); + }; + + /** + * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceDataSourceProperties.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.machineType); + if (message.totalDiskCount != null && Object.hasOwnProperty.call(message, "totalDiskCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.totalDiskCount); + if (message.totalDiskSizeGb != null && Object.hasOwnProperty.call(message, "totalDiskSizeGb")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.totalDiskSizeGb); + return writer; + }; + + /** + * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceDataSourceProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceDataSourceProperties.decode = function 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.backupdr.v1.ComputeInstanceDataSourceProperties(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.machineType = reader.string(); + break; + } + case 4: { + message.totalDiskCount = reader.int64(); + break; + } + case 5: { + message.totalDiskSizeGb = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceDataSourceProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputeInstanceDataSourceProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeInstanceDataSourceProperties.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + if (message.totalDiskCount != null && message.hasOwnProperty("totalDiskCount")) + if (!$util.isInteger(message.totalDiskCount) && !(message.totalDiskCount && $util.isInteger(message.totalDiskCount.low) && $util.isInteger(message.totalDiskCount.high))) + return "totalDiskCount: integer|Long expected"; + if (message.totalDiskSizeGb != null && message.hasOwnProperty("totalDiskSizeGb")) + if (!$util.isInteger(message.totalDiskSizeGb) && !(message.totalDiskSizeGb && $util.isInteger(message.totalDiskSizeGb.low) && $util.isInteger(message.totalDiskSizeGb.high))) + return "totalDiskSizeGb: integer|Long expected"; + return null; + }; + + /** + * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties + */ + ComputeInstanceDataSourceProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.totalDiskCount != null) + if ($util.Long) + (message.totalDiskCount = $util.Long.fromValue(object.totalDiskCount)).unsigned = false; + else if (typeof object.totalDiskCount === "string") + message.totalDiskCount = parseInt(object.totalDiskCount, 10); + else if (typeof object.totalDiskCount === "number") + message.totalDiskCount = object.totalDiskCount; + else if (typeof object.totalDiskCount === "object") + message.totalDiskCount = new $util.LongBits(object.totalDiskCount.low >>> 0, object.totalDiskCount.high >>> 0).toNumber(); + if (object.totalDiskSizeGb != null) + if ($util.Long) + (message.totalDiskSizeGb = $util.Long.fromValue(object.totalDiskSizeGb)).unsigned = false; + else if (typeof object.totalDiskSizeGb === "string") + message.totalDiskSizeGb = parseInt(object.totalDiskSizeGb, 10); + else if (typeof object.totalDiskSizeGb === "number") + message.totalDiskSizeGb = object.totalDiskSizeGb; + else if (typeof object.totalDiskSizeGb === "object") + message.totalDiskSizeGb = new $util.LongBits(object.totalDiskSizeGb.low >>> 0, object.totalDiskSizeGb.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeInstanceDataSourceProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.machineType = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalDiskCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalDiskCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalDiskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalDiskSizeGb = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + if (message.totalDiskCount != null && message.hasOwnProperty("totalDiskCount")) + if (typeof message.totalDiskCount === "number") + object.totalDiskCount = options.longs === String ? String(message.totalDiskCount) : message.totalDiskCount; + else + object.totalDiskCount = options.longs === String ? $util.Long.prototype.toString.call(message.totalDiskCount) : options.longs === Number ? new $util.LongBits(message.totalDiskCount.low >>> 0, message.totalDiskCount.high >>> 0).toNumber() : message.totalDiskCount; + if (message.totalDiskSizeGb != null && message.hasOwnProperty("totalDiskSizeGb")) + if (typeof message.totalDiskSizeGb === "number") + object.totalDiskSizeGb = options.longs === String ? String(message.totalDiskSizeGb) : message.totalDiskSizeGb; + else + object.totalDiskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.totalDiskSizeGb) : options.longs === Number ? new $util.LongBits(message.totalDiskSizeGb.low >>> 0, message.totalDiskSizeGb.high >>> 0).toNumber() : message.totalDiskSizeGb; + return object; + }; + + /** + * Converts this ComputeInstanceDataSourceProperties to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + * @returns {Object.} JSON object + */ + ComputeInstanceDataSourceProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComputeInstanceDataSourceProperties + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputeInstanceDataSourceProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties"; + }; + + return ComputeInstanceDataSourceProperties; + })(); + + v1.AdvancedMachineFeatures = (function() { + + /** + * Properties of an AdvancedMachineFeatures. + * @memberof google.cloud.backupdr.v1 + * @interface IAdvancedMachineFeatures + * @property {boolean|null} [enableNestedVirtualization] AdvancedMachineFeatures enableNestedVirtualization + * @property {number|null} [threadsPerCore] AdvancedMachineFeatures threadsPerCore + * @property {number|null} [visibleCoreCount] AdvancedMachineFeatures visibleCoreCount + * @property {boolean|null} [enableUefiNetworking] AdvancedMachineFeatures enableUefiNetworking + */ + + /** + * Constructs a new AdvancedMachineFeatures. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AdvancedMachineFeatures. + * @implements IAdvancedMachineFeatures + * @constructor + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures=} [properties] Properties to set + */ + function AdvancedMachineFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdvancedMachineFeatures enableNestedVirtualization. + * @member {boolean|null|undefined} enableNestedVirtualization + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.enableNestedVirtualization = null; + + /** + * AdvancedMachineFeatures threadsPerCore. + * @member {number|null|undefined} threadsPerCore + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.threadsPerCore = null; + + /** + * AdvancedMachineFeatures visibleCoreCount. + * @member {number|null|undefined} visibleCoreCount + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.visibleCoreCount = null; + + /** + * AdvancedMachineFeatures enableUefiNetworking. + * @member {boolean|null|undefined} enableUefiNetworking + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.enableUefiNetworking = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AdvancedMachineFeatures _enableNestedVirtualization. + * @member {"enableNestedVirtualization"|undefined} _enableNestedVirtualization + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableNestedVirtualization", { + get: $util.oneOfGetter($oneOfFields = ["enableNestedVirtualization"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AdvancedMachineFeatures _threadsPerCore. + * @member {"threadsPerCore"|undefined} _threadsPerCore + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_threadsPerCore", { + get: $util.oneOfGetter($oneOfFields = ["threadsPerCore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AdvancedMachineFeatures _visibleCoreCount. + * @member {"visibleCoreCount"|undefined} _visibleCoreCount + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_visibleCoreCount", { + get: $util.oneOfGetter($oneOfFields = ["visibleCoreCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AdvancedMachineFeatures _enableUefiNetworking. + * @member {"enableUefiNetworking"|undefined} _enableUefiNetworking + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableUefiNetworking", { + get: $util.oneOfGetter($oneOfFields = ["enableUefiNetworking"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AdvancedMachineFeatures instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures instance + */ + AdvancedMachineFeatures.create = function create(properties) { + return new AdvancedMachineFeatures(properties); + }; + + /** + * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvancedMachineFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableNestedVirtualization != null && Object.hasOwnProperty.call(message, "enableNestedVirtualization")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableNestedVirtualization); + if (message.threadsPerCore != null && Object.hasOwnProperty.call(message, "threadsPerCore")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.threadsPerCore); + if (message.visibleCoreCount != null && Object.hasOwnProperty.call(message, "visibleCoreCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.visibleCoreCount); + if (message.enableUefiNetworking != null && Object.hasOwnProperty.call(message, "enableUefiNetworking")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enableUefiNetworking); + return writer; + }; + + /** + * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvancedMachineFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdvancedMachineFeatures.decode = function 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.backupdr.v1.AdvancedMachineFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableNestedVirtualization = reader.bool(); + break; + } + case 2: { + message.threadsPerCore = reader.int32(); + break; + } + case 3: { + message.visibleCoreCount = reader.int32(); + break; + } + case 4: { + message.enableUefiNetworking = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdvancedMachineFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdvancedMachineFeatures message. + * @function verify + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdvancedMachineFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { + properties._enableNestedVirtualization = 1; + if (typeof message.enableNestedVirtualization !== "boolean") + return "enableNestedVirtualization: boolean expected"; + } + if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { + properties._threadsPerCore = 1; + if (!$util.isInteger(message.threadsPerCore)) + return "threadsPerCore: integer expected"; + } + if (message.visibleCoreCount != null && message.hasOwnProperty("visibleCoreCount")) { + properties._visibleCoreCount = 1; + if (!$util.isInteger(message.visibleCoreCount)) + return "visibleCoreCount: integer expected"; + } + if (message.enableUefiNetworking != null && message.hasOwnProperty("enableUefiNetworking")) { + properties._enableUefiNetworking = 1; + if (typeof message.enableUefiNetworking !== "boolean") + return "enableUefiNetworking: boolean expected"; + } + return null; + }; + + /** + * Creates an AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures + */ + AdvancedMachineFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AdvancedMachineFeatures) + return object; + var message = new $root.google.cloud.backupdr.v1.AdvancedMachineFeatures(); + if (object.enableNestedVirtualization != null) + message.enableNestedVirtualization = Boolean(object.enableNestedVirtualization); + if (object.threadsPerCore != null) + message.threadsPerCore = object.threadsPerCore | 0; + if (object.visibleCoreCount != null) + message.visibleCoreCount = object.visibleCoreCount | 0; + if (object.enableUefiNetworking != null) + message.enableUefiNetworking = Boolean(object.enableUefiNetworking); + return message; + }; + + /** + * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.AdvancedMachineFeatures} message AdvancedMachineFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdvancedMachineFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { + object.enableNestedVirtualization = message.enableNestedVirtualization; + if (options.oneofs) + object._enableNestedVirtualization = "enableNestedVirtualization"; + } + if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { + object.threadsPerCore = message.threadsPerCore; + if (options.oneofs) + object._threadsPerCore = "threadsPerCore"; + } + if (message.visibleCoreCount != null && message.hasOwnProperty("visibleCoreCount")) { + object.visibleCoreCount = message.visibleCoreCount; + if (options.oneofs) + object._visibleCoreCount = "visibleCoreCount"; + } + if (message.enableUefiNetworking != null && message.hasOwnProperty("enableUefiNetworking")) { + object.enableUefiNetworking = message.enableUefiNetworking; + if (options.oneofs) + object._enableUefiNetworking = "enableUefiNetworking"; + } + return object; + }; + + /** + * Converts this AdvancedMachineFeatures to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + * @returns {Object.} JSON object + */ + AdvancedMachineFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdvancedMachineFeatures + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdvancedMachineFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AdvancedMachineFeatures"; + }; + + return AdvancedMachineFeatures; + })(); + + v1.ConfidentialInstanceConfig = (function() { + + /** + * Properties of a ConfidentialInstanceConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IConfidentialInstanceConfig + * @property {boolean|null} [enableConfidentialCompute] ConfidentialInstanceConfig enableConfidentialCompute + */ + + /** + * Constructs a new ConfidentialInstanceConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ConfidentialInstanceConfig. + * @implements IConfidentialInstanceConfig + * @constructor + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig=} [properties] Properties to set + */ + function ConfidentialInstanceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConfidentialInstanceConfig enableConfidentialCompute. + * @member {boolean|null|undefined} enableConfidentialCompute + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @instance + */ + ConfidentialInstanceConfig.prototype.enableConfidentialCompute = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConfidentialInstanceConfig _enableConfidentialCompute. + * @member {"enableConfidentialCompute"|undefined} _enableConfidentialCompute + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @instance + */ + Object.defineProperty(ConfidentialInstanceConfig.prototype, "_enableConfidentialCompute", { + get: $util.oneOfGetter($oneOfFields = ["enableConfidentialCompute"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConfidentialInstanceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig instance + */ + ConfidentialInstanceConfig.create = function create(properties) { + return new ConfidentialInstanceConfig(properties); + }; + + /** + * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig} message ConfidentialInstanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidentialInstanceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableConfidentialCompute != null && Object.hasOwnProperty.call(message, "enableConfidentialCompute")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableConfidentialCompute); + return writer; + }; + + /** + * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig} message ConfidentialInstanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidentialInstanceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidentialInstanceConfig.decode = function 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.backupdr.v1.ConfidentialInstanceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableConfidentialCompute = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidentialInstanceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfidentialInstanceConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfidentialInstanceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enableConfidentialCompute != null && message.hasOwnProperty("enableConfidentialCompute")) { + properties._enableConfidentialCompute = 1; + if (typeof message.enableConfidentialCompute !== "boolean") + return "enableConfidentialCompute: boolean expected"; + } + return null; + }; + + /** + * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig + */ + ConfidentialInstanceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig(); + if (object.enableConfidentialCompute != null) + message.enableConfidentialCompute = Boolean(object.enableConfidentialCompute); + return message; + }; + + /** + * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {google.cloud.backupdr.v1.ConfidentialInstanceConfig} message ConfidentialInstanceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfidentialInstanceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enableConfidentialCompute != null && message.hasOwnProperty("enableConfidentialCompute")) { + object.enableConfidentialCompute = message.enableConfidentialCompute; + if (options.oneofs) + object._enableConfidentialCompute = "enableConfidentialCompute"; + } + return object; + }; + + /** + * Converts this ConfidentialInstanceConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @instance + * @returns {Object.} JSON object + */ + ConfidentialInstanceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConfidentialInstanceConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfidentialInstanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ConfidentialInstanceConfig"; + }; + + return ConfidentialInstanceConfig; + })(); + + v1.DisplayDevice = (function() { + + /** + * Properties of a DisplayDevice. + * @memberof google.cloud.backupdr.v1 + * @interface IDisplayDevice + * @property {boolean|null} [enableDisplay] DisplayDevice enableDisplay + */ + + /** + * Constructs a new DisplayDevice. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DisplayDevice. + * @implements IDisplayDevice + * @constructor + * @param {google.cloud.backupdr.v1.IDisplayDevice=} [properties] Properties to set + */ + function DisplayDevice(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DisplayDevice enableDisplay. + * @member {boolean|null|undefined} enableDisplay + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @instance + */ + DisplayDevice.prototype.enableDisplay = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DisplayDevice _enableDisplay. + * @member {"enableDisplay"|undefined} _enableDisplay + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @instance + */ + Object.defineProperty(DisplayDevice.prototype, "_enableDisplay", { + get: $util.oneOfGetter($oneOfFields = ["enableDisplay"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DisplayDevice instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.IDisplayDevice=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice instance + */ + DisplayDevice.create = function create(properties) { + return new DisplayDevice(properties); + }; + + /** + * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.IDisplayDevice} message DisplayDevice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisplayDevice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableDisplay != null && Object.hasOwnProperty.call(message, "enableDisplay")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableDisplay); + return writer; + }; + + /** + * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.IDisplayDevice} message DisplayDevice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisplayDevice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DisplayDevice message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisplayDevice.decode = function 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.backupdr.v1.DisplayDevice(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableDisplay = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisplayDevice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DisplayDevice message. + * @function verify + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DisplayDevice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enableDisplay != null && message.hasOwnProperty("enableDisplay")) { + properties._enableDisplay = 1; + if (typeof message.enableDisplay !== "boolean") + return "enableDisplay: boolean expected"; + } + return null; + }; + + /** + * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice + */ + DisplayDevice.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DisplayDevice) + return object; + var message = new $root.google.cloud.backupdr.v1.DisplayDevice(); + if (object.enableDisplay != null) + message.enableDisplay = Boolean(object.enableDisplay); + return message; + }; + + /** + * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.DisplayDevice} message DisplayDevice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DisplayDevice.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enableDisplay != null && message.hasOwnProperty("enableDisplay")) { + object.enableDisplay = message.enableDisplay; + if (options.oneofs) + object._enableDisplay = "enableDisplay"; + } + return object; + }; + + /** + * Converts this DisplayDevice to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @instance + * @returns {Object.} JSON object + */ + DisplayDevice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DisplayDevice + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DisplayDevice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DisplayDevice"; + }; + + return DisplayDevice; + })(); + + v1.AcceleratorConfig = (function() { + + /** + * Properties of an AcceleratorConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IAcceleratorConfig + * @property {string|null} [acceleratorType] AcceleratorConfig acceleratorType + * @property {number|null} [acceleratorCount] AcceleratorConfig acceleratorCount + */ + + /** + * Constructs a new AcceleratorConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AcceleratorConfig. + * @implements IAcceleratorConfig + * @constructor + * @param {google.cloud.backupdr.v1.IAcceleratorConfig=} [properties] Properties to set + */ + function AcceleratorConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcceleratorConfig acceleratorType. + * @member {string|null|undefined} acceleratorType + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.acceleratorType = null; + + /** + * AcceleratorConfig acceleratorCount. + * @member {number|null|undefined} acceleratorCount + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.acceleratorCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AcceleratorConfig _acceleratorType. + * @member {"acceleratorType"|undefined} _acceleratorType + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + */ + Object.defineProperty(AcceleratorConfig.prototype, "_acceleratorType", { + get: $util.oneOfGetter($oneOfFields = ["acceleratorType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AcceleratorConfig _acceleratorCount. + * @member {"acceleratorCount"|undefined} _acceleratorCount + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + */ + Object.defineProperty(AcceleratorConfig.prototype, "_acceleratorCount", { + get: $util.oneOfGetter($oneOfFields = ["acceleratorCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AcceleratorConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {google.cloud.backupdr.v1.IAcceleratorConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig instance + */ + AcceleratorConfig.create = function create(properties) { + return new AcceleratorConfig(properties); + }; + + /** + * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {google.cloud.backupdr.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcceleratorConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.acceleratorType != null && Object.hasOwnProperty.call(message, "acceleratorType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.acceleratorType); + if (message.acceleratorCount != null && Object.hasOwnProperty.call(message, "acceleratorCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.acceleratorCount); + return writer; + }; + + /** + * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {google.cloud.backupdr.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcceleratorConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcceleratorConfig.decode = function 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.backupdr.v1.AcceleratorConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.acceleratorType = reader.string(); + break; + } + case 2: { + message.acceleratorCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcceleratorConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcceleratorConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcceleratorConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) { + properties._acceleratorType = 1; + if (!$util.isString(message.acceleratorType)) + return "acceleratorType: string expected"; + } + if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) { + properties._acceleratorCount = 1; + if (!$util.isInteger(message.acceleratorCount)) + return "acceleratorCount: integer expected"; + } + return null; + }; + + /** + * Creates an AcceleratorConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig + */ + AcceleratorConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AcceleratorConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.AcceleratorConfig(); + if (object.acceleratorType != null) + message.acceleratorType = String(object.acceleratorType); + if (object.acceleratorCount != null) + message.acceleratorCount = object.acceleratorCount | 0; + return message; + }; + + /** + * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {google.cloud.backupdr.v1.AcceleratorConfig} message AcceleratorConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcceleratorConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) { + object.acceleratorType = message.acceleratorType; + if (options.oneofs) + object._acceleratorType = "acceleratorType"; + } + if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) { + object.acceleratorCount = message.acceleratorCount; + if (options.oneofs) + object._acceleratorCount = "acceleratorCount"; + } + return object; + }; + + /** + * Converts this AcceleratorConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + * @returns {Object.} JSON object + */ + AcceleratorConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcceleratorConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcceleratorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AcceleratorConfig"; + }; + + return AcceleratorConfig; + })(); + + v1.CustomerEncryptionKey = (function() { + + /** + * Properties of a CustomerEncryptionKey. + * @memberof google.cloud.backupdr.v1 + * @interface ICustomerEncryptionKey + * @property {string|null} [rawKey] CustomerEncryptionKey rawKey + * @property {string|null} [rsaEncryptedKey] CustomerEncryptionKey rsaEncryptedKey + * @property {string|null} [kmsKeyName] CustomerEncryptionKey kmsKeyName + * @property {string|null} [kmsKeyServiceAccount] CustomerEncryptionKey kmsKeyServiceAccount + */ + + /** + * Constructs a new CustomerEncryptionKey. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CustomerEncryptionKey. + * @implements ICustomerEncryptionKey + * @constructor + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey=} [properties] Properties to set + */ + function CustomerEncryptionKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomerEncryptionKey rawKey. + * @member {string|null|undefined} rawKey + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + CustomerEncryptionKey.prototype.rawKey = null; + + /** + * CustomerEncryptionKey rsaEncryptedKey. + * @member {string|null|undefined} rsaEncryptedKey + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + CustomerEncryptionKey.prototype.rsaEncryptedKey = null; + + /** + * CustomerEncryptionKey kmsKeyName. + * @member {string|null|undefined} kmsKeyName + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + CustomerEncryptionKey.prototype.kmsKeyName = null; + + /** + * CustomerEncryptionKey kmsKeyServiceAccount. + * @member {string|null|undefined} kmsKeyServiceAccount + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + CustomerEncryptionKey.prototype.kmsKeyServiceAccount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CustomerEncryptionKey key. + * @member {"rawKey"|"rsaEncryptedKey"|"kmsKeyName"|undefined} key + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + Object.defineProperty(CustomerEncryptionKey.prototype, "key", { + get: $util.oneOfGetter($oneOfFields = ["rawKey", "rsaEncryptedKey", "kmsKeyName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * CustomerEncryptionKey _kmsKeyServiceAccount. + * @member {"kmsKeyServiceAccount"|undefined} _kmsKeyServiceAccount + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + Object.defineProperty(CustomerEncryptionKey.prototype, "_kmsKeyServiceAccount", { + get: $util.oneOfGetter($oneOfFields = ["kmsKeyServiceAccount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CustomerEncryptionKey instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey instance + */ + CustomerEncryptionKey.create = function create(properties) { + return new CustomerEncryptionKey(properties); + }; + + /** + * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey} message CustomerEncryptionKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomerEncryptionKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rawKey != null && Object.hasOwnProperty.call(message, "rawKey")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rawKey); + if (message.rsaEncryptedKey != null && Object.hasOwnProperty.call(message, "rsaEncryptedKey")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rsaEncryptedKey); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyName); + if (message.kmsKeyServiceAccount != null && Object.hasOwnProperty.call(message, "kmsKeyServiceAccount")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kmsKeyServiceAccount); + return writer; + }; + + /** + * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey} message CustomerEncryptionKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomerEncryptionKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomerEncryptionKey message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomerEncryptionKey.decode = function 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.backupdr.v1.CustomerEncryptionKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rawKey = reader.string(); + break; + } + case 2: { + message.rsaEncryptedKey = reader.string(); + break; + } + case 3: { + message.kmsKeyName = reader.string(); + break; + } + case 4: { + message.kmsKeyServiceAccount = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomerEncryptionKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomerEncryptionKey message. + * @function verify + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomerEncryptionKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rawKey != null && message.hasOwnProperty("rawKey")) { + properties.key = 1; + if (!$util.isString(message.rawKey)) + return "rawKey: string expected"; + } + if (message.rsaEncryptedKey != null && message.hasOwnProperty("rsaEncryptedKey")) { + if (properties.key === 1) + return "key: multiple values"; + properties.key = 1; + if (!$util.isString(message.rsaEncryptedKey)) + return "rsaEncryptedKey: string expected"; + } + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { + if (properties.key === 1) + return "key: multiple values"; + properties.key = 1; + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + } + if (message.kmsKeyServiceAccount != null && message.hasOwnProperty("kmsKeyServiceAccount")) { + properties._kmsKeyServiceAccount = 1; + if (!$util.isString(message.kmsKeyServiceAccount)) + return "kmsKeyServiceAccount: string expected"; + } + return null; + }; + + /** + * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey + */ + CustomerEncryptionKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CustomerEncryptionKey) + return object; + var message = new $root.google.cloud.backupdr.v1.CustomerEncryptionKey(); + if (object.rawKey != null) + message.rawKey = String(object.rawKey); + if (object.rsaEncryptedKey != null) + message.rsaEncryptedKey = String(object.rsaEncryptedKey); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + if (object.kmsKeyServiceAccount != null) + message.kmsKeyServiceAccount = String(object.kmsKeyServiceAccount); + return message; + }; + + /** + * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.CustomerEncryptionKey} message CustomerEncryptionKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomerEncryptionKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.rawKey != null && message.hasOwnProperty("rawKey")) { + object.rawKey = message.rawKey; + if (options.oneofs) + object.key = "rawKey"; + } + if (message.rsaEncryptedKey != null && message.hasOwnProperty("rsaEncryptedKey")) { + object.rsaEncryptedKey = message.rsaEncryptedKey; + if (options.oneofs) + object.key = "rsaEncryptedKey"; + } + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { + object.kmsKeyName = message.kmsKeyName; + if (options.oneofs) + object.key = "kmsKeyName"; + } + if (message.kmsKeyServiceAccount != null && message.hasOwnProperty("kmsKeyServiceAccount")) { + object.kmsKeyServiceAccount = message.kmsKeyServiceAccount; + if (options.oneofs) + object._kmsKeyServiceAccount = "kmsKeyServiceAccount"; + } + return object; + }; + + /** + * Converts this CustomerEncryptionKey to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + * @returns {Object.} JSON object + */ + CustomerEncryptionKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomerEncryptionKey + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomerEncryptionKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CustomerEncryptionKey"; + }; + + return CustomerEncryptionKey; + })(); + + v1.Entry = (function() { + + /** + * Properties of an Entry. + * @memberof google.cloud.backupdr.v1 + * @interface IEntry + * @property {string|null} [key] Entry key + * @property {string|null} [value] Entry value + */ + + /** + * Constructs a new Entry. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an Entry. + * @implements IEntry + * @constructor + * @param {google.cloud.backupdr.v1.IEntry=} [properties] Properties to set + */ + function Entry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entry key. + * @member {string|null|undefined} key + * @memberof google.cloud.backupdr.v1.Entry + * @instance + */ + Entry.prototype.key = null; + + /** + * Entry value. + * @member {string|null|undefined} value + * @memberof google.cloud.backupdr.v1.Entry + * @instance + */ + Entry.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Entry _key. + * @member {"key"|undefined} _key + * @memberof google.cloud.backupdr.v1.Entry + * @instance + */ + Object.defineProperty(Entry.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Entry _value. + * @member {"value"|undefined} _value + * @memberof google.cloud.backupdr.v1.Entry + * @instance + */ + Object.defineProperty(Entry.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Entry instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.IEntry=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Entry} Entry instance + */ + Entry.create = function create(properties) { + return new Entry(properties); + }; + + /** + * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decode = function 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.backupdr.v1.Entry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entry message. + * @function verify + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; + } + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Entry} Entry + */ + Entry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Entry) + return object; + var message = new $root.google.cloud.backupdr.v1.Entry(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.Entry} message Entry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) + object._key = "key"; + } + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object._value = "value"; + } + return object; + }; + + /** + * Converts this Entry to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Entry + * @instance + * @returns {Object.} JSON object + */ + Entry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Entry + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Entry"; + }; + + return Entry; + })(); + + v1.Metadata = (function() { + + /** + * Properties of a Metadata. + * @memberof google.cloud.backupdr.v1 + * @interface IMetadata + * @property {Array.|null} [items] Metadata items + */ + + /** + * Constructs a new Metadata. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {google.cloud.backupdr.v1.IMetadata=} [properties] Properties to set + */ + function Metadata(properties) { + this.items = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metadata items. + * @member {Array.} items + * @memberof google.cloud.backupdr.v1.Metadata + * @instance + */ + Metadata.prototype.items = $util.emptyArray; + + /** + * Creates a new Metadata instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {google.cloud.backupdr.v1.IMetadata=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Metadata} Metadata instance + */ + Metadata.create = function create(properties) { + return new Metadata(properties); + }; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {google.cloud.backupdr.v1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + $root.google.cloud.backupdr.v1.Entry.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {google.cloud.backupdr.v1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decode = function 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.backupdr.v1.Metadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.google.cloud.backupdr.v1.Entry.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metadata message. + * @function verify + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) { + var error = $root.google.cloud.backupdr.v1.Entry.verify(message.items[i]); + if (error) + return "items." + error; + } + } + return null; + }; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Metadata} Metadata + */ + Metadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Metadata) + return object; + var message = new $root.google.cloud.backupdr.v1.Metadata(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".google.cloud.backupdr.v1.Metadata.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Metadata.items: object expected"); + message.items[i] = $root.google.cloud.backupdr.v1.Entry.fromObject(object.items[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {google.cloud.backupdr.v1.Metadata} message Metadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = $root.google.cloud.backupdr.v1.Entry.toObject(message.items[j], options); + } + return object; + }; + + /** + * Converts this Metadata to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Metadata + * @instance + * @returns {Object.} JSON object + */ + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metadata + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Metadata"; + }; + + return Metadata; + })(); + + v1.NetworkInterface = (function() { + + /** + * Properties of a NetworkInterface. + * @memberof google.cloud.backupdr.v1 + * @interface INetworkInterface + * @property {string|null} [network] NetworkInterface network + * @property {string|null} [subnetwork] NetworkInterface subnetwork + * @property {string|null} [ipAddress] NetworkInterface ipAddress + * @property {string|null} [ipv6Address] NetworkInterface ipv6Address + * @property {number|null} [internalIpv6PrefixLength] NetworkInterface internalIpv6PrefixLength + * @property {string|null} [name] NetworkInterface name + * @property {Array.|null} [accessConfigs] NetworkInterface accessConfigs + * @property {Array.|null} [ipv6AccessConfigs] NetworkInterface ipv6AccessConfigs + * @property {Array.|null} [aliasIpRanges] NetworkInterface aliasIpRanges + * @property {google.cloud.backupdr.v1.NetworkInterface.StackType|null} [stackType] NetworkInterface stackType + * @property {google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null} [ipv6AccessType] NetworkInterface ipv6AccessType + * @property {number|null} [queueCount] NetworkInterface queueCount + * @property {google.cloud.backupdr.v1.NetworkInterface.NicType|null} [nicType] NetworkInterface nicType + * @property {string|null} [networkAttachment] NetworkInterface networkAttachment + */ + + /** + * Constructs a new NetworkInterface. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a NetworkInterface. + * @implements INetworkInterface + * @constructor + * @param {google.cloud.backupdr.v1.INetworkInterface=} [properties] Properties to set + */ + function NetworkInterface(properties) { + this.accessConfigs = []; + this.ipv6AccessConfigs = []; + this.aliasIpRanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkInterface network. + * @member {string|null|undefined} network + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.network = null; + + /** + * NetworkInterface subnetwork. + * @member {string|null|undefined} subnetwork + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.subnetwork = null; + + /** + * NetworkInterface ipAddress. + * @member {string|null|undefined} ipAddress + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.ipAddress = null; + + /** + * NetworkInterface ipv6Address. + * @member {string|null|undefined} ipv6Address + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.ipv6Address = null; + + /** + * NetworkInterface internalIpv6PrefixLength. + * @member {number|null|undefined} internalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.internalIpv6PrefixLength = null; + + /** + * NetworkInterface name. + * @member {string|null|undefined} name + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.name = null; + + /** + * NetworkInterface accessConfigs. + * @member {Array.} accessConfigs + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.accessConfigs = $util.emptyArray; + + /** + * NetworkInterface ipv6AccessConfigs. + * @member {Array.} ipv6AccessConfigs + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.ipv6AccessConfigs = $util.emptyArray; + + /** + * NetworkInterface aliasIpRanges. + * @member {Array.} aliasIpRanges + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.aliasIpRanges = $util.emptyArray; + + /** + * NetworkInterface stackType. + * @member {google.cloud.backupdr.v1.NetworkInterface.StackType|null|undefined} stackType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.stackType = null; + + /** + * NetworkInterface ipv6AccessType. + * @member {google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null|undefined} ipv6AccessType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.ipv6AccessType = null; + + /** + * NetworkInterface queueCount. + * @member {number|null|undefined} queueCount + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.queueCount = null; + + /** + * NetworkInterface nicType. + * @member {google.cloud.backupdr.v1.NetworkInterface.NicType|null|undefined} nicType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.nicType = null; + + /** + * NetworkInterface networkAttachment. + * @member {string|null|undefined} networkAttachment + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.networkAttachment = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NetworkInterface _network. + * @member {"network"|undefined} _network + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_network", { + get: $util.oneOfGetter($oneOfFields = ["network"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _subnetwork. + * @member {"subnetwork"|undefined} _subnetwork + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_subnetwork", { + get: $util.oneOfGetter($oneOfFields = ["subnetwork"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _ipAddress. + * @member {"ipAddress"|undefined} _ipAddress + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_ipAddress", { + get: $util.oneOfGetter($oneOfFields = ["ipAddress"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _ipv6Address. + * @member {"ipv6Address"|undefined} _ipv6Address + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_ipv6Address", { + get: $util.oneOfGetter($oneOfFields = ["ipv6Address"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _internalIpv6PrefixLength. + * @member {"internalIpv6PrefixLength"|undefined} _internalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_internalIpv6PrefixLength", { + get: $util.oneOfGetter($oneOfFields = ["internalIpv6PrefixLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _name. + * @member {"name"|undefined} _name + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _stackType. + * @member {"stackType"|undefined} _stackType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_stackType", { + get: $util.oneOfGetter($oneOfFields = ["stackType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _ipv6AccessType. + * @member {"ipv6AccessType"|undefined} _ipv6AccessType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_ipv6AccessType", { + get: $util.oneOfGetter($oneOfFields = ["ipv6AccessType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _queueCount. + * @member {"queueCount"|undefined} _queueCount + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_queueCount", { + get: $util.oneOfGetter($oneOfFields = ["queueCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _nicType. + * @member {"nicType"|undefined} _nicType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_nicType", { + get: $util.oneOfGetter($oneOfFields = ["nicType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _networkAttachment. + * @member {"networkAttachment"|undefined} _networkAttachment + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_networkAttachment", { + get: $util.oneOfGetter($oneOfFields = ["networkAttachment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NetworkInterface instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {google.cloud.backupdr.v1.INetworkInterface=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface instance + */ + NetworkInterface.create = function create(properties) { + return new NetworkInterface(properties); + }; + + /** + * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {google.cloud.backupdr.v1.INetworkInterface} message NetworkInterface message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkInterface.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetwork); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); + if (message.ipv6Address != null && Object.hasOwnProperty.call(message, "ipv6Address")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipv6Address); + if (message.internalIpv6PrefixLength != null && Object.hasOwnProperty.call(message, "internalIpv6PrefixLength")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.internalIpv6PrefixLength); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.accessConfigs != null && message.accessConfigs.length) + for (var i = 0; i < message.accessConfigs.length; ++i) + $root.google.cloud.backupdr.v1.AccessConfig.encode(message.accessConfigs[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.ipv6AccessConfigs != null && message.ipv6AccessConfigs.length) + for (var i = 0; i < message.ipv6AccessConfigs.length; ++i) + $root.google.cloud.backupdr.v1.AccessConfig.encode(message.ipv6AccessConfigs[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.aliasIpRanges != null && message.aliasIpRanges.length) + for (var i = 0; i < message.aliasIpRanges.length; ++i) + $root.google.cloud.backupdr.v1.AliasIpRange.encode(message.aliasIpRanges[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.stackType != null && Object.hasOwnProperty.call(message, "stackType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.stackType); + if (message.ipv6AccessType != null && Object.hasOwnProperty.call(message, "ipv6AccessType")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.ipv6AccessType); + if (message.queueCount != null && Object.hasOwnProperty.call(message, "queueCount")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.queueCount); + if (message.nicType != null && Object.hasOwnProperty.call(message, "nicType")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.nicType); + if (message.networkAttachment != null && Object.hasOwnProperty.call(message, "networkAttachment")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.networkAttachment); + return writer; + }; + + /** + * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {google.cloud.backupdr.v1.INetworkInterface} message NetworkInterface message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkInterface.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkInterface message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkInterface.decode = function 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.backupdr.v1.NetworkInterface(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.network = reader.string(); + break; + } + case 2: { + message.subnetwork = reader.string(); + break; + } + case 3: { + message.ipAddress = reader.string(); + break; + } + case 4: { + message.ipv6Address = reader.string(); + break; + } + case 5: { + message.internalIpv6PrefixLength = reader.int32(); + break; + } + case 6: { + message.name = reader.string(); + break; + } + case 7: { + if (!(message.accessConfigs && message.accessConfigs.length)) + message.accessConfigs = []; + message.accessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.ipv6AccessConfigs && message.ipv6AccessConfigs.length)) + message.ipv6AccessConfigs = []; + message.ipv6AccessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader, reader.uint32())); + break; + } + case 9: { + if (!(message.aliasIpRanges && message.aliasIpRanges.length)) + message.aliasIpRanges = []; + message.aliasIpRanges.push($root.google.cloud.backupdr.v1.AliasIpRange.decode(reader, reader.uint32())); + break; + } + case 10: { + message.stackType = reader.int32(); + break; + } + case 11: { + message.ipv6AccessType = reader.int32(); + break; + } + case 12: { + message.queueCount = reader.int32(); + break; + } + case 13: { + message.nicType = reader.int32(); + break; + } + case 14: { + message.networkAttachment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkInterface.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkInterface message. + * @function verify + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkInterface.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.network != null && message.hasOwnProperty("network")) { + properties._network = 1; + if (!$util.isString(message.network)) + return "network: string expected"; + } + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { + properties._subnetwork = 1; + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + } + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) { + properties._ipAddress = 1; + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + } + if (message.ipv6Address != null && message.hasOwnProperty("ipv6Address")) { + properties._ipv6Address = 1; + if (!$util.isString(message.ipv6Address)) + return "ipv6Address: string expected"; + } + if (message.internalIpv6PrefixLength != null && message.hasOwnProperty("internalIpv6PrefixLength")) { + properties._internalIpv6PrefixLength = 1; + if (!$util.isInteger(message.internalIpv6PrefixLength)) + return "internalIpv6PrefixLength: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.accessConfigs != null && message.hasOwnProperty("accessConfigs")) { + if (!Array.isArray(message.accessConfigs)) + return "accessConfigs: array expected"; + for (var i = 0; i < message.accessConfigs.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AccessConfig.verify(message.accessConfigs[i]); + if (error) + return "accessConfigs." + error; + } + } + if (message.ipv6AccessConfigs != null && message.hasOwnProperty("ipv6AccessConfigs")) { + if (!Array.isArray(message.ipv6AccessConfigs)) + return "ipv6AccessConfigs: array expected"; + for (var i = 0; i < message.ipv6AccessConfigs.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AccessConfig.verify(message.ipv6AccessConfigs[i]); + if (error) + return "ipv6AccessConfigs." + error; + } + } + if (message.aliasIpRanges != null && message.hasOwnProperty("aliasIpRanges")) { + if (!Array.isArray(message.aliasIpRanges)) + return "aliasIpRanges: array expected"; + for (var i = 0; i < message.aliasIpRanges.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AliasIpRange.verify(message.aliasIpRanges[i]); + if (error) + return "aliasIpRanges." + error; + } + } + if (message.stackType != null && message.hasOwnProperty("stackType")) { + properties._stackType = 1; + switch (message.stackType) { + default: + return "stackType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { + properties._ipv6AccessType = 1; + switch (message.ipv6AccessType) { + default: + return "ipv6AccessType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.queueCount != null && message.hasOwnProperty("queueCount")) { + properties._queueCount = 1; + if (!$util.isInteger(message.queueCount)) + return "queueCount: integer expected"; + } + if (message.nicType != null && message.hasOwnProperty("nicType")) { + properties._nicType = 1; + switch (message.nicType) { + default: + return "nicType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) { + properties._networkAttachment = 1; + if (!$util.isString(message.networkAttachment)) + return "networkAttachment: string expected"; + } + return null; + }; + + /** + * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface + */ + NetworkInterface.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.NetworkInterface) + return object; + var message = new $root.google.cloud.backupdr.v1.NetworkInterface(); + if (object.network != null) + message.network = String(object.network); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.ipv6Address != null) + message.ipv6Address = String(object.ipv6Address); + if (object.internalIpv6PrefixLength != null) + message.internalIpv6PrefixLength = object.internalIpv6PrefixLength | 0; + if (object.name != null) + message.name = String(object.name); + if (object.accessConfigs) { + if (!Array.isArray(object.accessConfigs)) + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: array expected"); + message.accessConfigs = []; + for (var i = 0; i < object.accessConfigs.length; ++i) { + if (typeof object.accessConfigs[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: object expected"); + message.accessConfigs[i] = $root.google.cloud.backupdr.v1.AccessConfig.fromObject(object.accessConfigs[i]); + } + } + if (object.ipv6AccessConfigs) { + if (!Array.isArray(object.ipv6AccessConfigs)) + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.ipv6AccessConfigs: array expected"); + message.ipv6AccessConfigs = []; + for (var i = 0; i < object.ipv6AccessConfigs.length; ++i) { + if (typeof object.ipv6AccessConfigs[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.ipv6AccessConfigs: object expected"); + message.ipv6AccessConfigs[i] = $root.google.cloud.backupdr.v1.AccessConfig.fromObject(object.ipv6AccessConfigs[i]); + } + } + if (object.aliasIpRanges) { + if (!Array.isArray(object.aliasIpRanges)) + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.aliasIpRanges: array expected"); + message.aliasIpRanges = []; + for (var i = 0; i < object.aliasIpRanges.length; ++i) { + if (typeof object.aliasIpRanges[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.aliasIpRanges: object expected"); + message.aliasIpRanges[i] = $root.google.cloud.backupdr.v1.AliasIpRange.fromObject(object.aliasIpRanges[i]); + } + } + switch (object.stackType) { + default: + if (typeof object.stackType === "number") { + message.stackType = object.stackType; + break; + } + break; + case "STACK_TYPE_UNSPECIFIED": + case 0: + message.stackType = 0; + break; + case "IPV4_ONLY": + case 1: + message.stackType = 1; + break; + case "IPV4_IPV6": + case 2: + message.stackType = 2; + break; + } + switch (object.ipv6AccessType) { + default: + if (typeof object.ipv6AccessType === "number") { + message.ipv6AccessType = object.ipv6AccessType; + break; + } + break; + case "UNSPECIFIED_IPV6_ACCESS_TYPE": + case 0: + message.ipv6AccessType = 0; + break; + case "INTERNAL": + case 1: + message.ipv6AccessType = 1; + break; + case "EXTERNAL": + case 2: + message.ipv6AccessType = 2; + break; + } + if (object.queueCount != null) + message.queueCount = object.queueCount | 0; + switch (object.nicType) { + default: + if (typeof object.nicType === "number") { + message.nicType = object.nicType; + break; + } + break; + case "NIC_TYPE_UNSPECIFIED": + case 0: + message.nicType = 0; + break; + case "VIRTIO_NET": + case 1: + message.nicType = 1; + break; + case "GVNIC": + case 2: + message.nicType = 2; + break; + } + if (object.networkAttachment != null) + message.networkAttachment = String(object.networkAttachment); + return message; + }; + + /** + * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {google.cloud.backupdr.v1.NetworkInterface} message NetworkInterface + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkInterface.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.accessConfigs = []; + object.ipv6AccessConfigs = []; + object.aliasIpRanges = []; + } + if (message.network != null && message.hasOwnProperty("network")) { + object.network = message.network; + if (options.oneofs) + object._network = "network"; + } + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { + object.subnetwork = message.subnetwork; + if (options.oneofs) + object._subnetwork = "subnetwork"; + } + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) { + object.ipAddress = message.ipAddress; + if (options.oneofs) + object._ipAddress = "ipAddress"; + } + if (message.ipv6Address != null && message.hasOwnProperty("ipv6Address")) { + object.ipv6Address = message.ipv6Address; + if (options.oneofs) + object._ipv6Address = "ipv6Address"; + } + if (message.internalIpv6PrefixLength != null && message.hasOwnProperty("internalIpv6PrefixLength")) { + object.internalIpv6PrefixLength = message.internalIpv6PrefixLength; + if (options.oneofs) + object._internalIpv6PrefixLength = "internalIpv6PrefixLength"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.accessConfigs && message.accessConfigs.length) { + object.accessConfigs = []; + for (var j = 0; j < message.accessConfigs.length; ++j) + object.accessConfigs[j] = $root.google.cloud.backupdr.v1.AccessConfig.toObject(message.accessConfigs[j], options); + } + if (message.ipv6AccessConfigs && message.ipv6AccessConfigs.length) { + object.ipv6AccessConfigs = []; + for (var j = 0; j < message.ipv6AccessConfigs.length; ++j) + object.ipv6AccessConfigs[j] = $root.google.cloud.backupdr.v1.AccessConfig.toObject(message.ipv6AccessConfigs[j], options); + } + if (message.aliasIpRanges && message.aliasIpRanges.length) { + object.aliasIpRanges = []; + for (var j = 0; j < message.aliasIpRanges.length; ++j) + object.aliasIpRanges[j] = $root.google.cloud.backupdr.v1.AliasIpRange.toObject(message.aliasIpRanges[j], options); + } + if (message.stackType != null && message.hasOwnProperty("stackType")) { + object.stackType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.StackType[message.stackType] === undefined ? message.stackType : $root.google.cloud.backupdr.v1.NetworkInterface.StackType[message.stackType] : message.stackType; + if (options.oneofs) + object._stackType = "stackType"; + } + if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { + object.ipv6AccessType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType[message.ipv6AccessType] === undefined ? message.ipv6AccessType : $root.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType[message.ipv6AccessType] : message.ipv6AccessType; + if (options.oneofs) + object._ipv6AccessType = "ipv6AccessType"; + } + if (message.queueCount != null && message.hasOwnProperty("queueCount")) { + object.queueCount = message.queueCount; + if (options.oneofs) + object._queueCount = "queueCount"; + } + if (message.nicType != null && message.hasOwnProperty("nicType")) { + object.nicType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.NicType[message.nicType] === undefined ? message.nicType : $root.google.cloud.backupdr.v1.NetworkInterface.NicType[message.nicType] : message.nicType; + if (options.oneofs) + object._nicType = "nicType"; + } + if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) { + object.networkAttachment = message.networkAttachment; + if (options.oneofs) + object._networkAttachment = "networkAttachment"; + } + return object; + }; + + /** + * Converts this NetworkInterface to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + * @returns {Object.} JSON object + */ + NetworkInterface.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkInterface + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkInterface.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkInterface"; + }; + + /** + * StackType enum. + * @name google.cloud.backupdr.v1.NetworkInterface.StackType + * @enum {number} + * @property {number} STACK_TYPE_UNSPECIFIED=0 STACK_TYPE_UNSPECIFIED value + * @property {number} IPV4_ONLY=1 IPV4_ONLY value + * @property {number} IPV4_IPV6=2 IPV4_IPV6 value + */ + NetworkInterface.StackType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STACK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IPV4_ONLY"] = 1; + values[valuesById[2] = "IPV4_IPV6"] = 2; + return values; + })(); + + /** + * Ipv6AccessType enum. + * @name google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType + * @enum {number} + * @property {number} UNSPECIFIED_IPV6_ACCESS_TYPE=0 UNSPECIFIED_IPV6_ACCESS_TYPE value + * @property {number} INTERNAL=1 INTERNAL value + * @property {number} EXTERNAL=2 EXTERNAL value + */ + NetworkInterface.Ipv6AccessType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED_IPV6_ACCESS_TYPE"] = 0; + values[valuesById[1] = "INTERNAL"] = 1; + values[valuesById[2] = "EXTERNAL"] = 2; + return values; + })(); + + /** + * NicType enum. + * @name google.cloud.backupdr.v1.NetworkInterface.NicType + * @enum {number} + * @property {number} NIC_TYPE_UNSPECIFIED=0 NIC_TYPE_UNSPECIFIED value + * @property {number} VIRTIO_NET=1 VIRTIO_NET value + * @property {number} GVNIC=2 GVNIC value + */ + NetworkInterface.NicType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VIRTIO_NET"] = 1; + values[valuesById[2] = "GVNIC"] = 2; + return values; + })(); + + return NetworkInterface; + })(); + + v1.NetworkPerformanceConfig = (function() { + + /** + * Properties of a NetworkPerformanceConfig. + * @memberof google.cloud.backupdr.v1 + * @interface INetworkPerformanceConfig + * @property {google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null} [totalEgressBandwidthTier] NetworkPerformanceConfig totalEgressBandwidthTier + */ + + /** + * Constructs a new NetworkPerformanceConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a NetworkPerformanceConfig. + * @implements INetworkPerformanceConfig + * @constructor + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig=} [properties] Properties to set + */ + function NetworkPerformanceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkPerformanceConfig totalEgressBandwidthTier. + * @member {google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null|undefined} totalEgressBandwidthTier + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @instance + */ + NetworkPerformanceConfig.prototype.totalEgressBandwidthTier = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NetworkPerformanceConfig _totalEgressBandwidthTier. + * @member {"totalEgressBandwidthTier"|undefined} _totalEgressBandwidthTier + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @instance + */ + Object.defineProperty(NetworkPerformanceConfig.prototype, "_totalEgressBandwidthTier", { + get: $util.oneOfGetter($oneOfFields = ["totalEgressBandwidthTier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NetworkPerformanceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig instance + */ + NetworkPerformanceConfig.create = function create(properties) { + return new NetworkPerformanceConfig(properties); + }; + + /** + * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPerformanceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.totalEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "totalEgressBandwidthTier")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalEgressBandwidthTier); + return writer; + }; + + /** + * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPerformanceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPerformanceConfig.decode = function 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.backupdr.v1.NetworkPerformanceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.totalEgressBandwidthTier = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPerformanceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkPerformanceConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkPerformanceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { + properties._totalEgressBandwidthTier = 1; + switch (message.totalEgressBandwidthTier) { + default: + return "totalEgressBandwidthTier: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig + */ + NetworkPerformanceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.NetworkPerformanceConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.NetworkPerformanceConfig(); + switch (object.totalEgressBandwidthTier) { + default: + if (typeof object.totalEgressBandwidthTier === "number") { + message.totalEgressBandwidthTier = object.totalEgressBandwidthTier; + break; + } + break; + case "TIER_UNSPECIFIED": + case 0: + message.totalEgressBandwidthTier = 0; + break; + case "DEFAULT": + case 1: + message.totalEgressBandwidthTier = 1; + break; + case "TIER_1": + case 2: + message.totalEgressBandwidthTier = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {google.cloud.backupdr.v1.NetworkPerformanceConfig} message NetworkPerformanceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkPerformanceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { + object.totalEgressBandwidthTier = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] === undefined ? message.totalEgressBandwidthTier : $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] : message.totalEgressBandwidthTier; + if (options.oneofs) + object._totalEgressBandwidthTier = "totalEgressBandwidthTier"; + } + return object; + }; + + /** + * Converts this NetworkPerformanceConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkPerformanceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkPerformanceConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkPerformanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkPerformanceConfig"; + }; + + /** + * Tier enum. + * @name google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier + * @enum {number} + * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value + * @property {number} DEFAULT=1 DEFAULT value + * @property {number} TIER_1=2 TIER_1 value + */ + NetworkPerformanceConfig.Tier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEFAULT"] = 1; + values[valuesById[2] = "TIER_1"] = 2; + return values; + })(); + + return NetworkPerformanceConfig; + })(); + + v1.AccessConfig = (function() { + + /** + * Properties of an AccessConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IAccessConfig + * @property {google.cloud.backupdr.v1.AccessConfig.AccessType|null} [type] AccessConfig type + * @property {string|null} [name] AccessConfig name + * @property {string|null} [externalIp] AccessConfig externalIp + * @property {string|null} [externalIpv6] AccessConfig externalIpv6 + * @property {number|null} [externalIpv6PrefixLength] AccessConfig externalIpv6PrefixLength + * @property {boolean|null} [setPublicPtr] AccessConfig setPublicPtr + * @property {string|null} [publicPtrDomainName] AccessConfig publicPtrDomainName + * @property {google.cloud.backupdr.v1.AccessConfig.NetworkTier|null} [networkTier] AccessConfig networkTier + */ + + /** + * Constructs a new AccessConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AccessConfig. + * @implements IAccessConfig + * @constructor + * @param {google.cloud.backupdr.v1.IAccessConfig=} [properties] Properties to set + */ + function AccessConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessConfig type. + * @member {google.cloud.backupdr.v1.AccessConfig.AccessType|null|undefined} type + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.type = null; + + /** + * AccessConfig name. + * @member {string|null|undefined} name + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.name = null; + + /** + * AccessConfig externalIp. + * @member {string|null|undefined} externalIp + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.externalIp = null; + + /** + * AccessConfig externalIpv6. + * @member {string|null|undefined} externalIpv6 + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.externalIpv6 = null; + + /** + * AccessConfig externalIpv6PrefixLength. + * @member {number|null|undefined} externalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.externalIpv6PrefixLength = null; + + /** + * AccessConfig setPublicPtr. + * @member {boolean|null|undefined} setPublicPtr + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.setPublicPtr = null; + + /** + * AccessConfig publicPtrDomainName. + * @member {string|null|undefined} publicPtrDomainName + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.publicPtrDomainName = null; + + /** + * AccessConfig networkTier. + * @member {google.cloud.backupdr.v1.AccessConfig.NetworkTier|null|undefined} networkTier + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.networkTier = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AccessConfig _type. + * @member {"type"|undefined} _type + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _name. + * @member {"name"|undefined} _name + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _externalIp. + * @member {"externalIp"|undefined} _externalIp + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_externalIp", { + get: $util.oneOfGetter($oneOfFields = ["externalIp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _externalIpv6. + * @member {"externalIpv6"|undefined} _externalIpv6 + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_externalIpv6", { + get: $util.oneOfGetter($oneOfFields = ["externalIpv6"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _externalIpv6PrefixLength. + * @member {"externalIpv6PrefixLength"|undefined} _externalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_externalIpv6PrefixLength", { + get: $util.oneOfGetter($oneOfFields = ["externalIpv6PrefixLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _setPublicPtr. + * @member {"setPublicPtr"|undefined} _setPublicPtr + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_setPublicPtr", { + get: $util.oneOfGetter($oneOfFields = ["setPublicPtr"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _publicPtrDomainName. + * @member {"publicPtrDomainName"|undefined} _publicPtrDomainName + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_publicPtrDomainName", { + get: $util.oneOfGetter($oneOfFields = ["publicPtrDomainName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _networkTier. + * @member {"networkTier"|undefined} _networkTier + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_networkTier", { + get: $util.oneOfGetter($oneOfFields = ["networkTier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AccessConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {google.cloud.backupdr.v1.IAccessConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig instance + */ + AccessConfig.create = function create(properties) { + return new AccessConfig(properties); + }; + + /** + * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {google.cloud.backupdr.v1.IAccessConfig} message AccessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.externalIp); + if (message.externalIpv6 != null && Object.hasOwnProperty.call(message, "externalIpv6")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.externalIpv6); + if (message.externalIpv6PrefixLength != null && Object.hasOwnProperty.call(message, "externalIpv6PrefixLength")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.externalIpv6PrefixLength); + if (message.setPublicPtr != null && Object.hasOwnProperty.call(message, "setPublicPtr")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.setPublicPtr); + if (message.publicPtrDomainName != null && Object.hasOwnProperty.call(message, "publicPtrDomainName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.publicPtrDomainName); + if (message.networkTier != null && Object.hasOwnProperty.call(message, "networkTier")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.networkTier); + return writer; + }; + + /** + * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {google.cloud.backupdr.v1.IAccessConfig} message AccessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessConfig.decode = function 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.backupdr.v1.AccessConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + message.externalIp = reader.string(); + break; + } + case 4: { + message.externalIpv6 = reader.string(); + break; + } + case 5: { + message.externalIpv6PrefixLength = reader.int32(); + break; + } + case 6: { + message.setPublicPtr = reader.bool(); + break; + } + case 7: { + message.publicPtrDomainName = reader.string(); + break; + } + case 8: { + message.networkTier = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.externalIp != null && message.hasOwnProperty("externalIp")) { + properties._externalIp = 1; + if (!$util.isString(message.externalIp)) + return "externalIp: string expected"; + } + if (message.externalIpv6 != null && message.hasOwnProperty("externalIpv6")) { + properties._externalIpv6 = 1; + if (!$util.isString(message.externalIpv6)) + return "externalIpv6: string expected"; + } + if (message.externalIpv6PrefixLength != null && message.hasOwnProperty("externalIpv6PrefixLength")) { + properties._externalIpv6PrefixLength = 1; + if (!$util.isInteger(message.externalIpv6PrefixLength)) + return "externalIpv6PrefixLength: integer expected"; + } + if (message.setPublicPtr != null && message.hasOwnProperty("setPublicPtr")) { + properties._setPublicPtr = 1; + if (typeof message.setPublicPtr !== "boolean") + return "setPublicPtr: boolean expected"; + } + if (message.publicPtrDomainName != null && message.hasOwnProperty("publicPtrDomainName")) { + properties._publicPtrDomainName = 1; + if (!$util.isString(message.publicPtrDomainName)) + return "publicPtrDomainName: string expected"; + } + if (message.networkTier != null && message.hasOwnProperty("networkTier")) { + properties._networkTier = 1; + switch (message.networkTier) { + default: + return "networkTier: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates an AccessConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig + */ + AccessConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AccessConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.AccessConfig(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "ACCESS_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ONE_TO_ONE_NAT": + case 1: + message.type = 1; + break; + case "DIRECT_IPV6": + case 2: + message.type = 2; + break; + } + if (object.name != null) + message.name = String(object.name); + if (object.externalIp != null) + message.externalIp = String(object.externalIp); + if (object.externalIpv6 != null) + message.externalIpv6 = String(object.externalIpv6); + if (object.externalIpv6PrefixLength != null) + message.externalIpv6PrefixLength = object.externalIpv6PrefixLength | 0; + if (object.setPublicPtr != null) + message.setPublicPtr = Boolean(object.setPublicPtr); + if (object.publicPtrDomainName != null) + message.publicPtrDomainName = String(object.publicPtrDomainName); + switch (object.networkTier) { + default: + if (typeof object.networkTier === "number") { + message.networkTier = object.networkTier; + break; + } + break; + case "NETWORK_TIER_UNSPECIFIED": + case 0: + message.networkTier = 0; + break; + case "PREMIUM": + case 1: + message.networkTier = 1; + break; + case "STANDARD": + case 2: + message.networkTier = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {google.cloud.backupdr.v1.AccessConfig} message AccessConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.externalIp != null && message.hasOwnProperty("externalIp")) { + object.externalIp = message.externalIp; + if (options.oneofs) + object._externalIp = "externalIp"; + } + if (message.externalIpv6 != null && message.hasOwnProperty("externalIpv6")) { + object.externalIpv6 = message.externalIpv6; + if (options.oneofs) + object._externalIpv6 = "externalIpv6"; + } + if (message.externalIpv6PrefixLength != null && message.hasOwnProperty("externalIpv6PrefixLength")) { + object.externalIpv6PrefixLength = message.externalIpv6PrefixLength; + if (options.oneofs) + object._externalIpv6PrefixLength = "externalIpv6PrefixLength"; + } + if (message.setPublicPtr != null && message.hasOwnProperty("setPublicPtr")) { + object.setPublicPtr = message.setPublicPtr; + if (options.oneofs) + object._setPublicPtr = "setPublicPtr"; + } + if (message.publicPtrDomainName != null && message.hasOwnProperty("publicPtrDomainName")) { + object.publicPtrDomainName = message.publicPtrDomainName; + if (options.oneofs) + object._publicPtrDomainName = "publicPtrDomainName"; + } + if (message.networkTier != null && message.hasOwnProperty("networkTier")) { + object.networkTier = options.enums === String ? $root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier] === undefined ? message.networkTier : $root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier] : message.networkTier; + if (options.oneofs) + object._networkTier = "networkTier"; + } + return object; + }; + + /** + * Converts this AccessConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + * @returns {Object.} JSON object + */ + AccessConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AccessConfig"; + }; + + /** + * AccessType enum. + * @name google.cloud.backupdr.v1.AccessConfig.AccessType + * @enum {number} + * @property {number} ACCESS_TYPE_UNSPECIFIED=0 ACCESS_TYPE_UNSPECIFIED value + * @property {number} ONE_TO_ONE_NAT=1 ONE_TO_ONE_NAT value + * @property {number} DIRECT_IPV6=2 DIRECT_IPV6 value + */ + AccessConfig.AccessType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ONE_TO_ONE_NAT"] = 1; + values[valuesById[2] = "DIRECT_IPV6"] = 2; + return values; + })(); + + /** + * NetworkTier enum. + * @name google.cloud.backupdr.v1.AccessConfig.NetworkTier + * @enum {number} + * @property {number} NETWORK_TIER_UNSPECIFIED=0 NETWORK_TIER_UNSPECIFIED value + * @property {number} PREMIUM=1 PREMIUM value + * @property {number} STANDARD=2 STANDARD value + */ + AccessConfig.NetworkTier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NETWORK_TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "PREMIUM"] = 1; + values[valuesById[2] = "STANDARD"] = 2; + return values; + })(); + + return AccessConfig; + })(); + + v1.AliasIpRange = (function() { + + /** + * Properties of an AliasIpRange. + * @memberof google.cloud.backupdr.v1 + * @interface IAliasIpRange + * @property {string|null} [ipCidrRange] AliasIpRange ipCidrRange + * @property {string|null} [subnetworkRangeName] AliasIpRange subnetworkRangeName + */ + + /** + * Constructs a new AliasIpRange. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AliasIpRange. + * @implements IAliasIpRange + * @constructor + * @param {google.cloud.backupdr.v1.IAliasIpRange=} [properties] Properties to set + */ + function AliasIpRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AliasIpRange ipCidrRange. + * @member {string|null|undefined} ipCidrRange + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + */ + AliasIpRange.prototype.ipCidrRange = null; + + /** + * AliasIpRange subnetworkRangeName. + * @member {string|null|undefined} subnetworkRangeName + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + */ + AliasIpRange.prototype.subnetworkRangeName = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AliasIpRange _ipCidrRange. + * @member {"ipCidrRange"|undefined} _ipCidrRange + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + */ + Object.defineProperty(AliasIpRange.prototype, "_ipCidrRange", { + get: $util.oneOfGetter($oneOfFields = ["ipCidrRange"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AliasIpRange _subnetworkRangeName. + * @member {"subnetworkRangeName"|undefined} _subnetworkRangeName + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + */ + Object.defineProperty(AliasIpRange.prototype, "_subnetworkRangeName", { + get: $util.oneOfGetter($oneOfFields = ["subnetworkRangeName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AliasIpRange instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {google.cloud.backupdr.v1.IAliasIpRange=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange instance + */ + AliasIpRange.create = function create(properties) { + return new AliasIpRange(properties); + }; + + /** + * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {google.cloud.backupdr.v1.IAliasIpRange} message AliasIpRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AliasIpRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ipCidrRange != null && Object.hasOwnProperty.call(message, "ipCidrRange")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipCidrRange); + if (message.subnetworkRangeName != null && Object.hasOwnProperty.call(message, "subnetworkRangeName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetworkRangeName); + return writer; + }; + + /** + * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {google.cloud.backupdr.v1.IAliasIpRange} message AliasIpRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AliasIpRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AliasIpRange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AliasIpRange.decode = function 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.backupdr.v1.AliasIpRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ipCidrRange = reader.string(); + break; + } + case 2: { + message.subnetworkRangeName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AliasIpRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AliasIpRange message. + * @function verify + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AliasIpRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) { + properties._ipCidrRange = 1; + if (!$util.isString(message.ipCidrRange)) + return "ipCidrRange: string expected"; + } + if (message.subnetworkRangeName != null && message.hasOwnProperty("subnetworkRangeName")) { + properties._subnetworkRangeName = 1; + if (!$util.isString(message.subnetworkRangeName)) + return "subnetworkRangeName: string expected"; + } + return null; + }; + + /** + * Creates an AliasIpRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange + */ + AliasIpRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AliasIpRange) + return object; + var message = new $root.google.cloud.backupdr.v1.AliasIpRange(); + if (object.ipCidrRange != null) + message.ipCidrRange = String(object.ipCidrRange); + if (object.subnetworkRangeName != null) + message.subnetworkRangeName = String(object.subnetworkRangeName); + return message; + }; + + /** + * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {google.cloud.backupdr.v1.AliasIpRange} message AliasIpRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AliasIpRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) { + object.ipCidrRange = message.ipCidrRange; + if (options.oneofs) + object._ipCidrRange = "ipCidrRange"; + } + if (message.subnetworkRangeName != null && message.hasOwnProperty("subnetworkRangeName")) { + object.subnetworkRangeName = message.subnetworkRangeName; + if (options.oneofs) + object._subnetworkRangeName = "subnetworkRangeName"; + } + return object; + }; + + /** + * Converts this AliasIpRange to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + * @returns {Object.} JSON object + */ + AliasIpRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AliasIpRange + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AliasIpRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AliasIpRange"; + }; + + return AliasIpRange; + })(); + + v1.InstanceParams = (function() { + + /** + * Properties of an InstanceParams. + * @memberof google.cloud.backupdr.v1 + * @interface IInstanceParams + * @property {Object.|null} [resourceManagerTags] InstanceParams resourceManagerTags + */ + + /** + * Constructs a new InstanceParams. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an InstanceParams. + * @implements IInstanceParams + * @constructor + * @param {google.cloud.backupdr.v1.IInstanceParams=} [properties] Properties to set + */ + function InstanceParams(properties) { + this.resourceManagerTags = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstanceParams resourceManagerTags. + * @member {Object.} resourceManagerTags + * @memberof google.cloud.backupdr.v1.InstanceParams + * @instance + */ + InstanceParams.prototype.resourceManagerTags = $util.emptyObject; + + /** + * Creates a new InstanceParams instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {google.cloud.backupdr.v1.IInstanceParams=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams instance + */ + InstanceParams.create = function create(properties) { + return new InstanceParams(properties); + }; + + /** + * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {google.cloud.backupdr.v1.IInstanceParams} message InstanceParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) + for (var keys = Object.keys(message.resourceManagerTags), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceManagerTags[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {google.cloud.backupdr.v1.IInstanceParams} message InstanceParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstanceParams message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceParams.decode = function 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.backupdr.v1.InstanceParams(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.resourceManagerTags === $util.emptyObject) + message.resourceManagerTags = {}; + 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.resourceManagerTags[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstanceParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstanceParams message. + * @function verify + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstanceParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { + if (!$util.isObject(message.resourceManagerTags)) + return "resourceManagerTags: object expected"; + var key = Object.keys(message.resourceManagerTags); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.resourceManagerTags[key[i]])) + return "resourceManagerTags: string{k:string} expected"; + } + return null; + }; + + /** + * Creates an InstanceParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams + */ + InstanceParams.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.InstanceParams) + return object; + var message = new $root.google.cloud.backupdr.v1.InstanceParams(); + if (object.resourceManagerTags) { + if (typeof object.resourceManagerTags !== "object") + throw TypeError(".google.cloud.backupdr.v1.InstanceParams.resourceManagerTags: object expected"); + message.resourceManagerTags = {}; + for (var keys = Object.keys(object.resourceManagerTags), i = 0; i < keys.length; ++i) + message.resourceManagerTags[keys[i]] = String(object.resourceManagerTags[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {google.cloud.backupdr.v1.InstanceParams} message InstanceParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstanceParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.resourceManagerTags = {}; + var keys2; + if (message.resourceManagerTags && (keys2 = Object.keys(message.resourceManagerTags)).length) { + object.resourceManagerTags = {}; + for (var j = 0; j < keys2.length; ++j) + object.resourceManagerTags[keys2[j]] = message.resourceManagerTags[keys2[j]]; + } + return object; + }; + + /** + * Converts this InstanceParams to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.InstanceParams + * @instance + * @returns {Object.} JSON object + */ + InstanceParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InstanceParams + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstanceParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.InstanceParams"; + }; + + return InstanceParams; + })(); + + v1.AllocationAffinity = (function() { + + /** + * Properties of an AllocationAffinity. + * @memberof google.cloud.backupdr.v1 + * @interface IAllocationAffinity + * @property {google.cloud.backupdr.v1.AllocationAffinity.Type|null} [consumeAllocationType] AllocationAffinity consumeAllocationType + * @property {string|null} [key] AllocationAffinity key + * @property {Array.|null} [values] AllocationAffinity values + */ + + /** + * Constructs a new AllocationAffinity. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AllocationAffinity. + * @implements IAllocationAffinity + * @constructor + * @param {google.cloud.backupdr.v1.IAllocationAffinity=} [properties] Properties to set + */ + function AllocationAffinity(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AllocationAffinity consumeAllocationType. + * @member {google.cloud.backupdr.v1.AllocationAffinity.Type|null|undefined} consumeAllocationType + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + AllocationAffinity.prototype.consumeAllocationType = null; + + /** + * AllocationAffinity key. + * @member {string|null|undefined} key + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + AllocationAffinity.prototype.key = null; + + /** + * AllocationAffinity values. + * @member {Array.} values + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + AllocationAffinity.prototype.values = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AllocationAffinity _consumeAllocationType. + * @member {"consumeAllocationType"|undefined} _consumeAllocationType + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + Object.defineProperty(AllocationAffinity.prototype, "_consumeAllocationType", { + get: $util.oneOfGetter($oneOfFields = ["consumeAllocationType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AllocationAffinity _key. + * @member {"key"|undefined} _key + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + Object.defineProperty(AllocationAffinity.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AllocationAffinity instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {google.cloud.backupdr.v1.IAllocationAffinity=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity instance + */ + AllocationAffinity.create = function create(properties) { + return new AllocationAffinity(properties); + }; + + /** + * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {google.cloud.backupdr.v1.IAllocationAffinity} message AllocationAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllocationAffinity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consumeAllocationType != null && Object.hasOwnProperty.call(message, "consumeAllocationType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumeAllocationType); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {google.cloud.backupdr.v1.IAllocationAffinity} message AllocationAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllocationAffinity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllocationAffinity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllocationAffinity.decode = function 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.backupdr.v1.AllocationAffinity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.consumeAllocationType = reader.int32(); + break; + } + case 2: { + message.key = reader.string(); + break; + } + case 3: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AllocationAffinity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllocationAffinity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllocationAffinity message. + * @function verify + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllocationAffinity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.consumeAllocationType != null && message.hasOwnProperty("consumeAllocationType")) { + properties._consumeAllocationType = 1; + switch (message.consumeAllocationType) { + default: + return "consumeAllocationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; + } + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates an AllocationAffinity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity + */ + AllocationAffinity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AllocationAffinity) + return object; + var message = new $root.google.cloud.backupdr.v1.AllocationAffinity(); + switch (object.consumeAllocationType) { + default: + if (typeof object.consumeAllocationType === "number") { + message.consumeAllocationType = object.consumeAllocationType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.consumeAllocationType = 0; + break; + case "NO_RESERVATION": + case 1: + message.consumeAllocationType = 1; + break; + case "ANY_RESERVATION": + case 2: + message.consumeAllocationType = 2; + break; + case "SPECIFIC_RESERVATION": + case 3: + message.consumeAllocationType = 3; + break; + } + if (object.key != null) + message.key = String(object.key); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.backupdr.v1.AllocationAffinity.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from an AllocationAffinity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {google.cloud.backupdr.v1.AllocationAffinity} message AllocationAffinity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllocationAffinity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.consumeAllocationType != null && message.hasOwnProperty("consumeAllocationType")) { + object.consumeAllocationType = options.enums === String ? $root.google.cloud.backupdr.v1.AllocationAffinity.Type[message.consumeAllocationType] === undefined ? message.consumeAllocationType : $root.google.cloud.backupdr.v1.AllocationAffinity.Type[message.consumeAllocationType] : message.consumeAllocationType; + if (options.oneofs) + object._consumeAllocationType = "consumeAllocationType"; + } + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) + object._key = "key"; + } + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + return object; + }; + + /** + * Converts this AllocationAffinity to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + * @returns {Object.} JSON object + */ + AllocationAffinity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AllocationAffinity + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllocationAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AllocationAffinity"; + }; + + /** + * Type enum. + * @name google.cloud.backupdr.v1.AllocationAffinity.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} NO_RESERVATION=1 NO_RESERVATION value + * @property {number} ANY_RESERVATION=2 ANY_RESERVATION value + * @property {number} SPECIFIC_RESERVATION=3 SPECIFIC_RESERVATION value + */ + AllocationAffinity.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NO_RESERVATION"] = 1; + values[valuesById[2] = "ANY_RESERVATION"] = 2; + values[valuesById[3] = "SPECIFIC_RESERVATION"] = 3; + return values; + })(); + + return AllocationAffinity; + })(); + + v1.Scheduling = (function() { + + /** + * Properties of a Scheduling. + * @memberof google.cloud.backupdr.v1 + * @interface IScheduling + * @property {google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null} [onHostMaintenance] Scheduling onHostMaintenance + * @property {boolean|null} [automaticRestart] Scheduling automaticRestart + * @property {boolean|null} [preemptible] Scheduling preemptible + * @property {Array.|null} [nodeAffinities] Scheduling nodeAffinities + * @property {number|null} [minNodeCpus] Scheduling minNodeCpus + * @property {google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null} [provisioningModel] Scheduling provisioningModel + * @property {google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null} [instanceTerminationAction] Scheduling instanceTerminationAction + * @property {google.cloud.backupdr.v1.ISchedulingDuration|null} [localSsdRecoveryTimeout] Scheduling localSsdRecoveryTimeout + */ + + /** + * Constructs a new Scheduling. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Scheduling. + * @implements IScheduling + * @constructor + * @param {google.cloud.backupdr.v1.IScheduling=} [properties] Properties to set + */ + function Scheduling(properties) { + this.nodeAffinities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Scheduling onHostMaintenance. + * @member {google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null|undefined} onHostMaintenance + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.onHostMaintenance = null; + + /** + * Scheduling automaticRestart. + * @member {boolean|null|undefined} automaticRestart + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.automaticRestart = null; + + /** + * Scheduling preemptible. + * @member {boolean|null|undefined} preemptible + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.preemptible = null; + + /** + * Scheduling nodeAffinities. + * @member {Array.} nodeAffinities + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.nodeAffinities = $util.emptyArray; + + /** + * Scheduling minNodeCpus. + * @member {number|null|undefined} minNodeCpus + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.minNodeCpus = null; + + /** + * Scheduling provisioningModel. + * @member {google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null|undefined} provisioningModel + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.provisioningModel = null; + + /** + * Scheduling instanceTerminationAction. + * @member {google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null|undefined} instanceTerminationAction + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.instanceTerminationAction = null; + + /** + * Scheduling localSsdRecoveryTimeout. + * @member {google.cloud.backupdr.v1.ISchedulingDuration|null|undefined} localSsdRecoveryTimeout + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.localSsdRecoveryTimeout = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Scheduling _onHostMaintenance. + * @member {"onHostMaintenance"|undefined} _onHostMaintenance + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_onHostMaintenance", { + get: $util.oneOfGetter($oneOfFields = ["onHostMaintenance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _automaticRestart. + * @member {"automaticRestart"|undefined} _automaticRestart + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_automaticRestart", { + get: $util.oneOfGetter($oneOfFields = ["automaticRestart"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _preemptible. + * @member {"preemptible"|undefined} _preemptible + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_preemptible", { + get: $util.oneOfGetter($oneOfFields = ["preemptible"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _minNodeCpus. + * @member {"minNodeCpus"|undefined} _minNodeCpus + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_minNodeCpus", { + get: $util.oneOfGetter($oneOfFields = ["minNodeCpus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _provisioningModel. + * @member {"provisioningModel"|undefined} _provisioningModel + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_provisioningModel", { + get: $util.oneOfGetter($oneOfFields = ["provisioningModel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _instanceTerminationAction. + * @member {"instanceTerminationAction"|undefined} _instanceTerminationAction + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_instanceTerminationAction", { + get: $util.oneOfGetter($oneOfFields = ["instanceTerminationAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _localSsdRecoveryTimeout. + * @member {"localSsdRecoveryTimeout"|undefined} _localSsdRecoveryTimeout + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_localSsdRecoveryTimeout", { + get: $util.oneOfGetter($oneOfFields = ["localSsdRecoveryTimeout"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Scheduling instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {google.cloud.backupdr.v1.IScheduling=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling instance + */ + Scheduling.create = function create(properties) { + return new Scheduling(properties); + }; + + /** + * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {google.cloud.backupdr.v1.IScheduling} message Scheduling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Scheduling.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.onHostMaintenance != null && Object.hasOwnProperty.call(message, "onHostMaintenance")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.onHostMaintenance); + if (message.automaticRestart != null && Object.hasOwnProperty.call(message, "automaticRestart")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.automaticRestart); + if (message.preemptible != null && Object.hasOwnProperty.call(message, "preemptible")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preemptible); + if (message.nodeAffinities != null && message.nodeAffinities.length) + for (var i = 0; i < message.nodeAffinities.length; ++i) + $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.encode(message.nodeAffinities[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.minNodeCpus != null && Object.hasOwnProperty.call(message, "minNodeCpus")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.minNodeCpus); + if (message.provisioningModel != null && Object.hasOwnProperty.call(message, "provisioningModel")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.provisioningModel); + if (message.instanceTerminationAction != null && Object.hasOwnProperty.call(message, "instanceTerminationAction")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.instanceTerminationAction); + if (message.localSsdRecoveryTimeout != null && Object.hasOwnProperty.call(message, "localSsdRecoveryTimeout")) + $root.google.cloud.backupdr.v1.SchedulingDuration.encode(message.localSsdRecoveryTimeout, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {google.cloud.backupdr.v1.IScheduling} message Scheduling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Scheduling.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Scheduling message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Scheduling.decode = function 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.backupdr.v1.Scheduling(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.onHostMaintenance = reader.int32(); + break; + } + case 2: { + message.automaticRestart = reader.bool(); + break; + } + case 3: { + message.preemptible = reader.bool(); + break; + } + case 4: { + if (!(message.nodeAffinities && message.nodeAffinities.length)) + message.nodeAffinities = []; + message.nodeAffinities.push($root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.decode(reader, reader.uint32())); + break; + } + case 5: { + message.minNodeCpus = reader.int32(); + break; + } + case 6: { + message.provisioningModel = reader.int32(); + break; + } + case 7: { + message.instanceTerminationAction = reader.int32(); + break; + } + case 10: { + message.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Scheduling message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Scheduling.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Scheduling message. + * @function verify + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Scheduling.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.onHostMaintenance != null && message.hasOwnProperty("onHostMaintenance")) { + properties._onHostMaintenance = 1; + switch (message.onHostMaintenance) { + default: + return "onHostMaintenance: enum value expected"; + case 0: + case 1: + case 1000: + break; + } + } + if (message.automaticRestart != null && message.hasOwnProperty("automaticRestart")) { + properties._automaticRestart = 1; + if (typeof message.automaticRestart !== "boolean") + return "automaticRestart: boolean expected"; + } + if (message.preemptible != null && message.hasOwnProperty("preemptible")) { + properties._preemptible = 1; + if (typeof message.preemptible !== "boolean") + return "preemptible: boolean expected"; + } + if (message.nodeAffinities != null && message.hasOwnProperty("nodeAffinities")) { + if (!Array.isArray(message.nodeAffinities)) + return "nodeAffinities: array expected"; + for (var i = 0; i < message.nodeAffinities.length; ++i) { + var error = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify(message.nodeAffinities[i]); + if (error) + return "nodeAffinities." + error; + } + } + if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { + properties._minNodeCpus = 1; + if (!$util.isInteger(message.minNodeCpus)) + return "minNodeCpus: integer expected"; + } + if (message.provisioningModel != null && message.hasOwnProperty("provisioningModel")) { + properties._provisioningModel = 1; + switch (message.provisioningModel) { + default: + return "provisioningModel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.instanceTerminationAction != null && message.hasOwnProperty("instanceTerminationAction")) { + properties._instanceTerminationAction = 1; + switch (message.instanceTerminationAction) { + default: + return "instanceTerminationAction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.localSsdRecoveryTimeout != null && message.hasOwnProperty("localSsdRecoveryTimeout")) { + properties._localSsdRecoveryTimeout = 1; + { + var error = $root.google.cloud.backupdr.v1.SchedulingDuration.verify(message.localSsdRecoveryTimeout); + if (error) + return "localSsdRecoveryTimeout." + error; + } + } + return null; + }; + + /** + * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling + */ + Scheduling.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Scheduling) + return object; + var message = new $root.google.cloud.backupdr.v1.Scheduling(); + switch (object.onHostMaintenance) { + default: + if (typeof object.onHostMaintenance === "number") { + message.onHostMaintenance = object.onHostMaintenance; + break; + } + break; + case "ON_HOST_MAINTENANCE_UNSPECIFIED": + case 0: + message.onHostMaintenance = 0; + break; + case "TERMINATE": + case 1: + message.onHostMaintenance = 1; + break; + case "MIGRATE": + case 1000: + message.onHostMaintenance = 1000; + break; + } + if (object.automaticRestart != null) + message.automaticRestart = Boolean(object.automaticRestart); + if (object.preemptible != null) + message.preemptible = Boolean(object.preemptible); + if (object.nodeAffinities) { + if (!Array.isArray(object.nodeAffinities)) + throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: array expected"); + message.nodeAffinities = []; + for (var i = 0; i < object.nodeAffinities.length; ++i) { + if (typeof object.nodeAffinities[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: object expected"); + message.nodeAffinities[i] = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.fromObject(object.nodeAffinities[i]); + } + } + if (object.minNodeCpus != null) + message.minNodeCpus = object.minNodeCpus | 0; + switch (object.provisioningModel) { + default: + if (typeof object.provisioningModel === "number") { + message.provisioningModel = object.provisioningModel; + break; + } + break; + case "PROVISIONING_MODEL_UNSPECIFIED": + case 0: + message.provisioningModel = 0; + break; + case "STANDARD": + case 1: + message.provisioningModel = 1; + break; + case "SPOT": + case 2: + message.provisioningModel = 2; + break; + } + switch (object.instanceTerminationAction) { + default: + if (typeof object.instanceTerminationAction === "number") { + message.instanceTerminationAction = object.instanceTerminationAction; + break; + } + break; + case "INSTANCE_TERMINATION_ACTION_UNSPECIFIED": + case 0: + message.instanceTerminationAction = 0; + break; + case "DELETE": + case 1: + message.instanceTerminationAction = 1; + break; + case "STOP": + case 2: + message.instanceTerminationAction = 2; + break; + } + if (object.localSsdRecoveryTimeout != null) { + if (typeof object.localSsdRecoveryTimeout !== "object") + throw TypeError(".google.cloud.backupdr.v1.Scheduling.localSsdRecoveryTimeout: object expected"); + message.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.fromObject(object.localSsdRecoveryTimeout); + } + return message; + }; + + /** + * Creates a plain object from a Scheduling message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {google.cloud.backupdr.v1.Scheduling} message Scheduling + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Scheduling.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.nodeAffinities = []; + if (message.onHostMaintenance != null && message.hasOwnProperty("onHostMaintenance")) { + object.onHostMaintenance = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.OnHostMaintenance[message.onHostMaintenance] === undefined ? message.onHostMaintenance : $root.google.cloud.backupdr.v1.Scheduling.OnHostMaintenance[message.onHostMaintenance] : message.onHostMaintenance; + if (options.oneofs) + object._onHostMaintenance = "onHostMaintenance"; + } + if (message.automaticRestart != null && message.hasOwnProperty("automaticRestart")) { + object.automaticRestart = message.automaticRestart; + if (options.oneofs) + object._automaticRestart = "automaticRestart"; + } + if (message.preemptible != null && message.hasOwnProperty("preemptible")) { + object.preemptible = message.preemptible; + if (options.oneofs) + object._preemptible = "preemptible"; + } + if (message.nodeAffinities && message.nodeAffinities.length) { + object.nodeAffinities = []; + for (var j = 0; j < message.nodeAffinities.length; ++j) + object.nodeAffinities[j] = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.toObject(message.nodeAffinities[j], options); + } + if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { + object.minNodeCpus = message.minNodeCpus; + if (options.oneofs) + object._minNodeCpus = "minNodeCpus"; + } + if (message.provisioningModel != null && message.hasOwnProperty("provisioningModel")) { + object.provisioningModel = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.ProvisioningModel[message.provisioningModel] === undefined ? message.provisioningModel : $root.google.cloud.backupdr.v1.Scheduling.ProvisioningModel[message.provisioningModel] : message.provisioningModel; + if (options.oneofs) + object._provisioningModel = "provisioningModel"; + } + if (message.instanceTerminationAction != null && message.hasOwnProperty("instanceTerminationAction")) { + object.instanceTerminationAction = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction[message.instanceTerminationAction] === undefined ? message.instanceTerminationAction : $root.google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction[message.instanceTerminationAction] : message.instanceTerminationAction; + if (options.oneofs) + object._instanceTerminationAction = "instanceTerminationAction"; + } + if (message.localSsdRecoveryTimeout != null && message.hasOwnProperty("localSsdRecoveryTimeout")) { + object.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.toObject(message.localSsdRecoveryTimeout, options); + if (options.oneofs) + object._localSsdRecoveryTimeout = "localSsdRecoveryTimeout"; + } + return object; + }; + + /** + * Converts this Scheduling to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + * @returns {Object.} JSON object + */ + Scheduling.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Scheduling + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Scheduling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Scheduling"; + }; + + /** + * OnHostMaintenance enum. + * @name google.cloud.backupdr.v1.Scheduling.OnHostMaintenance + * @enum {number} + * @property {number} ON_HOST_MAINTENANCE_UNSPECIFIED=0 ON_HOST_MAINTENANCE_UNSPECIFIED value + * @property {number} TERMINATE=1 TERMINATE value + * @property {number} MIGRATE=1000 MIGRATE value + */ + Scheduling.OnHostMaintenance = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ON_HOST_MAINTENANCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TERMINATE"] = 1; + values[valuesById[1000] = "MIGRATE"] = 1000; + return values; + })(); + + Scheduling.NodeAffinity = (function() { + + /** + * Properties of a NodeAffinity. + * @memberof google.cloud.backupdr.v1.Scheduling + * @interface INodeAffinity + * @property {string|null} [key] NodeAffinity key + * @property {google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null} [operator] NodeAffinity operator + * @property {Array.|null} [values] NodeAffinity values + */ + + /** + * Constructs a new NodeAffinity. + * @memberof google.cloud.backupdr.v1.Scheduling + * @classdesc Represents a NodeAffinity. + * @implements INodeAffinity + * @constructor + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity=} [properties] Properties to set + */ + function NodeAffinity(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeAffinity key. + * @member {string|null|undefined} key + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + NodeAffinity.prototype.key = null; + + /** + * NodeAffinity operator. + * @member {google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null|undefined} operator + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + NodeAffinity.prototype.operator = null; + + /** + * NodeAffinity values. + * @member {Array.} values + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + NodeAffinity.prototype.values = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NodeAffinity _key. + * @member {"key"|undefined} _key + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + Object.defineProperty(NodeAffinity.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NodeAffinity _operator. + * @member {"operator"|undefined} _operator + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + Object.defineProperty(NodeAffinity.prototype, "_operator", { + get: $util.oneOfGetter($oneOfFields = ["operator"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NodeAffinity instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity instance + */ + NodeAffinity.create = function create(properties) { + return new NodeAffinity(properties); + }; + + /** + * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity} message NodeAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeAffinity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.operator != null && Object.hasOwnProperty.call(message, "operator")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operator); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity} message NodeAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeAffinity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeAffinity.decode = function 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.backupdr.v1.Scheduling.NodeAffinity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.operator = reader.int32(); + break; + } + case 3: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeAffinity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeAffinity message. + * @function verify + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeAffinity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; + } + if (message.operator != null && message.hasOwnProperty("operator")) { + properties._operator = 1; + switch (message.operator) { + default: + return "operator: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity + */ + NodeAffinity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity) + return object; + var message = new $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity(); + if (object.key != null) + message.key = String(object.key); + switch (object.operator) { + default: + if (typeof object.operator === "number") { + message.operator = object.operator; + break; + } + break; + case "OPERATOR_UNSPECIFIED": + case 0: + message.operator = 0; + break; + case "IN": + case 1: + message.operator = 1; + break; + case "NOT_IN": + case 2: + message.operator = 2; + break; + } + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.backupdr.v1.Scheduling.NodeAffinity.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.NodeAffinity} message NodeAffinity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeAffinity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) + object._key = "key"; + } + if (message.operator != null && message.hasOwnProperty("operator")) { + object.operator = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator[message.operator] === undefined ? message.operator : $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator[message.operator] : message.operator; + if (options.oneofs) + object._operator = "operator"; + } + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + return object; + }; + + /** + * Converts this NodeAffinity to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + * @returns {Object.} JSON object + */ + NodeAffinity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeAffinity + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Scheduling.NodeAffinity"; + }; + + /** + * Operator enum. + * @name google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator + * @enum {number} + * @property {number} OPERATOR_UNSPECIFIED=0 OPERATOR_UNSPECIFIED value + * @property {number} IN=1 IN value + * @property {number} NOT_IN=2 NOT_IN value + */ + NodeAffinity.Operator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN"] = 1; + values[valuesById[2] = "NOT_IN"] = 2; + return values; + })(); + + return NodeAffinity; + })(); + + /** + * ProvisioningModel enum. + * @name google.cloud.backupdr.v1.Scheduling.ProvisioningModel + * @enum {number} + * @property {number} PROVISIONING_MODEL_UNSPECIFIED=0 PROVISIONING_MODEL_UNSPECIFIED value + * @property {number} STANDARD=1 STANDARD value + * @property {number} SPOT=2 SPOT value + */ + Scheduling.ProvisioningModel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROVISIONING_MODEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD"] = 1; + values[valuesById[2] = "SPOT"] = 2; + return values; + })(); + + /** + * InstanceTerminationAction enum. + * @name google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction + * @enum {number} + * @property {number} INSTANCE_TERMINATION_ACTION_UNSPECIFIED=0 INSTANCE_TERMINATION_ACTION_UNSPECIFIED value + * @property {number} DELETE=1 DELETE value + * @property {number} STOP=2 STOP value + */ + Scheduling.InstanceTerminationAction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INSTANCE_TERMINATION_ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "DELETE"] = 1; + values[valuesById[2] = "STOP"] = 2; + return values; + })(); + + return Scheduling; + })(); + + v1.SchedulingDuration = (function() { + + /** + * Properties of a SchedulingDuration. + * @memberof google.cloud.backupdr.v1 + * @interface ISchedulingDuration + * @property {number|Long|null} [seconds] SchedulingDuration seconds + * @property {number|null} [nanos] SchedulingDuration nanos + */ + + /** + * Constructs a new SchedulingDuration. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a SchedulingDuration. + * @implements ISchedulingDuration + * @constructor + * @param {google.cloud.backupdr.v1.ISchedulingDuration=} [properties] Properties to set + */ + function SchedulingDuration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchedulingDuration seconds. + * @member {number|Long|null|undefined} seconds + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + SchedulingDuration.prototype.seconds = null; + + /** + * SchedulingDuration nanos. + * @member {number|null|undefined} nanos + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + SchedulingDuration.prototype.nanos = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SchedulingDuration _seconds. + * @member {"seconds"|undefined} _seconds + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + Object.defineProperty(SchedulingDuration.prototype, "_seconds", { + get: $util.oneOfGetter($oneOfFields = ["seconds"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SchedulingDuration _nanos. + * @member {"nanos"|undefined} _nanos + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + Object.defineProperty(SchedulingDuration.prototype, "_nanos", { + get: $util.oneOfGetter($oneOfFields = ["nanos"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SchedulingDuration instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {google.cloud.backupdr.v1.ISchedulingDuration=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration instance + */ + SchedulingDuration.create = function create(properties) { + return new SchedulingDuration(properties); + }; + + /** + * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {google.cloud.backupdr.v1.ISchedulingDuration} message SchedulingDuration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchedulingDuration.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 SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {google.cloud.backupdr.v1.ISchedulingDuration} message SchedulingDuration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchedulingDuration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchedulingDuration message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchedulingDuration.decode = function 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.backupdr.v1.SchedulingDuration(); + 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 SchedulingDuration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchedulingDuration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchedulingDuration message. + * @function verify + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchedulingDuration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.seconds != null && message.hasOwnProperty("seconds")) { + properties._seconds = 1; + 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")) { + properties._nanos = 1; + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + } + return null; + }; + + /** + * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration + */ + SchedulingDuration.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.SchedulingDuration) + return object; + var message = new $root.google.cloud.backupdr.v1.SchedulingDuration(); + 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 SchedulingDuration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {google.cloud.backupdr.v1.SchedulingDuration} message SchedulingDuration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchedulingDuration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 (options.oneofs) + object._seconds = "seconds"; + } + if (message.nanos != null && message.hasOwnProperty("nanos")) { + object.nanos = message.nanos; + if (options.oneofs) + object._nanos = "nanos"; + } + return object; + }; + + /** + * Converts this SchedulingDuration to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + * @returns {Object.} JSON object + */ + SchedulingDuration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchedulingDuration + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchedulingDuration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.SchedulingDuration"; + }; + + return SchedulingDuration; + })(); + + v1.ServiceAccount = (function() { + + /** + * Properties of a ServiceAccount. + * @memberof google.cloud.backupdr.v1 + * @interface IServiceAccount + * @property {string|null} [email] ServiceAccount email + * @property {Array.|null} [scopes] ServiceAccount scopes + */ + + /** + * Constructs a new ServiceAccount. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ServiceAccount. + * @implements IServiceAccount + * @constructor + * @param {google.cloud.backupdr.v1.IServiceAccount=} [properties] Properties to set + */ + function ServiceAccount(properties) { + this.scopes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceAccount email. + * @member {string|null|undefined} email + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @instance + */ + ServiceAccount.prototype.email = null; + + /** + * ServiceAccount scopes. + * @member {Array.} scopes + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @instance + */ + ServiceAccount.prototype.scopes = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ServiceAccount _email. + * @member {"email"|undefined} _email + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @instance + */ + Object.defineProperty(ServiceAccount.prototype, "_email", { + get: $util.oneOfGetter($oneOfFields = ["email"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ServiceAccount instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {google.cloud.backupdr.v1.IServiceAccount=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount instance + */ + ServiceAccount.create = function create(properties) { + return new ServiceAccount(properties); + }; + + /** + * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {google.cloud.backupdr.v1.IServiceAccount} message ServiceAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.email != null && Object.hasOwnProperty.call(message, "email")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.email); + if (message.scopes != null && message.scopes.length) + for (var i = 0; i < message.scopes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.scopes[i]); + return writer; + }; + + /** + * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {google.cloud.backupdr.v1.IServiceAccount} message ServiceAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceAccount message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceAccount.decode = function 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.backupdr.v1.ServiceAccount(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.email = reader.string(); + break; + } + case 2: { + if (!(message.scopes && message.scopes.length)) + message.scopes = []; + message.scopes.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceAccount message. + * @function verify + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.email != null && message.hasOwnProperty("email")) { + properties._email = 1; + if (!$util.isString(message.email)) + return "email: string expected"; + } + if (message.scopes != null && message.hasOwnProperty("scopes")) { + if (!Array.isArray(message.scopes)) + return "scopes: array expected"; + for (var i = 0; i < message.scopes.length; ++i) + if (!$util.isString(message.scopes[i])) + return "scopes: string[] expected"; + } + return null; + }; + + /** + * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount + */ + ServiceAccount.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ServiceAccount) + return object; + var message = new $root.google.cloud.backupdr.v1.ServiceAccount(); + if (object.email != null) + message.email = String(object.email); + if (object.scopes) { + if (!Array.isArray(object.scopes)) + throw TypeError(".google.cloud.backupdr.v1.ServiceAccount.scopes: array expected"); + message.scopes = []; + for (var i = 0; i < object.scopes.length; ++i) + message.scopes[i] = String(object.scopes[i]); + } + return message; + }; + + /** + * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {google.cloud.backupdr.v1.ServiceAccount} message ServiceAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.scopes = []; + if (message.email != null && message.hasOwnProperty("email")) { + object.email = message.email; + if (options.oneofs) + object._email = "email"; + } + if (message.scopes && message.scopes.length) { + object.scopes = []; + for (var j = 0; j < message.scopes.length; ++j) + object.scopes[j] = message.scopes[j]; + } + return object; + }; + + /** + * Converts this ServiceAccount to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @instance + * @returns {Object.} JSON object + */ + ServiceAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceAccount + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceAccount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ServiceAccount"; + }; + + return ServiceAccount; + })(); + + v1.Tags = (function() { + + /** + * Properties of a Tags. + * @memberof google.cloud.backupdr.v1 + * @interface ITags + * @property {Array.|null} [items] Tags items + */ + + /** + * Constructs a new Tags. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Tags. + * @implements ITags + * @constructor + * @param {google.cloud.backupdr.v1.ITags=} [properties] Properties to set + */ + function Tags(properties) { + this.items = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Tags items. + * @member {Array.} items + * @memberof google.cloud.backupdr.v1.Tags + * @instance + */ + Tags.prototype.items = $util.emptyArray; + + /** + * Creates a new Tags instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {google.cloud.backupdr.v1.ITags=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Tags} Tags instance + */ + Tags.create = function create(properties) { + return new Tags(properties); + }; + + /** + * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {google.cloud.backupdr.v1.ITags} message Tags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tags.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.items[i]); + return writer; + }; + + /** + * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {google.cloud.backupdr.v1.ITags} message Tags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tags.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Tags message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Tags} Tags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tags.decode = function 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.backupdr.v1.Tags(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.items && message.items.length)) + message.items = []; + message.items.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Tags message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Tags} Tags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tags.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Tags message. + * @function verify + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Tags.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) + if (!$util.isString(message.items[i])) + return "items: string[] expected"; + } + return null; + }; + + /** + * Creates a Tags message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Tags} Tags + */ + Tags.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Tags) + return object; + var message = new $root.google.cloud.backupdr.v1.Tags(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".google.cloud.backupdr.v1.Tags.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) + message.items[i] = String(object.items[i]); + } + return message; + }; + + /** + * Creates a plain object from a Tags message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {google.cloud.backupdr.v1.Tags} message Tags + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Tags.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = message.items[j]; + } + return object; + }; + + /** + * Converts this Tags to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Tags + * @instance + * @returns {Object.} JSON object + */ + Tags.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Tags + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Tags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Tags"; + }; + + return Tags; + })(); + + v1.AttachedDisk = (function() { + + /** + * Properties of an AttachedDisk. + * @memberof google.cloud.backupdr.v1 + * @interface IAttachedDisk + * @property {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null} [initializeParams] AttachedDisk initializeParams + * @property {string|null} [deviceName] AttachedDisk deviceName + * @property {string|null} [kind] AttachedDisk kind + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskType|null} [diskTypeDeprecated] AttachedDisk diskTypeDeprecated + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskMode|null} [mode] AttachedDisk mode + * @property {string|null} [source] AttachedDisk source + * @property {number|Long|null} [index] AttachedDisk index + * @property {boolean|null} [boot] AttachedDisk boot + * @property {boolean|null} [autoDelete] AttachedDisk autoDelete + * @property {Array.|null} [license] AttachedDisk license + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null} [diskInterface] AttachedDisk diskInterface + * @property {Array.|null} [guestOsFeature] AttachedDisk guestOsFeature + * @property {google.cloud.backupdr.v1.ICustomerEncryptionKey|null} [diskEncryptionKey] AttachedDisk diskEncryptionKey + * @property {number|Long|null} [diskSizeGb] AttachedDisk diskSizeGb + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null} [savedState] AttachedDisk savedState + * @property {string|null} [diskType] AttachedDisk diskType + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskType|null} [type] AttachedDisk type + */ + + /** + * Constructs a new AttachedDisk. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AttachedDisk. + * @implements IAttachedDisk + * @constructor + * @param {google.cloud.backupdr.v1.IAttachedDisk=} [properties] Properties to set + */ + function AttachedDisk(properties) { + this.license = []; + this.guestOsFeature = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AttachedDisk initializeParams. + * @member {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null|undefined} initializeParams + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.initializeParams = null; + + /** + * AttachedDisk deviceName. + * @member {string|null|undefined} deviceName + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.deviceName = null; + + /** + * AttachedDisk kind. + * @member {string|null|undefined} kind + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.kind = null; + + /** + * AttachedDisk diskTypeDeprecated. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskType|null|undefined} diskTypeDeprecated + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskTypeDeprecated = null; + + /** + * AttachedDisk mode. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskMode|null|undefined} mode + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.mode = null; + + /** + * AttachedDisk source. + * @member {string|null|undefined} source + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.source = null; + + /** + * AttachedDisk index. + * @member {number|Long|null|undefined} index + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.index = null; + + /** + * AttachedDisk boot. + * @member {boolean|null|undefined} boot + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.boot = null; + + /** + * AttachedDisk autoDelete. + * @member {boolean|null|undefined} autoDelete + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.autoDelete = null; + + /** + * AttachedDisk license. + * @member {Array.} license + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.license = $util.emptyArray; + + /** + * AttachedDisk diskInterface. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null|undefined} diskInterface + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskInterface = null; + + /** + * AttachedDisk guestOsFeature. + * @member {Array.} guestOsFeature + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.guestOsFeature = $util.emptyArray; + + /** + * AttachedDisk diskEncryptionKey. + * @member {google.cloud.backupdr.v1.ICustomerEncryptionKey|null|undefined} diskEncryptionKey + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskEncryptionKey = null; + + /** + * AttachedDisk diskSizeGb. + * @member {number|Long|null|undefined} diskSizeGb + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskSizeGb = null; + + /** + * AttachedDisk savedState. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null|undefined} savedState + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.savedState = null; + + /** + * AttachedDisk diskType. + * @member {string|null|undefined} diskType + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskType = null; + + /** + * AttachedDisk type. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskType|null|undefined} type + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.type = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AttachedDisk _initializeParams. + * @member {"initializeParams"|undefined} _initializeParams + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_initializeParams", { + get: $util.oneOfGetter($oneOfFields = ["initializeParams"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _deviceName. + * @member {"deviceName"|undefined} _deviceName + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_deviceName", { + get: $util.oneOfGetter($oneOfFields = ["deviceName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _kind. + * @member {"kind"|undefined} _kind + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_kind", { + get: $util.oneOfGetter($oneOfFields = ["kind"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskTypeDeprecated. + * @member {"diskTypeDeprecated"|undefined} _diskTypeDeprecated + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskTypeDeprecated", { + get: $util.oneOfGetter($oneOfFields = ["diskTypeDeprecated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _mode. + * @member {"mode"|undefined} _mode + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_mode", { + get: $util.oneOfGetter($oneOfFields = ["mode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _source. + * @member {"source"|undefined} _source + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_source", { + get: $util.oneOfGetter($oneOfFields = ["source"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _index. + * @member {"index"|undefined} _index + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_index", { + get: $util.oneOfGetter($oneOfFields = ["index"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _boot. + * @member {"boot"|undefined} _boot + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_boot", { + get: $util.oneOfGetter($oneOfFields = ["boot"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _autoDelete. + * @member {"autoDelete"|undefined} _autoDelete + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_autoDelete", { + get: $util.oneOfGetter($oneOfFields = ["autoDelete"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskInterface. + * @member {"diskInterface"|undefined} _diskInterface + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskInterface", { + get: $util.oneOfGetter($oneOfFields = ["diskInterface"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskEncryptionKey. + * @member {"diskEncryptionKey"|undefined} _diskEncryptionKey + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskEncryptionKey", { + get: $util.oneOfGetter($oneOfFields = ["diskEncryptionKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskSizeGb. + * @member {"diskSizeGb"|undefined} _diskSizeGb + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskSizeGb", { + get: $util.oneOfGetter($oneOfFields = ["diskSizeGb"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _savedState. + * @member {"savedState"|undefined} _savedState + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_savedState", { + get: $util.oneOfGetter($oneOfFields = ["savedState"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskType. + * @member {"diskType"|undefined} _diskType + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskType", { + get: $util.oneOfGetter($oneOfFields = ["diskType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _type. + * @member {"type"|undefined} _type + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AttachedDisk instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {google.cloud.backupdr.v1.IAttachedDisk=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk instance + */ + AttachedDisk.create = function create(properties) { + return new AttachedDisk(properties); + }; + + /** + * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {google.cloud.backupdr.v1.IAttachedDisk} message AttachedDisk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttachedDisk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initializeParams != null && Object.hasOwnProperty.call(message, "initializeParams")) + $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.encode(message.initializeParams, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.deviceName); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.kind); + if (message.diskTypeDeprecated != null && Object.hasOwnProperty.call(message, "diskTypeDeprecated")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.diskTypeDeprecated); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.mode); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.source); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.index); + if (message.boot != null && Object.hasOwnProperty.call(message, "boot")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.boot); + if (message.autoDelete != null && Object.hasOwnProperty.call(message, "autoDelete")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.autoDelete); + if (message.license != null && message.license.length) + for (var i = 0; i < message.license.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.license[i]); + if (message.diskInterface != null && Object.hasOwnProperty.call(message, "diskInterface")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.diskInterface); + if (message.guestOsFeature != null && message.guestOsFeature.length) + for (var i = 0; i < message.guestOsFeature.length; ++i) + $root.google.cloud.backupdr.v1.GuestOsFeature.encode(message.guestOsFeature[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.diskEncryptionKey != null && Object.hasOwnProperty.call(message, "diskEncryptionKey")) + $root.google.cloud.backupdr.v1.CustomerEncryptionKey.encode(message.diskEncryptionKey, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 16, wireType 0 =*/128).int64(message.diskSizeGb); + if (message.savedState != null && Object.hasOwnProperty.call(message, "savedState")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.savedState); + if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.diskType); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.type); + return writer; + }; + + /** + * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {google.cloud.backupdr.v1.IAttachedDisk} message AttachedDisk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttachedDisk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AttachedDisk message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttachedDisk.decode = function 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.backupdr.v1.AttachedDisk(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.decode(reader, reader.uint32()); + break; + } + case 4: { + message.deviceName = reader.string(); + break; + } + case 5: { + message.kind = reader.string(); + break; + } + case 6: { + message.diskTypeDeprecated = reader.int32(); + break; + } + case 7: { + message.mode = reader.int32(); + break; + } + case 8: { + message.source = reader.string(); + break; + } + case 9: { + message.index = reader.int64(); + break; + } + case 10: { + message.boot = reader.bool(); + break; + } + case 11: { + message.autoDelete = reader.bool(); + break; + } + case 12: { + if (!(message.license && message.license.length)) + message.license = []; + message.license.push(reader.string()); + break; + } + case 13: { + message.diskInterface = reader.int32(); + break; + } + case 14: { + if (!(message.guestOsFeature && message.guestOsFeature.length)) + message.guestOsFeature = []; + message.guestOsFeature.push($root.google.cloud.backupdr.v1.GuestOsFeature.decode(reader, reader.uint32())); + break; + } + case 15: { + message.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader, reader.uint32()); + break; + } + case 16: { + message.diskSizeGb = reader.int64(); + break; + } + case 17: { + message.savedState = reader.int32(); + break; + } + case 18: { + message.diskType = reader.string(); + break; + } + case 19: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttachedDisk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AttachedDisk message. + * @function verify + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AttachedDisk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.initializeParams != null && message.hasOwnProperty("initializeParams")) { + properties._initializeParams = 1; + { + var error = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify(message.initializeParams); + if (error) + return "initializeParams." + error; + } + } + if (message.deviceName != null && message.hasOwnProperty("deviceName")) { + properties._deviceName = 1; + if (!$util.isString(message.deviceName)) + return "deviceName: string expected"; + } + if (message.kind != null && message.hasOwnProperty("kind")) { + properties._kind = 1; + if (!$util.isString(message.kind)) + return "kind: string expected"; + } + if (message.diskTypeDeprecated != null && message.hasOwnProperty("diskTypeDeprecated")) { + properties._diskTypeDeprecated = 1; + switch (message.diskTypeDeprecated) { + default: + return "diskTypeDeprecated: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.mode != null && message.hasOwnProperty("mode")) { + properties._mode = 1; + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.source != null && message.hasOwnProperty("source")) { + properties._source = 1; + if (!$util.isString(message.source)) + return "source: string expected"; + } + if (message.index != null && message.hasOwnProperty("index")) { + properties._index = 1; + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; + } + if (message.boot != null && message.hasOwnProperty("boot")) { + properties._boot = 1; + if (typeof message.boot !== "boolean") + return "boot: boolean expected"; + } + if (message.autoDelete != null && message.hasOwnProperty("autoDelete")) { + properties._autoDelete = 1; + if (typeof message.autoDelete !== "boolean") + return "autoDelete: boolean expected"; + } + if (message.license != null && message.hasOwnProperty("license")) { + if (!Array.isArray(message.license)) + return "license: array expected"; + for (var i = 0; i < message.license.length; ++i) + if (!$util.isString(message.license[i])) + return "license: string[] expected"; + } + if (message.diskInterface != null && message.hasOwnProperty("diskInterface")) { + properties._diskInterface = 1; + switch (message.diskInterface) { + default: + return "diskInterface: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.guestOsFeature != null && message.hasOwnProperty("guestOsFeature")) { + if (!Array.isArray(message.guestOsFeature)) + return "guestOsFeature: array expected"; + for (var i = 0; i < message.guestOsFeature.length; ++i) { + var error = $root.google.cloud.backupdr.v1.GuestOsFeature.verify(message.guestOsFeature[i]); + if (error) + return "guestOsFeature." + error; + } + } + if (message.diskEncryptionKey != null && message.hasOwnProperty("diskEncryptionKey")) { + properties._diskEncryptionKey = 1; + { + var error = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.verify(message.diskEncryptionKey); + if (error) + return "diskEncryptionKey." + error; + } + } + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) { + properties._diskSizeGb = 1; + if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) + return "diskSizeGb: integer|Long expected"; + } + if (message.savedState != null && message.hasOwnProperty("savedState")) { + properties._savedState = 1; + switch (message.savedState) { + default: + return "savedState: enum value expected"; + case 0: + case 1: + break; + } + } + if (message.diskType != null && message.hasOwnProperty("diskType")) { + properties._diskType = 1; + if (!$util.isString(message.diskType)) + return "diskType: string expected"; + } + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates an AttachedDisk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk + */ + AttachedDisk.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AttachedDisk) + return object; + var message = new $root.google.cloud.backupdr.v1.AttachedDisk(); + if (object.initializeParams != null) { + if (typeof object.initializeParams !== "object") + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.initializeParams: object expected"); + message.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.fromObject(object.initializeParams); + } + if (object.deviceName != null) + message.deviceName = String(object.deviceName); + if (object.kind != null) + message.kind = String(object.kind); + switch (object.diskTypeDeprecated) { + default: + if (typeof object.diskTypeDeprecated === "number") { + message.diskTypeDeprecated = object.diskTypeDeprecated; + break; + } + break; + case "DISK_TYPE_UNSPECIFIED": + case 0: + message.diskTypeDeprecated = 0; + break; + case "SCRATCH": + case 1: + message.diskTypeDeprecated = 1; + break; + case "PERSISTENT": + case 2: + message.diskTypeDeprecated = 2; + break; + } + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "DISK_MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "READ_WRITE": + case 1: + message.mode = 1; + break; + case "READ_ONLY": + case 2: + message.mode = 2; + break; + case "LOCKED": + case 3: + message.mode = 3; + break; + } + if (object.source != null) + message.source = String(object.source); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = false; + else if (typeof object.index === "string") + message.index = parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); + if (object.boot != null) + message.boot = Boolean(object.boot); + if (object.autoDelete != null) + message.autoDelete = Boolean(object.autoDelete); + if (object.license) { + if (!Array.isArray(object.license)) + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.license: array expected"); + message.license = []; + for (var i = 0; i < object.license.length; ++i) + message.license[i] = String(object.license[i]); + } + switch (object.diskInterface) { + default: + if (typeof object.diskInterface === "number") { + message.diskInterface = object.diskInterface; + break; + } + break; + case "DISK_INTERFACE_UNSPECIFIED": + case 0: + message.diskInterface = 0; + break; + case "SCSI": + case 1: + message.diskInterface = 1; + break; + case "NVME": + case 2: + message.diskInterface = 2; + break; + case "NVDIMM": + case 3: + message.diskInterface = 3; + break; + case "ISCSI": + case 4: + message.diskInterface = 4; + break; + } + if (object.guestOsFeature) { + if (!Array.isArray(object.guestOsFeature)) + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.guestOsFeature: array expected"); + message.guestOsFeature = []; + for (var i = 0; i < object.guestOsFeature.length; ++i) { + if (typeof object.guestOsFeature[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.guestOsFeature: object expected"); + message.guestOsFeature[i] = $root.google.cloud.backupdr.v1.GuestOsFeature.fromObject(object.guestOsFeature[i]); + } + } + if (object.diskEncryptionKey != null) { + if (typeof object.diskEncryptionKey !== "object") + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.diskEncryptionKey: object expected"); + message.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.fromObject(object.diskEncryptionKey); + } + if (object.diskSizeGb != null) + if ($util.Long) + (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; + else if (typeof object.diskSizeGb === "string") + message.diskSizeGb = parseInt(object.diskSizeGb, 10); + else if (typeof object.diskSizeGb === "number") + message.diskSizeGb = object.diskSizeGb; + else if (typeof object.diskSizeGb === "object") + message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); + switch (object.savedState) { + default: + if (typeof object.savedState === "number") { + message.savedState = object.savedState; + break; + } + break; + case "DISK_SAVED_STATE_UNSPECIFIED": + case 0: + message.savedState = 0; + break; + case "PRESERVED": + case 1: + message.savedState = 1; + break; + } + if (object.diskType != null) + message.diskType = String(object.diskType); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DISK_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "SCRATCH": + case 1: + message.type = 1; + break; + case "PERSISTENT": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk} message AttachedDisk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AttachedDisk.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.license = []; + object.guestOsFeature = []; + } + if (message.initializeParams != null && message.hasOwnProperty("initializeParams")) { + object.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.toObject(message.initializeParams, options); + if (options.oneofs) + object._initializeParams = "initializeParams"; + } + if (message.deviceName != null && message.hasOwnProperty("deviceName")) { + object.deviceName = message.deviceName; + if (options.oneofs) + object._deviceName = "deviceName"; + } + if (message.kind != null && message.hasOwnProperty("kind")) { + object.kind = message.kind; + if (options.oneofs) + object._kind = "kind"; + } + if (message.diskTypeDeprecated != null && message.hasOwnProperty("diskTypeDeprecated")) { + object.diskTypeDeprecated = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated] === undefined ? message.diskTypeDeprecated : $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated] : message.diskTypeDeprecated; + if (options.oneofs) + object._diskTypeDeprecated = "diskTypeDeprecated"; + } + if (message.mode != null && message.hasOwnProperty("mode")) { + object.mode = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode] === undefined ? message.mode : $root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode] : message.mode; + if (options.oneofs) + object._mode = "mode"; + } + if (message.source != null && message.hasOwnProperty("source")) { + object.source = message.source; + if (options.oneofs) + object._source = "source"; + } + if (message.index != null && message.hasOwnProperty("index")) { + if (typeof message.index === "number") + object.index = options.longs === String ? String(message.index) : message.index; + else + object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; + if (options.oneofs) + object._index = "index"; + } + if (message.boot != null && message.hasOwnProperty("boot")) { + object.boot = message.boot; + if (options.oneofs) + object._boot = "boot"; + } + if (message.autoDelete != null && message.hasOwnProperty("autoDelete")) { + object.autoDelete = message.autoDelete; + if (options.oneofs) + object._autoDelete = "autoDelete"; + } + if (message.license && message.license.length) { + object.license = []; + for (var j = 0; j < message.license.length; ++j) + object.license[j] = message.license[j]; + } + if (message.diskInterface != null && message.hasOwnProperty("diskInterface")) { + object.diskInterface = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskInterface[message.diskInterface] === undefined ? message.diskInterface : $root.google.cloud.backupdr.v1.AttachedDisk.DiskInterface[message.diskInterface] : message.diskInterface; + if (options.oneofs) + object._diskInterface = "diskInterface"; + } + if (message.guestOsFeature && message.guestOsFeature.length) { + object.guestOsFeature = []; + for (var j = 0; j < message.guestOsFeature.length; ++j) + object.guestOsFeature[j] = $root.google.cloud.backupdr.v1.GuestOsFeature.toObject(message.guestOsFeature[j], options); + } + if (message.diskEncryptionKey != null && message.hasOwnProperty("diskEncryptionKey")) { + object.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.toObject(message.diskEncryptionKey, options); + if (options.oneofs) + object._diskEncryptionKey = "diskEncryptionKey"; + } + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) { + if (typeof message.diskSizeGb === "number") + object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; + else + object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; + if (options.oneofs) + object._diskSizeGb = "diskSizeGb"; + } + if (message.savedState != null && message.hasOwnProperty("savedState")) { + object.savedState = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState] === undefined ? message.savedState : $root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState] : message.savedState; + if (options.oneofs) + object._savedState = "savedState"; + } + if (message.diskType != null && message.hasOwnProperty("diskType")) { + object.diskType = message.diskType; + if (options.oneofs) + object._diskType = "diskType"; + } + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + return object; + }; + + /** + * Converts this AttachedDisk to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + * @returns {Object.} JSON object + */ + AttachedDisk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AttachedDisk + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AttachedDisk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AttachedDisk"; + }; + + AttachedDisk.InitializeParams = (function() { + + /** + * Properties of an InitializeParams. + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @interface IInitializeParams + * @property {string|null} [diskName] InitializeParams diskName + * @property {Array.|null} [replicaZones] InitializeParams replicaZones + */ + + /** + * Constructs a new InitializeParams. + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @classdesc Represents an InitializeParams. + * @implements IInitializeParams + * @constructor + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams=} [properties] Properties to set + */ + function InitializeParams(properties) { + this.replicaZones = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InitializeParams diskName. + * @member {string|null|undefined} diskName + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + */ + InitializeParams.prototype.diskName = null; + + /** + * InitializeParams replicaZones. + * @member {Array.} replicaZones + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + */ + InitializeParams.prototype.replicaZones = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InitializeParams _diskName. + * @member {"diskName"|undefined} _diskName + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + */ + Object.defineProperty(InitializeParams.prototype, "_diskName", { + get: $util.oneOfGetter($oneOfFields = ["diskName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InitializeParams instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams instance + */ + InitializeParams.create = function create(properties) { + return new InitializeParams(properties); + }; + + /** + * Encodes the specified InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams} message InitializeParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitializeParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.diskName != null && Object.hasOwnProperty.call(message, "diskName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.diskName); + if (message.replicaZones != null && message.replicaZones.length) + for (var i = 0; i < message.replicaZones.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.replicaZones[i]); + return writer; + }; + + /** + * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams} message InitializeParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitializeParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InitializeParams message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitializeParams.decode = function 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.backupdr.v1.AttachedDisk.InitializeParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.diskName = reader.string(); + break; + } + case 2: { + if (!(message.replicaZones && message.replicaZones.length)) + message.replicaZones = []; + message.replicaZones.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InitializeParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitializeParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InitializeParams message. + * @function verify + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InitializeParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.diskName != null && message.hasOwnProperty("diskName")) { + properties._diskName = 1; + if (!$util.isString(message.diskName)) + return "diskName: string expected"; + } + if (message.replicaZones != null && message.hasOwnProperty("replicaZones")) { + if (!Array.isArray(message.replicaZones)) + return "replicaZones: array expected"; + for (var i = 0; i < message.replicaZones.length; ++i) + if (!$util.isString(message.replicaZones[i])) + return "replicaZones: string[] expected"; + } + return null; + }; + + /** + * Creates an InitializeParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams + */ + InitializeParams.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams) + return object; + var message = new $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams(); + if (object.diskName != null) + message.diskName = String(object.diskName); + if (object.replicaZones) { + if (!Array.isArray(object.replicaZones)) + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.InitializeParams.replicaZones: array expected"); + message.replicaZones = []; + for (var i = 0; i < object.replicaZones.length; ++i) + message.replicaZones[i] = String(object.replicaZones[i]); + } + return message; + }; + + /** + * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} message InitializeParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InitializeParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.replicaZones = []; + if (message.diskName != null && message.hasOwnProperty("diskName")) { + object.diskName = message.diskName; + if (options.oneofs) + object._diskName = "diskName"; + } + if (message.replicaZones && message.replicaZones.length) { + object.replicaZones = []; + for (var j = 0; j < message.replicaZones.length; ++j) + object.replicaZones[j] = message.replicaZones[j]; + } + return object; + }; + + /** + * Converts this InitializeParams to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + * @returns {Object.} JSON object + */ + InitializeParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InitializeParams + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InitializeParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AttachedDisk.InitializeParams"; + }; + + return InitializeParams; + })(); + + /** + * DiskType enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskType + * @enum {number} + * @property {number} DISK_TYPE_UNSPECIFIED=0 DISK_TYPE_UNSPECIFIED value + * @property {number} SCRATCH=1 SCRATCH value + * @property {number} PERSISTENT=2 PERSISTENT value + */ + AttachedDisk.DiskType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCRATCH"] = 1; + values[valuesById[2] = "PERSISTENT"] = 2; + return values; + })(); + + /** + * DiskMode enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskMode + * @enum {number} + * @property {number} DISK_MODE_UNSPECIFIED=0 DISK_MODE_UNSPECIFIED value + * @property {number} READ_WRITE=1 READ_WRITE value + * @property {number} READ_ONLY=2 READ_ONLY value + * @property {number} LOCKED=3 LOCKED value + */ + AttachedDisk.DiskMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READ_WRITE"] = 1; + values[valuesById[2] = "READ_ONLY"] = 2; + values[valuesById[3] = "LOCKED"] = 3; + return values; + })(); + + /** + * DiskInterface enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskInterface + * @enum {number} + * @property {number} DISK_INTERFACE_UNSPECIFIED=0 DISK_INTERFACE_UNSPECIFIED value + * @property {number} SCSI=1 SCSI value + * @property {number} NVME=2 NVME value + * @property {number} NVDIMM=3 NVDIMM value + * @property {number} ISCSI=4 ISCSI value + */ + AttachedDisk.DiskInterface = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_INTERFACE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCSI"] = 1; + values[valuesById[2] = "NVME"] = 2; + values[valuesById[3] = "NVDIMM"] = 3; + values[valuesById[4] = "ISCSI"] = 4; + return values; + })(); + + /** + * DiskSavedState enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskSavedState + * @enum {number} + * @property {number} DISK_SAVED_STATE_UNSPECIFIED=0 DISK_SAVED_STATE_UNSPECIFIED value + * @property {number} PRESERVED=1 PRESERVED value + */ + AttachedDisk.DiskSavedState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_SAVED_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRESERVED"] = 1; + return values; + })(); + + return AttachedDisk; + })(); + + v1.GuestOsFeature = (function() { + + /** + * Properties of a GuestOsFeature. + * @memberof google.cloud.backupdr.v1 + * @interface IGuestOsFeature + * @property {google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null} [type] GuestOsFeature type + */ + + /** + * Constructs a new GuestOsFeature. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GuestOsFeature. + * @implements IGuestOsFeature + * @constructor + * @param {google.cloud.backupdr.v1.IGuestOsFeature=} [properties] Properties to set + */ + function GuestOsFeature(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GuestOsFeature type. + * @member {google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null|undefined} type + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @instance + */ + GuestOsFeature.prototype.type = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GuestOsFeature _type. + * @member {"type"|undefined} _type + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @instance + */ + Object.defineProperty(GuestOsFeature.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GuestOsFeature instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.IGuestOsFeature=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature instance + */ + GuestOsFeature.create = function create(properties) { + return new GuestOsFeature(properties); + }; + + /** + * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.IGuestOsFeature} message GuestOsFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GuestOsFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + return writer; + }; + + /** + * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.IGuestOsFeature} message GuestOsFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GuestOsFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GuestOsFeature message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GuestOsFeature.decode = function 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.backupdr.v1.GuestOsFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GuestOsFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GuestOsFeature message. + * @function verify + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GuestOsFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + break; + } + } + return null; + }; + + /** + * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature + */ + GuestOsFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GuestOsFeature) + return object; + var message = new $root.google.cloud.backupdr.v1.GuestOsFeature(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "FEATURE_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "VIRTIO_SCSI_MULTIQUEUE": + case 1: + message.type = 1; + break; + case "WINDOWS": + case 2: + message.type = 2; + break; + case "MULTI_IP_SUBNET": + case 3: + message.type = 3; + break; + case "UEFI_COMPATIBLE": + case 4: + message.type = 4; + break; + case "SECURE_BOOT": + case 5: + message.type = 5; + break; + case "GVNIC": + case 6: + message.type = 6; + break; + case "SEV_CAPABLE": + case 7: + message.type = 7; + break; + case "BARE_METAL_LINUX_COMPATIBLE": + case 8: + message.type = 8; + break; + case "SUSPEND_RESUME_COMPATIBLE": + case 9: + message.type = 9; + break; + case "SEV_LIVE_MIGRATABLE": + case 10: + message.type = 10; + break; + case "SEV_SNP_CAPABLE": + case 11: + message.type = 11; + break; + case "TDX_CAPABLE": + case 12: + message.type = 12; + break; + case "IDPF": + case 13: + message.type = 13; + break; + case "SEV_LIVE_MIGRATABLE_V2": + case 14: + message.type = 14; + break; + } + return message; + }; + + /** + * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.GuestOsFeature} message GuestOsFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GuestOsFeature.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + return object; + }; + + /** + * Converts this GuestOsFeature to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @instance + * @returns {Object.} JSON object + */ + GuestOsFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GuestOsFeature + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GuestOsFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GuestOsFeature"; + }; + + /** + * FeatureType enum. + * @name google.cloud.backupdr.v1.GuestOsFeature.FeatureType + * @enum {number} + * @property {number} FEATURE_TYPE_UNSPECIFIED=0 FEATURE_TYPE_UNSPECIFIED value + * @property {number} VIRTIO_SCSI_MULTIQUEUE=1 VIRTIO_SCSI_MULTIQUEUE value + * @property {number} WINDOWS=2 WINDOWS value + * @property {number} MULTI_IP_SUBNET=3 MULTI_IP_SUBNET value + * @property {number} UEFI_COMPATIBLE=4 UEFI_COMPATIBLE value + * @property {number} SECURE_BOOT=5 SECURE_BOOT value + * @property {number} GVNIC=6 GVNIC value + * @property {number} SEV_CAPABLE=7 SEV_CAPABLE value + * @property {number} BARE_METAL_LINUX_COMPATIBLE=8 BARE_METAL_LINUX_COMPATIBLE value + * @property {number} SUSPEND_RESUME_COMPATIBLE=9 SUSPEND_RESUME_COMPATIBLE value + * @property {number} SEV_LIVE_MIGRATABLE=10 SEV_LIVE_MIGRATABLE value + * @property {number} SEV_SNP_CAPABLE=11 SEV_SNP_CAPABLE value + * @property {number} TDX_CAPABLE=12 TDX_CAPABLE value + * @property {number} IDPF=13 IDPF value + * @property {number} SEV_LIVE_MIGRATABLE_V2=14 SEV_LIVE_MIGRATABLE_V2 value + */ + GuestOsFeature.FeatureType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FEATURE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VIRTIO_SCSI_MULTIQUEUE"] = 1; + values[valuesById[2] = "WINDOWS"] = 2; + values[valuesById[3] = "MULTI_IP_SUBNET"] = 3; + values[valuesById[4] = "UEFI_COMPATIBLE"] = 4; + values[valuesById[5] = "SECURE_BOOT"] = 5; + values[valuesById[6] = "GVNIC"] = 6; + values[valuesById[7] = "SEV_CAPABLE"] = 7; + values[valuesById[8] = "BARE_METAL_LINUX_COMPATIBLE"] = 8; + values[valuesById[9] = "SUSPEND_RESUME_COMPATIBLE"] = 9; + values[valuesById[10] = "SEV_LIVE_MIGRATABLE"] = 10; + values[valuesById[11] = "SEV_SNP_CAPABLE"] = 11; + values[valuesById[12] = "TDX_CAPABLE"] = 12; + values[valuesById[13] = "IDPF"] = 13; + values[valuesById[14] = "SEV_LIVE_MIGRATABLE_V2"] = 14; + return values; + })(); + + return GuestOsFeature; + })(); + + /** + * KeyRevocationActionType enum. + * @name google.cloud.backupdr.v1.KeyRevocationActionType + * @enum {number} + * @property {number} KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED=0 KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} STOP=2 STOP value + */ + v1.KeyRevocationActionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "STOP"] = 2; + return values; + })(); + return v1; })(); - return backupdr; - })(); + return backupdr; + })(); + + 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 + */ + + /** + * 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 = ""; + + /** + * 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); + 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; + } + 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"; + 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); + 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 = ""; + } + 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; + 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()); + }; - return cloud; - })(); + /** + * 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; + }; - google.api = (function() { + /** + * 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; + }; - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; + /** + * 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; + }; - api.Http = (function() { + /** + * 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); + }; /** - * Properties of a Http. + * 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 IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common */ /** - * Constructs a new Http. + * Constructs a new RubySettings. * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * @classdesc Represents a RubySettings. + * @implements IRubySettings * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.IRubySettings=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function RubySettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3718,92 +38664,283 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings * @instance */ - Http.prototype.rules = $util.emptyArray; + RubySettings.prototype.common = null; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * 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 */ - Http.prototype.fullyDecodeReservedExpansion = false; + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Creates a new Http instance using the specified properties. + * 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.Http + * @memberof google.api.GoSettings * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance */ - Http.create = function create(properties) { - return new Http(properties); + GoSettings.create = function create(properties) { + return new GoSettings(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.GoSettings * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + GoSettings.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); + 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 Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.api.GoSettings * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a GoSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @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.Http} Http + * @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 */ - Http.decode = function decode(reader, length) { + 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.Http(); + 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: { - 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(); + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } default: @@ -3815,158 +38952,130 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a GoSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.api.GoSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @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 */ - Http.decodeDelimited = function decodeDelimited(reader) { + GoSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a GoSettings message. * @function verify - * @memberof google.api.Http + * @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 */ - Http.verify = function verify(message) { + GoSettings.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.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + 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. + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.api.GoSettings * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.api.GoSettings} GoSettings */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) 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]); - } + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } - if (object.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. + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.api.GoSettings * @static - * @param {google.api.Http} message Http + * @param {google.api.GoSettings} message GoSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + GoSettings.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; + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); return object; }; /** - * Converts this Http to JSON. + * Converts this GoSettings to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.api.GoSettings * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + GoSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Http + * Gets the default type url for GoSettings * @function getTypeUrl - * @memberof google.api.Http + * @memberof google.api.GoSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.Http"; + return typeUrlPrefix + "/google.api.GoSettings"; }; - return Http; + return GoSettings; })(); - api.HttpRule = (function() { + api.MethodSettings = (function() { /** - * Properties of a HttpRule. + * Properties of a MethodSettings. * @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 + * @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 HttpRule. + * Constructs a new MethodSettings. * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.api.IMethodSettings=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function MethodSettings(properties) { + this.autoPopulatedFields = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3974,175 +39083,91 @@ } /** - * HttpRule selector. + * MethodSettings 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 + * @memberof google.api.MethodSettings * @instance */ - HttpRule.prototype.responseBody = ""; + MethodSettings.prototype.selector = ""; /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + MethodSettings.prototype.longRunning = null; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new MethodSettings instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.MethodSettings * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.MethodSettings * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, 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.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); + 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 HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.MethodSettings * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a MethodSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @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.HttpRule} HttpRule + * @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 */ - HttpRule.decode = function decode(reader, length) { + 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.HttpRule(); + 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) { @@ -4151,41 +39176,13 @@ break; } case 2: { - message.get = reader.string(); + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); 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())); + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); break; } default: @@ -4197,255 +39194,541 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.MethodSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @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 */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + MethodSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies a MethodSettings message. * @function verify - * @memberof google.api.HttpRule + * @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 */ - HttpRule.verify = function verify(message) { + MethodSettings.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.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + 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; - } + 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 HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.api.MethodSettings * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.MethodSettings} MethodSettings */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) return object; - var message = new $root.google.api.HttpRule(); + var message = new $root.google.api.MethodSettings(); 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.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.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]); - } + 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 HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.api.MethodSettings * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.MethodSettings} message MethodSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + MethodSettings.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"; + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; } - 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.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]; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this MethodSettings to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.MethodSettings * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + MethodSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HttpRule + * Gets the default type url for MethodSettings * @function getTypeUrl - * @memberof google.api.HttpRule + * @memberof google.api.MethodSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.HttpRule"; + return typeUrlPrefix + "/google.api.MethodSettings"; }; - return HttpRule; + 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; })(); - api.CustomHttpPattern = (function() { + /** + * 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.FieldInfo = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a FieldInfo. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IFieldInfo + * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new FieldInfo. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a FieldInfo. + * @implements IFieldInfo * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IFieldInfo=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function FieldInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4453,89 +39736,75 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * FieldInfo format. + * @member {google.api.FieldInfo.Format} format + * @memberof google.api.FieldInfo * @instance */ - CustomHttpPattern.prototype.path = ""; + FieldInfo.prototype.format = 0; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new FieldInfo instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IFieldInfo=} [properties] Properties to set + * @returns {google.api.FieldInfo} FieldInfo instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + FieldInfo.create = function create(properties) { + return new FieldInfo(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + FieldInfo.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); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); return writer; }; /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a FieldInfo message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @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 + * @returns {google.api.FieldInfo} FieldInfo * @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) { + FieldInfo.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.FieldInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.kind = reader.string(); - break; - } - case 2: { - message.path = reader.string(); + message.format = reader.int32(); break; } default: @@ -4547,133 +39816,184 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.FieldInfo} FieldInfo * @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) { + FieldInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a FieldInfo message. * @function verify - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @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) { + FieldInfo.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"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.FieldInfo} FieldInfo */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + FieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.FieldInfo) 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); + var message = new $root.google.api.FieldInfo(); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "UUID4": + case 1: + message.format = 1; + break; + case "IPV4": + case 2: + message.format = 2; + break; + case "IPV6": + case 3: + message.format = 3; + break; + case "IPV4_OR_IPV6": + case 4: + message.format = 4; + break; + } return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.FieldInfo} message FieldInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + FieldInfo.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; + if (options.defaults) + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this FieldInfo to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + FieldInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomHttpPattern + * Gets the default type url for FieldInfo * @function getTypeUrl - * @memberof google.api.CustomHttpPattern + * @memberof google.api.FieldInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; + return typeUrlPrefix + "/google.api.FieldInfo"; }; - return CustomHttpPattern; + /** + * Format enum. + * @name google.api.FieldInfo.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} UUID4=1 UUID4 value + * @property {number} IPV4=2 IPV4 value + * @property {number} IPV6=3 IPV6 value + * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value + */ + FieldInfo.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "UUID4"] = 1; + values[valuesById[2] = "IPV4"] = 2; + values[valuesById[3] = "IPV6"] = 3; + values[valuesById[4] = "IPV4_OR_IPV6"] = 4; + return values; + })(); + + return FieldInfo; })(); - api.CommonLanguageSettings = (function() { + api.ResourceDescriptor = (function() { /** - * Properties of a CommonLanguageSettings. + * Properties of a ResourceDescriptor. * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @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 CommonLanguageSettings. + * Constructs a new ResourceDescriptor. * @memberof google.api - * @classdesc Represents a CommonLanguageSettings. - * @implements ICommonLanguageSettings + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function CommonLanguageSettings(properties) { - this.destinations = []; + 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) @@ -4681,100 +40001,173 @@ } /** - * CommonLanguageSettings referenceDocsUri. - * @member {string} referenceDocsUri - * @memberof google.api.CommonLanguageSettings + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - CommonLanguageSettings.prototype.referenceDocsUri = ""; + ResourceDescriptor.prototype.type = ""; /** - * CommonLanguageSettings destinations. - * @member {Array.} destinations - * @memberof google.api.CommonLanguageSettings + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - CommonLanguageSettings.prototype.destinations = $util.emptyArray; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * Creates a new CommonLanguageSettings instance using the specified properties. + * 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.CommonLanguageSettings + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - CommonLanguageSettings.create = function create(properties) { - return new CommonLanguageSettings(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommonLanguageSettings.encode = function encode(message, writer) { + ResourceDescriptor.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]); + 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 CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.CommonLanguageSettings + * @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.CommonLanguageSettings} CommonLanguageSettings + * @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 */ - CommonLanguageSettings.decode = function decode(reader, length) { + 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.CommonLanguageSettings(); + 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.referenceDocsUri = reader.string(); + message.type = reader.string(); break; } case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; + 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.destinations.push(reader.int32()); + message.style.push(reader.int32()); } else - message.destinations.push(reader.int32()); + message.style.push(reader.int32()); break; } default: @@ -4786,45 +40179,69 @@ }; /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @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 */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CommonLanguageSettings message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.api.CommonLanguageSettings + * @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 */ - CommonLanguageSettings.verify = function verify(message) { + ResourceDescriptor.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]) { + 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 "destinations: enum value[] expected"; + return "style: enum value[] expected"; case 0: - case 10: - case 20: + case 1: break; } } @@ -4832,41 +40249,70 @@ }; /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) 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]) { + 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.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; break; } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case "STYLE_UNSPECIFIED": case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; + message.style[i] = 0; break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; break; } } @@ -4874,305 +40320,220 @@ }; /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CommonLanguageSettings.toObject = function toObject(message, options) { + ResourceDescriptor.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]; + 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 CommonLanguageSettings to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CommonLanguageSettings + * Gets the default type url for ResourceDescriptor * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.ResourceDescriptor * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + return typeUrlPrefix + "/google.api.ResourceDescriptor"; }; - 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 + * 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 */ - ClientLibrarySettings.prototype.javaSettings = null; + 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; + })(); /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings - * @instance + * 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 */ - ClientLibrarySettings.prototype.cppSettings = null; + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); - /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.phpSettings = null; + return ResourceDescriptor; + })(); - /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.pythonSettings = null; + api.ResourceReference = (function() { /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings - * @instance + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ - ClientLibrarySettings.prototype.nodeSettings = null; /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings - * @instance + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set */ - ClientLibrarySettings.prototype.dotnetSettings = null; + 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]]; + } /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - ClientLibrarySettings.prototype.rubySettings = null; + ResourceReference.prototype.type = ""; /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - ClientLibrarySettings.prototype.goSettings = null; + ResourceReference.prototype.childType = ""; /** - * Creates a new ClientLibrarySettings instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.ResourceReference * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.ResourceReference * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientLibrarySettings.encode = function encode(message, writer) { + ResourceReference.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(); + 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 ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.ResourceReference * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.api.ClientLibrarySettings + * @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.ClientLibrarySettings} ClientLibrarySettings + * @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 */ - ClientLibrarySettings.decode = function decode(reader, length) { + 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.ClientLibrarySettings(); + 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.version = reader.string(); + message.type = 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()); + message.childType = reader.string(); break; } default: @@ -5184,515 +40545,223 @@ }; /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @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 */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + ResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ClientLibrarySettings message. + * Verifies a ResourceReference message. * @function verify - * @memberof google.api.ClientLibrarySettings + * @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 */ - ClientLibrarySettings.verify = function verify(message) { + ResourceReference.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; - } + 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 ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @returns {google.api.ResourceReference} ResourceReference */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) 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); - } + 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 ClientLibrarySettings message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.ResourceReference * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClientLibrarySettings.toObject = function toObject(message, options) { + ResourceReference.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; + object.type = ""; + object.childType = ""; } - 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); + 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 ClientLibrarySettings to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ClientLibrarySettings + * Gets the default type url for ResourceReference * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.ResourceReference * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + return typeUrlPrefix + "/google.api.ResourceReference"; }; - return ClientLibrarySettings; + return ResourceReference; })(); - 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 - */ - - /** - * 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 = ""; + return api; + })(); - /** - * Publishing codeownerGithubTeams. - * @member {Array.} codeownerGithubTeams - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + google.protobuf = (function() { - /** - * Publishing docTagPrefix. - * @member {string} docTagPrefix - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.docTagPrefix = ""; + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; - /** - * Publishing organization. - * @member {google.api.ClientLibraryOrganization} organization - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.organization = 0; + protobuf.FileDescriptorSet = (function() { /** - * Publishing librarySettings. - * @member {Array.} librarySettings - * @memberof google.api.Publishing - * @instance + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file */ - Publishing.prototype.librarySettings = $util.emptyArray; /** - * Publishing protoReferenceDocumentationUri. - * @member {string} protoReferenceDocumentationUri - * @memberof google.api.Publishing + * 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 */ - Publishing.prototype.protoReferenceDocumentationUri = ""; + FileDescriptorSet.prototype.file = $util.emptyArray; /** - * Creates a new Publishing instance using the specified properties. + * Creates a new FileDescriptorSet instance using the specified properties. * @function create - * @memberof google.api.Publishing + * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.api.IPublishing=} [properties] Properties to set - * @returns {google.api.Publishing} Publishing instance + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance */ - Publishing.create = function create(properties) { - return new Publishing(properties); + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); }; /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. * @function encode - * @memberof google.api.Publishing + * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Publishing.encode = function encode(message, writer) { + FileDescriptorSet.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.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 Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Publishing + * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Publishing.encodeDelimited = function encodeDelimited(message, writer) { + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Publishing message from the specified reader or buffer. + * Decodes a FileDescriptorSet message from the specified reader or buffer. * @function decode - * @memberof google.api.Publishing + * @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.api.Publishing} Publishing + * @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 */ - Publishing.decode = function decode(reader, length) { + 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.api.Publishing(); + 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 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(); + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); break; } default: @@ -5704,419 +40773,465 @@ }; /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Publishing + * @memberof google.protobuf.FileDescriptorSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing + * @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 */ - Publishing.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Publishing message. + * Verifies a FileDescriptorSet message. * @function verify - * @memberof google.api.Publishing + * @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 */ - Publishing.verify = function verify(message) { + FileDescriptorSet.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 (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 "librarySettings." + error; + return "file." + error; } } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; return null; }; /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Publishing + * @memberof google.protobuf.FileDescriptorSet * @static * @param {Object.} object Plain object - * @returns {google.api.Publishing} Publishing + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet */ - Publishing.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Publishing) + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) 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]); + 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]); } } - if (object.protoReferenceDocumentationUri != null) - message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); return message; }; /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Publishing + * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.api.Publishing} message Publishing + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Publishing.toObject = function toObject(message, options) { + FileDescriptorSet.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 = ""; - } - 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 (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); } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; return object; }; /** - * Converts this Publishing to JSON. - * @function toJSON - * @memberof google.api.Publishing + * 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 - * @returns {Object.} JSON object */ - Publishing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + FileDescriptorProto.prototype.enumType = $util.emptyArray; /** - * 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 + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance */ - Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Publishing"; - }; - - return Publishing; - })(); - - api.JavaSettings = (function() { + FileDescriptorProto.prototype.service = $util.emptyArray; /** - * 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 + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance */ + FileDescriptorProto.prototype.extension = $util.emptyArray; /** - * Constructs a new JavaSettings. - * @memberof google.api - * @classdesc Represents a JavaSettings. - * @implements IJavaSettings - * @constructor - * @param {google.api.IJavaSettings=} [properties] Properties to set + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance */ - 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]]; - } + FileDescriptorProto.prototype.options = null; /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto * @instance */ - JavaSettings.prototype.libraryPackage = ""; + FileDescriptorProto.prototype.sourceCodeInfo = null; /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto * @instance */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; + FileDescriptorProto.prototype.syntax = ""; /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto * @instance */ - JavaSettings.prototype.common = null; + FileDescriptorProto.prototype.edition = 0; /** - * Creates a new JavaSettings instance using the specified properties. + * Creates a new FileDescriptorProto instance using the specified properties. * @function create - * @memberof google.api.JavaSettings + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); }; /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.api.JavaSettings + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JavaSettings.encode = function encode(message, writer) { + FileDescriptorProto.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(); + 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 JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.JavaSettings + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a JavaSettings message from the specified reader or buffer. + * Decodes a FileDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.api.JavaSettings + * @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.api.JavaSettings} JavaSettings + * @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 */ - JavaSettings.decode = function decode(reader, length) { + 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.api.JavaSettings(), key, value; + 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.libraryPackage = reader.string(); + message.name = 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; + message["package"] = reader.string(); break; } case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + 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: @@ -6128,159 +41243,416 @@ }; /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.JavaSettings + * @memberof google.protobuf.FileDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings + * @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 */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a JavaSettings message. + * Verifies a FileDescriptorProto message. * @function verify - * @memberof google.api.JavaSettings + * @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 */ - JavaSettings.verify = function verify(message) { + FileDescriptorProto.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.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.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); + 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 "common." + 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 JavaSettings message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.JavaSettings + * @memberof google.protobuf.FileDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) 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]]); + 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.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + 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 JavaSettings message. Also converts values to other types if specified. + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.JavaSettings + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.api.JavaSettings} message JavaSettings + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - JavaSettings.toObject = function toObject(message, options) { + FileDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } if (options.defaults) { - object.libraryPackage = ""; - object.common = null; + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - 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.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.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + 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 JavaSettings to JSON. + * Converts this FileDescriptorProto to JSON. * @function toJSON - * @memberof google.api.JavaSettings + * @memberof google.protobuf.FileDescriptorProto * @instance * @returns {Object.} JSON object */ - JavaSettings.prototype.toJSON = function toJSON() { + FileDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for JavaSettings + * Gets the default type url for FileDescriptorProto * @function getTypeUrl - * @memberof google.api.JavaSettings + * @memberof google.protobuf.FileDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.JavaSettings"; + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; }; - return JavaSettings; + return FileDescriptorProto; })(); - api.CppSettings = (function() { + protobuf.DescriptorProto = (function() { /** - * Properties of a CppSettings. - * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + * 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 CppSettings. - * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set */ - function CppSettings(properties) { + 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) @@ -6288,75 +41660,225 @@ } /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto * @instance */ - CppSettings.prototype.common = null; + DescriptorProto.prototype.name = ""; /** - * Creates a new CppSettings instance using the specified properties. + * 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.api.CppSettings + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); }; /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. * @function encode - * @memberof google.api.CppSettings + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CppSettings.encode = function encode(message, writer) { + DescriptorProto.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.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 CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CppSettings + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CppSettings message from the specified reader or buffer. + * Decodes a DescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.api.CppSettings + * @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.api.CppSettings} CppSettings + * @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 */ - CppSettings.decode = function decode(reader, length) { + 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.api.CppSettings(); + 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.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + 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: @@ -6368,335 +41890,820 @@ }; /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CppSettings + * @memberof google.protobuf.DescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings + * @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 */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CppSettings message. + * Verifies a DescriptorProto message. * @function verify - * @memberof google.api.CppSettings + * @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 */ - CppSettings.verify = function verify(message) { + DescriptorProto.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 (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 "common." + 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]); + } } - 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); + 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 CppSettings message. Also converts values to other types if specified. + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CppSettings + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.api.CppSettings} message CppSettings + * @param {google.protobuf.DescriptorProto} message DescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CppSettings.toObject = function toObject(message, options) { + DescriptorProto.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); + 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 CppSettings to JSON. + * Converts this DescriptorProto to JSON. * @function toJSON - * @memberof google.api.CppSettings + * @memberof google.protobuf.DescriptorProto * @instance * @returns {Object.} JSON object */ - CppSettings.prototype.toJSON = function toJSON() { + DescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CppSettings + * Gets the default type url for DescriptorProto * @function getTypeUrl - * @memberof google.api.CppSettings + * @memberof google.protobuf.DescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.CppSettings"; + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; }; - return CppSettings; - })(); + DescriptorProto.ExtensionRange = (function() { - api.PhpSettings = (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 + */ - /** - * Properties of a PhpSettings. - * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common - */ + /** + * 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]]; + } - /** - * 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]]; - } + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; - /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings - * @instance - */ - PhpSettings.prototype.common = null; + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; - /** - * 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); - }; + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; - /** - * 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; - }; + /** + * 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 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(); - }; + /** + * 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; + }; - /** - * 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()); + /** + * 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; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + 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()); - }; + /** + * 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 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; - }; + /** + * 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 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) + /** + * 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; - 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 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); + }; - /** - * 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 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"; + }; - /** - * 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 ReservedRange; + })(); - return PhpSettings; + return DescriptorProto; })(); - api.PythonSettings = (function() { + protobuf.ExtensionRangeOptions = (function() { /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * 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 PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set */ - function PythonSettings(properties) { + 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) @@ -6704,283 +42711,123 @@ } /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions * @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; - }; + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Converts this PythonSettings to JSON. - * @function toJSON - * @memberof google.api.PythonSettings + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions * @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 */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; /** - * Constructs a new NodeSettings. - * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings - * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance */ - 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]]; - } + ExtensionRangeOptions.prototype.features = null; /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions * @instance */ - NodeSettings.prototype.common = null; + ExtensionRangeOptions.prototype.verification = 1; /** - * Creates a new NodeSettings instance using the specified properties. + * Creates a new ExtensionRangeOptions instance using the specified properties. * @function create - * @memberof google.api.NodeSettings + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); }; /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. * @function encode - * @memberof google.api.NodeSettings + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NodeSettings.encode = function encode(message, writer) { + ExtensionRangeOptions.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.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 NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.NodeSettings + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NodeSettings message from the specified reader or buffer. + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. * @function decode - * @memberof google.api.NodeSettings + * @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.api.NodeSettings} NodeSettings + * @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 */ - NodeSettings.decode = function decode(reader, length) { + 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.api.NodeSettings(); + 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 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + 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: @@ -6992,137 +42839,527 @@ }; /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.NodeSettings + * @memberof google.protobuf.ExtensionRangeOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings + * @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 */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NodeSettings message. + * Verifies an ExtensionRangeOptions message. * @function verify - * @memberof google.api.NodeSettings + * @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 */ - NodeSettings.verify = function verify(message) { + ExtensionRangeOptions.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 (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 "common." + 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 a NodeSettings message from a plain object. Also converts values to their respective internal types. + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.NodeSettings + * @memberof google.protobuf.ExtensionRangeOptions * @static * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) 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); + 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 a NodeSettings message. Also converts values to other types if specified. + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.NodeSettings + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.api.NodeSettings} message NodeSettings + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NodeSettings.toObject = function toObject(message, options) { + ExtensionRangeOptions.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); + 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 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); - }; + /** + * 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; + })(); /** - * 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 + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.NodeSettings"; - }; + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); - return NodeSettings; + return ExtensionRangeOptions; })(); - api.DotnetSettings = (function() { + protobuf.FieldDescriptorProto = (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 + * 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 DotnetSettings. - * @memberof google.api - * @classdesc Represents a DotnetSettings. - * @implements IDotnetSettings + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto * @constructor - * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set */ - function DotnetSettings(properties) { - this.renamedServices = {}; - this.renamedResources = {}; - this.ignoredResources = []; - this.forcedNamespaceAliases = []; - this.handwrittenSignatures = []; + function FieldDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7130,509 +43367,215 @@ } /** - * 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 + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - DotnetSettings.prototype.renamedServices = $util.emptyObject; + FieldDescriptorProto.prototype.name = ""; /** - * DotnetSettings renamedResources. - * @member {Object.} renamedResources - * @memberof google.api.DotnetSettings + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - DotnetSettings.prototype.renamedResources = $util.emptyObject; + FieldDescriptorProto.prototype.number = 0; /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; + FieldDescriptorProto.prototype.label = 1; /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + FieldDescriptorProto.prototype.type = 1; /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto * @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; - }; + FieldDescriptorProto.prototype.typeName = ""; /** - * Converts this DotnetSettings to JSON. - * @function toJSON - * @memberof google.api.DotnetSettings + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto * @instance - * @returns {Object.} JSON object */ - DotnetSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + FieldDescriptorProto.prototype.extendee = ""; /** - * 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; - })(); + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; - api.RubySettings = (function() { + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; /** - * Properties of a RubySettings. - * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance */ + FieldDescriptorProto.prototype.jsonName = ""; /** - * Constructs a new RubySettings. - * @memberof google.api - * @classdesc Represents a RubySettings. - * @implements IRubySettings - * @constructor - * @param {google.api.IRubySettings=} [properties] Properties to set + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance */ - 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]]; - } + FieldDescriptorProto.prototype.options = null; /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - RubySettings.prototype.common = null; + FieldDescriptorProto.prototype.proto3Optional = false; /** - * Creates a new RubySettings instance using the specified properties. + * Creates a new FieldDescriptorProto instance using the specified properties. * @function create - * @memberof google.api.RubySettings + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); }; /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.api.RubySettings + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RubySettings.encode = function encode(message, writer) { + FieldDescriptorProto.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.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 RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.RubySettings + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RubySettings message from the specified reader or buffer. + * Decodes a FieldDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.api.RubySettings + * @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.api.RubySettings} RubySettings + * @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 */ - RubySettings.decode = function decode(reader, length) { + 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.api.RubySettings(); + 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.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + 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: @@ -7644,127 +43587,394 @@ }; /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.RubySettings + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings + * @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 */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RubySettings message. + * Verifies a FieldDescriptorProto message. * @function verify - * @memberof google.api.RubySettings + * @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 */ - RubySettings.verify = function verify(message) { + FieldDescriptorProto.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 (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 "common." + error; + return "options." + error; } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; return null; }; /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.RubySettings + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) 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); + 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 RubySettings message. Also converts values to other types if specified. + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.RubySettings + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.api.RubySettings} message RubySettings + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RubySettings.toObject = function toObject(message, options) { + FieldDescriptorProto.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); + 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 RubySettings to JSON. + * Converts this FieldDescriptorProto to JSON. * @function toJSON - * @memberof google.api.RubySettings + * @memberof google.protobuf.FieldDescriptorProto * @instance * @returns {Object.} JSON object */ - RubySettings.prototype.toJSON = function toJSON() { + FieldDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RubySettings + * Gets the default type url for FieldDescriptorProto * @function getTypeUrl - * @memberof google.api.RubySettings + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.RubySettings"; + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; }; - return RubySettings; + /** + * 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; })(); - api.GoSettings = (function() { + protobuf.OneofDescriptorProto = (function() { /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * 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 GoSettings. - * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set */ - function GoSettings(properties) { + function OneofDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7772,75 +43982,89 @@ } /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings + * 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 */ - GoSettings.prototype.common = null; + OneofDescriptorProto.prototype.options = null; /** - * Creates a new GoSettings instance using the specified properties. + * Creates a new OneofDescriptorProto instance using the specified properties. * @function create - * @memberof google.api.GoSettings + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); }; /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.api.GoSettings + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GoSettings.encode = function encode(message, writer) { + OneofDescriptorProto.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.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 GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.GoSettings + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GoSettings message from the specified reader or buffer. + * Decodes an OneofDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.api.GoSettings + * @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.api.GoSettings} GoSettings + * @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 */ - GoSettings.decode = function decode(reader, length) { + 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.api.GoSettings(); + 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.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); break; } default: @@ -7852,130 +44076,143 @@ }; /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.GoSettings + * @memberof google.protobuf.OneofDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings + * @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 */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GoSettings message. + * Verifies an OneofDescriptorProto message. * @function verify - * @memberof google.api.GoSettings + * @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 */ - GoSettings.verify = function verify(message) { + OneofDescriptorProto.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 (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 "common." + error; + return "options." + error; } return null; }; /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.GoSettings + * @memberof google.protobuf.OneofDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto */ - GoSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.GoSettings) + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) 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); + 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 a GoSettings message. Also converts values to other types if specified. + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.GoSettings + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.api.GoSettings} message GoSettings + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GoSettings.toObject = function toObject(message, options) { + OneofDescriptorProto.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); + 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 GoSettings to JSON. + * Converts this OneofDescriptorProto to JSON. * @function toJSON - * @memberof google.api.GoSettings + * @memberof google.protobuf.OneofDescriptorProto * @instance * @returns {Object.} JSON object */ - GoSettings.prototype.toJSON = function toJSON() { + OneofDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GoSettings + * Gets the default type url for OneofDescriptorProto * @function getTypeUrl - * @memberof google.api.GoSettings + * @memberof google.protobuf.OneofDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.GoSettings"; + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; }; - return GoSettings; + return OneofDescriptorProto; })(); - api.MethodSettings = (function() { + protobuf.EnumDescriptorProto = (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 + * 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 MethodSettings. - * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set */ - function MethodSettings(properties) { - this.autoPopulatedFields = []; + 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) @@ -7983,106 +44220,140 @@ } /** - * MethodSettings selector. - * @member {string} selector - * @memberof google.api.MethodSettings + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - MethodSettings.prototype.selector = ""; + EnumDescriptorProto.prototype.name = ""; /** - * MethodSettings longRunning. - * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning - * @memberof google.api.MethodSettings + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - MethodSettings.prototype.longRunning = null; + EnumDescriptorProto.prototype.value = $util.emptyArray; /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + EnumDescriptorProto.prototype.options = null; /** - * Creates a new MethodSettings instance using the specified properties. + * 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.api.MethodSettings + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); }; /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.api.MethodSettings + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodSettings.encode = function encode(message, writer) { + EnumDescriptorProto.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]); + 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 MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MethodSettings + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodSettings message from the specified reader or buffer. + * Decodes an EnumDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.api.MethodSettings + * @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.api.MethodSettings} MethodSettings + * @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 */ - MethodSettings.decode = function decode(reader, length) { + 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.api.MethodSettings(); + 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.selector = reader.string(); + message.name = reader.string(); break; } case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); break; } case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); + 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: @@ -8094,275 +44365,296 @@ }; /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MethodSettings + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings + * @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 */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodSettings message. + * Verifies an EnumDescriptorProto message. * @function verify - * @memberof google.api.MethodSettings + * @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 */ - MethodSettings.verify = function verify(message) { + EnumDescriptorProto.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 (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 "longRunning." + error; + return "options." + 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"; + 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 a MethodSettings message from a plain object. Also converts values to their respective internal types. + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MethodSettings + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto */ - MethodSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings) + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) 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); + 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.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]); + 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 a MethodSettings message. Also converts values to other types if specified. + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MethodSettings + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.api.MethodSettings} message MethodSettings + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodSettings.toObject = function toObject(message, options) { + EnumDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } if (options.defaults) { - object.selector = ""; - object.longRunning = null; + object.name = ""; + object.options = 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]; + 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 MethodSettings to JSON. + * Converts this EnumDescriptorProto to JSON. * @function toJSON - * @memberof google.api.MethodSettings + * @memberof google.protobuf.EnumDescriptorProto * @instance * @returns {Object.} JSON object */ - MethodSettings.prototype.toJSON = function toJSON() { + EnumDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MethodSettings + * Gets the default type url for EnumDescriptorProto * @function getTypeUrl - * @memberof google.api.MethodSettings + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.MethodSettings"; + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; }; - 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]]; - } + EnumDescriptorProto.EnumReservedRange = (function() { /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end */ - LongRunning.prototype.initialPollDelay = null; /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set */ - LongRunning.prototype.pollDelayMultiplier = 0; + 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]]; + } /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @instance */ - LongRunning.prototype.maxPollDelay = null; + EnumReservedRange.prototype.start = 0; /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @instance */ - LongRunning.prototype.totalPollTimeout = null; + EnumReservedRange.prototype.end = 0; /** - * Creates a new LongRunning instance using the specified properties. + * Creates a new EnumReservedRange instance using the specified properties. * @function create - * @memberof google.api.MethodSettings.LongRunning + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); }; /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. * @function encode - * @memberof google.api.MethodSettings.LongRunning + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @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 */ - LongRunning.encode = function encode(message, writer) { + EnumReservedRange.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(); + 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 LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @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 */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LongRunning message from the specified reader or buffer. + * Decodes an EnumReservedRange message from the specified reader or buffer. * @function decode - * @memberof google.api.MethodSettings.LongRunning + * @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.api.MethodSettings.LongRunning} LongRunning + * @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 */ - LongRunning.decode = function decode(reader, length) { + 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.api.MethodSettings.LongRunning(); + 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.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.start = reader.int32(); 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()); + message.end = reader.int32(); break; } default: @@ -8374,269 +44666,392 @@ }; /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @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 */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LongRunning message. + * Verifies an EnumReservedRange message. * @function verify - * @memberof google.api.MethodSettings.LongRunning + * @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 */ - LongRunning.verify = function verify(message) { + EnumReservedRange.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; - } + 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 LongRunning message from a plain object. Also converts values to their respective internal types. + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MethodSettings.LongRunning + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange */ - LongRunning.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) 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); - } + 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 a LongRunning message. Also converts values to other types if specified. + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MethodSettings.LongRunning + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LongRunning.toObject = function toObject(message, options) { + EnumReservedRange.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; + object.start = 0; + object.end = 0; } - 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); + 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 LongRunning to JSON. + * Converts this EnumReservedRange to JSON. * @function toJSON - * @memberof google.api.MethodSettings.LongRunning + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @instance * @returns {Object.} JSON object */ - LongRunning.prototype.toJSON = function toJSON() { + EnumReservedRange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LongRunning + * Gets the default type url for EnumReservedRange * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; }; - return LongRunning; + return EnumReservedRange; })(); - return MethodSettings; + return EnumDescriptorProto; })(); - /** - * 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; - })(); + protobuf.EnumValueDescriptorProto = (function() { - /** - * 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; - })(); + /** + * 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 + */ - /** - * 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; - })(); + /** + * 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"; + }; - /** - * 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; + return EnumValueDescriptorProto; })(); - api.ResourceDescriptor = (function() { + protobuf.ServiceDescriptorProto = (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 + * 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 ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; + function ServiceDescriptorProto(properties) { + this.method = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8644,173 +45059,106 @@ } /** - * 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 + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto * @instance */ - ResourceDescriptor.prototype.plural = ""; + ServiceDescriptorProto.prototype.name = ""; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto * @instance */ - ResourceDescriptor.prototype.singular = ""; + ServiceDescriptorProto.prototype.method = $util.emptyArray; /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto * @instance */ - ResourceDescriptor.prototype.style = $util.emptyArray; + ServiceDescriptorProto.prototype.options = null; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new ServiceDescriptorProto instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + ServiceDescriptorProto.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(); - } + 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 ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @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.api.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.decode = function decode(reader, length) { + 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.api.ResourceDescriptor(); + 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.type = reader.string(); + message.name = reader.string(); break; } case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); 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()); + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); break; } default: @@ -8822,271 +45170,167 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a ServiceDescriptorProto message. * @function verify - * @memberof google.api.ResourceDescriptor + * @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 */ - ResourceDescriptor.verify = function verify(message) { + ServiceDescriptorProto.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.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.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; - } + } + 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) 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; + 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]); } - 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; - } + 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 ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + ServiceDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } + if (options.arrays || options.defaults) + object.method = []; 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]; + object.name = ""; + object.options = null; } - 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]; + 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 ResourceDescriptor to JSON. + * Converts this ServiceDescriptorProto to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.ServiceDescriptorProto * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + ServiceDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceDescriptor + * Gets the default type url for ServiceDescriptorProto * @function getTypeUrl - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; }; - /** - * 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; + return ServiceDescriptorProto; })(); - api.ResourceReference = (function() { + protobuf.MethodDescriptorProto = (function() { /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * 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 ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set */ - function ResourceReference(properties) { + function MethodDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9094,89 +45338,145 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * 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 */ - ResourceReference.prototype.type = ""; + MethodDescriptorProto.prototype.clientStreaming = false; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - ResourceReference.prototype.childType = ""; + MethodDescriptorProto.prototype.serverStreaming = false; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new MethodDescriptorProto instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + MethodDescriptorProto.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); + 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 ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a MethodDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @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.api.ResourceReference} ResourceReference + * @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 */ - ResourceReference.decode = function decode(reader, length) { + 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.api.ResourceReference(); + 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.type = reader.string(); + message.name = reader.string(); break; } case 2: { - message.childType = reader.string(); + 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: @@ -9188,144 +45488,191 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.protobuf.MethodDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @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 */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a MethodDescriptorProto message. * @function verify - * @memberof google.api.ResourceReference + * @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 */ - ResourceReference.verify = function verify(message) { + MethodDescriptorProto.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"; + 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.protobuf.MethodDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) 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); + 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 ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + MethodDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + 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 ResourceReference to JSON. + * Converts this MethodDescriptorProto to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.protobuf.MethodDescriptorProto * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + MethodDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceReference + * Gets the default type url for MethodDescriptorProto * @function getTypeUrl - * @memberof google.api.ResourceReference + * @memberof google.protobuf.MethodDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ResourceReference"; + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; }; - return ResourceReference; + return MethodDescriptorProto; })(); - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { + protobuf.FileOptions = (function() { /** - * Properties of a FileDescriptorSet. + * Properties of a FileOptions. * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file + * @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 FileDescriptorSet. + * Constructs a new FileOptions. * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet + * @classdesc Represents a FileOptions. + * @implements IFileOptions * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.IFileOptions=} [properties] Properties to set */ - function FileDescriptorSet(properties) { - this.file = []; + 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) @@ -9333,78 +45680,375 @@ } /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions * @instance */ - FileDescriptorSet.prototype.file = $util.emptyArray; + FileOptions.prototype.javaPackage = ""; /** - * Creates a new FileDescriptorSet instance using the specified properties. + * 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.FileDescriptorSet + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); + FileOptions.create = function create(properties) { + return new FileOptions(properties); }; /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encode = function encode(message, writer) { + FileOptions.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(); + 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 FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. + * Decodes a FileOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileDescriptorSet + * @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.FileDescriptorSet} FileDescriptorSet + * @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 */ - FileDescriptorSet.decode = function decode(reader, length) { + 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.FileDescriptorSet(); + 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: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + 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: @@ -9416,465 +46060,557 @@ }; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * Decodes a FileOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.FileOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @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 */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + FileOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileDescriptorSet message. + * Verifies a FileOptions message. * @function verify - * @memberof google.protobuf.FileDescriptorSet + * @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 */ - FileDescriptorSet.verify = function verify(message) { + FileOptions.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 (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 "file." + 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.FileOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.FileOptions} FileOptions */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) 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]); + 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 FileDescriptorSet message. Also converts values to other types if specified. + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {google.protobuf.FileOptions} message FileOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options) { + FileOptions.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); + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; } - 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"; + 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; } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + 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; }; - - 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 + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions * @instance + * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.name = ""; + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance + * 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 */ - FileDescriptorProto.prototype["package"] = ""; + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance + * 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 */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; + 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() { /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance + * 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 */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + 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]]; + } /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions * @instance */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; + MessageOptions.prototype.messageSetWireFormat = false; /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions * @instance */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; + MessageOptions.prototype.noStandardDescriptorAccessor = false; /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions * @instance */ - FileDescriptorProto.prototype.service = $util.emptyArray; + MessageOptions.prototype.deprecated = false; /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions * @instance */ - FileDescriptorProto.prototype.extension = $util.emptyArray; + MessageOptions.prototype.mapEntry = false; /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions * @instance */ - FileDescriptorProto.prototype.options = null; + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions * @instance */ - FileDescriptorProto.prototype.sourceCodeInfo = null; + MessageOptions.prototype.features = null; /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions * @instance */ - FileDescriptorProto.prototype.syntax = ""; + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions * @instance */ - FileDescriptorProto.prototype.edition = 0; + MessageOptions.prototype[".google.api.resource"] = null; /** - * Creates a new FileDescriptorProto instance using the specified properties. + * Creates a new MessageOptions instance using the specified properties. * @function create - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); }; /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encode = function encode(message, writer) { + MessageOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + if (message.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 FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. + * Decodes a MessageOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileDescriptorProto + * @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.FileDescriptorProto} FileDescriptorProto + * @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 */ - FileDescriptorProto.decode = function decode(reader, length) { + 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.FileDescriptorProto(); + 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.name = reader.string(); + message.messageSetWireFormat = reader.bool(); break; } case 2: { - message["package"] = reader.string(); + message.noStandardDescriptorAccessor = reader.bool(); 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())); + message.deprecated = reader.bool(); break; } case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + message.mapEntry = reader.bool(); break; } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); break; } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } - case 12: { - message.syntax = reader.string(); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } - case 14: { - message.edition = reader.int32(); + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); break; } default: @@ -9886,416 +46622,226 @@ }; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.MessageOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @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 */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + MessageOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileDescriptorProto message. + * Verifies a MessageOptions message. * @function verify - * @memberof google.protobuf.FileDescriptorProto + * @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 */ - FileDescriptorProto.verify = function verify(message) { + MessageOptions.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.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.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 (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 "extension." + error; + return "uninterpretedOption." + 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 (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); if (error) - return "sourceCodeInfo." + error; + return ".google.api.resource." + 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. + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.MessageOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.MessageOptions} MessageOptions */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) 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]); - } + 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.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.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.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; + 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 FileDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {google.protobuf.MessageOptions} message MessageOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorProto.toObject = function toObject(message, options) { + MessageOptions.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.arrays || options.defaults) + object.uninterpretedOption = []; 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]; + 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.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; + 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.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + if (message[".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 FileDescriptorProto to JSON. + * Converts this MessageOptions to JSON. * @function toJSON - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.MessageOptions * @instance * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.toJSON = function toJSON() { + MessageOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FileDescriptorProto + * Gets the default type url for MessageOptions * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.MessageOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.MessageOptions"; }; - return FileDescriptorProto; + return MessageOptions; })(); - protobuf.DescriptorProto = (function() { + protobuf.FieldOptions = (function() { /** - * Properties of a DescriptorProto. + * Properties of a FieldOptions. * @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 + * @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.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference */ /** - * Constructs a new DescriptorProto. + * Constructs a new FieldOptions. * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; + 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) @@ -10303,225 +46849,310 @@ } /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.name = ""; + FieldOptions.prototype.ctype = 0; /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.field = $util.emptyArray; + FieldOptions.prototype.packed = false; /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.extension = $util.emptyArray; + FieldOptions.prototype.jstype = 0; /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.nestedType = $util.emptyArray; + FieldOptions.prototype.lazy = false; /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.enumType = $util.emptyArray; + FieldOptions.prototype.unverifiedLazy = false; /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; + FieldOptions.prototype.deprecated = false; /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; + FieldOptions.prototype.weak = false; /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.options = null; + FieldOptions.prototype.debugRedact = false; /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; + FieldOptions.prototype.retention = 0; /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions * @instance */ - DescriptorProto.prototype.reservedName = $util.emptyArray; + FieldOptions.prototype.targets = $util.emptyArray; /** - * Creates a new DescriptorProto instance using the specified properties. + * 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.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = null; + + /** + * 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.DescriptorProto + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); }; /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encode = function encode(message, writer) { + FieldOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + if (message.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) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + 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(); + if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) + $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); return writer; }; /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DescriptorProto message from the specified reader or buffer. + * Decodes a FieldOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.DescriptorProto + * @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.DescriptorProto} DescriptorProto + * @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 */ - DescriptorProto.decode = function decode(reader, length) { + 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.DescriptorProto(); + 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.name = reader.string(); + message.ctype = reader.int32(); break; } case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + message.packed = reader.bool(); break; } case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); break; } case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + 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 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + 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 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.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())); + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.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())); + 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 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); + case 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); break; } default: @@ -10533,586 +47164,579 @@ }; /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @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 */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FieldOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DescriptorProto message. + * Verifies a FieldOptions message. * @function verify - * @memberof google.protobuf.DescriptorProto + * @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 */ - DescriptorProto.verify = function verify(message) { + FieldOptions.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.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; } - } - 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.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.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.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.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 (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 "enumType." + error; + return "editionDefaults." + 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.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + 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 (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 "oneofDecl." + error; + return "uninterpretedOption." + error; } } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + 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.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[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { + var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); + if (error) + return ".google.api.fieldInfo." + error; } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; + if (message[".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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FieldOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.FieldOptions} FieldOptions */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) 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]); + 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.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.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.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.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.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.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.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.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.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.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.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[".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.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[".google.api.fieldInfo"] != null) { + if (typeof object[".google.api.fieldInfo"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); } - 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]); + 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 DescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {google.protobuf.FieldOptions} message FieldOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options) { + FieldOptions.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 = []; + object.targets = []; + object.editionDefaults = []; + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; } 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); + 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; + object[".google.api.fieldInfo"] = null; } - 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.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.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.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.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.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.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; + 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); + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) + object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); return object; }; /** - * Converts this DescriptorProto to JSON. + * Converts this FieldOptions to JSON. * @function toJSON - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FieldOptions * @instance * @returns {Object.} JSON object */ - DescriptorProto.prototype.toJSON = function toJSON() { + FieldOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DescriptorProto + * Gets the default type url for FieldOptions * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.FieldOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + return typeUrlPrefix + "/google.protobuf.FieldOptions"; }; - 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; - }; + /** + * 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; + })(); - /** - * 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); - }; + /** + * 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; + })(); - /** - * 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"; - }; + /** + * 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; + })(); - return ExtensionRange; + /** + * 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; })(); - DescriptorProto.ReservedRange = (function() { + FieldOptions.EditionDefault = (function() { /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end + * 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 ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set */ - function ReservedRange(properties) { + function EditionDefault(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11120,89 +47744,89 @@ } /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault * @instance */ - ReservedRange.prototype.start = 0; + EditionDefault.prototype.edition = 0; /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault * @instance */ - ReservedRange.prototype.end = 0; + EditionDefault.prototype.value = ""; /** - * Creates a new ReservedRange instance using the specified properties. + * Creates a new EditionDefault instance using the specified properties. * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.FieldOptions.EditionDefault * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); }; /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.FieldOptions.EditionDefault * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @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 */ - ReservedRange.encode = function encode(message, writer) { + EditionDefault.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.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 ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.FieldOptions.EditionDefault * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @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 */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReservedRange message from the specified reader or buffer. + * Decodes an EditionDefault message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @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.DescriptorProto.ReservedRange} ReservedRange + * @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 */ - ReservedRange.decode = function decode(reader, length) { + 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.DescriptorProto.ReservedRange(); + 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 1: { - message.start = reader.int32(); + case 3: { + message.edition = reader.int32(); break; } case 2: { - message.end = reader.int32(); + message.value = reader.string(); break; } default: @@ -11214,139 +47838,200 @@ }; /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.FieldOptions.EditionDefault * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @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 */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { + EditionDefault.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReservedRange message. + * Verifies an EditionDefault message. * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @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 */ - ReservedRange.verify = function verify(message) { + EditionDefault.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.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 a ReservedRange message from a plain object. Also converts values to their respective internal types. + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.FieldOptions.EditionDefault * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) 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; + 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 a ReservedRange message. Also converts values to other types if specified. + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.FieldOptions.EditionDefault * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReservedRange.toObject = function toObject(message, options) { + EditionDefault.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.start = 0; - object.end = 0; + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; + 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 ReservedRange to JSON. + * Converts this EditionDefault to JSON. * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.FieldOptions.EditionDefault * @instance * @returns {Object.} JSON object */ - ReservedRange.prototype.toJSON = function toJSON() { + EditionDefault.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ReservedRange + * Gets the default type url for EditionDefault * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange + * @memberof google.protobuf.FieldOptions.EditionDefault * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; }; - return ReservedRange; + return EditionDefault; })(); - return DescriptorProto; + return FieldOptions; })(); - protobuf.ExtensionRangeOptions = (function() { + protobuf.OneofOptions = (function() { /** - * Properties of an ExtensionRangeOptions. + * Properties of an OneofOptions. * @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 + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption */ /** - * Constructs a new ExtensionRangeOptions. + * Constructs a new OneofOptions. * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set */ - function ExtensionRangeOptions(properties) { + function OneofOptions(properties) { this.uninterpretedOption = []; - this.declaration = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11354,68 +48039,333 @@ } /** - * ExtensionRangeOptions uninterpretedOption. + * 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.ExtensionRangeOptions + * @memberof google.protobuf.OneofOptions * @instance */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions + * 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 */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * ExtensionRangeOptions features. + * 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.ExtensionRangeOptions + * @memberof google.protobuf.EnumOptions * @instance */ - ExtensionRangeOptions.prototype.features = null; + EnumOptions.prototype.features = null; /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions * @instance */ - ExtensionRangeOptions.prototype.verification = 1; + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new ExtensionRangeOptions instance using the specified properties. + * Creates a new EnumOptions instance using the specified properties. * @function create - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); }; /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {google.protobuf.IEnumOptions} message EnumOptions 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); + 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 50, wireType 2 =*/402).fork()).ldelim(); + $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(); @@ -11423,54 +48373,56 @@ }; /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * Decodes an EnumOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ExtensionRangeOptions + * @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.ExtensionRangeOptions} ExtensionRangeOptions + * @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 */ - ExtensionRangeOptions.decode = function decode(reader, length) { + 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.ExtensionRangeOptions(); + 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 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 2: { + message.allowAlias = reader.bool(); break; } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + case 3: { + message.deprecated = reader.bool(); break; } - case 50: { + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } - case 3: { - message.verification = reader.int32(); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } default: @@ -11482,32 +48434,46 @@ }; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @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 */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + EnumOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExtensionRangeOptions message. + * Verifies an EnumOptions message. * @function verify - * @memberof google.protobuf.ExtensionRangeOptions + * @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 */ - ExtensionRangeOptions.verify = function verify(message) { + 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"; @@ -11517,115 +48483,72 @@ 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. + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.EnumOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @returns {google.protobuf.EnumOptions} EnumOptions */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); + 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.ExtensionRangeOptions.uninterpretedOption: array expected"); + 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.ExtensionRangeOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.EnumOptions.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. + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {google.protobuf.EnumOptions} message EnumOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ExtensionRangeOptions.toObject = function toObject(message, options) { + EnumOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; + if (options.arrays || options.defaults) object.uninterpretedOption = []; - } if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; 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.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) { @@ -11637,372 +48560,56 @@ }; /** - * Converts this ExtensionRangeOptions to JSON. + * Converts this EnumOptions to JSON. * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.protobuf.EnumOptions * @instance * @returns {Object.} JSON object */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { + EnumOptions.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 + * 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 */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; - return ExtensionRangeOptions; + return EnumOptions; })(); - protobuf.FieldDescriptorProto = (function() { + protobuf.EnumValueOptions = (function() { /** - * Properties of a FieldDescriptorProto. + * Properties of an EnumValueOptions. * @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 + * @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 FieldDescriptorProto. + * Constructs a new EnumValueOptions. * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set */ - function FieldDescriptorProto(properties) { + function EnumValueOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12010,215 +48617,435 @@ } /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions * @instance */ - FieldDescriptorProto.prototype.name = ""; + EnumValueOptions.prototype.deprecated = false; /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions * @instance */ - FieldDescriptorProto.prototype.number = 0; + EnumValueOptions.prototype.features = null; /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions * @instance */ - FieldDescriptorProto.prototype.label = 1; + EnumValueOptions.prototype.debugRedact = false; /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions * @instance */ - FieldDescriptorProto.prototype.type = 1; + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * 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 */ - FieldDescriptorProto.prototype.typeName = ""; + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto + * 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 */ - FieldDescriptorProto.prototype.extendee = ""; + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto + * 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 + */ + + /** + * 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 */ - FieldDescriptorProto.prototype.defaultValue = ""; + ServiceOptions.prototype.features = null; /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions * @instance */ - FieldDescriptorProto.prototype.oneofIndex = 0; + ServiceOptions.prototype.deprecated = false; /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions * @instance */ - FieldDescriptorProto.prototype.jsonName = ""; + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions * @instance */ - FieldDescriptorProto.prototype.options = null; + ServiceOptions.prototype[".google.api.defaultHost"] = ""; /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions * @instance */ - FieldDescriptorProto.prototype.proto3Optional = false; + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; /** - * Creates a new FieldDescriptorProto instance using the specified properties. + * Creates a new ServiceOptions instance using the specified properties. * @function create - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); }; /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encode = function encode(message, writer) { + ServiceOptions.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); + 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"]); return writer; }; /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * Decodes a ServiceOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldDescriptorProto + * @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.FieldDescriptorProto} FieldDescriptorProto + * @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 */ - FieldDescriptorProto.decode = function decode(reader, length) { + 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.FieldDescriptorProto(); + 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 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(); + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } - case 9: { - message.oneofIndex = reader.int32(); + case 33: { + message.deprecated = reader.bool(); break; } - case 10: { - message.jsonName = reader.string(); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + case 1049: { + message[".google.api.defaultHost"] = reader.string(); break; } - case 17: { - message.proto3Optional = reader.bool(); + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); break; } default: @@ -12230,394 +49057,186 @@ }; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @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 */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldDescriptorProto message. + * Verifies a ServiceOptions message. * @function verify - * @memberof google.protobuf.FieldDescriptorProto + * @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 */ - FieldDescriptorProto.verify = function verify(message) { + ServiceOptions.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 (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); if (error) - return "options." + error; + return "features." + error; } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; + 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"; return null; }; /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) 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; + 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); } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; + 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]); } - 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); + 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"]); return message; }; /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {google.protobuf.ServiceOptions} message ServiceOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldDescriptorProto.toObject = function toObject(message, options) { + ServiceOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; 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; + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; } - 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; + 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"]; return object; }; /** - * Converts this FieldDescriptorProto to JSON. + * Converts this ServiceOptions to JSON. * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.ServiceOptions * @instance * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { + ServiceOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FieldDescriptorProto + * Gets the default type url for ServiceOptions * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.ServiceOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; }; - /** - * 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; + return ServiceOptions; })(); - protobuf.OneofDescriptorProto = (function() { + protobuf.MethodOptions = (function() { /** - * Properties of an OneofDescriptorProto. + * Properties of a MethodOptions. * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + * @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 OneofDescriptorProto. + * Constructs a new MethodOptions. * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set */ - function OneofDescriptorProto(properties) { + 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) @@ -12625,89 +49244,165 @@ } /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions * @instance */ - OneofDescriptorProto.prototype.name = ""; + MethodOptions.prototype.deprecated = false; /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions * @instance */ - OneofDescriptorProto.prototype.options = null; + MethodOptions.prototype.idempotencyLevel = 0; /** - * Creates a new OneofDescriptorProto instance using the specified properties. + * 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.OneofDescriptorProto + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); }; /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofDescriptorProto.encode = function encode(message, writer) { + MethodOptions.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(); + 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 OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * Decodes a MethodOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.OneofDescriptorProto + * @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.OneofDescriptorProto} OneofDescriptorProto + * @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 */ - OneofDescriptorProto.decode = function decode(reader, length) { + 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.OneofDescriptorProto(); + 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 1: { - message.name = reader.string(); + case 33: { + message.deprecated = reader.bool(); break; } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + 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: @@ -12719,143 +49414,264 @@ }; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @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 */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + MethodOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OneofDescriptorProto message. + * Verifies a MethodOptions message. * @function verify - * @memberof google.protobuf.OneofDescriptorProto + * @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 */ - OneofDescriptorProto.verify = function verify(message) { + MethodOptions.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 (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 "options." + 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 an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @returns {google.protobuf.MethodOptions} MethodOptions */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) 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); + 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 an OneofDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {google.protobuf.MethodOptions} message MethodOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofDescriptorProto.toObject = function toObject(message, options) { + 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.name = ""; - object.options = null; + 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.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); + 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 OneofDescriptorProto to JSON. + * Converts this MethodOptions to JSON. * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.MethodOptions * @instance * @returns {Object.} JSON object */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { + MethodOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OneofDescriptorProto + * Gets the default type url for MethodOptions * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.MethodOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.MethodOptions"; }; - return OneofDescriptorProto; + /** + * 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.EnumDescriptorProto = (function() { + protobuf.UninterpretedOption = (function() { /** - * Properties of an EnumDescriptorProto. + * Properties of an UninterpretedOption. * @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 + * @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 EnumDescriptorProto. + * Constructs a new UninterpretedOption. * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; + function UninterpretedOption(properties) { + this.name = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12863,140 +49679,162 @@ } /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption * @instance */ - EnumDescriptorProto.prototype.name = ""; + UninterpretedOption.prototype.name = $util.emptyArray; /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - EnumDescriptorProto.prototype.value = $util.emptyArray; + UninterpretedOption.prototype.identifierValue = ""; /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - EnumDescriptorProto.prototype.options = null; + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + UninterpretedOption.prototype.doubleValue = 0; /** - * Creates a new EnumDescriptorProto instance using the specified properties. + * 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.EnumDescriptorProto + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); }; /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encode = function encode(message, writer) { + UninterpretedOption.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + if (message.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 EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * Decodes an UninterpretedOption message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumDescriptorProto + * @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.EnumDescriptorProto} EnumDescriptorProto + * @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 */ - EnumDescriptorProto.decode = function decode(reader, length) { + 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.EnumDescriptorProto(); + 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 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())); + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); break; } case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + message.identifierValue = reader.string(); break; } case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + message.positiveIntValue = reader.uint64(); break; } case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); + 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: @@ -13008,206 +49846,224 @@ }; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @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 */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumDescriptorProto message. + * Verifies an UninterpretedOption message. * @function verify - * @memberof google.protobuf.EnumDescriptorProto + * @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 */ - EnumDescriptorProto.verify = function verify(message) { + UninterpretedOption.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 (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 "reservedRange." + error; + return "name." + error; } } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } + if (message.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 EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) 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]); + 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.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]); - } + 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 EnumDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumDescriptorProto.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } + if (options.arrays || options.defaults) + object.name = []; 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); + 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.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; + 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 EnumDescriptorProto to JSON. + * Converts this UninterpretedOption to JSON. * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.UninterpretedOption * @instance * @returns {Object.} JSON object */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { + UninterpretedOption.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumDescriptorProto + * Gets the default type url for UninterpretedOption * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.UninterpretedOption * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; }; - EnumDescriptorProto.EnumReservedRange = (function() { + UninterpretedOption.NamePart = (function() { /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension */ /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set */ - function EnumReservedRange(properties) { + function NamePart(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13215,89 +50071,87 @@ } /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart * @instance */ - EnumReservedRange.prototype.start = 0; + NamePart.prototype.namePart = ""; /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart * @instance */ - EnumReservedRange.prototype.end = 0; + NamePart.prototype.isExtension = false; /** - * Creates a new EnumReservedRange instance using the specified properties. + * Creates a new NamePart instance using the specified properties. * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); + NamePart.create = function create(properties) { + return new NamePart(properties); }; /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @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 */ - EnumReservedRange.encode = function encode(message, writer) { + NamePart.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); + 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 EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.protobuf.UninterpretedOption.NamePart * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @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 */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + NamePart.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumReservedRange message from the specified reader or buffer. + * Decodes a NamePart message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @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.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @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 */ - EnumReservedRange.decode = function decode(reader, length) { + 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.EnumDescriptorProto.EnumReservedRange(); + 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.start = reader.int32(); + message.namePart = reader.string(); break; } case 2: { - message.end = reader.int32(); + message.isExtension = reader.bool(); break; } default: @@ -13305,396 +50159,145 @@ 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 an EnumReservedRange message from the specified reader or buffer, length delimited. + * Decodes a NamePart message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.protobuf.UninterpretedOption.NamePart * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @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 - */ - 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()); - }; + * @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 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; - }; + /** + * 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 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) + /** + * 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; - 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 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); + }; - /** - * 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 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"; + }; - /** - * 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 NamePart; + })(); - return EnumValueDescriptorProto; + return UninterpretedOption; })(); - protobuf.ServiceDescriptorProto = (function() { + protobuf.FeatureSet = (function() { /** - * Properties of a ServiceDescriptorProto. + * Properties of a FeatureSet. * @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 + * @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 ServiceDescriptorProto. + * Constructs a new FeatureSet. * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set */ - function ServiceDescriptorProto(properties) { - this.method = []; + function FeatureSet(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13702,106 +50305,145 @@ } /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet * @instance */ - ServiceDescriptorProto.prototype.name = ""; + FeatureSet.prototype.fieldPresence = 0; /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet * @instance */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; + FeatureSet.prototype.enumType = 0; /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet * @instance */ - ServiceDescriptorProto.prototype.options = null; + FeatureSet.prototype.repeatedFieldEncoding = 0; /** - * Creates a new ServiceDescriptorProto instance using the specified properties. + * 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.ServiceDescriptorProto + * @memberof google.protobuf.FeatureSet * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); }; /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. * @function encode - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FeatureSet * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encode = function encode(message, writer) { + FeatureSet.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(); + 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 ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FeatureSet * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * Decodes a FeatureSet message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ServiceDescriptorProto + * @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.ServiceDescriptorProto} ServiceDescriptorProto + * @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 */ - ServiceDescriptorProto.decode = function decode(reader, length) { + 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.ServiceDescriptorProto(); + 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.name = reader.string(); + message.fieldPresence = reader.int32(); break; } case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + message.enumType = reader.int32(); break; } case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + 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: @@ -13813,313 +50455,520 @@ }; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FeatureSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @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 */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FeatureSet.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceDescriptorProto message. + * Verifies a FeatureSet message. * @function verify - * @memberof google.protobuf.ServiceDescriptorProto + * @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 */ - ServiceDescriptorProto.verify = function verify(message) { + FeatureSet.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.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; } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; + 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; } - 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]); + 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; } - 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); + 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 ServiceDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FeatureSet * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {google.protobuf.FeatureSet} message FeatureSet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceDescriptorProto.toObject = function toObject(message, options) { + FeatureSet.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); + 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.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + 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 ServiceDescriptorProto to JSON. + * Converts this FeatureSet to JSON. * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FeatureSet * @instance * @returns {Object.} JSON object */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { + FeatureSet.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ServiceDescriptorProto + * Gets the default type url for FeatureSet * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FeatureSet * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.FeatureSet"; }; - return ServiceDescriptorProto; - })(); + /** + * 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; + })(); - protobuf.MethodDescriptorProto = (function() { + /** + * 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; + })(); /** - * 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 + * 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; + })(); /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * 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 */ - 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]]; - } + 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; + })(); /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance + * 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 */ - MethodDescriptorProto.prototype.name = ""; + 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; + })(); /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance + * 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 */ - MethodDescriptorProto.prototype.inputType = ""; + 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() { /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance + * 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 */ - MethodDescriptorProto.prototype.outputType = ""; /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto + * 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 */ - MethodDescriptorProto.prototype.options = null; + FeatureSetDefaults.prototype.defaults = $util.emptyArray; /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults * @instance */ - MethodDescriptorProto.prototype.clientStreaming = false; + FeatureSetDefaults.prototype.minimumEdition = 0; /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults * @instance */ - MethodDescriptorProto.prototype.serverStreaming = false; + FeatureSetDefaults.prototype.maximumEdition = 0; /** - * Creates a new MethodDescriptorProto instance using the specified properties. + * Creates a new FeatureSetDefaults instance using the specified properties. * @function create - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); }; /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. * @function encode - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encode = function encode(message, writer) { + FeatureSetDefaults.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); + 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 MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * Decodes a FeatureSetDefaults message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MethodDescriptorProto + * @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.MethodDescriptorProto} MethodDescriptorProto + * @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 */ - MethodDescriptorProto.decode = function decode(reader, length) { + 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.MethodDescriptorProto(); + 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: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); break; } case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + message.minimumEdition = reader.int32(); break; } case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); + message.maximumEdition = reader.int32(); break; } default: @@ -14131,567 +50980,661 @@ }; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FeatureSetDefaults * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @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 */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodDescriptorProto message. + * Verifies a FeatureSetDefaults message. * @function verify - * @memberof google.protobuf.MethodDescriptorProto + * @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 */ - MethodDescriptorProto.verify = function verify(message) { + FeatureSetDefaults.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.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.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"; + 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FeatureSetDefaults * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) 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); + 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; } - 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. + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodDescriptorProto.toObject = function toObject(message, options) { + FeatureSetDefaults.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - 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; + 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 MethodDescriptorProto to JSON. + * Converts this FeatureSetDefaults to JSON. * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FeatureSetDefaults * @instance * @returns {Object.} JSON object */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { + FeatureSetDefaults.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MethodDescriptorProto + * Gets the default type url for FeatureSetDefaults * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FeatureSetDefaults * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; }; - 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; + FeatureSetDefaults.FeatureSetEditionDefault = (function() { - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; + /** + * 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 + */ - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; + /** + * 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]]; + } - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; + /** + * FeatureSetEditionDefault features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.features = null; - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; + /** + * 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); + }; - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; + /** + * 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; + }; - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; + /** + * 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(); + }; - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; + /** + * 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; + }; - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; + /** + * 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()); + }; - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; + /** + * 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; + }; - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; + /** + * 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; + }; - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; + /** + * 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; + }; - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; + /** + * 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); + }; - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; + /** + * 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"; + }; - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; + return FeatureSetEditionDefault; + })(); - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location */ - FileOptions.prototype.features = null; /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; + 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]]; + } /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo * @instance */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + SourceCodeInfo.prototype.location = $util.emptyArray; /** - * Creates a new FileOptions instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @function create - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); }; /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encode = function encode(message, writer) { + SourceCodeInfo.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(); + 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 FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileOptions message from the specified reader or buffer. + * Decodes a SourceCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileOptions + * @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.FileOptions} FileOptions + * @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 */ - FileOptions.decode = function decode(reader, length) { + 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.FileOptions(); + 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: { - 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())); + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); break; } default: @@ -14703,787 +51646,1087 @@ }; /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions + * @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 */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileOptions message. + * Verifies a SourceCodeInfo message. * @function verify - * @memberof google.protobuf.FileOptions + * @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 */ - FileOptions.verify = function verify(message) { + SourceCodeInfo.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 (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 ".google.api.resourceDefinition." + error; + return "location." + error; } } return null; }; /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) 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]); + 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 FileOptions message. Also converts values to other types if specified. + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.FileOptions} message FileOptions + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileOptions.toObject = function toObject(message, options) { + SourceCodeInfo.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); + 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 FileOptions to JSON. + * Converts this SourceCodeInfo to JSON. * @function toJSON - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.SourceCodeInfo * @instance * @returns {Object.} JSON object */ - FileOptions.prototype.toJSON = function toJSON() { + SourceCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FileOptions + * Gets the default type url for SourceCodeInfo * @function getTypeUrl - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.SourceCodeInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FileOptions"; + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; }; - /** - * 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; - })(); + SourceCodeInfo.Location = (function() { - return FileOptions; - })(); + /** + * 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 + */ - protobuf.MessageOptions = (function() { + /** + * 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]]; + } - /** - * 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 - */ + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; - /** - * 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]]; - } + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; + /** + * 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"; + }; - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; + return Location; + })(); - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation */ - MessageOptions.prototype.features = null; /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + 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]]; + } /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo * @instance */ - MessageOptions.prototype[".google.api.resource"] = null; + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; /** - * Creates a new MessageOptions instance using the specified properties. + * Creates a new GeneratedCodeInfo instance using the specified properties. * @function create - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); }; /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encode = function encode(message, writer) { + GeneratedCodeInfo.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(); + 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 MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MessageOptions message from the specified reader or buffer. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MessageOptions + * @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.MessageOptions} MessageOptions + * @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 */ - MessageOptions.decode = function decode(reader, length) { + 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.MessageOptions(); + 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: { - 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(); + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); break; } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + 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; } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + } + 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; } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + 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; } - default: - reader.skipType(tag & 7); + 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; - }; - - /** - * 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()); - }; + return message; + }; - /** - * 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; + /** + * 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[".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 (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; } - } - 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; - }; + 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; + }; - /** - * 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 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); + }; - /** - * 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 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"; + }; - /** - * 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"; - }; + /** + * 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 MessageOptions; + return Annotation; + })(); + + return GeneratedCodeInfo; })(); - protobuf.FieldOptions = (function() { + protobuf.Duration = (function() { /** - * Properties of a FieldOptions. + * Properties of a Duration. * @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 + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos */ /** - * Constructs a new FieldOptions. + * Constructs a new Duration. * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions + * @classdesc Represents a Duration. + * @implements IDuration * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @param {google.protobuf.IDuration=} [properties] Properties to set */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; + function Duration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15491,296 +52734,89 @@ } /** - * 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 + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration * @instance */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration * @instance */ - FieldOptions.prototype[".google.api.resourceReference"] = null; + Duration.prototype.nanos = 0; /** - * Creates a new FieldOptions instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @function create - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); + Duration.create = function create(properties) { + return new Duration(properties); }; /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encode = function encode(message, writer) { + Duration.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) { - writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.int32(message[".google.api.fieldBehavior"][i]); - writer.ldelim(); - } - 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(); + 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 FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + Duration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldOptions message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldOptions + * @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.FieldOptions} FieldOptions + * @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 */ - FieldOptions.decode = function decode(reader, length) { + 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.FieldOptions(); + 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.ctype = reader.int32(); + message.seconds = reader.int64(); 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()); + message.nanos = reader.int32(); break; } default: @@ -15792,861 +52828,387 @@ }; /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions + * @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 */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { + Duration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldOptions message. + * Verifies a Duration message. * @function verify - * @memberof google.protobuf.FieldOptions + * @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 */ - FieldOptions.verify = function verify(message) { + Duration.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; - } + 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.Duration * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.Duration} Duration */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) 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"]); - } + 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 FieldOptions message. Also converts values to other types if specified. + * Creates a plain object from a Duration message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {google.protobuf.Duration} message Duration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldOptions.toObject = function toObject(message, options) { + Duration.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 ($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[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + 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 FieldOptions to JSON. + * Converts this Duration to JSON. * @function toJSON - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.Duration * @instance * @returns {Object.} JSON object */ - FieldOptions.prototype.toJSON = function toJSON() { + Duration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FieldOptions + * Gets the default type url for Duration * @function getTypeUrl - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.Duration * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; + return typeUrlPrefix + "/google.protobuf.Duration"; }; + return Duration; + })(); + + protobuf.Timestamp = (function() { + /** - * 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 + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos */ - 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 + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ - 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; - })(); + 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]]; + } /** - * 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 + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance */ - 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; - })(); + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * 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 + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance */ - 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 = ""; + Timestamp.prototype.nanos = 0; - /** - * 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); - }; + /** + * 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 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 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 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(); - }; + /** + * 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 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); + /** + * 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; } - } - 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: + case 2: { + message.nanos = reader.int32(); 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; + reader.skipType(tag & 7); break; } - if (object.value != null) - message.value = String(object.value); - return message; - }; + } + 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; + /** + * 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; + }; - /** - * 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); - }; + /** + * 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; + }; - /** - * 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"; - }; + /** + * 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); + }; - return EditionDefault; - })(); + /** + * 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 FieldOptions; + return Timestamp; })(); - protobuf.OneofOptions = (function() { + protobuf.Any = (function() { /** - * Properties of an OneofOptions. + * Properties of an Any. * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value */ /** - * Constructs a new OneofOptions. + * Constructs a new Any. * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions + * @classdesc Represents an Any. + * @implements IAny * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @param {google.protobuf.IAny=} [properties] Properties to set */ - function OneofOptions(properties) { - this.uninterpretedOption = []; + function Any(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16654,92 +53216,89 @@ } /** - * OneofOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.OneofOptions + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any * @instance */ - OneofOptions.prototype.features = null; + Any.prototype.type_url = ""; /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any * @instance */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + Any.prototype.value = $util.newBuffer([]); /** - * Creates a new OneofOptions instance using the specified properties. + * Creates a new Any instance using the specified properties. * @function create - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); + Any.create = function create(properties) { + return new Any(properties); }; /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encode - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofOptions.encode = function encode(message, writer) { + Any.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(); + 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 OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + Any.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OneofOptions message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.OneofOptions + * @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.OneofOptions} OneofOptions + * @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 */ - OneofOptions.decode = function decode(reader, length) { + 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.OneofOptions(); + 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.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + message.type_url = reader.string(); break; } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case 2: { + message.value = reader.bytes(); break; } default: @@ -16751,158 +53310,141 @@ }; /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions + * @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 */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { + Any.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OneofOptions message. + * Verifies an Any message. * @function verify - * @memberof google.protobuf.OneofOptions + * @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 */ - OneofOptions.verify = function verify(message) { + Any.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; - } - } + 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions + * @returns {google.protobuf.Any} Any */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) 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]); - } - } + 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 OneofOptions message. Also converts values to other types if specified. + * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofOptions.toObject = function toObject(message, options) { + Any.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); + 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 OneofOptions to JSON. + * Converts this Any to JSON. * @function toJSON - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.Any * @instance * @returns {Object.} JSON object */ - OneofOptions.prototype.toJSON = function toJSON() { + Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OneofOptions + * Gets the default type url for Any * @function getTypeUrl - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.Any * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; + return typeUrlPrefix + "/google.protobuf.Any"; }; - return OneofOptions; + return Any; })(); - protobuf.EnumOptions = (function() { + protobuf.FieldMask = (function() { /** - * Properties of an EnumOptions. + * Properties of a FieldMask. * @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 + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths */ /** - * Constructs a new EnumOptions. + * Constructs a new FieldMask. * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions + * @classdesc Represents a FieldMask. + * @implements IFieldMask * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.IFieldMask=} [properties] Properties to set */ - function EnumOptions(properties) { - this.uninterpretedOption = []; + function FieldMask(properties) { + this.paths = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16910,134 +53452,78 @@ } /** - * 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 + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask * @instance */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + FieldMask.prototype.paths = $util.emptyArray; /** - * Creates a new EnumOptions instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @function create - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); + FieldMask.create = function create(properties) { + return new FieldMask(properties); }; /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encode = function encode(message, writer) { + FieldMask.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(); + 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 EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumOptions message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumOptions + * @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.EnumOptions} EnumOptions + * @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 */ - EnumOptions.decode = function decode(reader, length) { + 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.EnumOptions(); + 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 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())); + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); break; } default: @@ -17049,305 +53535,197 @@ }; /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions + * @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 */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { + FieldMask.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumOptions message. + * Verifies a FieldMask message. * @function verify - * @memberof google.protobuf.EnumOptions + * @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 */ - EnumOptions.verify = function verify(message) { + FieldMask.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; - } + 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 an EnumOptions message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldMask * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.FieldMask} FieldMask */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) 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]); - } + 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 an EnumOptions message. Also converts values to other types if specified. + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {google.protobuf.FieldMask} message FieldMask * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumOptions.toObject = function toObject(message, options) { + FieldMask.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); + 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 EnumOptions to JSON. + * Converts this FieldMask to JSON. * @function toJSON - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldMask * @instance * @returns {Object.} JSON object */ - EnumOptions.prototype.toJSON = function toJSON() { + FieldMask.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumOptions + * Gets the default type url for FieldMask * @function getTypeUrl - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldMask * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; + return typeUrlPrefix + "/google.protobuf.FieldMask"; }; - return EnumOptions; + return FieldMask; })(); - protobuf.EnumValueOptions = (function() { + protobuf.Empty = (function() { /** - * Properties of an EnumValueOptions. + * Properties of an Empty. * @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 + * @interface IEmpty */ /** - * Constructs a new EnumValueOptions. + * Constructs a new Empty. * @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 + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + 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 EnumValueOptions instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @function create - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); + Empty.create = function create(properties) { + return new Empty(properties); }; /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer) { + Empty.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. + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + Empty.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer. + * Decodes an Empty message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumValueOptions + * @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.EnumValueOptions} EnumValueOptions + * @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 */ - EnumValueOptions.decode = function decode(reader, length) { + 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.EnumValueOptions(); + 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) { - 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; @@ -17357,175 +53735,109 @@ }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Empty * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @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 */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + Empty.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumValueOptions message. + * Verifies an Empty message. * @function verify - * @memberof google.protobuf.EnumValueOptions + * @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 */ - EnumValueOptions.verify = function verify(message) { + Empty.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. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Empty * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.Empty} Empty */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) 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; + return new $root.google.protobuf.Empty(); }; /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * Creates a plain object from an Empty message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {google.protobuf.Empty} message Empty * @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; + Empty.toObject = function toObject() { + return {}; }; /** - * Converts this EnumValueOptions to JSON. + * Converts this Empty to JSON. * @function toJSON - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Empty * @instance * @returns {Object.} JSON object */ - EnumValueOptions.prototype.toJSON = function toJSON() { + Empty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumValueOptions + * Gets the default type url for Empty * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.Empty * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + return typeUrlPrefix + "/google.protobuf.Empty"; }; - return EnumValueOptions; + return Empty; })(); - protobuf.ServiceOptions = (function() { + protobuf.DoubleValue = (function() { /** - * Properties of a ServiceOptions. + * Properties of a DoubleValue. * @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 + * @interface IDoubleValue + * @property {number|null} [value] DoubleValue value */ /** - * Constructs a new ServiceOptions. + * Constructs a new DoubleValue. * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions + * @classdesc Represents a DoubleValue. + * @implements IDoubleValue * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; + function DoubleValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17533,134 +53845,75 @@ } /** - * 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 + * DoubleValue value. + * @member {number} value + * @memberof google.protobuf.DoubleValue * @instance */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + DoubleValue.prototype.value = 0; /** - * Creates a new ServiceOptions instance using the specified properties. + * Creates a new DoubleValue instance using the specified properties. * @function create - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.DoubleValue * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * @returns {google.protobuf.DoubleValue} DoubleValue instance */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); + DoubleValue.create = function create(properties) { + return new DoubleValue(properties); }; /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.DoubleValue * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer) { + DoubleValue.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.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); return writer; }; /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.DoubleValue * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceOptions message from the specified reader or buffer. + * Decodes a DoubleValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.DoubleValue * @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 + * @returns {google.protobuf.DoubleValue} DoubleValue * @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) { + DoubleValue.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DoubleValue(); 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(); + case 1: { + message.value = reader.double(); break; } default: @@ -17672,352 +53925,198 @@ }; /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.DoubleValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.DoubleValue} DoubleValue * @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) { + DoubleValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceOptions message. + * Verifies a DoubleValue message. * @function verify - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.DoubleValue * @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) { + DoubleValue.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.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; return null; }; /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.DoubleValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.DoubleValue} DoubleValue */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) + DoubleValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DoubleValue) 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"]); + var message = new $root.google.protobuf.DoubleValue(); + if (object.value != null) + message.value = Number(object.value); return message; }; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.DoubleValue * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {google.protobuf.DoubleValue} message DoubleValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + DoubleValue.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"] = ""; - } - 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 (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; }; /** - * Converts this ServiceOptions to JSON. + * Converts this DoubleValue to JSON. * @function toJSON - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.DoubleValue * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { + DoubleValue.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 + * Gets the default type url for DoubleValue + * @function getTypeUrl + * @memberof google.protobuf.DoubleValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DoubleValue"; + }; + + return DoubleValue; + })(); + + protobuf.FloatValue = (function() { /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance + * Properties of a FloatValue. + * @memberof google.protobuf + * @interface IFloatValue + * @property {number|null} [value] FloatValue value */ - MethodOptions.prototype[".google.api.http"] = null; /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance + * Constructs a new FloatValue. + * @memberof google.protobuf + * @classdesc Represents a FloatValue. + * @implements IFloatValue + * @constructor + * @param {google.protobuf.IFloatValue=} [properties] Properties to set */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + function FloatValue(properties) { + if (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 .google.longrunning.operationInfo. - * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo - * @memberof google.protobuf.MethodOptions + * FloatValue value. + * @member {number} value + * @memberof google.protobuf.FloatValue * @instance */ - MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + FloatValue.prototype.value = 0; /** - * Creates a new MethodOptions instance using the specified properties. + * Creates a new FloatValue instance using the specified properties. * @function create - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @returns {google.protobuf.FloatValue} FloatValue instance */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); + FloatValue.create = function create(properties) { + return new FloatValue(properties); }; /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer) { + FloatValue.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(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); return writer; }; /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + FloatValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodOptions message from the specified reader or buffer. + * Decodes a FloatValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @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 + * @returns {google.protobuf.FloatValue} FloatValue * @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) { + FloatValue.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FloatValue(); 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()); + case 1: { + message.value = reader.float(); break; } default: @@ -18029,264 +54128,122 @@ }; /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * Decodes a FloatValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.FloatValue} FloatValue * @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) { + FloatValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodOptions message. + * Verifies a FloatValue message. * @function verify - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @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) { + FloatValue.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; - } + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; return null; }; /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.FloatValue} FloatValue */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) + FloatValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FloatValue) 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"]); - } + var message = new $root.google.protobuf.FloatValue(); + if (object.value != null) + message.value = Number(object.value); return message; }; /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @static - * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {google.protobuf.FloatValue} message FloatValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + FloatValue.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); + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; }; /** - * Converts this MethodOptions to JSON. + * Converts this FloatValue to JSON. * @function toJSON - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @instance * @returns {Object.} JSON object */ - MethodOptions.prototype.toJSON = function toJSON() { + FloatValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MethodOptions + * Gets the default type url for FloatValue * @function getTypeUrl - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FloatValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; + return typeUrlPrefix + "/google.protobuf.FloatValue"; }; - /** - * 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; + return FloatValue; })(); - protobuf.UninterpretedOption = (function() { + protobuf.Int64Value = (function() { /** - * Properties of an UninterpretedOption. + * Properties of an Int64Value. * @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 + * @interface IInt64Value + * @property {number|Long|null} [value] Int64Value value */ /** - * Constructs a new UninterpretedOption. + * Constructs a new Int64Value. * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption + * @classdesc Represents an Int64Value. + * @implements IInt64Value * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.IInt64Value=} [properties] Properties to set */ - function UninterpretedOption(properties) { - this.name = []; + function Int64Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18294,162 +54251,75 @@ } /** - * 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 + * Int64Value value. + * @member {number|Long} value + * @memberof google.protobuf.Int64Value * @instance */ - UninterpretedOption.prototype.aggregateValue = ""; + Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new UninterpretedOption instance using the specified properties. + * Creates a new Int64Value instance using the specified properties. * @function create - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + * @returns {google.protobuf.Int64Value} Int64Value instance */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); + Int64Value.create = function create(properties) { + return new Int64Value(properties); }; /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. * @function encode - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encode = function encode(message, writer) { + Int64Value.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); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); return writer; }; /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + Int64Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * Decodes an Int64Value message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @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 + * @returns {google.protobuf.Int64Value} Int64Value * @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) { + Int64Value.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int64Value(); 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(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int64(); break; } default: @@ -18461,458 +54331,136 @@ }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes an Int64Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.Int64Value} Int64Value * @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) { + Int64Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UninterpretedOption message. + * Verifies an Int64Value message. * @function verify - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @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) { + Int64Value.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"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; return null; }; /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.Int64Value} Int64Value */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) + Int64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int64Value) 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) + var message = new $root.google.protobuf.Int64Value(); + if (object.value != 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); + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {google.protobuf.Int64Value} message Int64Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + Int64Value.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 (options.defaults) if ($util.Long) { var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + object.value = 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; + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; 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; + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; return object; }; /** - * Converts this UninterpretedOption to JSON. + * Converts this Int64Value to JSON. * @function toJSON - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @instance * @returns {Object.} JSON object */ - UninterpretedOption.prototype.toJSON = function toJSON() { + Int64Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UninterpretedOption + * Gets the default type url for Int64Value * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.Int64Value * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + return typeUrlPrefix + "/google.protobuf.Int64Value"; }; - 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; + return Int64Value; })(); - protobuf.FeatureSet = (function() { + protobuf.UInt64Value = (function() { /** - * Properties of a FeatureSet. + * Properties of a UInt64Value. * @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 + * @interface IUInt64Value + * @property {number|Long|null} [value] UInt64Value value */ /** - * Constructs a new FeatureSet. + * Constructs a new UInt64Value. * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet + * @classdesc Represents a UInt64Value. + * @implements IUInt64Value * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set */ - function FeatureSet(properties) { + function UInt64Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18920,145 +54468,75 @@ } /** - * 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 + * UInt64Value value. + * @member {number|Long} value + * @memberof google.protobuf.UInt64Value * @instance */ - FeatureSet.prototype.jsonFormat = 0; + UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * Creates a new FeatureSet instance using the specified properties. + * Creates a new UInt64Value instance using the specified properties. * @function create - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @returns {google.protobuf.UInt64Value} UInt64Value instance */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); + UInt64Value.create = function create(properties) { + return new UInt64Value(properties); }; /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. * @function encode - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @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); + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); return writer; }; /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FeatureSet message from the specified reader or buffer. + * Decodes a UInt64Value message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @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 + * @returns {google.protobuf.UInt64Value} UInt64Value * @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) { + UInt64Value.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt64Value(); 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(); + message.value = reader.uint64(); break; } default: @@ -19070,413 +54548,339 @@ }; /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet + * @returns {google.protobuf.UInt64Value} UInt64Value * @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) { + UInt64Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FeatureSet message. + * Verifies a UInt64Value message. * @function verify - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @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) { + UInt64Value.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; return null; }; /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet + * @returns {google.protobuf.UInt64Value} UInt64Value */ - FeatureSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet) + UInt64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt64Value) 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; - } + var message = new $root.google.protobuf.UInt64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = true; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); return message; }; /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @static - * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {google.protobuf.UInt64Value} message UInt64Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSet.toObject = function toObject(message, options) { + UInt64Value.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; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; return object; }; /** - * Converts this FeatureSet to JSON. + * Converts this UInt64Value to JSON. * @function toJSON - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @instance * @returns {Object.} JSON object */ - FeatureSet.prototype.toJSON = function toJSON() { + UInt64Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FeatureSet + * Gets the default type url for UInt64Value * @function getTypeUrl - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.UInt64Value * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; + return typeUrlPrefix + "/google.protobuf.UInt64Value"; }; + return UInt64Value; + })(); + + protobuf.Int32Value = (function() { + /** - * 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 + * Properties of an Int32Value. + * @memberof google.protobuf + * @interface IInt32Value + * @property {number|null} [value] Int32Value 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 + * Constructs a new Int32Value. + * @memberof google.protobuf + * @classdesc Represents an Int32Value. + * @implements IInt32Value + * @constructor + * @param {google.protobuf.IInt32Value=} [properties] Properties to set */ - 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; - })(); + function Int32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * 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 + * Int32Value value. + * @member {number} value + * @memberof google.protobuf.Int32Value + * @instance */ - 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; - })(); + Int32Value.prototype.value = 0; /** - * 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 + * Creates a new Int32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @returns {google.protobuf.Int32Value} Int32Value instance + */ + Int32Value.create = function create(properties) { + return new Int32Value(properties); + }; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); + return writer; + }; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decode = function 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.Int32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int32Value message. + * @function verify + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int32Value} Int32Value + */ + Int32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int32Value) + return object; + var message = new $root.google.protobuf.Int32Value(); + if (object.value != null) + message.value = object.value | 0; + return message; + }; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.Int32Value} message Int32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - 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; - })(); + Int32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; /** - * 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 + * Converts this Int32Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int32Value + * @instance + * @returns {Object.} JSON object */ - 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; - })(); + Int32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * 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 + * Gets the default type url for Int32Value + * @function getTypeUrl + * @memberof google.protobuf.Int32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - 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; - })(); + Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int32Value"; + }; - return FeatureSet; + return Int32Value; })(); - protobuf.FeatureSetDefaults = (function() { + protobuf.UInt32Value = (function() { /** - * Properties of a FeatureSetDefaults. + * Properties of a UInt32Value. * @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 + * @interface IUInt32Value + * @property {number|null} [value] UInt32Value value */ /** - * Constructs a new FeatureSetDefaults. + * Constructs a new UInt32Value. * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults + * @classdesc Represents a UInt32Value. + * @implements IUInt32Value * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set */ - function FeatureSetDefaults(properties) { - this.defaults = []; + function UInt32Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19484,106 +54888,75 @@ } /** - * 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 + * UInt32Value value. + * @member {number} value + * @memberof google.protobuf.UInt32Value * @instance */ - FeatureSetDefaults.prototype.maximumEdition = 0; + UInt32Value.prototype.value = 0; /** - * Creates a new FeatureSetDefaults instance using the specified properties. + * Creates a new UInt32Value instance using the specified properties. * @function create - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.UInt32Value * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * @returns {google.protobuf.UInt32Value} UInt32Value instance */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); + UInt32Value.create = function create(properties) { + return new UInt32Value(properties); }; /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. * @function encode - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.UInt32Value * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSetDefaults.encode = function encode(message, writer) { + UInt32Value.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); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); return writer; }; /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.UInt32Value * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * Decodes a UInt32Value message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.UInt32Value * @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 + * @returns {google.protobuf.UInt32Value} UInt32Value * @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) { + UInt32Value.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt32Value(); 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(); + message.value = reader.uint32(); break; } default: @@ -19595,582 +54968,325 @@ }; /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.UInt32Value * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @returns {google.protobuf.UInt32Value} UInt32Value * @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) { + UInt32Value.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FeatureSetDefaults message. + * Verifies a UInt32Value message. * @function verify - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.UInt32Value * @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) { + UInt32Value.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; - } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; return null; }; /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.UInt32Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @returns {google.protobuf.UInt32Value} UInt32Value */ - FeatureSetDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) + UInt32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt32Value) 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; + var message = new $root.google.protobuf.UInt32Value(); + if (object.value != null) + message.value = object.value >>> 0; + return message; + }; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this UInt32Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt32Value + * @instance + * @returns {Object.} JSON object + */ + UInt32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UInt32Value + * @function getTypeUrl + * @memberof google.protobuf.UInt32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - switch (object.maximumEdition) { - default: - if (typeof object.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; + return typeUrlPrefix + "/google.protobuf.UInt32Value"; + }; + + return UInt32Value; + })(); + + protobuf.BoolValue = (function() { + + /** + * Properties of a BoolValue. + * @memberof google.protobuf + * @interface IBoolValue + * @property {boolean|null} [value] BoolValue value + */ + + /** + * Constructs a new BoolValue. + * @memberof google.protobuf + * @classdesc Represents a BoolValue. + * @implements IBoolValue + * @constructor + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + */ + function BoolValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BoolValue value. + * @member {boolean} value + * @memberof google.protobuf.BoolValue + * @instance + */ + BoolValue.prototype.value = false; + + /** + * Creates a new BoolValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @returns {google.protobuf.BoolValue} BoolValue instance + */ + BoolValue.create = function create(properties) { + return new BoolValue(properties); + }; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); + return writer; + }; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decode = function 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.BoolValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); 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. + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoolValue message. + * @function verify + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BoolValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "boolean") + return "value: boolean expected"; + return null; + }; + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BoolValue} BoolValue + */ + BoolValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BoolValue) + return object; + var message = new $root.google.protobuf.BoolValue(); + if (object.value != null) + message.value = Boolean(object.value); + return message; + }; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.BoolValue * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {google.protobuf.BoolValue} message BoolValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSetDefaults.toObject = function toObject(message, options) { + BoolValue.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; + if (options.defaults) + object.value = false; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; return object; }; /** - * Converts this FeatureSetDefaults to JSON. + * Converts this BoolValue to JSON. * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.BoolValue * @instance * @returns {Object.} JSON object */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { + BoolValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FeatureSetDefaults + * Gets the default type url for BoolValue * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.BoolValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + return typeUrlPrefix + "/google.protobuf.BoolValue"; }; - 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; + return BoolValue; })(); - protobuf.SourceCodeInfo = (function() { + protobuf.StringValue = (function() { /** - * Properties of a SourceCodeInfo. + * Properties of a StringValue. * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location + * @interface IStringValue + * @property {string|null} [value] StringValue value */ /** - * Constructs a new SourceCodeInfo. + * Constructs a new StringValue. * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo + * @classdesc Represents a StringValue. + * @implements IStringValue * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.IStringValue=} [properties] Properties to set */ - function SourceCodeInfo(properties) { - this.location = []; + function StringValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20178,78 +55294,75 @@ } /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo + * StringValue value. + * @member {string} value + * @memberof google.protobuf.StringValue * @instance */ - SourceCodeInfo.prototype.location = $util.emptyArray; + StringValue.prototype.value = ""; /** - * Creates a new SourceCodeInfo instance using the specified properties. + * Creates a new StringValue instance using the specified properties. * @function create - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.StringValue * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @returns {google.protobuf.StringValue} StringValue instance */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); + StringValue.create = function create(properties) { + return new StringValue(properties); }; /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.StringValue * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer) { + StringValue.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(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); return writer; }; /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.StringValue * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + StringValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. + * Decodes a StringValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.StringValue * @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 + * @returns {google.protobuf.StringValue} StringValue * @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) { + StringValue.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.StringValue(); 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())); + message.value = reader.string(); break; } default: @@ -20261,502 +55374,122 @@ }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a StringValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.StringValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.StringValue} StringValue * @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) { + StringValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceCodeInfo message. + * Verifies a StringValue message. * @function verify - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.StringValue * @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) { + StringValue.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; - } - } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; return null; }; /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a StringValue 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]); - } - } + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.StringValue} StringValue + */ + StringValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.StringValue) + return object; + var message = new $root.google.protobuf.StringValue(); + if (object.value != null) + message.value = String(object.value); return message; }; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a StringValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.StringValue * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {google.protobuf.StringValue} message StringValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + StringValue.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); - } + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; return object; }; /** - * Converts this SourceCodeInfo to JSON. + * Converts this StringValue to JSON. * @function toJSON - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.StringValue * @instance * @returns {Object.} JSON object */ - SourceCodeInfo.prototype.toJSON = function toJSON() { + StringValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SourceCodeInfo + * Gets the default type url for StringValue * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.StringValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + return typeUrlPrefix + "/google.protobuf.StringValue"; }; - 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; + return StringValue; })(); - protobuf.GeneratedCodeInfo = (function() { + protobuf.BytesValue = (function() { /** - * Properties of a GeneratedCodeInfo. + * Properties of a BytesValue. * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + * @interface IBytesValue + * @property {Uint8Array|null} [value] BytesValue value */ /** - * Constructs a new GeneratedCodeInfo. + * Constructs a new BytesValue. * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo + * @classdesc Represents a BytesValue. + * @implements IBytesValue * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @param {google.protobuf.IBytesValue=} [properties] Properties to set */ - function GeneratedCodeInfo(properties) { - this.annotation = []; + function BytesValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20764,78 +55497,75 @@ } /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo + * BytesValue value. + * @member {Uint8Array} value + * @memberof google.protobuf.BytesValue * @instance */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + BytesValue.prototype.value = $util.newBuffer([]); /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * Creates a new BytesValue instance using the specified properties. * @function create - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * @returns {google.protobuf.BytesValue} BytesValue instance */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); + BytesValue.create = function create(properties) { + return new BytesValue(properties); }; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. * @function encode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encode = function encode(message, writer) { + BytesValue.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(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); return writer; }; /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + BytesValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * Decodes a BytesValue message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @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 + * @returns {google.protobuf.BytesValue} BytesValue * @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) { + BytesValue.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BytesValue(); 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())); + message.value = reader.bytes(); break; } default: @@ -20847,501 +55577,208 @@ }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a BytesValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.protobuf.BytesValue} BytesValue * @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) { + BytesValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GeneratedCodeInfo message. + * Verifies a BytesValue message. * @function verify - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @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) { + BytesValue.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; - } - } + 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 a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.protobuf.BytesValue} BytesValue */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + BytesValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BytesValue) 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]); - } - } + var message = new $root.google.protobuf.BytesValue(); + 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 a GeneratedCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {google.protobuf.BytesValue} message BytesValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GeneratedCodeInfo.toObject = function toObject(message, options) { + BytesValue.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); - } + if (options.defaults) + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + 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 GeneratedCodeInfo to JSON. + * Converts this BytesValue to JSON. * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @instance * @returns {Object.} JSON object */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { + BytesValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GeneratedCodeInfo + * Gets the default type url for BytesValue * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.BytesValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + return typeUrlPrefix + "/google.protobuf.BytesValue"; }; - 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; - }; + return BytesValue; + })(); - /** - * 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); - }; + return protobuf; + })(); - /** - * 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"; - }; + google.type = (function() { - /** - * 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; - })(); + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; - return Annotation; - })(); + /** + * DayOfWeek enum. + * @name google.type.DayOfWeek + * @enum {number} + * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value + * @property {number} MONDAY=1 MONDAY value + * @property {number} TUESDAY=2 TUESDAY value + * @property {number} WEDNESDAY=3 WEDNESDAY value + * @property {number} THURSDAY=4 THURSDAY value + * @property {number} FRIDAY=5 FRIDAY value + * @property {number} SATURDAY=6 SATURDAY value + * @property {number} SUNDAY=7 SUNDAY value + */ + type.DayOfWeek = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; + values[valuesById[1] = "MONDAY"] = 1; + values[valuesById[2] = "TUESDAY"] = 2; + values[valuesById[3] = "WEDNESDAY"] = 3; + values[valuesById[4] = "THURSDAY"] = 4; + values[valuesById[5] = "FRIDAY"] = 5; + values[valuesById[6] = "SATURDAY"] = 6; + values[valuesById[7] = "SUNDAY"] = 7; + return values; + })(); - return GeneratedCodeInfo; + /** + * Month enum. + * @name google.type.Month + * @enum {number} + * @property {number} MONTH_UNSPECIFIED=0 MONTH_UNSPECIFIED value + * @property {number} JANUARY=1 JANUARY value + * @property {number} FEBRUARY=2 FEBRUARY value + * @property {number} MARCH=3 MARCH value + * @property {number} APRIL=4 APRIL value + * @property {number} MAY=5 MAY value + * @property {number} JUNE=6 JUNE value + * @property {number} JULY=7 JULY value + * @property {number} AUGUST=8 AUGUST value + * @property {number} SEPTEMBER=9 SEPTEMBER value + * @property {number} OCTOBER=10 OCTOBER value + * @property {number} NOVEMBER=11 NOVEMBER value + * @property {number} DECEMBER=12 DECEMBER value + */ + type.Month = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MONTH_UNSPECIFIED"] = 0; + values[valuesById[1] = "JANUARY"] = 1; + values[valuesById[2] = "FEBRUARY"] = 2; + values[valuesById[3] = "MARCH"] = 3; + values[valuesById[4] = "APRIL"] = 4; + values[valuesById[5] = "MAY"] = 5; + values[valuesById[6] = "JUNE"] = 6; + values[valuesById[7] = "JULY"] = 7; + values[valuesById[8] = "AUGUST"] = 8; + values[valuesById[9] = "SEPTEMBER"] = 9; + values[valuesById[10] = "OCTOBER"] = 10; + values[valuesById[11] = "NOVEMBER"] = 11; + values[valuesById[12] = "DECEMBER"] = 12; + return values; })(); - protobuf.Duration = (function() { + type.Expr = (function() { /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos + * Properties of an Expr. + * @memberof google.type + * @interface IExpr + * @property {string|null} [expression] Expr expression + * @property {string|null} [title] Expr title + * @property {string|null} [description] Expr description + * @property {string|null} [location] Expr location */ /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration + * Constructs a new Expr. + * @memberof google.type + * @classdesc Represents an Expr. + * @implements IExpr * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * @param {google.type.IExpr=} [properties] Properties to set */ - function Duration(properties) { + function Expr(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21349,89 +55786,117 @@ } /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration + * Expr expression. + * @member {string} expression + * @memberof google.type.Expr * @instance */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Expr.prototype.expression = ""; /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration + * Expr title. + * @member {string} title + * @memberof google.type.Expr * @instance */ - Duration.prototype.nanos = 0; + Expr.prototype.title = ""; /** - * Creates a new Duration instance using the specified properties. + * Expr description. + * @member {string} description + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.description = ""; + + /** + * Expr location. + * @member {string} location + * @memberof google.type.Expr + * @instance + */ + Expr.prototype.location = ""; + + /** + * Creates a new Expr instance using the specified properties. * @function create - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance + * @param {google.type.IExpr=} [properties] Properties to set + * @returns {google.type.Expr} Expr instance */ - Duration.create = function create(properties) { - return new Duration(properties); + Expr.create = function create(properties) { + return new Expr(properties); }; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. * @function encode - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.type.IExpr} message Expr message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encode = function encode(message, writer) { + Expr.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); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); return writer; }; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.type.IExpr} message Expr message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { + Expr.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes an Expr message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @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 + * @returns {google.type.Expr} Expr * @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) { + Expr.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Expr(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.seconds = reader.int64(); + message.expression = reader.string(); break; } case 2: { - message.nanos = reader.int32(); + message.title = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.location = reader.string(); break; } default: @@ -21443,146 +55908,162 @@ }; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes an Expr message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration + * @returns {google.type.Expr} Expr * @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) { + Expr.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Duration message. + * Verifies an Expr message. * @function verify - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @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"; + */ + Expr.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; return null; }; /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates an Expr message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration + * @returns {google.type.Expr} Expr */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) + Expr.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Expr) 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; + var message = new $root.google.type.Expr(); + if (object.expression != null) + message.expression = String(object.expression); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.location != null) + message.location = String(object.location); return message; }; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. + * Creates a plain object from an Expr message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @static - * @param {google.protobuf.Duration} message Duration + * @param {google.type.Expr} message Expr * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options) { + Expr.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; + object.expression = ""; + object.title = ""; + object.description = ""; + object.location = ""; + } + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; return object; }; /** - * Converts this Duration to JSON. + * Converts this Expr to JSON. * @function toJSON - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @instance * @returns {Object.} JSON object */ - Duration.prototype.toJSON = function toJSON() { + Expr.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Duration + * Gets the default type url for Expr * @function getTypeUrl - * @memberof google.protobuf.Duration + * @memberof google.type.Expr * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Expr.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Duration"; + return typeUrlPrefix + "/google.type.Expr"; }; - return Duration; + return Expr; })(); - protobuf.Any = (function() { + return type; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value + * 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 Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set + * @param {google.rpc.IStatus=} [properties] Properties to set */ - function Any(properties) { + function Status(properties) { + this.details = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21590,89 +56071,106 @@ } /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any + * Status code. + * @member {number} code + * @memberof google.rpc.Status * @instance */ - Any.prototype.type_url = ""; + Status.prototype.code = 0; /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any + * Status message. + * @member {string} message + * @memberof google.rpc.Status * @instance */ - Any.prototype.value = $util.newBuffer([]); + Status.prototype.message = ""; /** - * Creates a new Any instance using the specified properties. + * 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.protobuf.Any + * @memberof google.rpc.Status * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance */ - Any.create = function create(properties) { - return new Any(properties); + Status.create = function create(properties) { + return new Status(properties); }; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. * @function encode - * @memberof google.protobuf.Any + * @memberof google.rpc.Status * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.rpc.IStatus} message Status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encode = function encode(message, writer) { + Status.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); + 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 Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Any + * @memberof google.rpc.Status * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.rpc.IStatus} message Status message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encodeDelimited = function encodeDelimited(message, writer) { + Status.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes a Status message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Any + * @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.protobuf.Any} Any + * @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 */ - Any.decode = function decode(reader, length) { + 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.protobuf.Any(); + 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.type_url = reader.string(); + message.code = reader.int32(); break; } case 2: { - message.value = reader.bytes(); + 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: @@ -21684,2403 +56182,3491 @@ }; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes a Status message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Any + * @memberof google.rpc.Status * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any + * @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 */ - Any.decodeDelimited = function decodeDelimited(reader) { + Status.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Any message. + * Verifies a Status message. * @function verify - * @memberof google.protobuf.Any + * @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 */ - Any.verify = function verify(message) { + Status.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"; + 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 an Any message from a plain object. Also converts values to their respective internal types. + * Creates a Status message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Any + * @memberof google.rpc.Status * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any + * @returns {google.rpc.Status} Status */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) 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; + 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 an Any message. Also converts values to other types if specified. + * Creates a plain object from a Status message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Any + * @memberof google.rpc.Status * @static - * @param {google.protobuf.Any} message Any + * @param {google.rpc.Status} message Status * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Any.toObject = function toObject(message, options) { + Status.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.details = []; 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); - } + 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); } - 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. + * Converts this Status to JSON. * @function toJSON - * @memberof google.protobuf.Any + * @memberof google.rpc.Status * @instance * @returns {Object.} JSON object */ - Any.prototype.toJSON = function toJSON() { + Status.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Any + * Gets the default type url for Status * @function getTypeUrl - * @memberof google.protobuf.Any + * @memberof google.rpc.Status * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Any"; - }; + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + google.iam = (function() { + + /** + * Namespace iam. + * @memberof google + * @namespace + */ + var iam = {}; + + iam.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.iam + * @namespace + */ + var v1 = {}; + + v1.IAMPolicy = (function() { + + /** + * Constructs a new IAMPolicy service. + * @memberof google.iam.v1 + * @classdesc Represents a IAMPolicy + * @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 IAMPolicy(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (IAMPolicy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IAMPolicy; + + /** + * Creates new IAMPolicy service using the specified rpc implementation. + * @function create + * @memberof google.iam.v1.IAMPolicy + * @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 {IAMPolicy} RPC service. Useful where requests and/or responses are streamed. + */ + IAMPolicy.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. + * @memberof google.iam.v1.IAMPolicy + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.iam.v1.IAMPolicy.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); + + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. + * @memberof google.iam.v1.IAMPolicy + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.iam.v1.IAMPolicy.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); + + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. + * @memberof google.iam.v1.IAMPolicy + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.iam.v1.IAMPolicy.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(IAMPolicy.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); + + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.iam.v1.IAMPolicy + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return IAMPolicy; + })(); + + v1.SetIamPolicyRequest = (function() { + + /** + * Properties of a SetIamPolicyRequest. + * @memberof google.iam.v1 + * @interface ISetIamPolicyRequest + * @property {string|null} [resource] SetIamPolicyRequest resource + * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy + * @property {google.protobuf.IFieldMask|null} [updateMask] SetIamPolicyRequest updateMask + */ + + /** + * Constructs a new SetIamPolicyRequest. + * @memberof google.iam.v1 + * @classdesc Represents a SetIamPolicyRequest. + * @implements ISetIamPolicyRequest + * @constructor + * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set + */ + function SetIamPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetIamPolicyRequest resource. + * @member {string} resource + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.resource = ""; + + /** + * SetIamPolicyRequest policy. + * @member {google.iam.v1.IPolicy|null|undefined} policy + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.policy = null; + + /** + * SetIamPolicyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + */ + SetIamPolicyRequest.prototype.updateMask = null; + + /** + * Creates a new SetIamPolicyRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest instance + */ + SetIamPolicyRequest.create = function create(properties) { + return new SetIamPolicyRequest(properties); + }; + + /** + * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetIamPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) + $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetIamPolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.SetIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetIamPolicyRequest message. + * @function verify + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetIamPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.policy != null && message.hasOwnProperty("policy")) { + var error = $root.google.iam.v1.Policy.verify(message.policy); + if (error) + return "policy." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest + */ + SetIamPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.SetIamPolicyRequest) + return object; + var message = new $root.google.iam.v1.SetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.policy != null) { + if (typeof object.policy !== "object") + throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); + message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {google.iam.v1.SetIamPolicyRequest} message SetIamPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetIamPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.policy = null; + object.updateMask = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.policy != null && message.hasOwnProperty("policy")) + object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this SetIamPolicyRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.SetIamPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + SetIamPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetIamPolicyRequest + * @function getTypeUrl + * @memberof google.iam.v1.SetIamPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.SetIamPolicyRequest"; + }; + + return SetIamPolicyRequest; + })(); + + v1.GetIamPolicyRequest = (function() { + + /** + * Properties of a GetIamPolicyRequest. + * @memberof google.iam.v1 + * @interface IGetIamPolicyRequest + * @property {string|null} [resource] GetIamPolicyRequest resource + * @property {google.iam.v1.IGetPolicyOptions|null} [options] GetIamPolicyRequest options + */ + + /** + * Constructs a new GetIamPolicyRequest. + * @memberof google.iam.v1 + * @classdesc Represents a GetIamPolicyRequest. + * @implements IGetIamPolicyRequest + * @constructor + * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set + */ + function GetIamPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - return Any; - })(); + /** + * GetIamPolicyRequest resource. + * @member {string} resource + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + */ + GetIamPolicyRequest.prototype.resource = ""; - protobuf.Empty = (function() { + /** + * GetIamPolicyRequest options. + * @member {google.iam.v1.IGetPolicyOptions|null|undefined} options + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + */ + GetIamPolicyRequest.prototype.options = null; - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ + /** + * Creates a new GetIamPolicyRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest instance + */ + GetIamPolicyRequest.create = function create(properties) { + return new GetIamPolicyRequest(properties); + }; - /** - * 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]]; - } + /** + * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIamPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * 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 GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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; - }; + /** + * Decodes a GetIamPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIamPolicyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetIamPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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 a GetIamPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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; + /** + * Verifies a GetIamPolicyRequest message. + * @function verify + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIamPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options); + if (error) + return "options." + error; } - } - 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()); - }; + return null; + }; - /** - * 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 a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest + */ + GetIamPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.GetIamPolicyRequest) + return object; + var message = new $root.google.iam.v1.GetIamPolicyRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected"); + message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options); + } + return message; + }; - /** - * 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) + /** + * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {google.iam.v1.GetIamPolicyRequest} message GetIamPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIamPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.options = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options); 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); - }; + /** + * Converts this GetIamPolicyRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.GetIamPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + GetIamPolicyRequest.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"; - }; + /** + * Gets the default type url for GetIamPolicyRequest + * @function getTypeUrl + * @memberof google.iam.v1.GetIamPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.GetIamPolicyRequest"; + }; - return Empty; - })(); + return GetIamPolicyRequest; + })(); - protobuf.Timestamp = (function() { + v1.TestIamPermissionsRequest = (function() { - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ + /** + * Properties of a TestIamPermissionsRequest. + * @memberof google.iam.v1 + * @interface ITestIamPermissionsRequest + * @property {string|null} [resource] TestIamPermissionsRequest resource + * @property {Array.|null} [permissions] TestIamPermissionsRequest permissions + */ - /** - * 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]]; - } + /** + * Constructs a new TestIamPermissionsRequest. + * @memberof google.iam.v1 + * @classdesc Represents a TestIamPermissionsRequest. + * @implements ITestIamPermissionsRequest + * @constructor + * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set + */ + function TestIamPermissionsRequest(properties) { + this.permissions = []; + if (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; + /** + * TestIamPermissionsRequest resource. + * @member {string} resource + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + */ + TestIamPermissionsRequest.prototype.resource = ""; - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; + /** + * TestIamPermissionsRequest permissions. + * @member {Array.} permissions + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + */ + TestIamPermissionsRequest.prototype.permissions = $util.emptyArray; - /** - * 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); - }; + /** + * Creates a new TestIamPermissionsRequest instance using the specified properties. + * @function create + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest instance + */ + TestIamPermissionsRequest.create = function create(properties) { + return new TestIamPermissionsRequest(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 TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.permissions[i]); + 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(); - }; + /** + * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsRequest.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(); + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + 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()); - }; + /** + * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsRequest.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; - }; + /** + * Verifies a TestIamPermissionsRequest message. + * @function verify + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestIamPermissionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] 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 TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest + */ + TestIamPermissionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest) + return object; + var message = new $root.google.iam.v1.TestIamPermissionsRequest(); + if (object.resource != null) + message.resource = String(object.resource); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".google.iam.v1.TestIamPermissionsRequest.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); + } + 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; - }; + /** + * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {google.iam.v1.TestIamPermissionsRequest} message TestIamPermissionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestIamPermissionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (options.defaults) + object.resource = ""; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; + } + 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); - }; + /** + * Converts this TestIamPermissionsRequest to JSON. + * @function toJSON + * @memberof google.iam.v1.TestIamPermissionsRequest + * @instance + * @returns {Object.} JSON object + */ + TestIamPermissionsRequest.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"; - }; + /** + * Gets the default type url for TestIamPermissionsRequest + * @function getTypeUrl + * @memberof google.iam.v1.TestIamPermissionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestIamPermissionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsRequest"; + }; - return Timestamp; - })(); + return TestIamPermissionsRequest; + })(); - protobuf.DoubleValue = (function() { + v1.TestIamPermissionsResponse = (function() { - /** - * Properties of a DoubleValue. - * @memberof google.protobuf - * @interface IDoubleValue - * @property {number|null} [value] DoubleValue value - */ + /** + * Properties of a TestIamPermissionsResponse. + * @memberof google.iam.v1 + * @interface ITestIamPermissionsResponse + * @property {Array.|null} [permissions] TestIamPermissionsResponse permissions + */ - /** - * Constructs a new DoubleValue. - * @memberof google.protobuf - * @classdesc Represents a DoubleValue. - * @implements IDoubleValue - * @constructor - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set - */ - function DoubleValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new TestIamPermissionsResponse. + * @memberof google.iam.v1 + * @classdesc Represents a TestIamPermissionsResponse. + * @implements ITestIamPermissionsResponse + * @constructor + * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set + */ + function TestIamPermissionsResponse(properties) { + this.permissions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * DoubleValue value. - * @member {number} value - * @memberof google.protobuf.DoubleValue - * @instance - */ - DoubleValue.prototype.value = 0; + /** + * TestIamPermissionsResponse permissions. + * @member {Array.} permissions + * @memberof google.iam.v1.TestIamPermissionsResponse + * @instance + */ + TestIamPermissionsResponse.prototype.permissions = $util.emptyArray; - /** - * Creates a new DoubleValue instance using the specified properties. - * @function create - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set - * @returns {google.protobuf.DoubleValue} DoubleValue instance - */ - DoubleValue.create = function create(properties) { - return new DoubleValue(properties); - }; + /** + * Creates a new TestIamPermissionsResponse instance using the specified properties. + * @function create + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse instance + */ + TestIamPermissionsResponse.create = function create(properties) { + return new TestIamPermissionsResponse(properties); + }; - /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DoubleValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); - return writer; - }; + /** + * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.permissions[i]); + return writer; + }; - /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TestIamPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a DoubleValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DoubleValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DoubleValue} DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DoubleValue.decode = function 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.DoubleValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.double(); + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; - - /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DoubleValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DoubleValue} DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DoubleValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return message; + }; - /** - * Verifies a DoubleValue message. - * @function verify - * @memberof google.protobuf.DoubleValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DoubleValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - return null; - }; + /** + * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TestIamPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DoubleValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DoubleValue} DoubleValue - */ - DoubleValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DoubleValue) - return object; - var message = new $root.google.protobuf.DoubleValue(); - if (object.value != null) - message.value = Number(object.value); - return message; - }; + /** + * Verifies a TestIamPermissionsResponse message. + * @function verify + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TestIamPermissionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] expected"; + } + return null; + }; - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.DoubleValue} message DoubleValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DoubleValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; + /** + * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse + */ + TestIamPermissionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse) + return object; + var message = new $root.google.iam.v1.TestIamPermissionsResponse(); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".google.iam.v1.TestIamPermissionsResponse.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); + } + return message; + }; - /** - * Converts this DoubleValue to JSON. - * @function toJSON - * @memberof google.protobuf.DoubleValue - * @instance - * @returns {Object.} JSON object - */ - DoubleValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {google.iam.v1.TestIamPermissionsResponse} message TestIamPermissionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TestIamPermissionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; + } + return object; + }; - /** - * Gets the default type url for DoubleValue - * @function getTypeUrl - * @memberof google.protobuf.DoubleValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DoubleValue"; - }; + /** + * Converts this TestIamPermissionsResponse to JSON. + * @function toJSON + * @memberof google.iam.v1.TestIamPermissionsResponse + * @instance + * @returns {Object.} JSON object + */ + TestIamPermissionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return DoubleValue; - })(); + /** + * Gets the default type url for TestIamPermissionsResponse + * @function getTypeUrl + * @memberof google.iam.v1.TestIamPermissionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TestIamPermissionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsResponse"; + }; - protobuf.FloatValue = (function() { + return TestIamPermissionsResponse; + })(); - /** - * Properties of a FloatValue. - * @memberof google.protobuf - * @interface IFloatValue - * @property {number|null} [value] FloatValue value - */ + v1.GetPolicyOptions = (function() { - /** - * Constructs a new FloatValue. - * @memberof google.protobuf - * @classdesc Represents a FloatValue. - * @implements IFloatValue - * @constructor - * @param {google.protobuf.IFloatValue=} [properties] Properties to set - */ - function FloatValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a GetPolicyOptions. + * @memberof google.iam.v1 + * @interface IGetPolicyOptions + * @property {number|null} [requestedPolicyVersion] GetPolicyOptions requestedPolicyVersion + */ - /** - * FloatValue value. - * @member {number} value - * @memberof google.protobuf.FloatValue - * @instance - */ - FloatValue.prototype.value = 0; + /** + * Constructs a new GetPolicyOptions. + * @memberof google.iam.v1 + * @classdesc Represents a GetPolicyOptions. + * @implements IGetPolicyOptions + * @constructor + * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set + */ + function GetPolicyOptions(properties) { + if (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 FloatValue instance using the specified properties. - * @function create - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue=} [properties] Properties to set - * @returns {google.protobuf.FloatValue} FloatValue instance - */ - FloatValue.create = function create(properties) { - return new FloatValue(properties); - }; + /** + * GetPolicyOptions requestedPolicyVersion. + * @member {number} requestedPolicyVersion + * @memberof google.iam.v1.GetPolicyOptions + * @instance + */ + GetPolicyOptions.prototype.requestedPolicyVersion = 0; - /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FloatValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); - return writer; - }; + /** + * Creates a new GetPolicyOptions instance using the specified properties. + * @function create + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions instance + */ + GetPolicyOptions.create = function create(properties) { + return new GetPolicyOptions(properties); + }; - /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FloatValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPolicyOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.requestedPolicyVersion); + return writer; + }; - /** - * Decodes a FloatValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FloatValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FloatValue} FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FloatValue.decode = function 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.FloatValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.float(); + /** + * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPolicyOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPolicyOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetPolicyOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.requestedPolicyVersion = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FloatValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FloatValue} FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FloatValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPolicyOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a FloatValue message. - * @function verify - * @memberof google.protobuf.FloatValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FloatValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - return null; - }; + /** + * Verifies a GetPolicyOptions message. + * @function verify + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPolicyOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + if (!$util.isInteger(message.requestedPolicyVersion)) + return "requestedPolicyVersion: integer expected"; + return null; + }; - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FloatValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FloatValue} FloatValue - */ - FloatValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FloatValue) + /** + * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions + */ + GetPolicyOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.GetPolicyOptions) + return object; + var message = new $root.google.iam.v1.GetPolicyOptions(); + if (object.requestedPolicyVersion != null) + message.requestedPolicyVersion = object.requestedPolicyVersion | 0; + return message; + }; + + /** + * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {google.iam.v1.GetPolicyOptions} message GetPolicyOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPolicyOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.requestedPolicyVersion = 0; + if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) + object.requestedPolicyVersion = message.requestedPolicyVersion; return object; - var message = new $root.google.protobuf.FloatValue(); - if (object.value != null) - message.value = Number(object.value); - return message; - }; + }; - /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.FloatValue} message FloatValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FloatValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; + /** + * Converts this GetPolicyOptions to JSON. + * @function toJSON + * @memberof google.iam.v1.GetPolicyOptions + * @instance + * @returns {Object.} JSON object + */ + GetPolicyOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this FloatValue to JSON. - * @function toJSON - * @memberof google.protobuf.FloatValue - * @instance - * @returns {Object.} JSON object - */ - FloatValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for GetPolicyOptions + * @function getTypeUrl + * @memberof google.iam.v1.GetPolicyOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPolicyOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.GetPolicyOptions"; + }; - /** - * Gets the default type url for FloatValue - * @function getTypeUrl - * @memberof google.protobuf.FloatValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FloatValue"; - }; + return GetPolicyOptions; + })(); - return FloatValue; - })(); + v1.Policy = (function() { - protobuf.Int64Value = (function() { + /** + * Properties of a Policy. + * @memberof google.iam.v1 + * @interface IPolicy + * @property {number|null} [version] Policy version + * @property {Array.|null} [bindings] Policy bindings + * @property {Array.|null} [auditConfigs] Policy auditConfigs + * @property {Uint8Array|null} [etag] Policy etag + */ - /** - * Properties of an Int64Value. - * @memberof google.protobuf - * @interface IInt64Value - * @property {number|Long|null} [value] Int64Value value - */ + /** + * Constructs a new Policy. + * @memberof google.iam.v1 + * @classdesc Represents a Policy. + * @implements IPolicy + * @constructor + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + */ + function Policy(properties) { + this.bindings = []; + this.auditConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new Int64Value. - * @memberof google.protobuf - * @classdesc Represents an Int64Value. - * @implements IInt64Value - * @constructor - * @param {google.protobuf.IInt64Value=} [properties] Properties to set - */ - function Int64Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Policy version. + * @member {number} version + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.version = 0; - /** - * Int64Value value. - * @member {number|Long} value - * @memberof google.protobuf.Int64Value - * @instance - */ - Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Policy bindings. + * @member {Array.} bindings + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.bindings = $util.emptyArray; - /** - * Creates a new Int64Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value=} [properties] Properties to set - * @returns {google.protobuf.Int64Value} Int64Value instance - */ - Int64Value.create = function create(properties) { - return new Int64Value(properties); - }; + /** + * Policy auditConfigs. + * @member {Array.} auditConfigs + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.auditConfigs = $util.emptyArray; - /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int64Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); - return writer; - }; + /** + * Policy etag. + * @member {Uint8Array} etag + * @memberof google.iam.v1.Policy + * @instance + */ + Policy.prototype.etag = $util.newBuffer([]); - /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new Policy instance using the specified properties. + * @function create + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy=} [properties] Properties to set + * @returns {google.iam.v1.Policy} Policy instance + */ + Policy.create = function create(properties) { + return new Policy(properties); + }; - /** - * Decodes an Int64Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Int64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Int64Value} Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int64Value.decode = function 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.Int64Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.int64(); + /** + * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); + if (message.bindings != null && message.bindings.length) + for (var i = 0; i < message.bindings.length; ++i) + $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.auditConfigs != null && message.auditConfigs.length) + for (var i = 0; i < message.auditConfigs.length; ++i) + $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Policy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Policy message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.version = reader.int32(); + break; + } + case 4: { + if (!(message.bindings && message.bindings.length)) + message.bindings = []; + message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.auditConfigs && message.auditConfigs.length)) + message.auditConfigs = []; + message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32())); + break; + } + case 3: { + message.etag = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Int64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Int64Value} Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int64Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Policy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Policy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Policy} Policy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Policy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an Int64Value message. - * @function verify - * @memberof google.protobuf.Int64Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Int64Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; - return null; - }; + /** + * Verifies a Policy message. + * @function verify + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Policy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + if (message.bindings != null && message.hasOwnProperty("bindings")) { + if (!Array.isArray(message.bindings)) + return "bindings: array expected"; + for (var i = 0; i < message.bindings.length; ++i) { + var error = $root.google.iam.v1.Binding.verify(message.bindings[i]); + if (error) + return "bindings." + error; + } + } + if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) { + if (!Array.isArray(message.auditConfigs)) + return "auditConfigs: array expected"; + for (var i = 0; i < message.auditConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]); + if (error) + return "auditConfigs." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) + return "etag: buffer expected"; + return null; + }; - /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int64Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int64Value} Int64Value - */ - Int64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int64Value) - return object; - var message = new $root.google.protobuf.Int64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = false; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); - return message; - }; + /** + * Creates a Policy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Policy + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Policy} Policy + */ + Policy.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Policy) + return object; + var message = new $root.google.iam.v1.Policy(); + if (object.version != null) + message.version = object.version | 0; + if (object.bindings) { + if (!Array.isArray(object.bindings)) + throw TypeError(".google.iam.v1.Policy.bindings: array expected"); + message.bindings = []; + for (var i = 0; i < object.bindings.length; ++i) { + if (typeof object.bindings[i] !== "object") + throw TypeError(".google.iam.v1.Policy.bindings: object expected"); + message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); + } + } + if (object.auditConfigs) { + if (!Array.isArray(object.auditConfigs)) + throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected"); + message.auditConfigs = []; + for (var i = 0; i < object.auditConfigs.length; ++i) { + if (typeof object.auditConfigs[i] !== "object") + throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); + message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]); + } + } + if (object.etag != null) + if (typeof object.etag === "string") + $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); + else if (object.etag.length >= 0) + message.etag = object.etag; + return message; + }; - /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.Int64Value} message Int64Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Int64Value.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.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; - return object; - }; + /** + * Creates a plain object from a Policy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Policy + * @static + * @param {google.iam.v1.Policy} message Policy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Policy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bindings = []; + object.auditConfigs = []; + } + if (options.defaults) { + object.version = 0; + if (options.bytes === String) + object.etag = ""; + else { + object.etag = []; + if (options.bytes !== Array) + object.etag = $util.newBuffer(object.etag); + } + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; + if (message.bindings && message.bindings.length) { + object.bindings = []; + for (var j = 0; j < message.bindings.length; ++j) + object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); + } + if (message.auditConfigs && message.auditConfigs.length) { + object.auditConfigs = []; + for (var j = 0; j < message.auditConfigs.length; ++j) + object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options); + } + return object; + }; - /** - * Converts this Int64Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int64Value - * @instance - * @returns {Object.} JSON object - */ - Int64Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Policy to JSON. + * @function toJSON + * @memberof google.iam.v1.Policy + * @instance + * @returns {Object.} JSON object + */ + Policy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for Int64Value - * @function getTypeUrl - * @memberof google.protobuf.Int64Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Int64Value"; - }; + /** + * Gets the default type url for Policy + * @function getTypeUrl + * @memberof google.iam.v1.Policy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Policy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Policy"; + }; - return Int64Value; - })(); + return Policy; + })(); - protobuf.UInt64Value = (function() { + v1.Binding = (function() { - /** - * Properties of a UInt64Value. - * @memberof google.protobuf - * @interface IUInt64Value - * @property {number|Long|null} [value] UInt64Value value - */ + /** + * Properties of a Binding. + * @memberof google.iam.v1 + * @interface IBinding + * @property {string|null} [role] Binding role + * @property {Array.|null} [members] Binding members + * @property {google.type.IExpr|null} [condition] Binding condition + */ - /** - * Constructs a new UInt64Value. - * @memberof google.protobuf - * @classdesc Represents a UInt64Value. - * @implements IUInt64Value - * @constructor - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set - */ - function UInt64Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new Binding. + * @memberof google.iam.v1 + * @classdesc Represents a Binding. + * @implements IBinding + * @constructor + * @param {google.iam.v1.IBinding=} [properties] Properties to set + */ + function Binding(properties) { + this.members = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * UInt64Value value. - * @member {number|Long} value - * @memberof google.protobuf.UInt64Value - * @instance - */ - UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + /** + * Binding role. + * @member {string} role + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.role = ""; - /** - * Creates a new UInt64Value instance using the specified properties. - * @function create - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set - * @returns {google.protobuf.UInt64Value} UInt64Value instance - */ - UInt64Value.create = function create(properties) { - return new UInt64Value(properties); - }; + /** + * Binding members. + * @member {Array.} members + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.members = $util.emptyArray; - /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt64Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); - return writer; - }; + /** + * Binding condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.Binding + * @instance + */ + Binding.prototype.condition = null; - /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new Binding instance using the specified properties. + * @function create + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding=} [properties] Properties to set + * @returns {google.iam.v1.Binding} Binding instance + */ + Binding.create = function create(properties) { + return new Binding(properties); + }; - /** - * Decodes a UInt64Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UInt64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UInt64Value} UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt64Value.decode = function 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.UInt64Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.uint64(); + /** + * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); + if (message.members != null && message.members.length) + for (var i = 0; i < message.members.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.IBinding} message Binding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Binding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Binding message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.role = reader.string(); + break; + } + case 2: { + if (!(message.members && message.members.length)) + message.members = []; + message.members.push(reader.string()); + break; + } + case 3: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UInt64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UInt64Value} UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt64Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Binding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.Binding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.Binding} Binding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Binding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a UInt64Value message. - * @function verify - * @memberof google.protobuf.UInt64Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UInt64Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; - return null; - }; + /** + * Verifies a Binding message. + * @function verify + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Binding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.members != null && message.hasOwnProperty("members")) { + if (!Array.isArray(message.members)) + return "members: array expected"; + for (var i = 0; i < message.members.length; ++i) + if (!$util.isString(message.members[i])) + return "members: string[] expected"; + } + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UInt64Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UInt64Value} UInt64Value - */ - UInt64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt64Value) - return object; - var message = new $root.google.protobuf.UInt64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = true; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); - return message; - }; + /** + * Creates a Binding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.Binding + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.Binding} Binding + */ + Binding.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.Binding) + return object; + var message = new $root.google.iam.v1.Binding(); + if (object.role != null) + message.role = String(object.role); + if (object.members) { + if (!Array.isArray(object.members)) + throw TypeError(".google.iam.v1.Binding.members: array expected"); + message.members = []; + for (var i = 0; i < object.members.length; ++i) + message.members[i] = String(object.members[i]); + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.Binding.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.UInt64Value} message UInt64Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UInt64Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; - return object; - }; + /** + * Creates a plain object from a Binding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.Binding + * @static + * @param {google.iam.v1.Binding} message Binding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Binding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.members = []; + if (options.defaults) { + object.role = ""; + object.condition = null; + } + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.members && message.members.length) { + object.members = []; + for (var j = 0; j < message.members.length; ++j) + object.members[j] = message.members[j]; + } + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; - /** - * Converts this UInt64Value to JSON. - * @function toJSON - * @memberof google.protobuf.UInt64Value - * @instance - * @returns {Object.} JSON object - */ - UInt64Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this Binding to JSON. + * @function toJSON + * @memberof google.iam.v1.Binding + * @instance + * @returns {Object.} JSON object + */ + Binding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for UInt64Value - * @function getTypeUrl - * @memberof google.protobuf.UInt64Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UInt64Value"; - }; + /** + * Gets the default type url for Binding + * @function getTypeUrl + * @memberof google.iam.v1.Binding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.Binding"; + }; - return UInt64Value; - })(); + return Binding; + })(); - protobuf.Int32Value = (function() { + v1.AuditConfig = (function() { - /** - * Properties of an Int32Value. - * @memberof google.protobuf - * @interface IInt32Value - * @property {number|null} [value] Int32Value value - */ + /** + * Properties of an AuditConfig. + * @memberof google.iam.v1 + * @interface IAuditConfig + * @property {string|null} [service] AuditConfig service + * @property {Array.|null} [auditLogConfigs] AuditConfig auditLogConfigs + */ - /** - * Constructs a new Int32Value. - * @memberof google.protobuf - * @classdesc Represents an Int32Value. - * @implements IInt32Value - * @constructor - * @param {google.protobuf.IInt32Value=} [properties] Properties to set - */ - function Int32Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new AuditConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfig. + * @implements IAuditConfig + * @constructor + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + */ + function AuditConfig(properties) { + this.auditLogConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Int32Value value. - * @member {number} value - * @memberof google.protobuf.Int32Value - * @instance - */ - Int32Value.prototype.value = 0; + /** + * AuditConfig service. + * @member {string} service + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.service = ""; - /** - * Creates a new Int32Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value=} [properties] Properties to set - * @returns {google.protobuf.Int32Value} Int32Value instance - */ - Int32Value.create = function create(properties) { - return new Int32Value(properties); - }; + /** + * AuditConfig auditLogConfigs. + * @member {Array.} auditLogConfigs + * @memberof google.iam.v1.AuditConfig + * @instance + */ + AuditConfig.prototype.auditLogConfigs = $util.emptyArray; - /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int32Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); - return writer; - }; + /** + * Creates a new AuditConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfig} AuditConfig instance + */ + AuditConfig.create = function create(properties) { + return new AuditConfig(properties); + }; - /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); + if (message.auditLogConfigs != null && message.auditLogConfigs.length) + for (var i = 0; i < message.auditLogConfigs.length; ++i) + $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Decodes an Int32Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Int32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Int32Value} Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int32Value.decode = function 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.Int32Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.int32(); + /** + * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.service = reader.string(); + break; + } + case 3: { + if (!(message.auditLogConfigs && message.auditLogConfigs.length)) + message.auditLogConfigs = []; + message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Int32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Int32Value} Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int32Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an AuditConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfig} AuditConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an Int32Value message. - * @function verify - * @memberof google.protobuf.Int32Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Int32Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; - return null; - }; + /** + * Verifies an AuditConfig message. + * @function verify + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) { + if (!Array.isArray(message.auditLogConfigs)) + return "auditLogConfigs: array expected"; + for (var i = 0; i < message.auditLogConfigs.length; ++i) { + var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]); + if (error) + return "auditLogConfigs." + error; + } + } + return null; + }; - /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int32Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int32Value} Int32Value - */ - Int32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int32Value) + /** + * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfig} AuditConfig + */ + AuditConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfig) + return object; + var message = new $root.google.iam.v1.AuditConfig(); + if (object.service != null) + message.service = String(object.service); + if (object.auditLogConfigs) { + if (!Array.isArray(object.auditLogConfigs)) + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected"); + message.auditLogConfigs = []; + for (var i = 0; i < object.auditLogConfigs.length; ++i) { + if (typeof object.auditLogConfigs[i] !== "object") + throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); + message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfig + * @static + * @param {google.iam.v1.AuditConfig} message AuditConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.auditLogConfigs = []; + if (options.defaults) + object.service = ""; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.auditLogConfigs && message.auditLogConfigs.length) { + object.auditLogConfigs = []; + for (var j = 0; j < message.auditLogConfigs.length; ++j) + object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options); + } return object; - var message = new $root.google.protobuf.Int32Value(); - if (object.value != null) - message.value = object.value | 0; - return message; - }; + }; - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.Int32Value} message Int32Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Int32Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; + /** + * Converts this AuditConfig to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfig + * @instance + * @returns {Object.} JSON object + */ + AuditConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this Int32Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int32Value - * @instance - * @returns {Object.} JSON object - */ - Int32Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for AuditConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditConfig"; + }; - /** - * Gets the default type url for Int32Value - * @function getTypeUrl - * @memberof google.protobuf.Int32Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Int32Value"; - }; + return AuditConfig; + })(); - return Int32Value; - })(); + v1.AuditLogConfig = (function() { - protobuf.UInt32Value = (function() { + /** + * Properties of an AuditLogConfig. + * @memberof google.iam.v1 + * @interface IAuditLogConfig + * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType + * @property {Array.|null} [exemptedMembers] AuditLogConfig exemptedMembers + */ - /** - * Properties of a UInt32Value. - * @memberof google.protobuf - * @interface IUInt32Value - * @property {number|null} [value] UInt32Value value - */ + /** + * Constructs a new AuditLogConfig. + * @memberof google.iam.v1 + * @classdesc Represents an AuditLogConfig. + * @implements IAuditLogConfig + * @constructor + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + */ + function AuditLogConfig(properties) { + this.exemptedMembers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new UInt32Value. - * @memberof google.protobuf - * @classdesc Represents a UInt32Value. - * @implements IUInt32Value - * @constructor - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set - */ - function UInt32Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * AuditLogConfig logType. + * @member {google.iam.v1.AuditLogConfig.LogType} logType + * @memberof google.iam.v1.AuditLogConfig + * @instance + */ + AuditLogConfig.prototype.logType = 0; - /** - * UInt32Value value. - * @member {number} value - * @memberof google.protobuf.UInt32Value - * @instance - */ - UInt32Value.prototype.value = 0; + /** + * AuditLogConfig exemptedMembers. + * @member {Array.} exemptedMembers + * @memberof google.iam.v1.AuditLogConfig + * @instance + */ + AuditLogConfig.prototype.exemptedMembers = $util.emptyArray; - /** - * Creates a new UInt32Value instance using the specified properties. - * @function create - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set - * @returns {google.protobuf.UInt32Value} UInt32Value instance - */ - UInt32Value.create = function create(properties) { - return new UInt32Value(properties); - }; + /** + * Creates a new AuditLogConfig instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance + */ + AuditLogConfig.create = function create(properties) { + return new AuditLogConfig(properties); + }; - /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt32Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); - return writer; - }; + /** + * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditLogConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType); + if (message.exemptedMembers != null && message.exemptedMembers.length) + for (var i = 0; i < message.exemptedMembers.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]); + return writer; + }; - /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a UInt32Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UInt32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UInt32Value} UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt32Value.decode = function 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.UInt32Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.uint32(); + /** + * Decodes an AuditLogConfig message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditLogConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.logType = reader.int32(); + break; + } + case 2: { + if (!(message.exemptedMembers && message.exemptedMembers.length)) + message.exemptedMembers = []; + message.exemptedMembers.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UInt32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UInt32Value} UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt32Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditLogConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a UInt32Value message. - * @function verify - * @memberof google.protobuf.UInt32Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UInt32Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; - return null; - }; + /** + * Verifies an AuditLogConfig message. + * @function verify + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditLogConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + switch (message.logType) { + default: + return "logType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) { + if (!Array.isArray(message.exemptedMembers)) + return "exemptedMembers: array expected"; + for (var i = 0; i < message.exemptedMembers.length; ++i) + if (!$util.isString(message.exemptedMembers[i])) + return "exemptedMembers: string[] expected"; + } + return null; + }; - /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UInt32Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UInt32Value} UInt32Value - */ - UInt32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt32Value) - return object; - var message = new $root.google.protobuf.UInt32Value(); - if (object.value != null) - message.value = object.value >>> 0; - return message; - }; + /** + * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig + */ + AuditLogConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditLogConfig) + return object; + var message = new $root.google.iam.v1.AuditLogConfig(); + switch (object.logType) { + default: + if (typeof object.logType === "number") { + message.logType = object.logType; + break; + } + break; + case "LOG_TYPE_UNSPECIFIED": + case 0: + message.logType = 0; + break; + case "ADMIN_READ": + case 1: + message.logType = 1; + break; + case "DATA_WRITE": + case 2: + message.logType = 2; + break; + case "DATA_READ": + case 3: + message.logType = 3; + break; + } + if (object.exemptedMembers) { + if (!Array.isArray(object.exemptedMembers)) + throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected"); + message.exemptedMembers = []; + for (var i = 0; i < object.exemptedMembers.length; ++i) + message.exemptedMembers[i] = String(object.exemptedMembers[i]); + } + return message; + }; - /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.UInt32Value} message UInt32Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UInt32Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; + /** + * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditLogConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.exemptedMembers = []; + if (options.defaults) + object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] === undefined ? message.logType : $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; + if (message.exemptedMembers && message.exemptedMembers.length) { + object.exemptedMembers = []; + for (var j = 0; j < message.exemptedMembers.length; ++j) + object.exemptedMembers[j] = message.exemptedMembers[j]; + } + return object; + }; - /** - * Converts this UInt32Value to JSON. - * @function toJSON - * @memberof google.protobuf.UInt32Value - * @instance - * @returns {Object.} JSON object - */ - UInt32Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this AuditLogConfig to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditLogConfig + * @instance + * @returns {Object.} JSON object + */ + AuditLogConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for UInt32Value - * @function getTypeUrl - * @memberof google.protobuf.UInt32Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UInt32Value"; - }; + /** + * Gets the default type url for AuditLogConfig + * @function getTypeUrl + * @memberof google.iam.v1.AuditLogConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditLogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.AuditLogConfig"; + }; - return UInt32Value; - })(); + /** + * LogType enum. + * @name google.iam.v1.AuditLogConfig.LogType + * @enum {number} + * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value + * @property {number} ADMIN_READ=1 ADMIN_READ value + * @property {number} DATA_WRITE=2 DATA_WRITE value + * @property {number} DATA_READ=3 DATA_READ value + */ + AuditLogConfig.LogType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADMIN_READ"] = 1; + values[valuesById[2] = "DATA_WRITE"] = 2; + values[valuesById[3] = "DATA_READ"] = 3; + return values; + })(); - protobuf.BoolValue = (function() { + return AuditLogConfig; + })(); - /** - * Properties of a BoolValue. - * @memberof google.protobuf - * @interface IBoolValue - * @property {boolean|null} [value] BoolValue value - */ + v1.PolicyDelta = (function() { - /** - * Constructs a new BoolValue. - * @memberof google.protobuf - * @classdesc Represents a BoolValue. - * @implements IBoolValue - * @constructor - * @param {google.protobuf.IBoolValue=} [properties] Properties to set - */ - function BoolValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a PolicyDelta. + * @memberof google.iam.v1 + * @interface IPolicyDelta + * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas + * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas + */ - /** - * BoolValue value. - * @member {boolean} value - * @memberof google.protobuf.BoolValue - * @instance - */ - BoolValue.prototype.value = false; + /** + * Constructs a new PolicyDelta. + * @memberof google.iam.v1 + * @classdesc Represents a PolicyDelta. + * @implements IPolicyDelta + * @constructor + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + */ + function PolicyDelta(properties) { + this.bindingDeltas = []; + this.auditConfigDeltas = []; + if (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 BoolValue instance using the specified properties. - * @function create - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue=} [properties] Properties to set - * @returns {google.protobuf.BoolValue} BoolValue instance - */ - BoolValue.create = function create(properties) { - return new BoolValue(properties); - }; + /** + * PolicyDelta bindingDeltas. + * @member {Array.} bindingDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.bindingDeltas = $util.emptyArray; - /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BoolValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); - return writer; - }; + /** + * PolicyDelta auditConfigDeltas. + * @member {Array.} auditConfigDeltas + * @memberof google.iam.v1.PolicyDelta + * @instance + */ + PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray; - /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BoolValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new PolicyDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set + * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance + */ + PolicyDelta.create = function create(properties) { + return new PolicyDelta(properties); + }; - /** - * Decodes a BoolValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.BoolValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.BoolValue} BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BoolValue.decode = function 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.BoolValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.bool(); + /** + * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bindingDeltas != null && message.bindingDeltas.length) + for (var i = 0; i < message.bindingDeltas.length; ++i) + $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) + for (var i = 0; i < message.auditConfigDeltas.length; ++i) + $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PolicyDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.bindingDeltas && message.bindingDeltas.length)) + message.bindingDeltas = []; + message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) + message.auditConfigDeltas = []; + message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.BoolValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.BoolValue} BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BoolValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a BoolValue message. - * @function verify - * @memberof google.protobuf.BoolValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BoolValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "boolean") - return "value: boolean expected"; - return null; - }; + /** + * Verifies a PolicyDelta message. + * @function verify + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PolicyDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) { + if (!Array.isArray(message.bindingDeltas)) + return "bindingDeltas: array expected"; + for (var i = 0; i < message.bindingDeltas.length; ++i) { + var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i]); + if (error) + return "bindingDeltas." + error; + } + } + if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) { + if (!Array.isArray(message.auditConfigDeltas)) + return "auditConfigDeltas: array expected"; + for (var i = 0; i < message.auditConfigDeltas.length; ++i) { + var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i]); + if (error) + return "auditConfigDeltas." + error; + } + } + return null; + }; - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.BoolValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.BoolValue} BoolValue - */ - BoolValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BoolValue) + /** + * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.PolicyDelta} PolicyDelta + */ + PolicyDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.PolicyDelta) + return object; + var message = new $root.google.iam.v1.PolicyDelta(); + if (object.bindingDeltas) { + if (!Array.isArray(object.bindingDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); + message.bindingDeltas = []; + for (var i = 0; i < object.bindingDeltas.length; ++i) { + if (typeof object.bindingDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); + message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); + } + } + if (object.auditConfigDeltas) { + if (!Array.isArray(object.auditConfigDeltas)) + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); + message.auditConfigDeltas = []; + for (var i = 0; i < object.auditConfigDeltas.length; ++i) { + if (typeof object.auditConfigDeltas[i] !== "object") + throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); + message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {google.iam.v1.PolicyDelta} message PolicyDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PolicyDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bindingDeltas = []; + object.auditConfigDeltas = []; + } + if (message.bindingDeltas && message.bindingDeltas.length) { + object.bindingDeltas = []; + for (var j = 0; j < message.bindingDeltas.length; ++j) + object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options); + } + if (message.auditConfigDeltas && message.auditConfigDeltas.length) { + object.auditConfigDeltas = []; + for (var j = 0; j < message.auditConfigDeltas.length; ++j) + object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options); + } return object; - var message = new $root.google.protobuf.BoolValue(); - if (object.value != null) - message.value = Boolean(object.value); - return message; - }; + }; - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.BoolValue} message BoolValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BoolValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = false; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; + /** + * Converts this PolicyDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.PolicyDelta + * @instance + * @returns {Object.} JSON object + */ + PolicyDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this BoolValue to JSON. - * @function toJSON - * @memberof google.protobuf.BoolValue - * @instance - * @returns {Object.} JSON object - */ - BoolValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for PolicyDelta + * @function getTypeUrl + * @memberof google.iam.v1.PolicyDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PolicyDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.PolicyDelta"; + }; - /** - * Gets the default type url for BoolValue - * @function getTypeUrl - * @memberof google.protobuf.BoolValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + return PolicyDelta; + })(); + + v1.BindingDelta = (function() { + + /** + * Properties of a BindingDelta. + * @memberof google.iam.v1 + * @interface IBindingDelta + * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action + * @property {string|null} [role] BindingDelta role + * @property {string|null} [member] BindingDelta member + * @property {google.type.IExpr|null} [condition] BindingDelta condition + */ + + /** + * Constructs a new BindingDelta. + * @memberof google.iam.v1 + * @classdesc Represents a BindingDelta. + * @implements IBindingDelta + * @constructor + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + */ + function BindingDelta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return typeUrlPrefix + "/google.protobuf.BoolValue"; - }; - return BoolValue; - })(); + /** + * BindingDelta action. + * @member {google.iam.v1.BindingDelta.Action} action + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.action = 0; - protobuf.StringValue = (function() { + /** + * BindingDelta role. + * @member {string} role + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.role = ""; - /** - * Properties of a StringValue. - * @memberof google.protobuf - * @interface IStringValue - * @property {string|null} [value] StringValue value - */ + /** + * BindingDelta member. + * @member {string} member + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.member = ""; - /** - * Constructs a new StringValue. - * @memberof google.protobuf - * @classdesc Represents a StringValue. - * @implements IStringValue - * @constructor - * @param {google.protobuf.IStringValue=} [properties] Properties to set - */ - function StringValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * BindingDelta condition. + * @member {google.type.IExpr|null|undefined} condition + * @memberof google.iam.v1.BindingDelta + * @instance + */ + BindingDelta.prototype.condition = null; - /** - * StringValue value. - * @member {string} value - * @memberof google.protobuf.StringValue - * @instance - */ - StringValue.prototype.value = ""; + /** + * Creates a new BindingDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set + * @returns {google.iam.v1.BindingDelta} BindingDelta instance + */ + BindingDelta.create = function create(properties) { + return new BindingDelta(properties); + }; - /** - * Creates a new StringValue instance using the specified properties. - * @function create - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue=} [properties] Properties to set - * @returns {google.protobuf.StringValue} StringValue instance - */ - StringValue.create = function create(properties) { - return new StringValue(properties); - }; + /** + * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); + if (message.member != null && Object.hasOwnProperty.call(message, "member")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - return writer; - }; + /** + * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a BindingDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.role = reader.string(); + break; + } + case 3: { + message.member = reader.string(); + break; + } + case 4: { + message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a StringValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.StringValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.StringValue} StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringValue.decode = function 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.StringValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); + /** + * Decodes a BindingDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.BindingDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.BindingDelta} BindingDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BindingDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BindingDelta message. + * @function verify + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BindingDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: break; } + if (message.role != null && message.hasOwnProperty("role")) + if (!$util.isString(message.role)) + return "role: string expected"; + if (message.member != null && message.hasOwnProperty("member")) + if (!$util.isString(message.member)) + return "member: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.type.Expr.verify(message.condition); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.BindingDelta} BindingDelta + */ + BindingDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.BindingDelta) + return object; + var message = new $root.google.iam.v1.BindingDelta(); + switch (object.action) { default: - reader.skipType(tag & 7); + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; break; } - } - return message; - }; + if (object.role != null) + message.role = String(object.role); + if (object.member != null) + message.member = String(object.member); + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); + message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; - /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.StringValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.StringValue} StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.BindingDelta + * @static + * @param {google.iam.v1.BindingDelta} message BindingDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BindingDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.role = ""; + object.member = ""; + object.condition = null; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; + if (message.role != null && message.hasOwnProperty("role")) + object.role = message.role; + if (message.member != null && message.hasOwnProperty("member")) + object.member = message.member; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.type.Expr.toObject(message.condition, options); + return object; + }; - /** - * Verifies a StringValue message. - * @function verify - * @memberof google.protobuf.StringValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; + /** + * Converts this BindingDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.BindingDelta + * @instance + * @returns {Object.} JSON object + */ + BindingDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.StringValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.StringValue} StringValue - */ - StringValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.StringValue) - return object; - var message = new $root.google.protobuf.StringValue(); - if (object.value != null) - message.value = String(object.value); - return message; - }; + /** + * Gets the default type url for BindingDelta + * @function getTypeUrl + * @memberof google.iam.v1.BindingDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BindingDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.iam.v1.BindingDelta"; + }; - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.StringValue} message StringValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; + /** + * Action enum. + * @name google.iam.v1.BindingDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + BindingDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); - /** - * Converts this StringValue to JSON. - * @function toJSON - * @memberof google.protobuf.StringValue - * @instance - * @returns {Object.} JSON object - */ - StringValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return BindingDelta; + })(); - /** - * Gets the default type url for StringValue - * @function getTypeUrl - * @memberof google.protobuf.StringValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + v1.AuditConfigDelta = (function() { + + /** + * Properties of an AuditConfigDelta. + * @memberof google.iam.v1 + * @interface IAuditConfigDelta + * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action + * @property {string|null} [service] AuditConfigDelta service + * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember + * @property {string|null} [logType] AuditConfigDelta logType + */ + + /** + * Constructs a new AuditConfigDelta. + * @memberof google.iam.v1 + * @classdesc Represents an AuditConfigDelta. + * @implements IAuditConfigDelta + * @constructor + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + */ + function AuditConfigDelta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - return typeUrlPrefix + "/google.protobuf.StringValue"; - }; - return StringValue; - })(); + /** + * AuditConfigDelta action. + * @member {google.iam.v1.AuditConfigDelta.Action} action + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.action = 0; - protobuf.BytesValue = (function() { + /** + * AuditConfigDelta service. + * @member {string} service + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.service = ""; - /** - * Properties of a BytesValue. - * @memberof google.protobuf - * @interface IBytesValue - * @property {Uint8Array|null} [value] BytesValue value - */ + /** + * AuditConfigDelta exemptedMember. + * @member {string} exemptedMember + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.exemptedMember = ""; - /** - * Constructs a new BytesValue. - * @memberof google.protobuf - * @classdesc Represents a BytesValue. - * @implements IBytesValue - * @constructor - * @param {google.protobuf.IBytesValue=} [properties] Properties to set - */ - function BytesValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * AuditConfigDelta logType. + * @member {string} logType + * @memberof google.iam.v1.AuditConfigDelta + * @instance + */ + AuditConfigDelta.prototype.logType = ""; - /** - * BytesValue value. - * @member {Uint8Array} value - * @memberof google.protobuf.BytesValue - * @instance - */ - BytesValue.prototype.value = $util.newBuffer([]); + /** + * Creates a new AuditConfigDelta instance using the specified properties. + * @function create + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance + */ + AuditConfigDelta.create = function create(properties) { + return new AuditConfigDelta(properties); + }; - /** - * Creates a new BytesValue instance using the specified properties. - * @function create - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue=} [properties] Properties to set - * @returns {google.protobuf.BytesValue} BytesValue instance - */ - BytesValue.create = function create(properties) { - return new BytesValue(properties); - }; + /** + * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); + if (message.service != null && Object.hasOwnProperty.call(message, "service")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); + if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); + if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); + return writer; + }; - /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BytesValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); - return writer; - }; + /** + * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BytesValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer. + * @function decode + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.action = reader.int32(); + break; + } + case 2: { + message.service = reader.string(); + break; + } + case 3: { + message.exemptedMember = reader.string(); + break; + } + case 4: { + message.logType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a BytesValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.BytesValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.BytesValue} BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BytesValue.decode = function 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.BytesValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.bytes(); + /** + * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditConfigDelta message. + * @function verify + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditConfigDelta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: break; } + if (message.service != null && message.hasOwnProperty("service")) + if (!$util.isString(message.service)) + return "service: string expected"; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + if (!$util.isString(message.exemptedMember)) + return "exemptedMember: string expected"; + if (message.logType != null && message.hasOwnProperty("logType")) + if (!$util.isString(message.logType)) + return "logType: string expected"; + return null; + }; + + /** + * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {Object.} object Plain object + * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta + */ + AuditConfigDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.iam.v1.AuditConfigDelta) + return object; + var message = new $root.google.iam.v1.AuditConfigDelta(); + switch (object.action) { default: - reader.skipType(tag & 7); + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ADD": + case 1: + message.action = 1; + break; + case "REMOVE": + case 2: + message.action = 2; break; } - } - return message; - }; - - /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.BytesValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.BytesValue} BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BytesValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BytesValue message. - * @function verify - * @memberof google.protobuf.BytesValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BytesValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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; - }; + if (object.service != null) + message.service = String(object.service); + if (object.exemptedMember != null) + message.exemptedMember = String(object.exemptedMember); + if (object.logType != null) + message.logType = String(object.logType); + return message; + }; - /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.BytesValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.BytesValue} BytesValue - */ - BytesValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BytesValue) + /** + * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditConfigDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.service = ""; + object.exemptedMember = ""; + object.logType = ""; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; + if (message.service != null && message.hasOwnProperty("service")) + object.service = message.service; + if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) + object.exemptedMember = message.exemptedMember; + if (message.logType != null && message.hasOwnProperty("logType")) + object.logType = message.logType; return object; - var message = new $root.google.protobuf.BytesValue(); - 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 a BytesValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.BytesValue} message BytesValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BytesValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); + /** + * Converts this AuditConfigDelta to JSON. + * @function toJSON + * @memberof google.iam.v1.AuditConfigDelta + * @instance + * @returns {Object.} JSON object + */ + AuditConfigDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditConfigDelta + * @function getTypeUrl + * @memberof google.iam.v1.AuditConfigDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - 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; - }; + return typeUrlPrefix + "/google.iam.v1.AuditConfigDelta"; + }; - /** - * Converts this BytesValue to JSON. - * @function toJSON - * @memberof google.protobuf.BytesValue - * @instance - * @returns {Object.} JSON object - */ - BytesValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Action enum. + * @name google.iam.v1.AuditConfigDelta.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ADD=1 ADD value + * @property {number} REMOVE=2 REMOVE value + */ + AuditConfigDelta.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ADD"] = 1; + values[valuesById[2] = "REMOVE"] = 2; + return values; + })(); - /** - * Gets the default type url for BytesValue - * @function getTypeUrl - * @memberof google.protobuf.BytesValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.BytesValue"; - }; + return AuditConfigDelta; + })(); - return BytesValue; + return v1; })(); - return protobuf; + return iam; })(); google.longrunning = (function() { @@ -26222,290 +61808,6 @@ 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; })(); diff --git a/packages/google-cloud-backupdr/protos/protos.json b/packages/google-cloud-backupdr/protos/protos.json index c0760fa65b1..f9f1f1014e7 100644 --- a/packages/google-cloud-backupdr/protos/protos.json +++ b/packages/google-cloud-backupdr/protos/protos.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": { @@ -11,7 +14,7 @@ "csharp_namespace": "Google.Cloud.BackupDR.V1", "go_package": "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb", "java_multiple_files": true, - "java_outer_classname": "BackupDRProto", + "java_outer_classname": "BackupvaultGceProto", "java_package": "com.google.cloud.backupdr.v1", "php_namespace": "Google\\Cloud\\BackupDR\\V1", "ruby_package": "Google::Cloud::BackupDR::V1" @@ -112,430 +115,5217 @@ } } ] + }, + "CreateBackupVault": { + "requestType": "CreateBackupVaultRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupVaults", + "(google.api.http).body": "backup_vault", + "(google.api.method_signature)": "parent,backup_vault,backup_vault_id", + "(google.longrunning.operation_info).response_type": "BackupVault", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/backupVaults", + "body": "backup_vault" + } + }, + { + "(google.api.method_signature)": "parent,backup_vault,backup_vault_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupVault", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListBackupVaults": { + "requestType": "ListBackupVaultsRequest", + "responseType": "ListBackupVaultsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupVaults", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/backupVaults" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "FetchUsableBackupVaults": { + "requestType": "FetchUsableBackupVaultsRequest", + "responseType": "FetchUsableBackupVaultsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetBackupVault": { + "requestType": "GetBackupVaultRequest", + "responseType": "BackupVault", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupVaults/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateBackupVault": { + "requestType": "UpdateBackupVaultRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}", + "(google.api.http).body": "backup_vault", + "(google.api.method_signature)": "backup_vault,update_mask", + "(google.longrunning.operation_info).response_type": "BackupVault", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}", + "body": "backup_vault" + } + }, + { + "(google.api.method_signature)": "backup_vault,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupVault", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteBackupVault": { + "requestType": "DeleteBackupVaultRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupVaults/*}", + "(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/*/backupVaults/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "TestIamPermissions": { + "requestType": "google.iam.v1.TestIamPermissionsRequest", + "responseType": "google.iam.v1.TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/locations/*/backupVaults/*}:testIamPermissions", + "(google.api.http).body": "*", + "(google.api.method_signature)": "resource, permissions" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=projects/*/locations/*/backupVaults/*}:testIamPermissions", + "body": "*" + } + }, + { + "(google.api.method_signature)": "resource, permissions" + } + ] + }, + "ListDataSources": { + "requestType": "ListDataSourcesRequest", + "responseType": "ListDataSourcesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDataSource": { + "requestType": "GetDataSourceRequest", + "responseType": "DataSource", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateDataSource": { + "requestType": "UpdateDataSourceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}", + "(google.api.http).body": "data_source", + "(google.api.method_signature)": "data_source,update_mask", + "(google.longrunning.operation_info).response_type": "DataSource", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}", + "body": "data_source" + } + }, + { + "(google.api.method_signature)": "data_source,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataSource", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "RemoveDataSource": { + "requestType": "RemoveDataSourceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:remove", + "(google.api.http).body": "*", + "(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)": { + "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:remove", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "SetInternalStatus": { + "requestType": "SetInternalStatusRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:setInternalStatus", + "(google.api.http).body": "*", + "(google.api.method_signature)": "data_source", + "(google.longrunning.operation_info).response_type": "SetInternalStatusResponse", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:setInternalStatus", + "body": "*" + } + }, + { + "(google.api.method_signature)": "data_source" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "SetInternalStatusResponse", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "InitiateBackup": { + "requestType": "InitiateBackupRequest", + "responseType": "InitiateBackupResponse", + "options": { + "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:initiateBackup", + "(google.api.http).body": "*", + "(google.api.method_signature)": "data_source" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:initiateBackup", + "body": "*" + } + }, + { + "(google.api.method_signature)": "data_source" + } + ] + }, + "AbandonBackup": { + "requestType": "AbandonBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:abandonBackup", + "(google.api.http).body": "*", + "(google.api.method_signature)": "data_source", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:abandonBackup", + "body": "*" + } + }, + { + "(google.api.method_signature)": "data_source" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "FinalizeBackup": { + "requestType": "FinalizeBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:finalizeBackup", + "(google.api.http).body": "*", + "(google.api.method_signature)": "data_source", + "(google.longrunning.operation_info).response_type": "Backup", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:finalizeBackup", + "body": "*" + } + }, + { + "(google.api.method_signature)": "data_source" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Backup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "FetchAccessToken": { + "requestType": "FetchAccessTokenRequest", + "responseType": "FetchAccessTokenResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBackups": { + "requestType": "ListBackupsRequest", + "responseType": "ListBackupsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetBackup": { + "requestType": "GetBackupRequest", + "responseType": "Backup", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateBackup": { + "requestType": "UpdateBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "(google.api.http).body": "backup", + "(google.api.method_signature)": "backup,update_mask", + "(google.longrunning.operation_info).response_type": "Backup", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "body": "backup" + } + }, + { + "(google.api.method_signature)": "backup,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Backup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteBackup": { + "requestType": "DeleteBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "Backup", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Backup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "RestoreBackup": { + "requestType": "RestoreBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "RestoreBackupResponse", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "RestoreBackupResponse", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateBackupPlan": { + "requestType": "CreateBackupPlanRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupPlans", + "(google.api.http).body": "backup_plan", + "(google.api.method_signature)": "parent,backup_plan,backup_plan_id", + "(google.longrunning.operation_info).response_type": "BackupPlan", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/backupPlans", + "body": "backup_plan" + } + }, + { + "(google.api.method_signature)": "parent,backup_plan,backup_plan_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPlan", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetBackupPlan": { + "requestType": "GetBackupPlanRequest", + "responseType": "BackupPlan", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupPlans/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupPlans/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBackupPlans": { + "requestType": "ListBackupPlansRequest", + "responseType": "ListBackupPlansResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupPlans", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/backupPlans" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteBackupPlan": { + "requestType": "DeleteBackupPlanRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupPlans/*}", + "(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/*/backupPlans/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateBackupPlanAssociation": { + "requestType": "CreateBackupPlanAssociationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", + "(google.api.http).body": "backup_plan_association", + "(google.api.method_signature)": "parent,backup_plan_association,backup_plan_association_id", + "(google.longrunning.operation_info).response_type": "BackupPlanAssociation", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", + "body": "backup_plan_association" + } + }, + { + "(google.api.method_signature)": "parent,backup_plan_association,backup_plan_association_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPlanAssociation", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetBackupPlanAssociation": { + "requestType": "GetBackupPlanAssociationRequest", + "responseType": "BackupPlanAssociation", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBackupPlanAssociations": { + "requestType": "ListBackupPlanAssociationsRequest", + "responseType": "ListBackupPlanAssociationsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteBackupPlanAssociation": { + "requestType": "DeleteBackupPlanAssociationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}", + "(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/*/backupPlanAssociations/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "TriggerBackup": { + "requestType": "TriggerBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,rule_id", + "(google.longrunning.operation_info).response_type": "BackupPlanAssociation", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name,rule_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPlanAssociation", + "metadata_type": "OperationMetadata" + } + } + ] + } + } + }, + "NetworkConfig": { + "fields": { + "network": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "peeringMode": { + "type": "PeeringMode", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "PeeringMode": { + "values": { + "PEERING_MODE_UNSPECIFIED": 0, + "PRIVATE_SERVICE_ACCESS": 1 + } + } + } + }, + "ManagementURI": { + "fields": { + "webUi": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "api": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "WorkforceIdentityBasedManagementURI": { + "fields": { + "firstPartyManagementUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "thirdPartyManagementUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "WorkforceIdentityBasedOAuth2ClientID": { + "fields": { + "firstPartyOauth2ClientId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "thirdPartyOauth2ClientId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ManagementServer": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/ManagementServer", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/managementServers/{managementserver}", + "(google.api.resource).plural": "managementServers", + "(google.api.resource).singular": "managementServer" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "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" + } + }, + "type": { + "type": "InstanceType", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "managementUri": { + "type": "ManagementURI", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "workforceIdentityBasedManagementUri": { + "type": "WorkforceIdentityBasedManagementURI", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "InstanceState", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "networks": { + "rule": "repeated", + "type": "NetworkConfig", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "etag": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "oauth2ClientId": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "workforceIdentityBasedOauth2ClientId": { + "type": "WorkforceIdentityBasedOAuth2ClientID", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "baProxyUri": { + "rule": "repeated", + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzs": { + "type": "google.protobuf.BoolValue", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzi": { + "type": "bool", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "InstanceType": { + "values": { + "INSTANCE_TYPE_UNSPECIFIED": 0, + "BACKUP_RESTORE": 1 + } + }, + "InstanceState": { + "values": { + "INSTANCE_STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "UPDATING": 3, + "DELETING": 4, + "REPAIRING": 5, + "MAINTENANCE": 6, + "ERROR": 7 + } + } + } + }, + "ListManagementServersRequest": { + "oneofs": { + "_filter": { + "oneof": [ + "filter" + ] + }, + "_orderBy": { + "oneof": [ + "orderBy" + ] + } + }, + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ListManagementServersResponse": { + "fields": { + "managementServers": { + "rule": "repeated", + "type": "ManagementServer", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetManagementServerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" + } + } + } + }, + "CreateManagementServerRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" + } + }, + "managementServerId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "managementServer": { + "type": "ManagementServer", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteManagementServerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" + } + }, + "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" + } + }, + "additionalInfo": { + "keyType": "string", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "BackupPlan": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/BackupPlan", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPlans/{backup_plan}", + "(google.api.resource).plural": "backupPlans", + "(google.api.resource).singular": "backupPlan" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupRules": { + "rule": "repeated", + "type": "BackupRule", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceType": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "etag": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupVault": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" + } + }, + "backupVaultServiceAccount": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "INACTIVE": 4 + } + } + } + }, + "BackupRule": { + "oneofs": { + "backupScheduleOneof": { + "oneof": [ + "standardSchedule" + ] + } + }, + "fields": { + "ruleId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "backupRetentionDays": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "standardSchedule": { + "type": "StandardSchedule", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "StandardSchedule": { + "fields": { + "recurrenceType": { + "type": "RecurrenceType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "hourlyFrequency": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "daysOfWeek": { + "rule": "repeated", + "type": "google.type.DayOfWeek", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "daysOfMonth": { + "rule": "repeated", + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "weekDayOfMonth": { + "type": "WeekDayOfMonth", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "months": { + "rule": "repeated", + "type": "google.type.Month", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupWindow": { + "type": "BackupWindow", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "timeZone": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "RecurrenceType": { + "values": { + "RECURRENCE_TYPE_UNSPECIFIED": 0, + "HOURLY": 1, + "DAILY": 2, + "WEEKLY": 3, + "MONTHLY": 4, + "YEARLY": 5 + } + } + } + }, + "BackupWindow": { + "fields": { + "startHourOfDay": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "endHourOfDay": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "WeekDayOfMonth": { + "fields": { + "weekOfMonth": { + "type": "WeekOfMonth", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dayOfWeek": { + "type": "google.type.DayOfWeek", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "WeekOfMonth": { + "values": { + "WEEK_OF_MONTH_UNSPECIFIED": 0, + "FIRST": 1, + "SECOND": 2, + "THIRD": 3, + "FOURTH": 4, + "LAST": 5 + } + } + } + }, + "CreateBackupPlanRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlan" + } + }, + "backupPlanId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupPlan": { + "type": "BackupPlan", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlansRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlan" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlansResponse": { + "fields": { + "backupPlans": { + "rule": "repeated", + "type": "BackupPlan", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetBackupPlanRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + } + } + }, + "DeleteBackupPlanRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "BackupPlanAssociation": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/BackupPlanAssociation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}", + "(google.api.resource).plural": "backupPlanAssociations", + "(google.api.resource).singular": "backupPlanAssociation" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceType": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "resource": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupPlan": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rulesConfigInfo": { + "rule": "repeated", + "type": "RuleConfigInfo", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataSource": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "INACTIVE": 4 + } + } + } + }, + "RuleConfigInfo": { + "fields": { + "ruleId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastBackupState": { + "type": "LastBackupState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastBackupError": { + "type": "google.rpc.Status", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastSuccessfulBackupConsistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "LastBackupState": { + "values": { + "LAST_BACKUP_STATE_UNSPECIFIED": 0, + "FIRST_BACKUP_PENDING": 1, + "PERMISSION_DENIED": 2, + "SUCCEEDED": 3, + "FAILED": 4 + } + } + } + }, + "CreateBackupPlanAssociationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "backupPlanAssociationId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupPlanAssociation": { + "type": "BackupPlanAssociation", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlanAssociationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlanAssociationsResponse": { + "fields": { + "backupPlanAssociations": { + "rule": "repeated", + "type": "BackupPlanAssociation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetBackupPlanAssociationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + } + } + }, + "DeleteBackupPlanAssociationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "TriggerBackupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "ruleId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "BackupVault": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/BackupVault", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}", + "(google.api.resource).plural": "backupVaults", + "(google.api.resource).singular": "backupVault" + }, + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_createTime": { + "oneof": [ + "createTime" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + }, + "_backupMinimumEnforcedRetentionDuration": { + "oneof": [ + "backupMinimumEnforcedRetentionDuration" + ] + }, + "_deletable": { + "oneof": [ + "deletable" + ] + }, + "_etag": { + "oneof": [ + "etag" + ] + }, + "_effectiveTime": { + "oneof": [ + "effectiveTime" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "backupMinimumEnforcedRetentionDuration": { + "type": "google.protobuf.Duration", + "id": 20, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "deletable": { + "type": "bool", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "etag": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "state": { + "type": "State", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "effectiveTime": { + "type": "google.protobuf.Timestamp", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "backupCount": { + "type": "int64", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceAccount": { + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "totalStoredBytes": { + "type": "int64", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uid": { + "type": "string", + "id": 21, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "accessRestriction": { + "type": "AccessRestriction", + "id": 24, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "ERROR": 4 + } + }, + "AccessRestriction": { + "values": { + "ACCESS_RESTRICTION_UNSPECIFIED": 0, + "WITHIN_PROJECT": 1, + "WITHIN_ORGANIZATION": 2, + "UNRESTRICTED": 3 + } + } + } + }, + "DataSource": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/DataSource", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}", + "(google.api.resource).plural": "dataSources", + "(google.api.resource).singular": "dataSource" + }, + "oneofs": { + "_createTime": { + "oneof": [ + "createTime" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + }, + "_backupCount": { + "oneof": [ + "backupCount" + ] + }, + "_etag": { + "oneof": [ + "etag" + ] + }, + "_totalStoredBytes": { + "oneof": [ + "totalStoredBytes" + ] + }, + "sourceResource": { + "oneof": [ + "dataSourceGcpResource", + "dataSourceBackupApplianceApplication" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "state": { + "type": "State", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "backupCount": { + "type": "int64", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "etag": { + "type": "string", + "id": 14, + "options": { + "proto3_optional": true + } + }, + "totalStoredBytes": { + "type": "int64", + "id": 23, + "options": { + "proto3_optional": true + } + }, + "configState": { + "type": "BackupConfigState", + "id": 24, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupConfigInfo": { + "type": "BackupConfigInfo", + "id": 25, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataSourceGcpResource": { + "type": "DataSourceGcpResource", + "id": 26 + }, + "dataSourceBackupApplianceApplication": { + "type": "DataSourceBackupApplianceApplication", + "id": 27 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "ERROR": 4 + } + } + } + }, + "BackupConfigInfo": { + "oneofs": { + "backupConfig": { + "oneof": [ + "gcpBackupConfig", + "backupApplianceBackupConfig" + ] + } + }, + "fields": { + "lastBackupState": { + "type": "LastBackupState", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastSuccessfulBackupConsistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastBackupError": { + "type": "google.rpc.Status", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gcpBackupConfig": { + "type": "GcpBackupConfig", + "id": 4 + }, + "backupApplianceBackupConfig": { + "type": "BackupApplianceBackupConfig", + "id": 5 + } + }, + "nested": { + "LastBackupState": { + "values": { + "LAST_BACKUP_STATE_UNSPECIFIED": 0, + "FIRST_BACKUP_PENDING": 1, + "SUCCEEDED": 2, + "FAILED": 3, + "PERMISSION_DENIED": 4 + } + } + } + }, + "GcpBackupConfig": { + "fields": { + "backupPlan": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "backupPlanDescription": { + "type": "string", + "id": 2 + }, + "backupPlanAssociation": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "backupPlanRules": { + "rule": "repeated", + "type": "string", + "id": 4 + } + } + }, + "BackupApplianceBackupConfig": { + "fields": { + "backupApplianceName": { + "type": "string", + "id": 1 + }, + "backupApplianceId": { + "type": "int64", + "id": 2 + }, + "slaId": { + "type": "int64", + "id": 3 + }, + "applicationName": { + "type": "string", + "id": 4 + }, + "hostName": { + "type": "string", + "id": 5 + }, + "sltName": { + "type": "string", + "id": 6 + }, + "slpName": { + "type": "string", + "id": 7 + } + } + }, + "DataSourceGcpResource": { + "oneofs": { + "gcpResourceProperties": { + "oneof": [ + "computeInstanceDatasourceProperties" + ] + } + }, + "fields": { + "gcpResourcename": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "location": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "computeInstanceDatasourceProperties": { + "type": "ComputeInstanceDataSourceProperties", + "id": 4 + } + } + }, + "DataSourceBackupApplianceApplication": { + "fields": { + "applicationName": { + "type": "string", + "id": 1 + }, + "backupAppliance": { + "type": "string", + "id": 2 + }, + "applianceId": { + "type": "int64", + "id": 3 + }, + "type": { + "type": "string", + "id": 4 + }, + "applicationId": { + "type": "int64", + "id": 8 + }, + "hostname": { + "type": "string", + "id": 6 + }, + "hostId": { + "type": "int64", + "id": 7 + } + } + }, + "ServiceLockInfo": { + "fields": { + "operation": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "BackupApplianceLockInfo": { + "oneofs": { + "lockSource": { + "oneof": [ + "jobName", + "backupImage", + "slaId" + ] + } + }, + "fields": { + "backupApplianceId": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupApplianceName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "lockReason": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "jobName": { + "type": "string", + "id": 6 + }, + "backupImage": { + "type": "string", + "id": 7 + }, + "slaId": { + "type": "int64", + "id": 8 + } + } + }, + "BackupLock": { + "oneofs": { + "ClientLockInfo": { + "oneof": [ + "backupApplianceLockInfo", + "serviceLockInfo" + ] + } + }, + "fields": { + "lockUntilTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupApplianceLockInfo": { + "type": "BackupApplianceLockInfo", + "id": 3 + }, + "serviceLockInfo": { + "type": "ServiceLockInfo", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Backup": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/Backup", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}", + "(google.api.resource).plural": "backups", + "(google.api.resource).singular": "backup" + }, + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_createTime": { + "oneof": [ + "createTime" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + }, + "_enforcedRetentionEndTime": { + "oneof": [ + "enforcedRetentionEndTime" + ] + }, + "_expireTime": { + "oneof": [ + "expireTime" + ] + }, + "_consistencyTime": { + "oneof": [ + "consistencyTime" + ] + }, + "_etag": { + "oneof": [ + "etag" + ] + }, + "backupProperties": { + "oneof": [ + "computeInstanceBackupProperties", + "backupApplianceBackupProperties" + ] + }, + "planInfo": { + "oneof": [ + "gcpBackupPlanInfo" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "enforcedRetentionEndTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "consistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "etag": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "state": { + "type": "State", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceLocks": { + "rule": "repeated", + "type": "BackupLock", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupApplianceLocks": { + "rule": "repeated", + "type": "BackupLock", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "computeInstanceBackupProperties": { + "type": "ComputeInstanceBackupProperties", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupApplianceBackupProperties": { + "type": "BackupApplianceBackupProperties", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupType": { + "type": "BackupType", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gcpBackupPlanInfo": { + "type": "GCPBackupPlanInfo", + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceSizeBytes": { + "type": "int64", + "id": 23, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "ERROR": 4 + } + }, + "BackupType": { + "values": { + "BACKUP_TYPE_UNSPECIFIED": 0, + "SCHEDULED": 1, + "ON_DEMAND": 2 + } + }, + "GCPBackupPlanInfo": { + "fields": { + "backupPlan": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "backupPlanRuleId": { + "type": "string", + "id": 2 + } + } + } + } + }, + "CreateBackupVaultRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" + } + }, + "backupVaultId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupVault": { + "type": "BackupVault", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupVaultsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "view": { + "type": "BackupVaultView", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupVaultsResponse": { + "fields": { + "backupVaults": { + "rule": "repeated", + "type": "BackupVault", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "FetchUsableBackupVaultsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchUsableBackupVaultsResponse": { + "fields": { + "backupVaults": { + "rule": "repeated", + "type": "BackupVault", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetBackupVaultRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" + } + }, + "view": { + "type": "BackupVaultView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateBackupVaultRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupVault": { + "type": "BackupVault", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(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" + } + } + } + }, + "DeleteBackupVaultRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "force": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "etag": { + "type": "string", + "id": 4 + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataSourcesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/DataSource" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataSourcesResponse": { + "fields": { + "dataSources": { + "rule": "repeated", + "type": "DataSource", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetDataSourceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + } + } + }, + "UpdateDataSourceRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataSource": { + "type": "DataSource", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RemoveDataSourceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SetInternalStatusRequest": { + "fields": { + "dataSource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "value": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupConfigState": { + "type": "BackupConfigState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SetInternalStatusResponse": { + "fields": {} + }, + "InitiateBackupRequest": { + "fields": { + "dataSource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupId": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "InitiateBackupResponse": { + "fields": { + "backup": { + "type": "string", + "id": 1 + }, + "newBackupGenerationId": { + "type": "int32", + "id": 2 + }, + "baseBackupGenerationId": { + "type": "int32", + "id": 3 + } + } + }, + "AbandonBackupRequest": { + "fields": { + "dataSource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FinalizeBackupRequest": { + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_consistencyTime": { + "oneof": [ + "consistencyTime" + ] + }, + "_recoveryRangeStartTime": { + "oneof": [ + "recoveryRangeStartTime" + ] + }, + "_recoveryRangeEndTime": { + "oneof": [ + "recoveryRangeEndTime" + ] + }, + "_retentionDuration": { + "oneof": [ + "retentionDuration" + ] + } + }, + "fields": { + "dataSource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "consistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupId": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "recoveryRangeStartTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "proto3_optional": true + } + }, + "recoveryRangeEndTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "retentionDuration": { + "type": "google.protobuf.Duration", + "id": 9, + "options": { + "proto3_optional": true + } + } + } + }, + "FetchAccessTokenRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + }, + "generationId": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "FetchAccessTokenResponse": { + "fields": { + "readLocation": { + "type": "string", + "id": 1 + }, + "writeLocation": { + "type": "string", + "id": 2 + }, + "token": { + "type": "string", + "id": 3 + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + } + } + }, + "ListBackupsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/Backup" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "view": { + "type": "BackupView", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupsResponse": { + "fields": { + "backups": { + "rule": "repeated", + "type": "Backup", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetBackupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" + } + }, + "view": { + "type": "BackupView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateBackupRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backup": { + "type": "Backup", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteBackupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RestoreBackupRequest": { + "oneofs": { + "targetEnvironment": { + "oneof": [ + "computeInstanceTargetEnvironment" + ] + }, + "instanceProperties": { + "oneof": [ + "computeInstanceRestoreProperties" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "computeInstanceTargetEnvironment": { + "type": "ComputeInstanceTargetEnvironment", + "id": 3 + }, + "computeInstanceRestoreProperties": { + "type": "ComputeInstanceRestoreProperties", + "id": 4 + } + } + }, + "RestoreBackupResponse": { + "fields": { + "targetResource": { + "type": "TargetResource", + "id": 1 + } + } + }, + "TargetResource": { + "oneofs": { + "targetResourceInfo": { + "oneof": [ + "gcpResource" + ] + } + }, + "fields": { + "gcpResource": { + "type": "GcpResource", + "id": 1 + } + } + }, + "GcpResource": { + "fields": { + "gcpResourcename": { + "type": "string", + "id": 1 + }, + "location": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + } + } + }, + "BackupConfigState": { + "values": { + "BACKUP_CONFIG_STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "PASSIVE": 2 + } + }, + "BackupView": { + "values": { + "BACKUP_VIEW_UNSPECIFIED": 0, + "BACKUP_VIEW_BASIC": 1, + "BACKUP_VIEW_FULL": 2 + } + }, + "BackupVaultView": { + "values": { + "BACKUP_VAULT_VIEW_UNSPECIFIED": 0, + "BACKUP_VAULT_VIEW_BASIC": 1, + "BACKUP_VAULT_VIEW_FULL": 2 + } + }, + "BackupApplianceBackupProperties": { + "oneofs": { + "_generationId": { + "oneof": [ + "generationId" + ] + }, + "_finalizeTime": { + "oneof": [ + "finalizeTime" + ] + }, + "_recoveryRangeStartTime": { + "oneof": [ + "recoveryRangeStartTime" + ] + }, + "_recoveryRangeEndTime": { + "oneof": [ + "recoveryRangeEndTime" + ] + } + }, + "fields": { + "generationId": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "finalizeTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "recoveryRangeStartTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "recoveryRangeEndTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ComputeInstanceBackupProperties": { + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_tags": { + "oneof": [ + "tags" + ] + }, + "_machineType": { + "oneof": [ + "machineType" + ] + }, + "_canIpForward": { + "oneof": [ + "canIpForward" + ] + }, + "_metadata": { + "oneof": [ + "metadata" + ] + }, + "_scheduling": { + "oneof": [ + "scheduling" + ] + }, + "_minCpuPlatform": { + "oneof": [ + "minCpuPlatform" + ] + }, + "_keyRevocationActionType": { + "oneof": [ + "keyRevocationActionType" + ] + }, + "_sourceInstance": { + "oneof": [ + "sourceInstance" + ] + } + }, + "fields": { + "description": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "tags": { + "type": "Tags", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "machineType": { + "type": "string", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "canIpForward": { + "type": "bool", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "networkInterface": { + "rule": "repeated", + "type": "NetworkInterface", + "id": 5 + }, + "disk": { + "rule": "repeated", + "type": "AttachedDisk", + "id": 6 + }, + "metadata": { + "type": "Metadata", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "serviceAccount": { + "rule": "repeated", + "type": "ServiceAccount", + "id": 8 + }, + "scheduling": { + "type": "Scheduling", + "id": 9, + "options": { + "proto3_optional": true + } + }, + "guestAccelerator": { + "rule": "repeated", + "type": "AcceleratorConfig", + "id": 10 + }, + "minCpuPlatform": { + "type": "string", + "id": 11, + "options": { + "proto3_optional": true + } + }, + "keyRevocationActionType": { + "type": "KeyRevocationActionType", + "id": 12, + "options": { + "proto3_optional": true + } + }, + "sourceInstance": { + "type": "string", + "id": 13, + "options": { + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 14 + } + } + }, + "ComputeInstanceRestoreProperties": { + "oneofs": { + "_name": { + "oneof": [ + "name" + ] + }, + "_advancedMachineFeatures": { + "oneof": [ + "advancedMachineFeatures" + ] + }, + "_canIpForward": { + "oneof": [ + "canIpForward" + ] + }, + "_confidentialInstanceConfig": { + "oneof": [ + "confidentialInstanceConfig" + ] + }, + "_deletionProtection": { + "oneof": [ + "deletionProtection" + ] + }, + "_description": { + "oneof": [ + "description" + ] + }, + "_displayDevice": { + "oneof": [ + "displayDevice" + ] + }, + "_hostname": { + "oneof": [ + "hostname" + ] + }, + "_instanceEncryptionKey": { + "oneof": [ + "instanceEncryptionKey" + ] + }, + "_keyRevocationActionType": { + "oneof": [ + "keyRevocationActionType" + ] + }, + "_machineType": { + "oneof": [ + "machineType" + ] + }, + "_metadata": { + "oneof": [ + "metadata" + ] + }, + "_minCpuPlatform": { + "oneof": [ + "minCpuPlatform" + ] + }, + "_networkPerformanceConfig": { + "oneof": [ + "networkPerformanceConfig" + ] + }, + "_params": { + "oneof": [ + "params" + ] + }, + "_privateIpv6GoogleAccess": { + "oneof": [ + "privateIpv6GoogleAccess" + ] + }, + "_allocationAffinity": { + "oneof": [ + "allocationAffinity" + ] + }, + "_scheduling": { + "oneof": [ + "scheduling" + ] + }, + "_tags": { + "oneof": [ + "tags" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "advancedMachineFeatures": { + "type": "AdvancedMachineFeatures", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "canIpForward": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "confidentialInstanceConfig": { + "type": "ConfidentialInstanceConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "deletionProtection": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "description": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "disks": { + "rule": "repeated", + "type": "AttachedDisk", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayDevice": { + "type": "DisplayDevice", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "guestAccelerators": { + "rule": "repeated", + "type": "AcceleratorConfig", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "hostname": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "instanceEncryptionKey": { + "type": "CustomerEncryptionKey", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "keyRevocationActionType": { + "type": "KeyRevocationActionType", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "machineType": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "metadata": { + "type": "Metadata", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "minCpuPlatform": { + "type": "string", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "networkInterfaces": { + "rule": "repeated", + "type": "NetworkInterface", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "networkPerformanceConfig": { + "type": "NetworkPerformanceConfig", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "params": { + "type": "InstanceParams", + "id": 19, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY", + "proto3_optional": true + } + }, + "privateIpv6GoogleAccess": { + "type": "InstancePrivateIpv6GoogleAccess", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "allocationAffinity": { + "type": "AllocationAffinity", + "id": 21, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "resourcePolicies": { + "rule": "repeated", + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "scheduling": { + "type": "Scheduling", + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "serviceAccounts": { + "rule": "repeated", + "type": "ServiceAccount", + "id": 24, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tags": { + "type": "Tags", + "id": 26, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "InstancePrivateIpv6GoogleAccess": { + "values": { + "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": 0, + "INHERIT_FROM_SUBNETWORK": 1, + "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE": 2, + "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE": 3 + } + } + } + }, + "ComputeInstanceTargetEnvironment": { + "fields": { + "project": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ComputeInstanceDataSourceProperties": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "machineType": { + "type": "string", + "id": 3 + }, + "totalDiskCount": { + "type": "int64", + "id": 4 + }, + "totalDiskSizeGb": { + "type": "int64", + "id": 5 + } + } + }, + "AdvancedMachineFeatures": { + "oneofs": { + "_enableNestedVirtualization": { + "oneof": [ + "enableNestedVirtualization" + ] + }, + "_threadsPerCore": { + "oneof": [ + "threadsPerCore" + ] + }, + "_visibleCoreCount": { + "oneof": [ + "visibleCoreCount" + ] + }, + "_enableUefiNetworking": { + "oneof": [ + "enableUefiNetworking" + ] + } + }, + "fields": { + "enableNestedVirtualization": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "threadsPerCore": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "visibleCoreCount": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "enableUefiNetworking": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ConfidentialInstanceConfig": { + "oneofs": { + "_enableConfidentialCompute": { + "oneof": [ + "enableConfidentialCompute" + ] + } + }, + "fields": { + "enableConfidentialCompute": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "DisplayDevice": { + "oneofs": { + "_enableDisplay": { + "oneof": [ + "enableDisplay" + ] + } + }, + "fields": { + "enableDisplay": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "AcceleratorConfig": { + "oneofs": { + "_acceleratorType": { + "oneof": [ + "acceleratorType" + ] + }, + "_acceleratorCount": { + "oneof": [ + "acceleratorCount" + ] + } + }, + "fields": { + "acceleratorType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "acceleratorCount": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "CustomerEncryptionKey": { + "oneofs": { + "key": { + "oneof": [ + "rawKey", + "rsaEncryptedKey", + "kmsKeyName" + ] + }, + "_kmsKeyServiceAccount": { + "oneof": [ + "kmsKeyServiceAccount" + ] + } + }, + "fields": { + "rawKey": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "rsaEncryptedKey": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kmsKeyName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kmsKeyServiceAccount": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "Entry": { + "oneofs": { + "_key": { + "oneof": [ + "key" + ] + }, + "_value": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "Metadata": { + "fields": { + "items": { + "rule": "repeated", + "type": "Entry", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, - "NetworkConfig": { + "NetworkInterface": { + "oneofs": { + "_network": { + "oneof": [ + "network" + ] + }, + "_subnetwork": { + "oneof": [ + "subnetwork" + ] + }, + "_ipAddress": { + "oneof": [ + "ipAddress" + ] + }, + "_ipv6Address": { + "oneof": [ + "ipv6Address" + ] + }, + "_internalIpv6PrefixLength": { + "oneof": [ + "internalIpv6PrefixLength" + ] + }, + "_name": { + "oneof": [ + "name" + ] + }, + "_stackType": { + "oneof": [ + "stackType" + ] + }, + "_ipv6AccessType": { + "oneof": [ + "ipv6AccessType" + ] + }, + "_queueCount": { + "oneof": [ + "queueCount" + ] + }, + "_nicType": { + "oneof": [ + "nicType" + ] + }, + "_networkAttachment": { + "oneof": [ + "networkAttachment" + ] + } + }, "fields": { "network": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "peeringMode": { - "type": "PeeringMode", + "subnetwork": { + "type": "string", "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "ipAddress": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "IPV4", + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "ipv6Address": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "IPV6", + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "internalIpv6PrefixLength": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "name": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "accessConfigs": { + "rule": "repeated", + "type": "AccessConfig", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ipv6AccessConfigs": { + "rule": "repeated", + "type": "AccessConfig", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "aliasIpRanges": { + "rule": "repeated", + "type": "AliasIpRange", + "id": 9, "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "stackType": { + "type": "StackType", + "id": 10, + "options": { + "proto3_optional": true + } + }, + "ipv6AccessType": { + "type": "Ipv6AccessType", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "queueCount": { + "type": "int32", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "nicType": { + "type": "NicType", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "networkAttachment": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } } }, "nested": { - "PeeringMode": { + "StackType": { "values": { - "PEERING_MODE_UNSPECIFIED": 0, - "PRIVATE_SERVICE_ACCESS": 1 + "STACK_TYPE_UNSPECIFIED": 0, + "IPV4_ONLY": 1, + "IPV4_IPV6": 2 + } + }, + "Ipv6AccessType": { + "values": { + "UNSPECIFIED_IPV6_ACCESS_TYPE": 0, + "INTERNAL": 1, + "EXTERNAL": 2 + } + }, + "NicType": { + "values": { + "NIC_TYPE_UNSPECIFIED": 0, + "VIRTIO_NET": 1, + "GVNIC": 2 } } } }, - "ManagementURI": { + "NetworkPerformanceConfig": { + "oneofs": { + "_totalEgressBandwidthTier": { + "oneof": [ + "totalEgressBandwidthTier" + ] + } + }, "fields": { - "webUi": { - "type": "string", + "totalEgressBandwidthTier": { + "type": "Tier", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } + } + }, + "nested": { + "Tier": { + "values": { + "TIER_UNSPECIFIED": 0, + "DEFAULT": 1, + "TIER_1": 2 + } + } + } + }, + "AccessConfig": { + "oneofs": { + "_type": { + "oneof": [ + "type" + ] }, - "api": { + "_name": { + "oneof": [ + "name" + ] + }, + "_externalIp": { + "oneof": [ + "externalIp" + ] + }, + "_externalIpv6": { + "oneof": [ + "externalIpv6" + ] + }, + "_externalIpv6PrefixLength": { + "oneof": [ + "externalIpv6PrefixLength" + ] + }, + "_setPublicPtr": { + "oneof": [ + "setPublicPtr" + ] + }, + "_publicPtrDomainName": { + "oneof": [ + "publicPtrDomainName" + ] + }, + "_networkTier": { + "oneof": [ + "networkTier" + ] + } + }, + "fields": { + "type": { + "type": "AccessType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "name": { "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "externalIp": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "externalIpv6": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "externalIpv6PrefixLength": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "setPublicPtr": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "publicPtrDomainName": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "networkTier": { + "type": "NetworkTier", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "AccessType": { + "values": { + "ACCESS_TYPE_UNSPECIFIED": 0, + "ONE_TO_ONE_NAT": 1, + "DIRECT_IPV6": 2 + } + }, + "NetworkTier": { + "values": { + "NETWORK_TIER_UNSPECIFIED": 0, + "PREMIUM": 1, + "STANDARD": 2 } } } }, - "WorkforceIdentityBasedManagementURI": { + "AliasIpRange": { + "oneofs": { + "_ipCidrRange": { + "oneof": [ + "ipCidrRange" + ] + }, + "_subnetworkRangeName": { + "oneof": [ + "subnetworkRangeName" + ] + } + }, "fields": { - "firstPartyManagementUri": { + "ipCidrRange": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "thirdPartyManagementUri": { + "subnetworkRangeName": { "type": "string", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } } } }, - "WorkforceIdentityBasedOAuth2ClientID": { + "InstanceParams": { "fields": { - "firstPartyOauth2ClientId": { + "resourceManagerTags": { + "keyType": "string", "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "thirdPartyOauth2ClientId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "ManagementServer": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/ManagementServer", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/managementServers/{managementserver}", - "(google.api.resource).plural": "managementServers", - "(google.api.resource).singular": "managementServer" + "AllocationAffinity": { + "oneofs": { + "_consumeAllocationType": { + "oneof": [ + "consumeAllocationType" + ] + }, + "_key": { + "oneof": [ + "key" + ] + } }, "fields": { - "name": { - "type": "string", + "consumeAllocationType": { + "type": "Type", "id": 1, "options": { - "(google.api.field_behavior)": "IDENTIFIER" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "description": { + "key": { "type": "string", - "id": 9, + "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "labels": { - "keyType": "string", + "values": { + "rule": "repeated", "type": "string", - "id": 4, + "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "NO_RESERVATION": 1, + "ANY_RESERVATION": 2, + "SPECIFIC_RESERVATION": 3 + } + } + } + }, + "Scheduling": { + "oneofs": { + "_onHostMaintenance": { + "oneof": [ + "onHostMaintenance" + ] }, - "createTime": { - "type": "google.protobuf.Timestamp", + "_automaticRestart": { + "oneof": [ + "automaticRestart" + ] + }, + "_preemptible": { + "oneof": [ + "preemptible" + ] + }, + "_minNodeCpus": { + "oneof": [ + "minNodeCpus" + ] + }, + "_provisioningModel": { + "oneof": [ + "provisioningModel" + ] + }, + "_instanceTerminationAction": { + "oneof": [ + "instanceTerminationAction" + ] + }, + "_localSsdRecoveryTimeout": { + "oneof": [ + "localSsdRecoveryTimeout" + ] + } + }, + "fields": { + "onHostMaintenance": { + "type": "OnHostMaintenance", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "automaticRestart": { + "type": "bool", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "updateTime": { - "type": "google.protobuf.Timestamp", + "preemptible": { + "type": "bool", "id": 3, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "type": { - "type": "InstanceType", - "id": 14, + "nodeAffinities": { + "rule": "repeated", + "type": "NodeAffinity", + "id": 4, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "managementUri": { - "type": "ManagementURI", - "id": 11, + "minNodeCpus": { + "type": "int32", + "id": 5, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "workforceIdentityBasedManagementUri": { - "type": "WorkforceIdentityBasedManagementURI", - "id": 16, + "provisioningModel": { + "type": "ProvisioningModel", + "id": 6, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "state": { - "type": "InstanceState", + "instanceTerminationAction": { + "type": "InstanceTerminationAction", "id": 7, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "networks": { - "rule": "repeated", - "type": "NetworkConfig", - "id": 8, + "localSsdRecoveryTimeout": { + "type": "SchedulingDuration", + "id": 10, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } - }, - "etag": { - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + } + }, + "nested": { + "OnHostMaintenance": { + "values": { + "ON_HOST_MAINTENANCE_UNSPECIFIED": 0, + "TERMINATE": 1, + "MIGRATE": 1000 } }, - "oauth2ClientId": { - "type": "string", - "id": 15, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "NodeAffinity": { + "oneofs": { + "_key": { + "oneof": [ + "key" + ] + }, + "_operator": { + "oneof": [ + "operator" + ] + } + }, + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "operator": { + "type": "Operator", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "values": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Operator": { + "values": { + "OPERATOR_UNSPECIFIED": 0, + "IN": 1, + "NOT_IN": 2 + } + } } }, - "workforceIdentityBasedOauth2ClientId": { - "type": "WorkforceIdentityBasedOAuth2ClientID", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "ProvisioningModel": { + "values": { + "PROVISIONING_MODEL_UNSPECIFIED": 0, + "STANDARD": 1, + "SPOT": 2 } }, - "baProxyUri": { - "rule": "repeated", - "type": "string", - "id": 18, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "InstanceTerminationAction": { + "values": { + "INSTANCE_TERMINATION_ACTION_UNSPECIFIED": 0, + "DELETE": 1, + "STOP": 2 } + } + } + }, + "SchedulingDuration": { + "oneofs": { + "_seconds": { + "oneof": [ + "seconds" + ] }, - "satisfiesPzs": { - "type": "google.protobuf.BoolValue", - "id": 19, + "_nanos": { + "oneof": [ + "nanos" + ] + } + }, + "fields": { + "seconds": { + "type": "int64", + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "satisfiesPzi": { - "type": "bool", - "id": 20, + "nanos": { + "type": "int32", + "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } } + } + }, + "ServiceAccount": { + "oneofs": { + "_email": { + "oneof": [ + "email" + ] + } }, - "nested": { - "InstanceType": { - "values": { - "INSTANCE_TYPE_UNSPECIFIED": 0, - "BACKUP_RESTORE": 1 + "fields": { + "email": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "InstanceState": { - "values": { - "INSTANCE_STATE_UNSPECIFIED": 0, - "CREATING": 1, - "READY": 2, - "UPDATING": 3, - "DELETING": 4, - "REPAIRING": 5, - "MAINTENANCE": 6, - "ERROR": 7 + "scopes": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "ListManagementServersRequest": { + "Tags": { + "fields": { + "items": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AttachedDisk": { "oneofs": { - "_filter": { + "_initializeParams": { + "oneof": [ + "initializeParams" + ] + }, + "_deviceName": { + "oneof": [ + "deviceName" + ] + }, + "_kind": { + "oneof": [ + "kind" + ] + }, + "_diskTypeDeprecated": { + "oneof": [ + "diskTypeDeprecated" + ] + }, + "_mode": { + "oneof": [ + "mode" + ] + }, + "_source": { + "oneof": [ + "source" + ] + }, + "_index": { + "oneof": [ + "index" + ] + }, + "_boot": { + "oneof": [ + "boot" + ] + }, + "_autoDelete": { "oneof": [ - "filter" + "autoDelete" ] }, - "_orderBy": { + "_diskInterface": { "oneof": [ - "orderBy" + "diskInterface" + ] + }, + "_diskEncryptionKey": { + "oneof": [ + "diskEncryptionKey" + ] + }, + "_diskSizeGb": { + "oneof": [ + "diskSizeGb" + ] + }, + "_savedState": { + "oneof": [ + "savedState" + ] + }, + "_diskType": { + "oneof": [ + "diskType" + ] + }, + "_type": { + "oneof": [ + "type" ] } }, "fields": { - "parent": { - "type": "string", + "initializeParams": { + "type": "InitializeParams", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "pageSize": { - "type": "int32", - "id": 2, + "deviceName": { + "type": "string", + "id": 4, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "pageToken": { + "kind": { "type": "string", - "id": 3, + "id": 5, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "filter": { - "type": "string", - "id": 4, + "diskTypeDeprecated": { + "type": "DiskType", + "id": 6, "options": { - "(google.api.field_behavior)": "OPTIONAL", + "deprecated": true, "proto3_optional": true } }, - "orderBy": { - "type": "string", - "id": 5, + "mode": { + "type": "DiskMode", + "id": 7, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } - } - } - }, - "ListManagementServersResponse": { - "fields": { - "managementServers": { - "rule": "repeated", - "type": "ManagementServer", - "id": 1 }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetManagementServerRequest": { - "fields": { - "name": { + "source": { "type": "string", - "id": 1, + "id": 8, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } - } - } - }, - "CreateManagementServerRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, + }, + "index": { + "type": "int64", + "id": 9, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "managementServerId": { - "type": "string", - "id": 2, + "boot": { + "type": "bool", + "id": 10, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "managementServer": { - "type": "ManagementServer", - "id": 3, + "autoDelete": { + "type": "bool", + "id": 11, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "requestId": { + "license": { + "rule": "repeated", "type": "string", - "id": 4, + "id": 12, "options": { "(google.api.field_behavior)": "OPTIONAL" } - } - } - }, - "DeleteManagementServerRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, + }, + "diskInterface": { + "type": "DiskInterface", + "id": 13, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "requestId": { - "type": "string", - "id": 2, + "guestOsFeature": { + "rule": "repeated", + "type": "GuestOsFeature", + "id": 14, "options": { "(google.api.field_behavior)": "OPTIONAL" } - } - } - }, - "OperationMetadata": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1, + }, + "diskEncryptionKey": { + "type": "CustomerEncryptionKey", + "id": 15, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2, + "diskSizeGb": { + "type": "int64", + "id": 16, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, - "target": { - "type": "string", - "id": 3, + "savedState": { + "type": "DiskSavedState", + "id": 17, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } }, - "verb": { + "diskType": { "type": "string", - "id": 4, + "id": 18, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true } }, - "statusMessage": { - "type": "string", - "id": 5, + "type": { + "type": "DiskType", + "id": 19, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "InitializeParams": { + "oneofs": { + "_diskName": { + "oneof": [ + "diskName" + ] + } + }, + "fields": { + "diskName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "replicaZones": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } } }, - "requestedCancellation": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "DiskType": { + "values": { + "DISK_TYPE_UNSPECIFIED": 0, + "SCRATCH": 1, + "PERSISTENT": 2 } }, - "apiVersion": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "DiskMode": { + "values": { + "DISK_MODE_UNSPECIFIED": 0, + "READ_WRITE": 1, + "READ_ONLY": 2, + "LOCKED": 3 } }, - "additionalInfo": { - "keyType": "string", - "type": "string", - "id": 8, + "DiskInterface": { + "values": { + "DISK_INTERFACE_UNSPECIFIED": 0, + "SCSI": 1, + "NVME": 2, + "NVDIMM": 3, + "ISCSI": 4 + } + }, + "DiskSavedState": { + "values": { + "DISK_SAVED_STATE_UNSPECIFIED": 0, + "PRESERVED": 1 + } + } + } + }, + "GuestOsFeature": { + "oneofs": { + "_type": { + "oneof": [ + "type" + ] + } + }, + "fields": { + "type": { + "type": "FeatureType", + "id": 1, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "proto3_optional": true + } + } + }, + "nested": { + "FeatureType": { + "values": { + "FEATURE_TYPE_UNSPECIFIED": 0, + "VIRTIO_SCSI_MULTIQUEUE": 1, + "WINDOWS": 2, + "MULTI_IP_SUBNET": 3, + "UEFI_COMPATIBLE": 4, + "SECURE_BOOT": 5, + "GVNIC": 6, + "SEV_CAPABLE": 7, + "BARE_METAL_LINUX_COMPATIBLE": 8, + "SUSPEND_RESUME_COMPATIBLE": 9, + "SEV_LIVE_MIGRATABLE": 10, + "SEV_SNP_CAPABLE": 11, + "TDX_CAPABLE": 12, + "IDPF": 13, + "SEV_LIVE_MIGRATABLE_V2": 14 } } } + }, + "KeyRevocationActionType": { + "values": { + "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": 0, + "NONE": 1, + "STOP": 2 + } } } } @@ -954,6 +5744,30 @@ "IDENTIFIER": 8 } }, + "fieldInfo": { + "type": "google.api.FieldInfo", + "id": 291403980, + "extend": "google.protobuf.FieldOptions" + }, + "FieldInfo": { + "fields": { + "format": { + "type": "Format", + "id": 1 + } + }, + "nested": { + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "UUID4": 1, + "IPV4": 2, + "IPV6": 3, + "IPV4_OR_IPV6": 4 + } + } + } + }, "resourceReference": { "type": "google.api.ResourceReference", "id": 1055, @@ -2320,6 +7134,18 @@ } } }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, "Any": { "fields": { "type_url": { @@ -2332,21 +7158,18 @@ } } }, - "Empty": { - "fields": {} - }, - "Timestamp": { + "FieldMask": { "fields": { - "seconds": { - "type": "int64", + "paths": { + "rule": "repeated", + "type": "string", "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 } } }, + "Empty": { + "fields": {} + }, "DoubleValue": { "fields": { "value": { @@ -2421,6 +7244,390 @@ } } }, + "type": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/type/expr;expr", + "java_multiple_files": true, + "java_outer_classname": "ExprProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "DayOfWeek": { + "values": { + "DAY_OF_WEEK_UNSPECIFIED": 0, + "MONDAY": 1, + "TUESDAY": 2, + "WEDNESDAY": 3, + "THURSDAY": 4, + "FRIDAY": 5, + "SATURDAY": 6, + "SUNDAY": 7 + } + }, + "Month": { + "values": { + "MONTH_UNSPECIFIED": 0, + "JANUARY": 1, + "FEBRUARY": 2, + "MARCH": 3, + "APRIL": 4, + "MAY": 5, + "JUNE": 6, + "JULY": 7, + "AUGUST": 8, + "SEPTEMBER": 9, + "OCTOBER": 10, + "NOVEMBER": 11, + "DECEMBER": 12 + } + }, + "Expr": { + "fields": { + "expression": { + "type": "string", + "id": 1 + }, + "title": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "location": { + "type": "string", + "id": 4 + } + } + } + } + }, + "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 + } + } + } + } + }, + "iam": { + "nested": { + "v1": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Cloud.Iam.V1", + "go_package": "cloud.google.com/go/iam/apiv1/iampb;iampb", + "java_multiple_files": true, + "java_outer_classname": "PolicyProto", + "java_package": "com.google.iam.v1", + "php_namespace": "Google\\Cloud\\Iam\\V1" + }, + "nested": { + "IAMPolicy": { + "options": { + "(google.api.default_host)": "iam-meta-api.googleapis.com" + }, + "methods": { + "SetIamPolicy": { + "requestType": "SetIamPolicyRequest", + "responseType": "Policy", + "options": { + "(google.api.http).post": "/v1/{resource=**}:setIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:setIamPolicy", + "body": "*" + } + } + ] + }, + "GetIamPolicy": { + "requestType": "GetIamPolicyRequest", + "responseType": "Policy", + "options": { + "(google.api.http).post": "/v1/{resource=**}:getIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:getIamPolicy", + "body": "*" + } + } + ] + }, + "TestIamPermissions": { + "requestType": "TestIamPermissionsRequest", + "responseType": "TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=**}:testIamPermissions", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:testIamPermissions", + "body": "*" + } + } + ] + } + } + }, + "SetIamPolicyRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "policy": { + "type": "Policy", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "GetIamPolicyRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "options": { + "type": "GetPolicyOptions", + "id": 2 + } + } + }, + "TestIamPermissionsRequest": { + "fields": { + "resource": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "permissions": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "TestIamPermissionsResponse": { + "fields": { + "permissions": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "GetPolicyOptions": { + "fields": { + "requestedPolicyVersion": { + "type": "int32", + "id": 1 + } + } + }, + "Policy": { + "fields": { + "version": { + "type": "int32", + "id": 1 + }, + "bindings": { + "rule": "repeated", + "type": "Binding", + "id": 4 + }, + "auditConfigs": { + "rule": "repeated", + "type": "AuditConfig", + "id": 6 + }, + "etag": { + "type": "bytes", + "id": 3 + } + } + }, + "Binding": { + "fields": { + "role": { + "type": "string", + "id": 1 + }, + "members": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "condition": { + "type": "google.type.Expr", + "id": 3 + } + } + }, + "AuditConfig": { + "fields": { + "service": { + "type": "string", + "id": 1 + }, + "auditLogConfigs": { + "rule": "repeated", + "type": "AuditLogConfig", + "id": 3 + } + } + }, + "AuditLogConfig": { + "fields": { + "logType": { + "type": "LogType", + "id": 1 + }, + "exemptedMembers": { + "rule": "repeated", + "type": "string", + "id": 2 + } + }, + "nested": { + "LogType": { + "values": { + "LOG_TYPE_UNSPECIFIED": 0, + "ADMIN_READ": 1, + "DATA_WRITE": 2, + "DATA_READ": 3 + } + } + } + }, + "PolicyDelta": { + "fields": { + "bindingDeltas": { + "rule": "repeated", + "type": "BindingDelta", + "id": 1 + }, + "auditConfigDeltas": { + "rule": "repeated", + "type": "AuditConfigDelta", + "id": 2 + } + } + }, + "BindingDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "role": { + "type": "string", + "id": 2 + }, + "member": { + "type": "string", + "id": 3 + }, + "condition": { + "type": "google.type.Expr", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + }, + "AuditConfigDelta": { + "fields": { + "action": { + "type": "Action", + "id": 1 + }, + "service": { + "type": "string", + "id": 2 + }, + "exemptedMember": { + "type": "string", + "id": 3 + }, + "logType": { + "type": "string", + "id": 4 + } + }, + "nested": { + "Action": { + "values": { + "ACTION_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2 + } + } + } + } + } + } + } + }, "longrunning": { "options": { "cc_enable_arenas": true, @@ -2636,35 +7843,6 @@ } } } - }, - "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 - } - } - } - } } } } diff --git a/packages/google-cloud-backupdr/samples/README.md b/packages/google-cloud-backupdr/samples/README.md index cb1951e106d..27db6e74ed5 100644 --- a/packages/google-cloud-backupdr/samples/README.md +++ b/packages/google-cloud-backupdr/samples/README.md @@ -12,10 +12,40 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Backup_d_r.abandon_backup](#backup_d_r.abandon_backup) + * [Backup_d_r.create_backup_plan](#backup_d_r.create_backup_plan) + * [Backup_d_r.create_backup_plan_association](#backup_d_r.create_backup_plan_association) + * [Backup_d_r.create_backup_vault](#backup_d_r.create_backup_vault) * [Backup_d_r.create_management_server](#backup_d_r.create_management_server) + * [Backup_d_r.delete_backup](#backup_d_r.delete_backup) + * [Backup_d_r.delete_backup_plan](#backup_d_r.delete_backup_plan) + * [Backup_d_r.delete_backup_plan_association](#backup_d_r.delete_backup_plan_association) + * [Backup_d_r.delete_backup_vault](#backup_d_r.delete_backup_vault) * [Backup_d_r.delete_management_server](#backup_d_r.delete_management_server) + * [Backup_d_r.fetch_access_token](#backup_d_r.fetch_access_token) + * [Backup_d_r.fetch_usable_backup_vaults](#backup_d_r.fetch_usable_backup_vaults) + * [Backup_d_r.finalize_backup](#backup_d_r.finalize_backup) + * [Backup_d_r.get_backup](#backup_d_r.get_backup) + * [Backup_d_r.get_backup_plan](#backup_d_r.get_backup_plan) + * [Backup_d_r.get_backup_plan_association](#backup_d_r.get_backup_plan_association) + * [Backup_d_r.get_backup_vault](#backup_d_r.get_backup_vault) + * [Backup_d_r.get_data_source](#backup_d_r.get_data_source) * [Backup_d_r.get_management_server](#backup_d_r.get_management_server) + * [Backup_d_r.initiate_backup](#backup_d_r.initiate_backup) + * [Backup_d_r.list_backup_plan_associations](#backup_d_r.list_backup_plan_associations) + * [Backup_d_r.list_backup_plans](#backup_d_r.list_backup_plans) + * [Backup_d_r.list_backup_vaults](#backup_d_r.list_backup_vaults) + * [Backup_d_r.list_backups](#backup_d_r.list_backups) + * [Backup_d_r.list_data_sources](#backup_d_r.list_data_sources) * [Backup_d_r.list_management_servers](#backup_d_r.list_management_servers) + * [Backup_d_r.remove_data_source](#backup_d_r.remove_data_source) + * [Backup_d_r.restore_backup](#backup_d_r.restore_backup) + * [Backup_d_r.set_internal_status](#backup_d_r.set_internal_status) + * [Backup_d_r.test_iam_permissions](#backup_d_r.test_iam_permissions) + * [Backup_d_r.trigger_backup](#backup_d_r.trigger_backup) + * [Backup_d_r.update_backup](#backup_d_r.update_backup) + * [Backup_d_r.update_backup_vault](#backup_d_r.update_backup_vault) + * [Backup_d_r.update_data_source](#backup_d_r.update_data_source) * [Quickstart](#quickstart) ## Before you begin @@ -33,6 +63,74 @@ Before running the samples, make sure you've followed the steps outlined in +### Backup_d_r.abandon_backup + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.abandon_backup.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.abandon_backup.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.abandon_backup.js` + + +----- + + + + +### Backup_d_r.create_backup_plan + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan.js` + + +----- + + + + +### Backup_d_r.create_backup_plan_association + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan_association.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan_association.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan_association.js` + + +----- + + + + +### Backup_d_r.create_backup_vault + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_vault.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_vault.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_vault.js` + + +----- + + + + ### Backup_d_r.create_management_server View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_management_server.js). @@ -50,6 +148,74 @@ __Usage:__ +### Backup_d_r.delete_backup + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup.js` + + +----- + + + + +### Backup_d_r.delete_backup_plan + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan.js` + + +----- + + + + +### Backup_d_r.delete_backup_plan_association + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan_association.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan_association.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan_association.js` + + +----- + + + + +### Backup_d_r.delete_backup_vault + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_vault.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_vault.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_vault.js` + + +----- + + + + ### Backup_d_r.delete_management_server View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_management_server.js). @@ -67,6 +233,142 @@ __Usage:__ +### Backup_d_r.fetch_access_token + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_access_token.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_access_token.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_access_token.js` + + +----- + + + + +### Backup_d_r.fetch_usable_backup_vaults + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js` + + +----- + + + + +### Backup_d_r.finalize_backup + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.finalize_backup.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.finalize_backup.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.finalize_backup.js` + + +----- + + + + +### Backup_d_r.get_backup + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup.js` + + +----- + + + + +### Backup_d_r.get_backup_plan + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan.js` + + +----- + + + + +### Backup_d_r.get_backup_plan_association + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan_association.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan_association.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan_association.js` + + +----- + + + + +### Backup_d_r.get_backup_vault + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_vault.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_vault.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_vault.js` + + +----- + + + + +### Backup_d_r.get_data_source + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_data_source.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_data_source.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_data_source.js` + + +----- + + + + ### Backup_d_r.get_management_server View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_management_server.js). @@ -84,6 +386,108 @@ __Usage:__ +### Backup_d_r.initiate_backup + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.initiate_backup.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.initiate_backup.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.initiate_backup.js` + + +----- + + + + +### Backup_d_r.list_backup_plan_associations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plan_associations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plan_associations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plan_associations.js` + + +----- + + + + +### Backup_d_r.list_backup_plans + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plans.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plans.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plans.js` + + +----- + + + + +### Backup_d_r.list_backup_vaults + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_vaults.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_vaults.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_vaults.js` + + +----- + + + + +### Backup_d_r.list_backups + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backups.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backups.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backups.js` + + +----- + + + + +### Backup_d_r.list_data_sources + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_sources.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_sources.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_sources.js` + + +----- + + + + ### Backup_d_r.list_management_servers View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_management_servers.js). @@ -101,6 +505,142 @@ __Usage:__ +### Backup_d_r.remove_data_source + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.remove_data_source.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.remove_data_source.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.remove_data_source.js` + + +----- + + + + +### Backup_d_r.restore_backup + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js` + + +----- + + + + +### Backup_d_r.set_internal_status + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.set_internal_status.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.set_internal_status.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.set_internal_status.js` + + +----- + + + + +### Backup_d_r.test_iam_permissions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.test_iam_permissions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.test_iam_permissions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.test_iam_permissions.js` + + +----- + + + + +### Backup_d_r.trigger_backup + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.trigger_backup.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.trigger_backup.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.trigger_backup.js` + + +----- + + + + +### Backup_d_r.update_backup + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup.js` + + +----- + + + + +### Backup_d_r.update_backup_vault + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup_vault.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup_vault.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup_vault.js` + + +----- + + + + +### Backup_d_r.update_data_source + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_data_source.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_data_source.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_data_source.js` + + +----- + + + + ### Quickstart View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-backupdr/samples/quickstart.js). diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.abandon_backup.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.abandon_backup.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.abandon_backup.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.abandon_backup.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan_association.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan_association.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan_association.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_plan_association.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_vault.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_vault.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_vault.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_backup_vault.js diff --git a/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_management_server.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_management_server.js index 5670ead5da4..f14ca310e86 100644 --- a/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_management_server.js +++ b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.create_management_server.js @@ -30,8 +30,8 @@ function main(parent, managementServerId, managementServer) { */ /** * Required. The management server project and location in the format - * `projects/{project_id}/locations/{location}`. In Cloud Backup and DR - * locations map to GCP regions, for example **us-central1**. + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR + * locations map to Google Cloud regions, for example **us-central1**. */ // const parent = 'abc123' /** diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan_association.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan_association.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan_association.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_plan_association.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_vault.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_vault.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_vault.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.delete_backup_vault.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_access_token.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_access_token.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_access_token.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_access_token.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.finalize_backup.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.finalize_backup.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.finalize_backup.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.finalize_backup.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan_association.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan_association.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan_association.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_plan_association.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_vault.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_vault.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_vault.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_backup_vault.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_data_source.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_data_source.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_data_source.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_data_source.js diff --git a/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_management_server.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_management_server.js index afa3ba0f8b2..11cc5ae277f 100644 --- a/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_management_server.js +++ b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.get_management_server.js @@ -30,7 +30,7 @@ function main(name) { */ /** * Required. Name of the management server resource name, in the format - * `projects/{project_id}/locations/{location}/managementServers/{resource_name}` + * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' */ // const name = 'abc123' diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.initiate_backup.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.initiate_backup.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.initiate_backup.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.initiate_backup.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plan_associations.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plan_associations.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plan_associations.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plan_associations.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plans.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plans.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plans.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_plans.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_vaults.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_vaults.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_vaults.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backup_vaults.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backups.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backups.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backups.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_backups.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_data_sources.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_sources.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_data_sources.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_data_sources.js diff --git a/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_management_servers.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_management_servers.js index 4acf62dd19c..262d1a29e3c 100644 --- a/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_management_servers.js +++ b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.list_management_servers.js @@ -30,10 +30,11 @@ function main(parent) { */ /** * Required. The project and location for which to retrieve management servers - * information, in the format `projects/{project_id}/locations/{location}`. In - * Cloud BackupDR, locations map to GCP regions, for example **us-central1**. - * To retrieve management servers for all locations, use "-" for the - * `{location}` value. + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud BackupDR, locations map to Google Cloud regions, for example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. */ // const parent = 'abc123' /** diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.remove_data_source.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.remove_data_source.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.remove_data_source.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.remove_data_source.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.restore_backup.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.restore_backup.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.restore_backup.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.set_internal_status.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.set_internal_status.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.set_internal_status.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.set_internal_status.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.test_iam_permissions.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.test_iam_permissions.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.test_iam_permissions.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.test_iam_permissions.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.trigger_backup.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.trigger_backup.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.trigger_backup.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.trigger_backup.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup_vault.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup_vault.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup_vault.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_backup_vault.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_data_source.js b/packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_data_source.js similarity index 100% rename from owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_data_source.js rename to packages/google-cloud-backupdr/samples/generated/v1/backup_d_r.update_data_source.js diff --git a/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json b/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json index b273e8759e1..582d6b86ec2 100644 --- a/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json +++ b/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 77, "type": "FULL" } ], @@ -202,6 +202,1506 @@ } } } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupVault_async", + "title": "BackupDR createBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Creates a new BackupVault in a given project and location.", + "canonical": true, + "file": "backup_d_r.create_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "backup_vault_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_vault", + "type": ".google.cloud.backupdr.v1.BackupVault" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "CreateBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListBackupVaults_async", + "title": "BackupDR listBackupVaults Sample", + "origin": "API_DEFINITION", + "description": " Lists BackupVaults in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_backup_vaults.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackupVaults", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", + "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" + }, + { + "name": "view", + "type": ".google.cloud.backupdr.v1.BackupVaultView" + } + ], + "resultType": ".google.cloud.backupdr.v1.ListBackupVaultsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListBackupVaults", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_async", + "title": "BackupDR fetchUsableBackupVaults Sample", + "origin": "API_DEFINITION", + "description": " FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.", + "canonical": true, + "file": "backup_d_r.fetch_usable_backup_vaults.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchUsableBackupVaults", + "fullName": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", + "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.backupdr.v1.FetchUsableBackupVaultsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "FetchUsableBackupVaults", + "fullName": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetBackupVault_async", + "title": "BackupDR getBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a BackupVault.", + "canonical": true, + "file": "backup_d_r.get_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.backupdr.v1.BackupVaultView" + } + ], + "resultType": ".google.cloud.backupdr.v1.BackupVault", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_UpdateBackupVault_async", + "title": "BackupDR updateBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings of a BackupVault.", + "canonical": true, + "file": "backup_d_r.update_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "backup_vault", + "type": ".google.cloud.backupdr.v1.BackupVault" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "UpdateBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupVault_async", + "title": "BackupDR deleteBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Deletes a BackupVault.", + "canonical": true, + "file": "backup_d_r.delete_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 89, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + }, + { + "name": "etag", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "DeleteBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_TestIamPermissions_async", + "title": "BackupDR testIamPermissions Sample", + "origin": "API_DEFINITION", + "description": " Returns the caller's permissions on a BackupVault resource. A caller is not required to have Google IAM permission to make this request.", + "canonical": true, + "file": "backup_d_r.test_iam_permissions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.backupdr.v1.BackupDR.TestIamPermissions", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "permissions", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.iam.v1.TestIamPermissionsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.backupdr.v1.BackupDR.TestIamPermissions", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListDataSources_async", + "title": "BackupDR listDataSources Sample", + "origin": "API_DEFINITION", + "description": " Lists DataSources in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_data_sources.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataSources", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListDataSources", + "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.backupdr.v1.ListDataSourcesResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListDataSources", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListDataSources", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetDataSource_async", + "title": "BackupDR getDataSource Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a DataSource.", + "canonical": true, + "file": "backup_d_r.get_data_source.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetDataSource", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.backupdr.v1.DataSource", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetDataSource", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_UpdateDataSource_async", + "title": "BackupDR updateDataSource Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings of a DataSource.", + "canonical": true, + "file": "backup_d_r.update_data_source.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "data_source", + "type": ".google.cloud.backupdr.v1.DataSource" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "UpdateDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_RemoveDataSource_async", + "title": "BackupDR removeDataSource Sample", + "origin": "API_DEFINITION", + "description": " Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.", + "canonical": true, + "file": "backup_d_r.remove_data_source.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RemoveDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.RemoveDataSource", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "RemoveDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.RemoveDataSource", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_SetInternalStatus_async", + "title": "BackupDR setInternalStatus Sample", + "origin": "API_DEFINITION", + "description": " Sets the internal status of a DataSource.", + "canonical": true, + "file": "backup_d_r.set_internal_status.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetInternalStatus", + "fullName": "google.cloud.backupdr.v1.BackupDR.SetInternalStatus", + "async": true, + "parameters": [ + { + "name": "data_source", + "type": "TYPE_STRING" + }, + { + "name": "value", + "type": "TYPE_BYTES" + }, + { + "name": "backup_config_state", + "type": ".google.cloud.backupdr.v1.BackupConfigState" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "SetInternalStatus", + "fullName": "google.cloud.backupdr.v1.BackupDR.SetInternalStatus", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_InitiateBackup_async", + "title": "BackupDR initiateBackup Sample", + "origin": "API_DEFINITION", + "description": " Internal only. Initiates a backup.", + "canonical": true, + "file": "backup_d_r.initiate_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "InitiateBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.InitiateBackup", + "async": true, + "parameters": [ + { + "name": "data_source", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.backupdr.v1.InitiateBackupResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "InitiateBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.InitiateBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_AbandonBackup_async", + "title": "BackupDR abandonBackup Sample", + "origin": "API_DEFINITION", + "description": " Internal only. Abandons a backup.", + "canonical": true, + "file": "backup_d_r.abandon_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AbandonBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.AbandonBackup", + "async": true, + "parameters": [ + { + "name": "data_source", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "AbandonBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.AbandonBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_FinalizeBackup_async", + "title": "BackupDR finalizeBackup Sample", + "origin": "API_DEFINITION", + "description": " Internal only. Finalize a backup that was started by a call to InitiateBackup.", + "canonical": true, + "file": "backup_d_r.finalize_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 101, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FinalizeBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.FinalizeBackup", + "async": true, + "parameters": [ + { + "name": "data_source", + "type": "TYPE_STRING" + }, + { + "name": "description", + "type": "TYPE_STRING" + }, + { + "name": "consistency_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_id", + "type": "TYPE_STRING" + }, + { + "name": "recovery_range_start_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "recovery_range_end_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "retention_duration", + "type": ".google.protobuf.Duration" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "FinalizeBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.FinalizeBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_FetchAccessToken_async", + "title": "BackupDR fetchAccessToken Sample", + "origin": "API_DEFINITION", + "description": " Internal only. Fetch access token for a given data source.", + "canonical": true, + "file": "backup_d_r.fetch_access_token.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchAccessToken", + "fullName": "google.cloud.backupdr.v1.BackupDR.FetchAccessToken", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "generation_id", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.cloud.backupdr.v1.FetchAccessTokenResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "FetchAccessToken", + "fullName": "google.cloud.backupdr.v1.BackupDR.FetchAccessToken", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListBackups_async", + "title": "BackupDR listBackups Sample", + "origin": "API_DEFINITION", + "description": " Lists Backups in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_backups.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackups", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackups", + "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" + }, + { + "name": "view", + "type": ".google.cloud.backupdr.v1.BackupView" + } + ], + "resultType": ".google.cloud.backupdr.v1.ListBackupsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListBackups", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackups", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetBackup_async", + "title": "BackupDR getBackup Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a Backup.", + "canonical": true, + "file": "backup_d_r.get_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.backupdr.v1.BackupView" + } + ], + "resultType": ".google.cloud.backupdr.v1.Backup", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_UpdateBackup_async", + "title": "BackupDR updateBackup Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings of a Backup.", + "canonical": true, + "file": "backup_d_r.update_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "backup", + "type": ".google.cloud.backupdr.v1.Backup" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "UpdateBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackup_async", + "title": "BackupDR deleteBackup Sample", + "origin": "API_DEFINITION", + "description": " Deletes a Backup.", + "canonical": true, + "file": "backup_d_r.delete_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "DeleteBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_RestoreBackup_async", + "title": "BackupDR restoreBackup Sample", + "origin": "API_DEFINITION", + "description": " Restore from a Backup", + "canonical": true, + "file": "backup_d_r.restore_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RestoreBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "compute_instance_target_environment", + "type": ".google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment" + }, + { + "name": "compute_instance_restore_properties", + "type": ".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "RestoreBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupPlan_async", + "title": "BackupDR createBackupPlan Sample", + "origin": "API_DEFINITION", + "description": " Create a BackupPlan", + "canonical": true, + "file": "backup_d_r.create_backup_plan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 83, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "backup_plan_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_plan", + "type": ".google.cloud.backupdr.v1.BackupPlan" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "CreateBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetBackupPlan_async", + "title": "BackupDR getBackupPlan Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single BackupPlan.", + "canonical": true, + "file": "backup_d_r.get_backup_plan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.backupdr.v1.BackupPlan", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListBackupPlans_async", + "title": "BackupDR listBackupPlans Sample", + "origin": "API_DEFINITION", + "description": " Lists BackupPlans in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_backup_plans.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackupPlans", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", + "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.backupdr.v1.ListBackupPlansResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListBackupPlans", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupPlan_async", + "title": "BackupDR deleteBackupPlan Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single BackupPlan.", + "canonical": true, + "file": "backup_d_r.delete_backup_plan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "DeleteBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async", + "title": "BackupDR createBackupPlanAssociation Sample", + "origin": "API_DEFINITION", + "description": " Create a BackupPlanAssociation", + "canonical": true, + "file": "backup_d_r.create_backup_plan_association.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "backup_plan_association_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_plan_association", + "type": ".google.cloud.backupdr.v1.BackupPlanAssociation" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "CreateBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_async", + "title": "BackupDR getBackupPlanAssociation Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single BackupPlanAssociation.", + "canonical": true, + "file": "backup_d_r.get_backup_plan_association.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.backupdr.v1.BackupPlanAssociation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_async", + "title": "BackupDR listBackupPlanAssociations Sample", + "origin": "API_DEFINITION", + "description": " Lists BackupPlanAssociations in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_backup_plan_associations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackupPlanAssociations", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", + "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" + } + ], + "resultType": ".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListBackupPlanAssociations", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async", + "title": "BackupDR deleteBackupPlanAssociation Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single BackupPlanAssociation.", + "canonical": true, + "file": "backup_d_r.delete_backup_plan_association.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "DeleteBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_TriggerBackup_async", + "title": "BackupDR triggerBackup Sample", + "origin": "API_DEFINITION", + "description": " Triggers a new Backup.", + "canonical": true, + "file": "backup_d_r.trigger_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TriggerBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "rule_id", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "TriggerBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts b/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts index f793a7c9a33..bab75752904 100644 --- a/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts +++ b/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts @@ -214,6 +214,21 @@ export class BackupDRClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { + backupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}' + ), + backupPlanPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupPlans/{backup_plan}' + ), + backupPlanAssociationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}' + ), + backupVaultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backupvault}' + ), + dataSourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}' + ), locationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}' ), @@ -234,6 +249,36 @@ export class BackupDRClient { 'nextPageToken', 'managementServers' ), + listBackupVaults: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backupVaults' + ), + fetchUsableBackupVaults: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backupVaults' + ), + listDataSources: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'dataSources' + ), + listBackups: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backups' + ), + listBackupPlans: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backupPlans' + ), + listBackupPlanAssociations: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'backupPlanAssociations' + ), }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); @@ -303,6 +348,102 @@ export class BackupDRClient { const deleteManagementServerMetadata = protoFilesRoot.lookup( '.google.cloud.backupdr.v1.OperationMetadata' ) as gax.protobuf.Type; + const createBackupVaultResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupVault' + ) as gax.protobuf.Type; + const createBackupVaultMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateBackupVaultResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupVault' + ) as gax.protobuf.Type; + const updateBackupVaultMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteBackupVaultResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteBackupVaultMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateDataSourceResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.DataSource' + ) as gax.protobuf.Type; + const updateDataSourceMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const removeDataSourceResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const removeDataSourceMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const setInternalStatusResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.SetInternalStatusResponse' + ) as gax.protobuf.Type; + const setInternalStatusMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const abandonBackupResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const abandonBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const finalizeBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.Backup' + ) as gax.protobuf.Type; + const finalizeBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.Backup' + ) as gax.protobuf.Type; + const updateBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.Backup' + ) as gax.protobuf.Type; + const deleteBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const restoreBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.RestoreBackupResponse' + ) as gax.protobuf.Type; + const restoreBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createBackupPlanResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupPlan' + ) as gax.protobuf.Type; + const createBackupPlanMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteBackupPlanResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteBackupPlanMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createBackupPlanAssociationResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupPlanAssociation' + ) as gax.protobuf.Type; + const createBackupPlanAssociationMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteBackupPlanAssociationResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteBackupPlanAssociationMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; + const triggerBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupPlanAssociation' + ) as gax.protobuf.Type; + const triggerBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { createManagementServer: new this._gaxModule.LongrunningDescriptor( @@ -323,6 +464,94 @@ export class BackupDRClient { deleteManagementServerMetadata ) ), + createBackupVault: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBackupVaultResponse.decode.bind(createBackupVaultResponse), + createBackupVaultMetadata.decode.bind(createBackupVaultMetadata) + ), + updateBackupVault: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateBackupVaultResponse.decode.bind(updateBackupVaultResponse), + updateBackupVaultMetadata.decode.bind(updateBackupVaultMetadata) + ), + deleteBackupVault: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupVaultResponse.decode.bind(deleteBackupVaultResponse), + deleteBackupVaultMetadata.decode.bind(deleteBackupVaultMetadata) + ), + updateDataSource: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateDataSourceResponse.decode.bind(updateDataSourceResponse), + updateDataSourceMetadata.decode.bind(updateDataSourceMetadata) + ), + removeDataSource: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + removeDataSourceResponse.decode.bind(removeDataSourceResponse), + removeDataSourceMetadata.decode.bind(removeDataSourceMetadata) + ), + setInternalStatus: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + setInternalStatusResponse.decode.bind(setInternalStatusResponse), + setInternalStatusMetadata.decode.bind(setInternalStatusMetadata) + ), + abandonBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + abandonBackupResponse.decode.bind(abandonBackupResponse), + abandonBackupMetadata.decode.bind(abandonBackupMetadata) + ), + finalizeBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + finalizeBackupResponse.decode.bind(finalizeBackupResponse), + finalizeBackupMetadata.decode.bind(finalizeBackupMetadata) + ), + updateBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateBackupResponse.decode.bind(updateBackupResponse), + updateBackupMetadata.decode.bind(updateBackupMetadata) + ), + deleteBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupResponse.decode.bind(deleteBackupResponse), + deleteBackupMetadata.decode.bind(deleteBackupMetadata) + ), + restoreBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + restoreBackupResponse.decode.bind(restoreBackupResponse), + restoreBackupMetadata.decode.bind(restoreBackupMetadata) + ), + createBackupPlan: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBackupPlanResponse.decode.bind(createBackupPlanResponse), + createBackupPlanMetadata.decode.bind(createBackupPlanMetadata) + ), + deleteBackupPlan: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupPlanResponse.decode.bind(deleteBackupPlanResponse), + deleteBackupPlanMetadata.decode.bind(deleteBackupPlanMetadata) + ), + createBackupPlanAssociation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBackupPlanAssociationResponse.decode.bind( + createBackupPlanAssociationResponse + ), + createBackupPlanAssociationMetadata.decode.bind( + createBackupPlanAssociationMetadata + ) + ), + deleteBackupPlanAssociation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupPlanAssociationResponse.decode.bind( + deleteBackupPlanAssociationResponse + ), + deleteBackupPlanAssociationMetadata.decode.bind( + deleteBackupPlanAssociationMetadata + ) + ), + triggerBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + triggerBackupResponse.decode.bind(triggerBackupResponse), + triggerBackupMetadata.decode.bind(triggerBackupMetadata) + ), }; // Put together the default options sent with requests. @@ -379,6 +608,36 @@ export class BackupDRClient { 'getManagementServer', 'createManagementServer', 'deleteManagementServer', + 'createBackupVault', + 'listBackupVaults', + 'fetchUsableBackupVaults', + 'getBackupVault', + 'updateBackupVault', + 'deleteBackupVault', + 'testIamPermissions', + 'listDataSources', + 'getDataSource', + 'updateDataSource', + 'removeDataSource', + 'setInternalStatus', + 'initiateBackup', + 'abandonBackup', + 'finalizeBackup', + 'fetchAccessToken', + 'listBackups', + 'getBackup', + 'updateBackup', + 'deleteBackup', + 'restoreBackup', + 'createBackupPlan', + 'getBackupPlan', + 'listBackupPlans', + 'deleteBackupPlan', + 'createBackupPlanAssociation', + 'getBackupPlanAssociation', + 'listBackupPlanAssociations', + 'deleteBackupPlanAssociation', + 'triggerBackup', ]; for (const methodName of backupDRStubMethods) { const callPromise = this.backupDRStub.then( @@ -503,7 +762,7 @@ export class BackupDRClient { * The request object that will be sent. * @param {string} request.name * Required. Name of the management server resource name, in the format - * `projects/{project_id}/locations/{location}/managementServers/{resource_name}` + * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' * @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. @@ -587,110 +846,73 @@ export class BackupDRClient { this.initialize(); return this.innerApiCalls.getManagementServer(request, options, callback); } - /** - * Creates a new ManagementServer in a given project and location. + * Gets details of a BackupVault. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The management server project and location in the format - * `projects/{project_id}/locations/{location}`. In Cloud Backup and DR - * locations map to GCP regions, for example **us-central1**. - * @param {string} request.managementServerId - * Required. The name of the management server to create. The name must be - * unique for the specified project and location. - * @param {google.cloud.backupdr.v1.ManagementServer} request.managementServer - * Required. A [management server - * resource][google.cloud.backupdr.v1.ManagementServer] - * @param {string} [request.requestId] - * Optional. An optional 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 {string} request.name + * Required. Name of the backupvault store resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' + * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault * @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 } + * The first element of the array is an object representing {@link protos.google.cloud.backupdr.v1.BackupVault|BackupVault}. + * 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/backup_d_r.create_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_CreateManagementServer_async + * @example include:samples/generated/v1/backup_d_r.get_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_GetBackupVault_async */ - createManagementServer( - request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + getBackupVault( + request?: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest | undefined, {} | undefined, ] >; - createManagementServer( - request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + getBackupVault( + request: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest | null | undefined, {} | null | undefined > ): void; - createManagementServer( - request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + getBackupVault( + request: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, callback: Callback< - LROperation< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest | null | undefined, {} | null | undefined > ): void; - createManagementServer( - request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + getBackupVault( + request?: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.backupdr.v1.IBackupVault, + | protos.google.cloud.backupdr.v1.IGetBackupVaultRequest + | null + | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest | null | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest | undefined, {} | undefined, ] > | void { @@ -707,144 +929,166 @@ export class BackupDRClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', + name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.createManagementServer( - request, - options, - callback - ); - } - /** - * Check the status of the long running operation returned by `createManagementServer()`. - * @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/backup_d_r.create_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_CreateManagementServer_async - */ - async checkCreateManagementServerProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.backupdr.v1.ManagementServer, - protos.google.cloud.backupdr.v1.OperationMetadata - > - > { - 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.createManagementServer, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.backupdr.v1.ManagementServer, - protos.google.cloud.backupdr.v1.OperationMetadata - >; + return this.innerApiCalls.getBackupVault(request, options, callback); } /** - * Deletes a single ManagementServer. + * Returns the caller's permissions on a BackupVault resource. + * + * A caller is not required to have Google IAM permission to make this + * request. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * Required. Name of the resource - * @param {string} [request.requestId] - * Optional. An optional 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 {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 + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). * @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 } + * The first element of the array is an object representing {@link protos.google.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. + * 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/backup_d_r.delete_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteManagementServer_async + * @example include:samples/generated/v1/backup_d_r.test_iam_permissions.js + * region_tag:backupdr_v1_generated_BackupDR_TestIamPermissions_async */ - deleteManagementServer( - request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, options?: CallOptions ): Promise< [ - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | undefined, {} | undefined, ] >; - deleteManagementServer( - request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, options: CallOptions, callback: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined > ): void; - deleteManagementServer( - request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, callback: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined > ): void; - deleteManagementServer( - request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, optionsOrCallback?: | CallOptions | Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined >, callback?: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined > ): Promise< [ - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | 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({ + resource: request.resource ?? '', + }); + this.initialize(); + return this.innerApiCalls.testIamPermissions(request, options, callback); + } + /** + * Gets details of a DataSource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' + * @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.backupdr.v1.DataSource|DataSource}. + * 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/backup_d_r.get_data_source.js + * region_tag:backupdr_v1_generated_BackupDR_GetDataSource_async + */ + getDataSource( + request?: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest | undefined, + {} | undefined, + ] + >; + getDataSource( + request: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest | null | undefined, + {} | null | undefined + > + ): void; + getDataSource( + request: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest | null | undefined, + {} | null | undefined + > + ): void; + getDataSource( + request?: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1.IDataSource, + | protos.google.cloud.backupdr.v1.IGetDataSourceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest | undefined, {} | undefined, ] > | void { @@ -864,56 +1108,4656 @@ export class BackupDRClient { name: request.name ?? '', }); this.initialize(); - return this.innerApiCalls.deleteManagementServer( - request, - options, - callback - ); + return this.innerApiCalls.getDataSource(request, options, callback); } /** - * Check the status of the long running operation returned by `deleteManagementServer()`. - * @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 } + * Internal only. + * Initiates a backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.dataSource + * Required. The resource name of the instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/'. + * @param {string} [request.requestId] + * Optional. An optional 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 {string} request.backupId + * Required. Resource ID of the Backup resource. + * @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.backupdr.v1.InitiateBackupResponse|InitiateBackupResponse}. + * 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/backup_d_r.delete_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteManagementServer_async + * @example include:samples/generated/v1/backup_d_r.initiate_backup.js + * region_tag:backupdr_v1_generated_BackupDR_InitiateBackup_async */ - async checkDeleteManagementServerProgress( - name: string + initiateBackup( + request?: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, + options?: CallOptions ): Promise< - LROperation< - protos.google.protobuf.Empty, - protos.google.cloud.backupdr.v1.OperationMetadata + [ + protos.google.cloud.backupdr.v1.IInitiateBackupResponse, + protos.google.cloud.backupdr.v1.IInitiateBackupRequest | undefined, + {} | undefined, + ] + >; + initiateBackup( + request: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IInitiateBackupResponse, + protos.google.cloud.backupdr.v1.IInitiateBackupRequest | null | undefined, + {} | null | undefined > - > { - 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.deleteManagementServer, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.protobuf.Empty, - protos.google.cloud.backupdr.v1.OperationMetadata - >; + ): void; + initiateBackup( + request: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IInitiateBackupResponse, + protos.google.cloud.backupdr.v1.IInitiateBackupRequest | null | undefined, + {} | null | undefined + > + ): void; + initiateBackup( + request?: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1.IInitiateBackupResponse, + | protos.google.cloud.backupdr.v1.IInitiateBackupRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1.IInitiateBackupResponse, + protos.google.cloud.backupdr.v1.IInitiateBackupRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IInitiateBackupResponse, + protos.google.cloud.backupdr.v1.IInitiateBackupRequest | 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({ + data_source: request.dataSource ?? '', + }); + this.initialize(); + return this.innerApiCalls.initiateBackup(request, options, callback); + } + /** + * Internal only. + * Fetch access token for a given data source. + * + * @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/* /backupVaults/* /dataSources'. + * @param {number} request.generationId + * Required. The generation of the backup to update. + * @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.backupdr.v1.FetchAccessTokenResponse|FetchAccessTokenResponse}. + * 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/backup_d_r.fetch_access_token.js + * region_tag:backupdr_v1_generated_BackupDR_FetchAccessToken_async + */ + fetchAccessToken( + request?: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, + protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest | undefined, + {} | undefined, + ] + >; + fetchAccessToken( + request: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, + | protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchAccessToken( + request: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, + | protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchAccessToken( + request?: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, + | protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, + | protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, + protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest | 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.fetchAccessToken(request, options, callback); + } + /** + * Gets details of a Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @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.backupdr.v1.Backup|Backup}. + * 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/backup_d_r.get_backup.js + * region_tag:backupdr_v1_generated_BackupDR_GetBackup_async + */ + getBackup( + request?: protos.google.cloud.backupdr.v1.IGetBackupRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest | undefined, + {} | undefined, + ] + >; + getBackup( + request: protos.google.cloud.backupdr.v1.IGetBackupRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest | null | undefined, + {} | null | undefined + > + ): void; + getBackup( + request: protos.google.cloud.backupdr.v1.IGetBackupRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest | null | undefined, + {} | null | undefined + > + ): void; + getBackup( + request?: protos.google.cloud.backupdr.v1.IGetBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest | 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.getBackup(request, options, callback); + } + /** + * Gets details of a single BackupPlan. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the `BackupPlan` to retrieve. + * + * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + * @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.backupdr.v1.BackupPlan|BackupPlan}. + * 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/backup_d_r.get_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_GetBackupPlan_async + */ + getBackupPlan( + request?: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest | undefined, + {} | undefined, + ] + >; + getBackupPlan( + request: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest | null | undefined, + {} | null | undefined + > + ): void; + getBackupPlan( + request: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest | null | undefined, + {} | null | undefined + > + ): void; + getBackupPlan( + request?: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1.IBackupPlan, + | protos.google.cloud.backupdr.v1.IGetBackupPlanRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest | null | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest | 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.getBackupPlan(request, options, callback); + } + /** + * Gets details of a single BackupPlanAssociation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. + * 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/backup_d_r.get_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_async + */ + getBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + ( + | protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest + | undefined + ), + {} | undefined, + ] + >; + getBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + | protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + | protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + | protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + | protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + ( + | protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest + | 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.getBackupPlanAssociation( + request, + options, + callback + ); + } + + /** + * Creates a new ManagementServer in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The management server project and location in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR + * locations map to Google Cloud regions, for example **us-central1**. + * @param {string} request.managementServerId + * Required. The name of the management server to create. The name must be + * unique for the specified project and location. + * @param {google.cloud.backupdr.v1.ManagementServer} request.managementServer + * Required. A [management server + * resource][google.cloud.backupdr.v1.ManagementServer] + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.create_management_server.js + * region_tag:backupdr_v1_generated_BackupDR_CreateManagementServer_async + */ + createManagementServer( + request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createManagementServer( + request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createManagementServer( + request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createManagementServer( + request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.createManagementServer( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `createManagementServer()`. + * @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/backup_d_r.create_management_server.js + * region_tag:backupdr_v1_generated_BackupDR_CreateManagementServer_async + */ + async checkCreateManagementServerProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.ManagementServer, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.createManagementServer, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.ManagementServer, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Deletes a single ManagementServer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.delete_management_server.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteManagementServer_async + */ + deleteManagementServer( + request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteManagementServer( + request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteManagementServer( + request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteManagementServer( + request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.deleteManagementServer( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `deleteManagementServer()`. + * @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/backup_d_r.delete_management_server.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteManagementServer_async + */ + async checkDeleteManagementServerProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.deleteManagementServer, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Creates a new BackupVault in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Value for parent. + * @param {string} request.backupVaultId + * Required. ID of the requesting object + * If auto-generating ID server-side, remove this field and + * backup_vault_id from the method_signature of Create RPC + * @param {google.cloud.backupdr.v1.BackupVault} request.backupVault + * Required. The resource being created + * @param {string} [request.requestId] + * Optional. An optional 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 request, but do not perform mutations. + * The default is 'false'. + * @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/backup_d_r.create_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupVault_async + */ + createBackupVault( + request?: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createBackupVault( + request: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createBackupVault( + request: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createBackupVault( + request?: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.createBackupVault(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createBackupVault()`. + * @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/backup_d_r.create_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupVault_async + */ + async checkCreateBackupVaultProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.BackupVault, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.createBackupVault, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.BackupVault, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Updates the settings of a BackupVault. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * BackupVault 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 the request will fail. + * @param {google.cloud.backupdr.v1.BackupVault} request.backupVault + * Required. The resource being updated + * @param {string} [request.requestId] + * Optional. An optional 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 request, but do not perform mutations. + * The default is 'false'. + * @param {boolean} [request.force] + * Optional. If set to true, will not check plan duration against backup vault + * enforcement duration. + * @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/backup_d_r.update_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateBackupVault_async + */ + updateBackupVault( + request?: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateBackupVault( + request: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateBackupVault( + request: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateBackupVault( + request?: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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({ + 'backup_vault.name': request.backupVault!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateBackupVault(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateBackupVault()`. + * @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/backup_d_r.update_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateBackupVault_async + */ + async checkUpdateBackupVaultProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.BackupVault, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.updateBackupVault, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.BackupVault, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Deletes a BackupVault. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {string} [request.requestId] + * Optional. An optional 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 data source from this backup vault will also + * be deleted. + * @param {string} request.etag + * The current etag of the backup vault. + * If an etag is provided and does not match the current etag of the + * connection, deletion will be blocked. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is 'false'. + * @param {boolean} [request.allowMissing] + * Optional. If true and the BackupVault is not found, the request will + * succeed but no action will be taken. + * @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/backup_d_r.delete_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupVault_async + */ + deleteBackupVault( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteBackupVault( + request: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteBackupVault( + request: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteBackupVault( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.deleteBackupVault(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteBackupVault()`. + * @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/backup_d_r.delete_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupVault_async + */ + async checkDeleteBackupVaultProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.deleteBackupVault, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Updates the settings of a DataSource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * DataSource 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 the request will fail. + * @param {google.cloud.backupdr.v1.DataSource} request.dataSource + * Required. The resource being updated + * @param {string} [request.requestId] + * Optional. An optional 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.allowMissing] + * Optional. Enable upsert. + * @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/backup_d_r.update_data_source.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateDataSource_async + */ + updateDataSource( + request?: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateDataSource( + request: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateDataSource( + request: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateDataSource( + request?: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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({ + 'data_source.name': request.dataSource!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateDataSource(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateDataSource()`. + * @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/backup_d_r.update_data_source.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateDataSource_async + */ + async checkUpdateDataSourceProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.DataSource, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.updateDataSource, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.DataSource, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Deletes a DataSource. This is a custom method instead of a standard delete + * method because external clients will not delete DataSources except for + * BackupDR backup appliances. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.remove_data_source.js + * region_tag:backupdr_v1_generated_BackupDR_RemoveDataSource_async + */ + removeDataSource( + request?: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + removeDataSource( + request: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + removeDataSource( + request: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + removeDataSource( + request?: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.removeDataSource(request, options, callback); + } + /** + * Check the status of the long running operation returned by `removeDataSource()`. + * @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/backup_d_r.remove_data_source.js + * region_tag:backupdr_v1_generated_BackupDR_RemoveDataSource_async + */ + async checkRemoveDataSourceProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.removeDataSource, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Sets the internal status of a DataSource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.dataSource + * Required. The resource name of the instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/'. + * @param {Buffer} request.value + * Required. The value required for this method to work. This field must be + * the 32-byte SHA256 hash of the DataSourceID. The DataSourceID used here is + * only the final piece of the fully qualified resource path for this + * DataSource (i.e. the part after '.../dataSources/'). This field exists to + * make this method difficult to call since it is intended for use only by + * Backup Appliances. + * @param {google.cloud.backupdr.v1.BackupConfigState} request.backupConfigState + * Required. Output only. The new BackupConfigState to set for the DataSource. + * @param {string} [request.requestId] + * Optional. An optional 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. 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/backup_d_r.set_internal_status.js + * region_tag:backupdr_v1_generated_BackupDR_SetInternalStatus_async + */ + setInternalStatus( + request?: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + setInternalStatus( + request: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + setInternalStatus( + request: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + setInternalStatus( + request?: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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({ + data_source: request.dataSource ?? '', + }); + this.initialize(); + return this.innerApiCalls.setInternalStatus(request, options, callback); + } + /** + * Check the status of the long running operation returned by `setInternalStatus()`. + * @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/backup_d_r.set_internal_status.js + * region_tag:backupdr_v1_generated_BackupDR_SetInternalStatus_async + */ + async checkSetInternalStatusProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.SetInternalStatusResponse, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.setInternalStatus, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.SetInternalStatusResponse, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Internal only. + * Abandons a backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.dataSource + * Required. The resource name of the instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/'. + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.abandon_backup.js + * region_tag:backupdr_v1_generated_BackupDR_AbandonBackup_async + */ + abandonBackup( + request?: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + abandonBackup( + request: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + abandonBackup( + request: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + abandonBackup( + request?: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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({ + data_source: request.dataSource ?? '', + }); + this.initialize(); + return this.innerApiCalls.abandonBackup(request, options, callback); + } + /** + * Check the status of the long running operation returned by `abandonBackup()`. + * @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/backup_d_r.abandon_backup.js + * region_tag:backupdr_v1_generated_BackupDR_AbandonBackup_async + */ + async checkAbandonBackupProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.abandonBackup, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Internal only. + * Finalize a backup that was started by a call to InitiateBackup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.dataSource + * Required. The resource name of the instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/'. + * @param {string} request.description + * This will be assigned to the description field of the newly created Backup. + * @param {google.protobuf.Timestamp} request.consistencyTime + * The point in time when this backup was captured from the source. This will + * be assigned to the consistency_time field of the newly created Backup. + * @param {string} [request.requestId] + * Optional. An optional 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 {string} request.backupId + * Required. Resource ID of the Backup resource to be finalized. This must be + * the same backup_id that was used in the InitiateBackupRequest. + * @param {google.protobuf.Timestamp} request.recoveryRangeStartTime + * The earliest timestamp of data available in this Backup. This will set on + * the newly created Backup. + * @param {google.protobuf.Timestamp} request.recoveryRangeEndTime + * The latest timestamp of data available in this Backup. This will be set on + * the newly created Backup. + * @param {google.protobuf.Duration} request.retentionDuration + * The ExpireTime on the backup will be set to FinalizeTime plus this + * duration. If the resulting ExpireTime is less than + * EnforcedRetentionEndTime, then ExpireTime is set to + * EnforcedRetentionEndTime. + * @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/backup_d_r.finalize_backup.js + * region_tag:backupdr_v1_generated_BackupDR_FinalizeBackup_async + */ + finalizeBackup( + request?: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + finalizeBackup( + request: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + finalizeBackup( + request: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + finalizeBackup( + request?: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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({ + data_source: request.dataSource ?? '', + }); + this.initialize(); + return this.innerApiCalls.finalizeBackup(request, options, callback); + } + /** + * Check the status of the long running operation returned by `finalizeBackup()`. + * @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/backup_d_r.finalize_backup.js + * region_tag:backupdr_v1_generated_BackupDR_FinalizeBackup_async + */ + async checkFinalizeBackupProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.Backup, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.finalizeBackup, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.Backup, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Updates the settings of a Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup 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 the request will fail. + * @param {google.cloud.backupdr.v1.Backup} request.backup + * Required. The resource being updated + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.update_backup.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateBackup_async + */ + updateBackup( + request?: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + updateBackup( + request: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateBackup( + request: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateBackup( + request?: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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({ + 'backup.name': request.backup!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateBackup(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateBackup()`. + * @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/backup_d_r.update_backup.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateBackup_async + */ + async checkUpdateBackupProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.Backup, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.updateBackup, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.Backup, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Deletes a Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.delete_backup.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackup_async + */ + deleteBackup( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteBackup( + request: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteBackup( + request: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteBackup( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.deleteBackup(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteBackup()`. + * @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/backup_d_r.delete_backup.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackup_async + */ + async checkDeleteBackupProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.Backup, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.deleteBackup, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.Backup, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Restore from a Backup + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Backup instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/* /backups/'. + * @param {string} [request.requestId] + * Optional. An optional 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 {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} request.computeInstanceTargetEnvironment + * Compute Engine target environment to be used during restore. + * @param {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} request.computeInstanceRestoreProperties + * Compute Engine instance properties to be overridden during restore. + * @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/backup_d_r.restore_backup.js + * region_tag:backupdr_v1_generated_BackupDR_RestoreBackup_async + */ + restoreBackup( + request?: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + restoreBackup( + request: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + restoreBackup( + request: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + restoreBackup( + request?: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.restoreBackup(request, options, callback); + } + /** + * Check the status of the long running operation returned by `restoreBackup()`. + * @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/backup_d_r.restore_backup.js + * region_tag:backupdr_v1_generated_BackupDR_RestoreBackup_async + */ + async checkRestoreBackupProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.RestoreBackupResponse, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.restoreBackup, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.RestoreBackupResponse, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Create a BackupPlan + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The `BackupPlan` project and location in the format + * `projects/{project}/locations/{location}`. In Cloud BackupDR locations + * map to GCP regions, for example **us-central1**. + * @param {string} request.backupPlanId + * Required. The name of the `BackupPlan` to create. The name must be unique + * for the specified project and location.The name must start with a lowercase + * letter followed by up to 62 lowercase letters, numbers, or hyphens. + * Pattern, /{@link protos.a-z0-9-|a-z}{,62}/. + * @param {google.cloud.backupdr.v1.BackupPlan} request.backupPlan + * Required. The `BackupPlan` resource object to create. + * @param {string} [request.requestId] + * Optional. An optional 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 t + * he 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/backup_d_r.create_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlan_async + */ + createBackupPlan( + request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createBackupPlan( + request: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createBackupPlan( + request: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createBackupPlan( + request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.createBackupPlan(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createBackupPlan()`. + * @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/backup_d_r.create_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlan_async + */ + async checkCreateBackupPlanProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.BackupPlan, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.createBackupPlan, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.BackupPlan, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Deletes a single BackupPlan. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the `BackupPlan` to delete. + * + * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.delete_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlan_async + */ + deleteBackupPlan( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteBackupPlan( + request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteBackupPlan( + request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteBackupPlan( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.deleteBackupPlan(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteBackupPlan()`. + * @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/backup_d_r.delete_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlan_async + */ + async checkDeleteBackupPlanProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.deleteBackupPlan, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Create a BackupPlanAssociation + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The backup plan association project and location in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations + * map to GCP regions, for example **us-central1**. + * @param {string} request.backupPlanAssociationId + * Required. The name of the backup plan association to create. The name must + * be unique for the specified project and location. + * @param {google.cloud.backupdr.v1.BackupPlanAssociation} request.backupPlanAssociation + * Required. The resource being created + * @param {string} [request.requestId] + * Optional. An optional 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 t + * he 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/backup_d_r.create_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async + */ + createBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + createBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.createBackupPlanAssociation( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `createBackupPlanAssociation()`. + * @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/backup_d_r.create_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async + */ + async checkCreateBackupPlanAssociationProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.BackupPlanAssociation, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.createBackupPlanAssociation, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.BackupPlanAssociation, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Deletes a single BackupPlanAssociation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.delete_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async + */ + deleteBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + deleteBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.deleteBackupPlanAssociation( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `deleteBackupPlanAssociation()`. + * @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/backup_d_r.delete_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async + */ + async checkDeleteBackupPlanAssociationProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.deleteBackupPlanAssociation, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Triggers a new Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @param {string} request.ruleId + * Required. backup rule_id for which a backup needs to be triggered. + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.trigger_backup.js + * region_tag:backupdr_v1_generated_BackupDR_TriggerBackup_async + */ + triggerBackup( + request?: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + triggerBackup( + request: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + triggerBackup( + request: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, + callback: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + triggerBackup( + request?: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >, + 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.triggerBackup(request, options, callback); + } + /** + * Check the status of the long running operation returned by `triggerBackup()`. + * @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/backup_d_r.trigger_backup.js + * region_tag:backupdr_v1_generated_BackupDR_TriggerBackup_async + */ + async checkTriggerBackupProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.backupdr.v1.BackupPlanAssociation, + protos.google.cloud.backupdr.v1.OperationMetadata + > + > { + 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.triggerBackup, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.backupdr.v1.BackupPlanAssociation, + protos.google.cloud.backupdr.v1.OperationMetadata + >; + } + /** + * Lists ManagementServers in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud BackupDR, locations map to Google Cloud regions, for example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.ManagementServer|ManagementServer}. + * 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 `listManagementServersAsync()` + * 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. + */ + listManagementServers( + request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IManagementServer[], + protos.google.cloud.backupdr.v1.IListManagementServersRequest | null, + protos.google.cloud.backupdr.v1.IListManagementServersResponse, + ] + >; + listManagementServers( + request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListManagementServersRequest, + | protos.google.cloud.backupdr.v1.IListManagementServersResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IManagementServer + > + ): void; + listManagementServers( + request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListManagementServersRequest, + | protos.google.cloud.backupdr.v1.IListManagementServersResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IManagementServer + > + ): void; + listManagementServers( + request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1.IListManagementServersRequest, + | protos.google.cloud.backupdr.v1.IListManagementServersResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IManagementServer + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListManagementServersRequest, + | protos.google.cloud.backupdr.v1.IListManagementServersResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IManagementServer + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IManagementServer[], + protos.google.cloud.backupdr.v1.IListManagementServersRequest | null, + protos.google.cloud.backupdr.v1.IListManagementServersResponse, + ] + > | 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.listManagementServers(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 project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud BackupDR, locations map to Google Cloud regions, for example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.ManagementServer|ManagementServer} 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 `listManagementServersAsync()` + * 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. + */ + listManagementServersStream( + request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + 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['listManagementServers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listManagementServers.createStream( + this.innerApiCalls.listManagementServers as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listManagementServers`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud BackupDR, locations map to Google Cloud regions, for example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.ManagementServer|ManagementServer}. 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/backup_d_r.list_management_servers.js + * region_tag:backupdr_v1_generated_BackupDR_ListManagementServers_async + */ + listManagementServersAsync( + request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + 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['listManagementServers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listManagementServers.asyncIterate( + this.innerApiCalls['listManagementServers'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists BackupVaults in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault. + * @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.backupdr.v1.BackupVault|BackupVault}. + * 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 `listBackupVaultsAsync()` + * 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. + */ + listBackupVaults( + request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupVault[], + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest | null, + protos.google.cloud.backupdr.v1.IListBackupVaultsResponse, + ] + >; + listBackupVaults( + request: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + | protos.google.cloud.backupdr.v1.IListBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupVault + > + ): void; + listBackupVaults( + request: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + | protos.google.cloud.backupdr.v1.IListBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupVault + > + ): void; + listBackupVaults( + request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + | protos.google.cloud.backupdr.v1.IListBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupVault + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + | protos.google.cloud.backupdr.v1.IListBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupVault + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupVault[], + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest | null, + protos.google.cloud.backupdr.v1.IListBackupVaultsResponse, + ] + > | 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.listBackupVaults(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 project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault. + * @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.backupdr.v1.BackupVault|BackupVault} 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 `listBackupVaultsAsync()` + * 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. + */ + listBackupVaultsStream( + request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + 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['listBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupVaults.createStream( + this.innerApiCalls.listBackupVaults as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listBackupVaults`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault. + * @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.backupdr.v1.BackupVault|BackupVault}. 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/backup_d_r.list_backup_vaults.js + * region_tag:backupdr_v1_generated_BackupDR_ListBackupVaults_async + */ + listBackupVaultsAsync( + request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + 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['listBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupVaults.asyncIterate( + this.innerApiCalls['listBackupVaults'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * FetchUsableBackupVaults lists usable BackupVaults in a given project and + * location. Usable BackupVault are the ones that user has + * backupdr.backupVaults.get permission. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.BackupVault|BackupVault}. + * 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 `fetchUsableBackupVaultsAsync()` + * 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. + */ + fetchUsableBackupVaults( + request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupVault[], + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest | null, + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse, + ] + >; + fetchUsableBackupVaults( + request: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + | protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupVault + > + ): void; + fetchUsableBackupVaults( + request: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + | protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupVault + > + ): void; + fetchUsableBackupVaults( + request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + | protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupVault + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + | protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupVault + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupVault[], + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest | null, + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse, + ] + > | 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.fetchUsableBackupVaults( + 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 project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.BackupVault|BackupVault} 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 `fetchUsableBackupVaultsAsync()` + * 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. + */ + fetchUsableBackupVaultsStream( + request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + 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['fetchUsableBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.fetchUsableBackupVaults.createStream( + this.innerApiCalls.fetchUsableBackupVaults as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `fetchUsableBackupVaults`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.BackupVault|BackupVault}. 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/backup_d_r.fetch_usable_backup_vaults.js + * region_tag:backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_async + */ + fetchUsableBackupVaultsAsync( + request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + 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['fetchUsableBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.fetchUsableBackupVaults.asyncIterate( + this.innerApiCalls['fetchUsableBackupVaults'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists DataSources in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve data + * sources information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.DataSource|DataSource}. + * 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 `listDataSourcesAsync()` + * 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. + */ + listDataSources( + request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IDataSource[], + protos.google.cloud.backupdr.v1.IListDataSourcesRequest | null, + protos.google.cloud.backupdr.v1.IListDataSourcesResponse, + ] + >; + listDataSources( + request: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + | protos.google.cloud.backupdr.v1.IListDataSourcesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IDataSource + > + ): void; + listDataSources( + request: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + | protos.google.cloud.backupdr.v1.IListDataSourcesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IDataSource + > + ): void; + listDataSources( + request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + | protos.google.cloud.backupdr.v1.IListDataSourcesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IDataSource + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + | protos.google.cloud.backupdr.v1.IListDataSourcesResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IDataSource + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IDataSource[], + protos.google.cloud.backupdr.v1.IListDataSourcesRequest | null, + protos.google.cloud.backupdr.v1.IListDataSourcesResponse, + ] + > | 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.listDataSources(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 project and location for which to retrieve data + * sources information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.DataSource|DataSource} 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 `listDataSourcesAsync()` + * 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. + */ + listDataSourcesStream( + request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + 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['listDataSources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataSources.createStream( + this.innerApiCalls.listDataSources as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listDataSources`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve data + * sources information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.DataSource|DataSource}. 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/backup_d_r.list_data_sources.js + * region_tag:backupdr_v1_generated_BackupDR_ListDataSources_async + */ + listDataSourcesAsync( + request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + 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['listDataSources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataSources.asyncIterate( + this.innerApiCalls['listDataSources'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Backups in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backup + * information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @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.backupdr.v1.Backup|Backup}. + * 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 `listBackupsAsync()` + * 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. + */ + listBackups( + request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackup[], + protos.google.cloud.backupdr.v1.IListBackupsRequest | null, + protos.google.cloud.backupdr.v1.IListBackupsResponse, + ] + >; + listBackups( + request: protos.google.cloud.backupdr.v1.IListBackupsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupsRequest, + protos.google.cloud.backupdr.v1.IListBackupsResponse | null | undefined, + protos.google.cloud.backupdr.v1.IBackup + > + ): void; + listBackups( + request: protos.google.cloud.backupdr.v1.IListBackupsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupsRequest, + protos.google.cloud.backupdr.v1.IListBackupsResponse | null | undefined, + protos.google.cloud.backupdr.v1.IBackup + > + ): void; + listBackups( + request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupsRequest, + | protos.google.cloud.backupdr.v1.IListBackupsResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackup + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupsRequest, + protos.google.cloud.backupdr.v1.IListBackupsResponse | null | undefined, + protos.google.cloud.backupdr.v1.IBackup + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackup[], + protos.google.cloud.backupdr.v1.IListBackupsRequest | null, + protos.google.cloud.backupdr.v1.IListBackupsResponse, + ] + > | 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.listBackups(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 project and location for which to retrieve backup + * information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @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.backupdr.v1.Backup|Backup} 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 `listBackupsAsync()` + * 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. + */ + listBackupsStream( + request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, + 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['listBackups']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackups.createStream( + this.innerApiCalls.listBackups as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listBackups`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backup + * information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @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.backupdr.v1.Backup|Backup}. 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/backup_d_r.list_backups.js + * region_tag:backupdr_v1_generated_BackupDR_ListBackups_async + */ + listBackupsAsync( + request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, + 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['listBackups']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackups.asyncIterate( + this.innerApiCalls['listBackups'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists BackupPlans in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Cloud + * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + * retrieve backup plans for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Field match expression used to filter the results. + * @param {string} [request.orderBy] + * Optional. Field by which to sort the results. + * @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.backupdr.v1.BackupPlan|BackupPlan}. + * 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 `listBackupPlansAsync()` + * 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. + */ + listBackupPlans( + request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupPlan[], + protos.google.cloud.backupdr.v1.IListBackupPlansRequest | null, + protos.google.cloud.backupdr.v1.IListBackupPlansResponse, + ] + >; + listBackupPlans( + request: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + | protos.google.cloud.backupdr.v1.IListBackupPlansResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupPlan + > + ): void; + listBackupPlans( + request: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + | protos.google.cloud.backupdr.v1.IListBackupPlansResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupPlan + > + ): void; + listBackupPlans( + request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + | protos.google.cloud.backupdr.v1.IListBackupPlansResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupPlan + >, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + | protos.google.cloud.backupdr.v1.IListBackupPlansResponse + | null + | undefined, + protos.google.cloud.backupdr.v1.IBackupPlan + > + ): Promise< + [ + protos.google.cloud.backupdr.v1.IBackupPlan[], + protos.google.cloud.backupdr.v1.IListBackupPlansRequest | null, + protos.google.cloud.backupdr.v1.IListBackupPlansResponse, + ] + > | 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.listBackupPlans(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 project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Cloud + * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + * retrieve backup plans for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Field match expression used to filter the results. + * @param {string} [request.orderBy] + * Optional. Field by which to sort the results. + * @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.backupdr.v1.BackupPlan|BackupPlan} 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 `listBackupPlansAsync()` + * 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. + */ + listBackupPlansStream( + request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + 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['listBackupPlans']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupPlans.createStream( + this.innerApiCalls.listBackupPlans as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listBackupPlans`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Cloud + * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + * retrieve backup plans for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Field match expression used to filter the results. + * @param {string} [request.orderBy] + * Optional. Field by which to sort the results. + * @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.backupdr.v1.BackupPlan|BackupPlan}. 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/backup_d_r.list_backup_plans.js + * region_tag:backupdr_v1_generated_BackupDR_ListBackupPlans_async + */ + listBackupPlansAsync( + request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + 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['listBackupPlans']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupPlans.asyncIterate( + this.innerApiCalls['listBackupPlans'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; } /** - * Lists ManagementServers in a given project and location. + * Lists BackupPlanAssociations in a given project and location. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The project and location for which to retrieve management servers - * information, in the format `projects/{project_id}/locations/{location}`. In - * Cloud BackupDR, locations map to GCP regions, for example **us-central1**. - * To retrieve management servers for all locations, use "-" for the + * Required. The project and location for which to retrieve backup Plan + * Associations information, in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + * map to GCP regions, for example **us-central1**. To retrieve backup plan + * associations for all locations, use "-" for the * `{location}` value. * @param {number} [request.pageSize] * Optional. Requested page size. Server may return fewer items than @@ -921,75 +5765,73 @@ export class BackupDRClient { * @param {string} [request.pageToken] * Optional. A token identifying a page of results the server should return. * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. + * Optional. Filtering results * @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.backupdr.v1.ManagementServer|ManagementServer}. + * The first element of the array is Array of {@link protos.google.cloud.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. * 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 `listManagementServersAsync()` + * We recommend using `listBackupPlanAssociationsAsync()` * 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. */ - listManagementServers( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + listBackupPlanAssociations( + request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, options?: CallOptions ): Promise< [ - protos.google.cloud.backupdr.v1.IManagementServer[], - protos.google.cloud.backupdr.v1.IListManagementServersRequest | null, - protos.google.cloud.backupdr.v1.IListManagementServersResponse, + protos.google.cloud.backupdr.v1.IBackupPlanAssociation[], + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest | null, + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse, ] >; - listManagementServers( - request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + listBackupPlanAssociations( + request: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - | protos.google.cloud.backupdr.v1.IListManagementServersResponse + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + | protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse | null | undefined, - protos.google.cloud.backupdr.v1.IManagementServer + protos.google.cloud.backupdr.v1.IBackupPlanAssociation > ): void; - listManagementServers( - request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + listBackupPlanAssociations( + request: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - | protos.google.cloud.backupdr.v1.IListManagementServersResponse + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + | protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse | null | undefined, - protos.google.cloud.backupdr.v1.IManagementServer + protos.google.cloud.backupdr.v1.IBackupPlanAssociation > ): void; - listManagementServers( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + listBackupPlanAssociations( + request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - | protos.google.cloud.backupdr.v1.IListManagementServersResponse + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + | protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse | null | undefined, - protos.google.cloud.backupdr.v1.IManagementServer + protos.google.cloud.backupdr.v1.IBackupPlanAssociation >, callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - | protos.google.cloud.backupdr.v1.IListManagementServersResponse + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + | protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse | null | undefined, - protos.google.cloud.backupdr.v1.IManagementServer + protos.google.cloud.backupdr.v1.IBackupPlanAssociation > ): Promise< [ - protos.google.cloud.backupdr.v1.IManagementServer[], - protos.google.cloud.backupdr.v1.IListManagementServersRequest | null, - protos.google.cloud.backupdr.v1.IListManagementServersResponse, + protos.google.cloud.backupdr.v1.IBackupPlanAssociation[], + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest | null, + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse, ] > | void { request = request || {}; @@ -1008,7 +5850,11 @@ export class BackupDRClient { parent: request.parent ?? '', }); this.initialize(); - return this.innerApiCalls.listManagementServers(request, options, callback); + return this.innerApiCalls.listBackupPlanAssociations( + request, + options, + callback + ); } /** @@ -1016,10 +5862,11 @@ export class BackupDRClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The project and location for which to retrieve management servers - * information, in the format `projects/{project_id}/locations/{location}`. In - * Cloud BackupDR, locations map to GCP regions, for example **us-central1**. - * To retrieve management servers for all locations, use "-" for the + * Required. The project and location for which to retrieve backup Plan + * Associations information, in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + * map to GCP regions, for example **us-central1**. To retrieve backup plan + * associations for all locations, use "-" for the * `{location}` value. * @param {number} [request.pageSize] * Optional. Requested page size. Server may return fewer items than @@ -1027,22 +5874,20 @@ export class BackupDRClient { * @param {string} [request.pageToken] * Optional. A token identifying a page of results the server should return. * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. + * Optional. Filtering results * @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.backupdr.v1.ManagementServer|ManagementServer} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation} 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 `listManagementServersAsync()` + * We recommend using `listBackupPlanAssociationsAsync()` * 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. */ - listManagementServersStream( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + listBackupPlanAssociationsStream( + request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, options?: CallOptions ): Transform { request = request || {}; @@ -1053,27 +5898,28 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listManagementServers']; + const defaultCallSettings = this._defaults['listBackupPlanAssociations']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listManagementServers.createStream( - this.innerApiCalls.listManagementServers as GaxCall, + return this.descriptors.page.listBackupPlanAssociations.createStream( + this.innerApiCalls.listBackupPlanAssociations as GaxCall, request, callSettings ); } /** - * Equivalent to `listManagementServers`, but returns an iterable object. + * Equivalent to `listBackupPlanAssociations`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The project and location for which to retrieve management servers - * information, in the format `projects/{project_id}/locations/{location}`. In - * Cloud BackupDR, locations map to GCP regions, for example **us-central1**. - * To retrieve management servers for all locations, use "-" for the + * Required. The project and location for which to retrieve backup Plan + * Associations information, in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + * map to GCP regions, for example **us-central1**. To retrieve backup plan + * associations for all locations, use "-" for the * `{location}` value. * @param {number} [request.pageSize] * Optional. Requested page size. Server may return fewer items than @@ -1081,25 +5927,23 @@ export class BackupDRClient { * @param {string} [request.pageToken] * Optional. A token identifying a page of results the server should return. * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. + * Optional. Filtering results * @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.backupdr.v1.ManagementServer|ManagementServer}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. 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/backup_d_r.list_management_servers.js - * region_tag:backupdr_v1_generated_BackupDR_ListManagementServers_async + * @example include:samples/generated/v1/backup_d_r.list_backup_plan_associations.js + * region_tag:backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_async */ - listManagementServersAsync( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + listBackupPlanAssociationsAsync( + request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, options?: CallOptions - ): AsyncIterable { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1108,14 +5952,14 @@ export class BackupDRClient { this._gaxModule.routingHeader.fromParams({ parent: request.parent ?? '', }); - const defaultCallSettings = this._defaults['listManagementServers']; + const defaultCallSettings = this._defaults['listBackupPlanAssociations']; const callSettings = defaultCallSettings.merge(options); this.initialize(); - return this.descriptors.page.listManagementServers.asyncIterate( - this.innerApiCalls['listManagementServers'] as GaxCall, + return this.descriptors.page.listBackupPlanAssociations.asyncIterate( + this.innerApiCalls['listBackupPlanAssociations'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** * Gets the access control policy for a resource. Returns an empty policy @@ -1512,6 +6356,325 @@ export class BackupDRClient { // -- Path templates -- // -------------------- + /** + * Return a fully-qualified backup resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backupvault + * @param {string} datasource + * @param {string} backup + * @returns {string} Resource name string. + */ + backupPath( + project: string, + location: string, + backupvault: string, + datasource: string, + backup: string + ) { + return this.pathTemplates.backupPathTemplate.render({ + project: project, + location: location, + backupvault: backupvault, + datasource: datasource, + backup: backup, + }); + } + + /** + * Parse the project from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).project; + } + + /** + * Parse the location from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).location; + } + + /** + * Parse the backupvault from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the backupvault. + */ + matchBackupvaultFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).backupvault; + } + + /** + * Parse the datasource from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the datasource. + */ + matchDatasourceFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).datasource; + } + + /** + * Parse the backup from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the backup. + */ + matchBackupFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).backup; + } + + /** + * Return a fully-qualified backupPlan resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backup_plan + * @returns {string} Resource name string. + */ + backupPlanPath(project: string, location: string, backupPlan: string) { + return this.pathTemplates.backupPlanPathTemplate.render({ + project: project, + location: location, + backup_plan: backupPlan, + }); + } + + /** + * Parse the project from BackupPlan resource. + * + * @param {string} backupPlanName + * A fully-qualified path representing BackupPlan resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupPlanName(backupPlanName: string) { + return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName) + .project; + } + + /** + * Parse the location from BackupPlan resource. + * + * @param {string} backupPlanName + * A fully-qualified path representing BackupPlan resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupPlanName(backupPlanName: string) { + return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName) + .location; + } + + /** + * Parse the backup_plan from BackupPlan resource. + * + * @param {string} backupPlanName + * A fully-qualified path representing BackupPlan resource. + * @returns {string} A string representing the backup_plan. + */ + matchBackupPlanFromBackupPlanName(backupPlanName: string) { + return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName) + .backup_plan; + } + + /** + * Return a fully-qualified backupPlanAssociation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backup_plan_association + * @returns {string} Resource name string. + */ + backupPlanAssociationPath( + project: string, + location: string, + backupPlanAssociation: string + ) { + return this.pathTemplates.backupPlanAssociationPathTemplate.render({ + project: project, + location: location, + backup_plan_association: backupPlanAssociation, + }); + } + + /** + * Parse the project from BackupPlanAssociation resource. + * + * @param {string} backupPlanAssociationName + * A fully-qualified path representing BackupPlanAssociation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupPlanAssociationName(backupPlanAssociationName: string) { + return this.pathTemplates.backupPlanAssociationPathTemplate.match( + backupPlanAssociationName + ).project; + } + + /** + * Parse the location from BackupPlanAssociation resource. + * + * @param {string} backupPlanAssociationName + * A fully-qualified path representing BackupPlanAssociation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupPlanAssociationName( + backupPlanAssociationName: string + ) { + return this.pathTemplates.backupPlanAssociationPathTemplate.match( + backupPlanAssociationName + ).location; + } + + /** + * Parse the backup_plan_association from BackupPlanAssociation resource. + * + * @param {string} backupPlanAssociationName + * A fully-qualified path representing BackupPlanAssociation resource. + * @returns {string} A string representing the backup_plan_association. + */ + matchBackupPlanAssociationFromBackupPlanAssociationName( + backupPlanAssociationName: string + ) { + return this.pathTemplates.backupPlanAssociationPathTemplate.match( + backupPlanAssociationName + ).backup_plan_association; + } + + /** + * Return a fully-qualified backupVault resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backupvault + * @returns {string} Resource name string. + */ + backupVaultPath(project: string, location: string, backupvault: string) { + return this.pathTemplates.backupVaultPathTemplate.render({ + project: project, + location: location, + backupvault: backupvault, + }); + } + + /** + * Parse the project from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName) + .project; + } + + /** + * Parse the location from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName) + .location; + } + + /** + * Parse the backupvault from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the backupvault. + */ + matchBackupvaultFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName) + .backupvault; + } + + /** + * Return a fully-qualified dataSource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backupvault + * @param {string} datasource + * @returns {string} Resource name string. + */ + dataSourcePath( + project: string, + location: string, + backupvault: string, + datasource: string + ) { + return this.pathTemplates.dataSourcePathTemplate.render({ + project: project, + location: location, + backupvault: backupvault, + datasource: datasource, + }); + } + + /** + * Parse the project from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName) + .project; + } + + /** + * Parse the location from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName) + .location; + } + + /** + * Parse the backupvault from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the backupvault. + */ + matchBackupvaultFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName) + .backupvault; + } + + /** + * Parse the datasource from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the datasource. + */ + matchDatasourceFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName) + .datasource; + } + /** * Return a fully-qualified location resource name string. * diff --git a/packages/google-cloud-backupdr/src/v1/backup_d_r_client_config.json b/packages/google-cloud-backupdr/src/v1/backup_d_r_client_config.json index 120fe4b7bcf..8b29881f031 100644 --- a/packages/google-cloud-backupdr/src/v1/backup_d_r_client_config.json +++ b/packages/google-cloud-backupdr/src/v1/backup_d_r_client_config.json @@ -51,6 +51,139 @@ "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" + }, + "CreateBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListBackupVaults": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "FetchUsableBackupVaults": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "TestIamPermissions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListDataSources": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetDataSource": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateDataSource": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RemoveDataSource": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SetInternalStatus": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "InitiateBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "AbandonBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FinalizeBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchAccessToken": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBackups": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetBackup": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RestoreBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBackupPlan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBackupPlan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBackupPlans": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackupPlan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBackupPlanAssociation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBackupPlanAssociation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBackupPlanAssociations": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackupPlanAssociation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "TriggerBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-backupdr/src/v1/backup_d_r_proto_list.json b/packages/google-cloud-backupdr/src/v1/backup_d_r_proto_list.json index 33bf9e3abd8..79496ec85e7 100644 --- a/packages/google-cloud-backupdr/src/v1/backup_d_r_proto_list.json +++ b/packages/google-cloud-backupdr/src/v1/backup_d_r_proto_list.json @@ -1,3 +1,8 @@ [ - "../../protos/google/cloud/backupdr/v1/backupdr.proto" + "../../protos/google/cloud/backupdr/v1/backupdr.proto", + "../../protos/google/cloud/backupdr/v1/backupplan.proto", + "../../protos/google/cloud/backupdr/v1/backupplanassociation.proto", + "../../protos/google/cloud/backupdr/v1/backupvault.proto", + "../../protos/google/cloud/backupdr/v1/backupvault_ba.proto", + "../../protos/google/cloud/backupdr/v1/backupvault_gce.proto" ] diff --git a/packages/google-cloud-backupdr/src/v1/gapic_metadata.json b/packages/google-cloud-backupdr/src/v1/gapic_metadata.json index dcbec27da8a..0407284a357 100644 --- a/packages/google-cloud-backupdr/src/v1/gapic_metadata.json +++ b/packages/google-cloud-backupdr/src/v1/gapic_metadata.json @@ -15,6 +15,46 @@ "getManagementServer" ] }, + "GetBackupVault": { + "methods": [ + "getBackupVault" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "GetDataSource": { + "methods": [ + "getDataSource" + ] + }, + "InitiateBackup": { + "methods": [ + "initiateBackup" + ] + }, + "FetchAccessToken": { + "methods": [ + "fetchAccessToken" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupPlan": { + "methods": [ + "getBackupPlan" + ] + }, + "GetBackupPlanAssociation": { + "methods": [ + "getBackupPlanAssociation" + ] + }, "CreateManagementServer": { "methods": [ "createManagementServer" @@ -25,12 +65,134 @@ "deleteManagementServer" ] }, + "CreateBackupVault": { + "methods": [ + "createBackupVault" + ] + }, + "UpdateBackupVault": { + "methods": [ + "updateBackupVault" + ] + }, + "DeleteBackupVault": { + "methods": [ + "deleteBackupVault" + ] + }, + "UpdateDataSource": { + "methods": [ + "updateDataSource" + ] + }, + "RemoveDataSource": { + "methods": [ + "removeDataSource" + ] + }, + "SetInternalStatus": { + "methods": [ + "setInternalStatus" + ] + }, + "AbandonBackup": { + "methods": [ + "abandonBackup" + ] + }, + "FinalizeBackup": { + "methods": [ + "finalizeBackup" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "RestoreBackup": { + "methods": [ + "restoreBackup" + ] + }, + "CreateBackupPlan": { + "methods": [ + "createBackupPlan" + ] + }, + "DeleteBackupPlan": { + "methods": [ + "deleteBackupPlan" + ] + }, + "CreateBackupPlanAssociation": { + "methods": [ + "createBackupPlanAssociation" + ] + }, + "DeleteBackupPlanAssociation": { + "methods": [ + "deleteBackupPlanAssociation" + ] + }, + "TriggerBackup": { + "methods": [ + "triggerBackup" + ] + }, "ListManagementServers": { "methods": [ "listManagementServers", "listManagementServersStream", "listManagementServersAsync" ] + }, + "ListBackupVaults": { + "methods": [ + "listBackupVaults", + "listBackupVaultsStream", + "listBackupVaultsAsync" + ] + }, + "FetchUsableBackupVaults": { + "methods": [ + "fetchUsableBackupVaults", + "fetchUsableBackupVaultsStream", + "fetchUsableBackupVaultsAsync" + ] + }, + "ListDataSources": { + "methods": [ + "listDataSources", + "listDataSourcesStream", + "listDataSourcesAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + }, + "ListBackupPlans": { + "methods": [ + "listBackupPlans", + "listBackupPlansStream", + "listBackupPlansAsync" + ] + }, + "ListBackupPlanAssociations": { + "methods": [ + "listBackupPlanAssociations", + "listBackupPlanAssociationsStream", + "listBackupPlanAssociationsAsync" + ] } } }, @@ -42,6 +204,46 @@ "getManagementServer" ] }, + "GetBackupVault": { + "methods": [ + "getBackupVault" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "GetDataSource": { + "methods": [ + "getDataSource" + ] + }, + "InitiateBackup": { + "methods": [ + "initiateBackup" + ] + }, + "FetchAccessToken": { + "methods": [ + "fetchAccessToken" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupPlan": { + "methods": [ + "getBackupPlan" + ] + }, + "GetBackupPlanAssociation": { + "methods": [ + "getBackupPlanAssociation" + ] + }, "CreateManagementServer": { "methods": [ "createManagementServer" @@ -52,12 +254,134 @@ "deleteManagementServer" ] }, + "CreateBackupVault": { + "methods": [ + "createBackupVault" + ] + }, + "UpdateBackupVault": { + "methods": [ + "updateBackupVault" + ] + }, + "DeleteBackupVault": { + "methods": [ + "deleteBackupVault" + ] + }, + "UpdateDataSource": { + "methods": [ + "updateDataSource" + ] + }, + "RemoveDataSource": { + "methods": [ + "removeDataSource" + ] + }, + "SetInternalStatus": { + "methods": [ + "setInternalStatus" + ] + }, + "AbandonBackup": { + "methods": [ + "abandonBackup" + ] + }, + "FinalizeBackup": { + "methods": [ + "finalizeBackup" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "RestoreBackup": { + "methods": [ + "restoreBackup" + ] + }, + "CreateBackupPlan": { + "methods": [ + "createBackupPlan" + ] + }, + "DeleteBackupPlan": { + "methods": [ + "deleteBackupPlan" + ] + }, + "CreateBackupPlanAssociation": { + "methods": [ + "createBackupPlanAssociation" + ] + }, + "DeleteBackupPlanAssociation": { + "methods": [ + "deleteBackupPlanAssociation" + ] + }, + "TriggerBackup": { + "methods": [ + "triggerBackup" + ] + }, "ListManagementServers": { "methods": [ "listManagementServers", "listManagementServersStream", "listManagementServersAsync" ] + }, + "ListBackupVaults": { + "methods": [ + "listBackupVaults", + "listBackupVaultsStream", + "listBackupVaultsAsync" + ] + }, + "FetchUsableBackupVaults": { + "methods": [ + "fetchUsableBackupVaults", + "fetchUsableBackupVaultsStream", + "fetchUsableBackupVaultsAsync" + ] + }, + "ListDataSources": { + "methods": [ + "listDataSources", + "listDataSourcesStream", + "listDataSourcesAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + }, + "ListBackupPlans": { + "methods": [ + "listBackupPlans", + "listBackupPlansStream", + "listBackupPlansAsync" + ] + }, + "ListBackupPlanAssociations": { + "methods": [ + "listBackupPlanAssociations", + "listBackupPlanAssociationsStream", + "listBackupPlanAssociationsAsync" + ] } } } diff --git a/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts b/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts index 3c35c290267..ca86dd90686 100644 --- a/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts +++ b/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts @@ -472,69 +472,64 @@ describe('v1.BackupDRClient', () => { }); }); - describe('createManagementServer', () => { - it('invokes createManagementServer without error', async () => { + describe('getBackupVault', () => { + it('invokes getBackupVault without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.CreateManagementServerRequest', - ['parent'] + '.google.cloud.backupdr.v1.GetBackupVaultRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.backupdr.v1.BackupVault() ); - client.innerApiCalls.createManagementServer = - stubLongRunningCall(expectedResponse); - const [operation] = await client.createManagementServer(request); - const [response] = await operation.promise(); + client.innerApiCalls.getBackupVault = stubSimpleCall(expectedResponse); + const [response] = await client.getBackupVault(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createManagementServer as SinonStub + client.innerApiCalls.getBackupVault as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createManagementServer as SinonStub + client.innerApiCalls.getBackupVault as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createManagementServer without error using callback', async () => { + it('invokes getBackupVault without error using callback', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.CreateManagementServerRequest', - ['parent'] + '.google.cloud.backupdr.v1.GetBackupVaultRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.backupdr.v1.BackupVault() ); - client.innerApiCalls.createManagementServer = - stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getBackupVault = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createManagementServer( + client.getBackupVault( request, ( err?: Error | null, - result?: LROperation< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IOperationMetadata - > | null + result?: protos.google.cloud.backupdr.v1.IBackupVault | null ) => { if (err) { reject(err); @@ -544,194 +539,6188 @@ describe('v1.BackupDRClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IOperationMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createManagementServer as SinonStub + client.innerApiCalls.getBackupVault as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createManagementServer as SinonStub + client.innerApiCalls.getBackupVault as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createManagementServer with call error', async () => { + it('invokes getBackupVault with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.CreateManagementServerRequest', - ['parent'] + '.google.cloud.backupdr.v1.GetBackupVaultRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.createManagementServer = stubLongRunningCall( + client.innerApiCalls.getBackupVault = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.createManagementServer(request), - expectedError - ); + await assert.rejects(client.getBackupVault(request), expectedError); const actualRequest = ( - client.innerApiCalls.createManagementServer as SinonStub + client.innerApiCalls.getBackupVault as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createManagementServer as SinonStub + client.innerApiCalls.getBackupVault as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createManagementServer with LRO error', async () => { + it('invokes getBackupVault with closed client', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.CreateManagementServerRequest', - ['parent'] + '.google.cloud.backupdr.v1.GetBackupVaultRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createManagementServer = stubLongRunningCall( - undefined, - undefined, - expectedError + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBackupVault(request), expectedError); + }); + }); + + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() ); - const [operation] = await client.createManagementServer(request); - await assert.rejects(operation.promise(), expectedError); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'] + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = + stubSimpleCall(expectedResponse); + const [response] = await client.testIamPermissions(request); + assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.createManagementServer as SinonStub + client.innerApiCalls.testIamPermissions as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.createManagementServer as SinonStub + client.innerApiCalls.testIamPermissions as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCreateManagementServerProgress without error', async () => { + it('invokes testIamPermissions without error using callback', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() ); - 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.checkCreateManagementServerProgress( - expectedResponse.name + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'] ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + ( + err?: Error | null, + result?: protos.google.iam.v1.ITestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkCreateManagementServerProgress with error', async () => { + it('invokes testIamPermissions with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'] + ); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1}`; const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( + client.innerApiCalls.testIamPermissions = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.checkCreateManagementServerProgress(''), - expectedError + await assert.rejects(client.testIamPermissions(request), expectedError); + const actualRequest = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.testIamPermissions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + const defaultValue1 = getTypeDefaultValue( + '.google.iam.v1.TestIamPermissionsRequest', + ['resource'] + ); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.testIamPermissions(request), expectedError); }); }); - describe('deleteManagementServer', () => { - it('invokes deleteManagementServer without error', async () => { + describe('getDataSource', () => { + it('invokes getDataSource without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.DeleteManagementServerRequest', + '.google.cloud.backupdr.v1.GetDataSourceRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.backupdr.v1.DataSource() ); - client.innerApiCalls.deleteManagementServer = - stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteManagementServer(request); - const [response] = await operation.promise(); + client.innerApiCalls.getDataSource = stubSimpleCall(expectedResponse); + const [response] = await client.getDataSource(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteManagementServer as SinonStub + client.innerApiCalls.getDataSource as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteManagementServer as SinonStub + client.innerApiCalls.getDataSource as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteManagementServer without error using callback', async () => { + it('invokes getDataSource without error using callback', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.DeleteManagementServerRequest', + '.google.cloud.backupdr.v1.GetDataSourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DataSource() + ); + client.innerApiCalls.getDataSource = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataSource( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IDataSource | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSource with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetDataSourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataSource = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getDataSource(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSource with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetDataSourceRequest', ['name'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDataSource(request), expectedError); + }); + }); + + describe('initiateBackup', () => { + it('invokes initiateBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.InitiateBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.InitiateBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.InitiateBackupResponse() + ); + client.innerApiCalls.initiateBackup = stubSimpleCall(expectedResponse); + const [response] = await client.initiateBackup(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.initiateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.initiateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initiateBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.InitiateBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.InitiateBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.InitiateBackupResponse() + ); + client.innerApiCalls.initiateBackup = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.initiateBackup( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IInitiateBackupResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.initiateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.initiateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initiateBackup with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.InitiateBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.InitiateBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.initiateBackup = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.initiateBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.initiateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.initiateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initiateBackup with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.InitiateBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.InitiateBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.initiateBackup(request), expectedError); + }); + }); + + describe('fetchAccessToken', () => { + it('invokes fetchAccessToken without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchAccessTokenRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchAccessTokenResponse() + ); + client.innerApiCalls.fetchAccessToken = stubSimpleCall(expectedResponse); + const [response] = await client.fetchAccessToken(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchAccessToken as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchAccessToken as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchAccessToken without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchAccessTokenRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchAccessTokenResponse() + ); + client.innerApiCalls.fetchAccessToken = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchAccessToken( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchAccessToken as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchAccessToken as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchAccessToken with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchAccessTokenRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchAccessToken = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchAccessToken(request), expectedError); + const actualRequest = ( + client.innerApiCalls.fetchAccessToken as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchAccessToken as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchAccessToken with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchAccessTokenRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchAccessToken(request), expectedError); + }); + }); + + describe('getBackup', () => { + it('invokes getBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.Backup() + ); + client.innerApiCalls.getBackup = stubSimpleCall(expectedResponse); + const [response] = await client.getBackup(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.Backup() + ); + client.innerApiCalls.getBackup = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackup( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IBackup | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackup with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackup = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackup with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBackup(request), expectedError); + }); + }); + + describe('getBackupPlan', () => { + it('invokes getBackupPlan without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupPlanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupPlan() + ); + client.innerApiCalls.getBackupPlan = stubSimpleCall(expectedResponse); + const [response] = await client.getBackupPlan(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlan without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupPlanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupPlan() + ); + client.innerApiCalls.getBackupPlan = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackupPlan( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IBackupPlan | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlan with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupPlanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackupPlan = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getBackupPlan(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlan with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupPlanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBackupPlan(request), expectedError); + }); + }); + + describe('getBackupPlanAssociation', () => { + it('invokes getBackupPlanAssociation without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() + ); + client.innerApiCalls.getBackupPlanAssociation = + stubSimpleCall(expectedResponse); + const [response] = await client.getBackupPlanAssociation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlanAssociation without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() + ); + client.innerApiCalls.getBackupPlanAssociation = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackupPlanAssociation( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IBackupPlanAssociation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlanAssociation with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackupPlanAssociation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getBackupPlanAssociation(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlanAssociation with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getBackupPlanAssociation(request), + expectedError + ); + }); + }); + + describe('createManagementServer', () => { + it('invokes createManagementServer without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateManagementServerRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createManagementServer = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createManagementServer(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createManagementServer without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateManagementServerRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createManagementServer = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createManagementServer( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createManagementServer with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateManagementServerRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createManagementServer = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createManagementServer(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createManagementServer with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateManagementServerRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createManagementServer = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createManagementServer(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateManagementServerProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateManagementServerProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateManagementServerProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateManagementServerProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteManagementServer', () => { + it('invokes deleteManagementServer without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteManagementServerRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteManagementServer = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteManagementServer(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteManagementServer without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteManagementServerRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteManagementServer = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteManagementServer( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteManagementServer with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteManagementServerRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteManagementServer = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteManagementServer(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteManagementServer with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteManagementServerRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteManagementServer = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteManagementServer(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteManagementServer as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteManagementServerProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteManagementServerProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteManagementServerProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteManagementServerProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createBackupVault', () => { + it('invokes createBackupVault without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupVaultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupVault = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackupVault(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupVault without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupVaultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupVault = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createBackupVault( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupVault with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupVaultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupVault = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createBackupVault(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupVault with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupVaultRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupVault = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createBackupVault(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupVaultProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupVaultProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupVaultProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupVaultProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateBackupVault', () => { + it('invokes updateBackupVault without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateBackupVaultRequest', + ['backupVault', 'name'] + ); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBackupVault = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateBackupVault(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupVault without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateBackupVaultRequest', + ['backupVault', 'name'] + ); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBackupVault = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateBackupVault( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupVault with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateBackupVaultRequest', + ['backupVault', 'name'] + ); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackupVault = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateBackupVault(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupVault with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateBackupVaultRequest', + ['backupVault', 'name'] + ); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackupVault = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateBackupVault(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateBackupVaultProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateBackupVaultProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateBackupVaultProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateBackupVaultProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteBackupVault', () => { + it('invokes deleteBackupVault without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupVaultRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupVault = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackupVault(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupVault without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupVaultRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupVault = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackupVault( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupVault with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupVaultRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupVault = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteBackupVault(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupVault with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupVaultRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupVault = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteBackupVault(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupVault as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupVaultProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupVaultProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupVaultProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupVaultProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateDataSource', () => { + it('invokes updateDataSource without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + ); + request.dataSource ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateDataSourceRequest', + ['dataSource', 'name'] + ); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataSource = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateDataSource(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataSource without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + ); + request.dataSource ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateDataSourceRequest', + ['dataSource', 'name'] + ); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataSource = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataSource( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataSource with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + ); + request.dataSource ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateDataSourceRequest', + ['dataSource', 'name'] + ); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataSource = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateDataSource(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataSource with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + ); + request.dataSource ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateDataSourceRequest', + ['dataSource', 'name'] + ); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataSource = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateDataSource(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateDataSourceProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateDataSourceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateDataSourceProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateDataSourceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('removeDataSource', () => { + it('invokes removeDataSource without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.RemoveDataSourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.removeDataSource = + stubLongRunningCall(expectedResponse); + const [operation] = await client.removeDataSource(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.removeDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeDataSource without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.RemoveDataSourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.removeDataSource = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removeDataSource( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.removeDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeDataSource with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.RemoveDataSourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.removeDataSource = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.removeDataSource(request), expectedError); + const actualRequest = ( + client.innerApiCalls.removeDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeDataSource with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.RemoveDataSourceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.removeDataSource = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.removeDataSource(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.removeDataSource as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.removeDataSource as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRemoveDataSourceProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkRemoveDataSourceProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRemoveDataSourceProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkRemoveDataSourceProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('setInternalStatus', () => { + it('invokes setInternalStatus without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.SetInternalStatusRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.setInternalStatus = + stubLongRunningCall(expectedResponse); + const [operation] = await client.setInternalStatus(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.setInternalStatus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setInternalStatus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setInternalStatus without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.SetInternalStatusRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.setInternalStatus = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setInternalStatus( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.setInternalStatus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setInternalStatus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setInternalStatus with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.SetInternalStatusRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setInternalStatus = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.setInternalStatus(request), expectedError); + const actualRequest = ( + client.innerApiCalls.setInternalStatus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setInternalStatus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setInternalStatus with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.SetInternalStatusRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setInternalStatus = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.setInternalStatus(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.setInternalStatus as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setInternalStatus as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkSetInternalStatusProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkSetInternalStatusProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkSetInternalStatusProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkSetInternalStatusProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('abandonBackup', () => { + it('invokes abandonBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.AbandonBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.AbandonBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.abandonBackup = + stubLongRunningCall(expectedResponse); + const [operation] = await client.abandonBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.abandonBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.abandonBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes abandonBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.AbandonBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.AbandonBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.abandonBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.abandonBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.abandonBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.abandonBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes abandonBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.AbandonBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.AbandonBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.abandonBackup = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.abandonBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.abandonBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.abandonBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes abandonBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.AbandonBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.AbandonBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.abandonBackup = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.abandonBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.abandonBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.abandonBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkAbandonBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkAbandonBackupProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkAbandonBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkAbandonBackupProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('finalizeBackup', () => { + it('invokes finalizeBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FinalizeBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.finalizeBackup = + stubLongRunningCall(expectedResponse); + const [operation] = await client.finalizeBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.finalizeBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.finalizeBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes finalizeBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FinalizeBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.finalizeBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.finalizeBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.finalizeBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.finalizeBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes finalizeBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FinalizeBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.finalizeBackup = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.finalizeBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.finalizeBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.finalizeBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes finalizeBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FinalizeBackupRequest', + ['dataSource'] + ); + request.dataSource = defaultValue1; + const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.finalizeBackup = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.finalizeBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.finalizeBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.finalizeBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkFinalizeBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkFinalizeBackupProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkFinalizeBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkFinalizeBackupProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateBackup', () => { + it('invokes updateBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateBackupRequest', + ['backup', 'name'] + ); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateBackupRequest', + ['backup', 'name'] + ); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateBackupRequest', + ['backup', 'name'] + ); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackup = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.UpdateBackupRequest', + ['backup', 'name'] + ); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackup = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateBackupProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteBackup', () => { + it('invokes deleteBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackup = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackup = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('restoreBackup', () => { + it('invokes restoreBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RestoreBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.RestoreBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.restoreBackup = + stubLongRunningCall(expectedResponse); + const [operation] = await client.restoreBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RestoreBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.RestoreBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.restoreBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.restoreBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IRestoreBackupResponse, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RestoreBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.RestoreBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreBackup = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.restoreBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RestoreBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.RestoreBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreBackup = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.restoreBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRestoreBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkRestoreBackupProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRestoreBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkRestoreBackupProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createBackupPlan', () => { + it('invokes createBackupPlan without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupPlanRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupPlan = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackupPlan(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlan without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupPlanRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupPlan = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createBackupPlan( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlan with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupPlanRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlan = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createBackupPlan(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlan with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupPlanRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlan = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createBackupPlan(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupPlanProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupPlanProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupPlanProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupPlanProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteBackupPlan', () => { + it('invokes deleteBackupPlan without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupPlanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupPlan = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackupPlan(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlan without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupPlanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupPlan = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackupPlan( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlan with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupPlanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlan = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteBackupPlan(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlan with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupPlanRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlan = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteBackupPlan(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlan as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupPlanProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupPlanProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupPlanProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupPlanProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createBackupPlanAssociation', () => { + it('invokes createBackupPlanAssociation without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupPlanAssociation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackupPlanAssociation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlanAssociation without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupPlanAssociation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createBackupPlanAssociation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlanAssociation with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createBackupPlanAssociation(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlanAssociation with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createBackupPlanAssociation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupPlanAssociationProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupPlanAssociationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupPlanAssociationProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupPlanAssociationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteBackupPlanAssociation', () => { + it('invokes deleteBackupPlanAssociation without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupPlanAssociation = + stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackupPlanAssociation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlanAssociation without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupPlanAssociation = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackupPlanAssociation( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlanAssociation with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteBackupPlanAssociation(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlanAssociation with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteBackupPlanAssociation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBackupPlanAssociation as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupPlanAssociationProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupPlanAssociationProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupPlanAssociationProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupPlanAssociationProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('triggerBackup', () => { + it('invokes triggerBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.TriggerBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.TriggerBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.triggerBackup = + stubLongRunningCall(expectedResponse); + const [operation] = await client.triggerBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes triggerBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.TriggerBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.TriggerBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.triggerBackup = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.triggerBackup( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes triggerBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.TriggerBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.TriggerBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.triggerBackup = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.triggerBackup(request), expectedError); + const actualRequest = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes triggerBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.TriggerBackupRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.TriggerBackupRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.triggerBackup = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.triggerBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.triggerBackup as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkTriggerBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkTriggerBackupProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkTriggerBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkTriggerBackupProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listManagementServers', () => { + it('invokes listManagementServers without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListManagementServersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + ]; + client.innerApiCalls.listManagementServers = + stubSimpleCall(expectedResponse); + const [response] = await client.listManagementServers(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listManagementServers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listManagementServers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listManagementServers without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListManagementServersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + ]; + client.innerApiCalls.listManagementServers = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listManagementServers( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IManagementServer[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listManagementServers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listManagementServers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listManagementServers with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListManagementServersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listManagementServers = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listManagementServers(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listManagementServers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listManagementServers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listManagementServersStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListManagementServersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + ]; + client.descriptors.page.listManagementServers.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listManagementServersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.ManagementServer[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.ManagementServer) => { + 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.listManagementServers + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listManagementServers, request) + ); + assert( + ( + client.descriptors.page.listManagementServers + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listManagementServersStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListManagementServersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listManagementServers.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listManagementServersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.ManagementServer[] = + []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.ManagementServer) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listManagementServers + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listManagementServers, request) + ); + assert( + ( + client.descriptors.page.listManagementServers + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listManagementServers without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListManagementServersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ), + ]; + client.descriptors.page.listManagementServers.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IManagementServer[] = []; + const iterable = client.listManagementServersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listManagementServers + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listManagementServers + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listManagementServers with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListManagementServersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listManagementServers.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listManagementServersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IManagementServer[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listManagementServers + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listManagementServers + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listBackupVaults', () => { + it('invokes listBackupVaults without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + ]; + client.innerApiCalls.listBackupVaults = stubSimpleCall(expectedResponse); + const [response] = await client.listBackupVaults(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackupVaults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupVaults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupVaults without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + ]; + client.innerApiCalls.listBackupVaults = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackupVaults( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IBackupVault[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackupVaults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupVaults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupVaults with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackupVaults = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listBackupVaults(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listBackupVaults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupVaults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupVaultsStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + ]; + client.descriptors.page.listBackupVaults.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.BackupVault) => { + 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.listBackupVaults.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackupVaults, request) + ); + assert( + (client.descriptors.page.listBackupVaults.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listBackupVaultsStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupVaults.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.BackupVault) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listBackupVaults.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackupVaults, request) + ); + assert( + (client.descriptors.page.listBackupVaults.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listBackupVaults without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + ]; + client.descriptors.page.listBackupVaults.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; + const iterable = client.listBackupVaultsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listBackupVaults.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listBackupVaults with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupVaults.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBackupVaultsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listBackupVaults.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('fetchUsableBackupVaults', () => { + it('invokes fetchUsableBackupVaults without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + ]; + client.innerApiCalls.fetchUsableBackupVaults = + stubSimpleCall(expectedResponse); + const [response] = await client.fetchUsableBackupVaults(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchUsableBackupVaults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchUsableBackupVaults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchUsableBackupVaults without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + ]; + client.innerApiCalls.fetchUsableBackupVaults = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchUsableBackupVaults( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IBackupVault[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.fetchUsableBackupVaults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchUsableBackupVaults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchUsableBackupVaults with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchUsableBackupVaults = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.fetchUsableBackupVaults(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.fetchUsableBackupVaults as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchUsableBackupVaults as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchUsableBackupVaultsStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + ]; + client.descriptors.page.fetchUsableBackupVaults.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.fetchUsableBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.BackupVault) => { + 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.fetchUsableBackupVaults + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.fetchUsableBackupVaults, request) + ); + assert( + ( + client.descriptors.page.fetchUsableBackupVaults + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes fetchUsableBackupVaultsStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchUsableBackupVaults.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.fetchUsableBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.BackupVault) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.fetchUsableBackupVaults + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.fetchUsableBackupVaults, request) + ); + assert( + ( + client.descriptors.page.fetchUsableBackupVaults + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with fetchUsableBackupVaults without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ), + ]; + client.descriptors.page.fetchUsableBackupVaults.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; + const iterable = client.fetchUsableBackupVaultsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.fetchUsableBackupVaults + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.fetchUsableBackupVaults + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with fetchUsableBackupVaults with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchUsableBackupVaults.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.fetchUsableBackupVaultsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.fetchUsableBackupVaults + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.fetchUsableBackupVaults + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listDataSources', () => { + it('invokes listDataSources without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListDataSourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + ]; + client.innerApiCalls.listDataSources = stubSimpleCall(expectedResponse); + const [response] = await client.listDataSources(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDataSources as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataSources as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSources without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListDataSourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + ]; + client.innerApiCalls.listDataSources = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataSources( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IDataSource[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDataSources as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataSources as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSources with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListDataSourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataSources = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listDataSources(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listDataSources as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataSources as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSourcesStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListDataSourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + ]; + client.descriptors.page.listDataSources.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listDataSourcesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.DataSource[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.DataSource) => { + 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.listDataSources.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDataSources, request) + ); + assert( + (client.descriptors.page.listDataSources.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listDataSourcesStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListDataSourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataSources.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataSourcesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.DataSource[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.DataSource) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listDataSources.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDataSources, request) + ); + assert( + (client.descriptors.page.listDataSources.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listDataSources without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListDataSourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + ]; + client.descriptors.page.listDataSources.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IDataSource[] = []; + const iterable = client.listDataSourcesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listDataSources.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listDataSources.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listDataSources with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListDataSourcesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataSources.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataSourcesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IDataSource[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listDataSources.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listDataSources.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('listBackups', () => { + it('invokes listBackups without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.innerApiCalls.listBackups = stubSimpleCall(expectedResponse); + const [response] = await client.listBackups(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackups without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.innerApiCalls.listBackups = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackups( + request, + ( + err?: Error | null, + result?: protos.google.cloud.backupdr.v1.IBackup[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackups with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackups = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listBackups(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackups as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupsStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.descriptors.page.listBackups.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listBackupsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.Backup[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.Backup) => { + 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.listBackups.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackups, request) + ); + assert( + (client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listBackupsStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackups.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listBackupsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.Backup[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.Backup) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackups, request) + ); + assert( + (client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listBackups without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.descriptors.page.listBackups.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackup[] = []; + const iterable = client.listBackupsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBackups.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listBackups.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('uses async iteration with listBackups with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackups.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listBackupsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackup[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBackups.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert( + (client.descriptors.page.listBackups.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + }); + + describe('listBackupPlans', () => { + it('invokes listBackupPlans without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupPlansRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + ]; + client.innerApiCalls.listBackupPlans = stubSimpleCall(expectedResponse); + const [response] = await client.listBackupPlans(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listBackupPlans as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBackupPlans as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlans without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupPlansRequest', + ['parent'] ); - client.innerApiCalls.deleteManagementServer = - stubLongRunningCallWithCallback(expectedResponse); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + ]; + client.innerApiCalls.listBackupPlans = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deleteManagementServer( + client.listBackupPlans( request, ( err?: Error | null, - result?: LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - > | null + result?: protos.google.cloud.backupdr.v1.IBackupPlan[] | null ) => { if (err) { reject(err); @@ -741,206 +6730,313 @@ describe('v1.BackupDRClient', () => { } ); }); - const operation = (await promise) as LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.deleteManagementServer as SinonStub + client.innerApiCalls.listBackupPlans as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteManagementServer as SinonStub + client.innerApiCalls.listBackupPlans as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteManagementServer with call error', async () => { + it('invokes listBackupPlans with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.DeleteManagementServerRequest', - ['name'] + '.google.cloud.backupdr.v1.ListBackupPlansRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteManagementServer = stubLongRunningCall( + client.innerApiCalls.listBackupPlans = stubSimpleCall( undefined, expectedError ); - await assert.rejects( - client.deleteManagementServer(request), - expectedError - ); + await assert.rejects(client.listBackupPlans(request), expectedError); const actualRequest = ( - client.innerApiCalls.deleteManagementServer as SinonStub + client.innerApiCalls.listBackupPlans as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteManagementServer as SinonStub + client.innerApiCalls.listBackupPlans as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteManagementServer with LRO error', async () => { + it('invokes listBackupPlansStream without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.DeleteManagementServerRequest', - ['name'] + '.google.cloud.backupdr.v1.ListBackupPlansRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteManagementServer = stubLongRunningCall( - undefined, - undefined, - expectedError + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + ]; + client.descriptors.page.listBackupPlans.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listBackupPlansStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupPlan[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.BackupPlan) => { + 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.listBackupPlans.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackupPlans, request) + ); + assert( + (client.descriptors.page.listBackupPlans.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); - const [operation] = await client.deleteManagementServer(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteManagementServer as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteManagementServer as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkDeleteManagementServerProgress without error', async () => { + it('invokes listBackupPlansStream with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupPlansRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupPlans.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listBackupPlansStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupPlan[] = []; + stream.on( + 'data', + (response: protos.google.cloud.backupdr.v1.BackupPlan) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listBackupPlans.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBackupPlans, request) + ); + assert( + (client.descriptors.page.listBackupPlans.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteManagementServerProgress( - expectedResponse.name + it('uses async iteration with listBackupPlans without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupPlansRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + ]; + client.descriptors.page.listBackupPlans.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackupPlan[] = []; + const iterable = client.listBackupPlansAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listBackupPlans.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkDeleteManagementServerProgress with error', async () => { + it('uses async iteration with listBackupPlans with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.backupdr.v1.ListBackupPlansRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError + client.descriptors.page.listBackupPlans.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBackupPlansAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackupPlan[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listBackupPlans.asyncIterate as SinonStub + ).getCall(0).args[1], + request ); - await assert.rejects( - client.checkDeleteManagementServerProgress(''), - expectedError + assert( + (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('listManagementServers', () => { - it('invokes listManagementServers without error', async () => { + describe('listBackupPlanAssociations', () => { + it('invokes listBackupPlanAssociations without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.ListManagementServersRequest', + '.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), ]; - client.innerApiCalls.listManagementServers = + client.innerApiCalls.listBackupPlanAssociations = stubSimpleCall(expectedResponse); - const [response] = await client.listManagementServers(request); + const [response] = await client.listBackupPlanAssociations(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listManagementServers as SinonStub + client.innerApiCalls.listBackupPlanAssociations as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listManagementServers as SinonStub + client.innerApiCalls.listBackupPlanAssociations as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listManagementServers without error using callback', async () => { + it('invokes listBackupPlanAssociations without error using callback', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.ListManagementServersRequest', + '.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), ]; - client.innerApiCalls.listManagementServers = + client.innerApiCalls.listBackupPlanAssociations = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listManagementServers( + client.listBackupPlanAssociations( request, ( err?: Error | null, - result?: protos.google.cloud.backupdr.v1.IManagementServer[] | null + result?: + | protos.google.cloud.backupdr.v1.IBackupPlanAssociation[] + | null ) => { if (err) { reject(err); @@ -953,84 +7049,84 @@ describe('v1.BackupDRClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listManagementServers as SinonStub + client.innerApiCalls.listBackupPlanAssociations as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listManagementServers as SinonStub + client.innerApiCalls.listBackupPlanAssociations as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listManagementServers with error', async () => { + it('invokes listBackupPlanAssociations with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.ListManagementServersRequest', + '.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listManagementServers = stubSimpleCall( + client.innerApiCalls.listBackupPlanAssociations = stubSimpleCall( undefined, expectedError ); await assert.rejects( - client.listManagementServers(request), + client.listBackupPlanAssociations(request), expectedError ); const actualRequest = ( - client.innerApiCalls.listManagementServers as SinonStub + client.innerApiCalls.listBackupPlanAssociations as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listManagementServers as SinonStub + client.innerApiCalls.listBackupPlanAssociations as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listManagementServersStream without error', async () => { + it('invokes listBackupPlanAssociationsStream without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.ListManagementServersRequest', + '.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), ]; - client.descriptors.page.listManagementServers.createStream = + client.descriptors.page.listBackupPlanAssociations.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listManagementServersStream(request); + const stream = client.listBackupPlanAssociationsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.ManagementServer[] = + const responses: protos.google.cloud.backupdr.v1.BackupPlanAssociation[] = []; stream.on( 'data', - (response: protos.google.cloud.backupdr.v1.ManagementServer) => { + (response: protos.google.cloud.backupdr.v1.BackupPlanAssociation) => { responses.push(response); } ); @@ -1045,15 +7141,15 @@ describe('v1.BackupDRClient', () => { assert.deepStrictEqual(responses, expectedResponse); assert( ( - client.descriptors.page.listManagementServers + client.descriptors.page.listBackupPlanAssociations .createStream as SinonStub ) .getCall(0) - .calledWith(client.innerApiCalls.listManagementServers, request) + .calledWith(client.innerApiCalls.listBackupPlanAssociations, request) ); assert( ( - client.descriptors.page.listManagementServers + client.descriptors.page.listBackupPlanAssociations .createStream as SinonStub ) .getCall(0) @@ -1063,31 +7159,31 @@ describe('v1.BackupDRClient', () => { ); }); - it('invokes listManagementServersStream with error', async () => { + it('invokes listBackupPlanAssociationsStream with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.ListManagementServersRequest', + '.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listManagementServers.createStream = + client.descriptors.page.listBackupPlanAssociations.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listManagementServersStream(request); + const stream = client.listBackupPlanAssociationsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.ManagementServer[] = + const responses: protos.google.cloud.backupdr.v1.BackupPlanAssociation[] = []; stream.on( 'data', - (response: protos.google.cloud.backupdr.v1.ManagementServer) => { + (response: protos.google.cloud.backupdr.v1.BackupPlanAssociation) => { responses.push(response); } ); @@ -1101,15 +7197,15 @@ describe('v1.BackupDRClient', () => { await assert.rejects(promise, expectedError); assert( ( - client.descriptors.page.listManagementServers + client.descriptors.page.listBackupPlanAssociations .createStream as SinonStub ) .getCall(0) - .calledWith(client.innerApiCalls.listManagementServers, request) + .calledWith(client.innerApiCalls.listBackupPlanAssociations, request) ); assert( ( - client.descriptors.page.listManagementServers + client.descriptors.page.listBackupPlanAssociations .createStream as SinonStub ) .getCall(0) @@ -1119,50 +7215,51 @@ describe('v1.BackupDRClient', () => { ); }); - it('uses async iteration with listManagementServers without error', async () => { + it('uses async iteration with listBackupPlanAssociations without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.ListManagementServersRequest', + '.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ), ]; - client.descriptors.page.listManagementServers.asyncIterate = + client.descriptors.page.listBackupPlanAssociations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IManagementServer[] = []; - const iterable = client.listManagementServersAsync(request); + const responses: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[] = + []; + const iterable = client.listBackupPlanAssociationsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listManagementServers + client.descriptors.page.listBackupPlanAssociations .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( ( - client.descriptors.page.listManagementServers + client.descriptors.page.listBackupPlanAssociations .asyncIterate as SinonStub ) .getCall(0) @@ -1172,27 +7269,27 @@ describe('v1.BackupDRClient', () => { ); }); - it('uses async iteration with listManagementServers with error', async () => { + it('uses async iteration with listBackupPlanAssociations with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.ListManagementServersRequest', + '.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent'] ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.descriptors.page.listManagementServers.asyncIterate = + client.descriptors.page.listBackupPlanAssociations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listManagementServersAsync(request); + const iterable = client.listBackupPlanAssociationsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IManagementServer[] = + const responses: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -1200,14 +7297,14 @@ describe('v1.BackupDRClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listManagementServers + client.descriptors.page.listBackupPlanAssociations .asyncIterate as SinonStub ).getCall(0).args[1], request ); assert( ( - client.descriptors.page.listManagementServers + client.descriptors.page.listBackupPlanAssociations .asyncIterate as SinonStub ) .getCall(0) @@ -2046,6 +8143,379 @@ describe('v1.BackupDRClient', () => { }); describe('Path templates', () => { + describe('backup', () => { + const fakePath = '/rendered/path/backup'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backupvault: 'backupvaultValue', + datasource: 'datasourceValue', + backup: 'backupValue', + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.backupPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPath', () => { + const result = client.backupPath( + 'projectValue', + 'locationValue', + 'backupvaultValue', + 'datasourceValue', + 'backupValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.backupPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromBackupName', () => { + const result = client.matchProjectFromBackupName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBackupName', () => { + const result = client.matchLocationFromBackupName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBackupvaultFromBackupName', () => { + const result = client.matchBackupvaultFromBackupName(fakePath); + assert.strictEqual(result, 'backupvaultValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasourceFromBackupName', () => { + const result = client.matchDatasourceFromBackupName(fakePath); + assert.strictEqual(result, 'datasourceValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBackupFromBackupName', () => { + const result = client.matchBackupFromBackupName(fakePath); + assert.strictEqual(result, 'backupValue'); + assert( + (client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('backupPlan', () => { + const fakePath = '/rendered/path/backupPlan'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backup_plan: 'backupPlanValue', + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.backupPlanPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPlanPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPlanPath', () => { + const result = client.backupPlanPath( + 'projectValue', + 'locationValue', + 'backupPlanValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.backupPlanPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromBackupPlanName', () => { + const result = client.matchProjectFromBackupPlanName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.backupPlanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBackupPlanName', () => { + const result = client.matchLocationFromBackupPlanName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.backupPlanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBackupPlanFromBackupPlanName', () => { + const result = client.matchBackupPlanFromBackupPlanName(fakePath); + assert.strictEqual(result, 'backupPlanValue'); + assert( + (client.pathTemplates.backupPlanPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('backupPlanAssociation', () => { + const fakePath = '/rendered/path/backupPlanAssociation'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backup_plan_association: 'backupPlanAssociationValue', + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.backupPlanAssociationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupPlanAssociationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupPlanAssociationPath', () => { + const result = client.backupPlanAssociationPath( + 'projectValue', + 'locationValue', + 'backupPlanAssociationValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.backupPlanAssociationPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromBackupPlanAssociationName', () => { + const result = + client.matchProjectFromBackupPlanAssociationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.backupPlanAssociationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBackupPlanAssociationName', () => { + const result = + client.matchLocationFromBackupPlanAssociationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.backupPlanAssociationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBackupPlanAssociationFromBackupPlanAssociationName', () => { + const result = + client.matchBackupPlanAssociationFromBackupPlanAssociationName( + fakePath + ); + assert.strictEqual(result, 'backupPlanAssociationValue'); + assert( + ( + client.pathTemplates.backupPlanAssociationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('backupVault', () => { + const fakePath = '/rendered/path/backupVault'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backupvault: 'backupvaultValue', + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.backupVaultPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.backupVaultPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('backupVaultPath', () => { + const result = client.backupVaultPath( + 'projectValue', + 'locationValue', + 'backupvaultValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.backupVaultPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromBackupVaultName', () => { + const result = client.matchProjectFromBackupVaultName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.backupVaultPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromBackupVaultName', () => { + const result = client.matchLocationFromBackupVaultName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.backupVaultPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBackupvaultFromBackupVaultName', () => { + const result = client.matchBackupvaultFromBackupVaultName(fakePath); + assert.strictEqual(result, 'backupvaultValue'); + assert( + (client.pathTemplates.backupVaultPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataSource', () => { + const fakePath = '/rendered/path/dataSource'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + backupvault: 'backupvaultValue', + datasource: 'datasourceValue', + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataSourcePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataSourcePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataSourcePath', () => { + const result = client.dataSourcePath( + 'projectValue', + 'locationValue', + 'backupvaultValue', + 'datasourceValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataSourcePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromDataSourceName', () => { + const result = client.matchProjectFromDataSourceName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromDataSourceName', () => { + const result = client.matchLocationFromDataSourceName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBackupvaultFromDataSourceName', () => { + const result = client.matchBackupvaultFromDataSourceName(fakePath); + assert.strictEqual(result, 'backupvaultValue'); + assert( + (client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDatasourceFromDataSourceName', () => { + const result = client.matchDatasourceFromDataSourceName(fakePath); + assert.strictEqual(result, 'datasourceValue'); + assert( + (client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('location', () => { const fakePath = '/rendered/path/location'; const expectedParameters = { From 415630056946a4e43cedcb4390ff5db7f5a84935 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 7 Oct 2024 19:04:12 +0000 Subject: [PATCH 4/5] fix!: Remove visibility of unneeded TestIamPermissions RPC fix!: Remove visibility of unneeded InitiateBackup RPC fix!: Remove visibility of unneeded AbandonBackup RPC fix!: Remove visibility of unneeded FinalizeBackup RPC fix!: Remove visibility of unneeded RemoveDataSource RPC fix!: Remove visibility of unneeded SetInternalStatus RPC PiperOrigin-RevId: 683196317 Source-Link: https://github.com/googleapis/googleapis/commit/c532f355b2bae18fdff19ced316897433de5f093 Source-Link: https://github.com/googleapis/googleapis-gen/commit/fd43f5733b002358fa679623f6099aafb6660c8e Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhY2t1cGRyLy5Pd2xCb3QueWFtbCIsImgiOiJmZDQzZjU3MzNiMDAyMzU4ZmE2Nzk2MjNmNjA5OWFhZmI2NjYwYzhlIn0= --- .../google-cloud-backupdr/v1/.eslintignore | 7 + .../google-cloud-backupdr/v1/.eslintrc.json | 3 + .../google-cloud-backupdr/v1/.gitignore | 14 + .../google-cloud-backupdr/v1/.jsdoc.js | 55 + .../google-cloud-backupdr/v1/.mocharc.js | 33 + .../google-cloud-backupdr/v1/.prettierrc.js | 22 + .../google-cloud-backupdr/v1/README.md | 1 + .../google-cloud-backupdr/v1/package.json | 58 + .../google/cloud/backupdr/v1/backupdr.proto | 681 + .../google/cloud/backupdr/v1/backupplan.proto | 438 + .../backupdr/v1/backupplanassociation.proto | 313 + .../cloud/backupdr/v1/backupvault.proto | 1146 + .../cloud/backupdr/v1/backupvault_ba.proto | 49 + .../cloud/backupdr/v1/backupvault_gce.proto | 949 + .../v1/protos/protos.d.ts | 20626 ++++++ .../google-cloud-backupdr/v1/protos/protos.js | 55595 ++++++++++++++++ .../v1/protos/protos.json | 7136 ++ .../v1/backup_d_r.create_backup_plan.js | 91 + ...ckup_d_r.create_backup_plan_association.js | 89 + .../v1/backup_d_r.create_backup_vault.js | 93 + .../v1/backup_d_r.create_management_server.js | 90 + .../generated/v1/backup_d_r.delete_backup.js | 76 + .../v1/backup_d_r.delete_backup_plan.js | 77 + ...ckup_d_r.delete_backup_plan_association.js | 77 + .../v1/backup_d_r.delete_backup_vault.js | 97 + .../v1/backup_d_r.delete_management_server.js | 76 + .../backup_d_r.fetch_usable_backup_vaults.js | 85 + .../generated/v1/backup_d_r.get_backup.js | 67 + .../v1/backup_d_r.get_backup_plan.js | 62 + .../backup_d_r.get_backup_plan_association.js | 62 + .../v1/backup_d_r.get_backup_vault.js | 67 + .../v1/backup_d_r.get_data_source.js | 62 + .../v1/backup_d_r.get_management_server.js | 62 + ...ackup_d_r.list_backup_plan_associations.js | 81 + .../v1/backup_d_r.list_backup_plans.js | 93 + .../v1/backup_d_r.list_backup_vaults.js | 90 + .../generated/v1/backup_d_r.list_backups.js | 90 + .../v1/backup_d_r.list_data_sources.js | 85 + .../v1/backup_d_r.list_management_servers.js | 85 + .../generated/v1/backup_d_r.restore_backup.js | 85 + .../generated/v1/backup_d_r.trigger_backup.js | 82 + .../generated/v1/backup_d_r.update_backup.js | 85 + .../v1/backup_d_r.update_backup_vault.js | 95 + .../v1/backup_d_r.update_data_source.js | 89 + ...pet_metadata_google.cloud.backupdr.v1.json | 1363 + .../google-cloud-backupdr/v1/src/index.ts | 25 + .../v1/src/v1/backup_d_r_client.ts | 4711 ++ .../v1/src/v1/backup_d_r_client_config.json | 163 + .../v1/src/v1/backup_d_r_proto_list.json | 8 + .../v1/src/v1/gapic_metadata.json | 321 + .../google-cloud-backupdr/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_backup_d_r_v1.ts | 5876 ++ .../google-cloud-backupdr/v1/tsconfig.json | 19 + .../v1/webpack.config.js | 64 + 57 files changed, 101996 insertions(+) create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.eslintignore create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.prettierrc.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/README.md create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/package.json create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplan.proto create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplanassociation.proto create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault.proto create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_ba.proto create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_gce.proto create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan_association.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_vault.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan_association.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_vault.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan_association.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_vault.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_data_source.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plan_associations.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plans.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_vaults.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backups.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_data_sources.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.restore_backup.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.trigger_backup.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup_vault.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_data_source.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/index.ts create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client_config.json create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/test/gapic_backup_d_r_v1.ts create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-backupdr/v1/webpack.config.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.eslintignore b/owl-bot-staging/google-cloud-backupdr/v1/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.eslintrc.json b/owl-bot-staging/google-cloud-backupdr/v1/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.gitignore b/owl-bot-staging/google-cloud-backupdr/v1/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.jsdoc.js b/owl-bot-staging/google-cloud-backupdr/v1/.jsdoc.js new file mode 100644 index 00000000000..7b9ce99a79c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/.jsdoc.js @@ -0,0 +1,55 @@ +// 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 +// +// 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 2024 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/backupdr', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js b/owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js new file mode 100644 index 00000000000..13b67c34edc --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js @@ -0,0 +1,33 @@ +// 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 +// +// 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-backupdr/v1/.prettierrc.js b/owl-bot-staging/google-cloud-backupdr/v1/.prettierrc.js new file mode 100644 index 00000000000..9a8fd690982 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/.prettierrc.js @@ -0,0 +1,22 @@ +// 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 +// +// 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-backupdr/v1/README.md b/owl-bot-staging/google-cloud-backupdr/v1/README.md new file mode 100644 index 00000000000..a01e3b46ff3 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/README.md @@ -0,0 +1 @@ +Backupdr: Nodejs Client diff --git a/owl-bot-staging/google-cloud-backupdr/v1/package.json b/owl-bot-staging/google-cloud-backupdr/v1/package.json new file mode 100644 index 00000000000..0bb72fdc884 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/package.json @@ -0,0 +1,58 @@ +{ + "name": "@google-cloud/backupdr", + "version": "0.1.0", + "description": "Backupdr client for Node.js", + "repository": "googleapis/nodejs-backupdr", + "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 backupdr", + "backupdr", + "backup d r" + ], + "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-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto new file mode 100644 index 00000000000..d5ae643d6ff --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto @@ -0,0 +1,681 @@ +// 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.backupdr.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/backupdr/v1/backupplan.proto"; +import "google/cloud/backupdr/v1/backupplanassociation.proto"; +import "google/cloud/backupdr/v1/backupvault.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1"; +option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupDRProto"; +option java_package = "com.google.cloud.backupdr.v1"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1"; +option ruby_package = "Google::Cloud::BackupDR::V1"; + +// The BackupDR Service +service BackupDR { + option (google.api.default_host) = "backupdr.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists ManagementServers in a given project and location. + rpc ListManagementServers(ListManagementServersRequest) + returns (ListManagementServersResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/managementServers" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single ManagementServer. + rpc GetManagementServer(GetManagementServerRequest) + returns (ManagementServer) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/managementServers/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new ManagementServer in a given project and location. + rpc CreateManagementServer(CreateManagementServerRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/managementServers" + body: "management_server" + }; + option (google.api.method_signature) = + "parent,management_server,management_server_id"; + option (google.longrunning.operation_info) = { + response_type: "ManagementServer" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single ManagementServer. + rpc DeleteManagementServer(DeleteManagementServerRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/managementServers/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Creates a new BackupVault in a given project and location. + rpc CreateBackupVault(CreateBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/backupVaults" + body: "backup_vault" + }; + option (google.api.method_signature) = + "parent,backup_vault,backup_vault_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupVault" + metadata_type: "OperationMetadata" + }; + } + + // Lists BackupVaults in a given project and location. + rpc ListBackupVaults(ListBackupVaultsRequest) + returns (ListBackupVaultsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupVaults" + }; + option (google.api.method_signature) = "parent"; + } + + // FetchUsableBackupVaults lists usable BackupVaults in a given project and + // location. Usable BackupVault are the ones that user has + // backupdr.backupVaults.get permission. + rpc FetchUsableBackupVaults(FetchUsableBackupVaultsRequest) + returns (FetchUsableBackupVaultsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a BackupVault. + rpc GetBackupVault(GetBackupVaultRequest) returns (BackupVault) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupVaults/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings of a BackupVault. + rpc UpdateBackupVault(UpdateBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}" + body: "backup_vault" + }; + option (google.api.method_signature) = "backup_vault,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "BackupVault" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a BackupVault. + rpc DeleteBackupVault(DeleteBackupVaultRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupVaults/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists DataSources in a given project and location. + rpc ListDataSources(ListDataSourcesRequest) + returns (ListDataSourcesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a DataSource. + rpc GetDataSource(GetDataSourceRequest) returns (DataSource) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings of a DataSource. + rpc UpdateDataSource(UpdateDataSourceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}" + body: "data_source" + }; + option (google.api.method_signature) = "data_source,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DataSource" + metadata_type: "OperationMetadata" + }; + } + + // Lists Backups in a given project and location. + rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a Backup. + rpc GetBackup(GetBackupRequest) returns (Backup) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the settings of a Backup. + rpc UpdateBackup(UpdateBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + body: "backup" + }; + option (google.api.method_signature) = "backup,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a Backup. + rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Backup" + metadata_type: "OperationMetadata" + }; + } + + // Restore from a Backup + rpc RestoreBackup(RestoreBackupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "RestoreBackupResponse" + metadata_type: "OperationMetadata" + }; + } + + // Create a BackupPlan + rpc CreateBackupPlan(CreateBackupPlanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/backupPlans" + body: "backup_plan" + }; + option (google.api.method_signature) = "parent,backup_plan,backup_plan_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlan" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single BackupPlan. + rpc GetBackupPlan(GetBackupPlanRequest) returns (BackupPlan) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupPlans/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists BackupPlans in a given project and location. + rpc ListBackupPlans(ListBackupPlansRequest) + returns (ListBackupPlansResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupPlans" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a single BackupPlan. + rpc DeleteBackupPlan(DeleteBackupPlanRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupPlans/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Create a BackupPlanAssociation + rpc CreateBackupPlanAssociation(CreateBackupPlanAssociationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" + body: "backup_plan_association" + }; + option (google.api.method_signature) = + "parent,backup_plan_association,backup_plan_association_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlanAssociation" + metadata_type: "OperationMetadata" + }; + } + + // Gets details of a single BackupPlanAssociation. + rpc GetBackupPlanAssociation(GetBackupPlanAssociationRequest) + returns (BackupPlanAssociation) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists BackupPlanAssociations in a given project and location. + rpc ListBackupPlanAssociations(ListBackupPlanAssociationsRequest) + returns (ListBackupPlanAssociationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a single BackupPlanAssociation. + rpc DeleteBackupPlanAssociation(DeleteBackupPlanAssociationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Triggers a new Backup. + rpc TriggerBackup(TriggerBackupRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup" + body: "*" + }; + option (google.api.method_signature) = "name,rule_id"; + option (google.longrunning.operation_info) = { + response_type: "BackupPlanAssociation" + metadata_type: "OperationMetadata" + }; + } +} + +// Network configuration for ManagementServer instance. +message NetworkConfig { + // VPC peering modes supported by Cloud BackupDR. + enum PeeringMode { + // Peering mode not set. + PEERING_MODE_UNSPECIFIED = 0; + + // Connect using Private Service Access to the Management Server. Private + // services access provides an IP address range for multiple Google Cloud + // services, including Cloud BackupDR. + PRIVATE_SERVICE_ACCESS = 1; + } + + // Optional. The resource name of the Google Compute Engine VPC network to + // which the ManagementServer instance is connected. + string network = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The network connect mode of the ManagementServer instance. For + // this version, only PRIVATE_SERVICE_ACCESS is supported. + PeeringMode peering_mode = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// ManagementURI for the Management Server resource. +message ManagementURI { + // Output only. The ManagementServer AGM/RD WebUI URL. + string web_ui = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ManagementServer AGM/RD API URL. + string api = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ManagementURI depending on the Workforce Identity i.e. either 1p or 3p. +message WorkforceIdentityBasedManagementURI { + // Output only. First party Management URI for Google Identities. + string first_party_management_uri = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Third party Management URI for External Identity Providers. + string third_party_management_uri = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// OAuth Client ID depending on the Workforce Identity i.e. either 1p or 3p, +message WorkforceIdentityBasedOAuth2ClientID { + // Output only. First party OAuth Client ID for Google Identities. + string first_party_oauth2_client_id = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Third party OAuth Client ID for External Identity Providers. + string third_party_oauth2_client_id = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ManagementServer describes a single BackupDR ManagementServer instance. +message ManagementServer { + option (google.api.resource) = { + type: "backupdr.googleapis.com/ManagementServer" + pattern: "projects/{project}/locations/{location}/managementServers/{managementserver}" + plural: "managementServers" + singular: "managementServer" + }; + + // Type of backup service resource. + enum InstanceType { + // Instance type is not mentioned. + INSTANCE_TYPE_UNSPECIFIED = 0; + + // Instance for backup and restore management (i.e., AGM). + BACKUP_RESTORE = 1; + } + + // State of Management server instance. + enum InstanceState { + // State not set. + INSTANCE_STATE_UNSPECIFIED = 0; + + // The instance is being created. + CREATING = 1; + + // The instance has been created and is fully usable. + READY = 2; + + // The instance configuration is being updated. Certain kinds of updates + // may cause the instance to become unusable while the update is in + // progress. + UPDATING = 3; + + // The instance is being deleted. + DELETING = 4; + + // The instance is being repaired and may be unstable. + REPAIRING = 5; + + // Maintenance is being performed on this instance. + MAINTENANCE = 6; + + // The instance is experiencing an issue and might be unusable. You can get + // further details from the statusMessage field of Instance resource. + ERROR = 7; + } + + // Output only. Identifier. The resource name. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Optional. The description of the ManagementServer instance (2048 characters + // or less). + string description = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource labels to represent user provided metadata. + // Labels currently defined: + // 1. migrate_from_go= + // If set to true, the MS is created in migration ready mode. + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the instance was created. + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The type of the ManagementServer resource. + InstanceType type = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The hostname or ip address of the exposed AGM endpoints, used + // by clients to connect to AGM/RD graphical user interface and APIs. + ManagementURI management_uri = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The hostnames of the exposed AGM endpoints for both types of + // user i.e. 1p and 3p, used to connect AGM/RM UI. + WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = + 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The ManagementServer state. + InstanceState state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. VPC networks to which the ManagementServer instance is connected. + // For this version, only a single network is supported. + repeated NetworkConfig networks = 8 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Server specified ETag for the ManagementServer resource to + // prevent simultaneous updates from overwiting each other. + string etag = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The OAuth 2.0 client id is required to make API calls to the + // BackupDR instance API of this ManagementServer. This is the value that + // should be provided in the 'aud' field of the OIDC ID Token (see openid + // specification + // https://openid.net/specs/openid-connect-core-1_0.html#IDToken). + string oauth2_client_id = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The OAuth client IDs for both types of user i.e. 1p and 3p. + WorkforceIdentityBasedOAuth2ClientID + workforce_identity_based_oauth2_client_id = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The hostname or ip address of the exposed AGM endpoints, used + // by BAs to connect to BA proxy. + repeated string ba_proxy_uri = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + google.protobuf.BoolValue satisfies_pzs = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + bool satisfies_pzi = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for listing management servers. +message ListManagementServersRequest { + // Required. The project and location for which to retrieve management servers + // information, in the format 'projects/{project_id}/locations/{location}'. In + // Cloud BackupDR, locations map to Google Cloud regions, for example + // **us-central1**. To retrieve management servers for all locations, use "-" + // for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/ManagementServer" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + optional string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + optional string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing management servers. +message ListManagementServersResponse { + // The list of ManagementServer instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return management servers in reachable locations and + // the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated ManagementServer management_servers = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for getting a management server instance. +message GetManagementServerRequest { + // Required. Name of the management server resource name, in the format + // 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/ManagementServer" + } + ]; +} + +// Request message for creating a management server instance. +message CreateManagementServerRequest { + // Required. The management server project and location in the format + // 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR + // locations map to Google Cloud regions, for example **us-central1**. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/ManagementServer" + } + ]; + + // Required. The name of the management server to create. The name must be + // unique for the specified project and location. + string management_server_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A [management server + // resource][google.cloud.backupdr.v1.ManagementServer] + ManagementServer management_server = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional 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]; +} + +// Request message for deleting a management server instance. +message DeleteManagementServerRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/ManagementServer" + } + ]; + + // Optional. An optional 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. AdditionalInfo contains additional Info related to backup plan + // association resource. + map additional_info = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplan.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplan.proto new file mode 100644 index 00000000000..c64986bf364 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplan.proto @@ -0,0 +1,438 @@ +// 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.backupdr.v1; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/dayofweek.proto"; +import "google/type/month.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1"; +option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupPlanProto"; +option java_package = "com.google.cloud.backupdr.v1"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1"; +option ruby_package = "Google::Cloud::BackupDR::V1"; + +// A `BackupPlan` specifies some common fields, such as `description` as well +// as one or more `BackupRule` messages. Each `BackupRule` has a retention +// policy and defines a schedule by which the system is to perform backup +// workloads. +message BackupPlan { + option (google.api.resource) = { + type: "backupdr.googleapis.com/BackupPlan" + pattern: "projects/{project}/locations/{location}/backupPlans/{backup_plan}" + plural: "backupPlans" + singular: "backupPlan" + }; + + // `State` enumerates the possible states for a `BackupPlan`. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The resource is being created. + CREATING = 1; + + // The resource has been created and is fully usable. + ACTIVE = 2; + + // The resource is being deleted. + DELETING = 3; + + // The resource has been created but is not usable. + INACTIVE = 4; + } + + // Output only. Identifier. The resource name of the `BackupPlan`. + // + // Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Optional. The description of the `BackupPlan` resource. + // + // The description allows for additional details about `BackupPlan` and its + // use cases to be provided. An example description is the following: "This + // is a backup plan that performs a daily backup at 6pm and retains data for 3 + // months". The description must be at most 2048 characters. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This collection of key/value pairs allows for custom labels to be + // supplied by the user. Example, {"tag": "Weekly"}. + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. When the `BackupPlan` was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the `BackupPlan` was last updated. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The backup rules for this `BackupPlan`. There must be at least + // one `BackupRule` message. + repeated BackupRule backup_rules = 6 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The `State` for the `BackupPlan`. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The resource type to which the `BackupPlan` will be applied. + // Examples include, "compute.googleapis.com/Instance" and + // "storage.googleapis.com/Bucket". + string resource_type = 8 [(google.api.field_behavior) = REQUIRED]; + + // Optional. `etag` is returned from the service in the response. As a user of + // the service, you may provide an etag value in this field to prevent stale + // resources. + string etag = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Resource name of backup vault which will be used as storage + // location for backups. Format: + // projects/{project}/locations/{location}/backupVaults/{backupvault} + string backup_vault = 10 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Output only. The Google Cloud Platform Service Account to be used by the + // BackupVault for taking backups. Specify the email address of the Backup + // Vault Service Account. + string backup_vault_service_account = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// `BackupRule` binds the backup schedule to a retention policy. +message BackupRule { + // Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is + // unique per `BackupPlan`.The `rule_id` must start with a lowercase letter + // followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, + // /[a-z][a-z0-9-]{,62}/. + string rule_id = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Configures the duration for which backup data will be kept. It is + // defined in “days”. The value should be greater than or equal to minimum + // enforced retention of the backup vault. + int32 backup_retention_days = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. + // + // The schedule that defines the automated backup workloads for this + // `BackupRule`. + oneof backup_schedule_oneof { + // Required. Defines a schedule that runs within the confines of a defined + // window of time. + StandardSchedule standard_schedule = 5 + [(google.api.field_behavior) = REQUIRED]; + } +} + +// `StandardSchedule` defines a schedule that run within the confines of a +// defined window of days. We can define recurrence type for schedule as +// HOURLY, DAILY, WEEKLY, MONTHLY or YEARLY. +message StandardSchedule { + // `RecurrenceTypes` enumerates the applicable periodicity for the schedule. + enum RecurrenceType { + // recurrence type not set + RECURRENCE_TYPE_UNSPECIFIED = 0; + + // The `BackupRule` is to be applied hourly. + HOURLY = 1; + + // The `BackupRule` is to be applied daily. + DAILY = 2; + + // The `BackupRule` is to be applied weekly. + WEEKLY = 3; + + // The `BackupRule` is to be applied monthly. + MONTHLY = 4; + + // The `BackupRule` is to be applied yearly. + YEARLY = 5; + } + + // Required. Specifies the `RecurrenceType` for the schedule. + RecurrenceType recurrence_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Specifies frequency for hourly backups. A hourly frequency of 2 + // means jobs will run every 2 hours from start time till end time defined. + // + // This is required for `recurrence_type`, `HOURLY` and is not applicable + // otherwise. A validation error will occur if a value is supplied and + // `recurrence_type` is not `HOURLY`. + // + // Value of hourly frequency should be between 6 and 23. + // + // Reason for limit : We found that there is bandwidth limitation of 3GB/S for + // GMI while taking a backup and 5GB/S while doing a restore. Given the amount + // of parallel backups and restore we are targeting, this will potentially + // take the backup time to mins and hours (in worst case scenario). + int32 hourly_frequency = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs + // will run. + // + // This is required for `recurrence_type`, `WEEKLY` and is not applicable + // otherwise. A validation error will occur if a value is supplied and + // `recurrence_type` is not `WEEKLY`. + repeated google.type.DayOfWeek days_of_week = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies days of months like 1, 5, or 14 on which jobs will run. + // + // Values for `days_of_month` are only applicable for `recurrence_type`, + // `MONTHLY` and `YEARLY`. A validation error will occur if other values are + // supplied. + repeated int32 days_of_month = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST + // MONDAY, on which jobs will run. This will be specified by two fields in + // `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week, + // e.g. `LAST`. + // + // This field is only applicable for `recurrence_type`, `MONTHLY` and + // `YEARLY`. A validation error will occur if other values are supplied. + WeekDayOfMonth week_day_of_month = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on + // which jobs will run. + // + // This field is only applicable when `recurrence_type` is `YEARLY`. A + // validation error will occur if other values are supplied. + repeated google.type.Month months = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. A BackupWindow defines the window of day during which backup jobs + // will run. Jobs are queued at the beginning of the window and will be marked + // as `NOT_RUN` if they do not start by the end of the window. + // + // Note: running jobs will not be cancelled at the end of the window. + BackupWindow backup_window = 7 [(google.api.field_behavior) = REQUIRED]; + + // Required. The time zone to be used when interpreting the schedule. + // The value of this field must be a time zone name from the IANA tz database. + // See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the + // list of valid timezone names. For e.g., Europe/Paris. + string time_zone = 8 [(google.api.field_behavior) = REQUIRED]; +} + +// `BackupWindow` defines a window of the day during which backup jobs will run. +message BackupWindow { + // Required. The hour of day (0-23) when the window starts for e.g. if value + // of start hour of day is 6 that mean backup window start at 6:00. + int32 start_hour_of_day = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The hour of day (1-24) when the window end for e.g. if value of + // end hour of day is 10 that mean backup window end time is 10:00. + // + // End hour of day should be greater than start hour of day. + // 0 <= start_hour_of_day < end_hour_of_day <= 24 + // + // End hour of day is not include in backup window that mean if + // end_hour_of_day= 10 jobs should start before 10:00. + int32 end_hour_of_day = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `WeekDayOfMonth` defines the week day of the month on which the backups will +// run. The message combines a `WeekOfMonth` and `DayOfWeek` to produce values +// like `FIRST`/`MONDAY` or `LAST`/`FRIDAY`. +message WeekDayOfMonth { + // `WeekOfMonth` enumerates possible weeks in the month, e.g. the first, + // third, or last week of the month. + enum WeekOfMonth { + // The zero value. Do not use. + WEEK_OF_MONTH_UNSPECIFIED = 0; + + // The first week of the month. + FIRST = 1; + + // The second week of the month. + SECOND = 2; + + // The third week of the month. + THIRD = 3; + + // The fourth week of the month. + FOURTH = 4; + + // The last week of the month. + LAST = 5; + } + + // Required. Specifies the week of the month. + WeekOfMonth week_of_month = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Specifies the day of the week. + google.type.DayOfWeek day_of_week = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for creating a `BackupPlan`. +message CreateBackupPlanRequest { + // Required. The `BackupPlan` project and location in the format + // `projects/{project}/locations/{location}`. In Cloud BackupDR locations + // map to GCP regions, for example **us-central1**. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlan" + } + ]; + + // Required. The name of the `BackupPlan` to create. The name must be unique + // for the specified project and location.The name must start with a lowercase + // letter followed by up to 62 lowercase letters, numbers, or hyphens. + // Pattern, /[a-z][a-z0-9-]{,62}/. + string backup_plan_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The `BackupPlan` resource object to create. + BackupPlan backup_plan = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional 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 t + // he 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// The request message for getting a list `BackupPlan`. +message ListBackupPlansRequest { + // Required. The project and location for which to retrieve `BackupPlans` + // information. Format: `projects/{project}/locations/{location}`. In Cloud + // BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + // retrieve backup plans for all locations, use "-" for the + // `{location}` value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlan" + } + ]; + + // Optional. The maximum number of `BackupPlans` to return in a single + // response. If not specified, a default value will be chosen by the service. + // Note that the response may include a partial list and a caller should + // only rely on the response's + // [next_page_token][google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token] + // to determine if there are more instances left to be queried. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value of + // [next_page_token][google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token] + // received from a previous `ListBackupPlans` call. + // Provide this to retrieve the subsequent page in a multi-page list of + // results. When paginating, all other parameters provided to + // `ListBackupPlans` must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field match expression used to filter the results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field by which to sort the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for getting a list of `BackupPlan`. +message ListBackupPlansResponse { + // The list of `BackupPlans` in the project for the specified + // location. + // + // If the `{location}` value in the request is "-", the response contains a + // list of resources from all locations. In case any location is unreachable, + // the response will only return backup plans in reachable locations and + // the 'unreachable' field will be populated with a list of unreachable + // locations. + // BackupPlan + repeated BackupPlan backup_plans = 1; + + // A token which may be sent as + // [page_token][google.cloud.backupdr.v1.ListBackupPlansRequest.page_token] in + // a subsequent `ListBackupPlans` call to retrieve the next page of results. + // If this field is omitted or empty, then there are no more results to + // return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// The request message for getting a `BackupPlan`. +message GetBackupPlanRequest { + // Required. The resource name of the `BackupPlan` to retrieve. + // + // Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + } + ]; +} + +// The request message for deleting a `BackupPlan`. +message DeleteBackupPlanRequest { + // Required. The resource name of the `BackupPlan` to delete. + // + // Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + } + ]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplanassociation.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplanassociation.proto new file mode 100644 index 00000000000..b807a2b916c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplanassociation.proto @@ -0,0 +1,313 @@ +// 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.backupdr.v1; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1"; +option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupPlanAssociationProto"; +option java_package = "com.google.cloud.backupdr.v1"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1"; +option ruby_package = "Google::Cloud::BackupDR::V1"; + +// A BackupPlanAssociation represents a single BackupPlanAssociation which +// contains details like workload, backup plan etc +message BackupPlanAssociation { + option (google.api.resource) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + pattern: "projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}" + plural: "backupPlanAssociations" + singular: "backupPlanAssociation" + }; + + // Enum for State of BackupPlan Association + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The resource is being created. + CREATING = 1; + + // The resource has been created and is fully usable. + ACTIVE = 2; + + // The resource is being deleted. + DELETING = 3; + + // The resource has been created but is not usable. + INACTIVE = 4; + } + + // Output only. Identifier. The resource name of BackupPlanAssociation in + // below format Format : + // projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId} + string name = 1 [ + (google.api.field_behavior) = IDENTIFIER, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. Resource type of workload on which backupplan is applied + string resource_type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Immutable. Resource name of workload on which backupplan is + // applied + string resource = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Required. Resource name of backup plan which needs to be applied on + // workload. Format: + // projects/{project}/locations/{location}/backupPlans/{backupPlanId} + string backup_plan = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + } + ]; + + // Output only. The time when the instance was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The BackupPlanAssociation resource state. + State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The config info related to backup rules. + repeated RuleConfigInfo rules_config_info = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Output Only. + // + // Resource name of data source which will be used as storage location for + // backups taken. + // Format : + // projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource} + string data_source = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Message for rules config info. +message RuleConfigInfo { + // Enum for LastBackupState + enum LastBackupState { + // State not set. + LAST_BACKUP_STATE_UNSPECIFIED = 0; + + // The first backup is pending. + FIRST_BACKUP_PENDING = 1; + + // The most recent backup could not be run/failed because of the lack of + // permissions. + PERMISSION_DENIED = 2; + + // The last backup operation succeeded. + SUCCEEDED = 3; + + // The last backup operation failed. + FAILED = 4; + } + + // Output only. Output Only. + // + // Backup Rule id fetched from backup plan. + string rule_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last backup state for rule. + LastBackupState last_backup_state = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Output Only. + // + // google.rpc.Status object to store the last backup error. + google.rpc.Status last_backup_error = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The point in time when the last successful backup was captured + // from the source. + google.protobuf.Timestamp last_successful_backup_consistency_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for creating a backup plan. +message CreateBackupPlanAssociationRequest { + // Required. The backup plan association project and location in the format + // `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations + // map to GCP regions, for example **us-central1**. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Required. The name of the backup plan association to create. The name must + // be unique for the specified project and location. + string backup_plan_association_id = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created + BackupPlanAssociation backup_plan_association = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional 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 t + // he 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for List BackupPlanAssociation +message ListBackupPlanAssociationsRequest { + // Required. The project and location for which to retrieve backup Plan + // Associations information, in the format + // `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + // map to GCP regions, for example **us-central1**. To retrieve backup plan + // associations for all locations, use "-" for the + // `{location}` value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for List BackupPlanAssociation +message ListBackupPlanAssociationsResponse { + // The list of Backup Plan Associations in the project for the specified + // location. + // + // If the `{location}` value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return backup plan associations in reachable + // locations and the 'unreachable' field will be populated with a list of + // unreachable locations. + repeated BackupPlanAssociation backup_plan_associations = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for getting a BackupPlanAssociation resource. +message GetBackupPlanAssociationRequest { + // Required. Name of the backup plan association resource, in the format + // `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; +} + +// Request message for deleting a backup plan association. +message DeleteBackupPlanAssociationRequest { + // Required. Name of the backup plan association resource, in the format + // `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for triggering a backup. +message TriggerBackupRequest { + // Required. Name of the backup plan association resource, in the format + // `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + } + ]; + + // Required. backup rule_id for which a backup needs to be triggered. + string rule_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional 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 = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault.proto new file mode 100644 index 00000000000..f9b46b5bff0 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault.proto @@ -0,0 +1,1146 @@ +// 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.backupdr.v1; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/backupdr/v1/backupvault_ba.proto"; +import "google/cloud/backupdr/v1/backupvault_gce.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1"; +option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupVaultProto"; +option java_package = "com.google.cloud.backupdr.v1"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1"; +option ruby_package = "Google::Cloud::BackupDR::V1"; + +// Message describing a BackupVault object. +message BackupVault { + option (google.api.resource) = { + type: "backupdr.googleapis.com/BackupVault" + pattern: "projects/{project}/locations/{location}/backupVaults/{backupvault}" + plural: "backupVaults" + singular: "backupVault" + }; + + // Holds the state of the backup vault resource. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The backup vault is being created. + CREATING = 1; + + // The backup vault has been created and is fully usable. + ACTIVE = 2; + + // The backup vault is being deleted. + DELETING = 3; + + // The backup vault is experiencing an issue and might be unusable. + ERROR = 4; + } + + // Holds the access restriction for the backup vault. + enum AccessRestriction { + // Access restriction not set. + ACCESS_RESTRICTION_UNSPECIFIED = 0; + + // Access to or from resources outside your current project will be denied. + WITHIN_PROJECT = 1; + + // Access to or from resources outside your current organization will be + // denied. + WITHIN_ORGANIZATION = 2; + + // No access restriction. + UNRESTRICTED = 3; + } + + // Output only. Identifier. Name of the backup vault to create. It must have + // the + // format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`. + // `{backupvault}` cannot be changed after creation. It must be between 3-63 + // characters long and must be unique within the project and location. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Optional. The description of the BackupVault instance (2048 characters or + // less). + optional string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource labels to represent user provided metadata. + // No labels currently defined: + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the instance was created. + optional google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + optional google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The default and minimum enforced retention for each backup within + // the backup vault. The enforced retention for each backup can be extended. + optional google.protobuf.Duration backup_minimum_enforced_retention_duration = + 20 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Set to true when there are no backups nested under this + // resource. + optional bool deletable = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Server specified ETag for the backup vault resource to + // prevent simultaneous updates from overwiting each other. + optional string etag = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The BackupVault resource instance state. + State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Time after which the BackupVault resource is locked. + optional google.protobuf.Timestamp effective_time = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The number of backups in this backup vault. + int64 backup_count = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Service account used by the BackupVault Service for this + // BackupVault. The user should grant this account permissions in their + // workload project to enable the service to run backups and restores there. + string service_account = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Total size of the storage used by all backup resources. + int64 total_stored_bytes = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Output only + // Immutable after resource creation until resource deletion. + string uid = 21 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. User annotations. See https://google.aip.dev/128#annotations + // Stores small amounts of arbitrary data. + map annotations = 22 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Note: This field is added for future use case and will not be + // supported in the current release. + // + // Optional. + // + // Access restriction for the backup vault. + // Default value is WITHIN_ORGANIZATION if not provided during creation. + AccessRestriction access_restriction = 24 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Message describing a DataSource object. +// Datasource object used to represent Datasource details for both admin and +// basic view. +message DataSource { + option (google.api.resource) = { + type: "backupdr.googleapis.com/DataSource" + pattern: "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}" + plural: "dataSources" + singular: "dataSource" + }; + + // Holds the state of the data source resource. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The data source is being created. + CREATING = 1; + + // The data source has been created and is fully usable. + ACTIVE = 2; + + // The data source is being deleted. + DELETING = 3; + + // The data source is experiencing an issue and might be unusable. + ERROR = 4; + } + + // Output only. Identifier. Name of the datasource to create. + // It must have the + // format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`. + // `{datasource}` cannot be changed after creation. It must be between 3-63 + // characters long and must be unique within the backup vault. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Output only. The DataSource resource instance state. + State state = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Resource labels to represent user provided metadata. + // No labels currently defined: + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time when the instance was created. + optional google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + optional google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Number of backups in the data source. + optional int64 backup_count = 7; + + // Server specified ETag for the ManagementServer resource to prevent + // simultaneous updates from overwiting each other. + optional string etag = 14; + + // The number of bytes (metadata and data) stored in this datasource. + optional int64 total_stored_bytes = 23; + + // Output only. The backup configuration state. + BackupConfigState config_state = 24 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Details of how the resource is configured for backup. + BackupConfigInfo backup_config_info = 25 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The source resource that is represented by this DataSource. It can be a + // Google Cloud resource, or one backed up by a Backup Appliance. + oneof source_resource { + // The backed up resource is a Google Cloud resource. + // The word 'DataSource' was included in the names to indicate that this is + // the representation of the Google Cloud resource used within the + // DataSource object. + DataSourceGcpResource data_source_gcp_resource = 26; + + // The backed up resource is a backup appliance application. + DataSourceBackupApplianceApplication + data_source_backup_appliance_application = 27; + } +} + +// BackupConfigInfo has information about how the resource is configured +// for Backup and about the most recent backup to this vault. +message BackupConfigInfo { + // LastBackupstate tracks whether the last backup was not yet started, + // successful, failed, or could not be run because of the lack of permissions. + enum LastBackupState { + // Status not set. + LAST_BACKUP_STATE_UNSPECIFIED = 0; + + // The first backup has not yet completed + FIRST_BACKUP_PENDING = 1; + + // The most recent backup was successful + SUCCEEDED = 2; + + // The most recent backup failed + FAILED = 3; + + // The most recent backup could not be run/failed because of the lack of + // permissions + PERMISSION_DENIED = 4; + } + + // Output only. The status of the last backup to this BackupVault + LastBackupState last_backup_state = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If the last backup were successful, this field has the + // consistency date. + google.protobuf.Timestamp last_successful_backup_consistency_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If the last backup failed, this field has the error message. + google.rpc.Status last_backup_error = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Configuration Info has the resource format-specific configuration. + oneof backup_config { + // Configuration for a Google Cloud resource. + GcpBackupConfig gcp_backup_config = 4; + + // Configuration for an application backed up by a Backup Appliance. + BackupApplianceBackupConfig backup_appliance_backup_config = 5; + } +} + +// GcpBackupConfig captures the Backup configuration details for Google Cloud +// resources. All Google Cloud resources regardless of type are protected with +// backup plan associations. +message GcpBackupConfig { + // The name of the backup plan. + string backup_plan = 1 [(google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + }]; + + // The description of the backup plan. + string backup_plan_description = 2; + + // The name of the backup plan association. + string backup_plan_association = 3 [(google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlanAssociation" + }]; + + // The names of the backup plan rules which point to this backupvault + repeated string backup_plan_rules = 4; +} + +// BackupApplianceBackupConfig captures the backup configuration for +// applications that are protected by Backup Appliances. +message BackupApplianceBackupConfig { + // The name of the backup appliance. + string backup_appliance_name = 1; + + // The ID of the backup appliance. + int64 backup_appliance_id = 2; + + // The ID of the SLA of this application. + int64 sla_id = 3; + + // The name of the application. + string application_name = 4; + + // The name of the host where the application is running. + string host_name = 5; + + // The name of the SLT associated with the application. + string slt_name = 6; + + // The name of the SLP associated with the application. + string slp_name = 7; +} + +// DataSourceGcpResource is used for protected resources that are Google Cloud +// Resources. This name is easeier to understand than GcpResourceDataSource or +// GcpDataSourceResource +message DataSourceGcpResource { + // Output only. Full resource pathname URL of the source Google Cloud + // resource. + string gcp_resourcename = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Location of the resource: //"global"/"unspecified". + string location = 2; + + // The type of the Google Cloud resource. Use the Unified Resource Type, + // eg. compute.googleapis.com/Instance. + string type = 3; + + // gcp_Properties has properties of the Google Cloud Resource. + oneof gcp_resource_properties { + // ComputeInstanceDataSourceProperties has a subset of Compute Instance + // properties that are useful at the Datasource level. + ComputeInstanceDataSourceProperties compute_instance_datasource_properties = + 4; + } +} + +// BackupApplianceApplication describes a Source Resource when it is an +// application backed up by a BackupAppliance. +message DataSourceBackupApplianceApplication { + // The name of the Application as known to the Backup Appliance. + string application_name = 1; + + // Appliance name. + string backup_appliance = 2; + + // Appliance Id of the Backup Appliance. + int64 appliance_id = 3; + + // The type of the application. e.g. VMBackup + string type = 4; + + // The appid field of the application within the Backup Appliance. + int64 application_id = 8; + + // Hostname of the host where the application is running. + string hostname = 6; + + // Hostid of the application host. + int64 host_id = 7; +} + +// ServiceLockInfo represents the details of a lock taken by the service on a +// Backup resource. +message ServiceLockInfo { + // Output only. The name of the operation that created this lock. + // The lock will automatically be released when the operation completes. + string operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// BackupApplianceLockInfo contains metadata about the backupappliance that +// created the lock. +message BackupApplianceLockInfo { + // Required. The ID of the backup/recovery appliance that created this lock. + int64 backup_appliance_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the backup/recovery appliance that created this lock. + string backup_appliance_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc. The + // value of this string is only meaningful to the client and it is not + // interpreted by the BackupVault service. + string lock_reason = 5 [(google.api.field_behavior) = REQUIRED]; + + // The information about this lock. + oneof lock_source { + // The job name on the backup/recovery appliance that created this lock. + string job_name = 6; + + // The image name that depends on this Backup. + string backup_image = 7; + + // The SLA on the backup/recovery appliance that owns the lock. + int64 sla_id = 8; + } +} + +// BackupLock represents a single lock on a Backup resource. An unexpired +// lock on a Backup prevents the Backup from being deleted. +message BackupLock { + // Required. The time after which this lock is not considered valid and will + // no longer protect the Backup from deletion. + google.protobuf.Timestamp lock_until_time = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Metadata about the owner and reason for the lock. + oneof ClientLockInfo { + // If the client is a backup and recovery appliance, this + // contains metadata about why the lock exists. + BackupApplianceLockInfo backup_appliance_lock_info = 3; + + // Output only. Contains metadata about the lock exist for Google Cloud + // native backups. + ServiceLockInfo service_lock_info = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// Message describing a Backup object. +message Backup { + option (google.api.resource) = { + type: "backupdr.googleapis.com/Backup" + pattern: "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}" + plural: "backups" + singular: "backup" + }; + + // Holds the state of the backup resource. + enum State { + // State not set. + STATE_UNSPECIFIED = 0; + + // The backup is being created. + CREATING = 1; + + // The backup has been created and is fully usable. + ACTIVE = 2; + + // The backup is being deleted. + DELETING = 3; + + // The backup is experiencing an issue and might be unusable. + ERROR = 4; + } + + // Type of the backup, scheduled or ondemand. + enum BackupType { + // Backup type is unspecified. + BACKUP_TYPE_UNSPECIFIED = 0; + + // Scheduled backup. + SCHEDULED = 1; + + // On demand backup. + ON_DEMAND = 2; + } + + // GCPBackupPlanInfo captures the plan configuration details of Google Cloud + // resources at the time of backup. + message GCPBackupPlanInfo { + // Resource name of backup plan by which workload is protected at the time + // of the backup. + // Format: + // projects/{project}/locations/{location}/backupPlans/{backupPlanId} + string backup_plan = 1 [(google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupPlan" + }]; + + // The rule id of the backup plan which triggered this backup in case of + // scheduled backup or used for + string backup_plan_rule_id = 2; + } + + // Output only. Identifier. Name of the backup to create. It must have the + // format`"projects//locations//backupVaults//dataSources/{datasource}/backups/{backup}"`. + // `{backup}` cannot be changed after creation. It must be between 3-63 + // characters long and must be unique within the datasource. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IDENTIFIER + ]; + + // Output only. The description of the Backup instance (2048 characters or + // less). + optional string description = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was created. + optional google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the instance was updated. + optional google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Resource labels to represent user provided metadata. + // No labels currently defined. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The backup can not be deleted before this time. + optional google.protobuf.Timestamp enforced_retention_end_time = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When this backup is automatically expired. + optional google.protobuf.Timestamp expire_time = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The point in time when this backup was captured from the + // source. + optional google.protobuf.Timestamp consistency_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Server specified ETag to prevent updates from overwriting each + // other. + optional string etag = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The Backup resource instance state. + State state = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The list of BackupLocks taken by the service to prevent the + // deletion of the backup. + repeated BackupLock service_locks = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The list of BackupLocks taken by the accessor Backup Appliance. + repeated BackupLock backup_appliance_locks = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Workload specific backup properties. + oneof backup_properties { + // Output only. Compute Engine specific backup properties. + ComputeInstanceBackupProperties compute_instance_backup_properties = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Backup Appliance specific backup properties. + BackupApplianceBackupProperties backup_appliance_backup_properties = 21 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. Type of the backup, unspecified, scheduled or ondemand. + BackupType backup_type = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Configuration Info has the resource format-specific configuration. + oneof plan_info { + // Output only. Configuration for a Google Cloud resource. + GCPBackupPlanInfo gcp_backup_plan_info = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. source resource size in bytes at the time of the backup. + int64 resource_size_bytes = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Message for creating a BackupVault. +message CreateBackupVaultRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Required. ID of the requesting object + // If auto-generating ID server-side, remove this field and + // backup_vault_id from the method_signature of Create RPC + string backup_vault_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created + BackupVault backup_vault = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is 'false'. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for listing backupvault stores. +message ListBackupVaultsRequest { + // Required. The project and location for which to retrieve backupvault stores + // information, in the format 'projects/{project_id}/locations/{location}'. In + // Cloud Backup and DR, locations map to Google Cloud regions, for example + // **us-central1**. + // To retrieve backupvault stores for all locations, use "-" for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Reserved for future use to provide a BASIC & FULL view of Backup + // Vault. + BackupVaultView view = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing BackupVaults. +message ListBackupVaultsResponse { + // The list of BackupVault instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return backup vaults in reachable locations and + // the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated BackupVault backup_vaults = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for fetching usable BackupVaults. +message FetchUsableBackupVaultsRequest { + // Required. The project and location for which to retrieve backupvault stores + // information, in the format 'projects/{project_id}/locations/{location}'. In + // Cloud Backup and DR, locations map to Google Cloud regions, for example + // **us-central1**. + // To retrieve backupvault stores for all locations, use "-" for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for fetching usable BackupVaults. +message FetchUsableBackupVaultsResponse { + // The list of BackupVault instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return backup vaults in reachable locations and + // the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated BackupVault backup_vaults = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for getting a BackupVault. +message GetBackupVaultRequest { + // Required. Name of the backupvault store resource name, in the format + // 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Optional. Reserved for future use to provide a BASIC & FULL view of Backup + // Vault + BackupVaultView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for updating a BackupVault. +message UpdateBackupVaultRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // BackupVault 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 the request will fail. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated + BackupVault backup_vault = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is 'false'. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set to true, will not check plan duration against backup vault + // enforcement duration. + bool force = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for deleting a BackupVault. +message DeleteBackupVaultRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/BackupVault" + } + ]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. If set to true, any data source from this backup vault will also + // be deleted. + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; + + // The current etag of the backup vault. + // If an etag is provided and does not match the current etag of the + // connection, deletion will be blocked. + string etag = 4; + + // Optional. Only validate the request, but do not perform mutations. + // The default is 'false'. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true and the BackupVault is not found, the request will + // succeed but no action will be taken. + bool allow_missing = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for listing DataSources. +message ListDataSourcesRequest { + // Required. The project and location for which to retrieve data + // sources information, in the format + // 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + // locations map to Google Cloud regions, for example **us-central1**. + // To retrieve data sources for all locations, use "-" for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/DataSource" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing DataSources. +message ListDataSourcesResponse { + // The list of DataSource instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return data sources in reachable locations + // and the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated DataSource data_sources = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for getting a DataSource instance. +message GetDataSourceRequest { + // Required. Name of the data source resource name, in the format + // 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "backupdr.googleapis.com/DataSource" + } + ]; +} + +// Request message for updating a data source instance. +message UpdateDataSourceRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // DataSource 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 the request will fail. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated + DataSource data_source = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. Enable upsert. + bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for listing Backups. +message ListBackupsRequest { + // Required. The project and location for which to retrieve backup + // information, in the format + // 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + // locations map to Google Cloud regions, for example **us-central1**. + // To retrieve data sources for all locations, use "-" for the + // '{location}' value. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "backupdr.googleapis.com/Backup" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Reserved for future use to provide a BASIC & FULL view of Backup + // resource. + BackupView view = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for listing Backups. +message ListBackupsResponse { + // The list of Backup instances in the project for the specified + // location. + // + // If the '{location}' value in the request is "-", the response contains a + // list of instances from all locations. In case any location is unreachable, + // the response will only return data sources in reachable locations + // and the 'unreachable' field will be populated with a list of unreachable + // locations. + repeated Backup backups = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Request message for getting a Backup. +message GetBackupRequest { + // Required. Name of the data source resource name, in the format + // 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "backupdr.googleapis.com/Backup" } + ]; + + // Optional. Reserved for future use to provide a BASIC & FULL view of Backup + // resource. + BackupView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for updating a Backup. +message UpdateBackupRequest { + // Required. Field mask is used to specify the fields to be overwritten in the + // Backup 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 the request will fail. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being updated + Backup backup = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for deleting a Backup. +message DeleteBackupRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "backupdr.googleapis.com/Backup" } + ]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for restoring from a Backup. +message RestoreBackupRequest { + // Required. The resource name of the Backup instance, in the format + // 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "backupdr.googleapis.com/Backup" } + ]; + + // Optional. An optional 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_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; + + // The target environment for the restore operation. + oneof target_environment { + // Compute Engine target environment to be used during restore. + ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; + } + + // The property overrides for the instance being restored. + oneof instance_properties { + // Compute Engine instance properties to be overridden during restore. + ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; + } +} + +// Response message for restoring from a Backup. +message RestoreBackupResponse { + // Details of the target resource created/modified as part of restore. + TargetResource target_resource = 1; +} + +// Details of the target resource created/modified as part of restore. +message TargetResource { + // Minimum details to identify the restored resource. + oneof target_resource_info { + // Details of the native Google Cloud resource created as part of restore. + GcpResource gcp_resource = 1; + } +} + +// Minimum details to identify a Google Cloud resource +message GcpResource { + // Name of the Google Cloud resource. + string gcp_resourcename = 1; + + // Location of the resource: //"global"/"unspecified". + string location = 2; + + // Type of the resource. Use the Unified Resource Type, + // eg. compute.googleapis.com/Instance. + string type = 3; +} + +// Backup configuration state. Is the resource configured for backup? +enum BackupConfigState { + // The possible states of backup configuration. + // Status not set. + BACKUP_CONFIG_STATE_UNSPECIFIED = 0; + + // The data source is actively protected (i.e. there is a + // BackupPlanAssociation or Appliance SLA pointing to it) + ACTIVE = 1; + + // The data source is no longer protected (but may have backups under it) + PASSIVE = 2; +} + +// BackupView contains enum options for Partial and Full view. +enum BackupView { + // If the value is not set, the default 'FULL' view is used. + BACKUP_VIEW_UNSPECIFIED = 0; + + // Includes basic data about the Backup, but not the full contents. + BACKUP_VIEW_BASIC = 1; + + // Includes all data about the Backup. + // This is the default value (for both ListBackups and GetBackup). + BACKUP_VIEW_FULL = 2; +} + +// BackupVaultView contains enum options for Partial and Full view. +enum BackupVaultView { + // If the value is not set, the default 'FULL' view is used. + BACKUP_VAULT_VIEW_UNSPECIFIED = 0; + + // Includes basic data about the Backup Vault, but not the full contents. + BACKUP_VAULT_VIEW_BASIC = 1; + + // Includes all data about the Backup Vault. + // This is the default value (for both ListBackupVaults and GetBackupVault). + BACKUP_VAULT_VIEW_FULL = 2; +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_ba.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_ba.proto new file mode 100644 index 00000000000..619b7a34290 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_ba.proto @@ -0,0 +1,49 @@ +// 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.backupdr.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1"; +option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupvaultBaProto"; +option java_package = "com.google.cloud.backupdr.v1"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1"; +option ruby_package = "Google::Cloud::BackupDR::V1"; + +// BackupApplianceBackupProperties represents BackupDR backup appliance's +// properties. +message BackupApplianceBackupProperties { + // Output only. The numeric generation ID of the backup (monotonically + // increasing). + optional int32 generation_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when this backup object was finalized (if none, + // backup is not finalized). + optional google.protobuf.Timestamp finalize_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The earliest timestamp of data available in this Backup. + optional google.protobuf.Timestamp recovery_range_start_time = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The latest timestamp of data available in this Backup. + optional google.protobuf.Timestamp recovery_range_end_time = 4 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_gce.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_gce.proto new file mode 100644 index 00000000000..cab0c0a7dc5 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_gce.proto @@ -0,0 +1,949 @@ +// 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.backupdr.v1; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; + +option csharp_namespace = "Google.Cloud.BackupDR.V1"; +option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; +option java_multiple_files = true; +option java_outer_classname = "BackupvaultGceProto"; +option java_package = "com.google.cloud.backupdr.v1"; +option php_namespace = "Google\\Cloud\\BackupDR\\V1"; +option ruby_package = "Google::Cloud::BackupDR::V1"; + +// ComputeInstanceBackupProperties represents Compute Engine instance backup +// properties. +message ComputeInstanceBackupProperties { + // An optional text description for the instances that are created from these + // properties. + optional string description = 1; + + // A list of tags to apply to the instances that are created from these + // properties. The tags identify valid sources or targets for network + // firewalls. The setTags method can modify this list of tags. Each tag within + // the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt). + optional Tags tags = 2; + + // The machine type to use for instances that are created from these + // properties. + optional string machine_type = 3; + + // Enables instances created based on these properties to send packets with + // source IP addresses other than their own and receive packets with + // destination IP addresses other than their own. If these instances will be + // used as an IP gateway or it will be set as the next-hop in a Route + // resource, specify `true`. If unsure, leave this set to `false`. See the + // https://cloud.google.com/vpc/docs/using-routes#canipforward + // documentation for more information. + optional bool can_ip_forward = 4; + + // An array of network access configurations for this interface. + repeated NetworkInterface network_interface = 5; + + // An array of disks that are associated with the instances that are created + // from these properties. + repeated AttachedDisk disk = 6; + + // The metadata key/value pairs to assign to instances that are created from + // these properties. These pairs can consist of custom metadata or predefined + // keys. See https://cloud.google.com/compute/docs/metadata/overview for more + // information. + optional Metadata metadata = 7; + + // A list of service accounts with specified scopes. Access tokens for these + // service accounts are available to the instances that are created from + // these properties. Use metadata queries to obtain the access tokens for + // these instances. + repeated ServiceAccount service_account = 8; + + // Specifies the scheduling options for the instances that are created from + // these properties. + optional Scheduling scheduling = 9; + + // A list of guest accelerator cards' type and count to use for instances + // created from these properties. + repeated AcceleratorConfig guest_accelerator = 10; + + // Minimum cpu/platform to be used by instances. The instance may be + // scheduled on the specified or newer cpu/platform. Applicable values are the + // friendly names of CPU platforms, such as + // `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`. + // For more information, read + // https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + optional string min_cpu_platform = 11; + + // KeyRevocationActionType of the instance. Supported options are "STOP" and + // "NONE". The default value is "NONE" if it is not specified. + optional KeyRevocationActionType key_revocation_action_type = 12; + + // The source instance used to create this backup. This can be a partial or + // full URL to the resource. For example, the following are valid values: + // -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance + // -projects/project/zones/zone/instances/instance + optional string source_instance = 13; + + // Labels to apply to instances that are created from these properties. + map labels = 14; +} + +// ComputeInstanceRestoreProperties represents Compute Engine instance +// properties to be overridden during restore. +message ComputeInstanceRestoreProperties { + // The private IPv6 google access type for the VMs. + enum InstancePrivateIpv6GoogleAccess { + // Default value. This value is unused. + INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; + + // Each network interface inherits PrivateIpv6GoogleAccess from its + // subnetwork. + INHERIT_FROM_SUBNETWORK = 1; + + // Outbound private IPv6 access from VMs in this subnet to Google services. + // If specified, the subnetwork who is attached to the instance's default + // network interface will be assigned an internal IPv6 prefix if it doesn't + // have before. + ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2; + + // Bidirectional private IPv6 access to/from Google services. If + // specified, the subnetwork who is attached to the instance's default + // network interface will be assigned an internal IPv6 prefix if it doesn't + // have before. + ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3; + } + + // Required. Name of the compute instance. + optional string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Controls for advanced machine-related behavior features. + optional AdvancedMachineFeatures advanced_machine_features = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Allows this instance to send and receive packets with + // non-matching destination or source IPs. + optional bool can_ip_forward = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Controls Confidential compute options on the instance + optional ConfidentialInstanceConfig confidential_instance_config = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether the resource should be protected against deletion. + optional bool deletion_protection = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional description of this resource. Provide this property + // when you create the resource. + optional string description = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Array of disks associated with this instance. Persistent disks + // must be created before you can assign them. + repeated AttachedDisk disks = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Enables display device for the instance. + optional DisplayDevice display_device = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of the type and count of accelerator cards attached to the + // instance. + repeated AcceleratorConfig guest_accelerators = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the hostname of the instance. The specified hostname + // must be RFC1035 compliant. If hostname is not specified, the default + // hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global + // DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal + // DNS. + optional string hostname = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Encrypts suspended data for an instance with a + // customer-managed encryption key. + optional CustomerEncryptionKey instance_encryption_key = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. KeyRevocationActionType of the instance. + optional KeyRevocationActionType key_revocation_action_type = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels to apply to this instance. + map labels = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Full or partial URL of the machine type resource to use for this + // instance. + optional string machine_type = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This includes custom metadata and predefined keys. + optional Metadata metadata = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Minimum CPU platform to use for this instance. + optional string min_cpu_platform = 16 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An array of network configurations for this instance. These + // specify how interfaces are configured to interact with other network + // services, such as connecting to the internet. Multiple interfaces are + // supported per instance. + repeated NetworkInterface network_interfaces = 17 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configure network performance such as egress bandwidth tier. + optional NetworkPerformanceConfig network_performance_config = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Input only. Additional params passed with the request, but not persisted + // as part of resource payload. + optional InstanceParams params = 19 + [(google.api.field_behavior) = INPUT_ONLY]; + + // Optional. The private IPv6 google access type for the VM. + // If not specified, use INHERIT_FROM_SUBNETWORK as default. + optional InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the reservations that this instance can consume from. + optional AllocationAffinity allocation_affinity = 21 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource policies applied to this instance. + repeated string resource_policies = 22 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Sets the scheduling options for this instance. + optional Scheduling scheduling = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of service accounts, with their specified scopes, + // authorized for this instance. Only one service account per VM instance is + // supported. + repeated ServiceAccount service_accounts = 24 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Tags to apply to this instance. Tags are used to identify valid + // sources or targets for network firewalls and are specified by the client + // during instance creation. + optional Tags tags = 26 [(google.api.field_behavior) = OPTIONAL]; +} + +// ComputeInstanceTargetEnvironment represents Compute Engine target +// environment to be used during restore. +message ComputeInstanceTargetEnvironment { + // Required. Target project for the Compute Engine instance. + string project = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The zone of the Compute Engine instance. + string zone = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// ComputeInstanceDataSourceProperties represents the properties of a +// ComputeEngine resource that are stored in the DataSource. +message ComputeInstanceDataSourceProperties { + // Name of the compute instance backed up by the datasource. + string name = 1; + + // The description of the Compute Engine instance. + string description = 2; + + // The machine type of the instance. + string machine_type = 3; + + // The total number of disks attached to the Instance. + int64 total_disk_count = 4; + + // The sum of all the disk sizes. + int64 total_disk_size_gb = 5; +} + +// Specifies options for controlling advanced machine features. +message AdvancedMachineFeatures { + // Optional. Whether to enable nested virtualization or not (default is + // false). + optional bool enable_nested_virtualization = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of threads per physical core. To disable simultaneous + // multithreading (SMT) set this to 1. If unset, the maximum number + // of threads supported per core by the underlying processor is + // assumed. + optional int32 threads_per_core = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of physical cores to expose to an instance. Multiply + // by the number of threads per core to compute the total number of virtual + // CPUs to expose to the instance. If unset, the number of cores is + // inferred from the instance's nominal CPU count and the underlying + // platform's SMT width. + optional int32 visible_core_count = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether to enable UEFI networking for instance creation. + optional bool enable_uefi_networking = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A set of Confidential Instance options. +message ConfidentialInstanceConfig { + // Optional. Defines whether the instance should have confidential compute + // enabled. + optional bool enable_confidential_compute = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A set of Display Device options +message DisplayDevice { + // Optional. Enables display for the Compute Engine VM + optional bool enable_display = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// A specification of the type and number of accelerator cards attached to the +// instance. +message AcceleratorConfig { + // Optional. Full or partial URL of the accelerator type resource to attach to + // this instance. + optional string accelerator_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of the guest accelerator cards exposed to this + // instance. + optional int32 accelerator_count = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A customer-supplied encryption key. +message CustomerEncryptionKey { + // The key to use for encryption. + oneof key { + // Optional. Specifies a 256-bit customer-supplied + // encryption key. + string raw_key = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. RSA-wrapped 2048-bit + // customer-supplied encryption key to either encrypt or decrypt this + // resource. + string rsa_encrypted_key = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the encryption key that is stored in Google Cloud + // KMS. + string kms_key_name = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The service account being used for the encryption request for the + // given KMS key. If absent, the Compute Engine default service account is + // used. + optional string kms_key_service_account = 4 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A key/value pair to be used for storing metadata. +message Entry { + // Optional. Key for the metadata entry. + optional string key = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Value for the metadata entry. These are free-form strings, and + // only have meaning as interpreted by the image running in the instance. The + // only restriction placed on values is that their size must be less than + // or equal to 262144 bytes (256 KiB). + optional string value = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A metadata key/value entry. +message Metadata { + // Optional. Array of key/value pairs. The total size of all keys and values + // must be less than 512 KB. + repeated Entry items = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// A network interface resource attached to an instance. +// s +message NetworkInterface { + // Stack type for this network interface. + enum StackType { + // Default should be STACK_TYPE_UNSPECIFIED. + STACK_TYPE_UNSPECIFIED = 0; + + // The network interface will be assigned IPv4 address. + IPV4_ONLY = 1; + + // The network interface can have both IPv4 and IPv6 addresses. + IPV4_IPV6 = 2; + } + + // IPv6 access type for this network interface. + enum Ipv6AccessType { + // IPv6 access type not set. Means this network interface hasn't been + // turned on IPv6 yet. + UNSPECIFIED_IPV6_ACCESS_TYPE = 0; + + // This network interface can have internal IPv6. + INTERNAL = 1; + + // This network interface can have external IPv6. + EXTERNAL = 2; + } + + // Nic type for this network interface. + enum NicType { + // Default should be NIC_TYPE_UNSPECIFIED. + NIC_TYPE_UNSPECIFIED = 0; + + // VIRTIO + VIRTIO_NET = 1; + + // GVNIC + GVNIC = 2; + } + + // Optional. URL of the VPC network resource for this instance. + optional string network = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The URL of the Subnetwork resource for this instance. + optional string subnetwork = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An IPv4 internal IP address to assign to the instance for this + // network interface. If not specified by the user, an unused internal IP is + // assigned by the system. + optional string ip_address = 3 [ + (google.api.field_info).format = IPV4, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. An IPv6 internal network address for this network interface. To + // use a static internal IP address, it must be unused and in the same region + // as the instance's zone. If not specified, Google Cloud will automatically + // assign an internal IPv6 address from the instance's subnetwork. + optional string ipv6_address = 4 [ + (google.api.field_info).format = IPV6, + (google.api.field_behavior) = OPTIONAL + ]; + + // Optional. The prefix length of the primary internal IPv6 range. + optional int32 internal_ipv6_prefix_length = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. [Output Only] The name of the network interface, which is + // generated by the server. + optional string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. An array of configurations for this interface. Currently, only + // one access config,ONE_TO_ONE_NAT is supported. If there are no + // accessConfigs specified, then this instance will have + // no external internet access. + repeated AccessConfig access_configs = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An array of IPv6 access configurations for this interface. + // Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there + // is no ipv6AccessConfig specified, then this instance will + // have no external IPv6 Internet access. + repeated AccessConfig ipv6_access_configs = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An array of alias IP ranges for this network interface. + // You can only specify this field for network interfaces in VPC networks. + repeated AliasIpRange alias_ip_ranges = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // The stack type for this network interface. + optional StackType stack_type = 10; + + // Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the + // IP can be accessed from the Internet. This field is always inherited from + // its subnetwork. + optional Ipv6AccessType ipv6_access_type = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The networking queue count that's specified by users for the + // network interface. Both Rx and Tx queues will be set to this number. It'll + // be empty if not specified by the users. + optional int32 queue_count = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of vNIC to be used on this interface. This may be gVNIC + // or VirtioNet. + optional NicType nic_type = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The URL of the network attachment that this interface should + // connect to in the following format: + // projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}. + optional string network_attachment = 14 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Network performance configuration. +message NetworkPerformanceConfig { + // Network performance tier. + enum Tier { + // This value is unused. + TIER_UNSPECIFIED = 0; + + // Default network performance config. + DEFAULT = 1; + + // Tier 1 network performance config. + TIER_1 = 2; + } + + // Optional. The tier of the total egress bandwidth. + optional Tier total_egress_bandwidth_tier = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// An access configuration attached to an instance's network interface. +// Only one access config per instance is supported. +message AccessConfig { + // The type of configuration. + enum AccessType { + // Default value. This value is unused. + ACCESS_TYPE_UNSPECIFIED = 0; + + // ONE_TO_ONE_NAT + ONE_TO_ONE_NAT = 1; + + // Direct IPv6 access. + DIRECT_IPV6 = 2; + } + + // Network tier property used by addresses, instances and forwarding rules. + enum NetworkTier { + // Default value. This value is unused. + NETWORK_TIER_UNSPECIFIED = 0; + + // High quality, Google-grade network tier, support for all networking + // products. + PREMIUM = 1; + + // Public internet quality, only limited support for other networking + // products. + STANDARD = 2; + } + + // Optional. In accessConfigs (IPv4), the + // default and only option is ONE_TO_ONE_NAT. In + // ipv6AccessConfigs, the default and only option is + // DIRECT_IPV6. + optional AccessType type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of this access configuration. + optional string name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The external IP address of this access configuration. + optional string external_ip = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The external IPv6 address of this access configuration. + optional string external_ipv6 = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The prefix length of the external IPv6 range. + optional int32 external_ipv6_prefix_length = 5 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies whether a public DNS 'PTR' record should be created to + // map the external IP address of the instance to a DNS domain name. + optional bool set_public_ptr = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The DNS domain name for the public PTR record. + optional string public_ptr_domain_name = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This signifies the networking tier used for configuring this + // access + optional NetworkTier network_tier = 8 + [(google.api.field_behavior) = OPTIONAL]; +} + +// An alias IP range attached to an instance's network interface. +message AliasIpRange { + // Optional. The IP alias ranges to allocate for this interface. + optional string ip_cidr_range = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of a subnetwork secondary IP range from which to + // allocate an IP alias range. If not specified, the primary range of the + // subnetwork is used. + optional string subnetwork_range_name = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Additional instance params. +message InstanceParams { + // Optional. Resource manager tags to be bound to the instance. + map resource_manager_tags = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Specifies the reservations that this instance can consume from. +message AllocationAffinity { + // Indicates whether to consume from a reservation or not. + enum Type { + // Default value. This value is unused. + TYPE_UNSPECIFIED = 0; + + // Do not consume from any allocated capacity. + NO_RESERVATION = 1; + + // Consume any allocation available. + ANY_RESERVATION = 2; + + // Must consume from a specific reservation. Must specify key value fields + // for specifying the reservations. + SPECIFIC_RESERVATION = 3; + } + + // Optional. Specifies the type of reservation from which this instance can + // consume + optional Type consume_allocation_type = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Corresponds to the label key of a reservation resource. + optional string key = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Corresponds to the label values of a reservation resource. + repeated string values = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Sets the scheduling options for an Instance. +message Scheduling { + // Defines the maintenance behavior for this instance= + enum OnHostMaintenance { + // Default value. This value is unused. + ON_HOST_MAINTENANCE_UNSPECIFIED = 0; + + // Tells Compute Engine to terminate and (optionally) restart the instance + // away from the maintenance activity. + TERMINATE = 1; + + // Default, Allows Compute Engine to automatically migrate instances + // out of the way of maintenance events. + MIGRATE = 1000; + } + + // Node Affinity: the configuration of desired nodes onto which this Instance + // could be scheduled. + message NodeAffinity { + // Defines the type of node selections. + enum Operator { + // Default value. This value is unused. + OPERATOR_UNSPECIFIED = 0; + + // Requires Compute Engine to seek for matched nodes. + IN = 1; + + // Requires Compute Engine to avoid certain nodes. + NOT_IN = 2; + } + + // Optional. Corresponds to the label key of Node resource. + optional string key = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defines the operation of node selection. + optional Operator operator = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Corresponds to the label values of Node resource. + repeated string values = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Defines the provisioning model for an instance. + enum ProvisioningModel { + // Default value. This value is not used. + PROVISIONING_MODEL_UNSPECIFIED = 0; + + // Standard provisioning with user controlled runtime, no discounts. + STANDARD = 1; + + // Heavily discounted, no guaranteed runtime. + SPOT = 2; + } + + // Defines the supported termination actions for an instance. + enum InstanceTerminationAction { + // Default value. This value is unused. + INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0; + + // Delete the VM. + DELETE = 1; + + // Stop the VM without storing in-memory content. default action. + STOP = 2; + } + + // Optional. Defines the maintenance behavior for this instance. + optional OnHostMaintenance on_host_maintenance = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies whether the instance should be automatically restarted + // if it is terminated by Compute Engine (not terminated by a user). + optional bool automatic_restart = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defines whether the instance is preemptible. + optional bool preemptible = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A set of node affinity and anti-affinity configurations. + // Overrides reservationAffinity. + repeated NodeAffinity node_affinities = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The minimum number of virtual CPUs this instance will consume + // when running on a sole-tenant node. + optional int32 min_node_cpus = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the provisioning model of the instance. + optional ProvisioningModel provisioning_model = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the termination action for the instance. + optional InstanceTerminationAction instance_termination_action = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the maximum amount of time a Local Ssd Vm should wait + // while recovery of the Local Ssd state is attempted. Its value should be in + // between 0 and 168 hours with hour granularity and the default value being 1 + // hour. + optional SchedulingDuration local_ssd_recovery_timeout = 10 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A SchedulingDuration represents a fixed-length span of time represented +// as a count of seconds and fractions of seconds at nanosecond +// resolution. It is independent of any calendar and concepts like "day" +// or "month". Range is approximately 10,000 years. +message SchedulingDuration { + // Optional. Span of time at a resolution of a second. + optional int64 seconds = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Span of time that's a fraction of a second at nanosecond + // resolution. + optional int32 nanos = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A service account. +message ServiceAccount { + // Optional. Email address of the service account. + optional string email = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of scopes to be made available for this service account. + repeated string scopes = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A set of instance tags. +message Tags { + // Optional. An array of tags. Each tag must be 1-63 characters long, and + // comply with RFC1035. + repeated string items = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// An instance-attached disk resource. +message AttachedDisk { + // Specifies the parameters to initialize this disk. + message InitializeParams { + // Optional. Specifies the disk name. If not specified, the default is to + // use the name of the instance. + optional string disk_name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. URL of the zone where the disk should be created. + // Required for each regional disk associated with the instance. + repeated string replica_zones = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // List of the Disk Types. + enum DiskType { + // Default value, which is unused. + DISK_TYPE_UNSPECIFIED = 0; + + // A scratch disk type. + SCRATCH = 1; + + // A persistent disk type. + PERSISTENT = 2; + } + + // List of the Disk Modes. + enum DiskMode { + // Default value, which is unused. + DISK_MODE_UNSPECIFIED = 0; + + // Attaches this disk in read-write mode. Only one + // virtual machine at a time can be attached to a disk in read-write mode. + READ_WRITE = 1; + + // Attaches this disk in read-only mode. Multiple virtual machines can use + // a disk in read-only mode at a time. + READ_ONLY = 2; + + // The disk is locked for administrative reasons. Nobody else + // can use the disk. This mode is used (for example) when taking + // a snapshot of a disk to prevent mounting the disk while it is + // being snapshotted. + LOCKED = 3; + } + + // List of the Disk Interfaces. + enum DiskInterface { + // Default value, which is unused. + DISK_INTERFACE_UNSPECIFIED = 0; + + // SCSI Disk Interface. + SCSI = 1; + + // NVME Disk Interface. + NVME = 2; + + // NVDIMM Disk Interface. + NVDIMM = 3; + + // ISCSI Disk Interface. + ISCSI = 4; + } + + // List of the states of the Disk. + enum DiskSavedState { + // Default Disk state has not been preserved. + DISK_SAVED_STATE_UNSPECIFIED = 0; + + // Disk state has been preserved. + PRESERVED = 1; + } + + // Optional. Specifies the parameters to initialize this disk. + optional InitializeParams initialize_params = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This is used as an identifier for the disks. This is the unique + // name has to provided to modify disk parameters like disk_name and + // replica_zones (in case of RePDs) + optional string device_name = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Type of the resource. + optional string kind = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Specifies the type of the disk. + optional DiskType disk_type_deprecated = 6 [deprecated = true]; + + // Optional. The mode in which to attach this disk. + optional DiskMode mode = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies a valid partial or full URL to an existing Persistent + // Disk resource. + optional string source = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A zero-based index to this disk, where 0 is reserved for the + // boot disk. + optional int64 index = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates that this is a boot disk. The virtual machine will use + // the first partition of the disk for its root filesystem. + optional bool boot = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies whether the disk will be auto-deleted when the instance + // is deleted (but not when the disk is detached from the instance). + optional bool auto_delete = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Any valid publicly visible licenses. + repeated string license = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies the disk interface to use for attaching this disk. + optional DiskInterface disk_interface = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of features to enable on the guest operating system. + // Applicable only for bootable images. + repeated GuestOsFeature guest_os_feature = 14 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Encrypts or decrypts a disk using a customer-supplied + // encryption key. + optional CustomerEncryptionKey disk_encryption_key = 15 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The size of the disk in GB. + optional int64 disk_size_gb = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Output only. The state of the disk. + optional DiskSavedState saved_state = 17 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. Output only. The URI of the disk type resource. For example: + // projects/project/zones/zone/diskTypes/pd-standard or pd-ssd + optional string disk_type = 18 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = OUTPUT_ONLY + ]; + + // Optional. Specifies the type of the disk. + optional DiskType type = 19 [(google.api.field_behavior) = OPTIONAL]; +} + +// Feature type of the Guest OS. +message GuestOsFeature { + // List of the Feature Types. + enum FeatureType { + // Default value, which is unused. + FEATURE_TYPE_UNSPECIFIED = 0; + + // VIRTIO_SCSI_MULTIQUEUE feature type. + VIRTIO_SCSI_MULTIQUEUE = 1; + + // WINDOWS feature type. + WINDOWS = 2; + + // MULTI_IP_SUBNET feature type. + MULTI_IP_SUBNET = 3; + + // UEFI_COMPATIBLE feature type. + UEFI_COMPATIBLE = 4; + + // SECURE_BOOT feature type. + SECURE_BOOT = 5; + + // GVNIC feature type. + GVNIC = 6; + + // SEV_CAPABLE feature type. + SEV_CAPABLE = 7; + + // BARE_METAL_LINUX_COMPATIBLE feature type. + BARE_METAL_LINUX_COMPATIBLE = 8; + + // SUSPEND_RESUME_COMPATIBLE feature type. + SUSPEND_RESUME_COMPATIBLE = 9; + + // SEV_LIVE_MIGRATABLE feature type. + SEV_LIVE_MIGRATABLE = 10; + + // SEV_SNP_CAPABLE feature type. + SEV_SNP_CAPABLE = 11; + + // TDX_CAPABLE feature type. + TDX_CAPABLE = 12; + + // IDPF feature type. + IDPF = 13; + + // SEV_LIVE_MIGRATABLE_V2 feature type. + SEV_LIVE_MIGRATABLE_V2 = 14; + } + + // The ID of a supported feature. + optional FeatureType type = 1; +} + +// Specifies whether the virtual machine instance will be shut down on key +// revocation. It is currently used in instance, instance properties and GMI +// protos +enum KeyRevocationActionType { + // Default value. This value is unused. + KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0; + + // Indicates user chose no operation. + NONE = 1; + + // Indicates user chose to opt for VM shutdown on key revocation. + STOP = 2; +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts new file mode 100644 index 00000000000..e83f63ef498 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts @@ -0,0 +1,20626 @@ +// 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. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace backupdr. */ + namespace backupdr { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a BackupDR */ + class BackupDR extends $protobuf.rpc.Service { + + /** + * Constructs a new BackupDR 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 BackupDR 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): BackupDR; + + /** + * Calls ListManagementServers. + * @param request ListManagementServersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListManagementServersResponse + */ + public listManagementServers(request: google.cloud.backupdr.v1.IListManagementServersRequest, callback: google.cloud.backupdr.v1.BackupDR.ListManagementServersCallback): void; + + /** + * Calls ListManagementServers. + * @param request ListManagementServersRequest message or plain object + * @returns Promise + */ + public listManagementServers(request: google.cloud.backupdr.v1.IListManagementServersRequest): Promise; + + /** + * Calls GetManagementServer. + * @param request GetManagementServerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ManagementServer + */ + public getManagementServer(request: google.cloud.backupdr.v1.IGetManagementServerRequest, callback: google.cloud.backupdr.v1.BackupDR.GetManagementServerCallback): void; + + /** + * Calls GetManagementServer. + * @param request GetManagementServerRequest message or plain object + * @returns Promise + */ + public getManagementServer(request: google.cloud.backupdr.v1.IGetManagementServerRequest): Promise; + + /** + * Calls CreateManagementServer. + * @param request CreateManagementServerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createManagementServer(request: google.cloud.backupdr.v1.ICreateManagementServerRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateManagementServerCallback): void; + + /** + * Calls CreateManagementServer. + * @param request CreateManagementServerRequest message or plain object + * @returns Promise + */ + public createManagementServer(request: google.cloud.backupdr.v1.ICreateManagementServerRequest): Promise; + + /** + * Calls DeleteManagementServer. + * @param request DeleteManagementServerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteManagementServer(request: google.cloud.backupdr.v1.IDeleteManagementServerRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteManagementServerCallback): void; + + /** + * Calls DeleteManagementServer. + * @param request DeleteManagementServerRequest message or plain object + * @returns Promise + */ + public deleteManagementServer(request: google.cloud.backupdr.v1.IDeleteManagementServerRequest): Promise; + + /** + * Calls CreateBackupVault. + * @param request CreateBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createBackupVault(request: google.cloud.backupdr.v1.ICreateBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupVaultCallback): void; + + /** + * Calls CreateBackupVault. + * @param request CreateBackupVaultRequest message or plain object + * @returns Promise + */ + public createBackupVault(request: google.cloud.backupdr.v1.ICreateBackupVaultRequest): Promise; + + /** + * Calls ListBackupVaults. + * @param request ListBackupVaultsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupVaultsResponse + */ + public listBackupVaults(request: google.cloud.backupdr.v1.IListBackupVaultsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupVaultsCallback): void; + + /** + * Calls ListBackupVaults. + * @param request ListBackupVaultsRequest message or plain object + * @returns Promise + */ + public listBackupVaults(request: google.cloud.backupdr.v1.IListBackupVaultsRequest): Promise; + + /** + * Calls FetchUsableBackupVaults. + * @param request FetchUsableBackupVaultsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchUsableBackupVaultsResponse + */ + public fetchUsableBackupVaults(request: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, callback: google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaultsCallback): void; + + /** + * Calls FetchUsableBackupVaults. + * @param request FetchUsableBackupVaultsRequest message or plain object + * @returns Promise + */ + public fetchUsableBackupVaults(request: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest): Promise; + + /** + * Calls GetBackupVault. + * @param request GetBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BackupVault + */ + public getBackupVault(request: google.cloud.backupdr.v1.IGetBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupVaultCallback): void; + + /** + * Calls GetBackupVault. + * @param request GetBackupVaultRequest message or plain object + * @returns Promise + */ + public getBackupVault(request: google.cloud.backupdr.v1.IGetBackupVaultRequest): Promise; + + /** + * Calls UpdateBackupVault. + * @param request UpdateBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateBackupVault(request: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateBackupVaultCallback): void; + + /** + * Calls UpdateBackupVault. + * @param request UpdateBackupVaultRequest message or plain object + * @returns Promise + */ + public updateBackupVault(request: google.cloud.backupdr.v1.IUpdateBackupVaultRequest): Promise; + + /** + * Calls DeleteBackupVault. + * @param request DeleteBackupVaultRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteBackupVault(request: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupVaultCallback): void; + + /** + * Calls DeleteBackupVault. + * @param request DeleteBackupVaultRequest message or plain object + * @returns Promise + */ + public deleteBackupVault(request: google.cloud.backupdr.v1.IDeleteBackupVaultRequest): Promise; + + /** + * Calls ListDataSources. + * @param request ListDataSourcesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataSourcesResponse + */ + public listDataSources(request: google.cloud.backupdr.v1.IListDataSourcesRequest, callback: google.cloud.backupdr.v1.BackupDR.ListDataSourcesCallback): void; + + /** + * Calls ListDataSources. + * @param request ListDataSourcesRequest message or plain object + * @returns Promise + */ + public listDataSources(request: google.cloud.backupdr.v1.IListDataSourcesRequest): Promise; + + /** + * Calls GetDataSource. + * @param request GetDataSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataSource + */ + public getDataSource(request: google.cloud.backupdr.v1.IGetDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.GetDataSourceCallback): void; + + /** + * Calls GetDataSource. + * @param request GetDataSourceRequest message or plain object + * @returns Promise + */ + public getDataSource(request: google.cloud.backupdr.v1.IGetDataSourceRequest): Promise; + + /** + * Calls UpdateDataSource. + * @param request UpdateDataSourceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDataSource(request: google.cloud.backupdr.v1.IUpdateDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateDataSourceCallback): void; + + /** + * Calls UpdateDataSource. + * @param request UpdateDataSourceRequest message or plain object + * @returns Promise + */ + public updateDataSource(request: google.cloud.backupdr.v1.IUpdateDataSourceRequest): Promise; + + /** + * Calls ListBackups. + * @param request ListBackupsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupsResponse + */ + public listBackups(request: google.cloud.backupdr.v1.IListBackupsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupsCallback): void; + + /** + * Calls ListBackups. + * @param request ListBackupsRequest message or plain object + * @returns Promise + */ + public listBackups(request: google.cloud.backupdr.v1.IListBackupsRequest): Promise; + + /** + * Calls GetBackup. + * @param request GetBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Backup + */ + public getBackup(request: google.cloud.backupdr.v1.IGetBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupCallback): void; + + /** + * Calls GetBackup. + * @param request GetBackupRequest message or plain object + * @returns Promise + */ + public getBackup(request: google.cloud.backupdr.v1.IGetBackupRequest): Promise; + + /** + * Calls UpdateBackup. + * @param request UpdateBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateBackup(request: google.cloud.backupdr.v1.IUpdateBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateBackupCallback): void; + + /** + * Calls UpdateBackup. + * @param request UpdateBackupRequest message or plain object + * @returns Promise + */ + public updateBackup(request: google.cloud.backupdr.v1.IUpdateBackupRequest): Promise; + + /** + * Calls DeleteBackup. + * @param request DeleteBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteBackup(request: google.cloud.backupdr.v1.IDeleteBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupCallback): void; + + /** + * Calls DeleteBackup. + * @param request DeleteBackupRequest message or plain object + * @returns Promise + */ + public deleteBackup(request: google.cloud.backupdr.v1.IDeleteBackupRequest): Promise; + + /** + * Calls RestoreBackup. + * @param request RestoreBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public restoreBackup(request: google.cloud.backupdr.v1.IRestoreBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.RestoreBackupCallback): void; + + /** + * Calls RestoreBackup. + * @param request RestoreBackupRequest message or plain object + * @returns Promise + */ + public restoreBackup(request: google.cloud.backupdr.v1.IRestoreBackupRequest): Promise; + + /** + * Calls CreateBackupPlan. + * @param request CreateBackupPlanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createBackupPlan(request: google.cloud.backupdr.v1.ICreateBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupPlanCallback): void; + + /** + * Calls CreateBackupPlan. + * @param request CreateBackupPlanRequest message or plain object + * @returns Promise + */ + public createBackupPlan(request: google.cloud.backupdr.v1.ICreateBackupPlanRequest): Promise; + + /** + * Calls GetBackupPlan. + * @param request GetBackupPlanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BackupPlan + */ + public getBackupPlan(request: google.cloud.backupdr.v1.IGetBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupPlanCallback): void; + + /** + * Calls GetBackupPlan. + * @param request GetBackupPlanRequest message or plain object + * @returns Promise + */ + public getBackupPlan(request: google.cloud.backupdr.v1.IGetBackupPlanRequest): Promise; + + /** + * Calls ListBackupPlans. + * @param request ListBackupPlansRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupPlansResponse + */ + public listBackupPlans(request: google.cloud.backupdr.v1.IListBackupPlansRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupPlansCallback): void; + + /** + * Calls ListBackupPlans. + * @param request ListBackupPlansRequest message or plain object + * @returns Promise + */ + public listBackupPlans(request: google.cloud.backupdr.v1.IListBackupPlansRequest): Promise; + + /** + * Calls DeleteBackupPlan. + * @param request DeleteBackupPlanRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteBackupPlan(request: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanCallback): void; + + /** + * Calls DeleteBackupPlan. + * @param request DeleteBackupPlanRequest message or plain object + * @returns Promise + */ + public deleteBackupPlan(request: google.cloud.backupdr.v1.IDeleteBackupPlanRequest): Promise; + + /** + * Calls CreateBackupPlanAssociation. + * @param request CreateBackupPlanAssociationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createBackupPlanAssociation(request: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociationCallback): void; + + /** + * Calls CreateBackupPlanAssociation. + * @param request CreateBackupPlanAssociationRequest message or plain object + * @returns Promise + */ + public createBackupPlanAssociation(request: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest): Promise; + + /** + * Calls GetBackupPlanAssociation. + * @param request GetBackupPlanAssociationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BackupPlanAssociation + */ + public getBackupPlanAssociation(request: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociationCallback): void; + + /** + * Calls GetBackupPlanAssociation. + * @param request GetBackupPlanAssociationRequest message or plain object + * @returns Promise + */ + public getBackupPlanAssociation(request: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest): Promise; + + /** + * Calls ListBackupPlanAssociations. + * @param request ListBackupPlanAssociationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBackupPlanAssociationsResponse + */ + public listBackupPlanAssociations(request: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociationsCallback): void; + + /** + * Calls ListBackupPlanAssociations. + * @param request ListBackupPlanAssociationsRequest message or plain object + * @returns Promise + */ + public listBackupPlanAssociations(request: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest): Promise; + + /** + * Calls DeleteBackupPlanAssociation. + * @param request DeleteBackupPlanAssociationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteBackupPlanAssociation(request: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociationCallback): void; + + /** + * Calls DeleteBackupPlanAssociation. + * @param request DeleteBackupPlanAssociationRequest message or plain object + * @returns Promise + */ + public deleteBackupPlanAssociation(request: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest): Promise; + + /** + * Calls TriggerBackup. + * @param request TriggerBackupRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public triggerBackup(request: google.cloud.backupdr.v1.ITriggerBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.TriggerBackupCallback): void; + + /** + * Calls TriggerBackup. + * @param request TriggerBackupRequest message or plain object + * @returns Promise + */ + public triggerBackup(request: google.cloud.backupdr.v1.ITriggerBackupRequest): Promise; + } + + namespace BackupDR { + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listManagementServers}. + * @param error Error, if any + * @param [response] ListManagementServersResponse + */ + type ListManagementServersCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListManagementServersResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getManagementServer}. + * @param error Error, if any + * @param [response] ManagementServer + */ + type GetManagementServerCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ManagementServer) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createManagementServer}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteManagementServer}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupVault}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupVaults}. + * @param error Error, if any + * @param [response] ListBackupVaultsResponse + */ + type ListBackupVaultsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupVaultsResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchUsableBackupVaults}. + * @param error Error, if any + * @param [response] FetchUsableBackupVaultsResponse + */ + type FetchUsableBackupVaultsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupVault}. + * @param error Error, if any + * @param [response] BackupVault + */ + type GetBackupVaultCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupVault) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackupVault}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupVault}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listDataSources}. + * @param error Error, if any + * @param [response] ListDataSourcesResponse + */ + type ListDataSourcesCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListDataSourcesResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getDataSource}. + * @param error Error, if any + * @param [response] DataSource + */ + type GetDataSourceCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.DataSource) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateDataSource}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDataSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackups}. + * @param error Error, if any + * @param [response] ListBackupsResponse + */ + type ListBackupsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupsResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackup}. + * @param error Error, if any + * @param [response] Backup + */ + type GetBackupCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.Backup) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|restoreBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type RestoreBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlan}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBackupPlanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlan}. + * @param error Error, if any + * @param [response] BackupPlan + */ + type GetBackupPlanCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupPlan) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlans}. + * @param error Error, if any + * @param [response] ListBackupPlansResponse + */ + type ListBackupPlansCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupPlansResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlan}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteBackupPlanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlanAssociation}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBackupPlanAssociationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlanAssociation}. + * @param error Error, if any + * @param [response] BackupPlanAssociation + */ + type GetBackupPlanAssociationCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupPlanAssociation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlanAssociations}. + * @param error Error, if any + * @param [response] ListBackupPlanAssociationsResponse + */ + type ListBackupPlanAssociationsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlanAssociation}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteBackupPlanAssociationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|triggerBackup}. + * @param error Error, if any + * @param [response] Operation + */ + type TriggerBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a NetworkConfig. */ + interface INetworkConfig { + + /** NetworkConfig network */ + network?: (string|null); + + /** NetworkConfig peeringMode */ + peeringMode?: (google.cloud.backupdr.v1.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1.NetworkConfig.PeeringMode|null); + } + + /** Represents a NetworkConfig. */ + class NetworkConfig implements INetworkConfig { + + /** + * Constructs a new NetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.INetworkConfig); + + /** NetworkConfig network. */ + public network: string; + + /** NetworkConfig peeringMode. */ + public peeringMode: (google.cloud.backupdr.v1.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1.NetworkConfig.PeeringMode); + + /** + * Creates a new NetworkConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.INetworkConfig): google.cloud.backupdr.v1.NetworkConfig; + + /** + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkConfig; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkConfig; + + /** + * Verifies a NetworkConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkConfig; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @param message NetworkConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkConfig { + + /** PeeringMode enum. */ + enum PeeringMode { + PEERING_MODE_UNSPECIFIED = 0, + PRIVATE_SERVICE_ACCESS = 1 + } + } + + /** Properties of a ManagementURI. */ + interface IManagementURI { + + /** ManagementURI webUi */ + webUi?: (string|null); + + /** ManagementURI api */ + api?: (string|null); + } + + /** Represents a ManagementURI. */ + class ManagementURI implements IManagementURI { + + /** + * Constructs a new ManagementURI. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IManagementURI); + + /** ManagementURI webUi. */ + public webUi: string; + + /** ManagementURI api. */ + public api: string; + + /** + * Creates a new ManagementURI instance using the specified properties. + * @param [properties] Properties to set + * @returns ManagementURI instance + */ + public static create(properties?: google.cloud.backupdr.v1.IManagementURI): google.cloud.backupdr.v1.ManagementURI; + + /** + * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. + * @param message ManagementURI message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. + * @param message ManagementURI message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ManagementURI message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ManagementURI; + + /** + * Decodes a ManagementURI message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ManagementURI; + + /** + * Verifies a ManagementURI message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ManagementURI + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ManagementURI; + + /** + * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. + * @param message ManagementURI + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ManagementURI to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ManagementURI + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkforceIdentityBasedManagementURI. */ + interface IWorkforceIdentityBasedManagementURI { + + /** WorkforceIdentityBasedManagementURI firstPartyManagementUri */ + firstPartyManagementUri?: (string|null); + + /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri */ + thirdPartyManagementUri?: (string|null); + } + + /** Represents a WorkforceIdentityBasedManagementURI. */ + class WorkforceIdentityBasedManagementURI implements IWorkforceIdentityBasedManagementURI { + + /** + * Constructs a new WorkforceIdentityBasedManagementURI. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI); + + /** WorkforceIdentityBasedManagementURI firstPartyManagementUri. */ + public firstPartyManagementUri: string; + + /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri. */ + public thirdPartyManagementUri: string; + + /** + * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkforceIdentityBasedManagementURI instance + */ + public static create(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; + + /** + * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * @param message WorkforceIdentityBasedManagementURI message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * @param message WorkforceIdentityBasedManagementURI message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkforceIdentityBasedManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; + + /** + * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkforceIdentityBasedManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; + + /** + * Verifies a WorkforceIdentityBasedManagementURI message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkforceIdentityBasedManagementURI + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; + + /** + * Creates a plain object from a WorkforceIdentityBasedManagementURI message. Also converts values to other types if specified. + * @param message WorkforceIdentityBasedManagementURI + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkforceIdentityBasedManagementURI to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkforceIdentityBasedManagementURI + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkforceIdentityBasedOAuth2ClientID. */ + interface IWorkforceIdentityBasedOAuth2ClientID { + + /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId */ + firstPartyOauth2ClientId?: (string|null); + + /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId */ + thirdPartyOauth2ClientId?: (string|null); + } + + /** Represents a WorkforceIdentityBasedOAuth2ClientID. */ + class WorkforceIdentityBasedOAuth2ClientID implements IWorkforceIdentityBasedOAuth2ClientID { + + /** + * Constructs a new WorkforceIdentityBasedOAuth2ClientID. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID); + + /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId. */ + public firstPartyOauth2ClientId: string; + + /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId. */ + public thirdPartyOauth2ClientId: string; + + /** + * Creates a new WorkforceIdentityBasedOAuth2ClientID instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkforceIdentityBasedOAuth2ClientID instance + */ + public static create(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; + + /** + * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. + * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. + * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkforceIdentityBasedOAuth2ClientID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; + + /** + * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkforceIdentityBasedOAuth2ClientID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; + + /** + * Verifies a WorkforceIdentityBasedOAuth2ClientID message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkforceIdentityBasedOAuth2ClientID message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkforceIdentityBasedOAuth2ClientID + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; + + /** + * Creates a plain object from a WorkforceIdentityBasedOAuth2ClientID message. Also converts values to other types if specified. + * @param message WorkforceIdentityBasedOAuth2ClientID + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkforceIdentityBasedOAuth2ClientID to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkforceIdentityBasedOAuth2ClientID + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ManagementServer. */ + interface IManagementServer { + + /** ManagementServer name */ + name?: (string|null); + + /** ManagementServer description */ + description?: (string|null); + + /** ManagementServer labels */ + labels?: ({ [k: string]: string }|null); + + /** ManagementServer createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ManagementServer updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ManagementServer type */ + type?: (google.cloud.backupdr.v1.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceType|null); + + /** ManagementServer managementUri */ + managementUri?: (google.cloud.backupdr.v1.IManagementURI|null); + + /** ManagementServer workforceIdentityBasedManagementUri */ + workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null); + + /** ManagementServer state */ + state?: (google.cloud.backupdr.v1.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceState|null); + + /** ManagementServer networks */ + networks?: (google.cloud.backupdr.v1.INetworkConfig[]|null); + + /** ManagementServer etag */ + etag?: (string|null); + + /** ManagementServer oauth2ClientId */ + oauth2ClientId?: (string|null); + + /** ManagementServer workforceIdentityBasedOauth2ClientId */ + workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null); + + /** ManagementServer baProxyUri */ + baProxyUri?: (string[]|null); + + /** ManagementServer satisfiesPzs */ + satisfiesPzs?: (google.protobuf.IBoolValue|null); + + /** ManagementServer satisfiesPzi */ + satisfiesPzi?: (boolean|null); + } + + /** Represents a ManagementServer. */ + class ManagementServer implements IManagementServer { + + /** + * Constructs a new ManagementServer. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IManagementServer); + + /** ManagementServer name. */ + public name: string; + + /** ManagementServer description. */ + public description: string; + + /** ManagementServer labels. */ + public labels: { [k: string]: string }; + + /** ManagementServer createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ManagementServer updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ManagementServer type. */ + public type: (google.cloud.backupdr.v1.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceType); + + /** ManagementServer managementUri. */ + public managementUri?: (google.cloud.backupdr.v1.IManagementURI|null); + + /** ManagementServer workforceIdentityBasedManagementUri. */ + public workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null); + + /** ManagementServer state. */ + public state: (google.cloud.backupdr.v1.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceState); + + /** ManagementServer networks. */ + public networks: google.cloud.backupdr.v1.INetworkConfig[]; + + /** ManagementServer etag. */ + public etag: string; + + /** ManagementServer oauth2ClientId. */ + public oauth2ClientId: string; + + /** ManagementServer workforceIdentityBasedOauth2ClientId. */ + public workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null); + + /** ManagementServer baProxyUri. */ + public baProxyUri: string[]; + + /** ManagementServer satisfiesPzs. */ + public satisfiesPzs?: (google.protobuf.IBoolValue|null); + + /** ManagementServer satisfiesPzi. */ + public satisfiesPzi: boolean; + + /** + * Creates a new ManagementServer instance using the specified properties. + * @param [properties] Properties to set + * @returns ManagementServer instance + */ + public static create(properties?: google.cloud.backupdr.v1.IManagementServer): google.cloud.backupdr.v1.ManagementServer; + + /** + * Encodes the specified ManagementServer message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. + * @param message ManagementServer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ManagementServer message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. + * @param message ManagementServer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ManagementServer message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ManagementServer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ManagementServer; + + /** + * Decodes a ManagementServer message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ManagementServer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ManagementServer; + + /** + * Verifies a ManagementServer message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ManagementServer message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ManagementServer + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ManagementServer; + + /** + * Creates a plain object from a ManagementServer message. Also converts values to other types if specified. + * @param message ManagementServer + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ManagementServer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ManagementServer to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ManagementServer + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ManagementServer { + + /** InstanceType enum. */ + enum InstanceType { + INSTANCE_TYPE_UNSPECIFIED = 0, + BACKUP_RESTORE = 1 + } + + /** InstanceState enum. */ + enum InstanceState { + INSTANCE_STATE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2, + UPDATING = 3, + DELETING = 4, + REPAIRING = 5, + MAINTENANCE = 6, + ERROR = 7 + } + } + + /** Properties of a ListManagementServersRequest. */ + interface IListManagementServersRequest { + + /** ListManagementServersRequest parent */ + parent?: (string|null); + + /** ListManagementServersRequest pageSize */ + pageSize?: (number|null); + + /** ListManagementServersRequest pageToken */ + pageToken?: (string|null); + + /** ListManagementServersRequest filter */ + filter?: (string|null); + + /** ListManagementServersRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListManagementServersRequest. */ + class ListManagementServersRequest implements IListManagementServersRequest { + + /** + * Constructs a new ListManagementServersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListManagementServersRequest); + + /** ListManagementServersRequest parent. */ + public parent: string; + + /** ListManagementServersRequest pageSize. */ + public pageSize: number; + + /** ListManagementServersRequest pageToken. */ + public pageToken: string; + + /** ListManagementServersRequest filter. */ + public filter?: (string|null); + + /** ListManagementServersRequest orderBy. */ + public orderBy?: (string|null); + + /** ListManagementServersRequest _filter. */ + public _filter?: "filter"; + + /** ListManagementServersRequest _orderBy. */ + public _orderBy?: "orderBy"; + + /** + * Creates a new ListManagementServersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListManagementServersRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListManagementServersRequest): google.cloud.backupdr.v1.ListManagementServersRequest; + + /** + * Encodes the specified ListManagementServersRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. + * @param message ListManagementServersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListManagementServersRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. + * @param message ListManagementServersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListManagementServersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListManagementServersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListManagementServersRequest; + + /** + * Decodes a ListManagementServersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListManagementServersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListManagementServersRequest; + + /** + * Verifies a ListManagementServersRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListManagementServersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListManagementServersRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListManagementServersRequest; + + /** + * Creates a plain object from a ListManagementServersRequest message. Also converts values to other types if specified. + * @param message ListManagementServersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListManagementServersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListManagementServersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListManagementServersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListManagementServersResponse. */ + interface IListManagementServersResponse { + + /** ListManagementServersResponse managementServers */ + managementServers?: (google.cloud.backupdr.v1.IManagementServer[]|null); + + /** ListManagementServersResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListManagementServersResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListManagementServersResponse. */ + class ListManagementServersResponse implements IListManagementServersResponse { + + /** + * Constructs a new ListManagementServersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListManagementServersResponse); + + /** ListManagementServersResponse managementServers. */ + public managementServers: google.cloud.backupdr.v1.IManagementServer[]; + + /** ListManagementServersResponse nextPageToken. */ + public nextPageToken: string; + + /** ListManagementServersResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListManagementServersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListManagementServersResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListManagementServersResponse): google.cloud.backupdr.v1.ListManagementServersResponse; + + /** + * Encodes the specified ListManagementServersResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. + * @param message ListManagementServersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListManagementServersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListManagementServersResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. + * @param message ListManagementServersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListManagementServersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListManagementServersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListManagementServersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListManagementServersResponse; + + /** + * Decodes a ListManagementServersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListManagementServersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListManagementServersResponse; + + /** + * Verifies a ListManagementServersResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListManagementServersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListManagementServersResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListManagementServersResponse; + + /** + * Creates a plain object from a ListManagementServersResponse message. Also converts values to other types if specified. + * @param message ListManagementServersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListManagementServersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListManagementServersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListManagementServersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetManagementServerRequest. */ + interface IGetManagementServerRequest { + + /** GetManagementServerRequest name */ + name?: (string|null); + } + + /** Represents a GetManagementServerRequest. */ + class GetManagementServerRequest implements IGetManagementServerRequest { + + /** + * Constructs a new GetManagementServerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetManagementServerRequest); + + /** GetManagementServerRequest name. */ + public name: string; + + /** + * Creates a new GetManagementServerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetManagementServerRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetManagementServerRequest): google.cloud.backupdr.v1.GetManagementServerRequest; + + /** + * Encodes the specified GetManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. + * @param message GetManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. + * @param message GetManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetManagementServerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetManagementServerRequest; + + /** + * Decodes a GetManagementServerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetManagementServerRequest; + + /** + * Verifies a GetManagementServerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetManagementServerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetManagementServerRequest; + + /** + * Creates a plain object from a GetManagementServerRequest message. Also converts values to other types if specified. + * @param message GetManagementServerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetManagementServerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetManagementServerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateManagementServerRequest. */ + interface ICreateManagementServerRequest { + + /** CreateManagementServerRequest parent */ + parent?: (string|null); + + /** CreateManagementServerRequest managementServerId */ + managementServerId?: (string|null); + + /** CreateManagementServerRequest managementServer */ + managementServer?: (google.cloud.backupdr.v1.IManagementServer|null); + + /** CreateManagementServerRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateManagementServerRequest. */ + class CreateManagementServerRequest implements ICreateManagementServerRequest { + + /** + * Constructs a new CreateManagementServerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICreateManagementServerRequest); + + /** CreateManagementServerRequest parent. */ + public parent: string; + + /** CreateManagementServerRequest managementServerId. */ + public managementServerId: string; + + /** CreateManagementServerRequest managementServer. */ + public managementServer?: (google.cloud.backupdr.v1.IManagementServer|null); + + /** CreateManagementServerRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateManagementServerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateManagementServerRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICreateManagementServerRequest): google.cloud.backupdr.v1.CreateManagementServerRequest; + + /** + * Encodes the specified CreateManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. + * @param message CreateManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. + * @param message CreateManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateManagementServerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateManagementServerRequest; + + /** + * Decodes a CreateManagementServerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateManagementServerRequest; + + /** + * Verifies a CreateManagementServerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateManagementServerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateManagementServerRequest; + + /** + * Creates a plain object from a CreateManagementServerRequest message. Also converts values to other types if specified. + * @param message CreateManagementServerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CreateManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateManagementServerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateManagementServerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteManagementServerRequest. */ + interface IDeleteManagementServerRequest { + + /** DeleteManagementServerRequest name */ + name?: (string|null); + + /** DeleteManagementServerRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteManagementServerRequest. */ + class DeleteManagementServerRequest implements IDeleteManagementServerRequest { + + /** + * Constructs a new DeleteManagementServerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteManagementServerRequest); + + /** DeleteManagementServerRequest name. */ + public name: string; + + /** DeleteManagementServerRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteManagementServerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteManagementServerRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteManagementServerRequest): google.cloud.backupdr.v1.DeleteManagementServerRequest; + + /** + * Encodes the specified DeleteManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. + * @param message DeleteManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. + * @param message DeleteManagementServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteManagementServerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteManagementServerRequest; + + /** + * Decodes a DeleteManagementServerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteManagementServerRequest; + + /** + * Verifies a DeleteManagementServerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteManagementServerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteManagementServerRequest; + + /** + * Creates a plain object from a DeleteManagementServerRequest message. Also converts values to other types if specified. + * @param message DeleteManagementServerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteManagementServerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteManagementServerRequest + * @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 additionalInfo */ + additionalInfo?: ({ [k: string]: string }|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.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 additionalInfo. */ + public additionalInfo: { [k: string]: string }; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.backupdr.v1.IOperationMetadata): google.cloud.backupdr.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.backupdr.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.backupdr.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.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.backupdr.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.backupdr.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.backupdr.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.backupdr.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.backupdr.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 BackupPlan. */ + interface IBackupPlan { + + /** BackupPlan name */ + name?: (string|null); + + /** BackupPlan description */ + description?: (string|null); + + /** BackupPlan labels */ + labels?: ({ [k: string]: string }|null); + + /** BackupPlan createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan backupRules */ + backupRules?: (google.cloud.backupdr.v1.IBackupRule[]|null); + + /** BackupPlan state */ + state?: (google.cloud.backupdr.v1.BackupPlan.State|keyof typeof google.cloud.backupdr.v1.BackupPlan.State|null); + + /** BackupPlan resourceType */ + resourceType?: (string|null); + + /** BackupPlan etag */ + etag?: (string|null); + + /** BackupPlan backupVault */ + backupVault?: (string|null); + + /** BackupPlan backupVaultServiceAccount */ + backupVaultServiceAccount?: (string|null); + } + + /** Represents a BackupPlan. */ + class BackupPlan implements IBackupPlan { + + /** + * Constructs a new BackupPlan. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupPlan); + + /** BackupPlan name. */ + public name: string; + + /** BackupPlan description. */ + public description: string; + + /** BackupPlan labels. */ + public labels: { [k: string]: string }; + + /** BackupPlan createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlan backupRules. */ + public backupRules: google.cloud.backupdr.v1.IBackupRule[]; + + /** BackupPlan state. */ + public state: (google.cloud.backupdr.v1.BackupPlan.State|keyof typeof google.cloud.backupdr.v1.BackupPlan.State); + + /** BackupPlan resourceType. */ + public resourceType: string; + + /** BackupPlan etag. */ + public etag: string; + + /** BackupPlan backupVault. */ + public backupVault: string; + + /** BackupPlan backupVaultServiceAccount. */ + public backupVaultServiceAccount: string; + + /** + * Creates a new BackupPlan instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupPlan instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupPlan): google.cloud.backupdr.v1.BackupPlan; + + /** + * Encodes the specified BackupPlan message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. + * @param message BackupPlan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupPlan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupPlan message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. + * @param message BackupPlan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupPlan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupPlan message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupPlan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupPlan; + + /** + * Decodes a BackupPlan message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupPlan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupPlan; + + /** + * Verifies a BackupPlan message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupPlan message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupPlan + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupPlan; + + /** + * Creates a plain object from a BackupPlan message. Also converts values to other types if specified. + * @param message BackupPlan + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupPlan, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupPlan to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupPlan + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupPlan { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + INACTIVE = 4 + } + } + + /** Properties of a BackupRule. */ + interface IBackupRule { + + /** BackupRule ruleId */ + ruleId?: (string|null); + + /** BackupRule backupRetentionDays */ + backupRetentionDays?: (number|null); + + /** BackupRule standardSchedule */ + standardSchedule?: (google.cloud.backupdr.v1.IStandardSchedule|null); + } + + /** Represents a BackupRule. */ + class BackupRule implements IBackupRule { + + /** + * Constructs a new BackupRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupRule); + + /** BackupRule ruleId. */ + public ruleId: string; + + /** BackupRule backupRetentionDays. */ + public backupRetentionDays: number; + + /** BackupRule standardSchedule. */ + public standardSchedule?: (google.cloud.backupdr.v1.IStandardSchedule|null); + + /** BackupRule backupScheduleOneof. */ + public backupScheduleOneof?: "standardSchedule"; + + /** + * Creates a new BackupRule instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupRule instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupRule): google.cloud.backupdr.v1.BackupRule; + + /** + * Encodes the specified BackupRule message. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. + * @param message BackupRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupRule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. + * @param message BackupRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupRule; + + /** + * Decodes a BackupRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupRule; + + /** + * Verifies a BackupRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupRule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupRule; + + /** + * Creates a plain object from a BackupRule message. Also converts values to other types if specified. + * @param message BackupRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StandardSchedule. */ + interface IStandardSchedule { + + /** StandardSchedule recurrenceType */ + recurrenceType?: (google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|keyof typeof google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|null); + + /** StandardSchedule hourlyFrequency */ + hourlyFrequency?: (number|null); + + /** StandardSchedule daysOfWeek */ + daysOfWeek?: (google.type.DayOfWeek[]|null); + + /** StandardSchedule daysOfMonth */ + daysOfMonth?: (number[]|null); + + /** StandardSchedule weekDayOfMonth */ + weekDayOfMonth?: (google.cloud.backupdr.v1.IWeekDayOfMonth|null); + + /** StandardSchedule months */ + months?: (google.type.Month[]|null); + + /** StandardSchedule backupWindow */ + backupWindow?: (google.cloud.backupdr.v1.IBackupWindow|null); + + /** StandardSchedule timeZone */ + timeZone?: (string|null); + } + + /** Represents a StandardSchedule. */ + class StandardSchedule implements IStandardSchedule { + + /** + * Constructs a new StandardSchedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IStandardSchedule); + + /** StandardSchedule recurrenceType. */ + public recurrenceType: (google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|keyof typeof google.cloud.backupdr.v1.StandardSchedule.RecurrenceType); + + /** StandardSchedule hourlyFrequency. */ + public hourlyFrequency: number; + + /** StandardSchedule daysOfWeek. */ + public daysOfWeek: google.type.DayOfWeek[]; + + /** StandardSchedule daysOfMonth. */ + public daysOfMonth: number[]; + + /** StandardSchedule weekDayOfMonth. */ + public weekDayOfMonth?: (google.cloud.backupdr.v1.IWeekDayOfMonth|null); + + /** StandardSchedule months. */ + public months: google.type.Month[]; + + /** StandardSchedule backupWindow. */ + public backupWindow?: (google.cloud.backupdr.v1.IBackupWindow|null); + + /** StandardSchedule timeZone. */ + public timeZone: string; + + /** + * Creates a new StandardSchedule instance using the specified properties. + * @param [properties] Properties to set + * @returns StandardSchedule instance + */ + public static create(properties?: google.cloud.backupdr.v1.IStandardSchedule): google.cloud.backupdr.v1.StandardSchedule; + + /** + * Encodes the specified StandardSchedule message. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. + * @param message StandardSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IStandardSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StandardSchedule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. + * @param message StandardSchedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IStandardSchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StandardSchedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StandardSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.StandardSchedule; + + /** + * Decodes a StandardSchedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StandardSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.StandardSchedule; + + /** + * Verifies a StandardSchedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StandardSchedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StandardSchedule + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.StandardSchedule; + + /** + * Creates a plain object from a StandardSchedule message. Also converts values to other types if specified. + * @param message StandardSchedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.StandardSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StandardSchedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StandardSchedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StandardSchedule { + + /** RecurrenceType enum. */ + enum RecurrenceType { + RECURRENCE_TYPE_UNSPECIFIED = 0, + HOURLY = 1, + DAILY = 2, + WEEKLY = 3, + MONTHLY = 4, + YEARLY = 5 + } + } + + /** Properties of a BackupWindow. */ + interface IBackupWindow { + + /** BackupWindow startHourOfDay */ + startHourOfDay?: (number|null); + + /** BackupWindow endHourOfDay */ + endHourOfDay?: (number|null); + } + + /** Represents a BackupWindow. */ + class BackupWindow implements IBackupWindow { + + /** + * Constructs a new BackupWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupWindow); + + /** BackupWindow startHourOfDay. */ + public startHourOfDay: number; + + /** BackupWindow endHourOfDay. */ + public endHourOfDay: number; + + /** + * Creates a new BackupWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupWindow instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupWindow): google.cloud.backupdr.v1.BackupWindow; + + /** + * Encodes the specified BackupWindow message. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. + * @param message BackupWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupWindow message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. + * @param message BackupWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupWindow; + + /** + * Decodes a BackupWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupWindow; + + /** + * Verifies a BackupWindow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupWindow + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupWindow; + + /** + * Creates a plain object from a BackupWindow message. Also converts values to other types if specified. + * @param message BackupWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupWindow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WeekDayOfMonth. */ + interface IWeekDayOfMonth { + + /** WeekDayOfMonth weekOfMonth */ + weekOfMonth?: (google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|keyof typeof google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|null); + + /** WeekDayOfMonth dayOfWeek */ + dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + } + + /** Represents a WeekDayOfMonth. */ + class WeekDayOfMonth implements IWeekDayOfMonth { + + /** + * Constructs a new WeekDayOfMonth. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IWeekDayOfMonth); + + /** WeekDayOfMonth weekOfMonth. */ + public weekOfMonth: (google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|keyof typeof google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth); + + /** WeekDayOfMonth dayOfWeek. */ + public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); + + /** + * Creates a new WeekDayOfMonth instance using the specified properties. + * @param [properties] Properties to set + * @returns WeekDayOfMonth instance + */ + public static create(properties?: google.cloud.backupdr.v1.IWeekDayOfMonth): google.cloud.backupdr.v1.WeekDayOfMonth; + + /** + * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. + * @param message WeekDayOfMonth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. + * @param message WeekDayOfMonth message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WeekDayOfMonth; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WeekDayOfMonth; + + /** + * Verifies a WeekDayOfMonth message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WeekDayOfMonth + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WeekDayOfMonth; + + /** + * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. + * @param message WeekDayOfMonth + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.WeekDayOfMonth, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WeekDayOfMonth to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WeekDayOfMonth + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WeekDayOfMonth { + + /** WeekOfMonth enum. */ + enum WeekOfMonth { + WEEK_OF_MONTH_UNSPECIFIED = 0, + FIRST = 1, + SECOND = 2, + THIRD = 3, + FOURTH = 4, + LAST = 5 + } + } + + /** Properties of a CreateBackupPlanRequest. */ + interface ICreateBackupPlanRequest { + + /** CreateBackupPlanRequest parent */ + parent?: (string|null); + + /** CreateBackupPlanRequest backupPlanId */ + backupPlanId?: (string|null); + + /** CreateBackupPlanRequest backupPlan */ + backupPlan?: (google.cloud.backupdr.v1.IBackupPlan|null); + + /** CreateBackupPlanRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateBackupPlanRequest. */ + class CreateBackupPlanRequest implements ICreateBackupPlanRequest { + + /** + * Constructs a new CreateBackupPlanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICreateBackupPlanRequest); + + /** CreateBackupPlanRequest parent. */ + public parent: string; + + /** CreateBackupPlanRequest backupPlanId. */ + public backupPlanId: string; + + /** CreateBackupPlanRequest backupPlan. */ + public backupPlan?: (google.cloud.backupdr.v1.IBackupPlan|null); + + /** CreateBackupPlanRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateBackupPlanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupPlanRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICreateBackupPlanRequest): google.cloud.backupdr.v1.CreateBackupPlanRequest; + + /** + * Encodes the specified CreateBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. + * @param message CreateBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICreateBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. + * @param message CreateBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupPlanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupPlanRequest; + + /** + * Decodes a CreateBackupPlanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupPlanRequest; + + /** + * Verifies a CreateBackupPlanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupPlanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupPlanRequest; + + /** + * Creates a plain object from a CreateBackupPlanRequest message. Also converts values to other types if specified. + * @param message CreateBackupPlanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CreateBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupPlanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupPlanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlansRequest. */ + interface IListBackupPlansRequest { + + /** ListBackupPlansRequest parent */ + parent?: (string|null); + + /** ListBackupPlansRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupPlansRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupPlansRequest filter */ + filter?: (string|null); + + /** ListBackupPlansRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListBackupPlansRequest. */ + class ListBackupPlansRequest implements IListBackupPlansRequest { + + /** + * Constructs a new ListBackupPlansRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupPlansRequest); + + /** ListBackupPlansRequest parent. */ + public parent: string; + + /** ListBackupPlansRequest pageSize. */ + public pageSize: number; + + /** ListBackupPlansRequest pageToken. */ + public pageToken: string; + + /** ListBackupPlansRequest filter. */ + public filter: string; + + /** ListBackupPlansRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListBackupPlansRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlansRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupPlansRequest): google.cloud.backupdr.v1.ListBackupPlansRequest; + + /** + * Encodes the specified ListBackupPlansRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. + * @param message ListBackupPlansRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupPlansRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlansRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. + * @param message ListBackupPlansRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlansRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlansRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlansRequest; + + /** + * Decodes a ListBackupPlansRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlansRequest; + + /** + * Verifies a ListBackupPlansRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlansRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlansRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlansRequest; + + /** + * Creates a plain object from a ListBackupPlansRequest message. Also converts values to other types if specified. + * @param message ListBackupPlansRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupPlansRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlansRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlansRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlansResponse. */ + interface IListBackupPlansResponse { + + /** ListBackupPlansResponse backupPlans */ + backupPlans?: (google.cloud.backupdr.v1.IBackupPlan[]|null); + + /** ListBackupPlansResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupPlansResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupPlansResponse. */ + class ListBackupPlansResponse implements IListBackupPlansResponse { + + /** + * Constructs a new ListBackupPlansResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupPlansResponse); + + /** ListBackupPlansResponse backupPlans. */ + public backupPlans: google.cloud.backupdr.v1.IBackupPlan[]; + + /** ListBackupPlansResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupPlansResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupPlansResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlansResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupPlansResponse): google.cloud.backupdr.v1.ListBackupPlansResponse; + + /** + * Encodes the specified ListBackupPlansResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. + * @param message ListBackupPlansResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupPlansResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlansResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. + * @param message ListBackupPlansResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlansResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlansResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlansResponse; + + /** + * Decodes a ListBackupPlansResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlansResponse; + + /** + * Verifies a ListBackupPlansResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlansResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlansResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlansResponse; + + /** + * Creates a plain object from a ListBackupPlansResponse message. Also converts values to other types if specified. + * @param message ListBackupPlansResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupPlansResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlansResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlansResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupPlanRequest. */ + interface IGetBackupPlanRequest { + + /** GetBackupPlanRequest name */ + name?: (string|null); + } + + /** Represents a GetBackupPlanRequest. */ + class GetBackupPlanRequest implements IGetBackupPlanRequest { + + /** + * Constructs a new GetBackupPlanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetBackupPlanRequest); + + /** GetBackupPlanRequest name. */ + public name: string; + + /** + * Creates a new GetBackupPlanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupPlanRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetBackupPlanRequest): google.cloud.backupdr.v1.GetBackupPlanRequest; + + /** + * Encodes the specified GetBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. + * @param message GetBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. + * @param message GetBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupPlanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupPlanRequest; + + /** + * Decodes a GetBackupPlanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupPlanRequest; + + /** + * Verifies a GetBackupPlanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupPlanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupPlanRequest; + + /** + * Creates a plain object from a GetBackupPlanRequest message. Also converts values to other types if specified. + * @param message GetBackupPlanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupPlanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupPlanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupPlanRequest. */ + interface IDeleteBackupPlanRequest { + + /** DeleteBackupPlanRequest name */ + name?: (string|null); + + /** DeleteBackupPlanRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteBackupPlanRequest. */ + class DeleteBackupPlanRequest implements IDeleteBackupPlanRequest { + + /** + * Constructs a new DeleteBackupPlanRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanRequest); + + /** DeleteBackupPlanRequest name. */ + public name: string; + + /** DeleteBackupPlanRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteBackupPlanRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupPlanRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanRequest): google.cloud.backupdr.v1.DeleteBackupPlanRequest; + + /** + * Encodes the specified DeleteBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. + * @param message DeleteBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. + * @param message DeleteBackupPlanRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupPlanRequest; + + /** + * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupPlanRequest; + + /** + * Verifies a DeleteBackupPlanRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupPlanRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupPlanRequest; + + /** + * Creates a plain object from a DeleteBackupPlanRequest message. Also converts values to other types if specified. + * @param message DeleteBackupPlanRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupPlanRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupPlanRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupPlanAssociation. */ + interface IBackupPlanAssociation { + + /** BackupPlanAssociation name */ + name?: (string|null); + + /** BackupPlanAssociation resourceType */ + resourceType?: (string|null); + + /** BackupPlanAssociation resource */ + resource?: (string|null); + + /** BackupPlanAssociation backupPlan */ + backupPlan?: (string|null); + + /** BackupPlanAssociation createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation state */ + state?: (google.cloud.backupdr.v1.BackupPlanAssociation.State|keyof typeof google.cloud.backupdr.v1.BackupPlanAssociation.State|null); + + /** BackupPlanAssociation rulesConfigInfo */ + rulesConfigInfo?: (google.cloud.backupdr.v1.IRuleConfigInfo[]|null); + + /** BackupPlanAssociation dataSource */ + dataSource?: (string|null); + } + + /** Represents a BackupPlanAssociation. */ + class BackupPlanAssociation implements IBackupPlanAssociation { + + /** + * Constructs a new BackupPlanAssociation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupPlanAssociation); + + /** BackupPlanAssociation name. */ + public name: string; + + /** BackupPlanAssociation resourceType. */ + public resourceType: string; + + /** BackupPlanAssociation resource. */ + public resource: string; + + /** BackupPlanAssociation backupPlan. */ + public backupPlan: string; + + /** BackupPlanAssociation createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupPlanAssociation state. */ + public state: (google.cloud.backupdr.v1.BackupPlanAssociation.State|keyof typeof google.cloud.backupdr.v1.BackupPlanAssociation.State); + + /** BackupPlanAssociation rulesConfigInfo. */ + public rulesConfigInfo: google.cloud.backupdr.v1.IRuleConfigInfo[]; + + /** BackupPlanAssociation dataSource. */ + public dataSource: string; + + /** + * Creates a new BackupPlanAssociation instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupPlanAssociation instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupPlanAssociation): google.cloud.backupdr.v1.BackupPlanAssociation; + + /** + * Encodes the specified BackupPlanAssociation message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. + * @param message BackupPlanAssociation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupPlanAssociation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupPlanAssociation message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. + * @param message BackupPlanAssociation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupPlanAssociation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupPlanAssociation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupPlanAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupPlanAssociation; + + /** + * Decodes a BackupPlanAssociation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupPlanAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupPlanAssociation; + + /** + * Verifies a BackupPlanAssociation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupPlanAssociation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupPlanAssociation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupPlanAssociation; + + /** + * Creates a plain object from a BackupPlanAssociation message. Also converts values to other types if specified. + * @param message BackupPlanAssociation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupPlanAssociation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupPlanAssociation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupPlanAssociation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupPlanAssociation { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + INACTIVE = 4 + } + } + + /** Properties of a RuleConfigInfo. */ + interface IRuleConfigInfo { + + /** RuleConfigInfo ruleId */ + ruleId?: (string|null); + + /** RuleConfigInfo lastBackupState */ + lastBackupState?: (google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|null); + + /** RuleConfigInfo lastBackupError */ + lastBackupError?: (google.rpc.IStatus|null); + + /** RuleConfigInfo lastSuccessfulBackupConsistencyTime */ + lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a RuleConfigInfo. */ + class RuleConfigInfo implements IRuleConfigInfo { + + /** + * Constructs a new RuleConfigInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IRuleConfigInfo); + + /** RuleConfigInfo ruleId. */ + public ruleId: string; + + /** RuleConfigInfo lastBackupState. */ + public lastBackupState: (google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState); + + /** RuleConfigInfo lastBackupError. */ + public lastBackupError?: (google.rpc.IStatus|null); + + /** RuleConfigInfo lastSuccessfulBackupConsistencyTime. */ + public lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new RuleConfigInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RuleConfigInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.IRuleConfigInfo): google.cloud.backupdr.v1.RuleConfigInfo; + + /** + * Encodes the specified RuleConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. + * @param message RuleConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IRuleConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RuleConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. + * @param message RuleConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IRuleConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RuleConfigInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RuleConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RuleConfigInfo; + + /** + * Decodes a RuleConfigInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RuleConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RuleConfigInfo; + + /** + * Verifies a RuleConfigInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RuleConfigInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RuleConfigInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RuleConfigInfo; + + /** + * Creates a plain object from a RuleConfigInfo message. Also converts values to other types if specified. + * @param message RuleConfigInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.RuleConfigInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RuleConfigInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RuleConfigInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RuleConfigInfo { + + /** LastBackupState enum. */ + enum LastBackupState { + LAST_BACKUP_STATE_UNSPECIFIED = 0, + FIRST_BACKUP_PENDING = 1, + PERMISSION_DENIED = 2, + SUCCEEDED = 3, + FAILED = 4 + } + } + + /** Properties of a CreateBackupPlanAssociationRequest. */ + interface ICreateBackupPlanAssociationRequest { + + /** CreateBackupPlanAssociationRequest parent */ + parent?: (string|null); + + /** CreateBackupPlanAssociationRequest backupPlanAssociationId */ + backupPlanAssociationId?: (string|null); + + /** CreateBackupPlanAssociationRequest backupPlanAssociation */ + backupPlanAssociation?: (google.cloud.backupdr.v1.IBackupPlanAssociation|null); + + /** CreateBackupPlanAssociationRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateBackupPlanAssociationRequest. */ + class CreateBackupPlanAssociationRequest implements ICreateBackupPlanAssociationRequest { + + /** + * Constructs a new CreateBackupPlanAssociationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest); + + /** CreateBackupPlanAssociationRequest parent. */ + public parent: string; + + /** CreateBackupPlanAssociationRequest backupPlanAssociationId. */ + public backupPlanAssociationId: string; + + /** CreateBackupPlanAssociationRequest backupPlanAssociation. */ + public backupPlanAssociation?: (google.cloud.backupdr.v1.IBackupPlanAssociation|null); + + /** CreateBackupPlanAssociationRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateBackupPlanAssociationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupPlanAssociationRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; + + /** + * Encodes the specified CreateBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. + * @param message CreateBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. + * @param message CreateBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; + + /** + * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; + + /** + * Verifies a CreateBackupPlanAssociationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupPlanAssociationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; + + /** + * Creates a plain object from a CreateBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @param message CreateBackupPlanAssociationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupPlanAssociationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupPlanAssociationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlanAssociationsRequest. */ + interface IListBackupPlanAssociationsRequest { + + /** ListBackupPlanAssociationsRequest parent */ + parent?: (string|null); + + /** ListBackupPlanAssociationsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupPlanAssociationsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupPlanAssociationsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListBackupPlanAssociationsRequest. */ + class ListBackupPlanAssociationsRequest implements IListBackupPlanAssociationsRequest { + + /** + * Constructs a new ListBackupPlanAssociationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest); + + /** ListBackupPlanAssociationsRequest parent. */ + public parent: string; + + /** ListBackupPlanAssociationsRequest pageSize. */ + public pageSize: number; + + /** ListBackupPlanAssociationsRequest pageToken. */ + public pageToken: string; + + /** ListBackupPlanAssociationsRequest filter. */ + public filter: string; + + /** + * Creates a new ListBackupPlanAssociationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlanAssociationsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; + + /** + * Encodes the specified ListBackupPlanAssociationsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. + * @param message ListBackupPlanAssociationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlanAssociationsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. + * @param message ListBackupPlanAssociationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlanAssociationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; + + /** + * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlanAssociationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; + + /** + * Verifies a ListBackupPlanAssociationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlanAssociationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlanAssociationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; + + /** + * Creates a plain object from a ListBackupPlanAssociationsRequest message. Also converts values to other types if specified. + * @param message ListBackupPlanAssociationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlanAssociationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlanAssociationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupPlanAssociationsResponse. */ + interface IListBackupPlanAssociationsResponse { + + /** ListBackupPlanAssociationsResponse backupPlanAssociations */ + backupPlanAssociations?: (google.cloud.backupdr.v1.IBackupPlanAssociation[]|null); + + /** ListBackupPlanAssociationsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupPlanAssociationsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupPlanAssociationsResponse. */ + class ListBackupPlanAssociationsResponse implements IListBackupPlanAssociationsResponse { + + /** + * Constructs a new ListBackupPlanAssociationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse); + + /** ListBackupPlanAssociationsResponse backupPlanAssociations. */ + public backupPlanAssociations: google.cloud.backupdr.v1.IBackupPlanAssociation[]; + + /** ListBackupPlanAssociationsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupPlanAssociationsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupPlanAssociationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupPlanAssociationsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; + + /** + * Encodes the specified ListBackupPlanAssociationsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. + * @param message ListBackupPlanAssociationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupPlanAssociationsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. + * @param message ListBackupPlanAssociationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupPlanAssociationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; + + /** + * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupPlanAssociationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; + + /** + * Verifies a ListBackupPlanAssociationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupPlanAssociationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupPlanAssociationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; + + /** + * Creates a plain object from a ListBackupPlanAssociationsResponse message. Also converts values to other types if specified. + * @param message ListBackupPlanAssociationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupPlanAssociationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupPlanAssociationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupPlanAssociationRequest. */ + interface IGetBackupPlanAssociationRequest { + + /** GetBackupPlanAssociationRequest name */ + name?: (string|null); + } + + /** Represents a GetBackupPlanAssociationRequest. */ + class GetBackupPlanAssociationRequest implements IGetBackupPlanAssociationRequest { + + /** + * Constructs a new GetBackupPlanAssociationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest); + + /** GetBackupPlanAssociationRequest name. */ + public name: string; + + /** + * Creates a new GetBackupPlanAssociationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupPlanAssociationRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; + + /** + * Encodes the specified GetBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. + * @param message GetBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. + * @param message GetBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; + + /** + * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; + + /** + * Verifies a GetBackupPlanAssociationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupPlanAssociationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; + + /** + * Creates a plain object from a GetBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @param message GetBackupPlanAssociationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupPlanAssociationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupPlanAssociationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupPlanAssociationRequest. */ + interface IDeleteBackupPlanAssociationRequest { + + /** DeleteBackupPlanAssociationRequest name */ + name?: (string|null); + + /** DeleteBackupPlanAssociationRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteBackupPlanAssociationRequest. */ + class DeleteBackupPlanAssociationRequest implements IDeleteBackupPlanAssociationRequest { + + /** + * Constructs a new DeleteBackupPlanAssociationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest); + + /** DeleteBackupPlanAssociationRequest name. */ + public name: string; + + /** DeleteBackupPlanAssociationRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteBackupPlanAssociationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupPlanAssociationRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; + + /** + * Encodes the specified DeleteBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. + * @param message DeleteBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. + * @param message DeleteBackupPlanAssociationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; + + /** + * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; + + /** + * Verifies a DeleteBackupPlanAssociationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupPlanAssociationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; + + /** + * Creates a plain object from a DeleteBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @param message DeleteBackupPlanAssociationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupPlanAssociationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupPlanAssociationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TriggerBackupRequest. */ + interface ITriggerBackupRequest { + + /** TriggerBackupRequest name */ + name?: (string|null); + + /** TriggerBackupRequest ruleId */ + ruleId?: (string|null); + + /** TriggerBackupRequest requestId */ + requestId?: (string|null); + } + + /** Represents a TriggerBackupRequest. */ + class TriggerBackupRequest implements ITriggerBackupRequest { + + /** + * Constructs a new TriggerBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ITriggerBackupRequest); + + /** TriggerBackupRequest name. */ + public name: string; + + /** TriggerBackupRequest ruleId. */ + public ruleId: string; + + /** TriggerBackupRequest requestId. */ + public requestId: string; + + /** + * Creates a new TriggerBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TriggerBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ITriggerBackupRequest): google.cloud.backupdr.v1.TriggerBackupRequest; + + /** + * Encodes the specified TriggerBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. + * @param message TriggerBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ITriggerBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TriggerBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. + * @param message TriggerBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ITriggerBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TriggerBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TriggerBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.TriggerBackupRequest; + + /** + * Decodes a TriggerBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TriggerBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.TriggerBackupRequest; + + /** + * Verifies a TriggerBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TriggerBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TriggerBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.TriggerBackupRequest; + + /** + * Creates a plain object from a TriggerBackupRequest message. Also converts values to other types if specified. + * @param message TriggerBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.TriggerBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TriggerBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TriggerBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupVault. */ + interface IBackupVault { + + /** BackupVault name */ + name?: (string|null); + + /** BackupVault description */ + description?: (string|null); + + /** BackupVault labels */ + labels?: ({ [k: string]: string }|null); + + /** BackupVault createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupMinimumEnforcedRetentionDuration */ + backupMinimumEnforcedRetentionDuration?: (google.protobuf.IDuration|null); + + /** BackupVault deletable */ + deletable?: (boolean|null); + + /** BackupVault etag */ + etag?: (string|null); + + /** BackupVault state */ + state?: (google.cloud.backupdr.v1.BackupVault.State|keyof typeof google.cloud.backupdr.v1.BackupVault.State|null); + + /** BackupVault effectiveTime */ + effectiveTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupCount */ + backupCount?: (number|Long|string|null); + + /** BackupVault serviceAccount */ + serviceAccount?: (string|null); + + /** BackupVault totalStoredBytes */ + totalStoredBytes?: (number|Long|string|null); + + /** BackupVault uid */ + uid?: (string|null); + + /** BackupVault annotations */ + annotations?: ({ [k: string]: string }|null); + + /** BackupVault accessRestriction */ + accessRestriction?: (google.cloud.backupdr.v1.BackupVault.AccessRestriction|keyof typeof google.cloud.backupdr.v1.BackupVault.AccessRestriction|null); + } + + /** Represents a BackupVault. */ + class BackupVault implements IBackupVault { + + /** + * Constructs a new BackupVault. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupVault); + + /** BackupVault name. */ + public name: string; + + /** BackupVault description. */ + public description?: (string|null); + + /** BackupVault labels. */ + public labels: { [k: string]: string }; + + /** BackupVault createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupMinimumEnforcedRetentionDuration. */ + public backupMinimumEnforcedRetentionDuration?: (google.protobuf.IDuration|null); + + /** BackupVault deletable. */ + public deletable?: (boolean|null); + + /** BackupVault etag. */ + public etag?: (string|null); + + /** BackupVault state. */ + public state: (google.cloud.backupdr.v1.BackupVault.State|keyof typeof google.cloud.backupdr.v1.BackupVault.State); + + /** BackupVault effectiveTime. */ + public effectiveTime?: (google.protobuf.ITimestamp|null); + + /** BackupVault backupCount. */ + public backupCount: (number|Long|string); + + /** BackupVault serviceAccount. */ + public serviceAccount: string; + + /** BackupVault totalStoredBytes. */ + public totalStoredBytes: (number|Long|string); + + /** BackupVault uid. */ + public uid: string; + + /** BackupVault annotations. */ + public annotations: { [k: string]: string }; + + /** BackupVault accessRestriction. */ + public accessRestriction: (google.cloud.backupdr.v1.BackupVault.AccessRestriction|keyof typeof google.cloud.backupdr.v1.BackupVault.AccessRestriction); + + /** BackupVault _description. */ + public _description?: "description"; + + /** BackupVault _createTime. */ + public _createTime?: "createTime"; + + /** BackupVault _updateTime. */ + public _updateTime?: "updateTime"; + + /** BackupVault _backupMinimumEnforcedRetentionDuration. */ + public _backupMinimumEnforcedRetentionDuration?: "backupMinimumEnforcedRetentionDuration"; + + /** BackupVault _deletable. */ + public _deletable?: "deletable"; + + /** BackupVault _etag. */ + public _etag?: "etag"; + + /** BackupVault _effectiveTime. */ + public _effectiveTime?: "effectiveTime"; + + /** + * Creates a new BackupVault instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupVault instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupVault): google.cloud.backupdr.v1.BackupVault; + + /** + * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. + * @param message BackupVault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupVault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. + * @param message BackupVault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupVault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupVault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupVault; + + /** + * Decodes a BackupVault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupVault; + + /** + * Verifies a BackupVault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupVault + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupVault; + + /** + * Creates a plain object from a BackupVault message. Also converts values to other types if specified. + * @param message BackupVault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupVault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupVault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupVault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupVault { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + ERROR = 4 + } + + /** AccessRestriction enum. */ + enum AccessRestriction { + ACCESS_RESTRICTION_UNSPECIFIED = 0, + WITHIN_PROJECT = 1, + WITHIN_ORGANIZATION = 2, + UNRESTRICTED = 3 + } + } + + /** Properties of a DataSource. */ + interface IDataSource { + + /** DataSource name */ + name?: (string|null); + + /** DataSource state */ + state?: (google.cloud.backupdr.v1.DataSource.State|keyof typeof google.cloud.backupdr.v1.DataSource.State|null); + + /** DataSource labels */ + labels?: ({ [k: string]: string }|null); + + /** DataSource createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataSource updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DataSource backupCount */ + backupCount?: (number|Long|string|null); + + /** DataSource etag */ + etag?: (string|null); + + /** DataSource totalStoredBytes */ + totalStoredBytes?: (number|Long|string|null); + + /** DataSource configState */ + configState?: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState|null); + + /** DataSource backupConfigInfo */ + backupConfigInfo?: (google.cloud.backupdr.v1.IBackupConfigInfo|null); + + /** DataSource dataSourceGcpResource */ + dataSourceGcpResource?: (google.cloud.backupdr.v1.IDataSourceGcpResource|null); + + /** DataSource dataSourceBackupApplianceApplication */ + dataSourceBackupApplianceApplication?: (google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null); + } + + /** Represents a DataSource. */ + class DataSource implements IDataSource { + + /** + * Constructs a new DataSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDataSource); + + /** DataSource name. */ + public name: string; + + /** DataSource state. */ + public state: (google.cloud.backupdr.v1.DataSource.State|keyof typeof google.cloud.backupdr.v1.DataSource.State); + + /** DataSource labels. */ + public labels: { [k: string]: string }; + + /** DataSource createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataSource updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DataSource backupCount. */ + public backupCount?: (number|Long|string|null); + + /** DataSource etag. */ + public etag?: (string|null); + + /** DataSource totalStoredBytes. */ + public totalStoredBytes?: (number|Long|string|null); + + /** DataSource configState. */ + public configState: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState); + + /** DataSource backupConfigInfo. */ + public backupConfigInfo?: (google.cloud.backupdr.v1.IBackupConfigInfo|null); + + /** DataSource dataSourceGcpResource. */ + public dataSourceGcpResource?: (google.cloud.backupdr.v1.IDataSourceGcpResource|null); + + /** DataSource dataSourceBackupApplianceApplication. */ + public dataSourceBackupApplianceApplication?: (google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null); + + /** DataSource _createTime. */ + public _createTime?: "createTime"; + + /** DataSource _updateTime. */ + public _updateTime?: "updateTime"; + + /** DataSource _backupCount. */ + public _backupCount?: "backupCount"; + + /** DataSource _etag. */ + public _etag?: "etag"; + + /** DataSource _totalStoredBytes. */ + public _totalStoredBytes?: "totalStoredBytes"; + + /** DataSource sourceResource. */ + public sourceResource?: ("dataSourceGcpResource"|"dataSourceBackupApplianceApplication"); + + /** + * Creates a new DataSource instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSource instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDataSource): google.cloud.backupdr.v1.DataSource; + + /** + * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. + * @param message DataSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. + * @param message DataSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSource; + + /** + * Decodes a DataSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSource; + + /** + * Verifies a DataSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSource; + + /** + * Creates a plain object from a DataSource message. Also converts values to other types if specified. + * @param message DataSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DataSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataSource { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + ERROR = 4 + } + } + + /** Properties of a BackupConfigInfo. */ + interface IBackupConfigInfo { + + /** BackupConfigInfo lastBackupState */ + lastBackupState?: (google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|null); + + /** BackupConfigInfo lastSuccessfulBackupConsistencyTime */ + lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + + /** BackupConfigInfo lastBackupError */ + lastBackupError?: (google.rpc.IStatus|null); + + /** BackupConfigInfo gcpBackupConfig */ + gcpBackupConfig?: (google.cloud.backupdr.v1.IGcpBackupConfig|null); + + /** BackupConfigInfo backupApplianceBackupConfig */ + backupApplianceBackupConfig?: (google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null); + } + + /** Represents a BackupConfigInfo. */ + class BackupConfigInfo implements IBackupConfigInfo { + + /** + * Constructs a new BackupConfigInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupConfigInfo); + + /** BackupConfigInfo lastBackupState. */ + public lastBackupState: (google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState); + + /** BackupConfigInfo lastSuccessfulBackupConsistencyTime. */ + public lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); + + /** BackupConfigInfo lastBackupError. */ + public lastBackupError?: (google.rpc.IStatus|null); + + /** BackupConfigInfo gcpBackupConfig. */ + public gcpBackupConfig?: (google.cloud.backupdr.v1.IGcpBackupConfig|null); + + /** BackupConfigInfo backupApplianceBackupConfig. */ + public backupApplianceBackupConfig?: (google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null); + + /** BackupConfigInfo backupConfig. */ + public backupConfig?: ("gcpBackupConfig"|"backupApplianceBackupConfig"); + + /** + * Creates a new BackupConfigInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupConfigInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupConfigInfo): google.cloud.backupdr.v1.BackupConfigInfo; + + /** + * Encodes the specified BackupConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. + * @param message BackupConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. + * @param message BackupConfigInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupConfigInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupConfigInfo; + + /** + * Decodes a BackupConfigInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupConfigInfo; + + /** + * Verifies a BackupConfigInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupConfigInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupConfigInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupConfigInfo; + + /** + * Creates a plain object from a BackupConfigInfo message. Also converts values to other types if specified. + * @param message BackupConfigInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupConfigInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupConfigInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupConfigInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BackupConfigInfo { + + /** LastBackupState enum. */ + enum LastBackupState { + LAST_BACKUP_STATE_UNSPECIFIED = 0, + FIRST_BACKUP_PENDING = 1, + SUCCEEDED = 2, + FAILED = 3, + PERMISSION_DENIED = 4 + } + } + + /** Properties of a GcpBackupConfig. */ + interface IGcpBackupConfig { + + /** GcpBackupConfig backupPlan */ + backupPlan?: (string|null); + + /** GcpBackupConfig backupPlanDescription */ + backupPlanDescription?: (string|null); + + /** GcpBackupConfig backupPlanAssociation */ + backupPlanAssociation?: (string|null); + + /** GcpBackupConfig backupPlanRules */ + backupPlanRules?: (string[]|null); + } + + /** Represents a GcpBackupConfig. */ + class GcpBackupConfig implements IGcpBackupConfig { + + /** + * Constructs a new GcpBackupConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGcpBackupConfig); + + /** GcpBackupConfig backupPlan. */ + public backupPlan: string; + + /** GcpBackupConfig backupPlanDescription. */ + public backupPlanDescription: string; + + /** GcpBackupConfig backupPlanAssociation. */ + public backupPlanAssociation: string; + + /** GcpBackupConfig backupPlanRules. */ + public backupPlanRules: string[]; + + /** + * Creates a new GcpBackupConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GcpBackupConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGcpBackupConfig): google.cloud.backupdr.v1.GcpBackupConfig; + + /** + * Encodes the specified GcpBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * @param message GcpBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGcpBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcpBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * @param message GcpBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGcpBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcpBackupConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcpBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GcpBackupConfig; + + /** + * Decodes a GcpBackupConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcpBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GcpBackupConfig; + + /** + * Verifies a GcpBackupConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcpBackupConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcpBackupConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GcpBackupConfig; + + /** + * Creates a plain object from a GcpBackupConfig message. Also converts values to other types if specified. + * @param message GcpBackupConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GcpBackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcpBackupConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcpBackupConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupApplianceBackupConfig. */ + interface IBackupApplianceBackupConfig { + + /** BackupApplianceBackupConfig backupApplianceName */ + backupApplianceName?: (string|null); + + /** BackupApplianceBackupConfig backupApplianceId */ + backupApplianceId?: (number|Long|string|null); + + /** BackupApplianceBackupConfig slaId */ + slaId?: (number|Long|string|null); + + /** BackupApplianceBackupConfig applicationName */ + applicationName?: (string|null); + + /** BackupApplianceBackupConfig hostName */ + hostName?: (string|null); + + /** BackupApplianceBackupConfig sltName */ + sltName?: (string|null); + + /** BackupApplianceBackupConfig slpName */ + slpName?: (string|null); + } + + /** Represents a BackupApplianceBackupConfig. */ + class BackupApplianceBackupConfig implements IBackupApplianceBackupConfig { + + /** + * Constructs a new BackupApplianceBackupConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupConfig); + + /** BackupApplianceBackupConfig backupApplianceName. */ + public backupApplianceName: string; + + /** BackupApplianceBackupConfig backupApplianceId. */ + public backupApplianceId: (number|Long|string); + + /** BackupApplianceBackupConfig slaId. */ + public slaId: (number|Long|string); + + /** BackupApplianceBackupConfig applicationName. */ + public applicationName: string; + + /** BackupApplianceBackupConfig hostName. */ + public hostName: string; + + /** BackupApplianceBackupConfig sltName. */ + public sltName: string; + + /** BackupApplianceBackupConfig slpName. */ + public slpName: string; + + /** + * Creates a new BackupApplianceBackupConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupApplianceBackupConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupConfig): google.cloud.backupdr.v1.BackupApplianceBackupConfig; + + /** + * Encodes the specified BackupApplianceBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. + * @param message BackupApplianceBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupApplianceBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupApplianceBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. + * @param message BackupApplianceBackupConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupApplianceBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceBackupConfig; + + /** + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupApplianceBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceBackupConfig; + + /** + * Verifies a BackupApplianceBackupConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupApplianceBackupConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupApplianceBackupConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceBackupConfig; + + /** + * Creates a plain object from a BackupApplianceBackupConfig message. Also converts values to other types if specified. + * @param message BackupApplianceBackupConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupApplianceBackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupApplianceBackupConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupApplianceBackupConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataSourceGcpResource. */ + interface IDataSourceGcpResource { + + /** DataSourceGcpResource gcpResourcename */ + gcpResourcename?: (string|null); + + /** DataSourceGcpResource location */ + location?: (string|null); + + /** DataSourceGcpResource type */ + type?: (string|null); + + /** DataSourceGcpResource computeInstanceDatasourceProperties */ + computeInstanceDatasourceProperties?: (google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null); + } + + /** Represents a DataSourceGcpResource. */ + class DataSourceGcpResource implements IDataSourceGcpResource { + + /** + * Constructs a new DataSourceGcpResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDataSourceGcpResource); + + /** DataSourceGcpResource gcpResourcename. */ + public gcpResourcename: string; + + /** DataSourceGcpResource location. */ + public location: string; + + /** DataSourceGcpResource type. */ + public type: string; + + /** DataSourceGcpResource computeInstanceDatasourceProperties. */ + public computeInstanceDatasourceProperties?: (google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null); + + /** DataSourceGcpResource gcpResourceProperties. */ + public gcpResourceProperties?: "computeInstanceDatasourceProperties"; + + /** + * Creates a new DataSourceGcpResource instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSourceGcpResource instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDataSourceGcpResource): google.cloud.backupdr.v1.DataSourceGcpResource; + + /** + * Encodes the specified DataSourceGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * @param message DataSourceGcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDataSourceGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSourceGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * @param message DataSourceGcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSourceGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSourceGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSourceGcpResource; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSourceGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSourceGcpResource; + + /** + * Verifies a DataSourceGcpResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSourceGcpResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSourceGcpResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSourceGcpResource; + + /** + * Creates a plain object from a DataSourceGcpResource message. Also converts values to other types if specified. + * @param message DataSourceGcpResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DataSourceGcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSourceGcpResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSourceGcpResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataSourceBackupApplianceApplication. */ + interface IDataSourceBackupApplianceApplication { + + /** DataSourceBackupApplianceApplication applicationName */ + applicationName?: (string|null); + + /** DataSourceBackupApplianceApplication backupAppliance */ + backupAppliance?: (string|null); + + /** DataSourceBackupApplianceApplication applianceId */ + applianceId?: (number|Long|string|null); + + /** DataSourceBackupApplianceApplication type */ + type?: (string|null); + + /** DataSourceBackupApplianceApplication applicationId */ + applicationId?: (number|Long|string|null); + + /** DataSourceBackupApplianceApplication hostname */ + hostname?: (string|null); + + /** DataSourceBackupApplianceApplication hostId */ + hostId?: (number|Long|string|null); + } + + /** Represents a DataSourceBackupApplianceApplication. */ + class DataSourceBackupApplianceApplication implements IDataSourceBackupApplianceApplication { + + /** + * Constructs a new DataSourceBackupApplianceApplication. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication); + + /** DataSourceBackupApplianceApplication applicationName. */ + public applicationName: string; + + /** DataSourceBackupApplianceApplication backupAppliance. */ + public backupAppliance: string; + + /** DataSourceBackupApplianceApplication applianceId. */ + public applianceId: (number|Long|string); + + /** DataSourceBackupApplianceApplication type. */ + public type: string; + + /** DataSourceBackupApplianceApplication applicationId. */ + public applicationId: (number|Long|string); + + /** DataSourceBackupApplianceApplication hostname. */ + public hostname: string; + + /** DataSourceBackupApplianceApplication hostId. */ + public hostId: (number|Long|string); + + /** + * Creates a new DataSourceBackupApplianceApplication instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSourceBackupApplianceApplication instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; + + /** + * Encodes the specified DataSourceBackupApplianceApplication message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. + * @param message DataSourceBackupApplianceApplication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSourceBackupApplianceApplication message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. + * @param message DataSourceBackupApplianceApplication message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSourceBackupApplianceApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; + + /** + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSourceBackupApplianceApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; + + /** + * Verifies a DataSourceBackupApplianceApplication message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSourceBackupApplianceApplication message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSourceBackupApplianceApplication + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; + + /** + * Creates a plain object from a DataSourceBackupApplianceApplication message. Also converts values to other types if specified. + * @param message DataSourceBackupApplianceApplication + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DataSourceBackupApplianceApplication, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSourceBackupApplianceApplication to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSourceBackupApplianceApplication + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceLockInfo. */ + interface IServiceLockInfo { + + /** ServiceLockInfo operation */ + operation?: (string|null); + } + + /** Represents a ServiceLockInfo. */ + class ServiceLockInfo implements IServiceLockInfo { + + /** + * Constructs a new ServiceLockInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IServiceLockInfo); + + /** ServiceLockInfo operation. */ + public operation: string; + + /** + * Creates a new ServiceLockInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceLockInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.IServiceLockInfo): google.cloud.backupdr.v1.ServiceLockInfo; + + /** + * Encodes the specified ServiceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. + * @param message ServiceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IServiceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. + * @param message ServiceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IServiceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceLockInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ServiceLockInfo; + + /** + * Decodes a ServiceLockInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ServiceLockInfo; + + /** + * Verifies a ServiceLockInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceLockInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceLockInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ServiceLockInfo; + + /** + * Creates a plain object from a ServiceLockInfo message. Also converts values to other types if specified. + * @param message ServiceLockInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ServiceLockInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceLockInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceLockInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupApplianceLockInfo. */ + interface IBackupApplianceLockInfo { + + /** BackupApplianceLockInfo backupApplianceId */ + backupApplianceId?: (number|Long|string|null); + + /** BackupApplianceLockInfo backupApplianceName */ + backupApplianceName?: (string|null); + + /** BackupApplianceLockInfo lockReason */ + lockReason?: (string|null); + + /** BackupApplianceLockInfo jobName */ + jobName?: (string|null); + + /** BackupApplianceLockInfo backupImage */ + backupImage?: (string|null); + + /** BackupApplianceLockInfo slaId */ + slaId?: (number|Long|string|null); + } + + /** Represents a BackupApplianceLockInfo. */ + class BackupApplianceLockInfo implements IBackupApplianceLockInfo { + + /** + * Constructs a new BackupApplianceLockInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceLockInfo); + + /** BackupApplianceLockInfo backupApplianceId. */ + public backupApplianceId: (number|Long|string); + + /** BackupApplianceLockInfo backupApplianceName. */ + public backupApplianceName: string; + + /** BackupApplianceLockInfo lockReason. */ + public lockReason: string; + + /** BackupApplianceLockInfo jobName. */ + public jobName?: (string|null); + + /** BackupApplianceLockInfo backupImage. */ + public backupImage?: (string|null); + + /** BackupApplianceLockInfo slaId. */ + public slaId?: (number|Long|string|null); + + /** BackupApplianceLockInfo lockSource. */ + public lockSource?: ("jobName"|"backupImage"|"slaId"); + + /** + * Creates a new BackupApplianceLockInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupApplianceLockInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceLockInfo): google.cloud.backupdr.v1.BackupApplianceLockInfo; + + /** + * Encodes the specified BackupApplianceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * @param message BackupApplianceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupApplianceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupApplianceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * @param message BackupApplianceLockInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupApplianceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceLockInfo; + + /** + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupApplianceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceLockInfo; + + /** + * Verifies a BackupApplianceLockInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupApplianceLockInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupApplianceLockInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceLockInfo; + + /** + * Creates a plain object from a BackupApplianceLockInfo message. Also converts values to other types if specified. + * @param message BackupApplianceLockInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupApplianceLockInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupApplianceLockInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupApplianceLockInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BackupLock. */ + interface IBackupLock { + + /** BackupLock lockUntilTime */ + lockUntilTime?: (google.protobuf.ITimestamp|null); + + /** BackupLock backupApplianceLockInfo */ + backupApplianceLockInfo?: (google.cloud.backupdr.v1.IBackupApplianceLockInfo|null); + + /** BackupLock serviceLockInfo */ + serviceLockInfo?: (google.cloud.backupdr.v1.IServiceLockInfo|null); + } + + /** Represents a BackupLock. */ + class BackupLock implements IBackupLock { + + /** + * Constructs a new BackupLock. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupLock); + + /** BackupLock lockUntilTime. */ + public lockUntilTime?: (google.protobuf.ITimestamp|null); + + /** BackupLock backupApplianceLockInfo. */ + public backupApplianceLockInfo?: (google.cloud.backupdr.v1.IBackupApplianceLockInfo|null); + + /** BackupLock serviceLockInfo. */ + public serviceLockInfo?: (google.cloud.backupdr.v1.IServiceLockInfo|null); + + /** BackupLock ClientLockInfo. */ + public ClientLockInfo?: ("backupApplianceLockInfo"|"serviceLockInfo"); + + /** + * Creates a new BackupLock instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupLock instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupLock): google.cloud.backupdr.v1.BackupLock; + + /** + * Encodes the specified BackupLock message. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. + * @param message BackupLock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupLock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupLock message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. + * @param message BackupLock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupLock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupLock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupLock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupLock; + + /** + * Decodes a BackupLock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupLock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupLock; + + /** + * Verifies a BackupLock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupLock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupLock + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupLock; + + /** + * Creates a plain object from a BackupLock message. Also converts values to other types if specified. + * @param message BackupLock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupLock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupLock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupLock + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Backup. */ + interface IBackup { + + /** Backup name */ + name?: (string|null); + + /** Backup description */ + description?: (string|null); + + /** Backup createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Backup updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Backup labels */ + labels?: ({ [k: string]: string }|null); + + /** Backup enforcedRetentionEndTime */ + enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); + + /** Backup expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + + /** Backup consistencyTime */ + consistencyTime?: (google.protobuf.ITimestamp|null); + + /** Backup etag */ + etag?: (string|null); + + /** Backup state */ + state?: (google.cloud.backupdr.v1.Backup.State|keyof typeof google.cloud.backupdr.v1.Backup.State|null); + + /** Backup serviceLocks */ + serviceLocks?: (google.cloud.backupdr.v1.IBackupLock[]|null); + + /** Backup backupApplianceLocks */ + backupApplianceLocks?: (google.cloud.backupdr.v1.IBackupLock[]|null); + + /** Backup computeInstanceBackupProperties */ + computeInstanceBackupProperties?: (google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null); + + /** Backup backupApplianceBackupProperties */ + backupApplianceBackupProperties?: (google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null); + + /** Backup backupType */ + backupType?: (google.cloud.backupdr.v1.Backup.BackupType|keyof typeof google.cloud.backupdr.v1.Backup.BackupType|null); + + /** Backup gcpBackupPlanInfo */ + gcpBackupPlanInfo?: (google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null); + + /** Backup resourceSizeBytes */ + resourceSizeBytes?: (number|Long|string|null); + } + + /** Represents a Backup. */ + class Backup implements IBackup { + + /** + * Constructs a new Backup. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackup); + + /** Backup name. */ + public name: string; + + /** Backup description. */ + public description?: (string|null); + + /** Backup createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Backup updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Backup labels. */ + public labels: { [k: string]: string }; + + /** Backup enforcedRetentionEndTime. */ + public enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); + + /** Backup expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** Backup consistencyTime. */ + public consistencyTime?: (google.protobuf.ITimestamp|null); + + /** Backup etag. */ + public etag?: (string|null); + + /** Backup state. */ + public state: (google.cloud.backupdr.v1.Backup.State|keyof typeof google.cloud.backupdr.v1.Backup.State); + + /** Backup serviceLocks. */ + public serviceLocks: google.cloud.backupdr.v1.IBackupLock[]; + + /** Backup backupApplianceLocks. */ + public backupApplianceLocks: google.cloud.backupdr.v1.IBackupLock[]; + + /** Backup computeInstanceBackupProperties. */ + public computeInstanceBackupProperties?: (google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null); + + /** Backup backupApplianceBackupProperties. */ + public backupApplianceBackupProperties?: (google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null); + + /** Backup backupType. */ + public backupType: (google.cloud.backupdr.v1.Backup.BackupType|keyof typeof google.cloud.backupdr.v1.Backup.BackupType); + + /** Backup gcpBackupPlanInfo. */ + public gcpBackupPlanInfo?: (google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null); + + /** Backup resourceSizeBytes. */ + public resourceSizeBytes: (number|Long|string); + + /** Backup _description. */ + public _description?: "description"; + + /** Backup _createTime. */ + public _createTime?: "createTime"; + + /** Backup _updateTime. */ + public _updateTime?: "updateTime"; + + /** Backup _enforcedRetentionEndTime. */ + public _enforcedRetentionEndTime?: "enforcedRetentionEndTime"; + + /** Backup _expireTime. */ + public _expireTime?: "expireTime"; + + /** Backup _consistencyTime. */ + public _consistencyTime?: "consistencyTime"; + + /** Backup _etag. */ + public _etag?: "etag"; + + /** Backup backupProperties. */ + public backupProperties?: ("computeInstanceBackupProperties"|"backupApplianceBackupProperties"); + + /** Backup planInfo. */ + public planInfo?: "gcpBackupPlanInfo"; + + /** + * Creates a new Backup instance using the specified properties. + * @param [properties] Properties to set + * @returns Backup instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackup): google.cloud.backupdr.v1.Backup; + + /** + * Encodes the specified Backup message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * @param message Backup message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Backup message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Backup; + + /** + * Decodes a Backup message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Backup; + + /** + * Verifies a Backup message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Backup + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Backup; + + /** + * Creates a plain object from a Backup message. Also converts values to other types if specified. + * @param message Backup + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Backup, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Backup to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Backup + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Backup { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + ACTIVE = 2, + DELETING = 3, + ERROR = 4 + } + + /** BackupType enum. */ + enum BackupType { + BACKUP_TYPE_UNSPECIFIED = 0, + SCHEDULED = 1, + ON_DEMAND = 2 + } + + /** Properties of a GCPBackupPlanInfo. */ + interface IGCPBackupPlanInfo { + + /** GCPBackupPlanInfo backupPlan */ + backupPlan?: (string|null); + + /** GCPBackupPlanInfo backupPlanRuleId */ + backupPlanRuleId?: (string|null); + } + + /** Represents a GCPBackupPlanInfo. */ + class GCPBackupPlanInfo implements IGCPBackupPlanInfo { + + /** + * Constructs a new GCPBackupPlanInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo); + + /** GCPBackupPlanInfo backupPlan. */ + public backupPlan: string; + + /** GCPBackupPlanInfo backupPlanRuleId. */ + public backupPlanRuleId: string; + + /** + * Creates a new GCPBackupPlanInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GCPBackupPlanInfo instance + */ + public static create(properties?: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; + + /** + * Encodes the specified GCPBackupPlanInfo message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @param message GCPBackupPlanInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GCPBackupPlanInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @param message GCPBackupPlanInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GCPBackupPlanInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; + + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GCPBackupPlanInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; + + /** + * Verifies a GCPBackupPlanInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GCPBackupPlanInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GCPBackupPlanInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; + + /** + * Creates a plain object from a GCPBackupPlanInfo message. Also converts values to other types if specified. + * @param message GCPBackupPlanInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GCPBackupPlanInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GCPBackupPlanInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateBackupVaultRequest. */ + interface ICreateBackupVaultRequest { + + /** CreateBackupVaultRequest parent */ + parent?: (string|null); + + /** CreateBackupVaultRequest backupVaultId */ + backupVaultId?: (string|null); + + /** CreateBackupVaultRequest backupVault */ + backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); + + /** CreateBackupVaultRequest requestId */ + requestId?: (string|null); + + /** CreateBackupVaultRequest validateOnly */ + validateOnly?: (boolean|null); + } + + /** Represents a CreateBackupVaultRequest. */ + class CreateBackupVaultRequest implements ICreateBackupVaultRequest { + + /** + * Constructs a new CreateBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICreateBackupVaultRequest); + + /** CreateBackupVaultRequest parent. */ + public parent: string; + + /** CreateBackupVaultRequest backupVaultId. */ + public backupVaultId: string; + + /** CreateBackupVaultRequest backupVault. */ + public backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); + + /** CreateBackupVaultRequest requestId. */ + public requestId: string; + + /** CreateBackupVaultRequest validateOnly. */ + public validateOnly: boolean; + + /** + * Creates a new CreateBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICreateBackupVaultRequest): google.cloud.backupdr.v1.CreateBackupVaultRequest; + + /** + * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. + * @param message CreateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICreateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. + * @param message CreateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupVaultRequest; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupVaultRequest; + + /** + * Verifies a CreateBackupVaultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupVaultRequest; + + /** + * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. + * @param message CreateBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CreateBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupVaultsRequest. */ + interface IListBackupVaultsRequest { + + /** ListBackupVaultsRequest parent */ + parent?: (string|null); + + /** ListBackupVaultsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupVaultsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupVaultsRequest filter */ + filter?: (string|null); + + /** ListBackupVaultsRequest orderBy */ + orderBy?: (string|null); + + /** ListBackupVaultsRequest view */ + view?: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView|null); + } + + /** Represents a ListBackupVaultsRequest. */ + class ListBackupVaultsRequest implements IListBackupVaultsRequest { + + /** + * Constructs a new ListBackupVaultsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupVaultsRequest); + + /** ListBackupVaultsRequest parent. */ + public parent: string; + + /** ListBackupVaultsRequest pageSize. */ + public pageSize: number; + + /** ListBackupVaultsRequest pageToken. */ + public pageToken: string; + + /** ListBackupVaultsRequest filter. */ + public filter: string; + + /** ListBackupVaultsRequest orderBy. */ + public orderBy: string; + + /** ListBackupVaultsRequest view. */ + public view: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView); + + /** + * Creates a new ListBackupVaultsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupVaultsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupVaultsRequest): google.cloud.backupdr.v1.ListBackupVaultsRequest; + + /** + * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. + * @param message ListBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. + * @param message ListBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupVaultsRequest; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupVaultsRequest; + + /** + * Verifies a ListBackupVaultsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupVaultsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupVaultsRequest; + + /** + * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. + * @param message ListBackupVaultsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupVaultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupVaultsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupVaultsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupVaultsResponse. */ + interface IListBackupVaultsResponse { + + /** ListBackupVaultsResponse backupVaults */ + backupVaults?: (google.cloud.backupdr.v1.IBackupVault[]|null); + + /** ListBackupVaultsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupVaultsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupVaultsResponse. */ + class ListBackupVaultsResponse implements IListBackupVaultsResponse { + + /** + * Constructs a new ListBackupVaultsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupVaultsResponse); + + /** ListBackupVaultsResponse backupVaults. */ + public backupVaults: google.cloud.backupdr.v1.IBackupVault[]; + + /** ListBackupVaultsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupVaultsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupVaultsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupVaultsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupVaultsResponse): google.cloud.backupdr.v1.ListBackupVaultsResponse; + + /** + * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. + * @param message ListBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. + * @param message ListBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupVaultsResponse; + + /** + * Decodes a ListBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupVaultsResponse; + + /** + * Verifies a ListBackupVaultsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupVaultsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupVaultsResponse; + + /** + * Creates a plain object from a ListBackupVaultsResponse message. Also converts values to other types if specified. + * @param message ListBackupVaultsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupVaultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupVaultsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupVaultsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchUsableBackupVaultsRequest. */ + interface IFetchUsableBackupVaultsRequest { + + /** FetchUsableBackupVaultsRequest parent */ + parent?: (string|null); + + /** FetchUsableBackupVaultsRequest pageSize */ + pageSize?: (number|null); + + /** FetchUsableBackupVaultsRequest pageToken */ + pageToken?: (string|null); + + /** FetchUsableBackupVaultsRequest filter */ + filter?: (string|null); + + /** FetchUsableBackupVaultsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a FetchUsableBackupVaultsRequest. */ + class FetchUsableBackupVaultsRequest implements IFetchUsableBackupVaultsRequest { + + /** + * Constructs a new FetchUsableBackupVaultsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest); + + /** FetchUsableBackupVaultsRequest parent. */ + public parent: string; + + /** FetchUsableBackupVaultsRequest pageSize. */ + public pageSize: number; + + /** FetchUsableBackupVaultsRequest pageToken. */ + public pageToken: string; + + /** FetchUsableBackupVaultsRequest filter. */ + public filter: string; + + /** FetchUsableBackupVaultsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new FetchUsableBackupVaultsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchUsableBackupVaultsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; + + /** + * Encodes the specified FetchUsableBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. + * @param message FetchUsableBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchUsableBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. + * @param message FetchUsableBackupVaultsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchUsableBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; + + /** + * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchUsableBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; + + /** + * Verifies a FetchUsableBackupVaultsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchUsableBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchUsableBackupVaultsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; + + /** + * Creates a plain object from a FetchUsableBackupVaultsRequest message. Also converts values to other types if specified. + * @param message FetchUsableBackupVaultsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchUsableBackupVaultsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchUsableBackupVaultsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchUsableBackupVaultsResponse. */ + interface IFetchUsableBackupVaultsResponse { + + /** FetchUsableBackupVaultsResponse backupVaults */ + backupVaults?: (google.cloud.backupdr.v1.IBackupVault[]|null); + + /** FetchUsableBackupVaultsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** FetchUsableBackupVaultsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a FetchUsableBackupVaultsResponse. */ + class FetchUsableBackupVaultsResponse implements IFetchUsableBackupVaultsResponse { + + /** + * Constructs a new FetchUsableBackupVaultsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse); + + /** FetchUsableBackupVaultsResponse backupVaults. */ + public backupVaults: google.cloud.backupdr.v1.IBackupVault[]; + + /** FetchUsableBackupVaultsResponse nextPageToken. */ + public nextPageToken: string; + + /** FetchUsableBackupVaultsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new FetchUsableBackupVaultsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchUsableBackupVaultsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; + + /** + * Encodes the specified FetchUsableBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. + * @param message FetchUsableBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchUsableBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. + * @param message FetchUsableBackupVaultsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchUsableBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; + + /** + * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchUsableBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; + + /** + * Verifies a FetchUsableBackupVaultsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchUsableBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchUsableBackupVaultsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; + + /** + * Creates a plain object from a FetchUsableBackupVaultsResponse message. Also converts values to other types if specified. + * @param message FetchUsableBackupVaultsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchUsableBackupVaultsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchUsableBackupVaultsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupVaultRequest. */ + interface IGetBackupVaultRequest { + + /** GetBackupVaultRequest name */ + name?: (string|null); + + /** GetBackupVaultRequest view */ + view?: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView|null); + } + + /** Represents a GetBackupVaultRequest. */ + class GetBackupVaultRequest implements IGetBackupVaultRequest { + + /** + * Constructs a new GetBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetBackupVaultRequest); + + /** GetBackupVaultRequest name. */ + public name: string; + + /** GetBackupVaultRequest view. */ + public view: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView); + + /** + * Creates a new GetBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetBackupVaultRequest): google.cloud.backupdr.v1.GetBackupVaultRequest; + + /** + * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. + * @param message GetBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. + * @param message GetBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupVaultRequest; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupVaultRequest; + + /** + * Verifies a GetBackupVaultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupVaultRequest; + + /** + * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. + * @param message GetBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateBackupVaultRequest. */ + interface IUpdateBackupVaultRequest { + + /** UpdateBackupVaultRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupVaultRequest backupVault */ + backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); + + /** UpdateBackupVaultRequest requestId */ + requestId?: (string|null); + + /** UpdateBackupVaultRequest validateOnly */ + validateOnly?: (boolean|null); + + /** UpdateBackupVaultRequest force */ + force?: (boolean|null); + } + + /** Represents an UpdateBackupVaultRequest. */ + class UpdateBackupVaultRequest implements IUpdateBackupVaultRequest { + + /** + * Constructs a new UpdateBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IUpdateBackupVaultRequest); + + /** UpdateBackupVaultRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupVaultRequest backupVault. */ + public backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); + + /** UpdateBackupVaultRequest requestId. */ + public requestId: string; + + /** UpdateBackupVaultRequest validateOnly. */ + public validateOnly: boolean; + + /** UpdateBackupVaultRequest force. */ + public force: boolean; + + /** + * Creates a new UpdateBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IUpdateBackupVaultRequest): google.cloud.backupdr.v1.UpdateBackupVaultRequest; + + /** + * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. + * @param message UpdateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. + * @param message UpdateBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateBackupVaultRequest; + + /** + * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateBackupVaultRequest; + + /** + * Verifies an UpdateBackupVaultRequest message. + * @param message Plain 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 UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateBackupVaultRequest; + + /** + * Creates a plain object from an UpdateBackupVaultRequest message. Also converts values to other types if specified. + * @param message UpdateBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.UpdateBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupVaultRequest. */ + interface IDeleteBackupVaultRequest { + + /** DeleteBackupVaultRequest name */ + name?: (string|null); + + /** DeleteBackupVaultRequest requestId */ + requestId?: (string|null); + + /** DeleteBackupVaultRequest force */ + force?: (boolean|null); + + /** DeleteBackupVaultRequest etag */ + etag?: (string|null); + + /** DeleteBackupVaultRequest validateOnly */ + validateOnly?: (boolean|null); + + /** DeleteBackupVaultRequest allowMissing */ + allowMissing?: (boolean|null); + } + + /** Represents a DeleteBackupVaultRequest. */ + class DeleteBackupVaultRequest implements IDeleteBackupVaultRequest { + + /** + * Constructs a new DeleteBackupVaultRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupVaultRequest); + + /** DeleteBackupVaultRequest name. */ + public name: string; + + /** DeleteBackupVaultRequest requestId. */ + public requestId: string; + + /** DeleteBackupVaultRequest force. */ + public force: boolean; + + /** DeleteBackupVaultRequest etag. */ + public etag: string; + + /** DeleteBackupVaultRequest validateOnly. */ + public validateOnly: boolean; + + /** DeleteBackupVaultRequest allowMissing. */ + public allowMissing: boolean; + + /** + * Creates a new DeleteBackupVaultRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupVaultRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupVaultRequest): google.cloud.backupdr.v1.DeleteBackupVaultRequest; + + /** + * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. + * @param message DeleteBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. + * @param message DeleteBackupVaultRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupVaultRequest; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupVaultRequest; + + /** + * Verifies a DeleteBackupVaultRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupVaultRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupVaultRequest; + + /** + * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. + * @param message DeleteBackupVaultRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupVaultRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupVaultRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataSourcesRequest. */ + interface IListDataSourcesRequest { + + /** ListDataSourcesRequest parent */ + parent?: (string|null); + + /** ListDataSourcesRequest pageSize */ + pageSize?: (number|null); + + /** ListDataSourcesRequest pageToken */ + pageToken?: (string|null); + + /** ListDataSourcesRequest filter */ + filter?: (string|null); + + /** ListDataSourcesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListDataSourcesRequest. */ + class ListDataSourcesRequest implements IListDataSourcesRequest { + + /** + * Constructs a new ListDataSourcesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListDataSourcesRequest); + + /** ListDataSourcesRequest parent. */ + public parent: string; + + /** ListDataSourcesRequest pageSize. */ + public pageSize: number; + + /** ListDataSourcesRequest pageToken. */ + public pageToken: string; + + /** ListDataSourcesRequest filter. */ + public filter: string; + + /** ListDataSourcesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListDataSourcesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataSourcesRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListDataSourcesRequest): google.cloud.backupdr.v1.ListDataSourcesRequest; + + /** + * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. + * @param message ListDataSourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListDataSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. + * @param message ListDataSourcesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListDataSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataSourcesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListDataSourcesRequest; + + /** + * Decodes a ListDataSourcesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListDataSourcesRequest; + + /** + * Verifies a ListDataSourcesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataSourcesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListDataSourcesRequest; + + /** + * Creates a plain object from a ListDataSourcesRequest message. Also converts values to other types if specified. + * @param message ListDataSourcesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListDataSourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataSourcesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataSourcesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataSourcesResponse. */ + interface IListDataSourcesResponse { + + /** ListDataSourcesResponse dataSources */ + dataSources?: (google.cloud.backupdr.v1.IDataSource[]|null); + + /** ListDataSourcesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListDataSourcesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListDataSourcesResponse. */ + class ListDataSourcesResponse implements IListDataSourcesResponse { + + /** + * Constructs a new ListDataSourcesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListDataSourcesResponse); + + /** ListDataSourcesResponse dataSources. */ + public dataSources: google.cloud.backupdr.v1.IDataSource[]; + + /** ListDataSourcesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListDataSourcesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListDataSourcesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataSourcesResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListDataSourcesResponse): google.cloud.backupdr.v1.ListDataSourcesResponse; + + /** + * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. + * @param message ListDataSourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListDataSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. + * @param message ListDataSourcesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListDataSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataSourcesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListDataSourcesResponse; + + /** + * Decodes a ListDataSourcesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListDataSourcesResponse; + + /** + * Verifies a ListDataSourcesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataSourcesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListDataSourcesResponse; + + /** + * Creates a plain object from a ListDataSourcesResponse message. Also converts values to other types if specified. + * @param message ListDataSourcesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListDataSourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataSourcesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataSourcesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataSourceRequest. */ + interface IGetDataSourceRequest { + + /** GetDataSourceRequest name */ + name?: (string|null); + } + + /** Represents a GetDataSourceRequest. */ + class GetDataSourceRequest implements IGetDataSourceRequest { + + /** + * Constructs a new GetDataSourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetDataSourceRequest); + + /** GetDataSourceRequest name. */ + public name: string; + + /** + * Creates a new GetDataSourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataSourceRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetDataSourceRequest): google.cloud.backupdr.v1.GetDataSourceRequest; + + /** + * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. + * @param message GetDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. + * @param message GetDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataSourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetDataSourceRequest; + + /** + * Decodes a GetDataSourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetDataSourceRequest; + + /** + * Verifies a GetDataSourceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataSourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetDataSourceRequest; + + /** + * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. + * @param message GetDataSourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataSourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataSourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataSourceRequest. */ + interface IUpdateDataSourceRequest { + + /** UpdateDataSourceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataSourceRequest dataSource */ + dataSource?: (google.cloud.backupdr.v1.IDataSource|null); + + /** UpdateDataSourceRequest requestId */ + requestId?: (string|null); + + /** UpdateDataSourceRequest allowMissing */ + allowMissing?: (boolean|null); + } + + /** Represents an UpdateDataSourceRequest. */ + class UpdateDataSourceRequest implements IUpdateDataSourceRequest { + + /** + * Constructs a new UpdateDataSourceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IUpdateDataSourceRequest); + + /** UpdateDataSourceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateDataSourceRequest dataSource. */ + public dataSource?: (google.cloud.backupdr.v1.IDataSource|null); + + /** UpdateDataSourceRequest requestId. */ + public requestId: string; + + /** UpdateDataSourceRequest allowMissing. */ + public allowMissing: boolean; + + /** + * Creates a new UpdateDataSourceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataSourceRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IUpdateDataSourceRequest): google.cloud.backupdr.v1.UpdateDataSourceRequest; + + /** + * Encodes the specified UpdateDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. + * @param message UpdateDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IUpdateDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. + * @param message UpdateDataSourceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateDataSourceRequest; + + /** + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateDataSourceRequest; + + /** + * Verifies an UpdateDataSourceRequest message. + * @param message Plain 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 UpdateDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataSourceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateDataSourceRequest; + + /** + * Creates a plain object from an UpdateDataSourceRequest message. Also converts values to other types if specified. + * @param message UpdateDataSourceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.UpdateDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataSourceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataSourceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupsRequest. */ + interface IListBackupsRequest { + + /** ListBackupsRequest parent */ + parent?: (string|null); + + /** ListBackupsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupsRequest filter */ + filter?: (string|null); + + /** ListBackupsRequest orderBy */ + orderBy?: (string|null); + + /** ListBackupsRequest view */ + view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); + } + + /** Represents a ListBackupsRequest. */ + class ListBackupsRequest implements IListBackupsRequest { + + /** + * Constructs a new ListBackupsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupsRequest); + + /** ListBackupsRequest parent. */ + public parent: string; + + /** ListBackupsRequest pageSize. */ + public pageSize: number; + + /** ListBackupsRequest pageToken. */ + public pageToken: string; + + /** ListBackupsRequest filter. */ + public filter: string; + + /** ListBackupsRequest orderBy. */ + public orderBy: string; + + /** ListBackupsRequest view. */ + public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); + + /** + * Creates a new ListBackupsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupsRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupsRequest): google.cloud.backupdr.v1.ListBackupsRequest; + + /** + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupsRequest; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupsRequest; + + /** + * Verifies a ListBackupsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupsRequest; + + /** + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * @param message ListBackupsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBackupsResponse. */ + interface IListBackupsResponse { + + /** ListBackupsResponse backups */ + backups?: (google.cloud.backupdr.v1.IBackup[]|null); + + /** ListBackupsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListBackupsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListBackupsResponse. */ + class ListBackupsResponse implements IListBackupsResponse { + + /** + * Constructs a new ListBackupsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IListBackupsResponse); + + /** ListBackupsResponse backups. */ + public backups: google.cloud.backupdr.v1.IBackup[]; + + /** ListBackupsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListBackupsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListBackupsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBackupsResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IListBackupsResponse): google.cloud.backupdr.v1.ListBackupsResponse; + + /** + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupsResponse; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupsResponse; + + /** + * Verifies a ListBackupsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBackupsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupsResponse; + + /** + * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. + * @param message ListBackupsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ListBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBackupsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBackupsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetBackupRequest. */ + interface IGetBackupRequest { + + /** GetBackupRequest name */ + name?: (string|null); + + /** GetBackupRequest view */ + view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); + } + + /** Represents a GetBackupRequest. */ + class GetBackupRequest implements IGetBackupRequest { + + /** + * Constructs a new GetBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGetBackupRequest); + + /** GetBackupRequest name. */ + public name: string; + + /** GetBackupRequest view. */ + public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); + + /** + * Creates a new GetBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGetBackupRequest): google.cloud.backupdr.v1.GetBackupRequest; + + /** + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupRequest; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupRequest; + + /** + * Verifies a GetBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupRequest; + + /** + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * @param message GetBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GetBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateBackupRequest. */ + interface IUpdateBackupRequest { + + /** UpdateBackupRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupRequest backup */ + backup?: (google.cloud.backupdr.v1.IBackup|null); + + /** UpdateBackupRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateBackupRequest. */ + class UpdateBackupRequest implements IUpdateBackupRequest { + + /** + * Constructs a new UpdateBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IUpdateBackupRequest); + + /** UpdateBackupRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateBackupRequest backup. */ + public backup?: (google.cloud.backupdr.v1.IBackup|null); + + /** UpdateBackupRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IUpdateBackupRequest): google.cloud.backupdr.v1.UpdateBackupRequest; + + /** + * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * @param message UpdateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * @param message UpdateBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateBackupRequest; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateBackupRequest; + + /** + * Verifies an UpdateBackupRequest message. + * @param message Plain 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 UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateBackupRequest; + + /** + * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. + * @param message UpdateBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.UpdateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteBackupRequest. */ + interface IDeleteBackupRequest { + + /** DeleteBackupRequest name */ + name?: (string|null); + + /** DeleteBackupRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteBackupRequest. */ + class DeleteBackupRequest implements IDeleteBackupRequest { + + /** + * Constructs a new DeleteBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupRequest); + + /** DeleteBackupRequest name. */ + public name: string; + + /** DeleteBackupRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupRequest): google.cloud.backupdr.v1.DeleteBackupRequest; + + /** + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupRequest; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupRequest; + + /** + * Verifies a DeleteBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupRequest; + + /** + * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. + * @param message DeleteBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DeleteBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestoreBackupRequest. */ + interface IRestoreBackupRequest { + + /** RestoreBackupRequest name */ + name?: (string|null); + + /** RestoreBackupRequest requestId */ + requestId?: (string|null); + + /** RestoreBackupRequest computeInstanceTargetEnvironment */ + computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null); + + /** RestoreBackupRequest computeInstanceRestoreProperties */ + computeInstanceRestoreProperties?: (google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null); + } + + /** Represents a RestoreBackupRequest. */ + class RestoreBackupRequest implements IRestoreBackupRequest { + + /** + * Constructs a new RestoreBackupRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IRestoreBackupRequest); + + /** RestoreBackupRequest name. */ + public name: string; + + /** RestoreBackupRequest requestId. */ + public requestId: string; + + /** RestoreBackupRequest computeInstanceTargetEnvironment. */ + public computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null); + + /** RestoreBackupRequest computeInstanceRestoreProperties. */ + public computeInstanceRestoreProperties?: (google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null); + + /** RestoreBackupRequest targetEnvironment. */ + public targetEnvironment?: "computeInstanceTargetEnvironment"; + + /** RestoreBackupRequest instanceProperties. */ + public instanceProperties?: "computeInstanceRestoreProperties"; + + /** + * Creates a new RestoreBackupRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreBackupRequest instance + */ + public static create(properties?: google.cloud.backupdr.v1.IRestoreBackupRequest): google.cloud.backupdr.v1.RestoreBackupRequest; + + /** + * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * @param message RestoreBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * @param message RestoreBackupRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreBackupRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RestoreBackupRequest; + + /** + * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RestoreBackupRequest; + + /** + * Verifies a RestoreBackupRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreBackupRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RestoreBackupRequest; + + /** + * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. + * @param message RestoreBackupRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.RestoreBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreBackupRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreBackupRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestoreBackupResponse. */ + interface IRestoreBackupResponse { + + /** RestoreBackupResponse targetResource */ + targetResource?: (google.cloud.backupdr.v1.ITargetResource|null); + } + + /** Represents a RestoreBackupResponse. */ + class RestoreBackupResponse implements IRestoreBackupResponse { + + /** + * Constructs a new RestoreBackupResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IRestoreBackupResponse); + + /** RestoreBackupResponse targetResource. */ + public targetResource?: (google.cloud.backupdr.v1.ITargetResource|null); + + /** + * Creates a new RestoreBackupResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreBackupResponse instance + */ + public static create(properties?: google.cloud.backupdr.v1.IRestoreBackupResponse): google.cloud.backupdr.v1.RestoreBackupResponse; + + /** + * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * @param message RestoreBackupResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * @param message RestoreBackupResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreBackupResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RestoreBackupResponse; + + /** + * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RestoreBackupResponse; + + /** + * Verifies a RestoreBackupResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreBackupResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RestoreBackupResponse; + + /** + * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. + * @param message RestoreBackupResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.RestoreBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreBackupResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreBackupResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TargetResource. */ + interface ITargetResource { + + /** TargetResource gcpResource */ + gcpResource?: (google.cloud.backupdr.v1.IGcpResource|null); + } + + /** Represents a TargetResource. */ + class TargetResource implements ITargetResource { + + /** + * Constructs a new TargetResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ITargetResource); + + /** TargetResource gcpResource. */ + public gcpResource?: (google.cloud.backupdr.v1.IGcpResource|null); + + /** TargetResource targetResourceInfo. */ + public targetResourceInfo?: "gcpResource"; + + /** + * Creates a new TargetResource instance using the specified properties. + * @param [properties] Properties to set + * @returns TargetResource instance + */ + public static create(properties?: google.cloud.backupdr.v1.ITargetResource): google.cloud.backupdr.v1.TargetResource; + + /** + * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * @param message TargetResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * @param message TargetResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TargetResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TargetResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.TargetResource; + + /** + * Decodes a TargetResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TargetResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.TargetResource; + + /** + * Verifies a TargetResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TargetResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.TargetResource; + + /** + * Creates a plain object from a TargetResource message. Also converts values to other types if specified. + * @param message TargetResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.TargetResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TargetResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GcpResource. */ + interface IGcpResource { + + /** GcpResource gcpResourcename */ + gcpResourcename?: (string|null); + + /** GcpResource location */ + location?: (string|null); + + /** GcpResource type */ + type?: (string|null); + } + + /** Represents a GcpResource. */ + class GcpResource implements IGcpResource { + + /** + * Constructs a new GcpResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGcpResource); + + /** GcpResource gcpResourcename. */ + public gcpResourcename: string; + + /** GcpResource location. */ + public location: string; + + /** GcpResource type. */ + public type: string; + + /** + * Creates a new GcpResource instance using the specified properties. + * @param [properties] Properties to set + * @returns GcpResource instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGcpResource): google.cloud.backupdr.v1.GcpResource; + + /** + * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * @param message GcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * @param message GcpResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcpResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GcpResource; + + /** + * Decodes a GcpResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GcpResource; + + /** + * Verifies a GcpResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcpResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GcpResource; + + /** + * Creates a plain object from a GcpResource message. Also converts values to other types if specified. + * @param message GcpResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcpResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcpResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** BackupConfigState enum. */ + enum BackupConfigState { + BACKUP_CONFIG_STATE_UNSPECIFIED = 0, + ACTIVE = 1, + PASSIVE = 2 + } + + /** BackupView enum. */ + enum BackupView { + BACKUP_VIEW_UNSPECIFIED = 0, + BACKUP_VIEW_BASIC = 1, + BACKUP_VIEW_FULL = 2 + } + + /** BackupVaultView enum. */ + enum BackupVaultView { + BACKUP_VAULT_VIEW_UNSPECIFIED = 0, + BACKUP_VAULT_VIEW_BASIC = 1, + BACKUP_VAULT_VIEW_FULL = 2 + } + + /** Properties of a BackupApplianceBackupProperties. */ + interface IBackupApplianceBackupProperties { + + /** BackupApplianceBackupProperties generationId */ + generationId?: (number|null); + + /** BackupApplianceBackupProperties finalizeTime */ + finalizeTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeStartTime */ + recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeEndTime */ + recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a BackupApplianceBackupProperties. */ + class BackupApplianceBackupProperties implements IBackupApplianceBackupProperties { + + /** + * Constructs a new BackupApplianceBackupProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupProperties); + + /** BackupApplianceBackupProperties generationId. */ + public generationId?: (number|null); + + /** BackupApplianceBackupProperties finalizeTime. */ + public finalizeTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeStartTime. */ + public recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeEndTime. */ + public recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties _generationId. */ + public _generationId?: "generationId"; + + /** BackupApplianceBackupProperties _finalizeTime. */ + public _finalizeTime?: "finalizeTime"; + + /** BackupApplianceBackupProperties _recoveryRangeStartTime. */ + public _recoveryRangeStartTime?: "recoveryRangeStartTime"; + + /** BackupApplianceBackupProperties _recoveryRangeEndTime. */ + public _recoveryRangeEndTime?: "recoveryRangeEndTime"; + + /** + * Creates a new BackupApplianceBackupProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns BackupApplianceBackupProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupProperties): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + + /** + * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * @param message BackupApplianceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * @param message BackupApplianceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BackupApplianceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + + /** + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BackupApplianceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + + /** + * Verifies a BackupApplianceBackupProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BackupApplianceBackupProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + + /** + * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. + * @param message BackupApplianceBackupProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.BackupApplianceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BackupApplianceBackupProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BackupApplianceBackupProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ComputeInstanceBackupProperties. */ + interface IComputeInstanceBackupProperties { + + /** ComputeInstanceBackupProperties description */ + description?: (string|null); + + /** ComputeInstanceBackupProperties tags */ + tags?: (google.cloud.backupdr.v1.ITags|null); + + /** ComputeInstanceBackupProperties machineType */ + machineType?: (string|null); + + /** ComputeInstanceBackupProperties canIpForward */ + canIpForward?: (boolean|null); + + /** ComputeInstanceBackupProperties networkInterface */ + networkInterface?: (google.cloud.backupdr.v1.INetworkInterface[]|null); + + /** ComputeInstanceBackupProperties disk */ + disk?: (google.cloud.backupdr.v1.IAttachedDisk[]|null); + + /** ComputeInstanceBackupProperties metadata */ + metadata?: (google.cloud.backupdr.v1.IMetadata|null); + + /** ComputeInstanceBackupProperties serviceAccount */ + serviceAccount?: (google.cloud.backupdr.v1.IServiceAccount[]|null); + + /** ComputeInstanceBackupProperties scheduling */ + scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + + /** ComputeInstanceBackupProperties guestAccelerator */ + guestAccelerator?: (google.cloud.backupdr.v1.IAcceleratorConfig[]|null); + + /** ComputeInstanceBackupProperties minCpuPlatform */ + minCpuPlatform?: (string|null); + + /** ComputeInstanceBackupProperties keyRevocationActionType */ + keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + + /** ComputeInstanceBackupProperties sourceInstance */ + sourceInstance?: (string|null); + + /** ComputeInstanceBackupProperties labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a ComputeInstanceBackupProperties. */ + class ComputeInstanceBackupProperties implements IComputeInstanceBackupProperties { + + /** + * Constructs a new ComputeInstanceBackupProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceBackupProperties); + + /** ComputeInstanceBackupProperties description. */ + public description?: (string|null); + + /** ComputeInstanceBackupProperties tags. */ + public tags?: (google.cloud.backupdr.v1.ITags|null); + + /** ComputeInstanceBackupProperties machineType. */ + public machineType?: (string|null); + + /** ComputeInstanceBackupProperties canIpForward. */ + public canIpForward?: (boolean|null); + + /** ComputeInstanceBackupProperties networkInterface. */ + public networkInterface: google.cloud.backupdr.v1.INetworkInterface[]; + + /** ComputeInstanceBackupProperties disk. */ + public disk: google.cloud.backupdr.v1.IAttachedDisk[]; + + /** ComputeInstanceBackupProperties metadata. */ + public metadata?: (google.cloud.backupdr.v1.IMetadata|null); + + /** ComputeInstanceBackupProperties serviceAccount. */ + public serviceAccount: google.cloud.backupdr.v1.IServiceAccount[]; + + /** ComputeInstanceBackupProperties scheduling. */ + public scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + + /** ComputeInstanceBackupProperties guestAccelerator. */ + public guestAccelerator: google.cloud.backupdr.v1.IAcceleratorConfig[]; + + /** ComputeInstanceBackupProperties minCpuPlatform. */ + public minCpuPlatform?: (string|null); + + /** ComputeInstanceBackupProperties keyRevocationActionType. */ + public keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + + /** ComputeInstanceBackupProperties sourceInstance. */ + public sourceInstance?: (string|null); + + /** ComputeInstanceBackupProperties labels. */ + public labels: { [k: string]: string }; + + /** ComputeInstanceBackupProperties _description. */ + public _description?: "description"; + + /** ComputeInstanceBackupProperties _tags. */ + public _tags?: "tags"; + + /** ComputeInstanceBackupProperties _machineType. */ + public _machineType?: "machineType"; + + /** ComputeInstanceBackupProperties _canIpForward. */ + public _canIpForward?: "canIpForward"; + + /** ComputeInstanceBackupProperties _metadata. */ + public _metadata?: "metadata"; + + /** ComputeInstanceBackupProperties _scheduling. */ + public _scheduling?: "scheduling"; + + /** ComputeInstanceBackupProperties _minCpuPlatform. */ + public _minCpuPlatform?: "minCpuPlatform"; + + /** ComputeInstanceBackupProperties _keyRevocationActionType. */ + public _keyRevocationActionType?: "keyRevocationActionType"; + + /** ComputeInstanceBackupProperties _sourceInstance. */ + public _sourceInstance?: "sourceInstance"; + + /** + * Creates a new ComputeInstanceBackupProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceBackupProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceBackupProperties): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + + /** + * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * @param message ComputeInstanceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * @param message ComputeInstanceBackupProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + + /** + * Verifies a ComputeInstanceBackupProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceBackupProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + + /** + * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceBackupProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceBackupProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceBackupProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ComputeInstanceRestoreProperties. */ + interface IComputeInstanceRestoreProperties { + + /** ComputeInstanceRestoreProperties name */ + name?: (string|null); + + /** ComputeInstanceRestoreProperties advancedMachineFeatures */ + advancedMachineFeatures?: (google.cloud.backupdr.v1.IAdvancedMachineFeatures|null); + + /** ComputeInstanceRestoreProperties canIpForward */ + canIpForward?: (boolean|null); + + /** ComputeInstanceRestoreProperties confidentialInstanceConfig */ + confidentialInstanceConfig?: (google.cloud.backupdr.v1.IConfidentialInstanceConfig|null); + + /** ComputeInstanceRestoreProperties deletionProtection */ + deletionProtection?: (boolean|null); + + /** ComputeInstanceRestoreProperties description */ + description?: (string|null); + + /** ComputeInstanceRestoreProperties disks */ + disks?: (google.cloud.backupdr.v1.IAttachedDisk[]|null); + + /** ComputeInstanceRestoreProperties displayDevice */ + displayDevice?: (google.cloud.backupdr.v1.IDisplayDevice|null); + + /** ComputeInstanceRestoreProperties guestAccelerators */ + guestAccelerators?: (google.cloud.backupdr.v1.IAcceleratorConfig[]|null); + + /** ComputeInstanceRestoreProperties hostname */ + hostname?: (string|null); + + /** ComputeInstanceRestoreProperties instanceEncryptionKey */ + instanceEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** ComputeInstanceRestoreProperties keyRevocationActionType */ + keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + + /** ComputeInstanceRestoreProperties labels */ + labels?: ({ [k: string]: string }|null); + + /** ComputeInstanceRestoreProperties machineType */ + machineType?: (string|null); + + /** ComputeInstanceRestoreProperties metadata */ + metadata?: (google.cloud.backupdr.v1.IMetadata|null); + + /** ComputeInstanceRestoreProperties minCpuPlatform */ + minCpuPlatform?: (string|null); + + /** ComputeInstanceRestoreProperties networkInterfaces */ + networkInterfaces?: (google.cloud.backupdr.v1.INetworkInterface[]|null); + + /** ComputeInstanceRestoreProperties networkPerformanceConfig */ + networkPerformanceConfig?: (google.cloud.backupdr.v1.INetworkPerformanceConfig|null); + + /** ComputeInstanceRestoreProperties params */ + params?: (google.cloud.backupdr.v1.IInstanceParams|null); + + /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess */ + privateIpv6GoogleAccess?: (google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); + + /** ComputeInstanceRestoreProperties allocationAffinity */ + allocationAffinity?: (google.cloud.backupdr.v1.IAllocationAffinity|null); + + /** ComputeInstanceRestoreProperties resourcePolicies */ + resourcePolicies?: (string[]|null); + + /** ComputeInstanceRestoreProperties scheduling */ + scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + + /** ComputeInstanceRestoreProperties serviceAccounts */ + serviceAccounts?: (google.cloud.backupdr.v1.IServiceAccount[]|null); + + /** ComputeInstanceRestoreProperties tags */ + tags?: (google.cloud.backupdr.v1.ITags|null); + } + + /** Represents a ComputeInstanceRestoreProperties. */ + class ComputeInstanceRestoreProperties implements IComputeInstanceRestoreProperties { + + /** + * Constructs a new ComputeInstanceRestoreProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties); + + /** ComputeInstanceRestoreProperties name. */ + public name?: (string|null); + + /** ComputeInstanceRestoreProperties advancedMachineFeatures. */ + public advancedMachineFeatures?: (google.cloud.backupdr.v1.IAdvancedMachineFeatures|null); + + /** ComputeInstanceRestoreProperties canIpForward. */ + public canIpForward?: (boolean|null); + + /** ComputeInstanceRestoreProperties confidentialInstanceConfig. */ + public confidentialInstanceConfig?: (google.cloud.backupdr.v1.IConfidentialInstanceConfig|null); + + /** ComputeInstanceRestoreProperties deletionProtection. */ + public deletionProtection?: (boolean|null); + + /** ComputeInstanceRestoreProperties description. */ + public description?: (string|null); + + /** ComputeInstanceRestoreProperties disks. */ + public disks: google.cloud.backupdr.v1.IAttachedDisk[]; + + /** ComputeInstanceRestoreProperties displayDevice. */ + public displayDevice?: (google.cloud.backupdr.v1.IDisplayDevice|null); + + /** ComputeInstanceRestoreProperties guestAccelerators. */ + public guestAccelerators: google.cloud.backupdr.v1.IAcceleratorConfig[]; + + /** ComputeInstanceRestoreProperties hostname. */ + public hostname?: (string|null); + + /** ComputeInstanceRestoreProperties instanceEncryptionKey. */ + public instanceEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** ComputeInstanceRestoreProperties keyRevocationActionType. */ + public keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + + /** ComputeInstanceRestoreProperties labels. */ + public labels: { [k: string]: string }; + + /** ComputeInstanceRestoreProperties machineType. */ + public machineType?: (string|null); + + /** ComputeInstanceRestoreProperties metadata. */ + public metadata?: (google.cloud.backupdr.v1.IMetadata|null); + + /** ComputeInstanceRestoreProperties minCpuPlatform. */ + public minCpuPlatform?: (string|null); + + /** ComputeInstanceRestoreProperties networkInterfaces. */ + public networkInterfaces: google.cloud.backupdr.v1.INetworkInterface[]; + + /** ComputeInstanceRestoreProperties networkPerformanceConfig. */ + public networkPerformanceConfig?: (google.cloud.backupdr.v1.INetworkPerformanceConfig|null); + + /** ComputeInstanceRestoreProperties params. */ + public params?: (google.cloud.backupdr.v1.IInstanceParams|null); + + /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess. */ + public privateIpv6GoogleAccess?: (google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); + + /** ComputeInstanceRestoreProperties allocationAffinity. */ + public allocationAffinity?: (google.cloud.backupdr.v1.IAllocationAffinity|null); + + /** ComputeInstanceRestoreProperties resourcePolicies. */ + public resourcePolicies: string[]; + + /** ComputeInstanceRestoreProperties scheduling. */ + public scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + + /** ComputeInstanceRestoreProperties serviceAccounts. */ + public serviceAccounts: google.cloud.backupdr.v1.IServiceAccount[]; + + /** ComputeInstanceRestoreProperties tags. */ + public tags?: (google.cloud.backupdr.v1.ITags|null); + + /** ComputeInstanceRestoreProperties _name. */ + public _name?: "name"; + + /** ComputeInstanceRestoreProperties _advancedMachineFeatures. */ + public _advancedMachineFeatures?: "advancedMachineFeatures"; + + /** ComputeInstanceRestoreProperties _canIpForward. */ + public _canIpForward?: "canIpForward"; + + /** ComputeInstanceRestoreProperties _confidentialInstanceConfig. */ + public _confidentialInstanceConfig?: "confidentialInstanceConfig"; + + /** ComputeInstanceRestoreProperties _deletionProtection. */ + public _deletionProtection?: "deletionProtection"; + + /** ComputeInstanceRestoreProperties _description. */ + public _description?: "description"; + + /** ComputeInstanceRestoreProperties _displayDevice. */ + public _displayDevice?: "displayDevice"; + + /** ComputeInstanceRestoreProperties _hostname. */ + public _hostname?: "hostname"; + + /** ComputeInstanceRestoreProperties _instanceEncryptionKey. */ + public _instanceEncryptionKey?: "instanceEncryptionKey"; + + /** ComputeInstanceRestoreProperties _keyRevocationActionType. */ + public _keyRevocationActionType?: "keyRevocationActionType"; + + /** ComputeInstanceRestoreProperties _machineType. */ + public _machineType?: "machineType"; + + /** ComputeInstanceRestoreProperties _metadata. */ + public _metadata?: "metadata"; + + /** ComputeInstanceRestoreProperties _minCpuPlatform. */ + public _minCpuPlatform?: "minCpuPlatform"; + + /** ComputeInstanceRestoreProperties _networkPerformanceConfig. */ + public _networkPerformanceConfig?: "networkPerformanceConfig"; + + /** ComputeInstanceRestoreProperties _params. */ + public _params?: "params"; + + /** ComputeInstanceRestoreProperties _privateIpv6GoogleAccess. */ + public _privateIpv6GoogleAccess?: "privateIpv6GoogleAccess"; + + /** ComputeInstanceRestoreProperties _allocationAffinity. */ + public _allocationAffinity?: "allocationAffinity"; + + /** ComputeInstanceRestoreProperties _scheduling. */ + public _scheduling?: "scheduling"; + + /** ComputeInstanceRestoreProperties _tags. */ + public _tags?: "tags"; + + /** + * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceRestoreProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * @param message ComputeInstanceRestoreProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * @param message ComputeInstanceRestoreProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceRestoreProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + + /** + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceRestoreProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + + /** + * Verifies a ComputeInstanceRestoreProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceRestoreProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + + /** + * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceRestoreProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceRestoreProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceRestoreProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceRestoreProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ComputeInstanceRestoreProperties { + + /** InstancePrivateIpv6GoogleAccess enum. */ + enum InstancePrivateIpv6GoogleAccess { + INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0, + INHERIT_FROM_SUBNETWORK = 1, + ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2, + ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3 + } + } + + /** Properties of a ComputeInstanceTargetEnvironment. */ + interface IComputeInstanceTargetEnvironment { + + /** ComputeInstanceTargetEnvironment project */ + project?: (string|null); + + /** ComputeInstanceTargetEnvironment zone */ + zone?: (string|null); + } + + /** Represents a ComputeInstanceTargetEnvironment. */ + class ComputeInstanceTargetEnvironment implements IComputeInstanceTargetEnvironment { + + /** + * Constructs a new ComputeInstanceTargetEnvironment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment); + + /** ComputeInstanceTargetEnvironment project. */ + public project: string; + + /** ComputeInstanceTargetEnvironment zone. */ + public zone: string; + + /** + * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceTargetEnvironment instance + */ + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + + /** + * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @param message ComputeInstanceTargetEnvironment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @param message ComputeInstanceTargetEnvironment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceTargetEnvironment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + + /** + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceTargetEnvironment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + + /** + * Verifies a ComputeInstanceTargetEnvironment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceTargetEnvironment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + + /** + * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. + * @param message ComputeInstanceTargetEnvironment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceTargetEnvironment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceTargetEnvironment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ComputeInstanceDataSourceProperties. */ + interface IComputeInstanceDataSourceProperties { + + /** ComputeInstanceDataSourceProperties name */ + name?: (string|null); + + /** ComputeInstanceDataSourceProperties description */ + description?: (string|null); + + /** ComputeInstanceDataSourceProperties machineType */ + machineType?: (string|null); + + /** ComputeInstanceDataSourceProperties totalDiskCount */ + totalDiskCount?: (number|Long|string|null); + + /** ComputeInstanceDataSourceProperties totalDiskSizeGb */ + totalDiskSizeGb?: (number|Long|string|null); + } + + /** Represents a ComputeInstanceDataSourceProperties. */ + class ComputeInstanceDataSourceProperties implements IComputeInstanceDataSourceProperties { + + /** + * Constructs a new ComputeInstanceDataSourceProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties); + + /** ComputeInstanceDataSourceProperties name. */ + public name: string; + + /** ComputeInstanceDataSourceProperties description. */ + public description: string; + + /** ComputeInstanceDataSourceProperties machineType. */ + public machineType: string; + + /** ComputeInstanceDataSourceProperties totalDiskCount. */ + public totalDiskCount: (number|Long|string); + + /** ComputeInstanceDataSourceProperties totalDiskSizeGb. */ + public totalDiskSizeGb: (number|Long|string); + + /** + * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceDataSourceProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + + /** + * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @param message ComputeInstanceDataSourceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @param message ComputeInstanceDataSourceProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComputeInstanceDataSourceProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + + /** + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComputeInstanceDataSourceProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + + /** + * Verifies a ComputeInstanceDataSourceProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComputeInstanceDataSourceProperties + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + + /** + * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceDataSourceProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComputeInstanceDataSourceProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComputeInstanceDataSourceProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdvancedMachineFeatures. */ + interface IAdvancedMachineFeatures { + + /** AdvancedMachineFeatures enableNestedVirtualization */ + enableNestedVirtualization?: (boolean|null); + + /** AdvancedMachineFeatures threadsPerCore */ + threadsPerCore?: (number|null); + + /** AdvancedMachineFeatures visibleCoreCount */ + visibleCoreCount?: (number|null); + + /** AdvancedMachineFeatures enableUefiNetworking */ + enableUefiNetworking?: (boolean|null); + } + + /** Represents an AdvancedMachineFeatures. */ + class AdvancedMachineFeatures implements IAdvancedMachineFeatures { + + /** + * Constructs a new AdvancedMachineFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAdvancedMachineFeatures); + + /** AdvancedMachineFeatures enableNestedVirtualization. */ + public enableNestedVirtualization?: (boolean|null); + + /** AdvancedMachineFeatures threadsPerCore. */ + public threadsPerCore?: (number|null); + + /** AdvancedMachineFeatures visibleCoreCount. */ + public visibleCoreCount?: (number|null); + + /** AdvancedMachineFeatures enableUefiNetworking. */ + public enableUefiNetworking?: (boolean|null); + + /** AdvancedMachineFeatures _enableNestedVirtualization. */ + public _enableNestedVirtualization?: "enableNestedVirtualization"; + + /** AdvancedMachineFeatures _threadsPerCore. */ + public _threadsPerCore?: "threadsPerCore"; + + /** AdvancedMachineFeatures _visibleCoreCount. */ + public _visibleCoreCount?: "visibleCoreCount"; + + /** AdvancedMachineFeatures _enableUefiNetworking. */ + public _enableUefiNetworking?: "enableUefiNetworking"; + + /** + * Creates a new AdvancedMachineFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns AdvancedMachineFeatures instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAdvancedMachineFeatures): google.cloud.backupdr.v1.AdvancedMachineFeatures; + + /** + * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @param message AdvancedMachineFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @param message AdvancedMachineFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AdvancedMachineFeatures; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AdvancedMachineFeatures; + + /** + * Verifies an AdvancedMachineFeatures message. + * @param message Plain 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 AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdvancedMachineFeatures + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AdvancedMachineFeatures; + + /** + * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. + * @param message AdvancedMachineFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AdvancedMachineFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdvancedMachineFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdvancedMachineFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConfidentialInstanceConfig. */ + interface IConfidentialInstanceConfig { + + /** ConfidentialInstanceConfig enableConfidentialCompute */ + enableConfidentialCompute?: (boolean|null); + } + + /** Represents a ConfidentialInstanceConfig. */ + class ConfidentialInstanceConfig implements IConfidentialInstanceConfig { + + /** + * Constructs a new ConfidentialInstanceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IConfidentialInstanceConfig); + + /** ConfidentialInstanceConfig enableConfidentialCompute. */ + public enableConfidentialCompute?: (boolean|null); + + /** ConfidentialInstanceConfig _enableConfidentialCompute. */ + public _enableConfidentialCompute?: "enableConfidentialCompute"; + + /** + * Creates a new ConfidentialInstanceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ConfidentialInstanceConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IConfidentialInstanceConfig): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + + /** + * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * @param message ConfidentialInstanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * @param message ConfidentialInstanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConfidentialInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + + /** + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConfidentialInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + + /** + * Verifies a ConfidentialInstanceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConfidentialInstanceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + + /** + * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. + * @param message ConfidentialInstanceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ConfidentialInstanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConfidentialInstanceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConfidentialInstanceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DisplayDevice. */ + interface IDisplayDevice { + + /** DisplayDevice enableDisplay */ + enableDisplay?: (boolean|null); + } + + /** Represents a DisplayDevice. */ + class DisplayDevice implements IDisplayDevice { + + /** + * Constructs a new DisplayDevice. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IDisplayDevice); + + /** DisplayDevice enableDisplay. */ + public enableDisplay?: (boolean|null); + + /** DisplayDevice _enableDisplay. */ + public _enableDisplay?: "enableDisplay"; + + /** + * Creates a new DisplayDevice instance using the specified properties. + * @param [properties] Properties to set + * @returns DisplayDevice instance + */ + public static create(properties?: google.cloud.backupdr.v1.IDisplayDevice): google.cloud.backupdr.v1.DisplayDevice; + + /** + * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @param message DisplayDevice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @param message DisplayDevice message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DisplayDevice message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DisplayDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DisplayDevice; + + /** + * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DisplayDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DisplayDevice; + + /** + * Verifies a DisplayDevice message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DisplayDevice + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DisplayDevice; + + /** + * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. + * @param message DisplayDevice + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.DisplayDevice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DisplayDevice to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DisplayDevice + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcceleratorConfig. */ + interface IAcceleratorConfig { + + /** AcceleratorConfig acceleratorType */ + acceleratorType?: (string|null); + + /** AcceleratorConfig acceleratorCount */ + acceleratorCount?: (number|null); + } + + /** Represents an AcceleratorConfig. */ + class AcceleratorConfig implements IAcceleratorConfig { + + /** + * Constructs a new AcceleratorConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAcceleratorConfig); + + /** AcceleratorConfig acceleratorType. */ + public acceleratorType?: (string|null); + + /** AcceleratorConfig acceleratorCount. */ + public acceleratorCount?: (number|null); + + /** AcceleratorConfig _acceleratorType. */ + public _acceleratorType?: "acceleratorType"; + + /** AcceleratorConfig _acceleratorCount. */ + public _acceleratorCount?: "acceleratorCount"; + + /** + * Creates a new AcceleratorConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AcceleratorConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAcceleratorConfig): google.cloud.backupdr.v1.AcceleratorConfig; + + /** + * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * @param message AcceleratorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * @param message AcceleratorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AcceleratorConfig; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AcceleratorConfig; + + /** + * Verifies an AcceleratorConfig message. + * @param message Plain 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 AcceleratorConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcceleratorConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AcceleratorConfig; + + /** + * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. + * @param message AcceleratorConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AcceleratorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcceleratorConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcceleratorConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomerEncryptionKey. */ + interface ICustomerEncryptionKey { + + /** CustomerEncryptionKey rawKey */ + rawKey?: (string|null); + + /** CustomerEncryptionKey rsaEncryptedKey */ + rsaEncryptedKey?: (string|null); + + /** CustomerEncryptionKey kmsKeyName */ + kmsKeyName?: (string|null); + + /** CustomerEncryptionKey kmsKeyServiceAccount */ + kmsKeyServiceAccount?: (string|null); + } + + /** Represents a CustomerEncryptionKey. */ + class CustomerEncryptionKey implements ICustomerEncryptionKey { + + /** + * Constructs a new CustomerEncryptionKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICustomerEncryptionKey); + + /** CustomerEncryptionKey rawKey. */ + public rawKey?: (string|null); + + /** CustomerEncryptionKey rsaEncryptedKey. */ + public rsaEncryptedKey?: (string|null); + + /** CustomerEncryptionKey kmsKeyName. */ + public kmsKeyName?: (string|null); + + /** CustomerEncryptionKey kmsKeyServiceAccount. */ + public kmsKeyServiceAccount?: (string|null); + + /** CustomerEncryptionKey key. */ + public key?: ("rawKey"|"rsaEncryptedKey"|"kmsKeyName"); + + /** CustomerEncryptionKey _kmsKeyServiceAccount. */ + public _kmsKeyServiceAccount?: "kmsKeyServiceAccount"; + + /** + * Creates a new CustomerEncryptionKey instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomerEncryptionKey instance + */ + public static create(properties?: google.cloud.backupdr.v1.ICustomerEncryptionKey): google.cloud.backupdr.v1.CustomerEncryptionKey; + + /** + * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @param message CustomerEncryptionKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @param message CustomerEncryptionKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomerEncryptionKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomerEncryptionKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CustomerEncryptionKey; + + /** + * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomerEncryptionKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CustomerEncryptionKey; + + /** + * Verifies a CustomerEncryptionKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomerEncryptionKey + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CustomerEncryptionKey; + + /** + * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. + * @param message CustomerEncryptionKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.CustomerEncryptionKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomerEncryptionKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomerEncryptionKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Entry. */ + interface IEntry { + + /** Entry key */ + key?: (string|null); + + /** Entry value */ + value?: (string|null); + } + + /** Represents an Entry. */ + class Entry implements IEntry { + + /** + * Constructs a new Entry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IEntry); + + /** Entry key. */ + public key?: (string|null); + + /** Entry value. */ + public value?: (string|null); + + /** Entry _key. */ + public _key?: "key"; + + /** Entry _value. */ + public _value?: "value"; + + /** + * Creates a new Entry instance using the specified properties. + * @param [properties] Properties to set + * @returns Entry instance + */ + public static create(properties?: google.cloud.backupdr.v1.IEntry): google.cloud.backupdr.v1.Entry; + + /** + * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Entry; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Entry; + + /** + * Verifies an Entry message. + * @param message Plain 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 Entry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Entry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Entry; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @param message Entry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Entry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Entry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Metadata. */ + interface IMetadata { + + /** Metadata items */ + items?: (google.cloud.backupdr.v1.IEntry[]|null); + } + + /** Represents a Metadata. */ + class Metadata implements IMetadata { + + /** + * Constructs a new Metadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IMetadata); + + /** Metadata items. */ + public items: google.cloud.backupdr.v1.IEntry[]; + + /** + * Creates a new Metadata instance using the specified properties. + * @param [properties] Properties to set + * @returns Metadata instance + */ + public static create(properties?: google.cloud.backupdr.v1.IMetadata): google.cloud.backupdr.v1.Metadata; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Metadata; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Metadata; + + /** + * Verifies a Metadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Metadata; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @param message Metadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkInterface. */ + interface INetworkInterface { + + /** NetworkInterface network */ + network?: (string|null); + + /** NetworkInterface subnetwork */ + subnetwork?: (string|null); + + /** NetworkInterface ipAddress */ + ipAddress?: (string|null); + + /** NetworkInterface ipv6Address */ + ipv6Address?: (string|null); + + /** NetworkInterface internalIpv6PrefixLength */ + internalIpv6PrefixLength?: (number|null); + + /** NetworkInterface name */ + name?: (string|null); + + /** NetworkInterface accessConfigs */ + accessConfigs?: (google.cloud.backupdr.v1.IAccessConfig[]|null); + + /** NetworkInterface ipv6AccessConfigs */ + ipv6AccessConfigs?: (google.cloud.backupdr.v1.IAccessConfig[]|null); + + /** NetworkInterface aliasIpRanges */ + aliasIpRanges?: (google.cloud.backupdr.v1.IAliasIpRange[]|null); + + /** NetworkInterface stackType */ + stackType?: (google.cloud.backupdr.v1.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.StackType|null); + + /** NetworkInterface ipv6AccessType */ + ipv6AccessType?: (google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null); + + /** NetworkInterface queueCount */ + queueCount?: (number|null); + + /** NetworkInterface nicType */ + nicType?: (google.cloud.backupdr.v1.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.NicType|null); + + /** NetworkInterface networkAttachment */ + networkAttachment?: (string|null); + } + + /** Represents a NetworkInterface. */ + class NetworkInterface implements INetworkInterface { + + /** + * Constructs a new NetworkInterface. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.INetworkInterface); + + /** NetworkInterface network. */ + public network?: (string|null); + + /** NetworkInterface subnetwork. */ + public subnetwork?: (string|null); + + /** NetworkInterface ipAddress. */ + public ipAddress?: (string|null); + + /** NetworkInterface ipv6Address. */ + public ipv6Address?: (string|null); + + /** NetworkInterface internalIpv6PrefixLength. */ + public internalIpv6PrefixLength?: (number|null); + + /** NetworkInterface name. */ + public name?: (string|null); + + /** NetworkInterface accessConfigs. */ + public accessConfigs: google.cloud.backupdr.v1.IAccessConfig[]; + + /** NetworkInterface ipv6AccessConfigs. */ + public ipv6AccessConfigs: google.cloud.backupdr.v1.IAccessConfig[]; + + /** NetworkInterface aliasIpRanges. */ + public aliasIpRanges: google.cloud.backupdr.v1.IAliasIpRange[]; + + /** NetworkInterface stackType. */ + public stackType?: (google.cloud.backupdr.v1.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.StackType|null); + + /** NetworkInterface ipv6AccessType. */ + public ipv6AccessType?: (google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null); + + /** NetworkInterface queueCount. */ + public queueCount?: (number|null); + + /** NetworkInterface nicType. */ + public nicType?: (google.cloud.backupdr.v1.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.NicType|null); + + /** NetworkInterface networkAttachment. */ + public networkAttachment?: (string|null); + + /** NetworkInterface _network. */ + public _network?: "network"; + + /** NetworkInterface _subnetwork. */ + public _subnetwork?: "subnetwork"; + + /** NetworkInterface _ipAddress. */ + public _ipAddress?: "ipAddress"; + + /** NetworkInterface _ipv6Address. */ + public _ipv6Address?: "ipv6Address"; + + /** NetworkInterface _internalIpv6PrefixLength. */ + public _internalIpv6PrefixLength?: "internalIpv6PrefixLength"; + + /** NetworkInterface _name. */ + public _name?: "name"; + + /** NetworkInterface _stackType. */ + public _stackType?: "stackType"; + + /** NetworkInterface _ipv6AccessType. */ + public _ipv6AccessType?: "ipv6AccessType"; + + /** NetworkInterface _queueCount. */ + public _queueCount?: "queueCount"; + + /** NetworkInterface _nicType. */ + public _nicType?: "nicType"; + + /** NetworkInterface _networkAttachment. */ + public _networkAttachment?: "networkAttachment"; + + /** + * Creates a new NetworkInterface instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkInterface instance + */ + public static create(properties?: google.cloud.backupdr.v1.INetworkInterface): google.cloud.backupdr.v1.NetworkInterface; + + /** + * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * @param message NetworkInterface message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * @param message NetworkInterface message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkInterface message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkInterface + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkInterface; + + /** + * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkInterface + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkInterface; + + /** + * Verifies a NetworkInterface message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkInterface + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkInterface; + + /** + * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. + * @param message NetworkInterface + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.NetworkInterface, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkInterface to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkInterface + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkInterface { + + /** StackType enum. */ + enum StackType { + STACK_TYPE_UNSPECIFIED = 0, + IPV4_ONLY = 1, + IPV4_IPV6 = 2 + } + + /** Ipv6AccessType enum. */ + enum Ipv6AccessType { + UNSPECIFIED_IPV6_ACCESS_TYPE = 0, + INTERNAL = 1, + EXTERNAL = 2 + } + + /** NicType enum. */ + enum NicType { + NIC_TYPE_UNSPECIFIED = 0, + VIRTIO_NET = 1, + GVNIC = 2 + } + } + + /** Properties of a NetworkPerformanceConfig. */ + interface INetworkPerformanceConfig { + + /** NetworkPerformanceConfig totalEgressBandwidthTier */ + totalEgressBandwidthTier?: (google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null); + } + + /** Represents a NetworkPerformanceConfig. */ + class NetworkPerformanceConfig implements INetworkPerformanceConfig { + + /** + * Constructs a new NetworkPerformanceConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.INetworkPerformanceConfig); + + /** NetworkPerformanceConfig totalEgressBandwidthTier. */ + public totalEgressBandwidthTier?: (google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null); + + /** NetworkPerformanceConfig _totalEgressBandwidthTier. */ + public _totalEgressBandwidthTier?: "totalEgressBandwidthTier"; + + /** + * Creates a new NetworkPerformanceConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkPerformanceConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.INetworkPerformanceConfig): google.cloud.backupdr.v1.NetworkPerformanceConfig; + + /** + * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * @param message NetworkPerformanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * @param message NetworkPerformanceConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkPerformanceConfig; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkPerformanceConfig; + + /** + * Verifies a NetworkPerformanceConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkPerformanceConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkPerformanceConfig; + + /** + * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. + * @param message NetworkPerformanceConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.NetworkPerformanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkPerformanceConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkPerformanceConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkPerformanceConfig { + + /** Tier enum. */ + enum Tier { + TIER_UNSPECIFIED = 0, + DEFAULT = 1, + TIER_1 = 2 + } + } + + /** Properties of an AccessConfig. */ + interface IAccessConfig { + + /** AccessConfig type */ + type?: (google.cloud.backupdr.v1.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1.AccessConfig.AccessType|null); + + /** AccessConfig name */ + name?: (string|null); + + /** AccessConfig externalIp */ + externalIp?: (string|null); + + /** AccessConfig externalIpv6 */ + externalIpv6?: (string|null); + + /** AccessConfig externalIpv6PrefixLength */ + externalIpv6PrefixLength?: (number|null); + + /** AccessConfig setPublicPtr */ + setPublicPtr?: (boolean|null); + + /** AccessConfig publicPtrDomainName */ + publicPtrDomainName?: (string|null); + + /** AccessConfig networkTier */ + networkTier?: (google.cloud.backupdr.v1.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1.AccessConfig.NetworkTier|null); + } + + /** Represents an AccessConfig. */ + class AccessConfig implements IAccessConfig { + + /** + * Constructs a new AccessConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAccessConfig); + + /** AccessConfig type. */ + public type?: (google.cloud.backupdr.v1.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1.AccessConfig.AccessType|null); + + /** AccessConfig name. */ + public name?: (string|null); + + /** AccessConfig externalIp. */ + public externalIp?: (string|null); + + /** AccessConfig externalIpv6. */ + public externalIpv6?: (string|null); + + /** AccessConfig externalIpv6PrefixLength. */ + public externalIpv6PrefixLength?: (number|null); + + /** AccessConfig setPublicPtr. */ + public setPublicPtr?: (boolean|null); + + /** AccessConfig publicPtrDomainName. */ + public publicPtrDomainName?: (string|null); + + /** AccessConfig networkTier. */ + public networkTier?: (google.cloud.backupdr.v1.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1.AccessConfig.NetworkTier|null); + + /** AccessConfig _type. */ + public _type?: "type"; + + /** AccessConfig _name. */ + public _name?: "name"; + + /** AccessConfig _externalIp. */ + public _externalIp?: "externalIp"; + + /** AccessConfig _externalIpv6. */ + public _externalIpv6?: "externalIpv6"; + + /** AccessConfig _externalIpv6PrefixLength. */ + public _externalIpv6PrefixLength?: "externalIpv6PrefixLength"; + + /** AccessConfig _setPublicPtr. */ + public _setPublicPtr?: "setPublicPtr"; + + /** AccessConfig _publicPtrDomainName. */ + public _publicPtrDomainName?: "publicPtrDomainName"; + + /** AccessConfig _networkTier. */ + public _networkTier?: "networkTier"; + + /** + * Creates a new AccessConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessConfig instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAccessConfig): google.cloud.backupdr.v1.AccessConfig; + + /** + * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * @param message AccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * @param message AccessConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AccessConfig; + + /** + * Decodes an AccessConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AccessConfig; + + /** + * Verifies an AccessConfig message. + * @param message Plain 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 AccessConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AccessConfig; + + /** + * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. + * @param message AccessConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AccessConfig { + + /** AccessType enum. */ + enum AccessType { + ACCESS_TYPE_UNSPECIFIED = 0, + ONE_TO_ONE_NAT = 1, + DIRECT_IPV6 = 2 + } + + /** NetworkTier enum. */ + enum NetworkTier { + NETWORK_TIER_UNSPECIFIED = 0, + PREMIUM = 1, + STANDARD = 2 + } + } + + /** Properties of an AliasIpRange. */ + interface IAliasIpRange { + + /** AliasIpRange ipCidrRange */ + ipCidrRange?: (string|null); + + /** AliasIpRange subnetworkRangeName */ + subnetworkRangeName?: (string|null); + } + + /** Represents an AliasIpRange. */ + class AliasIpRange implements IAliasIpRange { + + /** + * Constructs a new AliasIpRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAliasIpRange); + + /** AliasIpRange ipCidrRange. */ + public ipCidrRange?: (string|null); + + /** AliasIpRange subnetworkRangeName. */ + public subnetworkRangeName?: (string|null); + + /** AliasIpRange _ipCidrRange. */ + public _ipCidrRange?: "ipCidrRange"; + + /** AliasIpRange _subnetworkRangeName. */ + public _subnetworkRangeName?: "subnetworkRangeName"; + + /** + * Creates a new AliasIpRange instance using the specified properties. + * @param [properties] Properties to set + * @returns AliasIpRange instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAliasIpRange): google.cloud.backupdr.v1.AliasIpRange; + + /** + * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. + * @param message AliasIpRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. + * @param message AliasIpRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AliasIpRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AliasIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AliasIpRange; + + /** + * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AliasIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AliasIpRange; + + /** + * Verifies an AliasIpRange message. + * @param message Plain 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 AliasIpRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AliasIpRange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AliasIpRange; + + /** + * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. + * @param message AliasIpRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AliasIpRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AliasIpRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AliasIpRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InstanceParams. */ + interface IInstanceParams { + + /** InstanceParams resourceManagerTags */ + resourceManagerTags?: ({ [k: string]: string }|null); + } + + /** Represents an InstanceParams. */ + class InstanceParams implements IInstanceParams { + + /** + * Constructs a new InstanceParams. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IInstanceParams); + + /** InstanceParams resourceManagerTags. */ + public resourceManagerTags: { [k: string]: string }; + + /** + * Creates a new InstanceParams instance using the specified properties. + * @param [properties] Properties to set + * @returns InstanceParams instance + */ + public static create(properties?: google.cloud.backupdr.v1.IInstanceParams): google.cloud.backupdr.v1.InstanceParams; + + /** + * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @param message InstanceParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @param message InstanceParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstanceParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstanceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InstanceParams; + + /** + * Decodes an InstanceParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstanceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InstanceParams; + + /** + * Verifies an InstanceParams message. + * @param message Plain 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 InstanceParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstanceParams + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InstanceParams; + + /** + * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. + * @param message InstanceParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.InstanceParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstanceParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstanceParams + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AllocationAffinity. */ + interface IAllocationAffinity { + + /** AllocationAffinity consumeAllocationType */ + consumeAllocationType?: (google.cloud.backupdr.v1.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1.AllocationAffinity.Type|null); + + /** AllocationAffinity key */ + key?: (string|null); + + /** AllocationAffinity values */ + values?: (string[]|null); + } + + /** Represents an AllocationAffinity. */ + class AllocationAffinity implements IAllocationAffinity { + + /** + * Constructs a new AllocationAffinity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAllocationAffinity); + + /** AllocationAffinity consumeAllocationType. */ + public consumeAllocationType?: (google.cloud.backupdr.v1.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1.AllocationAffinity.Type|null); + + /** AllocationAffinity key. */ + public key?: (string|null); + + /** AllocationAffinity values. */ + public values: string[]; + + /** AllocationAffinity _consumeAllocationType. */ + public _consumeAllocationType?: "consumeAllocationType"; + + /** AllocationAffinity _key. */ + public _key?: "key"; + + /** + * Creates a new AllocationAffinity instance using the specified properties. + * @param [properties] Properties to set + * @returns AllocationAffinity instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAllocationAffinity): google.cloud.backupdr.v1.AllocationAffinity; + + /** + * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. + * @param message AllocationAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. + * @param message AllocationAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllocationAffinity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllocationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AllocationAffinity; + + /** + * Decodes an AllocationAffinity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllocationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AllocationAffinity; + + /** + * Verifies an AllocationAffinity message. + * @param message Plain 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 AllocationAffinity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllocationAffinity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AllocationAffinity; + + /** + * Creates a plain object from an AllocationAffinity message. Also converts values to other types if specified. + * @param message AllocationAffinity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AllocationAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllocationAffinity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllocationAffinity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AllocationAffinity { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + NO_RESERVATION = 1, + ANY_RESERVATION = 2, + SPECIFIC_RESERVATION = 3 + } + } + + /** Properties of a Scheduling. */ + interface IScheduling { + + /** Scheduling onHostMaintenance */ + onHostMaintenance?: (google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null); + + /** Scheduling automaticRestart */ + automaticRestart?: (boolean|null); + + /** Scheduling preemptible */ + preemptible?: (boolean|null); + + /** Scheduling nodeAffinities */ + nodeAffinities?: (google.cloud.backupdr.v1.Scheduling.INodeAffinity[]|null); + + /** Scheduling minNodeCpus */ + minNodeCpus?: (number|null); + + /** Scheduling provisioningModel */ + provisioningModel?: (google.cloud.backupdr.v1.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null); + + /** Scheduling instanceTerminationAction */ + instanceTerminationAction?: (google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null); + + /** Scheduling localSsdRecoveryTimeout */ + localSsdRecoveryTimeout?: (google.cloud.backupdr.v1.ISchedulingDuration|null); + } + + /** Represents a Scheduling. */ + class Scheduling implements IScheduling { + + /** + * Constructs a new Scheduling. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IScheduling); + + /** Scheduling onHostMaintenance. */ + public onHostMaintenance?: (google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null); + + /** Scheduling automaticRestart. */ + public automaticRestart?: (boolean|null); + + /** Scheduling preemptible. */ + public preemptible?: (boolean|null); + + /** Scheduling nodeAffinities. */ + public nodeAffinities: google.cloud.backupdr.v1.Scheduling.INodeAffinity[]; + + /** Scheduling minNodeCpus. */ + public minNodeCpus?: (number|null); + + /** Scheduling provisioningModel. */ + public provisioningModel?: (google.cloud.backupdr.v1.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null); + + /** Scheduling instanceTerminationAction. */ + public instanceTerminationAction?: (google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null); + + /** Scheduling localSsdRecoveryTimeout. */ + public localSsdRecoveryTimeout?: (google.cloud.backupdr.v1.ISchedulingDuration|null); + + /** Scheduling _onHostMaintenance. */ + public _onHostMaintenance?: "onHostMaintenance"; + + /** Scheduling _automaticRestart. */ + public _automaticRestart?: "automaticRestart"; + + /** Scheduling _preemptible. */ + public _preemptible?: "preemptible"; + + /** Scheduling _minNodeCpus. */ + public _minNodeCpus?: "minNodeCpus"; + + /** Scheduling _provisioningModel. */ + public _provisioningModel?: "provisioningModel"; + + /** Scheduling _instanceTerminationAction. */ + public _instanceTerminationAction?: "instanceTerminationAction"; + + /** Scheduling _localSsdRecoveryTimeout. */ + public _localSsdRecoveryTimeout?: "localSsdRecoveryTimeout"; + + /** + * Creates a new Scheduling instance using the specified properties. + * @param [properties] Properties to set + * @returns Scheduling instance + */ + public static create(properties?: google.cloud.backupdr.v1.IScheduling): google.cloud.backupdr.v1.Scheduling; + + /** + * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. + * @param message Scheduling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. + * @param message Scheduling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Scheduling message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Scheduling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Scheduling; + + /** + * Decodes a Scheduling message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Scheduling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Scheduling; + + /** + * Verifies a Scheduling message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Scheduling + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Scheduling; + + /** + * Creates a plain object from a Scheduling message. Also converts values to other types if specified. + * @param message Scheduling + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Scheduling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Scheduling to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Scheduling + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Scheduling { + + /** OnHostMaintenance enum. */ + enum OnHostMaintenance { + ON_HOST_MAINTENANCE_UNSPECIFIED = 0, + TERMINATE = 1, + MIGRATE = 1000 + } + + /** Properties of a NodeAffinity. */ + interface INodeAffinity { + + /** NodeAffinity key */ + key?: (string|null); + + /** NodeAffinity operator */ + operator?: (google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null); + + /** NodeAffinity values */ + values?: (string[]|null); + } + + /** Represents a NodeAffinity. */ + class NodeAffinity implements INodeAffinity { + + /** + * Constructs a new NodeAffinity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.Scheduling.INodeAffinity); + + /** NodeAffinity key. */ + public key?: (string|null); + + /** NodeAffinity operator. */ + public operator?: (google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null); + + /** NodeAffinity values. */ + public values: string[]; + + /** NodeAffinity _key. */ + public _key?: "key"; + + /** NodeAffinity _operator. */ + public _operator?: "operator"; + + /** + * Creates a new NodeAffinity instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeAffinity instance + */ + public static create(properties?: google.cloud.backupdr.v1.Scheduling.INodeAffinity): google.cloud.backupdr.v1.Scheduling.NodeAffinity; + + /** + * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @param message NodeAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @param message NodeAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Scheduling.NodeAffinity; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Scheduling.NodeAffinity; + + /** + * Verifies a NodeAffinity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeAffinity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Scheduling.NodeAffinity; + + /** + * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. + * @param message NodeAffinity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Scheduling.NodeAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeAffinity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeAffinity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NodeAffinity { + + /** Operator enum. */ + enum Operator { + OPERATOR_UNSPECIFIED = 0, + IN = 1, + NOT_IN = 2 + } + } + + /** ProvisioningModel enum. */ + enum ProvisioningModel { + PROVISIONING_MODEL_UNSPECIFIED = 0, + STANDARD = 1, + SPOT = 2 + } + + /** InstanceTerminationAction enum. */ + enum InstanceTerminationAction { + INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0, + DELETE = 1, + STOP = 2 + } + } + + /** Properties of a SchedulingDuration. */ + interface ISchedulingDuration { + + /** SchedulingDuration seconds */ + seconds?: (number|Long|string|null); + + /** SchedulingDuration nanos */ + nanos?: (number|null); + } + + /** Represents a SchedulingDuration. */ + class SchedulingDuration implements ISchedulingDuration { + + /** + * Constructs a new SchedulingDuration. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ISchedulingDuration); + + /** SchedulingDuration seconds. */ + public seconds?: (number|Long|string|null); + + /** SchedulingDuration nanos. */ + public nanos?: (number|null); + + /** SchedulingDuration _seconds. */ + public _seconds?: "seconds"; + + /** SchedulingDuration _nanos. */ + public _nanos?: "nanos"; + + /** + * Creates a new SchedulingDuration instance using the specified properties. + * @param [properties] Properties to set + * @returns SchedulingDuration instance + */ + public static create(properties?: google.cloud.backupdr.v1.ISchedulingDuration): google.cloud.backupdr.v1.SchedulingDuration; + + /** + * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. + * @param message SchedulingDuration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. + * @param message SchedulingDuration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchedulingDuration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchedulingDuration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SchedulingDuration; + + /** + * Decodes a SchedulingDuration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchedulingDuration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SchedulingDuration; + + /** + * Verifies a SchedulingDuration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchedulingDuration + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SchedulingDuration; + + /** + * Creates a plain object from a SchedulingDuration message. Also converts values to other types if specified. + * @param message SchedulingDuration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.SchedulingDuration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchedulingDuration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchedulingDuration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceAccount. */ + interface IServiceAccount { + + /** ServiceAccount email */ + email?: (string|null); + + /** ServiceAccount scopes */ + scopes?: (string[]|null); + } + + /** Represents a ServiceAccount. */ + class ServiceAccount implements IServiceAccount { + + /** + * Constructs a new ServiceAccount. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IServiceAccount); + + /** ServiceAccount email. */ + public email?: (string|null); + + /** ServiceAccount scopes. */ + public scopes: string[]; + + /** ServiceAccount _email. */ + public _email?: "email"; + + /** + * Creates a new ServiceAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceAccount instance + */ + public static create(properties?: google.cloud.backupdr.v1.IServiceAccount): google.cloud.backupdr.v1.ServiceAccount; + + /** + * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. + * @param message ServiceAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. + * @param message ServiceAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ServiceAccount; + + /** + * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ServiceAccount; + + /** + * Verifies a ServiceAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceAccount + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ServiceAccount; + + /** + * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. + * @param message ServiceAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.ServiceAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceAccount + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Tags. */ + interface ITags { + + /** Tags items */ + items?: (string[]|null); + } + + /** Represents a Tags. */ + class Tags implements ITags { + + /** + * Constructs a new Tags. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ITags); + + /** Tags items. */ + public items: string[]; + + /** + * Creates a new Tags instance using the specified properties. + * @param [properties] Properties to set + * @returns Tags instance + */ + public static create(properties?: google.cloud.backupdr.v1.ITags): google.cloud.backupdr.v1.Tags; + + /** + * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. + * @param message Tags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.ITags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. + * @param message Tags message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.ITags, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Tags message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Tags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Tags; + + /** + * Decodes a Tags message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Tags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Tags; + + /** + * Verifies a Tags message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Tags message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Tags + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Tags; + + /** + * Creates a plain object from a Tags message. Also converts values to other types if specified. + * @param message Tags + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Tags, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Tags to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Tags + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AttachedDisk. */ + interface IAttachedDisk { + + /** AttachedDisk initializeParams */ + initializeParams?: (google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null); + + /** AttachedDisk deviceName */ + deviceName?: (string|null); + + /** AttachedDisk kind */ + kind?: (string|null); + + /** AttachedDisk diskTypeDeprecated */ + diskTypeDeprecated?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); + + /** AttachedDisk mode */ + mode?: (google.cloud.backupdr.v1.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskMode|null); + + /** AttachedDisk source */ + source?: (string|null); + + /** AttachedDisk index */ + index?: (number|Long|string|null); + + /** AttachedDisk boot */ + boot?: (boolean|null); + + /** AttachedDisk autoDelete */ + autoDelete?: (boolean|null); + + /** AttachedDisk license */ + license?: (string[]|null); + + /** AttachedDisk diskInterface */ + diskInterface?: (google.cloud.backupdr.v1.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null); + + /** AttachedDisk guestOsFeature */ + guestOsFeature?: (google.cloud.backupdr.v1.IGuestOsFeature[]|null); + + /** AttachedDisk diskEncryptionKey */ + diskEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** AttachedDisk diskSizeGb */ + diskSizeGb?: (number|Long|string|null); + + /** AttachedDisk savedState */ + savedState?: (google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null); + + /** AttachedDisk diskType */ + diskType?: (string|null); + + /** AttachedDisk type */ + type?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); + } + + /** Represents an AttachedDisk. */ + class AttachedDisk implements IAttachedDisk { + + /** + * Constructs a new AttachedDisk. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAttachedDisk); + + /** AttachedDisk initializeParams. */ + public initializeParams?: (google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null); + + /** AttachedDisk deviceName. */ + public deviceName?: (string|null); + + /** AttachedDisk kind. */ + public kind?: (string|null); + + /** AttachedDisk diskTypeDeprecated. */ + public diskTypeDeprecated?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); + + /** AttachedDisk mode. */ + public mode?: (google.cloud.backupdr.v1.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskMode|null); + + /** AttachedDisk source. */ + public source?: (string|null); + + /** AttachedDisk index. */ + public index?: (number|Long|string|null); + + /** AttachedDisk boot. */ + public boot?: (boolean|null); + + /** AttachedDisk autoDelete. */ + public autoDelete?: (boolean|null); + + /** AttachedDisk license. */ + public license: string[]; + + /** AttachedDisk diskInterface. */ + public diskInterface?: (google.cloud.backupdr.v1.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null); + + /** AttachedDisk guestOsFeature. */ + public guestOsFeature: google.cloud.backupdr.v1.IGuestOsFeature[]; + + /** AttachedDisk diskEncryptionKey. */ + public diskEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** AttachedDisk diskSizeGb. */ + public diskSizeGb?: (number|Long|string|null); + + /** AttachedDisk savedState. */ + public savedState?: (google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null); + + /** AttachedDisk diskType. */ + public diskType?: (string|null); + + /** AttachedDisk type. */ + public type?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); + + /** AttachedDisk _initializeParams. */ + public _initializeParams?: "initializeParams"; + + /** AttachedDisk _deviceName. */ + public _deviceName?: "deviceName"; + + /** AttachedDisk _kind. */ + public _kind?: "kind"; + + /** AttachedDisk _diskTypeDeprecated. */ + public _diskTypeDeprecated?: "diskTypeDeprecated"; + + /** AttachedDisk _mode. */ + public _mode?: "mode"; + + /** AttachedDisk _source. */ + public _source?: "source"; + + /** AttachedDisk _index. */ + public _index?: "index"; + + /** AttachedDisk _boot. */ + public _boot?: "boot"; + + /** AttachedDisk _autoDelete. */ + public _autoDelete?: "autoDelete"; + + /** AttachedDisk _diskInterface. */ + public _diskInterface?: "diskInterface"; + + /** AttachedDisk _diskEncryptionKey. */ + public _diskEncryptionKey?: "diskEncryptionKey"; + + /** AttachedDisk _diskSizeGb. */ + public _diskSizeGb?: "diskSizeGb"; + + /** AttachedDisk _savedState. */ + public _savedState?: "savedState"; + + /** AttachedDisk _diskType. */ + public _diskType?: "diskType"; + + /** AttachedDisk _type. */ + public _type?: "type"; + + /** + * Creates a new AttachedDisk instance using the specified properties. + * @param [properties] Properties to set + * @returns AttachedDisk instance + */ + public static create(properties?: google.cloud.backupdr.v1.IAttachedDisk): google.cloud.backupdr.v1.AttachedDisk; + + /** + * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. + * @param message AttachedDisk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. + * @param message AttachedDisk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AttachedDisk message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AttachedDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AttachedDisk; + + /** + * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AttachedDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AttachedDisk; + + /** + * Verifies an AttachedDisk message. + * @param message Plain 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 AttachedDisk message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AttachedDisk + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AttachedDisk; + + /** + * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. + * @param message AttachedDisk + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AttachedDisk, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AttachedDisk to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AttachedDisk + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AttachedDisk { + + /** Properties of an InitializeParams. */ + interface IInitializeParams { + + /** InitializeParams diskName */ + diskName?: (string|null); + + /** InitializeParams replicaZones */ + replicaZones?: (string[]|null); + } + + /** Represents an InitializeParams. */ + class InitializeParams implements IInitializeParams { + + /** + * Constructs a new InitializeParams. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams); + + /** InitializeParams diskName. */ + public diskName?: (string|null); + + /** InitializeParams replicaZones. */ + public replicaZones: string[]; + + /** InitializeParams _diskName. */ + public _diskName?: "diskName"; + + /** + * Creates a new InitializeParams instance using the specified properties. + * @param [properties] Properties to set + * @returns InitializeParams instance + */ + public static create(properties?: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Encodes the specified InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @param message InitializeParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @param message InitializeParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InitializeParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Decodes an InitializeParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Verifies an InitializeParams message. + * @param message Plain 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 InitializeParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InitializeParams + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. + * @param message InitializeParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AttachedDisk.InitializeParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InitializeParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InitializeParams + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** DiskType enum. */ + enum DiskType { + DISK_TYPE_UNSPECIFIED = 0, + SCRATCH = 1, + PERSISTENT = 2 + } + + /** DiskMode enum. */ + enum DiskMode { + DISK_MODE_UNSPECIFIED = 0, + READ_WRITE = 1, + READ_ONLY = 2, + LOCKED = 3 + } + + /** DiskInterface enum. */ + enum DiskInterface { + DISK_INTERFACE_UNSPECIFIED = 0, + SCSI = 1, + NVME = 2, + NVDIMM = 3, + ISCSI = 4 + } + + /** DiskSavedState enum. */ + enum DiskSavedState { + DISK_SAVED_STATE_UNSPECIFIED = 0, + PRESERVED = 1 + } + } + + /** Properties of a GuestOsFeature. */ + interface IGuestOsFeature { + + /** GuestOsFeature type */ + type?: (google.cloud.backupdr.v1.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null); + } + + /** Represents a GuestOsFeature. */ + class GuestOsFeature implements IGuestOsFeature { + + /** + * Constructs a new GuestOsFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IGuestOsFeature); + + /** GuestOsFeature type. */ + public type?: (google.cloud.backupdr.v1.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null); + + /** GuestOsFeature _type. */ + public _type?: "type"; + + /** + * Creates a new GuestOsFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns GuestOsFeature instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGuestOsFeature): google.cloud.backupdr.v1.GuestOsFeature; + + /** + * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @param message GuestOsFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @param message GuestOsFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GuestOsFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GuestOsFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GuestOsFeature; + + /** + * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GuestOsFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GuestOsFeature; + + /** + * Verifies a GuestOsFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GuestOsFeature + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GuestOsFeature; + + /** + * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. + * @param message GuestOsFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.GuestOsFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GuestOsFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GuestOsFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GuestOsFeature { + + /** FeatureType enum. */ + enum FeatureType { + FEATURE_TYPE_UNSPECIFIED = 0, + VIRTIO_SCSI_MULTIQUEUE = 1, + WINDOWS = 2, + MULTI_IP_SUBNET = 3, + UEFI_COMPATIBLE = 4, + SECURE_BOOT = 5, + GVNIC = 6, + SEV_CAPABLE = 7, + BARE_METAL_LINUX_COMPATIBLE = 8, + SUSPEND_RESUME_COMPATIBLE = 9, + SEV_LIVE_MIGRATABLE = 10, + SEV_SNP_CAPABLE = 11, + TDX_CAPABLE = 12, + IDPF = 13, + SEV_LIVE_MIGRATABLE_V2 = 14 + } + } + + /** KeyRevocationActionType enum. */ + enum KeyRevocationActionType { + KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0, + NONE = 1, + STOP = 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 FieldInfo. */ + interface IFieldInfo { + + /** FieldInfo format */ + format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); + } + + /** Represents a FieldInfo. */ + class FieldInfo implements IFieldInfo { + + /** + * Constructs a new FieldInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IFieldInfo); + + /** FieldInfo format. */ + public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); + + /** + * Creates a new FieldInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldInfo instance + */ + public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldInfo + * @throws {Error} If the payload is not 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.FieldInfo; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldInfo + * @throws {Error} If the payload 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.FieldInfo; + + /** + * Verifies a FieldInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldInfo + */ + public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @param message FieldInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldInfo { + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + UUID4 = 1, + IPV4 = 2, + IPV6 = 3, + IPV4_OR_IPV6 = 4 + } + } + + /** 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.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|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 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; + } + + /** 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 DoubleValue. */ + interface IDoubleValue { + + /** DoubleValue value */ + value?: (number|null); + } + + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { + + /** + * Constructs a new DoubleValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDoubleValue); + + /** DoubleValue value. */ + public value: number; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DoubleValue instance + */ + public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DoubleValue + * @throws {Error} If the payload is not 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.DoubleValue; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DoubleValue + * @throws {Error} If the payload 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.DoubleValue; + + /** + * Verifies a DoubleValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DoubleValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DoubleValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FloatValue. */ + interface IFloatValue { + + /** FloatValue value */ + value?: (number|null); + } + + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { + + /** + * Constructs a new FloatValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFloatValue); + + /** FloatValue value. */ + public value: number; + + /** + * Creates a new FloatValue instance using the specified properties. + * @param [properties] Properties to set + * @returns FloatValue instance + */ + public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FloatValue + * @throws {Error} If the payload is not 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.FloatValue; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FloatValue + * @throws {Error} If the payload 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.FloatValue; + + /** + * Verifies a FloatValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FloatValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FloatValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FloatValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Int64Value. */ + interface IInt64Value { + + /** Int64Value value */ + value?: (number|Long|string|null); + } + + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { + + /** + * Constructs a new Int64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt64Value); + + /** Int64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new Int64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int64Value instance + */ + public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int64Value + * @throws {Error} If the payload is not 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.Int64Value; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int64Value + * @throws {Error} If the payload 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.Int64Value; + + /** + * Verifies an Int64Value message. + * @param message Plain 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 Int64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt64Value. */ + interface IUInt64Value { + + /** UInt64Value value */ + value?: (number|Long|string|null); + } + + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { + + /** + * Constructs a new UInt64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt64Value); + + /** UInt64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new UInt64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt64Value instance + */ + public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt64Value + * @throws {Error} If the payload is not 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.UInt64Value; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt64Value + * @throws {Error} If the payload 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.UInt64Value; + + /** + * Verifies a UInt64Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Int32Value. */ + interface IInt32Value { + + /** Int32Value value */ + value?: (number|null); + } + + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { + + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); + + /** Int32Value value. */ + public value: number; + + /** + * Creates a new Int32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int32Value instance + */ + public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int32Value + * @throws {Error} If the payload is not 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.Int32Value; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int32Value + * @throws {Error} If the payload 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.Int32Value; + + /** + * Verifies an Int32Value message. + * @param message Plain 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 Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt32Value. */ + interface IUInt32Value { + + /** UInt32Value value */ + value?: (number|null); + } + + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { + + /** + * Constructs a new UInt32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt32Value); + + /** UInt32Value value. */ + public value: number; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt32Value instance + */ + public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt32Value + * @throws {Error} If the payload is not 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.UInt32Value; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt32Value + * @throws {Error} If the payload 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.UInt32Value; + + /** + * Verifies a UInt32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BoolValue. */ + interface IBoolValue { + + /** BoolValue value */ + value?: (boolean|null); + } + + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { + + /** + * Constructs a new BoolValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBoolValue); + + /** BoolValue value. */ + public value: boolean; + + /** + * Creates a new BoolValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BoolValue instance + */ + public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoolValue + * @throws {Error} If the payload is not 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.BoolValue; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoolValue + * @throws {Error} If the payload 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.BoolValue; + + /** + * Verifies a BoolValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoolValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoolValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BoolValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringValue. */ + interface IStringValue { + + /** StringValue value */ + value?: (string|null); + } + + /** Represents a StringValue. */ + class StringValue implements IStringValue { + + /** + * Constructs a new StringValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStringValue); + + /** StringValue value. */ + public value: string; + + /** + * Creates a new StringValue instance using the specified properties. + * @param [properties] Properties to set + * @returns StringValue instance + */ + public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringValue + * @throws {Error} If the payload is not 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.StringValue; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringValue + * @throws {Error} If the payload 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.StringValue; + + /** + * Verifies a StringValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BytesValue. */ + interface IBytesValue { + + /** BytesValue value */ + value?: (Uint8Array|string|null); + } + + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { + + /** + * Constructs a new BytesValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBytesValue); + + /** BytesValue value. */ + public value: (Uint8Array|string); + + /** + * Creates a new BytesValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BytesValue instance + */ + public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BytesValue + * @throws {Error} If the payload is not 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.BytesValue; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BytesValue + * @throws {Error} If the payload 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.BytesValue; + + /** + * Verifies a BytesValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BytesValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BytesValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BytesValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace type. */ + namespace type { + + /** DayOfWeek enum. */ + enum DayOfWeek { + DAY_OF_WEEK_UNSPECIFIED = 0, + MONDAY = 1, + TUESDAY = 2, + WEDNESDAY = 3, + THURSDAY = 4, + FRIDAY = 5, + SATURDAY = 6, + SUNDAY = 7 + } + + /** Month enum. */ + enum Month { + MONTH_UNSPECIFIED = 0, + JANUARY = 1, + FEBRUARY = 2, + MARCH = 3, + APRIL = 4, + MAY = 5, + JUNE = 6, + JULY = 7, + AUGUST = 8, + SEPTEMBER = 9, + OCTOBER = 10, + NOVEMBER = 11, + DECEMBER = 12 + } + } + + /** 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; + } + } + + /** 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; + } + } +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js new file mode 100644 index 00000000000..e55e559d6fb --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js @@ -0,0 +1,55595 @@ +// 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. + +/*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_backupdr_protos || ($protobuf.roots._google_cloud_backupdr_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.backupdr = (function() { + + /** + * Namespace backupdr. + * @memberof google.cloud + * @namespace + */ + var backupdr = {}; + + backupdr.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.backupdr + * @namespace + */ + var v1 = {}; + + v1.BackupDR = (function() { + + /** + * Constructs a new BackupDR service. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupDR + * @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 BackupDR(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (BackupDR.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = BackupDR; + + /** + * Creates new BackupDR service using the specified rpc implementation. + * @function create + * @memberof google.cloud.backupdr.v1.BackupDR + * @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 {BackupDR} RPC service. Useful where requests and/or responses are streamed. + */ + BackupDR.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listManagementServers}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListManagementServersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListManagementServersResponse} [response] ListManagementServersResponse + */ + + /** + * Calls ListManagementServers. + * @function listManagementServers + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListManagementServersRequest} request ListManagementServersRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListManagementServersCallback} callback Node-style callback called with the error, if any, and ListManagementServersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listManagementServers = function listManagementServers(request, callback) { + return this.rpcCall(listManagementServers, $root.google.cloud.backupdr.v1.ListManagementServersRequest, $root.google.cloud.backupdr.v1.ListManagementServersResponse, request, callback); + }, "name", { value: "ListManagementServers" }); + + /** + * Calls ListManagementServers. + * @function listManagementServers + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListManagementServersRequest} request ListManagementServersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getManagementServer}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetManagementServerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ManagementServer} [response] ManagementServer + */ + + /** + * Calls GetManagementServer. + * @function getManagementServer + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} request GetManagementServerRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetManagementServerCallback} callback Node-style callback called with the error, if any, and ManagementServer + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.getManagementServer = function getManagementServer(request, callback) { + return this.rpcCall(getManagementServer, $root.google.cloud.backupdr.v1.GetManagementServerRequest, $root.google.cloud.backupdr.v1.ManagementServer, request, callback); + }, "name", { value: "GetManagementServer" }); + + /** + * Calls GetManagementServer. + * @function getManagementServer + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} request GetManagementServerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createManagementServer}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef CreateManagementServerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateManagementServer. + * @function createManagementServer + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} request CreateManagementServerRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.CreateManagementServerCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.createManagementServer = function createManagementServer(request, callback) { + return this.rpcCall(createManagementServer, $root.google.cloud.backupdr.v1.CreateManagementServerRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateManagementServer" }); + + /** + * Calls CreateManagementServer. + * @function createManagementServer + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} request CreateManagementServerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteManagementServer}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef DeleteManagementServerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteManagementServer. + * @function deleteManagementServer + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} request DeleteManagementServerRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.DeleteManagementServerCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.deleteManagementServer = function deleteManagementServer(request, callback) { + return this.rpcCall(deleteManagementServer, $root.google.cloud.backupdr.v1.DeleteManagementServerRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteManagementServer" }); + + /** + * Calls DeleteManagementServer. + * @function deleteManagementServer + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} request DeleteManagementServerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupVault}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef CreateBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateBackupVault. + * @function createBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} request CreateBackupVaultRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.createBackupVault = function createBackupVault(request, callback) { + return this.rpcCall(createBackupVault, $root.google.cloud.backupdr.v1.CreateBackupVaultRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBackupVault" }); + + /** + * Calls CreateBackupVault. + * @function createBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} request CreateBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupVaults}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListBackupVaultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListBackupVaultsResponse} [response] ListBackupVaultsResponse + */ + + /** + * Calls ListBackupVaults. + * @function listBackupVaults + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} request ListBackupVaultsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListBackupVaultsCallback} callback Node-style callback called with the error, if any, and ListBackupVaultsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listBackupVaults = function listBackupVaults(request, callback) { + return this.rpcCall(listBackupVaults, $root.google.cloud.backupdr.v1.ListBackupVaultsRequest, $root.google.cloud.backupdr.v1.ListBackupVaultsResponse, request, callback); + }, "name", { value: "ListBackupVaults" }); + + /** + * Calls ListBackupVaults. + * @function listBackupVaults + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} request ListBackupVaultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchUsableBackupVaults}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef FetchUsableBackupVaultsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} [response] FetchUsableBackupVaultsResponse + */ + + /** + * Calls FetchUsableBackupVaults. + * @function fetchUsableBackupVaults + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} request FetchUsableBackupVaultsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaultsCallback} callback Node-style callback called with the error, if any, and FetchUsableBackupVaultsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.fetchUsableBackupVaults = function fetchUsableBackupVaults(request, callback) { + return this.rpcCall(fetchUsableBackupVaults, $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest, $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse, request, callback); + }, "name", { value: "FetchUsableBackupVaults" }); + + /** + * Calls FetchUsableBackupVaults. + * @function fetchUsableBackupVaults + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} request FetchUsableBackupVaultsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupVault}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.BackupVault} [response] BackupVault + */ + + /** + * Calls GetBackupVault. + * @function getBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} request GetBackupVaultRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetBackupVaultCallback} callback Node-style callback called with the error, if any, and BackupVault + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.getBackupVault = function getBackupVault(request, callback) { + return this.rpcCall(getBackupVault, $root.google.cloud.backupdr.v1.GetBackupVaultRequest, $root.google.cloud.backupdr.v1.BackupVault, request, callback); + }, "name", { value: "GetBackupVault" }); + + /** + * Calls GetBackupVault. + * @function getBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} request GetBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackupVault}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef UpdateBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateBackupVault. + * @function updateBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} request UpdateBackupVaultRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.UpdateBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.updateBackupVault = function updateBackupVault(request, callback) { + return this.rpcCall(updateBackupVault, $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateBackupVault" }); + + /** + * Calls UpdateBackupVault. + * @function updateBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} request UpdateBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupVault}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef DeleteBackupVaultCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteBackupVault. + * @function deleteBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} request DeleteBackupVaultRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.deleteBackupVault = function deleteBackupVault(request, callback) { + return this.rpcCall(deleteBackupVault, $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackupVault" }); + + /** + * Calls DeleteBackupVault. + * @function deleteBackupVault + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} request DeleteBackupVaultRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listDataSources}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListDataSourcesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListDataSourcesResponse} [response] ListDataSourcesResponse + */ + + /** + * Calls ListDataSources. + * @function listDataSources + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} request ListDataSourcesRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListDataSourcesCallback} callback Node-style callback called with the error, if any, and ListDataSourcesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listDataSources = function listDataSources(request, callback) { + return this.rpcCall(listDataSources, $root.google.cloud.backupdr.v1.ListDataSourcesRequest, $root.google.cloud.backupdr.v1.ListDataSourcesResponse, request, callback); + }, "name", { value: "ListDataSources" }); + + /** + * Calls ListDataSources. + * @function listDataSources + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} request ListDataSourcesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getDataSource}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetDataSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.DataSource} [response] DataSource + */ + + /** + * Calls GetDataSource. + * @function getDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} request GetDataSourceRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetDataSourceCallback} callback Node-style callback called with the error, if any, and DataSource + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.getDataSource = function getDataSource(request, callback) { + return this.rpcCall(getDataSource, $root.google.cloud.backupdr.v1.GetDataSourceRequest, $root.google.cloud.backupdr.v1.DataSource, request, callback); + }, "name", { value: "GetDataSource" }); + + /** + * Calls GetDataSource. + * @function getDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} request GetDataSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateDataSource}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef UpdateDataSourceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateDataSource. + * @function updateDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} request UpdateDataSourceRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.UpdateDataSourceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.updateDataSource = function updateDataSource(request, callback) { + return this.rpcCall(updateDataSource, $root.google.cloud.backupdr.v1.UpdateDataSourceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateDataSource" }); + + /** + * Calls UpdateDataSource. + * @function updateDataSource + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} request UpdateDataSourceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackups}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListBackupsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListBackupsResponse} [response] ListBackupsResponse + */ + + /** + * Calls ListBackups. + * @function listBackups + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupsRequest} request ListBackupsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListBackupsCallback} callback Node-style callback called with the error, if any, and ListBackupsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listBackups = function listBackups(request, callback) { + return this.rpcCall(listBackups, $root.google.cloud.backupdr.v1.ListBackupsRequest, $root.google.cloud.backupdr.v1.ListBackupsResponse, request, callback); + }, "name", { value: "ListBackups" }); + + /** + * Calls ListBackups. + * @function listBackups + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupsRequest} request ListBackupsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.Backup} [response] Backup + */ + + /** + * Calls GetBackup. + * @function getBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupRequest} request GetBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetBackupCallback} callback Node-style callback called with the error, if any, and Backup + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.getBackup = function getBackup(request, callback) { + return this.rpcCall(getBackup, $root.google.cloud.backupdr.v1.GetBackupRequest, $root.google.cloud.backupdr.v1.Backup, request, callback); + }, "name", { value: "GetBackup" }); + + /** + * Calls GetBackup. + * @function getBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupRequest} request GetBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef UpdateBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateBackup. + * @function updateBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} request UpdateBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.UpdateBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.updateBackup = function updateBackup(request, callback) { + return this.rpcCall(updateBackup, $root.google.cloud.backupdr.v1.UpdateBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateBackup" }); + + /** + * Calls UpdateBackup. + * @function updateBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} request UpdateBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef DeleteBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteBackup. + * @function deleteBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} request DeleteBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.deleteBackup = function deleteBackup(request, callback) { + return this.rpcCall(deleteBackup, $root.google.cloud.backupdr.v1.DeleteBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackup" }); + + /** + * Calls DeleteBackup. + * @function deleteBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} request DeleteBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|restoreBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef RestoreBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RestoreBackup. + * @function restoreBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} request RestoreBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.RestoreBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.restoreBackup = function restoreBackup(request, callback) { + return this.rpcCall(restoreBackup, $root.google.cloud.backupdr.v1.RestoreBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RestoreBackup" }); + + /** + * Calls RestoreBackup. + * @function restoreBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} request RestoreBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlan}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef CreateBackupPlanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateBackupPlan. + * @function createBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} request CreateBackupPlanRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupPlanCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.createBackupPlan = function createBackupPlan(request, callback) { + return this.rpcCall(createBackupPlan, $root.google.cloud.backupdr.v1.CreateBackupPlanRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBackupPlan" }); + + /** + * Calls CreateBackupPlan. + * @function createBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} request CreateBackupPlanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlan}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetBackupPlanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.BackupPlan} [response] BackupPlan + */ + + /** + * Calls GetBackupPlan. + * @function getBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} request GetBackupPlanRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetBackupPlanCallback} callback Node-style callback called with the error, if any, and BackupPlan + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.getBackupPlan = function getBackupPlan(request, callback) { + return this.rpcCall(getBackupPlan, $root.google.cloud.backupdr.v1.GetBackupPlanRequest, $root.google.cloud.backupdr.v1.BackupPlan, request, callback); + }, "name", { value: "GetBackupPlan" }); + + /** + * Calls GetBackupPlan. + * @function getBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} request GetBackupPlanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlans}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListBackupPlansCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListBackupPlansResponse} [response] ListBackupPlansResponse + */ + + /** + * Calls ListBackupPlans. + * @function listBackupPlans + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} request ListBackupPlansRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListBackupPlansCallback} callback Node-style callback called with the error, if any, and ListBackupPlansResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listBackupPlans = function listBackupPlans(request, callback) { + return this.rpcCall(listBackupPlans, $root.google.cloud.backupdr.v1.ListBackupPlansRequest, $root.google.cloud.backupdr.v1.ListBackupPlansResponse, request, callback); + }, "name", { value: "ListBackupPlans" }); + + /** + * Calls ListBackupPlans. + * @function listBackupPlans + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} request ListBackupPlansRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlan}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef DeleteBackupPlanCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteBackupPlan. + * @function deleteBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} request DeleteBackupPlanRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.deleteBackupPlan = function deleteBackupPlan(request, callback) { + return this.rpcCall(deleteBackupPlan, $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackupPlan" }); + + /** + * Calls DeleteBackupPlan. + * @function deleteBackupPlan + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} request DeleteBackupPlanRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlanAssociation}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef CreateBackupPlanAssociationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateBackupPlanAssociation. + * @function createBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} request CreateBackupPlanAssociationRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.createBackupPlanAssociation = function createBackupPlanAssociation(request, callback) { + return this.rpcCall(createBackupPlanAssociation, $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBackupPlanAssociation" }); + + /** + * Calls CreateBackupPlanAssociation. + * @function createBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} request CreateBackupPlanAssociationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlanAssociation}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef GetBackupPlanAssociationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.BackupPlanAssociation} [response] BackupPlanAssociation + */ + + /** + * Calls GetBackupPlanAssociation. + * @function getBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} request GetBackupPlanAssociationRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and BackupPlanAssociation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.getBackupPlanAssociation = function getBackupPlanAssociation(request, callback) { + return this.rpcCall(getBackupPlanAssociation, $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest, $root.google.cloud.backupdr.v1.BackupPlanAssociation, request, callback); + }, "name", { value: "GetBackupPlanAssociation" }); + + /** + * Calls GetBackupPlanAssociation. + * @function getBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} request GetBackupPlanAssociationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlanAssociations}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef ListBackupPlanAssociationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} [response] ListBackupPlanAssociationsResponse + */ + + /** + * Calls ListBackupPlanAssociations. + * @function listBackupPlanAssociations + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} request ListBackupPlanAssociationsRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociationsCallback} callback Node-style callback called with the error, if any, and ListBackupPlanAssociationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.listBackupPlanAssociations = function listBackupPlanAssociations(request, callback) { + return this.rpcCall(listBackupPlanAssociations, $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest, $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse, request, callback); + }, "name", { value: "ListBackupPlanAssociations" }); + + /** + * Calls ListBackupPlanAssociations. + * @function listBackupPlanAssociations + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} request ListBackupPlanAssociationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlanAssociation}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef DeleteBackupPlanAssociationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteBackupPlanAssociation. + * @function deleteBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} request DeleteBackupPlanAssociationRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.deleteBackupPlanAssociation = function deleteBackupPlanAssociation(request, callback) { + return this.rpcCall(deleteBackupPlanAssociation, $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteBackupPlanAssociation" }); + + /** + * Calls DeleteBackupPlanAssociation. + * @function deleteBackupPlanAssociation + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} request DeleteBackupPlanAssociationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|triggerBackup}. + * @memberof google.cloud.backupdr.v1.BackupDR + * @typedef TriggerBackupCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls TriggerBackup. + * @function triggerBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} request TriggerBackupRequest message or plain object + * @param {google.cloud.backupdr.v1.BackupDR.TriggerBackupCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BackupDR.prototype.triggerBackup = function triggerBackup(request, callback) { + return this.rpcCall(triggerBackup, $root.google.cloud.backupdr.v1.TriggerBackupRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "TriggerBackup" }); + + /** + * Calls TriggerBackup. + * @function triggerBackup + * @memberof google.cloud.backupdr.v1.BackupDR + * @instance + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} request TriggerBackupRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return BackupDR; + })(); + + v1.NetworkConfig = (function() { + + /** + * Properties of a NetworkConfig. + * @memberof google.cloud.backupdr.v1 + * @interface INetworkConfig + * @property {string|null} [network] NetworkConfig network + * @property {google.cloud.backupdr.v1.NetworkConfig.PeeringMode|null} [peeringMode] NetworkConfig peeringMode + */ + + /** + * Constructs a new NetworkConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a NetworkConfig. + * @implements INetworkConfig + * @constructor + * @param {google.cloud.backupdr.v1.INetworkConfig=} [properties] Properties to set + */ + function NetworkConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkConfig network. + * @member {string} network + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.network = ""; + + /** + * NetworkConfig peeringMode. + * @member {google.cloud.backupdr.v1.NetworkConfig.PeeringMode} peeringMode + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.peeringMode = 0; + + /** + * Creates a new NetworkConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {google.cloud.backupdr.v1.INetworkConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig instance + */ + NetworkConfig.create = function create(properties) { + return new NetworkConfig(properties); + }; + + /** + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {google.cloud.backupdr.v1.INetworkConfig} message NetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); + if (message.peeringMode != null && Object.hasOwnProperty.call(message, "peeringMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.peeringMode); + return writer; + }; + + /** + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {google.cloud.backupdr.v1.INetworkConfig} message NetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkConfig.decode = function 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.backupdr.v1.NetworkConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.network = reader.string(); + break; + } + case 2: { + message.peeringMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.peeringMode != null && message.hasOwnProperty("peeringMode")) + switch (message.peeringMode) { + default: + return "peeringMode: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig + */ + NetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.NetworkConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.NetworkConfig(); + if (object.network != null) + message.network = String(object.network); + switch (object.peeringMode) { + default: + if (typeof object.peeringMode === "number") { + message.peeringMode = object.peeringMode; + break; + } + break; + case "PEERING_MODE_UNSPECIFIED": + case 0: + message.peeringMode = 0; + break; + case "PRIVATE_SERVICE_ACCESS": + case 1: + message.peeringMode = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {google.cloud.backupdr.v1.NetworkConfig} message NetworkConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.network = ""; + object.peeringMode = options.enums === String ? "PEERING_MODE_UNSPECIFIED" : 0; + } + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.peeringMode != null && message.hasOwnProperty("peeringMode")) + object.peeringMode = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode] === undefined ? message.peeringMode : $root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode] : message.peeringMode; + return object; + }; + + /** + * Converts this NetworkConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.NetworkConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkConfig"; + }; + + /** + * PeeringMode enum. + * @name google.cloud.backupdr.v1.NetworkConfig.PeeringMode + * @enum {number} + * @property {number} PEERING_MODE_UNSPECIFIED=0 PEERING_MODE_UNSPECIFIED value + * @property {number} PRIVATE_SERVICE_ACCESS=1 PRIVATE_SERVICE_ACCESS value + */ + NetworkConfig.PeeringMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PEERING_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRIVATE_SERVICE_ACCESS"] = 1; + return values; + })(); + + return NetworkConfig; + })(); + + v1.ManagementURI = (function() { + + /** + * Properties of a ManagementURI. + * @memberof google.cloud.backupdr.v1 + * @interface IManagementURI + * @property {string|null} [webUi] ManagementURI webUi + * @property {string|null} [api] ManagementURI api + */ + + /** + * Constructs a new ManagementURI. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ManagementURI. + * @implements IManagementURI + * @constructor + * @param {google.cloud.backupdr.v1.IManagementURI=} [properties] Properties to set + */ + function ManagementURI(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ManagementURI webUi. + * @member {string} webUi + * @memberof google.cloud.backupdr.v1.ManagementURI + * @instance + */ + ManagementURI.prototype.webUi = ""; + + /** + * ManagementURI api. + * @member {string} api + * @memberof google.cloud.backupdr.v1.ManagementURI + * @instance + */ + ManagementURI.prototype.api = ""; + + /** + * Creates a new ManagementURI instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {google.cloud.backupdr.v1.IManagementURI=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI instance + */ + ManagementURI.create = function create(properties) { + return new ManagementURI(properties); + }; + + /** + * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {google.cloud.backupdr.v1.IManagementURI} message ManagementURI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagementURI.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.webUi != null && Object.hasOwnProperty.call(message, "webUi")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.webUi); + if (message.api != null && Object.hasOwnProperty.call(message, "api")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.api); + return writer; + }; + + /** + * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {google.cloud.backupdr.v1.IManagementURI} message ManagementURI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagementURI.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ManagementURI message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagementURI.decode = function 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.backupdr.v1.ManagementURI(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.webUi = reader.string(); + break; + } + case 2: { + message.api = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ManagementURI message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagementURI.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ManagementURI message. + * @function verify + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ManagementURI.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.webUi != null && message.hasOwnProperty("webUi")) + if (!$util.isString(message.webUi)) + return "webUi: string expected"; + if (message.api != null && message.hasOwnProperty("api")) + if (!$util.isString(message.api)) + return "api: string expected"; + return null; + }; + + /** + * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI + */ + ManagementURI.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ManagementURI) + return object; + var message = new $root.google.cloud.backupdr.v1.ManagementURI(); + if (object.webUi != null) + message.webUi = String(object.webUi); + if (object.api != null) + message.api = String(object.api); + return message; + }; + + /** + * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {google.cloud.backupdr.v1.ManagementURI} message ManagementURI + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ManagementURI.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.webUi = ""; + object.api = ""; + } + if (message.webUi != null && message.hasOwnProperty("webUi")) + object.webUi = message.webUi; + if (message.api != null && message.hasOwnProperty("api")) + object.api = message.api; + return object; + }; + + /** + * Converts this ManagementURI to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ManagementURI + * @instance + * @returns {Object.} JSON object + */ + ManagementURI.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ManagementURI + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ManagementURI + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ManagementURI.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ManagementURI"; + }; + + return ManagementURI; + })(); + + v1.WorkforceIdentityBasedManagementURI = (function() { + + /** + * Properties of a WorkforceIdentityBasedManagementURI. + * @memberof google.cloud.backupdr.v1 + * @interface IWorkforceIdentityBasedManagementURI + * @property {string|null} [firstPartyManagementUri] WorkforceIdentityBasedManagementURI firstPartyManagementUri + * @property {string|null} [thirdPartyManagementUri] WorkforceIdentityBasedManagementURI thirdPartyManagementUri + */ + + /** + * Constructs a new WorkforceIdentityBasedManagementURI. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a WorkforceIdentityBasedManagementURI. + * @implements IWorkforceIdentityBasedManagementURI + * @constructor + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI=} [properties] Properties to set + */ + function WorkforceIdentityBasedManagementURI(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkforceIdentityBasedManagementURI firstPartyManagementUri. + * @member {string} firstPartyManagementUri + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @instance + */ + WorkforceIdentityBasedManagementURI.prototype.firstPartyManagementUri = ""; + + /** + * WorkforceIdentityBasedManagementURI thirdPartyManagementUri. + * @member {string} thirdPartyManagementUri + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @instance + */ + WorkforceIdentityBasedManagementURI.prototype.thirdPartyManagementUri = ""; + + /** + * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI instance + */ + WorkforceIdentityBasedManagementURI.create = function create(properties) { + return new WorkforceIdentityBasedManagementURI(properties); + }; + + /** + * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkforceIdentityBasedManagementURI.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.firstPartyManagementUri != null && Object.hasOwnProperty.call(message, "firstPartyManagementUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.firstPartyManagementUri); + if (message.thirdPartyManagementUri != null && Object.hasOwnProperty.call(message, "thirdPartyManagementUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.thirdPartyManagementUri); + return writer; + }; + + /** + * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkforceIdentityBasedManagementURI.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkforceIdentityBasedManagementURI.decode = function 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.backupdr.v1.WorkforceIdentityBasedManagementURI(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.firstPartyManagementUri = reader.string(); + break; + } + case 2: { + message.thirdPartyManagementUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkforceIdentityBasedManagementURI.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkforceIdentityBasedManagementURI message. + * @function verify + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkforceIdentityBasedManagementURI.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.firstPartyManagementUri != null && message.hasOwnProperty("firstPartyManagementUri")) + if (!$util.isString(message.firstPartyManagementUri)) + return "firstPartyManagementUri: string expected"; + if (message.thirdPartyManagementUri != null && message.hasOwnProperty("thirdPartyManagementUri")) + if (!$util.isString(message.thirdPartyManagementUri)) + return "thirdPartyManagementUri: string expected"; + return null; + }; + + /** + * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI + */ + WorkforceIdentityBasedManagementURI.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI) + return object; + var message = new $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI(); + if (object.firstPartyManagementUri != null) + message.firstPartyManagementUri = String(object.firstPartyManagementUri); + if (object.thirdPartyManagementUri != null) + message.thirdPartyManagementUri = String(object.thirdPartyManagementUri); + return message; + }; + + /** + * Creates a plain object from a WorkforceIdentityBasedManagementURI message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkforceIdentityBasedManagementURI.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.firstPartyManagementUri = ""; + object.thirdPartyManagementUri = ""; + } + if (message.firstPartyManagementUri != null && message.hasOwnProperty("firstPartyManagementUri")) + object.firstPartyManagementUri = message.firstPartyManagementUri; + if (message.thirdPartyManagementUri != null && message.hasOwnProperty("thirdPartyManagementUri")) + object.thirdPartyManagementUri = message.thirdPartyManagementUri; + return object; + }; + + /** + * Converts this WorkforceIdentityBasedManagementURI to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @instance + * @returns {Object.} JSON object + */ + WorkforceIdentityBasedManagementURI.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkforceIdentityBasedManagementURI + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkforceIdentityBasedManagementURI.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI"; + }; + + return WorkforceIdentityBasedManagementURI; + })(); + + v1.WorkforceIdentityBasedOAuth2ClientID = (function() { + + /** + * Properties of a WorkforceIdentityBasedOAuth2ClientID. + * @memberof google.cloud.backupdr.v1 + * @interface IWorkforceIdentityBasedOAuth2ClientID + * @property {string|null} [firstPartyOauth2ClientId] WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId + * @property {string|null} [thirdPartyOauth2ClientId] WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId + */ + + /** + * Constructs a new WorkforceIdentityBasedOAuth2ClientID. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a WorkforceIdentityBasedOAuth2ClientID. + * @implements IWorkforceIdentityBasedOAuth2ClientID + * @constructor + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID=} [properties] Properties to set + */ + function WorkforceIdentityBasedOAuth2ClientID(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId. + * @member {string} firstPartyOauth2ClientId + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @instance + */ + WorkforceIdentityBasedOAuth2ClientID.prototype.firstPartyOauth2ClientId = ""; + + /** + * WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId. + * @member {string} thirdPartyOauth2ClientId + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @instance + */ + WorkforceIdentityBasedOAuth2ClientID.prototype.thirdPartyOauth2ClientId = ""; + + /** + * Creates a new WorkforceIdentityBasedOAuth2ClientID instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @static + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID instance + */ + WorkforceIdentityBasedOAuth2ClientID.create = function create(properties) { + return new WorkforceIdentityBasedOAuth2ClientID(properties); + }; + + /** + * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @static + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID} message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkforceIdentityBasedOAuth2ClientID.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.firstPartyOauth2ClientId != null && Object.hasOwnProperty.call(message, "firstPartyOauth2ClientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.firstPartyOauth2ClientId); + if (message.thirdPartyOauth2ClientId != null && Object.hasOwnProperty.call(message, "thirdPartyOauth2ClientId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.thirdPartyOauth2ClientId); + return writer; + }; + + /** + * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @static + * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID} message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkforceIdentityBasedOAuth2ClientID.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkforceIdentityBasedOAuth2ClientID.decode = function 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.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.firstPartyOauth2ClientId = reader.string(); + break; + } + case 2: { + message.thirdPartyOauth2ClientId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkforceIdentityBasedOAuth2ClientID.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkforceIdentityBasedOAuth2ClientID message. + * @function verify + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkforceIdentityBasedOAuth2ClientID.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.firstPartyOauth2ClientId != null && message.hasOwnProperty("firstPartyOauth2ClientId")) + if (!$util.isString(message.firstPartyOauth2ClientId)) + return "firstPartyOauth2ClientId: string expected"; + if (message.thirdPartyOauth2ClientId != null && message.hasOwnProperty("thirdPartyOauth2ClientId")) + if (!$util.isString(message.thirdPartyOauth2ClientId)) + return "thirdPartyOauth2ClientId: string expected"; + return null; + }; + + /** + * Creates a WorkforceIdentityBasedOAuth2ClientID message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID + */ + WorkforceIdentityBasedOAuth2ClientID.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID) + return object; + var message = new $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID(); + if (object.firstPartyOauth2ClientId != null) + message.firstPartyOauth2ClientId = String(object.firstPartyOauth2ClientId); + if (object.thirdPartyOauth2ClientId != null) + message.thirdPartyOauth2ClientId = String(object.thirdPartyOauth2ClientId); + return message; + }; + + /** + * Creates a plain object from a WorkforceIdentityBasedOAuth2ClientID message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @static + * @param {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} message WorkforceIdentityBasedOAuth2ClientID + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkforceIdentityBasedOAuth2ClientID.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.firstPartyOauth2ClientId = ""; + object.thirdPartyOauth2ClientId = ""; + } + if (message.firstPartyOauth2ClientId != null && message.hasOwnProperty("firstPartyOauth2ClientId")) + object.firstPartyOauth2ClientId = message.firstPartyOauth2ClientId; + if (message.thirdPartyOauth2ClientId != null && message.hasOwnProperty("thirdPartyOauth2ClientId")) + object.thirdPartyOauth2ClientId = message.thirdPartyOauth2ClientId; + return object; + }; + + /** + * Converts this WorkforceIdentityBasedOAuth2ClientID to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @instance + * @returns {Object.} JSON object + */ + WorkforceIdentityBasedOAuth2ClientID.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkforceIdentityBasedOAuth2ClientID + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkforceIdentityBasedOAuth2ClientID.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID"; + }; + + return WorkforceIdentityBasedOAuth2ClientID; + })(); + + v1.ManagementServer = (function() { + + /** + * Properties of a ManagementServer. + * @memberof google.cloud.backupdr.v1 + * @interface IManagementServer + * @property {string|null} [name] ManagementServer name + * @property {string|null} [description] ManagementServer description + * @property {Object.|null} [labels] ManagementServer labels + * @property {google.protobuf.ITimestamp|null} [createTime] ManagementServer createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ManagementServer updateTime + * @property {google.cloud.backupdr.v1.ManagementServer.InstanceType|null} [type] ManagementServer type + * @property {google.cloud.backupdr.v1.IManagementURI|null} [managementUri] ManagementServer managementUri + * @property {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null} [workforceIdentityBasedManagementUri] ManagementServer workforceIdentityBasedManagementUri + * @property {google.cloud.backupdr.v1.ManagementServer.InstanceState|null} [state] ManagementServer state + * @property {Array.|null} [networks] ManagementServer networks + * @property {string|null} [etag] ManagementServer etag + * @property {string|null} [oauth2ClientId] ManagementServer oauth2ClientId + * @property {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null} [workforceIdentityBasedOauth2ClientId] ManagementServer workforceIdentityBasedOauth2ClientId + * @property {Array.|null} [baProxyUri] ManagementServer baProxyUri + * @property {google.protobuf.IBoolValue|null} [satisfiesPzs] ManagementServer satisfiesPzs + * @property {boolean|null} [satisfiesPzi] ManagementServer satisfiesPzi + */ + + /** + * Constructs a new ManagementServer. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ManagementServer. + * @implements IManagementServer + * @constructor + * @param {google.cloud.backupdr.v1.IManagementServer=} [properties] Properties to set + */ + function ManagementServer(properties) { + this.labels = {}; + this.networks = []; + this.baProxyUri = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ManagementServer name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.name = ""; + + /** + * ManagementServer description. + * @member {string} description + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.description = ""; + + /** + * ManagementServer labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.labels = $util.emptyObject; + + /** + * ManagementServer createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.createTime = null; + + /** + * ManagementServer updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.updateTime = null; + + /** + * ManagementServer type. + * @member {google.cloud.backupdr.v1.ManagementServer.InstanceType} type + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.type = 0; + + /** + * ManagementServer managementUri. + * @member {google.cloud.backupdr.v1.IManagementURI|null|undefined} managementUri + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.managementUri = null; + + /** + * ManagementServer workforceIdentityBasedManagementUri. + * @member {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null|undefined} workforceIdentityBasedManagementUri + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.workforceIdentityBasedManagementUri = null; + + /** + * ManagementServer state. + * @member {google.cloud.backupdr.v1.ManagementServer.InstanceState} state + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.state = 0; + + /** + * ManagementServer networks. + * @member {Array.} networks + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.networks = $util.emptyArray; + + /** + * ManagementServer etag. + * @member {string} etag + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.etag = ""; + + /** + * ManagementServer oauth2ClientId. + * @member {string} oauth2ClientId + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.oauth2ClientId = ""; + + /** + * ManagementServer workforceIdentityBasedOauth2ClientId. + * @member {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null|undefined} workforceIdentityBasedOauth2ClientId + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.workforceIdentityBasedOauth2ClientId = null; + + /** + * ManagementServer baProxyUri. + * @member {Array.} baProxyUri + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.baProxyUri = $util.emptyArray; + + /** + * ManagementServer satisfiesPzs. + * @member {google.protobuf.IBoolValue|null|undefined} satisfiesPzs + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.satisfiesPzs = null; + + /** + * ManagementServer satisfiesPzi. + * @member {boolean} satisfiesPzi + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + */ + ManagementServer.prototype.satisfiesPzi = false; + + /** + * Creates a new ManagementServer instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ManagementServer + * @static + * @param {google.cloud.backupdr.v1.IManagementServer=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer instance + */ + ManagementServer.create = function create(properties) { + return new ManagementServer(properties); + }; + + /** + * Encodes the specified ManagementServer message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ManagementServer + * @static + * @param {google.cloud.backupdr.v1.IManagementServer} message ManagementServer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagementServer.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.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.networks != null && message.networks.length) + for (var i = 0; i < message.networks.length; ++i) + $root.google.cloud.backupdr.v1.NetworkConfig.encode(message.networks[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.description); + if (message.managementUri != null && Object.hasOwnProperty.call(message, "managementUri")) + $root.google.cloud.backupdr.v1.ManagementURI.encode(message.managementUri, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.etag); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.type); + if (message.oauth2ClientId != null && Object.hasOwnProperty.call(message, "oauth2ClientId")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.oauth2ClientId); + if (message.workforceIdentityBasedManagementUri != null && Object.hasOwnProperty.call(message, "workforceIdentityBasedManagementUri")) + $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.encode(message.workforceIdentityBasedManagementUri, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.workforceIdentityBasedOauth2ClientId != null && Object.hasOwnProperty.call(message, "workforceIdentityBasedOauth2ClientId")) + $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.encode(message.workforceIdentityBasedOauth2ClientId, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.baProxyUri != null && message.baProxyUri.length) + for (var i = 0; i < message.baProxyUri.length; ++i) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.baProxyUri[i]); + if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + $root.google.protobuf.BoolValue.encode(message.satisfiesPzs, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.satisfiesPzi); + return writer; + }; + + /** + * Encodes the specified ManagementServer message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ManagementServer + * @static + * @param {google.cloud.backupdr.v1.IManagementServer} message ManagementServer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagementServer.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ManagementServer message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ManagementServer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagementServer.decode = function 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.backupdr.v1.ManagementServer(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 9: { + message.description = reader.string(); + 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 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 14: { + message.type = reader.int32(); + break; + } + case 11: { + message.managementUri = $root.google.cloud.backupdr.v1.ManagementURI.decode(reader, reader.uint32()); + break; + } + case 16: { + message.workforceIdentityBasedManagementUri = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.decode(reader, reader.uint32()); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 8: { + if (!(message.networks && message.networks.length)) + message.networks = []; + message.networks.push($root.google.cloud.backupdr.v1.NetworkConfig.decode(reader, reader.uint32())); + break; + } + case 13: { + message.etag = reader.string(); + break; + } + case 15: { + message.oauth2ClientId = reader.string(); + break; + } + case 17: { + message.workforceIdentityBasedOauth2ClientId = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.decode(reader, reader.uint32()); + break; + } + case 18: { + if (!(message.baProxyUri && message.baProxyUri.length)) + message.baProxyUri = []; + message.baProxyUri.push(reader.string()); + break; + } + case 19: { + message.satisfiesPzs = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 20: { + message.satisfiesPzi = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ManagementServer message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ManagementServer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagementServer.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ManagementServer message. + * @function verify + * @memberof google.cloud.backupdr.v1.ManagementServer + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ManagementServer.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + 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.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + if (message.managementUri != null && message.hasOwnProperty("managementUri")) { + var error = $root.google.cloud.backupdr.v1.ManagementURI.verify(message.managementUri); + if (error) + return "managementUri." + error; + } + if (message.workforceIdentityBasedManagementUri != null && message.hasOwnProperty("workforceIdentityBasedManagementUri")) { + var error = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify(message.workforceIdentityBasedManagementUri); + if (error) + return "workforceIdentityBasedManagementUri." + 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: + break; + } + if (message.networks != null && message.hasOwnProperty("networks")) { + if (!Array.isArray(message.networks)) + return "networks: array expected"; + for (var i = 0; i < message.networks.length; ++i) { + var error = $root.google.cloud.backupdr.v1.NetworkConfig.verify(message.networks[i]); + if (error) + return "networks." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.oauth2ClientId != null && message.hasOwnProperty("oauth2ClientId")) + if (!$util.isString(message.oauth2ClientId)) + return "oauth2ClientId: string expected"; + if (message.workforceIdentityBasedOauth2ClientId != null && message.hasOwnProperty("workforceIdentityBasedOauth2ClientId")) { + var error = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify(message.workforceIdentityBasedOauth2ClientId); + if (error) + return "workforceIdentityBasedOauth2ClientId." + error; + } + if (message.baProxyUri != null && message.hasOwnProperty("baProxyUri")) { + if (!Array.isArray(message.baProxyUri)) + return "baProxyUri: array expected"; + for (var i = 0; i < message.baProxyUri.length; ++i) + if (!$util.isString(message.baProxyUri[i])) + return "baProxyUri: string[] expected"; + } + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { + var error = $root.google.protobuf.BoolValue.verify(message.satisfiesPzs); + if (error) + return "satisfiesPzs." + error; + } + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + if (typeof message.satisfiesPzi !== "boolean") + return "satisfiesPzi: boolean expected"; + return null; + }; + + /** + * Creates a ManagementServer message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ManagementServer + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer + */ + ManagementServer.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ManagementServer) + return object; + var message = new $root.google.cloud.backupdr.v1.ManagementServer(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.ManagementServer.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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.ManagementServer.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.backupdr.v1.ManagementServer.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "INSTANCE_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "BACKUP_RESTORE": + case 1: + message.type = 1; + break; + } + if (object.managementUri != null) { + if (typeof object.managementUri !== "object") + throw TypeError(".google.cloud.backupdr.v1.ManagementServer.managementUri: object expected"); + message.managementUri = $root.google.cloud.backupdr.v1.ManagementURI.fromObject(object.managementUri); + } + if (object.workforceIdentityBasedManagementUri != null) { + if (typeof object.workforceIdentityBasedManagementUri !== "object") + throw TypeError(".google.cloud.backupdr.v1.ManagementServer.workforceIdentityBasedManagementUri: object expected"); + message.workforceIdentityBasedManagementUri = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.fromObject(object.workforceIdentityBasedManagementUri); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "INSTANCE_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "READY": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "DELETING": + case 4: + message.state = 4; + break; + case "REPAIRING": + case 5: + message.state = 5; + break; + case "MAINTENANCE": + case 6: + message.state = 6; + break; + case "ERROR": + case 7: + message.state = 7; + break; + } + if (object.networks) { + if (!Array.isArray(object.networks)) + throw TypeError(".google.cloud.backupdr.v1.ManagementServer.networks: array expected"); + message.networks = []; + for (var i = 0; i < object.networks.length; ++i) { + if (typeof object.networks[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ManagementServer.networks: object expected"); + message.networks[i] = $root.google.cloud.backupdr.v1.NetworkConfig.fromObject(object.networks[i]); + } + } + if (object.etag != null) + message.etag = String(object.etag); + if (object.oauth2ClientId != null) + message.oauth2ClientId = String(object.oauth2ClientId); + if (object.workforceIdentityBasedOauth2ClientId != null) { + if (typeof object.workforceIdentityBasedOauth2ClientId !== "object") + throw TypeError(".google.cloud.backupdr.v1.ManagementServer.workforceIdentityBasedOauth2ClientId: object expected"); + message.workforceIdentityBasedOauth2ClientId = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.fromObject(object.workforceIdentityBasedOauth2ClientId); + } + if (object.baProxyUri) { + if (!Array.isArray(object.baProxyUri)) + throw TypeError(".google.cloud.backupdr.v1.ManagementServer.baProxyUri: array expected"); + message.baProxyUri = []; + for (var i = 0; i < object.baProxyUri.length; ++i) + message.baProxyUri[i] = String(object.baProxyUri[i]); + } + if (object.satisfiesPzs != null) { + if (typeof object.satisfiesPzs !== "object") + throw TypeError(".google.cloud.backupdr.v1.ManagementServer.satisfiesPzs: object expected"); + message.satisfiesPzs = $root.google.protobuf.BoolValue.fromObject(object.satisfiesPzs); + } + if (object.satisfiesPzi != null) + message.satisfiesPzi = Boolean(object.satisfiesPzi); + return message; + }; + + /** + * Creates a plain object from a ManagementServer message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ManagementServer + * @static + * @param {google.cloud.backupdr.v1.ManagementServer} message ManagementServer + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ManagementServer.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.networks = []; + object.baProxyUri = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "INSTANCE_STATE_UNSPECIFIED" : 0; + object.description = ""; + object.managementUri = null; + object.etag = ""; + object.type = options.enums === String ? "INSTANCE_TYPE_UNSPECIFIED" : 0; + object.oauth2ClientId = ""; + object.workforceIdentityBasedManagementUri = null; + object.workforceIdentityBasedOauth2ClientId = null; + object.satisfiesPzs = null; + object.satisfiesPzi = false; + } + 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.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.ManagementServer.InstanceState[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.ManagementServer.InstanceState[message.state] : message.state; + if (message.networks && message.networks.length) { + object.networks = []; + for (var j = 0; j < message.networks.length; ++j) + object.networks[j] = $root.google.cloud.backupdr.v1.NetworkConfig.toObject(message.networks[j], options); + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.managementUri != null && message.hasOwnProperty("managementUri")) + object.managementUri = $root.google.cloud.backupdr.v1.ManagementURI.toObject(message.managementUri, options); + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.backupdr.v1.ManagementServer.InstanceType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.ManagementServer.InstanceType[message.type] : message.type; + if (message.oauth2ClientId != null && message.hasOwnProperty("oauth2ClientId")) + object.oauth2ClientId = message.oauth2ClientId; + if (message.workforceIdentityBasedManagementUri != null && message.hasOwnProperty("workforceIdentityBasedManagementUri")) + object.workforceIdentityBasedManagementUri = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.toObject(message.workforceIdentityBasedManagementUri, options); + if (message.workforceIdentityBasedOauth2ClientId != null && message.hasOwnProperty("workforceIdentityBasedOauth2ClientId")) + object.workforceIdentityBasedOauth2ClientId = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.toObject(message.workforceIdentityBasedOauth2ClientId, options); + if (message.baProxyUri && message.baProxyUri.length) { + object.baProxyUri = []; + for (var j = 0; j < message.baProxyUri.length; ++j) + object.baProxyUri[j] = message.baProxyUri[j]; + } + if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + object.satisfiesPzs = $root.google.protobuf.BoolValue.toObject(message.satisfiesPzs, options); + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + object.satisfiesPzi = message.satisfiesPzi; + return object; + }; + + /** + * Converts this ManagementServer to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ManagementServer + * @instance + * @returns {Object.} JSON object + */ + ManagementServer.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ManagementServer + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ManagementServer + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ManagementServer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ManagementServer"; + }; + + /** + * InstanceType enum. + * @name google.cloud.backupdr.v1.ManagementServer.InstanceType + * @enum {number} + * @property {number} INSTANCE_TYPE_UNSPECIFIED=0 INSTANCE_TYPE_UNSPECIFIED value + * @property {number} BACKUP_RESTORE=1 BACKUP_RESTORE value + */ + ManagementServer.InstanceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INSTANCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKUP_RESTORE"] = 1; + return values; + })(); + + /** + * InstanceState enum. + * @name google.cloud.backupdr.v1.ManagementServer.InstanceState + * @enum {number} + * @property {number} INSTANCE_STATE_UNSPECIFIED=0 INSTANCE_STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value + * @property {number} UPDATING=3 UPDATING value + * @property {number} DELETING=4 DELETING value + * @property {number} REPAIRING=5 REPAIRING value + * @property {number} MAINTENANCE=6 MAINTENANCE value + * @property {number} ERROR=7 ERROR value + */ + ManagementServer.InstanceState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INSTANCE_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "DELETING"] = 4; + values[valuesById[5] = "REPAIRING"] = 5; + values[valuesById[6] = "MAINTENANCE"] = 6; + values[valuesById[7] = "ERROR"] = 7; + return values; + })(); + + return ManagementServer; + })(); + + v1.ListManagementServersRequest = (function() { + + /** + * Properties of a ListManagementServersRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListManagementServersRequest + * @property {string|null} [parent] ListManagementServersRequest parent + * @property {number|null} [pageSize] ListManagementServersRequest pageSize + * @property {string|null} [pageToken] ListManagementServersRequest pageToken + * @property {string|null} [filter] ListManagementServersRequest filter + * @property {string|null} [orderBy] ListManagementServersRequest orderBy + */ + + /** + * Constructs a new ListManagementServersRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListManagementServersRequest. + * @implements IListManagementServersRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListManagementServersRequest=} [properties] Properties to set + */ + function ListManagementServersRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListManagementServersRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @instance + */ + ListManagementServersRequest.prototype.parent = ""; + + /** + * ListManagementServersRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @instance + */ + ListManagementServersRequest.prototype.pageSize = 0; + + /** + * ListManagementServersRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @instance + */ + ListManagementServersRequest.prototype.pageToken = ""; + + /** + * ListManagementServersRequest filter. + * @member {string|null|undefined} filter + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @instance + */ + ListManagementServersRequest.prototype.filter = null; + + /** + * ListManagementServersRequest orderBy. + * @member {string|null|undefined} orderBy + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @instance + */ + ListManagementServersRequest.prototype.orderBy = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ListManagementServersRequest _filter. + * @member {"filter"|undefined} _filter + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @instance + */ + Object.defineProperty(ListManagementServersRequest.prototype, "_filter", { + get: $util.oneOfGetter($oneOfFields = ["filter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ListManagementServersRequest _orderBy. + * @member {"orderBy"|undefined} _orderBy + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @instance + */ + Object.defineProperty(ListManagementServersRequest.prototype, "_orderBy", { + get: $util.oneOfGetter($oneOfFields = ["orderBy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListManagementServersRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @static + * @param {google.cloud.backupdr.v1.IListManagementServersRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest instance + */ + ListManagementServersRequest.create = function create(properties) { + return new ListManagementServersRequest(properties); + }; + + /** + * Encodes the specified ListManagementServersRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @static + * @param {google.cloud.backupdr.v1.IListManagementServersRequest} message ListManagementServersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListManagementServersRequest.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 ListManagementServersRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @static + * @param {google.cloud.backupdr.v1.IListManagementServersRequest} message ListManagementServersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListManagementServersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListManagementServersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListManagementServersRequest.decode = function 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.backupdr.v1.ListManagementServersRequest(); + 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 ListManagementServersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListManagementServersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListManagementServersRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListManagementServersRequest.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.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")) { + properties._filter = 1; + if (!$util.isString(message.filter)) + return "filter: string expected"; + } + if (message.orderBy != null && message.hasOwnProperty("orderBy")) { + properties._orderBy = 1; + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + } + return null; + }; + + /** + * Creates a ListManagementServersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest + */ + ListManagementServersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListManagementServersRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListManagementServersRequest(); + 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 ListManagementServersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @static + * @param {google.cloud.backupdr.v1.ListManagementServersRequest} message ListManagementServersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListManagementServersRequest.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; + if (message.filter != null && message.hasOwnProperty("filter")) { + object.filter = message.filter; + if (options.oneofs) + object._filter = "filter"; + } + if (message.orderBy != null && message.hasOwnProperty("orderBy")) { + object.orderBy = message.orderBy; + if (options.oneofs) + object._orderBy = "orderBy"; + } + return object; + }; + + /** + * Converts this ListManagementServersRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @instance + * @returns {Object.} JSON object + */ + ListManagementServersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListManagementServersRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListManagementServersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListManagementServersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListManagementServersRequest"; + }; + + return ListManagementServersRequest; + })(); + + v1.ListManagementServersResponse = (function() { + + /** + * Properties of a ListManagementServersResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListManagementServersResponse + * @property {Array.|null} [managementServers] ListManagementServersResponse managementServers + * @property {string|null} [nextPageToken] ListManagementServersResponse nextPageToken + * @property {Array.|null} [unreachable] ListManagementServersResponse unreachable + */ + + /** + * Constructs a new ListManagementServersResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListManagementServersResponse. + * @implements IListManagementServersResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListManagementServersResponse=} [properties] Properties to set + */ + function ListManagementServersResponse(properties) { + this.managementServers = []; + 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]]; + } + + /** + * ListManagementServersResponse managementServers. + * @member {Array.} managementServers + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @instance + */ + ListManagementServersResponse.prototype.managementServers = $util.emptyArray; + + /** + * ListManagementServersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @instance + */ + ListManagementServersResponse.prototype.nextPageToken = ""; + + /** + * ListManagementServersResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @instance + */ + ListManagementServersResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListManagementServersResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @static + * @param {google.cloud.backupdr.v1.IListManagementServersResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse instance + */ + ListManagementServersResponse.create = function create(properties) { + return new ListManagementServersResponse(properties); + }; + + /** + * Encodes the specified ListManagementServersResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @static + * @param {google.cloud.backupdr.v1.IListManagementServersResponse} message ListManagementServersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListManagementServersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.managementServers != null && message.managementServers.length) + for (var i = 0; i < message.managementServers.length; ++i) + $root.google.cloud.backupdr.v1.ManagementServer.encode(message.managementServers[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 ListManagementServersResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @static + * @param {google.cloud.backupdr.v1.IListManagementServersResponse} message ListManagementServersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListManagementServersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListManagementServersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListManagementServersResponse.decode = function 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.backupdr.v1.ListManagementServersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.managementServers && message.managementServers.length)) + message.managementServers = []; + message.managementServers.push($root.google.cloud.backupdr.v1.ManagementServer.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 ListManagementServersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListManagementServersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListManagementServersResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListManagementServersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.managementServers != null && message.hasOwnProperty("managementServers")) { + if (!Array.isArray(message.managementServers)) + return "managementServers: array expected"; + for (var i = 0; i < message.managementServers.length; ++i) { + var error = $root.google.cloud.backupdr.v1.ManagementServer.verify(message.managementServers[i]); + if (error) + return "managementServers." + 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 ListManagementServersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse + */ + ListManagementServersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListManagementServersResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListManagementServersResponse(); + if (object.managementServers) { + if (!Array.isArray(object.managementServers)) + throw TypeError(".google.cloud.backupdr.v1.ListManagementServersResponse.managementServers: array expected"); + message.managementServers = []; + for (var i = 0; i < object.managementServers.length; ++i) { + if (typeof object.managementServers[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListManagementServersResponse.managementServers: object expected"); + message.managementServers[i] = $root.google.cloud.backupdr.v1.ManagementServer.fromObject(object.managementServers[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListManagementServersResponse.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 ListManagementServersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @static + * @param {google.cloud.backupdr.v1.ListManagementServersResponse} message ListManagementServersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListManagementServersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.managementServers = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.managementServers && message.managementServers.length) { + object.managementServers = []; + for (var j = 0; j < message.managementServers.length; ++j) + object.managementServers[j] = $root.google.cloud.backupdr.v1.ManagementServer.toObject(message.managementServers[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 ListManagementServersResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @instance + * @returns {Object.} JSON object + */ + ListManagementServersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListManagementServersResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListManagementServersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListManagementServersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListManagementServersResponse"; + }; + + return ListManagementServersResponse; + })(); + + v1.GetManagementServerRequest = (function() { + + /** + * Properties of a GetManagementServerRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetManagementServerRequest + * @property {string|null} [name] GetManagementServerRequest name + */ + + /** + * Constructs a new GetManagementServerRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetManagementServerRequest. + * @implements IGetManagementServerRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetManagementServerRequest=} [properties] Properties to set + */ + function GetManagementServerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetManagementServerRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @instance + */ + GetManagementServerRequest.prototype.name = ""; + + /** + * Creates a new GetManagementServerRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.IGetManagementServerRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest instance + */ + GetManagementServerRequest.create = function create(properties) { + return new GetManagementServerRequest(properties); + }; + + /** + * Encodes the specified GetManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} message GetManagementServerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetManagementServerRequest.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 GetManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} message GetManagementServerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetManagementServerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetManagementServerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetManagementServerRequest.decode = function 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.backupdr.v1.GetManagementServerRequest(); + 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 GetManagementServerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetManagementServerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetManagementServerRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetManagementServerRequest.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 GetManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest + */ + GetManagementServerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetManagementServerRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetManagementServerRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetManagementServerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.GetManagementServerRequest} message GetManagementServerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetManagementServerRequest.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 GetManagementServerRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @instance + * @returns {Object.} JSON object + */ + GetManagementServerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetManagementServerRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetManagementServerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetManagementServerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetManagementServerRequest"; + }; + + return GetManagementServerRequest; + })(); + + v1.CreateManagementServerRequest = (function() { + + /** + * Properties of a CreateManagementServerRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ICreateManagementServerRequest + * @property {string|null} [parent] CreateManagementServerRequest parent + * @property {string|null} [managementServerId] CreateManagementServerRequest managementServerId + * @property {google.cloud.backupdr.v1.IManagementServer|null} [managementServer] CreateManagementServerRequest managementServer + * @property {string|null} [requestId] CreateManagementServerRequest requestId + */ + + /** + * Constructs a new CreateManagementServerRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CreateManagementServerRequest. + * @implements ICreateManagementServerRequest + * @constructor + * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest=} [properties] Properties to set + */ + function CreateManagementServerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateManagementServerRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @instance + */ + CreateManagementServerRequest.prototype.parent = ""; + + /** + * CreateManagementServerRequest managementServerId. + * @member {string} managementServerId + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @instance + */ + CreateManagementServerRequest.prototype.managementServerId = ""; + + /** + * CreateManagementServerRequest managementServer. + * @member {google.cloud.backupdr.v1.IManagementServer|null|undefined} managementServer + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @instance + */ + CreateManagementServerRequest.prototype.managementServer = null; + + /** + * CreateManagementServerRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @instance + */ + CreateManagementServerRequest.prototype.requestId = ""; + + /** + * Creates a new CreateManagementServerRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest instance + */ + CreateManagementServerRequest.create = function create(properties) { + return new CreateManagementServerRequest(properties); + }; + + /** + * Encodes the specified CreateManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} message CreateManagementServerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateManagementServerRequest.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.managementServerId != null && Object.hasOwnProperty.call(message, "managementServerId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.managementServerId); + if (message.managementServer != null && Object.hasOwnProperty.call(message, "managementServer")) + $root.google.cloud.backupdr.v1.ManagementServer.encode(message.managementServer, 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 CreateManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} message CreateManagementServerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateManagementServerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateManagementServerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateManagementServerRequest.decode = function 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.backupdr.v1.CreateManagementServerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.managementServerId = reader.string(); + break; + } + case 3: { + message.managementServer = $root.google.cloud.backupdr.v1.ManagementServer.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateManagementServerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateManagementServerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateManagementServerRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateManagementServerRequest.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.managementServerId != null && message.hasOwnProperty("managementServerId")) + if (!$util.isString(message.managementServerId)) + return "managementServerId: string expected"; + if (message.managementServer != null && message.hasOwnProperty("managementServer")) { + var error = $root.google.cloud.backupdr.v1.ManagementServer.verify(message.managementServer); + if (error) + return "managementServer." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest + */ + CreateManagementServerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CreateManagementServerRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.CreateManagementServerRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.managementServerId != null) + message.managementServerId = String(object.managementServerId); + if (object.managementServer != null) { + if (typeof object.managementServer !== "object") + throw TypeError(".google.cloud.backupdr.v1.CreateManagementServerRequest.managementServer: object expected"); + message.managementServer = $root.google.cloud.backupdr.v1.ManagementServer.fromObject(object.managementServer); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateManagementServerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.CreateManagementServerRequest} message CreateManagementServerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateManagementServerRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.managementServerId = ""; + object.managementServer = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.managementServerId != null && message.hasOwnProperty("managementServerId")) + object.managementServerId = message.managementServerId; + if (message.managementServer != null && message.hasOwnProperty("managementServer")) + object.managementServer = $root.google.cloud.backupdr.v1.ManagementServer.toObject(message.managementServer, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateManagementServerRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @instance + * @returns {Object.} JSON object + */ + CreateManagementServerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateManagementServerRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateManagementServerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateManagementServerRequest"; + }; + + return CreateManagementServerRequest; + })(); + + v1.DeleteManagementServerRequest = (function() { + + /** + * Properties of a DeleteManagementServerRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IDeleteManagementServerRequest + * @property {string|null} [name] DeleteManagementServerRequest name + * @property {string|null} [requestId] DeleteManagementServerRequest requestId + */ + + /** + * Constructs a new DeleteManagementServerRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DeleteManagementServerRequest. + * @implements IDeleteManagementServerRequest + * @constructor + * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest=} [properties] Properties to set + */ + function DeleteManagementServerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteManagementServerRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @instance + */ + DeleteManagementServerRequest.prototype.name = ""; + + /** + * DeleteManagementServerRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @instance + */ + DeleteManagementServerRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteManagementServerRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest instance + */ + DeleteManagementServerRequest.create = function create(properties) { + return new DeleteManagementServerRequest(properties); + }; + + /** + * Encodes the specified DeleteManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} message DeleteManagementServerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteManagementServerRequest.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 DeleteManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} message DeleteManagementServerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteManagementServerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteManagementServerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteManagementServerRequest.decode = function 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.backupdr.v1.DeleteManagementServerRequest(); + 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 DeleteManagementServerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteManagementServerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteManagementServerRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteManagementServerRequest.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 DeleteManagementServerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest + */ + DeleteManagementServerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteManagementServerRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.DeleteManagementServerRequest(); + 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 DeleteManagementServerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @static + * @param {google.cloud.backupdr.v1.DeleteManagementServerRequest} message DeleteManagementServerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteManagementServerRequest.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 DeleteManagementServerRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteManagementServerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteManagementServerRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteManagementServerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteManagementServerRequest"; + }; + + return DeleteManagementServerRequest; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.backupdr.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 {Object.|null} [additionalInfo] OperationMetadata additionalInfo + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.backupdr.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + this.additionalInfo = {}; + if (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.backupdr.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * OperationMetadata additionalInfo. + * @member {Object.} additionalInfo + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.additionalInfo = $util.emptyObject; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @static + * @param {google.cloud.backupdr.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.backupdr.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @static + * @param {google.cloud.backupdr.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.additionalInfo != null && Object.hasOwnProperty.call(message, "additionalInfo")) + for (var keys = Object.keys(message.additionalInfo), i = 0; i < keys.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.additionalInfo[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @static + * @param {google.cloud.backupdr.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.backupdr.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.backupdr.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.backupdr.v1.OperationMetadata(), key, value; + 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: { + if (message.additionalInfo === $util.emptyObject) + message.additionalInfo = {}; + 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.additionalInfo[key] = value; + 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.backupdr.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.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.backupdr.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.additionalInfo != null && message.hasOwnProperty("additionalInfo")) { + if (!$util.isObject(message.additionalInfo)) + return "additionalInfo: object expected"; + var key = Object.keys(message.additionalInfo); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.additionalInfo[key[i]])) + return "additionalInfo: string{k:string} expected"; + } + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.backupdr.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.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.backupdr.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.additionalInfo) { + if (typeof object.additionalInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.OperationMetadata.additionalInfo: object expected"); + message.additionalInfo = {}; + for (var keys = Object.keys(object.additionalInfo), i = 0; i < keys.length; ++i) + message.additionalInfo[keys[i]] = String(object.additionalInfo[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.OperationMetadata + * @static + * @param {google.cloud.backupdr.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.objects || options.defaults) + object.additionalInfo = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + } + 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; + var keys2; + if (message.additionalInfo && (keys2 = Object.keys(message.additionalInfo)).length) { + object.additionalInfo = {}; + for (var j = 0; j < keys2.length; ++j) + object.additionalInfo[keys2[j]] = message.additionalInfo[keys2[j]]; + } + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.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.backupdr.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.backupdr.v1.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + v1.BackupPlan = (function() { + + /** + * Properties of a BackupPlan. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupPlan + * @property {string|null} [name] BackupPlan name + * @property {string|null} [description] BackupPlan description + * @property {Object.|null} [labels] BackupPlan labels + * @property {google.protobuf.ITimestamp|null} [createTime] BackupPlan createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] BackupPlan updateTime + * @property {Array.|null} [backupRules] BackupPlan backupRules + * @property {google.cloud.backupdr.v1.BackupPlan.State|null} [state] BackupPlan state + * @property {string|null} [resourceType] BackupPlan resourceType + * @property {string|null} [etag] BackupPlan etag + * @property {string|null} [backupVault] BackupPlan backupVault + * @property {string|null} [backupVaultServiceAccount] BackupPlan backupVaultServiceAccount + */ + + /** + * Constructs a new BackupPlan. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupPlan. + * @implements IBackupPlan + * @constructor + * @param {google.cloud.backupdr.v1.IBackupPlan=} [properties] Properties to set + */ + function BackupPlan(properties) { + this.labels = {}; + this.backupRules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupPlan name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.name = ""; + + /** + * BackupPlan description. + * @member {string} description + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.description = ""; + + /** + * BackupPlan labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.labels = $util.emptyObject; + + /** + * BackupPlan createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.createTime = null; + + /** + * BackupPlan updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.updateTime = null; + + /** + * BackupPlan backupRules. + * @member {Array.} backupRules + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.backupRules = $util.emptyArray; + + /** + * BackupPlan state. + * @member {google.cloud.backupdr.v1.BackupPlan.State} state + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.state = 0; + + /** + * BackupPlan resourceType. + * @member {string} resourceType + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.resourceType = ""; + + /** + * BackupPlan etag. + * @member {string} etag + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.etag = ""; + + /** + * BackupPlan backupVault. + * @member {string} backupVault + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.backupVault = ""; + + /** + * BackupPlan backupVaultServiceAccount. + * @member {string} backupVaultServiceAccount + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + */ + BackupPlan.prototype.backupVaultServiceAccount = ""; + + /** + * Creates a new BackupPlan instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {google.cloud.backupdr.v1.IBackupPlan=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan instance + */ + BackupPlan.create = function create(properties) { + return new BackupPlan(properties); + }; + + /** + * Encodes the specified BackupPlan message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {google.cloud.backupdr.v1.IBackupPlan} message BackupPlan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupPlan.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + 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 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.backupRules != null && message.backupRules.length) + for (var i = 0; i < message.backupRules.length; ++i) + $root.google.cloud.backupdr.v1.BackupRule.encode(message.backupRules[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceType); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.etag); + if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.backupVault); + if (message.backupVaultServiceAccount != null && Object.hasOwnProperty.call(message, "backupVaultServiceAccount")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.backupVaultServiceAccount); + return writer; + }; + + /** + * Encodes the specified BackupPlan message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {google.cloud.backupdr.v1.IBackupPlan} message BackupPlan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupPlan.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupPlan message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupPlan.decode = function 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.backupdr.v1.BackupPlan(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + 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 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.backupRules && message.backupRules.length)) + message.backupRules = []; + message.backupRules.push($root.google.cloud.backupdr.v1.BackupRule.decode(reader, reader.uint32())); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 8: { + message.resourceType = reader.string(); + break; + } + case 9: { + message.etag = reader.string(); + break; + } + case 10: { + message.backupVault = reader.string(); + break; + } + case 11: { + message.backupVaultServiceAccount = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupPlan message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupPlan.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupPlan message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupPlan.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + 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.backupRules != null && message.hasOwnProperty("backupRules")) { + if (!Array.isArray(message.backupRules)) + return "backupRules: array expected"; + for (var i = 0; i < message.backupRules.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupRule.verify(message.backupRules[i]); + if (error) + return "backupRules." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) + if (!$util.isString(message.backupVault)) + return "backupVault: string expected"; + if (message.backupVaultServiceAccount != null && message.hasOwnProperty("backupVaultServiceAccount")) + if (!$util.isString(message.backupVaultServiceAccount)) + return "backupVaultServiceAccount: string expected"; + return null; + }; + + /** + * Creates a BackupPlan message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan + */ + BackupPlan.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupPlan) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupPlan(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlan.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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlan.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.backupdr.v1.BackupPlan.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.backupRules) { + if (!Array.isArray(object.backupRules)) + throw TypeError(".google.cloud.backupdr.v1.BackupPlan.backupRules: array expected"); + message.backupRules = []; + for (var i = 0; i < object.backupRules.length; ++i) { + if (typeof object.backupRules[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlan.backupRules: object expected"); + message.backupRules[i] = $root.google.cloud.backupdr.v1.BackupRule.fromObject(object.backupRules[i]); + } + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "INACTIVE": + case 4: + message.state = 4; + break; + } + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.etag != null) + message.etag = String(object.etag); + if (object.backupVault != null) + message.backupVault = String(object.backupVault); + if (object.backupVaultServiceAccount != null) + message.backupVaultServiceAccount = String(object.backupVaultServiceAccount); + return message; + }; + + /** + * Creates a plain object from a BackupPlan message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {google.cloud.backupdr.v1.BackupPlan} message BackupPlan + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupPlan.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.backupRules = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.resourceType = ""; + object.etag = ""; + object.backupVault = ""; + object.backupVaultServiceAccount = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + 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.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.backupRules && message.backupRules.length) { + object.backupRules = []; + for (var j = 0; j < message.backupRules.length; ++j) + object.backupRules[j] = $root.google.cloud.backupdr.v1.BackupRule.toObject(message.backupRules[j], options); + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupPlan.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupPlan.State[message.state] : message.state; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) + object.backupVault = message.backupVault; + if (message.backupVaultServiceAccount != null && message.hasOwnProperty("backupVaultServiceAccount")) + object.backupVaultServiceAccount = message.backupVaultServiceAccount; + return object; + }; + + /** + * Converts this BackupPlan to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupPlan + * @instance + * @returns {Object.} JSON object + */ + BackupPlan.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupPlan + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupPlan + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupPlan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupPlan"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.BackupPlan.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} INACTIVE=4 INACTIVE value + */ + BackupPlan.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "INACTIVE"] = 4; + return values; + })(); + + return BackupPlan; + })(); + + v1.BackupRule = (function() { + + /** + * Properties of a BackupRule. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupRule + * @property {string|null} [ruleId] BackupRule ruleId + * @property {number|null} [backupRetentionDays] BackupRule backupRetentionDays + * @property {google.cloud.backupdr.v1.IStandardSchedule|null} [standardSchedule] BackupRule standardSchedule + */ + + /** + * Constructs a new BackupRule. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupRule. + * @implements IBackupRule + * @constructor + * @param {google.cloud.backupdr.v1.IBackupRule=} [properties] Properties to set + */ + function BackupRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupRule ruleId. + * @member {string} ruleId + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + */ + BackupRule.prototype.ruleId = ""; + + /** + * BackupRule backupRetentionDays. + * @member {number} backupRetentionDays + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + */ + BackupRule.prototype.backupRetentionDays = 0; + + /** + * BackupRule standardSchedule. + * @member {google.cloud.backupdr.v1.IStandardSchedule|null|undefined} standardSchedule + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + */ + BackupRule.prototype.standardSchedule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupRule backupScheduleOneof. + * @member {"standardSchedule"|undefined} backupScheduleOneof + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + */ + Object.defineProperty(BackupRule.prototype, "backupScheduleOneof", { + get: $util.oneOfGetter($oneOfFields = ["standardSchedule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupRule instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {google.cloud.backupdr.v1.IBackupRule=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule instance + */ + BackupRule.create = function create(properties) { + return new BackupRule(properties); + }; + + /** + * Encodes the specified BackupRule message. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {google.cloud.backupdr.v1.IBackupRule} message BackupRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ruleId); + if (message.backupRetentionDays != null && Object.hasOwnProperty.call(message, "backupRetentionDays")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.backupRetentionDays); + if (message.standardSchedule != null && Object.hasOwnProperty.call(message, "standardSchedule")) + $root.google.cloud.backupdr.v1.StandardSchedule.encode(message.standardSchedule, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BackupRule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {google.cloud.backupdr.v1.IBackupRule} message BackupRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupRule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupRule.decode = function 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.backupdr.v1.BackupRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ruleId = reader.string(); + break; + } + case 4: { + message.backupRetentionDays = reader.int32(); + break; + } + case 5: { + message.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupRule message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + if (!$util.isString(message.ruleId)) + return "ruleId: string expected"; + if (message.backupRetentionDays != null && message.hasOwnProperty("backupRetentionDays")) + if (!$util.isInteger(message.backupRetentionDays)) + return "backupRetentionDays: integer expected"; + if (message.standardSchedule != null && message.hasOwnProperty("standardSchedule")) { + properties.backupScheduleOneof = 1; + { + var error = $root.google.cloud.backupdr.v1.StandardSchedule.verify(message.standardSchedule); + if (error) + return "standardSchedule." + error; + } + } + return null; + }; + + /** + * Creates a BackupRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule + */ + BackupRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupRule) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupRule(); + if (object.ruleId != null) + message.ruleId = String(object.ruleId); + if (object.backupRetentionDays != null) + message.backupRetentionDays = object.backupRetentionDays | 0; + if (object.standardSchedule != null) { + if (typeof object.standardSchedule !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupRule.standardSchedule: object expected"); + message.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.fromObject(object.standardSchedule); + } + return message; + }; + + /** + * Creates a plain object from a BackupRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {google.cloud.backupdr.v1.BackupRule} message BackupRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.ruleId = ""; + object.backupRetentionDays = 0; + } + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + object.ruleId = message.ruleId; + if (message.backupRetentionDays != null && message.hasOwnProperty("backupRetentionDays")) + object.backupRetentionDays = message.backupRetentionDays; + if (message.standardSchedule != null && message.hasOwnProperty("standardSchedule")) { + object.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.toObject(message.standardSchedule, options); + if (options.oneofs) + object.backupScheduleOneof = "standardSchedule"; + } + return object; + }; + + /** + * Converts this BackupRule to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupRule + * @instance + * @returns {Object.} JSON object + */ + BackupRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupRule + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupRule"; + }; + + return BackupRule; + })(); + + v1.StandardSchedule = (function() { + + /** + * Properties of a StandardSchedule. + * @memberof google.cloud.backupdr.v1 + * @interface IStandardSchedule + * @property {google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|null} [recurrenceType] StandardSchedule recurrenceType + * @property {number|null} [hourlyFrequency] StandardSchedule hourlyFrequency + * @property {Array.|null} [daysOfWeek] StandardSchedule daysOfWeek + * @property {Array.|null} [daysOfMonth] StandardSchedule daysOfMonth + * @property {google.cloud.backupdr.v1.IWeekDayOfMonth|null} [weekDayOfMonth] StandardSchedule weekDayOfMonth + * @property {Array.|null} [months] StandardSchedule months + * @property {google.cloud.backupdr.v1.IBackupWindow|null} [backupWindow] StandardSchedule backupWindow + * @property {string|null} [timeZone] StandardSchedule timeZone + */ + + /** + * Constructs a new StandardSchedule. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a StandardSchedule. + * @implements IStandardSchedule + * @constructor + * @param {google.cloud.backupdr.v1.IStandardSchedule=} [properties] Properties to set + */ + function StandardSchedule(properties) { + this.daysOfWeek = []; + this.daysOfMonth = []; + this.months = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StandardSchedule recurrenceType. + * @member {google.cloud.backupdr.v1.StandardSchedule.RecurrenceType} recurrenceType + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.recurrenceType = 0; + + /** + * StandardSchedule hourlyFrequency. + * @member {number} hourlyFrequency + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.hourlyFrequency = 0; + + /** + * StandardSchedule daysOfWeek. + * @member {Array.} daysOfWeek + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.daysOfWeek = $util.emptyArray; + + /** + * StandardSchedule daysOfMonth. + * @member {Array.} daysOfMonth + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.daysOfMonth = $util.emptyArray; + + /** + * StandardSchedule weekDayOfMonth. + * @member {google.cloud.backupdr.v1.IWeekDayOfMonth|null|undefined} weekDayOfMonth + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.weekDayOfMonth = null; + + /** + * StandardSchedule months. + * @member {Array.} months + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.months = $util.emptyArray; + + /** + * StandardSchedule backupWindow. + * @member {google.cloud.backupdr.v1.IBackupWindow|null|undefined} backupWindow + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.backupWindow = null; + + /** + * StandardSchedule timeZone. + * @member {string} timeZone + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + */ + StandardSchedule.prototype.timeZone = ""; + + /** + * Creates a new StandardSchedule instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {google.cloud.backupdr.v1.IStandardSchedule=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule instance + */ + StandardSchedule.create = function create(properties) { + return new StandardSchedule(properties); + }; + + /** + * Encodes the specified StandardSchedule message. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {google.cloud.backupdr.v1.IStandardSchedule} message StandardSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StandardSchedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recurrenceType != null && Object.hasOwnProperty.call(message, "recurrenceType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.recurrenceType); + if (message.hourlyFrequency != null && Object.hasOwnProperty.call(message, "hourlyFrequency")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hourlyFrequency); + if (message.daysOfWeek != null && message.daysOfWeek.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.daysOfWeek.length; ++i) + writer.int32(message.daysOfWeek[i]); + writer.ldelim(); + } + if (message.daysOfMonth != null && message.daysOfMonth.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (var i = 0; i < message.daysOfMonth.length; ++i) + writer.int32(message.daysOfMonth[i]); + writer.ldelim(); + } + if (message.weekDayOfMonth != null && Object.hasOwnProperty.call(message, "weekDayOfMonth")) + $root.google.cloud.backupdr.v1.WeekDayOfMonth.encode(message.weekDayOfMonth, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.months != null && message.months.length) { + writer.uint32(/* id 6, wireType 2 =*/50).fork(); + for (var i = 0; i < message.months.length; ++i) + writer.int32(message.months[i]); + writer.ldelim(); + } + if (message.backupWindow != null && Object.hasOwnProperty.call(message, "backupWindow")) + $root.google.cloud.backupdr.v1.BackupWindow.encode(message.backupWindow, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.timeZone); + return writer; + }; + + /** + * Encodes the specified StandardSchedule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {google.cloud.backupdr.v1.IStandardSchedule} message StandardSchedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StandardSchedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StandardSchedule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StandardSchedule.decode = function 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.backupdr.v1.StandardSchedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.recurrenceType = reader.int32(); + break; + } + case 2: { + message.hourlyFrequency = reader.int32(); + break; + } + case 3: { + if (!(message.daysOfWeek && message.daysOfWeek.length)) + message.daysOfWeek = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.daysOfWeek.push(reader.int32()); + } else + message.daysOfWeek.push(reader.int32()); + break; + } + case 4: { + if (!(message.daysOfMonth && message.daysOfMonth.length)) + message.daysOfMonth = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.daysOfMonth.push(reader.int32()); + } else + message.daysOfMonth.push(reader.int32()); + break; + } + case 5: { + message.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.months && message.months.length)) + message.months = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.months.push(reader.int32()); + } else + message.months.push(reader.int32()); + break; + } + case 7: { + message.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.decode(reader, reader.uint32()); + break; + } + case 8: { + message.timeZone = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StandardSchedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StandardSchedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StandardSchedule message. + * @function verify + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StandardSchedule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recurrenceType != null && message.hasOwnProperty("recurrenceType")) + switch (message.recurrenceType) { + default: + return "recurrenceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.hourlyFrequency != null && message.hasOwnProperty("hourlyFrequency")) + if (!$util.isInteger(message.hourlyFrequency)) + return "hourlyFrequency: integer expected"; + if (message.daysOfWeek != null && message.hasOwnProperty("daysOfWeek")) { + if (!Array.isArray(message.daysOfWeek)) + return "daysOfWeek: array expected"; + for (var i = 0; i < message.daysOfWeek.length; ++i) + switch (message.daysOfWeek[i]) { + default: + return "daysOfWeek: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + if (message.daysOfMonth != null && message.hasOwnProperty("daysOfMonth")) { + if (!Array.isArray(message.daysOfMonth)) + return "daysOfMonth: array expected"; + for (var i = 0; i < message.daysOfMonth.length; ++i) + if (!$util.isInteger(message.daysOfMonth[i])) + return "daysOfMonth: integer[] expected"; + } + if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) { + var error = $root.google.cloud.backupdr.v1.WeekDayOfMonth.verify(message.weekDayOfMonth); + if (error) + return "weekDayOfMonth." + error; + } + if (message.months != null && message.hasOwnProperty("months")) { + if (!Array.isArray(message.months)) + return "months: array expected"; + for (var i = 0; i < message.months.length; ++i) + switch (message.months[i]) { + default: + return "months: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + break; + } + } + if (message.backupWindow != null && message.hasOwnProperty("backupWindow")) { + var error = $root.google.cloud.backupdr.v1.BackupWindow.verify(message.backupWindow); + if (error) + return "backupWindow." + error; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + return null; + }; + + /** + * Creates a StandardSchedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule + */ + StandardSchedule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.StandardSchedule) + return object; + var message = new $root.google.cloud.backupdr.v1.StandardSchedule(); + switch (object.recurrenceType) { + default: + if (typeof object.recurrenceType === "number") { + message.recurrenceType = object.recurrenceType; + break; + } + break; + case "RECURRENCE_TYPE_UNSPECIFIED": + case 0: + message.recurrenceType = 0; + break; + case "HOURLY": + case 1: + message.recurrenceType = 1; + break; + case "DAILY": + case 2: + message.recurrenceType = 2; + break; + case "WEEKLY": + case 3: + message.recurrenceType = 3; + break; + case "MONTHLY": + case 4: + message.recurrenceType = 4; + break; + case "YEARLY": + case 5: + message.recurrenceType = 5; + break; + } + if (object.hourlyFrequency != null) + message.hourlyFrequency = object.hourlyFrequency | 0; + if (object.daysOfWeek) { + if (!Array.isArray(object.daysOfWeek)) + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.daysOfWeek: array expected"); + message.daysOfWeek = []; + for (var i = 0; i < object.daysOfWeek.length; ++i) + switch (object.daysOfWeek[i]) { + default: + if (typeof object.daysOfWeek[i] === "number") { + message.daysOfWeek[i] = object.daysOfWeek[i]; + break; + } + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.daysOfWeek[i] = 0; + break; + case "MONDAY": + case 1: + message.daysOfWeek[i] = 1; + break; + case "TUESDAY": + case 2: + message.daysOfWeek[i] = 2; + break; + case "WEDNESDAY": + case 3: + message.daysOfWeek[i] = 3; + break; + case "THURSDAY": + case 4: + message.daysOfWeek[i] = 4; + break; + case "FRIDAY": + case 5: + message.daysOfWeek[i] = 5; + break; + case "SATURDAY": + case 6: + message.daysOfWeek[i] = 6; + break; + case "SUNDAY": + case 7: + message.daysOfWeek[i] = 7; + break; + } + } + if (object.daysOfMonth) { + if (!Array.isArray(object.daysOfMonth)) + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.daysOfMonth: array expected"); + message.daysOfMonth = []; + for (var i = 0; i < object.daysOfMonth.length; ++i) + message.daysOfMonth[i] = object.daysOfMonth[i] | 0; + } + if (object.weekDayOfMonth != null) { + if (typeof object.weekDayOfMonth !== "object") + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.weekDayOfMonth: object expected"); + message.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.fromObject(object.weekDayOfMonth); + } + if (object.months) { + if (!Array.isArray(object.months)) + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.months: array expected"); + message.months = []; + for (var i = 0; i < object.months.length; ++i) + switch (object.months[i]) { + default: + if (typeof object.months[i] === "number") { + message.months[i] = object.months[i]; + break; + } + case "MONTH_UNSPECIFIED": + case 0: + message.months[i] = 0; + break; + case "JANUARY": + case 1: + message.months[i] = 1; + break; + case "FEBRUARY": + case 2: + message.months[i] = 2; + break; + case "MARCH": + case 3: + message.months[i] = 3; + break; + case "APRIL": + case 4: + message.months[i] = 4; + break; + case "MAY": + case 5: + message.months[i] = 5; + break; + case "JUNE": + case 6: + message.months[i] = 6; + break; + case "JULY": + case 7: + message.months[i] = 7; + break; + case "AUGUST": + case 8: + message.months[i] = 8; + break; + case "SEPTEMBER": + case 9: + message.months[i] = 9; + break; + case "OCTOBER": + case 10: + message.months[i] = 10; + break; + case "NOVEMBER": + case 11: + message.months[i] = 11; + break; + case "DECEMBER": + case 12: + message.months[i] = 12; + break; + } + } + if (object.backupWindow != null) { + if (typeof object.backupWindow !== "object") + throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.backupWindow: object expected"); + message.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.fromObject(object.backupWindow); + } + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + return message; + }; + + /** + * Creates a plain object from a StandardSchedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {google.cloud.backupdr.v1.StandardSchedule} message StandardSchedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StandardSchedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.daysOfWeek = []; + object.daysOfMonth = []; + object.months = []; + } + if (options.defaults) { + object.recurrenceType = options.enums === String ? "RECURRENCE_TYPE_UNSPECIFIED" : 0; + object.hourlyFrequency = 0; + object.weekDayOfMonth = null; + object.backupWindow = null; + object.timeZone = ""; + } + if (message.recurrenceType != null && message.hasOwnProperty("recurrenceType")) + object.recurrenceType = options.enums === String ? $root.google.cloud.backupdr.v1.StandardSchedule.RecurrenceType[message.recurrenceType] === undefined ? message.recurrenceType : $root.google.cloud.backupdr.v1.StandardSchedule.RecurrenceType[message.recurrenceType] : message.recurrenceType; + if (message.hourlyFrequency != null && message.hasOwnProperty("hourlyFrequency")) + object.hourlyFrequency = message.hourlyFrequency; + if (message.daysOfWeek && message.daysOfWeek.length) { + object.daysOfWeek = []; + for (var j = 0; j < message.daysOfWeek.length; ++j) + object.daysOfWeek[j] = options.enums === String ? $root.google.type.DayOfWeek[message.daysOfWeek[j]] === undefined ? message.daysOfWeek[j] : $root.google.type.DayOfWeek[message.daysOfWeek[j]] : message.daysOfWeek[j]; + } + if (message.daysOfMonth && message.daysOfMonth.length) { + object.daysOfMonth = []; + for (var j = 0; j < message.daysOfMonth.length; ++j) + object.daysOfMonth[j] = message.daysOfMonth[j]; + } + if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) + object.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.toObject(message.weekDayOfMonth, options); + if (message.months && message.months.length) { + object.months = []; + for (var j = 0; j < message.months.length; ++j) + object.months[j] = options.enums === String ? $root.google.type.Month[message.months[j]] === undefined ? message.months[j] : $root.google.type.Month[message.months[j]] : message.months[j]; + } + if (message.backupWindow != null && message.hasOwnProperty("backupWindow")) + object.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.toObject(message.backupWindow, options); + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + return object; + }; + + /** + * Converts this StandardSchedule to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @instance + * @returns {Object.} JSON object + */ + StandardSchedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StandardSchedule + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.StandardSchedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StandardSchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.StandardSchedule"; + }; + + /** + * RecurrenceType enum. + * @name google.cloud.backupdr.v1.StandardSchedule.RecurrenceType + * @enum {number} + * @property {number} RECURRENCE_TYPE_UNSPECIFIED=0 RECURRENCE_TYPE_UNSPECIFIED value + * @property {number} HOURLY=1 HOURLY value + * @property {number} DAILY=2 DAILY value + * @property {number} WEEKLY=3 WEEKLY value + * @property {number} MONTHLY=4 MONTHLY value + * @property {number} YEARLY=5 YEARLY value + */ + StandardSchedule.RecurrenceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RECURRENCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HOURLY"] = 1; + values[valuesById[2] = "DAILY"] = 2; + values[valuesById[3] = "WEEKLY"] = 3; + values[valuesById[4] = "MONTHLY"] = 4; + values[valuesById[5] = "YEARLY"] = 5; + return values; + })(); + + return StandardSchedule; + })(); + + v1.BackupWindow = (function() { + + /** + * Properties of a BackupWindow. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupWindow + * @property {number|null} [startHourOfDay] BackupWindow startHourOfDay + * @property {number|null} [endHourOfDay] BackupWindow endHourOfDay + */ + + /** + * Constructs a new BackupWindow. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupWindow. + * @implements IBackupWindow + * @constructor + * @param {google.cloud.backupdr.v1.IBackupWindow=} [properties] Properties to set + */ + function BackupWindow(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupWindow startHourOfDay. + * @member {number} startHourOfDay + * @memberof google.cloud.backupdr.v1.BackupWindow + * @instance + */ + BackupWindow.prototype.startHourOfDay = 0; + + /** + * BackupWindow endHourOfDay. + * @member {number} endHourOfDay + * @memberof google.cloud.backupdr.v1.BackupWindow + * @instance + */ + BackupWindow.prototype.endHourOfDay = 0; + + /** + * Creates a new BackupWindow instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {google.cloud.backupdr.v1.IBackupWindow=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow instance + */ + BackupWindow.create = function create(properties) { + return new BackupWindow(properties); + }; + + /** + * Encodes the specified BackupWindow message. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {google.cloud.backupdr.v1.IBackupWindow} message BackupWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupWindow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startHourOfDay != null && Object.hasOwnProperty.call(message, "startHourOfDay")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startHourOfDay); + if (message.endHourOfDay != null && Object.hasOwnProperty.call(message, "endHourOfDay")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endHourOfDay); + return writer; + }; + + /** + * Encodes the specified BackupWindow message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {google.cloud.backupdr.v1.IBackupWindow} message BackupWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupWindow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupWindow message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupWindow.decode = function 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.backupdr.v1.BackupWindow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startHourOfDay = reader.int32(); + break; + } + case 2: { + message.endHourOfDay = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupWindow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupWindow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupWindow message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupWindow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startHourOfDay != null && message.hasOwnProperty("startHourOfDay")) + if (!$util.isInteger(message.startHourOfDay)) + return "startHourOfDay: integer expected"; + if (message.endHourOfDay != null && message.hasOwnProperty("endHourOfDay")) + if (!$util.isInteger(message.endHourOfDay)) + return "endHourOfDay: integer expected"; + return null; + }; + + /** + * Creates a BackupWindow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow + */ + BackupWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupWindow) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupWindow(); + if (object.startHourOfDay != null) + message.startHourOfDay = object.startHourOfDay | 0; + if (object.endHourOfDay != null) + message.endHourOfDay = object.endHourOfDay | 0; + return message; + }; + + /** + * Creates a plain object from a BackupWindow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {google.cloud.backupdr.v1.BackupWindow} message BackupWindow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupWindow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startHourOfDay = 0; + object.endHourOfDay = 0; + } + if (message.startHourOfDay != null && message.hasOwnProperty("startHourOfDay")) + object.startHourOfDay = message.startHourOfDay; + if (message.endHourOfDay != null && message.hasOwnProperty("endHourOfDay")) + object.endHourOfDay = message.endHourOfDay; + return object; + }; + + /** + * Converts this BackupWindow to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupWindow + * @instance + * @returns {Object.} JSON object + */ + BackupWindow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupWindow + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupWindow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupWindow"; + }; + + return BackupWindow; + })(); + + v1.WeekDayOfMonth = (function() { + + /** + * Properties of a WeekDayOfMonth. + * @memberof google.cloud.backupdr.v1 + * @interface IWeekDayOfMonth + * @property {google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|null} [weekOfMonth] WeekDayOfMonth weekOfMonth + * @property {google.type.DayOfWeek|null} [dayOfWeek] WeekDayOfMonth dayOfWeek + */ + + /** + * Constructs a new WeekDayOfMonth. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a WeekDayOfMonth. + * @implements IWeekDayOfMonth + * @constructor + * @param {google.cloud.backupdr.v1.IWeekDayOfMonth=} [properties] Properties to set + */ + function WeekDayOfMonth(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WeekDayOfMonth weekOfMonth. + * @member {google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth} weekOfMonth + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @instance + */ + WeekDayOfMonth.prototype.weekOfMonth = 0; + + /** + * WeekDayOfMonth dayOfWeek. + * @member {google.type.DayOfWeek} dayOfWeek + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @instance + */ + WeekDayOfMonth.prototype.dayOfWeek = 0; + + /** + * Creates a new WeekDayOfMonth instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {google.cloud.backupdr.v1.IWeekDayOfMonth=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth instance + */ + WeekDayOfMonth.create = function create(properties) { + return new WeekDayOfMonth(properties); + }; + + /** + * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {google.cloud.backupdr.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeekDayOfMonth.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.weekOfMonth != null && Object.hasOwnProperty.call(message, "weekOfMonth")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.weekOfMonth); + if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dayOfWeek); + return writer; + }; + + /** + * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {google.cloud.backupdr.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WeekDayOfMonth.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeekDayOfMonth.decode = function 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.backupdr.v1.WeekDayOfMonth(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.weekOfMonth = reader.int32(); + break; + } + case 2: { + message.dayOfWeek = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WeekDayOfMonth.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WeekDayOfMonth message. + * @function verify + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WeekDayOfMonth.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.weekOfMonth != null && message.hasOwnProperty("weekOfMonth")) + switch (message.weekOfMonth) { + default: + return "weekOfMonth: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + switch (message.dayOfWeek) { + default: + return "dayOfWeek: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + return null; + }; + + /** + * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth + */ + WeekDayOfMonth.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.WeekDayOfMonth) + return object; + var message = new $root.google.cloud.backupdr.v1.WeekDayOfMonth(); + switch (object.weekOfMonth) { + default: + if (typeof object.weekOfMonth === "number") { + message.weekOfMonth = object.weekOfMonth; + break; + } + break; + case "WEEK_OF_MONTH_UNSPECIFIED": + case 0: + message.weekOfMonth = 0; + break; + case "FIRST": + case 1: + message.weekOfMonth = 1; + break; + case "SECOND": + case 2: + message.weekOfMonth = 2; + break; + case "THIRD": + case 3: + message.weekOfMonth = 3; + break; + case "FOURTH": + case 4: + message.weekOfMonth = 4; + break; + case "LAST": + case 5: + message.weekOfMonth = 5; + break; + } + switch (object.dayOfWeek) { + default: + if (typeof object.dayOfWeek === "number") { + message.dayOfWeek = object.dayOfWeek; + break; + } + break; + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.dayOfWeek = 0; + break; + case "MONDAY": + case 1: + message.dayOfWeek = 1; + break; + case "TUESDAY": + case 2: + message.dayOfWeek = 2; + break; + case "WEDNESDAY": + case 3: + message.dayOfWeek = 3; + break; + case "THURSDAY": + case 4: + message.dayOfWeek = 4; + break; + case "FRIDAY": + case 5: + message.dayOfWeek = 5; + break; + case "SATURDAY": + case 6: + message.dayOfWeek = 6; + break; + case "SUNDAY": + case 7: + message.dayOfWeek = 7; + break; + } + return message; + }; + + /** + * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {google.cloud.backupdr.v1.WeekDayOfMonth} message WeekDayOfMonth + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WeekDayOfMonth.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.weekOfMonth = options.enums === String ? "WEEK_OF_MONTH_UNSPECIFIED" : 0; + object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; + } + if (message.weekOfMonth != null && message.hasOwnProperty("weekOfMonth")) + object.weekOfMonth = options.enums === String ? $root.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth] === undefined ? message.weekOfMonth : $root.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth] : message.weekOfMonth; + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] === undefined ? message.dayOfWeek : $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; + return object; + }; + + /** + * Converts this WeekDayOfMonth to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @instance + * @returns {Object.} JSON object + */ + WeekDayOfMonth.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WeekDayOfMonth + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.WeekDayOfMonth + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WeekDayOfMonth.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.WeekDayOfMonth"; + }; + + /** + * WeekOfMonth enum. + * @name google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth + * @enum {number} + * @property {number} WEEK_OF_MONTH_UNSPECIFIED=0 WEEK_OF_MONTH_UNSPECIFIED value + * @property {number} FIRST=1 FIRST value + * @property {number} SECOND=2 SECOND value + * @property {number} THIRD=3 THIRD value + * @property {number} FOURTH=4 FOURTH value + * @property {number} LAST=5 LAST value + */ + WeekDayOfMonth.WeekOfMonth = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "WEEK_OF_MONTH_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIRST"] = 1; + values[valuesById[2] = "SECOND"] = 2; + values[valuesById[3] = "THIRD"] = 3; + values[valuesById[4] = "FOURTH"] = 4; + values[valuesById[5] = "LAST"] = 5; + return values; + })(); + + return WeekDayOfMonth; + })(); + + v1.CreateBackupPlanRequest = (function() { + + /** + * Properties of a CreateBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ICreateBackupPlanRequest + * @property {string|null} [parent] CreateBackupPlanRequest parent + * @property {string|null} [backupPlanId] CreateBackupPlanRequest backupPlanId + * @property {google.cloud.backupdr.v1.IBackupPlan|null} [backupPlan] CreateBackupPlanRequest backupPlan + * @property {string|null} [requestId] CreateBackupPlanRequest requestId + */ + + /** + * Constructs a new CreateBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CreateBackupPlanRequest. + * @implements ICreateBackupPlanRequest + * @constructor + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest=} [properties] Properties to set + */ + function CreateBackupPlanRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBackupPlanRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + */ + CreateBackupPlanRequest.prototype.parent = ""; + + /** + * CreateBackupPlanRequest backupPlanId. + * @member {string} backupPlanId + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + */ + CreateBackupPlanRequest.prototype.backupPlanId = ""; + + /** + * CreateBackupPlanRequest backupPlan. + * @member {google.cloud.backupdr.v1.IBackupPlan|null|undefined} backupPlan + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + */ + CreateBackupPlanRequest.prototype.backupPlan = null; + + /** + * CreateBackupPlanRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + */ + CreateBackupPlanRequest.prototype.requestId = ""; + + /** + * Creates a new CreateBackupPlanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest instance + */ + CreateBackupPlanRequest.create = function create(properties) { + return new CreateBackupPlanRequest(properties); + }; + + /** + * Encodes the specified CreateBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} message CreateBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupPlanRequest.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.backupPlanId != null && Object.hasOwnProperty.call(message, "backupPlanId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanId); + if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) + $root.google.cloud.backupdr.v1.BackupPlan.encode(message.backupPlan, 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 CreateBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} message CreateBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBackupPlanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupPlanRequest.decode = function 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.backupdr.v1.CreateBackupPlanRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.backupPlanId = reader.string(); + break; + } + case 3: { + message.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBackupPlanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBackupPlanRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBackupPlanRequest.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.backupPlanId != null && message.hasOwnProperty("backupPlanId")) + if (!$util.isString(message.backupPlanId)) + return "backupPlanId: string expected"; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) { + var error = $root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlan); + if (error) + return "backupPlan." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest + */ + CreateBackupPlanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupPlanRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.CreateBackupPlanRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupPlanId != null) + message.backupPlanId = String(object.backupPlanId); + if (object.backupPlan != null) { + if (typeof object.backupPlan !== "object") + throw TypeError(".google.cloud.backupdr.v1.CreateBackupPlanRequest.backupPlan: object expected"); + message.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlan); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateBackupPlanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.CreateBackupPlanRequest} message CreateBackupPlanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBackupPlanRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupPlanId = ""; + object.backupPlan = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupPlanId != null && message.hasOwnProperty("backupPlanId")) + object.backupPlanId = message.backupPlanId; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + object.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlan, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateBackupPlanRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBackupPlanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateBackupPlanRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupPlanRequest"; + }; + + return CreateBackupPlanRequest; + })(); + + v1.ListBackupPlansRequest = (function() { + + /** + * Properties of a ListBackupPlansRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupPlansRequest + * @property {string|null} [parent] ListBackupPlansRequest parent + * @property {number|null} [pageSize] ListBackupPlansRequest pageSize + * @property {string|null} [pageToken] ListBackupPlansRequest pageToken + * @property {string|null} [filter] ListBackupPlansRequest filter + * @property {string|null} [orderBy] ListBackupPlansRequest orderBy + */ + + /** + * Constructs a new ListBackupPlansRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupPlansRequest. + * @implements IListBackupPlansRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest=} [properties] Properties to set + */ + function ListBackupPlansRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupPlansRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.parent = ""; + + /** + * ListBackupPlansRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.pageSize = 0; + + /** + * ListBackupPlansRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.pageToken = ""; + + /** + * ListBackupPlansRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.filter = ""; + + /** + * ListBackupPlansRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + */ + ListBackupPlansRequest.prototype.orderBy = ""; + + /** + * Creates a new ListBackupPlansRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest instance + */ + ListBackupPlansRequest.create = function create(properties) { + return new ListBackupPlansRequest(properties); + }; + + /** + * Encodes the specified ListBackupPlansRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} message ListBackupPlansRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlansRequest.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 ListBackupPlansRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} message ListBackupPlansRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlansRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupPlansRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlansRequest.decode = function 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.backupdr.v1.ListBackupPlansRequest(); + 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 ListBackupPlansRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlansRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupPlansRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupPlansRequest.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 ListBackupPlansRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest + */ + ListBackupPlansRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlansRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupPlansRequest(); + 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 ListBackupPlansRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {google.cloud.backupdr.v1.ListBackupPlansRequest} message ListBackupPlansRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupPlansRequest.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 ListBackupPlansRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupPlansRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupPlansRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupPlansRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlansRequest"; + }; + + return ListBackupPlansRequest; + })(); + + v1.ListBackupPlansResponse = (function() { + + /** + * Properties of a ListBackupPlansResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupPlansResponse + * @property {Array.|null} [backupPlans] ListBackupPlansResponse backupPlans + * @property {string|null} [nextPageToken] ListBackupPlansResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupPlansResponse unreachable + */ + + /** + * Constructs a new ListBackupPlansResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupPlansResponse. + * @implements IListBackupPlansResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupPlansResponse=} [properties] Properties to set + */ + function ListBackupPlansResponse(properties) { + this.backupPlans = []; + 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]]; + } + + /** + * ListBackupPlansResponse backupPlans. + * @member {Array.} backupPlans + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @instance + */ + ListBackupPlansResponse.prototype.backupPlans = $util.emptyArray; + + /** + * ListBackupPlansResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @instance + */ + ListBackupPlansResponse.prototype.nextPageToken = ""; + + /** + * ListBackupPlansResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @instance + */ + ListBackupPlansResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupPlansResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse instance + */ + ListBackupPlansResponse.create = function create(properties) { + return new ListBackupPlansResponse(properties); + }; + + /** + * Encodes the specified ListBackupPlansResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansResponse} message ListBackupPlansResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlansResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPlans != null && message.backupPlans.length) + for (var i = 0; i < message.backupPlans.length; ++i) + $root.google.cloud.backupdr.v1.BackupPlan.encode(message.backupPlans[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 ListBackupPlansResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlansResponse} message ListBackupPlansResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlansResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupPlansResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlansResponse.decode = function 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.backupdr.v1.ListBackupPlansResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backupPlans && message.backupPlans.length)) + message.backupPlans = []; + message.backupPlans.push($root.google.cloud.backupdr.v1.BackupPlan.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 ListBackupPlansResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlansResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupPlansResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupPlansResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupPlans != null && message.hasOwnProperty("backupPlans")) { + if (!Array.isArray(message.backupPlans)) + return "backupPlans: array expected"; + for (var i = 0; i < message.backupPlans.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlans[i]); + if (error) + return "backupPlans." + 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 ListBackupPlansResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse + */ + ListBackupPlansResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlansResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupPlansResponse(); + if (object.backupPlans) { + if (!Array.isArray(object.backupPlans)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.backupPlans: array expected"); + message.backupPlans = []; + for (var i = 0; i < object.backupPlans.length; ++i) { + if (typeof object.backupPlans[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.backupPlans: object expected"); + message.backupPlans[i] = $root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlans[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.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 ListBackupPlansResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {google.cloud.backupdr.v1.ListBackupPlansResponse} message ListBackupPlansResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupPlansResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupPlans = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backupPlans && message.backupPlans.length) { + object.backupPlans = []; + for (var j = 0; j < message.backupPlans.length; ++j) + object.backupPlans[j] = $root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlans[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 ListBackupPlansResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupPlansResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupPlansResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupPlansResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlansResponse"; + }; + + return ListBackupPlansResponse; + })(); + + v1.GetBackupPlanRequest = (function() { + + /** + * Properties of a GetBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetBackupPlanRequest + * @property {string|null} [name] GetBackupPlanRequest name + */ + + /** + * Constructs a new GetBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetBackupPlanRequest. + * @implements IGetBackupPlanRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest=} [properties] Properties to set + */ + function GetBackupPlanRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupPlanRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @instance + */ + GetBackupPlanRequest.prototype.name = ""; + + /** + * Creates a new GetBackupPlanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest instance + */ + GetBackupPlanRequest.create = function create(properties) { + return new GetBackupPlanRequest(properties); + }; + + /** + * Encodes the specified GetBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} message GetBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupPlanRequest.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 GetBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} message GetBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupPlanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupPlanRequest.decode = function 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.backupdr.v1.GetBackupPlanRequest(); + 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 GetBackupPlanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupPlanRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupPlanRequest.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 GetBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest + */ + GetBackupPlanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetBackupPlanRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetBackupPlanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.GetBackupPlanRequest} message GetBackupPlanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupPlanRequest.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 GetBackupPlanRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupPlanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupPlanRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupPlanRequest"; + }; + + return GetBackupPlanRequest; + })(); + + v1.DeleteBackupPlanRequest = (function() { + + /** + * Properties of a DeleteBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IDeleteBackupPlanRequest + * @property {string|null} [name] DeleteBackupPlanRequest name + * @property {string|null} [requestId] DeleteBackupPlanRequest requestId + */ + + /** + * Constructs a new DeleteBackupPlanRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DeleteBackupPlanRequest. + * @implements IDeleteBackupPlanRequest + * @constructor + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest=} [properties] Properties to set + */ + function DeleteBackupPlanRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupPlanRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @instance + */ + DeleteBackupPlanRequest.prototype.name = ""; + + /** + * DeleteBackupPlanRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @instance + */ + DeleteBackupPlanRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteBackupPlanRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest instance + */ + DeleteBackupPlanRequest.create = function create(properties) { + return new DeleteBackupPlanRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} message DeleteBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupPlanRequest.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 DeleteBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} message DeleteBackupPlanRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupPlanRequest.decode = function 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.backupdr.v1.DeleteBackupPlanRequest(); + 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 DeleteBackupPlanRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupPlanRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupPlanRequest.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 DeleteBackupPlanRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest + */ + DeleteBackupPlanRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest(); + 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 DeleteBackupPlanRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {google.cloud.backupdr.v1.DeleteBackupPlanRequest} message DeleteBackupPlanRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupPlanRequest.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 DeleteBackupPlanRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupPlanRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupPlanRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupPlanRequest"; + }; + + return DeleteBackupPlanRequest; + })(); + + v1.BackupPlanAssociation = (function() { + + /** + * Properties of a BackupPlanAssociation. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupPlanAssociation + * @property {string|null} [name] BackupPlanAssociation name + * @property {string|null} [resourceType] BackupPlanAssociation resourceType + * @property {string|null} [resource] BackupPlanAssociation resource + * @property {string|null} [backupPlan] BackupPlanAssociation backupPlan + * @property {google.protobuf.ITimestamp|null} [createTime] BackupPlanAssociation createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] BackupPlanAssociation updateTime + * @property {google.cloud.backupdr.v1.BackupPlanAssociation.State|null} [state] BackupPlanAssociation state + * @property {Array.|null} [rulesConfigInfo] BackupPlanAssociation rulesConfigInfo + * @property {string|null} [dataSource] BackupPlanAssociation dataSource + */ + + /** + * Constructs a new BackupPlanAssociation. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupPlanAssociation. + * @implements IBackupPlanAssociation + * @constructor + * @param {google.cloud.backupdr.v1.IBackupPlanAssociation=} [properties] Properties to set + */ + function BackupPlanAssociation(properties) { + this.rulesConfigInfo = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupPlanAssociation name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.name = ""; + + /** + * BackupPlanAssociation resourceType. + * @member {string} resourceType + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.resourceType = ""; + + /** + * BackupPlanAssociation resource. + * @member {string} resource + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.resource = ""; + + /** + * BackupPlanAssociation backupPlan. + * @member {string} backupPlan + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.backupPlan = ""; + + /** + * BackupPlanAssociation createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.createTime = null; + + /** + * BackupPlanAssociation updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.updateTime = null; + + /** + * BackupPlanAssociation state. + * @member {google.cloud.backupdr.v1.BackupPlanAssociation.State} state + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.state = 0; + + /** + * BackupPlanAssociation rulesConfigInfo. + * @member {Array.} rulesConfigInfo + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.rulesConfigInfo = $util.emptyArray; + + /** + * BackupPlanAssociation dataSource. + * @member {string} dataSource + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + */ + BackupPlanAssociation.prototype.dataSource = ""; + + /** + * Creates a new BackupPlanAssociation instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {google.cloud.backupdr.v1.IBackupPlanAssociation=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation instance + */ + BackupPlanAssociation.create = function create(properties) { + return new BackupPlanAssociation(properties); + }; + + /** + * Encodes the specified BackupPlanAssociation message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {google.cloud.backupdr.v1.IBackupPlanAssociation} message BackupPlanAssociation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupPlanAssociation.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.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceType); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); + if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.backupPlan); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.rulesConfigInfo != null && message.rulesConfigInfo.length) + for (var i = 0; i < message.rulesConfigInfo.length; ++i) + $root.google.cloud.backupdr.v1.RuleConfigInfo.encode(message.rulesConfigInfo[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.dataSource); + return writer; + }; + + /** + * Encodes the specified BackupPlanAssociation message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {google.cloud.backupdr.v1.IBackupPlanAssociation} message BackupPlanAssociation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupPlanAssociation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupPlanAssociation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupPlanAssociation.decode = function 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.backupdr.v1.BackupPlanAssociation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.resourceType = reader.string(); + break; + } + case 3: { + message.resource = reader.string(); + break; + } + case 4: { + message.backupPlan = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.state = reader.int32(); + break; + } + case 8: { + if (!(message.rulesConfigInfo && message.rulesConfigInfo.length)) + message.rulesConfigInfo = []; + message.rulesConfigInfo.push($root.google.cloud.backupdr.v1.RuleConfigInfo.decode(reader, reader.uint32())); + break; + } + case 9: { + message.dataSource = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupPlanAssociation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupPlanAssociation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupPlanAssociation message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupPlanAssociation.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.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + if (!$util.isString(message.backupPlan)) + return "backupPlan: 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.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.rulesConfigInfo != null && message.hasOwnProperty("rulesConfigInfo")) { + if (!Array.isArray(message.rulesConfigInfo)) + return "rulesConfigInfo: array expected"; + for (var i = 0; i < message.rulesConfigInfo.length; ++i) { + var error = $root.google.cloud.backupdr.v1.RuleConfigInfo.verify(message.rulesConfigInfo[i]); + if (error) + return "rulesConfigInfo." + error; + } + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + return null; + }; + + /** + * Creates a BackupPlanAssociation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation + */ + BackupPlanAssociation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupPlanAssociation) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupPlanAssociation(); + if (object.name != null) + message.name = String(object.name); + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.resource != null) + message.resource = String(object.resource); + if (object.backupPlan != null) + message.backupPlan = String(object.backupPlan); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.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.backupdr.v1.BackupPlanAssociation.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + 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 "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "INACTIVE": + case 4: + message.state = 4; + break; + } + if (object.rulesConfigInfo) { + if (!Array.isArray(object.rulesConfigInfo)) + throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.rulesConfigInfo: array expected"); + message.rulesConfigInfo = []; + for (var i = 0; i < object.rulesConfigInfo.length; ++i) { + if (typeof object.rulesConfigInfo[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.rulesConfigInfo: object expected"); + message.rulesConfigInfo[i] = $root.google.cloud.backupdr.v1.RuleConfigInfo.fromObject(object.rulesConfigInfo[i]); + } + } + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + return message; + }; + + /** + * Creates a plain object from a BackupPlanAssociation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {google.cloud.backupdr.v1.BackupPlanAssociation} message BackupPlanAssociation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupPlanAssociation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rulesConfigInfo = []; + if (options.defaults) { + object.name = ""; + object.resourceType = ""; + object.resource = ""; + object.backupPlan = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.dataSource = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + object.backupPlan = message.backupPlan; + 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.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupPlanAssociation.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupPlanAssociation.State[message.state] : message.state; + if (message.rulesConfigInfo && message.rulesConfigInfo.length) { + object.rulesConfigInfo = []; + for (var j = 0; j < message.rulesConfigInfo.length; ++j) + object.rulesConfigInfo[j] = $root.google.cloud.backupdr.v1.RuleConfigInfo.toObject(message.rulesConfigInfo[j], options); + } + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + return object; + }; + + /** + * Converts this BackupPlanAssociation to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @instance + * @returns {Object.} JSON object + */ + BackupPlanAssociation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupPlanAssociation + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupPlanAssociation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupPlanAssociation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupPlanAssociation"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.BackupPlanAssociation.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} INACTIVE=4 INACTIVE value + */ + BackupPlanAssociation.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "INACTIVE"] = 4; + return values; + })(); + + return BackupPlanAssociation; + })(); + + v1.RuleConfigInfo = (function() { + + /** + * Properties of a RuleConfigInfo. + * @memberof google.cloud.backupdr.v1 + * @interface IRuleConfigInfo + * @property {string|null} [ruleId] RuleConfigInfo ruleId + * @property {google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|null} [lastBackupState] RuleConfigInfo lastBackupState + * @property {google.rpc.IStatus|null} [lastBackupError] RuleConfigInfo lastBackupError + * @property {google.protobuf.ITimestamp|null} [lastSuccessfulBackupConsistencyTime] RuleConfigInfo lastSuccessfulBackupConsistencyTime + */ + + /** + * Constructs a new RuleConfigInfo. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a RuleConfigInfo. + * @implements IRuleConfigInfo + * @constructor + * @param {google.cloud.backupdr.v1.IRuleConfigInfo=} [properties] Properties to set + */ + function RuleConfigInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RuleConfigInfo ruleId. + * @member {string} ruleId + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + */ + RuleConfigInfo.prototype.ruleId = ""; + + /** + * RuleConfigInfo lastBackupState. + * @member {google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState} lastBackupState + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + */ + RuleConfigInfo.prototype.lastBackupState = 0; + + /** + * RuleConfigInfo lastBackupError. + * @member {google.rpc.IStatus|null|undefined} lastBackupError + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + */ + RuleConfigInfo.prototype.lastBackupError = null; + + /** + * RuleConfigInfo lastSuccessfulBackupConsistencyTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastSuccessfulBackupConsistencyTime + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + */ + RuleConfigInfo.prototype.lastSuccessfulBackupConsistencyTime = null; + + /** + * Creates a new RuleConfigInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IRuleConfigInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo instance + */ + RuleConfigInfo.create = function create(properties) { + return new RuleConfigInfo(properties); + }; + + /** + * Encodes the specified RuleConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IRuleConfigInfo} message RuleConfigInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RuleConfigInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ruleId); + if (message.lastBackupState != null && Object.hasOwnProperty.call(message, "lastBackupState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.lastBackupState); + if (message.lastBackupError != null && Object.hasOwnProperty.call(message, "lastBackupError")) + $root.google.rpc.Status.encode(message.lastBackupError, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.lastSuccessfulBackupConsistencyTime != null && Object.hasOwnProperty.call(message, "lastSuccessfulBackupConsistencyTime")) + $root.google.protobuf.Timestamp.encode(message.lastSuccessfulBackupConsistencyTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RuleConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IRuleConfigInfo} message RuleConfigInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RuleConfigInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RuleConfigInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RuleConfigInfo.decode = function 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.backupdr.v1.RuleConfigInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ruleId = reader.string(); + break; + } + case 3: { + message.lastBackupState = reader.int32(); + break; + } + case 4: { + message.lastBackupError = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RuleConfigInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RuleConfigInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RuleConfigInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RuleConfigInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + if (!$util.isString(message.ruleId)) + return "ruleId: string expected"; + if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) + switch (message.lastBackupState) { + default: + return "lastBackupState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) { + var error = $root.google.rpc.Status.verify(message.lastBackupError); + if (error) + return "lastBackupError." + error; + } + if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime); + if (error) + return "lastSuccessfulBackupConsistencyTime." + error; + } + return null; + }; + + /** + * Creates a RuleConfigInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo + */ + RuleConfigInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RuleConfigInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.RuleConfigInfo(); + if (object.ruleId != null) + message.ruleId = String(object.ruleId); + switch (object.lastBackupState) { + default: + if (typeof object.lastBackupState === "number") { + message.lastBackupState = object.lastBackupState; + break; + } + break; + case "LAST_BACKUP_STATE_UNSPECIFIED": + case 0: + message.lastBackupState = 0; + break; + case "FIRST_BACKUP_PENDING": + case 1: + message.lastBackupState = 1; + break; + case "PERMISSION_DENIED": + case 2: + message.lastBackupState = 2; + break; + case "SUCCEEDED": + case 3: + message.lastBackupState = 3; + break; + case "FAILED": + case 4: + message.lastBackupState = 4; + break; + } + if (object.lastBackupError != null) { + if (typeof object.lastBackupError !== "object") + throw TypeError(".google.cloud.backupdr.v1.RuleConfigInfo.lastBackupError: object expected"); + message.lastBackupError = $root.google.rpc.Status.fromObject(object.lastBackupError); + } + if (object.lastSuccessfulBackupConsistencyTime != null) { + if (typeof object.lastSuccessfulBackupConsistencyTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.RuleConfigInfo.lastSuccessfulBackupConsistencyTime: object expected"); + message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime); + } + return message; + }; + + /** + * Creates a plain object from a RuleConfigInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {google.cloud.backupdr.v1.RuleConfigInfo} message RuleConfigInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RuleConfigInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.ruleId = ""; + object.lastBackupState = options.enums === String ? "LAST_BACKUP_STATE_UNSPECIFIED" : 0; + object.lastBackupError = null; + object.lastSuccessfulBackupConsistencyTime = null; + } + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + object.ruleId = message.ruleId; + if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) + object.lastBackupState = options.enums === String ? $root.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState[message.lastBackupState] === undefined ? message.lastBackupState : $root.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState[message.lastBackupState] : message.lastBackupState; + if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) + object.lastBackupError = $root.google.rpc.Status.toObject(message.lastBackupError, options); + if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) + object.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime, options); + return object; + }; + + /** + * Converts this RuleConfigInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @instance + * @returns {Object.} JSON object + */ + RuleConfigInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RuleConfigInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.RuleConfigInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RuleConfigInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.RuleConfigInfo"; + }; + + /** + * LastBackupState enum. + * @name google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState + * @enum {number} + * @property {number} LAST_BACKUP_STATE_UNSPECIFIED=0 LAST_BACKUP_STATE_UNSPECIFIED value + * @property {number} FIRST_BACKUP_PENDING=1 FIRST_BACKUP_PENDING value + * @property {number} PERMISSION_DENIED=2 PERMISSION_DENIED value + * @property {number} SUCCEEDED=3 SUCCEEDED value + * @property {number} FAILED=4 FAILED value + */ + RuleConfigInfo.LastBackupState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAST_BACKUP_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIRST_BACKUP_PENDING"] = 1; + values[valuesById[2] = "PERMISSION_DENIED"] = 2; + values[valuesById[3] = "SUCCEEDED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + return values; + })(); + + return RuleConfigInfo; + })(); + + v1.CreateBackupPlanAssociationRequest = (function() { + + /** + * Properties of a CreateBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ICreateBackupPlanAssociationRequest + * @property {string|null} [parent] CreateBackupPlanAssociationRequest parent + * @property {string|null} [backupPlanAssociationId] CreateBackupPlanAssociationRequest backupPlanAssociationId + * @property {google.cloud.backupdr.v1.IBackupPlanAssociation|null} [backupPlanAssociation] CreateBackupPlanAssociationRequest backupPlanAssociation + * @property {string|null} [requestId] CreateBackupPlanAssociationRequest requestId + */ + + /** + * Constructs a new CreateBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CreateBackupPlanAssociationRequest. + * @implements ICreateBackupPlanAssociationRequest + * @constructor + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest=} [properties] Properties to set + */ + function CreateBackupPlanAssociationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBackupPlanAssociationRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + */ + CreateBackupPlanAssociationRequest.prototype.parent = ""; + + /** + * CreateBackupPlanAssociationRequest backupPlanAssociationId. + * @member {string} backupPlanAssociationId + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + */ + CreateBackupPlanAssociationRequest.prototype.backupPlanAssociationId = ""; + + /** + * CreateBackupPlanAssociationRequest backupPlanAssociation. + * @member {google.cloud.backupdr.v1.IBackupPlanAssociation|null|undefined} backupPlanAssociation + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + */ + CreateBackupPlanAssociationRequest.prototype.backupPlanAssociation = null; + + /** + * CreateBackupPlanAssociationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + */ + CreateBackupPlanAssociationRequest.prototype.requestId = ""; + + /** + * Creates a new CreateBackupPlanAssociationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest instance + */ + CreateBackupPlanAssociationRequest.create = function create(properties) { + return new CreateBackupPlanAssociationRequest(properties); + }; + + /** + * Encodes the specified CreateBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupPlanAssociationRequest.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.backupPlanAssociationId != null && Object.hasOwnProperty.call(message, "backupPlanAssociationId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanAssociationId); + if (message.backupPlanAssociation != null && Object.hasOwnProperty.call(message, "backupPlanAssociation")) + $root.google.cloud.backupdr.v1.BackupPlanAssociation.encode(message.backupPlanAssociation, 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 CreateBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupPlanAssociationRequest.decode = function 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.backupdr.v1.CreateBackupPlanAssociationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.backupPlanAssociationId = reader.string(); + break; + } + case 3: { + message.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBackupPlanAssociationRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBackupPlanAssociationRequest.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.backupPlanAssociationId != null && message.hasOwnProperty("backupPlanAssociationId")) + if (!$util.isString(message.backupPlanAssociationId)) + return "backupPlanAssociationId: string expected"; + if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) { + var error = $root.google.cloud.backupdr.v1.BackupPlanAssociation.verify(message.backupPlanAssociation); + if (error) + return "backupPlanAssociation." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest + */ + CreateBackupPlanAssociationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupPlanAssociationId != null) + message.backupPlanAssociationId = String(object.backupPlanAssociationId); + if (object.backupPlanAssociation != null) { + if (typeof object.backupPlanAssociation !== "object") + throw TypeError(".google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.backupPlanAssociation: object expected"); + message.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.fromObject(object.backupPlanAssociation); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBackupPlanAssociationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupPlanAssociationId = ""; + object.backupPlanAssociation = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupPlanAssociationId != null && message.hasOwnProperty("backupPlanAssociationId")) + object.backupPlanAssociationId = message.backupPlanAssociationId; + if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) + object.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.toObject(message.backupPlanAssociation, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateBackupPlanAssociationRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateBackupPlanAssociationRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest"; + }; + + return CreateBackupPlanAssociationRequest; + })(); + + v1.ListBackupPlanAssociationsRequest = (function() { + + /** + * Properties of a ListBackupPlanAssociationsRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupPlanAssociationsRequest + * @property {string|null} [parent] ListBackupPlanAssociationsRequest parent + * @property {number|null} [pageSize] ListBackupPlanAssociationsRequest pageSize + * @property {string|null} [pageToken] ListBackupPlanAssociationsRequest pageToken + * @property {string|null} [filter] ListBackupPlanAssociationsRequest filter + */ + + /** + * Constructs a new ListBackupPlanAssociationsRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupPlanAssociationsRequest. + * @implements IListBackupPlanAssociationsRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest=} [properties] Properties to set + */ + function ListBackupPlanAssociationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupPlanAssociationsRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + */ + ListBackupPlanAssociationsRequest.prototype.parent = ""; + + /** + * ListBackupPlanAssociationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + */ + ListBackupPlanAssociationsRequest.prototype.pageSize = 0; + + /** + * ListBackupPlanAssociationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + */ + ListBackupPlanAssociationsRequest.prototype.pageToken = ""; + + /** + * ListBackupPlanAssociationsRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + */ + ListBackupPlanAssociationsRequest.prototype.filter = ""; + + /** + * Creates a new ListBackupPlanAssociationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest instance + */ + ListBackupPlanAssociationsRequest.create = function create(properties) { + return new ListBackupPlanAssociationsRequest(properties); + }; + + /** + * Encodes the specified ListBackupPlanAssociationsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlanAssociationsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListBackupPlanAssociationsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlanAssociationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlanAssociationsRequest.decode = function 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.backupdr.v1.ListBackupPlanAssociationsRequest(); + 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlanAssociationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupPlanAssociationsRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupPlanAssociationsRequest.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"; + return null; + }; + + /** + * Creates a ListBackupPlanAssociationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest + */ + ListBackupPlanAssociationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest(); + 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); + return message; + }; + + /** + * Creates a plain object from a ListBackupPlanAssociationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupPlanAssociationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + 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; + return object; + }; + + /** + * Converts this ListBackupPlanAssociationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupPlanAssociationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupPlanAssociationsRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupPlanAssociationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest"; + }; + + return ListBackupPlanAssociationsRequest; + })(); + + v1.ListBackupPlanAssociationsResponse = (function() { + + /** + * Properties of a ListBackupPlanAssociationsResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupPlanAssociationsResponse + * @property {Array.|null} [backupPlanAssociations] ListBackupPlanAssociationsResponse backupPlanAssociations + * @property {string|null} [nextPageToken] ListBackupPlanAssociationsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupPlanAssociationsResponse unreachable + */ + + /** + * Constructs a new ListBackupPlanAssociationsResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupPlanAssociationsResponse. + * @implements IListBackupPlanAssociationsResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse=} [properties] Properties to set + */ + function ListBackupPlanAssociationsResponse(properties) { + this.backupPlanAssociations = []; + 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]]; + } + + /** + * ListBackupPlanAssociationsResponse backupPlanAssociations. + * @member {Array.} backupPlanAssociations + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @instance + */ + ListBackupPlanAssociationsResponse.prototype.backupPlanAssociations = $util.emptyArray; + + /** + * ListBackupPlanAssociationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @instance + */ + ListBackupPlanAssociationsResponse.prototype.nextPageToken = ""; + + /** + * ListBackupPlanAssociationsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @instance + */ + ListBackupPlanAssociationsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupPlanAssociationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse instance + */ + ListBackupPlanAssociationsResponse.create = function create(properties) { + return new ListBackupPlanAssociationsResponse(properties); + }; + + /** + * Encodes the specified ListBackupPlanAssociationsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlanAssociationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPlanAssociations != null && message.backupPlanAssociations.length) + for (var i = 0; i < message.backupPlanAssociations.length; ++i) + $root.google.cloud.backupdr.v1.BackupPlanAssociation.encode(message.backupPlanAssociations[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 ListBackupPlanAssociationsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupPlanAssociationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlanAssociationsResponse.decode = function 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.backupdr.v1.ListBackupPlanAssociationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backupPlanAssociations && message.backupPlanAssociations.length)) + message.backupPlanAssociations = []; + message.backupPlanAssociations.push($root.google.cloud.backupdr.v1.BackupPlanAssociation.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 ListBackupPlanAssociationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupPlanAssociationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupPlanAssociationsResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupPlanAssociationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupPlanAssociations != null && message.hasOwnProperty("backupPlanAssociations")) { + if (!Array.isArray(message.backupPlanAssociations)) + return "backupPlanAssociations: array expected"; + for (var i = 0; i < message.backupPlanAssociations.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupPlanAssociation.verify(message.backupPlanAssociations[i]); + if (error) + return "backupPlanAssociations." + 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 ListBackupPlanAssociationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse + */ + ListBackupPlanAssociationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse(); + if (object.backupPlanAssociations) { + if (!Array.isArray(object.backupPlanAssociations)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.backupPlanAssociations: array expected"); + message.backupPlanAssociations = []; + for (var i = 0; i < object.backupPlanAssociations.length; ++i) { + if (typeof object.backupPlanAssociations[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.backupPlanAssociations: object expected"); + message.backupPlanAssociations[i] = $root.google.cloud.backupdr.v1.BackupPlanAssociation.fromObject(object.backupPlanAssociations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.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 ListBackupPlanAssociationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupPlanAssociationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupPlanAssociations = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backupPlanAssociations && message.backupPlanAssociations.length) { + object.backupPlanAssociations = []; + for (var j = 0; j < message.backupPlanAssociations.length; ++j) + object.backupPlanAssociations[j] = $root.google.cloud.backupdr.v1.BackupPlanAssociation.toObject(message.backupPlanAssociations[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 ListBackupPlanAssociationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupPlanAssociationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupPlanAssociationsResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupPlanAssociationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse"; + }; + + return ListBackupPlanAssociationsResponse; + })(); + + v1.GetBackupPlanAssociationRequest = (function() { + + /** + * Properties of a GetBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetBackupPlanAssociationRequest + * @property {string|null} [name] GetBackupPlanAssociationRequest name + */ + + /** + * Constructs a new GetBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetBackupPlanAssociationRequest. + * @implements IGetBackupPlanAssociationRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest=} [properties] Properties to set + */ + function GetBackupPlanAssociationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupPlanAssociationRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @instance + */ + GetBackupPlanAssociationRequest.prototype.name = ""; + + /** + * Creates a new GetBackupPlanAssociationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest instance + */ + GetBackupPlanAssociationRequest.create = function create(properties) { + return new GetBackupPlanAssociationRequest(properties); + }; + + /** + * Encodes the specified GetBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupPlanAssociationRequest.decode = function 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.backupdr.v1.GetBackupPlanAssociationRequest(); + 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 GetBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupPlanAssociationRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest + */ + GetBackupPlanAssociationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupPlanAssociationRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupPlanAssociationRequest"; + }; + + return GetBackupPlanAssociationRequest; + })(); + + v1.DeleteBackupPlanAssociationRequest = (function() { + + /** + * Properties of a DeleteBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IDeleteBackupPlanAssociationRequest + * @property {string|null} [name] DeleteBackupPlanAssociationRequest name + * @property {string|null} [requestId] DeleteBackupPlanAssociationRequest requestId + */ + + /** + * Constructs a new DeleteBackupPlanAssociationRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DeleteBackupPlanAssociationRequest. + * @implements IDeleteBackupPlanAssociationRequest + * @constructor + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest=} [properties] Properties to set + */ + function DeleteBackupPlanAssociationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupPlanAssociationRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @instance + */ + DeleteBackupPlanAssociationRequest.prototype.name = ""; + + /** + * DeleteBackupPlanAssociationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @instance + */ + DeleteBackupPlanAssociationRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteBackupPlanAssociationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest instance + */ + DeleteBackupPlanAssociationRequest.create = function create(properties) { + return new DeleteBackupPlanAssociationRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupPlanAssociationRequest.decode = function 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.backupdr.v1.DeleteBackupPlanAssociationRequest(); + 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 DeleteBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupPlanAssociationRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest + */ + DeleteBackupPlanAssociationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest(); + 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 DeleteBackupPlanAssociationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupPlanAssociationRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest"; + }; + + return DeleteBackupPlanAssociationRequest; + })(); + + v1.TriggerBackupRequest = (function() { + + /** + * Properties of a TriggerBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ITriggerBackupRequest + * @property {string|null} [name] TriggerBackupRequest name + * @property {string|null} [ruleId] TriggerBackupRequest ruleId + * @property {string|null} [requestId] TriggerBackupRequest requestId + */ + + /** + * Constructs a new TriggerBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a TriggerBackupRequest. + * @implements ITriggerBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest=} [properties] Properties to set + */ + function TriggerBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TriggerBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @instance + */ + TriggerBackupRequest.prototype.name = ""; + + /** + * TriggerBackupRequest ruleId. + * @member {string} ruleId + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @instance + */ + TriggerBackupRequest.prototype.ruleId = ""; + + /** + * TriggerBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @instance + */ + TriggerBackupRequest.prototype.requestId = ""; + + /** + * Creates a new TriggerBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest instance + */ + TriggerBackupRequest.create = function create(properties) { + return new TriggerBackupRequest(properties); + }; + + /** + * Encodes the specified TriggerBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} message TriggerBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerBackupRequest.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.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ruleId); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified TriggerBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} message TriggerBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggerBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TriggerBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerBackupRequest.decode = function 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.backupdr.v1.TriggerBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.ruleId = reader.string(); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TriggerBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggerBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TriggerBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TriggerBackupRequest.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.ruleId != null && message.hasOwnProperty("ruleId")) + if (!$util.isString(message.ruleId)) + return "ruleId: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a TriggerBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest + */ + TriggerBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.TriggerBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.TriggerBackupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.ruleId != null) + message.ruleId = String(object.ruleId); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a TriggerBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {google.cloud.backupdr.v1.TriggerBackupRequest} message TriggerBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TriggerBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.ruleId = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.ruleId != null && message.hasOwnProperty("ruleId")) + object.ruleId = message.ruleId; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this TriggerBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @instance + * @returns {Object.} JSON object + */ + TriggerBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TriggerBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.TriggerBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TriggerBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.TriggerBackupRequest"; + }; + + return TriggerBackupRequest; + })(); + + v1.BackupVault = (function() { + + /** + * Properties of a BackupVault. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupVault + * @property {string|null} [name] BackupVault name + * @property {string|null} [description] BackupVault description + * @property {Object.|null} [labels] BackupVault labels + * @property {google.protobuf.ITimestamp|null} [createTime] BackupVault createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] BackupVault updateTime + * @property {google.protobuf.IDuration|null} [backupMinimumEnforcedRetentionDuration] BackupVault backupMinimumEnforcedRetentionDuration + * @property {boolean|null} [deletable] BackupVault deletable + * @property {string|null} [etag] BackupVault etag + * @property {google.cloud.backupdr.v1.BackupVault.State|null} [state] BackupVault state + * @property {google.protobuf.ITimestamp|null} [effectiveTime] BackupVault effectiveTime + * @property {number|Long|null} [backupCount] BackupVault backupCount + * @property {string|null} [serviceAccount] BackupVault serviceAccount + * @property {number|Long|null} [totalStoredBytes] BackupVault totalStoredBytes + * @property {string|null} [uid] BackupVault uid + * @property {Object.|null} [annotations] BackupVault annotations + * @property {google.cloud.backupdr.v1.BackupVault.AccessRestriction|null} [accessRestriction] BackupVault accessRestriction + */ + + /** + * Constructs a new BackupVault. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupVault. + * @implements IBackupVault + * @constructor + * @param {google.cloud.backupdr.v1.IBackupVault=} [properties] Properties to set + */ + function BackupVault(properties) { + this.labels = {}; + this.annotations = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupVault name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.name = ""; + + /** + * BackupVault description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.description = null; + + /** + * BackupVault labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.labels = $util.emptyObject; + + /** + * BackupVault createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.createTime = null; + + /** + * BackupVault updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.updateTime = null; + + /** + * BackupVault backupMinimumEnforcedRetentionDuration. + * @member {google.protobuf.IDuration|null|undefined} backupMinimumEnforcedRetentionDuration + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.backupMinimumEnforcedRetentionDuration = null; + + /** + * BackupVault deletable. + * @member {boolean|null|undefined} deletable + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.deletable = null; + + /** + * BackupVault etag. + * @member {string|null|undefined} etag + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.etag = null; + + /** + * BackupVault state. + * @member {google.cloud.backupdr.v1.BackupVault.State} state + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.state = 0; + + /** + * BackupVault effectiveTime. + * @member {google.protobuf.ITimestamp|null|undefined} effectiveTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.effectiveTime = null; + + /** + * BackupVault backupCount. + * @member {number|Long} backupCount + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.backupCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupVault serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.serviceAccount = ""; + + /** + * BackupVault totalStoredBytes. + * @member {number|Long} totalStoredBytes + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.totalStoredBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupVault uid. + * @member {string} uid + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.uid = ""; + + /** + * BackupVault annotations. + * @member {Object.} annotations + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.annotations = $util.emptyObject; + + /** + * BackupVault accessRestriction. + * @member {google.cloud.backupdr.v1.BackupVault.AccessRestriction} accessRestriction + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + BackupVault.prototype.accessRestriction = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupVault _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _createTime. + * @member {"createTime"|undefined} _createTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_createTime", { + get: $util.oneOfGetter($oneOfFields = ["createTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _updateTime. + * @member {"updateTime"|undefined} _updateTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _backupMinimumEnforcedRetentionDuration. + * @member {"backupMinimumEnforcedRetentionDuration"|undefined} _backupMinimumEnforcedRetentionDuration + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_backupMinimumEnforcedRetentionDuration", { + get: $util.oneOfGetter($oneOfFields = ["backupMinimumEnforcedRetentionDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _deletable. + * @member {"deletable"|undefined} _deletable + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_deletable", { + get: $util.oneOfGetter($oneOfFields = ["deletable"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _etag. + * @member {"etag"|undefined} _etag + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_etag", { + get: $util.oneOfGetter($oneOfFields = ["etag"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupVault _effectiveTime. + * @member {"effectiveTime"|undefined} _effectiveTime + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + */ + Object.defineProperty(BackupVault.prototype, "_effectiveTime", { + get: $util.oneOfGetter($oneOfFields = ["effectiveTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupVault instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {google.cloud.backupdr.v1.IBackupVault=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault instance + */ + BackupVault.create = function create(properties) { + return new BackupVault(properties); + }; + + /** + * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {google.cloud.backupdr.v1.IBackupVault} message BackupVault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupVault.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + 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 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.deletable != null && Object.hasOwnProperty.call(message, "deletable")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.deletable); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.etag); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); + if (message.effectiveTime != null && Object.hasOwnProperty.call(message, "effectiveTime")) + $root.google.protobuf.Timestamp.encode(message.effectiveTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.backupCount != null && Object.hasOwnProperty.call(message, "backupCount")) + writer.uint32(/* id 17, wireType 0 =*/136).int64(message.backupCount); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.serviceAccount); + if (message.totalStoredBytes != null && Object.hasOwnProperty.call(message, "totalStoredBytes")) + writer.uint32(/* id 19, wireType 0 =*/152).int64(message.totalStoredBytes); + if (message.backupMinimumEnforcedRetentionDuration != null && Object.hasOwnProperty.call(message, "backupMinimumEnforcedRetentionDuration")) + $root.google.protobuf.Duration.encode(message.backupMinimumEnforcedRetentionDuration, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.uid); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) + writer.uint32(/* id 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); + if (message.accessRestriction != null && Object.hasOwnProperty.call(message, "accessRestriction")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.accessRestriction); + return writer; + }; + + /** + * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {google.cloud.backupdr.v1.IBackupVault} message BackupVault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupVault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupVault message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupVault.decode = function 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.backupdr.v1.BackupVault(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + 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 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 20: { + message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 8: { + message.deletable = reader.bool(); + break; + } + case 9: { + message.etag = reader.string(); + break; + } + case 10: { + message.state = reader.int32(); + break; + } + case 12: { + message.effectiveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 17: { + message.backupCount = reader.int64(); + break; + } + case 18: { + message.serviceAccount = reader.string(); + break; + } + case 19: { + message.totalStoredBytes = reader.int64(); + break; + } + case 21: { + message.uid = reader.string(); + break; + } + case 22: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + 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.annotations[key] = value; + break; + } + case 24: { + message.accessRestriction = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupVault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupVault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupVault message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupVault.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.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + properties._createTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + } + if (message.backupMinimumEnforcedRetentionDuration != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDuration")) { + properties._backupMinimumEnforcedRetentionDuration = 1; + { + var error = $root.google.protobuf.Duration.verify(message.backupMinimumEnforcedRetentionDuration); + if (error) + return "backupMinimumEnforcedRetentionDuration." + error; + } + } + if (message.deletable != null && message.hasOwnProperty("deletable")) { + properties._deletable = 1; + if (typeof message.deletable !== "boolean") + return "deletable: boolean expected"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + properties._etag = 1; + if (!$util.isString(message.etag)) + return "etag: 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.effectiveTime != null && message.hasOwnProperty("effectiveTime")) { + properties._effectiveTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.effectiveTime); + if (error) + return "effectiveTime." + error; + } + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) + if (!$util.isInteger(message.backupCount) && !(message.backupCount && $util.isInteger(message.backupCount.low) && $util.isInteger(message.backupCount.high))) + return "backupCount: integer|Long expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) + if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) + return "totalStoredBytes: integer|Long expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; + } + if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) + switch (message.accessRestriction) { + default: + return "accessRestriction: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault + */ + BackupVault.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupVault) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupVault(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.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.backupdr.v1.BackupVault.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.backupMinimumEnforcedRetentionDuration != null) { + if (typeof object.backupMinimumEnforcedRetentionDuration !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.backupMinimumEnforcedRetentionDuration: object expected"); + message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.fromObject(object.backupMinimumEnforcedRetentionDuration); + } + if (object.deletable != null) + message.deletable = Boolean(object.deletable); + if (object.etag != null) + message.etag = String(object.etag); + 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 "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.effectiveTime != null) { + if (typeof object.effectiveTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.effectiveTime: object expected"); + message.effectiveTime = $root.google.protobuf.Timestamp.fromObject(object.effectiveTime); + } + if (object.backupCount != null) + if ($util.Long) + (message.backupCount = $util.Long.fromValue(object.backupCount)).unsigned = false; + else if (typeof object.backupCount === "string") + message.backupCount = parseInt(object.backupCount, 10); + else if (typeof object.backupCount === "number") + message.backupCount = object.backupCount; + else if (typeof object.backupCount === "object") + message.backupCount = new $util.LongBits(object.backupCount.low >>> 0, object.backupCount.high >>> 0).toNumber(); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.totalStoredBytes != null) + if ($util.Long) + (message.totalStoredBytes = $util.Long.fromValue(object.totalStoredBytes)).unsigned = false; + else if (typeof object.totalStoredBytes === "string") + message.totalStoredBytes = parseInt(object.totalStoredBytes, 10); + else if (typeof object.totalStoredBytes === "number") + message.totalStoredBytes = object.totalStoredBytes; + else if (typeof object.totalStoredBytes === "object") + message.totalStoredBytes = new $util.LongBits(object.totalStoredBytes.low >>> 0, object.totalStoredBytes.high >>> 0).toNumber(); + if (object.uid != null) + message.uid = String(object.uid); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupVault.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); + } + switch (object.accessRestriction) { + default: + if (typeof object.accessRestriction === "number") { + message.accessRestriction = object.accessRestriction; + break; + } + break; + case "ACCESS_RESTRICTION_UNSPECIFIED": + case 0: + message.accessRestriction = 0; + break; + case "WITHIN_PROJECT": + case 1: + message.accessRestriction = 1; + break; + case "WITHIN_ORGANIZATION": + case 2: + message.accessRestriction = 2; + break; + case "UNRESTRICTED": + case 3: + message.accessRestriction = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a BackupVault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {google.cloud.backupdr.v1.BackupVault} message BackupVault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupVault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.labels = {}; + object.annotations = {}; + } + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.backupCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.backupCount = options.longs === String ? "0" : 0; + object.serviceAccount = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalStoredBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalStoredBytes = options.longs === String ? "0" : 0; + object.uid = ""; + object.accessRestriction = options.enums === String ? "ACCESS_RESTRICTION_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + 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.createTime != null && message.hasOwnProperty("createTime")) { + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (options.oneofs) + object._createTime = "createTime"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + if (message.deletable != null && message.hasOwnProperty("deletable")) { + object.deletable = message.deletable; + if (options.oneofs) + object._deletable = "deletable"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + object.etag = message.etag; + if (options.oneofs) + object._etag = "etag"; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupVault.State[message.state] : message.state; + if (message.effectiveTime != null && message.hasOwnProperty("effectiveTime")) { + object.effectiveTime = $root.google.protobuf.Timestamp.toObject(message.effectiveTime, options); + if (options.oneofs) + object._effectiveTime = "effectiveTime"; + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) + if (typeof message.backupCount === "number") + object.backupCount = options.longs === String ? String(message.backupCount) : message.backupCount; + else + object.backupCount = options.longs === String ? $util.Long.prototype.toString.call(message.backupCount) : options.longs === Number ? new $util.LongBits(message.backupCount.low >>> 0, message.backupCount.high >>> 0).toNumber() : message.backupCount; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) + if (typeof message.totalStoredBytes === "number") + object.totalStoredBytes = options.longs === String ? String(message.totalStoredBytes) : message.totalStoredBytes; + else + object.totalStoredBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStoredBytes) : options.longs === Number ? new $util.LongBits(message.totalStoredBytes.low >>> 0, message.totalStoredBytes.high >>> 0).toNumber() : message.totalStoredBytes; + if (message.backupMinimumEnforcedRetentionDuration != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDuration")) { + object.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.toObject(message.backupMinimumEnforcedRetentionDuration, options); + if (options.oneofs) + object._backupMinimumEnforcedRetentionDuration = "backupMinimumEnforcedRetentionDuration"; + } + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; + } + if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) + object.accessRestriction = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] === undefined ? message.accessRestriction : $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] : message.accessRestriction; + return object; + }; + + /** + * Converts this BackupVault to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupVault + * @instance + * @returns {Object.} JSON object + */ + BackupVault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupVault + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupVault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupVault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupVault"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.BackupVault.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} ERROR=4 ERROR value + */ + BackupVault.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + /** + * AccessRestriction enum. + * @name google.cloud.backupdr.v1.BackupVault.AccessRestriction + * @enum {number} + * @property {number} ACCESS_RESTRICTION_UNSPECIFIED=0 ACCESS_RESTRICTION_UNSPECIFIED value + * @property {number} WITHIN_PROJECT=1 WITHIN_PROJECT value + * @property {number} WITHIN_ORGANIZATION=2 WITHIN_ORGANIZATION value + * @property {number} UNRESTRICTED=3 UNRESTRICTED value + */ + BackupVault.AccessRestriction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_RESTRICTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "WITHIN_PROJECT"] = 1; + values[valuesById[2] = "WITHIN_ORGANIZATION"] = 2; + values[valuesById[3] = "UNRESTRICTED"] = 3; + return values; + })(); + + return BackupVault; + })(); + + v1.DataSource = (function() { + + /** + * Properties of a DataSource. + * @memberof google.cloud.backupdr.v1 + * @interface IDataSource + * @property {string|null} [name] DataSource name + * @property {google.cloud.backupdr.v1.DataSource.State|null} [state] DataSource state + * @property {Object.|null} [labels] DataSource labels + * @property {google.protobuf.ITimestamp|null} [createTime] DataSource createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DataSource updateTime + * @property {number|Long|null} [backupCount] DataSource backupCount + * @property {string|null} [etag] DataSource etag + * @property {number|Long|null} [totalStoredBytes] DataSource totalStoredBytes + * @property {google.cloud.backupdr.v1.BackupConfigState|null} [configState] DataSource configState + * @property {google.cloud.backupdr.v1.IBackupConfigInfo|null} [backupConfigInfo] DataSource backupConfigInfo + * @property {google.cloud.backupdr.v1.IDataSourceGcpResource|null} [dataSourceGcpResource] DataSource dataSourceGcpResource + * @property {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null} [dataSourceBackupApplianceApplication] DataSource dataSourceBackupApplianceApplication + */ + + /** + * Constructs a new DataSource. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DataSource. + * @implements IDataSource + * @constructor + * @param {google.cloud.backupdr.v1.IDataSource=} [properties] Properties to set + */ + function DataSource(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]]; + } + + /** + * DataSource name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.name = ""; + + /** + * DataSource state. + * @member {google.cloud.backupdr.v1.DataSource.State} state + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.state = 0; + + /** + * DataSource labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.labels = $util.emptyObject; + + /** + * DataSource createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.createTime = null; + + /** + * DataSource updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.updateTime = null; + + /** + * DataSource backupCount. + * @member {number|Long|null|undefined} backupCount + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.backupCount = null; + + /** + * DataSource etag. + * @member {string|null|undefined} etag + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.etag = null; + + /** + * DataSource totalStoredBytes. + * @member {number|Long|null|undefined} totalStoredBytes + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.totalStoredBytes = null; + + /** + * DataSource configState. + * @member {google.cloud.backupdr.v1.BackupConfigState} configState + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.configState = 0; + + /** + * DataSource backupConfigInfo. + * @member {google.cloud.backupdr.v1.IBackupConfigInfo|null|undefined} backupConfigInfo + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.backupConfigInfo = null; + + /** + * DataSource dataSourceGcpResource. + * @member {google.cloud.backupdr.v1.IDataSourceGcpResource|null|undefined} dataSourceGcpResource + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.dataSourceGcpResource = null; + + /** + * DataSource dataSourceBackupApplianceApplication. + * @member {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null|undefined} dataSourceBackupApplianceApplication + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + DataSource.prototype.dataSourceBackupApplianceApplication = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataSource _createTime. + * @member {"createTime"|undefined} _createTime + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_createTime", { + get: $util.oneOfGetter($oneOfFields = ["createTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource _updateTime. + * @member {"updateTime"|undefined} _updateTime + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource _backupCount. + * @member {"backupCount"|undefined} _backupCount + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_backupCount", { + get: $util.oneOfGetter($oneOfFields = ["backupCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource _etag. + * @member {"etag"|undefined} _etag + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_etag", { + get: $util.oneOfGetter($oneOfFields = ["etag"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource _totalStoredBytes. + * @member {"totalStoredBytes"|undefined} _totalStoredBytes + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "_totalStoredBytes", { + get: $util.oneOfGetter($oneOfFields = ["totalStoredBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * DataSource sourceResource. + * @member {"dataSourceGcpResource"|"dataSourceBackupApplianceApplication"|undefined} sourceResource + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + */ + Object.defineProperty(DataSource.prototype, "sourceResource", { + get: $util.oneOfGetter($oneOfFields = ["dataSourceGcpResource", "dataSourceBackupApplianceApplication"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataSource instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {google.cloud.backupdr.v1.IDataSource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DataSource} DataSource instance + */ + DataSource.create = function create(properties) { + return new DataSource(properties); + }; + + /** + * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {google.cloud.backupdr.v1.IDataSource} message DataSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.labels != null && 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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.backupCount != null && Object.hasOwnProperty.call(message, "backupCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.backupCount); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.etag); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.state); + if (message.totalStoredBytes != null && Object.hasOwnProperty.call(message, "totalStoredBytes")) + writer.uint32(/* id 23, wireType 0 =*/184).int64(message.totalStoredBytes); + if (message.configState != null && Object.hasOwnProperty.call(message, "configState")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.configState); + if (message.backupConfigInfo != null && Object.hasOwnProperty.call(message, "backupConfigInfo")) + $root.google.cloud.backupdr.v1.BackupConfigInfo.encode(message.backupConfigInfo, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dataSourceGcpResource != null && Object.hasOwnProperty.call(message, "dataSourceGcpResource")) + $root.google.cloud.backupdr.v1.DataSourceGcpResource.encode(message.dataSourceGcpResource, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.dataSourceBackupApplianceApplication != null && Object.hasOwnProperty.call(message, "dataSourceBackupApplianceApplication")) + $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.encode(message.dataSourceBackupApplianceApplication, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {google.cloud.backupdr.v1.IDataSource} message DataSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DataSource} DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSource.decode = function 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.backupdr.v1.DataSource(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 21: { + message.state = reader.int32(); + 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.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.backupCount = reader.int64(); + break; + } + case 14: { + message.etag = reader.string(); + break; + } + case 23: { + message.totalStoredBytes = reader.int64(); + break; + } + case 24: { + message.configState = reader.int32(); + break; + } + case 25: { + message.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.decode(reader, reader.uint32()); + break; + } + case 27: { + message.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DataSource} DataSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSource message. + * @function verify + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSource.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.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.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.createTime != null && message.hasOwnProperty("createTime")) { + properties._createTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) { + properties._backupCount = 1; + if (!$util.isInteger(message.backupCount) && !(message.backupCount && $util.isInteger(message.backupCount.low) && $util.isInteger(message.backupCount.high))) + return "backupCount: integer|Long expected"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + properties._etag = 1; + if (!$util.isString(message.etag)) + return "etag: string expected"; + } + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { + properties._totalStoredBytes = 1; + if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) + return "totalStoredBytes: integer|Long expected"; + } + if (message.configState != null && message.hasOwnProperty("configState")) + switch (message.configState) { + default: + return "configState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.backupConfigInfo != null && message.hasOwnProperty("backupConfigInfo")) { + var error = $root.google.cloud.backupdr.v1.BackupConfigInfo.verify(message.backupConfigInfo); + if (error) + return "backupConfigInfo." + error; + } + if (message.dataSourceGcpResource != null && message.hasOwnProperty("dataSourceGcpResource")) { + properties.sourceResource = 1; + { + var error = $root.google.cloud.backupdr.v1.DataSourceGcpResource.verify(message.dataSourceGcpResource); + if (error) + return "dataSourceGcpResource." + error; + } + } + if (message.dataSourceBackupApplianceApplication != null && message.hasOwnProperty("dataSourceBackupApplianceApplication")) { + if (properties.sourceResource === 1) + return "sourceResource: multiple values"; + properties.sourceResource = 1; + { + var error = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify(message.dataSourceBackupApplianceApplication); + if (error) + return "dataSourceBackupApplianceApplication." + error; + } + } + return null; + }; + + /** + * Creates a DataSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DataSource} DataSource + */ + DataSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DataSource) + return object; + var message = new $root.google.cloud.backupdr.v1.DataSource(); + if (object.name != null) + message.name = String(object.name); + 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 "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.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.backupdr.v1.DataSource.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.backupCount != null) + if ($util.Long) + (message.backupCount = $util.Long.fromValue(object.backupCount)).unsigned = false; + else if (typeof object.backupCount === "string") + message.backupCount = parseInt(object.backupCount, 10); + else if (typeof object.backupCount === "number") + message.backupCount = object.backupCount; + else if (typeof object.backupCount === "object") + message.backupCount = new $util.LongBits(object.backupCount.low >>> 0, object.backupCount.high >>> 0).toNumber(); + if (object.etag != null) + message.etag = String(object.etag); + if (object.totalStoredBytes != null) + if ($util.Long) + (message.totalStoredBytes = $util.Long.fromValue(object.totalStoredBytes)).unsigned = false; + else if (typeof object.totalStoredBytes === "string") + message.totalStoredBytes = parseInt(object.totalStoredBytes, 10); + else if (typeof object.totalStoredBytes === "number") + message.totalStoredBytes = object.totalStoredBytes; + else if (typeof object.totalStoredBytes === "object") + message.totalStoredBytes = new $util.LongBits(object.totalStoredBytes.low >>> 0, object.totalStoredBytes.high >>> 0).toNumber(); + switch (object.configState) { + default: + if (typeof object.configState === "number") { + message.configState = object.configState; + break; + } + break; + case "BACKUP_CONFIG_STATE_UNSPECIFIED": + case 0: + message.configState = 0; + break; + case "ACTIVE": + case 1: + message.configState = 1; + break; + case "PASSIVE": + case 2: + message.configState = 2; + break; + } + if (object.backupConfigInfo != null) { + if (typeof object.backupConfigInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.backupConfigInfo: object expected"); + message.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.fromObject(object.backupConfigInfo); + } + if (object.dataSourceGcpResource != null) { + if (typeof object.dataSourceGcpResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.dataSourceGcpResource: object expected"); + message.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.fromObject(object.dataSourceGcpResource); + } + if (object.dataSourceBackupApplianceApplication != null) { + if (typeof object.dataSourceBackupApplianceApplication !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSource.dataSourceBackupApplianceApplication: object expected"); + message.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.fromObject(object.dataSourceBackupApplianceApplication); + } + return message; + }; + + /** + * Creates a plain object from a DataSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {google.cloud.backupdr.v1.DataSource} message DataSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.configState = options.enums === String ? "BACKUP_CONFIG_STATE_UNSPECIFIED" : 0; + object.backupConfigInfo = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + 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.createTime != null && message.hasOwnProperty("createTime")) { + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (options.oneofs) + object._createTime = "createTime"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + if (message.backupCount != null && message.hasOwnProperty("backupCount")) { + if (typeof message.backupCount === "number") + object.backupCount = options.longs === String ? String(message.backupCount) : message.backupCount; + else + object.backupCount = options.longs === String ? $util.Long.prototype.toString.call(message.backupCount) : options.longs === Number ? new $util.LongBits(message.backupCount.low >>> 0, message.backupCount.high >>> 0).toNumber() : message.backupCount; + if (options.oneofs) + object._backupCount = "backupCount"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + object.etag = message.etag; + if (options.oneofs) + object._etag = "etag"; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.DataSource.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.DataSource.State[message.state] : message.state; + if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { + if (typeof message.totalStoredBytes === "number") + object.totalStoredBytes = options.longs === String ? String(message.totalStoredBytes) : message.totalStoredBytes; + else + object.totalStoredBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStoredBytes) : options.longs === Number ? new $util.LongBits(message.totalStoredBytes.low >>> 0, message.totalStoredBytes.high >>> 0).toNumber() : message.totalStoredBytes; + if (options.oneofs) + object._totalStoredBytes = "totalStoredBytes"; + } + if (message.configState != null && message.hasOwnProperty("configState")) + object.configState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigState[message.configState] === undefined ? message.configState : $root.google.cloud.backupdr.v1.BackupConfigState[message.configState] : message.configState; + if (message.backupConfigInfo != null && message.hasOwnProperty("backupConfigInfo")) + object.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.toObject(message.backupConfigInfo, options); + if (message.dataSourceGcpResource != null && message.hasOwnProperty("dataSourceGcpResource")) { + object.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.toObject(message.dataSourceGcpResource, options); + if (options.oneofs) + object.sourceResource = "dataSourceGcpResource"; + } + if (message.dataSourceBackupApplianceApplication != null && message.hasOwnProperty("dataSourceBackupApplianceApplication")) { + object.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.toObject(message.dataSourceBackupApplianceApplication, options); + if (options.oneofs) + object.sourceResource = "dataSourceBackupApplianceApplication"; + } + return object; + }; + + /** + * Converts this DataSource to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DataSource + * @instance + * @returns {Object.} JSON object + */ + DataSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataSource + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DataSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSource"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.DataSource.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} ERROR=4 ERROR value + */ + DataSource.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + return DataSource; + })(); + + v1.BackupConfigInfo = (function() { + + /** + * Properties of a BackupConfigInfo. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupConfigInfo + * @property {google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|null} [lastBackupState] BackupConfigInfo lastBackupState + * @property {google.protobuf.ITimestamp|null} [lastSuccessfulBackupConsistencyTime] BackupConfigInfo lastSuccessfulBackupConsistencyTime + * @property {google.rpc.IStatus|null} [lastBackupError] BackupConfigInfo lastBackupError + * @property {google.cloud.backupdr.v1.IGcpBackupConfig|null} [gcpBackupConfig] BackupConfigInfo gcpBackupConfig + * @property {google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null} [backupApplianceBackupConfig] BackupConfigInfo backupApplianceBackupConfig + */ + + /** + * Constructs a new BackupConfigInfo. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupConfigInfo. + * @implements IBackupConfigInfo + * @constructor + * @param {google.cloud.backupdr.v1.IBackupConfigInfo=} [properties] Properties to set + */ + function BackupConfigInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupConfigInfo lastBackupState. + * @member {google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState} lastBackupState + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.lastBackupState = 0; + + /** + * BackupConfigInfo lastSuccessfulBackupConsistencyTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastSuccessfulBackupConsistencyTime + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.lastSuccessfulBackupConsistencyTime = null; + + /** + * BackupConfigInfo lastBackupError. + * @member {google.rpc.IStatus|null|undefined} lastBackupError + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.lastBackupError = null; + + /** + * BackupConfigInfo gcpBackupConfig. + * @member {google.cloud.backupdr.v1.IGcpBackupConfig|null|undefined} gcpBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.gcpBackupConfig = null; + + /** + * BackupConfigInfo backupApplianceBackupConfig. + * @member {google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null|undefined} backupApplianceBackupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + BackupConfigInfo.prototype.backupApplianceBackupConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupConfigInfo backupConfig. + * @member {"gcpBackupConfig"|"backupApplianceBackupConfig"|undefined} backupConfig + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + */ + Object.defineProperty(BackupConfigInfo.prototype, "backupConfig", { + get: $util.oneOfGetter($oneOfFields = ["gcpBackupConfig", "backupApplianceBackupConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupConfigInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupConfigInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo instance + */ + BackupConfigInfo.create = function create(properties) { + return new BackupConfigInfo(properties); + }; + + /** + * Encodes the specified BackupConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupConfigInfo} message BackupConfigInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupConfigInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lastBackupState != null && Object.hasOwnProperty.call(message, "lastBackupState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.lastBackupState); + if (message.lastSuccessfulBackupConsistencyTime != null && Object.hasOwnProperty.call(message, "lastSuccessfulBackupConsistencyTime")) + $root.google.protobuf.Timestamp.encode(message.lastSuccessfulBackupConsistencyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.lastBackupError != null && Object.hasOwnProperty.call(message, "lastBackupError")) + $root.google.rpc.Status.encode(message.lastBackupError, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.gcpBackupConfig != null && Object.hasOwnProperty.call(message, "gcpBackupConfig")) + $root.google.cloud.backupdr.v1.GcpBackupConfig.encode(message.gcpBackupConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.backupApplianceBackupConfig != null && Object.hasOwnProperty.call(message, "backupApplianceBackupConfig")) + $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.encode(message.backupApplianceBackupConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BackupConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupConfigInfo} message BackupConfigInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupConfigInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupConfigInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupConfigInfo.decode = function 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.backupdr.v1.BackupConfigInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.lastBackupState = reader.int32(); + break; + } + case 2: { + message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.lastBackupError = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 4: { + message.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupConfigInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupConfigInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupConfigInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupConfigInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) + switch (message.lastBackupState) { + default: + return "lastBackupState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime); + if (error) + return "lastSuccessfulBackupConsistencyTime." + error; + } + if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) { + var error = $root.google.rpc.Status.verify(message.lastBackupError); + if (error) + return "lastBackupError." + error; + } + if (message.gcpBackupConfig != null && message.hasOwnProperty("gcpBackupConfig")) { + properties.backupConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.GcpBackupConfig.verify(message.gcpBackupConfig); + if (error) + return "gcpBackupConfig." + error; + } + } + if (message.backupApplianceBackupConfig != null && message.hasOwnProperty("backupApplianceBackupConfig")) { + if (properties.backupConfig === 1) + return "backupConfig: multiple values"; + properties.backupConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify(message.backupApplianceBackupConfig); + if (error) + return "backupApplianceBackupConfig." + error; + } + } + return null; + }; + + /** + * Creates a BackupConfigInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo + */ + BackupConfigInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupConfigInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupConfigInfo(); + switch (object.lastBackupState) { + default: + if (typeof object.lastBackupState === "number") { + message.lastBackupState = object.lastBackupState; + break; + } + break; + case "LAST_BACKUP_STATE_UNSPECIFIED": + case 0: + message.lastBackupState = 0; + break; + case "FIRST_BACKUP_PENDING": + case 1: + message.lastBackupState = 1; + break; + case "SUCCEEDED": + case 2: + message.lastBackupState = 2; + break; + case "FAILED": + case 3: + message.lastBackupState = 3; + break; + case "PERMISSION_DENIED": + case 4: + message.lastBackupState = 4; + break; + } + if (object.lastSuccessfulBackupConsistencyTime != null) { + if (typeof object.lastSuccessfulBackupConsistencyTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.lastSuccessfulBackupConsistencyTime: object expected"); + message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime); + } + if (object.lastBackupError != null) { + if (typeof object.lastBackupError !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.lastBackupError: object expected"); + message.lastBackupError = $root.google.rpc.Status.fromObject(object.lastBackupError); + } + if (object.gcpBackupConfig != null) { + if (typeof object.gcpBackupConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.gcpBackupConfig: object expected"); + message.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.fromObject(object.gcpBackupConfig); + } + if (object.backupApplianceBackupConfig != null) { + if (typeof object.backupApplianceBackupConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.backupApplianceBackupConfig: object expected"); + message.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.fromObject(object.backupApplianceBackupConfig); + } + return message; + }; + + /** + * Creates a plain object from a BackupConfigInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {google.cloud.backupdr.v1.BackupConfigInfo} message BackupConfigInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupConfigInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lastBackupState = options.enums === String ? "LAST_BACKUP_STATE_UNSPECIFIED" : 0; + object.lastSuccessfulBackupConsistencyTime = null; + object.lastBackupError = null; + } + if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) + object.lastBackupState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState[message.lastBackupState] === undefined ? message.lastBackupState : $root.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState[message.lastBackupState] : message.lastBackupState; + if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) + object.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime, options); + if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) + object.lastBackupError = $root.google.rpc.Status.toObject(message.lastBackupError, options); + if (message.gcpBackupConfig != null && message.hasOwnProperty("gcpBackupConfig")) { + object.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.toObject(message.gcpBackupConfig, options); + if (options.oneofs) + object.backupConfig = "gcpBackupConfig"; + } + if (message.backupApplianceBackupConfig != null && message.hasOwnProperty("backupApplianceBackupConfig")) { + object.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.toObject(message.backupApplianceBackupConfig, options); + if (options.oneofs) + object.backupConfig = "backupApplianceBackupConfig"; + } + return object; + }; + + /** + * Converts this BackupConfigInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @instance + * @returns {Object.} JSON object + */ + BackupConfigInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupConfigInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupConfigInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupConfigInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupConfigInfo"; + }; + + /** + * LastBackupState enum. + * @name google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState + * @enum {number} + * @property {number} LAST_BACKUP_STATE_UNSPECIFIED=0 LAST_BACKUP_STATE_UNSPECIFIED value + * @property {number} FIRST_BACKUP_PENDING=1 FIRST_BACKUP_PENDING value + * @property {number} SUCCEEDED=2 SUCCEEDED value + * @property {number} FAILED=3 FAILED value + * @property {number} PERMISSION_DENIED=4 PERMISSION_DENIED value + */ + BackupConfigInfo.LastBackupState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAST_BACKUP_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIRST_BACKUP_PENDING"] = 1; + values[valuesById[2] = "SUCCEEDED"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "PERMISSION_DENIED"] = 4; + return values; + })(); + + return BackupConfigInfo; + })(); + + v1.GcpBackupConfig = (function() { + + /** + * Properties of a GcpBackupConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IGcpBackupConfig + * @property {string|null} [backupPlan] GcpBackupConfig backupPlan + * @property {string|null} [backupPlanDescription] GcpBackupConfig backupPlanDescription + * @property {string|null} [backupPlanAssociation] GcpBackupConfig backupPlanAssociation + * @property {Array.|null} [backupPlanRules] GcpBackupConfig backupPlanRules + */ + + /** + * Constructs a new GcpBackupConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GcpBackupConfig. + * @implements IGcpBackupConfig + * @constructor + * @param {google.cloud.backupdr.v1.IGcpBackupConfig=} [properties] Properties to set + */ + function GcpBackupConfig(properties) { + this.backupPlanRules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcpBackupConfig backupPlan. + * @member {string} backupPlan + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + */ + GcpBackupConfig.prototype.backupPlan = ""; + + /** + * GcpBackupConfig backupPlanDescription. + * @member {string} backupPlanDescription + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + */ + GcpBackupConfig.prototype.backupPlanDescription = ""; + + /** + * GcpBackupConfig backupPlanAssociation. + * @member {string} backupPlanAssociation + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + */ + GcpBackupConfig.prototype.backupPlanAssociation = ""; + + /** + * GcpBackupConfig backupPlanRules. + * @member {Array.} backupPlanRules + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + */ + GcpBackupConfig.prototype.backupPlanRules = $util.emptyArray; + + /** + * Creates a new GcpBackupConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IGcpBackupConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig instance + */ + GcpBackupConfig.create = function create(properties) { + return new GcpBackupConfig(properties); + }; + + /** + * Encodes the specified GcpBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IGcpBackupConfig} message GcpBackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpBackupConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPlan); + if (message.backupPlanDescription != null && Object.hasOwnProperty.call(message, "backupPlanDescription")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanDescription); + if (message.backupPlanAssociation != null && Object.hasOwnProperty.call(message, "backupPlanAssociation")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.backupPlanAssociation); + if (message.backupPlanRules != null && message.backupPlanRules.length) + for (var i = 0; i < message.backupPlanRules.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.backupPlanRules[i]); + return writer; + }; + + /** + * Encodes the specified GcpBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IGcpBackupConfig} message GcpBackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpBackupConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcpBackupConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpBackupConfig.decode = function 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.backupdr.v1.GcpBackupConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backupPlan = reader.string(); + break; + } + case 2: { + message.backupPlanDescription = reader.string(); + break; + } + case 3: { + message.backupPlanAssociation = reader.string(); + break; + } + case 4: { + if (!(message.backupPlanRules && message.backupPlanRules.length)) + message.backupPlanRules = []; + message.backupPlanRules.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcpBackupConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpBackupConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcpBackupConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcpBackupConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + if (!$util.isString(message.backupPlan)) + return "backupPlan: string expected"; + if (message.backupPlanDescription != null && message.hasOwnProperty("backupPlanDescription")) + if (!$util.isString(message.backupPlanDescription)) + return "backupPlanDescription: string expected"; + if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) + if (!$util.isString(message.backupPlanAssociation)) + return "backupPlanAssociation: string expected"; + if (message.backupPlanRules != null && message.hasOwnProperty("backupPlanRules")) { + if (!Array.isArray(message.backupPlanRules)) + return "backupPlanRules: array expected"; + for (var i = 0; i < message.backupPlanRules.length; ++i) + if (!$util.isString(message.backupPlanRules[i])) + return "backupPlanRules: string[] expected"; + } + return null; + }; + + /** + * Creates a GcpBackupConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig + */ + GcpBackupConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GcpBackupConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.GcpBackupConfig(); + if (object.backupPlan != null) + message.backupPlan = String(object.backupPlan); + if (object.backupPlanDescription != null) + message.backupPlanDescription = String(object.backupPlanDescription); + if (object.backupPlanAssociation != null) + message.backupPlanAssociation = String(object.backupPlanAssociation); + if (object.backupPlanRules) { + if (!Array.isArray(object.backupPlanRules)) + throw TypeError(".google.cloud.backupdr.v1.GcpBackupConfig.backupPlanRules: array expected"); + message.backupPlanRules = []; + for (var i = 0; i < object.backupPlanRules.length; ++i) + message.backupPlanRules[i] = String(object.backupPlanRules[i]); + } + return message; + }; + + /** + * Creates a plain object from a GcpBackupConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {google.cloud.backupdr.v1.GcpBackupConfig} message GcpBackupConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcpBackupConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.backupPlanRules = []; + if (options.defaults) { + object.backupPlan = ""; + object.backupPlanDescription = ""; + object.backupPlanAssociation = ""; + } + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + object.backupPlan = message.backupPlan; + if (message.backupPlanDescription != null && message.hasOwnProperty("backupPlanDescription")) + object.backupPlanDescription = message.backupPlanDescription; + if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) + object.backupPlanAssociation = message.backupPlanAssociation; + if (message.backupPlanRules && message.backupPlanRules.length) { + object.backupPlanRules = []; + for (var j = 0; j < message.backupPlanRules.length; ++j) + object.backupPlanRules[j] = message.backupPlanRules[j]; + } + return object; + }; + + /** + * Converts this GcpBackupConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @instance + * @returns {Object.} JSON object + */ + GcpBackupConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcpBackupConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GcpBackupConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcpBackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpBackupConfig"; + }; + + return GcpBackupConfig; + })(); + + v1.BackupApplianceBackupConfig = (function() { + + /** + * Properties of a BackupApplianceBackupConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupApplianceBackupConfig + * @property {string|null} [backupApplianceName] BackupApplianceBackupConfig backupApplianceName + * @property {number|Long|null} [backupApplianceId] BackupApplianceBackupConfig backupApplianceId + * @property {number|Long|null} [slaId] BackupApplianceBackupConfig slaId + * @property {string|null} [applicationName] BackupApplianceBackupConfig applicationName + * @property {string|null} [hostName] BackupApplianceBackupConfig hostName + * @property {string|null} [sltName] BackupApplianceBackupConfig sltName + * @property {string|null} [slpName] BackupApplianceBackupConfig slpName + */ + + /** + * Constructs a new BackupApplianceBackupConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupApplianceBackupConfig. + * @implements IBackupApplianceBackupConfig + * @constructor + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig=} [properties] Properties to set + */ + function BackupApplianceBackupConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupApplianceBackupConfig backupApplianceName. + * @member {string} backupApplianceName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.backupApplianceName = ""; + + /** + * BackupApplianceBackupConfig backupApplianceId. + * @member {number|Long} backupApplianceId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.backupApplianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupApplianceBackupConfig slaId. + * @member {number|Long} slaId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.slaId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupApplianceBackupConfig applicationName. + * @member {string} applicationName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.applicationName = ""; + + /** + * BackupApplianceBackupConfig hostName. + * @member {string} hostName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.hostName = ""; + + /** + * BackupApplianceBackupConfig sltName. + * @member {string} sltName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.sltName = ""; + + /** + * BackupApplianceBackupConfig slpName. + * @member {string} slpName + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + */ + BackupApplianceBackupConfig.prototype.slpName = ""; + + /** + * Creates a new BackupApplianceBackupConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig instance + */ + BackupApplianceBackupConfig.create = function create(properties) { + return new BackupApplianceBackupConfig(properties); + }; + + /** + * Encodes the specified BackupApplianceBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig} message BackupApplianceBackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceBackupConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupApplianceName != null && Object.hasOwnProperty.call(message, "backupApplianceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupApplianceName); + if (message.backupApplianceId != null && Object.hasOwnProperty.call(message, "backupApplianceId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.backupApplianceId); + if (message.slaId != null && Object.hasOwnProperty.call(message, "slaId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.slaId); + if (message.applicationName != null && Object.hasOwnProperty.call(message, "applicationName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.applicationName); + if (message.hostName != null && Object.hasOwnProperty.call(message, "hostName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.hostName); + if (message.sltName != null && Object.hasOwnProperty.call(message, "sltName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sltName); + if (message.slpName != null && Object.hasOwnProperty.call(message, "slpName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.slpName); + return writer; + }; + + /** + * Encodes the specified BackupApplianceBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig} message BackupApplianceBackupConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceBackupConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceBackupConfig.decode = function 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.backupdr.v1.BackupApplianceBackupConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backupApplianceName = reader.string(); + break; + } + case 2: { + message.backupApplianceId = reader.int64(); + break; + } + case 3: { + message.slaId = reader.int64(); + break; + } + case 4: { + message.applicationName = reader.string(); + break; + } + case 5: { + message.hostName = reader.string(); + break; + } + case 6: { + message.sltName = reader.string(); + break; + } + case 7: { + message.slpName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceBackupConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupApplianceBackupConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupApplianceBackupConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + if (!$util.isString(message.backupApplianceName)) + return "backupApplianceName: string expected"; + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (!$util.isInteger(message.backupApplianceId) && !(message.backupApplianceId && $util.isInteger(message.backupApplianceId.low) && $util.isInteger(message.backupApplianceId.high))) + return "backupApplianceId: integer|Long expected"; + if (message.slaId != null && message.hasOwnProperty("slaId")) + if (!$util.isInteger(message.slaId) && !(message.slaId && $util.isInteger(message.slaId.low) && $util.isInteger(message.slaId.high))) + return "slaId: integer|Long expected"; + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + if (!$util.isString(message.applicationName)) + return "applicationName: string expected"; + if (message.hostName != null && message.hasOwnProperty("hostName")) + if (!$util.isString(message.hostName)) + return "hostName: string expected"; + if (message.sltName != null && message.hasOwnProperty("sltName")) + if (!$util.isString(message.sltName)) + return "sltName: string expected"; + if (message.slpName != null && message.hasOwnProperty("slpName")) + if (!$util.isString(message.slpName)) + return "slpName: string expected"; + return null; + }; + + /** + * Creates a BackupApplianceBackupConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig + */ + BackupApplianceBackupConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig(); + if (object.backupApplianceName != null) + message.backupApplianceName = String(object.backupApplianceName); + if (object.backupApplianceId != null) + if ($util.Long) + (message.backupApplianceId = $util.Long.fromValue(object.backupApplianceId)).unsigned = false; + else if (typeof object.backupApplianceId === "string") + message.backupApplianceId = parseInt(object.backupApplianceId, 10); + else if (typeof object.backupApplianceId === "number") + message.backupApplianceId = object.backupApplianceId; + else if (typeof object.backupApplianceId === "object") + message.backupApplianceId = new $util.LongBits(object.backupApplianceId.low >>> 0, object.backupApplianceId.high >>> 0).toNumber(); + if (object.slaId != null) + if ($util.Long) + (message.slaId = $util.Long.fromValue(object.slaId)).unsigned = false; + else if (typeof object.slaId === "string") + message.slaId = parseInt(object.slaId, 10); + else if (typeof object.slaId === "number") + message.slaId = object.slaId; + else if (typeof object.slaId === "object") + message.slaId = new $util.LongBits(object.slaId.low >>> 0, object.slaId.high >>> 0).toNumber(); + if (object.applicationName != null) + message.applicationName = String(object.applicationName); + if (object.hostName != null) + message.hostName = String(object.hostName); + if (object.sltName != null) + message.sltName = String(object.sltName); + if (object.slpName != null) + message.slpName = String(object.slpName); + return message; + }; + + /** + * Creates a plain object from a BackupApplianceBackupConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {google.cloud.backupdr.v1.BackupApplianceBackupConfig} message BackupApplianceBackupConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupApplianceBackupConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.backupApplianceName = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.backupApplianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.backupApplianceId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.slaId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.slaId = options.longs === String ? "0" : 0; + object.applicationName = ""; + object.hostName = ""; + object.sltName = ""; + object.slpName = ""; + } + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + object.backupApplianceName = message.backupApplianceName; + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (typeof message.backupApplianceId === "number") + object.backupApplianceId = options.longs === String ? String(message.backupApplianceId) : message.backupApplianceId; + else + object.backupApplianceId = options.longs === String ? $util.Long.prototype.toString.call(message.backupApplianceId) : options.longs === Number ? new $util.LongBits(message.backupApplianceId.low >>> 0, message.backupApplianceId.high >>> 0).toNumber() : message.backupApplianceId; + if (message.slaId != null && message.hasOwnProperty("slaId")) + if (typeof message.slaId === "number") + object.slaId = options.longs === String ? String(message.slaId) : message.slaId; + else + object.slaId = options.longs === String ? $util.Long.prototype.toString.call(message.slaId) : options.longs === Number ? new $util.LongBits(message.slaId.low >>> 0, message.slaId.high >>> 0).toNumber() : message.slaId; + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + object.applicationName = message.applicationName; + if (message.hostName != null && message.hasOwnProperty("hostName")) + object.hostName = message.hostName; + if (message.sltName != null && message.hasOwnProperty("sltName")) + object.sltName = message.sltName; + if (message.slpName != null && message.hasOwnProperty("slpName")) + object.slpName = message.slpName; + return object; + }; + + /** + * Converts this BackupApplianceBackupConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @instance + * @returns {Object.} JSON object + */ + BackupApplianceBackupConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupApplianceBackupConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupApplianceBackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceBackupConfig"; + }; + + return BackupApplianceBackupConfig; + })(); + + v1.DataSourceGcpResource = (function() { + + /** + * Properties of a DataSourceGcpResource. + * @memberof google.cloud.backupdr.v1 + * @interface IDataSourceGcpResource + * @property {string|null} [gcpResourcename] DataSourceGcpResource gcpResourcename + * @property {string|null} [location] DataSourceGcpResource location + * @property {string|null} [type] DataSourceGcpResource type + * @property {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null} [computeInstanceDatasourceProperties] DataSourceGcpResource computeInstanceDatasourceProperties + */ + + /** + * Constructs a new DataSourceGcpResource. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DataSourceGcpResource. + * @implements IDataSourceGcpResource + * @constructor + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource=} [properties] Properties to set + */ + function DataSourceGcpResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataSourceGcpResource gcpResourcename. + * @member {string} gcpResourcename + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + DataSourceGcpResource.prototype.gcpResourcename = ""; + + /** + * DataSourceGcpResource location. + * @member {string} location + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + DataSourceGcpResource.prototype.location = ""; + + /** + * DataSourceGcpResource type. + * @member {string} type + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + DataSourceGcpResource.prototype.type = ""; + + /** + * DataSourceGcpResource computeInstanceDatasourceProperties. + * @member {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null|undefined} computeInstanceDatasourceProperties + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + DataSourceGcpResource.prototype.computeInstanceDatasourceProperties = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataSourceGcpResource gcpResourceProperties. + * @member {"computeInstanceDatasourceProperties"|undefined} gcpResourceProperties + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + */ + Object.defineProperty(DataSourceGcpResource.prototype, "gcpResourceProperties", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceDatasourceProperties"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataSourceGcpResource instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource instance + */ + DataSourceGcpResource.create = function create(properties) { + return new DataSourceGcpResource(properties); + }; + + /** + * Encodes the specified DataSourceGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource} message DataSourceGcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceGcpResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.computeInstanceDatasourceProperties != null && Object.hasOwnProperty.call(message, "computeInstanceDatasourceProperties")) + $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.encode(message.computeInstanceDatasourceProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataSourceGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.IDataSourceGcpResource} message DataSourceGcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceGcpResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceGcpResource.decode = function 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.backupdr.v1.DataSourceGcpResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcpResourcename = reader.string(); + break; + } + case 2: { + message.location = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 4: { + message.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSourceGcpResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceGcpResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSourceGcpResource message. + * @function verify + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSourceGcpResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + if (!$util.isString(message.gcpResourcename)) + return "gcpResourcename: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.computeInstanceDatasourceProperties != null && message.hasOwnProperty("computeInstanceDatasourceProperties")) { + properties.gcpResourceProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify(message.computeInstanceDatasourceProperties); + if (error) + return "computeInstanceDatasourceProperties." + error; + } + } + return null; + }; + + /** + * Creates a DataSourceGcpResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource + */ + DataSourceGcpResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DataSourceGcpResource) + return object; + var message = new $root.google.cloud.backupdr.v1.DataSourceGcpResource(); + if (object.gcpResourcename != null) + message.gcpResourcename = String(object.gcpResourcename); + if (object.location != null) + message.location = String(object.location); + if (object.type != null) + message.type = String(object.type); + if (object.computeInstanceDatasourceProperties != null) { + if (typeof object.computeInstanceDatasourceProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.DataSourceGcpResource.computeInstanceDatasourceProperties: object expected"); + message.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.fromObject(object.computeInstanceDatasourceProperties); + } + return message; + }; + + /** + * Creates a plain object from a DataSourceGcpResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {google.cloud.backupdr.v1.DataSourceGcpResource} message DataSourceGcpResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSourceGcpResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gcpResourcename = ""; + object.location = ""; + object.type = ""; + } + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + object.gcpResourcename = message.gcpResourcename; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.computeInstanceDatasourceProperties != null && message.hasOwnProperty("computeInstanceDatasourceProperties")) { + object.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.toObject(message.computeInstanceDatasourceProperties, options); + if (options.oneofs) + object.gcpResourceProperties = "computeInstanceDatasourceProperties"; + } + return object; + }; + + /** + * Converts this DataSourceGcpResource to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @instance + * @returns {Object.} JSON object + */ + DataSourceGcpResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataSourceGcpResource + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DataSourceGcpResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSourceGcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSourceGcpResource"; + }; + + return DataSourceGcpResource; + })(); + + v1.DataSourceBackupApplianceApplication = (function() { + + /** + * Properties of a DataSourceBackupApplianceApplication. + * @memberof google.cloud.backupdr.v1 + * @interface IDataSourceBackupApplianceApplication + * @property {string|null} [applicationName] DataSourceBackupApplianceApplication applicationName + * @property {string|null} [backupAppliance] DataSourceBackupApplianceApplication backupAppliance + * @property {number|Long|null} [applianceId] DataSourceBackupApplianceApplication applianceId + * @property {string|null} [type] DataSourceBackupApplianceApplication type + * @property {number|Long|null} [applicationId] DataSourceBackupApplianceApplication applicationId + * @property {string|null} [hostname] DataSourceBackupApplianceApplication hostname + * @property {number|Long|null} [hostId] DataSourceBackupApplianceApplication hostId + */ + + /** + * Constructs a new DataSourceBackupApplianceApplication. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DataSourceBackupApplianceApplication. + * @implements IDataSourceBackupApplianceApplication + * @constructor + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication=} [properties] Properties to set + */ + function DataSourceBackupApplianceApplication(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataSourceBackupApplianceApplication applicationName. + * @member {string} applicationName + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.applicationName = ""; + + /** + * DataSourceBackupApplianceApplication backupAppliance. + * @member {string} backupAppliance + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.backupAppliance = ""; + + /** + * DataSourceBackupApplianceApplication applianceId. + * @member {number|Long} applianceId + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.applianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataSourceBackupApplianceApplication type. + * @member {string} type + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.type = ""; + + /** + * DataSourceBackupApplianceApplication applicationId. + * @member {number|Long} applicationId + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.applicationId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DataSourceBackupApplianceApplication hostname. + * @member {string} hostname + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.hostname = ""; + + /** + * DataSourceBackupApplianceApplication hostId. + * @member {number|Long} hostId + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + */ + DataSourceBackupApplianceApplication.prototype.hostId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new DataSourceBackupApplianceApplication instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication instance + */ + DataSourceBackupApplianceApplication.create = function create(properties) { + return new DataSourceBackupApplianceApplication(properties); + }; + + /** + * Encodes the specified DataSourceBackupApplianceApplication message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceBackupApplianceApplication.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.applicationName != null && Object.hasOwnProperty.call(message, "applicationName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.applicationName); + if (message.backupAppliance != null && Object.hasOwnProperty.call(message, "backupAppliance")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupAppliance); + if (message.applianceId != null && Object.hasOwnProperty.call(message, "applianceId")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.applianceId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.type); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.hostname); + if (message.hostId != null && Object.hasOwnProperty.call(message, "hostId")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.hostId); + if (message.applicationId != null && Object.hasOwnProperty.call(message, "applicationId")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.applicationId); + return writer; + }; + + /** + * Encodes the specified DataSourceBackupApplianceApplication message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceBackupApplianceApplication.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceBackupApplianceApplication.decode = function 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.backupdr.v1.DataSourceBackupApplianceApplication(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.applicationName = reader.string(); + break; + } + case 2: { + message.backupAppliance = reader.string(); + break; + } + case 3: { + message.applianceId = reader.int64(); + break; + } + case 4: { + message.type = reader.string(); + break; + } + case 8: { + message.applicationId = reader.int64(); + break; + } + case 6: { + message.hostname = reader.string(); + break; + } + case 7: { + message.hostId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceBackupApplianceApplication.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSourceBackupApplianceApplication message. + * @function verify + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSourceBackupApplianceApplication.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + if (!$util.isString(message.applicationName)) + return "applicationName: string expected"; + if (message.backupAppliance != null && message.hasOwnProperty("backupAppliance")) + if (!$util.isString(message.backupAppliance)) + return "backupAppliance: string expected"; + if (message.applianceId != null && message.hasOwnProperty("applianceId")) + if (!$util.isInteger(message.applianceId) && !(message.applianceId && $util.isInteger(message.applianceId.low) && $util.isInteger(message.applianceId.high))) + return "applianceId: integer|Long expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.applicationId != null && message.hasOwnProperty("applicationId")) + if (!$util.isInteger(message.applicationId) && !(message.applicationId && $util.isInteger(message.applicationId.low) && $util.isInteger(message.applicationId.high))) + return "applicationId: integer|Long expected"; + if (message.hostname != null && message.hasOwnProperty("hostname")) + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + if (message.hostId != null && message.hasOwnProperty("hostId")) + if (!$util.isInteger(message.hostId) && !(message.hostId && $util.isInteger(message.hostId.low) && $util.isInteger(message.hostId.high))) + return "hostId: integer|Long expected"; + return null; + }; + + /** + * Creates a DataSourceBackupApplianceApplication message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication + */ + DataSourceBackupApplianceApplication.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication) + return object; + var message = new $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication(); + if (object.applicationName != null) + message.applicationName = String(object.applicationName); + if (object.backupAppliance != null) + message.backupAppliance = String(object.backupAppliance); + if (object.applianceId != null) + if ($util.Long) + (message.applianceId = $util.Long.fromValue(object.applianceId)).unsigned = false; + else if (typeof object.applianceId === "string") + message.applianceId = parseInt(object.applianceId, 10); + else if (typeof object.applianceId === "number") + message.applianceId = object.applianceId; + else if (typeof object.applianceId === "object") + message.applianceId = new $util.LongBits(object.applianceId.low >>> 0, object.applianceId.high >>> 0).toNumber(); + if (object.type != null) + message.type = String(object.type); + if (object.applicationId != null) + if ($util.Long) + (message.applicationId = $util.Long.fromValue(object.applicationId)).unsigned = false; + else if (typeof object.applicationId === "string") + message.applicationId = parseInt(object.applicationId, 10); + else if (typeof object.applicationId === "number") + message.applicationId = object.applicationId; + else if (typeof object.applicationId === "object") + message.applicationId = new $util.LongBits(object.applicationId.low >>> 0, object.applicationId.high >>> 0).toNumber(); + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.hostId != null) + if ($util.Long) + (message.hostId = $util.Long.fromValue(object.hostId)).unsigned = false; + else if (typeof object.hostId === "string") + message.hostId = parseInt(object.hostId, 10); + else if (typeof object.hostId === "number") + message.hostId = object.hostId; + else if (typeof object.hostId === "object") + message.hostId = new $util.LongBits(object.hostId.low >>> 0, object.hostId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a DataSourceBackupApplianceApplication message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSourceBackupApplianceApplication.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.applicationName = ""; + object.backupAppliance = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.applianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.applianceId = options.longs === String ? "0" : 0; + object.type = ""; + object.hostname = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.hostId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.hostId = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.applicationId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.applicationId = options.longs === String ? "0" : 0; + } + if (message.applicationName != null && message.hasOwnProperty("applicationName")) + object.applicationName = message.applicationName; + if (message.backupAppliance != null && message.hasOwnProperty("backupAppliance")) + object.backupAppliance = message.backupAppliance; + if (message.applianceId != null && message.hasOwnProperty("applianceId")) + if (typeof message.applianceId === "number") + object.applianceId = options.longs === String ? String(message.applianceId) : message.applianceId; + else + object.applianceId = options.longs === String ? $util.Long.prototype.toString.call(message.applianceId) : options.longs === Number ? new $util.LongBits(message.applianceId.low >>> 0, message.applianceId.high >>> 0).toNumber() : message.applianceId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.hostname != null && message.hasOwnProperty("hostname")) + object.hostname = message.hostname; + if (message.hostId != null && message.hasOwnProperty("hostId")) + if (typeof message.hostId === "number") + object.hostId = options.longs === String ? String(message.hostId) : message.hostId; + else + object.hostId = options.longs === String ? $util.Long.prototype.toString.call(message.hostId) : options.longs === Number ? new $util.LongBits(message.hostId.low >>> 0, message.hostId.high >>> 0).toNumber() : message.hostId; + if (message.applicationId != null && message.hasOwnProperty("applicationId")) + if (typeof message.applicationId === "number") + object.applicationId = options.longs === String ? String(message.applicationId) : message.applicationId; + else + object.applicationId = options.longs === String ? $util.Long.prototype.toString.call(message.applicationId) : options.longs === Number ? new $util.LongBits(message.applicationId.low >>> 0, message.applicationId.high >>> 0).toNumber() : message.applicationId; + return object; + }; + + /** + * Converts this DataSourceBackupApplianceApplication to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @instance + * @returns {Object.} JSON object + */ + DataSourceBackupApplianceApplication.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataSourceBackupApplianceApplication + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSourceBackupApplianceApplication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSourceBackupApplianceApplication"; + }; + + return DataSourceBackupApplianceApplication; + })(); + + v1.ServiceLockInfo = (function() { + + /** + * Properties of a ServiceLockInfo. + * @memberof google.cloud.backupdr.v1 + * @interface IServiceLockInfo + * @property {string|null} [operation] ServiceLockInfo operation + */ + + /** + * Constructs a new ServiceLockInfo. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ServiceLockInfo. + * @implements IServiceLockInfo + * @constructor + * @param {google.cloud.backupdr.v1.IServiceLockInfo=} [properties] Properties to set + */ + function ServiceLockInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceLockInfo operation. + * @member {string} operation + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @instance + */ + ServiceLockInfo.prototype.operation = ""; + + /** + * Creates a new ServiceLockInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IServiceLockInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo instance + */ + ServiceLockInfo.create = function create(properties) { + return new ServiceLockInfo(properties); + }; + + /** + * Encodes the specified ServiceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IServiceLockInfo} message ServiceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceLockInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.operation); + return writer; + }; + + /** + * Encodes the specified ServiceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IServiceLockInfo} message ServiceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceLockInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceLockInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceLockInfo.decode = function 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.backupdr.v1.ServiceLockInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.operation = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceLockInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceLockInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceLockInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceLockInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) + if (!$util.isString(message.operation)) + return "operation: string expected"; + return null; + }; + + /** + * Creates a ServiceLockInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo + */ + ServiceLockInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ServiceLockInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.ServiceLockInfo(); + if (object.operation != null) + message.operation = String(object.operation); + return message; + }; + + /** + * Creates a plain object from a ServiceLockInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {google.cloud.backupdr.v1.ServiceLockInfo} message ServiceLockInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceLockInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.operation = ""; + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = message.operation; + return object; + }; + + /** + * Converts this ServiceLockInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @instance + * @returns {Object.} JSON object + */ + ServiceLockInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceLockInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ServiceLockInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceLockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ServiceLockInfo"; + }; + + return ServiceLockInfo; + })(); + + v1.BackupApplianceLockInfo = (function() { + + /** + * Properties of a BackupApplianceLockInfo. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupApplianceLockInfo + * @property {number|Long|null} [backupApplianceId] BackupApplianceLockInfo backupApplianceId + * @property {string|null} [backupApplianceName] BackupApplianceLockInfo backupApplianceName + * @property {string|null} [lockReason] BackupApplianceLockInfo lockReason + * @property {string|null} [jobName] BackupApplianceLockInfo jobName + * @property {string|null} [backupImage] BackupApplianceLockInfo backupImage + * @property {number|Long|null} [slaId] BackupApplianceLockInfo slaId + */ + + /** + * Constructs a new BackupApplianceLockInfo. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupApplianceLockInfo. + * @implements IBackupApplianceLockInfo + * @constructor + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo=} [properties] Properties to set + */ + function BackupApplianceLockInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupApplianceLockInfo backupApplianceId. + * @member {number|Long} backupApplianceId + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.backupApplianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BackupApplianceLockInfo backupApplianceName. + * @member {string} backupApplianceName + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.backupApplianceName = ""; + + /** + * BackupApplianceLockInfo lockReason. + * @member {string} lockReason + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.lockReason = ""; + + /** + * BackupApplianceLockInfo jobName. + * @member {string|null|undefined} jobName + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.jobName = null; + + /** + * BackupApplianceLockInfo backupImage. + * @member {string|null|undefined} backupImage + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.backupImage = null; + + /** + * BackupApplianceLockInfo slaId. + * @member {number|Long|null|undefined} slaId + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + BackupApplianceLockInfo.prototype.slaId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupApplianceLockInfo lockSource. + * @member {"jobName"|"backupImage"|"slaId"|undefined} lockSource + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + */ + Object.defineProperty(BackupApplianceLockInfo.prototype, "lockSource", { + get: $util.oneOfGetter($oneOfFields = ["jobName", "backupImage", "slaId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupApplianceLockInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo instance + */ + BackupApplianceLockInfo.create = function create(properties) { + return new BackupApplianceLockInfo(properties); + }; + + /** + * Encodes the specified BackupApplianceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo} message BackupApplianceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceLockInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupApplianceId != null && Object.hasOwnProperty.call(message, "backupApplianceId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.backupApplianceId); + if (message.backupApplianceName != null && Object.hasOwnProperty.call(message, "backupApplianceName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupApplianceName); + if (message.lockReason != null && Object.hasOwnProperty.call(message, "lockReason")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.lockReason); + if (message.jobName != null && Object.hasOwnProperty.call(message, "jobName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.jobName); + if (message.backupImage != null && Object.hasOwnProperty.call(message, "backupImage")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.backupImage); + if (message.slaId != null && Object.hasOwnProperty.call(message, "slaId")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.slaId); + return writer; + }; + + /** + * Encodes the specified BackupApplianceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo} message BackupApplianceLockInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceLockInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceLockInfo.decode = function 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.backupdr.v1.BackupApplianceLockInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backupApplianceId = reader.int64(); + break; + } + case 2: { + message.backupApplianceName = reader.string(); + break; + } + case 5: { + message.lockReason = reader.string(); + break; + } + case 6: { + message.jobName = reader.string(); + break; + } + case 7: { + message.backupImage = reader.string(); + break; + } + case 8: { + message.slaId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupApplianceLockInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceLockInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupApplianceLockInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupApplianceLockInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (!$util.isInteger(message.backupApplianceId) && !(message.backupApplianceId && $util.isInteger(message.backupApplianceId.low) && $util.isInteger(message.backupApplianceId.high))) + return "backupApplianceId: integer|Long expected"; + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + if (!$util.isString(message.backupApplianceName)) + return "backupApplianceName: string expected"; + if (message.lockReason != null && message.hasOwnProperty("lockReason")) + if (!$util.isString(message.lockReason)) + return "lockReason: string expected"; + if (message.jobName != null && message.hasOwnProperty("jobName")) { + properties.lockSource = 1; + if (!$util.isString(message.jobName)) + return "jobName: string expected"; + } + if (message.backupImage != null && message.hasOwnProperty("backupImage")) { + if (properties.lockSource === 1) + return "lockSource: multiple values"; + properties.lockSource = 1; + if (!$util.isString(message.backupImage)) + return "backupImage: string expected"; + } + if (message.slaId != null && message.hasOwnProperty("slaId")) { + if (properties.lockSource === 1) + return "lockSource: multiple values"; + properties.lockSource = 1; + if (!$util.isInteger(message.slaId) && !(message.slaId && $util.isInteger(message.slaId.low) && $util.isInteger(message.slaId.high))) + return "slaId: integer|Long expected"; + } + return null; + }; + + /** + * Creates a BackupApplianceLockInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo + */ + BackupApplianceLockInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceLockInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupApplianceLockInfo(); + if (object.backupApplianceId != null) + if ($util.Long) + (message.backupApplianceId = $util.Long.fromValue(object.backupApplianceId)).unsigned = false; + else if (typeof object.backupApplianceId === "string") + message.backupApplianceId = parseInt(object.backupApplianceId, 10); + else if (typeof object.backupApplianceId === "number") + message.backupApplianceId = object.backupApplianceId; + else if (typeof object.backupApplianceId === "object") + message.backupApplianceId = new $util.LongBits(object.backupApplianceId.low >>> 0, object.backupApplianceId.high >>> 0).toNumber(); + if (object.backupApplianceName != null) + message.backupApplianceName = String(object.backupApplianceName); + if (object.lockReason != null) + message.lockReason = String(object.lockReason); + if (object.jobName != null) + message.jobName = String(object.jobName); + if (object.backupImage != null) + message.backupImage = String(object.backupImage); + if (object.slaId != null) + if ($util.Long) + (message.slaId = $util.Long.fromValue(object.slaId)).unsigned = false; + else if (typeof object.slaId === "string") + message.slaId = parseInt(object.slaId, 10); + else if (typeof object.slaId === "number") + message.slaId = object.slaId; + else if (typeof object.slaId === "object") + message.slaId = new $util.LongBits(object.slaId.low >>> 0, object.slaId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BackupApplianceLockInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {google.cloud.backupdr.v1.BackupApplianceLockInfo} message BackupApplianceLockInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupApplianceLockInfo.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.backupApplianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.backupApplianceId = options.longs === String ? "0" : 0; + object.backupApplianceName = ""; + object.lockReason = ""; + } + if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) + if (typeof message.backupApplianceId === "number") + object.backupApplianceId = options.longs === String ? String(message.backupApplianceId) : message.backupApplianceId; + else + object.backupApplianceId = options.longs === String ? $util.Long.prototype.toString.call(message.backupApplianceId) : options.longs === Number ? new $util.LongBits(message.backupApplianceId.low >>> 0, message.backupApplianceId.high >>> 0).toNumber() : message.backupApplianceId; + if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) + object.backupApplianceName = message.backupApplianceName; + if (message.lockReason != null && message.hasOwnProperty("lockReason")) + object.lockReason = message.lockReason; + if (message.jobName != null && message.hasOwnProperty("jobName")) { + object.jobName = message.jobName; + if (options.oneofs) + object.lockSource = "jobName"; + } + if (message.backupImage != null && message.hasOwnProperty("backupImage")) { + object.backupImage = message.backupImage; + if (options.oneofs) + object.lockSource = "backupImage"; + } + if (message.slaId != null && message.hasOwnProperty("slaId")) { + if (typeof message.slaId === "number") + object.slaId = options.longs === String ? String(message.slaId) : message.slaId; + else + object.slaId = options.longs === String ? $util.Long.prototype.toString.call(message.slaId) : options.longs === Number ? new $util.LongBits(message.slaId.low >>> 0, message.slaId.high >>> 0).toNumber() : message.slaId; + if (options.oneofs) + object.lockSource = "slaId"; + } + return object; + }; + + /** + * Converts this BackupApplianceLockInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @instance + * @returns {Object.} JSON object + */ + BackupApplianceLockInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupApplianceLockInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupApplianceLockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceLockInfo"; + }; + + return BackupApplianceLockInfo; + })(); + + v1.BackupLock = (function() { + + /** + * Properties of a BackupLock. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupLock + * @property {google.protobuf.ITimestamp|null} [lockUntilTime] BackupLock lockUntilTime + * @property {google.cloud.backupdr.v1.IBackupApplianceLockInfo|null} [backupApplianceLockInfo] BackupLock backupApplianceLockInfo + * @property {google.cloud.backupdr.v1.IServiceLockInfo|null} [serviceLockInfo] BackupLock serviceLockInfo + */ + + /** + * Constructs a new BackupLock. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupLock. + * @implements IBackupLock + * @constructor + * @param {google.cloud.backupdr.v1.IBackupLock=} [properties] Properties to set + */ + function BackupLock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupLock lockUntilTime. + * @member {google.protobuf.ITimestamp|null|undefined} lockUntilTime + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + */ + BackupLock.prototype.lockUntilTime = null; + + /** + * BackupLock backupApplianceLockInfo. + * @member {google.cloud.backupdr.v1.IBackupApplianceLockInfo|null|undefined} backupApplianceLockInfo + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + */ + BackupLock.prototype.backupApplianceLockInfo = null; + + /** + * BackupLock serviceLockInfo. + * @member {google.cloud.backupdr.v1.IServiceLockInfo|null|undefined} serviceLockInfo + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + */ + BackupLock.prototype.serviceLockInfo = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupLock ClientLockInfo. + * @member {"backupApplianceLockInfo"|"serviceLockInfo"|undefined} ClientLockInfo + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + */ + Object.defineProperty(BackupLock.prototype, "ClientLockInfo", { + get: $util.oneOfGetter($oneOfFields = ["backupApplianceLockInfo", "serviceLockInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupLock instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.IBackupLock=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock instance + */ + BackupLock.create = function create(properties) { + return new BackupLock(properties); + }; + + /** + * Encodes the specified BackupLock message. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.IBackupLock} message BackupLock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupLock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lockUntilTime != null && Object.hasOwnProperty.call(message, "lockUntilTime")) + $root.google.protobuf.Timestamp.encode(message.lockUntilTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.backupApplianceLockInfo != null && Object.hasOwnProperty.call(message, "backupApplianceLockInfo")) + $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.encode(message.backupApplianceLockInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.serviceLockInfo != null && Object.hasOwnProperty.call(message, "serviceLockInfo")) + $root.google.cloud.backupdr.v1.ServiceLockInfo.encode(message.serviceLockInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BackupLock message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.IBackupLock} message BackupLock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupLock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupLock message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupLock.decode = function 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.backupdr.v1.BackupLock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.lockUntilTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.decode(reader, reader.uint32()); + break; + } + case 4: { + message.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupLock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupLock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupLock message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupLock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.lockUntilTime != null && message.hasOwnProperty("lockUntilTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lockUntilTime); + if (error) + return "lockUntilTime." + error; + } + if (message.backupApplianceLockInfo != null && message.hasOwnProperty("backupApplianceLockInfo")) { + properties.ClientLockInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.verify(message.backupApplianceLockInfo); + if (error) + return "backupApplianceLockInfo." + error; + } + } + if (message.serviceLockInfo != null && message.hasOwnProperty("serviceLockInfo")) { + if (properties.ClientLockInfo === 1) + return "ClientLockInfo: multiple values"; + properties.ClientLockInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.ServiceLockInfo.verify(message.serviceLockInfo); + if (error) + return "serviceLockInfo." + error; + } + } + return null; + }; + + /** + * Creates a BackupLock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock + */ + BackupLock.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupLock) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupLock(); + if (object.lockUntilTime != null) { + if (typeof object.lockUntilTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupLock.lockUntilTime: object expected"); + message.lockUntilTime = $root.google.protobuf.Timestamp.fromObject(object.lockUntilTime); + } + if (object.backupApplianceLockInfo != null) { + if (typeof object.backupApplianceLockInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupLock.backupApplianceLockInfo: object expected"); + message.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.fromObject(object.backupApplianceLockInfo); + } + if (object.serviceLockInfo != null) { + if (typeof object.serviceLockInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupLock.serviceLockInfo: object expected"); + message.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.fromObject(object.serviceLockInfo); + } + return message; + }; + + /** + * Creates a plain object from a BackupLock message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {google.cloud.backupdr.v1.BackupLock} message BackupLock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupLock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.lockUntilTime = null; + if (message.lockUntilTime != null && message.hasOwnProperty("lockUntilTime")) + object.lockUntilTime = $root.google.protobuf.Timestamp.toObject(message.lockUntilTime, options); + if (message.backupApplianceLockInfo != null && message.hasOwnProperty("backupApplianceLockInfo")) { + object.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.toObject(message.backupApplianceLockInfo, options); + if (options.oneofs) + object.ClientLockInfo = "backupApplianceLockInfo"; + } + if (message.serviceLockInfo != null && message.hasOwnProperty("serviceLockInfo")) { + object.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.toObject(message.serviceLockInfo, options); + if (options.oneofs) + object.ClientLockInfo = "serviceLockInfo"; + } + return object; + }; + + /** + * Converts this BackupLock to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupLock + * @instance + * @returns {Object.} JSON object + */ + BackupLock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupLock + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupLock + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupLock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupLock"; + }; + + return BackupLock; + })(); + + v1.Backup = (function() { + + /** + * Properties of a Backup. + * @memberof google.cloud.backupdr.v1 + * @interface IBackup + * @property {string|null} [name] Backup name + * @property {string|null} [description] Backup description + * @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Backup updateTime + * @property {Object.|null} [labels] Backup labels + * @property {google.protobuf.ITimestamp|null} [enforcedRetentionEndTime] Backup enforcedRetentionEndTime + * @property {google.protobuf.ITimestamp|null} [expireTime] Backup expireTime + * @property {google.protobuf.ITimestamp|null} [consistencyTime] Backup consistencyTime + * @property {string|null} [etag] Backup etag + * @property {google.cloud.backupdr.v1.Backup.State|null} [state] Backup state + * @property {Array.|null} [serviceLocks] Backup serviceLocks + * @property {Array.|null} [backupApplianceLocks] Backup backupApplianceLocks + * @property {google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null} [computeInstanceBackupProperties] Backup computeInstanceBackupProperties + * @property {google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null} [backupApplianceBackupProperties] Backup backupApplianceBackupProperties + * @property {google.cloud.backupdr.v1.Backup.BackupType|null} [backupType] Backup backupType + * @property {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null} [gcpBackupPlanInfo] Backup gcpBackupPlanInfo + * @property {number|Long|null} [resourceSizeBytes] Backup resourceSizeBytes + */ + + /** + * Constructs a new Backup. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Backup. + * @implements IBackup + * @constructor + * @param {google.cloud.backupdr.v1.IBackup=} [properties] Properties to set + */ + function Backup(properties) { + this.labels = {}; + this.serviceLocks = []; + this.backupApplianceLocks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Backup name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.name = ""; + + /** + * Backup description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.description = null; + + /** + * Backup createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.createTime = null; + + /** + * Backup updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.updateTime = null; + + /** + * Backup labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.labels = $util.emptyObject; + + /** + * Backup enforcedRetentionEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} enforcedRetentionEndTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.enforcedRetentionEndTime = null; + + /** + * Backup expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.expireTime = null; + + /** + * Backup consistencyTime. + * @member {google.protobuf.ITimestamp|null|undefined} consistencyTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.consistencyTime = null; + + /** + * Backup etag. + * @member {string|null|undefined} etag + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.etag = null; + + /** + * Backup state. + * @member {google.cloud.backupdr.v1.Backup.State} state + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.state = 0; + + /** + * Backup serviceLocks. + * @member {Array.} serviceLocks + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.serviceLocks = $util.emptyArray; + + /** + * Backup backupApplianceLocks. + * @member {Array.} backupApplianceLocks + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.backupApplianceLocks = $util.emptyArray; + + /** + * Backup computeInstanceBackupProperties. + * @member {google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null|undefined} computeInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.computeInstanceBackupProperties = null; + + /** + * Backup backupApplianceBackupProperties. + * @member {google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null|undefined} backupApplianceBackupProperties + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.backupApplianceBackupProperties = null; + + /** + * Backup backupType. + * @member {google.cloud.backupdr.v1.Backup.BackupType} backupType + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.backupType = 0; + + /** + * Backup gcpBackupPlanInfo. + * @member {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null|undefined} gcpBackupPlanInfo + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.gcpBackupPlanInfo = null; + + /** + * Backup resourceSizeBytes. + * @member {number|Long} resourceSizeBytes + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Backup.prototype.resourceSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Backup _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _createTime. + * @member {"createTime"|undefined} _createTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_createTime", { + get: $util.oneOfGetter($oneOfFields = ["createTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _updateTime. + * @member {"updateTime"|undefined} _updateTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_updateTime", { + get: $util.oneOfGetter($oneOfFields = ["updateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _enforcedRetentionEndTime. + * @member {"enforcedRetentionEndTime"|undefined} _enforcedRetentionEndTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_enforcedRetentionEndTime", { + get: $util.oneOfGetter($oneOfFields = ["enforcedRetentionEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _expireTime. + * @member {"expireTime"|undefined} _expireTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_expireTime", { + get: $util.oneOfGetter($oneOfFields = ["expireTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _consistencyTime. + * @member {"consistencyTime"|undefined} _consistencyTime + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_consistencyTime", { + get: $util.oneOfGetter($oneOfFields = ["consistencyTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup _etag. + * @member {"etag"|undefined} _etag + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "_etag", { + get: $util.oneOfGetter($oneOfFields = ["etag"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup backupProperties. + * @member {"computeInstanceBackupProperties"|"backupApplianceBackupProperties"|undefined} backupProperties + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "backupProperties", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceBackupProperties", "backupApplianceBackupProperties"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Backup planInfo. + * @member {"gcpBackupPlanInfo"|undefined} planInfo + * @memberof google.cloud.backupdr.v1.Backup + * @instance + */ + Object.defineProperty(Backup.prototype, "planInfo", { + get: $util.oneOfGetter($oneOfFields = ["gcpBackupPlanInfo"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Backup instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.IBackup=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Backup} Backup instance + */ + Backup.create = function create(properties) { + return new Backup(properties); + }; + + /** + * Encodes the specified Backup message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.IBackup} message Backup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Backup.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).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 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.enforcedRetentionEndTime != null && Object.hasOwnProperty.call(message, "enforcedRetentionEndTime")) + $root.google.protobuf.Timestamp.encode(message.enforcedRetentionEndTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.consistencyTime != null && Object.hasOwnProperty.call(message, "consistencyTime")) + $root.google.protobuf.Timestamp.encode(message.consistencyTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.state); + if (message.serviceLocks != null && message.serviceLocks.length) + for (var i = 0; i < message.serviceLocks.length; ++i) + $root.google.cloud.backupdr.v1.BackupLock.encode(message.serviceLocks[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.backupApplianceLocks != null && message.backupApplianceLocks.length) + for (var i = 0; i < message.backupApplianceLocks.length; ++i) + $root.google.cloud.backupdr.v1.BackupLock.encode(message.backupApplianceLocks[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.computeInstanceBackupProperties != null && Object.hasOwnProperty.call(message, "computeInstanceBackupProperties")) + $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.encode(message.computeInstanceBackupProperties, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.backupType); + if (message.backupApplianceBackupProperties != null && Object.hasOwnProperty.call(message, "backupApplianceBackupProperties")) + $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.encode(message.backupApplianceBackupProperties, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.gcpBackupPlanInfo != null && Object.hasOwnProperty.call(message, "gcpBackupPlanInfo")) + $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.encode(message.gcpBackupPlanInfo, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.resourceSizeBytes != null && Object.hasOwnProperty.call(message, "resourceSizeBytes")) + writer.uint32(/* id 23, wireType 0 =*/184).int64(message.resourceSizeBytes); + return writer; + }; + + /** + * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.IBackup} message Backup message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Backup.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Backup message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Backup} Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Backup.decode = function 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.backupdr.v1.Backup(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + 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 6: { + message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.consistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.etag = reader.string(); + break; + } + case 15: { + message.state = reader.int32(); + break; + } + case 17: { + if (!(message.serviceLocks && message.serviceLocks.length)) + message.serviceLocks = []; + message.serviceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader, reader.uint32())); + break; + } + case 18: { + if (!(message.backupApplianceLocks && message.backupApplianceLocks.length)) + message.backupApplianceLocks = []; + message.backupApplianceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader, reader.uint32())); + break; + } + case 19: { + message.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.decode(reader, reader.uint32()); + break; + } + case 21: { + message.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.decode(reader, reader.uint32()); + break; + } + case 20: { + message.backupType = reader.int32(); + break; + } + case 22: { + message.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.decode(reader, reader.uint32()); + break; + } + case 23: { + message.resourceSizeBytes = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Backup message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Backup} Backup + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Backup.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Backup message. + * @function verify + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Backup.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.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + properties._createTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + properties._updateTime = 1; + { + 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.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { + properties._enforcedRetentionEndTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.enforcedRetentionEndTime); + if (error) + return "enforcedRetentionEndTime." + error; + } + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + properties._expireTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + } + if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { + properties._consistencyTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.consistencyTime); + if (error) + return "consistencyTime." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) { + properties._etag = 1; + if (!$util.isString(message.etag)) + return "etag: 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.serviceLocks != null && message.hasOwnProperty("serviceLocks")) { + if (!Array.isArray(message.serviceLocks)) + return "serviceLocks: array expected"; + for (var i = 0; i < message.serviceLocks.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupLock.verify(message.serviceLocks[i]); + if (error) + return "serviceLocks." + error; + } + } + if (message.backupApplianceLocks != null && message.hasOwnProperty("backupApplianceLocks")) { + if (!Array.isArray(message.backupApplianceLocks)) + return "backupApplianceLocks: array expected"; + for (var i = 0; i < message.backupApplianceLocks.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupLock.verify(message.backupApplianceLocks[i]); + if (error) + return "backupApplianceLocks." + error; + } + } + if (message.computeInstanceBackupProperties != null && message.hasOwnProperty("computeInstanceBackupProperties")) { + properties.backupProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify(message.computeInstanceBackupProperties); + if (error) + return "computeInstanceBackupProperties." + error; + } + } + if (message.backupApplianceBackupProperties != null && message.hasOwnProperty("backupApplianceBackupProperties")) { + if (properties.backupProperties === 1) + return "backupProperties: multiple values"; + properties.backupProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify(message.backupApplianceBackupProperties); + if (error) + return "backupApplianceBackupProperties." + error; + } + } + if (message.backupType != null && message.hasOwnProperty("backupType")) + switch (message.backupType) { + default: + return "backupType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.gcpBackupPlanInfo != null && message.hasOwnProperty("gcpBackupPlanInfo")) { + properties.planInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify(message.gcpBackupPlanInfo); + if (error) + return "gcpBackupPlanInfo." + error; + } + } + if (message.resourceSizeBytes != null && message.hasOwnProperty("resourceSizeBytes")) + if (!$util.isInteger(message.resourceSizeBytes) && !(message.resourceSizeBytes && $util.isInteger(message.resourceSizeBytes.low) && $util.isInteger(message.resourceSizeBytes.high))) + return "resourceSizeBytes: integer|Long expected"; + return null; + }; + + /** + * Creates a Backup message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Backup} Backup + */ + Backup.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Backup) + return object; + var message = new $root.google.cloud.backupdr.v1.Backup(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.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.backupdr.v1.Backup.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.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.enforcedRetentionEndTime != null) { + if (typeof object.enforcedRetentionEndTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.enforcedRetentionEndTime: object expected"); + message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.fromObject(object.enforcedRetentionEndTime); + } + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + if (object.consistencyTime != null) { + if (typeof object.consistencyTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.consistencyTime: object expected"); + message.consistencyTime = $root.google.protobuf.Timestamp.fromObject(object.consistencyTime); + } + if (object.etag != null) + message.etag = String(object.etag); + 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 "ACTIVE": + case 2: + message.state = 2; + break; + case "DELETING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + } + if (object.serviceLocks) { + if (!Array.isArray(object.serviceLocks)) + throw TypeError(".google.cloud.backupdr.v1.Backup.serviceLocks: array expected"); + message.serviceLocks = []; + for (var i = 0; i < object.serviceLocks.length; ++i) { + if (typeof object.serviceLocks[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.serviceLocks: object expected"); + message.serviceLocks[i] = $root.google.cloud.backupdr.v1.BackupLock.fromObject(object.serviceLocks[i]); + } + } + if (object.backupApplianceLocks) { + if (!Array.isArray(object.backupApplianceLocks)) + throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceLocks: array expected"); + message.backupApplianceLocks = []; + for (var i = 0; i < object.backupApplianceLocks.length; ++i) { + if (typeof object.backupApplianceLocks[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceLocks: object expected"); + message.backupApplianceLocks[i] = $root.google.cloud.backupdr.v1.BackupLock.fromObject(object.backupApplianceLocks[i]); + } + } + if (object.computeInstanceBackupProperties != null) { + if (typeof object.computeInstanceBackupProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.computeInstanceBackupProperties: object expected"); + message.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.fromObject(object.computeInstanceBackupProperties); + } + if (object.backupApplianceBackupProperties != null) { + if (typeof object.backupApplianceBackupProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceBackupProperties: object expected"); + message.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.fromObject(object.backupApplianceBackupProperties); + } + switch (object.backupType) { + default: + if (typeof object.backupType === "number") { + message.backupType = object.backupType; + break; + } + break; + case "BACKUP_TYPE_UNSPECIFIED": + case 0: + message.backupType = 0; + break; + case "SCHEDULED": + case 1: + message.backupType = 1; + break; + case "ON_DEMAND": + case 2: + message.backupType = 2; + break; + } + if (object.gcpBackupPlanInfo != null) { + if (typeof object.gcpBackupPlanInfo !== "object") + throw TypeError(".google.cloud.backupdr.v1.Backup.gcpBackupPlanInfo: object expected"); + message.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.fromObject(object.gcpBackupPlanInfo); + } + if (object.resourceSizeBytes != null) + if ($util.Long) + (message.resourceSizeBytes = $util.Long.fromValue(object.resourceSizeBytes)).unsigned = false; + else if (typeof object.resourceSizeBytes === "string") + message.resourceSizeBytes = parseInt(object.resourceSizeBytes, 10); + else if (typeof object.resourceSizeBytes === "number") + message.resourceSizeBytes = object.resourceSizeBytes; + else if (typeof object.resourceSizeBytes === "object") + message.resourceSizeBytes = new $util.LongBits(object.resourceSizeBytes.low >>> 0, object.resourceSizeBytes.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Backup message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {google.cloud.backupdr.v1.Backup} message Backup + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Backup.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.serviceLocks = []; + object.backupApplianceLocks = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.backupType = options.enums === String ? "BACKUP_TYPE_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.resourceSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.resourceSizeBytes = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (options.oneofs) + object._createTime = "createTime"; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (options.oneofs) + object._updateTime = "updateTime"; + } + 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.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { + object.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.toObject(message.enforcedRetentionEndTime, options); + if (options.oneofs) + object._enforcedRetentionEndTime = "enforcedRetentionEndTime"; + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (options.oneofs) + object._expireTime = "expireTime"; + } + if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { + object.consistencyTime = $root.google.protobuf.Timestamp.toObject(message.consistencyTime, options); + if (options.oneofs) + object._consistencyTime = "consistencyTime"; + } + if (message.etag != null && message.hasOwnProperty("etag")) { + object.etag = message.etag; + if (options.oneofs) + object._etag = "etag"; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.backupdr.v1.Backup.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.Backup.State[message.state] : message.state; + if (message.serviceLocks && message.serviceLocks.length) { + object.serviceLocks = []; + for (var j = 0; j < message.serviceLocks.length; ++j) + object.serviceLocks[j] = $root.google.cloud.backupdr.v1.BackupLock.toObject(message.serviceLocks[j], options); + } + if (message.backupApplianceLocks && message.backupApplianceLocks.length) { + object.backupApplianceLocks = []; + for (var j = 0; j < message.backupApplianceLocks.length; ++j) + object.backupApplianceLocks[j] = $root.google.cloud.backupdr.v1.BackupLock.toObject(message.backupApplianceLocks[j], options); + } + if (message.computeInstanceBackupProperties != null && message.hasOwnProperty("computeInstanceBackupProperties")) { + object.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.toObject(message.computeInstanceBackupProperties, options); + if (options.oneofs) + object.backupProperties = "computeInstanceBackupProperties"; + } + if (message.backupType != null && message.hasOwnProperty("backupType")) + object.backupType = options.enums === String ? $root.google.cloud.backupdr.v1.Backup.BackupType[message.backupType] === undefined ? message.backupType : $root.google.cloud.backupdr.v1.Backup.BackupType[message.backupType] : message.backupType; + if (message.backupApplianceBackupProperties != null && message.hasOwnProperty("backupApplianceBackupProperties")) { + object.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.toObject(message.backupApplianceBackupProperties, options); + if (options.oneofs) + object.backupProperties = "backupApplianceBackupProperties"; + } + if (message.gcpBackupPlanInfo != null && message.hasOwnProperty("gcpBackupPlanInfo")) { + object.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.toObject(message.gcpBackupPlanInfo, options); + if (options.oneofs) + object.planInfo = "gcpBackupPlanInfo"; + } + if (message.resourceSizeBytes != null && message.hasOwnProperty("resourceSizeBytes")) + if (typeof message.resourceSizeBytes === "number") + object.resourceSizeBytes = options.longs === String ? String(message.resourceSizeBytes) : message.resourceSizeBytes; + else + object.resourceSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resourceSizeBytes) : options.longs === Number ? new $util.LongBits(message.resourceSizeBytes.low >>> 0, message.resourceSizeBytes.high >>> 0).toNumber() : message.resourceSizeBytes; + return object; + }; + + /** + * Converts this Backup to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Backup + * @instance + * @returns {Object.} JSON object + */ + Backup.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Backup + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Backup + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Backup"; + }; + + /** + * State enum. + * @name google.cloud.backupdr.v1.Backup.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} ACTIVE=2 ACTIVE value + * @property {number} DELETING=3 DELETING value + * @property {number} ERROR=4 ERROR value + */ + Backup.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "ACTIVE"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + return values; + })(); + + /** + * BackupType enum. + * @name google.cloud.backupdr.v1.Backup.BackupType + * @enum {number} + * @property {number} BACKUP_TYPE_UNSPECIFIED=0 BACKUP_TYPE_UNSPECIFIED value + * @property {number} SCHEDULED=1 SCHEDULED value + * @property {number} ON_DEMAND=2 ON_DEMAND value + */ + Backup.BackupType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCHEDULED"] = 1; + values[valuesById[2] = "ON_DEMAND"] = 2; + return values; + })(); + + Backup.GCPBackupPlanInfo = (function() { + + /** + * Properties of a GCPBackupPlanInfo. + * @memberof google.cloud.backupdr.v1.Backup + * @interface IGCPBackupPlanInfo + * @property {string|null} [backupPlan] GCPBackupPlanInfo backupPlan + * @property {string|null} [backupPlanRuleId] GCPBackupPlanInfo backupPlanRuleId + */ + + /** + * Constructs a new GCPBackupPlanInfo. + * @memberof google.cloud.backupdr.v1.Backup + * @classdesc Represents a GCPBackupPlanInfo. + * @implements IGCPBackupPlanInfo + * @constructor + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo=} [properties] Properties to set + */ + function GCPBackupPlanInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GCPBackupPlanInfo backupPlan. + * @member {string} backupPlan + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @instance + */ + GCPBackupPlanInfo.prototype.backupPlan = ""; + + /** + * GCPBackupPlanInfo backupPlanRuleId. + * @member {string} backupPlanRuleId + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @instance + */ + GCPBackupPlanInfo.prototype.backupPlanRuleId = ""; + + /** + * Creates a new GCPBackupPlanInfo instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo instance + */ + GCPBackupPlanInfo.create = function create(properties) { + return new GCPBackupPlanInfo(properties); + }; + + /** + * Encodes the specified GCPBackupPlanInfo message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo} message GCPBackupPlanInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GCPBackupPlanInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPlan); + if (message.backupPlanRuleId != null && Object.hasOwnProperty.call(message, "backupPlanRuleId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanRuleId); + return writer; + }; + + /** + * Encodes the specified GCPBackupPlanInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo} message GCPBackupPlanInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GCPBackupPlanInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GCPBackupPlanInfo.decode = function 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.backupdr.v1.Backup.GCPBackupPlanInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.backupPlan = reader.string(); + break; + } + case 2: { + message.backupPlanRuleId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GCPBackupPlanInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GCPBackupPlanInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GCPBackupPlanInfo message. + * @function verify + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GCPBackupPlanInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + if (!$util.isString(message.backupPlan)) + return "backupPlan: string expected"; + if (message.backupPlanRuleId != null && message.hasOwnProperty("backupPlanRuleId")) + if (!$util.isString(message.backupPlanRuleId)) + return "backupPlanRuleId: string expected"; + return null; + }; + + /** + * Creates a GCPBackupPlanInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo + */ + GCPBackupPlanInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo) + return object; + var message = new $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo(); + if (object.backupPlan != null) + message.backupPlan = String(object.backupPlan); + if (object.backupPlanRuleId != null) + message.backupPlanRuleId = String(object.backupPlanRuleId); + return message; + }; + + /** + * Creates a plain object from a GCPBackupPlanInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} message GCPBackupPlanInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GCPBackupPlanInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.backupPlan = ""; + object.backupPlanRuleId = ""; + } + if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) + object.backupPlan = message.backupPlan; + if (message.backupPlanRuleId != null && message.hasOwnProperty("backupPlanRuleId")) + object.backupPlanRuleId = message.backupPlanRuleId; + return object; + }; + + /** + * Converts this GCPBackupPlanInfo to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @instance + * @returns {Object.} JSON object + */ + GCPBackupPlanInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GCPBackupPlanInfo + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GCPBackupPlanInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo"; + }; + + return GCPBackupPlanInfo; + })(); + + return Backup; + })(); + + v1.CreateBackupVaultRequest = (function() { + + /** + * Properties of a CreateBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @interface ICreateBackupVaultRequest + * @property {string|null} [parent] CreateBackupVaultRequest parent + * @property {string|null} [backupVaultId] CreateBackupVaultRequest backupVaultId + * @property {google.cloud.backupdr.v1.IBackupVault|null} [backupVault] CreateBackupVaultRequest backupVault + * @property {string|null} [requestId] CreateBackupVaultRequest requestId + * @property {boolean|null} [validateOnly] CreateBackupVaultRequest validateOnly + */ + + /** + * Constructs a new CreateBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CreateBackupVaultRequest. + * @implements ICreateBackupVaultRequest + * @constructor + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest=} [properties] Properties to set + */ + function CreateBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBackupVaultRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.parent = ""; + + /** + * CreateBackupVaultRequest backupVaultId. + * @member {string} backupVaultId + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.backupVaultId = ""; + + /** + * CreateBackupVaultRequest backupVault. + * @member {google.cloud.backupdr.v1.IBackupVault|null|undefined} backupVault + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.backupVault = null; + + /** + * CreateBackupVaultRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.requestId = ""; + + /** + * CreateBackupVaultRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + */ + CreateBackupVaultRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest instance + */ + CreateBackupVaultRequest.create = function create(properties) { + return new CreateBackupVaultRequest(properties); + }; + + /** + * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupVaultRequest.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.backupVaultId != null && Object.hasOwnProperty.call(message, "backupVaultId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupVaultId); + if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVault, 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); + return writer; + }; + + /** + * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupVaultRequest.decode = function 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.backupdr.v1.CreateBackupVaultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.backupVaultId = reader.string(); + break; + } + case 3: { + message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBackupVaultRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBackupVaultRequest.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.backupVaultId != null && message.hasOwnProperty("backupVaultId")) + if (!$util.isString(message.backupVaultId)) + return "backupVaultId: string expected"; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault); + if (error) + return "backupVault." + 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"; + return null; + }; + + /** + * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest + */ + CreateBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupVaultRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.CreateBackupVaultRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.backupVaultId != null) + message.backupVaultId = String(object.backupVaultId); + if (object.backupVault != null) { + if (typeof object.backupVault !== "object") + throw TypeError(".google.cloud.backupdr.v1.CreateBackupVaultRequest.backupVault: object expected"); + message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVault); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.CreateBackupVaultRequest} message CreateBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.backupVaultId = ""; + object.backupVault = null; + object.requestId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.backupVaultId != null && message.hasOwnProperty("backupVaultId")) + object.backupVaultId = message.backupVaultId; + if (message.backupVault != null && message.hasOwnProperty("backupVault")) + object.backupVault = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVault, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupVaultRequest"; + }; + + return CreateBackupVaultRequest; + })(); + + v1.ListBackupVaultsRequest = (function() { + + /** + * Properties of a ListBackupVaultsRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupVaultsRequest + * @property {string|null} [parent] ListBackupVaultsRequest parent + * @property {number|null} [pageSize] ListBackupVaultsRequest pageSize + * @property {string|null} [pageToken] ListBackupVaultsRequest pageToken + * @property {string|null} [filter] ListBackupVaultsRequest filter + * @property {string|null} [orderBy] ListBackupVaultsRequest orderBy + * @property {google.cloud.backupdr.v1.BackupVaultView|null} [view] ListBackupVaultsRequest view + */ + + /** + * Constructs a new ListBackupVaultsRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupVaultsRequest. + * @implements IListBackupVaultsRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest=} [properties] Properties to set + */ + function ListBackupVaultsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupVaultsRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.parent = ""; + + /** + * ListBackupVaultsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.pageSize = 0; + + /** + * ListBackupVaultsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.pageToken = ""; + + /** + * ListBackupVaultsRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.filter = ""; + + /** + * ListBackupVaultsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.orderBy = ""; + + /** + * ListBackupVaultsRequest view. + * @member {google.cloud.backupdr.v1.BackupVaultView} view + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + */ + ListBackupVaultsRequest.prototype.view = 0; + + /** + * Creates a new ListBackupVaultsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest instance + */ + ListBackupVaultsRequest.create = function create(properties) { + return new ListBackupVaultsRequest(properties); + }; + + /** + * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsRequest.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); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); + return writer; + }; + + /** + * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsRequest.decode = function 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.backupdr.v1.ListBackupVaultsRequest(); + 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; + } + case 6: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupVaultsRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupVaultsRequest.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"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest + */ + ListBackupVaultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupVaultsRequest(); + 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); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VAULT_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VAULT_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VAULT_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.ListBackupVaultsRequest} message ListBackupVaultsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupVaultsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.view = options.enums === String ? "BACKUP_VAULT_VIEW_UNSPECIFIED" : 0; + } + 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; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVaultView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupVaultView[message.view] : message.view; + return object; + }; + + /** + * Converts this ListBackupVaultsRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupVaultsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupVaultsRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupVaultsRequest"; + }; + + return ListBackupVaultsRequest; + })(); + + v1.ListBackupVaultsResponse = (function() { + + /** + * Properties of a ListBackupVaultsResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupVaultsResponse + * @property {Array.|null} [backupVaults] ListBackupVaultsResponse backupVaults + * @property {string|null} [nextPageToken] ListBackupVaultsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupVaultsResponse unreachable + */ + + /** + * Constructs a new ListBackupVaultsResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupVaultsResponse. + * @implements IListBackupVaultsResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse=} [properties] Properties to set + */ + function ListBackupVaultsResponse(properties) { + this.backupVaults = []; + 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]]; + } + + /** + * ListBackupVaultsResponse backupVaults. + * @member {Array.} backupVaults + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @instance + */ + ListBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; + + /** + * ListBackupVaultsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @instance + */ + ListBackupVaultsResponse.prototype.nextPageToken = ""; + + /** + * ListBackupVaultsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @instance + */ + ListBackupVaultsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupVaultsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse instance + */ + ListBackupVaultsResponse.create = function create(properties) { + return new ListBackupVaultsResponse(properties); + }; + + /** + * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupVaults != null && message.backupVaults.length) + for (var i = 0; i < message.backupVaults.length; ++i) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVaults[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 ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsResponse.decode = function 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.backupdr.v1.ListBackupVaultsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backupVaults && message.backupVaults.length)) + message.backupVaults = []; + message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.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 ListBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupVaultsResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupVaultsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { + if (!Array.isArray(message.backupVaults)) + return "backupVaults: array expected"; + for (var i = 0; i < message.backupVaults.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVaults[i]); + if (error) + return "backupVaults." + 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 ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse + */ + ListBackupVaultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupVaultsResponse(); + if (object.backupVaults) { + if (!Array.isArray(object.backupVaults)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.backupVaults: array expected"); + message.backupVaults = []; + for (var i = 0; i < object.backupVaults.length; ++i) { + if (typeof object.backupVaults[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.backupVaults: object expected"); + message.backupVaults[i] = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVaults[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.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 ListBackupVaultsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.ListBackupVaultsResponse} message ListBackupVaultsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupVaultsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupVaults = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backupVaults && message.backupVaults.length) { + object.backupVaults = []; + for (var j = 0; j < message.backupVaults.length; ++j) + object.backupVaults[j] = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVaults[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 ListBackupVaultsResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupVaultsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupVaultsResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupVaultsResponse"; + }; + + return ListBackupVaultsResponse; + })(); + + v1.FetchUsableBackupVaultsRequest = (function() { + + /** + * Properties of a FetchUsableBackupVaultsRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IFetchUsableBackupVaultsRequest + * @property {string|null} [parent] FetchUsableBackupVaultsRequest parent + * @property {number|null} [pageSize] FetchUsableBackupVaultsRequest pageSize + * @property {string|null} [pageToken] FetchUsableBackupVaultsRequest pageToken + * @property {string|null} [filter] FetchUsableBackupVaultsRequest filter + * @property {string|null} [orderBy] FetchUsableBackupVaultsRequest orderBy + */ + + /** + * Constructs a new FetchUsableBackupVaultsRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FetchUsableBackupVaultsRequest. + * @implements IFetchUsableBackupVaultsRequest + * @constructor + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest=} [properties] Properties to set + */ + function FetchUsableBackupVaultsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchUsableBackupVaultsRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.parent = ""; + + /** + * FetchUsableBackupVaultsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.pageSize = 0; + + /** + * FetchUsableBackupVaultsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.pageToken = ""; + + /** + * FetchUsableBackupVaultsRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.filter = ""; + + /** + * FetchUsableBackupVaultsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + */ + FetchUsableBackupVaultsRequest.prototype.orderBy = ""; + + /** + * Creates a new FetchUsableBackupVaultsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest instance + */ + FetchUsableBackupVaultsRequest.create = function create(properties) { + return new FetchUsableBackupVaultsRequest(properties); + }; + + /** + * Encodes the specified FetchUsableBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchUsableBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchUsableBackupVaultsRequest.decode = function 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.backupdr.v1.FetchUsableBackupVaultsRequest(); + 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 FetchUsableBackupVaultsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchUsableBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchUsableBackupVaultsRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest + */ + FetchUsableBackupVaultsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest(); + 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 FetchUsableBackupVaultsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @instance + * @returns {Object.} JSON object + */ + FetchUsableBackupVaultsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchUsableBackupVaultsRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchUsableBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest"; + }; + + return FetchUsableBackupVaultsRequest; + })(); + + v1.FetchUsableBackupVaultsResponse = (function() { + + /** + * Properties of a FetchUsableBackupVaultsResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IFetchUsableBackupVaultsResponse + * @property {Array.|null} [backupVaults] FetchUsableBackupVaultsResponse backupVaults + * @property {string|null} [nextPageToken] FetchUsableBackupVaultsResponse nextPageToken + * @property {Array.|null} [unreachable] FetchUsableBackupVaultsResponse unreachable + */ + + /** + * Constructs a new FetchUsableBackupVaultsResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a FetchUsableBackupVaultsResponse. + * @implements IFetchUsableBackupVaultsResponse + * @constructor + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse=} [properties] Properties to set + */ + function FetchUsableBackupVaultsResponse(properties) { + this.backupVaults = []; + 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]]; + } + + /** + * FetchUsableBackupVaultsResponse backupVaults. + * @member {Array.} backupVaults + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @instance + */ + FetchUsableBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; + + /** + * FetchUsableBackupVaultsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @instance + */ + FetchUsableBackupVaultsResponse.prototype.nextPageToken = ""; + + /** + * FetchUsableBackupVaultsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @instance + */ + FetchUsableBackupVaultsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new FetchUsableBackupVaultsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse instance + */ + FetchUsableBackupVaultsResponse.create = function create(properties) { + return new FetchUsableBackupVaultsResponse(properties); + }; + + /** + * Encodes the specified FetchUsableBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchUsableBackupVaultsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backupVaults != null && message.backupVaults.length) + for (var i = 0; i < message.backupVaults.length; ++i) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVaults[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 FetchUsableBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchUsableBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchUsableBackupVaultsResponse.decode = function 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.backupdr.v1.FetchUsableBackupVaultsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backupVaults && message.backupVaults.length)) + message.backupVaults = []; + message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.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 FetchUsableBackupVaultsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchUsableBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchUsableBackupVaultsResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchUsableBackupVaultsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { + if (!Array.isArray(message.backupVaults)) + return "backupVaults: array expected"; + for (var i = 0; i < message.backupVaults.length; ++i) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVaults[i]); + if (error) + return "backupVaults." + 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 FetchUsableBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse + */ + FetchUsableBackupVaultsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse(); + if (object.backupVaults) { + if (!Array.isArray(object.backupVaults)) + throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.backupVaults: array expected"); + message.backupVaults = []; + for (var i = 0; i < object.backupVaults.length; ++i) { + if (typeof object.backupVaults[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.backupVaults: object expected"); + message.backupVaults[i] = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVaults[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.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 FetchUsableBackupVaultsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchUsableBackupVaultsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backupVaults = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backupVaults && message.backupVaults.length) { + object.backupVaults = []; + for (var j = 0; j < message.backupVaults.length; ++j) + object.backupVaults[j] = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVaults[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 FetchUsableBackupVaultsResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @instance + * @returns {Object.} JSON object + */ + FetchUsableBackupVaultsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchUsableBackupVaultsResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchUsableBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse"; + }; + + return FetchUsableBackupVaultsResponse; + })(); + + v1.GetBackupVaultRequest = (function() { + + /** + * Properties of a GetBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetBackupVaultRequest + * @property {string|null} [name] GetBackupVaultRequest name + * @property {google.cloud.backupdr.v1.BackupVaultView|null} [view] GetBackupVaultRequest view + */ + + /** + * Constructs a new GetBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetBackupVaultRequest. + * @implements IGetBackupVaultRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest=} [properties] Properties to set + */ + function GetBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupVaultRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @instance + */ + GetBackupVaultRequest.prototype.name = ""; + + /** + * GetBackupVaultRequest view. + * @member {google.cloud.backupdr.v1.BackupVaultView} view + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @instance + */ + GetBackupVaultRequest.prototype.view = 0; + + /** + * Creates a new GetBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest instance + */ + GetBackupVaultRequest.create = function create(properties) { + return new GetBackupVaultRequest(properties); + }; + + /** + * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupVaultRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupVaultRequest.decode = function 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.backupdr.v1.GetBackupVaultRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupVaultRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupVaultRequest.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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest + */ + GetBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupVaultRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetBackupVaultRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VAULT_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VAULT_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VAULT_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.GetBackupVaultRequest} message GetBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "BACKUP_VAULT_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVaultView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupVaultView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupVaultRequest"; + }; + + return GetBackupVaultRequest; + })(); + + v1.UpdateBackupVaultRequest = (function() { + + /** + * Properties of an UpdateBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IUpdateBackupVaultRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupVaultRequest updateMask + * @property {google.cloud.backupdr.v1.IBackupVault|null} [backupVault] UpdateBackupVaultRequest backupVault + * @property {string|null} [requestId] UpdateBackupVaultRequest requestId + * @property {boolean|null} [validateOnly] UpdateBackupVaultRequest validateOnly + * @property {boolean|null} [force] UpdateBackupVaultRequest force + */ + + /** + * Constructs a new UpdateBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an UpdateBackupVaultRequest. + * @implements IUpdateBackupVaultRequest + * @constructor + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest=} [properties] Properties to set + */ + function UpdateBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateBackupVaultRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.updateMask = null; + + /** + * UpdateBackupVaultRequest backupVault. + * @member {google.cloud.backupdr.v1.IBackupVault|null|undefined} backupVault + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.backupVault = null; + + /** + * UpdateBackupVaultRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.requestId = ""; + + /** + * UpdateBackupVaultRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.validateOnly = false; + + /** + * UpdateBackupVaultRequest force. + * @member {boolean} force + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + */ + UpdateBackupVaultRequest.prototype.force = false; + + /** + * Creates a new UpdateBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest instance + */ + UpdateBackupVaultRequest.create = function create(properties) { + return new UpdateBackupVaultRequest(properties); + }; + + /** + * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupVaultRequest.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.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) + $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVault, 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 UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupVaultRequest.decode = function 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.backupdr.v1.UpdateBackupVaultRequest(); + 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.backupVault = $root.google.cloud.backupdr.v1.BackupVault.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 UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateBackupVaultRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateBackupVaultRequest.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.backupVault != null && message.hasOwnProperty("backupVault")) { + var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault); + if (error) + return "backupVault." + 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 UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest + */ + UpdateBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupVaultRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.backupVault != null) { + if (typeof object.backupVault !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupVaultRequest.backupVault: object expected"); + message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVault); + } + 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 UpdateBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.UpdateBackupVaultRequest} message UpdateBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.backupVault = 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.backupVault != null && message.hasOwnProperty("backupVault")) + object.backupVault = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVault, 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 UpdateBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupVaultRequest"; + }; + + return UpdateBackupVaultRequest; + })(); + + v1.DeleteBackupVaultRequest = (function() { + + /** + * Properties of a DeleteBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IDeleteBackupVaultRequest + * @property {string|null} [name] DeleteBackupVaultRequest name + * @property {string|null} [requestId] DeleteBackupVaultRequest requestId + * @property {boolean|null} [force] DeleteBackupVaultRequest force + * @property {string|null} [etag] DeleteBackupVaultRequest etag + * @property {boolean|null} [validateOnly] DeleteBackupVaultRequest validateOnly + * @property {boolean|null} [allowMissing] DeleteBackupVaultRequest allowMissing + */ + + /** + * Constructs a new DeleteBackupVaultRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DeleteBackupVaultRequest. + * @implements IDeleteBackupVaultRequest + * @constructor + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest=} [properties] Properties to set + */ + function DeleteBackupVaultRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupVaultRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.name = ""; + + /** + * DeleteBackupVaultRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.requestId = ""; + + /** + * DeleteBackupVaultRequest force. + * @member {boolean} force + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.force = false; + + /** + * DeleteBackupVaultRequest etag. + * @member {string} etag + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.etag = ""; + + /** + * DeleteBackupVaultRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.validateOnly = false; + + /** + * DeleteBackupVaultRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + */ + DeleteBackupVaultRequest.prototype.allowMissing = false; + + /** + * Creates a new DeleteBackupVaultRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest instance + */ + DeleteBackupVaultRequest.create = function create(properties) { + return new DeleteBackupVaultRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupVaultRequest.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); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.allowMissing); + return writer; + }; + + /** + * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupVaultRequest.decode = function 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.backupdr.v1.DeleteBackupVaultRequest(); + 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; + } + case 4: { + message.etag = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } + case 6: { + message.allowMissing = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupVaultRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupVaultRequest.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"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + return null; + }; + + /** + * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest + */ + DeleteBackupVaultRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest(); + 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); + if (object.etag != null) + message.etag = String(object.etag); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + return message; + }; + + /** + * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {google.cloud.backupdr.v1.DeleteBackupVaultRequest} message DeleteBackupVaultRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupVaultRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + object.force = false; + object.etag = ""; + object.validateOnly = false; + object.allowMissing = 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; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + return object; + }; + + /** + * Converts this DeleteBackupVaultRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupVaultRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupVaultRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupVaultRequest"; + }; + + return DeleteBackupVaultRequest; + })(); + + v1.ListDataSourcesRequest = (function() { + + /** + * Properties of a ListDataSourcesRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListDataSourcesRequest + * @property {string|null} [parent] ListDataSourcesRequest parent + * @property {number|null} [pageSize] ListDataSourcesRequest pageSize + * @property {string|null} [pageToken] ListDataSourcesRequest pageToken + * @property {string|null} [filter] ListDataSourcesRequest filter + * @property {string|null} [orderBy] ListDataSourcesRequest orderBy + */ + + /** + * Constructs a new ListDataSourcesRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListDataSourcesRequest. + * @implements IListDataSourcesRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest=} [properties] Properties to set + */ + function ListDataSourcesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataSourcesRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.parent = ""; + + /** + * ListDataSourcesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.pageSize = 0; + + /** + * ListDataSourcesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.pageToken = ""; + + /** + * ListDataSourcesRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.filter = ""; + + /** + * ListDataSourcesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + */ + ListDataSourcesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListDataSourcesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest instance + */ + ListDataSourcesRequest.create = function create(properties) { + return new ListDataSourcesRequest(properties); + }; + + /** + * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesRequest.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 ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataSourcesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesRequest.decode = function 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.backupdr.v1.ListDataSourcesRequest(); + 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 ListDataSourcesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataSourcesRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataSourcesRequest.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 ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest + */ + ListDataSourcesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListDataSourcesRequest(); + 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 ListDataSourcesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {google.cloud.backupdr.v1.ListDataSourcesRequest} message ListDataSourcesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataSourcesRequest.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 ListDataSourcesRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataSourcesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataSourcesRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataSourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourcesRequest"; + }; + + return ListDataSourcesRequest; + })(); + + v1.ListDataSourcesResponse = (function() { + + /** + * Properties of a ListDataSourcesResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListDataSourcesResponse + * @property {Array.|null} [dataSources] ListDataSourcesResponse dataSources + * @property {string|null} [nextPageToken] ListDataSourcesResponse nextPageToken + * @property {Array.|null} [unreachable] ListDataSourcesResponse unreachable + */ + + /** + * Constructs a new ListDataSourcesResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListDataSourcesResponse. + * @implements IListDataSourcesResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse=} [properties] Properties to set + */ + function ListDataSourcesResponse(properties) { + this.dataSources = []; + 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]]; + } + + /** + * ListDataSourcesResponse dataSources. + * @member {Array.} dataSources + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @instance + */ + ListDataSourcesResponse.prototype.dataSources = $util.emptyArray; + + /** + * ListDataSourcesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @instance + */ + ListDataSourcesResponse.prototype.nextPageToken = ""; + + /** + * ListDataSourcesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @instance + */ + ListDataSourcesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListDataSourcesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse instance + */ + ListDataSourcesResponse.create = function create(properties) { + return new ListDataSourcesResponse(properties); + }; + + /** + * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSources != null && message.dataSources.length) + for (var i = 0; i < message.dataSources.length; ++i) + $root.google.cloud.backupdr.v1.DataSource.encode(message.dataSources[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 ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.backupdr.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataSourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataSourcesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesResponse.decode = function 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.backupdr.v1.ListDataSourcesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataSources && message.dataSources.length)) + message.dataSources = []; + message.dataSources.push($root.google.cloud.backupdr.v1.DataSource.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 ListDataSourcesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataSourcesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataSourcesResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataSourcesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataSources != null && message.hasOwnProperty("dataSources")) { + if (!Array.isArray(message.dataSources)) + return "dataSources: array expected"; + for (var i = 0; i < message.dataSources.length; ++i) { + var error = $root.google.cloud.backupdr.v1.DataSource.verify(message.dataSources[i]); + if (error) + return "dataSources." + 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 ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse + */ + ListDataSourcesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListDataSourcesResponse(); + if (object.dataSources) { + if (!Array.isArray(object.dataSources)) + throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.dataSources: array expected"); + message.dataSources = []; + for (var i = 0; i < object.dataSources.length; ++i) { + if (typeof object.dataSources[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.dataSources: object expected"); + message.dataSources[i] = $root.google.cloud.backupdr.v1.DataSource.fromObject(object.dataSources[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.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 ListDataSourcesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {google.cloud.backupdr.v1.ListDataSourcesResponse} message ListDataSourcesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataSourcesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataSources = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.dataSources && message.dataSources.length) { + object.dataSources = []; + for (var j = 0; j < message.dataSources.length; ++j) + object.dataSources[j] = $root.google.cloud.backupdr.v1.DataSource.toObject(message.dataSources[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 ListDataSourcesResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataSourcesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataSourcesResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataSourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourcesResponse"; + }; + + return ListDataSourcesResponse; + })(); + + v1.GetDataSourceRequest = (function() { + + /** + * Properties of a GetDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetDataSourceRequest + * @property {string|null} [name] GetDataSourceRequest name + */ + + /** + * Constructs a new GetDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetDataSourceRequest. + * @implements IGetDataSourceRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest=} [properties] Properties to set + */ + function GetDataSourceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataSourceRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @instance + */ + GetDataSourceRequest.prototype.name = ""; + + /** + * Creates a new GetDataSourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest instance + */ + GetDataSourceRequest.create = function create(properties) { + return new GetDataSourceRequest(properties); + }; + + /** + * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataSourceRequest.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 GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataSourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataSourceRequest.decode = function 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.backupdr.v1.GetDataSourceRequest(); + 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 GetDataSourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataSourceRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataSourceRequest.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 GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest + */ + GetDataSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetDataSourceRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetDataSourceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.GetDataSourceRequest} message GetDataSourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataSourceRequest.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 GetDataSourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataSourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataSourceRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetDataSourceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetDataSourceRequest"; + }; + + return GetDataSourceRequest; + })(); + + v1.UpdateDataSourceRequest = (function() { + + /** + * Properties of an UpdateDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IUpdateDataSourceRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataSourceRequest updateMask + * @property {google.cloud.backupdr.v1.IDataSource|null} [dataSource] UpdateDataSourceRequest dataSource + * @property {string|null} [requestId] UpdateDataSourceRequest requestId + * @property {boolean|null} [allowMissing] UpdateDataSourceRequest allowMissing + */ + + /** + * Constructs a new UpdateDataSourceRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an UpdateDataSourceRequest. + * @implements IUpdateDataSourceRequest + * @constructor + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest=} [properties] Properties to set + */ + function UpdateDataSourceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDataSourceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + */ + UpdateDataSourceRequest.prototype.updateMask = null; + + /** + * UpdateDataSourceRequest dataSource. + * @member {google.cloud.backupdr.v1.IDataSource|null|undefined} dataSource + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + */ + UpdateDataSourceRequest.prototype.dataSource = null; + + /** + * UpdateDataSourceRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + */ + UpdateDataSourceRequest.prototype.requestId = ""; + + /** + * UpdateDataSourceRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + */ + UpdateDataSourceRequest.prototype.allowMissing = false; + + /** + * Creates a new UpdateDataSourceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest instance + */ + UpdateDataSourceRequest.create = function create(properties) { + return new UpdateDataSourceRequest(properties); + }; + + /** + * Encodes the specified UpdateDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} message UpdateDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataSourceRequest.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.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + $root.google.cloud.backupdr.v1.DataSource.encode(message.dataSource, 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.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowMissing); + return writer; + }; + + /** + * Encodes the specified UpdateDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} message UpdateDataSourceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataSourceRequest.decode = function 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.backupdr.v1.UpdateDataSourceRequest(); + 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.dataSource = $root.google.cloud.backupdr.v1.DataSource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + case 4: { + message.allowMissing = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDataSourceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDataSourceRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDataSourceRequest.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.dataSource != null && message.hasOwnProperty("dataSource")) { + var error = $root.google.cloud.backupdr.v1.DataSource.verify(message.dataSource); + if (error) + return "dataSource." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + return null; + }; + + /** + * Creates an UpdateDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest + */ + UpdateDataSourceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.UpdateDataSourceRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.UpdateDataSourceRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateDataSourceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.dataSource != null) { + if (typeof object.dataSource !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateDataSourceRequest.dataSource: object expected"); + message.dataSource = $root.google.cloud.backupdr.v1.DataSource.fromObject(object.dataSource); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + return message; + }; + + /** + * Creates a plain object from an UpdateDataSourceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {google.cloud.backupdr.v1.UpdateDataSourceRequest} message UpdateDataSourceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDataSourceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.dataSource = null; + object.requestId = ""; + object.allowMissing = false; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = $root.google.cloud.backupdr.v1.DataSource.toObject(message.dataSource, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + return object; + }; + + /** + * Converts this UpdateDataSourceRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDataSourceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDataSourceRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateDataSourceRequest"; + }; + + return UpdateDataSourceRequest; + })(); + + v1.ListBackupsRequest = (function() { + + /** + * Properties of a ListBackupsRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupsRequest + * @property {string|null} [parent] ListBackupsRequest parent + * @property {number|null} [pageSize] ListBackupsRequest pageSize + * @property {string|null} [pageToken] ListBackupsRequest pageToken + * @property {string|null} [filter] ListBackupsRequest filter + * @property {string|null} [orderBy] ListBackupsRequest orderBy + * @property {google.cloud.backupdr.v1.BackupView|null} [view] ListBackupsRequest view + */ + + /** + * Constructs a new ListBackupsRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupsRequest. + * @implements IListBackupsRequest + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set + */ + function ListBackupsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBackupsRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.parent = ""; + + /** + * ListBackupsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.pageSize = 0; + + /** + * ListBackupsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.pageToken = ""; + + /** + * ListBackupsRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.filter = ""; + + /** + * ListBackupsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.orderBy = ""; + + /** + * ListBackupsRequest view. + * @member {google.cloud.backupdr.v1.BackupView} view + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.view = 0; + + /** + * Creates a new ListBackupsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest instance + */ + ListBackupsRequest.create = function create(properties) { + return new ListBackupsRequest(properties); + }; + + /** + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsRequest.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); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); + return writer; + }; + + /** + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsRequest.decode = function 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.backupdr.v1.ListBackupsRequest(); + 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; + } + case 6: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupsRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupsRequest.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"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest + */ + ListBackupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupsRequest(); + 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); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {google.cloud.backupdr.v1.ListBackupsRequest} message ListBackupsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; + } + 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; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; + return object; + }; + + /** + * Converts this ListBackupsRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBackupsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupsRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsRequest"; + }; + + return ListBackupsRequest; + })(); + + v1.ListBackupsResponse = (function() { + + /** + * Properties of a ListBackupsResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IListBackupsResponse + * @property {Array.|null} [backups] ListBackupsResponse backups + * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupsResponse unreachable + */ + + /** + * Constructs a new ListBackupsResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ListBackupsResponse. + * @implements IListBackupsResponse + * @constructor + * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set + */ + function ListBackupsResponse(properties) { + this.backups = []; + 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]]; + } + + /** + * ListBackupsResponse backups. + * @member {Array.} backups + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.backups = $util.emptyArray; + + /** + * ListBackupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.nextPageToken = ""; + + /** + * ListBackupsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @instance + */ + ListBackupsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListBackupsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse instance + */ + ListBackupsResponse.create = function create(properties) { + return new ListBackupsResponse(properties); + }; + + /** + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.backups != null && message.backups.length) + for (var i = 0; i < message.backups.length; ++i) + $root.google.cloud.backupdr.v1.Backup.encode(message.backups[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 ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBackupsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsResponse.decode = function 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.backupdr.v1.ListBackupsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.backups && message.backups.length)) + message.backups = []; + message.backups.push($root.google.cloud.backupdr.v1.Backup.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 ListBackupsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBackupsResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBackupsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.backups != null && message.hasOwnProperty("backups")) { + if (!Array.isArray(message.backups)) + return "backups: array expected"; + for (var i = 0; i < message.backups.length; ++i) { + var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backups[i]); + if (error) + return "backups." + 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 ListBackupsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse + */ + ListBackupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.ListBackupsResponse(); + if (object.backups) { + if (!Array.isArray(object.backups)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: array expected"); + message.backups = []; + for (var i = 0; i < object.backups.length; ++i) { + if (typeof object.backups[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: object expected"); + message.backups[i] = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backups[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.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 ListBackupsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {google.cloud.backupdr.v1.ListBackupsResponse} message ListBackupsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBackupsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.backups = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backups && message.backups.length) { + object.backups = []; + for (var j = 0; j < message.backups.length; ++j) + object.backups[j] = $root.google.cloud.backupdr.v1.Backup.toObject(message.backups[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 ListBackupsResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBackupsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBackupsResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsResponse"; + }; + + return ListBackupsResponse; + })(); + + v1.GetBackupRequest = (function() { + + /** + * Properties of a GetBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IGetBackupRequest + * @property {string|null} [name] GetBackupRequest name + * @property {google.cloud.backupdr.v1.BackupView|null} [view] GetBackupRequest view + */ + + /** + * Constructs a new GetBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GetBackupRequest. + * @implements IGetBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set + */ + function GetBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @instance + */ + GetBackupRequest.prototype.name = ""; + + /** + * GetBackupRequest view. + * @member {google.cloud.backupdr.v1.BackupView} view + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @instance + */ + GetBackupRequest.prototype.view = 0; + + /** + * Creates a new GetBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest instance + */ + GetBackupRequest.create = function create(properties) { + return new GetBackupRequest(properties); + }; + + /** + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + return writer; + }; + + /** + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupRequest.decode = function 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.backupdr.v1.GetBackupRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBackupRequest.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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest + */ + GetBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.GetBackupRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {google.cloud.backupdr.v1.GetBackupRequest} message GetBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; + return object; + }; + + /** + * Converts this GetBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @instance + * @returns {Object.} JSON object + */ + GetBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupRequest"; + }; + + return GetBackupRequest; + })(); + + v1.UpdateBackupRequest = (function() { + + /** + * Properties of an UpdateBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IUpdateBackupRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupRequest updateMask + * @property {google.cloud.backupdr.v1.IBackup|null} [backup] UpdateBackupRequest backup + * @property {string|null} [requestId] UpdateBackupRequest requestId + */ + + /** + * Constructs a new UpdateBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an UpdateBackupRequest. + * @implements IUpdateBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set + */ + function UpdateBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateBackupRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @instance + */ + UpdateBackupRequest.prototype.updateMask = null; + + /** + * UpdateBackupRequest backup. + * @member {google.cloud.backupdr.v1.IBackup|null|undefined} backup + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @instance + */ + UpdateBackupRequest.prototype.backup = null; + + /** + * UpdateBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @instance + */ + UpdateBackupRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest instance + */ + UpdateBackupRequest.create = function create(properties) { + return new UpdateBackupRequest(properties); + }; + + /** + * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupRequest.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.backup != null && Object.hasOwnProperty.call(message, "backup")) + $root.google.cloud.backupdr.v1.Backup.encode(message.backup, 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 UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupRequest.decode = function 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.backupdr.v1.UpdateBackupRequest(); + 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.backup = $root.google.cloud.backupdr.v1.Backup.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateBackupRequest.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.backup != null && message.hasOwnProperty("backup")) { + var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backup); + if (error) + return "backup." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest + */ + UpdateBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.UpdateBackupRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.backup != null) { + if (typeof object.backup !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.backup: object expected"); + message.backup = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backup); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {google.cloud.backupdr.v1.UpdateBackupRequest} message UpdateBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.backup = null; + object.requestId = ""; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = $root.google.cloud.backupdr.v1.Backup.toObject(message.backup, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupRequest"; + }; + + return UpdateBackupRequest; + })(); + + v1.DeleteBackupRequest = (function() { + + /** + * Properties of a DeleteBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IDeleteBackupRequest + * @property {string|null} [name] DeleteBackupRequest name + * @property {string|null} [requestId] DeleteBackupRequest requestId + */ + + /** + * Constructs a new DeleteBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DeleteBackupRequest. + * @implements IDeleteBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set + */ + function DeleteBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @instance + */ + DeleteBackupRequest.prototype.name = ""; + + /** + * DeleteBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @instance + */ + DeleteBackupRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest instance + */ + DeleteBackupRequest.create = function create(properties) { + return new DeleteBackupRequest(properties); + }; + + /** + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupRequest.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 DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupRequest.decode = function 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.backupdr.v1.DeleteBackupRequest(); + 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 DeleteBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBackupRequest.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 DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest + */ + DeleteBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.DeleteBackupRequest(); + 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 DeleteBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {google.cloud.backupdr.v1.DeleteBackupRequest} message DeleteBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBackupRequest.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 DeleteBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupRequest"; + }; + + return DeleteBackupRequest; + })(); + + v1.RestoreBackupRequest = (function() { + + /** + * Properties of a RestoreBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @interface IRestoreBackupRequest + * @property {string|null} [name] RestoreBackupRequest name + * @property {string|null} [requestId] RestoreBackupRequest requestId + * @property {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null} [computeInstanceTargetEnvironment] RestoreBackupRequest computeInstanceTargetEnvironment + * @property {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null} [computeInstanceRestoreProperties] RestoreBackupRequest computeInstanceRestoreProperties + */ + + /** + * Constructs a new RestoreBackupRequest. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a RestoreBackupRequest. + * @implements IRestoreBackupRequest + * @constructor + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set + */ + function RestoreBackupRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestoreBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.name = ""; + + /** + * RestoreBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.requestId = ""; + + /** + * RestoreBackupRequest computeInstanceTargetEnvironment. + * @member {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null|undefined} computeInstanceTargetEnvironment + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.computeInstanceTargetEnvironment = null; + + /** + * RestoreBackupRequest computeInstanceRestoreProperties. + * @member {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null|undefined} computeInstanceRestoreProperties + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.computeInstanceRestoreProperties = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RestoreBackupRequest targetEnvironment. + * @member {"computeInstanceTargetEnvironment"|undefined} targetEnvironment + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + Object.defineProperty(RestoreBackupRequest.prototype, "targetEnvironment", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceTargetEnvironment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RestoreBackupRequest instanceProperties. + * @member {"computeInstanceRestoreProperties"|undefined} instanceProperties + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + Object.defineProperty(RestoreBackupRequest.prototype, "instanceProperties", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceRestoreProperties"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RestoreBackupRequest instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest instance + */ + RestoreBackupRequest.create = function create(properties) { + return new RestoreBackupRequest(properties); + }; + + /** + * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupRequest.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.computeInstanceTargetEnvironment != null && Object.hasOwnProperty.call(message, "computeInstanceTargetEnvironment")) + $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.encode(message.computeInstanceTargetEnvironment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.computeInstanceRestoreProperties != null && Object.hasOwnProperty.call(message, "computeInstanceRestoreProperties")) + $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.encode(message.computeInstanceRestoreProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestoreBackupRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupRequest.decode = function 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.backupdr.v1.RestoreBackupRequest(); + 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.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestoreBackupRequest message. + * @function verify + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreBackupRequest.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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { + properties.targetEnvironment = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify(message.computeInstanceTargetEnvironment); + if (error) + return "computeInstanceTargetEnvironment." + error; + } + } + if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { + properties.instanceProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify(message.computeInstanceRestoreProperties); + if (error) + return "computeInstanceRestoreProperties." + error; + } + } + return null; + }; + + /** + * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest + */ + RestoreBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.RestoreBackupRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.computeInstanceTargetEnvironment != null) { + if (typeof object.computeInstanceTargetEnvironment !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceTargetEnvironment: object expected"); + message.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.fromObject(object.computeInstanceTargetEnvironment); + } + if (object.computeInstanceRestoreProperties != null) { + if (typeof object.computeInstanceRestoreProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceRestoreProperties: object expected"); + message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.fromObject(object.computeInstanceRestoreProperties); + } + return message; + }; + + /** + * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {google.cloud.backupdr.v1.RestoreBackupRequest} message RestoreBackupRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestoreBackupRequest.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; + if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { + object.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.toObject(message.computeInstanceTargetEnvironment, options); + if (options.oneofs) + object.targetEnvironment = "computeInstanceTargetEnvironment"; + } + if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { + object.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.toObject(message.computeInstanceRestoreProperties, options); + if (options.oneofs) + object.instanceProperties = "computeInstanceRestoreProperties"; + } + return object; + }; + + /** + * Converts this RestoreBackupRequest to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + * @returns {Object.} JSON object + */ + RestoreBackupRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestoreBackupRequest + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestoreBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupRequest"; + }; + + return RestoreBackupRequest; + })(); + + v1.RestoreBackupResponse = (function() { + + /** + * Properties of a RestoreBackupResponse. + * @memberof google.cloud.backupdr.v1 + * @interface IRestoreBackupResponse + * @property {google.cloud.backupdr.v1.ITargetResource|null} [targetResource] RestoreBackupResponse targetResource + */ + + /** + * Constructs a new RestoreBackupResponse. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a RestoreBackupResponse. + * @implements IRestoreBackupResponse + * @constructor + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set + */ + function RestoreBackupResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestoreBackupResponse targetResource. + * @member {google.cloud.backupdr.v1.ITargetResource|null|undefined} targetResource + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @instance + */ + RestoreBackupResponse.prototype.targetResource = null; + + /** + * Creates a new RestoreBackupResponse instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse instance + */ + RestoreBackupResponse.create = function create(properties) { + return new RestoreBackupResponse(properties); + }; + + /** + * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetResource != null && Object.hasOwnProperty.call(message, "targetResource")) + $root.google.cloud.backupdr.v1.TargetResource.encode(message.targetResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestoreBackupResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupResponse.decode = function 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.backupdr.v1.RestoreBackupResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreBackupResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestoreBackupResponse message. + * @function verify + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreBackupResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetResource != null && message.hasOwnProperty("targetResource")) { + var error = $root.google.cloud.backupdr.v1.TargetResource.verify(message.targetResource); + if (error) + return "targetResource." + error; + } + return null; + }; + + /** + * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse + */ + RestoreBackupResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupResponse) + return object; + var message = new $root.google.cloud.backupdr.v1.RestoreBackupResponse(); + if (object.targetResource != null) { + if (typeof object.targetResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupResponse.targetResource: object expected"); + message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.fromObject(object.targetResource); + } + return message; + }; + + /** + * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {google.cloud.backupdr.v1.RestoreBackupResponse} message RestoreBackupResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestoreBackupResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.targetResource = null; + if (message.targetResource != null && message.hasOwnProperty("targetResource")) + object.targetResource = $root.google.cloud.backupdr.v1.TargetResource.toObject(message.targetResource, options); + return object; + }; + + /** + * Converts this RestoreBackupResponse to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @instance + * @returns {Object.} JSON object + */ + RestoreBackupResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestoreBackupResponse + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestoreBackupResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupResponse"; + }; + + return RestoreBackupResponse; + })(); + + v1.TargetResource = (function() { + + /** + * Properties of a TargetResource. + * @memberof google.cloud.backupdr.v1 + * @interface ITargetResource + * @property {google.cloud.backupdr.v1.IGcpResource|null} [gcpResource] TargetResource gcpResource + */ + + /** + * Constructs a new TargetResource. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a TargetResource. + * @implements ITargetResource + * @constructor + * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set + */ + function TargetResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TargetResource gcpResource. + * @member {google.cloud.backupdr.v1.IGcpResource|null|undefined} gcpResource + * @memberof google.cloud.backupdr.v1.TargetResource + * @instance + */ + TargetResource.prototype.gcpResource = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TargetResource targetResourceInfo. + * @member {"gcpResource"|undefined} targetResourceInfo + * @memberof google.cloud.backupdr.v1.TargetResource + * @instance + */ + Object.defineProperty(TargetResource.prototype, "targetResourceInfo", { + get: $util.oneOfGetter($oneOfFields = ["gcpResource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TargetResource instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource instance + */ + TargetResource.create = function create(properties) { + return new TargetResource(properties); + }; + + /** + * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcpResource != null && Object.hasOwnProperty.call(message, "gcpResource")) + $root.google.cloud.backupdr.v1.GcpResource.encode(message.gcpResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TargetResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetResource.decode = function 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.backupdr.v1.TargetResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TargetResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetResource message. + * @function verify + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TargetResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { + properties.targetResourceInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.GcpResource.verify(message.gcpResource); + if (error) + return "gcpResource." + error; + } + } + return null; + }; + + /** + * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource + */ + TargetResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.TargetResource) + return object; + var message = new $root.google.cloud.backupdr.v1.TargetResource(); + if (object.gcpResource != null) { + if (typeof object.gcpResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.TargetResource.gcpResource: object expected"); + message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.fromObject(object.gcpResource); + } + return message; + }; + + /** + * Creates a plain object from a TargetResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {google.cloud.backupdr.v1.TargetResource} message TargetResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { + object.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.toObject(message.gcpResource, options); + if (options.oneofs) + object.targetResourceInfo = "gcpResource"; + } + return object; + }; + + /** + * Converts this TargetResource to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.TargetResource + * @instance + * @returns {Object.} JSON object + */ + TargetResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TargetResource + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.TargetResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.TargetResource"; + }; + + return TargetResource; + })(); + + v1.GcpResource = (function() { + + /** + * Properties of a GcpResource. + * @memberof google.cloud.backupdr.v1 + * @interface IGcpResource + * @property {string|null} [gcpResourcename] GcpResource gcpResourcename + * @property {string|null} [location] GcpResource location + * @property {string|null} [type] GcpResource type + */ + + /** + * Constructs a new GcpResource. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GcpResource. + * @implements IGcpResource + * @constructor + * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set + */ + function GcpResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcpResource gcpResourcename. + * @member {string} gcpResourcename + * @memberof google.cloud.backupdr.v1.GcpResource + * @instance + */ + GcpResource.prototype.gcpResourcename = ""; + + /** + * GcpResource location. + * @member {string} location + * @memberof google.cloud.backupdr.v1.GcpResource + * @instance + */ + GcpResource.prototype.location = ""; + + /** + * GcpResource type. + * @member {string} type + * @memberof google.cloud.backupdr.v1.GcpResource + * @instance + */ + GcpResource.prototype.type = ""; + + /** + * Creates a new GcpResource instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource instance + */ + GcpResource.create = function create(properties) { + return new GcpResource(properties); + }; + + /** + * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + return writer; + }; + + /** + * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcpResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcpResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpResource.decode = function 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.backupdr.v1.GcpResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gcpResourcename = reader.string(); + break; + } + case 2: { + message.location = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcpResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcpResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcpResource message. + * @function verify + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcpResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + if (!$util.isString(message.gcpResourcename)) + return "gcpResourcename: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + return null; + }; + + /** + * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource + */ + GcpResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GcpResource) + return object; + var message = new $root.google.cloud.backupdr.v1.GcpResource(); + if (object.gcpResourcename != null) + message.gcpResourcename = String(object.gcpResourcename); + if (object.location != null) + message.location = String(object.location); + if (object.type != null) + message.type = String(object.type); + return message; + }; + + /** + * Creates a plain object from a GcpResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {google.cloud.backupdr.v1.GcpResource} message GcpResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcpResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gcpResourcename = ""; + object.location = ""; + object.type = ""; + } + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + object.gcpResourcename = message.gcpResourcename; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; + + /** + * Converts this GcpResource to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GcpResource + * @instance + * @returns {Object.} JSON object + */ + GcpResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcpResource + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GcpResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpResource"; + }; + + return GcpResource; + })(); + + /** + * BackupConfigState enum. + * @name google.cloud.backupdr.v1.BackupConfigState + * @enum {number} + * @property {number} BACKUP_CONFIG_STATE_UNSPECIFIED=0 BACKUP_CONFIG_STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} PASSIVE=2 PASSIVE value + */ + v1.BackupConfigState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_CONFIG_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "PASSIVE"] = 2; + return values; + })(); + + /** + * BackupView enum. + * @name google.cloud.backupdr.v1.BackupView + * @enum {number} + * @property {number} BACKUP_VIEW_UNSPECIFIED=0 BACKUP_VIEW_UNSPECIFIED value + * @property {number} BACKUP_VIEW_BASIC=1 BACKUP_VIEW_BASIC value + * @property {number} BACKUP_VIEW_FULL=2 BACKUP_VIEW_FULL value + */ + v1.BackupView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKUP_VIEW_BASIC"] = 1; + values[valuesById[2] = "BACKUP_VIEW_FULL"] = 2; + return values; + })(); + + /** + * BackupVaultView enum. + * @name google.cloud.backupdr.v1.BackupVaultView + * @enum {number} + * @property {number} BACKUP_VAULT_VIEW_UNSPECIFIED=0 BACKUP_VAULT_VIEW_UNSPECIFIED value + * @property {number} BACKUP_VAULT_VIEW_BASIC=1 BACKUP_VAULT_VIEW_BASIC value + * @property {number} BACKUP_VAULT_VIEW_FULL=2 BACKUP_VAULT_VIEW_FULL value + */ + v1.BackupVaultView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_VAULT_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKUP_VAULT_VIEW_BASIC"] = 1; + values[valuesById[2] = "BACKUP_VAULT_VIEW_FULL"] = 2; + return values; + })(); + + v1.BackupApplianceBackupProperties = (function() { + + /** + * Properties of a BackupApplianceBackupProperties. + * @memberof google.cloud.backupdr.v1 + * @interface IBackupApplianceBackupProperties + * @property {number|null} [generationId] BackupApplianceBackupProperties generationId + * @property {google.protobuf.ITimestamp|null} [finalizeTime] BackupApplianceBackupProperties finalizeTime + * @property {google.protobuf.ITimestamp|null} [recoveryRangeStartTime] BackupApplianceBackupProperties recoveryRangeStartTime + * @property {google.protobuf.ITimestamp|null} [recoveryRangeEndTime] BackupApplianceBackupProperties recoveryRangeEndTime + */ + + /** + * Constructs a new BackupApplianceBackupProperties. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a BackupApplianceBackupProperties. + * @implements IBackupApplianceBackupProperties + * @constructor + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties=} [properties] Properties to set + */ + function BackupApplianceBackupProperties(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BackupApplianceBackupProperties generationId. + * @member {number|null|undefined} generationId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + BackupApplianceBackupProperties.prototype.generationId = null; + + /** + * BackupApplianceBackupProperties finalizeTime. + * @member {google.protobuf.ITimestamp|null|undefined} finalizeTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + BackupApplianceBackupProperties.prototype.finalizeTime = null; + + /** + * BackupApplianceBackupProperties recoveryRangeStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeStartTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + BackupApplianceBackupProperties.prototype.recoveryRangeStartTime = null; + + /** + * BackupApplianceBackupProperties recoveryRangeEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeEndTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + BackupApplianceBackupProperties.prototype.recoveryRangeEndTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BackupApplianceBackupProperties _generationId. + * @member {"generationId"|undefined} _generationId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_generationId", { + get: $util.oneOfGetter($oneOfFields = ["generationId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupApplianceBackupProperties _finalizeTime. + * @member {"finalizeTime"|undefined} _finalizeTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_finalizeTime", { + get: $util.oneOfGetter($oneOfFields = ["finalizeTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupApplianceBackupProperties _recoveryRangeStartTime. + * @member {"recoveryRangeStartTime"|undefined} _recoveryRangeStartTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_recoveryRangeStartTime", { + get: $util.oneOfGetter($oneOfFields = ["recoveryRangeStartTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupApplianceBackupProperties _recoveryRangeEndTime. + * @member {"recoveryRangeEndTime"|undefined} _recoveryRangeEndTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_recoveryRangeEndTime", { + get: $util.oneOfGetter($oneOfFields = ["recoveryRangeEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupApplianceBackupProperties instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties instance + */ + BackupApplianceBackupProperties.create = function create(properties) { + return new BackupApplianceBackupProperties(properties); + }; + + /** + * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties} message BackupApplianceBackupProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceBackupProperties.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.generationId != null && Object.hasOwnProperty.call(message, "generationId")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.generationId); + if (message.finalizeTime != null && Object.hasOwnProperty.call(message, "finalizeTime")) + $root.google.protobuf.Timestamp.encode(message.finalizeTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.recoveryRangeStartTime != null && Object.hasOwnProperty.call(message, "recoveryRangeStartTime")) + $root.google.protobuf.Timestamp.encode(message.recoveryRangeStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.recoveryRangeEndTime != null && Object.hasOwnProperty.call(message, "recoveryRangeEndTime")) + $root.google.protobuf.Timestamp.encode(message.recoveryRangeEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties} message BackupApplianceBackupProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BackupApplianceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceBackupProperties.decode = function 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.backupdr.v1.BackupApplianceBackupProperties(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.generationId = reader.int32(); + break; + } + case 2: { + message.finalizeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BackupApplianceBackupProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BackupApplianceBackupProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BackupApplianceBackupProperties.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.generationId != null && message.hasOwnProperty("generationId")) { + properties._generationId = 1; + if (!$util.isInteger(message.generationId)) + return "generationId: integer expected"; + } + if (message.finalizeTime != null && message.hasOwnProperty("finalizeTime")) { + properties._finalizeTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.finalizeTime); + if (error) + return "finalizeTime." + error; + } + } + if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { + properties._recoveryRangeStartTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeStartTime); + if (error) + return "recoveryRangeStartTime." + error; + } + } + if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { + properties._recoveryRangeEndTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeEndTime); + if (error) + return "recoveryRangeEndTime." + error; + } + } + return null; + }; + + /** + * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties + */ + BackupApplianceBackupProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties(); + if (object.generationId != null) + message.generationId = object.generationId | 0; + if (object.finalizeTime != null) { + if (typeof object.finalizeTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.finalizeTime: object expected"); + message.finalizeTime = $root.google.protobuf.Timestamp.fromObject(object.finalizeTime); + } + if (object.recoveryRangeStartTime != null) { + if (typeof object.recoveryRangeStartTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeStartTime: object expected"); + message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeStartTime); + } + if (object.recoveryRangeEndTime != null) { + if (typeof object.recoveryRangeEndTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeEndTime: object expected"); + message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeEndTime); + } + return message; + }; + + /** + * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.BackupApplianceBackupProperties} message BackupApplianceBackupProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BackupApplianceBackupProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.generationId != null && message.hasOwnProperty("generationId")) { + object.generationId = message.generationId; + if (options.oneofs) + object._generationId = "generationId"; + } + if (message.finalizeTime != null && message.hasOwnProperty("finalizeTime")) { + object.finalizeTime = $root.google.protobuf.Timestamp.toObject(message.finalizeTime, options); + if (options.oneofs) + object._finalizeTime = "finalizeTime"; + } + if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { + object.recoveryRangeStartTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeStartTime, options); + if (options.oneofs) + object._recoveryRangeStartTime = "recoveryRangeStartTime"; + } + if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { + object.recoveryRangeEndTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeEndTime, options); + if (options.oneofs) + object._recoveryRangeEndTime = "recoveryRangeEndTime"; + } + return object; + }; + + /** + * Converts this BackupApplianceBackupProperties to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + * @returns {Object.} JSON object + */ + BackupApplianceBackupProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BackupApplianceBackupProperties + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BackupApplianceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceBackupProperties"; + }; + + return BackupApplianceBackupProperties; + })(); + + v1.ComputeInstanceBackupProperties = (function() { + + /** + * Properties of a ComputeInstanceBackupProperties. + * @memberof google.cloud.backupdr.v1 + * @interface IComputeInstanceBackupProperties + * @property {string|null} [description] ComputeInstanceBackupProperties description + * @property {google.cloud.backupdr.v1.ITags|null} [tags] ComputeInstanceBackupProperties tags + * @property {string|null} [machineType] ComputeInstanceBackupProperties machineType + * @property {boolean|null} [canIpForward] ComputeInstanceBackupProperties canIpForward + * @property {Array.|null} [networkInterface] ComputeInstanceBackupProperties networkInterface + * @property {Array.|null} [disk] ComputeInstanceBackupProperties disk + * @property {google.cloud.backupdr.v1.IMetadata|null} [metadata] ComputeInstanceBackupProperties metadata + * @property {Array.|null} [serviceAccount] ComputeInstanceBackupProperties serviceAccount + * @property {google.cloud.backupdr.v1.IScheduling|null} [scheduling] ComputeInstanceBackupProperties scheduling + * @property {Array.|null} [guestAccelerator] ComputeInstanceBackupProperties guestAccelerator + * @property {string|null} [minCpuPlatform] ComputeInstanceBackupProperties minCpuPlatform + * @property {google.cloud.backupdr.v1.KeyRevocationActionType|null} [keyRevocationActionType] ComputeInstanceBackupProperties keyRevocationActionType + * @property {string|null} [sourceInstance] ComputeInstanceBackupProperties sourceInstance + * @property {Object.|null} [labels] ComputeInstanceBackupProperties labels + */ + + /** + * Constructs a new ComputeInstanceBackupProperties. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ComputeInstanceBackupProperties. + * @implements IComputeInstanceBackupProperties + * @constructor + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties=} [properties] Properties to set + */ + function ComputeInstanceBackupProperties(properties) { + this.networkInterface = []; + this.disk = []; + this.serviceAccount = []; + this.guestAccelerator = []; + 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]]; + } + + /** + * ComputeInstanceBackupProperties description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.description = null; + + /** + * ComputeInstanceBackupProperties tags. + * @member {google.cloud.backupdr.v1.ITags|null|undefined} tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.tags = null; + + /** + * ComputeInstanceBackupProperties machineType. + * @member {string|null|undefined} machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.machineType = null; + + /** + * ComputeInstanceBackupProperties canIpForward. + * @member {boolean|null|undefined} canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.canIpForward = null; + + /** + * ComputeInstanceBackupProperties networkInterface. + * @member {Array.} networkInterface + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.networkInterface = $util.emptyArray; + + /** + * ComputeInstanceBackupProperties disk. + * @member {Array.} disk + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.disk = $util.emptyArray; + + /** + * ComputeInstanceBackupProperties metadata. + * @member {google.cloud.backupdr.v1.IMetadata|null|undefined} metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.metadata = null; + + /** + * ComputeInstanceBackupProperties serviceAccount. + * @member {Array.} serviceAccount + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.serviceAccount = $util.emptyArray; + + /** + * ComputeInstanceBackupProperties scheduling. + * @member {google.cloud.backupdr.v1.IScheduling|null|undefined} scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.scheduling = null; + + /** + * ComputeInstanceBackupProperties guestAccelerator. + * @member {Array.} guestAccelerator + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.guestAccelerator = $util.emptyArray; + + /** + * ComputeInstanceBackupProperties minCpuPlatform. + * @member {string|null|undefined} minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.minCpuPlatform = null; + + /** + * ComputeInstanceBackupProperties keyRevocationActionType. + * @member {google.cloud.backupdr.v1.KeyRevocationActionType|null|undefined} keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.keyRevocationActionType = null; + + /** + * ComputeInstanceBackupProperties sourceInstance. + * @member {string|null|undefined} sourceInstance + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.sourceInstance = null; + + /** + * ComputeInstanceBackupProperties labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.labels = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ComputeInstanceBackupProperties _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _tags. + * @member {"tags"|undefined} _tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_tags", { + get: $util.oneOfGetter($oneOfFields = ["tags"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _machineType. + * @member {"machineType"|undefined} _machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_machineType", { + get: $util.oneOfGetter($oneOfFields = ["machineType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _canIpForward. + * @member {"canIpForward"|undefined} _canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_canIpForward", { + get: $util.oneOfGetter($oneOfFields = ["canIpForward"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _scheduling. + * @member {"scheduling"|undefined} _scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_scheduling", { + get: $util.oneOfGetter($oneOfFields = ["scheduling"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _minCpuPlatform. + * @member {"minCpuPlatform"|undefined} _minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_minCpuPlatform", { + get: $util.oneOfGetter($oneOfFields = ["minCpuPlatform"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _keyRevocationActionType. + * @member {"keyRevocationActionType"|undefined} _keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_keyRevocationActionType", { + get: $util.oneOfGetter($oneOfFields = ["keyRevocationActionType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _sourceInstance. + * @member {"sourceInstance"|undefined} _sourceInstance + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_sourceInstance", { + get: $util.oneOfGetter($oneOfFields = ["sourceInstance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ComputeInstanceBackupProperties instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties instance + */ + ComputeInstanceBackupProperties.create = function create(properties) { + return new ComputeInstanceBackupProperties(properties); + }; + + /** + * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties} message ComputeInstanceBackupProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceBackupProperties.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.tags != null && Object.hasOwnProperty.call(message, "tags")) + $root.google.cloud.backupdr.v1.Tags.encode(message.tags, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.machineType); + if (message.canIpForward != null && Object.hasOwnProperty.call(message, "canIpForward")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.canIpForward); + if (message.networkInterface != null && message.networkInterface.length) + for (var i = 0; i < message.networkInterface.length; ++i) + $root.google.cloud.backupdr.v1.NetworkInterface.encode(message.networkInterface[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.disk != null && message.disk.length) + for (var i = 0; i < message.disk.length; ++i) + $root.google.cloud.backupdr.v1.AttachedDisk.encode(message.disk[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.cloud.backupdr.v1.Metadata.encode(message.metadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.serviceAccount != null && message.serviceAccount.length) + for (var i = 0; i < message.serviceAccount.length; ++i) + $root.google.cloud.backupdr.v1.ServiceAccount.encode(message.serviceAccount[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) + $root.google.cloud.backupdr.v1.Scheduling.encode(message.scheduling, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.guestAccelerator != null && message.guestAccelerator.length) + for (var i = 0; i < message.guestAccelerator.length; ++i) + $root.google.cloud.backupdr.v1.AcceleratorConfig.encode(message.guestAccelerator[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.minCpuPlatform); + if (message.keyRevocationActionType != null && Object.hasOwnProperty.call(message, "keyRevocationActionType")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.keyRevocationActionType); + if (message.sourceInstance != null && Object.hasOwnProperty.call(message, "sourceInstance")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.sourceInstance); + 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 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties} message ComputeInstanceBackupProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceBackupProperties.decode = function 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.backupdr.v1.ComputeInstanceBackupProperties(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.description = reader.string(); + break; + } + case 2: { + message.tags = $root.google.cloud.backupdr.v1.Tags.decode(reader, reader.uint32()); + break; + } + case 3: { + message.machineType = reader.string(); + break; + } + case 4: { + message.canIpForward = reader.bool(); + break; + } + case 5: { + if (!(message.networkInterface && message.networkInterface.length)) + message.networkInterface = []; + message.networkInterface.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.disk && message.disk.length)) + message.disk = []; + message.disk.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader, reader.uint32())); + break; + } + case 7: { + message.metadata = $root.google.cloud.backupdr.v1.Metadata.decode(reader, reader.uint32()); + break; + } + case 8: { + if (!(message.serviceAccount && message.serviceAccount.length)) + message.serviceAccount = []; + message.serviceAccount.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader, reader.uint32())); + break; + } + case 9: { + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.decode(reader, reader.uint32()); + break; + } + case 10: { + if (!(message.guestAccelerator && message.guestAccelerator.length)) + message.guestAccelerator = []; + message.guestAccelerator.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader, reader.uint32())); + break; + } + case 11: { + message.minCpuPlatform = reader.string(); + break; + } + case 12: { + message.keyRevocationActionType = reader.int32(); + break; + } + case 13: { + message.sourceInstance = reader.string(); + break; + } + case 14: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceBackupProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputeInstanceBackupProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeInstanceBackupProperties.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + properties._tags = 1; + { + var error = $root.google.cloud.backupdr.v1.Tags.verify(message.tags); + if (error) + return "tags." + error; + } + } + if (message.machineType != null && message.hasOwnProperty("machineType")) { + properties._machineType = 1; + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + properties._canIpForward = 1; + if (typeof message.canIpForward !== "boolean") + return "canIpForward: boolean expected"; + } + if (message.networkInterface != null && message.hasOwnProperty("networkInterface")) { + if (!Array.isArray(message.networkInterface)) + return "networkInterface: array expected"; + for (var i = 0; i < message.networkInterface.length; ++i) { + var error = $root.google.cloud.backupdr.v1.NetworkInterface.verify(message.networkInterface[i]); + if (error) + return "networkInterface." + error; + } + } + if (message.disk != null && message.hasOwnProperty("disk")) { + if (!Array.isArray(message.disk)) + return "disk: array expected"; + for (var i = 0; i < message.disk.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AttachedDisk.verify(message.disk[i]); + if (error) + return "disk." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + { + var error = $root.google.cloud.backupdr.v1.Metadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) { + if (!Array.isArray(message.serviceAccount)) + return "serviceAccount: array expected"; + for (var i = 0; i < message.serviceAccount.length; ++i) { + var error = $root.google.cloud.backupdr.v1.ServiceAccount.verify(message.serviceAccount[i]); + if (error) + return "serviceAccount." + error; + } + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + properties._scheduling = 1; + { + var error = $root.google.cloud.backupdr.v1.Scheduling.verify(message.scheduling); + if (error) + return "scheduling." + error; + } + } + if (message.guestAccelerator != null && message.hasOwnProperty("guestAccelerator")) { + if (!Array.isArray(message.guestAccelerator)) + return "guestAccelerator: array expected"; + for (var i = 0; i < message.guestAccelerator.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AcceleratorConfig.verify(message.guestAccelerator[i]); + if (error) + return "guestAccelerator." + error; + } + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + properties._minCpuPlatform = 1; + if (!$util.isString(message.minCpuPlatform)) + return "minCpuPlatform: string expected"; + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + properties._keyRevocationActionType = 1; + switch (message.keyRevocationActionType) { + default: + return "keyRevocationActionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) { + properties._sourceInstance = 1; + if (!$util.isString(message.sourceInstance)) + return "sourceInstance: string expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties + */ + ComputeInstanceBackupProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties(); + if (object.description != null) + message.description = String(object.description); + if (object.tags != null) { + if (typeof object.tags !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.tags: object expected"); + message.tags = $root.google.cloud.backupdr.v1.Tags.fromObject(object.tags); + } + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.canIpForward != null) + message.canIpForward = Boolean(object.canIpForward); + if (object.networkInterface) { + if (!Array.isArray(object.networkInterface)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: array expected"); + message.networkInterface = []; + for (var i = 0; i < object.networkInterface.length; ++i) { + if (typeof object.networkInterface[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: object expected"); + message.networkInterface[i] = $root.google.cloud.backupdr.v1.NetworkInterface.fromObject(object.networkInterface[i]); + } + } + if (object.disk) { + if (!Array.isArray(object.disk)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.disk: array expected"); + message.disk = []; + for (var i = 0; i < object.disk.length; ++i) { + if (typeof object.disk[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.disk: object expected"); + message.disk[i] = $root.google.cloud.backupdr.v1.AttachedDisk.fromObject(object.disk[i]); + } + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.metadata: object expected"); + message.metadata = $root.google.cloud.backupdr.v1.Metadata.fromObject(object.metadata); + } + if (object.serviceAccount) { + if (!Array.isArray(object.serviceAccount)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.serviceAccount: array expected"); + message.serviceAccount = []; + for (var i = 0; i < object.serviceAccount.length; ++i) { + if (typeof object.serviceAccount[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.serviceAccount: object expected"); + message.serviceAccount[i] = $root.google.cloud.backupdr.v1.ServiceAccount.fromObject(object.serviceAccount[i]); + } + } + if (object.scheduling != null) { + if (typeof object.scheduling !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.scheduling: object expected"); + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.fromObject(object.scheduling); + } + if (object.guestAccelerator) { + if (!Array.isArray(object.guestAccelerator)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.guestAccelerator: array expected"); + message.guestAccelerator = []; + for (var i = 0; i < object.guestAccelerator.length; ++i) { + if (typeof object.guestAccelerator[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.guestAccelerator: object expected"); + message.guestAccelerator[i] = $root.google.cloud.backupdr.v1.AcceleratorConfig.fromObject(object.guestAccelerator[i]); + } + } + if (object.minCpuPlatform != null) + message.minCpuPlatform = String(object.minCpuPlatform); + switch (object.keyRevocationActionType) { + default: + if (typeof object.keyRevocationActionType === "number") { + message.keyRevocationActionType = object.keyRevocationActionType; + break; + } + break; + case "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": + case 0: + message.keyRevocationActionType = 0; + break; + case "NONE": + case 1: + message.keyRevocationActionType = 1; + break; + case "STOP": + case 2: + message.keyRevocationActionType = 2; + break; + } + if (object.sourceInstance != null) + message.sourceInstance = String(object.sourceInstance); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} message ComputeInstanceBackupProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeInstanceBackupProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.networkInterface = []; + object.disk = []; + object.serviceAccount = []; + object.guestAccelerator = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + object.tags = $root.google.cloud.backupdr.v1.Tags.toObject(message.tags, options); + if (options.oneofs) + object._tags = "tags"; + } + if (message.machineType != null && message.hasOwnProperty("machineType")) { + object.machineType = message.machineType; + if (options.oneofs) + object._machineType = "machineType"; + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + object.canIpForward = message.canIpForward; + if (options.oneofs) + object._canIpForward = "canIpForward"; + } + if (message.networkInterface && message.networkInterface.length) { + object.networkInterface = []; + for (var j = 0; j < message.networkInterface.length; ++j) + object.networkInterface[j] = $root.google.cloud.backupdr.v1.NetworkInterface.toObject(message.networkInterface[j], options); + } + if (message.disk && message.disk.length) { + object.disk = []; + for (var j = 0; j < message.disk.length; ++j) + object.disk[j] = $root.google.cloud.backupdr.v1.AttachedDisk.toObject(message.disk[j], options); + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = $root.google.cloud.backupdr.v1.Metadata.toObject(message.metadata, options); + if (options.oneofs) + object._metadata = "metadata"; + } + if (message.serviceAccount && message.serviceAccount.length) { + object.serviceAccount = []; + for (var j = 0; j < message.serviceAccount.length; ++j) + object.serviceAccount[j] = $root.google.cloud.backupdr.v1.ServiceAccount.toObject(message.serviceAccount[j], options); + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + object.scheduling = $root.google.cloud.backupdr.v1.Scheduling.toObject(message.scheduling, options); + if (options.oneofs) + object._scheduling = "scheduling"; + } + if (message.guestAccelerator && message.guestAccelerator.length) { + object.guestAccelerator = []; + for (var j = 0; j < message.guestAccelerator.length; ++j) + object.guestAccelerator[j] = $root.google.cloud.backupdr.v1.AcceleratorConfig.toObject(message.guestAccelerator[j], options); + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + object.minCpuPlatform = message.minCpuPlatform; + if (options.oneofs) + object._minCpuPlatform = "minCpuPlatform"; + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + object.keyRevocationActionType = options.enums === String ? $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] === undefined ? message.keyRevocationActionType : $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] : message.keyRevocationActionType; + if (options.oneofs) + object._keyRevocationActionType = "keyRevocationActionType"; + } + if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) { + object.sourceInstance = message.sourceInstance; + if (options.oneofs) + object._sourceInstance = "sourceInstance"; + } + 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]]; + } + return object; + }; + + /** + * Converts this ComputeInstanceBackupProperties to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + * @returns {Object.} JSON object + */ + ComputeInstanceBackupProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComputeInstanceBackupProperties + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputeInstanceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceBackupProperties"; + }; + + return ComputeInstanceBackupProperties; + })(); + + v1.ComputeInstanceRestoreProperties = (function() { + + /** + * Properties of a ComputeInstanceRestoreProperties. + * @memberof google.cloud.backupdr.v1 + * @interface IComputeInstanceRestoreProperties + * @property {string|null} [name] ComputeInstanceRestoreProperties name + * @property {google.cloud.backupdr.v1.IAdvancedMachineFeatures|null} [advancedMachineFeatures] ComputeInstanceRestoreProperties advancedMachineFeatures + * @property {boolean|null} [canIpForward] ComputeInstanceRestoreProperties canIpForward + * @property {google.cloud.backupdr.v1.IConfidentialInstanceConfig|null} [confidentialInstanceConfig] ComputeInstanceRestoreProperties confidentialInstanceConfig + * @property {boolean|null} [deletionProtection] ComputeInstanceRestoreProperties deletionProtection + * @property {string|null} [description] ComputeInstanceRestoreProperties description + * @property {Array.|null} [disks] ComputeInstanceRestoreProperties disks + * @property {google.cloud.backupdr.v1.IDisplayDevice|null} [displayDevice] ComputeInstanceRestoreProperties displayDevice + * @property {Array.|null} [guestAccelerators] ComputeInstanceRestoreProperties guestAccelerators + * @property {string|null} [hostname] ComputeInstanceRestoreProperties hostname + * @property {google.cloud.backupdr.v1.ICustomerEncryptionKey|null} [instanceEncryptionKey] ComputeInstanceRestoreProperties instanceEncryptionKey + * @property {google.cloud.backupdr.v1.KeyRevocationActionType|null} [keyRevocationActionType] ComputeInstanceRestoreProperties keyRevocationActionType + * @property {Object.|null} [labels] ComputeInstanceRestoreProperties labels + * @property {string|null} [machineType] ComputeInstanceRestoreProperties machineType + * @property {google.cloud.backupdr.v1.IMetadata|null} [metadata] ComputeInstanceRestoreProperties metadata + * @property {string|null} [minCpuPlatform] ComputeInstanceRestoreProperties minCpuPlatform + * @property {Array.|null} [networkInterfaces] ComputeInstanceRestoreProperties networkInterfaces + * @property {google.cloud.backupdr.v1.INetworkPerformanceConfig|null} [networkPerformanceConfig] ComputeInstanceRestoreProperties networkPerformanceConfig + * @property {google.cloud.backupdr.v1.IInstanceParams|null} [params] ComputeInstanceRestoreProperties params + * @property {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null} [privateIpv6GoogleAccess] ComputeInstanceRestoreProperties privateIpv6GoogleAccess + * @property {google.cloud.backupdr.v1.IAllocationAffinity|null} [allocationAffinity] ComputeInstanceRestoreProperties allocationAffinity + * @property {Array.|null} [resourcePolicies] ComputeInstanceRestoreProperties resourcePolicies + * @property {google.cloud.backupdr.v1.IScheduling|null} [scheduling] ComputeInstanceRestoreProperties scheduling + * @property {Array.|null} [serviceAccounts] ComputeInstanceRestoreProperties serviceAccounts + * @property {google.cloud.backupdr.v1.ITags|null} [tags] ComputeInstanceRestoreProperties tags + */ + + /** + * Constructs a new ComputeInstanceRestoreProperties. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ComputeInstanceRestoreProperties. + * @implements IComputeInstanceRestoreProperties + * @constructor + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties=} [properties] Properties to set + */ + function ComputeInstanceRestoreProperties(properties) { + this.disks = []; + this.guestAccelerators = []; + this.labels = {}; + this.networkInterfaces = []; + this.resourcePolicies = []; + this.serviceAccounts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComputeInstanceRestoreProperties name. + * @member {string|null|undefined} name + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.name = null; + + /** + * ComputeInstanceRestoreProperties advancedMachineFeatures. + * @member {google.cloud.backupdr.v1.IAdvancedMachineFeatures|null|undefined} advancedMachineFeatures + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.advancedMachineFeatures = null; + + /** + * ComputeInstanceRestoreProperties canIpForward. + * @member {boolean|null|undefined} canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.canIpForward = null; + + /** + * ComputeInstanceRestoreProperties confidentialInstanceConfig. + * @member {google.cloud.backupdr.v1.IConfidentialInstanceConfig|null|undefined} confidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.confidentialInstanceConfig = null; + + /** + * ComputeInstanceRestoreProperties deletionProtection. + * @member {boolean|null|undefined} deletionProtection + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.deletionProtection = null; + + /** + * ComputeInstanceRestoreProperties description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.description = null; + + /** + * ComputeInstanceRestoreProperties disks. + * @member {Array.} disks + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.disks = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties displayDevice. + * @member {google.cloud.backupdr.v1.IDisplayDevice|null|undefined} displayDevice + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.displayDevice = null; + + /** + * ComputeInstanceRestoreProperties guestAccelerators. + * @member {Array.} guestAccelerators + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.guestAccelerators = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties hostname. + * @member {string|null|undefined} hostname + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.hostname = null; + + /** + * ComputeInstanceRestoreProperties instanceEncryptionKey. + * @member {google.cloud.backupdr.v1.ICustomerEncryptionKey|null|undefined} instanceEncryptionKey + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.instanceEncryptionKey = null; + + /** + * ComputeInstanceRestoreProperties keyRevocationActionType. + * @member {google.cloud.backupdr.v1.KeyRevocationActionType|null|undefined} keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.keyRevocationActionType = null; + + /** + * ComputeInstanceRestoreProperties labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.labels = $util.emptyObject; + + /** + * ComputeInstanceRestoreProperties machineType. + * @member {string|null|undefined} machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.machineType = null; + + /** + * ComputeInstanceRestoreProperties metadata. + * @member {google.cloud.backupdr.v1.IMetadata|null|undefined} metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.metadata = null; + + /** + * ComputeInstanceRestoreProperties minCpuPlatform. + * @member {string|null|undefined} minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.minCpuPlatform = null; + + /** + * ComputeInstanceRestoreProperties networkInterfaces. + * @member {Array.} networkInterfaces + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.networkInterfaces = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties networkPerformanceConfig. + * @member {google.cloud.backupdr.v1.INetworkPerformanceConfig|null|undefined} networkPerformanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.networkPerformanceConfig = null; + + /** + * ComputeInstanceRestoreProperties params. + * @member {google.cloud.backupdr.v1.IInstanceParams|null|undefined} params + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.params = null; + + /** + * ComputeInstanceRestoreProperties privateIpv6GoogleAccess. + * @member {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null|undefined} privateIpv6GoogleAccess + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.privateIpv6GoogleAccess = null; + + /** + * ComputeInstanceRestoreProperties allocationAffinity. + * @member {google.cloud.backupdr.v1.IAllocationAffinity|null|undefined} allocationAffinity + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.allocationAffinity = null; + + /** + * ComputeInstanceRestoreProperties resourcePolicies. + * @member {Array.} resourcePolicies + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.resourcePolicies = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties scheduling. + * @member {google.cloud.backupdr.v1.IScheduling|null|undefined} scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.scheduling = null; + + /** + * ComputeInstanceRestoreProperties serviceAccounts. + * @member {Array.} serviceAccounts + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.serviceAccounts = $util.emptyArray; + + /** + * ComputeInstanceRestoreProperties tags. + * @member {google.cloud.backupdr.v1.ITags|null|undefined} tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + ComputeInstanceRestoreProperties.prototype.tags = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ComputeInstanceRestoreProperties _name. + * @member {"name"|undefined} _name + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _advancedMachineFeatures. + * @member {"advancedMachineFeatures"|undefined} _advancedMachineFeatures + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_advancedMachineFeatures", { + get: $util.oneOfGetter($oneOfFields = ["advancedMachineFeatures"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _canIpForward. + * @member {"canIpForward"|undefined} _canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_canIpForward", { + get: $util.oneOfGetter($oneOfFields = ["canIpForward"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _confidentialInstanceConfig. + * @member {"confidentialInstanceConfig"|undefined} _confidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_confidentialInstanceConfig", { + get: $util.oneOfGetter($oneOfFields = ["confidentialInstanceConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _deletionProtection. + * @member {"deletionProtection"|undefined} _deletionProtection + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_deletionProtection", { + get: $util.oneOfGetter($oneOfFields = ["deletionProtection"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _displayDevice. + * @member {"displayDevice"|undefined} _displayDevice + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_displayDevice", { + get: $util.oneOfGetter($oneOfFields = ["displayDevice"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _hostname. + * @member {"hostname"|undefined} _hostname + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_hostname", { + get: $util.oneOfGetter($oneOfFields = ["hostname"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _instanceEncryptionKey. + * @member {"instanceEncryptionKey"|undefined} _instanceEncryptionKey + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_instanceEncryptionKey", { + get: $util.oneOfGetter($oneOfFields = ["instanceEncryptionKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _keyRevocationActionType. + * @member {"keyRevocationActionType"|undefined} _keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_keyRevocationActionType", { + get: $util.oneOfGetter($oneOfFields = ["keyRevocationActionType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _machineType. + * @member {"machineType"|undefined} _machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_machineType", { + get: $util.oneOfGetter($oneOfFields = ["machineType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _minCpuPlatform. + * @member {"minCpuPlatform"|undefined} _minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_minCpuPlatform", { + get: $util.oneOfGetter($oneOfFields = ["minCpuPlatform"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _networkPerformanceConfig. + * @member {"networkPerformanceConfig"|undefined} _networkPerformanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_networkPerformanceConfig", { + get: $util.oneOfGetter($oneOfFields = ["networkPerformanceConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _params. + * @member {"params"|undefined} _params + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_params", { + get: $util.oneOfGetter($oneOfFields = ["params"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _privateIpv6GoogleAccess. + * @member {"privateIpv6GoogleAccess"|undefined} _privateIpv6GoogleAccess + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_privateIpv6GoogleAccess", { + get: $util.oneOfGetter($oneOfFields = ["privateIpv6GoogleAccess"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _allocationAffinity. + * @member {"allocationAffinity"|undefined} _allocationAffinity + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_allocationAffinity", { + get: $util.oneOfGetter($oneOfFields = ["allocationAffinity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _scheduling. + * @member {"scheduling"|undefined} _scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_scheduling", { + get: $util.oneOfGetter($oneOfFields = ["scheduling"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _tags. + * @member {"tags"|undefined} _tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_tags", { + get: $util.oneOfGetter($oneOfFields = ["tags"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties instance + */ + ComputeInstanceRestoreProperties.create = function create(properties) { + return new ComputeInstanceRestoreProperties(properties); + }; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceRestoreProperties.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.advancedMachineFeatures != null && Object.hasOwnProperty.call(message, "advancedMachineFeatures")) + $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.encode(message.advancedMachineFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.canIpForward != null && Object.hasOwnProperty.call(message, "canIpForward")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.canIpForward); + if (message.confidentialInstanceConfig != null && Object.hasOwnProperty.call(message, "confidentialInstanceConfig")) + $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.encode(message.confidentialInstanceConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.deletionProtection); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.disks != null && message.disks.length) + for (var i = 0; i < message.disks.length; ++i) + $root.google.cloud.backupdr.v1.AttachedDisk.encode(message.disks[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.displayDevice != null && Object.hasOwnProperty.call(message, "displayDevice")) + $root.google.cloud.backupdr.v1.DisplayDevice.encode(message.displayDevice, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.guestAccelerators != null && message.guestAccelerators.length) + for (var i = 0; i < message.guestAccelerators.length; ++i) + $root.google.cloud.backupdr.v1.AcceleratorConfig.encode(message.guestAccelerators[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.hostname); + if (message.instanceEncryptionKey != null && Object.hasOwnProperty.call(message, "instanceEncryptionKey")) + $root.google.cloud.backupdr.v1.CustomerEncryptionKey.encode(message.instanceEncryptionKey, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.keyRevocationActionType != null && Object.hasOwnProperty.call(message, "keyRevocationActionType")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.keyRevocationActionType); + 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 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.machineType); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.cloud.backupdr.v1.Metadata.encode(message.metadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.minCpuPlatform); + if (message.networkInterfaces != null && message.networkInterfaces.length) + for (var i = 0; i < message.networkInterfaces.length; ++i) + $root.google.cloud.backupdr.v1.NetworkInterface.encode(message.networkInterfaces[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.networkPerformanceConfig != null && Object.hasOwnProperty.call(message, "networkPerformanceConfig")) + $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.encode(message.networkPerformanceConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.google.cloud.backupdr.v1.InstanceParams.encode(message.params, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.privateIpv6GoogleAccess != null && Object.hasOwnProperty.call(message, "privateIpv6GoogleAccess")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.privateIpv6GoogleAccess); + if (message.allocationAffinity != null && Object.hasOwnProperty.call(message, "allocationAffinity")) + $root.google.cloud.backupdr.v1.AllocationAffinity.encode(message.allocationAffinity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.resourcePolicies != null && message.resourcePolicies.length) + for (var i = 0; i < message.resourcePolicies.length; ++i) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.resourcePolicies[i]); + if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) + $root.google.cloud.backupdr.v1.Scheduling.encode(message.scheduling, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.serviceAccounts != null && message.serviceAccounts.length) + for (var i = 0; i < message.serviceAccounts.length; ++i) + $root.google.cloud.backupdr.v1.ServiceAccount.encode(message.serviceAccounts[i], writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + $root.google.cloud.backupdr.v1.Tags.encode(message.tags, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceRestoreProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceRestoreProperties.decode = function 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.backupdr.v1.ComputeInstanceRestoreProperties(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.decode(reader, reader.uint32()); + break; + } + case 3: { + message.canIpForward = reader.bool(); + break; + } + case 4: { + message.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.deletionProtection = reader.bool(); + break; + } + case 6: { + message.description = reader.string(); + break; + } + case 7: { + if (!(message.disks && message.disks.length)) + message.disks = []; + message.disks.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader, reader.uint32())); + break; + } + case 8: { + message.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.guestAccelerators && message.guestAccelerators.length)) + message.guestAccelerators = []; + message.guestAccelerators.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader, reader.uint32())); + break; + } + case 10: { + message.hostname = reader.string(); + break; + } + case 11: { + message.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader, reader.uint32()); + break; + } + case 12: { + message.keyRevocationActionType = reader.int32(); + break; + } + case 13: { + 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 14: { + message.machineType = reader.string(); + break; + } + case 15: { + message.metadata = $root.google.cloud.backupdr.v1.Metadata.decode(reader, reader.uint32()); + break; + } + case 16: { + message.minCpuPlatform = reader.string(); + break; + } + case 17: { + if (!(message.networkInterfaces && message.networkInterfaces.length)) + message.networkInterfaces = []; + message.networkInterfaces.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader, reader.uint32())); + break; + } + case 18: { + message.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.decode(reader, reader.uint32()); + break; + } + case 19: { + message.params = $root.google.cloud.backupdr.v1.InstanceParams.decode(reader, reader.uint32()); + break; + } + case 20: { + message.privateIpv6GoogleAccess = reader.int32(); + break; + } + case 21: { + message.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.decode(reader, reader.uint32()); + break; + } + case 22: { + if (!(message.resourcePolicies && message.resourcePolicies.length)) + message.resourcePolicies = []; + message.resourcePolicies.push(reader.string()); + break; + } + case 23: { + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.decode(reader, reader.uint32()); + break; + } + case 24: { + if (!(message.serviceAccounts && message.serviceAccounts.length)) + message.serviceAccounts = []; + message.serviceAccounts.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader, reader.uint32())); + break; + } + case 26: { + message.tags = $root.google.cloud.backupdr.v1.Tags.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceRestoreProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputeInstanceRestoreProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeInstanceRestoreProperties.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { + properties._advancedMachineFeatures = 1; + { + var error = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.verify(message.advancedMachineFeatures); + if (error) + return "advancedMachineFeatures." + error; + } + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + properties._canIpForward = 1; + if (typeof message.canIpForward !== "boolean") + return "canIpForward: boolean expected"; + } + if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) { + properties._confidentialInstanceConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify(message.confidentialInstanceConfig); + if (error) + return "confidentialInstanceConfig." + error; + } + } + if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) { + properties._deletionProtection = 1; + if (typeof message.deletionProtection !== "boolean") + return "deletionProtection: boolean expected"; + } + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.disks != null && message.hasOwnProperty("disks")) { + if (!Array.isArray(message.disks)) + return "disks: array expected"; + for (var i = 0; i < message.disks.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AttachedDisk.verify(message.disks[i]); + if (error) + return "disks." + error; + } + } + if (message.displayDevice != null && message.hasOwnProperty("displayDevice")) { + properties._displayDevice = 1; + { + var error = $root.google.cloud.backupdr.v1.DisplayDevice.verify(message.displayDevice); + if (error) + return "displayDevice." + error; + } + } + if (message.guestAccelerators != null && message.hasOwnProperty("guestAccelerators")) { + if (!Array.isArray(message.guestAccelerators)) + return "guestAccelerators: array expected"; + for (var i = 0; i < message.guestAccelerators.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AcceleratorConfig.verify(message.guestAccelerators[i]); + if (error) + return "guestAccelerators." + error; + } + } + if (message.hostname != null && message.hasOwnProperty("hostname")) { + properties._hostname = 1; + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + } + if (message.instanceEncryptionKey != null && message.hasOwnProperty("instanceEncryptionKey")) { + properties._instanceEncryptionKey = 1; + { + var error = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.verify(message.instanceEncryptionKey); + if (error) + return "instanceEncryptionKey." + error; + } + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + properties._keyRevocationActionType = 1; + switch (message.keyRevocationActionType) { + default: + return "keyRevocationActionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + 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.machineType != null && message.hasOwnProperty("machineType")) { + properties._machineType = 1; + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + { + var error = $root.google.cloud.backupdr.v1.Metadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + properties._minCpuPlatform = 1; + if (!$util.isString(message.minCpuPlatform)) + return "minCpuPlatform: string expected"; + } + if (message.networkInterfaces != null && message.hasOwnProperty("networkInterfaces")) { + if (!Array.isArray(message.networkInterfaces)) + return "networkInterfaces: array expected"; + for (var i = 0; i < message.networkInterfaces.length; ++i) { + var error = $root.google.cloud.backupdr.v1.NetworkInterface.verify(message.networkInterfaces[i]); + if (error) + return "networkInterfaces." + error; + } + } + if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { + properties._networkPerformanceConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.verify(message.networkPerformanceConfig); + if (error) + return "networkPerformanceConfig." + error; + } + } + if (message.params != null && message.hasOwnProperty("params")) { + properties._params = 1; + { + var error = $root.google.cloud.backupdr.v1.InstanceParams.verify(message.params); + if (error) + return "params." + error; + } + } + if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) { + properties._privateIpv6GoogleAccess = 1; + switch (message.privateIpv6GoogleAccess) { + default: + return "privateIpv6GoogleAccess: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.allocationAffinity != null && message.hasOwnProperty("allocationAffinity")) { + properties._allocationAffinity = 1; + { + var error = $root.google.cloud.backupdr.v1.AllocationAffinity.verify(message.allocationAffinity); + if (error) + return "allocationAffinity." + error; + } + } + if (message.resourcePolicies != null && message.hasOwnProperty("resourcePolicies")) { + if (!Array.isArray(message.resourcePolicies)) + return "resourcePolicies: array expected"; + for (var i = 0; i < message.resourcePolicies.length; ++i) + if (!$util.isString(message.resourcePolicies[i])) + return "resourcePolicies: string[] expected"; + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + properties._scheduling = 1; + { + var error = $root.google.cloud.backupdr.v1.Scheduling.verify(message.scheduling); + if (error) + return "scheduling." + error; + } + } + if (message.serviceAccounts != null && message.hasOwnProperty("serviceAccounts")) { + if (!Array.isArray(message.serviceAccounts)) + return "serviceAccounts: array expected"; + for (var i = 0; i < message.serviceAccounts.length; ++i) { + var error = $root.google.cloud.backupdr.v1.ServiceAccount.verify(message.serviceAccounts[i]); + if (error) + return "serviceAccounts." + error; + } + } + if (message.tags != null && message.hasOwnProperty("tags")) { + properties._tags = 1; + { + var error = $root.google.cloud.backupdr.v1.Tags.verify(message.tags); + if (error) + return "tags." + error; + } + } + return null; + }; + + /** + * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties + */ + ComputeInstanceRestoreProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties(); + if (object.name != null) + message.name = String(object.name); + if (object.advancedMachineFeatures != null) { + if (typeof object.advancedMachineFeatures !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.advancedMachineFeatures: object expected"); + message.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.fromObject(object.advancedMachineFeatures); + } + if (object.canIpForward != null) + message.canIpForward = Boolean(object.canIpForward); + if (object.confidentialInstanceConfig != null) { + if (typeof object.confidentialInstanceConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.confidentialInstanceConfig: object expected"); + message.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.fromObject(object.confidentialInstanceConfig); + } + if (object.deletionProtection != null) + message.deletionProtection = Boolean(object.deletionProtection); + if (object.description != null) + message.description = String(object.description); + if (object.disks) { + if (!Array.isArray(object.disks)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: array expected"); + message.disks = []; + for (var i = 0; i < object.disks.length; ++i) { + if (typeof object.disks[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: object expected"); + message.disks[i] = $root.google.cloud.backupdr.v1.AttachedDisk.fromObject(object.disks[i]); + } + } + if (object.displayDevice != null) { + if (typeof object.displayDevice !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.displayDevice: object expected"); + message.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.fromObject(object.displayDevice); + } + if (object.guestAccelerators) { + if (!Array.isArray(object.guestAccelerators)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.guestAccelerators: array expected"); + message.guestAccelerators = []; + for (var i = 0; i < object.guestAccelerators.length; ++i) { + if (typeof object.guestAccelerators[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.guestAccelerators: object expected"); + message.guestAccelerators[i] = $root.google.cloud.backupdr.v1.AcceleratorConfig.fromObject(object.guestAccelerators[i]); + } + } + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.instanceEncryptionKey != null) { + if (typeof object.instanceEncryptionKey !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.instanceEncryptionKey: object expected"); + message.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.fromObject(object.instanceEncryptionKey); + } + switch (object.keyRevocationActionType) { + default: + if (typeof object.keyRevocationActionType === "number") { + message.keyRevocationActionType = object.keyRevocationActionType; + break; + } + break; + case "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": + case 0: + message.keyRevocationActionType = 0; + break; + case "NONE": + case 1: + message.keyRevocationActionType = 1; + break; + case "STOP": + case 2: + message.keyRevocationActionType = 2; + break; + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.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.machineType != null) + message.machineType = String(object.machineType); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.metadata: object expected"); + message.metadata = $root.google.cloud.backupdr.v1.Metadata.fromObject(object.metadata); + } + if (object.minCpuPlatform != null) + message.minCpuPlatform = String(object.minCpuPlatform); + if (object.networkInterfaces) { + if (!Array.isArray(object.networkInterfaces)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkInterfaces: array expected"); + message.networkInterfaces = []; + for (var i = 0; i < object.networkInterfaces.length; ++i) { + if (typeof object.networkInterfaces[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkInterfaces: object expected"); + message.networkInterfaces[i] = $root.google.cloud.backupdr.v1.NetworkInterface.fromObject(object.networkInterfaces[i]); + } + } + if (object.networkPerformanceConfig != null) { + if (typeof object.networkPerformanceConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkPerformanceConfig: object expected"); + message.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.fromObject(object.networkPerformanceConfig); + } + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.params: object expected"); + message.params = $root.google.cloud.backupdr.v1.InstanceParams.fromObject(object.params); + } + switch (object.privateIpv6GoogleAccess) { + default: + if (typeof object.privateIpv6GoogleAccess === "number") { + message.privateIpv6GoogleAccess = object.privateIpv6GoogleAccess; + break; + } + break; + case "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": + case 0: + message.privateIpv6GoogleAccess = 0; + break; + case "INHERIT_FROM_SUBNETWORK": + case 1: + message.privateIpv6GoogleAccess = 1; + break; + case "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE": + case 2: + message.privateIpv6GoogleAccess = 2; + break; + case "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE": + case 3: + message.privateIpv6GoogleAccess = 3; + break; + } + if (object.allocationAffinity != null) { + if (typeof object.allocationAffinity !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.allocationAffinity: object expected"); + message.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.fromObject(object.allocationAffinity); + } + if (object.resourcePolicies) { + if (!Array.isArray(object.resourcePolicies)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.resourcePolicies: array expected"); + message.resourcePolicies = []; + for (var i = 0; i < object.resourcePolicies.length; ++i) + message.resourcePolicies[i] = String(object.resourcePolicies[i]); + } + if (object.scheduling != null) { + if (typeof object.scheduling !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.scheduling: object expected"); + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.fromObject(object.scheduling); + } + if (object.serviceAccounts) { + if (!Array.isArray(object.serviceAccounts)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.serviceAccounts: array expected"); + message.serviceAccounts = []; + for (var i = 0; i < object.serviceAccounts.length; ++i) { + if (typeof object.serviceAccounts[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.serviceAccounts: object expected"); + message.serviceAccounts[i] = $root.google.cloud.backupdr.v1.ServiceAccount.fromObject(object.serviceAccounts[i]); + } + } + if (object.tags != null) { + if (typeof object.tags !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.tags: object expected"); + message.tags = $root.google.cloud.backupdr.v1.Tags.fromObject(object.tags); + } + return message; + }; + + /** + * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeInstanceRestoreProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.disks = []; + object.guestAccelerators = []; + object.networkInterfaces = []; + object.resourcePolicies = []; + object.serviceAccounts = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { + object.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.toObject(message.advancedMachineFeatures, options); + if (options.oneofs) + object._advancedMachineFeatures = "advancedMachineFeatures"; + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + object.canIpForward = message.canIpForward; + if (options.oneofs) + object._canIpForward = "canIpForward"; + } + if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) { + object.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.toObject(message.confidentialInstanceConfig, options); + if (options.oneofs) + object._confidentialInstanceConfig = "confidentialInstanceConfig"; + } + if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) { + object.deletionProtection = message.deletionProtection; + if (options.oneofs) + object._deletionProtection = "deletionProtection"; + } + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.disks && message.disks.length) { + object.disks = []; + for (var j = 0; j < message.disks.length; ++j) + object.disks[j] = $root.google.cloud.backupdr.v1.AttachedDisk.toObject(message.disks[j], options); + } + if (message.displayDevice != null && message.hasOwnProperty("displayDevice")) { + object.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.toObject(message.displayDevice, options); + if (options.oneofs) + object._displayDevice = "displayDevice"; + } + if (message.guestAccelerators && message.guestAccelerators.length) { + object.guestAccelerators = []; + for (var j = 0; j < message.guestAccelerators.length; ++j) + object.guestAccelerators[j] = $root.google.cloud.backupdr.v1.AcceleratorConfig.toObject(message.guestAccelerators[j], options); + } + if (message.hostname != null && message.hasOwnProperty("hostname")) { + object.hostname = message.hostname; + if (options.oneofs) + object._hostname = "hostname"; + } + if (message.instanceEncryptionKey != null && message.hasOwnProperty("instanceEncryptionKey")) { + object.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.toObject(message.instanceEncryptionKey, options); + if (options.oneofs) + object._instanceEncryptionKey = "instanceEncryptionKey"; + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + object.keyRevocationActionType = options.enums === String ? $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] === undefined ? message.keyRevocationActionType : $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] : message.keyRevocationActionType; + if (options.oneofs) + object._keyRevocationActionType = "keyRevocationActionType"; + } + 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.machineType != null && message.hasOwnProperty("machineType")) { + object.machineType = message.machineType; + if (options.oneofs) + object._machineType = "machineType"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = $root.google.cloud.backupdr.v1.Metadata.toObject(message.metadata, options); + if (options.oneofs) + object._metadata = "metadata"; + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + object.minCpuPlatform = message.minCpuPlatform; + if (options.oneofs) + object._minCpuPlatform = "minCpuPlatform"; + } + if (message.networkInterfaces && message.networkInterfaces.length) { + object.networkInterfaces = []; + for (var j = 0; j < message.networkInterfaces.length; ++j) + object.networkInterfaces[j] = $root.google.cloud.backupdr.v1.NetworkInterface.toObject(message.networkInterfaces[j], options); + } + if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { + object.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.toObject(message.networkPerformanceConfig, options); + if (options.oneofs) + object._networkPerformanceConfig = "networkPerformanceConfig"; + } + if (message.params != null && message.hasOwnProperty("params")) { + object.params = $root.google.cloud.backupdr.v1.InstanceParams.toObject(message.params, options); + if (options.oneofs) + object._params = "params"; + } + if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) { + object.privateIpv6GoogleAccess = options.enums === String ? $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess[message.privateIpv6GoogleAccess] === undefined ? message.privateIpv6GoogleAccess : $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess[message.privateIpv6GoogleAccess] : message.privateIpv6GoogleAccess; + if (options.oneofs) + object._privateIpv6GoogleAccess = "privateIpv6GoogleAccess"; + } + if (message.allocationAffinity != null && message.hasOwnProperty("allocationAffinity")) { + object.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.toObject(message.allocationAffinity, options); + if (options.oneofs) + object._allocationAffinity = "allocationAffinity"; + } + if (message.resourcePolicies && message.resourcePolicies.length) { + object.resourcePolicies = []; + for (var j = 0; j < message.resourcePolicies.length; ++j) + object.resourcePolicies[j] = message.resourcePolicies[j]; + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + object.scheduling = $root.google.cloud.backupdr.v1.Scheduling.toObject(message.scheduling, options); + if (options.oneofs) + object._scheduling = "scheduling"; + } + if (message.serviceAccounts && message.serviceAccounts.length) { + object.serviceAccounts = []; + for (var j = 0; j < message.serviceAccounts.length; ++j) + object.serviceAccounts[j] = $root.google.cloud.backupdr.v1.ServiceAccount.toObject(message.serviceAccounts[j], options); + } + if (message.tags != null && message.hasOwnProperty("tags")) { + object.tags = $root.google.cloud.backupdr.v1.Tags.toObject(message.tags, options); + if (options.oneofs) + object._tags = "tags"; + } + return object; + }; + + /** + * Converts this ComputeInstanceRestoreProperties to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + * @returns {Object.} JSON object + */ + ComputeInstanceRestoreProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComputeInstanceRestoreProperties + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputeInstanceRestoreProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceRestoreProperties"; + }; + + /** + * InstancePrivateIpv6GoogleAccess enum. + * @name google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess + * @enum {number} + * @property {number} INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED=0 INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED value + * @property {number} INHERIT_FROM_SUBNETWORK=1 INHERIT_FROM_SUBNETWORK value + * @property {number} ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE=2 ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE value + * @property {number} ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE=3 ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE value + */ + ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED"] = 0; + values[valuesById[1] = "INHERIT_FROM_SUBNETWORK"] = 1; + values[valuesById[2] = "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE"] = 2; + values[valuesById[3] = "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE"] = 3; + return values; + })(); + + return ComputeInstanceRestoreProperties; + })(); + + v1.ComputeInstanceTargetEnvironment = (function() { + + /** + * Properties of a ComputeInstanceTargetEnvironment. + * @memberof google.cloud.backupdr.v1 + * @interface IComputeInstanceTargetEnvironment + * @property {string|null} [project] ComputeInstanceTargetEnvironment project + * @property {string|null} [zone] ComputeInstanceTargetEnvironment zone + */ + + /** + * Constructs a new ComputeInstanceTargetEnvironment. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ComputeInstanceTargetEnvironment. + * @implements IComputeInstanceTargetEnvironment + * @constructor + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment=} [properties] Properties to set + */ + function ComputeInstanceTargetEnvironment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComputeInstanceTargetEnvironment project. + * @member {string} project + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @instance + */ + ComputeInstanceTargetEnvironment.prototype.project = ""; + + /** + * ComputeInstanceTargetEnvironment zone. + * @member {string} zone + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @instance + */ + ComputeInstanceTargetEnvironment.prototype.zone = ""; + + /** + * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment instance + */ + ComputeInstanceTargetEnvironment.create = function create(properties) { + return new ComputeInstanceTargetEnvironment(properties); + }; + + /** + * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceTargetEnvironment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + return writer; + }; + + /** + * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceTargetEnvironment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceTargetEnvironment.decode = function 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.backupdr.v1.ComputeInstanceTargetEnvironment(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.project = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceTargetEnvironment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputeInstanceTargetEnvironment message. + * @function verify + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeInstanceTargetEnvironment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + return null; + }; + + /** + * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment + */ + ComputeInstanceTargetEnvironment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment) + return object; + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment(); + if (object.project != null) + message.project = String(object.project); + if (object.zone != null) + message.zone = String(object.zone); + return message; + }; + + /** + * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeInstanceTargetEnvironment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.project = ""; + object.zone = ""; + } + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + return object; + }; + + /** + * Converts this ComputeInstanceTargetEnvironment to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @instance + * @returns {Object.} JSON object + */ + ComputeInstanceTargetEnvironment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComputeInstanceTargetEnvironment + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputeInstanceTargetEnvironment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment"; + }; + + return ComputeInstanceTargetEnvironment; + })(); + + v1.ComputeInstanceDataSourceProperties = (function() { + + /** + * Properties of a ComputeInstanceDataSourceProperties. + * @memberof google.cloud.backupdr.v1 + * @interface IComputeInstanceDataSourceProperties + * @property {string|null} [name] ComputeInstanceDataSourceProperties name + * @property {string|null} [description] ComputeInstanceDataSourceProperties description + * @property {string|null} [machineType] ComputeInstanceDataSourceProperties machineType + * @property {number|Long|null} [totalDiskCount] ComputeInstanceDataSourceProperties totalDiskCount + * @property {number|Long|null} [totalDiskSizeGb] ComputeInstanceDataSourceProperties totalDiskSizeGb + */ + + /** + * Constructs a new ComputeInstanceDataSourceProperties. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ComputeInstanceDataSourceProperties. + * @implements IComputeInstanceDataSourceProperties + * @constructor + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties=} [properties] Properties to set + */ + function ComputeInstanceDataSourceProperties(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComputeInstanceDataSourceProperties name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.name = ""; + + /** + * ComputeInstanceDataSourceProperties description. + * @member {string} description + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.description = ""; + + /** + * ComputeInstanceDataSourceProperties machineType. + * @member {string} machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.machineType = ""; + + /** + * ComputeInstanceDataSourceProperties totalDiskCount. + * @member {number|Long} totalDiskCount + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.totalDiskCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ComputeInstanceDataSourceProperties totalDiskSizeGb. + * @member {number|Long} totalDiskSizeGb + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.totalDiskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties instance + */ + ComputeInstanceDataSourceProperties.create = function create(properties) { + return new ComputeInstanceDataSourceProperties(properties); + }; + + /** + * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceDataSourceProperties.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.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.machineType); + if (message.totalDiskCount != null && Object.hasOwnProperty.call(message, "totalDiskCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.totalDiskCount); + if (message.totalDiskSizeGb != null && Object.hasOwnProperty.call(message, "totalDiskSizeGb")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.totalDiskSizeGb); + return writer; + }; + + /** + * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComputeInstanceDataSourceProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceDataSourceProperties.decode = function 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.backupdr.v1.ComputeInstanceDataSourceProperties(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.machineType = reader.string(); + break; + } + case 4: { + message.totalDiskCount = reader.int64(); + break; + } + case 5: { + message.totalDiskSizeGb = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceDataSourceProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputeInstanceDataSourceProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeInstanceDataSourceProperties.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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + if (message.totalDiskCount != null && message.hasOwnProperty("totalDiskCount")) + if (!$util.isInteger(message.totalDiskCount) && !(message.totalDiskCount && $util.isInteger(message.totalDiskCount.low) && $util.isInteger(message.totalDiskCount.high))) + return "totalDiskCount: integer|Long expected"; + if (message.totalDiskSizeGb != null && message.hasOwnProperty("totalDiskSizeGb")) + if (!$util.isInteger(message.totalDiskSizeGb) && !(message.totalDiskSizeGb && $util.isInteger(message.totalDiskSizeGb.low) && $util.isInteger(message.totalDiskSizeGb.high))) + return "totalDiskSizeGb: integer|Long expected"; + return null; + }; + + /** + * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties + */ + ComputeInstanceDataSourceProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.totalDiskCount != null) + if ($util.Long) + (message.totalDiskCount = $util.Long.fromValue(object.totalDiskCount)).unsigned = false; + else if (typeof object.totalDiskCount === "string") + message.totalDiskCount = parseInt(object.totalDiskCount, 10); + else if (typeof object.totalDiskCount === "number") + message.totalDiskCount = object.totalDiskCount; + else if (typeof object.totalDiskCount === "object") + message.totalDiskCount = new $util.LongBits(object.totalDiskCount.low >>> 0, object.totalDiskCount.high >>> 0).toNumber(); + if (object.totalDiskSizeGb != null) + if ($util.Long) + (message.totalDiskSizeGb = $util.Long.fromValue(object.totalDiskSizeGb)).unsigned = false; + else if (typeof object.totalDiskSizeGb === "string") + message.totalDiskSizeGb = parseInt(object.totalDiskSizeGb, 10); + else if (typeof object.totalDiskSizeGb === "number") + message.totalDiskSizeGb = object.totalDiskSizeGb; + else if (typeof object.totalDiskSizeGb === "object") + message.totalDiskSizeGb = new $util.LongBits(object.totalDiskSizeGb.low >>> 0, object.totalDiskSizeGb.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeInstanceDataSourceProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.machineType = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalDiskCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalDiskCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalDiskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalDiskSizeGb = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + if (message.totalDiskCount != null && message.hasOwnProperty("totalDiskCount")) + if (typeof message.totalDiskCount === "number") + object.totalDiskCount = options.longs === String ? String(message.totalDiskCount) : message.totalDiskCount; + else + object.totalDiskCount = options.longs === String ? $util.Long.prototype.toString.call(message.totalDiskCount) : options.longs === Number ? new $util.LongBits(message.totalDiskCount.low >>> 0, message.totalDiskCount.high >>> 0).toNumber() : message.totalDiskCount; + if (message.totalDiskSizeGb != null && message.hasOwnProperty("totalDiskSizeGb")) + if (typeof message.totalDiskSizeGb === "number") + object.totalDiskSizeGb = options.longs === String ? String(message.totalDiskSizeGb) : message.totalDiskSizeGb; + else + object.totalDiskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.totalDiskSizeGb) : options.longs === Number ? new $util.LongBits(message.totalDiskSizeGb.low >>> 0, message.totalDiskSizeGb.high >>> 0).toNumber() : message.totalDiskSizeGb; + return object; + }; + + /** + * Converts this ComputeInstanceDataSourceProperties to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + * @returns {Object.} JSON object + */ + ComputeInstanceDataSourceProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComputeInstanceDataSourceProperties + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComputeInstanceDataSourceProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties"; + }; + + return ComputeInstanceDataSourceProperties; + })(); + + v1.AdvancedMachineFeatures = (function() { + + /** + * Properties of an AdvancedMachineFeatures. + * @memberof google.cloud.backupdr.v1 + * @interface IAdvancedMachineFeatures + * @property {boolean|null} [enableNestedVirtualization] AdvancedMachineFeatures enableNestedVirtualization + * @property {number|null} [threadsPerCore] AdvancedMachineFeatures threadsPerCore + * @property {number|null} [visibleCoreCount] AdvancedMachineFeatures visibleCoreCount + * @property {boolean|null} [enableUefiNetworking] AdvancedMachineFeatures enableUefiNetworking + */ + + /** + * Constructs a new AdvancedMachineFeatures. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AdvancedMachineFeatures. + * @implements IAdvancedMachineFeatures + * @constructor + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures=} [properties] Properties to set + */ + function AdvancedMachineFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdvancedMachineFeatures enableNestedVirtualization. + * @member {boolean|null|undefined} enableNestedVirtualization + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.enableNestedVirtualization = null; + + /** + * AdvancedMachineFeatures threadsPerCore. + * @member {number|null|undefined} threadsPerCore + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.threadsPerCore = null; + + /** + * AdvancedMachineFeatures visibleCoreCount. + * @member {number|null|undefined} visibleCoreCount + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.visibleCoreCount = null; + + /** + * AdvancedMachineFeatures enableUefiNetworking. + * @member {boolean|null|undefined} enableUefiNetworking + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + AdvancedMachineFeatures.prototype.enableUefiNetworking = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AdvancedMachineFeatures _enableNestedVirtualization. + * @member {"enableNestedVirtualization"|undefined} _enableNestedVirtualization + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableNestedVirtualization", { + get: $util.oneOfGetter($oneOfFields = ["enableNestedVirtualization"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AdvancedMachineFeatures _threadsPerCore. + * @member {"threadsPerCore"|undefined} _threadsPerCore + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_threadsPerCore", { + get: $util.oneOfGetter($oneOfFields = ["threadsPerCore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AdvancedMachineFeatures _visibleCoreCount. + * @member {"visibleCoreCount"|undefined} _visibleCoreCount + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_visibleCoreCount", { + get: $util.oneOfGetter($oneOfFields = ["visibleCoreCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AdvancedMachineFeatures _enableUefiNetworking. + * @member {"enableUefiNetworking"|undefined} _enableUefiNetworking + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableUefiNetworking", { + get: $util.oneOfGetter($oneOfFields = ["enableUefiNetworking"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AdvancedMachineFeatures instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures instance + */ + AdvancedMachineFeatures.create = function create(properties) { + return new AdvancedMachineFeatures(properties); + }; + + /** + * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvancedMachineFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableNestedVirtualization != null && Object.hasOwnProperty.call(message, "enableNestedVirtualization")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableNestedVirtualization); + if (message.threadsPerCore != null && Object.hasOwnProperty.call(message, "threadsPerCore")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.threadsPerCore); + if (message.visibleCoreCount != null && Object.hasOwnProperty.call(message, "visibleCoreCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.visibleCoreCount); + if (message.enableUefiNetworking != null && Object.hasOwnProperty.call(message, "enableUefiNetworking")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enableUefiNetworking); + return writer; + }; + + /** + * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvancedMachineFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdvancedMachineFeatures.decode = function 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.backupdr.v1.AdvancedMachineFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableNestedVirtualization = reader.bool(); + break; + } + case 2: { + message.threadsPerCore = reader.int32(); + break; + } + case 3: { + message.visibleCoreCount = reader.int32(); + break; + } + case 4: { + message.enableUefiNetworking = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdvancedMachineFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdvancedMachineFeatures message. + * @function verify + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdvancedMachineFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { + properties._enableNestedVirtualization = 1; + if (typeof message.enableNestedVirtualization !== "boolean") + return "enableNestedVirtualization: boolean expected"; + } + if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { + properties._threadsPerCore = 1; + if (!$util.isInteger(message.threadsPerCore)) + return "threadsPerCore: integer expected"; + } + if (message.visibleCoreCount != null && message.hasOwnProperty("visibleCoreCount")) { + properties._visibleCoreCount = 1; + if (!$util.isInteger(message.visibleCoreCount)) + return "visibleCoreCount: integer expected"; + } + if (message.enableUefiNetworking != null && message.hasOwnProperty("enableUefiNetworking")) { + properties._enableUefiNetworking = 1; + if (typeof message.enableUefiNetworking !== "boolean") + return "enableUefiNetworking: boolean expected"; + } + return null; + }; + + /** + * Creates an AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures + */ + AdvancedMachineFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AdvancedMachineFeatures) + return object; + var message = new $root.google.cloud.backupdr.v1.AdvancedMachineFeatures(); + if (object.enableNestedVirtualization != null) + message.enableNestedVirtualization = Boolean(object.enableNestedVirtualization); + if (object.threadsPerCore != null) + message.threadsPerCore = object.threadsPerCore | 0; + if (object.visibleCoreCount != null) + message.visibleCoreCount = object.visibleCoreCount | 0; + if (object.enableUefiNetworking != null) + message.enableUefiNetworking = Boolean(object.enableUefiNetworking); + return message; + }; + + /** + * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.AdvancedMachineFeatures} message AdvancedMachineFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdvancedMachineFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { + object.enableNestedVirtualization = message.enableNestedVirtualization; + if (options.oneofs) + object._enableNestedVirtualization = "enableNestedVirtualization"; + } + if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { + object.threadsPerCore = message.threadsPerCore; + if (options.oneofs) + object._threadsPerCore = "threadsPerCore"; + } + if (message.visibleCoreCount != null && message.hasOwnProperty("visibleCoreCount")) { + object.visibleCoreCount = message.visibleCoreCount; + if (options.oneofs) + object._visibleCoreCount = "visibleCoreCount"; + } + if (message.enableUefiNetworking != null && message.hasOwnProperty("enableUefiNetworking")) { + object.enableUefiNetworking = message.enableUefiNetworking; + if (options.oneofs) + object._enableUefiNetworking = "enableUefiNetworking"; + } + return object; + }; + + /** + * Converts this AdvancedMachineFeatures to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + * @returns {Object.} JSON object + */ + AdvancedMachineFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdvancedMachineFeatures + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdvancedMachineFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AdvancedMachineFeatures"; + }; + + return AdvancedMachineFeatures; + })(); + + v1.ConfidentialInstanceConfig = (function() { + + /** + * Properties of a ConfidentialInstanceConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IConfidentialInstanceConfig + * @property {boolean|null} [enableConfidentialCompute] ConfidentialInstanceConfig enableConfidentialCompute + */ + + /** + * Constructs a new ConfidentialInstanceConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ConfidentialInstanceConfig. + * @implements IConfidentialInstanceConfig + * @constructor + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig=} [properties] Properties to set + */ + function ConfidentialInstanceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConfidentialInstanceConfig enableConfidentialCompute. + * @member {boolean|null|undefined} enableConfidentialCompute + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @instance + */ + ConfidentialInstanceConfig.prototype.enableConfidentialCompute = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConfidentialInstanceConfig _enableConfidentialCompute. + * @member {"enableConfidentialCompute"|undefined} _enableConfidentialCompute + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @instance + */ + Object.defineProperty(ConfidentialInstanceConfig.prototype, "_enableConfidentialCompute", { + get: $util.oneOfGetter($oneOfFields = ["enableConfidentialCompute"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConfidentialInstanceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig instance + */ + ConfidentialInstanceConfig.create = function create(properties) { + return new ConfidentialInstanceConfig(properties); + }; + + /** + * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig} message ConfidentialInstanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidentialInstanceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableConfidentialCompute != null && Object.hasOwnProperty.call(message, "enableConfidentialCompute")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableConfidentialCompute); + return writer; + }; + + /** + * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig} message ConfidentialInstanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConfidentialInstanceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidentialInstanceConfig.decode = function 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.backupdr.v1.ConfidentialInstanceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableConfidentialCompute = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConfidentialInstanceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConfidentialInstanceConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConfidentialInstanceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enableConfidentialCompute != null && message.hasOwnProperty("enableConfidentialCompute")) { + properties._enableConfidentialCompute = 1; + if (typeof message.enableConfidentialCompute !== "boolean") + return "enableConfidentialCompute: boolean expected"; + } + return null; + }; + + /** + * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig + */ + ConfidentialInstanceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig(); + if (object.enableConfidentialCompute != null) + message.enableConfidentialCompute = Boolean(object.enableConfidentialCompute); + return message; + }; + + /** + * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {google.cloud.backupdr.v1.ConfidentialInstanceConfig} message ConfidentialInstanceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConfidentialInstanceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enableConfidentialCompute != null && message.hasOwnProperty("enableConfidentialCompute")) { + object.enableConfidentialCompute = message.enableConfidentialCompute; + if (options.oneofs) + object._enableConfidentialCompute = "enableConfidentialCompute"; + } + return object; + }; + + /** + * Converts this ConfidentialInstanceConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @instance + * @returns {Object.} JSON object + */ + ConfidentialInstanceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConfidentialInstanceConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConfidentialInstanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ConfidentialInstanceConfig"; + }; + + return ConfidentialInstanceConfig; + })(); + + v1.DisplayDevice = (function() { + + /** + * Properties of a DisplayDevice. + * @memberof google.cloud.backupdr.v1 + * @interface IDisplayDevice + * @property {boolean|null} [enableDisplay] DisplayDevice enableDisplay + */ + + /** + * Constructs a new DisplayDevice. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a DisplayDevice. + * @implements IDisplayDevice + * @constructor + * @param {google.cloud.backupdr.v1.IDisplayDevice=} [properties] Properties to set + */ + function DisplayDevice(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DisplayDevice enableDisplay. + * @member {boolean|null|undefined} enableDisplay + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @instance + */ + DisplayDevice.prototype.enableDisplay = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DisplayDevice _enableDisplay. + * @member {"enableDisplay"|undefined} _enableDisplay + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @instance + */ + Object.defineProperty(DisplayDevice.prototype, "_enableDisplay", { + get: $util.oneOfGetter($oneOfFields = ["enableDisplay"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DisplayDevice instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.IDisplayDevice=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice instance + */ + DisplayDevice.create = function create(properties) { + return new DisplayDevice(properties); + }; + + /** + * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.IDisplayDevice} message DisplayDevice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisplayDevice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableDisplay != null && Object.hasOwnProperty.call(message, "enableDisplay")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableDisplay); + return writer; + }; + + /** + * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.IDisplayDevice} message DisplayDevice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisplayDevice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DisplayDevice message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisplayDevice.decode = function 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.backupdr.v1.DisplayDevice(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableDisplay = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisplayDevice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DisplayDevice message. + * @function verify + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DisplayDevice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enableDisplay != null && message.hasOwnProperty("enableDisplay")) { + properties._enableDisplay = 1; + if (typeof message.enableDisplay !== "boolean") + return "enableDisplay: boolean expected"; + } + return null; + }; + + /** + * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice + */ + DisplayDevice.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DisplayDevice) + return object; + var message = new $root.google.cloud.backupdr.v1.DisplayDevice(); + if (object.enableDisplay != null) + message.enableDisplay = Boolean(object.enableDisplay); + return message; + }; + + /** + * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.DisplayDevice} message DisplayDevice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DisplayDevice.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enableDisplay != null && message.hasOwnProperty("enableDisplay")) { + object.enableDisplay = message.enableDisplay; + if (options.oneofs) + object._enableDisplay = "enableDisplay"; + } + return object; + }; + + /** + * Converts this DisplayDevice to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @instance + * @returns {Object.} JSON object + */ + DisplayDevice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DisplayDevice + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DisplayDevice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DisplayDevice"; + }; + + return DisplayDevice; + })(); + + v1.AcceleratorConfig = (function() { + + /** + * Properties of an AcceleratorConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IAcceleratorConfig + * @property {string|null} [acceleratorType] AcceleratorConfig acceleratorType + * @property {number|null} [acceleratorCount] AcceleratorConfig acceleratorCount + */ + + /** + * Constructs a new AcceleratorConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AcceleratorConfig. + * @implements IAcceleratorConfig + * @constructor + * @param {google.cloud.backupdr.v1.IAcceleratorConfig=} [properties] Properties to set + */ + function AcceleratorConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcceleratorConfig acceleratorType. + * @member {string|null|undefined} acceleratorType + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.acceleratorType = null; + + /** + * AcceleratorConfig acceleratorCount. + * @member {number|null|undefined} acceleratorCount + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + */ + AcceleratorConfig.prototype.acceleratorCount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AcceleratorConfig _acceleratorType. + * @member {"acceleratorType"|undefined} _acceleratorType + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + */ + Object.defineProperty(AcceleratorConfig.prototype, "_acceleratorType", { + get: $util.oneOfGetter($oneOfFields = ["acceleratorType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AcceleratorConfig _acceleratorCount. + * @member {"acceleratorCount"|undefined} _acceleratorCount + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + */ + Object.defineProperty(AcceleratorConfig.prototype, "_acceleratorCount", { + get: $util.oneOfGetter($oneOfFields = ["acceleratorCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AcceleratorConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {google.cloud.backupdr.v1.IAcceleratorConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig instance + */ + AcceleratorConfig.create = function create(properties) { + return new AcceleratorConfig(properties); + }; + + /** + * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {google.cloud.backupdr.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcceleratorConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.acceleratorType != null && Object.hasOwnProperty.call(message, "acceleratorType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.acceleratorType); + if (message.acceleratorCount != null && Object.hasOwnProperty.call(message, "acceleratorCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.acceleratorCount); + return writer; + }; + + /** + * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {google.cloud.backupdr.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcceleratorConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcceleratorConfig.decode = function 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.backupdr.v1.AcceleratorConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.acceleratorType = reader.string(); + break; + } + case 2: { + message.acceleratorCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcceleratorConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcceleratorConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcceleratorConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) { + properties._acceleratorType = 1; + if (!$util.isString(message.acceleratorType)) + return "acceleratorType: string expected"; + } + if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) { + properties._acceleratorCount = 1; + if (!$util.isInteger(message.acceleratorCount)) + return "acceleratorCount: integer expected"; + } + return null; + }; + + /** + * Creates an AcceleratorConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig + */ + AcceleratorConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AcceleratorConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.AcceleratorConfig(); + if (object.acceleratorType != null) + message.acceleratorType = String(object.acceleratorType); + if (object.acceleratorCount != null) + message.acceleratorCount = object.acceleratorCount | 0; + return message; + }; + + /** + * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {google.cloud.backupdr.v1.AcceleratorConfig} message AcceleratorConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcceleratorConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) { + object.acceleratorType = message.acceleratorType; + if (options.oneofs) + object._acceleratorType = "acceleratorType"; + } + if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) { + object.acceleratorCount = message.acceleratorCount; + if (options.oneofs) + object._acceleratorCount = "acceleratorCount"; + } + return object; + }; + + /** + * Converts this AcceleratorConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @instance + * @returns {Object.} JSON object + */ + AcceleratorConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcceleratorConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcceleratorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AcceleratorConfig"; + }; + + return AcceleratorConfig; + })(); + + v1.CustomerEncryptionKey = (function() { + + /** + * Properties of a CustomerEncryptionKey. + * @memberof google.cloud.backupdr.v1 + * @interface ICustomerEncryptionKey + * @property {string|null} [rawKey] CustomerEncryptionKey rawKey + * @property {string|null} [rsaEncryptedKey] CustomerEncryptionKey rsaEncryptedKey + * @property {string|null} [kmsKeyName] CustomerEncryptionKey kmsKeyName + * @property {string|null} [kmsKeyServiceAccount] CustomerEncryptionKey kmsKeyServiceAccount + */ + + /** + * Constructs a new CustomerEncryptionKey. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a CustomerEncryptionKey. + * @implements ICustomerEncryptionKey + * @constructor + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey=} [properties] Properties to set + */ + function CustomerEncryptionKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomerEncryptionKey rawKey. + * @member {string|null|undefined} rawKey + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + CustomerEncryptionKey.prototype.rawKey = null; + + /** + * CustomerEncryptionKey rsaEncryptedKey. + * @member {string|null|undefined} rsaEncryptedKey + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + CustomerEncryptionKey.prototype.rsaEncryptedKey = null; + + /** + * CustomerEncryptionKey kmsKeyName. + * @member {string|null|undefined} kmsKeyName + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + CustomerEncryptionKey.prototype.kmsKeyName = null; + + /** + * CustomerEncryptionKey kmsKeyServiceAccount. + * @member {string|null|undefined} kmsKeyServiceAccount + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + CustomerEncryptionKey.prototype.kmsKeyServiceAccount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CustomerEncryptionKey key. + * @member {"rawKey"|"rsaEncryptedKey"|"kmsKeyName"|undefined} key + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + Object.defineProperty(CustomerEncryptionKey.prototype, "key", { + get: $util.oneOfGetter($oneOfFields = ["rawKey", "rsaEncryptedKey", "kmsKeyName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * CustomerEncryptionKey _kmsKeyServiceAccount. + * @member {"kmsKeyServiceAccount"|undefined} _kmsKeyServiceAccount + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + */ + Object.defineProperty(CustomerEncryptionKey.prototype, "_kmsKeyServiceAccount", { + get: $util.oneOfGetter($oneOfFields = ["kmsKeyServiceAccount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CustomerEncryptionKey instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey instance + */ + CustomerEncryptionKey.create = function create(properties) { + return new CustomerEncryptionKey(properties); + }; + + /** + * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey} message CustomerEncryptionKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomerEncryptionKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rawKey != null && Object.hasOwnProperty.call(message, "rawKey")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rawKey); + if (message.rsaEncryptedKey != null && Object.hasOwnProperty.call(message, "rsaEncryptedKey")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rsaEncryptedKey); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyName); + if (message.kmsKeyServiceAccount != null && Object.hasOwnProperty.call(message, "kmsKeyServiceAccount")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kmsKeyServiceAccount); + return writer; + }; + + /** + * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey} message CustomerEncryptionKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomerEncryptionKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomerEncryptionKey message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomerEncryptionKey.decode = function 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.backupdr.v1.CustomerEncryptionKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rawKey = reader.string(); + break; + } + case 2: { + message.rsaEncryptedKey = reader.string(); + break; + } + case 3: { + message.kmsKeyName = reader.string(); + break; + } + case 4: { + message.kmsKeyServiceAccount = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomerEncryptionKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomerEncryptionKey message. + * @function verify + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomerEncryptionKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rawKey != null && message.hasOwnProperty("rawKey")) { + properties.key = 1; + if (!$util.isString(message.rawKey)) + return "rawKey: string expected"; + } + if (message.rsaEncryptedKey != null && message.hasOwnProperty("rsaEncryptedKey")) { + if (properties.key === 1) + return "key: multiple values"; + properties.key = 1; + if (!$util.isString(message.rsaEncryptedKey)) + return "rsaEncryptedKey: string expected"; + } + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { + if (properties.key === 1) + return "key: multiple values"; + properties.key = 1; + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + } + if (message.kmsKeyServiceAccount != null && message.hasOwnProperty("kmsKeyServiceAccount")) { + properties._kmsKeyServiceAccount = 1; + if (!$util.isString(message.kmsKeyServiceAccount)) + return "kmsKeyServiceAccount: string expected"; + } + return null; + }; + + /** + * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey + */ + CustomerEncryptionKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CustomerEncryptionKey) + return object; + var message = new $root.google.cloud.backupdr.v1.CustomerEncryptionKey(); + if (object.rawKey != null) + message.rawKey = String(object.rawKey); + if (object.rsaEncryptedKey != null) + message.rsaEncryptedKey = String(object.rsaEncryptedKey); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + if (object.kmsKeyServiceAccount != null) + message.kmsKeyServiceAccount = String(object.kmsKeyServiceAccount); + return message; + }; + + /** + * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.CustomerEncryptionKey} message CustomerEncryptionKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomerEncryptionKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.rawKey != null && message.hasOwnProperty("rawKey")) { + object.rawKey = message.rawKey; + if (options.oneofs) + object.key = "rawKey"; + } + if (message.rsaEncryptedKey != null && message.hasOwnProperty("rsaEncryptedKey")) { + object.rsaEncryptedKey = message.rsaEncryptedKey; + if (options.oneofs) + object.key = "rsaEncryptedKey"; + } + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { + object.kmsKeyName = message.kmsKeyName; + if (options.oneofs) + object.key = "kmsKeyName"; + } + if (message.kmsKeyServiceAccount != null && message.hasOwnProperty("kmsKeyServiceAccount")) { + object.kmsKeyServiceAccount = message.kmsKeyServiceAccount; + if (options.oneofs) + object._kmsKeyServiceAccount = "kmsKeyServiceAccount"; + } + return object; + }; + + /** + * Converts this CustomerEncryptionKey to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @instance + * @returns {Object.} JSON object + */ + CustomerEncryptionKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomerEncryptionKey + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomerEncryptionKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CustomerEncryptionKey"; + }; + + return CustomerEncryptionKey; + })(); + + v1.Entry = (function() { + + /** + * Properties of an Entry. + * @memberof google.cloud.backupdr.v1 + * @interface IEntry + * @property {string|null} [key] Entry key + * @property {string|null} [value] Entry value + */ + + /** + * Constructs a new Entry. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an Entry. + * @implements IEntry + * @constructor + * @param {google.cloud.backupdr.v1.IEntry=} [properties] Properties to set + */ + function Entry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Entry key. + * @member {string|null|undefined} key + * @memberof google.cloud.backupdr.v1.Entry + * @instance + */ + Entry.prototype.key = null; + + /** + * Entry value. + * @member {string|null|undefined} value + * @memberof google.cloud.backupdr.v1.Entry + * @instance + */ + Entry.prototype.value = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Entry _key. + * @member {"key"|undefined} _key + * @memberof google.cloud.backupdr.v1.Entry + * @instance + */ + Object.defineProperty(Entry.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Entry _value. + * @member {"value"|undefined} _value + * @memberof google.cloud.backupdr.v1.Entry + * @instance + */ + Object.defineProperty(Entry.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Entry instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.IEntry=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Entry} Entry instance + */ + Entry.create = function create(properties) { + return new Entry(properties); + }; + + /** + * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Entry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Entry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decode = function 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.backupdr.v1.Entry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Entry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Entry message. + * @function verify + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Entry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; + } + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; + + /** + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Entry} Entry + */ + Entry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Entry) + return object; + var message = new $root.google.cloud.backupdr.v1.Entry(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.Entry} message Entry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Entry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) + object._key = "key"; + } + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object._value = "value"; + } + return object; + }; + + /** + * Converts this Entry to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Entry + * @instance + * @returns {Object.} JSON object + */ + Entry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Entry + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Entry"; + }; + + return Entry; + })(); + + v1.Metadata = (function() { + + /** + * Properties of a Metadata. + * @memberof google.cloud.backupdr.v1 + * @interface IMetadata + * @property {Array.|null} [items] Metadata items + */ + + /** + * Constructs a new Metadata. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {google.cloud.backupdr.v1.IMetadata=} [properties] Properties to set + */ + function Metadata(properties) { + this.items = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Metadata items. + * @member {Array.} items + * @memberof google.cloud.backupdr.v1.Metadata + * @instance + */ + Metadata.prototype.items = $util.emptyArray; + + /** + * Creates a new Metadata instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {google.cloud.backupdr.v1.IMetadata=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Metadata} Metadata instance + */ + Metadata.create = function create(properties) { + return new Metadata(properties); + }; + + /** + * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {google.cloud.backupdr.v1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + $root.google.cloud.backupdr.v1.Entry.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {google.cloud.backupdr.v1.IMetadata} message Metadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decode = function 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.backupdr.v1.Metadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.google.cloud.backupdr.v1.Entry.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metadata message. + * @function verify + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) { + var error = $root.google.cloud.backupdr.v1.Entry.verify(message.items[i]); + if (error) + return "items." + error; + } + } + return null; + }; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Metadata} Metadata + */ + Metadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Metadata) + return object; + var message = new $root.google.cloud.backupdr.v1.Metadata(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".google.cloud.backupdr.v1.Metadata.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Metadata.items: object expected"); + message.items[i] = $root.google.cloud.backupdr.v1.Entry.fromObject(object.items[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {google.cloud.backupdr.v1.Metadata} message Metadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = $root.google.cloud.backupdr.v1.Entry.toObject(message.items[j], options); + } + return object; + }; + + /** + * Converts this Metadata to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Metadata + * @instance + * @returns {Object.} JSON object + */ + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metadata + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Metadata"; + }; + + return Metadata; + })(); + + v1.NetworkInterface = (function() { + + /** + * Properties of a NetworkInterface. + * @memberof google.cloud.backupdr.v1 + * @interface INetworkInterface + * @property {string|null} [network] NetworkInterface network + * @property {string|null} [subnetwork] NetworkInterface subnetwork + * @property {string|null} [ipAddress] NetworkInterface ipAddress + * @property {string|null} [ipv6Address] NetworkInterface ipv6Address + * @property {number|null} [internalIpv6PrefixLength] NetworkInterface internalIpv6PrefixLength + * @property {string|null} [name] NetworkInterface name + * @property {Array.|null} [accessConfigs] NetworkInterface accessConfigs + * @property {Array.|null} [ipv6AccessConfigs] NetworkInterface ipv6AccessConfigs + * @property {Array.|null} [aliasIpRanges] NetworkInterface aliasIpRanges + * @property {google.cloud.backupdr.v1.NetworkInterface.StackType|null} [stackType] NetworkInterface stackType + * @property {google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null} [ipv6AccessType] NetworkInterface ipv6AccessType + * @property {number|null} [queueCount] NetworkInterface queueCount + * @property {google.cloud.backupdr.v1.NetworkInterface.NicType|null} [nicType] NetworkInterface nicType + * @property {string|null} [networkAttachment] NetworkInterface networkAttachment + */ + + /** + * Constructs a new NetworkInterface. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a NetworkInterface. + * @implements INetworkInterface + * @constructor + * @param {google.cloud.backupdr.v1.INetworkInterface=} [properties] Properties to set + */ + function NetworkInterface(properties) { + this.accessConfigs = []; + this.ipv6AccessConfigs = []; + this.aliasIpRanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkInterface network. + * @member {string|null|undefined} network + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.network = null; + + /** + * NetworkInterface subnetwork. + * @member {string|null|undefined} subnetwork + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.subnetwork = null; + + /** + * NetworkInterface ipAddress. + * @member {string|null|undefined} ipAddress + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.ipAddress = null; + + /** + * NetworkInterface ipv6Address. + * @member {string|null|undefined} ipv6Address + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.ipv6Address = null; + + /** + * NetworkInterface internalIpv6PrefixLength. + * @member {number|null|undefined} internalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.internalIpv6PrefixLength = null; + + /** + * NetworkInterface name. + * @member {string|null|undefined} name + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.name = null; + + /** + * NetworkInterface accessConfigs. + * @member {Array.} accessConfigs + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.accessConfigs = $util.emptyArray; + + /** + * NetworkInterface ipv6AccessConfigs. + * @member {Array.} ipv6AccessConfigs + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.ipv6AccessConfigs = $util.emptyArray; + + /** + * NetworkInterface aliasIpRanges. + * @member {Array.} aliasIpRanges + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.aliasIpRanges = $util.emptyArray; + + /** + * NetworkInterface stackType. + * @member {google.cloud.backupdr.v1.NetworkInterface.StackType|null|undefined} stackType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.stackType = null; + + /** + * NetworkInterface ipv6AccessType. + * @member {google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null|undefined} ipv6AccessType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.ipv6AccessType = null; + + /** + * NetworkInterface queueCount. + * @member {number|null|undefined} queueCount + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.queueCount = null; + + /** + * NetworkInterface nicType. + * @member {google.cloud.backupdr.v1.NetworkInterface.NicType|null|undefined} nicType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.nicType = null; + + /** + * NetworkInterface networkAttachment. + * @member {string|null|undefined} networkAttachment + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + NetworkInterface.prototype.networkAttachment = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NetworkInterface _network. + * @member {"network"|undefined} _network + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_network", { + get: $util.oneOfGetter($oneOfFields = ["network"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _subnetwork. + * @member {"subnetwork"|undefined} _subnetwork + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_subnetwork", { + get: $util.oneOfGetter($oneOfFields = ["subnetwork"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _ipAddress. + * @member {"ipAddress"|undefined} _ipAddress + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_ipAddress", { + get: $util.oneOfGetter($oneOfFields = ["ipAddress"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _ipv6Address. + * @member {"ipv6Address"|undefined} _ipv6Address + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_ipv6Address", { + get: $util.oneOfGetter($oneOfFields = ["ipv6Address"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _internalIpv6PrefixLength. + * @member {"internalIpv6PrefixLength"|undefined} _internalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_internalIpv6PrefixLength", { + get: $util.oneOfGetter($oneOfFields = ["internalIpv6PrefixLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _name. + * @member {"name"|undefined} _name + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _stackType. + * @member {"stackType"|undefined} _stackType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_stackType", { + get: $util.oneOfGetter($oneOfFields = ["stackType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _ipv6AccessType. + * @member {"ipv6AccessType"|undefined} _ipv6AccessType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_ipv6AccessType", { + get: $util.oneOfGetter($oneOfFields = ["ipv6AccessType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _queueCount. + * @member {"queueCount"|undefined} _queueCount + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_queueCount", { + get: $util.oneOfGetter($oneOfFields = ["queueCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _nicType. + * @member {"nicType"|undefined} _nicType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_nicType", { + get: $util.oneOfGetter($oneOfFields = ["nicType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NetworkInterface _networkAttachment. + * @member {"networkAttachment"|undefined} _networkAttachment + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_networkAttachment", { + get: $util.oneOfGetter($oneOfFields = ["networkAttachment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NetworkInterface instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {google.cloud.backupdr.v1.INetworkInterface=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface instance + */ + NetworkInterface.create = function create(properties) { + return new NetworkInterface(properties); + }; + + /** + * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {google.cloud.backupdr.v1.INetworkInterface} message NetworkInterface message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkInterface.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetwork); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); + if (message.ipv6Address != null && Object.hasOwnProperty.call(message, "ipv6Address")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipv6Address); + if (message.internalIpv6PrefixLength != null && Object.hasOwnProperty.call(message, "internalIpv6PrefixLength")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.internalIpv6PrefixLength); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.accessConfigs != null && message.accessConfigs.length) + for (var i = 0; i < message.accessConfigs.length; ++i) + $root.google.cloud.backupdr.v1.AccessConfig.encode(message.accessConfigs[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.ipv6AccessConfigs != null && message.ipv6AccessConfigs.length) + for (var i = 0; i < message.ipv6AccessConfigs.length; ++i) + $root.google.cloud.backupdr.v1.AccessConfig.encode(message.ipv6AccessConfigs[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.aliasIpRanges != null && message.aliasIpRanges.length) + for (var i = 0; i < message.aliasIpRanges.length; ++i) + $root.google.cloud.backupdr.v1.AliasIpRange.encode(message.aliasIpRanges[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.stackType != null && Object.hasOwnProperty.call(message, "stackType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.stackType); + if (message.ipv6AccessType != null && Object.hasOwnProperty.call(message, "ipv6AccessType")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.ipv6AccessType); + if (message.queueCount != null && Object.hasOwnProperty.call(message, "queueCount")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.queueCount); + if (message.nicType != null && Object.hasOwnProperty.call(message, "nicType")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.nicType); + if (message.networkAttachment != null && Object.hasOwnProperty.call(message, "networkAttachment")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.networkAttachment); + return writer; + }; + + /** + * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {google.cloud.backupdr.v1.INetworkInterface} message NetworkInterface message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkInterface.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkInterface message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkInterface.decode = function 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.backupdr.v1.NetworkInterface(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.network = reader.string(); + break; + } + case 2: { + message.subnetwork = reader.string(); + break; + } + case 3: { + message.ipAddress = reader.string(); + break; + } + case 4: { + message.ipv6Address = reader.string(); + break; + } + case 5: { + message.internalIpv6PrefixLength = reader.int32(); + break; + } + case 6: { + message.name = reader.string(); + break; + } + case 7: { + if (!(message.accessConfigs && message.accessConfigs.length)) + message.accessConfigs = []; + message.accessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.ipv6AccessConfigs && message.ipv6AccessConfigs.length)) + message.ipv6AccessConfigs = []; + message.ipv6AccessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader, reader.uint32())); + break; + } + case 9: { + if (!(message.aliasIpRanges && message.aliasIpRanges.length)) + message.aliasIpRanges = []; + message.aliasIpRanges.push($root.google.cloud.backupdr.v1.AliasIpRange.decode(reader, reader.uint32())); + break; + } + case 10: { + message.stackType = reader.int32(); + break; + } + case 11: { + message.ipv6AccessType = reader.int32(); + break; + } + case 12: { + message.queueCount = reader.int32(); + break; + } + case 13: { + message.nicType = reader.int32(); + break; + } + case 14: { + message.networkAttachment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkInterface.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkInterface message. + * @function verify + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkInterface.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.network != null && message.hasOwnProperty("network")) { + properties._network = 1; + if (!$util.isString(message.network)) + return "network: string expected"; + } + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { + properties._subnetwork = 1; + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + } + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) { + properties._ipAddress = 1; + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + } + if (message.ipv6Address != null && message.hasOwnProperty("ipv6Address")) { + properties._ipv6Address = 1; + if (!$util.isString(message.ipv6Address)) + return "ipv6Address: string expected"; + } + if (message.internalIpv6PrefixLength != null && message.hasOwnProperty("internalIpv6PrefixLength")) { + properties._internalIpv6PrefixLength = 1; + if (!$util.isInteger(message.internalIpv6PrefixLength)) + return "internalIpv6PrefixLength: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.accessConfigs != null && message.hasOwnProperty("accessConfigs")) { + if (!Array.isArray(message.accessConfigs)) + return "accessConfigs: array expected"; + for (var i = 0; i < message.accessConfigs.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AccessConfig.verify(message.accessConfigs[i]); + if (error) + return "accessConfigs." + error; + } + } + if (message.ipv6AccessConfigs != null && message.hasOwnProperty("ipv6AccessConfigs")) { + if (!Array.isArray(message.ipv6AccessConfigs)) + return "ipv6AccessConfigs: array expected"; + for (var i = 0; i < message.ipv6AccessConfigs.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AccessConfig.verify(message.ipv6AccessConfigs[i]); + if (error) + return "ipv6AccessConfigs." + error; + } + } + if (message.aliasIpRanges != null && message.hasOwnProperty("aliasIpRanges")) { + if (!Array.isArray(message.aliasIpRanges)) + return "aliasIpRanges: array expected"; + for (var i = 0; i < message.aliasIpRanges.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AliasIpRange.verify(message.aliasIpRanges[i]); + if (error) + return "aliasIpRanges." + error; + } + } + if (message.stackType != null && message.hasOwnProperty("stackType")) { + properties._stackType = 1; + switch (message.stackType) { + default: + return "stackType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { + properties._ipv6AccessType = 1; + switch (message.ipv6AccessType) { + default: + return "ipv6AccessType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.queueCount != null && message.hasOwnProperty("queueCount")) { + properties._queueCount = 1; + if (!$util.isInteger(message.queueCount)) + return "queueCount: integer expected"; + } + if (message.nicType != null && message.hasOwnProperty("nicType")) { + properties._nicType = 1; + switch (message.nicType) { + default: + return "nicType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) { + properties._networkAttachment = 1; + if (!$util.isString(message.networkAttachment)) + return "networkAttachment: string expected"; + } + return null; + }; + + /** + * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface + */ + NetworkInterface.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.NetworkInterface) + return object; + var message = new $root.google.cloud.backupdr.v1.NetworkInterface(); + if (object.network != null) + message.network = String(object.network); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.ipv6Address != null) + message.ipv6Address = String(object.ipv6Address); + if (object.internalIpv6PrefixLength != null) + message.internalIpv6PrefixLength = object.internalIpv6PrefixLength | 0; + if (object.name != null) + message.name = String(object.name); + if (object.accessConfigs) { + if (!Array.isArray(object.accessConfigs)) + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: array expected"); + message.accessConfigs = []; + for (var i = 0; i < object.accessConfigs.length; ++i) { + if (typeof object.accessConfigs[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: object expected"); + message.accessConfigs[i] = $root.google.cloud.backupdr.v1.AccessConfig.fromObject(object.accessConfigs[i]); + } + } + if (object.ipv6AccessConfigs) { + if (!Array.isArray(object.ipv6AccessConfigs)) + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.ipv6AccessConfigs: array expected"); + message.ipv6AccessConfigs = []; + for (var i = 0; i < object.ipv6AccessConfigs.length; ++i) { + if (typeof object.ipv6AccessConfigs[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.ipv6AccessConfigs: object expected"); + message.ipv6AccessConfigs[i] = $root.google.cloud.backupdr.v1.AccessConfig.fromObject(object.ipv6AccessConfigs[i]); + } + } + if (object.aliasIpRanges) { + if (!Array.isArray(object.aliasIpRanges)) + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.aliasIpRanges: array expected"); + message.aliasIpRanges = []; + for (var i = 0; i < object.aliasIpRanges.length; ++i) { + if (typeof object.aliasIpRanges[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.aliasIpRanges: object expected"); + message.aliasIpRanges[i] = $root.google.cloud.backupdr.v1.AliasIpRange.fromObject(object.aliasIpRanges[i]); + } + } + switch (object.stackType) { + default: + if (typeof object.stackType === "number") { + message.stackType = object.stackType; + break; + } + break; + case "STACK_TYPE_UNSPECIFIED": + case 0: + message.stackType = 0; + break; + case "IPV4_ONLY": + case 1: + message.stackType = 1; + break; + case "IPV4_IPV6": + case 2: + message.stackType = 2; + break; + } + switch (object.ipv6AccessType) { + default: + if (typeof object.ipv6AccessType === "number") { + message.ipv6AccessType = object.ipv6AccessType; + break; + } + break; + case "UNSPECIFIED_IPV6_ACCESS_TYPE": + case 0: + message.ipv6AccessType = 0; + break; + case "INTERNAL": + case 1: + message.ipv6AccessType = 1; + break; + case "EXTERNAL": + case 2: + message.ipv6AccessType = 2; + break; + } + if (object.queueCount != null) + message.queueCount = object.queueCount | 0; + switch (object.nicType) { + default: + if (typeof object.nicType === "number") { + message.nicType = object.nicType; + break; + } + break; + case "NIC_TYPE_UNSPECIFIED": + case 0: + message.nicType = 0; + break; + case "VIRTIO_NET": + case 1: + message.nicType = 1; + break; + case "GVNIC": + case 2: + message.nicType = 2; + break; + } + if (object.networkAttachment != null) + message.networkAttachment = String(object.networkAttachment); + return message; + }; + + /** + * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {google.cloud.backupdr.v1.NetworkInterface} message NetworkInterface + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkInterface.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.accessConfigs = []; + object.ipv6AccessConfigs = []; + object.aliasIpRanges = []; + } + if (message.network != null && message.hasOwnProperty("network")) { + object.network = message.network; + if (options.oneofs) + object._network = "network"; + } + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { + object.subnetwork = message.subnetwork; + if (options.oneofs) + object._subnetwork = "subnetwork"; + } + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) { + object.ipAddress = message.ipAddress; + if (options.oneofs) + object._ipAddress = "ipAddress"; + } + if (message.ipv6Address != null && message.hasOwnProperty("ipv6Address")) { + object.ipv6Address = message.ipv6Address; + if (options.oneofs) + object._ipv6Address = "ipv6Address"; + } + if (message.internalIpv6PrefixLength != null && message.hasOwnProperty("internalIpv6PrefixLength")) { + object.internalIpv6PrefixLength = message.internalIpv6PrefixLength; + if (options.oneofs) + object._internalIpv6PrefixLength = "internalIpv6PrefixLength"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.accessConfigs && message.accessConfigs.length) { + object.accessConfigs = []; + for (var j = 0; j < message.accessConfigs.length; ++j) + object.accessConfigs[j] = $root.google.cloud.backupdr.v1.AccessConfig.toObject(message.accessConfigs[j], options); + } + if (message.ipv6AccessConfigs && message.ipv6AccessConfigs.length) { + object.ipv6AccessConfigs = []; + for (var j = 0; j < message.ipv6AccessConfigs.length; ++j) + object.ipv6AccessConfigs[j] = $root.google.cloud.backupdr.v1.AccessConfig.toObject(message.ipv6AccessConfigs[j], options); + } + if (message.aliasIpRanges && message.aliasIpRanges.length) { + object.aliasIpRanges = []; + for (var j = 0; j < message.aliasIpRanges.length; ++j) + object.aliasIpRanges[j] = $root.google.cloud.backupdr.v1.AliasIpRange.toObject(message.aliasIpRanges[j], options); + } + if (message.stackType != null && message.hasOwnProperty("stackType")) { + object.stackType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.StackType[message.stackType] === undefined ? message.stackType : $root.google.cloud.backupdr.v1.NetworkInterface.StackType[message.stackType] : message.stackType; + if (options.oneofs) + object._stackType = "stackType"; + } + if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { + object.ipv6AccessType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType[message.ipv6AccessType] === undefined ? message.ipv6AccessType : $root.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType[message.ipv6AccessType] : message.ipv6AccessType; + if (options.oneofs) + object._ipv6AccessType = "ipv6AccessType"; + } + if (message.queueCount != null && message.hasOwnProperty("queueCount")) { + object.queueCount = message.queueCount; + if (options.oneofs) + object._queueCount = "queueCount"; + } + if (message.nicType != null && message.hasOwnProperty("nicType")) { + object.nicType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.NicType[message.nicType] === undefined ? message.nicType : $root.google.cloud.backupdr.v1.NetworkInterface.NicType[message.nicType] : message.nicType; + if (options.oneofs) + object._nicType = "nicType"; + } + if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) { + object.networkAttachment = message.networkAttachment; + if (options.oneofs) + object._networkAttachment = "networkAttachment"; + } + return object; + }; + + /** + * Converts this NetworkInterface to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + * @returns {Object.} JSON object + */ + NetworkInterface.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkInterface + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkInterface.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkInterface"; + }; + + /** + * StackType enum. + * @name google.cloud.backupdr.v1.NetworkInterface.StackType + * @enum {number} + * @property {number} STACK_TYPE_UNSPECIFIED=0 STACK_TYPE_UNSPECIFIED value + * @property {number} IPV4_ONLY=1 IPV4_ONLY value + * @property {number} IPV4_IPV6=2 IPV4_IPV6 value + */ + NetworkInterface.StackType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STACK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IPV4_ONLY"] = 1; + values[valuesById[2] = "IPV4_IPV6"] = 2; + return values; + })(); + + /** + * Ipv6AccessType enum. + * @name google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType + * @enum {number} + * @property {number} UNSPECIFIED_IPV6_ACCESS_TYPE=0 UNSPECIFIED_IPV6_ACCESS_TYPE value + * @property {number} INTERNAL=1 INTERNAL value + * @property {number} EXTERNAL=2 EXTERNAL value + */ + NetworkInterface.Ipv6AccessType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED_IPV6_ACCESS_TYPE"] = 0; + values[valuesById[1] = "INTERNAL"] = 1; + values[valuesById[2] = "EXTERNAL"] = 2; + return values; + })(); + + /** + * NicType enum. + * @name google.cloud.backupdr.v1.NetworkInterface.NicType + * @enum {number} + * @property {number} NIC_TYPE_UNSPECIFIED=0 NIC_TYPE_UNSPECIFIED value + * @property {number} VIRTIO_NET=1 VIRTIO_NET value + * @property {number} GVNIC=2 GVNIC value + */ + NetworkInterface.NicType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VIRTIO_NET"] = 1; + values[valuesById[2] = "GVNIC"] = 2; + return values; + })(); + + return NetworkInterface; + })(); + + v1.NetworkPerformanceConfig = (function() { + + /** + * Properties of a NetworkPerformanceConfig. + * @memberof google.cloud.backupdr.v1 + * @interface INetworkPerformanceConfig + * @property {google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null} [totalEgressBandwidthTier] NetworkPerformanceConfig totalEgressBandwidthTier + */ + + /** + * Constructs a new NetworkPerformanceConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a NetworkPerformanceConfig. + * @implements INetworkPerformanceConfig + * @constructor + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig=} [properties] Properties to set + */ + function NetworkPerformanceConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkPerformanceConfig totalEgressBandwidthTier. + * @member {google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null|undefined} totalEgressBandwidthTier + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @instance + */ + NetworkPerformanceConfig.prototype.totalEgressBandwidthTier = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NetworkPerformanceConfig _totalEgressBandwidthTier. + * @member {"totalEgressBandwidthTier"|undefined} _totalEgressBandwidthTier + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @instance + */ + Object.defineProperty(NetworkPerformanceConfig.prototype, "_totalEgressBandwidthTier", { + get: $util.oneOfGetter($oneOfFields = ["totalEgressBandwidthTier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NetworkPerformanceConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig instance + */ + NetworkPerformanceConfig.create = function create(properties) { + return new NetworkPerformanceConfig(properties); + }; + + /** + * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPerformanceConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.totalEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "totalEgressBandwidthTier")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalEgressBandwidthTier); + return writer; + }; + + /** + * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkPerformanceConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPerformanceConfig.decode = function 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.backupdr.v1.NetworkPerformanceConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.totalEgressBandwidthTier = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkPerformanceConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkPerformanceConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkPerformanceConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { + properties._totalEgressBandwidthTier = 1; + switch (message.totalEgressBandwidthTier) { + default: + return "totalEgressBandwidthTier: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig + */ + NetworkPerformanceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.NetworkPerformanceConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.NetworkPerformanceConfig(); + switch (object.totalEgressBandwidthTier) { + default: + if (typeof object.totalEgressBandwidthTier === "number") { + message.totalEgressBandwidthTier = object.totalEgressBandwidthTier; + break; + } + break; + case "TIER_UNSPECIFIED": + case 0: + message.totalEgressBandwidthTier = 0; + break; + case "DEFAULT": + case 1: + message.totalEgressBandwidthTier = 1; + break; + case "TIER_1": + case 2: + message.totalEgressBandwidthTier = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {google.cloud.backupdr.v1.NetworkPerformanceConfig} message NetworkPerformanceConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkPerformanceConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { + object.totalEgressBandwidthTier = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] === undefined ? message.totalEgressBandwidthTier : $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] : message.totalEgressBandwidthTier; + if (options.oneofs) + object._totalEgressBandwidthTier = "totalEgressBandwidthTier"; + } + return object; + }; + + /** + * Converts this NetworkPerformanceConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkPerformanceConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkPerformanceConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkPerformanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkPerformanceConfig"; + }; + + /** + * Tier enum. + * @name google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier + * @enum {number} + * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value + * @property {number} DEFAULT=1 DEFAULT value + * @property {number} TIER_1=2 TIER_1 value + */ + NetworkPerformanceConfig.Tier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEFAULT"] = 1; + values[valuesById[2] = "TIER_1"] = 2; + return values; + })(); + + return NetworkPerformanceConfig; + })(); + + v1.AccessConfig = (function() { + + /** + * Properties of an AccessConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IAccessConfig + * @property {google.cloud.backupdr.v1.AccessConfig.AccessType|null} [type] AccessConfig type + * @property {string|null} [name] AccessConfig name + * @property {string|null} [externalIp] AccessConfig externalIp + * @property {string|null} [externalIpv6] AccessConfig externalIpv6 + * @property {number|null} [externalIpv6PrefixLength] AccessConfig externalIpv6PrefixLength + * @property {boolean|null} [setPublicPtr] AccessConfig setPublicPtr + * @property {string|null} [publicPtrDomainName] AccessConfig publicPtrDomainName + * @property {google.cloud.backupdr.v1.AccessConfig.NetworkTier|null} [networkTier] AccessConfig networkTier + */ + + /** + * Constructs a new AccessConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AccessConfig. + * @implements IAccessConfig + * @constructor + * @param {google.cloud.backupdr.v1.IAccessConfig=} [properties] Properties to set + */ + function AccessConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessConfig type. + * @member {google.cloud.backupdr.v1.AccessConfig.AccessType|null|undefined} type + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.type = null; + + /** + * AccessConfig name. + * @member {string|null|undefined} name + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.name = null; + + /** + * AccessConfig externalIp. + * @member {string|null|undefined} externalIp + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.externalIp = null; + + /** + * AccessConfig externalIpv6. + * @member {string|null|undefined} externalIpv6 + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.externalIpv6 = null; + + /** + * AccessConfig externalIpv6PrefixLength. + * @member {number|null|undefined} externalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.externalIpv6PrefixLength = null; + + /** + * AccessConfig setPublicPtr. + * @member {boolean|null|undefined} setPublicPtr + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.setPublicPtr = null; + + /** + * AccessConfig publicPtrDomainName. + * @member {string|null|undefined} publicPtrDomainName + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.publicPtrDomainName = null; + + /** + * AccessConfig networkTier. + * @member {google.cloud.backupdr.v1.AccessConfig.NetworkTier|null|undefined} networkTier + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.networkTier = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AccessConfig _type. + * @member {"type"|undefined} _type + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _name. + * @member {"name"|undefined} _name + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _externalIp. + * @member {"externalIp"|undefined} _externalIp + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_externalIp", { + get: $util.oneOfGetter($oneOfFields = ["externalIp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _externalIpv6. + * @member {"externalIpv6"|undefined} _externalIpv6 + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_externalIpv6", { + get: $util.oneOfGetter($oneOfFields = ["externalIpv6"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _externalIpv6PrefixLength. + * @member {"externalIpv6PrefixLength"|undefined} _externalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_externalIpv6PrefixLength", { + get: $util.oneOfGetter($oneOfFields = ["externalIpv6PrefixLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _setPublicPtr. + * @member {"setPublicPtr"|undefined} _setPublicPtr + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_setPublicPtr", { + get: $util.oneOfGetter($oneOfFields = ["setPublicPtr"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _publicPtrDomainName. + * @member {"publicPtrDomainName"|undefined} _publicPtrDomainName + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_publicPtrDomainName", { + get: $util.oneOfGetter($oneOfFields = ["publicPtrDomainName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _networkTier. + * @member {"networkTier"|undefined} _networkTier + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_networkTier", { + get: $util.oneOfGetter($oneOfFields = ["networkTier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AccessConfig instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {google.cloud.backupdr.v1.IAccessConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig instance + */ + AccessConfig.create = function create(properties) { + return new AccessConfig(properties); + }; + + /** + * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {google.cloud.backupdr.v1.IAccessConfig} message AccessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.externalIp); + if (message.externalIpv6 != null && Object.hasOwnProperty.call(message, "externalIpv6")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.externalIpv6); + if (message.externalIpv6PrefixLength != null && Object.hasOwnProperty.call(message, "externalIpv6PrefixLength")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.externalIpv6PrefixLength); + if (message.setPublicPtr != null && Object.hasOwnProperty.call(message, "setPublicPtr")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.setPublicPtr); + if (message.publicPtrDomainName != null && Object.hasOwnProperty.call(message, "publicPtrDomainName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.publicPtrDomainName); + if (message.networkTier != null && Object.hasOwnProperty.call(message, "networkTier")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.networkTier); + return writer; + }; + + /** + * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {google.cloud.backupdr.v1.IAccessConfig} message AccessConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessConfig.decode = function 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.backupdr.v1.AccessConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + message.externalIp = reader.string(); + break; + } + case 4: { + message.externalIpv6 = reader.string(); + break; + } + case 5: { + message.externalIpv6PrefixLength = reader.int32(); + break; + } + case 6: { + message.setPublicPtr = reader.bool(); + break; + } + case 7: { + message.publicPtrDomainName = reader.string(); + break; + } + case 8: { + message.networkTier = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessConfig message. + * @function verify + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.externalIp != null && message.hasOwnProperty("externalIp")) { + properties._externalIp = 1; + if (!$util.isString(message.externalIp)) + return "externalIp: string expected"; + } + if (message.externalIpv6 != null && message.hasOwnProperty("externalIpv6")) { + properties._externalIpv6 = 1; + if (!$util.isString(message.externalIpv6)) + return "externalIpv6: string expected"; + } + if (message.externalIpv6PrefixLength != null && message.hasOwnProperty("externalIpv6PrefixLength")) { + properties._externalIpv6PrefixLength = 1; + if (!$util.isInteger(message.externalIpv6PrefixLength)) + return "externalIpv6PrefixLength: integer expected"; + } + if (message.setPublicPtr != null && message.hasOwnProperty("setPublicPtr")) { + properties._setPublicPtr = 1; + if (typeof message.setPublicPtr !== "boolean") + return "setPublicPtr: boolean expected"; + } + if (message.publicPtrDomainName != null && message.hasOwnProperty("publicPtrDomainName")) { + properties._publicPtrDomainName = 1; + if (!$util.isString(message.publicPtrDomainName)) + return "publicPtrDomainName: string expected"; + } + if (message.networkTier != null && message.hasOwnProperty("networkTier")) { + properties._networkTier = 1; + switch (message.networkTier) { + default: + return "networkTier: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates an AccessConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig + */ + AccessConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AccessConfig) + return object; + var message = new $root.google.cloud.backupdr.v1.AccessConfig(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "ACCESS_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ONE_TO_ONE_NAT": + case 1: + message.type = 1; + break; + case "DIRECT_IPV6": + case 2: + message.type = 2; + break; + } + if (object.name != null) + message.name = String(object.name); + if (object.externalIp != null) + message.externalIp = String(object.externalIp); + if (object.externalIpv6 != null) + message.externalIpv6 = String(object.externalIpv6); + if (object.externalIpv6PrefixLength != null) + message.externalIpv6PrefixLength = object.externalIpv6PrefixLength | 0; + if (object.setPublicPtr != null) + message.setPublicPtr = Boolean(object.setPublicPtr); + if (object.publicPtrDomainName != null) + message.publicPtrDomainName = String(object.publicPtrDomainName); + switch (object.networkTier) { + default: + if (typeof object.networkTier === "number") { + message.networkTier = object.networkTier; + break; + } + break; + case "NETWORK_TIER_UNSPECIFIED": + case 0: + message.networkTier = 0; + break; + case "PREMIUM": + case 1: + message.networkTier = 1; + break; + case "STANDARD": + case 2: + message.networkTier = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {google.cloud.backupdr.v1.AccessConfig} message AccessConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.externalIp != null && message.hasOwnProperty("externalIp")) { + object.externalIp = message.externalIp; + if (options.oneofs) + object._externalIp = "externalIp"; + } + if (message.externalIpv6 != null && message.hasOwnProperty("externalIpv6")) { + object.externalIpv6 = message.externalIpv6; + if (options.oneofs) + object._externalIpv6 = "externalIpv6"; + } + if (message.externalIpv6PrefixLength != null && message.hasOwnProperty("externalIpv6PrefixLength")) { + object.externalIpv6PrefixLength = message.externalIpv6PrefixLength; + if (options.oneofs) + object._externalIpv6PrefixLength = "externalIpv6PrefixLength"; + } + if (message.setPublicPtr != null && message.hasOwnProperty("setPublicPtr")) { + object.setPublicPtr = message.setPublicPtr; + if (options.oneofs) + object._setPublicPtr = "setPublicPtr"; + } + if (message.publicPtrDomainName != null && message.hasOwnProperty("publicPtrDomainName")) { + object.publicPtrDomainName = message.publicPtrDomainName; + if (options.oneofs) + object._publicPtrDomainName = "publicPtrDomainName"; + } + if (message.networkTier != null && message.hasOwnProperty("networkTier")) { + object.networkTier = options.enums === String ? $root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier] === undefined ? message.networkTier : $root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier] : message.networkTier; + if (options.oneofs) + object._networkTier = "networkTier"; + } + return object; + }; + + /** + * Converts this AccessConfig to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + * @returns {Object.} JSON object + */ + AccessConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessConfig + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AccessConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AccessConfig"; + }; + + /** + * AccessType enum. + * @name google.cloud.backupdr.v1.AccessConfig.AccessType + * @enum {number} + * @property {number} ACCESS_TYPE_UNSPECIFIED=0 ACCESS_TYPE_UNSPECIFIED value + * @property {number} ONE_TO_ONE_NAT=1 ONE_TO_ONE_NAT value + * @property {number} DIRECT_IPV6=2 DIRECT_IPV6 value + */ + AccessConfig.AccessType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ONE_TO_ONE_NAT"] = 1; + values[valuesById[2] = "DIRECT_IPV6"] = 2; + return values; + })(); + + /** + * NetworkTier enum. + * @name google.cloud.backupdr.v1.AccessConfig.NetworkTier + * @enum {number} + * @property {number} NETWORK_TIER_UNSPECIFIED=0 NETWORK_TIER_UNSPECIFIED value + * @property {number} PREMIUM=1 PREMIUM value + * @property {number} STANDARD=2 STANDARD value + */ + AccessConfig.NetworkTier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NETWORK_TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "PREMIUM"] = 1; + values[valuesById[2] = "STANDARD"] = 2; + return values; + })(); + + return AccessConfig; + })(); + + v1.AliasIpRange = (function() { + + /** + * Properties of an AliasIpRange. + * @memberof google.cloud.backupdr.v1 + * @interface IAliasIpRange + * @property {string|null} [ipCidrRange] AliasIpRange ipCidrRange + * @property {string|null} [subnetworkRangeName] AliasIpRange subnetworkRangeName + */ + + /** + * Constructs a new AliasIpRange. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AliasIpRange. + * @implements IAliasIpRange + * @constructor + * @param {google.cloud.backupdr.v1.IAliasIpRange=} [properties] Properties to set + */ + function AliasIpRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AliasIpRange ipCidrRange. + * @member {string|null|undefined} ipCidrRange + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + */ + AliasIpRange.prototype.ipCidrRange = null; + + /** + * AliasIpRange subnetworkRangeName. + * @member {string|null|undefined} subnetworkRangeName + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + */ + AliasIpRange.prototype.subnetworkRangeName = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AliasIpRange _ipCidrRange. + * @member {"ipCidrRange"|undefined} _ipCidrRange + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + */ + Object.defineProperty(AliasIpRange.prototype, "_ipCidrRange", { + get: $util.oneOfGetter($oneOfFields = ["ipCidrRange"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AliasIpRange _subnetworkRangeName. + * @member {"subnetworkRangeName"|undefined} _subnetworkRangeName + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + */ + Object.defineProperty(AliasIpRange.prototype, "_subnetworkRangeName", { + get: $util.oneOfGetter($oneOfFields = ["subnetworkRangeName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AliasIpRange instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {google.cloud.backupdr.v1.IAliasIpRange=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange instance + */ + AliasIpRange.create = function create(properties) { + return new AliasIpRange(properties); + }; + + /** + * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {google.cloud.backupdr.v1.IAliasIpRange} message AliasIpRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AliasIpRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ipCidrRange != null && Object.hasOwnProperty.call(message, "ipCidrRange")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipCidrRange); + if (message.subnetworkRangeName != null && Object.hasOwnProperty.call(message, "subnetworkRangeName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetworkRangeName); + return writer; + }; + + /** + * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {google.cloud.backupdr.v1.IAliasIpRange} message AliasIpRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AliasIpRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AliasIpRange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AliasIpRange.decode = function 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.backupdr.v1.AliasIpRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ipCidrRange = reader.string(); + break; + } + case 2: { + message.subnetworkRangeName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AliasIpRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AliasIpRange message. + * @function verify + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AliasIpRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) { + properties._ipCidrRange = 1; + if (!$util.isString(message.ipCidrRange)) + return "ipCidrRange: string expected"; + } + if (message.subnetworkRangeName != null && message.hasOwnProperty("subnetworkRangeName")) { + properties._subnetworkRangeName = 1; + if (!$util.isString(message.subnetworkRangeName)) + return "subnetworkRangeName: string expected"; + } + return null; + }; + + /** + * Creates an AliasIpRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange + */ + AliasIpRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AliasIpRange) + return object; + var message = new $root.google.cloud.backupdr.v1.AliasIpRange(); + if (object.ipCidrRange != null) + message.ipCidrRange = String(object.ipCidrRange); + if (object.subnetworkRangeName != null) + message.subnetworkRangeName = String(object.subnetworkRangeName); + return message; + }; + + /** + * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {google.cloud.backupdr.v1.AliasIpRange} message AliasIpRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AliasIpRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) { + object.ipCidrRange = message.ipCidrRange; + if (options.oneofs) + object._ipCidrRange = "ipCidrRange"; + } + if (message.subnetworkRangeName != null && message.hasOwnProperty("subnetworkRangeName")) { + object.subnetworkRangeName = message.subnetworkRangeName; + if (options.oneofs) + object._subnetworkRangeName = "subnetworkRangeName"; + } + return object; + }; + + /** + * Converts this AliasIpRange to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + * @returns {Object.} JSON object + */ + AliasIpRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AliasIpRange + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AliasIpRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AliasIpRange"; + }; + + return AliasIpRange; + })(); + + v1.InstanceParams = (function() { + + /** + * Properties of an InstanceParams. + * @memberof google.cloud.backupdr.v1 + * @interface IInstanceParams + * @property {Object.|null} [resourceManagerTags] InstanceParams resourceManagerTags + */ + + /** + * Constructs a new InstanceParams. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an InstanceParams. + * @implements IInstanceParams + * @constructor + * @param {google.cloud.backupdr.v1.IInstanceParams=} [properties] Properties to set + */ + function InstanceParams(properties) { + this.resourceManagerTags = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstanceParams resourceManagerTags. + * @member {Object.} resourceManagerTags + * @memberof google.cloud.backupdr.v1.InstanceParams + * @instance + */ + InstanceParams.prototype.resourceManagerTags = $util.emptyObject; + + /** + * Creates a new InstanceParams instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {google.cloud.backupdr.v1.IInstanceParams=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams instance + */ + InstanceParams.create = function create(properties) { + return new InstanceParams(properties); + }; + + /** + * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {google.cloud.backupdr.v1.IInstanceParams} message InstanceParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) + for (var keys = Object.keys(message.resourceManagerTags), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceManagerTags[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {google.cloud.backupdr.v1.IInstanceParams} message InstanceParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstanceParams message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceParams.decode = function 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.backupdr.v1.InstanceParams(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (message.resourceManagerTags === $util.emptyObject) + message.resourceManagerTags = {}; + 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.resourceManagerTags[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstanceParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstanceParams message. + * @function verify + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstanceParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { + if (!$util.isObject(message.resourceManagerTags)) + return "resourceManagerTags: object expected"; + var key = Object.keys(message.resourceManagerTags); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.resourceManagerTags[key[i]])) + return "resourceManagerTags: string{k:string} expected"; + } + return null; + }; + + /** + * Creates an InstanceParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams + */ + InstanceParams.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.InstanceParams) + return object; + var message = new $root.google.cloud.backupdr.v1.InstanceParams(); + if (object.resourceManagerTags) { + if (typeof object.resourceManagerTags !== "object") + throw TypeError(".google.cloud.backupdr.v1.InstanceParams.resourceManagerTags: object expected"); + message.resourceManagerTags = {}; + for (var keys = Object.keys(object.resourceManagerTags), i = 0; i < keys.length; ++i) + message.resourceManagerTags[keys[i]] = String(object.resourceManagerTags[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {google.cloud.backupdr.v1.InstanceParams} message InstanceParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstanceParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.resourceManagerTags = {}; + var keys2; + if (message.resourceManagerTags && (keys2 = Object.keys(message.resourceManagerTags)).length) { + object.resourceManagerTags = {}; + for (var j = 0; j < keys2.length; ++j) + object.resourceManagerTags[keys2[j]] = message.resourceManagerTags[keys2[j]]; + } + return object; + }; + + /** + * Converts this InstanceParams to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.InstanceParams + * @instance + * @returns {Object.} JSON object + */ + InstanceParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InstanceParams + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstanceParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.InstanceParams"; + }; + + return InstanceParams; + })(); + + v1.AllocationAffinity = (function() { + + /** + * Properties of an AllocationAffinity. + * @memberof google.cloud.backupdr.v1 + * @interface IAllocationAffinity + * @property {google.cloud.backupdr.v1.AllocationAffinity.Type|null} [consumeAllocationType] AllocationAffinity consumeAllocationType + * @property {string|null} [key] AllocationAffinity key + * @property {Array.|null} [values] AllocationAffinity values + */ + + /** + * Constructs a new AllocationAffinity. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AllocationAffinity. + * @implements IAllocationAffinity + * @constructor + * @param {google.cloud.backupdr.v1.IAllocationAffinity=} [properties] Properties to set + */ + function AllocationAffinity(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AllocationAffinity consumeAllocationType. + * @member {google.cloud.backupdr.v1.AllocationAffinity.Type|null|undefined} consumeAllocationType + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + AllocationAffinity.prototype.consumeAllocationType = null; + + /** + * AllocationAffinity key. + * @member {string|null|undefined} key + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + AllocationAffinity.prototype.key = null; + + /** + * AllocationAffinity values. + * @member {Array.} values + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + AllocationAffinity.prototype.values = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AllocationAffinity _consumeAllocationType. + * @member {"consumeAllocationType"|undefined} _consumeAllocationType + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + Object.defineProperty(AllocationAffinity.prototype, "_consumeAllocationType", { + get: $util.oneOfGetter($oneOfFields = ["consumeAllocationType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AllocationAffinity _key. + * @member {"key"|undefined} _key + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + */ + Object.defineProperty(AllocationAffinity.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AllocationAffinity instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {google.cloud.backupdr.v1.IAllocationAffinity=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity instance + */ + AllocationAffinity.create = function create(properties) { + return new AllocationAffinity(properties); + }; + + /** + * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {google.cloud.backupdr.v1.IAllocationAffinity} message AllocationAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllocationAffinity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consumeAllocationType != null && Object.hasOwnProperty.call(message, "consumeAllocationType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumeAllocationType); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {google.cloud.backupdr.v1.IAllocationAffinity} message AllocationAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllocationAffinity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllocationAffinity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllocationAffinity.decode = function 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.backupdr.v1.AllocationAffinity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.consumeAllocationType = reader.int32(); + break; + } + case 2: { + message.key = reader.string(); + break; + } + case 3: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AllocationAffinity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllocationAffinity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllocationAffinity message. + * @function verify + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllocationAffinity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.consumeAllocationType != null && message.hasOwnProperty("consumeAllocationType")) { + properties._consumeAllocationType = 1; + switch (message.consumeAllocationType) { + default: + return "consumeAllocationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; + } + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates an AllocationAffinity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity + */ + AllocationAffinity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AllocationAffinity) + return object; + var message = new $root.google.cloud.backupdr.v1.AllocationAffinity(); + switch (object.consumeAllocationType) { + default: + if (typeof object.consumeAllocationType === "number") { + message.consumeAllocationType = object.consumeAllocationType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.consumeAllocationType = 0; + break; + case "NO_RESERVATION": + case 1: + message.consumeAllocationType = 1; + break; + case "ANY_RESERVATION": + case 2: + message.consumeAllocationType = 2; + break; + case "SPECIFIC_RESERVATION": + case 3: + message.consumeAllocationType = 3; + break; + } + if (object.key != null) + message.key = String(object.key); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.backupdr.v1.AllocationAffinity.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from an AllocationAffinity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {google.cloud.backupdr.v1.AllocationAffinity} message AllocationAffinity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllocationAffinity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.consumeAllocationType != null && message.hasOwnProperty("consumeAllocationType")) { + object.consumeAllocationType = options.enums === String ? $root.google.cloud.backupdr.v1.AllocationAffinity.Type[message.consumeAllocationType] === undefined ? message.consumeAllocationType : $root.google.cloud.backupdr.v1.AllocationAffinity.Type[message.consumeAllocationType] : message.consumeAllocationType; + if (options.oneofs) + object._consumeAllocationType = "consumeAllocationType"; + } + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) + object._key = "key"; + } + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + return object; + }; + + /** + * Converts this AllocationAffinity to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @instance + * @returns {Object.} JSON object + */ + AllocationAffinity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AllocationAffinity + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AllocationAffinity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllocationAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AllocationAffinity"; + }; + + /** + * Type enum. + * @name google.cloud.backupdr.v1.AllocationAffinity.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} NO_RESERVATION=1 NO_RESERVATION value + * @property {number} ANY_RESERVATION=2 ANY_RESERVATION value + * @property {number} SPECIFIC_RESERVATION=3 SPECIFIC_RESERVATION value + */ + AllocationAffinity.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NO_RESERVATION"] = 1; + values[valuesById[2] = "ANY_RESERVATION"] = 2; + values[valuesById[3] = "SPECIFIC_RESERVATION"] = 3; + return values; + })(); + + return AllocationAffinity; + })(); + + v1.Scheduling = (function() { + + /** + * Properties of a Scheduling. + * @memberof google.cloud.backupdr.v1 + * @interface IScheduling + * @property {google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null} [onHostMaintenance] Scheduling onHostMaintenance + * @property {boolean|null} [automaticRestart] Scheduling automaticRestart + * @property {boolean|null} [preemptible] Scheduling preemptible + * @property {Array.|null} [nodeAffinities] Scheduling nodeAffinities + * @property {number|null} [minNodeCpus] Scheduling minNodeCpus + * @property {google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null} [provisioningModel] Scheduling provisioningModel + * @property {google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null} [instanceTerminationAction] Scheduling instanceTerminationAction + * @property {google.cloud.backupdr.v1.ISchedulingDuration|null} [localSsdRecoveryTimeout] Scheduling localSsdRecoveryTimeout + */ + + /** + * Constructs a new Scheduling. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Scheduling. + * @implements IScheduling + * @constructor + * @param {google.cloud.backupdr.v1.IScheduling=} [properties] Properties to set + */ + function Scheduling(properties) { + this.nodeAffinities = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Scheduling onHostMaintenance. + * @member {google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null|undefined} onHostMaintenance + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.onHostMaintenance = null; + + /** + * Scheduling automaticRestart. + * @member {boolean|null|undefined} automaticRestart + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.automaticRestart = null; + + /** + * Scheduling preemptible. + * @member {boolean|null|undefined} preemptible + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.preemptible = null; + + /** + * Scheduling nodeAffinities. + * @member {Array.} nodeAffinities + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.nodeAffinities = $util.emptyArray; + + /** + * Scheduling minNodeCpus. + * @member {number|null|undefined} minNodeCpus + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.minNodeCpus = null; + + /** + * Scheduling provisioningModel. + * @member {google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null|undefined} provisioningModel + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.provisioningModel = null; + + /** + * Scheduling instanceTerminationAction. + * @member {google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null|undefined} instanceTerminationAction + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.instanceTerminationAction = null; + + /** + * Scheduling localSsdRecoveryTimeout. + * @member {google.cloud.backupdr.v1.ISchedulingDuration|null|undefined} localSsdRecoveryTimeout + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.localSsdRecoveryTimeout = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Scheduling _onHostMaintenance. + * @member {"onHostMaintenance"|undefined} _onHostMaintenance + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_onHostMaintenance", { + get: $util.oneOfGetter($oneOfFields = ["onHostMaintenance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _automaticRestart. + * @member {"automaticRestart"|undefined} _automaticRestart + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_automaticRestart", { + get: $util.oneOfGetter($oneOfFields = ["automaticRestart"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _preemptible. + * @member {"preemptible"|undefined} _preemptible + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_preemptible", { + get: $util.oneOfGetter($oneOfFields = ["preemptible"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _minNodeCpus. + * @member {"minNodeCpus"|undefined} _minNodeCpus + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_minNodeCpus", { + get: $util.oneOfGetter($oneOfFields = ["minNodeCpus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _provisioningModel. + * @member {"provisioningModel"|undefined} _provisioningModel + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_provisioningModel", { + get: $util.oneOfGetter($oneOfFields = ["provisioningModel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _instanceTerminationAction. + * @member {"instanceTerminationAction"|undefined} _instanceTerminationAction + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_instanceTerminationAction", { + get: $util.oneOfGetter($oneOfFields = ["instanceTerminationAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _localSsdRecoveryTimeout. + * @member {"localSsdRecoveryTimeout"|undefined} _localSsdRecoveryTimeout + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_localSsdRecoveryTimeout", { + get: $util.oneOfGetter($oneOfFields = ["localSsdRecoveryTimeout"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Scheduling instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {google.cloud.backupdr.v1.IScheduling=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling instance + */ + Scheduling.create = function create(properties) { + return new Scheduling(properties); + }; + + /** + * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {google.cloud.backupdr.v1.IScheduling} message Scheduling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Scheduling.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.onHostMaintenance != null && Object.hasOwnProperty.call(message, "onHostMaintenance")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.onHostMaintenance); + if (message.automaticRestart != null && Object.hasOwnProperty.call(message, "automaticRestart")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.automaticRestart); + if (message.preemptible != null && Object.hasOwnProperty.call(message, "preemptible")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preemptible); + if (message.nodeAffinities != null && message.nodeAffinities.length) + for (var i = 0; i < message.nodeAffinities.length; ++i) + $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.encode(message.nodeAffinities[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.minNodeCpus != null && Object.hasOwnProperty.call(message, "minNodeCpus")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.minNodeCpus); + if (message.provisioningModel != null && Object.hasOwnProperty.call(message, "provisioningModel")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.provisioningModel); + if (message.instanceTerminationAction != null && Object.hasOwnProperty.call(message, "instanceTerminationAction")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.instanceTerminationAction); + if (message.localSsdRecoveryTimeout != null && Object.hasOwnProperty.call(message, "localSsdRecoveryTimeout")) + $root.google.cloud.backupdr.v1.SchedulingDuration.encode(message.localSsdRecoveryTimeout, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {google.cloud.backupdr.v1.IScheduling} message Scheduling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Scheduling.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Scheduling message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Scheduling.decode = function 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.backupdr.v1.Scheduling(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.onHostMaintenance = reader.int32(); + break; + } + case 2: { + message.automaticRestart = reader.bool(); + break; + } + case 3: { + message.preemptible = reader.bool(); + break; + } + case 4: { + if (!(message.nodeAffinities && message.nodeAffinities.length)) + message.nodeAffinities = []; + message.nodeAffinities.push($root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.decode(reader, reader.uint32())); + break; + } + case 5: { + message.minNodeCpus = reader.int32(); + break; + } + case 6: { + message.provisioningModel = reader.int32(); + break; + } + case 7: { + message.instanceTerminationAction = reader.int32(); + break; + } + case 10: { + message.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Scheduling message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Scheduling.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Scheduling message. + * @function verify + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Scheduling.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.onHostMaintenance != null && message.hasOwnProperty("onHostMaintenance")) { + properties._onHostMaintenance = 1; + switch (message.onHostMaintenance) { + default: + return "onHostMaintenance: enum value expected"; + case 0: + case 1: + case 1000: + break; + } + } + if (message.automaticRestart != null && message.hasOwnProperty("automaticRestart")) { + properties._automaticRestart = 1; + if (typeof message.automaticRestart !== "boolean") + return "automaticRestart: boolean expected"; + } + if (message.preemptible != null && message.hasOwnProperty("preemptible")) { + properties._preemptible = 1; + if (typeof message.preemptible !== "boolean") + return "preemptible: boolean expected"; + } + if (message.nodeAffinities != null && message.hasOwnProperty("nodeAffinities")) { + if (!Array.isArray(message.nodeAffinities)) + return "nodeAffinities: array expected"; + for (var i = 0; i < message.nodeAffinities.length; ++i) { + var error = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify(message.nodeAffinities[i]); + if (error) + return "nodeAffinities." + error; + } + } + if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { + properties._minNodeCpus = 1; + if (!$util.isInteger(message.minNodeCpus)) + return "minNodeCpus: integer expected"; + } + if (message.provisioningModel != null && message.hasOwnProperty("provisioningModel")) { + properties._provisioningModel = 1; + switch (message.provisioningModel) { + default: + return "provisioningModel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.instanceTerminationAction != null && message.hasOwnProperty("instanceTerminationAction")) { + properties._instanceTerminationAction = 1; + switch (message.instanceTerminationAction) { + default: + return "instanceTerminationAction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.localSsdRecoveryTimeout != null && message.hasOwnProperty("localSsdRecoveryTimeout")) { + properties._localSsdRecoveryTimeout = 1; + { + var error = $root.google.cloud.backupdr.v1.SchedulingDuration.verify(message.localSsdRecoveryTimeout); + if (error) + return "localSsdRecoveryTimeout." + error; + } + } + return null; + }; + + /** + * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling + */ + Scheduling.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Scheduling) + return object; + var message = new $root.google.cloud.backupdr.v1.Scheduling(); + switch (object.onHostMaintenance) { + default: + if (typeof object.onHostMaintenance === "number") { + message.onHostMaintenance = object.onHostMaintenance; + break; + } + break; + case "ON_HOST_MAINTENANCE_UNSPECIFIED": + case 0: + message.onHostMaintenance = 0; + break; + case "TERMINATE": + case 1: + message.onHostMaintenance = 1; + break; + case "MIGRATE": + case 1000: + message.onHostMaintenance = 1000; + break; + } + if (object.automaticRestart != null) + message.automaticRestart = Boolean(object.automaticRestart); + if (object.preemptible != null) + message.preemptible = Boolean(object.preemptible); + if (object.nodeAffinities) { + if (!Array.isArray(object.nodeAffinities)) + throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: array expected"); + message.nodeAffinities = []; + for (var i = 0; i < object.nodeAffinities.length; ++i) { + if (typeof object.nodeAffinities[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: object expected"); + message.nodeAffinities[i] = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.fromObject(object.nodeAffinities[i]); + } + } + if (object.minNodeCpus != null) + message.minNodeCpus = object.minNodeCpus | 0; + switch (object.provisioningModel) { + default: + if (typeof object.provisioningModel === "number") { + message.provisioningModel = object.provisioningModel; + break; + } + break; + case "PROVISIONING_MODEL_UNSPECIFIED": + case 0: + message.provisioningModel = 0; + break; + case "STANDARD": + case 1: + message.provisioningModel = 1; + break; + case "SPOT": + case 2: + message.provisioningModel = 2; + break; + } + switch (object.instanceTerminationAction) { + default: + if (typeof object.instanceTerminationAction === "number") { + message.instanceTerminationAction = object.instanceTerminationAction; + break; + } + break; + case "INSTANCE_TERMINATION_ACTION_UNSPECIFIED": + case 0: + message.instanceTerminationAction = 0; + break; + case "DELETE": + case 1: + message.instanceTerminationAction = 1; + break; + case "STOP": + case 2: + message.instanceTerminationAction = 2; + break; + } + if (object.localSsdRecoveryTimeout != null) { + if (typeof object.localSsdRecoveryTimeout !== "object") + throw TypeError(".google.cloud.backupdr.v1.Scheduling.localSsdRecoveryTimeout: object expected"); + message.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.fromObject(object.localSsdRecoveryTimeout); + } + return message; + }; + + /** + * Creates a plain object from a Scheduling message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {google.cloud.backupdr.v1.Scheduling} message Scheduling + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Scheduling.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.nodeAffinities = []; + if (message.onHostMaintenance != null && message.hasOwnProperty("onHostMaintenance")) { + object.onHostMaintenance = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.OnHostMaintenance[message.onHostMaintenance] === undefined ? message.onHostMaintenance : $root.google.cloud.backupdr.v1.Scheduling.OnHostMaintenance[message.onHostMaintenance] : message.onHostMaintenance; + if (options.oneofs) + object._onHostMaintenance = "onHostMaintenance"; + } + if (message.automaticRestart != null && message.hasOwnProperty("automaticRestart")) { + object.automaticRestart = message.automaticRestart; + if (options.oneofs) + object._automaticRestart = "automaticRestart"; + } + if (message.preemptible != null && message.hasOwnProperty("preemptible")) { + object.preemptible = message.preemptible; + if (options.oneofs) + object._preemptible = "preemptible"; + } + if (message.nodeAffinities && message.nodeAffinities.length) { + object.nodeAffinities = []; + for (var j = 0; j < message.nodeAffinities.length; ++j) + object.nodeAffinities[j] = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.toObject(message.nodeAffinities[j], options); + } + if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { + object.minNodeCpus = message.minNodeCpus; + if (options.oneofs) + object._minNodeCpus = "minNodeCpus"; + } + if (message.provisioningModel != null && message.hasOwnProperty("provisioningModel")) { + object.provisioningModel = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.ProvisioningModel[message.provisioningModel] === undefined ? message.provisioningModel : $root.google.cloud.backupdr.v1.Scheduling.ProvisioningModel[message.provisioningModel] : message.provisioningModel; + if (options.oneofs) + object._provisioningModel = "provisioningModel"; + } + if (message.instanceTerminationAction != null && message.hasOwnProperty("instanceTerminationAction")) { + object.instanceTerminationAction = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction[message.instanceTerminationAction] === undefined ? message.instanceTerminationAction : $root.google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction[message.instanceTerminationAction] : message.instanceTerminationAction; + if (options.oneofs) + object._instanceTerminationAction = "instanceTerminationAction"; + } + if (message.localSsdRecoveryTimeout != null && message.hasOwnProperty("localSsdRecoveryTimeout")) { + object.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.toObject(message.localSsdRecoveryTimeout, options); + if (options.oneofs) + object._localSsdRecoveryTimeout = "localSsdRecoveryTimeout"; + } + return object; + }; + + /** + * Converts this Scheduling to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + * @returns {Object.} JSON object + */ + Scheduling.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Scheduling + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Scheduling + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Scheduling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Scheduling"; + }; + + /** + * OnHostMaintenance enum. + * @name google.cloud.backupdr.v1.Scheduling.OnHostMaintenance + * @enum {number} + * @property {number} ON_HOST_MAINTENANCE_UNSPECIFIED=0 ON_HOST_MAINTENANCE_UNSPECIFIED value + * @property {number} TERMINATE=1 TERMINATE value + * @property {number} MIGRATE=1000 MIGRATE value + */ + Scheduling.OnHostMaintenance = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ON_HOST_MAINTENANCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TERMINATE"] = 1; + values[valuesById[1000] = "MIGRATE"] = 1000; + return values; + })(); + + Scheduling.NodeAffinity = (function() { + + /** + * Properties of a NodeAffinity. + * @memberof google.cloud.backupdr.v1.Scheduling + * @interface INodeAffinity + * @property {string|null} [key] NodeAffinity key + * @property {google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null} [operator] NodeAffinity operator + * @property {Array.|null} [values] NodeAffinity values + */ + + /** + * Constructs a new NodeAffinity. + * @memberof google.cloud.backupdr.v1.Scheduling + * @classdesc Represents a NodeAffinity. + * @implements INodeAffinity + * @constructor + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity=} [properties] Properties to set + */ + function NodeAffinity(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeAffinity key. + * @member {string|null|undefined} key + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + NodeAffinity.prototype.key = null; + + /** + * NodeAffinity operator. + * @member {google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null|undefined} operator + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + NodeAffinity.prototype.operator = null; + + /** + * NodeAffinity values. + * @member {Array.} values + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + NodeAffinity.prototype.values = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NodeAffinity _key. + * @member {"key"|undefined} _key + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + Object.defineProperty(NodeAffinity.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NodeAffinity _operator. + * @member {"operator"|undefined} _operator + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + Object.defineProperty(NodeAffinity.prototype, "_operator", { + get: $util.oneOfGetter($oneOfFields = ["operator"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NodeAffinity instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity instance + */ + NodeAffinity.create = function create(properties) { + return new NodeAffinity(properties); + }; + + /** + * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity} message NodeAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeAffinity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.operator != null && Object.hasOwnProperty.call(message, "operator")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operator); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity} message NodeAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeAffinity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeAffinity.decode = function 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.backupdr.v1.Scheduling.NodeAffinity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.operator = reader.int32(); + break; + } + case 3: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeAffinity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeAffinity message. + * @function verify + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeAffinity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; + } + if (message.operator != null && message.hasOwnProperty("operator")) { + properties._operator = 1; + switch (message.operator) { + default: + return "operator: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity + */ + NodeAffinity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity) + return object; + var message = new $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity(); + if (object.key != null) + message.key = String(object.key); + switch (object.operator) { + default: + if (typeof object.operator === "number") { + message.operator = object.operator; + break; + } + break; + case "OPERATOR_UNSPECIFIED": + case 0: + message.operator = 0; + break; + case "IN": + case 1: + message.operator = 1; + break; + case "NOT_IN": + case 2: + message.operator = 2; + break; + } + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.backupdr.v1.Scheduling.NodeAffinity.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.NodeAffinity} message NodeAffinity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeAffinity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) + object._key = "key"; + } + if (message.operator != null && message.hasOwnProperty("operator")) { + object.operator = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator[message.operator] === undefined ? message.operator : $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator[message.operator] : message.operator; + if (options.oneofs) + object._operator = "operator"; + } + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + return object; + }; + + /** + * Converts this NodeAffinity to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + * @returns {Object.} JSON object + */ + NodeAffinity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeAffinity + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Scheduling.NodeAffinity"; + }; + + /** + * Operator enum. + * @name google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator + * @enum {number} + * @property {number} OPERATOR_UNSPECIFIED=0 OPERATOR_UNSPECIFIED value + * @property {number} IN=1 IN value + * @property {number} NOT_IN=2 NOT_IN value + */ + NodeAffinity.Operator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN"] = 1; + values[valuesById[2] = "NOT_IN"] = 2; + return values; + })(); + + return NodeAffinity; + })(); + + /** + * ProvisioningModel enum. + * @name google.cloud.backupdr.v1.Scheduling.ProvisioningModel + * @enum {number} + * @property {number} PROVISIONING_MODEL_UNSPECIFIED=0 PROVISIONING_MODEL_UNSPECIFIED value + * @property {number} STANDARD=1 STANDARD value + * @property {number} SPOT=2 SPOT value + */ + Scheduling.ProvisioningModel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROVISIONING_MODEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD"] = 1; + values[valuesById[2] = "SPOT"] = 2; + return values; + })(); + + /** + * InstanceTerminationAction enum. + * @name google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction + * @enum {number} + * @property {number} INSTANCE_TERMINATION_ACTION_UNSPECIFIED=0 INSTANCE_TERMINATION_ACTION_UNSPECIFIED value + * @property {number} DELETE=1 DELETE value + * @property {number} STOP=2 STOP value + */ + Scheduling.InstanceTerminationAction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INSTANCE_TERMINATION_ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "DELETE"] = 1; + values[valuesById[2] = "STOP"] = 2; + return values; + })(); + + return Scheduling; + })(); + + v1.SchedulingDuration = (function() { + + /** + * Properties of a SchedulingDuration. + * @memberof google.cloud.backupdr.v1 + * @interface ISchedulingDuration + * @property {number|Long|null} [seconds] SchedulingDuration seconds + * @property {number|null} [nanos] SchedulingDuration nanos + */ + + /** + * Constructs a new SchedulingDuration. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a SchedulingDuration. + * @implements ISchedulingDuration + * @constructor + * @param {google.cloud.backupdr.v1.ISchedulingDuration=} [properties] Properties to set + */ + function SchedulingDuration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchedulingDuration seconds. + * @member {number|Long|null|undefined} seconds + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + SchedulingDuration.prototype.seconds = null; + + /** + * SchedulingDuration nanos. + * @member {number|null|undefined} nanos + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + SchedulingDuration.prototype.nanos = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SchedulingDuration _seconds. + * @member {"seconds"|undefined} _seconds + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + Object.defineProperty(SchedulingDuration.prototype, "_seconds", { + get: $util.oneOfGetter($oneOfFields = ["seconds"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SchedulingDuration _nanos. + * @member {"nanos"|undefined} _nanos + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + Object.defineProperty(SchedulingDuration.prototype, "_nanos", { + get: $util.oneOfGetter($oneOfFields = ["nanos"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SchedulingDuration instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {google.cloud.backupdr.v1.ISchedulingDuration=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration instance + */ + SchedulingDuration.create = function create(properties) { + return new SchedulingDuration(properties); + }; + + /** + * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {google.cloud.backupdr.v1.ISchedulingDuration} message SchedulingDuration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchedulingDuration.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 SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {google.cloud.backupdr.v1.ISchedulingDuration} message SchedulingDuration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchedulingDuration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchedulingDuration message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchedulingDuration.decode = function 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.backupdr.v1.SchedulingDuration(); + 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 SchedulingDuration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchedulingDuration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchedulingDuration message. + * @function verify + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchedulingDuration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.seconds != null && message.hasOwnProperty("seconds")) { + properties._seconds = 1; + 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")) { + properties._nanos = 1; + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + } + return null; + }; + + /** + * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration + */ + SchedulingDuration.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.SchedulingDuration) + return object; + var message = new $root.google.cloud.backupdr.v1.SchedulingDuration(); + 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 SchedulingDuration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {google.cloud.backupdr.v1.SchedulingDuration} message SchedulingDuration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchedulingDuration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 (options.oneofs) + object._seconds = "seconds"; + } + if (message.nanos != null && message.hasOwnProperty("nanos")) { + object.nanos = message.nanos; + if (options.oneofs) + object._nanos = "nanos"; + } + return object; + }; + + /** + * Converts this SchedulingDuration to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + * @returns {Object.} JSON object + */ + SchedulingDuration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchedulingDuration + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchedulingDuration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.SchedulingDuration"; + }; + + return SchedulingDuration; + })(); + + v1.ServiceAccount = (function() { + + /** + * Properties of a ServiceAccount. + * @memberof google.cloud.backupdr.v1 + * @interface IServiceAccount + * @property {string|null} [email] ServiceAccount email + * @property {Array.|null} [scopes] ServiceAccount scopes + */ + + /** + * Constructs a new ServiceAccount. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a ServiceAccount. + * @implements IServiceAccount + * @constructor + * @param {google.cloud.backupdr.v1.IServiceAccount=} [properties] Properties to set + */ + function ServiceAccount(properties) { + this.scopes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceAccount email. + * @member {string|null|undefined} email + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @instance + */ + ServiceAccount.prototype.email = null; + + /** + * ServiceAccount scopes. + * @member {Array.} scopes + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @instance + */ + ServiceAccount.prototype.scopes = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ServiceAccount _email. + * @member {"email"|undefined} _email + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @instance + */ + Object.defineProperty(ServiceAccount.prototype, "_email", { + get: $util.oneOfGetter($oneOfFields = ["email"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ServiceAccount instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {google.cloud.backupdr.v1.IServiceAccount=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount instance + */ + ServiceAccount.create = function create(properties) { + return new ServiceAccount(properties); + }; + + /** + * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {google.cloud.backupdr.v1.IServiceAccount} message ServiceAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.email != null && Object.hasOwnProperty.call(message, "email")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.email); + if (message.scopes != null && message.scopes.length) + for (var i = 0; i < message.scopes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.scopes[i]); + return writer; + }; + + /** + * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {google.cloud.backupdr.v1.IServiceAccount} message ServiceAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceAccount message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceAccount.decode = function 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.backupdr.v1.ServiceAccount(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.email = reader.string(); + break; + } + case 2: { + if (!(message.scopes && message.scopes.length)) + message.scopes = []; + message.scopes.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceAccount message. + * @function verify + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.email != null && message.hasOwnProperty("email")) { + properties._email = 1; + if (!$util.isString(message.email)) + return "email: string expected"; + } + if (message.scopes != null && message.hasOwnProperty("scopes")) { + if (!Array.isArray(message.scopes)) + return "scopes: array expected"; + for (var i = 0; i < message.scopes.length; ++i) + if (!$util.isString(message.scopes[i])) + return "scopes: string[] expected"; + } + return null; + }; + + /** + * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount + */ + ServiceAccount.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ServiceAccount) + return object; + var message = new $root.google.cloud.backupdr.v1.ServiceAccount(); + if (object.email != null) + message.email = String(object.email); + if (object.scopes) { + if (!Array.isArray(object.scopes)) + throw TypeError(".google.cloud.backupdr.v1.ServiceAccount.scopes: array expected"); + message.scopes = []; + for (var i = 0; i < object.scopes.length; ++i) + message.scopes[i] = String(object.scopes[i]); + } + return message; + }; + + /** + * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {google.cloud.backupdr.v1.ServiceAccount} message ServiceAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.scopes = []; + if (message.email != null && message.hasOwnProperty("email")) { + object.email = message.email; + if (options.oneofs) + object._email = "email"; + } + if (message.scopes && message.scopes.length) { + object.scopes = []; + for (var j = 0; j < message.scopes.length; ++j) + object.scopes[j] = message.scopes[j]; + } + return object; + }; + + /** + * Converts this ServiceAccount to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @instance + * @returns {Object.} JSON object + */ + ServiceAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceAccount + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.ServiceAccount + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceAccount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.ServiceAccount"; + }; + + return ServiceAccount; + })(); + + v1.Tags = (function() { + + /** + * Properties of a Tags. + * @memberof google.cloud.backupdr.v1 + * @interface ITags + * @property {Array.|null} [items] Tags items + */ + + /** + * Constructs a new Tags. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Tags. + * @implements ITags + * @constructor + * @param {google.cloud.backupdr.v1.ITags=} [properties] Properties to set + */ + function Tags(properties) { + this.items = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Tags items. + * @member {Array.} items + * @memberof google.cloud.backupdr.v1.Tags + * @instance + */ + Tags.prototype.items = $util.emptyArray; + + /** + * Creates a new Tags instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {google.cloud.backupdr.v1.ITags=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Tags} Tags instance + */ + Tags.create = function create(properties) { + return new Tags(properties); + }; + + /** + * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {google.cloud.backupdr.v1.ITags} message Tags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tags.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.items[i]); + return writer; + }; + + /** + * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {google.cloud.backupdr.v1.ITags} message Tags message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tags.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Tags message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Tags} Tags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tags.decode = function 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.backupdr.v1.Tags(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.items && message.items.length)) + message.items = []; + message.items.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Tags message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Tags} Tags + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tags.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Tags message. + * @function verify + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Tags.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) + if (!$util.isString(message.items[i])) + return "items: string[] expected"; + } + return null; + }; + + /** + * Creates a Tags message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Tags} Tags + */ + Tags.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Tags) + return object; + var message = new $root.google.cloud.backupdr.v1.Tags(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".google.cloud.backupdr.v1.Tags.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) + message.items[i] = String(object.items[i]); + } + return message; + }; + + /** + * Creates a plain object from a Tags message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {google.cloud.backupdr.v1.Tags} message Tags + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Tags.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = message.items[j]; + } + return object; + }; + + /** + * Converts this Tags to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Tags + * @instance + * @returns {Object.} JSON object + */ + Tags.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Tags + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Tags + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Tags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Tags"; + }; + + return Tags; + })(); + + v1.AttachedDisk = (function() { + + /** + * Properties of an AttachedDisk. + * @memberof google.cloud.backupdr.v1 + * @interface IAttachedDisk + * @property {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null} [initializeParams] AttachedDisk initializeParams + * @property {string|null} [deviceName] AttachedDisk deviceName + * @property {string|null} [kind] AttachedDisk kind + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskType|null} [diskTypeDeprecated] AttachedDisk diskTypeDeprecated + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskMode|null} [mode] AttachedDisk mode + * @property {string|null} [source] AttachedDisk source + * @property {number|Long|null} [index] AttachedDisk index + * @property {boolean|null} [boot] AttachedDisk boot + * @property {boolean|null} [autoDelete] AttachedDisk autoDelete + * @property {Array.|null} [license] AttachedDisk license + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null} [diskInterface] AttachedDisk diskInterface + * @property {Array.|null} [guestOsFeature] AttachedDisk guestOsFeature + * @property {google.cloud.backupdr.v1.ICustomerEncryptionKey|null} [diskEncryptionKey] AttachedDisk diskEncryptionKey + * @property {number|Long|null} [diskSizeGb] AttachedDisk diskSizeGb + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null} [savedState] AttachedDisk savedState + * @property {string|null} [diskType] AttachedDisk diskType + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskType|null} [type] AttachedDisk type + */ + + /** + * Constructs a new AttachedDisk. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AttachedDisk. + * @implements IAttachedDisk + * @constructor + * @param {google.cloud.backupdr.v1.IAttachedDisk=} [properties] Properties to set + */ + function AttachedDisk(properties) { + this.license = []; + this.guestOsFeature = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AttachedDisk initializeParams. + * @member {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null|undefined} initializeParams + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.initializeParams = null; + + /** + * AttachedDisk deviceName. + * @member {string|null|undefined} deviceName + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.deviceName = null; + + /** + * AttachedDisk kind. + * @member {string|null|undefined} kind + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.kind = null; + + /** + * AttachedDisk diskTypeDeprecated. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskType|null|undefined} diskTypeDeprecated + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskTypeDeprecated = null; + + /** + * AttachedDisk mode. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskMode|null|undefined} mode + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.mode = null; + + /** + * AttachedDisk source. + * @member {string|null|undefined} source + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.source = null; + + /** + * AttachedDisk index. + * @member {number|Long|null|undefined} index + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.index = null; + + /** + * AttachedDisk boot. + * @member {boolean|null|undefined} boot + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.boot = null; + + /** + * AttachedDisk autoDelete. + * @member {boolean|null|undefined} autoDelete + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.autoDelete = null; + + /** + * AttachedDisk license. + * @member {Array.} license + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.license = $util.emptyArray; + + /** + * AttachedDisk diskInterface. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null|undefined} diskInterface + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskInterface = null; + + /** + * AttachedDisk guestOsFeature. + * @member {Array.} guestOsFeature + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.guestOsFeature = $util.emptyArray; + + /** + * AttachedDisk diskEncryptionKey. + * @member {google.cloud.backupdr.v1.ICustomerEncryptionKey|null|undefined} diskEncryptionKey + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskEncryptionKey = null; + + /** + * AttachedDisk diskSizeGb. + * @member {number|Long|null|undefined} diskSizeGb + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskSizeGb = null; + + /** + * AttachedDisk savedState. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null|undefined} savedState + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.savedState = null; + + /** + * AttachedDisk diskType. + * @member {string|null|undefined} diskType + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskType = null; + + /** + * AttachedDisk type. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskType|null|undefined} type + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.type = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AttachedDisk _initializeParams. + * @member {"initializeParams"|undefined} _initializeParams + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_initializeParams", { + get: $util.oneOfGetter($oneOfFields = ["initializeParams"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _deviceName. + * @member {"deviceName"|undefined} _deviceName + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_deviceName", { + get: $util.oneOfGetter($oneOfFields = ["deviceName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _kind. + * @member {"kind"|undefined} _kind + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_kind", { + get: $util.oneOfGetter($oneOfFields = ["kind"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskTypeDeprecated. + * @member {"diskTypeDeprecated"|undefined} _diskTypeDeprecated + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskTypeDeprecated", { + get: $util.oneOfGetter($oneOfFields = ["diskTypeDeprecated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _mode. + * @member {"mode"|undefined} _mode + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_mode", { + get: $util.oneOfGetter($oneOfFields = ["mode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _source. + * @member {"source"|undefined} _source + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_source", { + get: $util.oneOfGetter($oneOfFields = ["source"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _index. + * @member {"index"|undefined} _index + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_index", { + get: $util.oneOfGetter($oneOfFields = ["index"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _boot. + * @member {"boot"|undefined} _boot + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_boot", { + get: $util.oneOfGetter($oneOfFields = ["boot"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _autoDelete. + * @member {"autoDelete"|undefined} _autoDelete + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_autoDelete", { + get: $util.oneOfGetter($oneOfFields = ["autoDelete"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskInterface. + * @member {"diskInterface"|undefined} _diskInterface + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskInterface", { + get: $util.oneOfGetter($oneOfFields = ["diskInterface"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskEncryptionKey. + * @member {"diskEncryptionKey"|undefined} _diskEncryptionKey + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskEncryptionKey", { + get: $util.oneOfGetter($oneOfFields = ["diskEncryptionKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskSizeGb. + * @member {"diskSizeGb"|undefined} _diskSizeGb + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskSizeGb", { + get: $util.oneOfGetter($oneOfFields = ["diskSizeGb"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _savedState. + * @member {"savedState"|undefined} _savedState + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_savedState", { + get: $util.oneOfGetter($oneOfFields = ["savedState"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskType. + * @member {"diskType"|undefined} _diskType + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskType", { + get: $util.oneOfGetter($oneOfFields = ["diskType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _type. + * @member {"type"|undefined} _type + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AttachedDisk instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {google.cloud.backupdr.v1.IAttachedDisk=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk instance + */ + AttachedDisk.create = function create(properties) { + return new AttachedDisk(properties); + }; + + /** + * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {google.cloud.backupdr.v1.IAttachedDisk} message AttachedDisk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttachedDisk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initializeParams != null && Object.hasOwnProperty.call(message, "initializeParams")) + $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.encode(message.initializeParams, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.deviceName); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.kind); + if (message.diskTypeDeprecated != null && Object.hasOwnProperty.call(message, "diskTypeDeprecated")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.diskTypeDeprecated); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.mode); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.source); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.index); + if (message.boot != null && Object.hasOwnProperty.call(message, "boot")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.boot); + if (message.autoDelete != null && Object.hasOwnProperty.call(message, "autoDelete")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.autoDelete); + if (message.license != null && message.license.length) + for (var i = 0; i < message.license.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.license[i]); + if (message.diskInterface != null && Object.hasOwnProperty.call(message, "diskInterface")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.diskInterface); + if (message.guestOsFeature != null && message.guestOsFeature.length) + for (var i = 0; i < message.guestOsFeature.length; ++i) + $root.google.cloud.backupdr.v1.GuestOsFeature.encode(message.guestOsFeature[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.diskEncryptionKey != null && Object.hasOwnProperty.call(message, "diskEncryptionKey")) + $root.google.cloud.backupdr.v1.CustomerEncryptionKey.encode(message.diskEncryptionKey, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 16, wireType 0 =*/128).int64(message.diskSizeGb); + if (message.savedState != null && Object.hasOwnProperty.call(message, "savedState")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.savedState); + if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.diskType); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.type); + return writer; + }; + + /** + * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {google.cloud.backupdr.v1.IAttachedDisk} message AttachedDisk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttachedDisk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AttachedDisk message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttachedDisk.decode = function 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.backupdr.v1.AttachedDisk(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.decode(reader, reader.uint32()); + break; + } + case 4: { + message.deviceName = reader.string(); + break; + } + case 5: { + message.kind = reader.string(); + break; + } + case 6: { + message.diskTypeDeprecated = reader.int32(); + break; + } + case 7: { + message.mode = reader.int32(); + break; + } + case 8: { + message.source = reader.string(); + break; + } + case 9: { + message.index = reader.int64(); + break; + } + case 10: { + message.boot = reader.bool(); + break; + } + case 11: { + message.autoDelete = reader.bool(); + break; + } + case 12: { + if (!(message.license && message.license.length)) + message.license = []; + message.license.push(reader.string()); + break; + } + case 13: { + message.diskInterface = reader.int32(); + break; + } + case 14: { + if (!(message.guestOsFeature && message.guestOsFeature.length)) + message.guestOsFeature = []; + message.guestOsFeature.push($root.google.cloud.backupdr.v1.GuestOsFeature.decode(reader, reader.uint32())); + break; + } + case 15: { + message.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader, reader.uint32()); + break; + } + case 16: { + message.diskSizeGb = reader.int64(); + break; + } + case 17: { + message.savedState = reader.int32(); + break; + } + case 18: { + message.diskType = reader.string(); + break; + } + case 19: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttachedDisk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AttachedDisk message. + * @function verify + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AttachedDisk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.initializeParams != null && message.hasOwnProperty("initializeParams")) { + properties._initializeParams = 1; + { + var error = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify(message.initializeParams); + if (error) + return "initializeParams." + error; + } + } + if (message.deviceName != null && message.hasOwnProperty("deviceName")) { + properties._deviceName = 1; + if (!$util.isString(message.deviceName)) + return "deviceName: string expected"; + } + if (message.kind != null && message.hasOwnProperty("kind")) { + properties._kind = 1; + if (!$util.isString(message.kind)) + return "kind: string expected"; + } + if (message.diskTypeDeprecated != null && message.hasOwnProperty("diskTypeDeprecated")) { + properties._diskTypeDeprecated = 1; + switch (message.diskTypeDeprecated) { + default: + return "diskTypeDeprecated: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.mode != null && message.hasOwnProperty("mode")) { + properties._mode = 1; + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.source != null && message.hasOwnProperty("source")) { + properties._source = 1; + if (!$util.isString(message.source)) + return "source: string expected"; + } + if (message.index != null && message.hasOwnProperty("index")) { + properties._index = 1; + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; + } + if (message.boot != null && message.hasOwnProperty("boot")) { + properties._boot = 1; + if (typeof message.boot !== "boolean") + return "boot: boolean expected"; + } + if (message.autoDelete != null && message.hasOwnProperty("autoDelete")) { + properties._autoDelete = 1; + if (typeof message.autoDelete !== "boolean") + return "autoDelete: boolean expected"; + } + if (message.license != null && message.hasOwnProperty("license")) { + if (!Array.isArray(message.license)) + return "license: array expected"; + for (var i = 0; i < message.license.length; ++i) + if (!$util.isString(message.license[i])) + return "license: string[] expected"; + } + if (message.diskInterface != null && message.hasOwnProperty("diskInterface")) { + properties._diskInterface = 1; + switch (message.diskInterface) { + default: + return "diskInterface: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.guestOsFeature != null && message.hasOwnProperty("guestOsFeature")) { + if (!Array.isArray(message.guestOsFeature)) + return "guestOsFeature: array expected"; + for (var i = 0; i < message.guestOsFeature.length; ++i) { + var error = $root.google.cloud.backupdr.v1.GuestOsFeature.verify(message.guestOsFeature[i]); + if (error) + return "guestOsFeature." + error; + } + } + if (message.diskEncryptionKey != null && message.hasOwnProperty("diskEncryptionKey")) { + properties._diskEncryptionKey = 1; + { + var error = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.verify(message.diskEncryptionKey); + if (error) + return "diskEncryptionKey." + error; + } + } + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) { + properties._diskSizeGb = 1; + if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) + return "diskSizeGb: integer|Long expected"; + } + if (message.savedState != null && message.hasOwnProperty("savedState")) { + properties._savedState = 1; + switch (message.savedState) { + default: + return "savedState: enum value expected"; + case 0: + case 1: + break; + } + } + if (message.diskType != null && message.hasOwnProperty("diskType")) { + properties._diskType = 1; + if (!$util.isString(message.diskType)) + return "diskType: string expected"; + } + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates an AttachedDisk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk + */ + AttachedDisk.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AttachedDisk) + return object; + var message = new $root.google.cloud.backupdr.v1.AttachedDisk(); + if (object.initializeParams != null) { + if (typeof object.initializeParams !== "object") + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.initializeParams: object expected"); + message.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.fromObject(object.initializeParams); + } + if (object.deviceName != null) + message.deviceName = String(object.deviceName); + if (object.kind != null) + message.kind = String(object.kind); + switch (object.diskTypeDeprecated) { + default: + if (typeof object.diskTypeDeprecated === "number") { + message.diskTypeDeprecated = object.diskTypeDeprecated; + break; + } + break; + case "DISK_TYPE_UNSPECIFIED": + case 0: + message.diskTypeDeprecated = 0; + break; + case "SCRATCH": + case 1: + message.diskTypeDeprecated = 1; + break; + case "PERSISTENT": + case 2: + message.diskTypeDeprecated = 2; + break; + } + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "DISK_MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "READ_WRITE": + case 1: + message.mode = 1; + break; + case "READ_ONLY": + case 2: + message.mode = 2; + break; + case "LOCKED": + case 3: + message.mode = 3; + break; + } + if (object.source != null) + message.source = String(object.source); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = false; + else if (typeof object.index === "string") + message.index = parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); + if (object.boot != null) + message.boot = Boolean(object.boot); + if (object.autoDelete != null) + message.autoDelete = Boolean(object.autoDelete); + if (object.license) { + if (!Array.isArray(object.license)) + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.license: array expected"); + message.license = []; + for (var i = 0; i < object.license.length; ++i) + message.license[i] = String(object.license[i]); + } + switch (object.diskInterface) { + default: + if (typeof object.diskInterface === "number") { + message.diskInterface = object.diskInterface; + break; + } + break; + case "DISK_INTERFACE_UNSPECIFIED": + case 0: + message.diskInterface = 0; + break; + case "SCSI": + case 1: + message.diskInterface = 1; + break; + case "NVME": + case 2: + message.diskInterface = 2; + break; + case "NVDIMM": + case 3: + message.diskInterface = 3; + break; + case "ISCSI": + case 4: + message.diskInterface = 4; + break; + } + if (object.guestOsFeature) { + if (!Array.isArray(object.guestOsFeature)) + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.guestOsFeature: array expected"); + message.guestOsFeature = []; + for (var i = 0; i < object.guestOsFeature.length; ++i) { + if (typeof object.guestOsFeature[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.guestOsFeature: object expected"); + message.guestOsFeature[i] = $root.google.cloud.backupdr.v1.GuestOsFeature.fromObject(object.guestOsFeature[i]); + } + } + if (object.diskEncryptionKey != null) { + if (typeof object.diskEncryptionKey !== "object") + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.diskEncryptionKey: object expected"); + message.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.fromObject(object.diskEncryptionKey); + } + if (object.diskSizeGb != null) + if ($util.Long) + (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; + else if (typeof object.diskSizeGb === "string") + message.diskSizeGb = parseInt(object.diskSizeGb, 10); + else if (typeof object.diskSizeGb === "number") + message.diskSizeGb = object.diskSizeGb; + else if (typeof object.diskSizeGb === "object") + message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); + switch (object.savedState) { + default: + if (typeof object.savedState === "number") { + message.savedState = object.savedState; + break; + } + break; + case "DISK_SAVED_STATE_UNSPECIFIED": + case 0: + message.savedState = 0; + break; + case "PRESERVED": + case 1: + message.savedState = 1; + break; + } + if (object.diskType != null) + message.diskType = String(object.diskType); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DISK_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "SCRATCH": + case 1: + message.type = 1; + break; + case "PERSISTENT": + case 2: + message.type = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk} message AttachedDisk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AttachedDisk.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.license = []; + object.guestOsFeature = []; + } + if (message.initializeParams != null && message.hasOwnProperty("initializeParams")) { + object.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.toObject(message.initializeParams, options); + if (options.oneofs) + object._initializeParams = "initializeParams"; + } + if (message.deviceName != null && message.hasOwnProperty("deviceName")) { + object.deviceName = message.deviceName; + if (options.oneofs) + object._deviceName = "deviceName"; + } + if (message.kind != null && message.hasOwnProperty("kind")) { + object.kind = message.kind; + if (options.oneofs) + object._kind = "kind"; + } + if (message.diskTypeDeprecated != null && message.hasOwnProperty("diskTypeDeprecated")) { + object.diskTypeDeprecated = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated] === undefined ? message.diskTypeDeprecated : $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated] : message.diskTypeDeprecated; + if (options.oneofs) + object._diskTypeDeprecated = "diskTypeDeprecated"; + } + if (message.mode != null && message.hasOwnProperty("mode")) { + object.mode = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode] === undefined ? message.mode : $root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode] : message.mode; + if (options.oneofs) + object._mode = "mode"; + } + if (message.source != null && message.hasOwnProperty("source")) { + object.source = message.source; + if (options.oneofs) + object._source = "source"; + } + if (message.index != null && message.hasOwnProperty("index")) { + if (typeof message.index === "number") + object.index = options.longs === String ? String(message.index) : message.index; + else + object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; + if (options.oneofs) + object._index = "index"; + } + if (message.boot != null && message.hasOwnProperty("boot")) { + object.boot = message.boot; + if (options.oneofs) + object._boot = "boot"; + } + if (message.autoDelete != null && message.hasOwnProperty("autoDelete")) { + object.autoDelete = message.autoDelete; + if (options.oneofs) + object._autoDelete = "autoDelete"; + } + if (message.license && message.license.length) { + object.license = []; + for (var j = 0; j < message.license.length; ++j) + object.license[j] = message.license[j]; + } + if (message.diskInterface != null && message.hasOwnProperty("diskInterface")) { + object.diskInterface = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskInterface[message.diskInterface] === undefined ? message.diskInterface : $root.google.cloud.backupdr.v1.AttachedDisk.DiskInterface[message.diskInterface] : message.diskInterface; + if (options.oneofs) + object._diskInterface = "diskInterface"; + } + if (message.guestOsFeature && message.guestOsFeature.length) { + object.guestOsFeature = []; + for (var j = 0; j < message.guestOsFeature.length; ++j) + object.guestOsFeature[j] = $root.google.cloud.backupdr.v1.GuestOsFeature.toObject(message.guestOsFeature[j], options); + } + if (message.diskEncryptionKey != null && message.hasOwnProperty("diskEncryptionKey")) { + object.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.toObject(message.diskEncryptionKey, options); + if (options.oneofs) + object._diskEncryptionKey = "diskEncryptionKey"; + } + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) { + if (typeof message.diskSizeGb === "number") + object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; + else + object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; + if (options.oneofs) + object._diskSizeGb = "diskSizeGb"; + } + if (message.savedState != null && message.hasOwnProperty("savedState")) { + object.savedState = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState] === undefined ? message.savedState : $root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState] : message.savedState; + if (options.oneofs) + object._savedState = "savedState"; + } + if (message.diskType != null && message.hasOwnProperty("diskType")) { + object.diskType = message.diskType; + if (options.oneofs) + object._diskType = "diskType"; + } + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + return object; + }; + + /** + * Converts this AttachedDisk to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + * @returns {Object.} JSON object + */ + AttachedDisk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AttachedDisk + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AttachedDisk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AttachedDisk"; + }; + + AttachedDisk.InitializeParams = (function() { + + /** + * Properties of an InitializeParams. + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @interface IInitializeParams + * @property {string|null} [diskName] InitializeParams diskName + * @property {Array.|null} [replicaZones] InitializeParams replicaZones + */ + + /** + * Constructs a new InitializeParams. + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @classdesc Represents an InitializeParams. + * @implements IInitializeParams + * @constructor + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams=} [properties] Properties to set + */ + function InitializeParams(properties) { + this.replicaZones = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InitializeParams diskName. + * @member {string|null|undefined} diskName + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + */ + InitializeParams.prototype.diskName = null; + + /** + * InitializeParams replicaZones. + * @member {Array.} replicaZones + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + */ + InitializeParams.prototype.replicaZones = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InitializeParams _diskName. + * @member {"diskName"|undefined} _diskName + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + */ + Object.defineProperty(InitializeParams.prototype, "_diskName", { + get: $util.oneOfGetter($oneOfFields = ["diskName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InitializeParams instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams instance + */ + InitializeParams.create = function create(properties) { + return new InitializeParams(properties); + }; + + /** + * Encodes the specified InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams} message InitializeParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitializeParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.diskName != null && Object.hasOwnProperty.call(message, "diskName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.diskName); + if (message.replicaZones != null && message.replicaZones.length) + for (var i = 0; i < message.replicaZones.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.replicaZones[i]); + return writer; + }; + + /** + * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams} message InitializeParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitializeParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InitializeParams message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitializeParams.decode = function 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.backupdr.v1.AttachedDisk.InitializeParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.diskName = reader.string(); + break; + } + case 2: { + if (!(message.replicaZones && message.replicaZones.length)) + message.replicaZones = []; + message.replicaZones.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InitializeParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitializeParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InitializeParams message. + * @function verify + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InitializeParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.diskName != null && message.hasOwnProperty("diskName")) { + properties._diskName = 1; + if (!$util.isString(message.diskName)) + return "diskName: string expected"; + } + if (message.replicaZones != null && message.hasOwnProperty("replicaZones")) { + if (!Array.isArray(message.replicaZones)) + return "replicaZones: array expected"; + for (var i = 0; i < message.replicaZones.length; ++i) + if (!$util.isString(message.replicaZones[i])) + return "replicaZones: string[] expected"; + } + return null; + }; + + /** + * Creates an InitializeParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams + */ + InitializeParams.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams) + return object; + var message = new $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams(); + if (object.diskName != null) + message.diskName = String(object.diskName); + if (object.replicaZones) { + if (!Array.isArray(object.replicaZones)) + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.InitializeParams.replicaZones: array expected"); + message.replicaZones = []; + for (var i = 0; i < object.replicaZones.length; ++i) + message.replicaZones[i] = String(object.replicaZones[i]); + } + return message; + }; + + /** + * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} message InitializeParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InitializeParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.replicaZones = []; + if (message.diskName != null && message.hasOwnProperty("diskName")) { + object.diskName = message.diskName; + if (options.oneofs) + object._diskName = "diskName"; + } + if (message.replicaZones && message.replicaZones.length) { + object.replicaZones = []; + for (var j = 0; j < message.replicaZones.length; ++j) + object.replicaZones[j] = message.replicaZones[j]; + } + return object; + }; + + /** + * Converts this InitializeParams to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + * @returns {Object.} JSON object + */ + InitializeParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InitializeParams + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InitializeParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AttachedDisk.InitializeParams"; + }; + + return InitializeParams; + })(); + + /** + * DiskType enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskType + * @enum {number} + * @property {number} DISK_TYPE_UNSPECIFIED=0 DISK_TYPE_UNSPECIFIED value + * @property {number} SCRATCH=1 SCRATCH value + * @property {number} PERSISTENT=2 PERSISTENT value + */ + AttachedDisk.DiskType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCRATCH"] = 1; + values[valuesById[2] = "PERSISTENT"] = 2; + return values; + })(); + + /** + * DiskMode enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskMode + * @enum {number} + * @property {number} DISK_MODE_UNSPECIFIED=0 DISK_MODE_UNSPECIFIED value + * @property {number} READ_WRITE=1 READ_WRITE value + * @property {number} READ_ONLY=2 READ_ONLY value + * @property {number} LOCKED=3 LOCKED value + */ + AttachedDisk.DiskMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READ_WRITE"] = 1; + values[valuesById[2] = "READ_ONLY"] = 2; + values[valuesById[3] = "LOCKED"] = 3; + return values; + })(); + + /** + * DiskInterface enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskInterface + * @enum {number} + * @property {number} DISK_INTERFACE_UNSPECIFIED=0 DISK_INTERFACE_UNSPECIFIED value + * @property {number} SCSI=1 SCSI value + * @property {number} NVME=2 NVME value + * @property {number} NVDIMM=3 NVDIMM value + * @property {number} ISCSI=4 ISCSI value + */ + AttachedDisk.DiskInterface = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_INTERFACE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCSI"] = 1; + values[valuesById[2] = "NVME"] = 2; + values[valuesById[3] = "NVDIMM"] = 3; + values[valuesById[4] = "ISCSI"] = 4; + return values; + })(); + + /** + * DiskSavedState enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskSavedState + * @enum {number} + * @property {number} DISK_SAVED_STATE_UNSPECIFIED=0 DISK_SAVED_STATE_UNSPECIFIED value + * @property {number} PRESERVED=1 PRESERVED value + */ + AttachedDisk.DiskSavedState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_SAVED_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRESERVED"] = 1; + return values; + })(); + + return AttachedDisk; + })(); + + v1.GuestOsFeature = (function() { + + /** + * Properties of a GuestOsFeature. + * @memberof google.cloud.backupdr.v1 + * @interface IGuestOsFeature + * @property {google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null} [type] GuestOsFeature type + */ + + /** + * Constructs a new GuestOsFeature. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GuestOsFeature. + * @implements IGuestOsFeature + * @constructor + * @param {google.cloud.backupdr.v1.IGuestOsFeature=} [properties] Properties to set + */ + function GuestOsFeature(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GuestOsFeature type. + * @member {google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null|undefined} type + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @instance + */ + GuestOsFeature.prototype.type = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GuestOsFeature _type. + * @member {"type"|undefined} _type + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @instance + */ + Object.defineProperty(GuestOsFeature.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GuestOsFeature instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.IGuestOsFeature=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature instance + */ + GuestOsFeature.create = function create(properties) { + return new GuestOsFeature(properties); + }; + + /** + * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.IGuestOsFeature} message GuestOsFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GuestOsFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + return writer; + }; + + /** + * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.IGuestOsFeature} message GuestOsFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GuestOsFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GuestOsFeature message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GuestOsFeature.decode = function 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.backupdr.v1.GuestOsFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GuestOsFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GuestOsFeature message. + * @function verify + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GuestOsFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + break; + } + } + return null; + }; + + /** + * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature + */ + GuestOsFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GuestOsFeature) + return object; + var message = new $root.google.cloud.backupdr.v1.GuestOsFeature(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "FEATURE_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "VIRTIO_SCSI_MULTIQUEUE": + case 1: + message.type = 1; + break; + case "WINDOWS": + case 2: + message.type = 2; + break; + case "MULTI_IP_SUBNET": + case 3: + message.type = 3; + break; + case "UEFI_COMPATIBLE": + case 4: + message.type = 4; + break; + case "SECURE_BOOT": + case 5: + message.type = 5; + break; + case "GVNIC": + case 6: + message.type = 6; + break; + case "SEV_CAPABLE": + case 7: + message.type = 7; + break; + case "BARE_METAL_LINUX_COMPATIBLE": + case 8: + message.type = 8; + break; + case "SUSPEND_RESUME_COMPATIBLE": + case 9: + message.type = 9; + break; + case "SEV_LIVE_MIGRATABLE": + case 10: + message.type = 10; + break; + case "SEV_SNP_CAPABLE": + case 11: + message.type = 11; + break; + case "TDX_CAPABLE": + case 12: + message.type = 12; + break; + case "IDPF": + case 13: + message.type = 13; + break; + case "SEV_LIVE_MIGRATABLE_V2": + case 14: + message.type = 14; + break; + } + return message; + }; + + /** + * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.GuestOsFeature} message GuestOsFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GuestOsFeature.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + return object; + }; + + /** + * Converts this GuestOsFeature to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @instance + * @returns {Object.} JSON object + */ + GuestOsFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GuestOsFeature + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GuestOsFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GuestOsFeature"; + }; + + /** + * FeatureType enum. + * @name google.cloud.backupdr.v1.GuestOsFeature.FeatureType + * @enum {number} + * @property {number} FEATURE_TYPE_UNSPECIFIED=0 FEATURE_TYPE_UNSPECIFIED value + * @property {number} VIRTIO_SCSI_MULTIQUEUE=1 VIRTIO_SCSI_MULTIQUEUE value + * @property {number} WINDOWS=2 WINDOWS value + * @property {number} MULTI_IP_SUBNET=3 MULTI_IP_SUBNET value + * @property {number} UEFI_COMPATIBLE=4 UEFI_COMPATIBLE value + * @property {number} SECURE_BOOT=5 SECURE_BOOT value + * @property {number} GVNIC=6 GVNIC value + * @property {number} SEV_CAPABLE=7 SEV_CAPABLE value + * @property {number} BARE_METAL_LINUX_COMPATIBLE=8 BARE_METAL_LINUX_COMPATIBLE value + * @property {number} SUSPEND_RESUME_COMPATIBLE=9 SUSPEND_RESUME_COMPATIBLE value + * @property {number} SEV_LIVE_MIGRATABLE=10 SEV_LIVE_MIGRATABLE value + * @property {number} SEV_SNP_CAPABLE=11 SEV_SNP_CAPABLE value + * @property {number} TDX_CAPABLE=12 TDX_CAPABLE value + * @property {number} IDPF=13 IDPF value + * @property {number} SEV_LIVE_MIGRATABLE_V2=14 SEV_LIVE_MIGRATABLE_V2 value + */ + GuestOsFeature.FeatureType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FEATURE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VIRTIO_SCSI_MULTIQUEUE"] = 1; + values[valuesById[2] = "WINDOWS"] = 2; + values[valuesById[3] = "MULTI_IP_SUBNET"] = 3; + values[valuesById[4] = "UEFI_COMPATIBLE"] = 4; + values[valuesById[5] = "SECURE_BOOT"] = 5; + values[valuesById[6] = "GVNIC"] = 6; + values[valuesById[7] = "SEV_CAPABLE"] = 7; + values[valuesById[8] = "BARE_METAL_LINUX_COMPATIBLE"] = 8; + values[valuesById[9] = "SUSPEND_RESUME_COMPATIBLE"] = 9; + values[valuesById[10] = "SEV_LIVE_MIGRATABLE"] = 10; + values[valuesById[11] = "SEV_SNP_CAPABLE"] = 11; + values[valuesById[12] = "TDX_CAPABLE"] = 12; + values[valuesById[13] = "IDPF"] = 13; + values[valuesById[14] = "SEV_LIVE_MIGRATABLE_V2"] = 14; + return values; + })(); + + return GuestOsFeature; + })(); + + /** + * KeyRevocationActionType enum. + * @name google.cloud.backupdr.v1.KeyRevocationActionType + * @enum {number} + * @property {number} KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED=0 KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} STOP=2 STOP value + */ + v1.KeyRevocationActionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "STOP"] = 2; + return values; + })(); + + return v1; + })(); + + return backupdr; + })(); + + 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.FieldInfo = (function() { + + /** + * Properties of a FieldInfo. + * @memberof google.api + * @interface IFieldInfo + * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format + */ + + /** + * Constructs a new FieldInfo. + * @memberof google.api + * @classdesc Represents a FieldInfo. + * @implements IFieldInfo + * @constructor + * @param {google.api.IFieldInfo=} [properties] Properties to set + */ + function FieldInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldInfo format. + * @member {google.api.FieldInfo.Format} format + * @memberof google.api.FieldInfo + * @instance + */ + FieldInfo.prototype.format = 0; + + /** + * Creates a new FieldInfo instance using the specified properties. + * @function create + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo=} [properties] Properties to set + * @returns {google.api.FieldInfo} FieldInfo instance + */ + FieldInfo.create = function create(properties) { + return new FieldInfo(properties); + }; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encode + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + return writer; + }; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @function decode + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decode = function 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.FieldInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.format = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldInfo message. + * @function verify + * @memberof google.api.FieldInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.FieldInfo + * @static + * @param {Object.} object Plain object + * @returns {google.api.FieldInfo} FieldInfo + */ + FieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.FieldInfo) + return object; + var message = new $root.google.api.FieldInfo(); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "UUID4": + case 1: + message.format = 1; + break; + case "IPV4": + case 2: + message.format = 2; + break; + case "IPV6": + case 3: + message.format = 3; + break; + case "IPV4_OR_IPV6": + case 4: + message.format = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.FieldInfo + * @static + * @param {google.api.FieldInfo} message FieldInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; + return object; + }; + + /** + * Converts this FieldInfo to JSON. + * @function toJSON + * @memberof google.api.FieldInfo + * @instance + * @returns {Object.} JSON object + */ + FieldInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldInfo + * @function getTypeUrl + * @memberof google.api.FieldInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.FieldInfo"; + }; + + /** + * Format enum. + * @name google.api.FieldInfo.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} UUID4=1 UUID4 value + * @property {number} IPV4=2 IPV4 value + * @property {number} IPV6=3 IPV6 value + * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value + */ + FieldInfo.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "UUID4"] = 1; + values[valuesById[2] = "IPV4"] = 2; + values[valuesById[3] = "IPV6"] = 3; + values[valuesById[4] = "IPV4_OR_IPV6"] = 4; + return values; + })(); + + return FieldInfo; + })(); + + 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.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo + * @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.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = null; + + /** + * 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(); + if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) + $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).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 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + 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.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { + var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); + if (error) + return ".google.api.fieldInfo." + error; + } + 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.fieldInfo"] != null) { + if (typeof object[".google.api.fieldInfo"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); + } + 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; + object[".google.api.fieldInfo"] = 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); + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) + object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], 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.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; + })(); + + 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.DoubleValue = (function() { + + /** + * Properties of a DoubleValue. + * @memberof google.protobuf + * @interface IDoubleValue + * @property {number|null} [value] DoubleValue value + */ + + /** + * Constructs a new DoubleValue. + * @memberof google.protobuf + * @classdesc Represents a DoubleValue. + * @implements IDoubleValue + * @constructor + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + */ + function DoubleValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DoubleValue value. + * @member {number} value + * @memberof google.protobuf.DoubleValue + * @instance + */ + DoubleValue.prototype.value = 0; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @function create + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * @returns {google.protobuf.DoubleValue} DoubleValue instance + */ + DoubleValue.create = function create(properties) { + return new DoubleValue(properties); + }; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + return writer; + }; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decode = function 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.DoubleValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DoubleValue message. + * @function verify + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DoubleValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DoubleValue} DoubleValue + */ + DoubleValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DoubleValue) + return object; + var message = new $root.google.protobuf.DoubleValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DoubleValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this DoubleValue to JSON. + * @function toJSON + * @memberof google.protobuf.DoubleValue + * @instance + * @returns {Object.} JSON object + */ + DoubleValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DoubleValue + * @function getTypeUrl + * @memberof google.protobuf.DoubleValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DoubleValue"; + }; + + return DoubleValue; + })(); + + protobuf.FloatValue = (function() { + + /** + * Properties of a FloatValue. + * @memberof google.protobuf + * @interface IFloatValue + * @property {number|null} [value] FloatValue value + */ + + /** + * Constructs a new FloatValue. + * @memberof google.protobuf + * @classdesc Represents a FloatValue. + * @implements IFloatValue + * @constructor + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + */ + function FloatValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FloatValue value. + * @member {number} value + * @memberof google.protobuf.FloatValue + * @instance + */ + FloatValue.prototype.value = 0; + + /** + * Creates a new FloatValue instance using the specified properties. + * @function create + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @returns {google.protobuf.FloatValue} FloatValue instance + */ + FloatValue.create = function create(properties) { + return new FloatValue(properties); + }; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); + return writer; + }; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decode = function 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.FloatValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FloatValue message. + * @function verify + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FloatValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FloatValue} FloatValue + */ + FloatValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FloatValue) + return object; + var message = new $root.google.protobuf.FloatValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.FloatValue} message FloatValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FloatValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this FloatValue to JSON. + * @function toJSON + * @memberof google.protobuf.FloatValue + * @instance + * @returns {Object.} JSON object + */ + FloatValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FloatValue + * @function getTypeUrl + * @memberof google.protobuf.FloatValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FloatValue"; + }; + + return FloatValue; + })(); + + protobuf.Int64Value = (function() { + + /** + * Properties of an Int64Value. + * @memberof google.protobuf + * @interface IInt64Value + * @property {number|Long|null} [value] Int64Value value + */ + + /** + * Constructs a new Int64Value. + * @memberof google.protobuf + * @classdesc Represents an Int64Value. + * @implements IInt64Value + * @constructor + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + */ + function Int64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int64Value value. + * @member {number|Long} value + * @memberof google.protobuf.Int64Value + * @instance + */ + Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Int64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + * @returns {google.protobuf.Int64Value} Int64Value instance + */ + Int64Value.create = function create(properties) { + return new Int64Value(properties); + }; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); + return writer; + }; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decode = function 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.Int64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int64Value message. + * @function verify + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int64Value} Int64Value + */ + Int64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int64Value) + return object; + var message = new $root.google.protobuf.Int64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.Int64Value} message Int64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int64Value.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.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + return object; + }; + + /** + * Converts this Int64Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int64Value + * @instance + * @returns {Object.} JSON object + */ + Int64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int64Value + * @function getTypeUrl + * @memberof google.protobuf.Int64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int64Value"; + }; + + return Int64Value; + })(); + + protobuf.UInt64Value = (function() { + + /** + * Properties of a UInt64Value. + * @memberof google.protobuf + * @interface IUInt64Value + * @property {number|Long|null} [value] UInt64Value value + */ + + /** + * Constructs a new UInt64Value. + * @memberof google.protobuf + * @classdesc Represents a UInt64Value. + * @implements IUInt64Value + * @constructor + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + */ + function UInt64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt64Value value. + * @member {number|Long} value + * @memberof google.protobuf.UInt64Value + * @instance + */ + UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new UInt64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @returns {google.protobuf.UInt64Value} UInt64Value instance + */ + UInt64Value.create = function create(properties) { + return new UInt64Value(properties); + }; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); + return writer; + }; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decode = function 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.UInt64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt64Value message. + * @function verify + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt64Value} UInt64Value + */ + UInt64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt64Value) + return object; + var message = new $root.google.protobuf.UInt64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = true; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.UInt64Value} message UInt64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt64Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + return object; + }; + + /** + * Converts this UInt64Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt64Value + * @instance + * @returns {Object.} JSON object + */ + UInt64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UInt64Value + * @function getTypeUrl + * @memberof google.protobuf.UInt64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt64Value"; + }; + + return UInt64Value; + })(); + + protobuf.Int32Value = (function() { + + /** + * Properties of an Int32Value. + * @memberof google.protobuf + * @interface IInt32Value + * @property {number|null} [value] Int32Value value + */ + + /** + * Constructs a new Int32Value. + * @memberof google.protobuf + * @classdesc Represents an Int32Value. + * @implements IInt32Value + * @constructor + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + */ + function Int32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int32Value value. + * @member {number} value + * @memberof google.protobuf.Int32Value + * @instance + */ + Int32Value.prototype.value = 0; + + /** + * Creates a new Int32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @returns {google.protobuf.Int32Value} Int32Value instance + */ + Int32Value.create = function create(properties) { + return new Int32Value(properties); + }; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); + return writer; + }; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decode = function 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.Int32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int32Value message. + * @function verify + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int32Value} Int32Value + */ + Int32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int32Value) + return object; + var message = new $root.google.protobuf.Int32Value(); + if (object.value != null) + message.value = object.value | 0; + return message; + }; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.Int32Value} message Int32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this Int32Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int32Value + * @instance + * @returns {Object.} JSON object + */ + Int32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int32Value + * @function getTypeUrl + * @memberof google.protobuf.Int32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int32Value"; + }; + + return Int32Value; + })(); + + protobuf.UInt32Value = (function() { + + /** + * Properties of a UInt32Value. + * @memberof google.protobuf + * @interface IUInt32Value + * @property {number|null} [value] UInt32Value value + */ + + /** + * Constructs a new UInt32Value. + * @memberof google.protobuf + * @classdesc Represents a UInt32Value. + * @implements IUInt32Value + * @constructor + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + */ + function UInt32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt32Value value. + * @member {number} value + * @memberof google.protobuf.UInt32Value + * @instance + */ + UInt32Value.prototype.value = 0; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * @returns {google.protobuf.UInt32Value} UInt32Value instance + */ + UInt32Value.create = function create(properties) { + return new UInt32Value(properties); + }; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); + return writer; + }; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decode = function 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.UInt32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt32Value message. + * @function verify + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt32Value} UInt32Value + */ + UInt32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt32Value) + return object; + var message = new $root.google.protobuf.UInt32Value(); + if (object.value != null) + message.value = object.value >>> 0; + return message; + }; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this UInt32Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt32Value + * @instance + * @returns {Object.} JSON object + */ + UInt32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UInt32Value + * @function getTypeUrl + * @memberof google.protobuf.UInt32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt32Value"; + }; + + return UInt32Value; + })(); + + protobuf.BoolValue = (function() { + + /** + * Properties of a BoolValue. + * @memberof google.protobuf + * @interface IBoolValue + * @property {boolean|null} [value] BoolValue value + */ + + /** + * Constructs a new BoolValue. + * @memberof google.protobuf + * @classdesc Represents a BoolValue. + * @implements IBoolValue + * @constructor + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + */ + function BoolValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BoolValue value. + * @member {boolean} value + * @memberof google.protobuf.BoolValue + * @instance + */ + BoolValue.prototype.value = false; + + /** + * Creates a new BoolValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @returns {google.protobuf.BoolValue} BoolValue instance + */ + BoolValue.create = function create(properties) { + return new BoolValue(properties); + }; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); + return writer; + }; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decode = function 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.BoolValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoolValue message. + * @function verify + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BoolValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "boolean") + return "value: boolean expected"; + return null; + }; + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BoolValue} BoolValue + */ + BoolValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BoolValue) + return object; + var message = new $root.google.protobuf.BoolValue(); + if (object.value != null) + message.value = Boolean(object.value); + return message; + }; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.BoolValue} message BoolValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BoolValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = false; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this BoolValue to JSON. + * @function toJSON + * @memberof google.protobuf.BoolValue + * @instance + * @returns {Object.} JSON object + */ + BoolValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BoolValue + * @function getTypeUrl + * @memberof google.protobuf.BoolValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BoolValue"; + }; + + return BoolValue; + })(); + + protobuf.StringValue = (function() { + + /** + * Properties of a StringValue. + * @memberof google.protobuf + * @interface IStringValue + * @property {string|null} [value] StringValue value + */ + + /** + * Constructs a new StringValue. + * @memberof google.protobuf + * @classdesc Represents a StringValue. + * @implements IStringValue + * @constructor + * @param {google.protobuf.IStringValue=} [properties] Properties to set + */ + function StringValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringValue value. + * @member {string} value + * @memberof google.protobuf.StringValue + * @instance + */ + StringValue.prototype.value = ""; + + /** + * Creates a new StringValue instance using the specified properties. + * @function create + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @returns {google.protobuf.StringValue} StringValue instance + */ + StringValue.create = function create(properties) { + return new StringValue(properties); + }; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decode = function 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.StringValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringValue message. + * @function verify + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.StringValue} StringValue + */ + StringValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.StringValue) + return object; + var message = new $root.google.protobuf.StringValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.StringValue} message StringValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this StringValue to JSON. + * @function toJSON + * @memberof google.protobuf.StringValue + * @instance + * @returns {Object.} JSON object + */ + StringValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringValue + * @function getTypeUrl + * @memberof google.protobuf.StringValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.StringValue"; + }; + + return StringValue; + })(); + + protobuf.BytesValue = (function() { + + /** + * Properties of a BytesValue. + * @memberof google.protobuf + * @interface IBytesValue + * @property {Uint8Array|null} [value] BytesValue value + */ + + /** + * Constructs a new BytesValue. + * @memberof google.protobuf + * @classdesc Represents a BytesValue. + * @implements IBytesValue + * @constructor + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + */ + function BytesValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BytesValue value. + * @member {Uint8Array} value + * @memberof google.protobuf.BytesValue + * @instance + */ + BytesValue.prototype.value = $util.newBuffer([]); + + /** + * Creates a new BytesValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * @returns {google.protobuf.BytesValue} BytesValue instance + */ + BytesValue.create = function create(properties) { + return new BytesValue(properties); + }; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decode = function 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.BytesValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BytesValue message. + * @function verify + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BytesValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 a BytesValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BytesValue} BytesValue + */ + BytesValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BytesValue) + return object; + var message = new $root.google.protobuf.BytesValue(); + 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 a BytesValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.BytesValue} message BytesValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BytesValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + 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 BytesValue to JSON. + * @function toJSON + * @memberof google.protobuf.BytesValue + * @instance + * @returns {Object.} JSON object + */ + BytesValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BytesValue + * @function getTypeUrl + * @memberof google.protobuf.BytesValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BytesValue"; + }; + + return BytesValue; + })(); + + return protobuf; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + /** + * DayOfWeek enum. + * @name google.type.DayOfWeek + * @enum {number} + * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value + * @property {number} MONDAY=1 MONDAY value + * @property {number} TUESDAY=2 TUESDAY value + * @property {number} WEDNESDAY=3 WEDNESDAY value + * @property {number} THURSDAY=4 THURSDAY value + * @property {number} FRIDAY=5 FRIDAY value + * @property {number} SATURDAY=6 SATURDAY value + * @property {number} SUNDAY=7 SUNDAY value + */ + type.DayOfWeek = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; + values[valuesById[1] = "MONDAY"] = 1; + values[valuesById[2] = "TUESDAY"] = 2; + values[valuesById[3] = "WEDNESDAY"] = 3; + values[valuesById[4] = "THURSDAY"] = 4; + values[valuesById[5] = "FRIDAY"] = 5; + values[valuesById[6] = "SATURDAY"] = 6; + values[valuesById[7] = "SUNDAY"] = 7; + return values; + })(); + + /** + * Month enum. + * @name google.type.Month + * @enum {number} + * @property {number} MONTH_UNSPECIFIED=0 MONTH_UNSPECIFIED value + * @property {number} JANUARY=1 JANUARY value + * @property {number} FEBRUARY=2 FEBRUARY value + * @property {number} MARCH=3 MARCH value + * @property {number} APRIL=4 APRIL value + * @property {number} MAY=5 MAY value + * @property {number} JUNE=6 JUNE value + * @property {number} JULY=7 JULY value + * @property {number} AUGUST=8 AUGUST value + * @property {number} SEPTEMBER=9 SEPTEMBER value + * @property {number} OCTOBER=10 OCTOBER value + * @property {number} NOVEMBER=11 NOVEMBER value + * @property {number} DECEMBER=12 DECEMBER value + */ + type.Month = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MONTH_UNSPECIFIED"] = 0; + values[valuesById[1] = "JANUARY"] = 1; + values[valuesById[2] = "FEBRUARY"] = 2; + values[valuesById[3] = "MARCH"] = 3; + values[valuesById[4] = "APRIL"] = 4; + values[valuesById[5] = "MAY"] = 5; + values[valuesById[6] = "JUNE"] = 6; + values[valuesById[7] = "JULY"] = 7; + values[valuesById[8] = "AUGUST"] = 8; + values[valuesById[9] = "SEPTEMBER"] = 9; + values[valuesById[10] = "OCTOBER"] = 10; + values[valuesById[11] = "NOVEMBER"] = 11; + values[valuesById[12] = "DECEMBER"] = 12; + return values; + })(); + + return type; + })(); + + 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; + })(); + + 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; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json new file mode 100644 index 00000000000..bd9c5f04c63 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json @@ -0,0 +1,7136 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "backupdr": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.BackupDR.V1", + "go_package": "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb", + "java_multiple_files": true, + "java_outer_classname": "BackupvaultGceProto", + "java_package": "com.google.cloud.backupdr.v1", + "php_namespace": "Google\\Cloud\\BackupDR\\V1", + "ruby_package": "Google::Cloud::BackupDR::V1" + }, + "nested": { + "BackupDR": { + "options": { + "(google.api.default_host)": "backupdr.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListManagementServers": { + "requestType": "ListManagementServersRequest", + "responseType": "ListManagementServersResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/managementServers", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/managementServers" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetManagementServer": { + "requestType": "GetManagementServerRequest", + "responseType": "ManagementServer", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/managementServers/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/managementServers/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateManagementServer": { + "requestType": "CreateManagementServerRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/managementServers", + "(google.api.http).body": "management_server", + "(google.api.method_signature)": "parent,management_server,management_server_id", + "(google.longrunning.operation_info).response_type": "ManagementServer", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/managementServers", + "body": "management_server" + } + }, + { + "(google.api.method_signature)": "parent,management_server,management_server_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ManagementServer", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteManagementServer": { + "requestType": "DeleteManagementServerRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/managementServers/*}", + "(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/*/managementServers/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateBackupVault": { + "requestType": "CreateBackupVaultRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupVaults", + "(google.api.http).body": "backup_vault", + "(google.api.method_signature)": "parent,backup_vault,backup_vault_id", + "(google.longrunning.operation_info).response_type": "BackupVault", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/backupVaults", + "body": "backup_vault" + } + }, + { + "(google.api.method_signature)": "parent,backup_vault,backup_vault_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupVault", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListBackupVaults": { + "requestType": "ListBackupVaultsRequest", + "responseType": "ListBackupVaultsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupVaults", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/backupVaults" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "FetchUsableBackupVaults": { + "requestType": "FetchUsableBackupVaultsRequest", + "responseType": "FetchUsableBackupVaultsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetBackupVault": { + "requestType": "GetBackupVaultRequest", + "responseType": "BackupVault", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupVaults/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateBackupVault": { + "requestType": "UpdateBackupVaultRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}", + "(google.api.http).body": "backup_vault", + "(google.api.method_signature)": "backup_vault,update_mask", + "(google.longrunning.operation_info).response_type": "BackupVault", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}", + "body": "backup_vault" + } + }, + { + "(google.api.method_signature)": "backup_vault,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupVault", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteBackupVault": { + "requestType": "DeleteBackupVaultRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupVaults/*}", + "(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/*/backupVaults/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListDataSources": { + "requestType": "ListDataSourcesRequest", + "responseType": "ListDataSourcesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDataSource": { + "requestType": "GetDataSourceRequest", + "responseType": "DataSource", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateDataSource": { + "requestType": "UpdateDataSourceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}", + "(google.api.http).body": "data_source", + "(google.api.method_signature)": "data_source,update_mask", + "(google.longrunning.operation_info).response_type": "DataSource", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}", + "body": "data_source" + } + }, + { + "(google.api.method_signature)": "data_source,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "DataSource", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListBackups": { + "requestType": "ListBackupsRequest", + "responseType": "ListBackupsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetBackup": { + "requestType": "GetBackupRequest", + "responseType": "Backup", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateBackup": { + "requestType": "UpdateBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "(google.api.http).body": "backup", + "(google.api.method_signature)": "backup,update_mask", + "(google.longrunning.operation_info).response_type": "Backup", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "body": "backup" + } + }, + { + "(google.api.method_signature)": "backup,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Backup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteBackup": { + "requestType": "DeleteBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "Backup", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Backup", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "RestoreBackup": { + "requestType": "RestoreBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "RestoreBackupResponse", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "RestoreBackupResponse", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateBackupPlan": { + "requestType": "CreateBackupPlanRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupPlans", + "(google.api.http).body": "backup_plan", + "(google.api.method_signature)": "parent,backup_plan,backup_plan_id", + "(google.longrunning.operation_info).response_type": "BackupPlan", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/backupPlans", + "body": "backup_plan" + } + }, + { + "(google.api.method_signature)": "parent,backup_plan,backup_plan_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPlan", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetBackupPlan": { + "requestType": "GetBackupPlanRequest", + "responseType": "BackupPlan", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupPlans/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupPlans/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBackupPlans": { + "requestType": "ListBackupPlansRequest", + "responseType": "ListBackupPlansResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupPlans", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/backupPlans" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteBackupPlan": { + "requestType": "DeleteBackupPlanRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupPlans/*}", + "(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/*/backupPlans/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateBackupPlanAssociation": { + "requestType": "CreateBackupPlanAssociationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", + "(google.api.http).body": "backup_plan_association", + "(google.api.method_signature)": "parent,backup_plan_association,backup_plan_association_id", + "(google.longrunning.operation_info).response_type": "BackupPlanAssociation", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", + "body": "backup_plan_association" + } + }, + { + "(google.api.method_signature)": "parent,backup_plan_association,backup_plan_association_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPlanAssociation", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetBackupPlanAssociation": { + "requestType": "GetBackupPlanAssociationRequest", + "responseType": "BackupPlanAssociation", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListBackupPlanAssociations": { + "requestType": "ListBackupPlanAssociationsRequest", + "responseType": "ListBackupPlanAssociationsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteBackupPlanAssociation": { + "requestType": "DeleteBackupPlanAssociationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}", + "(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/*/backupPlanAssociations/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "TriggerBackup": { + "requestType": "TriggerBackupRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name,rule_id", + "(google.longrunning.operation_info).response_type": "BackupPlanAssociation", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name,rule_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BackupPlanAssociation", + "metadata_type": "OperationMetadata" + } + } + ] + } + } + }, + "NetworkConfig": { + "fields": { + "network": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "peeringMode": { + "type": "PeeringMode", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "PeeringMode": { + "values": { + "PEERING_MODE_UNSPECIFIED": 0, + "PRIVATE_SERVICE_ACCESS": 1 + } + } + } + }, + "ManagementURI": { + "fields": { + "webUi": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "api": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "WorkforceIdentityBasedManagementURI": { + "fields": { + "firstPartyManagementUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "thirdPartyManagementUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "WorkforceIdentityBasedOAuth2ClientID": { + "fields": { + "firstPartyOauth2ClientId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "thirdPartyOauth2ClientId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ManagementServer": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/ManagementServer", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/managementServers/{managementserver}", + "(google.api.resource).plural": "managementServers", + "(google.api.resource).singular": "managementServer" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "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" + } + }, + "type": { + "type": "InstanceType", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "managementUri": { + "type": "ManagementURI", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "workforceIdentityBasedManagementUri": { + "type": "WorkforceIdentityBasedManagementURI", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "InstanceState", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "networks": { + "rule": "repeated", + "type": "NetworkConfig", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "etag": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "oauth2ClientId": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "workforceIdentityBasedOauth2ClientId": { + "type": "WorkforceIdentityBasedOAuth2ClientID", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "baProxyUri": { + "rule": "repeated", + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzs": { + "type": "google.protobuf.BoolValue", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzi": { + "type": "bool", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "InstanceType": { + "values": { + "INSTANCE_TYPE_UNSPECIFIED": 0, + "BACKUP_RESTORE": 1 + } + }, + "InstanceState": { + "values": { + "INSTANCE_STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "UPDATING": 3, + "DELETING": 4, + "REPAIRING": 5, + "MAINTENANCE": 6, + "ERROR": 7 + } + } + } + }, + "ListManagementServersRequest": { + "oneofs": { + "_filter": { + "oneof": [ + "filter" + ] + }, + "_orderBy": { + "oneof": [ + "orderBy" + ] + } + }, + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ListManagementServersResponse": { + "fields": { + "managementServers": { + "rule": "repeated", + "type": "ManagementServer", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetManagementServerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" + } + } + } + }, + "CreateManagementServerRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" + } + }, + "managementServerId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "managementServer": { + "type": "ManagementServer", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteManagementServerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" + } + }, + "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" + } + }, + "additionalInfo": { + "keyType": "string", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "BackupPlan": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/BackupPlan", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPlans/{backup_plan}", + "(google.api.resource).plural": "backupPlans", + "(google.api.resource).singular": "backupPlan" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupRules": { + "rule": "repeated", + "type": "BackupRule", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceType": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "etag": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupVault": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" + } + }, + "backupVaultServiceAccount": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "INACTIVE": 4 + } + } + } + }, + "BackupRule": { + "oneofs": { + "backupScheduleOneof": { + "oneof": [ + "standardSchedule" + ] + } + }, + "fields": { + "ruleId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "backupRetentionDays": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "standardSchedule": { + "type": "StandardSchedule", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "StandardSchedule": { + "fields": { + "recurrenceType": { + "type": "RecurrenceType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "hourlyFrequency": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "daysOfWeek": { + "rule": "repeated", + "type": "google.type.DayOfWeek", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "daysOfMonth": { + "rule": "repeated", + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "weekDayOfMonth": { + "type": "WeekDayOfMonth", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "months": { + "rule": "repeated", + "type": "google.type.Month", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "backupWindow": { + "type": "BackupWindow", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "timeZone": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "RecurrenceType": { + "values": { + "RECURRENCE_TYPE_UNSPECIFIED": 0, + "HOURLY": 1, + "DAILY": 2, + "WEEKLY": 3, + "MONTHLY": 4, + "YEARLY": 5 + } + } + } + }, + "BackupWindow": { + "fields": { + "startHourOfDay": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "endHourOfDay": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "WeekDayOfMonth": { + "fields": { + "weekOfMonth": { + "type": "WeekOfMonth", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dayOfWeek": { + "type": "google.type.DayOfWeek", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "WeekOfMonth": { + "values": { + "WEEK_OF_MONTH_UNSPECIFIED": 0, + "FIRST": 1, + "SECOND": 2, + "THIRD": 3, + "FOURTH": 4, + "LAST": 5 + } + } + } + }, + "CreateBackupPlanRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlan" + } + }, + "backupPlanId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupPlan": { + "type": "BackupPlan", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlansRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlan" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlansResponse": { + "fields": { + "backupPlans": { + "rule": "repeated", + "type": "BackupPlan", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetBackupPlanRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + } + } + }, + "DeleteBackupPlanRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "BackupPlanAssociation": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/BackupPlanAssociation", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}", + "(google.api.resource).plural": "backupPlanAssociations", + "(google.api.resource).singular": "backupPlanAssociation" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceType": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "resource": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupPlan": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "rulesConfigInfo": { + "rule": "repeated", + "type": "RuleConfigInfo", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataSource": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "INACTIVE": 4 + } + } + } + }, + "RuleConfigInfo": { + "fields": { + "ruleId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastBackupState": { + "type": "LastBackupState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastBackupError": { + "type": "google.rpc.Status", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastSuccessfulBackupConsistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "LastBackupState": { + "values": { + "LAST_BACKUP_STATE_UNSPECIFIED": 0, + "FIRST_BACKUP_PENDING": 1, + "PERMISSION_DENIED": 2, + "SUCCEEDED": 3, + "FAILED": 4 + } + } + } + }, + "CreateBackupPlanAssociationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "backupPlanAssociationId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupPlanAssociation": { + "type": "BackupPlanAssociation", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlanAssociationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupPlanAssociationsResponse": { + "fields": { + "backupPlanAssociations": { + "rule": "repeated", + "type": "BackupPlanAssociation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetBackupPlanAssociationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + } + } + }, + "DeleteBackupPlanAssociationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "TriggerBackupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "ruleId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "BackupVault": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/BackupVault", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}", + "(google.api.resource).plural": "backupVaults", + "(google.api.resource).singular": "backupVault" + }, + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_createTime": { + "oneof": [ + "createTime" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + }, + "_backupMinimumEnforcedRetentionDuration": { + "oneof": [ + "backupMinimumEnforcedRetentionDuration" + ] + }, + "_deletable": { + "oneof": [ + "deletable" + ] + }, + "_etag": { + "oneof": [ + "etag" + ] + }, + "_effectiveTime": { + "oneof": [ + "effectiveTime" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "backupMinimumEnforcedRetentionDuration": { + "type": "google.protobuf.Duration", + "id": 20, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "deletable": { + "type": "bool", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "etag": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "state": { + "type": "State", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "effectiveTime": { + "type": "google.protobuf.Timestamp", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "backupCount": { + "type": "int64", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceAccount": { + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "totalStoredBytes": { + "type": "int64", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uid": { + "type": "string", + "id": 21, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "annotations": { + "keyType": "string", + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "accessRestriction": { + "type": "AccessRestriction", + "id": 24, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "ERROR": 4 + } + }, + "AccessRestriction": { + "values": { + "ACCESS_RESTRICTION_UNSPECIFIED": 0, + "WITHIN_PROJECT": 1, + "WITHIN_ORGANIZATION": 2, + "UNRESTRICTED": 3 + } + } + } + }, + "DataSource": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/DataSource", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}", + "(google.api.resource).plural": "dataSources", + "(google.api.resource).singular": "dataSource" + }, + "oneofs": { + "_createTime": { + "oneof": [ + "createTime" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + }, + "_backupCount": { + "oneof": [ + "backupCount" + ] + }, + "_etag": { + "oneof": [ + "etag" + ] + }, + "_totalStoredBytes": { + "oneof": [ + "totalStoredBytes" + ] + }, + "sourceResource": { + "oneof": [ + "dataSourceGcpResource", + "dataSourceBackupApplianceApplication" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "state": { + "type": "State", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "backupCount": { + "type": "int64", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "etag": { + "type": "string", + "id": 14, + "options": { + "proto3_optional": true + } + }, + "totalStoredBytes": { + "type": "int64", + "id": 23, + "options": { + "proto3_optional": true + } + }, + "configState": { + "type": "BackupConfigState", + "id": 24, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupConfigInfo": { + "type": "BackupConfigInfo", + "id": 25, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dataSourceGcpResource": { + "type": "DataSourceGcpResource", + "id": 26 + }, + "dataSourceBackupApplianceApplication": { + "type": "DataSourceBackupApplianceApplication", + "id": 27 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "ERROR": 4 + } + } + } + }, + "BackupConfigInfo": { + "oneofs": { + "backupConfig": { + "oneof": [ + "gcpBackupConfig", + "backupApplianceBackupConfig" + ] + } + }, + "fields": { + "lastBackupState": { + "type": "LastBackupState", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastSuccessfulBackupConsistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastBackupError": { + "type": "google.rpc.Status", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gcpBackupConfig": { + "type": "GcpBackupConfig", + "id": 4 + }, + "backupApplianceBackupConfig": { + "type": "BackupApplianceBackupConfig", + "id": 5 + } + }, + "nested": { + "LastBackupState": { + "values": { + "LAST_BACKUP_STATE_UNSPECIFIED": 0, + "FIRST_BACKUP_PENDING": 1, + "SUCCEEDED": 2, + "FAILED": 3, + "PERMISSION_DENIED": 4 + } + } + } + }, + "GcpBackupConfig": { + "fields": { + "backupPlan": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "backupPlanDescription": { + "type": "string", + "id": 2 + }, + "backupPlanAssociation": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" + } + }, + "backupPlanRules": { + "rule": "repeated", + "type": "string", + "id": 4 + } + } + }, + "BackupApplianceBackupConfig": { + "fields": { + "backupApplianceName": { + "type": "string", + "id": 1 + }, + "backupApplianceId": { + "type": "int64", + "id": 2 + }, + "slaId": { + "type": "int64", + "id": 3 + }, + "applicationName": { + "type": "string", + "id": 4 + }, + "hostName": { + "type": "string", + "id": 5 + }, + "sltName": { + "type": "string", + "id": 6 + }, + "slpName": { + "type": "string", + "id": 7 + } + } + }, + "DataSourceGcpResource": { + "oneofs": { + "gcpResourceProperties": { + "oneof": [ + "computeInstanceDatasourceProperties" + ] + } + }, + "fields": { + "gcpResourcename": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "location": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "computeInstanceDatasourceProperties": { + "type": "ComputeInstanceDataSourceProperties", + "id": 4 + } + } + }, + "DataSourceBackupApplianceApplication": { + "fields": { + "applicationName": { + "type": "string", + "id": 1 + }, + "backupAppliance": { + "type": "string", + "id": 2 + }, + "applianceId": { + "type": "int64", + "id": 3 + }, + "type": { + "type": "string", + "id": 4 + }, + "applicationId": { + "type": "int64", + "id": 8 + }, + "hostname": { + "type": "string", + "id": 6 + }, + "hostId": { + "type": "int64", + "id": 7 + } + } + }, + "ServiceLockInfo": { + "fields": { + "operation": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "BackupApplianceLockInfo": { + "oneofs": { + "lockSource": { + "oneof": [ + "jobName", + "backupImage", + "slaId" + ] + } + }, + "fields": { + "backupApplianceId": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupApplianceName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "lockReason": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "jobName": { + "type": "string", + "id": 6 + }, + "backupImage": { + "type": "string", + "id": 7 + }, + "slaId": { + "type": "int64", + "id": 8 + } + } + }, + "BackupLock": { + "oneofs": { + "ClientLockInfo": { + "oneof": [ + "backupApplianceLockInfo", + "serviceLockInfo" + ] + } + }, + "fields": { + "lockUntilTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupApplianceLockInfo": { + "type": "BackupApplianceLockInfo", + "id": 3 + }, + "serviceLockInfo": { + "type": "ServiceLockInfo", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Backup": { + "options": { + "(google.api.resource).type": "backupdr.googleapis.com/Backup", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}", + "(google.api.resource).plural": "backups", + "(google.api.resource).singular": "backup" + }, + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_createTime": { + "oneof": [ + "createTime" + ] + }, + "_updateTime": { + "oneof": [ + "updateTime" + ] + }, + "_enforcedRetentionEndTime": { + "oneof": [ + "enforcedRetentionEndTime" + ] + }, + "_expireTime": { + "oneof": [ + "expireTime" + ] + }, + "_consistencyTime": { + "oneof": [ + "consistencyTime" + ] + }, + "_etag": { + "oneof": [ + "etag" + ] + }, + "backupProperties": { + "oneof": [ + "computeInstanceBackupProperties", + "backupApplianceBackupProperties" + ] + }, + "planInfo": { + "oneof": [ + "gcpBackupPlanInfo" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "enforcedRetentionEndTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "consistencyTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "etag": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "state": { + "type": "State", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "serviceLocks": { + "rule": "repeated", + "type": "BackupLock", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupApplianceLocks": { + "rule": "repeated", + "type": "BackupLock", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "computeInstanceBackupProperties": { + "type": "ComputeInstanceBackupProperties", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupApplianceBackupProperties": { + "type": "BackupApplianceBackupProperties", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "backupType": { + "type": "BackupType", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gcpBackupPlanInfo": { + "type": "GCPBackupPlanInfo", + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceSizeBytes": { + "type": "int64", + "id": 23, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "DELETING": 3, + "ERROR": 4 + } + }, + "BackupType": { + "values": { + "BACKUP_TYPE_UNSPECIFIED": 0, + "SCHEDULED": 1, + "ON_DEMAND": 2 + } + }, + "GCPBackupPlanInfo": { + "fields": { + "backupPlan": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" + } + }, + "backupPlanRuleId": { + "type": "string", + "id": 2 + } + } + } + } + }, + "CreateBackupVaultRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" + } + }, + "backupVaultId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupVault": { + "type": "BackupVault", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupVaultsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "view": { + "type": "BackupVaultView", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupVaultsResponse": { + "fields": { + "backupVaults": { + "rule": "repeated", + "type": "BackupVault", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "FetchUsableBackupVaultsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchUsableBackupVaultsResponse": { + "fields": { + "backupVaults": { + "rule": "repeated", + "type": "BackupVault", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetBackupVaultRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" + } + }, + "view": { + "type": "BackupVaultView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateBackupVaultRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backupVault": { + "type": "BackupVault", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(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" + } + } + } + }, + "DeleteBackupVaultRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "force": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "etag": { + "type": "string", + "id": 4 + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataSourcesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/DataSource" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataSourcesResponse": { + "fields": { + "dataSources": { + "rule": "repeated", + "type": "DataSource", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetDataSourceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" + } + } + } + }, + "UpdateDataSourceRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataSource": { + "type": "DataSource", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowMissing": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "backupdr.googleapis.com/Backup" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "view": { + "type": "BackupView", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBackupsResponse": { + "fields": { + "backups": { + "rule": "repeated", + "type": "Backup", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetBackupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" + } + }, + "view": { + "type": "BackupView", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateBackupRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "backup": { + "type": "Backup", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteBackupRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RestoreBackupRequest": { + "oneofs": { + "targetEnvironment": { + "oneof": [ + "computeInstanceTargetEnvironment" + ] + }, + "instanceProperties": { + "oneof": [ + "computeInstanceRestoreProperties" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "computeInstanceTargetEnvironment": { + "type": "ComputeInstanceTargetEnvironment", + "id": 3 + }, + "computeInstanceRestoreProperties": { + "type": "ComputeInstanceRestoreProperties", + "id": 4 + } + } + }, + "RestoreBackupResponse": { + "fields": { + "targetResource": { + "type": "TargetResource", + "id": 1 + } + } + }, + "TargetResource": { + "oneofs": { + "targetResourceInfo": { + "oneof": [ + "gcpResource" + ] + } + }, + "fields": { + "gcpResource": { + "type": "GcpResource", + "id": 1 + } + } + }, + "GcpResource": { + "fields": { + "gcpResourcename": { + "type": "string", + "id": 1 + }, + "location": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + } + } + }, + "BackupConfigState": { + "values": { + "BACKUP_CONFIG_STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "PASSIVE": 2 + } + }, + "BackupView": { + "values": { + "BACKUP_VIEW_UNSPECIFIED": 0, + "BACKUP_VIEW_BASIC": 1, + "BACKUP_VIEW_FULL": 2 + } + }, + "BackupVaultView": { + "values": { + "BACKUP_VAULT_VIEW_UNSPECIFIED": 0, + "BACKUP_VAULT_VIEW_BASIC": 1, + "BACKUP_VAULT_VIEW_FULL": 2 + } + }, + "BackupApplianceBackupProperties": { + "oneofs": { + "_generationId": { + "oneof": [ + "generationId" + ] + }, + "_finalizeTime": { + "oneof": [ + "finalizeTime" + ] + }, + "_recoveryRangeStartTime": { + "oneof": [ + "recoveryRangeStartTime" + ] + }, + "_recoveryRangeEndTime": { + "oneof": [ + "recoveryRangeEndTime" + ] + } + }, + "fields": { + "generationId": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "finalizeTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "recoveryRangeStartTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "recoveryRangeEndTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ComputeInstanceBackupProperties": { + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_tags": { + "oneof": [ + "tags" + ] + }, + "_machineType": { + "oneof": [ + "machineType" + ] + }, + "_canIpForward": { + "oneof": [ + "canIpForward" + ] + }, + "_metadata": { + "oneof": [ + "metadata" + ] + }, + "_scheduling": { + "oneof": [ + "scheduling" + ] + }, + "_minCpuPlatform": { + "oneof": [ + "minCpuPlatform" + ] + }, + "_keyRevocationActionType": { + "oneof": [ + "keyRevocationActionType" + ] + }, + "_sourceInstance": { + "oneof": [ + "sourceInstance" + ] + } + }, + "fields": { + "description": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "tags": { + "type": "Tags", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "machineType": { + "type": "string", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "canIpForward": { + "type": "bool", + "id": 4, + "options": { + "proto3_optional": true + } + }, + "networkInterface": { + "rule": "repeated", + "type": "NetworkInterface", + "id": 5 + }, + "disk": { + "rule": "repeated", + "type": "AttachedDisk", + "id": 6 + }, + "metadata": { + "type": "Metadata", + "id": 7, + "options": { + "proto3_optional": true + } + }, + "serviceAccount": { + "rule": "repeated", + "type": "ServiceAccount", + "id": 8 + }, + "scheduling": { + "type": "Scheduling", + "id": 9, + "options": { + "proto3_optional": true + } + }, + "guestAccelerator": { + "rule": "repeated", + "type": "AcceleratorConfig", + "id": 10 + }, + "minCpuPlatform": { + "type": "string", + "id": 11, + "options": { + "proto3_optional": true + } + }, + "keyRevocationActionType": { + "type": "KeyRevocationActionType", + "id": 12, + "options": { + "proto3_optional": true + } + }, + "sourceInstance": { + "type": "string", + "id": 13, + "options": { + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 14 + } + } + }, + "ComputeInstanceRestoreProperties": { + "oneofs": { + "_name": { + "oneof": [ + "name" + ] + }, + "_advancedMachineFeatures": { + "oneof": [ + "advancedMachineFeatures" + ] + }, + "_canIpForward": { + "oneof": [ + "canIpForward" + ] + }, + "_confidentialInstanceConfig": { + "oneof": [ + "confidentialInstanceConfig" + ] + }, + "_deletionProtection": { + "oneof": [ + "deletionProtection" + ] + }, + "_description": { + "oneof": [ + "description" + ] + }, + "_displayDevice": { + "oneof": [ + "displayDevice" + ] + }, + "_hostname": { + "oneof": [ + "hostname" + ] + }, + "_instanceEncryptionKey": { + "oneof": [ + "instanceEncryptionKey" + ] + }, + "_keyRevocationActionType": { + "oneof": [ + "keyRevocationActionType" + ] + }, + "_machineType": { + "oneof": [ + "machineType" + ] + }, + "_metadata": { + "oneof": [ + "metadata" + ] + }, + "_minCpuPlatform": { + "oneof": [ + "minCpuPlatform" + ] + }, + "_networkPerformanceConfig": { + "oneof": [ + "networkPerformanceConfig" + ] + }, + "_params": { + "oneof": [ + "params" + ] + }, + "_privateIpv6GoogleAccess": { + "oneof": [ + "privateIpv6GoogleAccess" + ] + }, + "_allocationAffinity": { + "oneof": [ + "allocationAffinity" + ] + }, + "_scheduling": { + "oneof": [ + "scheduling" + ] + }, + "_tags": { + "oneof": [ + "tags" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "advancedMachineFeatures": { + "type": "AdvancedMachineFeatures", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "canIpForward": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "confidentialInstanceConfig": { + "type": "ConfidentialInstanceConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "deletionProtection": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "description": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "disks": { + "rule": "repeated", + "type": "AttachedDisk", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayDevice": { + "type": "DisplayDevice", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "guestAccelerators": { + "rule": "repeated", + "type": "AcceleratorConfig", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "hostname": { + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "instanceEncryptionKey": { + "type": "CustomerEncryptionKey", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "keyRevocationActionType": { + "type": "KeyRevocationActionType", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "machineType": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "metadata": { + "type": "Metadata", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "minCpuPlatform": { + "type": "string", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "networkInterfaces": { + "rule": "repeated", + "type": "NetworkInterface", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "networkPerformanceConfig": { + "type": "NetworkPerformanceConfig", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "params": { + "type": "InstanceParams", + "id": 19, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY", + "proto3_optional": true + } + }, + "privateIpv6GoogleAccess": { + "type": "InstancePrivateIpv6GoogleAccess", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "allocationAffinity": { + "type": "AllocationAffinity", + "id": 21, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "resourcePolicies": { + "rule": "repeated", + "type": "string", + "id": 22, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "scheduling": { + "type": "Scheduling", + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "serviceAccounts": { + "rule": "repeated", + "type": "ServiceAccount", + "id": 24, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tags": { + "type": "Tags", + "id": 26, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "InstancePrivateIpv6GoogleAccess": { + "values": { + "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": 0, + "INHERIT_FROM_SUBNETWORK": 1, + "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE": 2, + "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE": 3 + } + } + } + }, + "ComputeInstanceTargetEnvironment": { + "fields": { + "project": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ComputeInstanceDataSourceProperties": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "machineType": { + "type": "string", + "id": 3 + }, + "totalDiskCount": { + "type": "int64", + "id": 4 + }, + "totalDiskSizeGb": { + "type": "int64", + "id": 5 + } + } + }, + "AdvancedMachineFeatures": { + "oneofs": { + "_enableNestedVirtualization": { + "oneof": [ + "enableNestedVirtualization" + ] + }, + "_threadsPerCore": { + "oneof": [ + "threadsPerCore" + ] + }, + "_visibleCoreCount": { + "oneof": [ + "visibleCoreCount" + ] + }, + "_enableUefiNetworking": { + "oneof": [ + "enableUefiNetworking" + ] + } + }, + "fields": { + "enableNestedVirtualization": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "threadsPerCore": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "visibleCoreCount": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "enableUefiNetworking": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ConfidentialInstanceConfig": { + "oneofs": { + "_enableConfidentialCompute": { + "oneof": [ + "enableConfidentialCompute" + ] + } + }, + "fields": { + "enableConfidentialCompute": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "DisplayDevice": { + "oneofs": { + "_enableDisplay": { + "oneof": [ + "enableDisplay" + ] + } + }, + "fields": { + "enableDisplay": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "AcceleratorConfig": { + "oneofs": { + "_acceleratorType": { + "oneof": [ + "acceleratorType" + ] + }, + "_acceleratorCount": { + "oneof": [ + "acceleratorCount" + ] + } + }, + "fields": { + "acceleratorType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "acceleratorCount": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "CustomerEncryptionKey": { + "oneofs": { + "key": { + "oneof": [ + "rawKey", + "rsaEncryptedKey", + "kmsKeyName" + ] + }, + "_kmsKeyServiceAccount": { + "oneof": [ + "kmsKeyServiceAccount" + ] + } + }, + "fields": { + "rawKey": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "rsaEncryptedKey": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kmsKeyName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kmsKeyServiceAccount": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "Entry": { + "oneofs": { + "_key": { + "oneof": [ + "key" + ] + }, + "_value": { + "oneof": [ + "value" + ] + } + }, + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "Metadata": { + "fields": { + "items": { + "rule": "repeated", + "type": "Entry", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "NetworkInterface": { + "oneofs": { + "_network": { + "oneof": [ + "network" + ] + }, + "_subnetwork": { + "oneof": [ + "subnetwork" + ] + }, + "_ipAddress": { + "oneof": [ + "ipAddress" + ] + }, + "_ipv6Address": { + "oneof": [ + "ipv6Address" + ] + }, + "_internalIpv6PrefixLength": { + "oneof": [ + "internalIpv6PrefixLength" + ] + }, + "_name": { + "oneof": [ + "name" + ] + }, + "_stackType": { + "oneof": [ + "stackType" + ] + }, + "_ipv6AccessType": { + "oneof": [ + "ipv6AccessType" + ] + }, + "_queueCount": { + "oneof": [ + "queueCount" + ] + }, + "_nicType": { + "oneof": [ + "nicType" + ] + }, + "_networkAttachment": { + "oneof": [ + "networkAttachment" + ] + } + }, + "fields": { + "network": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "subnetwork": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "ipAddress": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "IPV4", + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "ipv6Address": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "IPV6", + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "internalIpv6PrefixLength": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "name": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "accessConfigs": { + "rule": "repeated", + "type": "AccessConfig", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ipv6AccessConfigs": { + "rule": "repeated", + "type": "AccessConfig", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "aliasIpRanges": { + "rule": "repeated", + "type": "AliasIpRange", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "stackType": { + "type": "StackType", + "id": 10, + "options": { + "proto3_optional": true + } + }, + "ipv6AccessType": { + "type": "Ipv6AccessType", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "queueCount": { + "type": "int32", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "nicType": { + "type": "NicType", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "networkAttachment": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "StackType": { + "values": { + "STACK_TYPE_UNSPECIFIED": 0, + "IPV4_ONLY": 1, + "IPV4_IPV6": 2 + } + }, + "Ipv6AccessType": { + "values": { + "UNSPECIFIED_IPV6_ACCESS_TYPE": 0, + "INTERNAL": 1, + "EXTERNAL": 2 + } + }, + "NicType": { + "values": { + "NIC_TYPE_UNSPECIFIED": 0, + "VIRTIO_NET": 1, + "GVNIC": 2 + } + } + } + }, + "NetworkPerformanceConfig": { + "oneofs": { + "_totalEgressBandwidthTier": { + "oneof": [ + "totalEgressBandwidthTier" + ] + } + }, + "fields": { + "totalEgressBandwidthTier": { + "type": "Tier", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "Tier": { + "values": { + "TIER_UNSPECIFIED": 0, + "DEFAULT": 1, + "TIER_1": 2 + } + } + } + }, + "AccessConfig": { + "oneofs": { + "_type": { + "oneof": [ + "type" + ] + }, + "_name": { + "oneof": [ + "name" + ] + }, + "_externalIp": { + "oneof": [ + "externalIp" + ] + }, + "_externalIpv6": { + "oneof": [ + "externalIpv6" + ] + }, + "_externalIpv6PrefixLength": { + "oneof": [ + "externalIpv6PrefixLength" + ] + }, + "_setPublicPtr": { + "oneof": [ + "setPublicPtr" + ] + }, + "_publicPtrDomainName": { + "oneof": [ + "publicPtrDomainName" + ] + }, + "_networkTier": { + "oneof": [ + "networkTier" + ] + } + }, + "fields": { + "type": { + "type": "AccessType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "name": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "externalIp": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "externalIpv6": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "externalIpv6PrefixLength": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "setPublicPtr": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "publicPtrDomainName": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "networkTier": { + "type": "NetworkTier", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "AccessType": { + "values": { + "ACCESS_TYPE_UNSPECIFIED": 0, + "ONE_TO_ONE_NAT": 1, + "DIRECT_IPV6": 2 + } + }, + "NetworkTier": { + "values": { + "NETWORK_TIER_UNSPECIFIED": 0, + "PREMIUM": 1, + "STANDARD": 2 + } + } + } + }, + "AliasIpRange": { + "oneofs": { + "_ipCidrRange": { + "oneof": [ + "ipCidrRange" + ] + }, + "_subnetworkRangeName": { + "oneof": [ + "subnetworkRangeName" + ] + } + }, + "fields": { + "ipCidrRange": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "subnetworkRangeName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "InstanceParams": { + "fields": { + "resourceManagerTags": { + "keyType": "string", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AllocationAffinity": { + "oneofs": { + "_consumeAllocationType": { + "oneof": [ + "consumeAllocationType" + ] + }, + "_key": { + "oneof": [ + "key" + ] + } + }, + "fields": { + "consumeAllocationType": { + "type": "Type", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "key": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "values": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "NO_RESERVATION": 1, + "ANY_RESERVATION": 2, + "SPECIFIC_RESERVATION": 3 + } + } + } + }, + "Scheduling": { + "oneofs": { + "_onHostMaintenance": { + "oneof": [ + "onHostMaintenance" + ] + }, + "_automaticRestart": { + "oneof": [ + "automaticRestart" + ] + }, + "_preemptible": { + "oneof": [ + "preemptible" + ] + }, + "_minNodeCpus": { + "oneof": [ + "minNodeCpus" + ] + }, + "_provisioningModel": { + "oneof": [ + "provisioningModel" + ] + }, + "_instanceTerminationAction": { + "oneof": [ + "instanceTerminationAction" + ] + }, + "_localSsdRecoveryTimeout": { + "oneof": [ + "localSsdRecoveryTimeout" + ] + } + }, + "fields": { + "onHostMaintenance": { + "type": "OnHostMaintenance", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "automaticRestart": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "preemptible": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "nodeAffinities": { + "rule": "repeated", + "type": "NodeAffinity", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "minNodeCpus": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "provisioningModel": { + "type": "ProvisioningModel", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "instanceTerminationAction": { + "type": "InstanceTerminationAction", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "localSsdRecoveryTimeout": { + "type": "SchedulingDuration", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "OnHostMaintenance": { + "values": { + "ON_HOST_MAINTENANCE_UNSPECIFIED": 0, + "TERMINATE": 1, + "MIGRATE": 1000 + } + }, + "NodeAffinity": { + "oneofs": { + "_key": { + "oneof": [ + "key" + ] + }, + "_operator": { + "oneof": [ + "operator" + ] + } + }, + "fields": { + "key": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "operator": { + "type": "Operator", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "values": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Operator": { + "values": { + "OPERATOR_UNSPECIFIED": 0, + "IN": 1, + "NOT_IN": 2 + } + } + } + }, + "ProvisioningModel": { + "values": { + "PROVISIONING_MODEL_UNSPECIFIED": 0, + "STANDARD": 1, + "SPOT": 2 + } + }, + "InstanceTerminationAction": { + "values": { + "INSTANCE_TERMINATION_ACTION_UNSPECIFIED": 0, + "DELETE": 1, + "STOP": 2 + } + } + } + }, + "SchedulingDuration": { + "oneofs": { + "_seconds": { + "oneof": [ + "seconds" + ] + }, + "_nanos": { + "oneof": [ + "nanos" + ] + } + }, + "fields": { + "seconds": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "nanos": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ServiceAccount": { + "oneofs": { + "_email": { + "oneof": [ + "email" + ] + } + }, + "fields": { + "email": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "scopes": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Tags": { + "fields": { + "items": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AttachedDisk": { + "oneofs": { + "_initializeParams": { + "oneof": [ + "initializeParams" + ] + }, + "_deviceName": { + "oneof": [ + "deviceName" + ] + }, + "_kind": { + "oneof": [ + "kind" + ] + }, + "_diskTypeDeprecated": { + "oneof": [ + "diskTypeDeprecated" + ] + }, + "_mode": { + "oneof": [ + "mode" + ] + }, + "_source": { + "oneof": [ + "source" + ] + }, + "_index": { + "oneof": [ + "index" + ] + }, + "_boot": { + "oneof": [ + "boot" + ] + }, + "_autoDelete": { + "oneof": [ + "autoDelete" + ] + }, + "_diskInterface": { + "oneof": [ + "diskInterface" + ] + }, + "_diskEncryptionKey": { + "oneof": [ + "diskEncryptionKey" + ] + }, + "_diskSizeGb": { + "oneof": [ + "diskSizeGb" + ] + }, + "_savedState": { + "oneof": [ + "savedState" + ] + }, + "_diskType": { + "oneof": [ + "diskType" + ] + }, + "_type": { + "oneof": [ + "type" + ] + } + }, + "fields": { + "initializeParams": { + "type": "InitializeParams", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "deviceName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "kind": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "diskTypeDeprecated": { + "type": "DiskType", + "id": 6, + "options": { + "deprecated": true, + "proto3_optional": true + } + }, + "mode": { + "type": "DiskMode", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "source": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "index": { + "type": "int64", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "boot": { + "type": "bool", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "autoDelete": { + "type": "bool", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "license": { + "rule": "repeated", + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "diskInterface": { + "type": "DiskInterface", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "guestOsFeature": { + "rule": "repeated", + "type": "GuestOsFeature", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "diskEncryptionKey": { + "type": "CustomerEncryptionKey", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "diskSizeGb": { + "type": "int64", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "savedState": { + "type": "DiskSavedState", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "diskType": { + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "type": { + "type": "DiskType", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + }, + "nested": { + "InitializeParams": { + "oneofs": { + "_diskName": { + "oneof": [ + "diskName" + ] + } + }, + "fields": { + "diskName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "replicaZones": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DiskType": { + "values": { + "DISK_TYPE_UNSPECIFIED": 0, + "SCRATCH": 1, + "PERSISTENT": 2 + } + }, + "DiskMode": { + "values": { + "DISK_MODE_UNSPECIFIED": 0, + "READ_WRITE": 1, + "READ_ONLY": 2, + "LOCKED": 3 + } + }, + "DiskInterface": { + "values": { + "DISK_INTERFACE_UNSPECIFIED": 0, + "SCSI": 1, + "NVME": 2, + "NVDIMM": 3, + "ISCSI": 4 + } + }, + "DiskSavedState": { + "values": { + "DISK_SAVED_STATE_UNSPECIFIED": 0, + "PRESERVED": 1 + } + } + } + }, + "GuestOsFeature": { + "oneofs": { + "_type": { + "oneof": [ + "type" + ] + } + }, + "fields": { + "type": { + "type": "FeatureType", + "id": 1, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "FeatureType": { + "values": { + "FEATURE_TYPE_UNSPECIFIED": 0, + "VIRTIO_SCSI_MULTIQUEUE": 1, + "WINDOWS": 2, + "MULTI_IP_SUBNET": 3, + "UEFI_COMPATIBLE": 4, + "SECURE_BOOT": 5, + "GVNIC": 6, + "SEV_CAPABLE": 7, + "BARE_METAL_LINUX_COMPATIBLE": 8, + "SUSPEND_RESUME_COMPATIBLE": 9, + "SEV_LIVE_MIGRATABLE": 10, + "SEV_SNP_CAPABLE": 11, + "TDX_CAPABLE": 12, + "IDPF": 13, + "SEV_LIVE_MIGRATABLE_V2": 14 + } + } + } + }, + "KeyRevocationActionType": { + "values": { + "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": 0, + "NONE": 1, + "STOP": 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 + } + }, + "fieldInfo": { + "type": "google.api.FieldInfo", + "id": 291403980, + "extend": "google.protobuf.FieldOptions" + }, + "FieldInfo": { + "fields": { + "format": { + "type": "Format", + "id": 1 + } + }, + "nested": { + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "UUID4": 1, + "IPV4": 2, + "IPV6": 3, + "IPV4_OR_IPV6": 4 + } + } + } + }, + "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 + } + } + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Empty": { + "fields": {} + }, + "DoubleValue": { + "fields": { + "value": { + "type": "double", + "id": 1 + } + } + }, + "FloatValue": { + "fields": { + "value": { + "type": "float", + "id": 1 + } + } + }, + "Int64Value": { + "fields": { + "value": { + "type": "int64", + "id": 1 + } + } + }, + "UInt64Value": { + "fields": { + "value": { + "type": "uint64", + "id": 1 + } + } + }, + "Int32Value": { + "fields": { + "value": { + "type": "int32", + "id": 1 + } + } + }, + "UInt32Value": { + "fields": { + "value": { + "type": "uint32", + "id": 1 + } + } + }, + "BoolValue": { + "fields": { + "value": { + "type": "bool", + "id": 1 + } + } + }, + "StringValue": { + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "BytesValue": { + "fields": { + "value": { + "type": "bytes", + "id": 1 + } + } + } + } + }, + "type": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/type/month;month", + "java_multiple_files": true, + "java_outer_classname": "MonthProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "DayOfWeek": { + "values": { + "DAY_OF_WEEK_UNSPECIFIED": 0, + "MONDAY": 1, + "TUESDAY": 2, + "WEDNESDAY": 3, + "THURSDAY": 4, + "FRIDAY": 5, + "SATURDAY": 6, + "SUNDAY": 7 + } + }, + "Month": { + "values": { + "MONTH_UNSPECIFIED": 0, + "JANUARY": 1, + "FEBRUARY": 2, + "MARCH": 3, + "APRIL": 4, + "MAY": 5, + "JUNE": 6, + "JULY": 7, + "AUGUST": 8, + "SEPTEMBER": 9, + "OCTOBER": 10, + "NOVEMBER": 11, + "DECEMBER": 12 + } + } + } + }, + "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 + } + } + } + } + }, + "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 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan.js new file mode 100644 index 00000000000..e64200d286e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan.js @@ -0,0 +1,91 @@ +// 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 +// +// 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, backupPlanId, backupPlan) { + // [START backupdr_v1_generated_BackupDR_CreateBackupPlan_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 `BackupPlan` project and location in the format + * `projects/{project}/locations/{location}`. In Cloud BackupDR locations + * map to GCP regions, for example **us-central1**. + */ + // const parent = 'abc123' + /** + * Required. The name of the `BackupPlan` to create. The name must be unique + * for the specified project and location.The name must start with a lowercase + * letter followed by up to 62 lowercase letters, numbers, or hyphens. + * Pattern, /[a-z][a-z0-9-]{,62}/. + */ + // const backupPlanId = 'abc123' + /** + * Required. The `BackupPlan` resource object to create. + */ + // const backupPlan = {} + /** + * Optional. An optional 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 t + * he 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callCreateBackupPlan() { + // Construct request + const request = { + parent, + backupPlanId, + backupPlan, + }; + + // Run request + const [operation] = await backupdrClient.createBackupPlan(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateBackupPlan(); + // [END backupdr_v1_generated_BackupDR_CreateBackupPlan_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-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan_association.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan_association.js new file mode 100644 index 00000000000..11a85b7c441 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan_association.js @@ -0,0 +1,89 @@ +// 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 +// +// 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, backupPlanAssociationId, backupPlanAssociation) { + // [START backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_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 backup plan association project and location in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations + * map to GCP regions, for example **us-central1**. + */ + // const parent = 'abc123' + /** + * Required. The name of the backup plan association to create. The name must + * be unique for the specified project and location. + */ + // const backupPlanAssociationId = 'abc123' + /** + * Required. The resource being created + */ + // const backupPlanAssociation = {} + /** + * Optional. An optional 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 t + * he 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callCreateBackupPlanAssociation() { + // Construct request + const request = { + parent, + backupPlanAssociationId, + backupPlanAssociation, + }; + + // Run request + const [operation] = await backupdrClient.createBackupPlanAssociation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateBackupPlanAssociation(); + // [END backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_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-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_vault.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_vault.js new file mode 100644 index 00000000000..2fe111a58f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_vault.js @@ -0,0 +1,93 @@ +// 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 +// +// 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, backupVaultId, backupVault) { + // [START backupdr_v1_generated_BackupDR_CreateBackupVault_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. Value for parent. + */ + // const parent = 'abc123' + /** + * Required. ID of the requesting object + * If auto-generating ID server-side, remove this field and + * backup_vault_id from the method_signature of Create RPC + */ + // const backupVaultId = 'abc123' + /** + * Required. The resource being created + */ + // const backupVault = {} + /** + * Optional. An optional 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 request, but do not perform mutations. + * The default is 'false'. + */ + // const validateOnly = true + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callCreateBackupVault() { + // Construct request + const request = { + parent, + backupVaultId, + backupVault, + }; + + // Run request + const [operation] = await backupdrClient.createBackupVault(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateBackupVault(); + // [END backupdr_v1_generated_BackupDR_CreateBackupVault_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-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js new file mode 100644 index 00000000000..f14ca310e86 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js @@ -0,0 +1,90 @@ +// 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 +// +// 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, managementServerId, managementServer) { + // [START backupdr_v1_generated_BackupDR_CreateManagementServer_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 management server project and location in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR + * locations map to Google Cloud regions, for example **us-central1**. + */ + // const parent = 'abc123' + /** + * Required. The name of the management server to create. The name must be + * unique for the specified project and location. + */ + // const managementServerId = 'abc123' + /** + * Required. A management server + * resource google.cloud.backupdr.v1.ManagementServer + */ + // const managementServer = {} + /** + * Optional. An optional 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callCreateManagementServer() { + // Construct request + const request = { + parent, + managementServerId, + managementServer, + }; + + // Run request + const [operation] = await backupdrClient.createManagementServer(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateManagementServer(); + // [END backupdr_v1_generated_BackupDR_CreateManagementServer_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-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup.js new file mode 100644 index 00000000000..fc987c807df --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup.js @@ -0,0 +1,76 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_DeleteBackup_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 resource. + */ + // const name = 'abc123' + /** + * Optional. An optional 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callDeleteBackup() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.deleteBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteBackup(); + // [END backupdr_v1_generated_BackupDR_DeleteBackup_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-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan.js new file mode 100644 index 00000000000..808b705c69b --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan.js @@ -0,0 +1,77 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_DeleteBackupPlan_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 of the `BackupPlan` to delete. + * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + */ + // const name = 'abc123' + /** + * Optional. An optional 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callDeleteBackupPlan() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.deleteBackupPlan(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteBackupPlan(); + // [END backupdr_v1_generated_BackupDR_DeleteBackupPlan_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-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan_association.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan_association.js new file mode 100644 index 00000000000..50f03c1829e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan_association.js @@ -0,0 +1,77 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_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 backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + */ + // const name = 'abc123' + /** + * Optional. An optional 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callDeleteBackupPlanAssociation() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.deleteBackupPlanAssociation(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteBackupPlanAssociation(); + // [END backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_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-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_vault.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_vault.js new file mode 100644 index 00000000000..6252bf9d7cf --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_vault.js @@ -0,0 +1,97 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_DeleteBackupVault_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 resource. + */ + // const name = 'abc123' + /** + * Optional. An optional 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 data source from this backup vault will also + * be deleted. + */ + // const force = true + /** + * The current etag of the backup vault. + * If an etag is provided and does not match the current etag of the + * connection, deletion will be blocked. + */ + // const etag = 'abc123' + /** + * Optional. Only validate the request, but do not perform mutations. + * The default is 'false'. + */ + // const validateOnly = true + /** + * Optional. If true and the BackupVault is not found, the request will + * succeed but no action will be taken. + */ + // const allowMissing = true + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callDeleteBackupVault() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.deleteBackupVault(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteBackupVault(); + // [END backupdr_v1_generated_BackupDR_DeleteBackupVault_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-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js new file mode 100644 index 00000000000..c27febd63fd --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js @@ -0,0 +1,76 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_DeleteManagementServer_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 resource + */ + // const name = 'abc123' + /** + * Optional. An optional 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callDeleteManagementServer() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.deleteManagementServer(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteManagementServer(); + // [END backupdr_v1_generated_BackupDR_DeleteManagementServer_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-backupdr/v1/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js new file mode 100644 index 00000000000..6b32fe8b894 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js @@ -0,0 +1,85 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results. + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callFetchUsableBackupVaults() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.fetchUsableBackupVaultsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callFetchUsableBackupVaults(); + // [END backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_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-backupdr/v1/samples/generated/v1/backup_d_r.get_backup.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup.js new file mode 100644 index 00000000000..25d41ba5f59 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup.js @@ -0,0 +1,67 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_GetBackup_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 data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' + */ + // const name = 'abc123' + /** + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + */ + // const view = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetBackup() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getBackup(request); + console.log(response); + } + + callGetBackup(); + // [END backupdr_v1_generated_BackupDR_GetBackup_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-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan.js new file mode 100644 index 00000000000..f7fa54ebe7c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan.js @@ -0,0 +1,62 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_GetBackupPlan_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 of the `BackupPlan` to retrieve. + * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + */ + // const name = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetBackupPlan() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getBackupPlan(request); + console.log(response); + } + + callGetBackupPlan(); + // [END backupdr_v1_generated_BackupDR_GetBackupPlan_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-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan_association.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan_association.js new file mode 100644 index 00000000000..92f8a9b7ff3 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan_association.js @@ -0,0 +1,62 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_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 backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + */ + // const name = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetBackupPlanAssociation() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getBackupPlanAssociation(request); + console.log(response); + } + + callGetBackupPlanAssociation(); + // [END backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_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-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_vault.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_vault.js new file mode 100644 index 00000000000..1f000c8433e --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_vault.js @@ -0,0 +1,67 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_GetBackupVault_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 backupvault store resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' + */ + // const name = 'abc123' + /** + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault + */ + // const view = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetBackupVault() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getBackupVault(request); + console.log(response); + } + + callGetBackupVault(); + // [END backupdr_v1_generated_BackupDR_GetBackupVault_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-backupdr/v1/samples/generated/v1/backup_d_r.get_data_source.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_data_source.js new file mode 100644 index 00000000000..7500e457572 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_data_source.js @@ -0,0 +1,62 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_GetDataSource_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 data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' + */ + // const name = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetDataSource() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getDataSource(request); + console.log(response); + } + + callGetDataSource(); + // [END backupdr_v1_generated_BackupDR_GetDataSource_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-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js new file mode 100644 index 00000000000..11cc5ae277f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js @@ -0,0 +1,62 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_GetManagementServer_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 management server resource name, in the format + * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' + */ + // const name = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callGetManagementServer() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await backupdrClient.getManagementServer(request); + console.log(response); + } + + callGetManagementServer(); + // [END backupdr_v1_generated_BackupDR_GetManagementServer_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-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plan_associations.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plan_associations.js new file mode 100644 index 00000000000..0f2b5ee7e12 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plan_associations.js @@ -0,0 +1,81 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve backup Plan + * Associations information, in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + * map to GCP regions, for example **us-central1**. To retrieve backup plan + * associations for all locations, use "-" for the + * `{location}` value. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results + */ + // const filter = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListBackupPlanAssociations() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listBackupPlanAssociationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBackupPlanAssociations(); + // [END backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_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-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plans.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plans.js new file mode 100644 index 00000000000..2118748eca9 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plans.js @@ -0,0 +1,93 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_ListBackupPlans_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Cloud + * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + * retrieve backup plans for all locations, use "-" for the + * `{location}` value. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * next_page_token google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token + * to determine if there are more instances left to be queried. + */ + // const pageSize = 1234 + /** + * Optional. The value of + * next_page_token google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. Field match expression used to filter the results. + */ + // const filter = 'abc123' + /** + * Optional. Field by which to sort the results. + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListBackupPlans() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listBackupPlansAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBackupPlans(); + // [END backupdr_v1_generated_BackupDR_ListBackupPlans_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-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_vaults.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_vaults.js new file mode 100644 index 00000000000..dca6928eade --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_vaults.js @@ -0,0 +1,90 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_ListBackupVaults_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results. + */ + // const orderBy = 'abc123' + /** + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault. + */ + // const view = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListBackupVaults() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listBackupVaultsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBackupVaults(); + // [END backupdr_v1_generated_BackupDR_ListBackupVaults_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-backupdr/v1/samples/generated/v1/backup_d_r.list_backups.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backups.js new file mode 100644 index 00000000000..d72a8fd2d9f --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backups.js @@ -0,0 +1,90 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_ListBackups_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve backup + * information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results. + */ + // const orderBy = 'abc123' + /** + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + */ + // const view = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListBackups() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listBackupsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBackups(); + // [END backupdr_v1_generated_BackupDR_ListBackups_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-backupdr/v1/samples/generated/v1/backup_d_r.list_data_sources.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_data_sources.js new file mode 100644 index 00000000000..3858f996f71 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_data_sources.js @@ -0,0 +1,85 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_ListDataSources_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve data + * sources information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results. + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListDataSources() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listDataSourcesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataSources(); + // [END backupdr_v1_generated_BackupDR_ListDataSources_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-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js new file mode 100644 index 00000000000..262d1a29e3c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js @@ -0,0 +1,85 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_ListManagementServers_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud BackupDR, locations map to Google Cloud regions, for example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results. + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results. + */ + // const orderBy = 'abc123' + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callListManagementServers() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = backupdrClient.listManagementServersAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListManagementServers(); + // [END backupdr_v1_generated_BackupDR_ListManagementServers_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-backupdr/v1/samples/generated/v1/backup_d_r.restore_backup.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.restore_backup.js new file mode 100644 index 00000000000..3b156cdc818 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.restore_backup.js @@ -0,0 +1,85 @@ +// 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 +// +// 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 backupdr_v1_generated_BackupDR_RestoreBackup_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 of the Backup instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/* /backups/'. + */ + // const name = 'abc123' + /** + * Optional. An optional 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' + /** + * Compute Engine target environment to be used during restore. + */ + // const computeInstanceTargetEnvironment = {} + /** + * Compute Engine instance properties to be overridden during restore. + */ + // const computeInstanceRestoreProperties = {} + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callRestoreBackup() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await backupdrClient.restoreBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callRestoreBackup(); + // [END backupdr_v1_generated_BackupDR_RestoreBackup_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-backupdr/v1/samples/generated/v1/backup_d_r.trigger_backup.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.trigger_backup.js new file mode 100644 index 00000000000..4d212d1ced7 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.trigger_backup.js @@ -0,0 +1,82 @@ +// 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 +// +// 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, ruleId) { + // [START backupdr_v1_generated_BackupDR_TriggerBackup_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 backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + */ + // const name = 'abc123' + /** + * Required. backup rule_id for which a backup needs to be triggered. + */ + // const ruleId = 'abc123' + /** + * Optional. An optional 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callTriggerBackup() { + // Construct request + const request = { + name, + ruleId, + }; + + // Run request + const [operation] = await backupdrClient.triggerBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callTriggerBackup(); + // [END backupdr_v1_generated_BackupDR_TriggerBackup_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-backupdr/v1/samples/generated/v1/backup_d_r.update_backup.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup.js new file mode 100644 index 00000000000..06b0a51edd7 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup.js @@ -0,0 +1,85 @@ +// 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 +// +// 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(updateMask, backup) { + // [START backupdr_v1_generated_BackupDR_UpdateBackup_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. Field mask is used to specify the fields to be overwritten in the + * Backup 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 the request will fail. + */ + // const updateMask = {} + /** + * Required. The resource being updated + */ + // const backup = {} + /** + * Optional. An optional 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 Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callUpdateBackup() { + // Construct request + const request = { + updateMask, + backup, + }; + + // Run request + const [operation] = await backupdrClient.updateBackup(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateBackup(); + // [END backupdr_v1_generated_BackupDR_UpdateBackup_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-backupdr/v1/samples/generated/v1/backup_d_r.update_backup_vault.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup_vault.js new file mode 100644 index 00000000000..62444645da6 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup_vault.js @@ -0,0 +1,95 @@ +// 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 +// +// 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(updateMask, backupVault) { + // [START backupdr_v1_generated_BackupDR_UpdateBackupVault_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. Field mask is used to specify the fields to be overwritten in the + * BackupVault 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 the request will fail. + */ + // const updateMask = {} + /** + * Required. The resource being updated + */ + // const backupVault = {} + /** + * Optional. An optional 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 request, but do not perform mutations. + * The default is 'false'. + */ + // const validateOnly = true + /** + * Optional. If set to true, will not check plan duration against backup vault + * enforcement duration. + */ + // const force = true + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callUpdateBackupVault() { + // Construct request + const request = { + updateMask, + backupVault, + }; + + // Run request + const [operation] = await backupdrClient.updateBackupVault(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateBackupVault(); + // [END backupdr_v1_generated_BackupDR_UpdateBackupVault_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-backupdr/v1/samples/generated/v1/backup_d_r.update_data_source.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_data_source.js new file mode 100644 index 00000000000..707ff65f27d --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_data_source.js @@ -0,0 +1,89 @@ +// 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 +// +// 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(updateMask, dataSource) { + // [START backupdr_v1_generated_BackupDR_UpdateDataSource_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. Field mask is used to specify the fields to be overwritten in the + * DataSource 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 the request will fail. + */ + // const updateMask = {} + /** + * Required. The resource being updated + */ + // const dataSource = {} + /** + * Optional. An optional 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. Enable upsert. + */ + // const allowMissing = true + + // Imports the Backupdr library + const {BackupDRClient} = require('@google-cloud/backupdr').v1; + + // Instantiates a client + const backupdrClient = new BackupDRClient(); + + async function callUpdateDataSource() { + // Construct request + const request = { + updateMask, + dataSource, + }; + + // Run request + const [operation] = await backupdrClient.updateDataSource(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateDataSource(); + // [END backupdr_v1_generated_BackupDR_UpdateDataSource_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-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json new file mode 100644 index 00000000000..c84a7c2965c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json @@ -0,0 +1,1363 @@ +{ + "clientLibrary": { + "name": "nodejs-backupdr", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.backupdr.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "backupdr_v1_generated_BackupDR_ListManagementServers_async", + "title": "BackupDR listManagementServers Sample", + "origin": "API_DEFINITION", + "description": " Lists ManagementServers in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_management_servers.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListManagementServers", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListManagementServers", + "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.backupdr.v1.ListManagementServersResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListManagementServers", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListManagementServers", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetManagementServer_async", + "title": "BackupDR getManagementServer Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single ManagementServer.", + "canonical": true, + "file": "backup_d_r.get_management_server.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetManagementServer", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetManagementServer", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.backupdr.v1.ManagementServer", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetManagementServer", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetManagementServer", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_CreateManagementServer_async", + "title": "BackupDR createManagementServer Sample", + "origin": "API_DEFINITION", + "description": " Creates a new ManagementServer in a given project and location.", + "canonical": true, + "file": "backup_d_r.create_management_server.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateManagementServer", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateManagementServer", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "management_server_id", + "type": "TYPE_STRING" + }, + { + "name": "management_server", + "type": ".google.cloud.backupdr.v1.ManagementServer" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "CreateManagementServer", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateManagementServer", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_DeleteManagementServer_async", + "title": "BackupDR deleteManagementServer Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single ManagementServer.", + "canonical": true, + "file": "backup_d_r.delete_management_server.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteManagementServer", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteManagementServer", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "DeleteManagementServer", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteManagementServer", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupVault_async", + "title": "BackupDR createBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Creates a new BackupVault in a given project and location.", + "canonical": true, + "file": "backup_d_r.create_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "backup_vault_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_vault", + "type": ".google.cloud.backupdr.v1.BackupVault" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "CreateBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListBackupVaults_async", + "title": "BackupDR listBackupVaults Sample", + "origin": "API_DEFINITION", + "description": " Lists BackupVaults in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_backup_vaults.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackupVaults", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", + "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" + }, + { + "name": "view", + "type": ".google.cloud.backupdr.v1.BackupVaultView" + } + ], + "resultType": ".google.cloud.backupdr.v1.ListBackupVaultsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListBackupVaults", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_async", + "title": "BackupDR fetchUsableBackupVaults Sample", + "origin": "API_DEFINITION", + "description": " FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.", + "canonical": true, + "file": "backup_d_r.fetch_usable_backup_vaults.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchUsableBackupVaults", + "fullName": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", + "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.backupdr.v1.FetchUsableBackupVaultsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "FetchUsableBackupVaults", + "fullName": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetBackupVault_async", + "title": "BackupDR getBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a BackupVault.", + "canonical": true, + "file": "backup_d_r.get_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.backupdr.v1.BackupVaultView" + } + ], + "resultType": ".google.cloud.backupdr.v1.BackupVault", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_UpdateBackupVault_async", + "title": "BackupDR updateBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings of a BackupVault.", + "canonical": true, + "file": "backup_d_r.update_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "backup_vault", + "type": ".google.cloud.backupdr.v1.BackupVault" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "UpdateBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupVault_async", + "title": "BackupDR deleteBackupVault Sample", + "origin": "API_DEFINITION", + "description": " Deletes a BackupVault.", + "canonical": true, + "file": "backup_d_r.delete_backup_vault.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 89, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + }, + { + "name": "etag", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "DeleteBackupVault", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListDataSources_async", + "title": "BackupDR listDataSources Sample", + "origin": "API_DEFINITION", + "description": " Lists DataSources in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_data_sources.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataSources", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListDataSources", + "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.backupdr.v1.ListDataSourcesResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListDataSources", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListDataSources", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetDataSource_async", + "title": "BackupDR getDataSource Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a DataSource.", + "canonical": true, + "file": "backup_d_r.get_data_source.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetDataSource", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.backupdr.v1.DataSource", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetDataSource", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_UpdateDataSource_async", + "title": "BackupDR updateDataSource Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings of a DataSource.", + "canonical": true, + "file": "backup_d_r.update_data_source.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "data_source", + "type": ".google.cloud.backupdr.v1.DataSource" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "UpdateDataSource", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListBackups_async", + "title": "BackupDR listBackups Sample", + "origin": "API_DEFINITION", + "description": " Lists Backups in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_backups.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 82, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackups", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackups", + "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" + }, + { + "name": "view", + "type": ".google.cloud.backupdr.v1.BackupView" + } + ], + "resultType": ".google.cloud.backupdr.v1.ListBackupsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListBackups", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackups", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetBackup_async", + "title": "BackupDR getBackup Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a Backup.", + "canonical": true, + "file": "backup_d_r.get_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "view", + "type": ".google.cloud.backupdr.v1.BackupView" + } + ], + "resultType": ".google.cloud.backupdr.v1.Backup", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_UpdateBackup_async", + "title": "BackupDR updateBackup Sample", + "origin": "API_DEFINITION", + "description": " Updates the settings of a Backup.", + "canonical": true, + "file": "backup_d_r.update_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "backup", + "type": ".google.cloud.backupdr.v1.Backup" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "UpdateBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackup_async", + "title": "BackupDR deleteBackup Sample", + "origin": "API_DEFINITION", + "description": " Deletes a Backup.", + "canonical": true, + "file": "backup_d_r.delete_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "DeleteBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_RestoreBackup_async", + "title": "BackupDR restoreBackup Sample", + "origin": "API_DEFINITION", + "description": " Restore from a Backup", + "canonical": true, + "file": "backup_d_r.restore_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RestoreBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "compute_instance_target_environment", + "type": ".google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment" + }, + { + "name": "compute_instance_restore_properties", + "type": ".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "RestoreBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupPlan_async", + "title": "BackupDR createBackupPlan Sample", + "origin": "API_DEFINITION", + "description": " Create a BackupPlan", + "canonical": true, + "file": "backup_d_r.create_backup_plan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 83, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "backup_plan_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_plan", + "type": ".google.cloud.backupdr.v1.BackupPlan" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "CreateBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetBackupPlan_async", + "title": "BackupDR getBackupPlan Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single BackupPlan.", + "canonical": true, + "file": "backup_d_r.get_backup_plan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.backupdr.v1.BackupPlan", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListBackupPlans_async", + "title": "BackupDR listBackupPlans Sample", + "origin": "API_DEFINITION", + "description": " Lists BackupPlans in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_backup_plans.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 85, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackupPlans", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", + "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.backupdr.v1.ListBackupPlansResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListBackupPlans", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupPlan_async", + "title": "BackupDR deleteBackupPlan Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single BackupPlan.", + "canonical": true, + "file": "backup_d_r.delete_backup_plan.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "DeleteBackupPlan", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async", + "title": "BackupDR createBackupPlanAssociation Sample", + "origin": "API_DEFINITION", + "description": " Create a BackupPlanAssociation", + "canonical": true, + "file": "backup_d_r.create_backup_plan_association.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 81, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "backup_plan_association_id", + "type": "TYPE_STRING" + }, + { + "name": "backup_plan_association", + "type": ".google.cloud.backupdr.v1.BackupPlanAssociation" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "CreateBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_async", + "title": "BackupDR getBackupPlanAssociation Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single BackupPlanAssociation.", + "canonical": true, + "file": "backup_d_r.get_backup_plan_association.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.backupdr.v1.BackupPlanAssociation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "GetBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_async", + "title": "BackupDR listBackupPlanAssociations Sample", + "origin": "API_DEFINITION", + "description": " Lists BackupPlanAssociations in a given project and location.", + "canonical": true, + "file": "backup_d_r.list_backup_plan_associations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBackupPlanAssociations", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", + "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" + } + ], + "resultType": ".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "ListBackupPlanAssociations", + "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async", + "title": "BackupDR deleteBackupPlanAssociation Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single BackupPlanAssociation.", + "canonical": true, + "file": "backup_d_r.delete_backup_plan_association.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "DeleteBackupPlanAssociation", + "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + }, + { + "regionTag": "backupdr_v1_generated_BackupDR_TriggerBackup_async", + "title": "BackupDR triggerBackup Sample", + "origin": "API_DEFINITION", + "description": " Triggers a new Backup.", + "canonical": true, + "file": "backup_d_r.trigger_backup.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TriggerBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "rule_id", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "BackupDRClient", + "fullName": "google.cloud.backupdr.v1.BackupDRClient" + }, + "method": { + "shortName": "TriggerBackup", + "fullName": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", + "service": { + "shortName": "BackupDR", + "fullName": "google.cloud.backupdr.v1.BackupDR" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/index.ts b/owl-bot-staging/google-cloud-backupdr/v1/src/index.ts new file mode 100644 index 00000000000..025ea882aeb --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/src/index.ts @@ -0,0 +1,25 @@ +// 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 +// +// 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 BackupDRClient = v1.BackupDRClient; +type BackupDRClient = v1.BackupDRClient; +export {v1, BackupDRClient}; +export default {v1, BackupDRClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts new file mode 100644 index 00000000000..ca94beb6887 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts @@ -0,0 +1,4711 @@ +// 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 +// +// 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/backup_d_r_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './backup_d_r_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The BackupDR Service + * @class + * @memberof v1 + */ +export class BackupDRClient { + 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; + backupDRStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of BackupDRClient. + * + * @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 BackupDRClient({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 BackupDRClient; + 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 = 'backupdr.' + 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 = { + backupPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}' + ), + backupPlanPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupPlans/{backup_plan}' + ), + backupPlanAssociationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}' + ), + backupVaultPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backupvault}' + ), + dataSourcePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + managementServerPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/managementServers/{managementserver}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + }; + + // 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 = { + listManagementServers: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'managementServers'), + listBackupVaults: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupVaults'), + fetchUsableBackupVaults: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupVaults'), + listDataSources: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataSources'), + listBackups: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backups'), + listBackupPlans: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupPlans'), + listBackupPlanAssociations: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupPlanAssociations') + }; + + 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.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/managementServers/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/managementServers/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/managementServers/*}:testIamPermissions',body: '*',},{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 createManagementServerResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.ManagementServer') as gax.protobuf.Type; + const createManagementServerMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const deleteManagementServerResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteManagementServerMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const createBackupVaultResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupVault') as gax.protobuf.Type; + const createBackupVaultMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const updateBackupVaultResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupVault') as gax.protobuf.Type; + const updateBackupVaultMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const deleteBackupVaultResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteBackupVaultMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const updateDataSourceResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.DataSource') as gax.protobuf.Type; + const updateDataSourceMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const updateBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.Backup') as gax.protobuf.Type; + const updateBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const deleteBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.Backup') as gax.protobuf.Type; + const deleteBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const restoreBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.RestoreBackupResponse') as gax.protobuf.Type; + const restoreBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const createBackupPlanResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupPlan') as gax.protobuf.Type; + const createBackupPlanMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const deleteBackupPlanResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteBackupPlanMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const createBackupPlanAssociationResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupPlanAssociation') as gax.protobuf.Type; + const createBackupPlanAssociationMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const deleteBackupPlanAssociationResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteBackupPlanAssociationMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + const triggerBackupResponse = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.BackupPlanAssociation') as gax.protobuf.Type; + const triggerBackupMetadata = protoFilesRoot.lookup( + '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createManagementServer: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createManagementServerResponse.decode.bind(createManagementServerResponse), + createManagementServerMetadata.decode.bind(createManagementServerMetadata)), + deleteManagementServer: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteManagementServerResponse.decode.bind(deleteManagementServerResponse), + deleteManagementServerMetadata.decode.bind(deleteManagementServerMetadata)), + createBackupVault: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBackupVaultResponse.decode.bind(createBackupVaultResponse), + createBackupVaultMetadata.decode.bind(createBackupVaultMetadata)), + updateBackupVault: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateBackupVaultResponse.decode.bind(updateBackupVaultResponse), + updateBackupVaultMetadata.decode.bind(updateBackupVaultMetadata)), + deleteBackupVault: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupVaultResponse.decode.bind(deleteBackupVaultResponse), + deleteBackupVaultMetadata.decode.bind(deleteBackupVaultMetadata)), + updateDataSource: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateDataSourceResponse.decode.bind(updateDataSourceResponse), + updateDataSourceMetadata.decode.bind(updateDataSourceMetadata)), + updateBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateBackupResponse.decode.bind(updateBackupResponse), + updateBackupMetadata.decode.bind(updateBackupMetadata)), + deleteBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupResponse.decode.bind(deleteBackupResponse), + deleteBackupMetadata.decode.bind(deleteBackupMetadata)), + restoreBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + restoreBackupResponse.decode.bind(restoreBackupResponse), + restoreBackupMetadata.decode.bind(restoreBackupMetadata)), + createBackupPlan: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBackupPlanResponse.decode.bind(createBackupPlanResponse), + createBackupPlanMetadata.decode.bind(createBackupPlanMetadata)), + deleteBackupPlan: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupPlanResponse.decode.bind(deleteBackupPlanResponse), + deleteBackupPlanMetadata.decode.bind(deleteBackupPlanMetadata)), + createBackupPlanAssociation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createBackupPlanAssociationResponse.decode.bind(createBackupPlanAssociationResponse), + createBackupPlanAssociationMetadata.decode.bind(createBackupPlanAssociationMetadata)), + deleteBackupPlanAssociation: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteBackupPlanAssociationResponse.decode.bind(deleteBackupPlanAssociationResponse), + deleteBackupPlanAssociationMetadata.decode.bind(deleteBackupPlanAssociationMetadata)), + triggerBackup: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + triggerBackupResponse.decode.bind(triggerBackupResponse), + triggerBackupMetadata.decode.bind(triggerBackupMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.backupdr.v1.BackupDR', 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.backupDRStub) { + return this.backupDRStub; + } + + // Put together the "service stub" for + // google.cloud.backupdr.v1.BackupDR. + this.backupDRStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.backupdr.v1.BackupDR') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.backupdr.v1.BackupDR, + 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 backupDRStubMethods = + ['listManagementServers', 'getManagementServer', 'createManagementServer', 'deleteManagementServer', 'createBackupVault', 'listBackupVaults', 'fetchUsableBackupVaults', 'getBackupVault', 'updateBackupVault', 'deleteBackupVault', 'listDataSources', 'getDataSource', 'updateDataSource', 'listBackups', 'getBackup', 'updateBackup', 'deleteBackup', 'restoreBackup', 'createBackupPlan', 'getBackupPlan', 'listBackupPlans', 'deleteBackupPlan', 'createBackupPlanAssociation', 'getBackupPlanAssociation', 'listBackupPlanAssociations', 'deleteBackupPlanAssociation', 'triggerBackup']; + for (const methodName of backupDRStubMethods) { + const callPromise = this.backupDRStub.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.backupDRStub; + } + + /** + * 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 'backupdr.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 'backupdr.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 -- + // ------------------- +/** + * Gets details of a single ManagementServer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the management server resource name, in the format + * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' + * @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.backupdr.v1.ManagementServer|ManagementServer}. + * 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/backup_d_r.get_management_server.js + * region_tag:backupdr_v1_generated_BackupDR_GetManagementServer_async + */ + getManagementServer( + request?: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IGetManagementServerRequest|undefined, {}|undefined + ]>; + getManagementServer( + request: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, + {}|null|undefined>): void; + getManagementServer( + request: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, + {}|null|undefined>): void; + getManagementServer( + request?: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IGetManagementServerRequest|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.getManagementServer(request, options, callback); + } +/** + * Gets details of a BackupVault. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backupvault store resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' + * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault + * @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.backupdr.v1.BackupVault|BackupVault}. + * 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/backup_d_r.get_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_GetBackupVault_async + */ + getBackupVault( + request?: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|undefined, {}|undefined + ]>; + getBackupVault( + request: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, + {}|null|undefined>): void; + getBackupVault( + request: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, + {}|null|undefined>): void; + getBackupVault( + request?: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupVault, + protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|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.getBackupVault(request, options, callback); + } +/** + * Gets details of a DataSource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' + * @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.backupdr.v1.DataSource|DataSource}. + * 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/backup_d_r.get_data_source.js + * region_tag:backupdr_v1_generated_BackupDR_GetDataSource_async + */ + getDataSource( + request?: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest|undefined, {}|undefined + ]>; + getDataSource( + request: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, + {}|null|undefined>): void; + getDataSource( + request: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, + {}|null|undefined>): void; + getDataSource( + request?: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.backupdr.v1.IDataSource, + protos.google.cloud.backupdr.v1.IGetDataSourceRequest|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.getDataSource(request, options, callback); + } +/** + * Gets details of a Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the data source resource name, in the format + * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @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.backupdr.v1.Backup|Backup}. + * 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/backup_d_r.get_backup.js + * region_tag:backupdr_v1_generated_BackupDR_GetBackup_async + */ + getBackup( + request?: protos.google.cloud.backupdr.v1.IGetBackupRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest|undefined, {}|undefined + ]>; + getBackup( + request: protos.google.cloud.backupdr.v1.IGetBackupRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, + {}|null|undefined>): void; + getBackup( + request: protos.google.cloud.backupdr.v1.IGetBackupRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, + {}|null|undefined>): void; + getBackup( + request?: protos.google.cloud.backupdr.v1.IGetBackupRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IGetBackupRequest|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.getBackup(request, options, callback); + } +/** + * Gets details of a single BackupPlan. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the `BackupPlan` to retrieve. + * + * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + * @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.backupdr.v1.BackupPlan|BackupPlan}. + * 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/backup_d_r.get_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_GetBackupPlan_async + */ + getBackupPlan( + request?: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|undefined, {}|undefined + ]>; + getBackupPlan( + request: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, + {}|null|undefined>): void; + getBackupPlan( + request: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, + {}|null|undefined>): void; + getBackupPlan( + request?: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupPlan, + protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|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.getBackupPlan(request, options, callback); + } +/** + * Gets details of a single BackupPlanAssociation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. + * 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/backup_d_r.get_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_async + */ + getBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|undefined, {}|undefined + ]>; + getBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, + {}|null|undefined>): void; + getBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, + callback: Callback< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, + {}|null|undefined>): void; + getBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupPlanAssociation, + protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|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.getBackupPlanAssociation(request, options, callback); + } + +/** + * Creates a new ManagementServer in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The management server project and location in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR + * locations map to Google Cloud regions, for example **us-central1**. + * @param {string} request.managementServerId + * Required. The name of the management server to create. The name must be + * unique for the specified project and location. + * @param {google.cloud.backupdr.v1.ManagementServer} request.managementServer + * Required. A [management server + * resource][google.cloud.backupdr.v1.ManagementServer] + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.create_management_server.js + * region_tag:backupdr_v1_generated_BackupDR_CreateManagementServer_async + */ + createManagementServer( + request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createManagementServer( + request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createManagementServer( + request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createManagementServer( + request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, + 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.createManagementServer(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createManagementServer()`. + * @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/backup_d_r.create_management_server.js + * region_tag:backupdr_v1_generated_BackupDR_CreateManagementServer_async + */ + async checkCreateManagementServerProgress(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.createManagementServer, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a single ManagementServer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.delete_management_server.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteManagementServer_async + */ + deleteManagementServer( + request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteManagementServer( + request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteManagementServer( + request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteManagementServer( + request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, + 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.deleteManagementServer(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteManagementServer()`. + * @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/backup_d_r.delete_management_server.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteManagementServer_async + */ + async checkDeleteManagementServerProgress(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.deleteManagementServer, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a new BackupVault in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Value for parent. + * @param {string} request.backupVaultId + * Required. ID of the requesting object + * If auto-generating ID server-side, remove this field and + * backup_vault_id from the method_signature of Create RPC + * @param {google.cloud.backupdr.v1.BackupVault} request.backupVault + * Required. The resource being created + * @param {string} [request.requestId] + * Optional. An optional 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 request, but do not perform mutations. + * The default is 'false'. + * @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/backup_d_r.create_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupVault_async + */ + createBackupVault( + request?: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createBackupVault( + request: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackupVault( + request: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackupVault( + request?: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, + 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.createBackupVault(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createBackupVault()`. + * @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/backup_d_r.create_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupVault_async + */ + async checkCreateBackupVaultProgress(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.createBackupVault, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the settings of a BackupVault. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * BackupVault 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 the request will fail. + * @param {google.cloud.backupdr.v1.BackupVault} request.backupVault + * Required. The resource being updated + * @param {string} [request.requestId] + * Optional. An optional 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 request, but do not perform mutations. + * The default is 'false'. + * @param {boolean} [request.force] + * Optional. If set to true, will not check plan duration against backup vault + * enforcement duration. + * @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/backup_d_r.update_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateBackupVault_async + */ + updateBackupVault( + request?: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateBackupVault( + request: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateBackupVault( + request: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateBackupVault( + request?: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, + 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({ + 'backup_vault.name': request.backupVault!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateBackupVault(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateBackupVault()`. + * @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/backup_d_r.update_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateBackupVault_async + */ + async checkUpdateBackupVaultProgress(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.updateBackupVault, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a BackupVault. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {string} [request.requestId] + * Optional. An optional 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 data source from this backup vault will also + * be deleted. + * @param {string} request.etag + * The current etag of the backup vault. + * If an etag is provided and does not match the current etag of the + * connection, deletion will be blocked. + * @param {boolean} [request.validateOnly] + * Optional. Only validate the request, but do not perform mutations. + * The default is 'false'. + * @param {boolean} [request.allowMissing] + * Optional. If true and the BackupVault is not found, the request will + * succeed but no action will be taken. + * @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/backup_d_r.delete_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupVault_async + */ + deleteBackupVault( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteBackupVault( + request: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackupVault( + request: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackupVault( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, + 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.deleteBackupVault(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteBackupVault()`. + * @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/backup_d_r.delete_backup_vault.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupVault_async + */ + async checkDeleteBackupVaultProgress(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.deleteBackupVault, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the settings of a DataSource. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * DataSource 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 the request will fail. + * @param {google.cloud.backupdr.v1.DataSource} request.dataSource + * Required. The resource being updated + * @param {string} [request.requestId] + * Optional. An optional 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.allowMissing] + * Optional. Enable upsert. + * @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/backup_d_r.update_data_source.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateDataSource_async + */ + updateDataSource( + request?: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateDataSource( + request: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDataSource( + request: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateDataSource( + request?: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, + 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({ + 'data_source.name': request.dataSource!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateDataSource(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateDataSource()`. + * @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/backup_d_r.update_data_source.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateDataSource_async + */ + async checkUpdateDataSourceProgress(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.updateDataSource, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the settings of a Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup 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 the request will fail. + * @param {google.cloud.backupdr.v1.Backup} request.backup + * Required. The resource being updated + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.update_backup.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateBackup_async + */ + updateBackup( + request?: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateBackup( + request: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateBackup( + request: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateBackup( + request?: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, + 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({ + 'backup.name': request.backup!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateBackup(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateBackup()`. + * @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/backup_d_r.update_backup.js + * region_tag:backupdr_v1_generated_BackupDR_UpdateBackup_async + */ + async checkUpdateBackupProgress(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.updateBackup, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.delete_backup.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackup_async + */ + deleteBackup( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteBackup( + request: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackup( + request: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackup( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, + 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.deleteBackup(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteBackup()`. + * @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/backup_d_r.delete_backup.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackup_async + */ + async checkDeleteBackupProgress(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.deleteBackup, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Restore from a Backup + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Backup instance, in the format + * 'projects/* /locations/* /backupVaults/* /dataSources/* /backups/'. + * @param {string} [request.requestId] + * Optional. An optional 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 {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} request.computeInstanceTargetEnvironment + * Compute Engine target environment to be used during restore. + * @param {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} request.computeInstanceRestoreProperties + * Compute Engine instance properties to be overridden during restore. + * @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/backup_d_r.restore_backup.js + * region_tag:backupdr_v1_generated_BackupDR_RestoreBackup_async + */ + restoreBackup( + request?: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + restoreBackup( + request: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + restoreBackup( + request: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + restoreBackup( + request?: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, + 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.restoreBackup(request, options, callback); + } +/** + * Check the status of the long running operation returned by `restoreBackup()`. + * @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/backup_d_r.restore_backup.js + * region_tag:backupdr_v1_generated_BackupDR_RestoreBackup_async + */ + async checkRestoreBackupProgress(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.restoreBackup, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Create a BackupPlan + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The `BackupPlan` project and location in the format + * `projects/{project}/locations/{location}`. In Cloud BackupDR locations + * map to GCP regions, for example **us-central1**. + * @param {string} request.backupPlanId + * Required. The name of the `BackupPlan` to create. The name must be unique + * for the specified project and location.The name must start with a lowercase + * letter followed by up to 62 lowercase letters, numbers, or hyphens. + * Pattern, /{@link protos.a-z0-9-|a-z}{,62}/. + * @param {google.cloud.backupdr.v1.BackupPlan} request.backupPlan + * Required. The `BackupPlan` resource object to create. + * @param {string} [request.requestId] + * Optional. An optional 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 t + * he 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/backup_d_r.create_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlan_async + */ + createBackupPlan( + request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createBackupPlan( + request: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackupPlan( + request: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackupPlan( + request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, + 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.createBackupPlan(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createBackupPlan()`. + * @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/backup_d_r.create_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlan_async + */ + async checkCreateBackupPlanProgress(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.createBackupPlan, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a single BackupPlan. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the `BackupPlan` to delete. + * + * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.delete_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlan_async + */ + deleteBackupPlan( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteBackupPlan( + request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackupPlan( + request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackupPlan( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, + 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.deleteBackupPlan(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteBackupPlan()`. + * @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/backup_d_r.delete_backup_plan.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlan_async + */ + async checkDeleteBackupPlanProgress(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.deleteBackupPlan, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Create a BackupPlanAssociation + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The backup plan association project and location in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations + * map to GCP regions, for example **us-central1**. + * @param {string} request.backupPlanAssociationId + * Required. The name of the backup plan association to create. The name must + * be unique for the specified project and location. + * @param {google.cloud.backupdr.v1.BackupPlanAssociation} request.backupPlanAssociation + * Required. The resource being created + * @param {string} [request.requestId] + * Optional. An optional 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 t + * he 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/backup_d_r.create_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async + */ + createBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, + 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.createBackupPlanAssociation(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createBackupPlanAssociation()`. + * @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/backup_d_r.create_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async + */ + async checkCreateBackupPlanAssociationProgress(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.createBackupPlanAssociation, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a single BackupPlanAssociation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.delete_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async + */ + deleteBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackupPlanAssociation( + request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteBackupPlanAssociation( + request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, + 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.deleteBackupPlanAssociation(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteBackupPlanAssociation()`. + * @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/backup_d_r.delete_backup_plan_association.js + * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async + */ + async checkDeleteBackupPlanAssociationProgress(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.deleteBackupPlanAssociation, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Triggers a new Backup. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the backup plan association resource, in the format + * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` + * @param {string} request.ruleId + * Required. backup rule_id for which a backup needs to be triggered. + * @param {string} [request.requestId] + * Optional. An optional 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/backup_d_r.trigger_backup.js + * region_tag:backupdr_v1_generated_BackupDR_TriggerBackup_async + */ + triggerBackup( + request?: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + triggerBackup( + request: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + triggerBackup( + request: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + triggerBackup( + request?: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, + 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.triggerBackup(request, options, callback); + } +/** + * Check the status of the long running operation returned by `triggerBackup()`. + * @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/backup_d_r.trigger_backup.js + * region_tag:backupdr_v1_generated_BackupDR_TriggerBackup_async + */ + async checkTriggerBackupProgress(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.triggerBackup, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists ManagementServers in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud BackupDR, locations map to Google Cloud regions, for example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.ManagementServer|ManagementServer}. + * 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 `listManagementServersAsync()` + * 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. + */ + listManagementServers( + request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IManagementServer[], + protos.google.cloud.backupdr.v1.IListManagementServersRequest|null, + protos.google.cloud.backupdr.v1.IListManagementServersResponse + ]>; + listManagementServers( + request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListManagementServersRequest, + protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, + protos.google.cloud.backupdr.v1.IManagementServer>): void; + listManagementServers( + request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListManagementServersRequest, + protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, + protos.google.cloud.backupdr.v1.IManagementServer>): void; + listManagementServers( + request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.backupdr.v1.IListManagementServersRequest, + protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, + protos.google.cloud.backupdr.v1.IManagementServer>, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListManagementServersRequest, + protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, + protos.google.cloud.backupdr.v1.IManagementServer>): + Promise<[ + protos.google.cloud.backupdr.v1.IManagementServer[], + protos.google.cloud.backupdr.v1.IListManagementServersRequest|null, + protos.google.cloud.backupdr.v1.IListManagementServersResponse + ]>|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.listManagementServers(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 project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud BackupDR, locations map to Google Cloud regions, for example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.ManagementServer|ManagementServer} 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 `listManagementServersAsync()` + * 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. + */ + listManagementServersStream( + request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + 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['listManagementServers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listManagementServers.createStream( + this.innerApiCalls.listManagementServers as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listManagementServers`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve management servers + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud BackupDR, locations map to Google Cloud regions, for example + * **us-central1**. To retrieve management servers for all locations, use "-" + * for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.ManagementServer|ManagementServer}. 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/backup_d_r.list_management_servers.js + * region_tag:backupdr_v1_generated_BackupDR_ListManagementServers_async + */ + listManagementServersAsync( + request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, + 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['listManagementServers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listManagementServers.asyncIterate( + this.innerApiCalls['listManagementServers'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists BackupVaults in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault. + * @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.backupdr.v1.BackupVault|BackupVault}. + * 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 `listBackupVaultsAsync()` + * 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. + */ + listBackupVaults( + request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupVault[], + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest|null, + protos.google.cloud.backupdr.v1.IListBackupVaultsResponse + ]>; + listBackupVaults( + request: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupVault>): void; + listBackupVaults( + request: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupVault>): void; + listBackupVaults( + request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupVault>, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupVault>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupVault[], + protos.google.cloud.backupdr.v1.IListBackupVaultsRequest|null, + protos.google.cloud.backupdr.v1.IListBackupVaultsResponse + ]>|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.listBackupVaults(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 project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault. + * @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.backupdr.v1.BackupVault|BackupVault} 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 `listBackupVaultsAsync()` + * 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. + */ + listBackupVaultsStream( + request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + 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['listBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupVaults.createStream( + this.innerApiCalls.listBackupVaults as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listBackupVaults`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * Vault. + * @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.backupdr.v1.BackupVault|BackupVault}. 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/backup_d_r.list_backup_vaults.js + * region_tag:backupdr_v1_generated_BackupDR_ListBackupVaults_async + */ + listBackupVaultsAsync( + request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, + 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['listBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupVaults.asyncIterate( + this.innerApiCalls['listBackupVaults'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * FetchUsableBackupVaults lists usable BackupVaults in a given project and + * location. Usable BackupVault are the ones that user has + * backupdr.backupVaults.get permission. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.BackupVault|BackupVault}. + * 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 `fetchUsableBackupVaultsAsync()` + * 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. + */ + fetchUsableBackupVaults( + request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupVault[], + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest|null, + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse + ]>; + fetchUsableBackupVaults( + request: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupVault>): void; + fetchUsableBackupVaults( + request: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupVault>): void; + fetchUsableBackupVaults( + request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupVault>, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupVault>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupVault[], + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest|null, + protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse + ]>|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.fetchUsableBackupVaults(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 project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.BackupVault|BackupVault} 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 `fetchUsableBackupVaultsAsync()` + * 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. + */ + fetchUsableBackupVaultsStream( + request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + 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['fetchUsableBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.fetchUsableBackupVaults.createStream( + this.innerApiCalls.fetchUsableBackupVaults as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `fetchUsableBackupVaults`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backupvault stores + * information, in the format 'projects/{project_id}/locations/{location}'. In + * Cloud Backup and DR, locations map to Google Cloud regions, for example + * **us-central1**. + * To retrieve backupvault stores for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.BackupVault|BackupVault}. 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/backup_d_r.fetch_usable_backup_vaults.js + * region_tag:backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_async + */ + fetchUsableBackupVaultsAsync( + request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, + 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['fetchUsableBackupVaults']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.fetchUsableBackupVaults.asyncIterate( + this.innerApiCalls['fetchUsableBackupVaults'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists DataSources in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve data + * sources information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.DataSource|DataSource}. + * 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 `listDataSourcesAsync()` + * 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. + */ + listDataSources( + request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IDataSource[], + protos.google.cloud.backupdr.v1.IListDataSourcesRequest|null, + protos.google.cloud.backupdr.v1.IListDataSourcesResponse + ]>; + listDataSources( + request: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, + protos.google.cloud.backupdr.v1.IDataSource>): void; + listDataSources( + request: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, + protos.google.cloud.backupdr.v1.IDataSource>): void; + listDataSources( + request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, + protos.google.cloud.backupdr.v1.IDataSource>, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, + protos.google.cloud.backupdr.v1.IDataSource>): + Promise<[ + protos.google.cloud.backupdr.v1.IDataSource[], + protos.google.cloud.backupdr.v1.IListDataSourcesRequest|null, + protos.google.cloud.backupdr.v1.IListDataSourcesResponse + ]>|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.listDataSources(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 project and location for which to retrieve data + * sources information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.DataSource|DataSource} 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 `listDataSourcesAsync()` + * 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. + */ + listDataSourcesStream( + request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + 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['listDataSources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataSources.createStream( + this.innerApiCalls.listDataSources as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDataSources`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve data + * sources information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @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.backupdr.v1.DataSource|DataSource}. 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/backup_d_r.list_data_sources.js + * region_tag:backupdr_v1_generated_BackupDR_ListDataSources_async + */ + listDataSourcesAsync( + request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, + 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['listDataSources']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataSources.asyncIterate( + this.innerApiCalls['listDataSources'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Backups in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backup + * information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @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.backupdr.v1.Backup|Backup}. + * 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 `listBackupsAsync()` + * 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. + */ + listBackups( + request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackup[], + protos.google.cloud.backupdr.v1.IListBackupsRequest|null, + protos.google.cloud.backupdr.v1.IListBackupsResponse + ]>; + listBackups( + request: protos.google.cloud.backupdr.v1.IListBackupsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupsRequest, + protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackup>): void; + listBackups( + request: protos.google.cloud.backupdr.v1.IListBackupsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupsRequest, + protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackup>): void; + listBackups( + request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupsRequest, + protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackup>, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupsRequest, + protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackup>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackup[], + protos.google.cloud.backupdr.v1.IListBackupsRequest|null, + protos.google.cloud.backupdr.v1.IListBackupsResponse + ]>|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.listBackups(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 project and location for which to retrieve backup + * information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @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.backupdr.v1.Backup|Backup} 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 `listBackupsAsync()` + * 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. + */ + listBackupsStream( + request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, + 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['listBackups']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackups.createStream( + this.innerApiCalls.listBackups as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listBackups`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backup + * information, in the format + * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, + * locations map to Google Cloud regions, for example **us-central1**. + * To retrieve data sources for all locations, use "-" for the + * '{location}' value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results. + * @param {google.cloud.backupdr.v1.BackupView} [request.view] + * Optional. Reserved for future use to provide a BASIC & FULL view of Backup + * resource. + * @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.backupdr.v1.Backup|Backup}. 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/backup_d_r.list_backups.js + * region_tag:backupdr_v1_generated_BackupDR_ListBackups_async + */ + listBackupsAsync( + request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, + 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['listBackups']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackups.asyncIterate( + this.innerApiCalls['listBackups'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists BackupPlans in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Cloud + * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + * retrieve backup plans for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Field match expression used to filter the results. + * @param {string} [request.orderBy] + * Optional. Field by which to sort the results. + * @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.backupdr.v1.BackupPlan|BackupPlan}. + * 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 `listBackupPlansAsync()` + * 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. + */ + listBackupPlans( + request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupPlan[], + protos.google.cloud.backupdr.v1.IListBackupPlansRequest|null, + protos.google.cloud.backupdr.v1.IListBackupPlansResponse + ]>; + listBackupPlans( + request: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupPlan>): void; + listBackupPlans( + request: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupPlan>): void; + listBackupPlans( + request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupPlan>, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupPlan>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupPlan[], + protos.google.cloud.backupdr.v1.IListBackupPlansRequest|null, + protos.google.cloud.backupdr.v1.IListBackupPlansResponse + ]>|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.listBackupPlans(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 project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Cloud + * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + * retrieve backup plans for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Field match expression used to filter the results. + * @param {string} [request.orderBy] + * Optional. Field by which to sort the results. + * @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.backupdr.v1.BackupPlan|BackupPlan} 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 `listBackupPlansAsync()` + * 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. + */ + listBackupPlansStream( + request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + 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['listBackupPlans']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupPlans.createStream( + this.innerApiCalls.listBackupPlans as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listBackupPlans`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve `BackupPlans` + * information. Format: `projects/{project}/locations/{location}`. In Cloud + * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To + * retrieve backup plans for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. The maximum number of `BackupPlans` to return in a single + * response. If not specified, a default value will be chosen by the service. + * Note that the response may include a partial list and a caller should + * only rely on the response's + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * to determine if there are more instances left to be queried. + * @param {string} [request.pageToken] + * Optional. The value of + * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} + * received from a previous `ListBackupPlans` call. + * Provide this to retrieve the subsequent page in a multi-page list of + * results. When paginating, all other parameters provided to + * `ListBackupPlans` must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. Field match expression used to filter the results. + * @param {string} [request.orderBy] + * Optional. Field by which to sort the results. + * @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.backupdr.v1.BackupPlan|BackupPlan}. 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/backup_d_r.list_backup_plans.js + * region_tag:backupdr_v1_generated_BackupDR_ListBackupPlans_async + */ + listBackupPlansAsync( + request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, + 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['listBackupPlans']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupPlans.asyncIterate( + this.innerApiCalls['listBackupPlans'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists BackupPlanAssociations in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backup Plan + * Associations information, in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + * map to GCP regions, for example **us-central1**. To retrieve backup plan + * associations for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. + * 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 `listBackupPlanAssociationsAsync()` + * 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. + */ + listBackupPlanAssociations( + request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupPlanAssociation[], + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest|null, + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse + ]>; + listBackupPlanAssociations( + request: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): void; + listBackupPlanAssociations( + request: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + callback: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): void; + listBackupPlanAssociations( + request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupPlanAssociation>, + callback?: PaginationCallback< + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, + protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): + Promise<[ + protos.google.cloud.backupdr.v1.IBackupPlanAssociation[], + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest|null, + protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse + ]>|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.listBackupPlanAssociations(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 project and location for which to retrieve backup Plan + * Associations information, in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + * map to GCP regions, for example **us-central1**. To retrieve backup plan + * associations for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation} 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 `listBackupPlanAssociationsAsync()` + * 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. + */ + listBackupPlanAssociationsStream( + request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + 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['listBackupPlanAssociations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupPlanAssociations.createStream( + this.innerApiCalls.listBackupPlanAssociations as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listBackupPlanAssociations`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve backup Plan + * Associations information, in the format + * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations + * map to GCP regions, for example **us-central1**. To retrieve backup plan + * associations for all locations, use "-" for the + * `{location}` value. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. 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/backup_d_r.list_backup_plan_associations.js + * region_tag:backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_async + */ + listBackupPlanAssociationsAsync( + request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, + 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['listBackupPlanAssociations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listBackupPlanAssociations.asyncIterate( + this.innerApiCalls['listBackupPlanAssociations'] 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 backup resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backupvault + * @param {string} datasource + * @param {string} backup + * @returns {string} Resource name string. + */ + backupPath(project:string,location:string,backupvault:string,datasource:string,backup:string) { + return this.pathTemplates.backupPathTemplate.render({ + project: project, + location: location, + backupvault: backupvault, + datasource: datasource, + backup: backup, + }); + } + + /** + * Parse the project from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).project; + } + + /** + * Parse the location from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).location; + } + + /** + * Parse the backupvault from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the backupvault. + */ + matchBackupvaultFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).backupvault; + } + + /** + * Parse the datasource from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the datasource. + */ + matchDatasourceFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).datasource; + } + + /** + * Parse the backup from Backup resource. + * + * @param {string} backupName + * A fully-qualified path representing Backup resource. + * @returns {string} A string representing the backup. + */ + matchBackupFromBackupName(backupName: string) { + return this.pathTemplates.backupPathTemplate.match(backupName).backup; + } + + /** + * Return a fully-qualified backupPlan resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backup_plan + * @returns {string} Resource name string. + */ + backupPlanPath(project:string,location:string,backupPlan:string) { + return this.pathTemplates.backupPlanPathTemplate.render({ + project: project, + location: location, + backup_plan: backupPlan, + }); + } + + /** + * Parse the project from BackupPlan resource. + * + * @param {string} backupPlanName + * A fully-qualified path representing BackupPlan resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupPlanName(backupPlanName: string) { + return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName).project; + } + + /** + * Parse the location from BackupPlan resource. + * + * @param {string} backupPlanName + * A fully-qualified path representing BackupPlan resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupPlanName(backupPlanName: string) { + return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName).location; + } + + /** + * Parse the backup_plan from BackupPlan resource. + * + * @param {string} backupPlanName + * A fully-qualified path representing BackupPlan resource. + * @returns {string} A string representing the backup_plan. + */ + matchBackupPlanFromBackupPlanName(backupPlanName: string) { + return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName).backup_plan; + } + + /** + * Return a fully-qualified backupPlanAssociation resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backup_plan_association + * @returns {string} Resource name string. + */ + backupPlanAssociationPath(project:string,location:string,backupPlanAssociation:string) { + return this.pathTemplates.backupPlanAssociationPathTemplate.render({ + project: project, + location: location, + backup_plan_association: backupPlanAssociation, + }); + } + + /** + * Parse the project from BackupPlanAssociation resource. + * + * @param {string} backupPlanAssociationName + * A fully-qualified path representing BackupPlanAssociation resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupPlanAssociationName(backupPlanAssociationName: string) { + return this.pathTemplates.backupPlanAssociationPathTemplate.match(backupPlanAssociationName).project; + } + + /** + * Parse the location from BackupPlanAssociation resource. + * + * @param {string} backupPlanAssociationName + * A fully-qualified path representing BackupPlanAssociation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupPlanAssociationName(backupPlanAssociationName: string) { + return this.pathTemplates.backupPlanAssociationPathTemplate.match(backupPlanAssociationName).location; + } + + /** + * Parse the backup_plan_association from BackupPlanAssociation resource. + * + * @param {string} backupPlanAssociationName + * A fully-qualified path representing BackupPlanAssociation resource. + * @returns {string} A string representing the backup_plan_association. + */ + matchBackupPlanAssociationFromBackupPlanAssociationName(backupPlanAssociationName: string) { + return this.pathTemplates.backupPlanAssociationPathTemplate.match(backupPlanAssociationName).backup_plan_association; + } + + /** + * Return a fully-qualified backupVault resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backupvault + * @returns {string} Resource name string. + */ + backupVaultPath(project:string,location:string,backupvault:string) { + return this.pathTemplates.backupVaultPathTemplate.render({ + project: project, + location: location, + backupvault: backupvault, + }); + } + + /** + * Parse the project from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName).project; + } + + /** + * Parse the location from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the location. + */ + matchLocationFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName).location; + } + + /** + * Parse the backupvault from BackupVault resource. + * + * @param {string} backupVaultName + * A fully-qualified path representing BackupVault resource. + * @returns {string} A string representing the backupvault. + */ + matchBackupvaultFromBackupVaultName(backupVaultName: string) { + return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName).backupvault; + } + + /** + * Return a fully-qualified dataSource resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} backupvault + * @param {string} datasource + * @returns {string} Resource name string. + */ + dataSourcePath(project:string,location:string,backupvault:string,datasource:string) { + return this.pathTemplates.dataSourcePathTemplate.render({ + project: project, + location: location, + backupvault: backupvault, + datasource: datasource, + }); + } + + /** + * Parse the project from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).project; + } + + /** + * Parse the location from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).location; + } + + /** + * Parse the backupvault from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the backupvault. + */ + matchBackupvaultFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).backupvault; + } + + /** + * Parse the datasource from DataSource resource. + * + * @param {string} dataSourceName + * A fully-qualified path representing DataSource resource. + * @returns {string} A string representing the datasource. + */ + matchDatasourceFromDataSourceName(dataSourceName: string) { + return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).datasource; + } + + /** + * 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 managementServer resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} managementserver + * @returns {string} Resource name string. + */ + managementServerPath(project:string,location:string,managementserver:string) { + return this.pathTemplates.managementServerPathTemplate.render({ + project: project, + location: location, + managementserver: managementserver, + }); + } + + /** + * Parse the project from ManagementServer resource. + * + * @param {string} managementServerName + * A fully-qualified path representing ManagementServer resource. + * @returns {string} A string representing the project. + */ + matchProjectFromManagementServerName(managementServerName: string) { + return this.pathTemplates.managementServerPathTemplate.match(managementServerName).project; + } + + /** + * Parse the location from ManagementServer resource. + * + * @param {string} managementServerName + * A fully-qualified path representing ManagementServer resource. + * @returns {string} A string representing the location. + */ + matchLocationFromManagementServerName(managementServerName: string) { + return this.pathTemplates.managementServerPathTemplate.match(managementServerName).location; + } + + /** + * Parse the managementserver from ManagementServer resource. + * + * @param {string} managementServerName + * A fully-qualified path representing ManagementServer resource. + * @returns {string} A string representing the managementserver. + */ + matchManagementserverFromManagementServerName(managementServerName: string) { + return this.pathTemplates.managementServerPathTemplate.match(managementServerName).managementserver; + } + + /** + * 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; + } + + /** + * 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.backupDRStub && !this._terminated) { + return this.backupDRStub.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-backupdr/v1/src/v1/backup_d_r_client_config.json b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client_config.json new file mode 100644 index 00000000000..38b3cbc1a37 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client_config.json @@ -0,0 +1,163 @@ +{ + "interfaces": { + "google.cloud.backupdr.v1.BackupDR": { + "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": { + "ListManagementServers": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetManagementServer": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateManagementServer": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteManagementServer": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListBackupVaults": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "FetchUsableBackupVaults": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListDataSources": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetDataSource": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateDataSource": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBackups": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetBackup": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RestoreBackup": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBackupPlan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBackupPlan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBackupPlans": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackupPlan": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBackupPlanAssociation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBackupPlanAssociation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListBackupPlanAssociations": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteBackupPlanAssociation": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "TriggerBackup": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json new file mode 100644 index 00000000000..79496ec85e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json @@ -0,0 +1,8 @@ +[ + "../../protos/google/cloud/backupdr/v1/backupdr.proto", + "../../protos/google/cloud/backupdr/v1/backupplan.proto", + "../../protos/google/cloud/backupdr/v1/backupplanassociation.proto", + "../../protos/google/cloud/backupdr/v1/backupvault.proto", + "../../protos/google/cloud/backupdr/v1/backupvault_ba.proto", + "../../protos/google/cloud/backupdr/v1/backupvault_gce.proto" +] diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..c23b63f10dc --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json @@ -0,0 +1,321 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.backupdr.v1", + "libraryPackage": "@google-cloud/backupdr", + "services": { + "BackupDR": { + "clients": { + "grpc": { + "libraryClient": "BackupDRClient", + "rpcs": { + "GetManagementServer": { + "methods": [ + "getManagementServer" + ] + }, + "GetBackupVault": { + "methods": [ + "getBackupVault" + ] + }, + "GetDataSource": { + "methods": [ + "getDataSource" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupPlan": { + "methods": [ + "getBackupPlan" + ] + }, + "GetBackupPlanAssociation": { + "methods": [ + "getBackupPlanAssociation" + ] + }, + "CreateManagementServer": { + "methods": [ + "createManagementServer" + ] + }, + "DeleteManagementServer": { + "methods": [ + "deleteManagementServer" + ] + }, + "CreateBackupVault": { + "methods": [ + "createBackupVault" + ] + }, + "UpdateBackupVault": { + "methods": [ + "updateBackupVault" + ] + }, + "DeleteBackupVault": { + "methods": [ + "deleteBackupVault" + ] + }, + "UpdateDataSource": { + "methods": [ + "updateDataSource" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "RestoreBackup": { + "methods": [ + "restoreBackup" + ] + }, + "CreateBackupPlan": { + "methods": [ + "createBackupPlan" + ] + }, + "DeleteBackupPlan": { + "methods": [ + "deleteBackupPlan" + ] + }, + "CreateBackupPlanAssociation": { + "methods": [ + "createBackupPlanAssociation" + ] + }, + "DeleteBackupPlanAssociation": { + "methods": [ + "deleteBackupPlanAssociation" + ] + }, + "TriggerBackup": { + "methods": [ + "triggerBackup" + ] + }, + "ListManagementServers": { + "methods": [ + "listManagementServers", + "listManagementServersStream", + "listManagementServersAsync" + ] + }, + "ListBackupVaults": { + "methods": [ + "listBackupVaults", + "listBackupVaultsStream", + "listBackupVaultsAsync" + ] + }, + "FetchUsableBackupVaults": { + "methods": [ + "fetchUsableBackupVaults", + "fetchUsableBackupVaultsStream", + "fetchUsableBackupVaultsAsync" + ] + }, + "ListDataSources": { + "methods": [ + "listDataSources", + "listDataSourcesStream", + "listDataSourcesAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + }, + "ListBackupPlans": { + "methods": [ + "listBackupPlans", + "listBackupPlansStream", + "listBackupPlansAsync" + ] + }, + "ListBackupPlanAssociations": { + "methods": [ + "listBackupPlanAssociations", + "listBackupPlanAssociationsStream", + "listBackupPlanAssociationsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "BackupDRClient", + "rpcs": { + "GetManagementServer": { + "methods": [ + "getManagementServer" + ] + }, + "GetBackupVault": { + "methods": [ + "getBackupVault" + ] + }, + "GetDataSource": { + "methods": [ + "getDataSource" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupPlan": { + "methods": [ + "getBackupPlan" + ] + }, + "GetBackupPlanAssociation": { + "methods": [ + "getBackupPlanAssociation" + ] + }, + "CreateManagementServer": { + "methods": [ + "createManagementServer" + ] + }, + "DeleteManagementServer": { + "methods": [ + "deleteManagementServer" + ] + }, + "CreateBackupVault": { + "methods": [ + "createBackupVault" + ] + }, + "UpdateBackupVault": { + "methods": [ + "updateBackupVault" + ] + }, + "DeleteBackupVault": { + "methods": [ + "deleteBackupVault" + ] + }, + "UpdateDataSource": { + "methods": [ + "updateDataSource" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "RestoreBackup": { + "methods": [ + "restoreBackup" + ] + }, + "CreateBackupPlan": { + "methods": [ + "createBackupPlan" + ] + }, + "DeleteBackupPlan": { + "methods": [ + "deleteBackupPlan" + ] + }, + "CreateBackupPlanAssociation": { + "methods": [ + "createBackupPlanAssociation" + ] + }, + "DeleteBackupPlanAssociation": { + "methods": [ + "deleteBackupPlanAssociation" + ] + }, + "TriggerBackup": { + "methods": [ + "triggerBackup" + ] + }, + "ListManagementServers": { + "methods": [ + "listManagementServers", + "listManagementServersStream", + "listManagementServersAsync" + ] + }, + "ListBackupVaults": { + "methods": [ + "listBackupVaults", + "listBackupVaultsStream", + "listBackupVaultsAsync" + ] + }, + "FetchUsableBackupVaults": { + "methods": [ + "fetchUsableBackupVaults", + "fetchUsableBackupVaultsStream", + "fetchUsableBackupVaultsAsync" + ] + }, + "ListDataSources": { + "methods": [ + "listDataSources", + "listDataSourcesStream", + "listDataSourcesAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + }, + "ListBackupPlans": { + "methods": [ + "listBackupPlans", + "listBackupPlansStream", + "listBackupPlansAsync" + ] + }, + "ListBackupPlanAssociations": { + "methods": [ + "listBackupPlanAssociations", + "listBackupPlanAssociationsStream", + "listBackupPlanAssociationsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts new file mode 100644 index 00000000000..ba4dc25d2f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts @@ -0,0 +1,19 @@ +// 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 +// +// 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 {BackupDRClient} from './backup_d_r_client'; diff --git a/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..5c5ec9c7cf0 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// 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 +// +// 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 backupdr = require('@google-cloud/backupdr'); + +function main() { + const backupDRClient = new backupdr.BackupDRClient(); +} + +main(); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..229588cfd57 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// 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 +// +// 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 {BackupDRClient} from '@google-cloud/backupdr'; + +// check that the client class type name can be used +function doStuffWithBackupDRClient(client: BackupDRClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const backupDRClient = new BackupDRClient(); + doStuffWithBackupDRClient(backupDRClient); +} + +main(); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts b/owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts new file mode 100644 index 00000000000..fd5bfdc71d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts @@ -0,0 +1,49 @@ +// 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 +// +// 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-backupdr/v1/test/gapic_backup_d_r_v1.ts b/owl-bot-staging/google-cloud-backupdr/v1/test/gapic_backup_d_r_v1.ts new file mode 100644 index 00000000000..f54cc3f2b12 --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/test/gapic_backup_d_r_v1.ts @@ -0,0 +1,5876 @@ +// 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 +// +// 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 backupdrModule 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.BackupDRClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new backupdrModule.v1.BackupDRClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'backupdr.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new backupdrModule.v1.BackupDRClient(); + 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 = backupdrModule.v1.BackupDRClient.servicePath; + assert.strictEqual(servicePath, 'backupdr.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = backupdrModule.v1.BackupDRClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'backupdr.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new backupdrModule.v1.BackupDRClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'backupdr.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new backupdrModule.v1.BackupDRClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'backupdr.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 backupdrModule.v1.BackupDRClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'backupdr.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 backupdrModule.v1.BackupDRClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'backupdr.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 backupdrModule.v1.BackupDRClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = backupdrModule.v1.BackupDRClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new backupdrModule.v1.BackupDRClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new backupdrModule.v1.BackupDRClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.backupDRStub, undefined); + await client.initialize(); + assert(client.backupDRStub); + }); + + it('has close method for the initialized client', done => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.backupDRStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.backupDRStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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('getManagementServer', () => { + it('invokes getManagementServer without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ); + client.innerApiCalls.getManagementServer = stubSimpleCall(expectedResponse); + const [response] = await client.getManagementServer(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getManagementServer without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ManagementServer() + ); + client.innerApiCalls.getManagementServer = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getManagementServer( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IManagementServer|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getManagementServer with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getManagementServer = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getManagementServer(request), expectedError); + const actualRequest = (client.innerApiCalls.getManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getManagementServer with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getManagementServer(request), expectedError); + }); + }); + + describe('getBackupVault', () => { + it('invokes getBackupVault without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ); + client.innerApiCalls.getBackupVault = stubSimpleCall(expectedResponse); + const [response] = await client.getBackupVault(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupVault without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupVault() + ); + client.innerApiCalls.getBackupVault = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackupVault( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupVault|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupVault with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackupVault = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getBackupVault(request), expectedError); + const actualRequest = (client.innerApiCalls.getBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupVault with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBackupVault(request), expectedError); + }); + }); + + describe('getDataSource', () => { + it('invokes getDataSource without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DataSource() + ); + client.innerApiCalls.getDataSource = stubSimpleCall(expectedResponse); + const [response] = await client.getDataSource(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataSource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataSource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSource without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DataSource() + ); + client.innerApiCalls.getDataSource = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataSource( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IDataSource|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataSource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataSource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSource with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataSource = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDataSource(request), expectedError); + const actualRequest = (client.innerApiCalls.getDataSource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataSource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSource with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDataSource(request), expectedError); + }); + }); + + describe('getBackup', () => { + it('invokes getBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.Backup() + ); + client.innerApiCalls.getBackup = stubSimpleCall(expectedResponse); + const [response] = await client.getBackup(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.Backup() + ); + client.innerApiCalls.getBackup = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackup( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackup|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackup with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackup = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getBackup(request), expectedError); + const actualRequest = (client.innerApiCalls.getBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackup with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBackup(request), expectedError); + }); + }); + + describe('getBackupPlan', () => { + it('invokes getBackupPlan without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupPlan() + ); + client.innerApiCalls.getBackupPlan = stubSimpleCall(expectedResponse); + const [response] = await client.getBackupPlan(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlan without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupPlan() + ); + client.innerApiCalls.getBackupPlan = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackupPlan( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlan|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlan with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackupPlan = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getBackupPlan(request), expectedError); + const actualRequest = (client.innerApiCalls.getBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlan with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBackupPlan(request), expectedError); + }); + }); + + describe('getBackupPlanAssociation', () => { + it('invokes getBackupPlanAssociation without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() + ); + client.innerApiCalls.getBackupPlanAssociation = stubSimpleCall(expectedResponse); + const [response] = await client.getBackupPlanAssociation(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlanAssociation without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() + ); + client.innerApiCalls.getBackupPlanAssociation = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getBackupPlanAssociation( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlanAssociation|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlanAssociation with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getBackupPlanAssociation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getBackupPlanAssociation(request), expectedError); + const actualRequest = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getBackupPlanAssociation with closed client', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBackupPlanAssociation(request), expectedError); + }); + }); + + describe('createManagementServer', () => { + it('invokes createManagementServer without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createManagementServer = stubLongRunningCall(expectedResponse); + const [operation] = await client.createManagementServer(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createManagementServer without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createManagementServer = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createManagementServer( + 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.createManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createManagementServer with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createManagementServer = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createManagementServer(request), expectedError); + const actualRequest = (client.innerApiCalls.createManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createManagementServer with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createManagementServer = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createManagementServer(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateManagementServerProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateManagementServerProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateManagementServerProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateManagementServerProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteManagementServer', () => { + it('invokes deleteManagementServer without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteManagementServer = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteManagementServer(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteManagementServer without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteManagementServer = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteManagementServer( + 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.deleteManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteManagementServer with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteManagementServer = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteManagementServer(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteManagementServer with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteManagementServer = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteManagementServer(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteManagementServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteManagementServerProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteManagementServerProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteManagementServerProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteManagementServerProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createBackupVault', () => { + it('invokes createBackupVault without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupVault = stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackupVault(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupVault without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupVault = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createBackupVault( + 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.createBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupVault with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupVault = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createBackupVault(request), expectedError); + const actualRequest = (client.innerApiCalls.createBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupVault with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupVault = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createBackupVault(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupVaultProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupVaultProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupVaultProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupVaultProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateBackupVault', () => { + it('invokes updateBackupVault without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBackupVault = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateBackupVault(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupVault without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBackupVault = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateBackupVault( + 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.updateBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupVault with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackupVault = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateBackupVault(request), expectedError); + const actualRequest = (client.innerApiCalls.updateBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackupVault with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() + ); + request.backupVault ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackupVault = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateBackupVault(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateBackupVaultProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateBackupVaultProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateBackupVaultProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateBackupVaultProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteBackupVault', () => { + it('invokes deleteBackupVault without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupVault = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackupVault(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupVault without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupVault = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackupVault( + 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.deleteBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupVault with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupVault = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteBackupVault(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupVault with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupVault = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteBackupVault(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteBackupVault as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupVaultProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupVaultProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupVaultProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupVaultProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateDataSource', () => { + it('invokes updateDataSource without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + ); + request.dataSource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataSource = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateDataSource(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDataSource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataSource without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + ); + request.dataSource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateDataSource = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataSource( + 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.updateDataSource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataSource with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + ); + request.dataSource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataSource = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateDataSource(request), expectedError); + const actualRequest = (client.innerApiCalls.updateDataSource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataSource with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + ); + request.dataSource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataSource = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateDataSource(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateDataSource as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateDataSourceProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateDataSourceProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateDataSourceProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateDataSourceProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateBackup', () => { + it('invokes updateBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateBackup = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateBackup( + 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.updateBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackup = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateBackup(request), expectedError); + const actualRequest = (client.innerApiCalls.updateBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.UpdateBackupRequest() + ); + request.backup ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); + request.backup.name = defaultValue1; + const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBackup = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateBackupProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkUpdateBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteBackup', () => { + it('invokes deleteBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackup = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackup( + 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.deleteBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackup = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteBackup(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackup = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('restoreBackup', () => { + it('invokes restoreBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RestoreBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.restoreBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.restoreBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.restoreBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RestoreBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.restoreBackup = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.restoreBackup( + 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.restoreBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RestoreBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreBackup = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.restoreBackup(request), expectedError); + const actualRequest = (client.innerApiCalls.restoreBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restoreBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.RestoreBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreBackup = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.restoreBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.restoreBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRestoreBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkRestoreBackupProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRestoreBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkRestoreBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createBackupPlan', () => { + it('invokes createBackupPlan without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupPlan = stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackupPlan(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlan without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupPlan = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createBackupPlan( + 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.createBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlan with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlan = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createBackupPlan(request), expectedError); + const actualRequest = (client.innerApiCalls.createBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlan with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlan = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createBackupPlan(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupPlanProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupPlanProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupPlanProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupPlanProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteBackupPlan', () => { + it('invokes deleteBackupPlan without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupPlan = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackupPlan(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlan without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupPlan = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackupPlan( + 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.deleteBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlan with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlan = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteBackupPlan(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlan with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlan = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteBackupPlan(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteBackupPlan as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupPlanProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupPlanProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupPlanProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupPlanProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createBackupPlanAssociation', () => { + it('invokes createBackupPlanAssociation without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall(expectedResponse); + const [operation] = await client.createBackupPlanAssociation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlanAssociation without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createBackupPlanAssociation( + 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.createBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlanAssociation with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createBackupPlanAssociation(request), expectedError); + const actualRequest = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createBackupPlanAssociation with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createBackupPlanAssociation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateBackupPlanAssociationProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupPlanAssociationProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBackupPlanAssociationProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkCreateBackupPlanAssociationProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteBackupPlanAssociation', () => { + it('invokes deleteBackupPlanAssociation without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteBackupPlanAssociation(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlanAssociation without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteBackupPlanAssociation( + 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.deleteBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlanAssociation with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteBackupPlanAssociation(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteBackupPlanAssociation with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteBackupPlanAssociation(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteBackupPlanAssociationProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupPlanAssociationProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteBackupPlanAssociationProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkDeleteBackupPlanAssociationProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('triggerBackup', () => { + it('invokes triggerBackup without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.TriggerBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.triggerBackup = stubLongRunningCall(expectedResponse); + const [operation] = await client.triggerBackup(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.triggerBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes triggerBackup without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.TriggerBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.triggerBackup = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.triggerBackup( + 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.triggerBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes triggerBackup with call error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.TriggerBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.triggerBackup = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.triggerBackup(request), expectedError); + const actualRequest = (client.innerApiCalls.triggerBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes triggerBackup with LRO error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.TriggerBackupRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.triggerBackup = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.triggerBackup(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.triggerBackup as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkTriggerBackupProgress without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkTriggerBackupProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkTriggerBackupProgress with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + 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.checkTriggerBackupProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listManagementServers', () => { + it('invokes listManagementServers without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + ]; + client.innerApiCalls.listManagementServers = stubSimpleCall(expectedResponse); + const [response] = await client.listManagementServers(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listManagementServers as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listManagementServers as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listManagementServers without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + ]; + client.innerApiCalls.listManagementServers = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listManagementServers( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IManagementServer[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listManagementServers as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listManagementServers as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listManagementServers with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listManagementServers = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listManagementServers(request), expectedError); + const actualRequest = (client.innerApiCalls.listManagementServers as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listManagementServers as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listManagementServersStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + ]; + client.descriptors.page.listManagementServers.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listManagementServersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.ManagementServer[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.ManagementServer) => { + 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.listManagementServers.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listManagementServers, request)); + assert( + (client.descriptors.page.listManagementServers.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listManagementServersStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listManagementServers.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listManagementServersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.ManagementServer[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.ManagementServer) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listManagementServers.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listManagementServers, request)); + assert( + (client.descriptors.page.listManagementServers.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listManagementServers without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), + ]; + client.descriptors.page.listManagementServers.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IManagementServer[] = []; + const iterable = client.listManagementServersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listManagementServers with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListManagementServersRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listManagementServers.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listManagementServersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IManagementServer[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listBackupVaults', () => { + it('invokes listBackupVaults without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + ]; + client.innerApiCalls.listBackupVaults = stubSimpleCall(expectedResponse); + const [response] = await client.listBackupVaults(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBackupVaults as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupVaults as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupVaults without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + ]; + client.innerApiCalls.listBackupVaults = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackupVaults( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupVault[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBackupVaults as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupVaults as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupVaults with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackupVaults = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listBackupVaults(request), expectedError); + const actualRequest = (client.innerApiCalls.listBackupVaults as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupVaults as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupVaultsStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + ]; + client.descriptors.page.listBackupVaults.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { + 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.listBackupVaults.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBackupVaults, request)); + assert( + (client.descriptors.page.listBackupVaults.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listBackupVaultsStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupVaults.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listBackupVaults.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBackupVaults, request)); + assert( + (client.descriptors.page.listBackupVaults.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBackupVaults without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + ]; + client.descriptors.page.listBackupVaults.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; + const iterable = client.listBackupVaultsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBackupVaults with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupVaults.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBackupVaultsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('fetchUsableBackupVaults', () => { + it('invokes fetchUsableBackupVaults without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + ]; + client.innerApiCalls.fetchUsableBackupVaults = stubSimpleCall(expectedResponse); + const [response] = await client.fetchUsableBackupVaults(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchUsableBackupVaults without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + ]; + client.innerApiCalls.fetchUsableBackupVaults = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchUsableBackupVaults( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupVault[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchUsableBackupVaults with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchUsableBackupVaults = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.fetchUsableBackupVaults(request), expectedError); + const actualRequest = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchUsableBackupVaultsStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + ]; + client.descriptors.page.fetchUsableBackupVaults.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.fetchUsableBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { + 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.fetchUsableBackupVaults.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.fetchUsableBackupVaults, request)); + assert( + (client.descriptors.page.fetchUsableBackupVaults.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes fetchUsableBackupVaultsStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchUsableBackupVaults.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.fetchUsableBackupVaultsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.fetchUsableBackupVaults.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.fetchUsableBackupVaults, request)); + assert( + (client.descriptors.page.fetchUsableBackupVaults.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with fetchUsableBackupVaults without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), + ]; + client.descriptors.page.fetchUsableBackupVaults.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; + const iterable = client.fetchUsableBackupVaultsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with fetchUsableBackupVaults with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.fetchUsableBackupVaults.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.fetchUsableBackupVaultsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listDataSources', () => { + it('invokes listDataSources without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + ]; + client.innerApiCalls.listDataSources = stubSimpleCall(expectedResponse); + const [response] = await client.listDataSources(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataSources as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataSources as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSources without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + ]; + client.innerApiCalls.listDataSources = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataSources( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IDataSource[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataSources as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataSources as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSources with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataSources = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDataSources(request), expectedError); + const actualRequest = (client.innerApiCalls.listDataSources as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataSources as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataSourcesStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + ]; + client.descriptors.page.listDataSources.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDataSourcesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.DataSource[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.DataSource) => { + 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.listDataSources.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataSources, request)); + assert( + (client.descriptors.page.listDataSources.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDataSourcesStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataSources.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataSourcesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.DataSource[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.DataSource) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDataSources.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataSources, request)); + assert( + (client.descriptors.page.listDataSources.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataSources without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), + ]; + client.descriptors.page.listDataSources.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IDataSource[] = []; + const iterable = client.listDataSourcesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDataSources.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataSources.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataSources with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataSources.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataSourcesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IDataSource[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDataSources.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataSources.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listBackups', () => { + it('invokes listBackups without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.innerApiCalls.listBackups = stubSimpleCall(expectedResponse); + const [response] = await client.listBackups(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBackups as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackups as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackups without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.innerApiCalls.listBackups = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackups( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackup[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBackups as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackups as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackups with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackups = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listBackups(request), expectedError); + const actualRequest = (client.innerApiCalls.listBackups as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackups as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupsStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.descriptors.page.listBackups.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listBackupsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.Backup[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.Backup) => { + 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.listBackups.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBackups, request)); + assert( + (client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listBackupsStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackups.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listBackupsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.Backup[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.Backup) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBackups, request)); + assert( + (client.descriptors.page.listBackups.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBackups without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), + ]; + client.descriptors.page.listBackups.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackup[] = []; + const iterable = client.listBackupsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBackups.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBackups.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBackups with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackups.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBackupsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackup[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBackups.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBackups.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listBackupPlans', () => { + it('invokes listBackupPlans without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + ]; + client.innerApiCalls.listBackupPlans = stubSimpleCall(expectedResponse); + const [response] = await client.listBackupPlans(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBackupPlans as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlans as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlans without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + ]; + client.innerApiCalls.listBackupPlans = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackupPlans( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlan[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBackupPlans as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlans as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlans with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackupPlans = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listBackupPlans(request), expectedError); + const actualRequest = (client.innerApiCalls.listBackupPlans as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlans as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlansStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + ]; + client.descriptors.page.listBackupPlans.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listBackupPlansStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupPlan[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlan) => { + 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.listBackupPlans.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBackupPlans, request)); + assert( + (client.descriptors.page.listBackupPlans.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listBackupPlansStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupPlans.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listBackupPlansStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupPlan[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlan) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listBackupPlans.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBackupPlans, request)); + assert( + (client.descriptors.page.listBackupPlans.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBackupPlans without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), + ]; + client.descriptors.page.listBackupPlans.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackupPlan[] = []; + const iterable = client.listBackupPlansAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBackupPlans with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupPlans.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBackupPlansAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackupPlan[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listBackupPlanAssociations', () => { + it('invokes listBackupPlanAssociations without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + ]; + client.innerApiCalls.listBackupPlanAssociations = stubSimpleCall(expectedResponse); + const [response] = await client.listBackupPlanAssociations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlanAssociations without error using callback', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + ]; + client.innerApiCalls.listBackupPlanAssociations = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBackupPlanAssociations( + request, + (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlanAssociations with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBackupPlanAssociations = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listBackupPlanAssociations(request), expectedError); + const actualRequest = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBackupPlanAssociationsStream without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + ]; + client.descriptors.page.listBackupPlanAssociations.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listBackupPlanAssociationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupPlanAssociation[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlanAssociation) => { + 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.listBackupPlanAssociations.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBackupPlanAssociations, request)); + assert( + (client.descriptors.page.listBackupPlanAssociations.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listBackupPlanAssociationsStream with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupPlanAssociations.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listBackupPlanAssociationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.backupdr.v1.BackupPlanAssociation[] = []; + stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlanAssociation) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listBackupPlanAssociations.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBackupPlanAssociations, request)); + assert( + (client.descriptors.page.listBackupPlanAssociations.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBackupPlanAssociations without error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), + ]; + client.descriptors.page.listBackupPlanAssociations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[] = []; + const iterable = client.listBackupPlanAssociationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBackupPlanAssociations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBackupPlanAssociations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBackupPlanAssociations with error', async () => { + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listBackupPlanAssociations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBackupPlanAssociationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBackupPlanAssociations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBackupPlanAssociations.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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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 backupdrModule.v1.BackupDRClient({ + 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('backup', () => { + const fakePath = "/rendered/path/backup"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + backupvault: "backupvaultValue", + datasource: "datasourceValue", + backup: "backupValue", + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.backupPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.backupPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('backupPath', () => { + const result = client.backupPath("projectValue", "locationValue", "backupvaultValue", "datasourceValue", "backupValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.backupPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromBackupName', () => { + const result = client.matchProjectFromBackupName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromBackupName', () => { + const result = client.matchLocationFromBackupName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBackupvaultFromBackupName', () => { + const result = client.matchBackupvaultFromBackupName(fakePath); + assert.strictEqual(result, "backupvaultValue"); + assert((client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDatasourceFromBackupName', () => { + const result = client.matchDatasourceFromBackupName(fakePath); + assert.strictEqual(result, "datasourceValue"); + assert((client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBackupFromBackupName', () => { + const result = client.matchBackupFromBackupName(fakePath); + assert.strictEqual(result, "backupValue"); + assert((client.pathTemplates.backupPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('backupPlan', () => { + const fakePath = "/rendered/path/backupPlan"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + backup_plan: "backupPlanValue", + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.backupPlanPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.backupPlanPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('backupPlanPath', () => { + const result = client.backupPlanPath("projectValue", "locationValue", "backupPlanValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.backupPlanPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromBackupPlanName', () => { + const result = client.matchProjectFromBackupPlanName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.backupPlanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromBackupPlanName', () => { + const result = client.matchLocationFromBackupPlanName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.backupPlanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBackupPlanFromBackupPlanName', () => { + const result = client.matchBackupPlanFromBackupPlanName(fakePath); + assert.strictEqual(result, "backupPlanValue"); + assert((client.pathTemplates.backupPlanPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('backupPlanAssociation', () => { + const fakePath = "/rendered/path/backupPlanAssociation"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + backup_plan_association: "backupPlanAssociationValue", + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.backupPlanAssociationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.backupPlanAssociationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('backupPlanAssociationPath', () => { + const result = client.backupPlanAssociationPath("projectValue", "locationValue", "backupPlanAssociationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.backupPlanAssociationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromBackupPlanAssociationName', () => { + const result = client.matchProjectFromBackupPlanAssociationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.backupPlanAssociationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromBackupPlanAssociationName', () => { + const result = client.matchLocationFromBackupPlanAssociationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.backupPlanAssociationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBackupPlanAssociationFromBackupPlanAssociationName', () => { + const result = client.matchBackupPlanAssociationFromBackupPlanAssociationName(fakePath); + assert.strictEqual(result, "backupPlanAssociationValue"); + assert((client.pathTemplates.backupPlanAssociationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('backupVault', () => { + const fakePath = "/rendered/path/backupVault"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + backupvault: "backupvaultValue", + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.backupVaultPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.backupVaultPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('backupVaultPath', () => { + const result = client.backupVaultPath("projectValue", "locationValue", "backupvaultValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.backupVaultPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromBackupVaultName', () => { + const result = client.matchProjectFromBackupVaultName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.backupVaultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromBackupVaultName', () => { + const result = client.matchLocationFromBackupVaultName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.backupVaultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBackupvaultFromBackupVaultName', () => { + const result = client.matchBackupvaultFromBackupVaultName(fakePath); + assert.strictEqual(result, "backupvaultValue"); + assert((client.pathTemplates.backupVaultPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('dataSource', () => { + const fakePath = "/rendered/path/dataSource"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + backupvault: "backupvaultValue", + datasource: "datasourceValue", + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataSourcePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataSourcePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataSourcePath', () => { + const result = client.dataSourcePath("projectValue", "locationValue", "backupvaultValue", "datasourceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataSourcePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataSourceName', () => { + const result = client.matchProjectFromDataSourceName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataSourceName', () => { + const result = client.matchLocationFromDataSourceName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchBackupvaultFromDataSourceName', () => { + const result = client.matchBackupvaultFromDataSourceName(fakePath); + assert.strictEqual(result, "backupvaultValue"); + assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDatasourceFromDataSourceName', () => { + const result = client.matchDatasourceFromDataSourceName(fakePath); + assert.strictEqual(result, "datasourceValue"); + assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new backupdrModule.v1.BackupDRClient({ + 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('managementServer', () => { + const fakePath = "/rendered/path/managementServer"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + managementserver: "managementserverValue", + }; + const client = new backupdrModule.v1.BackupDRClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.managementServerPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.managementServerPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('managementServerPath', () => { + const result = client.managementServerPath("projectValue", "locationValue", "managementserverValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.managementServerPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromManagementServerName', () => { + const result = client.matchProjectFromManagementServerName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.managementServerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromManagementServerName', () => { + const result = client.matchLocationFromManagementServerName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.managementServerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchManagementserverFromManagementServerName', () => { + const result = client.matchManagementserverFromManagementServerName(fakePath); + assert.strictEqual(result, "managementserverValue"); + assert((client.pathTemplates.managementServerPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new backupdrModule.v1.BackupDRClient({ + 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)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/tsconfig.json b/owl-bot-staging/google-cloud-backupdr/v1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/tsconfig.json @@ -0,0 +1,19 @@ +{ + "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-backupdr/v1/webpack.config.js b/owl-bot-staging/google-cloud-backupdr/v1/webpack.config.js new file mode 100644 index 00000000000..72a35713b8c --- /dev/null +++ b/owl-bot-staging/google-cloud-backupdr/v1/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'BackupDR', + filename: './backup-d-r.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; From 3e23854510e3bfa88ac7ead02e3beb637ac2a599 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 7 Oct 2024 19:11:30 +0000 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../google-cloud-backupdr/v1/.eslintignore | 7 - .../google-cloud-backupdr/v1/.eslintrc.json | 3 - .../google-cloud-backupdr/v1/.gitignore | 14 - .../google-cloud-backupdr/v1/.jsdoc.js | 55 - .../google-cloud-backupdr/v1/.mocharc.js | 33 - .../google-cloud-backupdr/v1/.prettierrc.js | 22 - .../google-cloud-backupdr/v1/README.md | 1 - .../google-cloud-backupdr/v1/package.json | 58 - .../google/cloud/backupdr/v1/backupdr.proto | 681 - .../google/cloud/backupdr/v1/backupplan.proto | 438 - .../backupdr/v1/backupplanassociation.proto | 313 - .../cloud/backupdr/v1/backupvault.proto | 1146 - .../cloud/backupdr/v1/backupvault_ba.proto | 49 - .../cloud/backupdr/v1/backupvault_gce.proto | 949 - .../v1/protos/protos.d.ts | 20626 ------ .../google-cloud-backupdr/v1/protos/protos.js | 55595 ---------------- .../v1/protos/protos.json | 7136 -- .../v1/backup_d_r.create_backup_plan.js | 91 - ...ckup_d_r.create_backup_plan_association.js | 89 - .../v1/backup_d_r.create_backup_vault.js | 93 - .../v1/backup_d_r.create_management_server.js | 90 - .../generated/v1/backup_d_r.delete_backup.js | 76 - .../v1/backup_d_r.delete_backup_plan.js | 77 - ...ckup_d_r.delete_backup_plan_association.js | 77 - .../v1/backup_d_r.delete_backup_vault.js | 97 - .../v1/backup_d_r.delete_management_server.js | 76 - .../backup_d_r.fetch_usable_backup_vaults.js | 85 - .../generated/v1/backup_d_r.get_backup.js | 67 - .../v1/backup_d_r.get_backup_plan.js | 62 - .../backup_d_r.get_backup_plan_association.js | 62 - .../v1/backup_d_r.get_backup_vault.js | 67 - .../v1/backup_d_r.get_data_source.js | 62 - .../v1/backup_d_r.get_management_server.js | 62 - ...ackup_d_r.list_backup_plan_associations.js | 81 - .../v1/backup_d_r.list_backup_plans.js | 93 - .../v1/backup_d_r.list_backup_vaults.js | 90 - .../generated/v1/backup_d_r.list_backups.js | 90 - .../v1/backup_d_r.list_data_sources.js | 85 - .../v1/backup_d_r.list_management_servers.js | 85 - .../generated/v1/backup_d_r.restore_backup.js | 85 - .../generated/v1/backup_d_r.trigger_backup.js | 82 - .../generated/v1/backup_d_r.update_backup.js | 85 - .../v1/backup_d_r.update_backup_vault.js | 95 - .../v1/backup_d_r.update_data_source.js | 89 - ...pet_metadata_google.cloud.backupdr.v1.json | 1363 - .../google-cloud-backupdr/v1/src/index.ts | 25 - .../v1/src/v1/backup_d_r_client.ts | 4711 -- .../v1/src/v1/backup_d_r_client_config.json | 163 - .../v1/src/v1/backup_d_r_proto_list.json | 8 - .../v1/src/v1/gapic_metadata.json | 321 - .../google-cloud-backupdr/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_backup_d_r_v1.ts | 5876 -- .../google-cloud-backupdr/v1/tsconfig.json | 19 - .../v1/webpack.config.js | 64 - .../google/cloud/backupdr/v1/backupdr.proto | 95 - .../cloud/backupdr/v1/backupvault.proto | 232 - .../google-cloud-backupdr/protos/protos.d.ts | 17360 ++--- .../google-cloud-backupdr/protos/protos.js | 52647 +++++++-------- .../google-cloud-backupdr/protos/protos.json | 843 +- ...pet_metadata_google.cloud.backupdr.v1.json | 344 - .../src/v1/backup_d_r_client.ts | 968 - .../src/v1/backup_d_r_client_config.json | 28 - .../src/v1/gapic_metadata.json | 70 - .../test/gapic_backup_d_r_v1.ts | 2063 +- 67 files changed, 31043 insertions(+), 145603 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/README.md delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/package.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplan.proto delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplanassociation.proto delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault.proto delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_ba.proto delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_gce.proto delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan_association.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_vault.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan_association.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_vault.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan_association.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_vault.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_data_source.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plan_associations.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plans.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_vaults.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backups.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_data_sources.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.restore_backup.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.trigger_backup.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup_vault.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_data_source.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client_config.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/test/gapic_backup_d_r_v1.ts delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-backupdr/v1/webpack.config.js diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.eslintignore b/owl-bot-staging/google-cloud-backupdr/v1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/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-backupdr/v1/.eslintrc.json b/owl-bot-staging/google-cloud-backupdr/v1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.gitignore b/owl-bot-staging/google-cloud-backupdr/v1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/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-backupdr/v1/.jsdoc.js b/owl-bot-staging/google-cloud-backupdr/v1/.jsdoc.js deleted file mode 100644 index 7b9ce99a79c..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/.jsdoc.js +++ /dev/null @@ -1,55 +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 -// -// 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 2024 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/backupdr', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js b/owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js deleted file mode 100644 index 13b67c34edc..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/.mocharc.js +++ /dev/null @@ -1,33 +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 -// -// 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-backupdr/v1/.prettierrc.js b/owl-bot-staging/google-cloud-backupdr/v1/.prettierrc.js deleted file mode 100644 index 9a8fd690982..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/.prettierrc.js +++ /dev/null @@ -1,22 +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 -// -// 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-backupdr/v1/README.md b/owl-bot-staging/google-cloud-backupdr/v1/README.md deleted file mode 100644 index a01e3b46ff3..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/README.md +++ /dev/null @@ -1 +0,0 @@ -Backupdr: Nodejs Client diff --git a/owl-bot-staging/google-cloud-backupdr/v1/package.json b/owl-bot-staging/google-cloud-backupdr/v1/package.json deleted file mode 100644 index 0bb72fdc884..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@google-cloud/backupdr", - "version": "0.1.0", - "description": "Backupdr client for Node.js", - "repository": "googleapis/nodejs-backupdr", - "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 backupdr", - "backupdr", - "backup d r" - ], - "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-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto deleted file mode 100644 index d5ae643d6ff..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupdr.proto +++ /dev/null @@ -1,681 +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.backupdr.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/field_info.proto"; -import "google/api/resource.proto"; -import "google/cloud/backupdr/v1/backupplan.proto"; -import "google/cloud/backupdr/v1/backupplanassociation.proto"; -import "google/cloud/backupdr/v1/backupvault.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -option csharp_namespace = "Google.Cloud.BackupDR.V1"; -option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; -option java_multiple_files = true; -option java_outer_classname = "BackupDRProto"; -option java_package = "com.google.cloud.backupdr.v1"; -option php_namespace = "Google\\Cloud\\BackupDR\\V1"; -option ruby_package = "Google::Cloud::BackupDR::V1"; - -// The BackupDR Service -service BackupDR { - option (google.api.default_host) = "backupdr.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists ManagementServers in a given project and location. - rpc ListManagementServers(ListManagementServersRequest) - returns (ListManagementServersResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/managementServers" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a single ManagementServer. - rpc GetManagementServer(GetManagementServerRequest) - returns (ManagementServer) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/managementServers/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new ManagementServer in a given project and location. - rpc CreateManagementServer(CreateManagementServerRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/managementServers" - body: "management_server" - }; - option (google.api.method_signature) = - "parent,management_server,management_server_id"; - option (google.longrunning.operation_info) = { - response_type: "ManagementServer" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a single ManagementServer. - rpc DeleteManagementServer(DeleteManagementServerRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/managementServers/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Creates a new BackupVault in a given project and location. - rpc CreateBackupVault(CreateBackupVaultRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/backupVaults" - body: "backup_vault" - }; - option (google.api.method_signature) = - "parent,backup_vault,backup_vault_id"; - option (google.longrunning.operation_info) = { - response_type: "BackupVault" - metadata_type: "OperationMetadata" - }; - } - - // Lists BackupVaults in a given project and location. - rpc ListBackupVaults(ListBackupVaultsRequest) - returns (ListBackupVaultsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/backupVaults" - }; - option (google.api.method_signature) = "parent"; - } - - // FetchUsableBackupVaults lists usable BackupVaults in a given project and - // location. Usable BackupVault are the ones that user has - // backupdr.backupVaults.get permission. - rpc FetchUsableBackupVaults(FetchUsableBackupVaultsRequest) - returns (FetchUsableBackupVaultsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a BackupVault. - rpc GetBackupVault(GetBackupVaultRequest) returns (BackupVault) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backupVaults/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates the settings of a BackupVault. - rpc UpdateBackupVault(UpdateBackupVaultRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}" - body: "backup_vault" - }; - option (google.api.method_signature) = "backup_vault,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "BackupVault" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a BackupVault. - rpc DeleteBackupVault(DeleteBackupVaultRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/backupVaults/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Lists DataSources in a given project and location. - rpc ListDataSources(ListDataSourcesRequest) - returns (ListDataSourcesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a DataSource. - rpc GetDataSource(GetDataSourceRequest) returns (DataSource) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates the settings of a DataSource. - rpc UpdateDataSource(UpdateDataSourceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}" - body: "data_source" - }; - option (google.api.method_signature) = "data_source,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "DataSource" - metadata_type: "OperationMetadata" - }; - } - - // Lists Backups in a given project and location. - rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a Backup. - rpc GetBackup(GetBackupRequest) returns (Backup) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates the settings of a Backup. - rpc UpdateBackup(UpdateBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" - body: "backup" - }; - option (google.api.method_signature) = "backup,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Backup" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a Backup. - rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "Backup" - metadata_type: "OperationMetadata" - }; - } - - // Restore from a Backup - rpc RestoreBackup(RestoreBackupRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore" - body: "*" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "RestoreBackupResponse" - metadata_type: "OperationMetadata" - }; - } - - // Create a BackupPlan - rpc CreateBackupPlan(CreateBackupPlanRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/backupPlans" - body: "backup_plan" - }; - option (google.api.method_signature) = "parent,backup_plan,backup_plan_id"; - option (google.longrunning.operation_info) = { - response_type: "BackupPlan" - metadata_type: "OperationMetadata" - }; - } - - // Gets details of a single BackupPlan. - rpc GetBackupPlan(GetBackupPlanRequest) returns (BackupPlan) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backupPlans/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists BackupPlans in a given project and location. - rpc ListBackupPlans(ListBackupPlansRequest) - returns (ListBackupPlansResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/backupPlans" - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a single BackupPlan. - rpc DeleteBackupPlan(DeleteBackupPlanRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/backupPlans/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Create a BackupPlanAssociation - rpc CreateBackupPlanAssociation(CreateBackupPlanAssociationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" - body: "backup_plan_association" - }; - option (google.api.method_signature) = - "parent,backup_plan_association,backup_plan_association_id"; - option (google.longrunning.operation_info) = { - response_type: "BackupPlanAssociation" - metadata_type: "OperationMetadata" - }; - } - - // Gets details of a single BackupPlanAssociation. - rpc GetBackupPlanAssociation(GetBackupPlanAssociationRequest) - returns (BackupPlanAssociation) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists BackupPlanAssociations in a given project and location. - rpc ListBackupPlanAssociations(ListBackupPlanAssociationsRequest) - returns (ListBackupPlanAssociationsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a single BackupPlanAssociation. - rpc DeleteBackupPlanAssociation(DeleteBackupPlanAssociationRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Triggers a new Backup. - rpc TriggerBackup(TriggerBackupRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup" - body: "*" - }; - option (google.api.method_signature) = "name,rule_id"; - option (google.longrunning.operation_info) = { - response_type: "BackupPlanAssociation" - metadata_type: "OperationMetadata" - }; - } -} - -// Network configuration for ManagementServer instance. -message NetworkConfig { - // VPC peering modes supported by Cloud BackupDR. - enum PeeringMode { - // Peering mode not set. - PEERING_MODE_UNSPECIFIED = 0; - - // Connect using Private Service Access to the Management Server. Private - // services access provides an IP address range for multiple Google Cloud - // services, including Cloud BackupDR. - PRIVATE_SERVICE_ACCESS = 1; - } - - // Optional. The resource name of the Google Compute Engine VPC network to - // which the ManagementServer instance is connected. - string network = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The network connect mode of the ManagementServer instance. For - // this version, only PRIVATE_SERVICE_ACCESS is supported. - PeeringMode peering_mode = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// ManagementURI for the Management Server resource. -message ManagementURI { - // Output only. The ManagementServer AGM/RD WebUI URL. - string web_ui = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The ManagementServer AGM/RD API URL. - string api = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// ManagementURI depending on the Workforce Identity i.e. either 1p or 3p. -message WorkforceIdentityBasedManagementURI { - // Output only. First party Management URI for Google Identities. - string first_party_management_uri = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Third party Management URI for External Identity Providers. - string third_party_management_uri = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// OAuth Client ID depending on the Workforce Identity i.e. either 1p or 3p, -message WorkforceIdentityBasedOAuth2ClientID { - // Output only. First party OAuth Client ID for Google Identities. - string first_party_oauth2_client_id = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Third party OAuth Client ID for External Identity Providers. - string third_party_oauth2_client_id = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// ManagementServer describes a single BackupDR ManagementServer instance. -message ManagementServer { - option (google.api.resource) = { - type: "backupdr.googleapis.com/ManagementServer" - pattern: "projects/{project}/locations/{location}/managementServers/{managementserver}" - plural: "managementServers" - singular: "managementServer" - }; - - // Type of backup service resource. - enum InstanceType { - // Instance type is not mentioned. - INSTANCE_TYPE_UNSPECIFIED = 0; - - // Instance for backup and restore management (i.e., AGM). - BACKUP_RESTORE = 1; - } - - // State of Management server instance. - enum InstanceState { - // State not set. - INSTANCE_STATE_UNSPECIFIED = 0; - - // The instance is being created. - CREATING = 1; - - // The instance has been created and is fully usable. - READY = 2; - - // The instance configuration is being updated. Certain kinds of updates - // may cause the instance to become unusable while the update is in - // progress. - UPDATING = 3; - - // The instance is being deleted. - DELETING = 4; - - // The instance is being repaired and may be unstable. - REPAIRING = 5; - - // Maintenance is being performed on this instance. - MAINTENANCE = 6; - - // The instance is experiencing an issue and might be unusable. You can get - // further details from the statusMessage field of Instance resource. - ERROR = 7; - } - - // Output only. Identifier. The resource name. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = IDENTIFIER - ]; - - // Optional. The description of the ManagementServer instance (2048 characters - // or less). - string description = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Resource labels to represent user provided metadata. - // Labels currently defined: - // 1. migrate_from_go= - // If set to true, the MS is created in migration ready mode. - map labels = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The time when the instance was created. - google.protobuf.Timestamp create_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the instance was updated. - google.protobuf.Timestamp update_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The type of the ManagementServer resource. - InstanceType type = 14 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The hostname or ip address of the exposed AGM endpoints, used - // by clients to connect to AGM/RD graphical user interface and APIs. - ManagementURI management_uri = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The hostnames of the exposed AGM endpoints for both types of - // user i.e. 1p and 3p, used to connect AGM/RM UI. - WorkforceIdentityBasedManagementURI workforce_identity_based_management_uri = - 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The ManagementServer state. - InstanceState state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. VPC networks to which the ManagementServer instance is connected. - // For this version, only a single network is supported. - repeated NetworkConfig networks = 8 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Server specified ETag for the ManagementServer resource to - // prevent simultaneous updates from overwiting each other. - string etag = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The OAuth 2.0 client id is required to make API calls to the - // BackupDR instance API of this ManagementServer. This is the value that - // should be provided in the 'aud' field of the OIDC ID Token (see openid - // specification - // https://openid.net/specs/openid-connect-core-1_0.html#IDToken). - string oauth2_client_id = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The OAuth client IDs for both types of user i.e. 1p and 3p. - WorkforceIdentityBasedOAuth2ClientID - workforce_identity_based_oauth2_client_id = 17 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The hostname or ip address of the exposed AGM endpoints, used - // by BAs to connect to BA proxy. - repeated string ba_proxy_uri = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Reserved for future use. - google.protobuf.BoolValue satisfies_pzs = 19 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Reserved for future use. - bool satisfies_pzi = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for listing management servers. -message ListManagementServersRequest { - // Required. The project and location for which to retrieve management servers - // information, in the format 'projects/{project_id}/locations/{location}'. In - // Cloud BackupDR, locations map to Google Cloud regions, for example - // **us-central1**. To retrieve management servers for all locations, use "-" - // for the - // '{location}' value. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "backupdr.googleapis.com/ManagementServer" - } - ]; - - // Optional. Requested page size. Server may return fewer items than - // requested. If unspecified, server will pick an appropriate default. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A token identifying a page of results the server should return. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filtering results. - optional string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Hint for how to order the results. - optional string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for listing management servers. -message ListManagementServersResponse { - // The list of ManagementServer instances in the project for the specified - // location. - // - // If the '{location}' value in the request is "-", the response contains a - // list of instances from all locations. In case any location is unreachable, - // the response will only return management servers in reachable locations and - // the 'unreachable' field will be populated with a list of unreachable - // locations. - repeated ManagementServer management_servers = 1; - - // A token identifying a page of results the server should return. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for getting a management server instance. -message GetManagementServerRequest { - // Required. Name of the management server resource name, in the format - // 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/ManagementServer" - } - ]; -} - -// Request message for creating a management server instance. -message CreateManagementServerRequest { - // Required. The management server project and location in the format - // 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR - // locations map to Google Cloud regions, for example **us-central1**. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "backupdr.googleapis.com/ManagementServer" - } - ]; - - // Required. The name of the management server to create. The name must be - // unique for the specified project and location. - string management_server_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. A [management server - // resource][google.cloud.backupdr.v1.ManagementServer] - ManagementServer management_server = 3 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. An optional 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]; -} - -// Request message for deleting a management server instance. -message DeleteManagementServerRequest { - // Required. Name of the resource - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/ManagementServer" - } - ]; - - // Optional. An optional 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. AdditionalInfo contains additional Info related to backup plan - // association resource. - map additional_info = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplan.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplan.proto deleted file mode 100644 index c64986bf364..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplan.proto +++ /dev/null @@ -1,438 +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.backupdr.v1; - -import "google/api/field_behavior.proto"; -import "google/api/field_info.proto"; -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; -import "google/type/dayofweek.proto"; -import "google/type/month.proto"; - -option csharp_namespace = "Google.Cloud.BackupDR.V1"; -option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; -option java_multiple_files = true; -option java_outer_classname = "BackupPlanProto"; -option java_package = "com.google.cloud.backupdr.v1"; -option php_namespace = "Google\\Cloud\\BackupDR\\V1"; -option ruby_package = "Google::Cloud::BackupDR::V1"; - -// A `BackupPlan` specifies some common fields, such as `description` as well -// as one or more `BackupRule` messages. Each `BackupRule` has a retention -// policy and defines a schedule by which the system is to perform backup -// workloads. -message BackupPlan { - option (google.api.resource) = { - type: "backupdr.googleapis.com/BackupPlan" - pattern: "projects/{project}/locations/{location}/backupPlans/{backup_plan}" - plural: "backupPlans" - singular: "backupPlan" - }; - - // `State` enumerates the possible states for a `BackupPlan`. - enum State { - // State not set. - STATE_UNSPECIFIED = 0; - - // The resource is being created. - CREATING = 1; - - // The resource has been created and is fully usable. - ACTIVE = 2; - - // The resource is being deleted. - DELETING = 3; - - // The resource has been created but is not usable. - INACTIVE = 4; - } - - // Output only. Identifier. The resource name of the `BackupPlan`. - // - // Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = IDENTIFIER - ]; - - // Optional. The description of the `BackupPlan` resource. - // - // The description allows for additional details about `BackupPlan` and its - // use cases to be provided. An example description is the following: "This - // is a backup plan that performs a daily backup at 6pm and retains data for 3 - // months". The description must be at most 2048 characters. - string description = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. This collection of key/value pairs allows for custom labels to be - // supplied by the user. Example, {"tag": "Weekly"}. - map labels = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. When the `BackupPlan` was created. - google.protobuf.Timestamp create_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. When the `BackupPlan` was last updated. - google.protobuf.Timestamp update_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The backup rules for this `BackupPlan`. There must be at least - // one `BackupRule` message. - repeated BackupRule backup_rules = 6 [(google.api.field_behavior) = REQUIRED]; - - // Output only. The `State` for the `BackupPlan`. - State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The resource type to which the `BackupPlan` will be applied. - // Examples include, "compute.googleapis.com/Instance" and - // "storage.googleapis.com/Bucket". - string resource_type = 8 [(google.api.field_behavior) = REQUIRED]; - - // Optional. `etag` is returned from the service in the response. As a user of - // the service, you may provide an etag value in this field to prevent stale - // resources. - string etag = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Resource name of backup vault which will be used as storage - // location for backups. Format: - // projects/{project}/locations/{location}/backupVaults/{backupvault} - string backup_vault = 10 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/BackupVault" - } - ]; - - // Output only. The Google Cloud Platform Service Account to be used by the - // BackupVault for taking backups. Specify the email address of the Backup - // Vault Service Account. - string backup_vault_service_account = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// `BackupRule` binds the backup schedule to a retention policy. -message BackupRule { - // Required. Immutable. The unique id of this `BackupRule`. The `rule_id` is - // unique per `BackupPlan`.The `rule_id` must start with a lowercase letter - // followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, - // /[a-z][a-z0-9-]{,62}/. - string rule_id = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = IMMUTABLE - ]; - - // Required. Configures the duration for which backup data will be kept. It is - // defined in “days”. The value should be greater than or equal to minimum - // enforced retention of the backup vault. - int32 backup_retention_days = 4 [(google.api.field_behavior) = REQUIRED]; - - // Required. - // - // The schedule that defines the automated backup workloads for this - // `BackupRule`. - oneof backup_schedule_oneof { - // Required. Defines a schedule that runs within the confines of a defined - // window of time. - StandardSchedule standard_schedule = 5 - [(google.api.field_behavior) = REQUIRED]; - } -} - -// `StandardSchedule` defines a schedule that run within the confines of a -// defined window of days. We can define recurrence type for schedule as -// HOURLY, DAILY, WEEKLY, MONTHLY or YEARLY. -message StandardSchedule { - // `RecurrenceTypes` enumerates the applicable periodicity for the schedule. - enum RecurrenceType { - // recurrence type not set - RECURRENCE_TYPE_UNSPECIFIED = 0; - - // The `BackupRule` is to be applied hourly. - HOURLY = 1; - - // The `BackupRule` is to be applied daily. - DAILY = 2; - - // The `BackupRule` is to be applied weekly. - WEEKLY = 3; - - // The `BackupRule` is to be applied monthly. - MONTHLY = 4; - - // The `BackupRule` is to be applied yearly. - YEARLY = 5; - } - - // Required. Specifies the `RecurrenceType` for the schedule. - RecurrenceType recurrence_type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Specifies frequency for hourly backups. A hourly frequency of 2 - // means jobs will run every 2 hours from start time till end time defined. - // - // This is required for `recurrence_type`, `HOURLY` and is not applicable - // otherwise. A validation error will occur if a value is supplied and - // `recurrence_type` is not `HOURLY`. - // - // Value of hourly frequency should be between 6 and 23. - // - // Reason for limit : We found that there is bandwidth limitation of 3GB/S for - // GMI while taking a backup and 5GB/S while doing a restore. Given the amount - // of parallel backups and restore we are targeting, this will potentially - // take the backup time to mins and hours (in worst case scenario). - int32 hourly_frequency = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies days of week like, MONDAY or TUESDAY, on which jobs - // will run. - // - // This is required for `recurrence_type`, `WEEKLY` and is not applicable - // otherwise. A validation error will occur if a value is supplied and - // `recurrence_type` is not `WEEKLY`. - repeated google.type.DayOfWeek days_of_week = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies days of months like 1, 5, or 14 on which jobs will run. - // - // Values for `days_of_month` are only applicable for `recurrence_type`, - // `MONTHLY` and `YEARLY`. A validation error will occur if other values are - // supplied. - repeated int32 days_of_month = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies a week day of the month like, FIRST SUNDAY or LAST - // MONDAY, on which jobs will run. This will be specified by two fields in - // `WeekDayOfMonth`, one for the day, e.g. `MONDAY`, and one for the week, - // e.g. `LAST`. - // - // This field is only applicable for `recurrence_type`, `MONTHLY` and - // `YEARLY`. A validation error will occur if other values are supplied. - WeekDayOfMonth week_day_of_month = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies the months of year, like `FEBRUARY` and/or `MAY`, on - // which jobs will run. - // - // This field is only applicable when `recurrence_type` is `YEARLY`. A - // validation error will occur if other values are supplied. - repeated google.type.Month months = 6 - [(google.api.field_behavior) = OPTIONAL]; - - // Required. A BackupWindow defines the window of day during which backup jobs - // will run. Jobs are queued at the beginning of the window and will be marked - // as `NOT_RUN` if they do not start by the end of the window. - // - // Note: running jobs will not be cancelled at the end of the window. - BackupWindow backup_window = 7 [(google.api.field_behavior) = REQUIRED]; - - // Required. The time zone to be used when interpreting the schedule. - // The value of this field must be a time zone name from the IANA tz database. - // See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the - // list of valid timezone names. For e.g., Europe/Paris. - string time_zone = 8 [(google.api.field_behavior) = REQUIRED]; -} - -// `BackupWindow` defines a window of the day during which backup jobs will run. -message BackupWindow { - // Required. The hour of day (0-23) when the window starts for e.g. if value - // of start hour of day is 6 that mean backup window start at 6:00. - int32 start_hour_of_day = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The hour of day (1-24) when the window end for e.g. if value of - // end hour of day is 10 that mean backup window end time is 10:00. - // - // End hour of day should be greater than start hour of day. - // 0 <= start_hour_of_day < end_hour_of_day <= 24 - // - // End hour of day is not include in backup window that mean if - // end_hour_of_day= 10 jobs should start before 10:00. - int32 end_hour_of_day = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// `WeekDayOfMonth` defines the week day of the month on which the backups will -// run. The message combines a `WeekOfMonth` and `DayOfWeek` to produce values -// like `FIRST`/`MONDAY` or `LAST`/`FRIDAY`. -message WeekDayOfMonth { - // `WeekOfMonth` enumerates possible weeks in the month, e.g. the first, - // third, or last week of the month. - enum WeekOfMonth { - // The zero value. Do not use. - WEEK_OF_MONTH_UNSPECIFIED = 0; - - // The first week of the month. - FIRST = 1; - - // The second week of the month. - SECOND = 2; - - // The third week of the month. - THIRD = 3; - - // The fourth week of the month. - FOURTH = 4; - - // The last week of the month. - LAST = 5; - } - - // Required. Specifies the week of the month. - WeekOfMonth week_of_month = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Specifies the day of the week. - google.type.DayOfWeek day_of_week = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// The request message for creating a `BackupPlan`. -message CreateBackupPlanRequest { - // Required. The `BackupPlan` project and location in the format - // `projects/{project}/locations/{location}`. In Cloud BackupDR locations - // map to GCP regions, for example **us-central1**. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "backupdr.googleapis.com/BackupPlan" - } - ]; - - // Required. The name of the `BackupPlan` to create. The name must be unique - // for the specified project and location.The name must start with a lowercase - // letter followed by up to 62 lowercase letters, numbers, or hyphens. - // Pattern, /[a-z][a-z0-9-]{,62}/. - string backup_plan_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The `BackupPlan` resource object to create. - BackupPlan backup_plan = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. An optional 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 t - // he 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_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; -} - -// The request message for getting a list `BackupPlan`. -message ListBackupPlansRequest { - // Required. The project and location for which to retrieve `BackupPlans` - // information. Format: `projects/{project}/locations/{location}`. In Cloud - // BackupDR, locations map to GCP regions, for e.g. **us-central1**. To - // retrieve backup plans for all locations, use "-" for the - // `{location}` value. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "backupdr.googleapis.com/BackupPlan" - } - ]; - - // Optional. The maximum number of `BackupPlans` to return in a single - // response. If not specified, a default value will be chosen by the service. - // Note that the response may include a partial list and a caller should - // only rely on the response's - // [next_page_token][google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token] - // to determine if there are more instances left to be queried. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The value of - // [next_page_token][google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token] - // received from a previous `ListBackupPlans` call. - // Provide this to retrieve the subsequent page in a multi-page list of - // results. When paginating, all other parameters provided to - // `ListBackupPlans` must match the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Field match expression used to filter the results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Field by which to sort the results. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The response message for getting a list of `BackupPlan`. -message ListBackupPlansResponse { - // The list of `BackupPlans` in the project for the specified - // location. - // - // If the `{location}` value in the request is "-", the response contains a - // list of resources from all locations. In case any location is unreachable, - // the response will only return backup plans in reachable locations and - // the 'unreachable' field will be populated with a list of unreachable - // locations. - // BackupPlan - repeated BackupPlan backup_plans = 1; - - // A token which may be sent as - // [page_token][google.cloud.backupdr.v1.ListBackupPlansRequest.page_token] in - // a subsequent `ListBackupPlans` call to retrieve the next page of results. - // If this field is omitted or empty, then there are no more results to - // return. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// The request message for getting a `BackupPlan`. -message GetBackupPlanRequest { - // Required. The resource name of the `BackupPlan` to retrieve. - // - // Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/BackupPlan" - } - ]; -} - -// The request message for deleting a `BackupPlan`. -message DeleteBackupPlanRequest { - // Required. The resource name of the `BackupPlan` to delete. - // - // Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/BackupPlan" - } - ]; - - // Optional. An optional 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_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplanassociation.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplanassociation.proto deleted file mode 100644 index b807a2b916c..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupplanassociation.proto +++ /dev/null @@ -1,313 +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.backupdr.v1; - -import "google/api/field_behavior.proto"; -import "google/api/field_info.proto"; -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option csharp_namespace = "Google.Cloud.BackupDR.V1"; -option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; -option java_multiple_files = true; -option java_outer_classname = "BackupPlanAssociationProto"; -option java_package = "com.google.cloud.backupdr.v1"; -option php_namespace = "Google\\Cloud\\BackupDR\\V1"; -option ruby_package = "Google::Cloud::BackupDR::V1"; - -// A BackupPlanAssociation represents a single BackupPlanAssociation which -// contains details like workload, backup plan etc -message BackupPlanAssociation { - option (google.api.resource) = { - type: "backupdr.googleapis.com/BackupPlanAssociation" - pattern: "projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}" - plural: "backupPlanAssociations" - singular: "backupPlanAssociation" - }; - - // Enum for State of BackupPlan Association - enum State { - // State not set. - STATE_UNSPECIFIED = 0; - - // The resource is being created. - CREATING = 1; - - // The resource has been created and is fully usable. - ACTIVE = 2; - - // The resource is being deleted. - DELETING = 3; - - // The resource has been created but is not usable. - INACTIVE = 4; - } - - // Output only. Identifier. The resource name of BackupPlanAssociation in - // below format Format : - // projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId} - string name = 1 [ - (google.api.field_behavior) = IDENTIFIER, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Optional. Resource type of workload on which backupplan is applied - string resource_type = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Immutable. Resource name of workload on which backupplan is - // applied - string resource = 3 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.field_behavior) = REQUIRED - ]; - - // Required. Resource name of backup plan which needs to be applied on - // workload. Format: - // projects/{project}/locations/{location}/backupPlans/{backupPlanId} - string backup_plan = 4 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/BackupPlan" - } - ]; - - // Output only. The time when the instance was created. - google.protobuf.Timestamp create_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the instance was updated. - google.protobuf.Timestamp update_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The BackupPlanAssociation resource state. - State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The config info related to backup rules. - repeated RuleConfigInfo rules_config_info = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Output Only. - // - // Resource name of data source which will be used as storage location for - // backups taken. - // Format : - // projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource} - string data_source = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Message for rules config info. -message RuleConfigInfo { - // Enum for LastBackupState - enum LastBackupState { - // State not set. - LAST_BACKUP_STATE_UNSPECIFIED = 0; - - // The first backup is pending. - FIRST_BACKUP_PENDING = 1; - - // The most recent backup could not be run/failed because of the lack of - // permissions. - PERMISSION_DENIED = 2; - - // The last backup operation succeeded. - SUCCEEDED = 3; - - // The last backup operation failed. - FAILED = 4; - } - - // Output only. Output Only. - // - // Backup Rule id fetched from backup plan. - string rule_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The last backup state for rule. - LastBackupState last_backup_state = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Output Only. - // - // google.rpc.Status object to store the last backup error. - google.rpc.Status last_backup_error = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The point in time when the last successful backup was captured - // from the source. - google.protobuf.Timestamp last_successful_backup_consistency_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for creating a backup plan. -message CreateBackupPlanAssociationRequest { - // Required. The backup plan association project and location in the format - // `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations - // map to GCP regions, for example **us-central1**. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "backupdr.googleapis.com/BackupPlanAssociation" - } - ]; - - // Required. The name of the backup plan association to create. The name must - // be unique for the specified project and location. - string backup_plan_association_id = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The resource being created - BackupPlanAssociation backup_plan_association = 3 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. An optional 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 t - // he 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_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; -} - -// Request message for List BackupPlanAssociation -message ListBackupPlanAssociationsRequest { - // Required. The project and location for which to retrieve backup Plan - // Associations information, in the format - // `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations - // map to GCP regions, for example **us-central1**. To retrieve backup plan - // associations for all locations, use "-" for the - // `{location}` value. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "backupdr.googleapis.com/BackupPlanAssociation" - } - ]; - - // Optional. Requested page size. Server may return fewer items than - // requested. If unspecified, server will pick an appropriate default. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A token identifying a page of results the server should return. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filtering results - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for List BackupPlanAssociation -message ListBackupPlanAssociationsResponse { - // The list of Backup Plan Associations in the project for the specified - // location. - // - // If the `{location}` value in the request is "-", the response contains a - // list of instances from all locations. In case any location is unreachable, - // the response will only return backup plan associations in reachable - // locations and the 'unreachable' field will be populated with a list of - // unreachable locations. - repeated BackupPlanAssociation backup_plan_associations = 1; - - // A token identifying a page of results the server should return. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for getting a BackupPlanAssociation resource. -message GetBackupPlanAssociationRequest { - // Required. Name of the backup plan association resource, in the format - // `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/BackupPlanAssociation" - } - ]; -} - -// Request message for deleting a backup plan association. -message DeleteBackupPlanAssociationRequest { - // Required. Name of the backup plan association resource, in the format - // `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/BackupPlanAssociation" - } - ]; - - // Optional. An optional 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_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; -} - -// Request message for triggering a backup. -message TriggerBackupRequest { - // Required. Name of the backup plan association resource, in the format - // `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/BackupPlanAssociation" - } - ]; - - // Required. backup rule_id for which a backup needs to be triggered. - string rule_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. An optional 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 = 3 [ - (google.api.field_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault.proto deleted file mode 100644 index f9b46b5bff0..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault.proto +++ /dev/null @@ -1,1146 +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.backupdr.v1; - -import "google/api/field_behavior.proto"; -import "google/api/field_info.proto"; -import "google/api/resource.proto"; -import "google/cloud/backupdr/v1/backupvault_ba.proto"; -import "google/cloud/backupdr/v1/backupvault_gce.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option csharp_namespace = "Google.Cloud.BackupDR.V1"; -option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; -option java_multiple_files = true; -option java_outer_classname = "BackupVaultProto"; -option java_package = "com.google.cloud.backupdr.v1"; -option php_namespace = "Google\\Cloud\\BackupDR\\V1"; -option ruby_package = "Google::Cloud::BackupDR::V1"; - -// Message describing a BackupVault object. -message BackupVault { - option (google.api.resource) = { - type: "backupdr.googleapis.com/BackupVault" - pattern: "projects/{project}/locations/{location}/backupVaults/{backupvault}" - plural: "backupVaults" - singular: "backupVault" - }; - - // Holds the state of the backup vault resource. - enum State { - // State not set. - STATE_UNSPECIFIED = 0; - - // The backup vault is being created. - CREATING = 1; - - // The backup vault has been created and is fully usable. - ACTIVE = 2; - - // The backup vault is being deleted. - DELETING = 3; - - // The backup vault is experiencing an issue and might be unusable. - ERROR = 4; - } - - // Holds the access restriction for the backup vault. - enum AccessRestriction { - // Access restriction not set. - ACCESS_RESTRICTION_UNSPECIFIED = 0; - - // Access to or from resources outside your current project will be denied. - WITHIN_PROJECT = 1; - - // Access to or from resources outside your current organization will be - // denied. - WITHIN_ORGANIZATION = 2; - - // No access restriction. - UNRESTRICTED = 3; - } - - // Output only. Identifier. Name of the backup vault to create. It must have - // the - // format`"projects/{project}/locations/{location}/backupVaults/{backupvault}"`. - // `{backupvault}` cannot be changed after creation. It must be between 3-63 - // characters long and must be unique within the project and location. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = IDENTIFIER - ]; - - // Optional. The description of the BackupVault instance (2048 characters or - // less). - optional string description = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Resource labels to represent user provided metadata. - // No labels currently defined: - map labels = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The time when the instance was created. - optional google.protobuf.Timestamp create_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the instance was updated. - optional google.protobuf.Timestamp update_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The default and minimum enforced retention for each backup within - // the backup vault. The enforced retention for each backup can be extended. - optional google.protobuf.Duration backup_minimum_enforced_retention_duration = - 20 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Set to true when there are no backups nested under this - // resource. - optional bool deletable = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Server specified ETag for the backup vault resource to - // prevent simultaneous updates from overwiting each other. - optional string etag = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The BackupVault resource instance state. - State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Time after which the BackupVault resource is locked. - optional google.protobuf.Timestamp effective_time = 12 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The number of backups in this backup vault. - int64 backup_count = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Service account used by the BackupVault Service for this - // BackupVault. The user should grant this account permissions in their - // workload project to enable the service to run backups and restores there. - string service_account = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Total size of the storage used by all backup resources. - int64 total_stored_bytes = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Output only - // Immutable after resource creation until resource deletion. - string uid = 21 [ - (google.api.field_info).format = UUID4, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Optional. User annotations. See https://google.aip.dev/128#annotations - // Stores small amounts of arbitrary data. - map annotations = 22 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Note: This field is added for future use case and will not be - // supported in the current release. - // - // Optional. - // - // Access restriction for the backup vault. - // Default value is WITHIN_ORGANIZATION if not provided during creation. - AccessRestriction access_restriction = 24 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Message describing a DataSource object. -// Datasource object used to represent Datasource details for both admin and -// basic view. -message DataSource { - option (google.api.resource) = { - type: "backupdr.googleapis.com/DataSource" - pattern: "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}" - plural: "dataSources" - singular: "dataSource" - }; - - // Holds the state of the data source resource. - enum State { - // State not set. - STATE_UNSPECIFIED = 0; - - // The data source is being created. - CREATING = 1; - - // The data source has been created and is fully usable. - ACTIVE = 2; - - // The data source is being deleted. - DELETING = 3; - - // The data source is experiencing an issue and might be unusable. - ERROR = 4; - } - - // Output only. Identifier. Name of the datasource to create. - // It must have the - // format`"projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}"`. - // `{datasource}` cannot be changed after creation. It must be between 3-63 - // characters long and must be unique within the backup vault. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = IDENTIFIER - ]; - - // Output only. The DataSource resource instance state. - State state = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Resource labels to represent user provided metadata. - // No labels currently defined: - map labels = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The time when the instance was created. - optional google.protobuf.Timestamp create_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the instance was updated. - optional google.protobuf.Timestamp update_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Number of backups in the data source. - optional int64 backup_count = 7; - - // Server specified ETag for the ManagementServer resource to prevent - // simultaneous updates from overwiting each other. - optional string etag = 14; - - // The number of bytes (metadata and data) stored in this datasource. - optional int64 total_stored_bytes = 23; - - // Output only. The backup configuration state. - BackupConfigState config_state = 24 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Details of how the resource is configured for backup. - BackupConfigInfo backup_config_info = 25 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The source resource that is represented by this DataSource. It can be a - // Google Cloud resource, or one backed up by a Backup Appliance. - oneof source_resource { - // The backed up resource is a Google Cloud resource. - // The word 'DataSource' was included in the names to indicate that this is - // the representation of the Google Cloud resource used within the - // DataSource object. - DataSourceGcpResource data_source_gcp_resource = 26; - - // The backed up resource is a backup appliance application. - DataSourceBackupApplianceApplication - data_source_backup_appliance_application = 27; - } -} - -// BackupConfigInfo has information about how the resource is configured -// for Backup and about the most recent backup to this vault. -message BackupConfigInfo { - // LastBackupstate tracks whether the last backup was not yet started, - // successful, failed, or could not be run because of the lack of permissions. - enum LastBackupState { - // Status not set. - LAST_BACKUP_STATE_UNSPECIFIED = 0; - - // The first backup has not yet completed - FIRST_BACKUP_PENDING = 1; - - // The most recent backup was successful - SUCCEEDED = 2; - - // The most recent backup failed - FAILED = 3; - - // The most recent backup could not be run/failed because of the lack of - // permissions - PERMISSION_DENIED = 4; - } - - // Output only. The status of the last backup to this BackupVault - LastBackupState last_backup_state = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. If the last backup were successful, this field has the - // consistency date. - google.protobuf.Timestamp last_successful_backup_consistency_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. If the last backup failed, this field has the error message. - google.rpc.Status last_backup_error = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Configuration Info has the resource format-specific configuration. - oneof backup_config { - // Configuration for a Google Cloud resource. - GcpBackupConfig gcp_backup_config = 4; - - // Configuration for an application backed up by a Backup Appliance. - BackupApplianceBackupConfig backup_appliance_backup_config = 5; - } -} - -// GcpBackupConfig captures the Backup configuration details for Google Cloud -// resources. All Google Cloud resources regardless of type are protected with -// backup plan associations. -message GcpBackupConfig { - // The name of the backup plan. - string backup_plan = 1 [(google.api.resource_reference) = { - type: "backupdr.googleapis.com/BackupPlan" - }]; - - // The description of the backup plan. - string backup_plan_description = 2; - - // The name of the backup plan association. - string backup_plan_association = 3 [(google.api.resource_reference) = { - type: "backupdr.googleapis.com/BackupPlanAssociation" - }]; - - // The names of the backup plan rules which point to this backupvault - repeated string backup_plan_rules = 4; -} - -// BackupApplianceBackupConfig captures the backup configuration for -// applications that are protected by Backup Appliances. -message BackupApplianceBackupConfig { - // The name of the backup appliance. - string backup_appliance_name = 1; - - // The ID of the backup appliance. - int64 backup_appliance_id = 2; - - // The ID of the SLA of this application. - int64 sla_id = 3; - - // The name of the application. - string application_name = 4; - - // The name of the host where the application is running. - string host_name = 5; - - // The name of the SLT associated with the application. - string slt_name = 6; - - // The name of the SLP associated with the application. - string slp_name = 7; -} - -// DataSourceGcpResource is used for protected resources that are Google Cloud -// Resources. This name is easeier to understand than GcpResourceDataSource or -// GcpDataSourceResource -message DataSourceGcpResource { - // Output only. Full resource pathname URL of the source Google Cloud - // resource. - string gcp_resourcename = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Location of the resource: //"global"/"unspecified". - string location = 2; - - // The type of the Google Cloud resource. Use the Unified Resource Type, - // eg. compute.googleapis.com/Instance. - string type = 3; - - // gcp_Properties has properties of the Google Cloud Resource. - oneof gcp_resource_properties { - // ComputeInstanceDataSourceProperties has a subset of Compute Instance - // properties that are useful at the Datasource level. - ComputeInstanceDataSourceProperties compute_instance_datasource_properties = - 4; - } -} - -// BackupApplianceApplication describes a Source Resource when it is an -// application backed up by a BackupAppliance. -message DataSourceBackupApplianceApplication { - // The name of the Application as known to the Backup Appliance. - string application_name = 1; - - // Appliance name. - string backup_appliance = 2; - - // Appliance Id of the Backup Appliance. - int64 appliance_id = 3; - - // The type of the application. e.g. VMBackup - string type = 4; - - // The appid field of the application within the Backup Appliance. - int64 application_id = 8; - - // Hostname of the host where the application is running. - string hostname = 6; - - // Hostid of the application host. - int64 host_id = 7; -} - -// ServiceLockInfo represents the details of a lock taken by the service on a -// Backup resource. -message ServiceLockInfo { - // Output only. The name of the operation that created this lock. - // The lock will automatically be released when the operation completes. - string operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// BackupApplianceLockInfo contains metadata about the backupappliance that -// created the lock. -message BackupApplianceLockInfo { - // Required. The ID of the backup/recovery appliance that created this lock. - int64 backup_appliance_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The name of the backup/recovery appliance that created this lock. - string backup_appliance_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The reason for the lock: e.g. MOUNT/RESTORE/BACKUP/etc. The - // value of this string is only meaningful to the client and it is not - // interpreted by the BackupVault service. - string lock_reason = 5 [(google.api.field_behavior) = REQUIRED]; - - // The information about this lock. - oneof lock_source { - // The job name on the backup/recovery appliance that created this lock. - string job_name = 6; - - // The image name that depends on this Backup. - string backup_image = 7; - - // The SLA on the backup/recovery appliance that owns the lock. - int64 sla_id = 8; - } -} - -// BackupLock represents a single lock on a Backup resource. An unexpired -// lock on a Backup prevents the Backup from being deleted. -message BackupLock { - // Required. The time after which this lock is not considered valid and will - // no longer protect the Backup from deletion. - google.protobuf.Timestamp lock_until_time = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Metadata about the owner and reason for the lock. - oneof ClientLockInfo { - // If the client is a backup and recovery appliance, this - // contains metadata about why the lock exists. - BackupApplianceLockInfo backup_appliance_lock_info = 3; - - // Output only. Contains metadata about the lock exist for Google Cloud - // native backups. - ServiceLockInfo service_lock_info = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } -} - -// Message describing a Backup object. -message Backup { - option (google.api.resource) = { - type: "backupdr.googleapis.com/Backup" - pattern: "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}" - plural: "backups" - singular: "backup" - }; - - // Holds the state of the backup resource. - enum State { - // State not set. - STATE_UNSPECIFIED = 0; - - // The backup is being created. - CREATING = 1; - - // The backup has been created and is fully usable. - ACTIVE = 2; - - // The backup is being deleted. - DELETING = 3; - - // The backup is experiencing an issue and might be unusable. - ERROR = 4; - } - - // Type of the backup, scheduled or ondemand. - enum BackupType { - // Backup type is unspecified. - BACKUP_TYPE_UNSPECIFIED = 0; - - // Scheduled backup. - SCHEDULED = 1; - - // On demand backup. - ON_DEMAND = 2; - } - - // GCPBackupPlanInfo captures the plan configuration details of Google Cloud - // resources at the time of backup. - message GCPBackupPlanInfo { - // Resource name of backup plan by which workload is protected at the time - // of the backup. - // Format: - // projects/{project}/locations/{location}/backupPlans/{backupPlanId} - string backup_plan = 1 [(google.api.resource_reference) = { - type: "backupdr.googleapis.com/BackupPlan" - }]; - - // The rule id of the backup plan which triggered this backup in case of - // scheduled backup or used for - string backup_plan_rule_id = 2; - } - - // Output only. Identifier. Name of the backup to create. It must have the - // format`"projects//locations//backupVaults//dataSources/{datasource}/backups/{backup}"`. - // `{backup}` cannot be changed after creation. It must be between 3-63 - // characters long and must be unique within the datasource. - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = IDENTIFIER - ]; - - // Output only. The description of the Backup instance (2048 characters or - // less). - optional string description = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the instance was created. - optional google.protobuf.Timestamp create_time = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when the instance was updated. - optional google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Resource labels to represent user provided metadata. - // No labels currently defined. - map labels = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The backup can not be deleted before this time. - optional google.protobuf.Timestamp enforced_retention_end_time = 6 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. When this backup is automatically expired. - optional google.protobuf.Timestamp expire_time = 7 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The point in time when this backup was captured from the - // source. - optional google.protobuf.Timestamp consistency_time = 9 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Server specified ETag to prevent updates from overwriting each - // other. - optional string etag = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The Backup resource instance state. - State state = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The list of BackupLocks taken by the service to prevent the - // deletion of the backup. - repeated BackupLock service_locks = 17 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The list of BackupLocks taken by the accessor Backup Appliance. - repeated BackupLock backup_appliance_locks = 18 - [(google.api.field_behavior) = OPTIONAL]; - - // Workload specific backup properties. - oneof backup_properties { - // Output only. Compute Engine specific backup properties. - ComputeInstanceBackupProperties compute_instance_backup_properties = 19 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Backup Appliance specific backup properties. - BackupApplianceBackupProperties backup_appliance_backup_properties = 21 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. Type of the backup, unspecified, scheduled or ondemand. - BackupType backup_type = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Configuration Info has the resource format-specific configuration. - oneof plan_info { - // Output only. Configuration for a Google Cloud resource. - GCPBackupPlanInfo gcp_backup_plan_info = 22 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Output only. source resource size in bytes at the time of the backup. - int64 resource_size_bytes = 23 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Message for creating a BackupVault. -message CreateBackupVaultRequest { - // Required. Value for parent. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "backupdr.googleapis.com/BackupVault" - } - ]; - - // Required. ID of the requesting object - // If auto-generating ID server-side, remove this field and - // backup_vault_id from the method_signature of Create RPC - string backup_vault_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The resource being created - BackupVault backup_vault = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. An optional 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_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is 'false'. - bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for listing backupvault stores. -message ListBackupVaultsRequest { - // Required. The project and location for which to retrieve backupvault stores - // information, in the format 'projects/{project_id}/locations/{location}'. In - // Cloud Backup and DR, locations map to Google Cloud regions, for example - // **us-central1**. - // To retrieve backupvault stores for all locations, use "-" for the - // '{location}' value. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "backupdr.googleapis.com/BackupVault" - } - ]; - - // Optional. Requested page size. Server may return fewer items than - // requested. If unspecified, server will pick an appropriate default. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A token identifying a page of results the server should return. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filtering results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Hint for how to order the results. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Reserved for future use to provide a BASIC & FULL view of Backup - // Vault. - BackupVaultView view = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for listing BackupVaults. -message ListBackupVaultsResponse { - // The list of BackupVault instances in the project for the specified - // location. - // - // If the '{location}' value in the request is "-", the response contains a - // list of instances from all locations. In case any location is unreachable, - // the response will only return backup vaults in reachable locations and - // the 'unreachable' field will be populated with a list of unreachable - // locations. - repeated BackupVault backup_vaults = 1; - - // A token identifying a page of results the server should return. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for fetching usable BackupVaults. -message FetchUsableBackupVaultsRequest { - // Required. The project and location for which to retrieve backupvault stores - // information, in the format 'projects/{project_id}/locations/{location}'. In - // Cloud Backup and DR, locations map to Google Cloud regions, for example - // **us-central1**. - // To retrieve backupvault stores for all locations, use "-" for the - // '{location}' value. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "backupdr.googleapis.com/BackupVault" - } - ]; - - // Optional. Requested page size. Server may return fewer items than - // requested. If unspecified, server will pick an appropriate default. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A token identifying a page of results the server should return. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filtering results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Hint for how to order the results. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for fetching usable BackupVaults. -message FetchUsableBackupVaultsResponse { - // The list of BackupVault instances in the project for the specified - // location. - // - // If the '{location}' value in the request is "-", the response contains a - // list of instances from all locations. In case any location is unreachable, - // the response will only return backup vaults in reachable locations and - // the 'unreachable' field will be populated with a list of unreachable - // locations. - repeated BackupVault backup_vaults = 1; - - // A token identifying a page of results the server should return. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for getting a BackupVault. -message GetBackupVaultRequest { - // Required. Name of the backupvault store resource name, in the format - // 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/BackupVault" - } - ]; - - // Optional. Reserved for future use to provide a BASIC & FULL view of Backup - // Vault - BackupVaultView view = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for updating a BackupVault. -message UpdateBackupVaultRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // BackupVault 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 the request will fail. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The resource being updated - BackupVault backup_vault = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. An optional 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_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; - - // Optional. Only validate the request, but do not perform mutations. - // The default is 'false'. - bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If set to true, will not check plan duration against backup vault - // enforcement duration. - bool force = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Message for deleting a BackupVault. -message DeleteBackupVaultRequest { - // Required. Name of the resource. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/BackupVault" - } - ]; - - // Optional. An optional 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_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; - - // Optional. If set to true, any data source from this backup vault will also - // be deleted. - bool force = 3 [(google.api.field_behavior) = OPTIONAL]; - - // The current etag of the backup vault. - // If an etag is provided and does not match the current etag of the - // connection, deletion will be blocked. - string etag = 4; - - // Optional. Only validate the request, but do not perform mutations. - // The default is 'false'. - bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If true and the BackupVault is not found, the request will - // succeed but no action will be taken. - bool allow_missing = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for listing DataSources. -message ListDataSourcesRequest { - // Required. The project and location for which to retrieve data - // sources information, in the format - // 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - // locations map to Google Cloud regions, for example **us-central1**. - // To retrieve data sources for all locations, use "-" for the - // '{location}' value. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "backupdr.googleapis.com/DataSource" - } - ]; - - // Optional. Requested page size. Server may return fewer items than - // requested. If unspecified, server will pick an appropriate default. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A token identifying a page of results the server should return. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filtering results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Hint for how to order the results. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for listing DataSources. -message ListDataSourcesResponse { - // The list of DataSource instances in the project for the specified - // location. - // - // If the '{location}' value in the request is "-", the response contains a - // list of instances from all locations. In case any location is unreachable, - // the response will only return data sources in reachable locations - // and the 'unreachable' field will be populated with a list of unreachable - // locations. - repeated DataSource data_sources = 1; - - // A token identifying a page of results the server should return. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for getting a DataSource instance. -message GetDataSourceRequest { - // Required. Name of the data source resource name, in the format - // 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/DataSource" - } - ]; -} - -// Request message for updating a data source instance. -message UpdateDataSourceRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // DataSource 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 the request will fail. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The resource being updated - DataSource data_source = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. An optional 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_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; - - // Optional. Enable upsert. - bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for listing Backups. -message ListBackupsRequest { - // Required. The project and location for which to retrieve backup - // information, in the format - // 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - // locations map to Google Cloud regions, for example **us-central1**. - // To retrieve data sources for all locations, use "-" for the - // '{location}' value. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "backupdr.googleapis.com/Backup" - } - ]; - - // Optional. Requested page size. Server may return fewer items than - // requested. If unspecified, server will pick an appropriate default. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A token identifying a page of results the server should return. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Filtering results. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Hint for how to order the results. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Reserved for future use to provide a BASIC & FULL view of Backup - // resource. - BackupView view = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for listing Backups. -message ListBackupsResponse { - // The list of Backup instances in the project for the specified - // location. - // - // If the '{location}' value in the request is "-", the response contains a - // list of instances from all locations. In case any location is unreachable, - // the response will only return data sources in reachable locations - // and the 'unreachable' field will be populated with a list of unreachable - // locations. - repeated Backup backups = 1; - - // A token identifying a page of results the server should return. - string next_page_token = 2; - - // Locations that could not be reached. - repeated string unreachable = 3; -} - -// Request message for getting a Backup. -message GetBackupRequest { - // Required. Name of the data source resource name, in the format - // 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "backupdr.googleapis.com/Backup" } - ]; - - // Optional. Reserved for future use to provide a BASIC & FULL view of Backup - // resource. - BackupView view = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for updating a Backup. -message UpdateBackupRequest { - // Required. Field mask is used to specify the fields to be overwritten in the - // Backup 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 the request will fail. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The resource being updated - Backup backup = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. An optional 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_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; -} - -// Message for deleting a Backup. -message DeleteBackupRequest { - // Required. Name of the resource. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "backupdr.googleapis.com/Backup" } - ]; - - // Optional. An optional 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_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; -} - -// Request message for restoring from a Backup. -message RestoreBackupRequest { - // Required. The resource name of the Backup instance, in the format - // 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "backupdr.googleapis.com/Backup" } - ]; - - // Optional. An optional 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_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; - - // The target environment for the restore operation. - oneof target_environment { - // Compute Engine target environment to be used during restore. - ComputeInstanceTargetEnvironment compute_instance_target_environment = 3; - } - - // The property overrides for the instance being restored. - oneof instance_properties { - // Compute Engine instance properties to be overridden during restore. - ComputeInstanceRestoreProperties compute_instance_restore_properties = 4; - } -} - -// Response message for restoring from a Backup. -message RestoreBackupResponse { - // Details of the target resource created/modified as part of restore. - TargetResource target_resource = 1; -} - -// Details of the target resource created/modified as part of restore. -message TargetResource { - // Minimum details to identify the restored resource. - oneof target_resource_info { - // Details of the native Google Cloud resource created as part of restore. - GcpResource gcp_resource = 1; - } -} - -// Minimum details to identify a Google Cloud resource -message GcpResource { - // Name of the Google Cloud resource. - string gcp_resourcename = 1; - - // Location of the resource: //"global"/"unspecified". - string location = 2; - - // Type of the resource. Use the Unified Resource Type, - // eg. compute.googleapis.com/Instance. - string type = 3; -} - -// Backup configuration state. Is the resource configured for backup? -enum BackupConfigState { - // The possible states of backup configuration. - // Status not set. - BACKUP_CONFIG_STATE_UNSPECIFIED = 0; - - // The data source is actively protected (i.e. there is a - // BackupPlanAssociation or Appliance SLA pointing to it) - ACTIVE = 1; - - // The data source is no longer protected (but may have backups under it) - PASSIVE = 2; -} - -// BackupView contains enum options for Partial and Full view. -enum BackupView { - // If the value is not set, the default 'FULL' view is used. - BACKUP_VIEW_UNSPECIFIED = 0; - - // Includes basic data about the Backup, but not the full contents. - BACKUP_VIEW_BASIC = 1; - - // Includes all data about the Backup. - // This is the default value (for both ListBackups and GetBackup). - BACKUP_VIEW_FULL = 2; -} - -// BackupVaultView contains enum options for Partial and Full view. -enum BackupVaultView { - // If the value is not set, the default 'FULL' view is used. - BACKUP_VAULT_VIEW_UNSPECIFIED = 0; - - // Includes basic data about the Backup Vault, but not the full contents. - BACKUP_VAULT_VIEW_BASIC = 1; - - // Includes all data about the Backup Vault. - // This is the default value (for both ListBackupVaults and GetBackupVault). - BACKUP_VAULT_VIEW_FULL = 2; -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_ba.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_ba.proto deleted file mode 100644 index 619b7a34290..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_ba.proto +++ /dev/null @@ -1,49 +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.backupdr.v1; - -import "google/api/field_behavior.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.BackupDR.V1"; -option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; -option java_multiple_files = true; -option java_outer_classname = "BackupvaultBaProto"; -option java_package = "com.google.cloud.backupdr.v1"; -option php_namespace = "Google\\Cloud\\BackupDR\\V1"; -option ruby_package = "Google::Cloud::BackupDR::V1"; - -// BackupApplianceBackupProperties represents BackupDR backup appliance's -// properties. -message BackupApplianceBackupProperties { - // Output only. The numeric generation ID of the backup (monotonically - // increasing). - optional int32 generation_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time when this backup object was finalized (if none, - // backup is not finalized). - optional google.protobuf.Timestamp finalize_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The earliest timestamp of data available in this Backup. - optional google.protobuf.Timestamp recovery_range_start_time = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The latest timestamp of data available in this Backup. - optional google.protobuf.Timestamp recovery_range_end_time = 4 - [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_gce.proto b/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_gce.proto deleted file mode 100644 index cab0c0a7dc5..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/protos/google/cloud/backupdr/v1/backupvault_gce.proto +++ /dev/null @@ -1,949 +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.backupdr.v1; - -import "google/api/field_behavior.proto"; -import "google/api/field_info.proto"; - -option csharp_namespace = "Google.Cloud.BackupDR.V1"; -option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb"; -option java_multiple_files = true; -option java_outer_classname = "BackupvaultGceProto"; -option java_package = "com.google.cloud.backupdr.v1"; -option php_namespace = "Google\\Cloud\\BackupDR\\V1"; -option ruby_package = "Google::Cloud::BackupDR::V1"; - -// ComputeInstanceBackupProperties represents Compute Engine instance backup -// properties. -message ComputeInstanceBackupProperties { - // An optional text description for the instances that are created from these - // properties. - optional string description = 1; - - // A list of tags to apply to the instances that are created from these - // properties. The tags identify valid sources or targets for network - // firewalls. The setTags method can modify this list of tags. Each tag within - // the list must comply with RFC1035 (https://www.ietf.org/rfc/rfc1035.txt). - optional Tags tags = 2; - - // The machine type to use for instances that are created from these - // properties. - optional string machine_type = 3; - - // Enables instances created based on these properties to send packets with - // source IP addresses other than their own and receive packets with - // destination IP addresses other than their own. If these instances will be - // used as an IP gateway or it will be set as the next-hop in a Route - // resource, specify `true`. If unsure, leave this set to `false`. See the - // https://cloud.google.com/vpc/docs/using-routes#canipforward - // documentation for more information. - optional bool can_ip_forward = 4; - - // An array of network access configurations for this interface. - repeated NetworkInterface network_interface = 5; - - // An array of disks that are associated with the instances that are created - // from these properties. - repeated AttachedDisk disk = 6; - - // The metadata key/value pairs to assign to instances that are created from - // these properties. These pairs can consist of custom metadata or predefined - // keys. See https://cloud.google.com/compute/docs/metadata/overview for more - // information. - optional Metadata metadata = 7; - - // A list of service accounts with specified scopes. Access tokens for these - // service accounts are available to the instances that are created from - // these properties. Use metadata queries to obtain the access tokens for - // these instances. - repeated ServiceAccount service_account = 8; - - // Specifies the scheduling options for the instances that are created from - // these properties. - optional Scheduling scheduling = 9; - - // A list of guest accelerator cards' type and count to use for instances - // created from these properties. - repeated AcceleratorConfig guest_accelerator = 10; - - // Minimum cpu/platform to be used by instances. The instance may be - // scheduled on the specified or newer cpu/platform. Applicable values are the - // friendly names of CPU platforms, such as - // `minCpuPlatform: Intel Haswell` or `minCpuPlatform: Intel Sandy Bridge`. - // For more information, read - // https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. - optional string min_cpu_platform = 11; - - // KeyRevocationActionType of the instance. Supported options are "STOP" and - // "NONE". The default value is "NONE" if it is not specified. - optional KeyRevocationActionType key_revocation_action_type = 12; - - // The source instance used to create this backup. This can be a partial or - // full URL to the resource. For example, the following are valid values: - // -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance - // -projects/project/zones/zone/instances/instance - optional string source_instance = 13; - - // Labels to apply to instances that are created from these properties. - map labels = 14; -} - -// ComputeInstanceRestoreProperties represents Compute Engine instance -// properties to be overridden during restore. -message ComputeInstanceRestoreProperties { - // The private IPv6 google access type for the VMs. - enum InstancePrivateIpv6GoogleAccess { - // Default value. This value is unused. - INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0; - - // Each network interface inherits PrivateIpv6GoogleAccess from its - // subnetwork. - INHERIT_FROM_SUBNETWORK = 1; - - // Outbound private IPv6 access from VMs in this subnet to Google services. - // If specified, the subnetwork who is attached to the instance's default - // network interface will be assigned an internal IPv6 prefix if it doesn't - // have before. - ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2; - - // Bidirectional private IPv6 access to/from Google services. If - // specified, the subnetwork who is attached to the instance's default - // network interface will be assigned an internal IPv6 prefix if it doesn't - // have before. - ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3; - } - - // Required. Name of the compute instance. - optional string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Controls for advanced machine-related behavior features. - optional AdvancedMachineFeatures advanced_machine_features = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Allows this instance to send and receive packets with - // non-matching destination or source IPs. - optional bool can_ip_forward = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Controls Confidential compute options on the instance - optional ConfidentialInstanceConfig confidential_instance_config = 4 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether the resource should be protected against deletion. - optional bool deletion_protection = 5 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. An optional description of this resource. Provide this property - // when you create the resource. - optional string description = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Array of disks associated with this instance. Persistent disks - // must be created before you can assign them. - repeated AttachedDisk disks = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Enables display device for the instance. - optional DisplayDevice display_device = 8 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A list of the type and count of accelerator cards attached to the - // instance. - repeated AcceleratorConfig guest_accelerators = 9 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies the hostname of the instance. The specified hostname - // must be RFC1035 compliant. If hostname is not specified, the default - // hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global - // DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal - // DNS. - optional string hostname = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Encrypts suspended data for an instance with a - // customer-managed encryption key. - optional CustomerEncryptionKey instance_encryption_key = 11 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. KeyRevocationActionType of the instance. - optional KeyRevocationActionType key_revocation_action_type = 12 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Labels to apply to this instance. - map labels = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Full or partial URL of the machine type resource to use for this - // instance. - optional string machine_type = 14 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. This includes custom metadata and predefined keys. - optional Metadata metadata = 15 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Minimum CPU platform to use for this instance. - optional string min_cpu_platform = 16 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. An array of network configurations for this instance. These - // specify how interfaces are configured to interact with other network - // services, such as connecting to the internet. Multiple interfaces are - // supported per instance. - repeated NetworkInterface network_interfaces = 17 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configure network performance such as egress bandwidth tier. - optional NetworkPerformanceConfig network_performance_config = 18 - [(google.api.field_behavior) = OPTIONAL]; - - // Input only. Additional params passed with the request, but not persisted - // as part of resource payload. - optional InstanceParams params = 19 - [(google.api.field_behavior) = INPUT_ONLY]; - - // Optional. The private IPv6 google access type for the VM. - // If not specified, use INHERIT_FROM_SUBNETWORK as default. - optional InstancePrivateIpv6GoogleAccess private_ipv6_google_access = 20 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies the reservations that this instance can consume from. - optional AllocationAffinity allocation_affinity = 21 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Resource policies applied to this instance. - repeated string resource_policies = 22 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Sets the scheduling options for this instance. - optional Scheduling scheduling = 23 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A list of service accounts, with their specified scopes, - // authorized for this instance. Only one service account per VM instance is - // supported. - repeated ServiceAccount service_accounts = 24 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Tags to apply to this instance. Tags are used to identify valid - // sources or targets for network firewalls and are specified by the client - // during instance creation. - optional Tags tags = 26 [(google.api.field_behavior) = OPTIONAL]; -} - -// ComputeInstanceTargetEnvironment represents Compute Engine target -// environment to be used during restore. -message ComputeInstanceTargetEnvironment { - // Required. Target project for the Compute Engine instance. - string project = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The zone of the Compute Engine instance. - string zone = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// ComputeInstanceDataSourceProperties represents the properties of a -// ComputeEngine resource that are stored in the DataSource. -message ComputeInstanceDataSourceProperties { - // Name of the compute instance backed up by the datasource. - string name = 1; - - // The description of the Compute Engine instance. - string description = 2; - - // The machine type of the instance. - string machine_type = 3; - - // The total number of disks attached to the Instance. - int64 total_disk_count = 4; - - // The sum of all the disk sizes. - int64 total_disk_size_gb = 5; -} - -// Specifies options for controlling advanced machine features. -message AdvancedMachineFeatures { - // Optional. Whether to enable nested virtualization or not (default is - // false). - optional bool enable_nested_virtualization = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of threads per physical core. To disable simultaneous - // multithreading (SMT) set this to 1. If unset, the maximum number - // of threads supported per core by the underlying processor is - // assumed. - optional int32 threads_per_core = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of physical cores to expose to an instance. Multiply - // by the number of threads per core to compute the total number of virtual - // CPUs to expose to the instance. If unset, the number of cores is - // inferred from the instance's nominal CPU count and the underlying - // platform's SMT width. - optional int32 visible_core_count = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether to enable UEFI networking for instance creation. - optional bool enable_uefi_networking = 4 - [(google.api.field_behavior) = OPTIONAL]; -} - -// A set of Confidential Instance options. -message ConfidentialInstanceConfig { - // Optional. Defines whether the instance should have confidential compute - // enabled. - optional bool enable_confidential_compute = 1 - [(google.api.field_behavior) = OPTIONAL]; -} - -// A set of Display Device options -message DisplayDevice { - // Optional. Enables display for the Compute Engine VM - optional bool enable_display = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// A specification of the type and number of accelerator cards attached to the -// instance. -message AcceleratorConfig { - // Optional. Full or partial URL of the accelerator type resource to attach to - // this instance. - optional string accelerator_type = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of the guest accelerator cards exposed to this - // instance. - optional int32 accelerator_count = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// A customer-supplied encryption key. -message CustomerEncryptionKey { - // The key to use for encryption. - oneof key { - // Optional. Specifies a 256-bit customer-supplied - // encryption key. - string raw_key = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. RSA-wrapped 2048-bit - // customer-supplied encryption key to either encrypt or decrypt this - // resource. - string rsa_encrypted_key = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The name of the encryption key that is stored in Google Cloud - // KMS. - string kms_key_name = 3 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. The service account being used for the encryption request for the - // given KMS key. If absent, the Compute Engine default service account is - // used. - optional string kms_key_service_account = 4 - [(google.api.field_behavior) = OPTIONAL]; -} - -// A key/value pair to be used for storing metadata. -message Entry { - // Optional. Key for the metadata entry. - optional string key = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Value for the metadata entry. These are free-form strings, and - // only have meaning as interpreted by the image running in the instance. The - // only restriction placed on values is that their size must be less than - // or equal to 262144 bytes (256 KiB). - optional string value = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// A metadata key/value entry. -message Metadata { - // Optional. Array of key/value pairs. The total size of all keys and values - // must be less than 512 KB. - repeated Entry items = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// A network interface resource attached to an instance. -// s -message NetworkInterface { - // Stack type for this network interface. - enum StackType { - // Default should be STACK_TYPE_UNSPECIFIED. - STACK_TYPE_UNSPECIFIED = 0; - - // The network interface will be assigned IPv4 address. - IPV4_ONLY = 1; - - // The network interface can have both IPv4 and IPv6 addresses. - IPV4_IPV6 = 2; - } - - // IPv6 access type for this network interface. - enum Ipv6AccessType { - // IPv6 access type not set. Means this network interface hasn't been - // turned on IPv6 yet. - UNSPECIFIED_IPV6_ACCESS_TYPE = 0; - - // This network interface can have internal IPv6. - INTERNAL = 1; - - // This network interface can have external IPv6. - EXTERNAL = 2; - } - - // Nic type for this network interface. - enum NicType { - // Default should be NIC_TYPE_UNSPECIFIED. - NIC_TYPE_UNSPECIFIED = 0; - - // VIRTIO - VIRTIO_NET = 1; - - // GVNIC - GVNIC = 2; - } - - // Optional. URL of the VPC network resource for this instance. - optional string network = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The URL of the Subnetwork resource for this instance. - optional string subnetwork = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. An IPv4 internal IP address to assign to the instance for this - // network interface. If not specified by the user, an unused internal IP is - // assigned by the system. - optional string ip_address = 3 [ - (google.api.field_info).format = IPV4, - (google.api.field_behavior) = OPTIONAL - ]; - - // Optional. An IPv6 internal network address for this network interface. To - // use a static internal IP address, it must be unused and in the same region - // as the instance's zone. If not specified, Google Cloud will automatically - // assign an internal IPv6 address from the instance's subnetwork. - optional string ipv6_address = 4 [ - (google.api.field_info).format = IPV6, - (google.api.field_behavior) = OPTIONAL - ]; - - // Optional. The prefix length of the primary internal IPv6 range. - optional int32 internal_ipv6_prefix_length = 5 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. [Output Only] The name of the network interface, which is - // generated by the server. - optional string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. An array of configurations for this interface. Currently, only - // one access config,ONE_TO_ONE_NAT is supported. If there are no - // accessConfigs specified, then this instance will have - // no external internet access. - repeated AccessConfig access_configs = 7 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. An array of IPv6 access configurations for this interface. - // Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there - // is no ipv6AccessConfig specified, then this instance will - // have no external IPv6 Internet access. - repeated AccessConfig ipv6_access_configs = 8 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. An array of alias IP ranges for this network interface. - // You can only specify this field for network interfaces in VPC networks. - repeated AliasIpRange alias_ip_ranges = 9 - [(google.api.field_behavior) = OPTIONAL]; - - // The stack type for this network interface. - optional StackType stack_type = 10; - - // Optional. [Output Only] One of EXTERNAL, INTERNAL to indicate whether the - // IP can be accessed from the Internet. This field is always inherited from - // its subnetwork. - optional Ipv6AccessType ipv6_access_type = 11 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The networking queue count that's specified by users for the - // network interface. Both Rx and Tx queues will be set to this number. It'll - // be empty if not specified by the users. - optional int32 queue_count = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The type of vNIC to be used on this interface. This may be gVNIC - // or VirtioNet. - optional NicType nic_type = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The URL of the network attachment that this interface should - // connect to in the following format: - // projects/{project_number}/regions/{region_name}/networkAttachments/{network_attachment_name}. - optional string network_attachment = 14 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Network performance configuration. -message NetworkPerformanceConfig { - // Network performance tier. - enum Tier { - // This value is unused. - TIER_UNSPECIFIED = 0; - - // Default network performance config. - DEFAULT = 1; - - // Tier 1 network performance config. - TIER_1 = 2; - } - - // Optional. The tier of the total egress bandwidth. - optional Tier total_egress_bandwidth_tier = 1 - [(google.api.field_behavior) = OPTIONAL]; -} - -// An access configuration attached to an instance's network interface. -// Only one access config per instance is supported. -message AccessConfig { - // The type of configuration. - enum AccessType { - // Default value. This value is unused. - ACCESS_TYPE_UNSPECIFIED = 0; - - // ONE_TO_ONE_NAT - ONE_TO_ONE_NAT = 1; - - // Direct IPv6 access. - DIRECT_IPV6 = 2; - } - - // Network tier property used by addresses, instances and forwarding rules. - enum NetworkTier { - // Default value. This value is unused. - NETWORK_TIER_UNSPECIFIED = 0; - - // High quality, Google-grade network tier, support for all networking - // products. - PREMIUM = 1; - - // Public internet quality, only limited support for other networking - // products. - STANDARD = 2; - } - - // Optional. In accessConfigs (IPv4), the - // default and only option is ONE_TO_ONE_NAT. In - // ipv6AccessConfigs, the default and only option is - // DIRECT_IPV6. - optional AccessType type = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The name of this access configuration. - optional string name = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The external IP address of this access configuration. - optional string external_ip = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The external IPv6 address of this access configuration. - optional string external_ipv6 = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The prefix length of the external IPv6 range. - optional int32 external_ipv6_prefix_length = 5 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies whether a public DNS 'PTR' record should be created to - // map the external IP address of the instance to a DNS domain name. - optional bool set_public_ptr = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The DNS domain name for the public PTR record. - optional string public_ptr_domain_name = 7 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. This signifies the networking tier used for configuring this - // access - optional NetworkTier network_tier = 8 - [(google.api.field_behavior) = OPTIONAL]; -} - -// An alias IP range attached to an instance's network interface. -message AliasIpRange { - // Optional. The IP alias ranges to allocate for this interface. - optional string ip_cidr_range = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The name of a subnetwork secondary IP range from which to - // allocate an IP alias range. If not specified, the primary range of the - // subnetwork is used. - optional string subnetwork_range_name = 2 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Additional instance params. -message InstanceParams { - // Optional. Resource manager tags to be bound to the instance. - map resource_manager_tags = 1 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Specifies the reservations that this instance can consume from. -message AllocationAffinity { - // Indicates whether to consume from a reservation or not. - enum Type { - // Default value. This value is unused. - TYPE_UNSPECIFIED = 0; - - // Do not consume from any allocated capacity. - NO_RESERVATION = 1; - - // Consume any allocation available. - ANY_RESERVATION = 2; - - // Must consume from a specific reservation. Must specify key value fields - // for specifying the reservations. - SPECIFIC_RESERVATION = 3; - } - - // Optional. Specifies the type of reservation from which this instance can - // consume - optional Type consume_allocation_type = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Corresponds to the label key of a reservation resource. - optional string key = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Corresponds to the label values of a reservation resource. - repeated string values = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Sets the scheduling options for an Instance. -message Scheduling { - // Defines the maintenance behavior for this instance= - enum OnHostMaintenance { - // Default value. This value is unused. - ON_HOST_MAINTENANCE_UNSPECIFIED = 0; - - // Tells Compute Engine to terminate and (optionally) restart the instance - // away from the maintenance activity. - TERMINATE = 1; - - // Default, Allows Compute Engine to automatically migrate instances - // out of the way of maintenance events. - MIGRATE = 1000; - } - - // Node Affinity: the configuration of desired nodes onto which this Instance - // could be scheduled. - message NodeAffinity { - // Defines the type of node selections. - enum Operator { - // Default value. This value is unused. - OPERATOR_UNSPECIFIED = 0; - - // Requires Compute Engine to seek for matched nodes. - IN = 1; - - // Requires Compute Engine to avoid certain nodes. - NOT_IN = 2; - } - - // Optional. Corresponds to the label key of Node resource. - optional string key = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Defines the operation of node selection. - optional Operator operator = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Corresponds to the label values of Node resource. - repeated string values = 3 [(google.api.field_behavior) = OPTIONAL]; - } - - // Defines the provisioning model for an instance. - enum ProvisioningModel { - // Default value. This value is not used. - PROVISIONING_MODEL_UNSPECIFIED = 0; - - // Standard provisioning with user controlled runtime, no discounts. - STANDARD = 1; - - // Heavily discounted, no guaranteed runtime. - SPOT = 2; - } - - // Defines the supported termination actions for an instance. - enum InstanceTerminationAction { - // Default value. This value is unused. - INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0; - - // Delete the VM. - DELETE = 1; - - // Stop the VM without storing in-memory content. default action. - STOP = 2; - } - - // Optional. Defines the maintenance behavior for this instance. - optional OnHostMaintenance on_host_maintenance = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies whether the instance should be automatically restarted - // if it is terminated by Compute Engine (not terminated by a user). - optional bool automatic_restart = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Defines whether the instance is preemptible. - optional bool preemptible = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A set of node affinity and anti-affinity configurations. - // Overrides reservationAffinity. - repeated NodeAffinity node_affinities = 4 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The minimum number of virtual CPUs this instance will consume - // when running on a sole-tenant node. - optional int32 min_node_cpus = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies the provisioning model of the instance. - optional ProvisioningModel provisioning_model = 6 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies the termination action for the instance. - optional InstanceTerminationAction instance_termination_action = 7 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies the maximum amount of time a Local Ssd Vm should wait - // while recovery of the Local Ssd state is attempted. Its value should be in - // between 0 and 168 hours with hour granularity and the default value being 1 - // hour. - optional SchedulingDuration local_ssd_recovery_timeout = 10 - [(google.api.field_behavior) = OPTIONAL]; -} - -// A SchedulingDuration represents a fixed-length span of time represented -// as a count of seconds and fractions of seconds at nanosecond -// resolution. It is independent of any calendar and concepts like "day" -// or "month". Range is approximately 10,000 years. -message SchedulingDuration { - // Optional. Span of time at a resolution of a second. - optional int64 seconds = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Span of time that's a fraction of a second at nanosecond - // resolution. - optional int32 nanos = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// A service account. -message ServiceAccount { - // Optional. Email address of the service account. - optional string email = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The list of scopes to be made available for this service account. - repeated string scopes = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// A set of instance tags. -message Tags { - // Optional. An array of tags. Each tag must be 1-63 characters long, and - // comply with RFC1035. - repeated string items = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// An instance-attached disk resource. -message AttachedDisk { - // Specifies the parameters to initialize this disk. - message InitializeParams { - // Optional. Specifies the disk name. If not specified, the default is to - // use the name of the instance. - optional string disk_name = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. URL of the zone where the disk should be created. - // Required for each regional disk associated with the instance. - repeated string replica_zones = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // List of the Disk Types. - enum DiskType { - // Default value, which is unused. - DISK_TYPE_UNSPECIFIED = 0; - - // A scratch disk type. - SCRATCH = 1; - - // A persistent disk type. - PERSISTENT = 2; - } - - // List of the Disk Modes. - enum DiskMode { - // Default value, which is unused. - DISK_MODE_UNSPECIFIED = 0; - - // Attaches this disk in read-write mode. Only one - // virtual machine at a time can be attached to a disk in read-write mode. - READ_WRITE = 1; - - // Attaches this disk in read-only mode. Multiple virtual machines can use - // a disk in read-only mode at a time. - READ_ONLY = 2; - - // The disk is locked for administrative reasons. Nobody else - // can use the disk. This mode is used (for example) when taking - // a snapshot of a disk to prevent mounting the disk while it is - // being snapshotted. - LOCKED = 3; - } - - // List of the Disk Interfaces. - enum DiskInterface { - // Default value, which is unused. - DISK_INTERFACE_UNSPECIFIED = 0; - - // SCSI Disk Interface. - SCSI = 1; - - // NVME Disk Interface. - NVME = 2; - - // NVDIMM Disk Interface. - NVDIMM = 3; - - // ISCSI Disk Interface. - ISCSI = 4; - } - - // List of the states of the Disk. - enum DiskSavedState { - // Default Disk state has not been preserved. - DISK_SAVED_STATE_UNSPECIFIED = 0; - - // Disk state has been preserved. - PRESERVED = 1; - } - - // Optional. Specifies the parameters to initialize this disk. - optional InitializeParams initialize_params = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. This is used as an identifier for the disks. This is the unique - // name has to provided to modify disk parameters like disk_name and - // replica_zones (in case of RePDs) - optional string device_name = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Type of the resource. - optional string kind = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Specifies the type of the disk. - optional DiskType disk_type_deprecated = 6 [deprecated = true]; - - // Optional. The mode in which to attach this disk. - optional DiskMode mode = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies a valid partial or full URL to an existing Persistent - // Disk resource. - optional string source = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A zero-based index to this disk, where 0 is reserved for the - // boot disk. - optional int64 index = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Indicates that this is a boot disk. The virtual machine will use - // the first partition of the disk for its root filesystem. - optional bool boot = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies whether the disk will be auto-deleted when the instance - // is deleted (but not when the disk is detached from the instance). - optional bool auto_delete = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Any valid publicly visible licenses. - repeated string license = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Specifies the disk interface to use for attaching this disk. - optional DiskInterface disk_interface = 13 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A list of features to enable on the guest operating system. - // Applicable only for bootable images. - repeated GuestOsFeature guest_os_feature = 14 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Encrypts or decrypts a disk using a customer-supplied - // encryption key. - optional CustomerEncryptionKey disk_encryption_key = 15 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The size of the disk in GB. - optional int64 disk_size_gb = 16 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Output only. The state of the disk. - optional DiskSavedState saved_state = 17 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Optional. Output only. The URI of the disk type resource. For example: - // projects/project/zones/zone/diskTypes/pd-standard or pd-ssd - optional string disk_type = 18 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Optional. Specifies the type of the disk. - optional DiskType type = 19 [(google.api.field_behavior) = OPTIONAL]; -} - -// Feature type of the Guest OS. -message GuestOsFeature { - // List of the Feature Types. - enum FeatureType { - // Default value, which is unused. - FEATURE_TYPE_UNSPECIFIED = 0; - - // VIRTIO_SCSI_MULTIQUEUE feature type. - VIRTIO_SCSI_MULTIQUEUE = 1; - - // WINDOWS feature type. - WINDOWS = 2; - - // MULTI_IP_SUBNET feature type. - MULTI_IP_SUBNET = 3; - - // UEFI_COMPATIBLE feature type. - UEFI_COMPATIBLE = 4; - - // SECURE_BOOT feature type. - SECURE_BOOT = 5; - - // GVNIC feature type. - GVNIC = 6; - - // SEV_CAPABLE feature type. - SEV_CAPABLE = 7; - - // BARE_METAL_LINUX_COMPATIBLE feature type. - BARE_METAL_LINUX_COMPATIBLE = 8; - - // SUSPEND_RESUME_COMPATIBLE feature type. - SUSPEND_RESUME_COMPATIBLE = 9; - - // SEV_LIVE_MIGRATABLE feature type. - SEV_LIVE_MIGRATABLE = 10; - - // SEV_SNP_CAPABLE feature type. - SEV_SNP_CAPABLE = 11; - - // TDX_CAPABLE feature type. - TDX_CAPABLE = 12; - - // IDPF feature type. - IDPF = 13; - - // SEV_LIVE_MIGRATABLE_V2 feature type. - SEV_LIVE_MIGRATABLE_V2 = 14; - } - - // The ID of a supported feature. - optional FeatureType type = 1; -} - -// Specifies whether the virtual machine instance will be shut down on key -// revocation. It is currently used in instance, instance properties and GMI -// protos -enum KeyRevocationActionType { - // Default value. This value is unused. - KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0; - - // Indicates user chose no operation. - NONE = 1; - - // Indicates user chose to opt for VM shutdown on key revocation. - STOP = 2; -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts deleted file mode 100644 index e83f63ef498..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.d.ts +++ /dev/null @@ -1,20626 +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. - -import type {protobuf as $protobuf} from "google-gax"; -import Long = require("long"); -/** Namespace google. */ -export namespace google { - - /** Namespace cloud. */ - namespace cloud { - - /** Namespace backupdr. */ - namespace backupdr { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a BackupDR */ - class BackupDR extends $protobuf.rpc.Service { - - /** - * Constructs a new BackupDR 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 BackupDR 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): BackupDR; - - /** - * Calls ListManagementServers. - * @param request ListManagementServersRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListManagementServersResponse - */ - public listManagementServers(request: google.cloud.backupdr.v1.IListManagementServersRequest, callback: google.cloud.backupdr.v1.BackupDR.ListManagementServersCallback): void; - - /** - * Calls ListManagementServers. - * @param request ListManagementServersRequest message or plain object - * @returns Promise - */ - public listManagementServers(request: google.cloud.backupdr.v1.IListManagementServersRequest): Promise; - - /** - * Calls GetManagementServer. - * @param request GetManagementServerRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ManagementServer - */ - public getManagementServer(request: google.cloud.backupdr.v1.IGetManagementServerRequest, callback: google.cloud.backupdr.v1.BackupDR.GetManagementServerCallback): void; - - /** - * Calls GetManagementServer. - * @param request GetManagementServerRequest message or plain object - * @returns Promise - */ - public getManagementServer(request: google.cloud.backupdr.v1.IGetManagementServerRequest): Promise; - - /** - * Calls CreateManagementServer. - * @param request CreateManagementServerRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createManagementServer(request: google.cloud.backupdr.v1.ICreateManagementServerRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateManagementServerCallback): void; - - /** - * Calls CreateManagementServer. - * @param request CreateManagementServerRequest message or plain object - * @returns Promise - */ - public createManagementServer(request: google.cloud.backupdr.v1.ICreateManagementServerRequest): Promise; - - /** - * Calls DeleteManagementServer. - * @param request DeleteManagementServerRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteManagementServer(request: google.cloud.backupdr.v1.IDeleteManagementServerRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteManagementServerCallback): void; - - /** - * Calls DeleteManagementServer. - * @param request DeleteManagementServerRequest message or plain object - * @returns Promise - */ - public deleteManagementServer(request: google.cloud.backupdr.v1.IDeleteManagementServerRequest): Promise; - - /** - * Calls CreateBackupVault. - * @param request CreateBackupVaultRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createBackupVault(request: google.cloud.backupdr.v1.ICreateBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupVaultCallback): void; - - /** - * Calls CreateBackupVault. - * @param request CreateBackupVaultRequest message or plain object - * @returns Promise - */ - public createBackupVault(request: google.cloud.backupdr.v1.ICreateBackupVaultRequest): Promise; - - /** - * Calls ListBackupVaults. - * @param request ListBackupVaultsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBackupVaultsResponse - */ - public listBackupVaults(request: google.cloud.backupdr.v1.IListBackupVaultsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupVaultsCallback): void; - - /** - * Calls ListBackupVaults. - * @param request ListBackupVaultsRequest message or plain object - * @returns Promise - */ - public listBackupVaults(request: google.cloud.backupdr.v1.IListBackupVaultsRequest): Promise; - - /** - * Calls FetchUsableBackupVaults. - * @param request FetchUsableBackupVaultsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FetchUsableBackupVaultsResponse - */ - public fetchUsableBackupVaults(request: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, callback: google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaultsCallback): void; - - /** - * Calls FetchUsableBackupVaults. - * @param request FetchUsableBackupVaultsRequest message or plain object - * @returns Promise - */ - public fetchUsableBackupVaults(request: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest): Promise; - - /** - * Calls GetBackupVault. - * @param request GetBackupVaultRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BackupVault - */ - public getBackupVault(request: google.cloud.backupdr.v1.IGetBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupVaultCallback): void; - - /** - * Calls GetBackupVault. - * @param request GetBackupVaultRequest message or plain object - * @returns Promise - */ - public getBackupVault(request: google.cloud.backupdr.v1.IGetBackupVaultRequest): Promise; - - /** - * Calls UpdateBackupVault. - * @param request UpdateBackupVaultRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateBackupVault(request: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateBackupVaultCallback): void; - - /** - * Calls UpdateBackupVault. - * @param request UpdateBackupVaultRequest message or plain object - * @returns Promise - */ - public updateBackupVault(request: google.cloud.backupdr.v1.IUpdateBackupVaultRequest): Promise; - - /** - * Calls DeleteBackupVault. - * @param request DeleteBackupVaultRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteBackupVault(request: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupVaultCallback): void; - - /** - * Calls DeleteBackupVault. - * @param request DeleteBackupVaultRequest message or plain object - * @returns Promise - */ - public deleteBackupVault(request: google.cloud.backupdr.v1.IDeleteBackupVaultRequest): Promise; - - /** - * Calls ListDataSources. - * @param request ListDataSourcesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDataSourcesResponse - */ - public listDataSources(request: google.cloud.backupdr.v1.IListDataSourcesRequest, callback: google.cloud.backupdr.v1.BackupDR.ListDataSourcesCallback): void; - - /** - * Calls ListDataSources. - * @param request ListDataSourcesRequest message or plain object - * @returns Promise - */ - public listDataSources(request: google.cloud.backupdr.v1.IListDataSourcesRequest): Promise; - - /** - * Calls GetDataSource. - * @param request GetDataSourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DataSource - */ - public getDataSource(request: google.cloud.backupdr.v1.IGetDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.GetDataSourceCallback): void; - - /** - * Calls GetDataSource. - * @param request GetDataSourceRequest message or plain object - * @returns Promise - */ - public getDataSource(request: google.cloud.backupdr.v1.IGetDataSourceRequest): Promise; - - /** - * Calls UpdateDataSource. - * @param request UpdateDataSourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateDataSource(request: google.cloud.backupdr.v1.IUpdateDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateDataSourceCallback): void; - - /** - * Calls UpdateDataSource. - * @param request UpdateDataSourceRequest message or plain object - * @returns Promise - */ - public updateDataSource(request: google.cloud.backupdr.v1.IUpdateDataSourceRequest): Promise; - - /** - * Calls ListBackups. - * @param request ListBackupsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBackupsResponse - */ - public listBackups(request: google.cloud.backupdr.v1.IListBackupsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupsCallback): void; - - /** - * Calls ListBackups. - * @param request ListBackupsRequest message or plain object - * @returns Promise - */ - public listBackups(request: google.cloud.backupdr.v1.IListBackupsRequest): Promise; - - /** - * Calls GetBackup. - * @param request GetBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Backup - */ - public getBackup(request: google.cloud.backupdr.v1.IGetBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupCallback): void; - - /** - * Calls GetBackup. - * @param request GetBackupRequest message or plain object - * @returns Promise - */ - public getBackup(request: google.cloud.backupdr.v1.IGetBackupRequest): Promise; - - /** - * Calls UpdateBackup. - * @param request UpdateBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateBackup(request: google.cloud.backupdr.v1.IUpdateBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.UpdateBackupCallback): void; - - /** - * Calls UpdateBackup. - * @param request UpdateBackupRequest message or plain object - * @returns Promise - */ - public updateBackup(request: google.cloud.backupdr.v1.IUpdateBackupRequest): Promise; - - /** - * Calls DeleteBackup. - * @param request DeleteBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteBackup(request: google.cloud.backupdr.v1.IDeleteBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupCallback): void; - - /** - * Calls DeleteBackup. - * @param request DeleteBackupRequest message or plain object - * @returns Promise - */ - public deleteBackup(request: google.cloud.backupdr.v1.IDeleteBackupRequest): Promise; - - /** - * Calls RestoreBackup. - * @param request RestoreBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public restoreBackup(request: google.cloud.backupdr.v1.IRestoreBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.RestoreBackupCallback): void; - - /** - * Calls RestoreBackup. - * @param request RestoreBackupRequest message or plain object - * @returns Promise - */ - public restoreBackup(request: google.cloud.backupdr.v1.IRestoreBackupRequest): Promise; - - /** - * Calls CreateBackupPlan. - * @param request CreateBackupPlanRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createBackupPlan(request: google.cloud.backupdr.v1.ICreateBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupPlanCallback): void; - - /** - * Calls CreateBackupPlan. - * @param request CreateBackupPlanRequest message or plain object - * @returns Promise - */ - public createBackupPlan(request: google.cloud.backupdr.v1.ICreateBackupPlanRequest): Promise; - - /** - * Calls GetBackupPlan. - * @param request GetBackupPlanRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BackupPlan - */ - public getBackupPlan(request: google.cloud.backupdr.v1.IGetBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupPlanCallback): void; - - /** - * Calls GetBackupPlan. - * @param request GetBackupPlanRequest message or plain object - * @returns Promise - */ - public getBackupPlan(request: google.cloud.backupdr.v1.IGetBackupPlanRequest): Promise; - - /** - * Calls ListBackupPlans. - * @param request ListBackupPlansRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBackupPlansResponse - */ - public listBackupPlans(request: google.cloud.backupdr.v1.IListBackupPlansRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupPlansCallback): void; - - /** - * Calls ListBackupPlans. - * @param request ListBackupPlansRequest message or plain object - * @returns Promise - */ - public listBackupPlans(request: google.cloud.backupdr.v1.IListBackupPlansRequest): Promise; - - /** - * Calls DeleteBackupPlan. - * @param request DeleteBackupPlanRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteBackupPlan(request: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanCallback): void; - - /** - * Calls DeleteBackupPlan. - * @param request DeleteBackupPlanRequest message or plain object - * @returns Promise - */ - public deleteBackupPlan(request: google.cloud.backupdr.v1.IDeleteBackupPlanRequest): Promise; - - /** - * Calls CreateBackupPlanAssociation. - * @param request CreateBackupPlanAssociationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createBackupPlanAssociation(request: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociationCallback): void; - - /** - * Calls CreateBackupPlanAssociation. - * @param request CreateBackupPlanAssociationRequest message or plain object - * @returns Promise - */ - public createBackupPlanAssociation(request: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest): Promise; - - /** - * Calls GetBackupPlanAssociation. - * @param request GetBackupPlanAssociationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and BackupPlanAssociation - */ - public getBackupPlanAssociation(request: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociationCallback): void; - - /** - * Calls GetBackupPlanAssociation. - * @param request GetBackupPlanAssociationRequest message or plain object - * @returns Promise - */ - public getBackupPlanAssociation(request: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest): Promise; - - /** - * Calls ListBackupPlanAssociations. - * @param request ListBackupPlanAssociationsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListBackupPlanAssociationsResponse - */ - public listBackupPlanAssociations(request: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, callback: google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociationsCallback): void; - - /** - * Calls ListBackupPlanAssociations. - * @param request ListBackupPlanAssociationsRequest message or plain object - * @returns Promise - */ - public listBackupPlanAssociations(request: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest): Promise; - - /** - * Calls DeleteBackupPlanAssociation. - * @param request DeleteBackupPlanAssociationRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteBackupPlanAssociation(request: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, callback: google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociationCallback): void; - - /** - * Calls DeleteBackupPlanAssociation. - * @param request DeleteBackupPlanAssociationRequest message or plain object - * @returns Promise - */ - public deleteBackupPlanAssociation(request: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest): Promise; - - /** - * Calls TriggerBackup. - * @param request TriggerBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public triggerBackup(request: google.cloud.backupdr.v1.ITriggerBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.TriggerBackupCallback): void; - - /** - * Calls TriggerBackup. - * @param request TriggerBackupRequest message or plain object - * @returns Promise - */ - public triggerBackup(request: google.cloud.backupdr.v1.ITriggerBackupRequest): Promise; - } - - namespace BackupDR { - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listManagementServers}. - * @param error Error, if any - * @param [response] ListManagementServersResponse - */ - type ListManagementServersCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListManagementServersResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getManagementServer}. - * @param error Error, if any - * @param [response] ManagementServer - */ - type GetManagementServerCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ManagementServer) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createManagementServer}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteManagementServer}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteManagementServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupVault}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupVaults}. - * @param error Error, if any - * @param [response] ListBackupVaultsResponse - */ - type ListBackupVaultsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupVaultsResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchUsableBackupVaults}. - * @param error Error, if any - * @param [response] FetchUsableBackupVaultsResponse - */ - type FetchUsableBackupVaultsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupVault}. - * @param error Error, if any - * @param [response] BackupVault - */ - type GetBackupVaultCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupVault) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackupVault}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupVault}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listDataSources}. - * @param error Error, if any - * @param [response] ListDataSourcesResponse - */ - type ListDataSourcesCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListDataSourcesResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getDataSource}. - * @param error Error, if any - * @param [response] DataSource - */ - type GetDataSourceCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.DataSource) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateDataSource}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateDataSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackups}. - * @param error Error, if any - * @param [response] ListBackupsResponse - */ - type ListBackupsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupsResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackup}. - * @param error Error, if any - * @param [response] Backup - */ - type GetBackupCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.Backup) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|restoreBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type RestoreBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlan}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateBackupPlanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlan}. - * @param error Error, if any - * @param [response] BackupPlan - */ - type GetBackupPlanCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupPlan) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlans}. - * @param error Error, if any - * @param [response] ListBackupPlansResponse - */ - type ListBackupPlansCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupPlansResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlan}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteBackupPlanCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlanAssociation}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateBackupPlanAssociationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlanAssociation}. - * @param error Error, if any - * @param [response] BackupPlanAssociation - */ - type GetBackupPlanAssociationCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.BackupPlanAssociation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlanAssociations}. - * @param error Error, if any - * @param [response] ListBackupPlanAssociationsResponse - */ - type ListBackupPlanAssociationsCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlanAssociation}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteBackupPlanAssociationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|triggerBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type TriggerBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of a NetworkConfig. */ - interface INetworkConfig { - - /** NetworkConfig network */ - network?: (string|null); - - /** NetworkConfig peeringMode */ - peeringMode?: (google.cloud.backupdr.v1.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1.NetworkConfig.PeeringMode|null); - } - - /** Represents a NetworkConfig. */ - class NetworkConfig implements INetworkConfig { - - /** - * Constructs a new NetworkConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.INetworkConfig); - - /** NetworkConfig network. */ - public network: string; - - /** NetworkConfig peeringMode. */ - public peeringMode: (google.cloud.backupdr.v1.NetworkConfig.PeeringMode|keyof typeof google.cloud.backupdr.v1.NetworkConfig.PeeringMode); - - /** - * Creates a new NetworkConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.INetworkConfig): google.cloud.backupdr.v1.NetworkConfig; - - /** - * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @param message NetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @param message NetworkConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkConfig; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkConfig; - - /** - * Verifies a NetworkConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkConfig; - - /** - * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. - * @param message NetworkConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NetworkConfig { - - /** PeeringMode enum. */ - enum PeeringMode { - PEERING_MODE_UNSPECIFIED = 0, - PRIVATE_SERVICE_ACCESS = 1 - } - } - - /** Properties of a ManagementURI. */ - interface IManagementURI { - - /** ManagementURI webUi */ - webUi?: (string|null); - - /** ManagementURI api */ - api?: (string|null); - } - - /** Represents a ManagementURI. */ - class ManagementURI implements IManagementURI { - - /** - * Constructs a new ManagementURI. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IManagementURI); - - /** ManagementURI webUi. */ - public webUi: string; - - /** ManagementURI api. */ - public api: string; - - /** - * Creates a new ManagementURI instance using the specified properties. - * @param [properties] Properties to set - * @returns ManagementURI instance - */ - public static create(properties?: google.cloud.backupdr.v1.IManagementURI): google.cloud.backupdr.v1.ManagementURI; - - /** - * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @param message ManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @param message ManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ManagementURI message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ManagementURI; - - /** - * Decodes a ManagementURI message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ManagementURI; - - /** - * Verifies a ManagementURI message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ManagementURI - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ManagementURI; - - /** - * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. - * @param message ManagementURI - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ManagementURI to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ManagementURI - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkforceIdentityBasedManagementURI. */ - interface IWorkforceIdentityBasedManagementURI { - - /** WorkforceIdentityBasedManagementURI firstPartyManagementUri */ - firstPartyManagementUri?: (string|null); - - /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri */ - thirdPartyManagementUri?: (string|null); - } - - /** Represents a WorkforceIdentityBasedManagementURI. */ - class WorkforceIdentityBasedManagementURI implements IWorkforceIdentityBasedManagementURI { - - /** - * Constructs a new WorkforceIdentityBasedManagementURI. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI); - - /** WorkforceIdentityBasedManagementURI firstPartyManagementUri. */ - public firstPartyManagementUri: string; - - /** WorkforceIdentityBasedManagementURI thirdPartyManagementUri. */ - public thirdPartyManagementUri: string; - - /** - * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkforceIdentityBasedManagementURI instance - */ - public static create(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; - - /** - * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. - * @param message WorkforceIdentityBasedManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. - * @param message WorkforceIdentityBasedManagementURI message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkforceIdentityBasedManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; - - /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkforceIdentityBasedManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; - - /** - * Verifies a WorkforceIdentityBasedManagementURI message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkforceIdentityBasedManagementURI - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI; - - /** - * Creates a plain object from a WorkforceIdentityBasedManagementURI message. Also converts values to other types if specified. - * @param message WorkforceIdentityBasedManagementURI - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkforceIdentityBasedManagementURI to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkforceIdentityBasedManagementURI - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkforceIdentityBasedOAuth2ClientID. */ - interface IWorkforceIdentityBasedOAuth2ClientID { - - /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId */ - firstPartyOauth2ClientId?: (string|null); - - /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId */ - thirdPartyOauth2ClientId?: (string|null); - } - - /** Represents a WorkforceIdentityBasedOAuth2ClientID. */ - class WorkforceIdentityBasedOAuth2ClientID implements IWorkforceIdentityBasedOAuth2ClientID { - - /** - * Constructs a new WorkforceIdentityBasedOAuth2ClientID. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID); - - /** WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId. */ - public firstPartyOauth2ClientId: string; - - /** WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId. */ - public thirdPartyOauth2ClientId: string; - - /** - * Creates a new WorkforceIdentityBasedOAuth2ClientID instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkforceIdentityBasedOAuth2ClientID instance - */ - public static create(properties?: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; - - /** - * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. - * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. - * @param message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkforceIdentityBasedOAuth2ClientID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; - - /** - * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkforceIdentityBasedOAuth2ClientID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; - - /** - * Verifies a WorkforceIdentityBasedOAuth2ClientID message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkforceIdentityBasedOAuth2ClientID message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkforceIdentityBasedOAuth2ClientID - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID; - - /** - * Creates a plain object from a WorkforceIdentityBasedOAuth2ClientID message. Also converts values to other types if specified. - * @param message WorkforceIdentityBasedOAuth2ClientID - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkforceIdentityBasedOAuth2ClientID to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkforceIdentityBasedOAuth2ClientID - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ManagementServer. */ - interface IManagementServer { - - /** ManagementServer name */ - name?: (string|null); - - /** ManagementServer description */ - description?: (string|null); - - /** ManagementServer labels */ - labels?: ({ [k: string]: string }|null); - - /** ManagementServer createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** ManagementServer updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** ManagementServer type */ - type?: (google.cloud.backupdr.v1.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceType|null); - - /** ManagementServer managementUri */ - managementUri?: (google.cloud.backupdr.v1.IManagementURI|null); - - /** ManagementServer workforceIdentityBasedManagementUri */ - workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null); - - /** ManagementServer state */ - state?: (google.cloud.backupdr.v1.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceState|null); - - /** ManagementServer networks */ - networks?: (google.cloud.backupdr.v1.INetworkConfig[]|null); - - /** ManagementServer etag */ - etag?: (string|null); - - /** ManagementServer oauth2ClientId */ - oauth2ClientId?: (string|null); - - /** ManagementServer workforceIdentityBasedOauth2ClientId */ - workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null); - - /** ManagementServer baProxyUri */ - baProxyUri?: (string[]|null); - - /** ManagementServer satisfiesPzs */ - satisfiesPzs?: (google.protobuf.IBoolValue|null); - - /** ManagementServer satisfiesPzi */ - satisfiesPzi?: (boolean|null); - } - - /** Represents a ManagementServer. */ - class ManagementServer implements IManagementServer { - - /** - * Constructs a new ManagementServer. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IManagementServer); - - /** ManagementServer name. */ - public name: string; - - /** ManagementServer description. */ - public description: string; - - /** ManagementServer labels. */ - public labels: { [k: string]: string }; - - /** ManagementServer createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** ManagementServer updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** ManagementServer type. */ - public type: (google.cloud.backupdr.v1.ManagementServer.InstanceType|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceType); - - /** ManagementServer managementUri. */ - public managementUri?: (google.cloud.backupdr.v1.IManagementURI|null); - - /** ManagementServer workforceIdentityBasedManagementUri. */ - public workforceIdentityBasedManagementUri?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null); - - /** ManagementServer state. */ - public state: (google.cloud.backupdr.v1.ManagementServer.InstanceState|keyof typeof google.cloud.backupdr.v1.ManagementServer.InstanceState); - - /** ManagementServer networks. */ - public networks: google.cloud.backupdr.v1.INetworkConfig[]; - - /** ManagementServer etag. */ - public etag: string; - - /** ManagementServer oauth2ClientId. */ - public oauth2ClientId: string; - - /** ManagementServer workforceIdentityBasedOauth2ClientId. */ - public workforceIdentityBasedOauth2ClientId?: (google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null); - - /** ManagementServer baProxyUri. */ - public baProxyUri: string[]; - - /** ManagementServer satisfiesPzs. */ - public satisfiesPzs?: (google.protobuf.IBoolValue|null); - - /** ManagementServer satisfiesPzi. */ - public satisfiesPzi: boolean; - - /** - * Creates a new ManagementServer instance using the specified properties. - * @param [properties] Properties to set - * @returns ManagementServer instance - */ - public static create(properties?: google.cloud.backupdr.v1.IManagementServer): google.cloud.backupdr.v1.ManagementServer; - - /** - * Encodes the specified ManagementServer message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. - * @param message ManagementServer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ManagementServer message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. - * @param message ManagementServer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IManagementServer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ManagementServer message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ManagementServer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ManagementServer; - - /** - * Decodes a ManagementServer message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ManagementServer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ManagementServer; - - /** - * Verifies a ManagementServer message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ManagementServer message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ManagementServer - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ManagementServer; - - /** - * Creates a plain object from a ManagementServer message. Also converts values to other types if specified. - * @param message ManagementServer - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ManagementServer, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ManagementServer to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ManagementServer - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ManagementServer { - - /** InstanceType enum. */ - enum InstanceType { - INSTANCE_TYPE_UNSPECIFIED = 0, - BACKUP_RESTORE = 1 - } - - /** InstanceState enum. */ - enum InstanceState { - INSTANCE_STATE_UNSPECIFIED = 0, - CREATING = 1, - READY = 2, - UPDATING = 3, - DELETING = 4, - REPAIRING = 5, - MAINTENANCE = 6, - ERROR = 7 - } - } - - /** Properties of a ListManagementServersRequest. */ - interface IListManagementServersRequest { - - /** ListManagementServersRequest parent */ - parent?: (string|null); - - /** ListManagementServersRequest pageSize */ - pageSize?: (number|null); - - /** ListManagementServersRequest pageToken */ - pageToken?: (string|null); - - /** ListManagementServersRequest filter */ - filter?: (string|null); - - /** ListManagementServersRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListManagementServersRequest. */ - class ListManagementServersRequest implements IListManagementServersRequest { - - /** - * Constructs a new ListManagementServersRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListManagementServersRequest); - - /** ListManagementServersRequest parent. */ - public parent: string; - - /** ListManagementServersRequest pageSize. */ - public pageSize: number; - - /** ListManagementServersRequest pageToken. */ - public pageToken: string; - - /** ListManagementServersRequest filter. */ - public filter?: (string|null); - - /** ListManagementServersRequest orderBy. */ - public orderBy?: (string|null); - - /** ListManagementServersRequest _filter. */ - public _filter?: "filter"; - - /** ListManagementServersRequest _orderBy. */ - public _orderBy?: "orderBy"; - - /** - * Creates a new ListManagementServersRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListManagementServersRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListManagementServersRequest): google.cloud.backupdr.v1.ListManagementServersRequest; - - /** - * Encodes the specified ListManagementServersRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. - * @param message ListManagementServersRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListManagementServersRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. - * @param message ListManagementServersRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListManagementServersRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListManagementServersRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListManagementServersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListManagementServersRequest; - - /** - * Decodes a ListManagementServersRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListManagementServersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListManagementServersRequest; - - /** - * Verifies a ListManagementServersRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListManagementServersRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListManagementServersRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListManagementServersRequest; - - /** - * Creates a plain object from a ListManagementServersRequest message. Also converts values to other types if specified. - * @param message ListManagementServersRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListManagementServersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListManagementServersRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListManagementServersRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListManagementServersResponse. */ - interface IListManagementServersResponse { - - /** ListManagementServersResponse managementServers */ - managementServers?: (google.cloud.backupdr.v1.IManagementServer[]|null); - - /** ListManagementServersResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListManagementServersResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListManagementServersResponse. */ - class ListManagementServersResponse implements IListManagementServersResponse { - - /** - * Constructs a new ListManagementServersResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListManagementServersResponse); - - /** ListManagementServersResponse managementServers. */ - public managementServers: google.cloud.backupdr.v1.IManagementServer[]; - - /** ListManagementServersResponse nextPageToken. */ - public nextPageToken: string; - - /** ListManagementServersResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListManagementServersResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListManagementServersResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListManagementServersResponse): google.cloud.backupdr.v1.ListManagementServersResponse; - - /** - * Encodes the specified ListManagementServersResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. - * @param message ListManagementServersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListManagementServersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListManagementServersResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. - * @param message ListManagementServersResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListManagementServersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListManagementServersResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListManagementServersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListManagementServersResponse; - - /** - * Decodes a ListManagementServersResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListManagementServersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListManagementServersResponse; - - /** - * Verifies a ListManagementServersResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListManagementServersResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListManagementServersResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListManagementServersResponse; - - /** - * Creates a plain object from a ListManagementServersResponse message. Also converts values to other types if specified. - * @param message ListManagementServersResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListManagementServersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListManagementServersResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListManagementServersResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetManagementServerRequest. */ - interface IGetManagementServerRequest { - - /** GetManagementServerRequest name */ - name?: (string|null); - } - - /** Represents a GetManagementServerRequest. */ - class GetManagementServerRequest implements IGetManagementServerRequest { - - /** - * Constructs a new GetManagementServerRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetManagementServerRequest); - - /** GetManagementServerRequest name. */ - public name: string; - - /** - * Creates a new GetManagementServerRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetManagementServerRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetManagementServerRequest): google.cloud.backupdr.v1.GetManagementServerRequest; - - /** - * Encodes the specified GetManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. - * @param message GetManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. - * @param message GetManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetManagementServerRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetManagementServerRequest; - - /** - * Decodes a GetManagementServerRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetManagementServerRequest; - - /** - * Verifies a GetManagementServerRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetManagementServerRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetManagementServerRequest; - - /** - * Creates a plain object from a GetManagementServerRequest message. Also converts values to other types if specified. - * @param message GetManagementServerRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetManagementServerRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetManagementServerRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateManagementServerRequest. */ - interface ICreateManagementServerRequest { - - /** CreateManagementServerRequest parent */ - parent?: (string|null); - - /** CreateManagementServerRequest managementServerId */ - managementServerId?: (string|null); - - /** CreateManagementServerRequest managementServer */ - managementServer?: (google.cloud.backupdr.v1.IManagementServer|null); - - /** CreateManagementServerRequest requestId */ - requestId?: (string|null); - } - - /** Represents a CreateManagementServerRequest. */ - class CreateManagementServerRequest implements ICreateManagementServerRequest { - - /** - * Constructs a new CreateManagementServerRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ICreateManagementServerRequest); - - /** CreateManagementServerRequest parent. */ - public parent: string; - - /** CreateManagementServerRequest managementServerId. */ - public managementServerId: string; - - /** CreateManagementServerRequest managementServer. */ - public managementServer?: (google.cloud.backupdr.v1.IManagementServer|null); - - /** CreateManagementServerRequest requestId. */ - public requestId: string; - - /** - * Creates a new CreateManagementServerRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateManagementServerRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ICreateManagementServerRequest): google.cloud.backupdr.v1.CreateManagementServerRequest; - - /** - * Encodes the specified CreateManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. - * @param message CreateManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. - * @param message CreateManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateManagementServerRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateManagementServerRequest; - - /** - * Decodes a CreateManagementServerRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateManagementServerRequest; - - /** - * Verifies a CreateManagementServerRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateManagementServerRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateManagementServerRequest; - - /** - * Creates a plain object from a CreateManagementServerRequest message. Also converts values to other types if specified. - * @param message CreateManagementServerRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.CreateManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateManagementServerRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateManagementServerRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteManagementServerRequest. */ - interface IDeleteManagementServerRequest { - - /** DeleteManagementServerRequest name */ - name?: (string|null); - - /** DeleteManagementServerRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteManagementServerRequest. */ - class DeleteManagementServerRequest implements IDeleteManagementServerRequest { - - /** - * Constructs a new DeleteManagementServerRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDeleteManagementServerRequest); - - /** DeleteManagementServerRequest name. */ - public name: string; - - /** DeleteManagementServerRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteManagementServerRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteManagementServerRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDeleteManagementServerRequest): google.cloud.backupdr.v1.DeleteManagementServerRequest; - - /** - * Encodes the specified DeleteManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. - * @param message DeleteManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. - * @param message DeleteManagementServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteManagementServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteManagementServerRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteManagementServerRequest; - - /** - * Decodes a DeleteManagementServerRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteManagementServerRequest; - - /** - * Verifies a DeleteManagementServerRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteManagementServerRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteManagementServerRequest; - - /** - * Creates a plain object from a DeleteManagementServerRequest message. Also converts values to other types if specified. - * @param message DeleteManagementServerRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DeleteManagementServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteManagementServerRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteManagementServerRequest - * @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 additionalInfo */ - additionalInfo?: ({ [k: string]: string }|null); - } - - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { - - /** - * Constructs a new OperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.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 additionalInfo. */ - public additionalInfo: { [k: string]: string }; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationMetadata instance - */ - public static create(properties?: google.cloud.backupdr.v1.IOperationMetadata): google.cloud.backupdr.v1.OperationMetadata; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.backupdr.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.backupdr.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.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.backupdr.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.backupdr.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.backupdr.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.backupdr.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.backupdr.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 BackupPlan. */ - interface IBackupPlan { - - /** BackupPlan name */ - name?: (string|null); - - /** BackupPlan description */ - description?: (string|null); - - /** BackupPlan labels */ - labels?: ({ [k: string]: string }|null); - - /** BackupPlan createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlan updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlan backupRules */ - backupRules?: (google.cloud.backupdr.v1.IBackupRule[]|null); - - /** BackupPlan state */ - state?: (google.cloud.backupdr.v1.BackupPlan.State|keyof typeof google.cloud.backupdr.v1.BackupPlan.State|null); - - /** BackupPlan resourceType */ - resourceType?: (string|null); - - /** BackupPlan etag */ - etag?: (string|null); - - /** BackupPlan backupVault */ - backupVault?: (string|null); - - /** BackupPlan backupVaultServiceAccount */ - backupVaultServiceAccount?: (string|null); - } - - /** Represents a BackupPlan. */ - class BackupPlan implements IBackupPlan { - - /** - * Constructs a new BackupPlan. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupPlan); - - /** BackupPlan name. */ - public name: string; - - /** BackupPlan description. */ - public description: string; - - /** BackupPlan labels. */ - public labels: { [k: string]: string }; - - /** BackupPlan createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlan updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlan backupRules. */ - public backupRules: google.cloud.backupdr.v1.IBackupRule[]; - - /** BackupPlan state. */ - public state: (google.cloud.backupdr.v1.BackupPlan.State|keyof typeof google.cloud.backupdr.v1.BackupPlan.State); - - /** BackupPlan resourceType. */ - public resourceType: string; - - /** BackupPlan etag. */ - public etag: string; - - /** BackupPlan backupVault. */ - public backupVault: string; - - /** BackupPlan backupVaultServiceAccount. */ - public backupVaultServiceAccount: string; - - /** - * Creates a new BackupPlan instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupPlan instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupPlan): google.cloud.backupdr.v1.BackupPlan; - - /** - * Encodes the specified BackupPlan message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. - * @param message BackupPlan message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupPlan, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupPlan message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. - * @param message BackupPlan message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupPlan, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupPlan message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupPlan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupPlan; - - /** - * Decodes a BackupPlan message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupPlan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupPlan; - - /** - * Verifies a BackupPlan message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupPlan message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupPlan - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupPlan; - - /** - * Creates a plain object from a BackupPlan message. Also converts values to other types if specified. - * @param message BackupPlan - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupPlan, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupPlan to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupPlan - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BackupPlan { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - DELETING = 3, - INACTIVE = 4 - } - } - - /** Properties of a BackupRule. */ - interface IBackupRule { - - /** BackupRule ruleId */ - ruleId?: (string|null); - - /** BackupRule backupRetentionDays */ - backupRetentionDays?: (number|null); - - /** BackupRule standardSchedule */ - standardSchedule?: (google.cloud.backupdr.v1.IStandardSchedule|null); - } - - /** Represents a BackupRule. */ - class BackupRule implements IBackupRule { - - /** - * Constructs a new BackupRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupRule); - - /** BackupRule ruleId. */ - public ruleId: string; - - /** BackupRule backupRetentionDays. */ - public backupRetentionDays: number; - - /** BackupRule standardSchedule. */ - public standardSchedule?: (google.cloud.backupdr.v1.IStandardSchedule|null); - - /** BackupRule backupScheduleOneof. */ - public backupScheduleOneof?: "standardSchedule"; - - /** - * Creates a new BackupRule instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupRule instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupRule): google.cloud.backupdr.v1.BackupRule; - - /** - * Encodes the specified BackupRule message. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. - * @param message BackupRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupRule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. - * @param message BackupRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupRule; - - /** - * Decodes a BackupRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupRule; - - /** - * Verifies a BackupRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupRule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupRule; - - /** - * Creates a plain object from a BackupRule message. Also converts values to other types if specified. - * @param message BackupRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StandardSchedule. */ - interface IStandardSchedule { - - /** StandardSchedule recurrenceType */ - recurrenceType?: (google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|keyof typeof google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|null); - - /** StandardSchedule hourlyFrequency */ - hourlyFrequency?: (number|null); - - /** StandardSchedule daysOfWeek */ - daysOfWeek?: (google.type.DayOfWeek[]|null); - - /** StandardSchedule daysOfMonth */ - daysOfMonth?: (number[]|null); - - /** StandardSchedule weekDayOfMonth */ - weekDayOfMonth?: (google.cloud.backupdr.v1.IWeekDayOfMonth|null); - - /** StandardSchedule months */ - months?: (google.type.Month[]|null); - - /** StandardSchedule backupWindow */ - backupWindow?: (google.cloud.backupdr.v1.IBackupWindow|null); - - /** StandardSchedule timeZone */ - timeZone?: (string|null); - } - - /** Represents a StandardSchedule. */ - class StandardSchedule implements IStandardSchedule { - - /** - * Constructs a new StandardSchedule. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IStandardSchedule); - - /** StandardSchedule recurrenceType. */ - public recurrenceType: (google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|keyof typeof google.cloud.backupdr.v1.StandardSchedule.RecurrenceType); - - /** StandardSchedule hourlyFrequency. */ - public hourlyFrequency: number; - - /** StandardSchedule daysOfWeek. */ - public daysOfWeek: google.type.DayOfWeek[]; - - /** StandardSchedule daysOfMonth. */ - public daysOfMonth: number[]; - - /** StandardSchedule weekDayOfMonth. */ - public weekDayOfMonth?: (google.cloud.backupdr.v1.IWeekDayOfMonth|null); - - /** StandardSchedule months. */ - public months: google.type.Month[]; - - /** StandardSchedule backupWindow. */ - public backupWindow?: (google.cloud.backupdr.v1.IBackupWindow|null); - - /** StandardSchedule timeZone. */ - public timeZone: string; - - /** - * Creates a new StandardSchedule instance using the specified properties. - * @param [properties] Properties to set - * @returns StandardSchedule instance - */ - public static create(properties?: google.cloud.backupdr.v1.IStandardSchedule): google.cloud.backupdr.v1.StandardSchedule; - - /** - * Encodes the specified StandardSchedule message. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. - * @param message StandardSchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IStandardSchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StandardSchedule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. - * @param message StandardSchedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IStandardSchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StandardSchedule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StandardSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.StandardSchedule; - - /** - * Decodes a StandardSchedule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StandardSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.StandardSchedule; - - /** - * Verifies a StandardSchedule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StandardSchedule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StandardSchedule - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.StandardSchedule; - - /** - * Creates a plain object from a StandardSchedule message. Also converts values to other types if specified. - * @param message StandardSchedule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.StandardSchedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StandardSchedule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StandardSchedule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace StandardSchedule { - - /** RecurrenceType enum. */ - enum RecurrenceType { - RECURRENCE_TYPE_UNSPECIFIED = 0, - HOURLY = 1, - DAILY = 2, - WEEKLY = 3, - MONTHLY = 4, - YEARLY = 5 - } - } - - /** Properties of a BackupWindow. */ - interface IBackupWindow { - - /** BackupWindow startHourOfDay */ - startHourOfDay?: (number|null); - - /** BackupWindow endHourOfDay */ - endHourOfDay?: (number|null); - } - - /** Represents a BackupWindow. */ - class BackupWindow implements IBackupWindow { - - /** - * Constructs a new BackupWindow. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupWindow); - - /** BackupWindow startHourOfDay. */ - public startHourOfDay: number; - - /** BackupWindow endHourOfDay. */ - public endHourOfDay: number; - - /** - * Creates a new BackupWindow instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupWindow instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupWindow): google.cloud.backupdr.v1.BackupWindow; - - /** - * Encodes the specified BackupWindow message. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. - * @param message BackupWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupWindow message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. - * @param message BackupWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupWindow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupWindow; - - /** - * Decodes a BackupWindow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupWindow; - - /** - * Verifies a BackupWindow message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupWindow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupWindow - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupWindow; - - /** - * Creates a plain object from a BackupWindow message. Also converts values to other types if specified. - * @param message BackupWindow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupWindow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupWindow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WeekDayOfMonth. */ - interface IWeekDayOfMonth { - - /** WeekDayOfMonth weekOfMonth */ - weekOfMonth?: (google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|keyof typeof google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|null); - - /** WeekDayOfMonth dayOfWeek */ - dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); - } - - /** Represents a WeekDayOfMonth. */ - class WeekDayOfMonth implements IWeekDayOfMonth { - - /** - * Constructs a new WeekDayOfMonth. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IWeekDayOfMonth); - - /** WeekDayOfMonth weekOfMonth. */ - public weekOfMonth: (google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|keyof typeof google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth); - - /** WeekDayOfMonth dayOfWeek. */ - public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); - - /** - * Creates a new WeekDayOfMonth instance using the specified properties. - * @param [properties] Properties to set - * @returns WeekDayOfMonth instance - */ - public static create(properties?: google.cloud.backupdr.v1.IWeekDayOfMonth): google.cloud.backupdr.v1.WeekDayOfMonth; - - /** - * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. - * @param message WeekDayOfMonth message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. - * @param message WeekDayOfMonth message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IWeekDayOfMonth, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WeekDayOfMonth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.WeekDayOfMonth; - - /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WeekDayOfMonth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.WeekDayOfMonth; - - /** - * Verifies a WeekDayOfMonth message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WeekDayOfMonth - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.WeekDayOfMonth; - - /** - * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. - * @param message WeekDayOfMonth - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.WeekDayOfMonth, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WeekDayOfMonth to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WeekDayOfMonth - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WeekDayOfMonth { - - /** WeekOfMonth enum. */ - enum WeekOfMonth { - WEEK_OF_MONTH_UNSPECIFIED = 0, - FIRST = 1, - SECOND = 2, - THIRD = 3, - FOURTH = 4, - LAST = 5 - } - } - - /** Properties of a CreateBackupPlanRequest. */ - interface ICreateBackupPlanRequest { - - /** CreateBackupPlanRequest parent */ - parent?: (string|null); - - /** CreateBackupPlanRequest backupPlanId */ - backupPlanId?: (string|null); - - /** CreateBackupPlanRequest backupPlan */ - backupPlan?: (google.cloud.backupdr.v1.IBackupPlan|null); - - /** CreateBackupPlanRequest requestId */ - requestId?: (string|null); - } - - /** Represents a CreateBackupPlanRequest. */ - class CreateBackupPlanRequest implements ICreateBackupPlanRequest { - - /** - * Constructs a new CreateBackupPlanRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ICreateBackupPlanRequest); - - /** CreateBackupPlanRequest parent. */ - public parent: string; - - /** CreateBackupPlanRequest backupPlanId. */ - public backupPlanId: string; - - /** CreateBackupPlanRequest backupPlan. */ - public backupPlan?: (google.cloud.backupdr.v1.IBackupPlan|null); - - /** CreateBackupPlanRequest requestId. */ - public requestId: string; - - /** - * Creates a new CreateBackupPlanRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateBackupPlanRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ICreateBackupPlanRequest): google.cloud.backupdr.v1.CreateBackupPlanRequest; - - /** - * Encodes the specified CreateBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. - * @param message CreateBackupPlanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ICreateBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. - * @param message CreateBackupPlanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateBackupPlanRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupPlanRequest; - - /** - * Decodes a CreateBackupPlanRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupPlanRequest; - - /** - * Verifies a CreateBackupPlanRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateBackupPlanRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateBackupPlanRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupPlanRequest; - - /** - * Creates a plain object from a CreateBackupPlanRequest message. Also converts values to other types if specified. - * @param message CreateBackupPlanRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.CreateBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateBackupPlanRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateBackupPlanRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupPlansRequest. */ - interface IListBackupPlansRequest { - - /** ListBackupPlansRequest parent */ - parent?: (string|null); - - /** ListBackupPlansRequest pageSize */ - pageSize?: (number|null); - - /** ListBackupPlansRequest pageToken */ - pageToken?: (string|null); - - /** ListBackupPlansRequest filter */ - filter?: (string|null); - - /** ListBackupPlansRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListBackupPlansRequest. */ - class ListBackupPlansRequest implements IListBackupPlansRequest { - - /** - * Constructs a new ListBackupPlansRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupPlansRequest); - - /** ListBackupPlansRequest parent. */ - public parent: string; - - /** ListBackupPlansRequest pageSize. */ - public pageSize: number; - - /** ListBackupPlansRequest pageToken. */ - public pageToken: string; - - /** ListBackupPlansRequest filter. */ - public filter: string; - - /** ListBackupPlansRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListBackupPlansRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupPlansRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupPlansRequest): google.cloud.backupdr.v1.ListBackupPlansRequest; - - /** - * Encodes the specified ListBackupPlansRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. - * @param message ListBackupPlansRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupPlansRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupPlansRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. - * @param message ListBackupPlansRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlansRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupPlansRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupPlansRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlansRequest; - - /** - * Decodes a ListBackupPlansRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupPlansRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlansRequest; - - /** - * Verifies a ListBackupPlansRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupPlansRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupPlansRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlansRequest; - - /** - * Creates a plain object from a ListBackupPlansRequest message. Also converts values to other types if specified. - * @param message ListBackupPlansRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupPlansRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupPlansRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupPlansRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupPlansResponse. */ - interface IListBackupPlansResponse { - - /** ListBackupPlansResponse backupPlans */ - backupPlans?: (google.cloud.backupdr.v1.IBackupPlan[]|null); - - /** ListBackupPlansResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListBackupPlansResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListBackupPlansResponse. */ - class ListBackupPlansResponse implements IListBackupPlansResponse { - - /** - * Constructs a new ListBackupPlansResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupPlansResponse); - - /** ListBackupPlansResponse backupPlans. */ - public backupPlans: google.cloud.backupdr.v1.IBackupPlan[]; - - /** ListBackupPlansResponse nextPageToken. */ - public nextPageToken: string; - - /** ListBackupPlansResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListBackupPlansResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupPlansResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupPlansResponse): google.cloud.backupdr.v1.ListBackupPlansResponse; - - /** - * Encodes the specified ListBackupPlansResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. - * @param message ListBackupPlansResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupPlansResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupPlansResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. - * @param message ListBackupPlansResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlansResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupPlansResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupPlansResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlansResponse; - - /** - * Decodes a ListBackupPlansResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupPlansResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlansResponse; - - /** - * Verifies a ListBackupPlansResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupPlansResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupPlansResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlansResponse; - - /** - * Creates a plain object from a ListBackupPlansResponse message. Also converts values to other types if specified. - * @param message ListBackupPlansResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupPlansResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupPlansResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupPlansResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetBackupPlanRequest. */ - interface IGetBackupPlanRequest { - - /** GetBackupPlanRequest name */ - name?: (string|null); - } - - /** Represents a GetBackupPlanRequest. */ - class GetBackupPlanRequest implements IGetBackupPlanRequest { - - /** - * Constructs a new GetBackupPlanRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetBackupPlanRequest); - - /** GetBackupPlanRequest name. */ - public name: string; - - /** - * Creates a new GetBackupPlanRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupPlanRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetBackupPlanRequest): google.cloud.backupdr.v1.GetBackupPlanRequest; - - /** - * Encodes the specified GetBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. - * @param message GetBackupPlanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. - * @param message GetBackupPlanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetBackupPlanRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupPlanRequest; - - /** - * Decodes a GetBackupPlanRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupPlanRequest; - - /** - * Verifies a GetBackupPlanRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetBackupPlanRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetBackupPlanRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupPlanRequest; - - /** - * Creates a plain object from a GetBackupPlanRequest message. Also converts values to other types if specified. - * @param message GetBackupPlanRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetBackupPlanRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetBackupPlanRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteBackupPlanRequest. */ - interface IDeleteBackupPlanRequest { - - /** DeleteBackupPlanRequest name */ - name?: (string|null); - - /** DeleteBackupPlanRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteBackupPlanRequest. */ - class DeleteBackupPlanRequest implements IDeleteBackupPlanRequest { - - /** - * Constructs a new DeleteBackupPlanRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanRequest); - - /** DeleteBackupPlanRequest name. */ - public name: string; - - /** DeleteBackupPlanRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteBackupPlanRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteBackupPlanRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanRequest): google.cloud.backupdr.v1.DeleteBackupPlanRequest; - - /** - * Encodes the specified DeleteBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. - * @param message DeleteBackupPlanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. - * @param message DeleteBackupPlanRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupPlanRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupPlanRequest; - - /** - * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupPlanRequest; - - /** - * Verifies a DeleteBackupPlanRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteBackupPlanRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteBackupPlanRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupPlanRequest; - - /** - * Creates a plain object from a DeleteBackupPlanRequest message. Also converts values to other types if specified. - * @param message DeleteBackupPlanRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DeleteBackupPlanRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteBackupPlanRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteBackupPlanRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackupPlanAssociation. */ - interface IBackupPlanAssociation { - - /** BackupPlanAssociation name */ - name?: (string|null); - - /** BackupPlanAssociation resourceType */ - resourceType?: (string|null); - - /** BackupPlanAssociation resource */ - resource?: (string|null); - - /** BackupPlanAssociation backupPlan */ - backupPlan?: (string|null); - - /** BackupPlanAssociation createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlanAssociation updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlanAssociation state */ - state?: (google.cloud.backupdr.v1.BackupPlanAssociation.State|keyof typeof google.cloud.backupdr.v1.BackupPlanAssociation.State|null); - - /** BackupPlanAssociation rulesConfigInfo */ - rulesConfigInfo?: (google.cloud.backupdr.v1.IRuleConfigInfo[]|null); - - /** BackupPlanAssociation dataSource */ - dataSource?: (string|null); - } - - /** Represents a BackupPlanAssociation. */ - class BackupPlanAssociation implements IBackupPlanAssociation { - - /** - * Constructs a new BackupPlanAssociation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupPlanAssociation); - - /** BackupPlanAssociation name. */ - public name: string; - - /** BackupPlanAssociation resourceType. */ - public resourceType: string; - - /** BackupPlanAssociation resource. */ - public resource: string; - - /** BackupPlanAssociation backupPlan. */ - public backupPlan: string; - - /** BackupPlanAssociation createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlanAssociation updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** BackupPlanAssociation state. */ - public state: (google.cloud.backupdr.v1.BackupPlanAssociation.State|keyof typeof google.cloud.backupdr.v1.BackupPlanAssociation.State); - - /** BackupPlanAssociation rulesConfigInfo. */ - public rulesConfigInfo: google.cloud.backupdr.v1.IRuleConfigInfo[]; - - /** BackupPlanAssociation dataSource. */ - public dataSource: string; - - /** - * Creates a new BackupPlanAssociation instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupPlanAssociation instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupPlanAssociation): google.cloud.backupdr.v1.BackupPlanAssociation; - - /** - * Encodes the specified BackupPlanAssociation message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. - * @param message BackupPlanAssociation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupPlanAssociation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupPlanAssociation message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. - * @param message BackupPlanAssociation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupPlanAssociation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupPlanAssociation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupPlanAssociation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupPlanAssociation; - - /** - * Decodes a BackupPlanAssociation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupPlanAssociation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupPlanAssociation; - - /** - * Verifies a BackupPlanAssociation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupPlanAssociation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupPlanAssociation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupPlanAssociation; - - /** - * Creates a plain object from a BackupPlanAssociation message. Also converts values to other types if specified. - * @param message BackupPlanAssociation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupPlanAssociation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupPlanAssociation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupPlanAssociation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BackupPlanAssociation { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - DELETING = 3, - INACTIVE = 4 - } - } - - /** Properties of a RuleConfigInfo. */ - interface IRuleConfigInfo { - - /** RuleConfigInfo ruleId */ - ruleId?: (string|null); - - /** RuleConfigInfo lastBackupState */ - lastBackupState?: (google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|null); - - /** RuleConfigInfo lastBackupError */ - lastBackupError?: (google.rpc.IStatus|null); - - /** RuleConfigInfo lastSuccessfulBackupConsistencyTime */ - lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a RuleConfigInfo. */ - class RuleConfigInfo implements IRuleConfigInfo { - - /** - * Constructs a new RuleConfigInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IRuleConfigInfo); - - /** RuleConfigInfo ruleId. */ - public ruleId: string; - - /** RuleConfigInfo lastBackupState. */ - public lastBackupState: (google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState); - - /** RuleConfigInfo lastBackupError. */ - public lastBackupError?: (google.rpc.IStatus|null); - - /** RuleConfigInfo lastSuccessfulBackupConsistencyTime. */ - public lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new RuleConfigInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RuleConfigInfo instance - */ - public static create(properties?: google.cloud.backupdr.v1.IRuleConfigInfo): google.cloud.backupdr.v1.RuleConfigInfo; - - /** - * Encodes the specified RuleConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. - * @param message RuleConfigInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IRuleConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RuleConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. - * @param message RuleConfigInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IRuleConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RuleConfigInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RuleConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RuleConfigInfo; - - /** - * Decodes a RuleConfigInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RuleConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RuleConfigInfo; - - /** - * Verifies a RuleConfigInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RuleConfigInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RuleConfigInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RuleConfigInfo; - - /** - * Creates a plain object from a RuleConfigInfo message. Also converts values to other types if specified. - * @param message RuleConfigInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.RuleConfigInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RuleConfigInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RuleConfigInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace RuleConfigInfo { - - /** LastBackupState enum. */ - enum LastBackupState { - LAST_BACKUP_STATE_UNSPECIFIED = 0, - FIRST_BACKUP_PENDING = 1, - PERMISSION_DENIED = 2, - SUCCEEDED = 3, - FAILED = 4 - } - } - - /** Properties of a CreateBackupPlanAssociationRequest. */ - interface ICreateBackupPlanAssociationRequest { - - /** CreateBackupPlanAssociationRequest parent */ - parent?: (string|null); - - /** CreateBackupPlanAssociationRequest backupPlanAssociationId */ - backupPlanAssociationId?: (string|null); - - /** CreateBackupPlanAssociationRequest backupPlanAssociation */ - backupPlanAssociation?: (google.cloud.backupdr.v1.IBackupPlanAssociation|null); - - /** CreateBackupPlanAssociationRequest requestId */ - requestId?: (string|null); - } - - /** Represents a CreateBackupPlanAssociationRequest. */ - class CreateBackupPlanAssociationRequest implements ICreateBackupPlanAssociationRequest { - - /** - * Constructs a new CreateBackupPlanAssociationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest); - - /** CreateBackupPlanAssociationRequest parent. */ - public parent: string; - - /** CreateBackupPlanAssociationRequest backupPlanAssociationId. */ - public backupPlanAssociationId: string; - - /** CreateBackupPlanAssociationRequest backupPlanAssociation. */ - public backupPlanAssociation?: (google.cloud.backupdr.v1.IBackupPlanAssociation|null); - - /** CreateBackupPlanAssociationRequest requestId. */ - public requestId: string; - - /** - * Creates a new CreateBackupPlanAssociationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateBackupPlanAssociationRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; - - /** - * Encodes the specified CreateBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. - * @param message CreateBackupPlanAssociationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. - * @param message CreateBackupPlanAssociationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; - - /** - * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; - - /** - * Verifies a CreateBackupPlanAssociationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateBackupPlanAssociationRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest; - - /** - * Creates a plain object from a CreateBackupPlanAssociationRequest message. Also converts values to other types if specified. - * @param message CreateBackupPlanAssociationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateBackupPlanAssociationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateBackupPlanAssociationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupPlanAssociationsRequest. */ - interface IListBackupPlanAssociationsRequest { - - /** ListBackupPlanAssociationsRequest parent */ - parent?: (string|null); - - /** ListBackupPlanAssociationsRequest pageSize */ - pageSize?: (number|null); - - /** ListBackupPlanAssociationsRequest pageToken */ - pageToken?: (string|null); - - /** ListBackupPlanAssociationsRequest filter */ - filter?: (string|null); - } - - /** Represents a ListBackupPlanAssociationsRequest. */ - class ListBackupPlanAssociationsRequest implements IListBackupPlanAssociationsRequest { - - /** - * Constructs a new ListBackupPlanAssociationsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest); - - /** ListBackupPlanAssociationsRequest parent. */ - public parent: string; - - /** ListBackupPlanAssociationsRequest pageSize. */ - public pageSize: number; - - /** ListBackupPlanAssociationsRequest pageToken. */ - public pageToken: string; - - /** ListBackupPlanAssociationsRequest filter. */ - public filter: string; - - /** - * Creates a new ListBackupPlanAssociationsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupPlanAssociationsRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; - - /** - * Encodes the specified ListBackupPlanAssociationsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. - * @param message ListBackupPlanAssociationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupPlanAssociationsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. - * @param message ListBackupPlanAssociationsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupPlanAssociationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; - - /** - * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupPlanAssociationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; - - /** - * Verifies a ListBackupPlanAssociationsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupPlanAssociationsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupPlanAssociationsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest; - - /** - * Creates a plain object from a ListBackupPlanAssociationsRequest message. Also converts values to other types if specified. - * @param message ListBackupPlanAssociationsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupPlanAssociationsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupPlanAssociationsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupPlanAssociationsResponse. */ - interface IListBackupPlanAssociationsResponse { - - /** ListBackupPlanAssociationsResponse backupPlanAssociations */ - backupPlanAssociations?: (google.cloud.backupdr.v1.IBackupPlanAssociation[]|null); - - /** ListBackupPlanAssociationsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListBackupPlanAssociationsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListBackupPlanAssociationsResponse. */ - class ListBackupPlanAssociationsResponse implements IListBackupPlanAssociationsResponse { - - /** - * Constructs a new ListBackupPlanAssociationsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse); - - /** ListBackupPlanAssociationsResponse backupPlanAssociations. */ - public backupPlanAssociations: google.cloud.backupdr.v1.IBackupPlanAssociation[]; - - /** ListBackupPlanAssociationsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListBackupPlanAssociationsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListBackupPlanAssociationsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupPlanAssociationsResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; - - /** - * Encodes the specified ListBackupPlanAssociationsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. - * @param message ListBackupPlanAssociationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupPlanAssociationsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. - * @param message ListBackupPlanAssociationsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupPlanAssociationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; - - /** - * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupPlanAssociationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; - - /** - * Verifies a ListBackupPlanAssociationsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupPlanAssociationsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupPlanAssociationsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse; - - /** - * Creates a plain object from a ListBackupPlanAssociationsResponse message. Also converts values to other types if specified. - * @param message ListBackupPlanAssociationsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupPlanAssociationsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupPlanAssociationsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetBackupPlanAssociationRequest. */ - interface IGetBackupPlanAssociationRequest { - - /** GetBackupPlanAssociationRequest name */ - name?: (string|null); - } - - /** Represents a GetBackupPlanAssociationRequest. */ - class GetBackupPlanAssociationRequest implements IGetBackupPlanAssociationRequest { - - /** - * Constructs a new GetBackupPlanAssociationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest); - - /** GetBackupPlanAssociationRequest name. */ - public name: string; - - /** - * Creates a new GetBackupPlanAssociationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupPlanAssociationRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; - - /** - * Encodes the specified GetBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. - * @param message GetBackupPlanAssociationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. - * @param message GetBackupPlanAssociationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; - - /** - * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; - - /** - * Verifies a GetBackupPlanAssociationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetBackupPlanAssociationRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupPlanAssociationRequest; - - /** - * Creates a plain object from a GetBackupPlanAssociationRequest message. Also converts values to other types if specified. - * @param message GetBackupPlanAssociationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetBackupPlanAssociationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetBackupPlanAssociationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteBackupPlanAssociationRequest. */ - interface IDeleteBackupPlanAssociationRequest { - - /** DeleteBackupPlanAssociationRequest name */ - name?: (string|null); - - /** DeleteBackupPlanAssociationRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteBackupPlanAssociationRequest. */ - class DeleteBackupPlanAssociationRequest implements IDeleteBackupPlanAssociationRequest { - - /** - * Constructs a new DeleteBackupPlanAssociationRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest); - - /** DeleteBackupPlanAssociationRequest name. */ - public name: string; - - /** DeleteBackupPlanAssociationRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteBackupPlanAssociationRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteBackupPlanAssociationRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; - - /** - * Encodes the specified DeleteBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. - * @param message DeleteBackupPlanAssociationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. - * @param message DeleteBackupPlanAssociationRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; - - /** - * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; - - /** - * Verifies a DeleteBackupPlanAssociationRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteBackupPlanAssociationRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest; - - /** - * Creates a plain object from a DeleteBackupPlanAssociationRequest message. Also converts values to other types if specified. - * @param message DeleteBackupPlanAssociationRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteBackupPlanAssociationRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteBackupPlanAssociationRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TriggerBackupRequest. */ - interface ITriggerBackupRequest { - - /** TriggerBackupRequest name */ - name?: (string|null); - - /** TriggerBackupRequest ruleId */ - ruleId?: (string|null); - - /** TriggerBackupRequest requestId */ - requestId?: (string|null); - } - - /** Represents a TriggerBackupRequest. */ - class TriggerBackupRequest implements ITriggerBackupRequest { - - /** - * Constructs a new TriggerBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ITriggerBackupRequest); - - /** TriggerBackupRequest name. */ - public name: string; - - /** TriggerBackupRequest ruleId. */ - public ruleId: string; - - /** TriggerBackupRequest requestId. */ - public requestId: string; - - /** - * Creates a new TriggerBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns TriggerBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ITriggerBackupRequest): google.cloud.backupdr.v1.TriggerBackupRequest; - - /** - * Encodes the specified TriggerBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. - * @param message TriggerBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ITriggerBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TriggerBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. - * @param message TriggerBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ITriggerBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TriggerBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TriggerBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.TriggerBackupRequest; - - /** - * Decodes a TriggerBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TriggerBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.TriggerBackupRequest; - - /** - * Verifies a TriggerBackupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TriggerBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TriggerBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.TriggerBackupRequest; - - /** - * Creates a plain object from a TriggerBackupRequest message. Also converts values to other types if specified. - * @param message TriggerBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.TriggerBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TriggerBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TriggerBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackupVault. */ - interface IBackupVault { - - /** BackupVault name */ - name?: (string|null); - - /** BackupVault description */ - description?: (string|null); - - /** BackupVault labels */ - labels?: ({ [k: string]: string }|null); - - /** BackupVault createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault backupMinimumEnforcedRetentionDuration */ - backupMinimumEnforcedRetentionDuration?: (google.protobuf.IDuration|null); - - /** BackupVault deletable */ - deletable?: (boolean|null); - - /** BackupVault etag */ - etag?: (string|null); - - /** BackupVault state */ - state?: (google.cloud.backupdr.v1.BackupVault.State|keyof typeof google.cloud.backupdr.v1.BackupVault.State|null); - - /** BackupVault effectiveTime */ - effectiveTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault backupCount */ - backupCount?: (number|Long|string|null); - - /** BackupVault serviceAccount */ - serviceAccount?: (string|null); - - /** BackupVault totalStoredBytes */ - totalStoredBytes?: (number|Long|string|null); - - /** BackupVault uid */ - uid?: (string|null); - - /** BackupVault annotations */ - annotations?: ({ [k: string]: string }|null); - - /** BackupVault accessRestriction */ - accessRestriction?: (google.cloud.backupdr.v1.BackupVault.AccessRestriction|keyof typeof google.cloud.backupdr.v1.BackupVault.AccessRestriction|null); - } - - /** Represents a BackupVault. */ - class BackupVault implements IBackupVault { - - /** - * Constructs a new BackupVault. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupVault); - - /** BackupVault name. */ - public name: string; - - /** BackupVault description. */ - public description?: (string|null); - - /** BackupVault labels. */ - public labels: { [k: string]: string }; - - /** BackupVault createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault backupMinimumEnforcedRetentionDuration. */ - public backupMinimumEnforcedRetentionDuration?: (google.protobuf.IDuration|null); - - /** BackupVault deletable. */ - public deletable?: (boolean|null); - - /** BackupVault etag. */ - public etag?: (string|null); - - /** BackupVault state. */ - public state: (google.cloud.backupdr.v1.BackupVault.State|keyof typeof google.cloud.backupdr.v1.BackupVault.State); - - /** BackupVault effectiveTime. */ - public effectiveTime?: (google.protobuf.ITimestamp|null); - - /** BackupVault backupCount. */ - public backupCount: (number|Long|string); - - /** BackupVault serviceAccount. */ - public serviceAccount: string; - - /** BackupVault totalStoredBytes. */ - public totalStoredBytes: (number|Long|string); - - /** BackupVault uid. */ - public uid: string; - - /** BackupVault annotations. */ - public annotations: { [k: string]: string }; - - /** BackupVault accessRestriction. */ - public accessRestriction: (google.cloud.backupdr.v1.BackupVault.AccessRestriction|keyof typeof google.cloud.backupdr.v1.BackupVault.AccessRestriction); - - /** BackupVault _description. */ - public _description?: "description"; - - /** BackupVault _createTime. */ - public _createTime?: "createTime"; - - /** BackupVault _updateTime. */ - public _updateTime?: "updateTime"; - - /** BackupVault _backupMinimumEnforcedRetentionDuration. */ - public _backupMinimumEnforcedRetentionDuration?: "backupMinimumEnforcedRetentionDuration"; - - /** BackupVault _deletable. */ - public _deletable?: "deletable"; - - /** BackupVault _etag. */ - public _etag?: "etag"; - - /** BackupVault _effectiveTime. */ - public _effectiveTime?: "effectiveTime"; - - /** - * Creates a new BackupVault instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupVault instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupVault): google.cloud.backupdr.v1.BackupVault; - - /** - * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. - * @param message BackupVault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupVault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. - * @param message BackupVault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupVault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupVault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupVault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupVault; - - /** - * Decodes a BackupVault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupVault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupVault; - - /** - * Verifies a BackupVault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupVault - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupVault; - - /** - * Creates a plain object from a BackupVault message. Also converts values to other types if specified. - * @param message BackupVault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupVault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupVault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupVault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BackupVault { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - DELETING = 3, - ERROR = 4 - } - - /** AccessRestriction enum. */ - enum AccessRestriction { - ACCESS_RESTRICTION_UNSPECIFIED = 0, - WITHIN_PROJECT = 1, - WITHIN_ORGANIZATION = 2, - UNRESTRICTED = 3 - } - } - - /** Properties of a DataSource. */ - interface IDataSource { - - /** DataSource name */ - name?: (string|null); - - /** DataSource state */ - state?: (google.cloud.backupdr.v1.DataSource.State|keyof typeof google.cloud.backupdr.v1.DataSource.State|null); - - /** DataSource labels */ - labels?: ({ [k: string]: string }|null); - - /** DataSource createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** DataSource updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** DataSource backupCount */ - backupCount?: (number|Long|string|null); - - /** DataSource etag */ - etag?: (string|null); - - /** DataSource totalStoredBytes */ - totalStoredBytes?: (number|Long|string|null); - - /** DataSource configState */ - configState?: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState|null); - - /** DataSource backupConfigInfo */ - backupConfigInfo?: (google.cloud.backupdr.v1.IBackupConfigInfo|null); - - /** DataSource dataSourceGcpResource */ - dataSourceGcpResource?: (google.cloud.backupdr.v1.IDataSourceGcpResource|null); - - /** DataSource dataSourceBackupApplianceApplication */ - dataSourceBackupApplianceApplication?: (google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null); - } - - /** Represents a DataSource. */ - class DataSource implements IDataSource { - - /** - * Constructs a new DataSource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDataSource); - - /** DataSource name. */ - public name: string; - - /** DataSource state. */ - public state: (google.cloud.backupdr.v1.DataSource.State|keyof typeof google.cloud.backupdr.v1.DataSource.State); - - /** DataSource labels. */ - public labels: { [k: string]: string }; - - /** DataSource createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** DataSource updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** DataSource backupCount. */ - public backupCount?: (number|Long|string|null); - - /** DataSource etag. */ - public etag?: (string|null); - - /** DataSource totalStoredBytes. */ - public totalStoredBytes?: (number|Long|string|null); - - /** DataSource configState. */ - public configState: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState); - - /** DataSource backupConfigInfo. */ - public backupConfigInfo?: (google.cloud.backupdr.v1.IBackupConfigInfo|null); - - /** DataSource dataSourceGcpResource. */ - public dataSourceGcpResource?: (google.cloud.backupdr.v1.IDataSourceGcpResource|null); - - /** DataSource dataSourceBackupApplianceApplication. */ - public dataSourceBackupApplianceApplication?: (google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null); - - /** DataSource _createTime. */ - public _createTime?: "createTime"; - - /** DataSource _updateTime. */ - public _updateTime?: "updateTime"; - - /** DataSource _backupCount. */ - public _backupCount?: "backupCount"; - - /** DataSource _etag. */ - public _etag?: "etag"; - - /** DataSource _totalStoredBytes. */ - public _totalStoredBytes?: "totalStoredBytes"; - - /** DataSource sourceResource. */ - public sourceResource?: ("dataSourceGcpResource"|"dataSourceBackupApplianceApplication"); - - /** - * Creates a new DataSource instance using the specified properties. - * @param [properties] Properties to set - * @returns DataSource instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDataSource): google.cloud.backupdr.v1.DataSource; - - /** - * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. - * @param message DataSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. - * @param message DataSource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataSource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSource; - - /** - * Decodes a DataSource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSource; - - /** - * Verifies a DataSource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataSource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataSource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSource; - - /** - * Creates a plain object from a DataSource message. Also converts values to other types if specified. - * @param message DataSource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DataSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataSource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataSource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DataSource { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - DELETING = 3, - ERROR = 4 - } - } - - /** Properties of a BackupConfigInfo. */ - interface IBackupConfigInfo { - - /** BackupConfigInfo lastBackupState */ - lastBackupState?: (google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|null); - - /** BackupConfigInfo lastSuccessfulBackupConsistencyTime */ - lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); - - /** BackupConfigInfo lastBackupError */ - lastBackupError?: (google.rpc.IStatus|null); - - /** BackupConfigInfo gcpBackupConfig */ - gcpBackupConfig?: (google.cloud.backupdr.v1.IGcpBackupConfig|null); - - /** BackupConfigInfo backupApplianceBackupConfig */ - backupApplianceBackupConfig?: (google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null); - } - - /** Represents a BackupConfigInfo. */ - class BackupConfigInfo implements IBackupConfigInfo { - - /** - * Constructs a new BackupConfigInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupConfigInfo); - - /** BackupConfigInfo lastBackupState. */ - public lastBackupState: (google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|keyof typeof google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState); - - /** BackupConfigInfo lastSuccessfulBackupConsistencyTime. */ - public lastSuccessfulBackupConsistencyTime?: (google.protobuf.ITimestamp|null); - - /** BackupConfigInfo lastBackupError. */ - public lastBackupError?: (google.rpc.IStatus|null); - - /** BackupConfigInfo gcpBackupConfig. */ - public gcpBackupConfig?: (google.cloud.backupdr.v1.IGcpBackupConfig|null); - - /** BackupConfigInfo backupApplianceBackupConfig. */ - public backupApplianceBackupConfig?: (google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null); - - /** BackupConfigInfo backupConfig. */ - public backupConfig?: ("gcpBackupConfig"|"backupApplianceBackupConfig"); - - /** - * Creates a new BackupConfigInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupConfigInfo instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupConfigInfo): google.cloud.backupdr.v1.BackupConfigInfo; - - /** - * Encodes the specified BackupConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. - * @param message BackupConfigInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. - * @param message BackupConfigInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupConfigInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupConfigInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupConfigInfo; - - /** - * Decodes a BackupConfigInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupConfigInfo; - - /** - * Verifies a BackupConfigInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupConfigInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupConfigInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupConfigInfo; - - /** - * Creates a plain object from a BackupConfigInfo message. Also converts values to other types if specified. - * @param message BackupConfigInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupConfigInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupConfigInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupConfigInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BackupConfigInfo { - - /** LastBackupState enum. */ - enum LastBackupState { - LAST_BACKUP_STATE_UNSPECIFIED = 0, - FIRST_BACKUP_PENDING = 1, - SUCCEEDED = 2, - FAILED = 3, - PERMISSION_DENIED = 4 - } - } - - /** Properties of a GcpBackupConfig. */ - interface IGcpBackupConfig { - - /** GcpBackupConfig backupPlan */ - backupPlan?: (string|null); - - /** GcpBackupConfig backupPlanDescription */ - backupPlanDescription?: (string|null); - - /** GcpBackupConfig backupPlanAssociation */ - backupPlanAssociation?: (string|null); - - /** GcpBackupConfig backupPlanRules */ - backupPlanRules?: (string[]|null); - } - - /** Represents a GcpBackupConfig. */ - class GcpBackupConfig implements IGcpBackupConfig { - - /** - * Constructs a new GcpBackupConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGcpBackupConfig); - - /** GcpBackupConfig backupPlan. */ - public backupPlan: string; - - /** GcpBackupConfig backupPlanDescription. */ - public backupPlanDescription: string; - - /** GcpBackupConfig backupPlanAssociation. */ - public backupPlanAssociation: string; - - /** GcpBackupConfig backupPlanRules. */ - public backupPlanRules: string[]; - - /** - * Creates a new GcpBackupConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns GcpBackupConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGcpBackupConfig): google.cloud.backupdr.v1.GcpBackupConfig; - - /** - * Encodes the specified GcpBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. - * @param message GcpBackupConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGcpBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcpBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. - * @param message GcpBackupConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGcpBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcpBackupConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcpBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GcpBackupConfig; - - /** - * Decodes a GcpBackupConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcpBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GcpBackupConfig; - - /** - * Verifies a GcpBackupConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcpBackupConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcpBackupConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GcpBackupConfig; - - /** - * Creates a plain object from a GcpBackupConfig message. Also converts values to other types if specified. - * @param message GcpBackupConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GcpBackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcpBackupConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcpBackupConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackupApplianceBackupConfig. */ - interface IBackupApplianceBackupConfig { - - /** BackupApplianceBackupConfig backupApplianceName */ - backupApplianceName?: (string|null); - - /** BackupApplianceBackupConfig backupApplianceId */ - backupApplianceId?: (number|Long|string|null); - - /** BackupApplianceBackupConfig slaId */ - slaId?: (number|Long|string|null); - - /** BackupApplianceBackupConfig applicationName */ - applicationName?: (string|null); - - /** BackupApplianceBackupConfig hostName */ - hostName?: (string|null); - - /** BackupApplianceBackupConfig sltName */ - sltName?: (string|null); - - /** BackupApplianceBackupConfig slpName */ - slpName?: (string|null); - } - - /** Represents a BackupApplianceBackupConfig. */ - class BackupApplianceBackupConfig implements IBackupApplianceBackupConfig { - - /** - * Constructs a new BackupApplianceBackupConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupConfig); - - /** BackupApplianceBackupConfig backupApplianceName. */ - public backupApplianceName: string; - - /** BackupApplianceBackupConfig backupApplianceId. */ - public backupApplianceId: (number|Long|string); - - /** BackupApplianceBackupConfig slaId. */ - public slaId: (number|Long|string); - - /** BackupApplianceBackupConfig applicationName. */ - public applicationName: string; - - /** BackupApplianceBackupConfig hostName. */ - public hostName: string; - - /** BackupApplianceBackupConfig sltName. */ - public sltName: string; - - /** BackupApplianceBackupConfig slpName. */ - public slpName: string; - - /** - * Creates a new BackupApplianceBackupConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupApplianceBackupConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupConfig): google.cloud.backupdr.v1.BackupApplianceBackupConfig; - - /** - * Encodes the specified BackupApplianceBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. - * @param message BackupApplianceBackupConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupApplianceBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupApplianceBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. - * @param message BackupApplianceBackupConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceBackupConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupApplianceBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceBackupConfig; - - /** - * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupApplianceBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceBackupConfig; - - /** - * Verifies a BackupApplianceBackupConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupApplianceBackupConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupApplianceBackupConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceBackupConfig; - - /** - * Creates a plain object from a BackupApplianceBackupConfig message. Also converts values to other types if specified. - * @param message BackupApplianceBackupConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupApplianceBackupConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupApplianceBackupConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupApplianceBackupConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataSourceGcpResource. */ - interface IDataSourceGcpResource { - - /** DataSourceGcpResource gcpResourcename */ - gcpResourcename?: (string|null); - - /** DataSourceGcpResource location */ - location?: (string|null); - - /** DataSourceGcpResource type */ - type?: (string|null); - - /** DataSourceGcpResource computeInstanceDatasourceProperties */ - computeInstanceDatasourceProperties?: (google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null); - } - - /** Represents a DataSourceGcpResource. */ - class DataSourceGcpResource implements IDataSourceGcpResource { - - /** - * Constructs a new DataSourceGcpResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDataSourceGcpResource); - - /** DataSourceGcpResource gcpResourcename. */ - public gcpResourcename: string; - - /** DataSourceGcpResource location. */ - public location: string; - - /** DataSourceGcpResource type. */ - public type: string; - - /** DataSourceGcpResource computeInstanceDatasourceProperties. */ - public computeInstanceDatasourceProperties?: (google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null); - - /** DataSourceGcpResource gcpResourceProperties. */ - public gcpResourceProperties?: "computeInstanceDatasourceProperties"; - - /** - * Creates a new DataSourceGcpResource instance using the specified properties. - * @param [properties] Properties to set - * @returns DataSourceGcpResource instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDataSourceGcpResource): google.cloud.backupdr.v1.DataSourceGcpResource; - - /** - * Encodes the specified DataSourceGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. - * @param message DataSourceGcpResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDataSourceGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataSourceGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. - * @param message DataSourceGcpResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSourceGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataSourceGcpResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataSourceGcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSourceGcpResource; - - /** - * Decodes a DataSourceGcpResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataSourceGcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSourceGcpResource; - - /** - * Verifies a DataSourceGcpResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataSourceGcpResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataSourceGcpResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSourceGcpResource; - - /** - * Creates a plain object from a DataSourceGcpResource message. Also converts values to other types if specified. - * @param message DataSourceGcpResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DataSourceGcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataSourceGcpResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataSourceGcpResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DataSourceBackupApplianceApplication. */ - interface IDataSourceBackupApplianceApplication { - - /** DataSourceBackupApplianceApplication applicationName */ - applicationName?: (string|null); - - /** DataSourceBackupApplianceApplication backupAppliance */ - backupAppliance?: (string|null); - - /** DataSourceBackupApplianceApplication applianceId */ - applianceId?: (number|Long|string|null); - - /** DataSourceBackupApplianceApplication type */ - type?: (string|null); - - /** DataSourceBackupApplianceApplication applicationId */ - applicationId?: (number|Long|string|null); - - /** DataSourceBackupApplianceApplication hostname */ - hostname?: (string|null); - - /** DataSourceBackupApplianceApplication hostId */ - hostId?: (number|Long|string|null); - } - - /** Represents a DataSourceBackupApplianceApplication. */ - class DataSourceBackupApplianceApplication implements IDataSourceBackupApplianceApplication { - - /** - * Constructs a new DataSourceBackupApplianceApplication. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication); - - /** DataSourceBackupApplianceApplication applicationName. */ - public applicationName: string; - - /** DataSourceBackupApplianceApplication backupAppliance. */ - public backupAppliance: string; - - /** DataSourceBackupApplianceApplication applianceId. */ - public applianceId: (number|Long|string); - - /** DataSourceBackupApplianceApplication type. */ - public type: string; - - /** DataSourceBackupApplianceApplication applicationId. */ - public applicationId: (number|Long|string); - - /** DataSourceBackupApplianceApplication hostname. */ - public hostname: string; - - /** DataSourceBackupApplianceApplication hostId. */ - public hostId: (number|Long|string); - - /** - * Creates a new DataSourceBackupApplianceApplication instance using the specified properties. - * @param [properties] Properties to set - * @returns DataSourceBackupApplianceApplication instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; - - /** - * Encodes the specified DataSourceBackupApplianceApplication message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. - * @param message DataSourceBackupApplianceApplication message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataSourceBackupApplianceApplication message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. - * @param message DataSourceBackupApplianceApplication message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataSourceBackupApplianceApplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; - - /** - * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataSourceBackupApplianceApplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; - - /** - * Verifies a DataSourceBackupApplianceApplication message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataSourceBackupApplianceApplication message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataSourceBackupApplianceApplication - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DataSourceBackupApplianceApplication; - - /** - * Creates a plain object from a DataSourceBackupApplianceApplication message. Also converts values to other types if specified. - * @param message DataSourceBackupApplianceApplication - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DataSourceBackupApplianceApplication, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataSourceBackupApplianceApplication to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataSourceBackupApplianceApplication - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceLockInfo. */ - interface IServiceLockInfo { - - /** ServiceLockInfo operation */ - operation?: (string|null); - } - - /** Represents a ServiceLockInfo. */ - class ServiceLockInfo implements IServiceLockInfo { - - /** - * Constructs a new ServiceLockInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IServiceLockInfo); - - /** ServiceLockInfo operation. */ - public operation: string; - - /** - * Creates a new ServiceLockInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceLockInfo instance - */ - public static create(properties?: google.cloud.backupdr.v1.IServiceLockInfo): google.cloud.backupdr.v1.ServiceLockInfo; - - /** - * Encodes the specified ServiceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. - * @param message ServiceLockInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IServiceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. - * @param message ServiceLockInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IServiceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceLockInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ServiceLockInfo; - - /** - * Decodes a ServiceLockInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ServiceLockInfo; - - /** - * Verifies a ServiceLockInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceLockInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceLockInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ServiceLockInfo; - - /** - * Creates a plain object from a ServiceLockInfo message. Also converts values to other types if specified. - * @param message ServiceLockInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ServiceLockInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceLockInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceLockInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackupApplianceLockInfo. */ - interface IBackupApplianceLockInfo { - - /** BackupApplianceLockInfo backupApplianceId */ - backupApplianceId?: (number|Long|string|null); - - /** BackupApplianceLockInfo backupApplianceName */ - backupApplianceName?: (string|null); - - /** BackupApplianceLockInfo lockReason */ - lockReason?: (string|null); - - /** BackupApplianceLockInfo jobName */ - jobName?: (string|null); - - /** BackupApplianceLockInfo backupImage */ - backupImage?: (string|null); - - /** BackupApplianceLockInfo slaId */ - slaId?: (number|Long|string|null); - } - - /** Represents a BackupApplianceLockInfo. */ - class BackupApplianceLockInfo implements IBackupApplianceLockInfo { - - /** - * Constructs a new BackupApplianceLockInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceLockInfo); - - /** BackupApplianceLockInfo backupApplianceId. */ - public backupApplianceId: (number|Long|string); - - /** BackupApplianceLockInfo backupApplianceName. */ - public backupApplianceName: string; - - /** BackupApplianceLockInfo lockReason. */ - public lockReason: string; - - /** BackupApplianceLockInfo jobName. */ - public jobName?: (string|null); - - /** BackupApplianceLockInfo backupImage. */ - public backupImage?: (string|null); - - /** BackupApplianceLockInfo slaId. */ - public slaId?: (number|Long|string|null); - - /** BackupApplianceLockInfo lockSource. */ - public lockSource?: ("jobName"|"backupImage"|"slaId"); - - /** - * Creates a new BackupApplianceLockInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupApplianceLockInfo instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceLockInfo): google.cloud.backupdr.v1.BackupApplianceLockInfo; - - /** - * Encodes the specified BackupApplianceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. - * @param message BackupApplianceLockInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupApplianceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupApplianceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. - * @param message BackupApplianceLockInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceLockInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupApplianceLockInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupApplianceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceLockInfo; - - /** - * Decodes a BackupApplianceLockInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupApplianceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceLockInfo; - - /** - * Verifies a BackupApplianceLockInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupApplianceLockInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupApplianceLockInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceLockInfo; - - /** - * Creates a plain object from a BackupApplianceLockInfo message. Also converts values to other types if specified. - * @param message BackupApplianceLockInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupApplianceLockInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupApplianceLockInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupApplianceLockInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BackupLock. */ - interface IBackupLock { - - /** BackupLock lockUntilTime */ - lockUntilTime?: (google.protobuf.ITimestamp|null); - - /** BackupLock backupApplianceLockInfo */ - backupApplianceLockInfo?: (google.cloud.backupdr.v1.IBackupApplianceLockInfo|null); - - /** BackupLock serviceLockInfo */ - serviceLockInfo?: (google.cloud.backupdr.v1.IServiceLockInfo|null); - } - - /** Represents a BackupLock. */ - class BackupLock implements IBackupLock { - - /** - * Constructs a new BackupLock. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupLock); - - /** BackupLock lockUntilTime. */ - public lockUntilTime?: (google.protobuf.ITimestamp|null); - - /** BackupLock backupApplianceLockInfo. */ - public backupApplianceLockInfo?: (google.cloud.backupdr.v1.IBackupApplianceLockInfo|null); - - /** BackupLock serviceLockInfo. */ - public serviceLockInfo?: (google.cloud.backupdr.v1.IServiceLockInfo|null); - - /** BackupLock ClientLockInfo. */ - public ClientLockInfo?: ("backupApplianceLockInfo"|"serviceLockInfo"); - - /** - * Creates a new BackupLock instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupLock instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupLock): google.cloud.backupdr.v1.BackupLock; - - /** - * Encodes the specified BackupLock message. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. - * @param message BackupLock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupLock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupLock message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. - * @param message BackupLock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupLock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupLock message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupLock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupLock; - - /** - * Decodes a BackupLock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupLock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupLock; - - /** - * Verifies a BackupLock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupLock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupLock - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupLock; - - /** - * Creates a plain object from a BackupLock message. Also converts values to other types if specified. - * @param message BackupLock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupLock, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupLock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupLock - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Backup. */ - interface IBackup { - - /** Backup name */ - name?: (string|null); - - /** Backup description */ - description?: (string|null); - - /** Backup createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Backup updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Backup labels */ - labels?: ({ [k: string]: string }|null); - - /** Backup enforcedRetentionEndTime */ - enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); - - /** Backup expireTime */ - expireTime?: (google.protobuf.ITimestamp|null); - - /** Backup consistencyTime */ - consistencyTime?: (google.protobuf.ITimestamp|null); - - /** Backup etag */ - etag?: (string|null); - - /** Backup state */ - state?: (google.cloud.backupdr.v1.Backup.State|keyof typeof google.cloud.backupdr.v1.Backup.State|null); - - /** Backup serviceLocks */ - serviceLocks?: (google.cloud.backupdr.v1.IBackupLock[]|null); - - /** Backup backupApplianceLocks */ - backupApplianceLocks?: (google.cloud.backupdr.v1.IBackupLock[]|null); - - /** Backup computeInstanceBackupProperties */ - computeInstanceBackupProperties?: (google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null); - - /** Backup backupApplianceBackupProperties */ - backupApplianceBackupProperties?: (google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null); - - /** Backup backupType */ - backupType?: (google.cloud.backupdr.v1.Backup.BackupType|keyof typeof google.cloud.backupdr.v1.Backup.BackupType|null); - - /** Backup gcpBackupPlanInfo */ - gcpBackupPlanInfo?: (google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null); - - /** Backup resourceSizeBytes */ - resourceSizeBytes?: (number|Long|string|null); - } - - /** Represents a Backup. */ - class Backup implements IBackup { - - /** - * Constructs a new Backup. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackup); - - /** Backup name. */ - public name: string; - - /** Backup description. */ - public description?: (string|null); - - /** Backup createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Backup updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Backup labels. */ - public labels: { [k: string]: string }; - - /** Backup enforcedRetentionEndTime. */ - public enforcedRetentionEndTime?: (google.protobuf.ITimestamp|null); - - /** Backup expireTime. */ - public expireTime?: (google.protobuf.ITimestamp|null); - - /** Backup consistencyTime. */ - public consistencyTime?: (google.protobuf.ITimestamp|null); - - /** Backup etag. */ - public etag?: (string|null); - - /** Backup state. */ - public state: (google.cloud.backupdr.v1.Backup.State|keyof typeof google.cloud.backupdr.v1.Backup.State); - - /** Backup serviceLocks. */ - public serviceLocks: google.cloud.backupdr.v1.IBackupLock[]; - - /** Backup backupApplianceLocks. */ - public backupApplianceLocks: google.cloud.backupdr.v1.IBackupLock[]; - - /** Backup computeInstanceBackupProperties. */ - public computeInstanceBackupProperties?: (google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null); - - /** Backup backupApplianceBackupProperties. */ - public backupApplianceBackupProperties?: (google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null); - - /** Backup backupType. */ - public backupType: (google.cloud.backupdr.v1.Backup.BackupType|keyof typeof google.cloud.backupdr.v1.Backup.BackupType); - - /** Backup gcpBackupPlanInfo. */ - public gcpBackupPlanInfo?: (google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null); - - /** Backup resourceSizeBytes. */ - public resourceSizeBytes: (number|Long|string); - - /** Backup _description. */ - public _description?: "description"; - - /** Backup _createTime. */ - public _createTime?: "createTime"; - - /** Backup _updateTime. */ - public _updateTime?: "updateTime"; - - /** Backup _enforcedRetentionEndTime. */ - public _enforcedRetentionEndTime?: "enforcedRetentionEndTime"; - - /** Backup _expireTime. */ - public _expireTime?: "expireTime"; - - /** Backup _consistencyTime. */ - public _consistencyTime?: "consistencyTime"; - - /** Backup _etag. */ - public _etag?: "etag"; - - /** Backup backupProperties. */ - public backupProperties?: ("computeInstanceBackupProperties"|"backupApplianceBackupProperties"); - - /** Backup planInfo. */ - public planInfo?: "gcpBackupPlanInfo"; - - /** - * Creates a new Backup instance using the specified properties. - * @param [properties] Properties to set - * @returns Backup instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackup): google.cloud.backupdr.v1.Backup; - - /** - * Encodes the specified Backup message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. - * @param message Backup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. - * @param message Backup message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackup, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Backup message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Backup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Backup; - - /** - * Decodes a Backup message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Backup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Backup; - - /** - * Verifies a Backup message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Backup message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Backup - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Backup; - - /** - * Creates a plain object from a Backup message. Also converts values to other types if specified. - * @param message Backup - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Backup, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Backup to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Backup - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Backup { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - ACTIVE = 2, - DELETING = 3, - ERROR = 4 - } - - /** BackupType enum. */ - enum BackupType { - BACKUP_TYPE_UNSPECIFIED = 0, - SCHEDULED = 1, - ON_DEMAND = 2 - } - - /** Properties of a GCPBackupPlanInfo. */ - interface IGCPBackupPlanInfo { - - /** GCPBackupPlanInfo backupPlan */ - backupPlan?: (string|null); - - /** GCPBackupPlanInfo backupPlanRuleId */ - backupPlanRuleId?: (string|null); - } - - /** Represents a GCPBackupPlanInfo. */ - class GCPBackupPlanInfo implements IGCPBackupPlanInfo { - - /** - * Constructs a new GCPBackupPlanInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo); - - /** GCPBackupPlanInfo backupPlan. */ - public backupPlan: string; - - /** GCPBackupPlanInfo backupPlanRuleId. */ - public backupPlanRuleId: string; - - /** - * Creates a new GCPBackupPlanInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GCPBackupPlanInfo instance - */ - public static create(properties?: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; - - /** - * Encodes the specified GCPBackupPlanInfo message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. - * @param message GCPBackupPlanInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GCPBackupPlanInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. - * @param message GCPBackupPlanInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GCPBackupPlanInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GCPBackupPlanInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; - - /** - * Decodes a GCPBackupPlanInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GCPBackupPlanInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; - - /** - * Verifies a GCPBackupPlanInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GCPBackupPlanInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GCPBackupPlanInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo; - - /** - * Creates a plain object from a GCPBackupPlanInfo message. Also converts values to other types if specified. - * @param message GCPBackupPlanInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GCPBackupPlanInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GCPBackupPlanInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a CreateBackupVaultRequest. */ - interface ICreateBackupVaultRequest { - - /** CreateBackupVaultRequest parent */ - parent?: (string|null); - - /** CreateBackupVaultRequest backupVaultId */ - backupVaultId?: (string|null); - - /** CreateBackupVaultRequest backupVault */ - backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); - - /** CreateBackupVaultRequest requestId */ - requestId?: (string|null); - - /** CreateBackupVaultRequest validateOnly */ - validateOnly?: (boolean|null); - } - - /** Represents a CreateBackupVaultRequest. */ - class CreateBackupVaultRequest implements ICreateBackupVaultRequest { - - /** - * Constructs a new CreateBackupVaultRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ICreateBackupVaultRequest); - - /** CreateBackupVaultRequest parent. */ - public parent: string; - - /** CreateBackupVaultRequest backupVaultId. */ - public backupVaultId: string; - - /** CreateBackupVaultRequest backupVault. */ - public backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); - - /** CreateBackupVaultRequest requestId. */ - public requestId: string; - - /** CreateBackupVaultRequest validateOnly. */ - public validateOnly: boolean; - - /** - * Creates a new CreateBackupVaultRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateBackupVaultRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.ICreateBackupVaultRequest): google.cloud.backupdr.v1.CreateBackupVaultRequest; - - /** - * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. - * @param message CreateBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ICreateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. - * @param message CreateBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ICreateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CreateBackupVaultRequest; - - /** - * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CreateBackupVaultRequest; - - /** - * Verifies a CreateBackupVaultRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateBackupVaultRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CreateBackupVaultRequest; - - /** - * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. - * @param message CreateBackupVaultRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.CreateBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateBackupVaultRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateBackupVaultRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupVaultsRequest. */ - interface IListBackupVaultsRequest { - - /** ListBackupVaultsRequest parent */ - parent?: (string|null); - - /** ListBackupVaultsRequest pageSize */ - pageSize?: (number|null); - - /** ListBackupVaultsRequest pageToken */ - pageToken?: (string|null); - - /** ListBackupVaultsRequest filter */ - filter?: (string|null); - - /** ListBackupVaultsRequest orderBy */ - orderBy?: (string|null); - - /** ListBackupVaultsRequest view */ - view?: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView|null); - } - - /** Represents a ListBackupVaultsRequest. */ - class ListBackupVaultsRequest implements IListBackupVaultsRequest { - - /** - * Constructs a new ListBackupVaultsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupVaultsRequest); - - /** ListBackupVaultsRequest parent. */ - public parent: string; - - /** ListBackupVaultsRequest pageSize. */ - public pageSize: number; - - /** ListBackupVaultsRequest pageToken. */ - public pageToken: string; - - /** ListBackupVaultsRequest filter. */ - public filter: string; - - /** ListBackupVaultsRequest orderBy. */ - public orderBy: string; - - /** ListBackupVaultsRequest view. */ - public view: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView); - - /** - * Creates a new ListBackupVaultsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupVaultsRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupVaultsRequest): google.cloud.backupdr.v1.ListBackupVaultsRequest; - - /** - * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. - * @param message ListBackupVaultsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. - * @param message ListBackupVaultsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupVaultsRequest; - - /** - * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupVaultsRequest; - - /** - * Verifies a ListBackupVaultsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupVaultsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupVaultsRequest; - - /** - * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. - * @param message ListBackupVaultsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupVaultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupVaultsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupVaultsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupVaultsResponse. */ - interface IListBackupVaultsResponse { - - /** ListBackupVaultsResponse backupVaults */ - backupVaults?: (google.cloud.backupdr.v1.IBackupVault[]|null); - - /** ListBackupVaultsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListBackupVaultsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListBackupVaultsResponse. */ - class ListBackupVaultsResponse implements IListBackupVaultsResponse { - - /** - * Constructs a new ListBackupVaultsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupVaultsResponse); - - /** ListBackupVaultsResponse backupVaults. */ - public backupVaults: google.cloud.backupdr.v1.IBackupVault[]; - - /** ListBackupVaultsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListBackupVaultsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListBackupVaultsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupVaultsResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupVaultsResponse): google.cloud.backupdr.v1.ListBackupVaultsResponse; - - /** - * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. - * @param message ListBackupVaultsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. - * @param message ListBackupVaultsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupVaultsResponse; - - /** - * Decodes a ListBackupVaultsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupVaultsResponse; - - /** - * Verifies a ListBackupVaultsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupVaultsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupVaultsResponse; - - /** - * Creates a plain object from a ListBackupVaultsResponse message. Also converts values to other types if specified. - * @param message ListBackupVaultsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupVaultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupVaultsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupVaultsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchUsableBackupVaultsRequest. */ - interface IFetchUsableBackupVaultsRequest { - - /** FetchUsableBackupVaultsRequest parent */ - parent?: (string|null); - - /** FetchUsableBackupVaultsRequest pageSize */ - pageSize?: (number|null); - - /** FetchUsableBackupVaultsRequest pageToken */ - pageToken?: (string|null); - - /** FetchUsableBackupVaultsRequest filter */ - filter?: (string|null); - - /** FetchUsableBackupVaultsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a FetchUsableBackupVaultsRequest. */ - class FetchUsableBackupVaultsRequest implements IFetchUsableBackupVaultsRequest { - - /** - * Constructs a new FetchUsableBackupVaultsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest); - - /** FetchUsableBackupVaultsRequest parent. */ - public parent: string; - - /** FetchUsableBackupVaultsRequest pageSize. */ - public pageSize: number; - - /** FetchUsableBackupVaultsRequest pageToken. */ - public pageToken: string; - - /** FetchUsableBackupVaultsRequest filter. */ - public filter: string; - - /** FetchUsableBackupVaultsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new FetchUsableBackupVaultsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchUsableBackupVaultsRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; - - /** - * Encodes the specified FetchUsableBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. - * @param message FetchUsableBackupVaultsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchUsableBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. - * @param message FetchUsableBackupVaultsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchUsableBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; - - /** - * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchUsableBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; - - /** - * Verifies a FetchUsableBackupVaultsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchUsableBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchUsableBackupVaultsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest; - - /** - * Creates a plain object from a FetchUsableBackupVaultsRequest message. Also converts values to other types if specified. - * @param message FetchUsableBackupVaultsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchUsableBackupVaultsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchUsableBackupVaultsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchUsableBackupVaultsResponse. */ - interface IFetchUsableBackupVaultsResponse { - - /** FetchUsableBackupVaultsResponse backupVaults */ - backupVaults?: (google.cloud.backupdr.v1.IBackupVault[]|null); - - /** FetchUsableBackupVaultsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** FetchUsableBackupVaultsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a FetchUsableBackupVaultsResponse. */ - class FetchUsableBackupVaultsResponse implements IFetchUsableBackupVaultsResponse { - - /** - * Constructs a new FetchUsableBackupVaultsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse); - - /** FetchUsableBackupVaultsResponse backupVaults. */ - public backupVaults: google.cloud.backupdr.v1.IBackupVault[]; - - /** FetchUsableBackupVaultsResponse nextPageToken. */ - public nextPageToken: string; - - /** FetchUsableBackupVaultsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new FetchUsableBackupVaultsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchUsableBackupVaultsResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; - - /** - * Encodes the specified FetchUsableBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. - * @param message FetchUsableBackupVaultsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchUsableBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. - * @param message FetchUsableBackupVaultsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchUsableBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; - - /** - * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchUsableBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; - - /** - * Verifies a FetchUsableBackupVaultsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchUsableBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchUsableBackupVaultsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse; - - /** - * Creates a plain object from a FetchUsableBackupVaultsResponse message. Also converts values to other types if specified. - * @param message FetchUsableBackupVaultsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchUsableBackupVaultsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchUsableBackupVaultsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetBackupVaultRequest. */ - interface IGetBackupVaultRequest { - - /** GetBackupVaultRequest name */ - name?: (string|null); - - /** GetBackupVaultRequest view */ - view?: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView|null); - } - - /** Represents a GetBackupVaultRequest. */ - class GetBackupVaultRequest implements IGetBackupVaultRequest { - - /** - * Constructs a new GetBackupVaultRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetBackupVaultRequest); - - /** GetBackupVaultRequest name. */ - public name: string; - - /** GetBackupVaultRequest view. */ - public view: (google.cloud.backupdr.v1.BackupVaultView|keyof typeof google.cloud.backupdr.v1.BackupVaultView); - - /** - * Creates a new GetBackupVaultRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupVaultRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetBackupVaultRequest): google.cloud.backupdr.v1.GetBackupVaultRequest; - - /** - * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. - * @param message GetBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. - * @param message GetBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetBackupVaultRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupVaultRequest; - - /** - * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupVaultRequest; - - /** - * Verifies a GetBackupVaultRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetBackupVaultRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupVaultRequest; - - /** - * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. - * @param message GetBackupVaultRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetBackupVaultRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetBackupVaultRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateBackupVaultRequest. */ - interface IUpdateBackupVaultRequest { - - /** UpdateBackupVaultRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateBackupVaultRequest backupVault */ - backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); - - /** UpdateBackupVaultRequest requestId */ - requestId?: (string|null); - - /** UpdateBackupVaultRequest validateOnly */ - validateOnly?: (boolean|null); - - /** UpdateBackupVaultRequest force */ - force?: (boolean|null); - } - - /** Represents an UpdateBackupVaultRequest. */ - class UpdateBackupVaultRequest implements IUpdateBackupVaultRequest { - - /** - * Constructs a new UpdateBackupVaultRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IUpdateBackupVaultRequest); - - /** UpdateBackupVaultRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateBackupVaultRequest backupVault. */ - public backupVault?: (google.cloud.backupdr.v1.IBackupVault|null); - - /** UpdateBackupVaultRequest requestId. */ - public requestId: string; - - /** UpdateBackupVaultRequest validateOnly. */ - public validateOnly: boolean; - - /** UpdateBackupVaultRequest force. */ - public force: boolean; - - /** - * Creates a new UpdateBackupVaultRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateBackupVaultRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IUpdateBackupVaultRequest): google.cloud.backupdr.v1.UpdateBackupVaultRequest; - - /** - * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. - * @param message UpdateBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. - * @param message UpdateBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateBackupVaultRequest; - - /** - * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateBackupVaultRequest; - - /** - * Verifies an UpdateBackupVaultRequest message. - * @param message Plain 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 UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateBackupVaultRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateBackupVaultRequest; - - /** - * Creates a plain object from an UpdateBackupVaultRequest message. Also converts values to other types if specified. - * @param message UpdateBackupVaultRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.UpdateBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateBackupVaultRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateBackupVaultRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteBackupVaultRequest. */ - interface IDeleteBackupVaultRequest { - - /** DeleteBackupVaultRequest name */ - name?: (string|null); - - /** DeleteBackupVaultRequest requestId */ - requestId?: (string|null); - - /** DeleteBackupVaultRequest force */ - force?: (boolean|null); - - /** DeleteBackupVaultRequest etag */ - etag?: (string|null); - - /** DeleteBackupVaultRequest validateOnly */ - validateOnly?: (boolean|null); - - /** DeleteBackupVaultRequest allowMissing */ - allowMissing?: (boolean|null); - } - - /** Represents a DeleteBackupVaultRequest. */ - class DeleteBackupVaultRequest implements IDeleteBackupVaultRequest { - - /** - * Constructs a new DeleteBackupVaultRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupVaultRequest); - - /** DeleteBackupVaultRequest name. */ - public name: string; - - /** DeleteBackupVaultRequest requestId. */ - public requestId: string; - - /** DeleteBackupVaultRequest force. */ - public force: boolean; - - /** DeleteBackupVaultRequest etag. */ - public etag: string; - - /** DeleteBackupVaultRequest validateOnly. */ - public validateOnly: boolean; - - /** DeleteBackupVaultRequest allowMissing. */ - public allowMissing: boolean; - - /** - * Creates a new DeleteBackupVaultRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteBackupVaultRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupVaultRequest): google.cloud.backupdr.v1.DeleteBackupVaultRequest; - - /** - * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. - * @param message DeleteBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. - * @param message DeleteBackupVaultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupVaultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupVaultRequest; - - /** - * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupVaultRequest; - - /** - * Verifies a DeleteBackupVaultRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteBackupVaultRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupVaultRequest; - - /** - * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. - * @param message DeleteBackupVaultRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DeleteBackupVaultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteBackupVaultRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteBackupVaultRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDataSourcesRequest. */ - interface IListDataSourcesRequest { - - /** ListDataSourcesRequest parent */ - parent?: (string|null); - - /** ListDataSourcesRequest pageSize */ - pageSize?: (number|null); - - /** ListDataSourcesRequest pageToken */ - pageToken?: (string|null); - - /** ListDataSourcesRequest filter */ - filter?: (string|null); - - /** ListDataSourcesRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListDataSourcesRequest. */ - class ListDataSourcesRequest implements IListDataSourcesRequest { - - /** - * Constructs a new ListDataSourcesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListDataSourcesRequest); - - /** ListDataSourcesRequest parent. */ - public parent: string; - - /** ListDataSourcesRequest pageSize. */ - public pageSize: number; - - /** ListDataSourcesRequest pageToken. */ - public pageToken: string; - - /** ListDataSourcesRequest filter. */ - public filter: string; - - /** ListDataSourcesRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListDataSourcesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDataSourcesRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListDataSourcesRequest): google.cloud.backupdr.v1.ListDataSourcesRequest; - - /** - * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. - * @param message ListDataSourcesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListDataSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. - * @param message ListDataSourcesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListDataSourcesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDataSourcesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDataSourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListDataSourcesRequest; - - /** - * Decodes a ListDataSourcesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDataSourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListDataSourcesRequest; - - /** - * Verifies a ListDataSourcesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDataSourcesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListDataSourcesRequest; - - /** - * Creates a plain object from a ListDataSourcesRequest message. Also converts values to other types if specified. - * @param message ListDataSourcesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListDataSourcesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDataSourcesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDataSourcesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListDataSourcesResponse. */ - interface IListDataSourcesResponse { - - /** ListDataSourcesResponse dataSources */ - dataSources?: (google.cloud.backupdr.v1.IDataSource[]|null); - - /** ListDataSourcesResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListDataSourcesResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListDataSourcesResponse. */ - class ListDataSourcesResponse implements IListDataSourcesResponse { - - /** - * Constructs a new ListDataSourcesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListDataSourcesResponse); - - /** ListDataSourcesResponse dataSources. */ - public dataSources: google.cloud.backupdr.v1.IDataSource[]; - - /** ListDataSourcesResponse nextPageToken. */ - public nextPageToken: string; - - /** ListDataSourcesResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListDataSourcesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListDataSourcesResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListDataSourcesResponse): google.cloud.backupdr.v1.ListDataSourcesResponse; - - /** - * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. - * @param message ListDataSourcesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListDataSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. - * @param message ListDataSourcesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListDataSourcesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListDataSourcesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListDataSourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListDataSourcesResponse; - - /** - * Decodes a ListDataSourcesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListDataSourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListDataSourcesResponse; - - /** - * Verifies a ListDataSourcesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDataSourcesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListDataSourcesResponse; - - /** - * Creates a plain object from a ListDataSourcesResponse message. Also converts values to other types if specified. - * @param message ListDataSourcesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListDataSourcesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListDataSourcesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListDataSourcesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetDataSourceRequest. */ - interface IGetDataSourceRequest { - - /** GetDataSourceRequest name */ - name?: (string|null); - } - - /** Represents a GetDataSourceRequest. */ - class GetDataSourceRequest implements IGetDataSourceRequest { - - /** - * Constructs a new GetDataSourceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetDataSourceRequest); - - /** GetDataSourceRequest name. */ - public name: string; - - /** - * Creates a new GetDataSourceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetDataSourceRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetDataSourceRequest): google.cloud.backupdr.v1.GetDataSourceRequest; - - /** - * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. - * @param message GetDataSourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. - * @param message GetDataSourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetDataSourceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetDataSourceRequest; - - /** - * Decodes a GetDataSourceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetDataSourceRequest; - - /** - * Verifies a GetDataSourceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetDataSourceRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetDataSourceRequest; - - /** - * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. - * @param message GetDataSourceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetDataSourceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetDataSourceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateDataSourceRequest. */ - interface IUpdateDataSourceRequest { - - /** UpdateDataSourceRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateDataSourceRequest dataSource */ - dataSource?: (google.cloud.backupdr.v1.IDataSource|null); - - /** UpdateDataSourceRequest requestId */ - requestId?: (string|null); - - /** UpdateDataSourceRequest allowMissing */ - allowMissing?: (boolean|null); - } - - /** Represents an UpdateDataSourceRequest. */ - class UpdateDataSourceRequest implements IUpdateDataSourceRequest { - - /** - * Constructs a new UpdateDataSourceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IUpdateDataSourceRequest); - - /** UpdateDataSourceRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateDataSourceRequest dataSource. */ - public dataSource?: (google.cloud.backupdr.v1.IDataSource|null); - - /** UpdateDataSourceRequest requestId. */ - public requestId: string; - - /** UpdateDataSourceRequest allowMissing. */ - public allowMissing: boolean; - - /** - * Creates a new UpdateDataSourceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateDataSourceRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IUpdateDataSourceRequest): google.cloud.backupdr.v1.UpdateDataSourceRequest; - - /** - * Encodes the specified UpdateDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. - * @param message UpdateDataSourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IUpdateDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. - * @param message UpdateDataSourceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateDataSourceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateDataSourceRequest; - - /** - * Decodes an UpdateDataSourceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateDataSourceRequest; - - /** - * Verifies an UpdateDataSourceRequest message. - * @param message Plain 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 UpdateDataSourceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateDataSourceRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateDataSourceRequest; - - /** - * Creates a plain object from an UpdateDataSourceRequest message. Also converts values to other types if specified. - * @param message UpdateDataSourceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.UpdateDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateDataSourceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateDataSourceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupsRequest. */ - interface IListBackupsRequest { - - /** ListBackupsRequest parent */ - parent?: (string|null); - - /** ListBackupsRequest pageSize */ - pageSize?: (number|null); - - /** ListBackupsRequest pageToken */ - pageToken?: (string|null); - - /** ListBackupsRequest filter */ - filter?: (string|null); - - /** ListBackupsRequest orderBy */ - orderBy?: (string|null); - - /** ListBackupsRequest view */ - view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); - } - - /** Represents a ListBackupsRequest. */ - class ListBackupsRequest implements IListBackupsRequest { - - /** - * Constructs a new ListBackupsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupsRequest); - - /** ListBackupsRequest parent. */ - public parent: string; - - /** ListBackupsRequest pageSize. */ - public pageSize: number; - - /** ListBackupsRequest pageToken. */ - public pageToken: string; - - /** ListBackupsRequest filter. */ - public filter: string; - - /** ListBackupsRequest orderBy. */ - public orderBy: string; - - /** ListBackupsRequest view. */ - public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); - - /** - * Creates a new ListBackupsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupsRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupsRequest): google.cloud.backupdr.v1.ListBackupsRequest; - - /** - * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. - * @param message ListBackupsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. - * @param message ListBackupsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupsRequest; - - /** - * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupsRequest; - - /** - * Verifies a ListBackupsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupsRequest; - - /** - * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. - * @param message ListBackupsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListBackupsResponse. */ - interface IListBackupsResponse { - - /** ListBackupsResponse backups */ - backups?: (google.cloud.backupdr.v1.IBackup[]|null); - - /** ListBackupsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListBackupsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListBackupsResponse. */ - class ListBackupsResponse implements IListBackupsResponse { - - /** - * Constructs a new ListBackupsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupsResponse); - - /** ListBackupsResponse backups. */ - public backups: google.cloud.backupdr.v1.IBackup[]; - - /** ListBackupsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListBackupsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListBackupsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupsResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupsResponse): google.cloud.backupdr.v1.ListBackupsResponse; - - /** - * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. - * @param message ListBackupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. - * @param message ListBackupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListBackupsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupsResponse; - - /** - * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupsResponse; - - /** - * Verifies a ListBackupsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupsResponse; - - /** - * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. - * @param message ListBackupsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetBackupRequest. */ - interface IGetBackupRequest { - - /** GetBackupRequest name */ - name?: (string|null); - - /** GetBackupRequest view */ - view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); - } - - /** Represents a GetBackupRequest. */ - class GetBackupRequest implements IGetBackupRequest { - - /** - * Constructs a new GetBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetBackupRequest); - - /** GetBackupRequest name. */ - public name: string; - - /** GetBackupRequest view. */ - public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); - - /** - * Creates a new GetBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetBackupRequest): google.cloud.backupdr.v1.GetBackupRequest; - - /** - * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. - * @param message GetBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. - * @param message GetBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupRequest; - - /** - * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupRequest; - - /** - * Verifies a GetBackupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupRequest; - - /** - * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. - * @param message GetBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateBackupRequest. */ - interface IUpdateBackupRequest { - - /** UpdateBackupRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateBackupRequest backup */ - backup?: (google.cloud.backupdr.v1.IBackup|null); - - /** UpdateBackupRequest requestId */ - requestId?: (string|null); - } - - /** Represents an UpdateBackupRequest. */ - class UpdateBackupRequest implements IUpdateBackupRequest { - - /** - * Constructs a new UpdateBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IUpdateBackupRequest); - - /** UpdateBackupRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateBackupRequest backup. */ - public backup?: (google.cloud.backupdr.v1.IBackup|null); - - /** UpdateBackupRequest requestId. */ - public requestId: string; - - /** - * Creates a new UpdateBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IUpdateBackupRequest): google.cloud.backupdr.v1.UpdateBackupRequest; - - /** - * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. - * @param message UpdateBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. - * @param message UpdateBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateBackupRequest; - - /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateBackupRequest; - - /** - * Verifies an UpdateBackupRequest message. - * @param message Plain 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 UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateBackupRequest; - - /** - * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. - * @param message UpdateBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.UpdateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteBackupRequest. */ - interface IDeleteBackupRequest { - - /** DeleteBackupRequest name */ - name?: (string|null); - - /** DeleteBackupRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteBackupRequest. */ - class DeleteBackupRequest implements IDeleteBackupRequest { - - /** - * Constructs a new DeleteBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupRequest); - - /** DeleteBackupRequest name. */ - public name: string; - - /** DeleteBackupRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupRequest): google.cloud.backupdr.v1.DeleteBackupRequest; - - /** - * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. - * @param message DeleteBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. - * @param message DeleteBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupRequest; - - /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupRequest; - - /** - * Verifies a DeleteBackupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupRequest; - - /** - * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. - * @param message DeleteBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DeleteBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RestoreBackupRequest. */ - interface IRestoreBackupRequest { - - /** RestoreBackupRequest name */ - name?: (string|null); - - /** RestoreBackupRequest requestId */ - requestId?: (string|null); - - /** RestoreBackupRequest computeInstanceTargetEnvironment */ - computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null); - - /** RestoreBackupRequest computeInstanceRestoreProperties */ - computeInstanceRestoreProperties?: (google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null); - } - - /** Represents a RestoreBackupRequest. */ - class RestoreBackupRequest implements IRestoreBackupRequest { - - /** - * Constructs a new RestoreBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IRestoreBackupRequest); - - /** RestoreBackupRequest name. */ - public name: string; - - /** RestoreBackupRequest requestId. */ - public requestId: string; - - /** RestoreBackupRequest computeInstanceTargetEnvironment. */ - public computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null); - - /** RestoreBackupRequest computeInstanceRestoreProperties. */ - public computeInstanceRestoreProperties?: (google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null); - - /** RestoreBackupRequest targetEnvironment. */ - public targetEnvironment?: "computeInstanceTargetEnvironment"; - - /** RestoreBackupRequest instanceProperties. */ - public instanceProperties?: "computeInstanceRestoreProperties"; - - /** - * Creates a new RestoreBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RestoreBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IRestoreBackupRequest): google.cloud.backupdr.v1.RestoreBackupRequest; - - /** - * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. - * @param message RestoreBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. - * @param message RestoreBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RestoreBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RestoreBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RestoreBackupRequest; - - /** - * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RestoreBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RestoreBackupRequest; - - /** - * Verifies a RestoreBackupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RestoreBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RestoreBackupRequest; - - /** - * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. - * @param message RestoreBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.RestoreBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RestoreBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RestoreBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RestoreBackupResponse. */ - interface IRestoreBackupResponse { - - /** RestoreBackupResponse targetResource */ - targetResource?: (google.cloud.backupdr.v1.ITargetResource|null); - } - - /** Represents a RestoreBackupResponse. */ - class RestoreBackupResponse implements IRestoreBackupResponse { - - /** - * Constructs a new RestoreBackupResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IRestoreBackupResponse); - - /** RestoreBackupResponse targetResource. */ - public targetResource?: (google.cloud.backupdr.v1.ITargetResource|null); - - /** - * Creates a new RestoreBackupResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns RestoreBackupResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IRestoreBackupResponse): google.cloud.backupdr.v1.RestoreBackupResponse; - - /** - * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. - * @param message RestoreBackupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. - * @param message RestoreBackupResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RestoreBackupResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RestoreBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RestoreBackupResponse; - - /** - * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RestoreBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RestoreBackupResponse; - - /** - * Verifies a RestoreBackupResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RestoreBackupResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RestoreBackupResponse; - - /** - * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. - * @param message RestoreBackupResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.RestoreBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RestoreBackupResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RestoreBackupResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TargetResource. */ - interface ITargetResource { - - /** TargetResource gcpResource */ - gcpResource?: (google.cloud.backupdr.v1.IGcpResource|null); - } - - /** Represents a TargetResource. */ - class TargetResource implements ITargetResource { - - /** - * Constructs a new TargetResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ITargetResource); - - /** TargetResource gcpResource. */ - public gcpResource?: (google.cloud.backupdr.v1.IGcpResource|null); - - /** TargetResource targetResourceInfo. */ - public targetResourceInfo?: "gcpResource"; - - /** - * Creates a new TargetResource instance using the specified properties. - * @param [properties] Properties to set - * @returns TargetResource instance - */ - public static create(properties?: google.cloud.backupdr.v1.ITargetResource): google.cloud.backupdr.v1.TargetResource; - - /** - * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. - * @param message TargetResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. - * @param message TargetResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TargetResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TargetResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.TargetResource; - - /** - * Decodes a TargetResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TargetResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.TargetResource; - - /** - * Verifies a TargetResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TargetResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.TargetResource; - - /** - * Creates a plain object from a TargetResource message. Also converts values to other types if specified. - * @param message TargetResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.TargetResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TargetResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TargetResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GcpResource. */ - interface IGcpResource { - - /** GcpResource gcpResourcename */ - gcpResourcename?: (string|null); - - /** GcpResource location */ - location?: (string|null); - - /** GcpResource type */ - type?: (string|null); - } - - /** Represents a GcpResource. */ - class GcpResource implements IGcpResource { - - /** - * Constructs a new GcpResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGcpResource); - - /** GcpResource gcpResourcename. */ - public gcpResourcename: string; - - /** GcpResource location. */ - public location: string; - - /** GcpResource type. */ - public type: string; - - /** - * Creates a new GcpResource instance using the specified properties. - * @param [properties] Properties to set - * @returns GcpResource instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGcpResource): google.cloud.backupdr.v1.GcpResource; - - /** - * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. - * @param message GcpResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. - * @param message GcpResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GcpResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GcpResource; - - /** - * Decodes a GcpResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GcpResource; - - /** - * Verifies a GcpResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcpResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GcpResource; - - /** - * Creates a plain object from a GcpResource message. Also converts values to other types if specified. - * @param message GcpResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcpResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcpResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** BackupConfigState enum. */ - enum BackupConfigState { - BACKUP_CONFIG_STATE_UNSPECIFIED = 0, - ACTIVE = 1, - PASSIVE = 2 - } - - /** BackupView enum. */ - enum BackupView { - BACKUP_VIEW_UNSPECIFIED = 0, - BACKUP_VIEW_BASIC = 1, - BACKUP_VIEW_FULL = 2 - } - - /** BackupVaultView enum. */ - enum BackupVaultView { - BACKUP_VAULT_VIEW_UNSPECIFIED = 0, - BACKUP_VAULT_VIEW_BASIC = 1, - BACKUP_VAULT_VIEW_FULL = 2 - } - - /** Properties of a BackupApplianceBackupProperties. */ - interface IBackupApplianceBackupProperties { - - /** BackupApplianceBackupProperties generationId */ - generationId?: (number|null); - - /** BackupApplianceBackupProperties finalizeTime */ - finalizeTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties recoveryRangeStartTime */ - recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties recoveryRangeEndTime */ - recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a BackupApplianceBackupProperties. */ - class BackupApplianceBackupProperties implements IBackupApplianceBackupProperties { - - /** - * Constructs a new BackupApplianceBackupProperties. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupProperties); - - /** BackupApplianceBackupProperties generationId. */ - public generationId?: (number|null); - - /** BackupApplianceBackupProperties finalizeTime. */ - public finalizeTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties recoveryRangeStartTime. */ - public recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties recoveryRangeEndTime. */ - public recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties _generationId. */ - public _generationId?: "generationId"; - - /** BackupApplianceBackupProperties _finalizeTime. */ - public _finalizeTime?: "finalizeTime"; - - /** BackupApplianceBackupProperties _recoveryRangeStartTime. */ - public _recoveryRangeStartTime?: "recoveryRangeStartTime"; - - /** BackupApplianceBackupProperties _recoveryRangeEndTime. */ - public _recoveryRangeEndTime?: "recoveryRangeEndTime"; - - /** - * Creates a new BackupApplianceBackupProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns BackupApplianceBackupProperties instance - */ - public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupProperties): google.cloud.backupdr.v1.BackupApplianceBackupProperties; - - /** - * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. - * @param message BackupApplianceBackupProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. - * @param message BackupApplianceBackupProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BackupApplianceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceBackupProperties; - - /** - * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BackupApplianceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceBackupProperties; - - /** - * Verifies a BackupApplianceBackupProperties message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BackupApplianceBackupProperties - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceBackupProperties; - - /** - * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. - * @param message BackupApplianceBackupProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.BackupApplianceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BackupApplianceBackupProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BackupApplianceBackupProperties - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ComputeInstanceBackupProperties. */ - interface IComputeInstanceBackupProperties { - - /** ComputeInstanceBackupProperties description */ - description?: (string|null); - - /** ComputeInstanceBackupProperties tags */ - tags?: (google.cloud.backupdr.v1.ITags|null); - - /** ComputeInstanceBackupProperties machineType */ - machineType?: (string|null); - - /** ComputeInstanceBackupProperties canIpForward */ - canIpForward?: (boolean|null); - - /** ComputeInstanceBackupProperties networkInterface */ - networkInterface?: (google.cloud.backupdr.v1.INetworkInterface[]|null); - - /** ComputeInstanceBackupProperties disk */ - disk?: (google.cloud.backupdr.v1.IAttachedDisk[]|null); - - /** ComputeInstanceBackupProperties metadata */ - metadata?: (google.cloud.backupdr.v1.IMetadata|null); - - /** ComputeInstanceBackupProperties serviceAccount */ - serviceAccount?: (google.cloud.backupdr.v1.IServiceAccount[]|null); - - /** ComputeInstanceBackupProperties scheduling */ - scheduling?: (google.cloud.backupdr.v1.IScheduling|null); - - /** ComputeInstanceBackupProperties guestAccelerator */ - guestAccelerator?: (google.cloud.backupdr.v1.IAcceleratorConfig[]|null); - - /** ComputeInstanceBackupProperties minCpuPlatform */ - minCpuPlatform?: (string|null); - - /** ComputeInstanceBackupProperties keyRevocationActionType */ - keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); - - /** ComputeInstanceBackupProperties sourceInstance */ - sourceInstance?: (string|null); - - /** ComputeInstanceBackupProperties labels */ - labels?: ({ [k: string]: string }|null); - } - - /** Represents a ComputeInstanceBackupProperties. */ - class ComputeInstanceBackupProperties implements IComputeInstanceBackupProperties { - - /** - * Constructs a new ComputeInstanceBackupProperties. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceBackupProperties); - - /** ComputeInstanceBackupProperties description. */ - public description?: (string|null); - - /** ComputeInstanceBackupProperties tags. */ - public tags?: (google.cloud.backupdr.v1.ITags|null); - - /** ComputeInstanceBackupProperties machineType. */ - public machineType?: (string|null); - - /** ComputeInstanceBackupProperties canIpForward. */ - public canIpForward?: (boolean|null); - - /** ComputeInstanceBackupProperties networkInterface. */ - public networkInterface: google.cloud.backupdr.v1.INetworkInterface[]; - - /** ComputeInstanceBackupProperties disk. */ - public disk: google.cloud.backupdr.v1.IAttachedDisk[]; - - /** ComputeInstanceBackupProperties metadata. */ - public metadata?: (google.cloud.backupdr.v1.IMetadata|null); - - /** ComputeInstanceBackupProperties serviceAccount. */ - public serviceAccount: google.cloud.backupdr.v1.IServiceAccount[]; - - /** ComputeInstanceBackupProperties scheduling. */ - public scheduling?: (google.cloud.backupdr.v1.IScheduling|null); - - /** ComputeInstanceBackupProperties guestAccelerator. */ - public guestAccelerator: google.cloud.backupdr.v1.IAcceleratorConfig[]; - - /** ComputeInstanceBackupProperties minCpuPlatform. */ - public minCpuPlatform?: (string|null); - - /** ComputeInstanceBackupProperties keyRevocationActionType. */ - public keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); - - /** ComputeInstanceBackupProperties sourceInstance. */ - public sourceInstance?: (string|null); - - /** ComputeInstanceBackupProperties labels. */ - public labels: { [k: string]: string }; - - /** ComputeInstanceBackupProperties _description. */ - public _description?: "description"; - - /** ComputeInstanceBackupProperties _tags. */ - public _tags?: "tags"; - - /** ComputeInstanceBackupProperties _machineType. */ - public _machineType?: "machineType"; - - /** ComputeInstanceBackupProperties _canIpForward. */ - public _canIpForward?: "canIpForward"; - - /** ComputeInstanceBackupProperties _metadata. */ - public _metadata?: "metadata"; - - /** ComputeInstanceBackupProperties _scheduling. */ - public _scheduling?: "scheduling"; - - /** ComputeInstanceBackupProperties _minCpuPlatform. */ - public _minCpuPlatform?: "minCpuPlatform"; - - /** ComputeInstanceBackupProperties _keyRevocationActionType. */ - public _keyRevocationActionType?: "keyRevocationActionType"; - - /** ComputeInstanceBackupProperties _sourceInstance. */ - public _sourceInstance?: "sourceInstance"; - - /** - * Creates a new ComputeInstanceBackupProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns ComputeInstanceBackupProperties instance - */ - public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceBackupProperties): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; - - /** - * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. - * @param message ComputeInstanceBackupProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. - * @param message ComputeInstanceBackupProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComputeInstanceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; - - /** - * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComputeInstanceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; - - /** - * Verifies a ComputeInstanceBackupProperties message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComputeInstanceBackupProperties - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; - - /** - * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. - * @param message ComputeInstanceBackupProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComputeInstanceBackupProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComputeInstanceBackupProperties - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ComputeInstanceRestoreProperties. */ - interface IComputeInstanceRestoreProperties { - - /** ComputeInstanceRestoreProperties name */ - name?: (string|null); - - /** ComputeInstanceRestoreProperties advancedMachineFeatures */ - advancedMachineFeatures?: (google.cloud.backupdr.v1.IAdvancedMachineFeatures|null); - - /** ComputeInstanceRestoreProperties canIpForward */ - canIpForward?: (boolean|null); - - /** ComputeInstanceRestoreProperties confidentialInstanceConfig */ - confidentialInstanceConfig?: (google.cloud.backupdr.v1.IConfidentialInstanceConfig|null); - - /** ComputeInstanceRestoreProperties deletionProtection */ - deletionProtection?: (boolean|null); - - /** ComputeInstanceRestoreProperties description */ - description?: (string|null); - - /** ComputeInstanceRestoreProperties disks */ - disks?: (google.cloud.backupdr.v1.IAttachedDisk[]|null); - - /** ComputeInstanceRestoreProperties displayDevice */ - displayDevice?: (google.cloud.backupdr.v1.IDisplayDevice|null); - - /** ComputeInstanceRestoreProperties guestAccelerators */ - guestAccelerators?: (google.cloud.backupdr.v1.IAcceleratorConfig[]|null); - - /** ComputeInstanceRestoreProperties hostname */ - hostname?: (string|null); - - /** ComputeInstanceRestoreProperties instanceEncryptionKey */ - instanceEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); - - /** ComputeInstanceRestoreProperties keyRevocationActionType */ - keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); - - /** ComputeInstanceRestoreProperties labels */ - labels?: ({ [k: string]: string }|null); - - /** ComputeInstanceRestoreProperties machineType */ - machineType?: (string|null); - - /** ComputeInstanceRestoreProperties metadata */ - metadata?: (google.cloud.backupdr.v1.IMetadata|null); - - /** ComputeInstanceRestoreProperties minCpuPlatform */ - minCpuPlatform?: (string|null); - - /** ComputeInstanceRestoreProperties networkInterfaces */ - networkInterfaces?: (google.cloud.backupdr.v1.INetworkInterface[]|null); - - /** ComputeInstanceRestoreProperties networkPerformanceConfig */ - networkPerformanceConfig?: (google.cloud.backupdr.v1.INetworkPerformanceConfig|null); - - /** ComputeInstanceRestoreProperties params */ - params?: (google.cloud.backupdr.v1.IInstanceParams|null); - - /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess */ - privateIpv6GoogleAccess?: (google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); - - /** ComputeInstanceRestoreProperties allocationAffinity */ - allocationAffinity?: (google.cloud.backupdr.v1.IAllocationAffinity|null); - - /** ComputeInstanceRestoreProperties resourcePolicies */ - resourcePolicies?: (string[]|null); - - /** ComputeInstanceRestoreProperties scheduling */ - scheduling?: (google.cloud.backupdr.v1.IScheduling|null); - - /** ComputeInstanceRestoreProperties serviceAccounts */ - serviceAccounts?: (google.cloud.backupdr.v1.IServiceAccount[]|null); - - /** ComputeInstanceRestoreProperties tags */ - tags?: (google.cloud.backupdr.v1.ITags|null); - } - - /** Represents a ComputeInstanceRestoreProperties. */ - class ComputeInstanceRestoreProperties implements IComputeInstanceRestoreProperties { - - /** - * Constructs a new ComputeInstanceRestoreProperties. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties); - - /** ComputeInstanceRestoreProperties name. */ - public name?: (string|null); - - /** ComputeInstanceRestoreProperties advancedMachineFeatures. */ - public advancedMachineFeatures?: (google.cloud.backupdr.v1.IAdvancedMachineFeatures|null); - - /** ComputeInstanceRestoreProperties canIpForward. */ - public canIpForward?: (boolean|null); - - /** ComputeInstanceRestoreProperties confidentialInstanceConfig. */ - public confidentialInstanceConfig?: (google.cloud.backupdr.v1.IConfidentialInstanceConfig|null); - - /** ComputeInstanceRestoreProperties deletionProtection. */ - public deletionProtection?: (boolean|null); - - /** ComputeInstanceRestoreProperties description. */ - public description?: (string|null); - - /** ComputeInstanceRestoreProperties disks. */ - public disks: google.cloud.backupdr.v1.IAttachedDisk[]; - - /** ComputeInstanceRestoreProperties displayDevice. */ - public displayDevice?: (google.cloud.backupdr.v1.IDisplayDevice|null); - - /** ComputeInstanceRestoreProperties guestAccelerators. */ - public guestAccelerators: google.cloud.backupdr.v1.IAcceleratorConfig[]; - - /** ComputeInstanceRestoreProperties hostname. */ - public hostname?: (string|null); - - /** ComputeInstanceRestoreProperties instanceEncryptionKey. */ - public instanceEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); - - /** ComputeInstanceRestoreProperties keyRevocationActionType. */ - public keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); - - /** ComputeInstanceRestoreProperties labels. */ - public labels: { [k: string]: string }; - - /** ComputeInstanceRestoreProperties machineType. */ - public machineType?: (string|null); - - /** ComputeInstanceRestoreProperties metadata. */ - public metadata?: (google.cloud.backupdr.v1.IMetadata|null); - - /** ComputeInstanceRestoreProperties minCpuPlatform. */ - public minCpuPlatform?: (string|null); - - /** ComputeInstanceRestoreProperties networkInterfaces. */ - public networkInterfaces: google.cloud.backupdr.v1.INetworkInterface[]; - - /** ComputeInstanceRestoreProperties networkPerformanceConfig. */ - public networkPerformanceConfig?: (google.cloud.backupdr.v1.INetworkPerformanceConfig|null); - - /** ComputeInstanceRestoreProperties params. */ - public params?: (google.cloud.backupdr.v1.IInstanceParams|null); - - /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess. */ - public privateIpv6GoogleAccess?: (google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); - - /** ComputeInstanceRestoreProperties allocationAffinity. */ - public allocationAffinity?: (google.cloud.backupdr.v1.IAllocationAffinity|null); - - /** ComputeInstanceRestoreProperties resourcePolicies. */ - public resourcePolicies: string[]; - - /** ComputeInstanceRestoreProperties scheduling. */ - public scheduling?: (google.cloud.backupdr.v1.IScheduling|null); - - /** ComputeInstanceRestoreProperties serviceAccounts. */ - public serviceAccounts: google.cloud.backupdr.v1.IServiceAccount[]; - - /** ComputeInstanceRestoreProperties tags. */ - public tags?: (google.cloud.backupdr.v1.ITags|null); - - /** ComputeInstanceRestoreProperties _name. */ - public _name?: "name"; - - /** ComputeInstanceRestoreProperties _advancedMachineFeatures. */ - public _advancedMachineFeatures?: "advancedMachineFeatures"; - - /** ComputeInstanceRestoreProperties _canIpForward. */ - public _canIpForward?: "canIpForward"; - - /** ComputeInstanceRestoreProperties _confidentialInstanceConfig. */ - public _confidentialInstanceConfig?: "confidentialInstanceConfig"; - - /** ComputeInstanceRestoreProperties _deletionProtection. */ - public _deletionProtection?: "deletionProtection"; - - /** ComputeInstanceRestoreProperties _description. */ - public _description?: "description"; - - /** ComputeInstanceRestoreProperties _displayDevice. */ - public _displayDevice?: "displayDevice"; - - /** ComputeInstanceRestoreProperties _hostname. */ - public _hostname?: "hostname"; - - /** ComputeInstanceRestoreProperties _instanceEncryptionKey. */ - public _instanceEncryptionKey?: "instanceEncryptionKey"; - - /** ComputeInstanceRestoreProperties _keyRevocationActionType. */ - public _keyRevocationActionType?: "keyRevocationActionType"; - - /** ComputeInstanceRestoreProperties _machineType. */ - public _machineType?: "machineType"; - - /** ComputeInstanceRestoreProperties _metadata. */ - public _metadata?: "metadata"; - - /** ComputeInstanceRestoreProperties _minCpuPlatform. */ - public _minCpuPlatform?: "minCpuPlatform"; - - /** ComputeInstanceRestoreProperties _networkPerformanceConfig. */ - public _networkPerformanceConfig?: "networkPerformanceConfig"; - - /** ComputeInstanceRestoreProperties _params. */ - public _params?: "params"; - - /** ComputeInstanceRestoreProperties _privateIpv6GoogleAccess. */ - public _privateIpv6GoogleAccess?: "privateIpv6GoogleAccess"; - - /** ComputeInstanceRestoreProperties _allocationAffinity. */ - public _allocationAffinity?: "allocationAffinity"; - - /** ComputeInstanceRestoreProperties _scheduling. */ - public _scheduling?: "scheduling"; - - /** ComputeInstanceRestoreProperties _tags. */ - public _tags?: "tags"; - - /** - * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns ComputeInstanceRestoreProperties instance - */ - public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; - - /** - * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. - * @param message ComputeInstanceRestoreProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. - * @param message ComputeInstanceRestoreProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComputeInstanceRestoreProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; - - /** - * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComputeInstanceRestoreProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; - - /** - * Verifies a ComputeInstanceRestoreProperties message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComputeInstanceRestoreProperties - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; - - /** - * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. - * @param message ComputeInstanceRestoreProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceRestoreProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComputeInstanceRestoreProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComputeInstanceRestoreProperties - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ComputeInstanceRestoreProperties { - - /** InstancePrivateIpv6GoogleAccess enum. */ - enum InstancePrivateIpv6GoogleAccess { - INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0, - INHERIT_FROM_SUBNETWORK = 1, - ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2, - ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3 - } - } - - /** Properties of a ComputeInstanceTargetEnvironment. */ - interface IComputeInstanceTargetEnvironment { - - /** ComputeInstanceTargetEnvironment project */ - project?: (string|null); - - /** ComputeInstanceTargetEnvironment zone */ - zone?: (string|null); - } - - /** Represents a ComputeInstanceTargetEnvironment. */ - class ComputeInstanceTargetEnvironment implements IComputeInstanceTargetEnvironment { - - /** - * Constructs a new ComputeInstanceTargetEnvironment. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment); - - /** ComputeInstanceTargetEnvironment project. */ - public project: string; - - /** ComputeInstanceTargetEnvironment zone. */ - public zone: string; - - /** - * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. - * @param [properties] Properties to set - * @returns ComputeInstanceTargetEnvironment instance - */ - public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; - - /** - * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. - * @param message ComputeInstanceTargetEnvironment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. - * @param message ComputeInstanceTargetEnvironment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComputeInstanceTargetEnvironment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; - - /** - * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComputeInstanceTargetEnvironment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; - - /** - * Verifies a ComputeInstanceTargetEnvironment message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComputeInstanceTargetEnvironment - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; - - /** - * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. - * @param message ComputeInstanceTargetEnvironment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComputeInstanceTargetEnvironment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComputeInstanceTargetEnvironment - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ComputeInstanceDataSourceProperties. */ - interface IComputeInstanceDataSourceProperties { - - /** ComputeInstanceDataSourceProperties name */ - name?: (string|null); - - /** ComputeInstanceDataSourceProperties description */ - description?: (string|null); - - /** ComputeInstanceDataSourceProperties machineType */ - machineType?: (string|null); - - /** ComputeInstanceDataSourceProperties totalDiskCount */ - totalDiskCount?: (number|Long|string|null); - - /** ComputeInstanceDataSourceProperties totalDiskSizeGb */ - totalDiskSizeGb?: (number|Long|string|null); - } - - /** Represents a ComputeInstanceDataSourceProperties. */ - class ComputeInstanceDataSourceProperties implements IComputeInstanceDataSourceProperties { - - /** - * Constructs a new ComputeInstanceDataSourceProperties. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties); - - /** ComputeInstanceDataSourceProperties name. */ - public name: string; - - /** ComputeInstanceDataSourceProperties description. */ - public description: string; - - /** ComputeInstanceDataSourceProperties machineType. */ - public machineType: string; - - /** ComputeInstanceDataSourceProperties totalDiskCount. */ - public totalDiskCount: (number|Long|string); - - /** ComputeInstanceDataSourceProperties totalDiskSizeGb. */ - public totalDiskSizeGb: (number|Long|string); - - /** - * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns ComputeInstanceDataSourceProperties instance - */ - public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; - - /** - * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. - * @param message ComputeInstanceDataSourceProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. - * @param message ComputeInstanceDataSourceProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComputeInstanceDataSourceProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; - - /** - * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComputeInstanceDataSourceProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; - - /** - * Verifies a ComputeInstanceDataSourceProperties message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComputeInstanceDataSourceProperties - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; - - /** - * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. - * @param message ComputeInstanceDataSourceProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComputeInstanceDataSourceProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComputeInstanceDataSourceProperties - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AdvancedMachineFeatures. */ - interface IAdvancedMachineFeatures { - - /** AdvancedMachineFeatures enableNestedVirtualization */ - enableNestedVirtualization?: (boolean|null); - - /** AdvancedMachineFeatures threadsPerCore */ - threadsPerCore?: (number|null); - - /** AdvancedMachineFeatures visibleCoreCount */ - visibleCoreCount?: (number|null); - - /** AdvancedMachineFeatures enableUefiNetworking */ - enableUefiNetworking?: (boolean|null); - } - - /** Represents an AdvancedMachineFeatures. */ - class AdvancedMachineFeatures implements IAdvancedMachineFeatures { - - /** - * Constructs a new AdvancedMachineFeatures. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAdvancedMachineFeatures); - - /** AdvancedMachineFeatures enableNestedVirtualization. */ - public enableNestedVirtualization?: (boolean|null); - - /** AdvancedMachineFeatures threadsPerCore. */ - public threadsPerCore?: (number|null); - - /** AdvancedMachineFeatures visibleCoreCount. */ - public visibleCoreCount?: (number|null); - - /** AdvancedMachineFeatures enableUefiNetworking. */ - public enableUefiNetworking?: (boolean|null); - - /** AdvancedMachineFeatures _enableNestedVirtualization. */ - public _enableNestedVirtualization?: "enableNestedVirtualization"; - - /** AdvancedMachineFeatures _threadsPerCore. */ - public _threadsPerCore?: "threadsPerCore"; - - /** AdvancedMachineFeatures _visibleCoreCount. */ - public _visibleCoreCount?: "visibleCoreCount"; - - /** AdvancedMachineFeatures _enableUefiNetworking. */ - public _enableUefiNetworking?: "enableUefiNetworking"; - - /** - * Creates a new AdvancedMachineFeatures instance using the specified properties. - * @param [properties] Properties to set - * @returns AdvancedMachineFeatures instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAdvancedMachineFeatures): google.cloud.backupdr.v1.AdvancedMachineFeatures; - - /** - * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. - * @param message AdvancedMachineFeatures message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. - * @param message AdvancedMachineFeatures message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AdvancedMachineFeatures; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AdvancedMachineFeatures; - - /** - * Verifies an AdvancedMachineFeatures message. - * @param message Plain 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 AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AdvancedMachineFeatures - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AdvancedMachineFeatures; - - /** - * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. - * @param message AdvancedMachineFeatures - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AdvancedMachineFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AdvancedMachineFeatures to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AdvancedMachineFeatures - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ConfidentialInstanceConfig. */ - interface IConfidentialInstanceConfig { - - /** ConfidentialInstanceConfig enableConfidentialCompute */ - enableConfidentialCompute?: (boolean|null); - } - - /** Represents a ConfidentialInstanceConfig. */ - class ConfidentialInstanceConfig implements IConfidentialInstanceConfig { - - /** - * Constructs a new ConfidentialInstanceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IConfidentialInstanceConfig); - - /** ConfidentialInstanceConfig enableConfidentialCompute. */ - public enableConfidentialCompute?: (boolean|null); - - /** ConfidentialInstanceConfig _enableConfidentialCompute. */ - public _enableConfidentialCompute?: "enableConfidentialCompute"; - - /** - * Creates a new ConfidentialInstanceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfidentialInstanceConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.IConfidentialInstanceConfig): google.cloud.backupdr.v1.ConfidentialInstanceConfig; - - /** - * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. - * @param message ConfidentialInstanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. - * @param message ConfidentialInstanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfidentialInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ConfidentialInstanceConfig; - - /** - * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfidentialInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ConfidentialInstanceConfig; - - /** - * Verifies a ConfidentialInstanceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfidentialInstanceConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ConfidentialInstanceConfig; - - /** - * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. - * @param message ConfidentialInstanceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ConfidentialInstanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConfidentialInstanceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConfidentialInstanceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DisplayDevice. */ - interface IDisplayDevice { - - /** DisplayDevice enableDisplay */ - enableDisplay?: (boolean|null); - } - - /** Represents a DisplayDevice. */ - class DisplayDevice implements IDisplayDevice { - - /** - * Constructs a new DisplayDevice. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDisplayDevice); - - /** DisplayDevice enableDisplay. */ - public enableDisplay?: (boolean|null); - - /** DisplayDevice _enableDisplay. */ - public _enableDisplay?: "enableDisplay"; - - /** - * Creates a new DisplayDevice instance using the specified properties. - * @param [properties] Properties to set - * @returns DisplayDevice instance - */ - public static create(properties?: google.cloud.backupdr.v1.IDisplayDevice): google.cloud.backupdr.v1.DisplayDevice; - - /** - * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. - * @param message DisplayDevice message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. - * @param message DisplayDevice message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DisplayDevice message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DisplayDevice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DisplayDevice; - - /** - * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DisplayDevice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DisplayDevice; - - /** - * Verifies a DisplayDevice message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DisplayDevice - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DisplayDevice; - - /** - * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. - * @param message DisplayDevice - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.DisplayDevice, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DisplayDevice to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DisplayDevice - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AcceleratorConfig. */ - interface IAcceleratorConfig { - - /** AcceleratorConfig acceleratorType */ - acceleratorType?: (string|null); - - /** AcceleratorConfig acceleratorCount */ - acceleratorCount?: (number|null); - } - - /** Represents an AcceleratorConfig. */ - class AcceleratorConfig implements IAcceleratorConfig { - - /** - * Constructs a new AcceleratorConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAcceleratorConfig); - - /** AcceleratorConfig acceleratorType. */ - public acceleratorType?: (string|null); - - /** AcceleratorConfig acceleratorCount. */ - public acceleratorCount?: (number|null); - - /** AcceleratorConfig _acceleratorType. */ - public _acceleratorType?: "acceleratorType"; - - /** AcceleratorConfig _acceleratorCount. */ - public _acceleratorCount?: "acceleratorCount"; - - /** - * Creates a new AcceleratorConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AcceleratorConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAcceleratorConfig): google.cloud.backupdr.v1.AcceleratorConfig; - - /** - * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. - * @param message AcceleratorConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. - * @param message AcceleratorConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AcceleratorConfig; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AcceleratorConfig; - - /** - * Verifies an AcceleratorConfig message. - * @param message Plain 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 AcceleratorConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AcceleratorConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AcceleratorConfig; - - /** - * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. - * @param message AcceleratorConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AcceleratorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AcceleratorConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AcceleratorConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CustomerEncryptionKey. */ - interface ICustomerEncryptionKey { - - /** CustomerEncryptionKey rawKey */ - rawKey?: (string|null); - - /** CustomerEncryptionKey rsaEncryptedKey */ - rsaEncryptedKey?: (string|null); - - /** CustomerEncryptionKey kmsKeyName */ - kmsKeyName?: (string|null); - - /** CustomerEncryptionKey kmsKeyServiceAccount */ - kmsKeyServiceAccount?: (string|null); - } - - /** Represents a CustomerEncryptionKey. */ - class CustomerEncryptionKey implements ICustomerEncryptionKey { - - /** - * Constructs a new CustomerEncryptionKey. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ICustomerEncryptionKey); - - /** CustomerEncryptionKey rawKey. */ - public rawKey?: (string|null); - - /** CustomerEncryptionKey rsaEncryptedKey. */ - public rsaEncryptedKey?: (string|null); - - /** CustomerEncryptionKey kmsKeyName. */ - public kmsKeyName?: (string|null); - - /** CustomerEncryptionKey kmsKeyServiceAccount. */ - public kmsKeyServiceAccount?: (string|null); - - /** CustomerEncryptionKey key. */ - public key?: ("rawKey"|"rsaEncryptedKey"|"kmsKeyName"); - - /** CustomerEncryptionKey _kmsKeyServiceAccount. */ - public _kmsKeyServiceAccount?: "kmsKeyServiceAccount"; - - /** - * Creates a new CustomerEncryptionKey instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomerEncryptionKey instance - */ - public static create(properties?: google.cloud.backupdr.v1.ICustomerEncryptionKey): google.cloud.backupdr.v1.CustomerEncryptionKey; - - /** - * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. - * @param message CustomerEncryptionKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. - * @param message CustomerEncryptionKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomerEncryptionKey message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomerEncryptionKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CustomerEncryptionKey; - - /** - * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomerEncryptionKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CustomerEncryptionKey; - - /** - * Verifies a CustomerEncryptionKey message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomerEncryptionKey - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CustomerEncryptionKey; - - /** - * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. - * @param message CustomerEncryptionKey - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.CustomerEncryptionKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomerEncryptionKey to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomerEncryptionKey - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Entry. */ - interface IEntry { - - /** Entry key */ - key?: (string|null); - - /** Entry value */ - value?: (string|null); - } - - /** Represents an Entry. */ - class Entry implements IEntry { - - /** - * Constructs a new Entry. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IEntry); - - /** Entry key. */ - public key?: (string|null); - - /** Entry value. */ - public value?: (string|null); - - /** Entry _key. */ - public _key?: "key"; - - /** Entry _value. */ - public _value?: "value"; - - /** - * Creates a new Entry instance using the specified properties. - * @param [properties] Properties to set - * @returns Entry instance - */ - public static create(properties?: google.cloud.backupdr.v1.IEntry): google.cloud.backupdr.v1.Entry; - - /** - * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. - * @param message Entry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. - * @param message Entry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Entry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Entry; - - /** - * Decodes an Entry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Entry; - - /** - * Verifies an Entry message. - * @param message Plain 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 Entry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Entry - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Entry; - - /** - * Creates a plain object from an Entry message. Also converts values to other types if specified. - * @param message Entry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Entry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Entry - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Metadata. */ - interface IMetadata { - - /** Metadata items */ - items?: (google.cloud.backupdr.v1.IEntry[]|null); - } - - /** Represents a Metadata. */ - class Metadata implements IMetadata { - - /** - * Constructs a new Metadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IMetadata); - - /** Metadata items. */ - public items: google.cloud.backupdr.v1.IEntry[]; - - /** - * Creates a new Metadata instance using the specified properties. - * @param [properties] Properties to set - * @returns Metadata instance - */ - public static create(properties?: google.cloud.backupdr.v1.IMetadata): google.cloud.backupdr.v1.Metadata; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Metadata; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Metadata; - - /** - * Verifies a Metadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Metadata - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Metadata; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @param message Metadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Metadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NetworkInterface. */ - interface INetworkInterface { - - /** NetworkInterface network */ - network?: (string|null); - - /** NetworkInterface subnetwork */ - subnetwork?: (string|null); - - /** NetworkInterface ipAddress */ - ipAddress?: (string|null); - - /** NetworkInterface ipv6Address */ - ipv6Address?: (string|null); - - /** NetworkInterface internalIpv6PrefixLength */ - internalIpv6PrefixLength?: (number|null); - - /** NetworkInterface name */ - name?: (string|null); - - /** NetworkInterface accessConfigs */ - accessConfigs?: (google.cloud.backupdr.v1.IAccessConfig[]|null); - - /** NetworkInterface ipv6AccessConfigs */ - ipv6AccessConfigs?: (google.cloud.backupdr.v1.IAccessConfig[]|null); - - /** NetworkInterface aliasIpRanges */ - aliasIpRanges?: (google.cloud.backupdr.v1.IAliasIpRange[]|null); - - /** NetworkInterface stackType */ - stackType?: (google.cloud.backupdr.v1.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.StackType|null); - - /** NetworkInterface ipv6AccessType */ - ipv6AccessType?: (google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null); - - /** NetworkInterface queueCount */ - queueCount?: (number|null); - - /** NetworkInterface nicType */ - nicType?: (google.cloud.backupdr.v1.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.NicType|null); - - /** NetworkInterface networkAttachment */ - networkAttachment?: (string|null); - } - - /** Represents a NetworkInterface. */ - class NetworkInterface implements INetworkInterface { - - /** - * Constructs a new NetworkInterface. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.INetworkInterface); - - /** NetworkInterface network. */ - public network?: (string|null); - - /** NetworkInterface subnetwork. */ - public subnetwork?: (string|null); - - /** NetworkInterface ipAddress. */ - public ipAddress?: (string|null); - - /** NetworkInterface ipv6Address. */ - public ipv6Address?: (string|null); - - /** NetworkInterface internalIpv6PrefixLength. */ - public internalIpv6PrefixLength?: (number|null); - - /** NetworkInterface name. */ - public name?: (string|null); - - /** NetworkInterface accessConfigs. */ - public accessConfigs: google.cloud.backupdr.v1.IAccessConfig[]; - - /** NetworkInterface ipv6AccessConfigs. */ - public ipv6AccessConfigs: google.cloud.backupdr.v1.IAccessConfig[]; - - /** NetworkInterface aliasIpRanges. */ - public aliasIpRanges: google.cloud.backupdr.v1.IAliasIpRange[]; - - /** NetworkInterface stackType. */ - public stackType?: (google.cloud.backupdr.v1.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.StackType|null); - - /** NetworkInterface ipv6AccessType. */ - public ipv6AccessType?: (google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null); - - /** NetworkInterface queueCount. */ - public queueCount?: (number|null); - - /** NetworkInterface nicType. */ - public nicType?: (google.cloud.backupdr.v1.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.NicType|null); - - /** NetworkInterface networkAttachment. */ - public networkAttachment?: (string|null); - - /** NetworkInterface _network. */ - public _network?: "network"; - - /** NetworkInterface _subnetwork. */ - public _subnetwork?: "subnetwork"; - - /** NetworkInterface _ipAddress. */ - public _ipAddress?: "ipAddress"; - - /** NetworkInterface _ipv6Address. */ - public _ipv6Address?: "ipv6Address"; - - /** NetworkInterface _internalIpv6PrefixLength. */ - public _internalIpv6PrefixLength?: "internalIpv6PrefixLength"; - - /** NetworkInterface _name. */ - public _name?: "name"; - - /** NetworkInterface _stackType. */ - public _stackType?: "stackType"; - - /** NetworkInterface _ipv6AccessType. */ - public _ipv6AccessType?: "ipv6AccessType"; - - /** NetworkInterface _queueCount. */ - public _queueCount?: "queueCount"; - - /** NetworkInterface _nicType. */ - public _nicType?: "nicType"; - - /** NetworkInterface _networkAttachment. */ - public _networkAttachment?: "networkAttachment"; - - /** - * Creates a new NetworkInterface instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkInterface instance - */ - public static create(properties?: google.cloud.backupdr.v1.INetworkInterface): google.cloud.backupdr.v1.NetworkInterface; - - /** - * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. - * @param message NetworkInterface message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. - * @param message NetworkInterface message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkInterface message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkInterface - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkInterface; - - /** - * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkInterface - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkInterface; - - /** - * Verifies a NetworkInterface message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkInterface - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkInterface; - - /** - * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. - * @param message NetworkInterface - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.NetworkInterface, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkInterface to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkInterface - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NetworkInterface { - - /** StackType enum. */ - enum StackType { - STACK_TYPE_UNSPECIFIED = 0, - IPV4_ONLY = 1, - IPV4_IPV6 = 2 - } - - /** Ipv6AccessType enum. */ - enum Ipv6AccessType { - UNSPECIFIED_IPV6_ACCESS_TYPE = 0, - INTERNAL = 1, - EXTERNAL = 2 - } - - /** NicType enum. */ - enum NicType { - NIC_TYPE_UNSPECIFIED = 0, - VIRTIO_NET = 1, - GVNIC = 2 - } - } - - /** Properties of a NetworkPerformanceConfig. */ - interface INetworkPerformanceConfig { - - /** NetworkPerformanceConfig totalEgressBandwidthTier */ - totalEgressBandwidthTier?: (google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null); - } - - /** Represents a NetworkPerformanceConfig. */ - class NetworkPerformanceConfig implements INetworkPerformanceConfig { - - /** - * Constructs a new NetworkPerformanceConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.INetworkPerformanceConfig); - - /** NetworkPerformanceConfig totalEgressBandwidthTier. */ - public totalEgressBandwidthTier?: (google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null); - - /** NetworkPerformanceConfig _totalEgressBandwidthTier. */ - public _totalEgressBandwidthTier?: "totalEgressBandwidthTier"; - - /** - * Creates a new NetworkPerformanceConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkPerformanceConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.INetworkPerformanceConfig): google.cloud.backupdr.v1.NetworkPerformanceConfig; - - /** - * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. - * @param message NetworkPerformanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. - * @param message NetworkPerformanceConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkPerformanceConfig; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkPerformanceConfig; - - /** - * Verifies a NetworkPerformanceConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkPerformanceConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkPerformanceConfig; - - /** - * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. - * @param message NetworkPerformanceConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.NetworkPerformanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkPerformanceConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkPerformanceConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NetworkPerformanceConfig { - - /** Tier enum. */ - enum Tier { - TIER_UNSPECIFIED = 0, - DEFAULT = 1, - TIER_1 = 2 - } - } - - /** Properties of an AccessConfig. */ - interface IAccessConfig { - - /** AccessConfig type */ - type?: (google.cloud.backupdr.v1.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1.AccessConfig.AccessType|null); - - /** AccessConfig name */ - name?: (string|null); - - /** AccessConfig externalIp */ - externalIp?: (string|null); - - /** AccessConfig externalIpv6 */ - externalIpv6?: (string|null); - - /** AccessConfig externalIpv6PrefixLength */ - externalIpv6PrefixLength?: (number|null); - - /** AccessConfig setPublicPtr */ - setPublicPtr?: (boolean|null); - - /** AccessConfig publicPtrDomainName */ - publicPtrDomainName?: (string|null); - - /** AccessConfig networkTier */ - networkTier?: (google.cloud.backupdr.v1.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1.AccessConfig.NetworkTier|null); - } - - /** Represents an AccessConfig. */ - class AccessConfig implements IAccessConfig { - - /** - * Constructs a new AccessConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAccessConfig); - - /** AccessConfig type. */ - public type?: (google.cloud.backupdr.v1.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1.AccessConfig.AccessType|null); - - /** AccessConfig name. */ - public name?: (string|null); - - /** AccessConfig externalIp. */ - public externalIp?: (string|null); - - /** AccessConfig externalIpv6. */ - public externalIpv6?: (string|null); - - /** AccessConfig externalIpv6PrefixLength. */ - public externalIpv6PrefixLength?: (number|null); - - /** AccessConfig setPublicPtr. */ - public setPublicPtr?: (boolean|null); - - /** AccessConfig publicPtrDomainName. */ - public publicPtrDomainName?: (string|null); - - /** AccessConfig networkTier. */ - public networkTier?: (google.cloud.backupdr.v1.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1.AccessConfig.NetworkTier|null); - - /** AccessConfig _type. */ - public _type?: "type"; - - /** AccessConfig _name. */ - public _name?: "name"; - - /** AccessConfig _externalIp. */ - public _externalIp?: "externalIp"; - - /** AccessConfig _externalIpv6. */ - public _externalIpv6?: "externalIpv6"; - - /** AccessConfig _externalIpv6PrefixLength. */ - public _externalIpv6PrefixLength?: "externalIpv6PrefixLength"; - - /** AccessConfig _setPublicPtr. */ - public _setPublicPtr?: "setPublicPtr"; - - /** AccessConfig _publicPtrDomainName. */ - public _publicPtrDomainName?: "publicPtrDomainName"; - - /** AccessConfig _networkTier. */ - public _networkTier?: "networkTier"; - - /** - * Creates a new AccessConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AccessConfig instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAccessConfig): google.cloud.backupdr.v1.AccessConfig; - - /** - * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. - * @param message AccessConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. - * @param message AccessConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AccessConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AccessConfig; - - /** - * Decodes an AccessConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AccessConfig; - - /** - * Verifies an AccessConfig message. - * @param message Plain 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 AccessConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AccessConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AccessConfig; - - /** - * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. - * @param message AccessConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AccessConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AccessConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AccessConfig { - - /** AccessType enum. */ - enum AccessType { - ACCESS_TYPE_UNSPECIFIED = 0, - ONE_TO_ONE_NAT = 1, - DIRECT_IPV6 = 2 - } - - /** NetworkTier enum. */ - enum NetworkTier { - NETWORK_TIER_UNSPECIFIED = 0, - PREMIUM = 1, - STANDARD = 2 - } - } - - /** Properties of an AliasIpRange. */ - interface IAliasIpRange { - - /** AliasIpRange ipCidrRange */ - ipCidrRange?: (string|null); - - /** AliasIpRange subnetworkRangeName */ - subnetworkRangeName?: (string|null); - } - - /** Represents an AliasIpRange. */ - class AliasIpRange implements IAliasIpRange { - - /** - * Constructs a new AliasIpRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAliasIpRange); - - /** AliasIpRange ipCidrRange. */ - public ipCidrRange?: (string|null); - - /** AliasIpRange subnetworkRangeName. */ - public subnetworkRangeName?: (string|null); - - /** AliasIpRange _ipCidrRange. */ - public _ipCidrRange?: "ipCidrRange"; - - /** AliasIpRange _subnetworkRangeName. */ - public _subnetworkRangeName?: "subnetworkRangeName"; - - /** - * Creates a new AliasIpRange instance using the specified properties. - * @param [properties] Properties to set - * @returns AliasIpRange instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAliasIpRange): google.cloud.backupdr.v1.AliasIpRange; - - /** - * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. - * @param message AliasIpRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. - * @param message AliasIpRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AliasIpRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AliasIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AliasIpRange; - - /** - * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AliasIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AliasIpRange; - - /** - * Verifies an AliasIpRange message. - * @param message Plain 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 AliasIpRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AliasIpRange - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AliasIpRange; - - /** - * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. - * @param message AliasIpRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AliasIpRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AliasIpRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AliasIpRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an InstanceParams. */ - interface IInstanceParams { - - /** InstanceParams resourceManagerTags */ - resourceManagerTags?: ({ [k: string]: string }|null); - } - - /** Represents an InstanceParams. */ - class InstanceParams implements IInstanceParams { - - /** - * Constructs a new InstanceParams. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IInstanceParams); - - /** InstanceParams resourceManagerTags. */ - public resourceManagerTags: { [k: string]: string }; - - /** - * Creates a new InstanceParams instance using the specified properties. - * @param [properties] Properties to set - * @returns InstanceParams instance - */ - public static create(properties?: google.cloud.backupdr.v1.IInstanceParams): google.cloud.backupdr.v1.InstanceParams; - - /** - * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. - * @param message InstanceParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. - * @param message InstanceParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InstanceParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InstanceParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InstanceParams; - - /** - * Decodes an InstanceParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InstanceParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InstanceParams; - - /** - * Verifies an InstanceParams message. - * @param message Plain 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 InstanceParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InstanceParams - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InstanceParams; - - /** - * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. - * @param message InstanceParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.InstanceParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InstanceParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InstanceParams - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AllocationAffinity. */ - interface IAllocationAffinity { - - /** AllocationAffinity consumeAllocationType */ - consumeAllocationType?: (google.cloud.backupdr.v1.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1.AllocationAffinity.Type|null); - - /** AllocationAffinity key */ - key?: (string|null); - - /** AllocationAffinity values */ - values?: (string[]|null); - } - - /** Represents an AllocationAffinity. */ - class AllocationAffinity implements IAllocationAffinity { - - /** - * Constructs a new AllocationAffinity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAllocationAffinity); - - /** AllocationAffinity consumeAllocationType. */ - public consumeAllocationType?: (google.cloud.backupdr.v1.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1.AllocationAffinity.Type|null); - - /** AllocationAffinity key. */ - public key?: (string|null); - - /** AllocationAffinity values. */ - public values: string[]; - - /** AllocationAffinity _consumeAllocationType. */ - public _consumeAllocationType?: "consumeAllocationType"; - - /** AllocationAffinity _key. */ - public _key?: "key"; - - /** - * Creates a new AllocationAffinity instance using the specified properties. - * @param [properties] Properties to set - * @returns AllocationAffinity instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAllocationAffinity): google.cloud.backupdr.v1.AllocationAffinity; - - /** - * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. - * @param message AllocationAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. - * @param message AllocationAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AllocationAffinity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AllocationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AllocationAffinity; - - /** - * Decodes an AllocationAffinity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AllocationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AllocationAffinity; - - /** - * Verifies an AllocationAffinity message. - * @param message Plain 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 AllocationAffinity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AllocationAffinity - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AllocationAffinity; - - /** - * Creates a plain object from an AllocationAffinity message. Also converts values to other types if specified. - * @param message AllocationAffinity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AllocationAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AllocationAffinity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AllocationAffinity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AllocationAffinity { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - NO_RESERVATION = 1, - ANY_RESERVATION = 2, - SPECIFIC_RESERVATION = 3 - } - } - - /** Properties of a Scheduling. */ - interface IScheduling { - - /** Scheduling onHostMaintenance */ - onHostMaintenance?: (google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null); - - /** Scheduling automaticRestart */ - automaticRestart?: (boolean|null); - - /** Scheduling preemptible */ - preemptible?: (boolean|null); - - /** Scheduling nodeAffinities */ - nodeAffinities?: (google.cloud.backupdr.v1.Scheduling.INodeAffinity[]|null); - - /** Scheduling minNodeCpus */ - minNodeCpus?: (number|null); - - /** Scheduling provisioningModel */ - provisioningModel?: (google.cloud.backupdr.v1.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null); - - /** Scheduling instanceTerminationAction */ - instanceTerminationAction?: (google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null); - - /** Scheduling localSsdRecoveryTimeout */ - localSsdRecoveryTimeout?: (google.cloud.backupdr.v1.ISchedulingDuration|null); - } - - /** Represents a Scheduling. */ - class Scheduling implements IScheduling { - - /** - * Constructs a new Scheduling. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IScheduling); - - /** Scheduling onHostMaintenance. */ - public onHostMaintenance?: (google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null); - - /** Scheduling automaticRestart. */ - public automaticRestart?: (boolean|null); - - /** Scheduling preemptible. */ - public preemptible?: (boolean|null); - - /** Scheduling nodeAffinities. */ - public nodeAffinities: google.cloud.backupdr.v1.Scheduling.INodeAffinity[]; - - /** Scheduling minNodeCpus. */ - public minNodeCpus?: (number|null); - - /** Scheduling provisioningModel. */ - public provisioningModel?: (google.cloud.backupdr.v1.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null); - - /** Scheduling instanceTerminationAction. */ - public instanceTerminationAction?: (google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null); - - /** Scheduling localSsdRecoveryTimeout. */ - public localSsdRecoveryTimeout?: (google.cloud.backupdr.v1.ISchedulingDuration|null); - - /** Scheduling _onHostMaintenance. */ - public _onHostMaintenance?: "onHostMaintenance"; - - /** Scheduling _automaticRestart. */ - public _automaticRestart?: "automaticRestart"; - - /** Scheduling _preemptible. */ - public _preemptible?: "preemptible"; - - /** Scheduling _minNodeCpus. */ - public _minNodeCpus?: "minNodeCpus"; - - /** Scheduling _provisioningModel. */ - public _provisioningModel?: "provisioningModel"; - - /** Scheduling _instanceTerminationAction. */ - public _instanceTerminationAction?: "instanceTerminationAction"; - - /** Scheduling _localSsdRecoveryTimeout. */ - public _localSsdRecoveryTimeout?: "localSsdRecoveryTimeout"; - - /** - * Creates a new Scheduling instance using the specified properties. - * @param [properties] Properties to set - * @returns Scheduling instance - */ - public static create(properties?: google.cloud.backupdr.v1.IScheduling): google.cloud.backupdr.v1.Scheduling; - - /** - * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. - * @param message Scheduling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. - * @param message Scheduling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Scheduling message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Scheduling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Scheduling; - - /** - * Decodes a Scheduling message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Scheduling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Scheduling; - - /** - * Verifies a Scheduling message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Scheduling - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Scheduling; - - /** - * Creates a plain object from a Scheduling message. Also converts values to other types if specified. - * @param message Scheduling - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Scheduling, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Scheduling to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Scheduling - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Scheduling { - - /** OnHostMaintenance enum. */ - enum OnHostMaintenance { - ON_HOST_MAINTENANCE_UNSPECIFIED = 0, - TERMINATE = 1, - MIGRATE = 1000 - } - - /** Properties of a NodeAffinity. */ - interface INodeAffinity { - - /** NodeAffinity key */ - key?: (string|null); - - /** NodeAffinity operator */ - operator?: (google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null); - - /** NodeAffinity values */ - values?: (string[]|null); - } - - /** Represents a NodeAffinity. */ - class NodeAffinity implements INodeAffinity { - - /** - * Constructs a new NodeAffinity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.Scheduling.INodeAffinity); - - /** NodeAffinity key. */ - public key?: (string|null); - - /** NodeAffinity operator. */ - public operator?: (google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null); - - /** NodeAffinity values. */ - public values: string[]; - - /** NodeAffinity _key. */ - public _key?: "key"; - - /** NodeAffinity _operator. */ - public _operator?: "operator"; - - /** - * Creates a new NodeAffinity instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeAffinity instance - */ - public static create(properties?: google.cloud.backupdr.v1.Scheduling.INodeAffinity): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - - /** - * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. - * @param message NodeAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. - * @param message NodeAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - - /** - * Verifies a NodeAffinity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeAffinity - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - - /** - * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. - * @param message NodeAffinity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Scheduling.NodeAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeAffinity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeAffinity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NodeAffinity { - - /** Operator enum. */ - enum Operator { - OPERATOR_UNSPECIFIED = 0, - IN = 1, - NOT_IN = 2 - } - } - - /** ProvisioningModel enum. */ - enum ProvisioningModel { - PROVISIONING_MODEL_UNSPECIFIED = 0, - STANDARD = 1, - SPOT = 2 - } - - /** InstanceTerminationAction enum. */ - enum InstanceTerminationAction { - INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0, - DELETE = 1, - STOP = 2 - } - } - - /** Properties of a SchedulingDuration. */ - interface ISchedulingDuration { - - /** SchedulingDuration seconds */ - seconds?: (number|Long|string|null); - - /** SchedulingDuration nanos */ - nanos?: (number|null); - } - - /** Represents a SchedulingDuration. */ - class SchedulingDuration implements ISchedulingDuration { - - /** - * Constructs a new SchedulingDuration. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ISchedulingDuration); - - /** SchedulingDuration seconds. */ - public seconds?: (number|Long|string|null); - - /** SchedulingDuration nanos. */ - public nanos?: (number|null); - - /** SchedulingDuration _seconds. */ - public _seconds?: "seconds"; - - /** SchedulingDuration _nanos. */ - public _nanos?: "nanos"; - - /** - * Creates a new SchedulingDuration instance using the specified properties. - * @param [properties] Properties to set - * @returns SchedulingDuration instance - */ - public static create(properties?: google.cloud.backupdr.v1.ISchedulingDuration): google.cloud.backupdr.v1.SchedulingDuration; - - /** - * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. - * @param message SchedulingDuration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. - * @param message SchedulingDuration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SchedulingDuration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SchedulingDuration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SchedulingDuration; - - /** - * Decodes a SchedulingDuration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SchedulingDuration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SchedulingDuration; - - /** - * Verifies a SchedulingDuration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SchedulingDuration - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SchedulingDuration; - - /** - * Creates a plain object from a SchedulingDuration message. Also converts values to other types if specified. - * @param message SchedulingDuration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.SchedulingDuration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SchedulingDuration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SchedulingDuration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceAccount. */ - interface IServiceAccount { - - /** ServiceAccount email */ - email?: (string|null); - - /** ServiceAccount scopes */ - scopes?: (string[]|null); - } - - /** Represents a ServiceAccount. */ - class ServiceAccount implements IServiceAccount { - - /** - * Constructs a new ServiceAccount. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IServiceAccount); - - /** ServiceAccount email. */ - public email?: (string|null); - - /** ServiceAccount scopes. */ - public scopes: string[]; - - /** ServiceAccount _email. */ - public _email?: "email"; - - /** - * Creates a new ServiceAccount instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceAccount instance - */ - public static create(properties?: google.cloud.backupdr.v1.IServiceAccount): google.cloud.backupdr.v1.ServiceAccount; - - /** - * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. - * @param message ServiceAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. - * @param message ServiceAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ServiceAccount; - - /** - * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ServiceAccount; - - /** - * Verifies a ServiceAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceAccount - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ServiceAccount; - - /** - * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. - * @param message ServiceAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ServiceAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceAccount - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Tags. */ - interface ITags { - - /** Tags items */ - items?: (string[]|null); - } - - /** Represents a Tags. */ - class Tags implements ITags { - - /** - * Constructs a new Tags. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ITags); - - /** Tags items. */ - public items: string[]; - - /** - * Creates a new Tags instance using the specified properties. - * @param [properties] Properties to set - * @returns Tags instance - */ - public static create(properties?: google.cloud.backupdr.v1.ITags): google.cloud.backupdr.v1.Tags; - - /** - * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. - * @param message Tags message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ITags, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. - * @param message Tags message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ITags, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Tags message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Tags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Tags; - - /** - * Decodes a Tags message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Tags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Tags; - - /** - * Verifies a Tags message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Tags message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Tags - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Tags; - - /** - * Creates a plain object from a Tags message. Also converts values to other types if specified. - * @param message Tags - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Tags, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Tags to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Tags - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AttachedDisk. */ - interface IAttachedDisk { - - /** AttachedDisk initializeParams */ - initializeParams?: (google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null); - - /** AttachedDisk deviceName */ - deviceName?: (string|null); - - /** AttachedDisk kind */ - kind?: (string|null); - - /** AttachedDisk diskTypeDeprecated */ - diskTypeDeprecated?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); - - /** AttachedDisk mode */ - mode?: (google.cloud.backupdr.v1.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskMode|null); - - /** AttachedDisk source */ - source?: (string|null); - - /** AttachedDisk index */ - index?: (number|Long|string|null); - - /** AttachedDisk boot */ - boot?: (boolean|null); - - /** AttachedDisk autoDelete */ - autoDelete?: (boolean|null); - - /** AttachedDisk license */ - license?: (string[]|null); - - /** AttachedDisk diskInterface */ - diskInterface?: (google.cloud.backupdr.v1.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null); - - /** AttachedDisk guestOsFeature */ - guestOsFeature?: (google.cloud.backupdr.v1.IGuestOsFeature[]|null); - - /** AttachedDisk diskEncryptionKey */ - diskEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); - - /** AttachedDisk diskSizeGb */ - diskSizeGb?: (number|Long|string|null); - - /** AttachedDisk savedState */ - savedState?: (google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null); - - /** AttachedDisk diskType */ - diskType?: (string|null); - - /** AttachedDisk type */ - type?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); - } - - /** Represents an AttachedDisk. */ - class AttachedDisk implements IAttachedDisk { - - /** - * Constructs a new AttachedDisk. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAttachedDisk); - - /** AttachedDisk initializeParams. */ - public initializeParams?: (google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null); - - /** AttachedDisk deviceName. */ - public deviceName?: (string|null); - - /** AttachedDisk kind. */ - public kind?: (string|null); - - /** AttachedDisk diskTypeDeprecated. */ - public diskTypeDeprecated?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); - - /** AttachedDisk mode. */ - public mode?: (google.cloud.backupdr.v1.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskMode|null); - - /** AttachedDisk source. */ - public source?: (string|null); - - /** AttachedDisk index. */ - public index?: (number|Long|string|null); - - /** AttachedDisk boot. */ - public boot?: (boolean|null); - - /** AttachedDisk autoDelete. */ - public autoDelete?: (boolean|null); - - /** AttachedDisk license. */ - public license: string[]; - - /** AttachedDisk diskInterface. */ - public diskInterface?: (google.cloud.backupdr.v1.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null); - - /** AttachedDisk guestOsFeature. */ - public guestOsFeature: google.cloud.backupdr.v1.IGuestOsFeature[]; - - /** AttachedDisk diskEncryptionKey. */ - public diskEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); - - /** AttachedDisk diskSizeGb. */ - public diskSizeGb?: (number|Long|string|null); - - /** AttachedDisk savedState. */ - public savedState?: (google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null); - - /** AttachedDisk diskType. */ - public diskType?: (string|null); - - /** AttachedDisk type. */ - public type?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); - - /** AttachedDisk _initializeParams. */ - public _initializeParams?: "initializeParams"; - - /** AttachedDisk _deviceName. */ - public _deviceName?: "deviceName"; - - /** AttachedDisk _kind. */ - public _kind?: "kind"; - - /** AttachedDisk _diskTypeDeprecated. */ - public _diskTypeDeprecated?: "diskTypeDeprecated"; - - /** AttachedDisk _mode. */ - public _mode?: "mode"; - - /** AttachedDisk _source. */ - public _source?: "source"; - - /** AttachedDisk _index. */ - public _index?: "index"; - - /** AttachedDisk _boot. */ - public _boot?: "boot"; - - /** AttachedDisk _autoDelete. */ - public _autoDelete?: "autoDelete"; - - /** AttachedDisk _diskInterface. */ - public _diskInterface?: "diskInterface"; - - /** AttachedDisk _diskEncryptionKey. */ - public _diskEncryptionKey?: "diskEncryptionKey"; - - /** AttachedDisk _diskSizeGb. */ - public _diskSizeGb?: "diskSizeGb"; - - /** AttachedDisk _savedState. */ - public _savedState?: "savedState"; - - /** AttachedDisk _diskType. */ - public _diskType?: "diskType"; - - /** AttachedDisk _type. */ - public _type?: "type"; - - /** - * Creates a new AttachedDisk instance using the specified properties. - * @param [properties] Properties to set - * @returns AttachedDisk instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAttachedDisk): google.cloud.backupdr.v1.AttachedDisk; - - /** - * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. - * @param message AttachedDisk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. - * @param message AttachedDisk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AttachedDisk message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AttachedDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AttachedDisk; - - /** - * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AttachedDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AttachedDisk; - - /** - * Verifies an AttachedDisk message. - * @param message Plain 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 AttachedDisk message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AttachedDisk - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AttachedDisk; - - /** - * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. - * @param message AttachedDisk - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AttachedDisk, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AttachedDisk to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AttachedDisk - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AttachedDisk { - - /** Properties of an InitializeParams. */ - interface IInitializeParams { - - /** InitializeParams diskName */ - diskName?: (string|null); - - /** InitializeParams replicaZones */ - replicaZones?: (string[]|null); - } - - /** Represents an InitializeParams. */ - class InitializeParams implements IInitializeParams { - - /** - * Constructs a new InitializeParams. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams); - - /** InitializeParams diskName. */ - public diskName?: (string|null); - - /** InitializeParams replicaZones. */ - public replicaZones: string[]; - - /** InitializeParams _diskName. */ - public _diskName?: "diskName"; - - /** - * Creates a new InitializeParams instance using the specified properties. - * @param [properties] Properties to set - * @returns InitializeParams instance - */ - public static create(properties?: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; - - /** - * Encodes the specified InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. - * @param message InitializeParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. - * @param message InitializeParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InitializeParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InitializeParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; - - /** - * Decodes an InitializeParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InitializeParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; - - /** - * Verifies an InitializeParams message. - * @param message Plain 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 InitializeParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InitializeParams - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; - - /** - * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. - * @param message InitializeParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AttachedDisk.InitializeParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InitializeParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InitializeParams - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** DiskType enum. */ - enum DiskType { - DISK_TYPE_UNSPECIFIED = 0, - SCRATCH = 1, - PERSISTENT = 2 - } - - /** DiskMode enum. */ - enum DiskMode { - DISK_MODE_UNSPECIFIED = 0, - READ_WRITE = 1, - READ_ONLY = 2, - LOCKED = 3 - } - - /** DiskInterface enum. */ - enum DiskInterface { - DISK_INTERFACE_UNSPECIFIED = 0, - SCSI = 1, - NVME = 2, - NVDIMM = 3, - ISCSI = 4 - } - - /** DiskSavedState enum. */ - enum DiskSavedState { - DISK_SAVED_STATE_UNSPECIFIED = 0, - PRESERVED = 1 - } - } - - /** Properties of a GuestOsFeature. */ - interface IGuestOsFeature { - - /** GuestOsFeature type */ - type?: (google.cloud.backupdr.v1.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null); - } - - /** Represents a GuestOsFeature. */ - class GuestOsFeature implements IGuestOsFeature { - - /** - * Constructs a new GuestOsFeature. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGuestOsFeature); - - /** GuestOsFeature type. */ - public type?: (google.cloud.backupdr.v1.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null); - - /** GuestOsFeature _type. */ - public _type?: "type"; - - /** - * Creates a new GuestOsFeature instance using the specified properties. - * @param [properties] Properties to set - * @returns GuestOsFeature instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGuestOsFeature): google.cloud.backupdr.v1.GuestOsFeature; - - /** - * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. - * @param message GuestOsFeature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. - * @param message GuestOsFeature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GuestOsFeature message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GuestOsFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GuestOsFeature; - - /** - * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GuestOsFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GuestOsFeature; - - /** - * Verifies a GuestOsFeature message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GuestOsFeature - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GuestOsFeature; - - /** - * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. - * @param message GuestOsFeature - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GuestOsFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GuestOsFeature to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GuestOsFeature - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GuestOsFeature { - - /** FeatureType enum. */ - enum FeatureType { - FEATURE_TYPE_UNSPECIFIED = 0, - VIRTIO_SCSI_MULTIQUEUE = 1, - WINDOWS = 2, - MULTI_IP_SUBNET = 3, - UEFI_COMPATIBLE = 4, - SECURE_BOOT = 5, - GVNIC = 6, - SEV_CAPABLE = 7, - BARE_METAL_LINUX_COMPATIBLE = 8, - SUSPEND_RESUME_COMPATIBLE = 9, - SEV_LIVE_MIGRATABLE = 10, - SEV_SNP_CAPABLE = 11, - TDX_CAPABLE = 12, - IDPF = 13, - SEV_LIVE_MIGRATABLE_V2 = 14 - } - } - - /** KeyRevocationActionType enum. */ - enum KeyRevocationActionType { - KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0, - NONE = 1, - STOP = 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 FieldInfo. */ - interface IFieldInfo { - - /** FieldInfo format */ - format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); - } - - /** Represents a FieldInfo. */ - class FieldInfo implements IFieldInfo { - - /** - * Constructs a new FieldInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IFieldInfo); - - /** FieldInfo format. */ - public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); - - /** - * Creates a new FieldInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldInfo instance - */ - public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; - - /** - * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @param message FieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @param message FieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldInfo - * @throws {Error} If the payload is not 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.FieldInfo; - - /** - * Decodes a FieldInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldInfo - * @throws {Error} If the payload 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.FieldInfo; - - /** - * Verifies a FieldInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldInfo - */ - public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; - - /** - * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. - * @param message FieldInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldInfo { - - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - UUID4 = 1, - IPV4 = 2, - IPV6 = 3, - IPV4_OR_IPV6 = 4 - } - } - - /** 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.fieldInfo */ - ".google.api.fieldInfo"?: (google.api.IFieldInfo|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 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; - } - - /** 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 DoubleValue. */ - interface IDoubleValue { - - /** DoubleValue value */ - value?: (number|null); - } - - /** Represents a DoubleValue. */ - class DoubleValue implements IDoubleValue { - - /** - * Constructs a new DoubleValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDoubleValue); - - /** DoubleValue value. */ - public value: number; - - /** - * Creates a new DoubleValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DoubleValue instance - */ - public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; - - /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DoubleValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DoubleValue - * @throws {Error} If the payload is not 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.DoubleValue; - - /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DoubleValue - * @throws {Error} If the payload 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.DoubleValue; - - /** - * Verifies a DoubleValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DoubleValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; - - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @param message DoubleValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DoubleValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DoubleValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FloatValue. */ - interface IFloatValue { - - /** FloatValue value */ - value?: (number|null); - } - - /** Represents a FloatValue. */ - class FloatValue implements IFloatValue { - - /** - * Constructs a new FloatValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFloatValue); - - /** FloatValue value. */ - public value: number; - - /** - * Creates a new FloatValue instance using the specified properties. - * @param [properties] Properties to set - * @returns FloatValue instance - */ - public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; - - /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FloatValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FloatValue - * @throws {Error} If the payload is not 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.FloatValue; - - /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FloatValue - * @throws {Error} If the payload 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.FloatValue; - - /** - * Verifies a FloatValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FloatValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; - - /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @param message FloatValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FloatValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FloatValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Int64Value. */ - interface IInt64Value { - - /** Int64Value value */ - value?: (number|Long|string|null); - } - - /** Represents an Int64Value. */ - class Int64Value implements IInt64Value { - - /** - * Constructs a new Int64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt64Value); - - /** Int64Value value. */ - public value: (number|Long|string); - - /** - * Creates a new Int64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int64Value instance - */ - public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; - - /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Int64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int64Value - * @throws {Error} If the payload is not 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.Int64Value; - - /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int64Value - * @throws {Error} If the payload 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.Int64Value; - - /** - * Verifies an Int64Value message. - * @param message Plain 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 Int64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; - - /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @param message Int64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Int64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Int64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UInt64Value. */ - interface IUInt64Value { - - /** UInt64Value value */ - value?: (number|Long|string|null); - } - - /** Represents a UInt64Value. */ - class UInt64Value implements IUInt64Value { - - /** - * Constructs a new UInt64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt64Value); - - /** UInt64Value value. */ - public value: (number|Long|string); - - /** - * Creates a new UInt64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt64Value instance - */ - public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; - - /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UInt64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt64Value - * @throws {Error} If the payload is not 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.UInt64Value; - - /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt64Value - * @throws {Error} If the payload 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.UInt64Value; - - /** - * Verifies a UInt64Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; - - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @param message UInt64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UInt64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UInt64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Int32Value. */ - interface IInt32Value { - - /** Int32Value value */ - value?: (number|null); - } - - /** Represents an Int32Value. */ - class Int32Value implements IInt32Value { - - /** - * Constructs a new Int32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt32Value); - - /** Int32Value value. */ - public value: number; - - /** - * Creates a new Int32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int32Value instance - */ - public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; - - /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Int32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int32Value - * @throws {Error} If the payload is not 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.Int32Value; - - /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int32Value - * @throws {Error} If the payload 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.Int32Value; - - /** - * Verifies an Int32Value message. - * @param message Plain 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 Int32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; - - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @param message Int32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Int32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Int32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UInt32Value. */ - interface IUInt32Value { - - /** UInt32Value value */ - value?: (number|null); - } - - /** Represents a UInt32Value. */ - class UInt32Value implements IUInt32Value { - - /** - * Constructs a new UInt32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt32Value); - - /** UInt32Value value. */ - public value: number; - - /** - * Creates a new UInt32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt32Value instance - */ - public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; - - /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UInt32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt32Value - * @throws {Error} If the payload is not 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.UInt32Value; - - /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt32Value - * @throws {Error} If the payload 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.UInt32Value; - - /** - * Verifies a UInt32Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; - - /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @param message UInt32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UInt32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UInt32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BoolValue. */ - interface IBoolValue { - - /** BoolValue value */ - value?: (boolean|null); - } - - /** Represents a BoolValue. */ - class BoolValue implements IBoolValue { - - /** - * Constructs a new BoolValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBoolValue); - - /** BoolValue value. */ - public value: boolean; - - /** - * Creates a new BoolValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BoolValue instance - */ - public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; - - /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BoolValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BoolValue - * @throws {Error} If the payload is not 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.BoolValue; - - /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BoolValue - * @throws {Error} If the payload 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.BoolValue; - - /** - * Verifies a BoolValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BoolValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; - - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @param message BoolValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BoolValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BoolValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StringValue. */ - interface IStringValue { - - /** StringValue value */ - value?: (string|null); - } - - /** Represents a StringValue. */ - class StringValue implements IStringValue { - - /** - * Constructs a new StringValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStringValue); - - /** StringValue value. */ - public value: string; - - /** - * Creates a new StringValue instance using the specified properties. - * @param [properties] Properties to set - * @returns StringValue instance - */ - public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; - - /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StringValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringValue - * @throws {Error} If the payload is not 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.StringValue; - - /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringValue - * @throws {Error} If the payload 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.StringValue; - - /** - * Verifies a StringValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; - - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @param message StringValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StringValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StringValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BytesValue. */ - interface IBytesValue { - - /** BytesValue value */ - value?: (Uint8Array|string|null); - } - - /** Represents a BytesValue. */ - class BytesValue implements IBytesValue { - - /** - * Constructs a new BytesValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBytesValue); - - /** BytesValue value. */ - public value: (Uint8Array|string); - - /** - * Creates a new BytesValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BytesValue instance - */ - public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; - - /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BytesValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BytesValue - * @throws {Error} If the payload is not 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.BytesValue; - - /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BytesValue - * @throws {Error} If the payload 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.BytesValue; - - /** - * Verifies a BytesValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BytesValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; - - /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. - * @param message BytesValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BytesValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BytesValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace type. */ - namespace type { - - /** DayOfWeek enum. */ - enum DayOfWeek { - DAY_OF_WEEK_UNSPECIFIED = 0, - MONDAY = 1, - TUESDAY = 2, - WEDNESDAY = 3, - THURSDAY = 4, - FRIDAY = 5, - SATURDAY = 6, - SUNDAY = 7 - } - - /** Month enum. */ - enum Month { - MONTH_UNSPECIFIED = 0, - JANUARY = 1, - FEBRUARY = 2, - MARCH = 3, - APRIL = 4, - MAY = 5, - JUNE = 6, - JULY = 7, - AUGUST = 8, - SEPTEMBER = 9, - OCTOBER = 10, - NOVEMBER = 11, - DECEMBER = 12 - } - } - - /** 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; - } - } - - /** 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; - } - } -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js deleted file mode 100644 index e55e559d6fb..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.js +++ /dev/null @@ -1,55595 +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. - -/*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_backupdr_protos || ($protobuf.roots._google_cloud_backupdr_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.backupdr = (function() { - - /** - * Namespace backupdr. - * @memberof google.cloud - * @namespace - */ - var backupdr = {}; - - backupdr.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.cloud.backupdr - * @namespace - */ - var v1 = {}; - - v1.BackupDR = (function() { - - /** - * Constructs a new BackupDR service. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupDR - * @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 BackupDR(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (BackupDR.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = BackupDR; - - /** - * Creates new BackupDR service using the specified rpc implementation. - * @function create - * @memberof google.cloud.backupdr.v1.BackupDR - * @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 {BackupDR} RPC service. Useful where requests and/or responses are streamed. - */ - BackupDR.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listManagementServers}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef ListManagementServersCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ListManagementServersResponse} [response] ListManagementServersResponse - */ - - /** - * Calls ListManagementServers. - * @function listManagementServers - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListManagementServersRequest} request ListManagementServersRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.ListManagementServersCallback} callback Node-style callback called with the error, if any, and ListManagementServersResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.listManagementServers = function listManagementServers(request, callback) { - return this.rpcCall(listManagementServers, $root.google.cloud.backupdr.v1.ListManagementServersRequest, $root.google.cloud.backupdr.v1.ListManagementServersResponse, request, callback); - }, "name", { value: "ListManagementServers" }); - - /** - * Calls ListManagementServers. - * @function listManagementServers - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListManagementServersRequest} request ListManagementServersRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getManagementServer}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef GetManagementServerCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ManagementServer} [response] ManagementServer - */ - - /** - * Calls GetManagementServer. - * @function getManagementServer - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} request GetManagementServerRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.GetManagementServerCallback} callback Node-style callback called with the error, if any, and ManagementServer - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.getManagementServer = function getManagementServer(request, callback) { - return this.rpcCall(getManagementServer, $root.google.cloud.backupdr.v1.GetManagementServerRequest, $root.google.cloud.backupdr.v1.ManagementServer, request, callback); - }, "name", { value: "GetManagementServer" }); - - /** - * Calls GetManagementServer. - * @function getManagementServer - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} request GetManagementServerRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createManagementServer}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef CreateManagementServerCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateManagementServer. - * @function createManagementServer - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} request CreateManagementServerRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.CreateManagementServerCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.createManagementServer = function createManagementServer(request, callback) { - return this.rpcCall(createManagementServer, $root.google.cloud.backupdr.v1.CreateManagementServerRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateManagementServer" }); - - /** - * Calls CreateManagementServer. - * @function createManagementServer - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} request CreateManagementServerRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteManagementServer}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef DeleteManagementServerCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteManagementServer. - * @function deleteManagementServer - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} request DeleteManagementServerRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.DeleteManagementServerCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.deleteManagementServer = function deleteManagementServer(request, callback) { - return this.rpcCall(deleteManagementServer, $root.google.cloud.backupdr.v1.DeleteManagementServerRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteManagementServer" }); - - /** - * Calls DeleteManagementServer. - * @function deleteManagementServer - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} request DeleteManagementServerRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupVault}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef CreateBackupVaultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateBackupVault. - * @function createBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} request CreateBackupVaultRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.createBackupVault = function createBackupVault(request, callback) { - return this.rpcCall(createBackupVault, $root.google.cloud.backupdr.v1.CreateBackupVaultRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateBackupVault" }); - - /** - * Calls CreateBackupVault. - * @function createBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} request CreateBackupVaultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupVaults}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef ListBackupVaultsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ListBackupVaultsResponse} [response] ListBackupVaultsResponse - */ - - /** - * Calls ListBackupVaults. - * @function listBackupVaults - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} request ListBackupVaultsRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.ListBackupVaultsCallback} callback Node-style callback called with the error, if any, and ListBackupVaultsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.listBackupVaults = function listBackupVaults(request, callback) { - return this.rpcCall(listBackupVaults, $root.google.cloud.backupdr.v1.ListBackupVaultsRequest, $root.google.cloud.backupdr.v1.ListBackupVaultsResponse, request, callback); - }, "name", { value: "ListBackupVaults" }); - - /** - * Calls ListBackupVaults. - * @function listBackupVaults - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} request ListBackupVaultsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchUsableBackupVaults}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef FetchUsableBackupVaultsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} [response] FetchUsableBackupVaultsResponse - */ - - /** - * Calls FetchUsableBackupVaults. - * @function fetchUsableBackupVaults - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} request FetchUsableBackupVaultsRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaultsCallback} callback Node-style callback called with the error, if any, and FetchUsableBackupVaultsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.fetchUsableBackupVaults = function fetchUsableBackupVaults(request, callback) { - return this.rpcCall(fetchUsableBackupVaults, $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest, $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse, request, callback); - }, "name", { value: "FetchUsableBackupVaults" }); - - /** - * Calls FetchUsableBackupVaults. - * @function fetchUsableBackupVaults - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} request FetchUsableBackupVaultsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupVault}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef GetBackupVaultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.BackupVault} [response] BackupVault - */ - - /** - * Calls GetBackupVault. - * @function getBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} request GetBackupVaultRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.GetBackupVaultCallback} callback Node-style callback called with the error, if any, and BackupVault - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.getBackupVault = function getBackupVault(request, callback) { - return this.rpcCall(getBackupVault, $root.google.cloud.backupdr.v1.GetBackupVaultRequest, $root.google.cloud.backupdr.v1.BackupVault, request, callback); - }, "name", { value: "GetBackupVault" }); - - /** - * Calls GetBackupVault. - * @function getBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} request GetBackupVaultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackupVault}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef UpdateBackupVaultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateBackupVault. - * @function updateBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} request UpdateBackupVaultRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.UpdateBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.updateBackupVault = function updateBackupVault(request, callback) { - return this.rpcCall(updateBackupVault, $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateBackupVault" }); - - /** - * Calls UpdateBackupVault. - * @function updateBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} request UpdateBackupVaultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupVault}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef DeleteBackupVaultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteBackupVault. - * @function deleteBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} request DeleteBackupVaultRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupVaultCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.deleteBackupVault = function deleteBackupVault(request, callback) { - return this.rpcCall(deleteBackupVault, $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteBackupVault" }); - - /** - * Calls DeleteBackupVault. - * @function deleteBackupVault - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} request DeleteBackupVaultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listDataSources}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef ListDataSourcesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ListDataSourcesResponse} [response] ListDataSourcesResponse - */ - - /** - * Calls ListDataSources. - * @function listDataSources - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} request ListDataSourcesRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.ListDataSourcesCallback} callback Node-style callback called with the error, if any, and ListDataSourcesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.listDataSources = function listDataSources(request, callback) { - return this.rpcCall(listDataSources, $root.google.cloud.backupdr.v1.ListDataSourcesRequest, $root.google.cloud.backupdr.v1.ListDataSourcesResponse, request, callback); - }, "name", { value: "ListDataSources" }); - - /** - * Calls ListDataSources. - * @function listDataSources - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} request ListDataSourcesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getDataSource}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef GetDataSourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.DataSource} [response] DataSource - */ - - /** - * Calls GetDataSource. - * @function getDataSource - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} request GetDataSourceRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.GetDataSourceCallback} callback Node-style callback called with the error, if any, and DataSource - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.getDataSource = function getDataSource(request, callback) { - return this.rpcCall(getDataSource, $root.google.cloud.backupdr.v1.GetDataSourceRequest, $root.google.cloud.backupdr.v1.DataSource, request, callback); - }, "name", { value: "GetDataSource" }); - - /** - * Calls GetDataSource. - * @function getDataSource - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} request GetDataSourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateDataSource}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef UpdateDataSourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateDataSource. - * @function updateDataSource - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} request UpdateDataSourceRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.UpdateDataSourceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.updateDataSource = function updateDataSource(request, callback) { - return this.rpcCall(updateDataSource, $root.google.cloud.backupdr.v1.UpdateDataSourceRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateDataSource" }); - - /** - * Calls UpdateDataSource. - * @function updateDataSource - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} request UpdateDataSourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackups}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef ListBackupsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ListBackupsResponse} [response] ListBackupsResponse - */ - - /** - * Calls ListBackups. - * @function listBackups - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupsRequest} request ListBackupsRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.ListBackupsCallback} callback Node-style callback called with the error, if any, and ListBackupsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.listBackups = function listBackups(request, callback) { - return this.rpcCall(listBackups, $root.google.cloud.backupdr.v1.ListBackupsRequest, $root.google.cloud.backupdr.v1.ListBackupsResponse, request, callback); - }, "name", { value: "ListBackups" }); - - /** - * Calls ListBackups. - * @function listBackups - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupsRequest} request ListBackupsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef GetBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.Backup} [response] Backup - */ - - /** - * Calls GetBackup. - * @function getBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupRequest} request GetBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.GetBackupCallback} callback Node-style callback called with the error, if any, and Backup - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.getBackup = function getBackup(request, callback) { - return this.rpcCall(getBackup, $root.google.cloud.backupdr.v1.GetBackupRequest, $root.google.cloud.backupdr.v1.Backup, request, callback); - }, "name", { value: "GetBackup" }); - - /** - * Calls GetBackup. - * @function getBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupRequest} request GetBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|updateBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef UpdateBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateBackup. - * @function updateBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} request UpdateBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.UpdateBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.updateBackup = function updateBackup(request, callback) { - return this.rpcCall(updateBackup, $root.google.cloud.backupdr.v1.UpdateBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateBackup" }); - - /** - * Calls UpdateBackup. - * @function updateBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} request UpdateBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef DeleteBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteBackup. - * @function deleteBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} request DeleteBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.deleteBackup = function deleteBackup(request, callback) { - return this.rpcCall(deleteBackup, $root.google.cloud.backupdr.v1.DeleteBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteBackup" }); - - /** - * Calls DeleteBackup. - * @function deleteBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} request DeleteBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|restoreBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef RestoreBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RestoreBackup. - * @function restoreBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} request RestoreBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.RestoreBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.restoreBackup = function restoreBackup(request, callback) { - return this.rpcCall(restoreBackup, $root.google.cloud.backupdr.v1.RestoreBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RestoreBackup" }); - - /** - * Calls RestoreBackup. - * @function restoreBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} request RestoreBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlan}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef CreateBackupPlanCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateBackupPlan. - * @function createBackupPlan - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} request CreateBackupPlanRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupPlanCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.createBackupPlan = function createBackupPlan(request, callback) { - return this.rpcCall(createBackupPlan, $root.google.cloud.backupdr.v1.CreateBackupPlanRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateBackupPlan" }); - - /** - * Calls CreateBackupPlan. - * @function createBackupPlan - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} request CreateBackupPlanRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlan}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef GetBackupPlanCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.BackupPlan} [response] BackupPlan - */ - - /** - * Calls GetBackupPlan. - * @function getBackupPlan - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} request GetBackupPlanRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.GetBackupPlanCallback} callback Node-style callback called with the error, if any, and BackupPlan - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.getBackupPlan = function getBackupPlan(request, callback) { - return this.rpcCall(getBackupPlan, $root.google.cloud.backupdr.v1.GetBackupPlanRequest, $root.google.cloud.backupdr.v1.BackupPlan, request, callback); - }, "name", { value: "GetBackupPlan" }); - - /** - * Calls GetBackupPlan. - * @function getBackupPlan - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} request GetBackupPlanRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlans}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef ListBackupPlansCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ListBackupPlansResponse} [response] ListBackupPlansResponse - */ - - /** - * Calls ListBackupPlans. - * @function listBackupPlans - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} request ListBackupPlansRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.ListBackupPlansCallback} callback Node-style callback called with the error, if any, and ListBackupPlansResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.listBackupPlans = function listBackupPlans(request, callback) { - return this.rpcCall(listBackupPlans, $root.google.cloud.backupdr.v1.ListBackupPlansRequest, $root.google.cloud.backupdr.v1.ListBackupPlansResponse, request, callback); - }, "name", { value: "ListBackupPlans" }); - - /** - * Calls ListBackupPlans. - * @function listBackupPlans - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} request ListBackupPlansRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlan}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef DeleteBackupPlanCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteBackupPlan. - * @function deleteBackupPlan - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} request DeleteBackupPlanRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.deleteBackupPlan = function deleteBackupPlan(request, callback) { - return this.rpcCall(deleteBackupPlan, $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteBackupPlan" }); - - /** - * Calls DeleteBackupPlan. - * @function deleteBackupPlan - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} request DeleteBackupPlanRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|createBackupPlanAssociation}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef CreateBackupPlanAssociationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateBackupPlanAssociation. - * @function createBackupPlanAssociation - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} request CreateBackupPlanAssociationRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.createBackupPlanAssociation = function createBackupPlanAssociation(request, callback) { - return this.rpcCall(createBackupPlanAssociation, $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateBackupPlanAssociation" }); - - /** - * Calls CreateBackupPlanAssociation. - * @function createBackupPlanAssociation - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} request CreateBackupPlanAssociationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|getBackupPlanAssociation}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef GetBackupPlanAssociationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.BackupPlanAssociation} [response] BackupPlanAssociation - */ - - /** - * Calls GetBackupPlanAssociation. - * @function getBackupPlanAssociation - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} request GetBackupPlanAssociationRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and BackupPlanAssociation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.getBackupPlanAssociation = function getBackupPlanAssociation(request, callback) { - return this.rpcCall(getBackupPlanAssociation, $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest, $root.google.cloud.backupdr.v1.BackupPlanAssociation, request, callback); - }, "name", { value: "GetBackupPlanAssociation" }); - - /** - * Calls GetBackupPlanAssociation. - * @function getBackupPlanAssociation - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} request GetBackupPlanAssociationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackupPlanAssociations}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef ListBackupPlanAssociationsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} [response] ListBackupPlanAssociationsResponse - */ - - /** - * Calls ListBackupPlanAssociations. - * @function listBackupPlanAssociations - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} request ListBackupPlanAssociationsRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociationsCallback} callback Node-style callback called with the error, if any, and ListBackupPlanAssociationsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.listBackupPlanAssociations = function listBackupPlanAssociations(request, callback) { - return this.rpcCall(listBackupPlanAssociations, $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest, $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse, request, callback); - }, "name", { value: "ListBackupPlanAssociations" }); - - /** - * Calls ListBackupPlanAssociations. - * @function listBackupPlanAssociations - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} request ListBackupPlanAssociationsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|deleteBackupPlanAssociation}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef DeleteBackupPlanAssociationCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteBackupPlanAssociation. - * @function deleteBackupPlanAssociation - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} request DeleteBackupPlanAssociationRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociationCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.deleteBackupPlanAssociation = function deleteBackupPlanAssociation(request, callback) { - return this.rpcCall(deleteBackupPlanAssociation, $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteBackupPlanAssociation" }); - - /** - * Calls DeleteBackupPlanAssociation. - * @function deleteBackupPlanAssociation - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} request DeleteBackupPlanAssociationRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|triggerBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef TriggerBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls TriggerBackup. - * @function triggerBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} request TriggerBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.TriggerBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.triggerBackup = function triggerBackup(request, callback) { - return this.rpcCall(triggerBackup, $root.google.cloud.backupdr.v1.TriggerBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "TriggerBackup" }); - - /** - * Calls TriggerBackup. - * @function triggerBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} request TriggerBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return BackupDR; - })(); - - v1.NetworkConfig = (function() { - - /** - * Properties of a NetworkConfig. - * @memberof google.cloud.backupdr.v1 - * @interface INetworkConfig - * @property {string|null} [network] NetworkConfig network - * @property {google.cloud.backupdr.v1.NetworkConfig.PeeringMode|null} [peeringMode] NetworkConfig peeringMode - */ - - /** - * Constructs a new NetworkConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a NetworkConfig. - * @implements INetworkConfig - * @constructor - * @param {google.cloud.backupdr.v1.INetworkConfig=} [properties] Properties to set - */ - function NetworkConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkConfig network. - * @member {string} network - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.network = ""; - - /** - * NetworkConfig peeringMode. - * @member {google.cloud.backupdr.v1.NetworkConfig.PeeringMode} peeringMode - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @instance - */ - NetworkConfig.prototype.peeringMode = 0; - - /** - * Creates a new NetworkConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig instance - */ - NetworkConfig.create = function create(properties) { - return new NetworkConfig(properties); - }; - - /** - * Encodes the specified NetworkConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkConfig} message NetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); - if (message.peeringMode != null && Object.hasOwnProperty.call(message, "peeringMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.peeringMode); - return writer; - }; - - /** - * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkConfig} message NetworkConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkConfig.decode = function 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.backupdr.v1.NetworkConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.network = reader.string(); - break; - } - case 2: { - message.peeringMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.peeringMode != null && message.hasOwnProperty("peeringMode")) - switch (message.peeringMode) { - default: - return "peeringMode: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.NetworkConfig} NetworkConfig - */ - NetworkConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.NetworkConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.NetworkConfig(); - if (object.network != null) - message.network = String(object.network); - switch (object.peeringMode) { - default: - if (typeof object.peeringMode === "number") { - message.peeringMode = object.peeringMode; - break; - } - break; - case "PEERING_MODE_UNSPECIFIED": - case 0: - message.peeringMode = 0; - break; - case "PRIVATE_SERVICE_ACCESS": - case 1: - message.peeringMode = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {google.cloud.backupdr.v1.NetworkConfig} message NetworkConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.network = ""; - object.peeringMode = options.enums === String ? "PEERING_MODE_UNSPECIFIED" : 0; - } - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.peeringMode != null && message.hasOwnProperty("peeringMode")) - object.peeringMode = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode] === undefined ? message.peeringMode : $root.google.cloud.backupdr.v1.NetworkConfig.PeeringMode[message.peeringMode] : message.peeringMode; - return object; - }; - - /** - * Converts this NetworkConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @instance - * @returns {Object.} JSON object - */ - NetworkConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.NetworkConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkConfig"; - }; - - /** - * PeeringMode enum. - * @name google.cloud.backupdr.v1.NetworkConfig.PeeringMode - * @enum {number} - * @property {number} PEERING_MODE_UNSPECIFIED=0 PEERING_MODE_UNSPECIFIED value - * @property {number} PRIVATE_SERVICE_ACCESS=1 PRIVATE_SERVICE_ACCESS value - */ - NetworkConfig.PeeringMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PEERING_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRIVATE_SERVICE_ACCESS"] = 1; - return values; - })(); - - return NetworkConfig; - })(); - - v1.ManagementURI = (function() { - - /** - * Properties of a ManagementURI. - * @memberof google.cloud.backupdr.v1 - * @interface IManagementURI - * @property {string|null} [webUi] ManagementURI webUi - * @property {string|null} [api] ManagementURI api - */ - - /** - * Constructs a new ManagementURI. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ManagementURI. - * @implements IManagementURI - * @constructor - * @param {google.cloud.backupdr.v1.IManagementURI=} [properties] Properties to set - */ - function ManagementURI(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ManagementURI webUi. - * @member {string} webUi - * @memberof google.cloud.backupdr.v1.ManagementURI - * @instance - */ - ManagementURI.prototype.webUi = ""; - - /** - * ManagementURI api. - * @member {string} api - * @memberof google.cloud.backupdr.v1.ManagementURI - * @instance - */ - ManagementURI.prototype.api = ""; - - /** - * Creates a new ManagementURI instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.IManagementURI=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI instance - */ - ManagementURI.create = function create(properties) { - return new ManagementURI(properties); - }; - - /** - * Encodes the specified ManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.IManagementURI} message ManagementURI message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ManagementURI.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.webUi != null && Object.hasOwnProperty.call(message, "webUi")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.webUi); - if (message.api != null && Object.hasOwnProperty.call(message, "api")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.api); - return writer; - }; - - /** - * Encodes the specified ManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementURI.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.IManagementURI} message ManagementURI message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ManagementURI.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ManagementURI message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ManagementURI.decode = function 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.backupdr.v1.ManagementURI(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.webUi = reader.string(); - break; - } - case 2: { - message.api = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ManagementURI message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ManagementURI.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ManagementURI message. - * @function verify - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ManagementURI.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.webUi != null && message.hasOwnProperty("webUi")) - if (!$util.isString(message.webUi)) - return "webUi: string expected"; - if (message.api != null && message.hasOwnProperty("api")) - if (!$util.isString(message.api)) - return "api: string expected"; - return null; - }; - - /** - * Creates a ManagementURI message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ManagementURI} ManagementURI - */ - ManagementURI.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ManagementURI) - return object; - var message = new $root.google.cloud.backupdr.v1.ManagementURI(); - if (object.webUi != null) - message.webUi = String(object.webUi); - if (object.api != null) - message.api = String(object.api); - return message; - }; - - /** - * Creates a plain object from a ManagementURI message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {google.cloud.backupdr.v1.ManagementURI} message ManagementURI - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ManagementURI.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.webUi = ""; - object.api = ""; - } - if (message.webUi != null && message.hasOwnProperty("webUi")) - object.webUi = message.webUi; - if (message.api != null && message.hasOwnProperty("api")) - object.api = message.api; - return object; - }; - - /** - * Converts this ManagementURI to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ManagementURI - * @instance - * @returns {Object.} JSON object - */ - ManagementURI.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ManagementURI - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ManagementURI - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ManagementURI.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ManagementURI"; - }; - - return ManagementURI; - })(); - - v1.WorkforceIdentityBasedManagementURI = (function() { - - /** - * Properties of a WorkforceIdentityBasedManagementURI. - * @memberof google.cloud.backupdr.v1 - * @interface IWorkforceIdentityBasedManagementURI - * @property {string|null} [firstPartyManagementUri] WorkforceIdentityBasedManagementURI firstPartyManagementUri - * @property {string|null} [thirdPartyManagementUri] WorkforceIdentityBasedManagementURI thirdPartyManagementUri - */ - - /** - * Constructs a new WorkforceIdentityBasedManagementURI. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a WorkforceIdentityBasedManagementURI. - * @implements IWorkforceIdentityBasedManagementURI - * @constructor - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI=} [properties] Properties to set - */ - function WorkforceIdentityBasedManagementURI(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkforceIdentityBasedManagementURI firstPartyManagementUri. - * @member {string} firstPartyManagementUri - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @instance - */ - WorkforceIdentityBasedManagementURI.prototype.firstPartyManagementUri = ""; - - /** - * WorkforceIdentityBasedManagementURI thirdPartyManagementUri. - * @member {string} thirdPartyManagementUri - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @instance - */ - WorkforceIdentityBasedManagementURI.prototype.thirdPartyManagementUri = ""; - - /** - * Creates a new WorkforceIdentityBasedManagementURI instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI instance - */ - WorkforceIdentityBasedManagementURI.create = function create(properties) { - return new WorkforceIdentityBasedManagementURI(properties); - }; - - /** - * Encodes the specified WorkforceIdentityBasedManagementURI message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkforceIdentityBasedManagementURI.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.firstPartyManagementUri != null && Object.hasOwnProperty.call(message, "firstPartyManagementUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.firstPartyManagementUri); - if (message.thirdPartyManagementUri != null && Object.hasOwnProperty.call(message, "thirdPartyManagementUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.thirdPartyManagementUri); - return writer; - }; - - /** - * Encodes the specified WorkforceIdentityBasedManagementURI message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkforceIdentityBasedManagementURI.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkforceIdentityBasedManagementURI.decode = function 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.backupdr.v1.WorkforceIdentityBasedManagementURI(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.firstPartyManagementUri = reader.string(); - break; - } - case 2: { - message.thirdPartyManagementUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkforceIdentityBasedManagementURI message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkforceIdentityBasedManagementURI.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkforceIdentityBasedManagementURI message. - * @function verify - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkforceIdentityBasedManagementURI.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.firstPartyManagementUri != null && message.hasOwnProperty("firstPartyManagementUri")) - if (!$util.isString(message.firstPartyManagementUri)) - return "firstPartyManagementUri: string expected"; - if (message.thirdPartyManagementUri != null && message.hasOwnProperty("thirdPartyManagementUri")) - if (!$util.isString(message.thirdPartyManagementUri)) - return "thirdPartyManagementUri: string expected"; - return null; - }; - - /** - * Creates a WorkforceIdentityBasedManagementURI message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} WorkforceIdentityBasedManagementURI - */ - WorkforceIdentityBasedManagementURI.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI) - return object; - var message = new $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI(); - if (object.firstPartyManagementUri != null) - message.firstPartyManagementUri = String(object.firstPartyManagementUri); - if (object.thirdPartyManagementUri != null) - message.thirdPartyManagementUri = String(object.thirdPartyManagementUri); - return message; - }; - - /** - * Creates a plain object from a WorkforceIdentityBasedManagementURI message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI} message WorkforceIdentityBasedManagementURI - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkforceIdentityBasedManagementURI.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.firstPartyManagementUri = ""; - object.thirdPartyManagementUri = ""; - } - if (message.firstPartyManagementUri != null && message.hasOwnProperty("firstPartyManagementUri")) - object.firstPartyManagementUri = message.firstPartyManagementUri; - if (message.thirdPartyManagementUri != null && message.hasOwnProperty("thirdPartyManagementUri")) - object.thirdPartyManagementUri = message.thirdPartyManagementUri; - return object; - }; - - /** - * Converts this WorkforceIdentityBasedManagementURI to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @instance - * @returns {Object.} JSON object - */ - WorkforceIdentityBasedManagementURI.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkforceIdentityBasedManagementURI - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkforceIdentityBasedManagementURI.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI"; - }; - - return WorkforceIdentityBasedManagementURI; - })(); - - v1.WorkforceIdentityBasedOAuth2ClientID = (function() { - - /** - * Properties of a WorkforceIdentityBasedOAuth2ClientID. - * @memberof google.cloud.backupdr.v1 - * @interface IWorkforceIdentityBasedOAuth2ClientID - * @property {string|null} [firstPartyOauth2ClientId] WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId - * @property {string|null} [thirdPartyOauth2ClientId] WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId - */ - - /** - * Constructs a new WorkforceIdentityBasedOAuth2ClientID. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a WorkforceIdentityBasedOAuth2ClientID. - * @implements IWorkforceIdentityBasedOAuth2ClientID - * @constructor - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID=} [properties] Properties to set - */ - function WorkforceIdentityBasedOAuth2ClientID(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkforceIdentityBasedOAuth2ClientID firstPartyOauth2ClientId. - * @member {string} firstPartyOauth2ClientId - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @instance - */ - WorkforceIdentityBasedOAuth2ClientID.prototype.firstPartyOauth2ClientId = ""; - - /** - * WorkforceIdentityBasedOAuth2ClientID thirdPartyOauth2ClientId. - * @member {string} thirdPartyOauth2ClientId - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @instance - */ - WorkforceIdentityBasedOAuth2ClientID.prototype.thirdPartyOauth2ClientId = ""; - - /** - * Creates a new WorkforceIdentityBasedOAuth2ClientID instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID instance - */ - WorkforceIdentityBasedOAuth2ClientID.create = function create(properties) { - return new WorkforceIdentityBasedOAuth2ClientID(properties); - }; - - /** - * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID} message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkforceIdentityBasedOAuth2ClientID.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.firstPartyOauth2ClientId != null && Object.hasOwnProperty.call(message, "firstPartyOauth2ClientId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.firstPartyOauth2ClientId); - if (message.thirdPartyOauth2ClientId != null && Object.hasOwnProperty.call(message, "thirdPartyOauth2ClientId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.thirdPartyOauth2ClientId); - return writer; - }; - - /** - * Encodes the specified WorkforceIdentityBasedOAuth2ClientID message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID} message WorkforceIdentityBasedOAuth2ClientID message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkforceIdentityBasedOAuth2ClientID.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkforceIdentityBasedOAuth2ClientID.decode = function 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.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.firstPartyOauth2ClientId = reader.string(); - break; - } - case 2: { - message.thirdPartyOauth2ClientId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkforceIdentityBasedOAuth2ClientID message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkforceIdentityBasedOAuth2ClientID.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkforceIdentityBasedOAuth2ClientID message. - * @function verify - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkforceIdentityBasedOAuth2ClientID.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.firstPartyOauth2ClientId != null && message.hasOwnProperty("firstPartyOauth2ClientId")) - if (!$util.isString(message.firstPartyOauth2ClientId)) - return "firstPartyOauth2ClientId: string expected"; - if (message.thirdPartyOauth2ClientId != null && message.hasOwnProperty("thirdPartyOauth2ClientId")) - if (!$util.isString(message.thirdPartyOauth2ClientId)) - return "thirdPartyOauth2ClientId: string expected"; - return null; - }; - - /** - * Creates a WorkforceIdentityBasedOAuth2ClientID message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} WorkforceIdentityBasedOAuth2ClientID - */ - WorkforceIdentityBasedOAuth2ClientID.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID) - return object; - var message = new $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID(); - if (object.firstPartyOauth2ClientId != null) - message.firstPartyOauth2ClientId = String(object.firstPartyOauth2ClientId); - if (object.thirdPartyOauth2ClientId != null) - message.thirdPartyOauth2ClientId = String(object.thirdPartyOauth2ClientId); - return message; - }; - - /** - * Creates a plain object from a WorkforceIdentityBasedOAuth2ClientID message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID} message WorkforceIdentityBasedOAuth2ClientID - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkforceIdentityBasedOAuth2ClientID.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.firstPartyOauth2ClientId = ""; - object.thirdPartyOauth2ClientId = ""; - } - if (message.firstPartyOauth2ClientId != null && message.hasOwnProperty("firstPartyOauth2ClientId")) - object.firstPartyOauth2ClientId = message.firstPartyOauth2ClientId; - if (message.thirdPartyOauth2ClientId != null && message.hasOwnProperty("thirdPartyOauth2ClientId")) - object.thirdPartyOauth2ClientId = message.thirdPartyOauth2ClientId; - return object; - }; - - /** - * Converts this WorkforceIdentityBasedOAuth2ClientID to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @instance - * @returns {Object.} JSON object - */ - WorkforceIdentityBasedOAuth2ClientID.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkforceIdentityBasedOAuth2ClientID - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkforceIdentityBasedOAuth2ClientID.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID"; - }; - - return WorkforceIdentityBasedOAuth2ClientID; - })(); - - v1.ManagementServer = (function() { - - /** - * Properties of a ManagementServer. - * @memberof google.cloud.backupdr.v1 - * @interface IManagementServer - * @property {string|null} [name] ManagementServer name - * @property {string|null} [description] ManagementServer description - * @property {Object.|null} [labels] ManagementServer labels - * @property {google.protobuf.ITimestamp|null} [createTime] ManagementServer createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ManagementServer updateTime - * @property {google.cloud.backupdr.v1.ManagementServer.InstanceType|null} [type] ManagementServer type - * @property {google.cloud.backupdr.v1.IManagementURI|null} [managementUri] ManagementServer managementUri - * @property {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null} [workforceIdentityBasedManagementUri] ManagementServer workforceIdentityBasedManagementUri - * @property {google.cloud.backupdr.v1.ManagementServer.InstanceState|null} [state] ManagementServer state - * @property {Array.|null} [networks] ManagementServer networks - * @property {string|null} [etag] ManagementServer etag - * @property {string|null} [oauth2ClientId] ManagementServer oauth2ClientId - * @property {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null} [workforceIdentityBasedOauth2ClientId] ManagementServer workforceIdentityBasedOauth2ClientId - * @property {Array.|null} [baProxyUri] ManagementServer baProxyUri - * @property {google.protobuf.IBoolValue|null} [satisfiesPzs] ManagementServer satisfiesPzs - * @property {boolean|null} [satisfiesPzi] ManagementServer satisfiesPzi - */ - - /** - * Constructs a new ManagementServer. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ManagementServer. - * @implements IManagementServer - * @constructor - * @param {google.cloud.backupdr.v1.IManagementServer=} [properties] Properties to set - */ - function ManagementServer(properties) { - this.labels = {}; - this.networks = []; - this.baProxyUri = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ManagementServer name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.name = ""; - - /** - * ManagementServer description. - * @member {string} description - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.description = ""; - - /** - * ManagementServer labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.labels = $util.emptyObject; - - /** - * ManagementServer createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.createTime = null; - - /** - * ManagementServer updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.updateTime = null; - - /** - * ManagementServer type. - * @member {google.cloud.backupdr.v1.ManagementServer.InstanceType} type - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.type = 0; - - /** - * ManagementServer managementUri. - * @member {google.cloud.backupdr.v1.IManagementURI|null|undefined} managementUri - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.managementUri = null; - - /** - * ManagementServer workforceIdentityBasedManagementUri. - * @member {google.cloud.backupdr.v1.IWorkforceIdentityBasedManagementURI|null|undefined} workforceIdentityBasedManagementUri - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.workforceIdentityBasedManagementUri = null; - - /** - * ManagementServer state. - * @member {google.cloud.backupdr.v1.ManagementServer.InstanceState} state - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.state = 0; - - /** - * ManagementServer networks. - * @member {Array.} networks - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.networks = $util.emptyArray; - - /** - * ManagementServer etag. - * @member {string} etag - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.etag = ""; - - /** - * ManagementServer oauth2ClientId. - * @member {string} oauth2ClientId - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.oauth2ClientId = ""; - - /** - * ManagementServer workforceIdentityBasedOauth2ClientId. - * @member {google.cloud.backupdr.v1.IWorkforceIdentityBasedOAuth2ClientID|null|undefined} workforceIdentityBasedOauth2ClientId - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.workforceIdentityBasedOauth2ClientId = null; - - /** - * ManagementServer baProxyUri. - * @member {Array.} baProxyUri - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.baProxyUri = $util.emptyArray; - - /** - * ManagementServer satisfiesPzs. - * @member {google.protobuf.IBoolValue|null|undefined} satisfiesPzs - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.satisfiesPzs = null; - - /** - * ManagementServer satisfiesPzi. - * @member {boolean} satisfiesPzi - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - */ - ManagementServer.prototype.satisfiesPzi = false; - - /** - * Creates a new ManagementServer instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {google.cloud.backupdr.v1.IManagementServer=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer instance - */ - ManagementServer.create = function create(properties) { - return new ManagementServer(properties); - }; - - /** - * Encodes the specified ManagementServer message. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {google.cloud.backupdr.v1.IManagementServer} message ManagementServer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ManagementServer.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.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); - if (message.networks != null && message.networks.length) - for (var i = 0; i < message.networks.length; ++i) - $root.google.cloud.backupdr.v1.NetworkConfig.encode(message.networks[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.description); - if (message.managementUri != null && Object.hasOwnProperty.call(message, "managementUri")) - $root.google.cloud.backupdr.v1.ManagementURI.encode(message.managementUri, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.etag); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.type); - if (message.oauth2ClientId != null && Object.hasOwnProperty.call(message, "oauth2ClientId")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.oauth2ClientId); - if (message.workforceIdentityBasedManagementUri != null && Object.hasOwnProperty.call(message, "workforceIdentityBasedManagementUri")) - $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.encode(message.workforceIdentityBasedManagementUri, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.workforceIdentityBasedOauth2ClientId != null && Object.hasOwnProperty.call(message, "workforceIdentityBasedOauth2ClientId")) - $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.encode(message.workforceIdentityBasedOauth2ClientId, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.baProxyUri != null && message.baProxyUri.length) - for (var i = 0; i < message.baProxyUri.length; ++i) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.baProxyUri[i]); - if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) - $root.google.protobuf.BoolValue.encode(message.satisfiesPzs, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.satisfiesPzi); - return writer; - }; - - /** - * Encodes the specified ManagementServer message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ManagementServer.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {google.cloud.backupdr.v1.IManagementServer} message ManagementServer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ManagementServer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ManagementServer message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ManagementServer.decode = function 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.backupdr.v1.ManagementServer(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 9: { - message.description = reader.string(); - 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 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 14: { - message.type = reader.int32(); - break; - } - case 11: { - message.managementUri = $root.google.cloud.backupdr.v1.ManagementURI.decode(reader, reader.uint32()); - break; - } - case 16: { - message.workforceIdentityBasedManagementUri = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.decode(reader, reader.uint32()); - break; - } - case 7: { - message.state = reader.int32(); - break; - } - case 8: { - if (!(message.networks && message.networks.length)) - message.networks = []; - message.networks.push($root.google.cloud.backupdr.v1.NetworkConfig.decode(reader, reader.uint32())); - break; - } - case 13: { - message.etag = reader.string(); - break; - } - case 15: { - message.oauth2ClientId = reader.string(); - break; - } - case 17: { - message.workforceIdentityBasedOauth2ClientId = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.decode(reader, reader.uint32()); - break; - } - case 18: { - if (!(message.baProxyUri && message.baProxyUri.length)) - message.baProxyUri = []; - message.baProxyUri.push(reader.string()); - break; - } - case 19: { - message.satisfiesPzs = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - } - case 20: { - message.satisfiesPzi = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ManagementServer message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ManagementServer.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ManagementServer message. - * @function verify - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ManagementServer.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - 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.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } - if (message.managementUri != null && message.hasOwnProperty("managementUri")) { - var error = $root.google.cloud.backupdr.v1.ManagementURI.verify(message.managementUri); - if (error) - return "managementUri." + error; - } - if (message.workforceIdentityBasedManagementUri != null && message.hasOwnProperty("workforceIdentityBasedManagementUri")) { - var error = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.verify(message.workforceIdentityBasedManagementUri); - if (error) - return "workforceIdentityBasedManagementUri." + 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: - break; - } - if (message.networks != null && message.hasOwnProperty("networks")) { - if (!Array.isArray(message.networks)) - return "networks: array expected"; - for (var i = 0; i < message.networks.length; ++i) { - var error = $root.google.cloud.backupdr.v1.NetworkConfig.verify(message.networks[i]); - if (error) - return "networks." + error; - } - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.oauth2ClientId != null && message.hasOwnProperty("oauth2ClientId")) - if (!$util.isString(message.oauth2ClientId)) - return "oauth2ClientId: string expected"; - if (message.workforceIdentityBasedOauth2ClientId != null && message.hasOwnProperty("workforceIdentityBasedOauth2ClientId")) { - var error = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.verify(message.workforceIdentityBasedOauth2ClientId); - if (error) - return "workforceIdentityBasedOauth2ClientId." + error; - } - if (message.baProxyUri != null && message.hasOwnProperty("baProxyUri")) { - if (!Array.isArray(message.baProxyUri)) - return "baProxyUri: array expected"; - for (var i = 0; i < message.baProxyUri.length; ++i) - if (!$util.isString(message.baProxyUri[i])) - return "baProxyUri: string[] expected"; - } - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { - var error = $root.google.protobuf.BoolValue.verify(message.satisfiesPzs); - if (error) - return "satisfiesPzs." + error; - } - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) - if (typeof message.satisfiesPzi !== "boolean") - return "satisfiesPzi: boolean expected"; - return null; - }; - - /** - * Creates a ManagementServer message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ManagementServer} ManagementServer - */ - ManagementServer.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ManagementServer) - return object; - var message = new $root.google.cloud.backupdr.v1.ManagementServer(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.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.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.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.backupdr.v1.ManagementServer.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "INSTANCE_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "BACKUP_RESTORE": - case 1: - message.type = 1; - break; - } - if (object.managementUri != null) { - if (typeof object.managementUri !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.managementUri: object expected"); - message.managementUri = $root.google.cloud.backupdr.v1.ManagementURI.fromObject(object.managementUri); - } - if (object.workforceIdentityBasedManagementUri != null) { - if (typeof object.workforceIdentityBasedManagementUri !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.workforceIdentityBasedManagementUri: object expected"); - message.workforceIdentityBasedManagementUri = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.fromObject(object.workforceIdentityBasedManagementUri); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "INSTANCE_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "CREATING": - case 1: - message.state = 1; - break; - case "READY": - case 2: - message.state = 2; - break; - case "UPDATING": - case 3: - message.state = 3; - break; - case "DELETING": - case 4: - message.state = 4; - break; - case "REPAIRING": - case 5: - message.state = 5; - break; - case "MAINTENANCE": - case 6: - message.state = 6; - break; - case "ERROR": - case 7: - message.state = 7; - break; - } - if (object.networks) { - if (!Array.isArray(object.networks)) - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.networks: array expected"); - message.networks = []; - for (var i = 0; i < object.networks.length; ++i) { - if (typeof object.networks[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.networks: object expected"); - message.networks[i] = $root.google.cloud.backupdr.v1.NetworkConfig.fromObject(object.networks[i]); - } - } - if (object.etag != null) - message.etag = String(object.etag); - if (object.oauth2ClientId != null) - message.oauth2ClientId = String(object.oauth2ClientId); - if (object.workforceIdentityBasedOauth2ClientId != null) { - if (typeof object.workforceIdentityBasedOauth2ClientId !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.workforceIdentityBasedOauth2ClientId: object expected"); - message.workforceIdentityBasedOauth2ClientId = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.fromObject(object.workforceIdentityBasedOauth2ClientId); - } - if (object.baProxyUri) { - if (!Array.isArray(object.baProxyUri)) - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.baProxyUri: array expected"); - message.baProxyUri = []; - for (var i = 0; i < object.baProxyUri.length; ++i) - message.baProxyUri[i] = String(object.baProxyUri[i]); - } - if (object.satisfiesPzs != null) { - if (typeof object.satisfiesPzs !== "object") - throw TypeError(".google.cloud.backupdr.v1.ManagementServer.satisfiesPzs: object expected"); - message.satisfiesPzs = $root.google.protobuf.BoolValue.fromObject(object.satisfiesPzs); - } - if (object.satisfiesPzi != null) - message.satisfiesPzi = Boolean(object.satisfiesPzi); - return message; - }; - - /** - * Creates a plain object from a ManagementServer message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {google.cloud.backupdr.v1.ManagementServer} message ManagementServer - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ManagementServer.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.networks = []; - object.baProxyUri = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.state = options.enums === String ? "INSTANCE_STATE_UNSPECIFIED" : 0; - object.description = ""; - object.managementUri = null; - object.etag = ""; - object.type = options.enums === String ? "INSTANCE_TYPE_UNSPECIFIED" : 0; - object.oauth2ClientId = ""; - object.workforceIdentityBasedManagementUri = null; - object.workforceIdentityBasedOauth2ClientId = null; - object.satisfiesPzs = null; - object.satisfiesPzi = false; - } - 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.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.ManagementServer.InstanceState[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.ManagementServer.InstanceState[message.state] : message.state; - if (message.networks && message.networks.length) { - object.networks = []; - for (var j = 0; j < message.networks.length; ++j) - object.networks[j] = $root.google.cloud.backupdr.v1.NetworkConfig.toObject(message.networks[j], options); - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.managementUri != null && message.hasOwnProperty("managementUri")) - object.managementUri = $root.google.cloud.backupdr.v1.ManagementURI.toObject(message.managementUri, options); - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.backupdr.v1.ManagementServer.InstanceType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.ManagementServer.InstanceType[message.type] : message.type; - if (message.oauth2ClientId != null && message.hasOwnProperty("oauth2ClientId")) - object.oauth2ClientId = message.oauth2ClientId; - if (message.workforceIdentityBasedManagementUri != null && message.hasOwnProperty("workforceIdentityBasedManagementUri")) - object.workforceIdentityBasedManagementUri = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedManagementURI.toObject(message.workforceIdentityBasedManagementUri, options); - if (message.workforceIdentityBasedOauth2ClientId != null && message.hasOwnProperty("workforceIdentityBasedOauth2ClientId")) - object.workforceIdentityBasedOauth2ClientId = $root.google.cloud.backupdr.v1.WorkforceIdentityBasedOAuth2ClientID.toObject(message.workforceIdentityBasedOauth2ClientId, options); - if (message.baProxyUri && message.baProxyUri.length) { - object.baProxyUri = []; - for (var j = 0; j < message.baProxyUri.length; ++j) - object.baProxyUri[j] = message.baProxyUri[j]; - } - if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) - object.satisfiesPzs = $root.google.protobuf.BoolValue.toObject(message.satisfiesPzs, options); - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) - object.satisfiesPzi = message.satisfiesPzi; - return object; - }; - - /** - * Converts this ManagementServer to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ManagementServer - * @instance - * @returns {Object.} JSON object - */ - ManagementServer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ManagementServer - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ManagementServer - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ManagementServer.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ManagementServer"; - }; - - /** - * InstanceType enum. - * @name google.cloud.backupdr.v1.ManagementServer.InstanceType - * @enum {number} - * @property {number} INSTANCE_TYPE_UNSPECIFIED=0 INSTANCE_TYPE_UNSPECIFIED value - * @property {number} BACKUP_RESTORE=1 BACKUP_RESTORE value - */ - ManagementServer.InstanceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INSTANCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BACKUP_RESTORE"] = 1; - return values; - })(); - - /** - * InstanceState enum. - * @name google.cloud.backupdr.v1.ManagementServer.InstanceState - * @enum {number} - * @property {number} INSTANCE_STATE_UNSPECIFIED=0 INSTANCE_STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} READY=2 READY value - * @property {number} UPDATING=3 UPDATING value - * @property {number} DELETING=4 DELETING value - * @property {number} REPAIRING=5 REPAIRING value - * @property {number} MAINTENANCE=6 MAINTENANCE value - * @property {number} ERROR=7 ERROR value - */ - ManagementServer.InstanceState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INSTANCE_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "READY"] = 2; - values[valuesById[3] = "UPDATING"] = 3; - values[valuesById[4] = "DELETING"] = 4; - values[valuesById[5] = "REPAIRING"] = 5; - values[valuesById[6] = "MAINTENANCE"] = 6; - values[valuesById[7] = "ERROR"] = 7; - return values; - })(); - - return ManagementServer; - })(); - - v1.ListManagementServersRequest = (function() { - - /** - * Properties of a ListManagementServersRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListManagementServersRequest - * @property {string|null} [parent] ListManagementServersRequest parent - * @property {number|null} [pageSize] ListManagementServersRequest pageSize - * @property {string|null} [pageToken] ListManagementServersRequest pageToken - * @property {string|null} [filter] ListManagementServersRequest filter - * @property {string|null} [orderBy] ListManagementServersRequest orderBy - */ - - /** - * Constructs a new ListManagementServersRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListManagementServersRequest. - * @implements IListManagementServersRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListManagementServersRequest=} [properties] Properties to set - */ - function ListManagementServersRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListManagementServersRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - ListManagementServersRequest.prototype.parent = ""; - - /** - * ListManagementServersRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - ListManagementServersRequest.prototype.pageSize = 0; - - /** - * ListManagementServersRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - ListManagementServersRequest.prototype.pageToken = ""; - - /** - * ListManagementServersRequest filter. - * @member {string|null|undefined} filter - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - ListManagementServersRequest.prototype.filter = null; - - /** - * ListManagementServersRequest orderBy. - * @member {string|null|undefined} orderBy - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - ListManagementServersRequest.prototype.orderBy = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ListManagementServersRequest _filter. - * @member {"filter"|undefined} _filter - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - Object.defineProperty(ListManagementServersRequest.prototype, "_filter", { - get: $util.oneOfGetter($oneOfFields = ["filter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ListManagementServersRequest _orderBy. - * @member {"orderBy"|undefined} _orderBy - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - */ - Object.defineProperty(ListManagementServersRequest.prototype, "_orderBy", { - get: $util.oneOfGetter($oneOfFields = ["orderBy"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ListManagementServersRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {google.cloud.backupdr.v1.IListManagementServersRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest instance - */ - ListManagementServersRequest.create = function create(properties) { - return new ListManagementServersRequest(properties); - }; - - /** - * Encodes the specified ListManagementServersRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {google.cloud.backupdr.v1.IListManagementServersRequest} message ListManagementServersRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListManagementServersRequest.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 ListManagementServersRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {google.cloud.backupdr.v1.IListManagementServersRequest} message ListManagementServersRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListManagementServersRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListManagementServersRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListManagementServersRequest.decode = function 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.backupdr.v1.ListManagementServersRequest(); - 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 ListManagementServersRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListManagementServersRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListManagementServersRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListManagementServersRequest.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.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")) { - properties._filter = 1; - if (!$util.isString(message.filter)) - return "filter: string expected"; - } - if (message.orderBy != null && message.hasOwnProperty("orderBy")) { - properties._orderBy = 1; - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; - } - return null; - }; - - /** - * Creates a ListManagementServersRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListManagementServersRequest} ListManagementServersRequest - */ - ListManagementServersRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListManagementServersRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.ListManagementServersRequest(); - 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 ListManagementServersRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {google.cloud.backupdr.v1.ListManagementServersRequest} message ListManagementServersRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListManagementServersRequest.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; - if (message.filter != null && message.hasOwnProperty("filter")) { - object.filter = message.filter; - if (options.oneofs) - object._filter = "filter"; - } - if (message.orderBy != null && message.hasOwnProperty("orderBy")) { - object.orderBy = message.orderBy; - if (options.oneofs) - object._orderBy = "orderBy"; - } - return object; - }; - - /** - * Converts this ListManagementServersRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @instance - * @returns {Object.} JSON object - */ - ListManagementServersRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListManagementServersRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListManagementServersRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListManagementServersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListManagementServersRequest"; - }; - - return ListManagementServersRequest; - })(); - - v1.ListManagementServersResponse = (function() { - - /** - * Properties of a ListManagementServersResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IListManagementServersResponse - * @property {Array.|null} [managementServers] ListManagementServersResponse managementServers - * @property {string|null} [nextPageToken] ListManagementServersResponse nextPageToken - * @property {Array.|null} [unreachable] ListManagementServersResponse unreachable - */ - - /** - * Constructs a new ListManagementServersResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListManagementServersResponse. - * @implements IListManagementServersResponse - * @constructor - * @param {google.cloud.backupdr.v1.IListManagementServersResponse=} [properties] Properties to set - */ - function ListManagementServersResponse(properties) { - this.managementServers = []; - 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]]; - } - - /** - * ListManagementServersResponse managementServers. - * @member {Array.} managementServers - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @instance - */ - ListManagementServersResponse.prototype.managementServers = $util.emptyArray; - - /** - * ListManagementServersResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @instance - */ - ListManagementServersResponse.prototype.nextPageToken = ""; - - /** - * ListManagementServersResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @instance - */ - ListManagementServersResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListManagementServersResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {google.cloud.backupdr.v1.IListManagementServersResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse instance - */ - ListManagementServersResponse.create = function create(properties) { - return new ListManagementServersResponse(properties); - }; - - /** - * Encodes the specified ListManagementServersResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {google.cloud.backupdr.v1.IListManagementServersResponse} message ListManagementServersResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListManagementServersResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.managementServers != null && message.managementServers.length) - for (var i = 0; i < message.managementServers.length; ++i) - $root.google.cloud.backupdr.v1.ManagementServer.encode(message.managementServers[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 ListManagementServersResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListManagementServersResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {google.cloud.backupdr.v1.IListManagementServersResponse} message ListManagementServersResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListManagementServersResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListManagementServersResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListManagementServersResponse.decode = function 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.backupdr.v1.ListManagementServersResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.managementServers && message.managementServers.length)) - message.managementServers = []; - message.managementServers.push($root.google.cloud.backupdr.v1.ManagementServer.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 ListManagementServersResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListManagementServersResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListManagementServersResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListManagementServersResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.managementServers != null && message.hasOwnProperty("managementServers")) { - if (!Array.isArray(message.managementServers)) - return "managementServers: array expected"; - for (var i = 0; i < message.managementServers.length; ++i) { - var error = $root.google.cloud.backupdr.v1.ManagementServer.verify(message.managementServers[i]); - if (error) - return "managementServers." + 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 ListManagementServersResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListManagementServersResponse} ListManagementServersResponse - */ - ListManagementServersResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListManagementServersResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListManagementServersResponse(); - if (object.managementServers) { - if (!Array.isArray(object.managementServers)) - throw TypeError(".google.cloud.backupdr.v1.ListManagementServersResponse.managementServers: array expected"); - message.managementServers = []; - for (var i = 0; i < object.managementServers.length; ++i) { - if (typeof object.managementServers[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListManagementServersResponse.managementServers: object expected"); - message.managementServers[i] = $root.google.cloud.backupdr.v1.ManagementServer.fromObject(object.managementServers[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListManagementServersResponse.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 ListManagementServersResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {google.cloud.backupdr.v1.ListManagementServersResponse} message ListManagementServersResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListManagementServersResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.managementServers = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.managementServers && message.managementServers.length) { - object.managementServers = []; - for (var j = 0; j < message.managementServers.length; ++j) - object.managementServers[j] = $root.google.cloud.backupdr.v1.ManagementServer.toObject(message.managementServers[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 ListManagementServersResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @instance - * @returns {Object.} JSON object - */ - ListManagementServersResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListManagementServersResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListManagementServersResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListManagementServersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListManagementServersResponse"; - }; - - return ListManagementServersResponse; - })(); - - v1.GetManagementServerRequest = (function() { - - /** - * Properties of a GetManagementServerRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetManagementServerRequest - * @property {string|null} [name] GetManagementServerRequest name - */ - - /** - * Constructs a new GetManagementServerRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetManagementServerRequest. - * @implements IGetManagementServerRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetManagementServerRequest=} [properties] Properties to set - */ - function GetManagementServerRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetManagementServerRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @instance - */ - GetManagementServerRequest.prototype.name = ""; - - /** - * Creates a new GetManagementServerRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.IGetManagementServerRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest instance - */ - GetManagementServerRequest.create = function create(properties) { - return new GetManagementServerRequest(properties); - }; - - /** - * Encodes the specified GetManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} message GetManagementServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetManagementServerRequest.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 GetManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetManagementServerRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.IGetManagementServerRequest} message GetManagementServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetManagementServerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetManagementServerRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetManagementServerRequest.decode = function 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.backupdr.v1.GetManagementServerRequest(); - 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 GetManagementServerRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetManagementServerRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetManagementServerRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetManagementServerRequest.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 GetManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetManagementServerRequest} GetManagementServerRequest - */ - GetManagementServerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetManagementServerRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.GetManagementServerRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetManagementServerRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.GetManagementServerRequest} message GetManagementServerRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetManagementServerRequest.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 GetManagementServerRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @instance - * @returns {Object.} JSON object - */ - GetManagementServerRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetManagementServerRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetManagementServerRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetManagementServerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetManagementServerRequest"; - }; - - return GetManagementServerRequest; - })(); - - v1.CreateManagementServerRequest = (function() { - - /** - * Properties of a CreateManagementServerRequest. - * @memberof google.cloud.backupdr.v1 - * @interface ICreateManagementServerRequest - * @property {string|null} [parent] CreateManagementServerRequest parent - * @property {string|null} [managementServerId] CreateManagementServerRequest managementServerId - * @property {google.cloud.backupdr.v1.IManagementServer|null} [managementServer] CreateManagementServerRequest managementServer - * @property {string|null} [requestId] CreateManagementServerRequest requestId - */ - - /** - * Constructs a new CreateManagementServerRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CreateManagementServerRequest. - * @implements ICreateManagementServerRequest - * @constructor - * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest=} [properties] Properties to set - */ - function CreateManagementServerRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateManagementServerRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @instance - */ - CreateManagementServerRequest.prototype.parent = ""; - - /** - * CreateManagementServerRequest managementServerId. - * @member {string} managementServerId - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @instance - */ - CreateManagementServerRequest.prototype.managementServerId = ""; - - /** - * CreateManagementServerRequest managementServer. - * @member {google.cloud.backupdr.v1.IManagementServer|null|undefined} managementServer - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @instance - */ - CreateManagementServerRequest.prototype.managementServer = null; - - /** - * CreateManagementServerRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @instance - */ - CreateManagementServerRequest.prototype.requestId = ""; - - /** - * Creates a new CreateManagementServerRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest instance - */ - CreateManagementServerRequest.create = function create(properties) { - return new CreateManagementServerRequest(properties); - }; - - /** - * Encodes the specified CreateManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} message CreateManagementServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateManagementServerRequest.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.managementServerId != null && Object.hasOwnProperty.call(message, "managementServerId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.managementServerId); - if (message.managementServer != null && Object.hasOwnProperty.call(message, "managementServer")) - $root.google.cloud.backupdr.v1.ManagementServer.encode(message.managementServer, 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 CreateManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateManagementServerRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateManagementServerRequest} message CreateManagementServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateManagementServerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateManagementServerRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateManagementServerRequest.decode = function 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.backupdr.v1.CreateManagementServerRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.managementServerId = reader.string(); - break; - } - case 3: { - message.managementServer = $root.google.cloud.backupdr.v1.ManagementServer.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateManagementServerRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateManagementServerRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateManagementServerRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateManagementServerRequest.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.managementServerId != null && message.hasOwnProperty("managementServerId")) - if (!$util.isString(message.managementServerId)) - return "managementServerId: string expected"; - if (message.managementServer != null && message.hasOwnProperty("managementServer")) { - var error = $root.google.cloud.backupdr.v1.ManagementServer.verify(message.managementServer); - if (error) - return "managementServer." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a CreateManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CreateManagementServerRequest} CreateManagementServerRequest - */ - CreateManagementServerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CreateManagementServerRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.CreateManagementServerRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.managementServerId != null) - message.managementServerId = String(object.managementServerId); - if (object.managementServer != null) { - if (typeof object.managementServer !== "object") - throw TypeError(".google.cloud.backupdr.v1.CreateManagementServerRequest.managementServer: object expected"); - message.managementServer = $root.google.cloud.backupdr.v1.ManagementServer.fromObject(object.managementServer); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a CreateManagementServerRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.CreateManagementServerRequest} message CreateManagementServerRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateManagementServerRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.managementServerId = ""; - object.managementServer = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.managementServerId != null && message.hasOwnProperty("managementServerId")) - object.managementServerId = message.managementServerId; - if (message.managementServer != null && message.hasOwnProperty("managementServer")) - object.managementServer = $root.google.cloud.backupdr.v1.ManagementServer.toObject(message.managementServer, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this CreateManagementServerRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @instance - * @returns {Object.} JSON object - */ - CreateManagementServerRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateManagementServerRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CreateManagementServerRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateManagementServerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateManagementServerRequest"; - }; - - return CreateManagementServerRequest; - })(); - - v1.DeleteManagementServerRequest = (function() { - - /** - * Properties of a DeleteManagementServerRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IDeleteManagementServerRequest - * @property {string|null} [name] DeleteManagementServerRequest name - * @property {string|null} [requestId] DeleteManagementServerRequest requestId - */ - - /** - * Constructs a new DeleteManagementServerRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DeleteManagementServerRequest. - * @implements IDeleteManagementServerRequest - * @constructor - * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest=} [properties] Properties to set - */ - function DeleteManagementServerRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteManagementServerRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @instance - */ - DeleteManagementServerRequest.prototype.name = ""; - - /** - * DeleteManagementServerRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @instance - */ - DeleteManagementServerRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteManagementServerRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest instance - */ - DeleteManagementServerRequest.create = function create(properties) { - return new DeleteManagementServerRequest(properties); - }; - - /** - * Encodes the specified DeleteManagementServerRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} message DeleteManagementServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteManagementServerRequest.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 DeleteManagementServerRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteManagementServerRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteManagementServerRequest} message DeleteManagementServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteManagementServerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteManagementServerRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteManagementServerRequest.decode = function 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.backupdr.v1.DeleteManagementServerRequest(); - 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 DeleteManagementServerRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteManagementServerRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteManagementServerRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteManagementServerRequest.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 DeleteManagementServerRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DeleteManagementServerRequest} DeleteManagementServerRequest - */ - DeleteManagementServerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DeleteManagementServerRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.DeleteManagementServerRequest(); - 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 DeleteManagementServerRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {google.cloud.backupdr.v1.DeleteManagementServerRequest} message DeleteManagementServerRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteManagementServerRequest.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 DeleteManagementServerRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteManagementServerRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteManagementServerRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DeleteManagementServerRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteManagementServerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteManagementServerRequest"; - }; - - return DeleteManagementServerRequest; - })(); - - v1.OperationMetadata = (function() { - - /** - * Properties of an OperationMetadata. - * @memberof google.cloud.backupdr.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 {Object.|null} [additionalInfo] OperationMetadata additionalInfo - */ - - /** - * Constructs a new OperationMetadata. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.cloud.backupdr.v1.IOperationMetadata=} [properties] Properties to set - */ - function OperationMetadata(properties) { - this.additionalInfo = {}; - if (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.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.verb = ""; - - /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.statusMessage = ""; - - /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.requestedCancellation = false; - - /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.apiVersion = ""; - - /** - * OperationMetadata additionalInfo. - * @member {Object.} additionalInfo - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.additionalInfo = $util.emptyObject; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @static - * @param {google.cloud.backupdr.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.OperationMetadata} OperationMetadata instance - */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.backupdr.v1.OperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @static - * @param {google.cloud.backupdr.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.additionalInfo != null && Object.hasOwnProperty.call(message, "additionalInfo")) - for (var keys = Object.keys(message.additionalInfo), i = 0; i < keys.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.additionalInfo[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.OperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @static - * @param {google.cloud.backupdr.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.backupdr.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.backupdr.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.backupdr.v1.OperationMetadata(), key, value; - 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: { - if (message.additionalInfo === $util.emptyObject) - message.additionalInfo = {}; - 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.additionalInfo[key] = value; - 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.backupdr.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.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.backupdr.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.additionalInfo != null && message.hasOwnProperty("additionalInfo")) { - if (!$util.isObject(message.additionalInfo)) - return "additionalInfo: object expected"; - var key = Object.keys(message.additionalInfo); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.additionalInfo[key[i]])) - return "additionalInfo: string{k:string} expected"; - } - return null; - }; - - /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.OperationMetadata} OperationMetadata - */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.OperationMetadata) - return object; - var message = new $root.google.cloud.backupdr.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.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.backupdr.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.additionalInfo) { - if (typeof object.additionalInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.OperationMetadata.additionalInfo: object expected"); - message.additionalInfo = {}; - for (var keys = Object.keys(object.additionalInfo), i = 0; i < keys.length; ++i) - message.additionalInfo[keys[i]] = String(object.additionalInfo[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.OperationMetadata - * @static - * @param {google.cloud.backupdr.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.objects || options.defaults) - object.additionalInfo = {}; - if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; - } - 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; - var keys2; - if (message.additionalInfo && (keys2 = Object.keys(message.additionalInfo)).length) { - object.additionalInfo = {}; - for (var j = 0; j < keys2.length; ++j) - object.additionalInfo[keys2[j]] = message.additionalInfo[keys2[j]]; - } - return object; - }; - - /** - * Converts this OperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.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.backupdr.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.backupdr.v1.OperationMetadata"; - }; - - return OperationMetadata; - })(); - - v1.BackupPlan = (function() { - - /** - * Properties of a BackupPlan. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupPlan - * @property {string|null} [name] BackupPlan name - * @property {string|null} [description] BackupPlan description - * @property {Object.|null} [labels] BackupPlan labels - * @property {google.protobuf.ITimestamp|null} [createTime] BackupPlan createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] BackupPlan updateTime - * @property {Array.|null} [backupRules] BackupPlan backupRules - * @property {google.cloud.backupdr.v1.BackupPlan.State|null} [state] BackupPlan state - * @property {string|null} [resourceType] BackupPlan resourceType - * @property {string|null} [etag] BackupPlan etag - * @property {string|null} [backupVault] BackupPlan backupVault - * @property {string|null} [backupVaultServiceAccount] BackupPlan backupVaultServiceAccount - */ - - /** - * Constructs a new BackupPlan. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupPlan. - * @implements IBackupPlan - * @constructor - * @param {google.cloud.backupdr.v1.IBackupPlan=} [properties] Properties to set - */ - function BackupPlan(properties) { - this.labels = {}; - this.backupRules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupPlan name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.name = ""; - - /** - * BackupPlan description. - * @member {string} description - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.description = ""; - - /** - * BackupPlan labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.labels = $util.emptyObject; - - /** - * BackupPlan createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.createTime = null; - - /** - * BackupPlan updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.updateTime = null; - - /** - * BackupPlan backupRules. - * @member {Array.} backupRules - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.backupRules = $util.emptyArray; - - /** - * BackupPlan state. - * @member {google.cloud.backupdr.v1.BackupPlan.State} state - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.state = 0; - - /** - * BackupPlan resourceType. - * @member {string} resourceType - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.resourceType = ""; - - /** - * BackupPlan etag. - * @member {string} etag - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.etag = ""; - - /** - * BackupPlan backupVault. - * @member {string} backupVault - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.backupVault = ""; - - /** - * BackupPlan backupVaultServiceAccount. - * @member {string} backupVaultServiceAccount - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - */ - BackupPlan.prototype.backupVaultServiceAccount = ""; - - /** - * Creates a new BackupPlan instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {google.cloud.backupdr.v1.IBackupPlan=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan instance - */ - BackupPlan.create = function create(properties) { - return new BackupPlan(properties); - }; - - /** - * Encodes the specified BackupPlan message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {google.cloud.backupdr.v1.IBackupPlan} message BackupPlan message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupPlan.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - 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 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.backupRules != null && message.backupRules.length) - for (var i = 0; i < message.backupRules.length; ++i) - $root.google.cloud.backupdr.v1.BackupRule.encode(message.backupRules[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); - if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceType); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.etag); - if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.backupVault); - if (message.backupVaultServiceAccount != null && Object.hasOwnProperty.call(message, "backupVaultServiceAccount")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.backupVaultServiceAccount); - return writer; - }; - - /** - * Encodes the specified BackupPlan message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlan.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {google.cloud.backupdr.v1.IBackupPlan} message BackupPlan message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupPlan.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupPlan message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupPlan.decode = function 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.backupdr.v1.BackupPlan(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - 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 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - if (!(message.backupRules && message.backupRules.length)) - message.backupRules = []; - message.backupRules.push($root.google.cloud.backupdr.v1.BackupRule.decode(reader, reader.uint32())); - break; - } - case 7: { - message.state = reader.int32(); - break; - } - case 8: { - message.resourceType = reader.string(); - break; - } - case 9: { - message.etag = reader.string(); - break; - } - case 10: { - message.backupVault = reader.string(); - break; - } - case 11: { - message.backupVaultServiceAccount = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupPlan message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupPlan.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupPlan message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupPlan.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - 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.backupRules != null && message.hasOwnProperty("backupRules")) { - if (!Array.isArray(message.backupRules)) - return "backupRules: array expected"; - for (var i = 0; i < message.backupRules.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupRule.verify(message.backupRules[i]); - if (error) - return "backupRules." + error; - } - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - if (!$util.isString(message.resourceType)) - return "resourceType: string expected"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.backupVault != null && message.hasOwnProperty("backupVault")) - if (!$util.isString(message.backupVault)) - return "backupVault: string expected"; - if (message.backupVaultServiceAccount != null && message.hasOwnProperty("backupVaultServiceAccount")) - if (!$util.isString(message.backupVaultServiceAccount)) - return "backupVaultServiceAccount: string expected"; - return null; - }; - - /** - * Creates a BackupPlan message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupPlan} BackupPlan - */ - BackupPlan.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupPlan) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupPlan(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupPlan.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.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupPlan.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.backupdr.v1.BackupPlan.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.backupRules) { - if (!Array.isArray(object.backupRules)) - throw TypeError(".google.cloud.backupdr.v1.BackupPlan.backupRules: array expected"); - message.backupRules = []; - for (var i = 0; i < object.backupRules.length; ++i) { - if (typeof object.backupRules[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupPlan.backupRules: object expected"); - message.backupRules[i] = $root.google.cloud.backupdr.v1.BackupRule.fromObject(object.backupRules[i]); - } - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "CREATING": - case 1: - message.state = 1; - break; - case "ACTIVE": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "INACTIVE": - case 4: - message.state = 4; - break; - } - if (object.resourceType != null) - message.resourceType = String(object.resourceType); - if (object.etag != null) - message.etag = String(object.etag); - if (object.backupVault != null) - message.backupVault = String(object.backupVault); - if (object.backupVaultServiceAccount != null) - message.backupVaultServiceAccount = String(object.backupVaultServiceAccount); - return message; - }; - - /** - * Creates a plain object from a BackupPlan message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {google.cloud.backupdr.v1.BackupPlan} message BackupPlan - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupPlan.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.backupRules = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.resourceType = ""; - object.etag = ""; - object.backupVault = ""; - object.backupVaultServiceAccount = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - 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.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.backupRules && message.backupRules.length) { - object.backupRules = []; - for (var j = 0; j < message.backupRules.length; ++j) - object.backupRules[j] = $root.google.cloud.backupdr.v1.BackupRule.toObject(message.backupRules[j], options); - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupPlan.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupPlan.State[message.state] : message.state; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = message.resourceType; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.backupVault != null && message.hasOwnProperty("backupVault")) - object.backupVault = message.backupVault; - if (message.backupVaultServiceAccount != null && message.hasOwnProperty("backupVaultServiceAccount")) - object.backupVaultServiceAccount = message.backupVaultServiceAccount; - return object; - }; - - /** - * Converts this BackupPlan to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupPlan - * @instance - * @returns {Object.} JSON object - */ - BackupPlan.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupPlan - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupPlan - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupPlan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupPlan"; - }; - - /** - * State enum. - * @name google.cloud.backupdr.v1.BackupPlan.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} DELETING=3 DELETING value - * @property {number} INACTIVE=4 INACTIVE value - */ - BackupPlan.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "INACTIVE"] = 4; - return values; - })(); - - return BackupPlan; - })(); - - v1.BackupRule = (function() { - - /** - * Properties of a BackupRule. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupRule - * @property {string|null} [ruleId] BackupRule ruleId - * @property {number|null} [backupRetentionDays] BackupRule backupRetentionDays - * @property {google.cloud.backupdr.v1.IStandardSchedule|null} [standardSchedule] BackupRule standardSchedule - */ - - /** - * Constructs a new BackupRule. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupRule. - * @implements IBackupRule - * @constructor - * @param {google.cloud.backupdr.v1.IBackupRule=} [properties] Properties to set - */ - function BackupRule(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupRule ruleId. - * @member {string} ruleId - * @memberof google.cloud.backupdr.v1.BackupRule - * @instance - */ - BackupRule.prototype.ruleId = ""; - - /** - * BackupRule backupRetentionDays. - * @member {number} backupRetentionDays - * @memberof google.cloud.backupdr.v1.BackupRule - * @instance - */ - BackupRule.prototype.backupRetentionDays = 0; - - /** - * BackupRule standardSchedule. - * @member {google.cloud.backupdr.v1.IStandardSchedule|null|undefined} standardSchedule - * @memberof google.cloud.backupdr.v1.BackupRule - * @instance - */ - BackupRule.prototype.standardSchedule = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupRule backupScheduleOneof. - * @member {"standardSchedule"|undefined} backupScheduleOneof - * @memberof google.cloud.backupdr.v1.BackupRule - * @instance - */ - Object.defineProperty(BackupRule.prototype, "backupScheduleOneof", { - get: $util.oneOfGetter($oneOfFields = ["standardSchedule"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupRule instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {google.cloud.backupdr.v1.IBackupRule=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule instance - */ - BackupRule.create = function create(properties) { - return new BackupRule(properties); - }; - - /** - * Encodes the specified BackupRule message. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {google.cloud.backupdr.v1.IBackupRule} message BackupRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ruleId); - if (message.backupRetentionDays != null && Object.hasOwnProperty.call(message, "backupRetentionDays")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.backupRetentionDays); - if (message.standardSchedule != null && Object.hasOwnProperty.call(message, "standardSchedule")) - $root.google.cloud.backupdr.v1.StandardSchedule.encode(message.standardSchedule, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BackupRule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {google.cloud.backupdr.v1.IBackupRule} message BackupRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupRule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupRule.decode = function 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.backupdr.v1.BackupRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ruleId = reader.string(); - break; - } - case 4: { - message.backupRetentionDays = reader.int32(); - break; - } - case 5: { - message.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupRule message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.ruleId != null && message.hasOwnProperty("ruleId")) - if (!$util.isString(message.ruleId)) - return "ruleId: string expected"; - if (message.backupRetentionDays != null && message.hasOwnProperty("backupRetentionDays")) - if (!$util.isInteger(message.backupRetentionDays)) - return "backupRetentionDays: integer expected"; - if (message.standardSchedule != null && message.hasOwnProperty("standardSchedule")) { - properties.backupScheduleOneof = 1; - { - var error = $root.google.cloud.backupdr.v1.StandardSchedule.verify(message.standardSchedule); - if (error) - return "standardSchedule." + error; - } - } - return null; - }; - - /** - * Creates a BackupRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupRule} BackupRule - */ - BackupRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupRule) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupRule(); - if (object.ruleId != null) - message.ruleId = String(object.ruleId); - if (object.backupRetentionDays != null) - message.backupRetentionDays = object.backupRetentionDays | 0; - if (object.standardSchedule != null) { - if (typeof object.standardSchedule !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupRule.standardSchedule: object expected"); - message.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.fromObject(object.standardSchedule); - } - return message; - }; - - /** - * Creates a plain object from a BackupRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {google.cloud.backupdr.v1.BackupRule} message BackupRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.ruleId = ""; - object.backupRetentionDays = 0; - } - if (message.ruleId != null && message.hasOwnProperty("ruleId")) - object.ruleId = message.ruleId; - if (message.backupRetentionDays != null && message.hasOwnProperty("backupRetentionDays")) - object.backupRetentionDays = message.backupRetentionDays; - if (message.standardSchedule != null && message.hasOwnProperty("standardSchedule")) { - object.standardSchedule = $root.google.cloud.backupdr.v1.StandardSchedule.toObject(message.standardSchedule, options); - if (options.oneofs) - object.backupScheduleOneof = "standardSchedule"; - } - return object; - }; - - /** - * Converts this BackupRule to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupRule - * @instance - * @returns {Object.} JSON object - */ - BackupRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupRule - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupRule"; - }; - - return BackupRule; - })(); - - v1.StandardSchedule = (function() { - - /** - * Properties of a StandardSchedule. - * @memberof google.cloud.backupdr.v1 - * @interface IStandardSchedule - * @property {google.cloud.backupdr.v1.StandardSchedule.RecurrenceType|null} [recurrenceType] StandardSchedule recurrenceType - * @property {number|null} [hourlyFrequency] StandardSchedule hourlyFrequency - * @property {Array.|null} [daysOfWeek] StandardSchedule daysOfWeek - * @property {Array.|null} [daysOfMonth] StandardSchedule daysOfMonth - * @property {google.cloud.backupdr.v1.IWeekDayOfMonth|null} [weekDayOfMonth] StandardSchedule weekDayOfMonth - * @property {Array.|null} [months] StandardSchedule months - * @property {google.cloud.backupdr.v1.IBackupWindow|null} [backupWindow] StandardSchedule backupWindow - * @property {string|null} [timeZone] StandardSchedule timeZone - */ - - /** - * Constructs a new StandardSchedule. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a StandardSchedule. - * @implements IStandardSchedule - * @constructor - * @param {google.cloud.backupdr.v1.IStandardSchedule=} [properties] Properties to set - */ - function StandardSchedule(properties) { - this.daysOfWeek = []; - this.daysOfMonth = []; - this.months = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StandardSchedule recurrenceType. - * @member {google.cloud.backupdr.v1.StandardSchedule.RecurrenceType} recurrenceType - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.recurrenceType = 0; - - /** - * StandardSchedule hourlyFrequency. - * @member {number} hourlyFrequency - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.hourlyFrequency = 0; - - /** - * StandardSchedule daysOfWeek. - * @member {Array.} daysOfWeek - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.daysOfWeek = $util.emptyArray; - - /** - * StandardSchedule daysOfMonth. - * @member {Array.} daysOfMonth - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.daysOfMonth = $util.emptyArray; - - /** - * StandardSchedule weekDayOfMonth. - * @member {google.cloud.backupdr.v1.IWeekDayOfMonth|null|undefined} weekDayOfMonth - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.weekDayOfMonth = null; - - /** - * StandardSchedule months. - * @member {Array.} months - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.months = $util.emptyArray; - - /** - * StandardSchedule backupWindow. - * @member {google.cloud.backupdr.v1.IBackupWindow|null|undefined} backupWindow - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.backupWindow = null; - - /** - * StandardSchedule timeZone. - * @member {string} timeZone - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - */ - StandardSchedule.prototype.timeZone = ""; - - /** - * Creates a new StandardSchedule instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {google.cloud.backupdr.v1.IStandardSchedule=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule instance - */ - StandardSchedule.create = function create(properties) { - return new StandardSchedule(properties); - }; - - /** - * Encodes the specified StandardSchedule message. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {google.cloud.backupdr.v1.IStandardSchedule} message StandardSchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StandardSchedule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.recurrenceType != null && Object.hasOwnProperty.call(message, "recurrenceType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.recurrenceType); - if (message.hourlyFrequency != null && Object.hasOwnProperty.call(message, "hourlyFrequency")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.hourlyFrequency); - if (message.daysOfWeek != null && message.daysOfWeek.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.daysOfWeek.length; ++i) - writer.int32(message.daysOfWeek[i]); - writer.ldelim(); - } - if (message.daysOfMonth != null && message.daysOfMonth.length) { - writer.uint32(/* id 4, wireType 2 =*/34).fork(); - for (var i = 0; i < message.daysOfMonth.length; ++i) - writer.int32(message.daysOfMonth[i]); - writer.ldelim(); - } - if (message.weekDayOfMonth != null && Object.hasOwnProperty.call(message, "weekDayOfMonth")) - $root.google.cloud.backupdr.v1.WeekDayOfMonth.encode(message.weekDayOfMonth, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.months != null && message.months.length) { - writer.uint32(/* id 6, wireType 2 =*/50).fork(); - for (var i = 0; i < message.months.length; ++i) - writer.int32(message.months[i]); - writer.ldelim(); - } - if (message.backupWindow != null && Object.hasOwnProperty.call(message, "backupWindow")) - $root.google.cloud.backupdr.v1.BackupWindow.encode(message.backupWindow, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.timeZone); - return writer; - }; - - /** - * Encodes the specified StandardSchedule message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.StandardSchedule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {google.cloud.backupdr.v1.IStandardSchedule} message StandardSchedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StandardSchedule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StandardSchedule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StandardSchedule.decode = function 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.backupdr.v1.StandardSchedule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.recurrenceType = reader.int32(); - break; - } - case 2: { - message.hourlyFrequency = reader.int32(); - break; - } - case 3: { - if (!(message.daysOfWeek && message.daysOfWeek.length)) - message.daysOfWeek = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.daysOfWeek.push(reader.int32()); - } else - message.daysOfWeek.push(reader.int32()); - break; - } - case 4: { - if (!(message.daysOfMonth && message.daysOfMonth.length)) - message.daysOfMonth = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.daysOfMonth.push(reader.int32()); - } else - message.daysOfMonth.push(reader.int32()); - break; - } - case 5: { - message.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.decode(reader, reader.uint32()); - break; - } - case 6: { - if (!(message.months && message.months.length)) - message.months = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.months.push(reader.int32()); - } else - message.months.push(reader.int32()); - break; - } - case 7: { - message.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.decode(reader, reader.uint32()); - break; - } - case 8: { - message.timeZone = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StandardSchedule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StandardSchedule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StandardSchedule message. - * @function verify - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StandardSchedule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.recurrenceType != null && message.hasOwnProperty("recurrenceType")) - switch (message.recurrenceType) { - default: - return "recurrenceType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.hourlyFrequency != null && message.hasOwnProperty("hourlyFrequency")) - if (!$util.isInteger(message.hourlyFrequency)) - return "hourlyFrequency: integer expected"; - if (message.daysOfWeek != null && message.hasOwnProperty("daysOfWeek")) { - if (!Array.isArray(message.daysOfWeek)) - return "daysOfWeek: array expected"; - for (var i = 0; i < message.daysOfWeek.length; ++i) - switch (message.daysOfWeek[i]) { - default: - return "daysOfWeek: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - } - if (message.daysOfMonth != null && message.hasOwnProperty("daysOfMonth")) { - if (!Array.isArray(message.daysOfMonth)) - return "daysOfMonth: array expected"; - for (var i = 0; i < message.daysOfMonth.length; ++i) - if (!$util.isInteger(message.daysOfMonth[i])) - return "daysOfMonth: integer[] expected"; - } - if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) { - var error = $root.google.cloud.backupdr.v1.WeekDayOfMonth.verify(message.weekDayOfMonth); - if (error) - return "weekDayOfMonth." + error; - } - if (message.months != null && message.hasOwnProperty("months")) { - if (!Array.isArray(message.months)) - return "months: array expected"; - for (var i = 0; i < message.months.length; ++i) - switch (message.months[i]) { - default: - return "months: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - break; - } - } - if (message.backupWindow != null && message.hasOwnProperty("backupWindow")) { - var error = $root.google.cloud.backupdr.v1.BackupWindow.verify(message.backupWindow); - if (error) - return "backupWindow." + error; - } - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - if (!$util.isString(message.timeZone)) - return "timeZone: string expected"; - return null; - }; - - /** - * Creates a StandardSchedule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.StandardSchedule} StandardSchedule - */ - StandardSchedule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.StandardSchedule) - return object; - var message = new $root.google.cloud.backupdr.v1.StandardSchedule(); - switch (object.recurrenceType) { - default: - if (typeof object.recurrenceType === "number") { - message.recurrenceType = object.recurrenceType; - break; - } - break; - case "RECURRENCE_TYPE_UNSPECIFIED": - case 0: - message.recurrenceType = 0; - break; - case "HOURLY": - case 1: - message.recurrenceType = 1; - break; - case "DAILY": - case 2: - message.recurrenceType = 2; - break; - case "WEEKLY": - case 3: - message.recurrenceType = 3; - break; - case "MONTHLY": - case 4: - message.recurrenceType = 4; - break; - case "YEARLY": - case 5: - message.recurrenceType = 5; - break; - } - if (object.hourlyFrequency != null) - message.hourlyFrequency = object.hourlyFrequency | 0; - if (object.daysOfWeek) { - if (!Array.isArray(object.daysOfWeek)) - throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.daysOfWeek: array expected"); - message.daysOfWeek = []; - for (var i = 0; i < object.daysOfWeek.length; ++i) - switch (object.daysOfWeek[i]) { - default: - if (typeof object.daysOfWeek[i] === "number") { - message.daysOfWeek[i] = object.daysOfWeek[i]; - break; - } - case "DAY_OF_WEEK_UNSPECIFIED": - case 0: - message.daysOfWeek[i] = 0; - break; - case "MONDAY": - case 1: - message.daysOfWeek[i] = 1; - break; - case "TUESDAY": - case 2: - message.daysOfWeek[i] = 2; - break; - case "WEDNESDAY": - case 3: - message.daysOfWeek[i] = 3; - break; - case "THURSDAY": - case 4: - message.daysOfWeek[i] = 4; - break; - case "FRIDAY": - case 5: - message.daysOfWeek[i] = 5; - break; - case "SATURDAY": - case 6: - message.daysOfWeek[i] = 6; - break; - case "SUNDAY": - case 7: - message.daysOfWeek[i] = 7; - break; - } - } - if (object.daysOfMonth) { - if (!Array.isArray(object.daysOfMonth)) - throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.daysOfMonth: array expected"); - message.daysOfMonth = []; - for (var i = 0; i < object.daysOfMonth.length; ++i) - message.daysOfMonth[i] = object.daysOfMonth[i] | 0; - } - if (object.weekDayOfMonth != null) { - if (typeof object.weekDayOfMonth !== "object") - throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.weekDayOfMonth: object expected"); - message.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.fromObject(object.weekDayOfMonth); - } - if (object.months) { - if (!Array.isArray(object.months)) - throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.months: array expected"); - message.months = []; - for (var i = 0; i < object.months.length; ++i) - switch (object.months[i]) { - default: - if (typeof object.months[i] === "number") { - message.months[i] = object.months[i]; - break; - } - case "MONTH_UNSPECIFIED": - case 0: - message.months[i] = 0; - break; - case "JANUARY": - case 1: - message.months[i] = 1; - break; - case "FEBRUARY": - case 2: - message.months[i] = 2; - break; - case "MARCH": - case 3: - message.months[i] = 3; - break; - case "APRIL": - case 4: - message.months[i] = 4; - break; - case "MAY": - case 5: - message.months[i] = 5; - break; - case "JUNE": - case 6: - message.months[i] = 6; - break; - case "JULY": - case 7: - message.months[i] = 7; - break; - case "AUGUST": - case 8: - message.months[i] = 8; - break; - case "SEPTEMBER": - case 9: - message.months[i] = 9; - break; - case "OCTOBER": - case 10: - message.months[i] = 10; - break; - case "NOVEMBER": - case 11: - message.months[i] = 11; - break; - case "DECEMBER": - case 12: - message.months[i] = 12; - break; - } - } - if (object.backupWindow != null) { - if (typeof object.backupWindow !== "object") - throw TypeError(".google.cloud.backupdr.v1.StandardSchedule.backupWindow: object expected"); - message.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.fromObject(object.backupWindow); - } - if (object.timeZone != null) - message.timeZone = String(object.timeZone); - return message; - }; - - /** - * Creates a plain object from a StandardSchedule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {google.cloud.backupdr.v1.StandardSchedule} message StandardSchedule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StandardSchedule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.daysOfWeek = []; - object.daysOfMonth = []; - object.months = []; - } - if (options.defaults) { - object.recurrenceType = options.enums === String ? "RECURRENCE_TYPE_UNSPECIFIED" : 0; - object.hourlyFrequency = 0; - object.weekDayOfMonth = null; - object.backupWindow = null; - object.timeZone = ""; - } - if (message.recurrenceType != null && message.hasOwnProperty("recurrenceType")) - object.recurrenceType = options.enums === String ? $root.google.cloud.backupdr.v1.StandardSchedule.RecurrenceType[message.recurrenceType] === undefined ? message.recurrenceType : $root.google.cloud.backupdr.v1.StandardSchedule.RecurrenceType[message.recurrenceType] : message.recurrenceType; - if (message.hourlyFrequency != null && message.hasOwnProperty("hourlyFrequency")) - object.hourlyFrequency = message.hourlyFrequency; - if (message.daysOfWeek && message.daysOfWeek.length) { - object.daysOfWeek = []; - for (var j = 0; j < message.daysOfWeek.length; ++j) - object.daysOfWeek[j] = options.enums === String ? $root.google.type.DayOfWeek[message.daysOfWeek[j]] === undefined ? message.daysOfWeek[j] : $root.google.type.DayOfWeek[message.daysOfWeek[j]] : message.daysOfWeek[j]; - } - if (message.daysOfMonth && message.daysOfMonth.length) { - object.daysOfMonth = []; - for (var j = 0; j < message.daysOfMonth.length; ++j) - object.daysOfMonth[j] = message.daysOfMonth[j]; - } - if (message.weekDayOfMonth != null && message.hasOwnProperty("weekDayOfMonth")) - object.weekDayOfMonth = $root.google.cloud.backupdr.v1.WeekDayOfMonth.toObject(message.weekDayOfMonth, options); - if (message.months && message.months.length) { - object.months = []; - for (var j = 0; j < message.months.length; ++j) - object.months[j] = options.enums === String ? $root.google.type.Month[message.months[j]] === undefined ? message.months[j] : $root.google.type.Month[message.months[j]] : message.months[j]; - } - if (message.backupWindow != null && message.hasOwnProperty("backupWindow")) - object.backupWindow = $root.google.cloud.backupdr.v1.BackupWindow.toObject(message.backupWindow, options); - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - object.timeZone = message.timeZone; - return object; - }; - - /** - * Converts this StandardSchedule to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @instance - * @returns {Object.} JSON object - */ - StandardSchedule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StandardSchedule - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.StandardSchedule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StandardSchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.StandardSchedule"; - }; - - /** - * RecurrenceType enum. - * @name google.cloud.backupdr.v1.StandardSchedule.RecurrenceType - * @enum {number} - * @property {number} RECURRENCE_TYPE_UNSPECIFIED=0 RECURRENCE_TYPE_UNSPECIFIED value - * @property {number} HOURLY=1 HOURLY value - * @property {number} DAILY=2 DAILY value - * @property {number} WEEKLY=3 WEEKLY value - * @property {number} MONTHLY=4 MONTHLY value - * @property {number} YEARLY=5 YEARLY value - */ - StandardSchedule.RecurrenceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RECURRENCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HOURLY"] = 1; - values[valuesById[2] = "DAILY"] = 2; - values[valuesById[3] = "WEEKLY"] = 3; - values[valuesById[4] = "MONTHLY"] = 4; - values[valuesById[5] = "YEARLY"] = 5; - return values; - })(); - - return StandardSchedule; - })(); - - v1.BackupWindow = (function() { - - /** - * Properties of a BackupWindow. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupWindow - * @property {number|null} [startHourOfDay] BackupWindow startHourOfDay - * @property {number|null} [endHourOfDay] BackupWindow endHourOfDay - */ - - /** - * Constructs a new BackupWindow. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupWindow. - * @implements IBackupWindow - * @constructor - * @param {google.cloud.backupdr.v1.IBackupWindow=} [properties] Properties to set - */ - function BackupWindow(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupWindow startHourOfDay. - * @member {number} startHourOfDay - * @memberof google.cloud.backupdr.v1.BackupWindow - * @instance - */ - BackupWindow.prototype.startHourOfDay = 0; - - /** - * BackupWindow endHourOfDay. - * @member {number} endHourOfDay - * @memberof google.cloud.backupdr.v1.BackupWindow - * @instance - */ - BackupWindow.prototype.endHourOfDay = 0; - - /** - * Creates a new BackupWindow instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {google.cloud.backupdr.v1.IBackupWindow=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow instance - */ - BackupWindow.create = function create(properties) { - return new BackupWindow(properties); - }; - - /** - * Encodes the specified BackupWindow message. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {google.cloud.backupdr.v1.IBackupWindow} message BackupWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupWindow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startHourOfDay != null && Object.hasOwnProperty.call(message, "startHourOfDay")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startHourOfDay); - if (message.endHourOfDay != null && Object.hasOwnProperty.call(message, "endHourOfDay")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endHourOfDay); - return writer; - }; - - /** - * Encodes the specified BackupWindow message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupWindow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {google.cloud.backupdr.v1.IBackupWindow} message BackupWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupWindow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupWindow message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupWindow.decode = function 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.backupdr.v1.BackupWindow(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.startHourOfDay = reader.int32(); - break; - } - case 2: { - message.endHourOfDay = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupWindow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupWindow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupWindow message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupWindow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startHourOfDay != null && message.hasOwnProperty("startHourOfDay")) - if (!$util.isInteger(message.startHourOfDay)) - return "startHourOfDay: integer expected"; - if (message.endHourOfDay != null && message.hasOwnProperty("endHourOfDay")) - if (!$util.isInteger(message.endHourOfDay)) - return "endHourOfDay: integer expected"; - return null; - }; - - /** - * Creates a BackupWindow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupWindow} BackupWindow - */ - BackupWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupWindow) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupWindow(); - if (object.startHourOfDay != null) - message.startHourOfDay = object.startHourOfDay | 0; - if (object.endHourOfDay != null) - message.endHourOfDay = object.endHourOfDay | 0; - return message; - }; - - /** - * Creates a plain object from a BackupWindow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {google.cloud.backupdr.v1.BackupWindow} message BackupWindow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupWindow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startHourOfDay = 0; - object.endHourOfDay = 0; - } - if (message.startHourOfDay != null && message.hasOwnProperty("startHourOfDay")) - object.startHourOfDay = message.startHourOfDay; - if (message.endHourOfDay != null && message.hasOwnProperty("endHourOfDay")) - object.endHourOfDay = message.endHourOfDay; - return object; - }; - - /** - * Converts this BackupWindow to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupWindow - * @instance - * @returns {Object.} JSON object - */ - BackupWindow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupWindow - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupWindow - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupWindow"; - }; - - return BackupWindow; - })(); - - v1.WeekDayOfMonth = (function() { - - /** - * Properties of a WeekDayOfMonth. - * @memberof google.cloud.backupdr.v1 - * @interface IWeekDayOfMonth - * @property {google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth|null} [weekOfMonth] WeekDayOfMonth weekOfMonth - * @property {google.type.DayOfWeek|null} [dayOfWeek] WeekDayOfMonth dayOfWeek - */ - - /** - * Constructs a new WeekDayOfMonth. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a WeekDayOfMonth. - * @implements IWeekDayOfMonth - * @constructor - * @param {google.cloud.backupdr.v1.IWeekDayOfMonth=} [properties] Properties to set - */ - function WeekDayOfMonth(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WeekDayOfMonth weekOfMonth. - * @member {google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth} weekOfMonth - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @instance - */ - WeekDayOfMonth.prototype.weekOfMonth = 0; - - /** - * WeekDayOfMonth dayOfWeek. - * @member {google.type.DayOfWeek} dayOfWeek - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @instance - */ - WeekDayOfMonth.prototype.dayOfWeek = 0; - - /** - * Creates a new WeekDayOfMonth instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {google.cloud.backupdr.v1.IWeekDayOfMonth=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth instance - */ - WeekDayOfMonth.create = function create(properties) { - return new WeekDayOfMonth(properties); - }; - - /** - * Encodes the specified WeekDayOfMonth message. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {google.cloud.backupdr.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeekDayOfMonth.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.weekOfMonth != null && Object.hasOwnProperty.call(message, "weekOfMonth")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.weekOfMonth); - if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dayOfWeek); - return writer; - }; - - /** - * Encodes the specified WeekDayOfMonth message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.WeekDayOfMonth.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {google.cloud.backupdr.v1.IWeekDayOfMonth} message WeekDayOfMonth message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeekDayOfMonth.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeekDayOfMonth.decode = function 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.backupdr.v1.WeekDayOfMonth(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.weekOfMonth = reader.int32(); - break; - } - case 2: { - message.dayOfWeek = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WeekDayOfMonth message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeekDayOfMonth.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WeekDayOfMonth message. - * @function verify - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WeekDayOfMonth.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.weekOfMonth != null && message.hasOwnProperty("weekOfMonth")) - switch (message.weekOfMonth) { - default: - return "weekOfMonth: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - switch (message.dayOfWeek) { - default: - return "dayOfWeek: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - return null; - }; - - /** - * Creates a WeekDayOfMonth message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.WeekDayOfMonth} WeekDayOfMonth - */ - WeekDayOfMonth.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.WeekDayOfMonth) - return object; - var message = new $root.google.cloud.backupdr.v1.WeekDayOfMonth(); - switch (object.weekOfMonth) { - default: - if (typeof object.weekOfMonth === "number") { - message.weekOfMonth = object.weekOfMonth; - break; - } - break; - case "WEEK_OF_MONTH_UNSPECIFIED": - case 0: - message.weekOfMonth = 0; - break; - case "FIRST": - case 1: - message.weekOfMonth = 1; - break; - case "SECOND": - case 2: - message.weekOfMonth = 2; - break; - case "THIRD": - case 3: - message.weekOfMonth = 3; - break; - case "FOURTH": - case 4: - message.weekOfMonth = 4; - break; - case "LAST": - case 5: - message.weekOfMonth = 5; - break; - } - switch (object.dayOfWeek) { - default: - if (typeof object.dayOfWeek === "number") { - message.dayOfWeek = object.dayOfWeek; - break; - } - break; - case "DAY_OF_WEEK_UNSPECIFIED": - case 0: - message.dayOfWeek = 0; - break; - case "MONDAY": - case 1: - message.dayOfWeek = 1; - break; - case "TUESDAY": - case 2: - message.dayOfWeek = 2; - break; - case "WEDNESDAY": - case 3: - message.dayOfWeek = 3; - break; - case "THURSDAY": - case 4: - message.dayOfWeek = 4; - break; - case "FRIDAY": - case 5: - message.dayOfWeek = 5; - break; - case "SATURDAY": - case 6: - message.dayOfWeek = 6; - break; - case "SUNDAY": - case 7: - message.dayOfWeek = 7; - break; - } - return message; - }; - - /** - * Creates a plain object from a WeekDayOfMonth message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {google.cloud.backupdr.v1.WeekDayOfMonth} message WeekDayOfMonth - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WeekDayOfMonth.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.weekOfMonth = options.enums === String ? "WEEK_OF_MONTH_UNSPECIFIED" : 0; - object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; - } - if (message.weekOfMonth != null && message.hasOwnProperty("weekOfMonth")) - object.weekOfMonth = options.enums === String ? $root.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth] === undefined ? message.weekOfMonth : $root.google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth[message.weekOfMonth] : message.weekOfMonth; - if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) - object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] === undefined ? message.dayOfWeek : $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; - return object; - }; - - /** - * Converts this WeekDayOfMonth to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @instance - * @returns {Object.} JSON object - */ - WeekDayOfMonth.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WeekDayOfMonth - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.WeekDayOfMonth - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WeekDayOfMonth.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.WeekDayOfMonth"; - }; - - /** - * WeekOfMonth enum. - * @name google.cloud.backupdr.v1.WeekDayOfMonth.WeekOfMonth - * @enum {number} - * @property {number} WEEK_OF_MONTH_UNSPECIFIED=0 WEEK_OF_MONTH_UNSPECIFIED value - * @property {number} FIRST=1 FIRST value - * @property {number} SECOND=2 SECOND value - * @property {number} THIRD=3 THIRD value - * @property {number} FOURTH=4 FOURTH value - * @property {number} LAST=5 LAST value - */ - WeekDayOfMonth.WeekOfMonth = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "WEEK_OF_MONTH_UNSPECIFIED"] = 0; - values[valuesById[1] = "FIRST"] = 1; - values[valuesById[2] = "SECOND"] = 2; - values[valuesById[3] = "THIRD"] = 3; - values[valuesById[4] = "FOURTH"] = 4; - values[valuesById[5] = "LAST"] = 5; - return values; - })(); - - return WeekDayOfMonth; - })(); - - v1.CreateBackupPlanRequest = (function() { - - /** - * Properties of a CreateBackupPlanRequest. - * @memberof google.cloud.backupdr.v1 - * @interface ICreateBackupPlanRequest - * @property {string|null} [parent] CreateBackupPlanRequest parent - * @property {string|null} [backupPlanId] CreateBackupPlanRequest backupPlanId - * @property {google.cloud.backupdr.v1.IBackupPlan|null} [backupPlan] CreateBackupPlanRequest backupPlan - * @property {string|null} [requestId] CreateBackupPlanRequest requestId - */ - - /** - * Constructs a new CreateBackupPlanRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CreateBackupPlanRequest. - * @implements ICreateBackupPlanRequest - * @constructor - * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest=} [properties] Properties to set - */ - function CreateBackupPlanRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateBackupPlanRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @instance - */ - CreateBackupPlanRequest.prototype.parent = ""; - - /** - * CreateBackupPlanRequest backupPlanId. - * @member {string} backupPlanId - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @instance - */ - CreateBackupPlanRequest.prototype.backupPlanId = ""; - - /** - * CreateBackupPlanRequest backupPlan. - * @member {google.cloud.backupdr.v1.IBackupPlan|null|undefined} backupPlan - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @instance - */ - CreateBackupPlanRequest.prototype.backupPlan = null; - - /** - * CreateBackupPlanRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @instance - */ - CreateBackupPlanRequest.prototype.requestId = ""; - - /** - * Creates a new CreateBackupPlanRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest instance - */ - CreateBackupPlanRequest.create = function create(properties) { - return new CreateBackupPlanRequest(properties); - }; - - /** - * Encodes the specified CreateBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} message CreateBackupPlanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupPlanRequest.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.backupPlanId != null && Object.hasOwnProperty.call(message, "backupPlanId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanId); - if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) - $root.google.cloud.backupdr.v1.BackupPlan.encode(message.backupPlan, 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 CreateBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupPlanRequest} message CreateBackupPlanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateBackupPlanRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupPlanRequest.decode = function 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.backupdr.v1.CreateBackupPlanRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.backupPlanId = reader.string(); - break; - } - case 3: { - message.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateBackupPlanRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateBackupPlanRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateBackupPlanRequest.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.backupPlanId != null && message.hasOwnProperty("backupPlanId")) - if (!$util.isString(message.backupPlanId)) - return "backupPlanId: string expected"; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) { - var error = $root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlan); - if (error) - return "backupPlan." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a CreateBackupPlanRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CreateBackupPlanRequest} CreateBackupPlanRequest - */ - CreateBackupPlanRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupPlanRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.CreateBackupPlanRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.backupPlanId != null) - message.backupPlanId = String(object.backupPlanId); - if (object.backupPlan != null) { - if (typeof object.backupPlan !== "object") - throw TypeError(".google.cloud.backupdr.v1.CreateBackupPlanRequest.backupPlan: object expected"); - message.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlan); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a CreateBackupPlanRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.CreateBackupPlanRequest} message CreateBackupPlanRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateBackupPlanRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.backupPlanId = ""; - object.backupPlan = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.backupPlanId != null && message.hasOwnProperty("backupPlanId")) - object.backupPlanId = message.backupPlanId; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - object.backupPlan = $root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlan, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this CreateBackupPlanRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @instance - * @returns {Object.} JSON object - */ - CreateBackupPlanRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateBackupPlanRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CreateBackupPlanRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupPlanRequest"; - }; - - return CreateBackupPlanRequest; - })(); - - v1.ListBackupPlansRequest = (function() { - - /** - * Properties of a ListBackupPlansRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupPlansRequest - * @property {string|null} [parent] ListBackupPlansRequest parent - * @property {number|null} [pageSize] ListBackupPlansRequest pageSize - * @property {string|null} [pageToken] ListBackupPlansRequest pageToken - * @property {string|null} [filter] ListBackupPlansRequest filter - * @property {string|null} [orderBy] ListBackupPlansRequest orderBy - */ - - /** - * Constructs a new ListBackupPlansRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupPlansRequest. - * @implements IListBackupPlansRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupPlansRequest=} [properties] Properties to set - */ - function ListBackupPlansRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListBackupPlansRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @instance - */ - ListBackupPlansRequest.prototype.parent = ""; - - /** - * ListBackupPlansRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @instance - */ - ListBackupPlansRequest.prototype.pageSize = 0; - - /** - * ListBackupPlansRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @instance - */ - ListBackupPlansRequest.prototype.pageToken = ""; - - /** - * ListBackupPlansRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @instance - */ - ListBackupPlansRequest.prototype.filter = ""; - - /** - * ListBackupPlansRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @instance - */ - ListBackupPlansRequest.prototype.orderBy = ""; - - /** - * Creates a new ListBackupPlansRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlansRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest instance - */ - ListBackupPlansRequest.create = function create(properties) { - return new ListBackupPlansRequest(properties); - }; - - /** - * Encodes the specified ListBackupPlansRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} message ListBackupPlansRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlansRequest.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 ListBackupPlansRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlansRequest} message ListBackupPlansRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlansRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupPlansRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlansRequest.decode = function 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.backupdr.v1.ListBackupPlansRequest(); - 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 ListBackupPlansRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlansRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupPlansRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupPlansRequest.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 ListBackupPlansRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupPlansRequest} ListBackupPlansRequest - */ - ListBackupPlansRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlansRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupPlansRequest(); - 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 ListBackupPlansRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {google.cloud.backupdr.v1.ListBackupPlansRequest} message ListBackupPlansRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupPlansRequest.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 ListBackupPlansRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @instance - * @returns {Object.} JSON object - */ - ListBackupPlansRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupPlansRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupPlansRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupPlansRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlansRequest"; - }; - - return ListBackupPlansRequest; - })(); - - v1.ListBackupPlansResponse = (function() { - - /** - * Properties of a ListBackupPlansResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupPlansResponse - * @property {Array.|null} [backupPlans] ListBackupPlansResponse backupPlans - * @property {string|null} [nextPageToken] ListBackupPlansResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupPlansResponse unreachable - */ - - /** - * Constructs a new ListBackupPlansResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupPlansResponse. - * @implements IListBackupPlansResponse - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupPlansResponse=} [properties] Properties to set - */ - function ListBackupPlansResponse(properties) { - this.backupPlans = []; - 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]]; - } - - /** - * ListBackupPlansResponse backupPlans. - * @member {Array.} backupPlans - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @instance - */ - ListBackupPlansResponse.prototype.backupPlans = $util.emptyArray; - - /** - * ListBackupPlansResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @instance - */ - ListBackupPlansResponse.prototype.nextPageToken = ""; - - /** - * ListBackupPlansResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @instance - */ - ListBackupPlansResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListBackupPlansResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlansResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse instance - */ - ListBackupPlansResponse.create = function create(properties) { - return new ListBackupPlansResponse(properties); - }; - - /** - * Encodes the specified ListBackupPlansResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlansResponse} message ListBackupPlansResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlansResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupPlans != null && message.backupPlans.length) - for (var i = 0; i < message.backupPlans.length; ++i) - $root.google.cloud.backupdr.v1.BackupPlan.encode(message.backupPlans[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 ListBackupPlansResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlansResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlansResponse} message ListBackupPlansResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlansResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupPlansResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlansResponse.decode = function 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.backupdr.v1.ListBackupPlansResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.backupPlans && message.backupPlans.length)) - message.backupPlans = []; - message.backupPlans.push($root.google.cloud.backupdr.v1.BackupPlan.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 ListBackupPlansResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlansResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupPlansResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupPlansResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupPlans != null && message.hasOwnProperty("backupPlans")) { - if (!Array.isArray(message.backupPlans)) - return "backupPlans: array expected"; - for (var i = 0; i < message.backupPlans.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupPlan.verify(message.backupPlans[i]); - if (error) - return "backupPlans." + 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 ListBackupPlansResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupPlansResponse} ListBackupPlansResponse - */ - ListBackupPlansResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlansResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupPlansResponse(); - if (object.backupPlans) { - if (!Array.isArray(object.backupPlans)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.backupPlans: array expected"); - message.backupPlans = []; - for (var i = 0; i < object.backupPlans.length; ++i) { - if (typeof object.backupPlans[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.backupPlans: object expected"); - message.backupPlans[i] = $root.google.cloud.backupdr.v1.BackupPlan.fromObject(object.backupPlans[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupPlansResponse.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 ListBackupPlansResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {google.cloud.backupdr.v1.ListBackupPlansResponse} message ListBackupPlansResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupPlansResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backupPlans = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backupPlans && message.backupPlans.length) { - object.backupPlans = []; - for (var j = 0; j < message.backupPlans.length; ++j) - object.backupPlans[j] = $root.google.cloud.backupdr.v1.BackupPlan.toObject(message.backupPlans[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 ListBackupPlansResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @instance - * @returns {Object.} JSON object - */ - ListBackupPlansResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupPlansResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupPlansResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupPlansResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlansResponse"; - }; - - return ListBackupPlansResponse; - })(); - - v1.GetBackupPlanRequest = (function() { - - /** - * Properties of a GetBackupPlanRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetBackupPlanRequest - * @property {string|null} [name] GetBackupPlanRequest name - */ - - /** - * Constructs a new GetBackupPlanRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetBackupPlanRequest. - * @implements IGetBackupPlanRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest=} [properties] Properties to set - */ - function GetBackupPlanRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetBackupPlanRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @instance - */ - GetBackupPlanRequest.prototype.name = ""; - - /** - * Creates a new GetBackupPlanRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest instance - */ - GetBackupPlanRequest.create = function create(properties) { - return new GetBackupPlanRequest(properties); - }; - - /** - * Encodes the specified GetBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} message GetBackupPlanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupPlanRequest.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 GetBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupPlanRequest} message GetBackupPlanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetBackupPlanRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupPlanRequest.decode = function 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.backupdr.v1.GetBackupPlanRequest(); - 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 GetBackupPlanRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBackupPlanRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBackupPlanRequest.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 GetBackupPlanRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetBackupPlanRequest} GetBackupPlanRequest - */ - GetBackupPlanRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.GetBackupPlanRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetBackupPlanRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.GetBackupPlanRequest} message GetBackupPlanRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetBackupPlanRequest.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 GetBackupPlanRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @instance - * @returns {Object.} JSON object - */ - GetBackupPlanRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetBackupPlanRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetBackupPlanRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupPlanRequest"; - }; - - return GetBackupPlanRequest; - })(); - - v1.DeleteBackupPlanRequest = (function() { - - /** - * Properties of a DeleteBackupPlanRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IDeleteBackupPlanRequest - * @property {string|null} [name] DeleteBackupPlanRequest name - * @property {string|null} [requestId] DeleteBackupPlanRequest requestId - */ - - /** - * Constructs a new DeleteBackupPlanRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DeleteBackupPlanRequest. - * @implements IDeleteBackupPlanRequest - * @constructor - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest=} [properties] Properties to set - */ - function DeleteBackupPlanRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteBackupPlanRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @instance - */ - DeleteBackupPlanRequest.prototype.name = ""; - - /** - * DeleteBackupPlanRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @instance - */ - DeleteBackupPlanRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteBackupPlanRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest instance - */ - DeleteBackupPlanRequest.create = function create(properties) { - return new DeleteBackupPlanRequest(properties); - }; - - /** - * Encodes the specified DeleteBackupPlanRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} message DeleteBackupPlanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupPlanRequest.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 DeleteBackupPlanRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanRequest} message DeleteBackupPlanRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupPlanRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteBackupPlanRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupPlanRequest.decode = function 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.backupdr.v1.DeleteBackupPlanRequest(); - 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 DeleteBackupPlanRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupPlanRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteBackupPlanRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteBackupPlanRequest.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 DeleteBackupPlanRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanRequest} DeleteBackupPlanRequest - */ - DeleteBackupPlanRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.DeleteBackupPlanRequest(); - 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 DeleteBackupPlanRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {google.cloud.backupdr.v1.DeleteBackupPlanRequest} message DeleteBackupPlanRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteBackupPlanRequest.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 DeleteBackupPlanRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteBackupPlanRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteBackupPlanRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteBackupPlanRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupPlanRequest"; - }; - - return DeleteBackupPlanRequest; - })(); - - v1.BackupPlanAssociation = (function() { - - /** - * Properties of a BackupPlanAssociation. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupPlanAssociation - * @property {string|null} [name] BackupPlanAssociation name - * @property {string|null} [resourceType] BackupPlanAssociation resourceType - * @property {string|null} [resource] BackupPlanAssociation resource - * @property {string|null} [backupPlan] BackupPlanAssociation backupPlan - * @property {google.protobuf.ITimestamp|null} [createTime] BackupPlanAssociation createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] BackupPlanAssociation updateTime - * @property {google.cloud.backupdr.v1.BackupPlanAssociation.State|null} [state] BackupPlanAssociation state - * @property {Array.|null} [rulesConfigInfo] BackupPlanAssociation rulesConfigInfo - * @property {string|null} [dataSource] BackupPlanAssociation dataSource - */ - - /** - * Constructs a new BackupPlanAssociation. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupPlanAssociation. - * @implements IBackupPlanAssociation - * @constructor - * @param {google.cloud.backupdr.v1.IBackupPlanAssociation=} [properties] Properties to set - */ - function BackupPlanAssociation(properties) { - this.rulesConfigInfo = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupPlanAssociation name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.name = ""; - - /** - * BackupPlanAssociation resourceType. - * @member {string} resourceType - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.resourceType = ""; - - /** - * BackupPlanAssociation resource. - * @member {string} resource - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.resource = ""; - - /** - * BackupPlanAssociation backupPlan. - * @member {string} backupPlan - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.backupPlan = ""; - - /** - * BackupPlanAssociation createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.createTime = null; - - /** - * BackupPlanAssociation updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.updateTime = null; - - /** - * BackupPlanAssociation state. - * @member {google.cloud.backupdr.v1.BackupPlanAssociation.State} state - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.state = 0; - - /** - * BackupPlanAssociation rulesConfigInfo. - * @member {Array.} rulesConfigInfo - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.rulesConfigInfo = $util.emptyArray; - - /** - * BackupPlanAssociation dataSource. - * @member {string} dataSource - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - */ - BackupPlanAssociation.prototype.dataSource = ""; - - /** - * Creates a new BackupPlanAssociation instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {google.cloud.backupdr.v1.IBackupPlanAssociation=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation instance - */ - BackupPlanAssociation.create = function create(properties) { - return new BackupPlanAssociation(properties); - }; - - /** - * Encodes the specified BackupPlanAssociation message. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {google.cloud.backupdr.v1.IBackupPlanAssociation} message BackupPlanAssociation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupPlanAssociation.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.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceType); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); - if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.backupPlan); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); - if (message.rulesConfigInfo != null && message.rulesConfigInfo.length) - for (var i = 0; i < message.rulesConfigInfo.length; ++i) - $root.google.cloud.backupdr.v1.RuleConfigInfo.encode(message.rulesConfigInfo[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.dataSource); - return writer; - }; - - /** - * Encodes the specified BackupPlanAssociation message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupPlanAssociation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {google.cloud.backupdr.v1.IBackupPlanAssociation} message BackupPlanAssociation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupPlanAssociation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupPlanAssociation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupPlanAssociation.decode = function 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.backupdr.v1.BackupPlanAssociation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.resourceType = reader.string(); - break; - } - case 3: { - message.resource = reader.string(); - break; - } - case 4: { - message.backupPlan = reader.string(); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.state = reader.int32(); - break; - } - case 8: { - if (!(message.rulesConfigInfo && message.rulesConfigInfo.length)) - message.rulesConfigInfo = []; - message.rulesConfigInfo.push($root.google.cloud.backupdr.v1.RuleConfigInfo.decode(reader, reader.uint32())); - break; - } - case 9: { - message.dataSource = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupPlanAssociation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupPlanAssociation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupPlanAssociation message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupPlanAssociation.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.resourceType != null && message.hasOwnProperty("resourceType")) - if (!$util.isString(message.resourceType)) - return "resourceType: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - if (!$util.isString(message.backupPlan)) - return "backupPlan: 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.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.rulesConfigInfo != null && message.hasOwnProperty("rulesConfigInfo")) { - if (!Array.isArray(message.rulesConfigInfo)) - return "rulesConfigInfo: array expected"; - for (var i = 0; i < message.rulesConfigInfo.length; ++i) { - var error = $root.google.cloud.backupdr.v1.RuleConfigInfo.verify(message.rulesConfigInfo[i]); - if (error) - return "rulesConfigInfo." + error; - } - } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: string expected"; - return null; - }; - - /** - * Creates a BackupPlanAssociation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupPlanAssociation} BackupPlanAssociation - */ - BackupPlanAssociation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupPlanAssociation) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupPlanAssociation(); - if (object.name != null) - message.name = String(object.name); - if (object.resourceType != null) - message.resourceType = String(object.resourceType); - if (object.resource != null) - message.resource = String(object.resource); - if (object.backupPlan != null) - message.backupPlan = String(object.backupPlan); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.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.backupdr.v1.BackupPlanAssociation.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - 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 "ACTIVE": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "INACTIVE": - case 4: - message.state = 4; - break; - } - if (object.rulesConfigInfo) { - if (!Array.isArray(object.rulesConfigInfo)) - throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.rulesConfigInfo: array expected"); - message.rulesConfigInfo = []; - for (var i = 0; i < object.rulesConfigInfo.length; ++i) { - if (typeof object.rulesConfigInfo[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupPlanAssociation.rulesConfigInfo: object expected"); - message.rulesConfigInfo[i] = $root.google.cloud.backupdr.v1.RuleConfigInfo.fromObject(object.rulesConfigInfo[i]); - } - } - if (object.dataSource != null) - message.dataSource = String(object.dataSource); - return message; - }; - - /** - * Creates a plain object from a BackupPlanAssociation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {google.cloud.backupdr.v1.BackupPlanAssociation} message BackupPlanAssociation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupPlanAssociation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rulesConfigInfo = []; - if (options.defaults) { - object.name = ""; - object.resourceType = ""; - object.resource = ""; - object.backupPlan = ""; - object.createTime = null; - object.updateTime = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.dataSource = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = message.resourceType; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - object.backupPlan = message.backupPlan; - 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.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupPlanAssociation.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupPlanAssociation.State[message.state] : message.state; - if (message.rulesConfigInfo && message.rulesConfigInfo.length) { - object.rulesConfigInfo = []; - for (var j = 0; j < message.rulesConfigInfo.length; ++j) - object.rulesConfigInfo[j] = $root.google.cloud.backupdr.v1.RuleConfigInfo.toObject(message.rulesConfigInfo[j], options); - } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; - return object; - }; - - /** - * Converts this BackupPlanAssociation to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @instance - * @returns {Object.} JSON object - */ - BackupPlanAssociation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupPlanAssociation - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupPlanAssociation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupPlanAssociation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupPlanAssociation"; - }; - - /** - * State enum. - * @name google.cloud.backupdr.v1.BackupPlanAssociation.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} DELETING=3 DELETING value - * @property {number} INACTIVE=4 INACTIVE value - */ - BackupPlanAssociation.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "INACTIVE"] = 4; - return values; - })(); - - return BackupPlanAssociation; - })(); - - v1.RuleConfigInfo = (function() { - - /** - * Properties of a RuleConfigInfo. - * @memberof google.cloud.backupdr.v1 - * @interface IRuleConfigInfo - * @property {string|null} [ruleId] RuleConfigInfo ruleId - * @property {google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState|null} [lastBackupState] RuleConfigInfo lastBackupState - * @property {google.rpc.IStatus|null} [lastBackupError] RuleConfigInfo lastBackupError - * @property {google.protobuf.ITimestamp|null} [lastSuccessfulBackupConsistencyTime] RuleConfigInfo lastSuccessfulBackupConsistencyTime - */ - - /** - * Constructs a new RuleConfigInfo. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a RuleConfigInfo. - * @implements IRuleConfigInfo - * @constructor - * @param {google.cloud.backupdr.v1.IRuleConfigInfo=} [properties] Properties to set - */ - function RuleConfigInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RuleConfigInfo ruleId. - * @member {string} ruleId - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @instance - */ - RuleConfigInfo.prototype.ruleId = ""; - - /** - * RuleConfigInfo lastBackupState. - * @member {google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState} lastBackupState - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @instance - */ - RuleConfigInfo.prototype.lastBackupState = 0; - - /** - * RuleConfigInfo lastBackupError. - * @member {google.rpc.IStatus|null|undefined} lastBackupError - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @instance - */ - RuleConfigInfo.prototype.lastBackupError = null; - - /** - * RuleConfigInfo lastSuccessfulBackupConsistencyTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastSuccessfulBackupConsistencyTime - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @instance - */ - RuleConfigInfo.prototype.lastSuccessfulBackupConsistencyTime = null; - - /** - * Creates a new RuleConfigInfo instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IRuleConfigInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo instance - */ - RuleConfigInfo.create = function create(properties) { - return new RuleConfigInfo(properties); - }; - - /** - * Encodes the specified RuleConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IRuleConfigInfo} message RuleConfigInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RuleConfigInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ruleId); - if (message.lastBackupState != null && Object.hasOwnProperty.call(message, "lastBackupState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.lastBackupState); - if (message.lastBackupError != null && Object.hasOwnProperty.call(message, "lastBackupError")) - $root.google.rpc.Status.encode(message.lastBackupError, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.lastSuccessfulBackupConsistencyTime != null && Object.hasOwnProperty.call(message, "lastSuccessfulBackupConsistencyTime")) - $root.google.protobuf.Timestamp.encode(message.lastSuccessfulBackupConsistencyTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RuleConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RuleConfigInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IRuleConfigInfo} message RuleConfigInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RuleConfigInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RuleConfigInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RuleConfigInfo.decode = function 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.backupdr.v1.RuleConfigInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ruleId = reader.string(); - break; - } - case 3: { - message.lastBackupState = reader.int32(); - break; - } - case 4: { - message.lastBackupError = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 5: { - message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RuleConfigInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RuleConfigInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RuleConfigInfo message. - * @function verify - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RuleConfigInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ruleId != null && message.hasOwnProperty("ruleId")) - if (!$util.isString(message.ruleId)) - return "ruleId: string expected"; - if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) - switch (message.lastBackupState) { - default: - return "lastBackupState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) { - var error = $root.google.rpc.Status.verify(message.lastBackupError); - if (error) - return "lastBackupError." + error; - } - if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime); - if (error) - return "lastSuccessfulBackupConsistencyTime." + error; - } - return null; - }; - - /** - * Creates a RuleConfigInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.RuleConfigInfo} RuleConfigInfo - */ - RuleConfigInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.RuleConfigInfo) - return object; - var message = new $root.google.cloud.backupdr.v1.RuleConfigInfo(); - if (object.ruleId != null) - message.ruleId = String(object.ruleId); - switch (object.lastBackupState) { - default: - if (typeof object.lastBackupState === "number") { - message.lastBackupState = object.lastBackupState; - break; - } - break; - case "LAST_BACKUP_STATE_UNSPECIFIED": - case 0: - message.lastBackupState = 0; - break; - case "FIRST_BACKUP_PENDING": - case 1: - message.lastBackupState = 1; - break; - case "PERMISSION_DENIED": - case 2: - message.lastBackupState = 2; - break; - case "SUCCEEDED": - case 3: - message.lastBackupState = 3; - break; - case "FAILED": - case 4: - message.lastBackupState = 4; - break; - } - if (object.lastBackupError != null) { - if (typeof object.lastBackupError !== "object") - throw TypeError(".google.cloud.backupdr.v1.RuleConfigInfo.lastBackupError: object expected"); - message.lastBackupError = $root.google.rpc.Status.fromObject(object.lastBackupError); - } - if (object.lastSuccessfulBackupConsistencyTime != null) { - if (typeof object.lastSuccessfulBackupConsistencyTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.RuleConfigInfo.lastSuccessfulBackupConsistencyTime: object expected"); - message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime); - } - return message; - }; - - /** - * Creates a plain object from a RuleConfigInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {google.cloud.backupdr.v1.RuleConfigInfo} message RuleConfigInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RuleConfigInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.ruleId = ""; - object.lastBackupState = options.enums === String ? "LAST_BACKUP_STATE_UNSPECIFIED" : 0; - object.lastBackupError = null; - object.lastSuccessfulBackupConsistencyTime = null; - } - if (message.ruleId != null && message.hasOwnProperty("ruleId")) - object.ruleId = message.ruleId; - if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) - object.lastBackupState = options.enums === String ? $root.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState[message.lastBackupState] === undefined ? message.lastBackupState : $root.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState[message.lastBackupState] : message.lastBackupState; - if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) - object.lastBackupError = $root.google.rpc.Status.toObject(message.lastBackupError, options); - if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) - object.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime, options); - return object; - }; - - /** - * Converts this RuleConfigInfo to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @instance - * @returns {Object.} JSON object - */ - RuleConfigInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RuleConfigInfo - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.RuleConfigInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RuleConfigInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.RuleConfigInfo"; - }; - - /** - * LastBackupState enum. - * @name google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState - * @enum {number} - * @property {number} LAST_BACKUP_STATE_UNSPECIFIED=0 LAST_BACKUP_STATE_UNSPECIFIED value - * @property {number} FIRST_BACKUP_PENDING=1 FIRST_BACKUP_PENDING value - * @property {number} PERMISSION_DENIED=2 PERMISSION_DENIED value - * @property {number} SUCCEEDED=3 SUCCEEDED value - * @property {number} FAILED=4 FAILED value - */ - RuleConfigInfo.LastBackupState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAST_BACKUP_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FIRST_BACKUP_PENDING"] = 1; - values[valuesById[2] = "PERMISSION_DENIED"] = 2; - values[valuesById[3] = "SUCCEEDED"] = 3; - values[valuesById[4] = "FAILED"] = 4; - return values; - })(); - - return RuleConfigInfo; - })(); - - v1.CreateBackupPlanAssociationRequest = (function() { - - /** - * Properties of a CreateBackupPlanAssociationRequest. - * @memberof google.cloud.backupdr.v1 - * @interface ICreateBackupPlanAssociationRequest - * @property {string|null} [parent] CreateBackupPlanAssociationRequest parent - * @property {string|null} [backupPlanAssociationId] CreateBackupPlanAssociationRequest backupPlanAssociationId - * @property {google.cloud.backupdr.v1.IBackupPlanAssociation|null} [backupPlanAssociation] CreateBackupPlanAssociationRequest backupPlanAssociation - * @property {string|null} [requestId] CreateBackupPlanAssociationRequest requestId - */ - - /** - * Constructs a new CreateBackupPlanAssociationRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CreateBackupPlanAssociationRequest. - * @implements ICreateBackupPlanAssociationRequest - * @constructor - * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest=} [properties] Properties to set - */ - function CreateBackupPlanAssociationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateBackupPlanAssociationRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @instance - */ - CreateBackupPlanAssociationRequest.prototype.parent = ""; - - /** - * CreateBackupPlanAssociationRequest backupPlanAssociationId. - * @member {string} backupPlanAssociationId - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @instance - */ - CreateBackupPlanAssociationRequest.prototype.backupPlanAssociationId = ""; - - /** - * CreateBackupPlanAssociationRequest backupPlanAssociation. - * @member {google.cloud.backupdr.v1.IBackupPlanAssociation|null|undefined} backupPlanAssociation - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @instance - */ - CreateBackupPlanAssociationRequest.prototype.backupPlanAssociation = null; - - /** - * CreateBackupPlanAssociationRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @instance - */ - CreateBackupPlanAssociationRequest.prototype.requestId = ""; - - /** - * Creates a new CreateBackupPlanAssociationRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest instance - */ - CreateBackupPlanAssociationRequest.create = function create(properties) { - return new CreateBackupPlanAssociationRequest(properties); - }; - - /** - * Encodes the specified CreateBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupPlanAssociationRequest.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.backupPlanAssociationId != null && Object.hasOwnProperty.call(message, "backupPlanAssociationId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanAssociationId); - if (message.backupPlanAssociation != null && Object.hasOwnProperty.call(message, "backupPlanAssociation")) - $root.google.cloud.backupdr.v1.BackupPlanAssociation.encode(message.backupPlanAssociation, 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 CreateBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupPlanAssociationRequest.decode = function 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.backupdr.v1.CreateBackupPlanAssociationRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.backupPlanAssociationId = reader.string(); - break; - } - case 3: { - message.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateBackupPlanAssociationRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateBackupPlanAssociationRequest.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.backupPlanAssociationId != null && message.hasOwnProperty("backupPlanAssociationId")) - if (!$util.isString(message.backupPlanAssociationId)) - return "backupPlanAssociationId: string expected"; - if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) { - var error = $root.google.cloud.backupdr.v1.BackupPlanAssociation.verify(message.backupPlanAssociation); - if (error) - return "backupPlanAssociation." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a CreateBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} CreateBackupPlanAssociationRequest - */ - CreateBackupPlanAssociationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.backupPlanAssociationId != null) - message.backupPlanAssociationId = String(object.backupPlanAssociationId); - if (object.backupPlanAssociation != null) { - if (typeof object.backupPlanAssociation !== "object") - throw TypeError(".google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest.backupPlanAssociation: object expected"); - message.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.fromObject(object.backupPlanAssociation); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a CreateBackupPlanAssociationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest} message CreateBackupPlanAssociationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateBackupPlanAssociationRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.backupPlanAssociationId = ""; - object.backupPlanAssociation = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.backupPlanAssociationId != null && message.hasOwnProperty("backupPlanAssociationId")) - object.backupPlanAssociationId = message.backupPlanAssociationId; - if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) - object.backupPlanAssociation = $root.google.cloud.backupdr.v1.BackupPlanAssociation.toObject(message.backupPlanAssociation, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this CreateBackupPlanAssociationRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @instance - * @returns {Object.} JSON object - */ - CreateBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateBackupPlanAssociationRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest"; - }; - - return CreateBackupPlanAssociationRequest; - })(); - - v1.ListBackupPlanAssociationsRequest = (function() { - - /** - * Properties of a ListBackupPlanAssociationsRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupPlanAssociationsRequest - * @property {string|null} [parent] ListBackupPlanAssociationsRequest parent - * @property {number|null} [pageSize] ListBackupPlanAssociationsRequest pageSize - * @property {string|null} [pageToken] ListBackupPlanAssociationsRequest pageToken - * @property {string|null} [filter] ListBackupPlanAssociationsRequest filter - */ - - /** - * Constructs a new ListBackupPlanAssociationsRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupPlanAssociationsRequest. - * @implements IListBackupPlanAssociationsRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest=} [properties] Properties to set - */ - function ListBackupPlanAssociationsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListBackupPlanAssociationsRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @instance - */ - ListBackupPlanAssociationsRequest.prototype.parent = ""; - - /** - * ListBackupPlanAssociationsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @instance - */ - ListBackupPlanAssociationsRequest.prototype.pageSize = 0; - - /** - * ListBackupPlanAssociationsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @instance - */ - ListBackupPlanAssociationsRequest.prototype.pageToken = ""; - - /** - * ListBackupPlanAssociationsRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @instance - */ - ListBackupPlanAssociationsRequest.prototype.filter = ""; - - /** - * Creates a new ListBackupPlanAssociationsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest instance - */ - ListBackupPlanAssociationsRequest.create = function create(properties) { - return new ListBackupPlanAssociationsRequest(properties); - }; - - /** - * Encodes the specified ListBackupPlanAssociationsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlanAssociationsRequest.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); - return writer; - }; - - /** - * Encodes the specified ListBackupPlanAssociationsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlanAssociationsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlanAssociationsRequest.decode = function 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.backupdr.v1.ListBackupPlanAssociationsRequest(); - 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; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListBackupPlanAssociationsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlanAssociationsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupPlanAssociationsRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupPlanAssociationsRequest.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"; - return null; - }; - - /** - * Creates a ListBackupPlanAssociationsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} ListBackupPlanAssociationsRequest - */ - ListBackupPlanAssociationsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest(); - 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); - return message; - }; - - /** - * Creates a plain object from a ListBackupPlanAssociationsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest} message ListBackupPlanAssociationsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupPlanAssociationsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - 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; - return object; - }; - - /** - * Converts this ListBackupPlanAssociationsRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @instance - * @returns {Object.} JSON object - */ - ListBackupPlanAssociationsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupPlanAssociationsRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupPlanAssociationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest"; - }; - - return ListBackupPlanAssociationsRequest; - })(); - - v1.ListBackupPlanAssociationsResponse = (function() { - - /** - * Properties of a ListBackupPlanAssociationsResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupPlanAssociationsResponse - * @property {Array.|null} [backupPlanAssociations] ListBackupPlanAssociationsResponse backupPlanAssociations - * @property {string|null} [nextPageToken] ListBackupPlanAssociationsResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupPlanAssociationsResponse unreachable - */ - - /** - * Constructs a new ListBackupPlanAssociationsResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupPlanAssociationsResponse. - * @implements IListBackupPlanAssociationsResponse - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse=} [properties] Properties to set - */ - function ListBackupPlanAssociationsResponse(properties) { - this.backupPlanAssociations = []; - 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]]; - } - - /** - * ListBackupPlanAssociationsResponse backupPlanAssociations. - * @member {Array.} backupPlanAssociations - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @instance - */ - ListBackupPlanAssociationsResponse.prototype.backupPlanAssociations = $util.emptyArray; - - /** - * ListBackupPlanAssociationsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @instance - */ - ListBackupPlanAssociationsResponse.prototype.nextPageToken = ""; - - /** - * ListBackupPlanAssociationsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @instance - */ - ListBackupPlanAssociationsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListBackupPlanAssociationsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse instance - */ - ListBackupPlanAssociationsResponse.create = function create(properties) { - return new ListBackupPlanAssociationsResponse(properties); - }; - - /** - * Encodes the specified ListBackupPlanAssociationsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlanAssociationsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupPlanAssociations != null && message.backupPlanAssociations.length) - for (var i = 0; i < message.backupPlanAssociations.length; ++i) - $root.google.cloud.backupdr.v1.BackupPlanAssociation.encode(message.backupPlanAssociations[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 ListBackupPlanAssociationsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupPlanAssociationsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupPlanAssociationsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlanAssociationsResponse.decode = function 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.backupdr.v1.ListBackupPlanAssociationsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.backupPlanAssociations && message.backupPlanAssociations.length)) - message.backupPlanAssociations = []; - message.backupPlanAssociations.push($root.google.cloud.backupdr.v1.BackupPlanAssociation.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 ListBackupPlanAssociationsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupPlanAssociationsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupPlanAssociationsResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupPlanAssociationsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupPlanAssociations != null && message.hasOwnProperty("backupPlanAssociations")) { - if (!Array.isArray(message.backupPlanAssociations)) - return "backupPlanAssociations: array expected"; - for (var i = 0; i < message.backupPlanAssociations.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupPlanAssociation.verify(message.backupPlanAssociations[i]); - if (error) - return "backupPlanAssociations." + 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 ListBackupPlanAssociationsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} ListBackupPlanAssociationsResponse - */ - ListBackupPlanAssociationsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse(); - if (object.backupPlanAssociations) { - if (!Array.isArray(object.backupPlanAssociations)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.backupPlanAssociations: array expected"); - message.backupPlanAssociations = []; - for (var i = 0; i < object.backupPlanAssociations.length; ++i) { - if (typeof object.backupPlanAssociations[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.backupPlanAssociations: object expected"); - message.backupPlanAssociations[i] = $root.google.cloud.backupdr.v1.BackupPlanAssociation.fromObject(object.backupPlanAssociations[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse.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 ListBackupPlanAssociationsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse} message ListBackupPlanAssociationsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupPlanAssociationsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backupPlanAssociations = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backupPlanAssociations && message.backupPlanAssociations.length) { - object.backupPlanAssociations = []; - for (var j = 0; j < message.backupPlanAssociations.length; ++j) - object.backupPlanAssociations[j] = $root.google.cloud.backupdr.v1.BackupPlanAssociation.toObject(message.backupPlanAssociations[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 ListBackupPlanAssociationsResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @instance - * @returns {Object.} JSON object - */ - ListBackupPlanAssociationsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupPlanAssociationsResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupPlanAssociationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse"; - }; - - return ListBackupPlanAssociationsResponse; - })(); - - v1.GetBackupPlanAssociationRequest = (function() { - - /** - * Properties of a GetBackupPlanAssociationRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetBackupPlanAssociationRequest - * @property {string|null} [name] GetBackupPlanAssociationRequest name - */ - - /** - * Constructs a new GetBackupPlanAssociationRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetBackupPlanAssociationRequest. - * @implements IGetBackupPlanAssociationRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest=} [properties] Properties to set - */ - function GetBackupPlanAssociationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetBackupPlanAssociationRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @instance - */ - GetBackupPlanAssociationRequest.prototype.name = ""; - - /** - * Creates a new GetBackupPlanAssociationRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest instance - */ - GetBackupPlanAssociationRequest.create = function create(properties) { - return new GetBackupPlanAssociationRequest(properties); - }; - - /** - * Encodes the specified GetBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupPlanAssociationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetBackupPlanAssociationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupPlanAssociationRequest.decode = function 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.backupdr.v1.GetBackupPlanAssociationRequest(); - 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 GetBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBackupPlanAssociationRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} GetBackupPlanAssociationRequest - */ - GetBackupPlanAssociationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetBackupPlanAssociationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.GetBackupPlanAssociationRequest} message GetBackupPlanAssociationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetBackupPlanAssociationRequest.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 GetBackupPlanAssociationRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @instance - * @returns {Object.} JSON object - */ - GetBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetBackupPlanAssociationRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetBackupPlanAssociationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupPlanAssociationRequest"; - }; - - return GetBackupPlanAssociationRequest; - })(); - - v1.DeleteBackupPlanAssociationRequest = (function() { - - /** - * Properties of a DeleteBackupPlanAssociationRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IDeleteBackupPlanAssociationRequest - * @property {string|null} [name] DeleteBackupPlanAssociationRequest name - * @property {string|null} [requestId] DeleteBackupPlanAssociationRequest requestId - */ - - /** - * Constructs a new DeleteBackupPlanAssociationRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DeleteBackupPlanAssociationRequest. - * @implements IDeleteBackupPlanAssociationRequest - * @constructor - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest=} [properties] Properties to set - */ - function DeleteBackupPlanAssociationRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteBackupPlanAssociationRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @instance - */ - DeleteBackupPlanAssociationRequest.prototype.name = ""; - - /** - * DeleteBackupPlanAssociationRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @instance - */ - DeleteBackupPlanAssociationRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteBackupPlanAssociationRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest instance - */ - DeleteBackupPlanAssociationRequest.create = function create(properties) { - return new DeleteBackupPlanAssociationRequest(properties); - }; - - /** - * Encodes the specified DeleteBackupPlanAssociationRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupPlanAssociationRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteBackupPlanAssociationRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupPlanAssociationRequest.decode = function 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.backupdr.v1.DeleteBackupPlanAssociationRequest(); - 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 DeleteBackupPlanAssociationRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupPlanAssociationRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteBackupPlanAssociationRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} DeleteBackupPlanAssociationRequest - */ - DeleteBackupPlanAssociationRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest(); - 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 DeleteBackupPlanAssociationRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest} message DeleteBackupPlanAssociationRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteBackupPlanAssociationRequest.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 DeleteBackupPlanAssociationRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteBackupPlanAssociationRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteBackupPlanAssociationRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteBackupPlanAssociationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest"; - }; - - return DeleteBackupPlanAssociationRequest; - })(); - - v1.TriggerBackupRequest = (function() { - - /** - * Properties of a TriggerBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface ITriggerBackupRequest - * @property {string|null} [name] TriggerBackupRequest name - * @property {string|null} [ruleId] TriggerBackupRequest ruleId - * @property {string|null} [requestId] TriggerBackupRequest requestId - */ - - /** - * Constructs a new TriggerBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a TriggerBackupRequest. - * @implements ITriggerBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.ITriggerBackupRequest=} [properties] Properties to set - */ - function TriggerBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TriggerBackupRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @instance - */ - TriggerBackupRequest.prototype.name = ""; - - /** - * TriggerBackupRequest ruleId. - * @member {string} ruleId - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @instance - */ - TriggerBackupRequest.prototype.ruleId = ""; - - /** - * TriggerBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @instance - */ - TriggerBackupRequest.prototype.requestId = ""; - - /** - * Creates a new TriggerBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {google.cloud.backupdr.v1.ITriggerBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest instance - */ - TriggerBackupRequest.create = function create(properties) { - return new TriggerBackupRequest(properties); - }; - - /** - * Encodes the specified TriggerBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} message TriggerBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TriggerBackupRequest.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.ruleId != null && Object.hasOwnProperty.call(message, "ruleId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ruleId); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified TriggerBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TriggerBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {google.cloud.backupdr.v1.ITriggerBackupRequest} message TriggerBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TriggerBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TriggerBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TriggerBackupRequest.decode = function 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.backupdr.v1.TriggerBackupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.ruleId = reader.string(); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TriggerBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TriggerBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TriggerBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TriggerBackupRequest.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.ruleId != null && message.hasOwnProperty("ruleId")) - if (!$util.isString(message.ruleId)) - return "ruleId: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a TriggerBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.TriggerBackupRequest} TriggerBackupRequest - */ - TriggerBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.TriggerBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.TriggerBackupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.ruleId != null) - message.ruleId = String(object.ruleId); - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a TriggerBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {google.cloud.backupdr.v1.TriggerBackupRequest} message TriggerBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TriggerBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.ruleId = ""; - object.requestId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.ruleId != null && message.hasOwnProperty("ruleId")) - object.ruleId = message.ruleId; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this TriggerBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @instance - * @returns {Object.} JSON object - */ - TriggerBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TriggerBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.TriggerBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TriggerBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.TriggerBackupRequest"; - }; - - return TriggerBackupRequest; - })(); - - v1.BackupVault = (function() { - - /** - * Properties of a BackupVault. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupVault - * @property {string|null} [name] BackupVault name - * @property {string|null} [description] BackupVault description - * @property {Object.|null} [labels] BackupVault labels - * @property {google.protobuf.ITimestamp|null} [createTime] BackupVault createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] BackupVault updateTime - * @property {google.protobuf.IDuration|null} [backupMinimumEnforcedRetentionDuration] BackupVault backupMinimumEnforcedRetentionDuration - * @property {boolean|null} [deletable] BackupVault deletable - * @property {string|null} [etag] BackupVault etag - * @property {google.cloud.backupdr.v1.BackupVault.State|null} [state] BackupVault state - * @property {google.protobuf.ITimestamp|null} [effectiveTime] BackupVault effectiveTime - * @property {number|Long|null} [backupCount] BackupVault backupCount - * @property {string|null} [serviceAccount] BackupVault serviceAccount - * @property {number|Long|null} [totalStoredBytes] BackupVault totalStoredBytes - * @property {string|null} [uid] BackupVault uid - * @property {Object.|null} [annotations] BackupVault annotations - * @property {google.cloud.backupdr.v1.BackupVault.AccessRestriction|null} [accessRestriction] BackupVault accessRestriction - */ - - /** - * Constructs a new BackupVault. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupVault. - * @implements IBackupVault - * @constructor - * @param {google.cloud.backupdr.v1.IBackupVault=} [properties] Properties to set - */ - function BackupVault(properties) { - this.labels = {}; - this.annotations = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupVault name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.name = ""; - - /** - * BackupVault description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.description = null; - - /** - * BackupVault labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.labels = $util.emptyObject; - - /** - * BackupVault createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.createTime = null; - - /** - * BackupVault updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.updateTime = null; - - /** - * BackupVault backupMinimumEnforcedRetentionDuration. - * @member {google.protobuf.IDuration|null|undefined} backupMinimumEnforcedRetentionDuration - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.backupMinimumEnforcedRetentionDuration = null; - - /** - * BackupVault deletable. - * @member {boolean|null|undefined} deletable - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.deletable = null; - - /** - * BackupVault etag. - * @member {string|null|undefined} etag - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.etag = null; - - /** - * BackupVault state. - * @member {google.cloud.backupdr.v1.BackupVault.State} state - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.state = 0; - - /** - * BackupVault effectiveTime. - * @member {google.protobuf.ITimestamp|null|undefined} effectiveTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.effectiveTime = null; - - /** - * BackupVault backupCount. - * @member {number|Long} backupCount - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.backupCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BackupVault serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.serviceAccount = ""; - - /** - * BackupVault totalStoredBytes. - * @member {number|Long} totalStoredBytes - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.totalStoredBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BackupVault uid. - * @member {string} uid - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.uid = ""; - - /** - * BackupVault annotations. - * @member {Object.} annotations - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.annotations = $util.emptyObject; - - /** - * BackupVault accessRestriction. - * @member {google.cloud.backupdr.v1.BackupVault.AccessRestriction} accessRestriction - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - BackupVault.prototype.accessRestriction = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupVault _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupVault _createTime. - * @member {"createTime"|undefined} _createTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_createTime", { - get: $util.oneOfGetter($oneOfFields = ["createTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupVault _updateTime. - * @member {"updateTime"|undefined} _updateTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_updateTime", { - get: $util.oneOfGetter($oneOfFields = ["updateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupVault _backupMinimumEnforcedRetentionDuration. - * @member {"backupMinimumEnforcedRetentionDuration"|undefined} _backupMinimumEnforcedRetentionDuration - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_backupMinimumEnforcedRetentionDuration", { - get: $util.oneOfGetter($oneOfFields = ["backupMinimumEnforcedRetentionDuration"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupVault _deletable. - * @member {"deletable"|undefined} _deletable - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_deletable", { - get: $util.oneOfGetter($oneOfFields = ["deletable"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupVault _etag. - * @member {"etag"|undefined} _etag - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_etag", { - get: $util.oneOfGetter($oneOfFields = ["etag"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupVault _effectiveTime. - * @member {"effectiveTime"|undefined} _effectiveTime - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - */ - Object.defineProperty(BackupVault.prototype, "_effectiveTime", { - get: $util.oneOfGetter($oneOfFields = ["effectiveTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupVault instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {google.cloud.backupdr.v1.IBackupVault=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault instance - */ - BackupVault.create = function create(properties) { - return new BackupVault(properties); - }; - - /** - * Encodes the specified BackupVault message. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {google.cloud.backupdr.v1.IBackupVault} message BackupVault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupVault.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - 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 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.deletable != null && Object.hasOwnProperty.call(message, "deletable")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.deletable); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.etag); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); - if (message.effectiveTime != null && Object.hasOwnProperty.call(message, "effectiveTime")) - $root.google.protobuf.Timestamp.encode(message.effectiveTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.backupCount != null && Object.hasOwnProperty.call(message, "backupCount")) - writer.uint32(/* id 17, wireType 0 =*/136).int64(message.backupCount); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.serviceAccount); - if (message.totalStoredBytes != null && Object.hasOwnProperty.call(message, "totalStoredBytes")) - writer.uint32(/* id 19, wireType 0 =*/152).int64(message.totalStoredBytes); - if (message.backupMinimumEnforcedRetentionDuration != null && Object.hasOwnProperty.call(message, "backupMinimumEnforcedRetentionDuration")) - $root.google.protobuf.Duration.encode(message.backupMinimumEnforcedRetentionDuration, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) - writer.uint32(/* id 21, wireType 2 =*/170).string(message.uid); - if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) - for (var keys = Object.keys(message.annotations), i = 0; i < keys.length; ++i) - writer.uint32(/* id 22, wireType 2 =*/178).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.annotations[keys[i]]).ldelim(); - if (message.accessRestriction != null && Object.hasOwnProperty.call(message, "accessRestriction")) - writer.uint32(/* id 24, wireType 0 =*/192).int32(message.accessRestriction); - return writer; - }; - - /** - * Encodes the specified BackupVault message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupVault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {google.cloud.backupdr.v1.IBackupVault} message BackupVault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupVault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupVault message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupVault.decode = function 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.backupdr.v1.BackupVault(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - 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 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 20: { - message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 8: { - message.deletable = reader.bool(); - break; - } - case 9: { - message.etag = reader.string(); - break; - } - case 10: { - message.state = reader.int32(); - break; - } - case 12: { - message.effectiveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 17: { - message.backupCount = reader.int64(); - break; - } - case 18: { - message.serviceAccount = reader.string(); - break; - } - case 19: { - message.totalStoredBytes = reader.int64(); - break; - } - case 21: { - message.uid = reader.string(); - break; - } - case 22: { - if (message.annotations === $util.emptyObject) - message.annotations = {}; - 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.annotations[key] = value; - break; - } - case 24: { - message.accessRestriction = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupVault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupVault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupVault message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupVault.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.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - properties._createTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - properties._updateTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - } - if (message.backupMinimumEnforcedRetentionDuration != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDuration")) { - properties._backupMinimumEnforcedRetentionDuration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.backupMinimumEnforcedRetentionDuration); - if (error) - return "backupMinimumEnforcedRetentionDuration." + error; - } - } - if (message.deletable != null && message.hasOwnProperty("deletable")) { - properties._deletable = 1; - if (typeof message.deletable !== "boolean") - return "deletable: boolean expected"; - } - if (message.etag != null && message.hasOwnProperty("etag")) { - properties._etag = 1; - if (!$util.isString(message.etag)) - return "etag: 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.effectiveTime != null && message.hasOwnProperty("effectiveTime")) { - properties._effectiveTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.effectiveTime); - if (error) - return "effectiveTime." + error; - } - } - if (message.backupCount != null && message.hasOwnProperty("backupCount")) - if (!$util.isInteger(message.backupCount) && !(message.backupCount && $util.isInteger(message.backupCount.low) && $util.isInteger(message.backupCount.high))) - return "backupCount: integer|Long expected"; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) - if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) - return "totalStoredBytes: integer|Long expected"; - if (message.uid != null && message.hasOwnProperty("uid")) - if (!$util.isString(message.uid)) - return "uid: string expected"; - if (message.annotations != null && message.hasOwnProperty("annotations")) { - if (!$util.isObject(message.annotations)) - return "annotations: object expected"; - var key = Object.keys(message.annotations); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.annotations[key[i]])) - return "annotations: string{k:string} expected"; - } - if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) - switch (message.accessRestriction) { - default: - return "accessRestriction: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a BackupVault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupVault} BackupVault - */ - BackupVault.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupVault) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupVault(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.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.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.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.backupdr.v1.BackupVault.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.backupMinimumEnforcedRetentionDuration != null) { - if (typeof object.backupMinimumEnforcedRetentionDuration !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.backupMinimumEnforcedRetentionDuration: object expected"); - message.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.fromObject(object.backupMinimumEnforcedRetentionDuration); - } - if (object.deletable != null) - message.deletable = Boolean(object.deletable); - if (object.etag != null) - message.etag = String(object.etag); - 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 "ACTIVE": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ERROR": - case 4: - message.state = 4; - break; - } - if (object.effectiveTime != null) { - if (typeof object.effectiveTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.effectiveTime: object expected"); - message.effectiveTime = $root.google.protobuf.Timestamp.fromObject(object.effectiveTime); - } - if (object.backupCount != null) - if ($util.Long) - (message.backupCount = $util.Long.fromValue(object.backupCount)).unsigned = false; - else if (typeof object.backupCount === "string") - message.backupCount = parseInt(object.backupCount, 10); - else if (typeof object.backupCount === "number") - message.backupCount = object.backupCount; - else if (typeof object.backupCount === "object") - message.backupCount = new $util.LongBits(object.backupCount.low >>> 0, object.backupCount.high >>> 0).toNumber(); - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.totalStoredBytes != null) - if ($util.Long) - (message.totalStoredBytes = $util.Long.fromValue(object.totalStoredBytes)).unsigned = false; - else if (typeof object.totalStoredBytes === "string") - message.totalStoredBytes = parseInt(object.totalStoredBytes, 10); - else if (typeof object.totalStoredBytes === "number") - message.totalStoredBytes = object.totalStoredBytes; - else if (typeof object.totalStoredBytes === "object") - message.totalStoredBytes = new $util.LongBits(object.totalStoredBytes.low >>> 0, object.totalStoredBytes.high >>> 0).toNumber(); - if (object.uid != null) - message.uid = String(object.uid); - if (object.annotations) { - if (typeof object.annotations !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupVault.annotations: object expected"); - message.annotations = {}; - for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) - message.annotations[keys[i]] = String(object.annotations[keys[i]]); - } - switch (object.accessRestriction) { - default: - if (typeof object.accessRestriction === "number") { - message.accessRestriction = object.accessRestriction; - break; - } - break; - case "ACCESS_RESTRICTION_UNSPECIFIED": - case 0: - message.accessRestriction = 0; - break; - case "WITHIN_PROJECT": - case 1: - message.accessRestriction = 1; - break; - case "WITHIN_ORGANIZATION": - case 2: - message.accessRestriction = 2; - break; - case "UNRESTRICTED": - case 3: - message.accessRestriction = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a BackupVault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {google.cloud.backupdr.v1.BackupVault} message BackupVault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupVault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) { - object.labels = {}; - object.annotations = {}; - } - if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.backupCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.backupCount = options.longs === String ? "0" : 0; - object.serviceAccount = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalStoredBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalStoredBytes = options.longs === String ? "0" : 0; - object.uid = ""; - object.accessRestriction = options.enums === String ? "ACCESS_RESTRICTION_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - 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.createTime != null && message.hasOwnProperty("createTime")) { - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (options.oneofs) - object._createTime = "createTime"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (options.oneofs) - object._updateTime = "updateTime"; - } - if (message.deletable != null && message.hasOwnProperty("deletable")) { - object.deletable = message.deletable; - if (options.oneofs) - object._deletable = "deletable"; - } - if (message.etag != null && message.hasOwnProperty("etag")) { - object.etag = message.etag; - if (options.oneofs) - object._etag = "etag"; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.BackupVault.State[message.state] : message.state; - if (message.effectiveTime != null && message.hasOwnProperty("effectiveTime")) { - object.effectiveTime = $root.google.protobuf.Timestamp.toObject(message.effectiveTime, options); - if (options.oneofs) - object._effectiveTime = "effectiveTime"; - } - if (message.backupCount != null && message.hasOwnProperty("backupCount")) - if (typeof message.backupCount === "number") - object.backupCount = options.longs === String ? String(message.backupCount) : message.backupCount; - else - object.backupCount = options.longs === String ? $util.Long.prototype.toString.call(message.backupCount) : options.longs === Number ? new $util.LongBits(message.backupCount.low >>> 0, message.backupCount.high >>> 0).toNumber() : message.backupCount; - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) - if (typeof message.totalStoredBytes === "number") - object.totalStoredBytes = options.longs === String ? String(message.totalStoredBytes) : message.totalStoredBytes; - else - object.totalStoredBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStoredBytes) : options.longs === Number ? new $util.LongBits(message.totalStoredBytes.low >>> 0, message.totalStoredBytes.high >>> 0).toNumber() : message.totalStoredBytes; - if (message.backupMinimumEnforcedRetentionDuration != null && message.hasOwnProperty("backupMinimumEnforcedRetentionDuration")) { - object.backupMinimumEnforcedRetentionDuration = $root.google.protobuf.Duration.toObject(message.backupMinimumEnforcedRetentionDuration, options); - if (options.oneofs) - object._backupMinimumEnforcedRetentionDuration = "backupMinimumEnforcedRetentionDuration"; - } - if (message.uid != null && message.hasOwnProperty("uid")) - object.uid = message.uid; - if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { - object.annotations = {}; - for (var j = 0; j < keys2.length; ++j) - object.annotations[keys2[j]] = message.annotations[keys2[j]]; - } - if (message.accessRestriction != null && message.hasOwnProperty("accessRestriction")) - object.accessRestriction = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] === undefined ? message.accessRestriction : $root.google.cloud.backupdr.v1.BackupVault.AccessRestriction[message.accessRestriction] : message.accessRestriction; - return object; - }; - - /** - * Converts this BackupVault to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupVault - * @instance - * @returns {Object.} JSON object - */ - BackupVault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupVault - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupVault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupVault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupVault"; - }; - - /** - * State enum. - * @name google.cloud.backupdr.v1.BackupVault.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} DELETING=3 DELETING value - * @property {number} ERROR=4 ERROR value - */ - BackupVault.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "ERROR"] = 4; - return values; - })(); - - /** - * AccessRestriction enum. - * @name google.cloud.backupdr.v1.BackupVault.AccessRestriction - * @enum {number} - * @property {number} ACCESS_RESTRICTION_UNSPECIFIED=0 ACCESS_RESTRICTION_UNSPECIFIED value - * @property {number} WITHIN_PROJECT=1 WITHIN_PROJECT value - * @property {number} WITHIN_ORGANIZATION=2 WITHIN_ORGANIZATION value - * @property {number} UNRESTRICTED=3 UNRESTRICTED value - */ - BackupVault.AccessRestriction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACCESS_RESTRICTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "WITHIN_PROJECT"] = 1; - values[valuesById[2] = "WITHIN_ORGANIZATION"] = 2; - values[valuesById[3] = "UNRESTRICTED"] = 3; - return values; - })(); - - return BackupVault; - })(); - - v1.DataSource = (function() { - - /** - * Properties of a DataSource. - * @memberof google.cloud.backupdr.v1 - * @interface IDataSource - * @property {string|null} [name] DataSource name - * @property {google.cloud.backupdr.v1.DataSource.State|null} [state] DataSource state - * @property {Object.|null} [labels] DataSource labels - * @property {google.protobuf.ITimestamp|null} [createTime] DataSource createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] DataSource updateTime - * @property {number|Long|null} [backupCount] DataSource backupCount - * @property {string|null} [etag] DataSource etag - * @property {number|Long|null} [totalStoredBytes] DataSource totalStoredBytes - * @property {google.cloud.backupdr.v1.BackupConfigState|null} [configState] DataSource configState - * @property {google.cloud.backupdr.v1.IBackupConfigInfo|null} [backupConfigInfo] DataSource backupConfigInfo - * @property {google.cloud.backupdr.v1.IDataSourceGcpResource|null} [dataSourceGcpResource] DataSource dataSourceGcpResource - * @property {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null} [dataSourceBackupApplianceApplication] DataSource dataSourceBackupApplianceApplication - */ - - /** - * Constructs a new DataSource. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DataSource. - * @implements IDataSource - * @constructor - * @param {google.cloud.backupdr.v1.IDataSource=} [properties] Properties to set - */ - function DataSource(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]]; - } - - /** - * DataSource name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.name = ""; - - /** - * DataSource state. - * @member {google.cloud.backupdr.v1.DataSource.State} state - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.state = 0; - - /** - * DataSource labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.labels = $util.emptyObject; - - /** - * DataSource createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.createTime = null; - - /** - * DataSource updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.updateTime = null; - - /** - * DataSource backupCount. - * @member {number|Long|null|undefined} backupCount - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.backupCount = null; - - /** - * DataSource etag. - * @member {string|null|undefined} etag - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.etag = null; - - /** - * DataSource totalStoredBytes. - * @member {number|Long|null|undefined} totalStoredBytes - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.totalStoredBytes = null; - - /** - * DataSource configState. - * @member {google.cloud.backupdr.v1.BackupConfigState} configState - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.configState = 0; - - /** - * DataSource backupConfigInfo. - * @member {google.cloud.backupdr.v1.IBackupConfigInfo|null|undefined} backupConfigInfo - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.backupConfigInfo = null; - - /** - * DataSource dataSourceGcpResource. - * @member {google.cloud.backupdr.v1.IDataSourceGcpResource|null|undefined} dataSourceGcpResource - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.dataSourceGcpResource = null; - - /** - * DataSource dataSourceBackupApplianceApplication. - * @member {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication|null|undefined} dataSourceBackupApplianceApplication - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - DataSource.prototype.dataSourceBackupApplianceApplication = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataSource _createTime. - * @member {"createTime"|undefined} _createTime - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "_createTime", { - get: $util.oneOfGetter($oneOfFields = ["createTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DataSource _updateTime. - * @member {"updateTime"|undefined} _updateTime - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "_updateTime", { - get: $util.oneOfGetter($oneOfFields = ["updateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DataSource _backupCount. - * @member {"backupCount"|undefined} _backupCount - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "_backupCount", { - get: $util.oneOfGetter($oneOfFields = ["backupCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DataSource _etag. - * @member {"etag"|undefined} _etag - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "_etag", { - get: $util.oneOfGetter($oneOfFields = ["etag"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DataSource _totalStoredBytes. - * @member {"totalStoredBytes"|undefined} _totalStoredBytes - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "_totalStoredBytes", { - get: $util.oneOfGetter($oneOfFields = ["totalStoredBytes"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * DataSource sourceResource. - * @member {"dataSourceGcpResource"|"dataSourceBackupApplianceApplication"|undefined} sourceResource - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - */ - Object.defineProperty(DataSource.prototype, "sourceResource", { - get: $util.oneOfGetter($oneOfFields = ["dataSourceGcpResource", "dataSourceBackupApplianceApplication"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataSource instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {google.cloud.backupdr.v1.IDataSource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DataSource} DataSource instance - */ - DataSource.create = function create(properties) { - return new DataSource(properties); - }; - - /** - * Encodes the specified DataSource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {google.cloud.backupdr.v1.IDataSource} message DataSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.labels != null && 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.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.backupCount != null && Object.hasOwnProperty.call(message, "backupCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.backupCount); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.etag); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 21, wireType 0 =*/168).int32(message.state); - if (message.totalStoredBytes != null && Object.hasOwnProperty.call(message, "totalStoredBytes")) - writer.uint32(/* id 23, wireType 0 =*/184).int64(message.totalStoredBytes); - if (message.configState != null && Object.hasOwnProperty.call(message, "configState")) - writer.uint32(/* id 24, wireType 0 =*/192).int32(message.configState); - if (message.backupConfigInfo != null && Object.hasOwnProperty.call(message, "backupConfigInfo")) - $root.google.cloud.backupdr.v1.BackupConfigInfo.encode(message.backupConfigInfo, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dataSourceGcpResource != null && Object.hasOwnProperty.call(message, "dataSourceGcpResource")) - $root.google.cloud.backupdr.v1.DataSourceGcpResource.encode(message.dataSourceGcpResource, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.dataSourceBackupApplianceApplication != null && Object.hasOwnProperty.call(message, "dataSourceBackupApplianceApplication")) - $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.encode(message.dataSourceBackupApplianceApplication, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataSource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {google.cloud.backupdr.v1.IDataSource} message DataSource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataSource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DataSource} DataSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSource.decode = function 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.backupdr.v1.DataSource(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 21: { - message.state = reader.int32(); - 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.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.backupCount = reader.int64(); - break; - } - case 14: { - message.etag = reader.string(); - break; - } - case 23: { - message.totalStoredBytes = reader.int64(); - break; - } - case 24: { - message.configState = reader.int32(); - break; - } - case 25: { - message.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.decode(reader, reader.uint32()); - break; - } - case 26: { - message.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.decode(reader, reader.uint32()); - break; - } - case 27: { - message.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataSource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DataSource} DataSource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataSource message. - * @function verify - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataSource.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.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.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.createTime != null && message.hasOwnProperty("createTime")) { - properties._createTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - properties._updateTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - } - if (message.backupCount != null && message.hasOwnProperty("backupCount")) { - properties._backupCount = 1; - if (!$util.isInteger(message.backupCount) && !(message.backupCount && $util.isInteger(message.backupCount.low) && $util.isInteger(message.backupCount.high))) - return "backupCount: integer|Long expected"; - } - if (message.etag != null && message.hasOwnProperty("etag")) { - properties._etag = 1; - if (!$util.isString(message.etag)) - return "etag: string expected"; - } - if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { - properties._totalStoredBytes = 1; - if (!$util.isInteger(message.totalStoredBytes) && !(message.totalStoredBytes && $util.isInteger(message.totalStoredBytes.low) && $util.isInteger(message.totalStoredBytes.high))) - return "totalStoredBytes: integer|Long expected"; - } - if (message.configState != null && message.hasOwnProperty("configState")) - switch (message.configState) { - default: - return "configState: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.backupConfigInfo != null && message.hasOwnProperty("backupConfigInfo")) { - var error = $root.google.cloud.backupdr.v1.BackupConfigInfo.verify(message.backupConfigInfo); - if (error) - return "backupConfigInfo." + error; - } - if (message.dataSourceGcpResource != null && message.hasOwnProperty("dataSourceGcpResource")) { - properties.sourceResource = 1; - { - var error = $root.google.cloud.backupdr.v1.DataSourceGcpResource.verify(message.dataSourceGcpResource); - if (error) - return "dataSourceGcpResource." + error; - } - } - if (message.dataSourceBackupApplianceApplication != null && message.hasOwnProperty("dataSourceBackupApplianceApplication")) { - if (properties.sourceResource === 1) - return "sourceResource: multiple values"; - properties.sourceResource = 1; - { - var error = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify(message.dataSourceBackupApplianceApplication); - if (error) - return "dataSourceBackupApplianceApplication." + error; - } - } - return null; - }; - - /** - * Creates a DataSource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DataSource} DataSource - */ - DataSource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DataSource) - return object; - var message = new $root.google.cloud.backupdr.v1.DataSource(); - if (object.name != null) - message.name = String(object.name); - 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 "ACTIVE": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ERROR": - case 4: - message.state = 4; - break; - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.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.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.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.backupdr.v1.DataSource.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.backupCount != null) - if ($util.Long) - (message.backupCount = $util.Long.fromValue(object.backupCount)).unsigned = false; - else if (typeof object.backupCount === "string") - message.backupCount = parseInt(object.backupCount, 10); - else if (typeof object.backupCount === "number") - message.backupCount = object.backupCount; - else if (typeof object.backupCount === "object") - message.backupCount = new $util.LongBits(object.backupCount.low >>> 0, object.backupCount.high >>> 0).toNumber(); - if (object.etag != null) - message.etag = String(object.etag); - if (object.totalStoredBytes != null) - if ($util.Long) - (message.totalStoredBytes = $util.Long.fromValue(object.totalStoredBytes)).unsigned = false; - else if (typeof object.totalStoredBytes === "string") - message.totalStoredBytes = parseInt(object.totalStoredBytes, 10); - else if (typeof object.totalStoredBytes === "number") - message.totalStoredBytes = object.totalStoredBytes; - else if (typeof object.totalStoredBytes === "object") - message.totalStoredBytes = new $util.LongBits(object.totalStoredBytes.low >>> 0, object.totalStoredBytes.high >>> 0).toNumber(); - switch (object.configState) { - default: - if (typeof object.configState === "number") { - message.configState = object.configState; - break; - } - break; - case "BACKUP_CONFIG_STATE_UNSPECIFIED": - case 0: - message.configState = 0; - break; - case "ACTIVE": - case 1: - message.configState = 1; - break; - case "PASSIVE": - case 2: - message.configState = 2; - break; - } - if (object.backupConfigInfo != null) { - if (typeof object.backupConfigInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.backupConfigInfo: object expected"); - message.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.fromObject(object.backupConfigInfo); - } - if (object.dataSourceGcpResource != null) { - if (typeof object.dataSourceGcpResource !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.dataSourceGcpResource: object expected"); - message.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.fromObject(object.dataSourceGcpResource); - } - if (object.dataSourceBackupApplianceApplication != null) { - if (typeof object.dataSourceBackupApplianceApplication !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSource.dataSourceBackupApplianceApplication: object expected"); - message.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.fromObject(object.dataSourceBackupApplianceApplication); - } - return message; - }; - - /** - * Creates a plain object from a DataSource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {google.cloud.backupdr.v1.DataSource} message DataSource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataSource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.configState = options.enums === String ? "BACKUP_CONFIG_STATE_UNSPECIFIED" : 0; - object.backupConfigInfo = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - 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.createTime != null && message.hasOwnProperty("createTime")) { - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (options.oneofs) - object._createTime = "createTime"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (options.oneofs) - object._updateTime = "updateTime"; - } - if (message.backupCount != null && message.hasOwnProperty("backupCount")) { - if (typeof message.backupCount === "number") - object.backupCount = options.longs === String ? String(message.backupCount) : message.backupCount; - else - object.backupCount = options.longs === String ? $util.Long.prototype.toString.call(message.backupCount) : options.longs === Number ? new $util.LongBits(message.backupCount.low >>> 0, message.backupCount.high >>> 0).toNumber() : message.backupCount; - if (options.oneofs) - object._backupCount = "backupCount"; - } - if (message.etag != null && message.hasOwnProperty("etag")) { - object.etag = message.etag; - if (options.oneofs) - object._etag = "etag"; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.DataSource.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.DataSource.State[message.state] : message.state; - if (message.totalStoredBytes != null && message.hasOwnProperty("totalStoredBytes")) { - if (typeof message.totalStoredBytes === "number") - object.totalStoredBytes = options.longs === String ? String(message.totalStoredBytes) : message.totalStoredBytes; - else - object.totalStoredBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalStoredBytes) : options.longs === Number ? new $util.LongBits(message.totalStoredBytes.low >>> 0, message.totalStoredBytes.high >>> 0).toNumber() : message.totalStoredBytes; - if (options.oneofs) - object._totalStoredBytes = "totalStoredBytes"; - } - if (message.configState != null && message.hasOwnProperty("configState")) - object.configState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigState[message.configState] === undefined ? message.configState : $root.google.cloud.backupdr.v1.BackupConfigState[message.configState] : message.configState; - if (message.backupConfigInfo != null && message.hasOwnProperty("backupConfigInfo")) - object.backupConfigInfo = $root.google.cloud.backupdr.v1.BackupConfigInfo.toObject(message.backupConfigInfo, options); - if (message.dataSourceGcpResource != null && message.hasOwnProperty("dataSourceGcpResource")) { - object.dataSourceGcpResource = $root.google.cloud.backupdr.v1.DataSourceGcpResource.toObject(message.dataSourceGcpResource, options); - if (options.oneofs) - object.sourceResource = "dataSourceGcpResource"; - } - if (message.dataSourceBackupApplianceApplication != null && message.hasOwnProperty("dataSourceBackupApplianceApplication")) { - object.dataSourceBackupApplianceApplication = $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.toObject(message.dataSourceBackupApplianceApplication, options); - if (options.oneofs) - object.sourceResource = "dataSourceBackupApplianceApplication"; - } - return object; - }; - - /** - * Converts this DataSource to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DataSource - * @instance - * @returns {Object.} JSON object - */ - DataSource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataSource - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DataSource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSource"; - }; - - /** - * State enum. - * @name google.cloud.backupdr.v1.DataSource.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} DELETING=3 DELETING value - * @property {number} ERROR=4 ERROR value - */ - DataSource.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "ERROR"] = 4; - return values; - })(); - - return DataSource; - })(); - - v1.BackupConfigInfo = (function() { - - /** - * Properties of a BackupConfigInfo. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupConfigInfo - * @property {google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState|null} [lastBackupState] BackupConfigInfo lastBackupState - * @property {google.protobuf.ITimestamp|null} [lastSuccessfulBackupConsistencyTime] BackupConfigInfo lastSuccessfulBackupConsistencyTime - * @property {google.rpc.IStatus|null} [lastBackupError] BackupConfigInfo lastBackupError - * @property {google.cloud.backupdr.v1.IGcpBackupConfig|null} [gcpBackupConfig] BackupConfigInfo gcpBackupConfig - * @property {google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null} [backupApplianceBackupConfig] BackupConfigInfo backupApplianceBackupConfig - */ - - /** - * Constructs a new BackupConfigInfo. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupConfigInfo. - * @implements IBackupConfigInfo - * @constructor - * @param {google.cloud.backupdr.v1.IBackupConfigInfo=} [properties] Properties to set - */ - function BackupConfigInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupConfigInfo lastBackupState. - * @member {google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState} lastBackupState - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.lastBackupState = 0; - - /** - * BackupConfigInfo lastSuccessfulBackupConsistencyTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastSuccessfulBackupConsistencyTime - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.lastSuccessfulBackupConsistencyTime = null; - - /** - * BackupConfigInfo lastBackupError. - * @member {google.rpc.IStatus|null|undefined} lastBackupError - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.lastBackupError = null; - - /** - * BackupConfigInfo gcpBackupConfig. - * @member {google.cloud.backupdr.v1.IGcpBackupConfig|null|undefined} gcpBackupConfig - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.gcpBackupConfig = null; - - /** - * BackupConfigInfo backupApplianceBackupConfig. - * @member {google.cloud.backupdr.v1.IBackupApplianceBackupConfig|null|undefined} backupApplianceBackupConfig - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - BackupConfigInfo.prototype.backupApplianceBackupConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupConfigInfo backupConfig. - * @member {"gcpBackupConfig"|"backupApplianceBackupConfig"|undefined} backupConfig - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - */ - Object.defineProperty(BackupConfigInfo.prototype, "backupConfig", { - get: $util.oneOfGetter($oneOfFields = ["gcpBackupConfig", "backupApplianceBackupConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupConfigInfo instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupConfigInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo instance - */ - BackupConfigInfo.create = function create(properties) { - return new BackupConfigInfo(properties); - }; - - /** - * Encodes the specified BackupConfigInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupConfigInfo} message BackupConfigInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupConfigInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lastBackupState != null && Object.hasOwnProperty.call(message, "lastBackupState")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.lastBackupState); - if (message.lastSuccessfulBackupConsistencyTime != null && Object.hasOwnProperty.call(message, "lastSuccessfulBackupConsistencyTime")) - $root.google.protobuf.Timestamp.encode(message.lastSuccessfulBackupConsistencyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.lastBackupError != null && Object.hasOwnProperty.call(message, "lastBackupError")) - $root.google.rpc.Status.encode(message.lastBackupError, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.gcpBackupConfig != null && Object.hasOwnProperty.call(message, "gcpBackupConfig")) - $root.google.cloud.backupdr.v1.GcpBackupConfig.encode(message.gcpBackupConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.backupApplianceBackupConfig != null && Object.hasOwnProperty.call(message, "backupApplianceBackupConfig")) - $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.encode(message.backupApplianceBackupConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BackupConfigInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupConfigInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupConfigInfo} message BackupConfigInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupConfigInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupConfigInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupConfigInfo.decode = function 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.backupdr.v1.BackupConfigInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.lastBackupState = reader.int32(); - break; - } - case 2: { - message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.lastBackupError = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 4: { - message.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupConfigInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupConfigInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupConfigInfo message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupConfigInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) - switch (message.lastBackupState) { - default: - return "lastBackupState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastSuccessfulBackupConsistencyTime); - if (error) - return "lastSuccessfulBackupConsistencyTime." + error; - } - if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) { - var error = $root.google.rpc.Status.verify(message.lastBackupError); - if (error) - return "lastBackupError." + error; - } - if (message.gcpBackupConfig != null && message.hasOwnProperty("gcpBackupConfig")) { - properties.backupConfig = 1; - { - var error = $root.google.cloud.backupdr.v1.GcpBackupConfig.verify(message.gcpBackupConfig); - if (error) - return "gcpBackupConfig." + error; - } - } - if (message.backupApplianceBackupConfig != null && message.hasOwnProperty("backupApplianceBackupConfig")) { - if (properties.backupConfig === 1) - return "backupConfig: multiple values"; - properties.backupConfig = 1; - { - var error = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify(message.backupApplianceBackupConfig); - if (error) - return "backupApplianceBackupConfig." + error; - } - } - return null; - }; - - /** - * Creates a BackupConfigInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupConfigInfo} BackupConfigInfo - */ - BackupConfigInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupConfigInfo) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupConfigInfo(); - switch (object.lastBackupState) { - default: - if (typeof object.lastBackupState === "number") { - message.lastBackupState = object.lastBackupState; - break; - } - break; - case "LAST_BACKUP_STATE_UNSPECIFIED": - case 0: - message.lastBackupState = 0; - break; - case "FIRST_BACKUP_PENDING": - case 1: - message.lastBackupState = 1; - break; - case "SUCCEEDED": - case 2: - message.lastBackupState = 2; - break; - case "FAILED": - case 3: - message.lastBackupState = 3; - break; - case "PERMISSION_DENIED": - case 4: - message.lastBackupState = 4; - break; - } - if (object.lastSuccessfulBackupConsistencyTime != null) { - if (typeof object.lastSuccessfulBackupConsistencyTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.lastSuccessfulBackupConsistencyTime: object expected"); - message.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.fromObject(object.lastSuccessfulBackupConsistencyTime); - } - if (object.lastBackupError != null) { - if (typeof object.lastBackupError !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.lastBackupError: object expected"); - message.lastBackupError = $root.google.rpc.Status.fromObject(object.lastBackupError); - } - if (object.gcpBackupConfig != null) { - if (typeof object.gcpBackupConfig !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.gcpBackupConfig: object expected"); - message.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.fromObject(object.gcpBackupConfig); - } - if (object.backupApplianceBackupConfig != null) { - if (typeof object.backupApplianceBackupConfig !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupConfigInfo.backupApplianceBackupConfig: object expected"); - message.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.fromObject(object.backupApplianceBackupConfig); - } - return message; - }; - - /** - * Creates a plain object from a BackupConfigInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {google.cloud.backupdr.v1.BackupConfigInfo} message BackupConfigInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupConfigInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.lastBackupState = options.enums === String ? "LAST_BACKUP_STATE_UNSPECIFIED" : 0; - object.lastSuccessfulBackupConsistencyTime = null; - object.lastBackupError = null; - } - if (message.lastBackupState != null && message.hasOwnProperty("lastBackupState")) - object.lastBackupState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState[message.lastBackupState] === undefined ? message.lastBackupState : $root.google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState[message.lastBackupState] : message.lastBackupState; - if (message.lastSuccessfulBackupConsistencyTime != null && message.hasOwnProperty("lastSuccessfulBackupConsistencyTime")) - object.lastSuccessfulBackupConsistencyTime = $root.google.protobuf.Timestamp.toObject(message.lastSuccessfulBackupConsistencyTime, options); - if (message.lastBackupError != null && message.hasOwnProperty("lastBackupError")) - object.lastBackupError = $root.google.rpc.Status.toObject(message.lastBackupError, options); - if (message.gcpBackupConfig != null && message.hasOwnProperty("gcpBackupConfig")) { - object.gcpBackupConfig = $root.google.cloud.backupdr.v1.GcpBackupConfig.toObject(message.gcpBackupConfig, options); - if (options.oneofs) - object.backupConfig = "gcpBackupConfig"; - } - if (message.backupApplianceBackupConfig != null && message.hasOwnProperty("backupApplianceBackupConfig")) { - object.backupApplianceBackupConfig = $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig.toObject(message.backupApplianceBackupConfig, options); - if (options.oneofs) - object.backupConfig = "backupApplianceBackupConfig"; - } - return object; - }; - - /** - * Converts this BackupConfigInfo to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @instance - * @returns {Object.} JSON object - */ - BackupConfigInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupConfigInfo - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupConfigInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupConfigInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupConfigInfo"; - }; - - /** - * LastBackupState enum. - * @name google.cloud.backupdr.v1.BackupConfigInfo.LastBackupState - * @enum {number} - * @property {number} LAST_BACKUP_STATE_UNSPECIFIED=0 LAST_BACKUP_STATE_UNSPECIFIED value - * @property {number} FIRST_BACKUP_PENDING=1 FIRST_BACKUP_PENDING value - * @property {number} SUCCEEDED=2 SUCCEEDED value - * @property {number} FAILED=3 FAILED value - * @property {number} PERMISSION_DENIED=4 PERMISSION_DENIED value - */ - BackupConfigInfo.LastBackupState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAST_BACKUP_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FIRST_BACKUP_PENDING"] = 1; - values[valuesById[2] = "SUCCEEDED"] = 2; - values[valuesById[3] = "FAILED"] = 3; - values[valuesById[4] = "PERMISSION_DENIED"] = 4; - return values; - })(); - - return BackupConfigInfo; - })(); - - v1.GcpBackupConfig = (function() { - - /** - * Properties of a GcpBackupConfig. - * @memberof google.cloud.backupdr.v1 - * @interface IGcpBackupConfig - * @property {string|null} [backupPlan] GcpBackupConfig backupPlan - * @property {string|null} [backupPlanDescription] GcpBackupConfig backupPlanDescription - * @property {string|null} [backupPlanAssociation] GcpBackupConfig backupPlanAssociation - * @property {Array.|null} [backupPlanRules] GcpBackupConfig backupPlanRules - */ - - /** - * Constructs a new GcpBackupConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GcpBackupConfig. - * @implements IGcpBackupConfig - * @constructor - * @param {google.cloud.backupdr.v1.IGcpBackupConfig=} [properties] Properties to set - */ - function GcpBackupConfig(properties) { - this.backupPlanRules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcpBackupConfig backupPlan. - * @member {string} backupPlan - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @instance - */ - GcpBackupConfig.prototype.backupPlan = ""; - - /** - * GcpBackupConfig backupPlanDescription. - * @member {string} backupPlanDescription - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @instance - */ - GcpBackupConfig.prototype.backupPlanDescription = ""; - - /** - * GcpBackupConfig backupPlanAssociation. - * @member {string} backupPlanAssociation - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @instance - */ - GcpBackupConfig.prototype.backupPlanAssociation = ""; - - /** - * GcpBackupConfig backupPlanRules. - * @member {Array.} backupPlanRules - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @instance - */ - GcpBackupConfig.prototype.backupPlanRules = $util.emptyArray; - - /** - * Creates a new GcpBackupConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {google.cloud.backupdr.v1.IGcpBackupConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig instance - */ - GcpBackupConfig.create = function create(properties) { - return new GcpBackupConfig(properties); - }; - - /** - * Encodes the specified GcpBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {google.cloud.backupdr.v1.IGcpBackupConfig} message GcpBackupConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcpBackupConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPlan); - if (message.backupPlanDescription != null && Object.hasOwnProperty.call(message, "backupPlanDescription")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanDescription); - if (message.backupPlanAssociation != null && Object.hasOwnProperty.call(message, "backupPlanAssociation")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.backupPlanAssociation); - if (message.backupPlanRules != null && message.backupPlanRules.length) - for (var i = 0; i < message.backupPlanRules.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.backupPlanRules[i]); - return writer; - }; - - /** - * Encodes the specified GcpBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpBackupConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {google.cloud.backupdr.v1.IGcpBackupConfig} message GcpBackupConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcpBackupConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcpBackupConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcpBackupConfig.decode = function 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.backupdr.v1.GcpBackupConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.backupPlan = reader.string(); - break; - } - case 2: { - message.backupPlanDescription = reader.string(); - break; - } - case 3: { - message.backupPlanAssociation = reader.string(); - break; - } - case 4: { - if (!(message.backupPlanRules && message.backupPlanRules.length)) - message.backupPlanRules = []; - message.backupPlanRules.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcpBackupConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcpBackupConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcpBackupConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcpBackupConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - if (!$util.isString(message.backupPlan)) - return "backupPlan: string expected"; - if (message.backupPlanDescription != null && message.hasOwnProperty("backupPlanDescription")) - if (!$util.isString(message.backupPlanDescription)) - return "backupPlanDescription: string expected"; - if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) - if (!$util.isString(message.backupPlanAssociation)) - return "backupPlanAssociation: string expected"; - if (message.backupPlanRules != null && message.hasOwnProperty("backupPlanRules")) { - if (!Array.isArray(message.backupPlanRules)) - return "backupPlanRules: array expected"; - for (var i = 0; i < message.backupPlanRules.length; ++i) - if (!$util.isString(message.backupPlanRules[i])) - return "backupPlanRules: string[] expected"; - } - return null; - }; - - /** - * Creates a GcpBackupConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GcpBackupConfig} GcpBackupConfig - */ - GcpBackupConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GcpBackupConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.GcpBackupConfig(); - if (object.backupPlan != null) - message.backupPlan = String(object.backupPlan); - if (object.backupPlanDescription != null) - message.backupPlanDescription = String(object.backupPlanDescription); - if (object.backupPlanAssociation != null) - message.backupPlanAssociation = String(object.backupPlanAssociation); - if (object.backupPlanRules) { - if (!Array.isArray(object.backupPlanRules)) - throw TypeError(".google.cloud.backupdr.v1.GcpBackupConfig.backupPlanRules: array expected"); - message.backupPlanRules = []; - for (var i = 0; i < object.backupPlanRules.length; ++i) - message.backupPlanRules[i] = String(object.backupPlanRules[i]); - } - return message; - }; - - /** - * Creates a plain object from a GcpBackupConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {google.cloud.backupdr.v1.GcpBackupConfig} message GcpBackupConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcpBackupConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.backupPlanRules = []; - if (options.defaults) { - object.backupPlan = ""; - object.backupPlanDescription = ""; - object.backupPlanAssociation = ""; - } - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - object.backupPlan = message.backupPlan; - if (message.backupPlanDescription != null && message.hasOwnProperty("backupPlanDescription")) - object.backupPlanDescription = message.backupPlanDescription; - if (message.backupPlanAssociation != null && message.hasOwnProperty("backupPlanAssociation")) - object.backupPlanAssociation = message.backupPlanAssociation; - if (message.backupPlanRules && message.backupPlanRules.length) { - object.backupPlanRules = []; - for (var j = 0; j < message.backupPlanRules.length; ++j) - object.backupPlanRules[j] = message.backupPlanRules[j]; - } - return object; - }; - - /** - * Converts this GcpBackupConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @instance - * @returns {Object.} JSON object - */ - GcpBackupConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcpBackupConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GcpBackupConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcpBackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpBackupConfig"; - }; - - return GcpBackupConfig; - })(); - - v1.BackupApplianceBackupConfig = (function() { - - /** - * Properties of a BackupApplianceBackupConfig. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupApplianceBackupConfig - * @property {string|null} [backupApplianceName] BackupApplianceBackupConfig backupApplianceName - * @property {number|Long|null} [backupApplianceId] BackupApplianceBackupConfig backupApplianceId - * @property {number|Long|null} [slaId] BackupApplianceBackupConfig slaId - * @property {string|null} [applicationName] BackupApplianceBackupConfig applicationName - * @property {string|null} [hostName] BackupApplianceBackupConfig hostName - * @property {string|null} [sltName] BackupApplianceBackupConfig sltName - * @property {string|null} [slpName] BackupApplianceBackupConfig slpName - */ - - /** - * Constructs a new BackupApplianceBackupConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupApplianceBackupConfig. - * @implements IBackupApplianceBackupConfig - * @constructor - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig=} [properties] Properties to set - */ - function BackupApplianceBackupConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupApplianceBackupConfig backupApplianceName. - * @member {string} backupApplianceName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.backupApplianceName = ""; - - /** - * BackupApplianceBackupConfig backupApplianceId. - * @member {number|Long} backupApplianceId - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.backupApplianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BackupApplianceBackupConfig slaId. - * @member {number|Long} slaId - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.slaId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BackupApplianceBackupConfig applicationName. - * @member {string} applicationName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.applicationName = ""; - - /** - * BackupApplianceBackupConfig hostName. - * @member {string} hostName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.hostName = ""; - - /** - * BackupApplianceBackupConfig sltName. - * @member {string} sltName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.sltName = ""; - - /** - * BackupApplianceBackupConfig slpName. - * @member {string} slpName - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - */ - BackupApplianceBackupConfig.prototype.slpName = ""; - - /** - * Creates a new BackupApplianceBackupConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig instance - */ - BackupApplianceBackupConfig.create = function create(properties) { - return new BackupApplianceBackupConfig(properties); - }; - - /** - * Encodes the specified BackupApplianceBackupConfig message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig} message BackupApplianceBackupConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupApplianceBackupConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupApplianceName != null && Object.hasOwnProperty.call(message, "backupApplianceName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupApplianceName); - if (message.backupApplianceId != null && Object.hasOwnProperty.call(message, "backupApplianceId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.backupApplianceId); - if (message.slaId != null && Object.hasOwnProperty.call(message, "slaId")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.slaId); - if (message.applicationName != null && Object.hasOwnProperty.call(message, "applicationName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.applicationName); - if (message.hostName != null && Object.hasOwnProperty.call(message, "hostName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.hostName); - if (message.sltName != null && Object.hasOwnProperty.call(message, "sltName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sltName); - if (message.slpName != null && Object.hasOwnProperty.call(message, "slpName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.slpName); - return writer; - }; - - /** - * Encodes the specified BackupApplianceBackupConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupConfig} message BackupApplianceBackupConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupApplianceBackupConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupApplianceBackupConfig.decode = function 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.backupdr.v1.BackupApplianceBackupConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.backupApplianceName = reader.string(); - break; - } - case 2: { - message.backupApplianceId = reader.int64(); - break; - } - case 3: { - message.slaId = reader.int64(); - break; - } - case 4: { - message.applicationName = reader.string(); - break; - } - case 5: { - message.hostName = reader.string(); - break; - } - case 6: { - message.sltName = reader.string(); - break; - } - case 7: { - message.slpName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupApplianceBackupConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupApplianceBackupConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupApplianceBackupConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupApplianceBackupConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) - if (!$util.isString(message.backupApplianceName)) - return "backupApplianceName: string expected"; - if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) - if (!$util.isInteger(message.backupApplianceId) && !(message.backupApplianceId && $util.isInteger(message.backupApplianceId.low) && $util.isInteger(message.backupApplianceId.high))) - return "backupApplianceId: integer|Long expected"; - if (message.slaId != null && message.hasOwnProperty("slaId")) - if (!$util.isInteger(message.slaId) && !(message.slaId && $util.isInteger(message.slaId.low) && $util.isInteger(message.slaId.high))) - return "slaId: integer|Long expected"; - if (message.applicationName != null && message.hasOwnProperty("applicationName")) - if (!$util.isString(message.applicationName)) - return "applicationName: string expected"; - if (message.hostName != null && message.hasOwnProperty("hostName")) - if (!$util.isString(message.hostName)) - return "hostName: string expected"; - if (message.sltName != null && message.hasOwnProperty("sltName")) - if (!$util.isString(message.sltName)) - return "sltName: string expected"; - if (message.slpName != null && message.hasOwnProperty("slpName")) - if (!$util.isString(message.slpName)) - return "slpName: string expected"; - return null; - }; - - /** - * Creates a BackupApplianceBackupConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupConfig} BackupApplianceBackupConfig - */ - BackupApplianceBackupConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupConfig(); - if (object.backupApplianceName != null) - message.backupApplianceName = String(object.backupApplianceName); - if (object.backupApplianceId != null) - if ($util.Long) - (message.backupApplianceId = $util.Long.fromValue(object.backupApplianceId)).unsigned = false; - else if (typeof object.backupApplianceId === "string") - message.backupApplianceId = parseInt(object.backupApplianceId, 10); - else if (typeof object.backupApplianceId === "number") - message.backupApplianceId = object.backupApplianceId; - else if (typeof object.backupApplianceId === "object") - message.backupApplianceId = new $util.LongBits(object.backupApplianceId.low >>> 0, object.backupApplianceId.high >>> 0).toNumber(); - if (object.slaId != null) - if ($util.Long) - (message.slaId = $util.Long.fromValue(object.slaId)).unsigned = false; - else if (typeof object.slaId === "string") - message.slaId = parseInt(object.slaId, 10); - else if (typeof object.slaId === "number") - message.slaId = object.slaId; - else if (typeof object.slaId === "object") - message.slaId = new $util.LongBits(object.slaId.low >>> 0, object.slaId.high >>> 0).toNumber(); - if (object.applicationName != null) - message.applicationName = String(object.applicationName); - if (object.hostName != null) - message.hostName = String(object.hostName); - if (object.sltName != null) - message.sltName = String(object.sltName); - if (object.slpName != null) - message.slpName = String(object.slpName); - return message; - }; - - /** - * Creates a plain object from a BackupApplianceBackupConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {google.cloud.backupdr.v1.BackupApplianceBackupConfig} message BackupApplianceBackupConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupApplianceBackupConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.backupApplianceName = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.backupApplianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.backupApplianceId = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.slaId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.slaId = options.longs === String ? "0" : 0; - object.applicationName = ""; - object.hostName = ""; - object.sltName = ""; - object.slpName = ""; - } - if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) - object.backupApplianceName = message.backupApplianceName; - if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) - if (typeof message.backupApplianceId === "number") - object.backupApplianceId = options.longs === String ? String(message.backupApplianceId) : message.backupApplianceId; - else - object.backupApplianceId = options.longs === String ? $util.Long.prototype.toString.call(message.backupApplianceId) : options.longs === Number ? new $util.LongBits(message.backupApplianceId.low >>> 0, message.backupApplianceId.high >>> 0).toNumber() : message.backupApplianceId; - if (message.slaId != null && message.hasOwnProperty("slaId")) - if (typeof message.slaId === "number") - object.slaId = options.longs === String ? String(message.slaId) : message.slaId; - else - object.slaId = options.longs === String ? $util.Long.prototype.toString.call(message.slaId) : options.longs === Number ? new $util.LongBits(message.slaId.low >>> 0, message.slaId.high >>> 0).toNumber() : message.slaId; - if (message.applicationName != null && message.hasOwnProperty("applicationName")) - object.applicationName = message.applicationName; - if (message.hostName != null && message.hasOwnProperty("hostName")) - object.hostName = message.hostName; - if (message.sltName != null && message.hasOwnProperty("sltName")) - object.sltName = message.sltName; - if (message.slpName != null && message.hasOwnProperty("slpName")) - object.slpName = message.slpName; - return object; - }; - - /** - * Converts this BackupApplianceBackupConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @instance - * @returns {Object.} JSON object - */ - BackupApplianceBackupConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupApplianceBackupConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupApplianceBackupConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceBackupConfig"; - }; - - return BackupApplianceBackupConfig; - })(); - - v1.DataSourceGcpResource = (function() { - - /** - * Properties of a DataSourceGcpResource. - * @memberof google.cloud.backupdr.v1 - * @interface IDataSourceGcpResource - * @property {string|null} [gcpResourcename] DataSourceGcpResource gcpResourcename - * @property {string|null} [location] DataSourceGcpResource location - * @property {string|null} [type] DataSourceGcpResource type - * @property {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null} [computeInstanceDatasourceProperties] DataSourceGcpResource computeInstanceDatasourceProperties - */ - - /** - * Constructs a new DataSourceGcpResource. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DataSourceGcpResource. - * @implements IDataSourceGcpResource - * @constructor - * @param {google.cloud.backupdr.v1.IDataSourceGcpResource=} [properties] Properties to set - */ - function DataSourceGcpResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataSourceGcpResource gcpResourcename. - * @member {string} gcpResourcename - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance - */ - DataSourceGcpResource.prototype.gcpResourcename = ""; - - /** - * DataSourceGcpResource location. - * @member {string} location - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance - */ - DataSourceGcpResource.prototype.location = ""; - - /** - * DataSourceGcpResource type. - * @member {string} type - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance - */ - DataSourceGcpResource.prototype.type = ""; - - /** - * DataSourceGcpResource computeInstanceDatasourceProperties. - * @member {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties|null|undefined} computeInstanceDatasourceProperties - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance - */ - DataSourceGcpResource.prototype.computeInstanceDatasourceProperties = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DataSourceGcpResource gcpResourceProperties. - * @member {"computeInstanceDatasourceProperties"|undefined} gcpResourceProperties - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance - */ - Object.defineProperty(DataSourceGcpResource.prototype, "gcpResourceProperties", { - get: $util.oneOfGetter($oneOfFields = ["computeInstanceDatasourceProperties"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DataSourceGcpResource instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {google.cloud.backupdr.v1.IDataSourceGcpResource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource instance - */ - DataSourceGcpResource.create = function create(properties) { - return new DataSourceGcpResource(properties); - }; - - /** - * Encodes the specified DataSourceGcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {google.cloud.backupdr.v1.IDataSourceGcpResource} message DataSourceGcpResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSourceGcpResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.computeInstanceDatasourceProperties != null && Object.hasOwnProperty.call(message, "computeInstanceDatasourceProperties")) - $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.encode(message.computeInstanceDatasourceProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataSourceGcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceGcpResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {google.cloud.backupdr.v1.IDataSourceGcpResource} message DataSourceGcpResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSourceGcpResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataSourceGcpResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSourceGcpResource.decode = function 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.backupdr.v1.DataSourceGcpResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.gcpResourcename = reader.string(); - break; - } - case 2: { - message.location = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 4: { - message.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataSourceGcpResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSourceGcpResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataSourceGcpResource message. - * @function verify - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataSourceGcpResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - if (!$util.isString(message.gcpResourcename)) - return "gcpResourcename: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.computeInstanceDatasourceProperties != null && message.hasOwnProperty("computeInstanceDatasourceProperties")) { - properties.gcpResourceProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify(message.computeInstanceDatasourceProperties); - if (error) - return "computeInstanceDatasourceProperties." + error; - } - } - return null; - }; - - /** - * Creates a DataSourceGcpResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DataSourceGcpResource} DataSourceGcpResource - */ - DataSourceGcpResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DataSourceGcpResource) - return object; - var message = new $root.google.cloud.backupdr.v1.DataSourceGcpResource(); - if (object.gcpResourcename != null) - message.gcpResourcename = String(object.gcpResourcename); - if (object.location != null) - message.location = String(object.location); - if (object.type != null) - message.type = String(object.type); - if (object.computeInstanceDatasourceProperties != null) { - if (typeof object.computeInstanceDatasourceProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.DataSourceGcpResource.computeInstanceDatasourceProperties: object expected"); - message.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.fromObject(object.computeInstanceDatasourceProperties); - } - return message; - }; - - /** - * Creates a plain object from a DataSourceGcpResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {google.cloud.backupdr.v1.DataSourceGcpResource} message DataSourceGcpResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataSourceGcpResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.gcpResourcename = ""; - object.location = ""; - object.type = ""; - } - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - object.gcpResourcename = message.gcpResourcename; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.computeInstanceDatasourceProperties != null && message.hasOwnProperty("computeInstanceDatasourceProperties")) { - object.computeInstanceDatasourceProperties = $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.toObject(message.computeInstanceDatasourceProperties, options); - if (options.oneofs) - object.gcpResourceProperties = "computeInstanceDatasourceProperties"; - } - return object; - }; - - /** - * Converts this DataSourceGcpResource to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @instance - * @returns {Object.} JSON object - */ - DataSourceGcpResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataSourceGcpResource - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DataSourceGcpResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataSourceGcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSourceGcpResource"; - }; - - return DataSourceGcpResource; - })(); - - v1.DataSourceBackupApplianceApplication = (function() { - - /** - * Properties of a DataSourceBackupApplianceApplication. - * @memberof google.cloud.backupdr.v1 - * @interface IDataSourceBackupApplianceApplication - * @property {string|null} [applicationName] DataSourceBackupApplianceApplication applicationName - * @property {string|null} [backupAppliance] DataSourceBackupApplianceApplication backupAppliance - * @property {number|Long|null} [applianceId] DataSourceBackupApplianceApplication applianceId - * @property {string|null} [type] DataSourceBackupApplianceApplication type - * @property {number|Long|null} [applicationId] DataSourceBackupApplianceApplication applicationId - * @property {string|null} [hostname] DataSourceBackupApplianceApplication hostname - * @property {number|Long|null} [hostId] DataSourceBackupApplianceApplication hostId - */ - - /** - * Constructs a new DataSourceBackupApplianceApplication. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DataSourceBackupApplianceApplication. - * @implements IDataSourceBackupApplianceApplication - * @constructor - * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication=} [properties] Properties to set - */ - function DataSourceBackupApplianceApplication(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataSourceBackupApplianceApplication applicationName. - * @member {string} applicationName - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.applicationName = ""; - - /** - * DataSourceBackupApplianceApplication backupAppliance. - * @member {string} backupAppliance - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.backupAppliance = ""; - - /** - * DataSourceBackupApplianceApplication applianceId. - * @member {number|Long} applianceId - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.applianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DataSourceBackupApplianceApplication type. - * @member {string} type - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.type = ""; - - /** - * DataSourceBackupApplianceApplication applicationId. - * @member {number|Long} applicationId - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.applicationId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * DataSourceBackupApplianceApplication hostname. - * @member {string} hostname - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.hostname = ""; - - /** - * DataSourceBackupApplianceApplication hostId. - * @member {number|Long} hostId - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - */ - DataSourceBackupApplianceApplication.prototype.hostId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new DataSourceBackupApplianceApplication instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication instance - */ - DataSourceBackupApplianceApplication.create = function create(properties) { - return new DataSourceBackupApplianceApplication(properties); - }; - - /** - * Encodes the specified DataSourceBackupApplianceApplication message. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSourceBackupApplianceApplication.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.applicationName != null && Object.hasOwnProperty.call(message, "applicationName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.applicationName); - if (message.backupAppliance != null && Object.hasOwnProperty.call(message, "backupAppliance")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupAppliance); - if (message.applianceId != null && Object.hasOwnProperty.call(message, "applianceId")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.applianceId); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.type); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.hostname); - if (message.hostId != null && Object.hasOwnProperty.call(message, "hostId")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.hostId); - if (message.applicationId != null && Object.hasOwnProperty.call(message, "applicationId")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.applicationId); - return writer; - }; - - /** - * Encodes the specified DataSourceBackupApplianceApplication message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DataSourceBackupApplianceApplication.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {google.cloud.backupdr.v1.IDataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataSourceBackupApplianceApplication.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSourceBackupApplianceApplication.decode = function 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.backupdr.v1.DataSourceBackupApplianceApplication(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.applicationName = reader.string(); - break; - } - case 2: { - message.backupAppliance = reader.string(); - break; - } - case 3: { - message.applianceId = reader.int64(); - break; - } - case 4: { - message.type = reader.string(); - break; - } - case 8: { - message.applicationId = reader.int64(); - break; - } - case 6: { - message.hostname = reader.string(); - break; - } - case 7: { - message.hostId = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataSourceBackupApplianceApplication message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataSourceBackupApplianceApplication.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataSourceBackupApplianceApplication message. - * @function verify - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataSourceBackupApplianceApplication.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.applicationName != null && message.hasOwnProperty("applicationName")) - if (!$util.isString(message.applicationName)) - return "applicationName: string expected"; - if (message.backupAppliance != null && message.hasOwnProperty("backupAppliance")) - if (!$util.isString(message.backupAppliance)) - return "backupAppliance: string expected"; - if (message.applianceId != null && message.hasOwnProperty("applianceId")) - if (!$util.isInteger(message.applianceId) && !(message.applianceId && $util.isInteger(message.applianceId.low) && $util.isInteger(message.applianceId.high))) - return "applianceId: integer|Long expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.applicationId != null && message.hasOwnProperty("applicationId")) - if (!$util.isInteger(message.applicationId) && !(message.applicationId && $util.isInteger(message.applicationId.low) && $util.isInteger(message.applicationId.high))) - return "applicationId: integer|Long expected"; - if (message.hostname != null && message.hasOwnProperty("hostname")) - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - if (message.hostId != null && message.hasOwnProperty("hostId")) - if (!$util.isInteger(message.hostId) && !(message.hostId && $util.isInteger(message.hostId.low) && $util.isInteger(message.hostId.high))) - return "hostId: integer|Long expected"; - return null; - }; - - /** - * Creates a DataSourceBackupApplianceApplication message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} DataSourceBackupApplianceApplication - */ - DataSourceBackupApplianceApplication.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication) - return object; - var message = new $root.google.cloud.backupdr.v1.DataSourceBackupApplianceApplication(); - if (object.applicationName != null) - message.applicationName = String(object.applicationName); - if (object.backupAppliance != null) - message.backupAppliance = String(object.backupAppliance); - if (object.applianceId != null) - if ($util.Long) - (message.applianceId = $util.Long.fromValue(object.applianceId)).unsigned = false; - else if (typeof object.applianceId === "string") - message.applianceId = parseInt(object.applianceId, 10); - else if (typeof object.applianceId === "number") - message.applianceId = object.applianceId; - else if (typeof object.applianceId === "object") - message.applianceId = new $util.LongBits(object.applianceId.low >>> 0, object.applianceId.high >>> 0).toNumber(); - if (object.type != null) - message.type = String(object.type); - if (object.applicationId != null) - if ($util.Long) - (message.applicationId = $util.Long.fromValue(object.applicationId)).unsigned = false; - else if (typeof object.applicationId === "string") - message.applicationId = parseInt(object.applicationId, 10); - else if (typeof object.applicationId === "number") - message.applicationId = object.applicationId; - else if (typeof object.applicationId === "object") - message.applicationId = new $util.LongBits(object.applicationId.low >>> 0, object.applicationId.high >>> 0).toNumber(); - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.hostId != null) - if ($util.Long) - (message.hostId = $util.Long.fromValue(object.hostId)).unsigned = false; - else if (typeof object.hostId === "string") - message.hostId = parseInt(object.hostId, 10); - else if (typeof object.hostId === "number") - message.hostId = object.hostId; - else if (typeof object.hostId === "object") - message.hostId = new $util.LongBits(object.hostId.low >>> 0, object.hostId.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a DataSourceBackupApplianceApplication message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {google.cloud.backupdr.v1.DataSourceBackupApplianceApplication} message DataSourceBackupApplianceApplication - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataSourceBackupApplianceApplication.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.applicationName = ""; - object.backupAppliance = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.applianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.applianceId = options.longs === String ? "0" : 0; - object.type = ""; - object.hostname = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.hostId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.hostId = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.applicationId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.applicationId = options.longs === String ? "0" : 0; - } - if (message.applicationName != null && message.hasOwnProperty("applicationName")) - object.applicationName = message.applicationName; - if (message.backupAppliance != null && message.hasOwnProperty("backupAppliance")) - object.backupAppliance = message.backupAppliance; - if (message.applianceId != null && message.hasOwnProperty("applianceId")) - if (typeof message.applianceId === "number") - object.applianceId = options.longs === String ? String(message.applianceId) : message.applianceId; - else - object.applianceId = options.longs === String ? $util.Long.prototype.toString.call(message.applianceId) : options.longs === Number ? new $util.LongBits(message.applianceId.low >>> 0, message.applianceId.high >>> 0).toNumber() : message.applianceId; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.hostname != null && message.hasOwnProperty("hostname")) - object.hostname = message.hostname; - if (message.hostId != null && message.hasOwnProperty("hostId")) - if (typeof message.hostId === "number") - object.hostId = options.longs === String ? String(message.hostId) : message.hostId; - else - object.hostId = options.longs === String ? $util.Long.prototype.toString.call(message.hostId) : options.longs === Number ? new $util.LongBits(message.hostId.low >>> 0, message.hostId.high >>> 0).toNumber() : message.hostId; - if (message.applicationId != null && message.hasOwnProperty("applicationId")) - if (typeof message.applicationId === "number") - object.applicationId = options.longs === String ? String(message.applicationId) : message.applicationId; - else - object.applicationId = options.longs === String ? $util.Long.prototype.toString.call(message.applicationId) : options.longs === Number ? new $util.LongBits(message.applicationId.low >>> 0, message.applicationId.high >>> 0).toNumber() : message.applicationId; - return object; - }; - - /** - * Converts this DataSourceBackupApplianceApplication to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @instance - * @returns {Object.} JSON object - */ - DataSourceBackupApplianceApplication.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataSourceBackupApplianceApplication - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DataSourceBackupApplianceApplication - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataSourceBackupApplianceApplication.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DataSourceBackupApplianceApplication"; - }; - - return DataSourceBackupApplianceApplication; - })(); - - v1.ServiceLockInfo = (function() { - - /** - * Properties of a ServiceLockInfo. - * @memberof google.cloud.backupdr.v1 - * @interface IServiceLockInfo - * @property {string|null} [operation] ServiceLockInfo operation - */ - - /** - * Constructs a new ServiceLockInfo. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ServiceLockInfo. - * @implements IServiceLockInfo - * @constructor - * @param {google.cloud.backupdr.v1.IServiceLockInfo=} [properties] Properties to set - */ - function ServiceLockInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceLockInfo operation. - * @member {string} operation - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @instance - */ - ServiceLockInfo.prototype.operation = ""; - - /** - * Creates a new ServiceLockInfo instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IServiceLockInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo instance - */ - ServiceLockInfo.create = function create(properties) { - return new ServiceLockInfo(properties); - }; - - /** - * Encodes the specified ServiceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IServiceLockInfo} message ServiceLockInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceLockInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.operation); - return writer; - }; - - /** - * Encodes the specified ServiceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceLockInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IServiceLockInfo} message ServiceLockInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceLockInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceLockInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceLockInfo.decode = function 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.backupdr.v1.ServiceLockInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.operation = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceLockInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceLockInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceLockInfo message. - * @function verify - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceLockInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operation != null && message.hasOwnProperty("operation")) - if (!$util.isString(message.operation)) - return "operation: string expected"; - return null; - }; - - /** - * Creates a ServiceLockInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ServiceLockInfo} ServiceLockInfo - */ - ServiceLockInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ServiceLockInfo) - return object; - var message = new $root.google.cloud.backupdr.v1.ServiceLockInfo(); - if (object.operation != null) - message.operation = String(object.operation); - return message; - }; - - /** - * Creates a plain object from a ServiceLockInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {google.cloud.backupdr.v1.ServiceLockInfo} message ServiceLockInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceLockInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.operation = ""; - if (message.operation != null && message.hasOwnProperty("operation")) - object.operation = message.operation; - return object; - }; - - /** - * Converts this ServiceLockInfo to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @instance - * @returns {Object.} JSON object - */ - ServiceLockInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceLockInfo - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ServiceLockInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceLockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ServiceLockInfo"; - }; - - return ServiceLockInfo; - })(); - - v1.BackupApplianceLockInfo = (function() { - - /** - * Properties of a BackupApplianceLockInfo. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupApplianceLockInfo - * @property {number|Long|null} [backupApplianceId] BackupApplianceLockInfo backupApplianceId - * @property {string|null} [backupApplianceName] BackupApplianceLockInfo backupApplianceName - * @property {string|null} [lockReason] BackupApplianceLockInfo lockReason - * @property {string|null} [jobName] BackupApplianceLockInfo jobName - * @property {string|null} [backupImage] BackupApplianceLockInfo backupImage - * @property {number|Long|null} [slaId] BackupApplianceLockInfo slaId - */ - - /** - * Constructs a new BackupApplianceLockInfo. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupApplianceLockInfo. - * @implements IBackupApplianceLockInfo - * @constructor - * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo=} [properties] Properties to set - */ - function BackupApplianceLockInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupApplianceLockInfo backupApplianceId. - * @member {number|Long} backupApplianceId - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - BackupApplianceLockInfo.prototype.backupApplianceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BackupApplianceLockInfo backupApplianceName. - * @member {string} backupApplianceName - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - BackupApplianceLockInfo.prototype.backupApplianceName = ""; - - /** - * BackupApplianceLockInfo lockReason. - * @member {string} lockReason - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - BackupApplianceLockInfo.prototype.lockReason = ""; - - /** - * BackupApplianceLockInfo jobName. - * @member {string|null|undefined} jobName - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - BackupApplianceLockInfo.prototype.jobName = null; - - /** - * BackupApplianceLockInfo backupImage. - * @member {string|null|undefined} backupImage - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - BackupApplianceLockInfo.prototype.backupImage = null; - - /** - * BackupApplianceLockInfo slaId. - * @member {number|Long|null|undefined} slaId - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - BackupApplianceLockInfo.prototype.slaId = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupApplianceLockInfo lockSource. - * @member {"jobName"|"backupImage"|"slaId"|undefined} lockSource - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - */ - Object.defineProperty(BackupApplianceLockInfo.prototype, "lockSource", { - get: $util.oneOfGetter($oneOfFields = ["jobName", "backupImage", "slaId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupApplianceLockInfo instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo instance - */ - BackupApplianceLockInfo.create = function create(properties) { - return new BackupApplianceLockInfo(properties); - }; - - /** - * Encodes the specified BackupApplianceLockInfo message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo} message BackupApplianceLockInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupApplianceLockInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupApplianceId != null && Object.hasOwnProperty.call(message, "backupApplianceId")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.backupApplianceId); - if (message.backupApplianceName != null && Object.hasOwnProperty.call(message, "backupApplianceName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupApplianceName); - if (message.lockReason != null && Object.hasOwnProperty.call(message, "lockReason")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.lockReason); - if (message.jobName != null && Object.hasOwnProperty.call(message, "jobName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.jobName); - if (message.backupImage != null && Object.hasOwnProperty.call(message, "backupImage")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.backupImage); - if (message.slaId != null && Object.hasOwnProperty.call(message, "slaId")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.slaId); - return writer; - }; - - /** - * Encodes the specified BackupApplianceLockInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceLockInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceLockInfo} message BackupApplianceLockInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupApplianceLockInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupApplianceLockInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupApplianceLockInfo.decode = function 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.backupdr.v1.BackupApplianceLockInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.backupApplianceId = reader.int64(); - break; - } - case 2: { - message.backupApplianceName = reader.string(); - break; - } - case 5: { - message.lockReason = reader.string(); - break; - } - case 6: { - message.jobName = reader.string(); - break; - } - case 7: { - message.backupImage = reader.string(); - break; - } - case 8: { - message.slaId = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupApplianceLockInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupApplianceLockInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupApplianceLockInfo message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupApplianceLockInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) - if (!$util.isInteger(message.backupApplianceId) && !(message.backupApplianceId && $util.isInteger(message.backupApplianceId.low) && $util.isInteger(message.backupApplianceId.high))) - return "backupApplianceId: integer|Long expected"; - if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) - if (!$util.isString(message.backupApplianceName)) - return "backupApplianceName: string expected"; - if (message.lockReason != null && message.hasOwnProperty("lockReason")) - if (!$util.isString(message.lockReason)) - return "lockReason: string expected"; - if (message.jobName != null && message.hasOwnProperty("jobName")) { - properties.lockSource = 1; - if (!$util.isString(message.jobName)) - return "jobName: string expected"; - } - if (message.backupImage != null && message.hasOwnProperty("backupImage")) { - if (properties.lockSource === 1) - return "lockSource: multiple values"; - properties.lockSource = 1; - if (!$util.isString(message.backupImage)) - return "backupImage: string expected"; - } - if (message.slaId != null && message.hasOwnProperty("slaId")) { - if (properties.lockSource === 1) - return "lockSource: multiple values"; - properties.lockSource = 1; - if (!$util.isInteger(message.slaId) && !(message.slaId && $util.isInteger(message.slaId.low) && $util.isInteger(message.slaId.high))) - return "slaId: integer|Long expected"; - } - return null; - }; - - /** - * Creates a BackupApplianceLockInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupApplianceLockInfo} BackupApplianceLockInfo - */ - BackupApplianceLockInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceLockInfo) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupApplianceLockInfo(); - if (object.backupApplianceId != null) - if ($util.Long) - (message.backupApplianceId = $util.Long.fromValue(object.backupApplianceId)).unsigned = false; - else if (typeof object.backupApplianceId === "string") - message.backupApplianceId = parseInt(object.backupApplianceId, 10); - else if (typeof object.backupApplianceId === "number") - message.backupApplianceId = object.backupApplianceId; - else if (typeof object.backupApplianceId === "object") - message.backupApplianceId = new $util.LongBits(object.backupApplianceId.low >>> 0, object.backupApplianceId.high >>> 0).toNumber(); - if (object.backupApplianceName != null) - message.backupApplianceName = String(object.backupApplianceName); - if (object.lockReason != null) - message.lockReason = String(object.lockReason); - if (object.jobName != null) - message.jobName = String(object.jobName); - if (object.backupImage != null) - message.backupImage = String(object.backupImage); - if (object.slaId != null) - if ($util.Long) - (message.slaId = $util.Long.fromValue(object.slaId)).unsigned = false; - else if (typeof object.slaId === "string") - message.slaId = parseInt(object.slaId, 10); - else if (typeof object.slaId === "number") - message.slaId = object.slaId; - else if (typeof object.slaId === "object") - message.slaId = new $util.LongBits(object.slaId.low >>> 0, object.slaId.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a BackupApplianceLockInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {google.cloud.backupdr.v1.BackupApplianceLockInfo} message BackupApplianceLockInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupApplianceLockInfo.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.backupApplianceId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.backupApplianceId = options.longs === String ? "0" : 0; - object.backupApplianceName = ""; - object.lockReason = ""; - } - if (message.backupApplianceId != null && message.hasOwnProperty("backupApplianceId")) - if (typeof message.backupApplianceId === "number") - object.backupApplianceId = options.longs === String ? String(message.backupApplianceId) : message.backupApplianceId; - else - object.backupApplianceId = options.longs === String ? $util.Long.prototype.toString.call(message.backupApplianceId) : options.longs === Number ? new $util.LongBits(message.backupApplianceId.low >>> 0, message.backupApplianceId.high >>> 0).toNumber() : message.backupApplianceId; - if (message.backupApplianceName != null && message.hasOwnProperty("backupApplianceName")) - object.backupApplianceName = message.backupApplianceName; - if (message.lockReason != null && message.hasOwnProperty("lockReason")) - object.lockReason = message.lockReason; - if (message.jobName != null && message.hasOwnProperty("jobName")) { - object.jobName = message.jobName; - if (options.oneofs) - object.lockSource = "jobName"; - } - if (message.backupImage != null && message.hasOwnProperty("backupImage")) { - object.backupImage = message.backupImage; - if (options.oneofs) - object.lockSource = "backupImage"; - } - if (message.slaId != null && message.hasOwnProperty("slaId")) { - if (typeof message.slaId === "number") - object.slaId = options.longs === String ? String(message.slaId) : message.slaId; - else - object.slaId = options.longs === String ? $util.Long.prototype.toString.call(message.slaId) : options.longs === Number ? new $util.LongBits(message.slaId.low >>> 0, message.slaId.high >>> 0).toNumber() : message.slaId; - if (options.oneofs) - object.lockSource = "slaId"; - } - return object; - }; - - /** - * Converts this BackupApplianceLockInfo to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @instance - * @returns {Object.} JSON object - */ - BackupApplianceLockInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupApplianceLockInfo - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupApplianceLockInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupApplianceLockInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceLockInfo"; - }; - - return BackupApplianceLockInfo; - })(); - - v1.BackupLock = (function() { - - /** - * Properties of a BackupLock. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupLock - * @property {google.protobuf.ITimestamp|null} [lockUntilTime] BackupLock lockUntilTime - * @property {google.cloud.backupdr.v1.IBackupApplianceLockInfo|null} [backupApplianceLockInfo] BackupLock backupApplianceLockInfo - * @property {google.cloud.backupdr.v1.IServiceLockInfo|null} [serviceLockInfo] BackupLock serviceLockInfo - */ - - /** - * Constructs a new BackupLock. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupLock. - * @implements IBackupLock - * @constructor - * @param {google.cloud.backupdr.v1.IBackupLock=} [properties] Properties to set - */ - function BackupLock(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupLock lockUntilTime. - * @member {google.protobuf.ITimestamp|null|undefined} lockUntilTime - * @memberof google.cloud.backupdr.v1.BackupLock - * @instance - */ - BackupLock.prototype.lockUntilTime = null; - - /** - * BackupLock backupApplianceLockInfo. - * @member {google.cloud.backupdr.v1.IBackupApplianceLockInfo|null|undefined} backupApplianceLockInfo - * @memberof google.cloud.backupdr.v1.BackupLock - * @instance - */ - BackupLock.prototype.backupApplianceLockInfo = null; - - /** - * BackupLock serviceLockInfo. - * @member {google.cloud.backupdr.v1.IServiceLockInfo|null|undefined} serviceLockInfo - * @memberof google.cloud.backupdr.v1.BackupLock - * @instance - */ - BackupLock.prototype.serviceLockInfo = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupLock ClientLockInfo. - * @member {"backupApplianceLockInfo"|"serviceLockInfo"|undefined} ClientLockInfo - * @memberof google.cloud.backupdr.v1.BackupLock - * @instance - */ - Object.defineProperty(BackupLock.prototype, "ClientLockInfo", { - get: $util.oneOfGetter($oneOfFields = ["backupApplianceLockInfo", "serviceLockInfo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupLock instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {google.cloud.backupdr.v1.IBackupLock=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock instance - */ - BackupLock.create = function create(properties) { - return new BackupLock(properties); - }; - - /** - * Encodes the specified BackupLock message. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {google.cloud.backupdr.v1.IBackupLock} message BackupLock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupLock.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lockUntilTime != null && Object.hasOwnProperty.call(message, "lockUntilTime")) - $root.google.protobuf.Timestamp.encode(message.lockUntilTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.backupApplianceLockInfo != null && Object.hasOwnProperty.call(message, "backupApplianceLockInfo")) - $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.encode(message.backupApplianceLockInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.serviceLockInfo != null && Object.hasOwnProperty.call(message, "serviceLockInfo")) - $root.google.cloud.backupdr.v1.ServiceLockInfo.encode(message.serviceLockInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BackupLock message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupLock.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {google.cloud.backupdr.v1.IBackupLock} message BackupLock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupLock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupLock message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupLock.decode = function 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.backupdr.v1.BackupLock(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.lockUntilTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.decode(reader, reader.uint32()); - break; - } - case 4: { - message.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupLock message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupLock.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupLock message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupLock.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.lockUntilTime != null && message.hasOwnProperty("lockUntilTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lockUntilTime); - if (error) - return "lockUntilTime." + error; - } - if (message.backupApplianceLockInfo != null && message.hasOwnProperty("backupApplianceLockInfo")) { - properties.ClientLockInfo = 1; - { - var error = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.verify(message.backupApplianceLockInfo); - if (error) - return "backupApplianceLockInfo." + error; - } - } - if (message.serviceLockInfo != null && message.hasOwnProperty("serviceLockInfo")) { - if (properties.ClientLockInfo === 1) - return "ClientLockInfo: multiple values"; - properties.ClientLockInfo = 1; - { - var error = $root.google.cloud.backupdr.v1.ServiceLockInfo.verify(message.serviceLockInfo); - if (error) - return "serviceLockInfo." + error; - } - } - return null; - }; - - /** - * Creates a BackupLock message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupLock} BackupLock - */ - BackupLock.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupLock) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupLock(); - if (object.lockUntilTime != null) { - if (typeof object.lockUntilTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupLock.lockUntilTime: object expected"); - message.lockUntilTime = $root.google.protobuf.Timestamp.fromObject(object.lockUntilTime); - } - if (object.backupApplianceLockInfo != null) { - if (typeof object.backupApplianceLockInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupLock.backupApplianceLockInfo: object expected"); - message.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.fromObject(object.backupApplianceLockInfo); - } - if (object.serviceLockInfo != null) { - if (typeof object.serviceLockInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupLock.serviceLockInfo: object expected"); - message.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.fromObject(object.serviceLockInfo); - } - return message; - }; - - /** - * Creates a plain object from a BackupLock message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {google.cloud.backupdr.v1.BackupLock} message BackupLock - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupLock.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.lockUntilTime = null; - if (message.lockUntilTime != null && message.hasOwnProperty("lockUntilTime")) - object.lockUntilTime = $root.google.protobuf.Timestamp.toObject(message.lockUntilTime, options); - if (message.backupApplianceLockInfo != null && message.hasOwnProperty("backupApplianceLockInfo")) { - object.backupApplianceLockInfo = $root.google.cloud.backupdr.v1.BackupApplianceLockInfo.toObject(message.backupApplianceLockInfo, options); - if (options.oneofs) - object.ClientLockInfo = "backupApplianceLockInfo"; - } - if (message.serviceLockInfo != null && message.hasOwnProperty("serviceLockInfo")) { - object.serviceLockInfo = $root.google.cloud.backupdr.v1.ServiceLockInfo.toObject(message.serviceLockInfo, options); - if (options.oneofs) - object.ClientLockInfo = "serviceLockInfo"; - } - return object; - }; - - /** - * Converts this BackupLock to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupLock - * @instance - * @returns {Object.} JSON object - */ - BackupLock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupLock - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupLock - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupLock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupLock"; - }; - - return BackupLock; - })(); - - v1.Backup = (function() { - - /** - * Properties of a Backup. - * @memberof google.cloud.backupdr.v1 - * @interface IBackup - * @property {string|null} [name] Backup name - * @property {string|null} [description] Backup description - * @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Backup updateTime - * @property {Object.|null} [labels] Backup labels - * @property {google.protobuf.ITimestamp|null} [enforcedRetentionEndTime] Backup enforcedRetentionEndTime - * @property {google.protobuf.ITimestamp|null} [expireTime] Backup expireTime - * @property {google.protobuf.ITimestamp|null} [consistencyTime] Backup consistencyTime - * @property {string|null} [etag] Backup etag - * @property {google.cloud.backupdr.v1.Backup.State|null} [state] Backup state - * @property {Array.|null} [serviceLocks] Backup serviceLocks - * @property {Array.|null} [backupApplianceLocks] Backup backupApplianceLocks - * @property {google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null} [computeInstanceBackupProperties] Backup computeInstanceBackupProperties - * @property {google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null} [backupApplianceBackupProperties] Backup backupApplianceBackupProperties - * @property {google.cloud.backupdr.v1.Backup.BackupType|null} [backupType] Backup backupType - * @property {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null} [gcpBackupPlanInfo] Backup gcpBackupPlanInfo - * @property {number|Long|null} [resourceSizeBytes] Backup resourceSizeBytes - */ - - /** - * Constructs a new Backup. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a Backup. - * @implements IBackup - * @constructor - * @param {google.cloud.backupdr.v1.IBackup=} [properties] Properties to set - */ - function Backup(properties) { - this.labels = {}; - this.serviceLocks = []; - this.backupApplianceLocks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Backup name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.name = ""; - - /** - * Backup description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.description = null; - - /** - * Backup createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.createTime = null; - - /** - * Backup updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.updateTime = null; - - /** - * Backup labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.labels = $util.emptyObject; - - /** - * Backup enforcedRetentionEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} enforcedRetentionEndTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.enforcedRetentionEndTime = null; - - /** - * Backup expireTime. - * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.expireTime = null; - - /** - * Backup consistencyTime. - * @member {google.protobuf.ITimestamp|null|undefined} consistencyTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.consistencyTime = null; - - /** - * Backup etag. - * @member {string|null|undefined} etag - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.etag = null; - - /** - * Backup state. - * @member {google.cloud.backupdr.v1.Backup.State} state - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.state = 0; - - /** - * Backup serviceLocks. - * @member {Array.} serviceLocks - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.serviceLocks = $util.emptyArray; - - /** - * Backup backupApplianceLocks. - * @member {Array.} backupApplianceLocks - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.backupApplianceLocks = $util.emptyArray; - - /** - * Backup computeInstanceBackupProperties. - * @member {google.cloud.backupdr.v1.IComputeInstanceBackupProperties|null|undefined} computeInstanceBackupProperties - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.computeInstanceBackupProperties = null; - - /** - * Backup backupApplianceBackupProperties. - * @member {google.cloud.backupdr.v1.IBackupApplianceBackupProperties|null|undefined} backupApplianceBackupProperties - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.backupApplianceBackupProperties = null; - - /** - * Backup backupType. - * @member {google.cloud.backupdr.v1.Backup.BackupType} backupType - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.backupType = 0; - - /** - * Backup gcpBackupPlanInfo. - * @member {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo|null|undefined} gcpBackupPlanInfo - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.gcpBackupPlanInfo = null; - - /** - * Backup resourceSizeBytes. - * @member {number|Long} resourceSizeBytes - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Backup.prototype.resourceSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Backup _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup _createTime. - * @member {"createTime"|undefined} _createTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_createTime", { - get: $util.oneOfGetter($oneOfFields = ["createTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup _updateTime. - * @member {"updateTime"|undefined} _updateTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_updateTime", { - get: $util.oneOfGetter($oneOfFields = ["updateTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup _enforcedRetentionEndTime. - * @member {"enforcedRetentionEndTime"|undefined} _enforcedRetentionEndTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_enforcedRetentionEndTime", { - get: $util.oneOfGetter($oneOfFields = ["enforcedRetentionEndTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup _expireTime. - * @member {"expireTime"|undefined} _expireTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_expireTime", { - get: $util.oneOfGetter($oneOfFields = ["expireTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup _consistencyTime. - * @member {"consistencyTime"|undefined} _consistencyTime - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_consistencyTime", { - get: $util.oneOfGetter($oneOfFields = ["consistencyTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup _etag. - * @member {"etag"|undefined} _etag - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "_etag", { - get: $util.oneOfGetter($oneOfFields = ["etag"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup backupProperties. - * @member {"computeInstanceBackupProperties"|"backupApplianceBackupProperties"|undefined} backupProperties - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "backupProperties", { - get: $util.oneOfGetter($oneOfFields = ["computeInstanceBackupProperties", "backupApplianceBackupProperties"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Backup planInfo. - * @member {"gcpBackupPlanInfo"|undefined} planInfo - * @memberof google.cloud.backupdr.v1.Backup - * @instance - */ - Object.defineProperty(Backup.prototype, "planInfo", { - get: $util.oneOfGetter($oneOfFields = ["gcpBackupPlanInfo"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Backup instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {google.cloud.backupdr.v1.IBackup=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Backup} Backup instance - */ - Backup.create = function create(properties) { - return new Backup(properties); - }; - - /** - * Encodes the specified Backup message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {google.cloud.backupdr.v1.IBackup} message Backup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Backup.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).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 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.enforcedRetentionEndTime != null && Object.hasOwnProperty.call(message, "enforcedRetentionEndTime")) - $root.google.protobuf.Timestamp.encode(message.enforcedRetentionEndTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.consistencyTime != null && Object.hasOwnProperty.call(message, "consistencyTime")) - $root.google.protobuf.Timestamp.encode(message.consistencyTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 15, wireType 0 =*/120).int32(message.state); - if (message.serviceLocks != null && message.serviceLocks.length) - for (var i = 0; i < message.serviceLocks.length; ++i) - $root.google.cloud.backupdr.v1.BackupLock.encode(message.serviceLocks[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.backupApplianceLocks != null && message.backupApplianceLocks.length) - for (var i = 0; i < message.backupApplianceLocks.length; ++i) - $root.google.cloud.backupdr.v1.BackupLock.encode(message.backupApplianceLocks[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.computeInstanceBackupProperties != null && Object.hasOwnProperty.call(message, "computeInstanceBackupProperties")) - $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.encode(message.computeInstanceBackupProperties, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.backupType != null && Object.hasOwnProperty.call(message, "backupType")) - writer.uint32(/* id 20, wireType 0 =*/160).int32(message.backupType); - if (message.backupApplianceBackupProperties != null && Object.hasOwnProperty.call(message, "backupApplianceBackupProperties")) - $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.encode(message.backupApplianceBackupProperties, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.gcpBackupPlanInfo != null && Object.hasOwnProperty.call(message, "gcpBackupPlanInfo")) - $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.encode(message.gcpBackupPlanInfo, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.resourceSizeBytes != null && Object.hasOwnProperty.call(message, "resourceSizeBytes")) - writer.uint32(/* id 23, wireType 0 =*/184).int64(message.resourceSizeBytes); - return writer; - }; - - /** - * Encodes the specified Backup message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {google.cloud.backupdr.v1.IBackup} message Backup message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Backup.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Backup message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Backup} Backup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Backup.decode = function 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.backupdr.v1.Backup(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - 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 6: { - message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.consistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - message.etag = reader.string(); - break; - } - case 15: { - message.state = reader.int32(); - break; - } - case 17: { - if (!(message.serviceLocks && message.serviceLocks.length)) - message.serviceLocks = []; - message.serviceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader, reader.uint32())); - break; - } - case 18: { - if (!(message.backupApplianceLocks && message.backupApplianceLocks.length)) - message.backupApplianceLocks = []; - message.backupApplianceLocks.push($root.google.cloud.backupdr.v1.BackupLock.decode(reader, reader.uint32())); - break; - } - case 19: { - message.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.decode(reader, reader.uint32()); - break; - } - case 21: { - message.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.decode(reader, reader.uint32()); - break; - } - case 20: { - message.backupType = reader.int32(); - break; - } - case 22: { - message.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.decode(reader, reader.uint32()); - break; - } - case 23: { - message.resourceSizeBytes = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Backup message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Backup} Backup - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Backup.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Backup message. - * @function verify - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Backup.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.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - properties._createTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - properties._updateTime = 1; - { - 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.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { - properties._enforcedRetentionEndTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.enforcedRetentionEndTime); - if (error) - return "enforcedRetentionEndTime." + error; - } - } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - properties._expireTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); - if (error) - return "expireTime." + error; - } - } - if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { - properties._consistencyTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.consistencyTime); - if (error) - return "consistencyTime." + error; - } - } - if (message.etag != null && message.hasOwnProperty("etag")) { - properties._etag = 1; - if (!$util.isString(message.etag)) - return "etag: 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.serviceLocks != null && message.hasOwnProperty("serviceLocks")) { - if (!Array.isArray(message.serviceLocks)) - return "serviceLocks: array expected"; - for (var i = 0; i < message.serviceLocks.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupLock.verify(message.serviceLocks[i]); - if (error) - return "serviceLocks." + error; - } - } - if (message.backupApplianceLocks != null && message.hasOwnProperty("backupApplianceLocks")) { - if (!Array.isArray(message.backupApplianceLocks)) - return "backupApplianceLocks: array expected"; - for (var i = 0; i < message.backupApplianceLocks.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupLock.verify(message.backupApplianceLocks[i]); - if (error) - return "backupApplianceLocks." + error; - } - } - if (message.computeInstanceBackupProperties != null && message.hasOwnProperty("computeInstanceBackupProperties")) { - properties.backupProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify(message.computeInstanceBackupProperties); - if (error) - return "computeInstanceBackupProperties." + error; - } - } - if (message.backupApplianceBackupProperties != null && message.hasOwnProperty("backupApplianceBackupProperties")) { - if (properties.backupProperties === 1) - return "backupProperties: multiple values"; - properties.backupProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify(message.backupApplianceBackupProperties); - if (error) - return "backupApplianceBackupProperties." + error; - } - } - if (message.backupType != null && message.hasOwnProperty("backupType")) - switch (message.backupType) { - default: - return "backupType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.gcpBackupPlanInfo != null && message.hasOwnProperty("gcpBackupPlanInfo")) { - properties.planInfo = 1; - { - var error = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify(message.gcpBackupPlanInfo); - if (error) - return "gcpBackupPlanInfo." + error; - } - } - if (message.resourceSizeBytes != null && message.hasOwnProperty("resourceSizeBytes")) - if (!$util.isInteger(message.resourceSizeBytes) && !(message.resourceSizeBytes && $util.isInteger(message.resourceSizeBytes.low) && $util.isInteger(message.resourceSizeBytes.high))) - return "resourceSizeBytes: integer|Long expected"; - return null; - }; - - /** - * Creates a Backup message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Backup} Backup - */ - Backup.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Backup) - return object; - var message = new $root.google.cloud.backupdr.v1.Backup(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.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.backupdr.v1.Backup.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.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.enforcedRetentionEndTime != null) { - if (typeof object.enforcedRetentionEndTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.enforcedRetentionEndTime: object expected"); - message.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.fromObject(object.enforcedRetentionEndTime); - } - if (object.expireTime != null) { - if (typeof object.expireTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); - } - if (object.consistencyTime != null) { - if (typeof object.consistencyTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.consistencyTime: object expected"); - message.consistencyTime = $root.google.protobuf.Timestamp.fromObject(object.consistencyTime); - } - if (object.etag != null) - message.etag = String(object.etag); - 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 "ACTIVE": - case 2: - message.state = 2; - break; - case "DELETING": - case 3: - message.state = 3; - break; - case "ERROR": - case 4: - message.state = 4; - break; - } - if (object.serviceLocks) { - if (!Array.isArray(object.serviceLocks)) - throw TypeError(".google.cloud.backupdr.v1.Backup.serviceLocks: array expected"); - message.serviceLocks = []; - for (var i = 0; i < object.serviceLocks.length; ++i) { - if (typeof object.serviceLocks[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.serviceLocks: object expected"); - message.serviceLocks[i] = $root.google.cloud.backupdr.v1.BackupLock.fromObject(object.serviceLocks[i]); - } - } - if (object.backupApplianceLocks) { - if (!Array.isArray(object.backupApplianceLocks)) - throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceLocks: array expected"); - message.backupApplianceLocks = []; - for (var i = 0; i < object.backupApplianceLocks.length; ++i) { - if (typeof object.backupApplianceLocks[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceLocks: object expected"); - message.backupApplianceLocks[i] = $root.google.cloud.backupdr.v1.BackupLock.fromObject(object.backupApplianceLocks[i]); - } - } - if (object.computeInstanceBackupProperties != null) { - if (typeof object.computeInstanceBackupProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.computeInstanceBackupProperties: object expected"); - message.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.fromObject(object.computeInstanceBackupProperties); - } - if (object.backupApplianceBackupProperties != null) { - if (typeof object.backupApplianceBackupProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.backupApplianceBackupProperties: object expected"); - message.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.fromObject(object.backupApplianceBackupProperties); - } - switch (object.backupType) { - default: - if (typeof object.backupType === "number") { - message.backupType = object.backupType; - break; - } - break; - case "BACKUP_TYPE_UNSPECIFIED": - case 0: - message.backupType = 0; - break; - case "SCHEDULED": - case 1: - message.backupType = 1; - break; - case "ON_DEMAND": - case 2: - message.backupType = 2; - break; - } - if (object.gcpBackupPlanInfo != null) { - if (typeof object.gcpBackupPlanInfo !== "object") - throw TypeError(".google.cloud.backupdr.v1.Backup.gcpBackupPlanInfo: object expected"); - message.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.fromObject(object.gcpBackupPlanInfo); - } - if (object.resourceSizeBytes != null) - if ($util.Long) - (message.resourceSizeBytes = $util.Long.fromValue(object.resourceSizeBytes)).unsigned = false; - else if (typeof object.resourceSizeBytes === "string") - message.resourceSizeBytes = parseInt(object.resourceSizeBytes, 10); - else if (typeof object.resourceSizeBytes === "number") - message.resourceSizeBytes = object.resourceSizeBytes; - else if (typeof object.resourceSizeBytes === "object") - message.resourceSizeBytes = new $util.LongBits(object.resourceSizeBytes.low >>> 0, object.resourceSizeBytes.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a Backup message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {google.cloud.backupdr.v1.Backup} message Backup - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Backup.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.serviceLocks = []; - object.backupApplianceLocks = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.backupType = options.enums === String ? "BACKUP_TYPE_UNSPECIFIED" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.resourceSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.resourceSizeBytes = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (options.oneofs) - object._createTime = "createTime"; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (options.oneofs) - object._updateTime = "updateTime"; - } - 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.enforcedRetentionEndTime != null && message.hasOwnProperty("enforcedRetentionEndTime")) { - object.enforcedRetentionEndTime = $root.google.protobuf.Timestamp.toObject(message.enforcedRetentionEndTime, options); - if (options.oneofs) - object._enforcedRetentionEndTime = "enforcedRetentionEndTime"; - } - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); - if (options.oneofs) - object._expireTime = "expireTime"; - } - if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { - object.consistencyTime = $root.google.protobuf.Timestamp.toObject(message.consistencyTime, options); - if (options.oneofs) - object._consistencyTime = "consistencyTime"; - } - if (message.etag != null && message.hasOwnProperty("etag")) { - object.etag = message.etag; - if (options.oneofs) - object._etag = "etag"; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.backupdr.v1.Backup.State[message.state] === undefined ? message.state : $root.google.cloud.backupdr.v1.Backup.State[message.state] : message.state; - if (message.serviceLocks && message.serviceLocks.length) { - object.serviceLocks = []; - for (var j = 0; j < message.serviceLocks.length; ++j) - object.serviceLocks[j] = $root.google.cloud.backupdr.v1.BackupLock.toObject(message.serviceLocks[j], options); - } - if (message.backupApplianceLocks && message.backupApplianceLocks.length) { - object.backupApplianceLocks = []; - for (var j = 0; j < message.backupApplianceLocks.length; ++j) - object.backupApplianceLocks[j] = $root.google.cloud.backupdr.v1.BackupLock.toObject(message.backupApplianceLocks[j], options); - } - if (message.computeInstanceBackupProperties != null && message.hasOwnProperty("computeInstanceBackupProperties")) { - object.computeInstanceBackupProperties = $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties.toObject(message.computeInstanceBackupProperties, options); - if (options.oneofs) - object.backupProperties = "computeInstanceBackupProperties"; - } - if (message.backupType != null && message.hasOwnProperty("backupType")) - object.backupType = options.enums === String ? $root.google.cloud.backupdr.v1.Backup.BackupType[message.backupType] === undefined ? message.backupType : $root.google.cloud.backupdr.v1.Backup.BackupType[message.backupType] : message.backupType; - if (message.backupApplianceBackupProperties != null && message.hasOwnProperty("backupApplianceBackupProperties")) { - object.backupApplianceBackupProperties = $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties.toObject(message.backupApplianceBackupProperties, options); - if (options.oneofs) - object.backupProperties = "backupApplianceBackupProperties"; - } - if (message.gcpBackupPlanInfo != null && message.hasOwnProperty("gcpBackupPlanInfo")) { - object.gcpBackupPlanInfo = $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.toObject(message.gcpBackupPlanInfo, options); - if (options.oneofs) - object.planInfo = "gcpBackupPlanInfo"; - } - if (message.resourceSizeBytes != null && message.hasOwnProperty("resourceSizeBytes")) - if (typeof message.resourceSizeBytes === "number") - object.resourceSizeBytes = options.longs === String ? String(message.resourceSizeBytes) : message.resourceSizeBytes; - else - object.resourceSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.resourceSizeBytes) : options.longs === Number ? new $util.LongBits(message.resourceSizeBytes.low >>> 0, message.resourceSizeBytes.high >>> 0).toNumber() : message.resourceSizeBytes; - return object; - }; - - /** - * Converts this Backup to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Backup - * @instance - * @returns {Object.} JSON object - */ - Backup.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Backup - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Backup - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Backup.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Backup"; - }; - - /** - * State enum. - * @name google.cloud.backupdr.v1.Backup.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} ACTIVE=2 ACTIVE value - * @property {number} DELETING=3 DELETING value - * @property {number} ERROR=4 ERROR value - */ - Backup.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "ACTIVE"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "ERROR"] = 4; - return values; - })(); - - /** - * BackupType enum. - * @name google.cloud.backupdr.v1.Backup.BackupType - * @enum {number} - * @property {number} BACKUP_TYPE_UNSPECIFIED=0 BACKUP_TYPE_UNSPECIFIED value - * @property {number} SCHEDULED=1 SCHEDULED value - * @property {number} ON_DEMAND=2 ON_DEMAND value - */ - Backup.BackupType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCHEDULED"] = 1; - values[valuesById[2] = "ON_DEMAND"] = 2; - return values; - })(); - - Backup.GCPBackupPlanInfo = (function() { - - /** - * Properties of a GCPBackupPlanInfo. - * @memberof google.cloud.backupdr.v1.Backup - * @interface IGCPBackupPlanInfo - * @property {string|null} [backupPlan] GCPBackupPlanInfo backupPlan - * @property {string|null} [backupPlanRuleId] GCPBackupPlanInfo backupPlanRuleId - */ - - /** - * Constructs a new GCPBackupPlanInfo. - * @memberof google.cloud.backupdr.v1.Backup - * @classdesc Represents a GCPBackupPlanInfo. - * @implements IGCPBackupPlanInfo - * @constructor - * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo=} [properties] Properties to set - */ - function GCPBackupPlanInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GCPBackupPlanInfo backupPlan. - * @member {string} backupPlan - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @instance - */ - GCPBackupPlanInfo.prototype.backupPlan = ""; - - /** - * GCPBackupPlanInfo backupPlanRuleId. - * @member {string} backupPlanRuleId - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @instance - */ - GCPBackupPlanInfo.prototype.backupPlanRuleId = ""; - - /** - * Creates a new GCPBackupPlanInfo instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo instance - */ - GCPBackupPlanInfo.create = function create(properties) { - return new GCPBackupPlanInfo(properties); - }; - - /** - * Encodes the specified GCPBackupPlanInfo message. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo} message GCPBackupPlanInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GCPBackupPlanInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupPlan != null && Object.hasOwnProperty.call(message, "backupPlan")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.backupPlan); - if (message.backupPlanRuleId != null && Object.hasOwnProperty.call(message, "backupPlanRuleId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupPlanRuleId); - return writer; - }; - - /** - * Encodes the specified GCPBackupPlanInfo message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {google.cloud.backupdr.v1.Backup.IGCPBackupPlanInfo} message GCPBackupPlanInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GCPBackupPlanInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GCPBackupPlanInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GCPBackupPlanInfo.decode = function 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.backupdr.v1.Backup.GCPBackupPlanInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.backupPlan = reader.string(); - break; - } - case 2: { - message.backupPlanRuleId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GCPBackupPlanInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GCPBackupPlanInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GCPBackupPlanInfo message. - * @function verify - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GCPBackupPlanInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - if (!$util.isString(message.backupPlan)) - return "backupPlan: string expected"; - if (message.backupPlanRuleId != null && message.hasOwnProperty("backupPlanRuleId")) - if (!$util.isString(message.backupPlanRuleId)) - return "backupPlanRuleId: string expected"; - return null; - }; - - /** - * Creates a GCPBackupPlanInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} GCPBackupPlanInfo - */ - GCPBackupPlanInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo) - return object; - var message = new $root.google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo(); - if (object.backupPlan != null) - message.backupPlan = String(object.backupPlan); - if (object.backupPlanRuleId != null) - message.backupPlanRuleId = String(object.backupPlanRuleId); - return message; - }; - - /** - * Creates a plain object from a GCPBackupPlanInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo} message GCPBackupPlanInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GCPBackupPlanInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.backupPlan = ""; - object.backupPlanRuleId = ""; - } - if (message.backupPlan != null && message.hasOwnProperty("backupPlan")) - object.backupPlan = message.backupPlan; - if (message.backupPlanRuleId != null && message.hasOwnProperty("backupPlanRuleId")) - object.backupPlanRuleId = message.backupPlanRuleId; - return object; - }; - - /** - * Converts this GCPBackupPlanInfo to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @instance - * @returns {Object.} JSON object - */ - GCPBackupPlanInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GCPBackupPlanInfo - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GCPBackupPlanInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Backup.GCPBackupPlanInfo"; - }; - - return GCPBackupPlanInfo; - })(); - - return Backup; - })(); - - v1.CreateBackupVaultRequest = (function() { - - /** - * Properties of a CreateBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @interface ICreateBackupVaultRequest - * @property {string|null} [parent] CreateBackupVaultRequest parent - * @property {string|null} [backupVaultId] CreateBackupVaultRequest backupVaultId - * @property {google.cloud.backupdr.v1.IBackupVault|null} [backupVault] CreateBackupVaultRequest backupVault - * @property {string|null} [requestId] CreateBackupVaultRequest requestId - * @property {boolean|null} [validateOnly] CreateBackupVaultRequest validateOnly - */ - - /** - * Constructs a new CreateBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CreateBackupVaultRequest. - * @implements ICreateBackupVaultRequest - * @constructor - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest=} [properties] Properties to set - */ - function CreateBackupVaultRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateBackupVaultRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.parent = ""; - - /** - * CreateBackupVaultRequest backupVaultId. - * @member {string} backupVaultId - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.backupVaultId = ""; - - /** - * CreateBackupVaultRequest backupVault. - * @member {google.cloud.backupdr.v1.IBackupVault|null|undefined} backupVault - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.backupVault = null; - - /** - * CreateBackupVaultRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.requestId = ""; - - /** - * CreateBackupVaultRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - */ - CreateBackupVaultRequest.prototype.validateOnly = false; - - /** - * Creates a new CreateBackupVaultRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest instance - */ - CreateBackupVaultRequest.create = function create(properties) { - return new CreateBackupVaultRequest(properties); - }; - - /** - * Encodes the specified CreateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupVaultRequest.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.backupVaultId != null && Object.hasOwnProperty.call(message, "backupVaultId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupVaultId); - if (message.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) - $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVault, 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); - return writer; - }; - - /** - * Encodes the specified CreateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CreateBackupVaultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.ICreateBackupVaultRequest} message CreateBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateBackupVaultRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupVaultRequest.decode = function 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.backupdr.v1.CreateBackupVaultRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.backupVaultId = reader.string(); - break; - } - case 3: { - message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - case 5: { - message.validateOnly = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateBackupVaultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateBackupVaultRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateBackupVaultRequest.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.backupVaultId != null && message.hasOwnProperty("backupVaultId")) - if (!$util.isString(message.backupVaultId)) - return "backupVaultId: string expected"; - if (message.backupVault != null && message.hasOwnProperty("backupVault")) { - var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault); - if (error) - return "backupVault." + 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"; - return null; - }; - - /** - * Creates a CreateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CreateBackupVaultRequest} CreateBackupVaultRequest - */ - CreateBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CreateBackupVaultRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.CreateBackupVaultRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.backupVaultId != null) - message.backupVaultId = String(object.backupVaultId); - if (object.backupVault != null) { - if (typeof object.backupVault !== "object") - throw TypeError(".google.cloud.backupdr.v1.CreateBackupVaultRequest.backupVault: object expected"); - message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVault); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - return message; - }; - - /** - * Creates a plain object from a CreateBackupVaultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.CreateBackupVaultRequest} message CreateBackupVaultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateBackupVaultRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.backupVaultId = ""; - object.backupVault = null; - object.requestId = ""; - object.validateOnly = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.backupVaultId != null && message.hasOwnProperty("backupVaultId")) - object.backupVaultId = message.backupVaultId; - if (message.backupVault != null && message.hasOwnProperty("backupVault")) - object.backupVault = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVault, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - return object; - }; - - /** - * Converts this CreateBackupVaultRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @instance - * @returns {Object.} JSON object - */ - CreateBackupVaultRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateBackupVaultRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CreateBackupVaultRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CreateBackupVaultRequest"; - }; - - return CreateBackupVaultRequest; - })(); - - v1.ListBackupVaultsRequest = (function() { - - /** - * Properties of a ListBackupVaultsRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupVaultsRequest - * @property {string|null} [parent] ListBackupVaultsRequest parent - * @property {number|null} [pageSize] ListBackupVaultsRequest pageSize - * @property {string|null} [pageToken] ListBackupVaultsRequest pageToken - * @property {string|null} [filter] ListBackupVaultsRequest filter - * @property {string|null} [orderBy] ListBackupVaultsRequest orderBy - * @property {google.cloud.backupdr.v1.BackupVaultView|null} [view] ListBackupVaultsRequest view - */ - - /** - * Constructs a new ListBackupVaultsRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupVaultsRequest. - * @implements IListBackupVaultsRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest=} [properties] Properties to set - */ - function ListBackupVaultsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListBackupVaultsRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.parent = ""; - - /** - * ListBackupVaultsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.pageSize = 0; - - /** - * ListBackupVaultsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.pageToken = ""; - - /** - * ListBackupVaultsRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.filter = ""; - - /** - * ListBackupVaultsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.orderBy = ""; - - /** - * ListBackupVaultsRequest view. - * @member {google.cloud.backupdr.v1.BackupVaultView} view - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - */ - ListBackupVaultsRequest.prototype.view = 0; - - /** - * Creates a new ListBackupVaultsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest instance - */ - ListBackupVaultsRequest.create = function create(properties) { - return new ListBackupVaultsRequest(properties); - }; - - /** - * Encodes the specified ListBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupVaultsRequest.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); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); - return writer; - }; - - /** - * Encodes the specified ListBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsRequest} message ListBackupVaultsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupVaultsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupVaultsRequest.decode = function 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.backupdr.v1.ListBackupVaultsRequest(); - 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; - } - case 6: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListBackupVaultsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupVaultsRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupVaultsRequest.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"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a ListBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupVaultsRequest} ListBackupVaultsRequest - */ - ListBackupVaultsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupVaultsRequest(); - 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); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "BACKUP_VAULT_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BACKUP_VAULT_VIEW_BASIC": - case 1: - message.view = 1; - break; - case "BACKUP_VAULT_VIEW_FULL": - case 2: - message.view = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a ListBackupVaultsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.ListBackupVaultsRequest} message ListBackupVaultsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupVaultsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - object.view = options.enums === String ? "BACKUP_VAULT_VIEW_UNSPECIFIED" : 0; - } - 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; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVaultView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupVaultView[message.view] : message.view; - return object; - }; - - /** - * Converts this ListBackupVaultsRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @instance - * @returns {Object.} JSON object - */ - ListBackupVaultsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupVaultsRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupVaultsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupVaultsRequest"; - }; - - return ListBackupVaultsRequest; - })(); - - v1.ListBackupVaultsResponse = (function() { - - /** - * Properties of a ListBackupVaultsResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupVaultsResponse - * @property {Array.|null} [backupVaults] ListBackupVaultsResponse backupVaults - * @property {string|null} [nextPageToken] ListBackupVaultsResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupVaultsResponse unreachable - */ - - /** - * Constructs a new ListBackupVaultsResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupVaultsResponse. - * @implements IListBackupVaultsResponse - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse=} [properties] Properties to set - */ - function ListBackupVaultsResponse(properties) { - this.backupVaults = []; - 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]]; - } - - /** - * ListBackupVaultsResponse backupVaults. - * @member {Array.} backupVaults - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @instance - */ - ListBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; - - /** - * ListBackupVaultsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @instance - */ - ListBackupVaultsResponse.prototype.nextPageToken = ""; - - /** - * ListBackupVaultsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @instance - */ - ListBackupVaultsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListBackupVaultsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse instance - */ - ListBackupVaultsResponse.create = function create(properties) { - return new ListBackupVaultsResponse(properties); - }; - - /** - * Encodes the specified ListBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupVaultsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupVaults != null && message.backupVaults.length) - for (var i = 0; i < message.backupVaults.length; ++i) - $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVaults[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 ListBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupVaultsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupVaultsResponse} message ListBackupVaultsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupVaultsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupVaultsResponse.decode = function 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.backupdr.v1.ListBackupVaultsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.backupVaults && message.backupVaults.length)) - message.backupVaults = []; - message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.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 ListBackupVaultsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupVaultsResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupVaultsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { - if (!Array.isArray(message.backupVaults)) - return "backupVaults: array expected"; - for (var i = 0; i < message.backupVaults.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVaults[i]); - if (error) - return "backupVaults." + 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 ListBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupVaultsResponse} ListBackupVaultsResponse - */ - ListBackupVaultsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupVaultsResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupVaultsResponse(); - if (object.backupVaults) { - if (!Array.isArray(object.backupVaults)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.backupVaults: array expected"); - message.backupVaults = []; - for (var i = 0; i < object.backupVaults.length; ++i) { - if (typeof object.backupVaults[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.backupVaults: object expected"); - message.backupVaults[i] = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVaults[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupVaultsResponse.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 ListBackupVaultsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.ListBackupVaultsResponse} message ListBackupVaultsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupVaultsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backupVaults = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backupVaults && message.backupVaults.length) { - object.backupVaults = []; - for (var j = 0; j < message.backupVaults.length; ++j) - object.backupVaults[j] = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVaults[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 ListBackupVaultsResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @instance - * @returns {Object.} JSON object - */ - ListBackupVaultsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupVaultsResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupVaultsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupVaultsResponse"; - }; - - return ListBackupVaultsResponse; - })(); - - v1.FetchUsableBackupVaultsRequest = (function() { - - /** - * Properties of a FetchUsableBackupVaultsRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IFetchUsableBackupVaultsRequest - * @property {string|null} [parent] FetchUsableBackupVaultsRequest parent - * @property {number|null} [pageSize] FetchUsableBackupVaultsRequest pageSize - * @property {string|null} [pageToken] FetchUsableBackupVaultsRequest pageToken - * @property {string|null} [filter] FetchUsableBackupVaultsRequest filter - * @property {string|null} [orderBy] FetchUsableBackupVaultsRequest orderBy - */ - - /** - * Constructs a new FetchUsableBackupVaultsRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FetchUsableBackupVaultsRequest. - * @implements IFetchUsableBackupVaultsRequest - * @constructor - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest=} [properties] Properties to set - */ - function FetchUsableBackupVaultsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FetchUsableBackupVaultsRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @instance - */ - FetchUsableBackupVaultsRequest.prototype.parent = ""; - - /** - * FetchUsableBackupVaultsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @instance - */ - FetchUsableBackupVaultsRequest.prototype.pageSize = 0; - - /** - * FetchUsableBackupVaultsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @instance - */ - FetchUsableBackupVaultsRequest.prototype.pageToken = ""; - - /** - * FetchUsableBackupVaultsRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @instance - */ - FetchUsableBackupVaultsRequest.prototype.filter = ""; - - /** - * FetchUsableBackupVaultsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @instance - */ - FetchUsableBackupVaultsRequest.prototype.orderBy = ""; - - /** - * Creates a new FetchUsableBackupVaultsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest instance - */ - FetchUsableBackupVaultsRequest.create = function create(properties) { - return new FetchUsableBackupVaultsRequest(properties); - }; - - /** - * Encodes the specified FetchUsableBackupVaultsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchUsableBackupVaultsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchUsableBackupVaultsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchUsableBackupVaultsRequest.decode = function 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.backupdr.v1.FetchUsableBackupVaultsRequest(); - 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 FetchUsableBackupVaultsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchUsableBackupVaultsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchUsableBackupVaultsRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} FetchUsableBackupVaultsRequest - */ - FetchUsableBackupVaultsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest(); - 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 FetchUsableBackupVaultsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest} message FetchUsableBackupVaultsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchUsableBackupVaultsRequest.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 FetchUsableBackupVaultsRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @instance - * @returns {Object.} JSON object - */ - FetchUsableBackupVaultsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchUsableBackupVaultsRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchUsableBackupVaultsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest"; - }; - - return FetchUsableBackupVaultsRequest; - })(); - - v1.FetchUsableBackupVaultsResponse = (function() { - - /** - * Properties of a FetchUsableBackupVaultsResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IFetchUsableBackupVaultsResponse - * @property {Array.|null} [backupVaults] FetchUsableBackupVaultsResponse backupVaults - * @property {string|null} [nextPageToken] FetchUsableBackupVaultsResponse nextPageToken - * @property {Array.|null} [unreachable] FetchUsableBackupVaultsResponse unreachable - */ - - /** - * Constructs a new FetchUsableBackupVaultsResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FetchUsableBackupVaultsResponse. - * @implements IFetchUsableBackupVaultsResponse - * @constructor - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse=} [properties] Properties to set - */ - function FetchUsableBackupVaultsResponse(properties) { - this.backupVaults = []; - 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]]; - } - - /** - * FetchUsableBackupVaultsResponse backupVaults. - * @member {Array.} backupVaults - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @instance - */ - FetchUsableBackupVaultsResponse.prototype.backupVaults = $util.emptyArray; - - /** - * FetchUsableBackupVaultsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @instance - */ - FetchUsableBackupVaultsResponse.prototype.nextPageToken = ""; - - /** - * FetchUsableBackupVaultsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @instance - */ - FetchUsableBackupVaultsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new FetchUsableBackupVaultsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse instance - */ - FetchUsableBackupVaultsResponse.create = function create(properties) { - return new FetchUsableBackupVaultsResponse(properties); - }; - - /** - * Encodes the specified FetchUsableBackupVaultsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchUsableBackupVaultsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backupVaults != null && message.backupVaults.length) - for (var i = 0; i < message.backupVaults.length; ++i) - $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVaults[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 FetchUsableBackupVaultsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchUsableBackupVaultsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchUsableBackupVaultsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchUsableBackupVaultsResponse.decode = function 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.backupdr.v1.FetchUsableBackupVaultsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.backupVaults && message.backupVaults.length)) - message.backupVaults = []; - message.backupVaults.push($root.google.cloud.backupdr.v1.BackupVault.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 FetchUsableBackupVaultsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchUsableBackupVaultsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchUsableBackupVaultsResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchUsableBackupVaultsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backupVaults != null && message.hasOwnProperty("backupVaults")) { - if (!Array.isArray(message.backupVaults)) - return "backupVaults: array expected"; - for (var i = 0; i < message.backupVaults.length; ++i) { - var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVaults[i]); - if (error) - return "backupVaults." + 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 FetchUsableBackupVaultsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} FetchUsableBackupVaultsResponse - */ - FetchUsableBackupVaultsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse(); - if (object.backupVaults) { - if (!Array.isArray(object.backupVaults)) - throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.backupVaults: array expected"); - message.backupVaults = []; - for (var i = 0; i < object.backupVaults.length; ++i) { - if (typeof object.backupVaults[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.backupVaults: object expected"); - message.backupVaults[i] = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVaults[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse.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 FetchUsableBackupVaultsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse} message FetchUsableBackupVaultsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchUsableBackupVaultsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backupVaults = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backupVaults && message.backupVaults.length) { - object.backupVaults = []; - for (var j = 0; j < message.backupVaults.length; ++j) - object.backupVaults[j] = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVaults[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 FetchUsableBackupVaultsResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @instance - * @returns {Object.} JSON object - */ - FetchUsableBackupVaultsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchUsableBackupVaultsResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchUsableBackupVaultsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchUsableBackupVaultsResponse"; - }; - - return FetchUsableBackupVaultsResponse; - })(); - - v1.GetBackupVaultRequest = (function() { - - /** - * Properties of a GetBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetBackupVaultRequest - * @property {string|null} [name] GetBackupVaultRequest name - * @property {google.cloud.backupdr.v1.BackupVaultView|null} [view] GetBackupVaultRequest view - */ - - /** - * Constructs a new GetBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetBackupVaultRequest. - * @implements IGetBackupVaultRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest=} [properties] Properties to set - */ - function GetBackupVaultRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetBackupVaultRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @instance - */ - GetBackupVaultRequest.prototype.name = ""; - - /** - * GetBackupVaultRequest view. - * @member {google.cloud.backupdr.v1.BackupVaultView} view - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @instance - */ - GetBackupVaultRequest.prototype.view = 0; - - /** - * Creates a new GetBackupVaultRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest instance - */ - GetBackupVaultRequest.create = function create(properties) { - return new GetBackupVaultRequest(properties); - }; - - /** - * Encodes the specified GetBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupVaultRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - return writer; - }; - - /** - * Encodes the specified GetBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupVaultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupVaultRequest} message GetBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetBackupVaultRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupVaultRequest.decode = function 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.backupdr.v1.GetBackupVaultRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetBackupVaultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBackupVaultRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBackupVaultRequest.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.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a GetBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetBackupVaultRequest} GetBackupVaultRequest - */ - GetBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetBackupVaultRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.GetBackupVaultRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "BACKUP_VAULT_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BACKUP_VAULT_VIEW_BASIC": - case 1: - message.view = 1; - break; - case "BACKUP_VAULT_VIEW_FULL": - case 2: - message.view = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a GetBackupVaultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.GetBackupVaultRequest} message GetBackupVaultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetBackupVaultRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "BACKUP_VAULT_VIEW_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupVaultView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupVaultView[message.view] : message.view; - return object; - }; - - /** - * Converts this GetBackupVaultRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @instance - * @returns {Object.} JSON object - */ - GetBackupVaultRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetBackupVaultRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetBackupVaultRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupVaultRequest"; - }; - - return GetBackupVaultRequest; - })(); - - v1.UpdateBackupVaultRequest = (function() { - - /** - * Properties of an UpdateBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IUpdateBackupVaultRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupVaultRequest updateMask - * @property {google.cloud.backupdr.v1.IBackupVault|null} [backupVault] UpdateBackupVaultRequest backupVault - * @property {string|null} [requestId] UpdateBackupVaultRequest requestId - * @property {boolean|null} [validateOnly] UpdateBackupVaultRequest validateOnly - * @property {boolean|null} [force] UpdateBackupVaultRequest force - */ - - /** - * Constructs a new UpdateBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an UpdateBackupVaultRequest. - * @implements IUpdateBackupVaultRequest - * @constructor - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest=} [properties] Properties to set - */ - function UpdateBackupVaultRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateBackupVaultRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.updateMask = null; - - /** - * UpdateBackupVaultRequest backupVault. - * @member {google.cloud.backupdr.v1.IBackupVault|null|undefined} backupVault - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.backupVault = null; - - /** - * UpdateBackupVaultRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.requestId = ""; - - /** - * UpdateBackupVaultRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.validateOnly = false; - - /** - * UpdateBackupVaultRequest force. - * @member {boolean} force - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - */ - UpdateBackupVaultRequest.prototype.force = false; - - /** - * Creates a new UpdateBackupVaultRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest instance - */ - UpdateBackupVaultRequest.create = function create(properties) { - return new UpdateBackupVaultRequest(properties); - }; - - /** - * Encodes the specified UpdateBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBackupVaultRequest.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.backupVault != null && Object.hasOwnProperty.call(message, "backupVault")) - $root.google.cloud.backupdr.v1.BackupVault.encode(message.backupVault, 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 UpdateBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupVaultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupVaultRequest} message UpdateBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateBackupVaultRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBackupVaultRequest.decode = function 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.backupdr.v1.UpdateBackupVaultRequest(); - 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.backupVault = $root.google.cloud.backupdr.v1.BackupVault.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 UpdateBackupVaultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateBackupVaultRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateBackupVaultRequest.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.backupVault != null && message.hasOwnProperty("backupVault")) { - var error = $root.google.cloud.backupdr.v1.BackupVault.verify(message.backupVault); - if (error) - return "backupVault." + 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 UpdateBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.UpdateBackupVaultRequest} UpdateBackupVaultRequest - */ - UpdateBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.UpdateBackupVaultRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateBackupVaultRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.backupVault != null) { - if (typeof object.backupVault !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateBackupVaultRequest.backupVault: object expected"); - message.backupVault = $root.google.cloud.backupdr.v1.BackupVault.fromObject(object.backupVault); - } - 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 UpdateBackupVaultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.UpdateBackupVaultRequest} message UpdateBackupVaultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateBackupVaultRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.backupVault = 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.backupVault != null && message.hasOwnProperty("backupVault")) - object.backupVault = $root.google.cloud.backupdr.v1.BackupVault.toObject(message.backupVault, 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 UpdateBackupVaultRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateBackupVaultRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateBackupVaultRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.UpdateBackupVaultRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupVaultRequest"; - }; - - return UpdateBackupVaultRequest; - })(); - - v1.DeleteBackupVaultRequest = (function() { - - /** - * Properties of a DeleteBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IDeleteBackupVaultRequest - * @property {string|null} [name] DeleteBackupVaultRequest name - * @property {string|null} [requestId] DeleteBackupVaultRequest requestId - * @property {boolean|null} [force] DeleteBackupVaultRequest force - * @property {string|null} [etag] DeleteBackupVaultRequest etag - * @property {boolean|null} [validateOnly] DeleteBackupVaultRequest validateOnly - * @property {boolean|null} [allowMissing] DeleteBackupVaultRequest allowMissing - */ - - /** - * Constructs a new DeleteBackupVaultRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DeleteBackupVaultRequest. - * @implements IDeleteBackupVaultRequest - * @constructor - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest=} [properties] Properties to set - */ - function DeleteBackupVaultRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteBackupVaultRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.name = ""; - - /** - * DeleteBackupVaultRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.requestId = ""; - - /** - * DeleteBackupVaultRequest force. - * @member {boolean} force - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.force = false; - - /** - * DeleteBackupVaultRequest etag. - * @member {string} etag - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.etag = ""; - - /** - * DeleteBackupVaultRequest validateOnly. - * @member {boolean} validateOnly - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.validateOnly = false; - - /** - * DeleteBackupVaultRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - */ - DeleteBackupVaultRequest.prototype.allowMissing = false; - - /** - * Creates a new DeleteBackupVaultRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest instance - */ - DeleteBackupVaultRequest.create = function create(properties) { - return new DeleteBackupVaultRequest(properties); - }; - - /** - * Encodes the specified DeleteBackupVaultRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupVaultRequest.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); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); - if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); - if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.allowMissing); - return writer; - }; - - /** - * Encodes the specified DeleteBackupVaultRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupVaultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupVaultRequest} message DeleteBackupVaultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupVaultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupVaultRequest.decode = function 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.backupdr.v1.DeleteBackupVaultRequest(); - 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; - } - case 4: { - message.etag = reader.string(); - break; - } - case 5: { - message.validateOnly = reader.bool(); - break; - } - case 6: { - message.allowMissing = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteBackupVaultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupVaultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteBackupVaultRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteBackupVaultRequest.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"; - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - if (typeof message.validateOnly !== "boolean") - return "validateOnly: boolean expected"; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - if (typeof message.allowMissing !== "boolean") - return "allowMissing: boolean expected"; - return null; - }; - - /** - * Creates a DeleteBackupVaultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DeleteBackupVaultRequest} DeleteBackupVaultRequest - */ - DeleteBackupVaultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.DeleteBackupVaultRequest(); - 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); - if (object.etag != null) - message.etag = String(object.etag); - if (object.validateOnly != null) - message.validateOnly = Boolean(object.validateOnly); - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); - return message; - }; - - /** - * Creates a plain object from a DeleteBackupVaultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {google.cloud.backupdr.v1.DeleteBackupVaultRequest} message DeleteBackupVaultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteBackupVaultRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.requestId = ""; - object.force = false; - object.etag = ""; - object.validateOnly = false; - object.allowMissing = 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; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) - object.validateOnly = message.validateOnly; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; - return object; - }; - - /** - * Converts this DeleteBackupVaultRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteBackupVaultRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteBackupVaultRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DeleteBackupVaultRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteBackupVaultRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupVaultRequest"; - }; - - return DeleteBackupVaultRequest; - })(); - - v1.ListDataSourcesRequest = (function() { - - /** - * Properties of a ListDataSourcesRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListDataSourcesRequest - * @property {string|null} [parent] ListDataSourcesRequest parent - * @property {number|null} [pageSize] ListDataSourcesRequest pageSize - * @property {string|null} [pageToken] ListDataSourcesRequest pageToken - * @property {string|null} [filter] ListDataSourcesRequest filter - * @property {string|null} [orderBy] ListDataSourcesRequest orderBy - */ - - /** - * Constructs a new ListDataSourcesRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListDataSourcesRequest. - * @implements IListDataSourcesRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest=} [properties] Properties to set - */ - function ListDataSourcesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListDataSourcesRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @instance - */ - ListDataSourcesRequest.prototype.parent = ""; - - /** - * ListDataSourcesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @instance - */ - ListDataSourcesRequest.prototype.pageSize = 0; - - /** - * ListDataSourcesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @instance - */ - ListDataSourcesRequest.prototype.pageToken = ""; - - /** - * ListDataSourcesRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @instance - */ - ListDataSourcesRequest.prototype.filter = ""; - - /** - * ListDataSourcesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @instance - */ - ListDataSourcesRequest.prototype.orderBy = ""; - - /** - * Creates a new ListDataSourcesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest instance - */ - ListDataSourcesRequest.create = function create(properties) { - return new ListDataSourcesRequest(properties); - }; - - /** - * Encodes the specified ListDataSourcesRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataSourcesRequest.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 ListDataSourcesRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesRequest} message ListDataSourcesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataSourcesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDataSourcesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataSourcesRequest.decode = function 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.backupdr.v1.ListDataSourcesRequest(); - 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 ListDataSourcesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataSourcesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDataSourcesRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDataSourcesRequest.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 ListDataSourcesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListDataSourcesRequest} ListDataSourcesRequest - */ - ListDataSourcesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.ListDataSourcesRequest(); - 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 ListDataSourcesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {google.cloud.backupdr.v1.ListDataSourcesRequest} message ListDataSourcesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDataSourcesRequest.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 ListDataSourcesRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @instance - * @returns {Object.} JSON object - */ - ListDataSourcesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDataSourcesRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListDataSourcesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDataSourcesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourcesRequest"; - }; - - return ListDataSourcesRequest; - })(); - - v1.ListDataSourcesResponse = (function() { - - /** - * Properties of a ListDataSourcesResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IListDataSourcesResponse - * @property {Array.|null} [dataSources] ListDataSourcesResponse dataSources - * @property {string|null} [nextPageToken] ListDataSourcesResponse nextPageToken - * @property {Array.|null} [unreachable] ListDataSourcesResponse unreachable - */ - - /** - * Constructs a new ListDataSourcesResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListDataSourcesResponse. - * @implements IListDataSourcesResponse - * @constructor - * @param {google.cloud.backupdr.v1.IListDataSourcesResponse=} [properties] Properties to set - */ - function ListDataSourcesResponse(properties) { - this.dataSources = []; - 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]]; - } - - /** - * ListDataSourcesResponse dataSources. - * @member {Array.} dataSources - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @instance - */ - ListDataSourcesResponse.prototype.dataSources = $util.emptyArray; - - /** - * ListDataSourcesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @instance - */ - ListDataSourcesResponse.prototype.nextPageToken = ""; - - /** - * ListDataSourcesResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @instance - */ - ListDataSourcesResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListDataSourcesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse instance - */ - ListDataSourcesResponse.create = function create(properties) { - return new ListDataSourcesResponse(properties); - }; - - /** - * Encodes the specified ListDataSourcesResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataSourcesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dataSources != null && message.dataSources.length) - for (var i = 0; i < message.dataSources.length; ++i) - $root.google.cloud.backupdr.v1.DataSource.encode(message.dataSources[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 ListDataSourcesResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListDataSourcesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {google.cloud.backupdr.v1.IListDataSourcesResponse} message ListDataSourcesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListDataSourcesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListDataSourcesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataSourcesResponse.decode = function 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.backupdr.v1.ListDataSourcesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.dataSources && message.dataSources.length)) - message.dataSources = []; - message.dataSources.push($root.google.cloud.backupdr.v1.DataSource.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 ListDataSourcesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListDataSourcesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListDataSourcesResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListDataSourcesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dataSources != null && message.hasOwnProperty("dataSources")) { - if (!Array.isArray(message.dataSources)) - return "dataSources: array expected"; - for (var i = 0; i < message.dataSources.length; ++i) { - var error = $root.google.cloud.backupdr.v1.DataSource.verify(message.dataSources[i]); - if (error) - return "dataSources." + 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 ListDataSourcesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListDataSourcesResponse} ListDataSourcesResponse - */ - ListDataSourcesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListDataSourcesResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListDataSourcesResponse(); - if (object.dataSources) { - if (!Array.isArray(object.dataSources)) - throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.dataSources: array expected"); - message.dataSources = []; - for (var i = 0; i < object.dataSources.length; ++i) { - if (typeof object.dataSources[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.dataSources: object expected"); - message.dataSources[i] = $root.google.cloud.backupdr.v1.DataSource.fromObject(object.dataSources[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListDataSourcesResponse.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 ListDataSourcesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {google.cloud.backupdr.v1.ListDataSourcesResponse} message ListDataSourcesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDataSourcesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dataSources = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.dataSources && message.dataSources.length) { - object.dataSources = []; - for (var j = 0; j < message.dataSources.length; ++j) - object.dataSources[j] = $root.google.cloud.backupdr.v1.DataSource.toObject(message.dataSources[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 ListDataSourcesResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @instance - * @returns {Object.} JSON object - */ - ListDataSourcesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListDataSourcesResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListDataSourcesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListDataSourcesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListDataSourcesResponse"; - }; - - return ListDataSourcesResponse; - })(); - - v1.GetDataSourceRequest = (function() { - - /** - * Properties of a GetDataSourceRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetDataSourceRequest - * @property {string|null} [name] GetDataSourceRequest name - */ - - /** - * Constructs a new GetDataSourceRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetDataSourceRequest. - * @implements IGetDataSourceRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest=} [properties] Properties to set - */ - function GetDataSourceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetDataSourceRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @instance - */ - GetDataSourceRequest.prototype.name = ""; - - /** - * Creates a new GetDataSourceRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest instance - */ - GetDataSourceRequest.create = function create(properties) { - return new GetDataSourceRequest(properties); - }; - - /** - * Encodes the specified GetDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDataSourceRequest.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 GetDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetDataSourceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IGetDataSourceRequest} message GetDataSourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetDataSourceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDataSourceRequest.decode = function 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.backupdr.v1.GetDataSourceRequest(); - 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 GetDataSourceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetDataSourceRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetDataSourceRequest.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 GetDataSourceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetDataSourceRequest} GetDataSourceRequest - */ - GetDataSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetDataSourceRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.GetDataSourceRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetDataSourceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.GetDataSourceRequest} message GetDataSourceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetDataSourceRequest.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 GetDataSourceRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @instance - * @returns {Object.} JSON object - */ - GetDataSourceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetDataSourceRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetDataSourceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetDataSourceRequest"; - }; - - return GetDataSourceRequest; - })(); - - v1.UpdateDataSourceRequest = (function() { - - /** - * Properties of an UpdateDataSourceRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IUpdateDataSourceRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataSourceRequest updateMask - * @property {google.cloud.backupdr.v1.IDataSource|null} [dataSource] UpdateDataSourceRequest dataSource - * @property {string|null} [requestId] UpdateDataSourceRequest requestId - * @property {boolean|null} [allowMissing] UpdateDataSourceRequest allowMissing - */ - - /** - * Constructs a new UpdateDataSourceRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an UpdateDataSourceRequest. - * @implements IUpdateDataSourceRequest - * @constructor - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest=} [properties] Properties to set - */ - function UpdateDataSourceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateDataSourceRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @instance - */ - UpdateDataSourceRequest.prototype.updateMask = null; - - /** - * UpdateDataSourceRequest dataSource. - * @member {google.cloud.backupdr.v1.IDataSource|null|undefined} dataSource - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @instance - */ - UpdateDataSourceRequest.prototype.dataSource = null; - - /** - * UpdateDataSourceRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @instance - */ - UpdateDataSourceRequest.prototype.requestId = ""; - - /** - * UpdateDataSourceRequest allowMissing. - * @member {boolean} allowMissing - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @instance - */ - UpdateDataSourceRequest.prototype.allowMissing = false; - - /** - * Creates a new UpdateDataSourceRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest instance - */ - UpdateDataSourceRequest.create = function create(properties) { - return new UpdateDataSourceRequest(properties); - }; - - /** - * Encodes the specified UpdateDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} message UpdateDataSourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDataSourceRequest.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.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - $root.google.cloud.backupdr.v1.DataSource.encode(message.dataSource, 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.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allowMissing); - return writer; - }; - - /** - * Encodes the specified UpdateDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateDataSourceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateDataSourceRequest} message UpdateDataSourceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateDataSourceRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDataSourceRequest.decode = function 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.backupdr.v1.UpdateDataSourceRequest(); - 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.dataSource = $root.google.cloud.backupdr.v1.DataSource.decode(reader, reader.uint32()); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - case 4: { - message.allowMissing = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateDataSourceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateDataSourceRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateDataSourceRequest.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.dataSource != null && message.hasOwnProperty("dataSource")) { - var error = $root.google.cloud.backupdr.v1.DataSource.verify(message.dataSource); - if (error) - return "dataSource." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - if (typeof message.allowMissing !== "boolean") - return "allowMissing: boolean expected"; - return null; - }; - - /** - * Creates an UpdateDataSourceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.UpdateDataSourceRequest} UpdateDataSourceRequest - */ - UpdateDataSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.UpdateDataSourceRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.UpdateDataSourceRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateDataSourceRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.dataSource != null) { - if (typeof object.dataSource !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateDataSourceRequest.dataSource: object expected"); - message.dataSource = $root.google.cloud.backupdr.v1.DataSource.fromObject(object.dataSource); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.allowMissing != null) - message.allowMissing = Boolean(object.allowMissing); - return message; - }; - - /** - * Creates a plain object from an UpdateDataSourceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {google.cloud.backupdr.v1.UpdateDataSourceRequest} message UpdateDataSourceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateDataSourceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.dataSource = null; - object.requestId = ""; - object.allowMissing = false; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = $root.google.cloud.backupdr.v1.DataSource.toObject(message.dataSource, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) - object.allowMissing = message.allowMissing; - return object; - }; - - /** - * Converts this UpdateDataSourceRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateDataSourceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateDataSourceRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.UpdateDataSourceRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateDataSourceRequest"; - }; - - return UpdateDataSourceRequest; - })(); - - v1.ListBackupsRequest = (function() { - - /** - * Properties of a ListBackupsRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupsRequest - * @property {string|null} [parent] ListBackupsRequest parent - * @property {number|null} [pageSize] ListBackupsRequest pageSize - * @property {string|null} [pageToken] ListBackupsRequest pageToken - * @property {string|null} [filter] ListBackupsRequest filter - * @property {string|null} [orderBy] ListBackupsRequest orderBy - * @property {google.cloud.backupdr.v1.BackupView|null} [view] ListBackupsRequest view - */ - - /** - * Constructs a new ListBackupsRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupsRequest. - * @implements IListBackupsRequest - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set - */ - function ListBackupsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListBackupsRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.parent = ""; - - /** - * ListBackupsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.pageSize = 0; - - /** - * ListBackupsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.pageToken = ""; - - /** - * ListBackupsRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.filter = ""; - - /** - * ListBackupsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.orderBy = ""; - - /** - * ListBackupsRequest view. - * @member {google.cloud.backupdr.v1.BackupView} view - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - */ - ListBackupsRequest.prototype.view = 0; - - /** - * Creates a new ListBackupsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest instance - */ - ListBackupsRequest.create = function create(properties) { - return new ListBackupsRequest(properties); - }; - - /** - * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupsRequest.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); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); - return writer; - }; - - /** - * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupsRequest.decode = function 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.backupdr.v1.ListBackupsRequest(); - 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; - } - case 6: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupsRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupsRequest.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"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest - */ - ListBackupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupsRequest(); - 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); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "BACKUP_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BACKUP_VIEW_BASIC": - case 1: - message.view = 1; - break; - case "BACKUP_VIEW_FULL": - case 2: - message.view = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {google.cloud.backupdr.v1.ListBackupsRequest} message ListBackupsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; - } - 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; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; - return object; - }; - - /** - * Converts this ListBackupsRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @instance - * @returns {Object.} JSON object - */ - ListBackupsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupsRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsRequest"; - }; - - return ListBackupsRequest; - })(); - - v1.ListBackupsResponse = (function() { - - /** - * Properties of a ListBackupsResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IListBackupsResponse - * @property {Array.|null} [backups] ListBackupsResponse backups - * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupsResponse unreachable - */ - - /** - * Constructs a new ListBackupsResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupsResponse. - * @implements IListBackupsResponse - * @constructor - * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set - */ - function ListBackupsResponse(properties) { - this.backups = []; - 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]]; - } - - /** - * ListBackupsResponse backups. - * @member {Array.} backups - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @instance - */ - ListBackupsResponse.prototype.backups = $util.emptyArray; - - /** - * ListBackupsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @instance - */ - ListBackupsResponse.prototype.nextPageToken = ""; - - /** - * ListBackupsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @instance - */ - ListBackupsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListBackupsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse instance - */ - ListBackupsResponse.create = function create(properties) { - return new ListBackupsResponse(properties); - }; - - /** - * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backups != null && message.backups.length) - for (var i = 0; i < message.backups.length; ++i) - $root.google.cloud.backupdr.v1.Backup.encode(message.backups[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 ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListBackupsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupsResponse.decode = function 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.backupdr.v1.ListBackupsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.backups && message.backups.length)) - message.backups = []; - message.backups.push($root.google.cloud.backupdr.v1.Backup.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 ListBackupsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListBackupsResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListBackupsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backups != null && message.hasOwnProperty("backups")) { - if (!Array.isArray(message.backups)) - return "backups: array expected"; - for (var i = 0; i < message.backups.length; ++i) { - var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backups[i]); - if (error) - return "backups." + 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 ListBackupsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse - */ - ListBackupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupsResponse(); - if (object.backups) { - if (!Array.isArray(object.backups)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: array expected"); - message.backups = []; - for (var i = 0; i < object.backups.length; ++i) { - if (typeof object.backups[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: object expected"); - message.backups[i] = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backups[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.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 ListBackupsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {google.cloud.backupdr.v1.ListBackupsResponse} message ListBackupsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListBackupsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backups = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backups && message.backups.length) { - object.backups = []; - for (var j = 0; j < message.backups.length; ++j) - object.backups[j] = $root.google.cloud.backupdr.v1.Backup.toObject(message.backups[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 ListBackupsResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @instance - * @returns {Object.} JSON object - */ - ListBackupsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListBackupsResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsResponse"; - }; - - return ListBackupsResponse; - })(); - - v1.GetBackupRequest = (function() { - - /** - * Properties of a GetBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetBackupRequest - * @property {string|null} [name] GetBackupRequest name - * @property {google.cloud.backupdr.v1.BackupView|null} [view] GetBackupRequest view - */ - - /** - * Constructs a new GetBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetBackupRequest. - * @implements IGetBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set - */ - function GetBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetBackupRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @instance - */ - GetBackupRequest.prototype.name = ""; - - /** - * GetBackupRequest view. - * @member {google.cloud.backupdr.v1.BackupView} view - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @instance - */ - GetBackupRequest.prototype.view = 0; - - /** - * Creates a new GetBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest instance - */ - GetBackupRequest.create = function create(properties) { - return new GetBackupRequest(properties); - }; - - /** - * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - return writer; - }; - - /** - * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupRequest.decode = function 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.backupdr.v1.GetBackupRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBackupRequest.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.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest - */ - GetBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.GetBackupRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "BACKUP_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BACKUP_VIEW_BASIC": - case 1: - message.view = 1; - break; - case "BACKUP_VIEW_FULL": - case 2: - message.view = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {google.cloud.backupdr.v1.GetBackupRequest} message GetBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; - return object; - }; - - /** - * Converts this GetBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @instance - * @returns {Object.} JSON object - */ - GetBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupRequest"; - }; - - return GetBackupRequest; - })(); - - v1.UpdateBackupRequest = (function() { - - /** - * Properties of an UpdateBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IUpdateBackupRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupRequest updateMask - * @property {google.cloud.backupdr.v1.IBackup|null} [backup] UpdateBackupRequest backup - * @property {string|null} [requestId] UpdateBackupRequest requestId - */ - - /** - * Constructs a new UpdateBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an UpdateBackupRequest. - * @implements IUpdateBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set - */ - function UpdateBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateBackupRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @instance - */ - UpdateBackupRequest.prototype.updateMask = null; - - /** - * UpdateBackupRequest backup. - * @member {google.cloud.backupdr.v1.IBackup|null|undefined} backup - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @instance - */ - UpdateBackupRequest.prototype.backup = null; - - /** - * UpdateBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @instance - */ - UpdateBackupRequest.prototype.requestId = ""; - - /** - * Creates a new UpdateBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest instance - */ - UpdateBackupRequest.create = function create(properties) { - return new UpdateBackupRequest(properties); - }; - - /** - * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBackupRequest.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.backup != null && Object.hasOwnProperty.call(message, "backup")) - $root.google.cloud.backupdr.v1.Backup.encode(message.backup, 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 UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBackupRequest.decode = function 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.backupdr.v1.UpdateBackupRequest(); - 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.backup = $root.google.cloud.backupdr.v1.Backup.decode(reader, reader.uint32()); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateBackupRequest.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.backup != null && message.hasOwnProperty("backup")) { - var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backup); - if (error) - return "backup." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates an UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest - */ - UpdateBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.UpdateBackupRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.backup != null) { - if (typeof object.backup !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.backup: object expected"); - message.backup = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backup); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.UpdateBackupRequest} message UpdateBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.backup = null; - object.requestId = ""; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = $root.google.cloud.backupdr.v1.Backup.toObject(message.backup, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this UpdateBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupRequest"; - }; - - return UpdateBackupRequest; - })(); - - v1.DeleteBackupRequest = (function() { - - /** - * Properties of a DeleteBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IDeleteBackupRequest - * @property {string|null} [name] DeleteBackupRequest name - * @property {string|null} [requestId] DeleteBackupRequest requestId - */ - - /** - * Constructs a new DeleteBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DeleteBackupRequest. - * @implements IDeleteBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set - */ - function DeleteBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteBackupRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @instance - */ - DeleteBackupRequest.prototype.name = ""; - - /** - * DeleteBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @instance - */ - DeleteBackupRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest instance - */ - DeleteBackupRequest.create = function create(properties) { - return new DeleteBackupRequest(properties); - }; - - /** - * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupRequest.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 DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupRequest.decode = function 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.backupdr.v1.DeleteBackupRequest(); - 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 DeleteBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteBackupRequest.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 DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest - */ - DeleteBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.DeleteBackupRequest(); - 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 DeleteBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {google.cloud.backupdr.v1.DeleteBackupRequest} message DeleteBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteBackupRequest.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 DeleteBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupRequest"; - }; - - return DeleteBackupRequest; - })(); - - v1.RestoreBackupRequest = (function() { - - /** - * Properties of a RestoreBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IRestoreBackupRequest - * @property {string|null} [name] RestoreBackupRequest name - * @property {string|null} [requestId] RestoreBackupRequest requestId - * @property {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null} [computeInstanceTargetEnvironment] RestoreBackupRequest computeInstanceTargetEnvironment - * @property {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null} [computeInstanceRestoreProperties] RestoreBackupRequest computeInstanceRestoreProperties - */ - - /** - * Constructs a new RestoreBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a RestoreBackupRequest. - * @implements IRestoreBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set - */ - function RestoreBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RestoreBackupRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.name = ""; - - /** - * RestoreBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.requestId = ""; - - /** - * RestoreBackupRequest computeInstanceTargetEnvironment. - * @member {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null|undefined} computeInstanceTargetEnvironment - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.computeInstanceTargetEnvironment = null; - - /** - * RestoreBackupRequest computeInstanceRestoreProperties. - * @member {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null|undefined} computeInstanceRestoreProperties - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - RestoreBackupRequest.prototype.computeInstanceRestoreProperties = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * RestoreBackupRequest targetEnvironment. - * @member {"computeInstanceTargetEnvironment"|undefined} targetEnvironment - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - Object.defineProperty(RestoreBackupRequest.prototype, "targetEnvironment", { - get: $util.oneOfGetter($oneOfFields = ["computeInstanceTargetEnvironment"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * RestoreBackupRequest instanceProperties. - * @member {"computeInstanceRestoreProperties"|undefined} instanceProperties - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - */ - Object.defineProperty(RestoreBackupRequest.prototype, "instanceProperties", { - get: $util.oneOfGetter($oneOfFields = ["computeInstanceRestoreProperties"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new RestoreBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest instance - */ - RestoreBackupRequest.create = function create(properties) { - return new RestoreBackupRequest(properties); - }; - - /** - * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreBackupRequest.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.computeInstanceTargetEnvironment != null && Object.hasOwnProperty.call(message, "computeInstanceTargetEnvironment")) - $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.encode(message.computeInstanceTargetEnvironment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.computeInstanceRestoreProperties != null && Object.hasOwnProperty.call(message, "computeInstanceRestoreProperties")) - $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.encode(message.computeInstanceRestoreProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RestoreBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreBackupRequest.decode = function 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.backupdr.v1.RestoreBackupRequest(); - 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.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.decode(reader, reader.uint32()); - break; - } - case 4: { - message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RestoreBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RestoreBackupRequest.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.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { - properties.targetEnvironment = 1; - { - var error = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify(message.computeInstanceTargetEnvironment); - if (error) - return "computeInstanceTargetEnvironment." + error; - } - } - if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { - properties.instanceProperties = 1; - { - var error = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify(message.computeInstanceRestoreProperties); - if (error) - return "computeInstanceRestoreProperties." + error; - } - } - return null; - }; - - /** - * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest - */ - RestoreBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.RestoreBackupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.computeInstanceTargetEnvironment != null) { - if (typeof object.computeInstanceTargetEnvironment !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceTargetEnvironment: object expected"); - message.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.fromObject(object.computeInstanceTargetEnvironment); - } - if (object.computeInstanceRestoreProperties != null) { - if (typeof object.computeInstanceRestoreProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceRestoreProperties: object expected"); - message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.fromObject(object.computeInstanceRestoreProperties); - } - return message; - }; - - /** - * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {google.cloud.backupdr.v1.RestoreBackupRequest} message RestoreBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RestoreBackupRequest.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; - if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { - object.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.toObject(message.computeInstanceTargetEnvironment, options); - if (options.oneofs) - object.targetEnvironment = "computeInstanceTargetEnvironment"; - } - if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { - object.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.toObject(message.computeInstanceRestoreProperties, options); - if (options.oneofs) - object.instanceProperties = "computeInstanceRestoreProperties"; - } - return object; - }; - - /** - * Converts this RestoreBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @instance - * @returns {Object.} JSON object - */ - RestoreBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RestoreBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RestoreBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupRequest"; - }; - - return RestoreBackupRequest; - })(); - - v1.RestoreBackupResponse = (function() { - - /** - * Properties of a RestoreBackupResponse. - * @memberof google.cloud.backupdr.v1 - * @interface IRestoreBackupResponse - * @property {google.cloud.backupdr.v1.ITargetResource|null} [targetResource] RestoreBackupResponse targetResource - */ - - /** - * Constructs a new RestoreBackupResponse. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a RestoreBackupResponse. - * @implements IRestoreBackupResponse - * @constructor - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set - */ - function RestoreBackupResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RestoreBackupResponse targetResource. - * @member {google.cloud.backupdr.v1.ITargetResource|null|undefined} targetResource - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @instance - */ - RestoreBackupResponse.prototype.targetResource = null; - - /** - * Creates a new RestoreBackupResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse instance - */ - RestoreBackupResponse.create = function create(properties) { - return new RestoreBackupResponse(properties); - }; - - /** - * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreBackupResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.targetResource != null && Object.hasOwnProperty.call(message, "targetResource")) - $root.google.cloud.backupdr.v1.TargetResource.encode(message.targetResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestoreBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RestoreBackupResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreBackupResponse.decode = function 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.backupdr.v1.RestoreBackupResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestoreBackupResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RestoreBackupResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RestoreBackupResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.targetResource != null && message.hasOwnProperty("targetResource")) { - var error = $root.google.cloud.backupdr.v1.TargetResource.verify(message.targetResource); - if (error) - return "targetResource." + error; - } - return null; - }; - - /** - * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse - */ - RestoreBackupResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.RestoreBackupResponse(); - if (object.targetResource != null) { - if (typeof object.targetResource !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupResponse.targetResource: object expected"); - message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.fromObject(object.targetResource); - } - return message; - }; - - /** - * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {google.cloud.backupdr.v1.RestoreBackupResponse} message RestoreBackupResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RestoreBackupResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.targetResource = null; - if (message.targetResource != null && message.hasOwnProperty("targetResource")) - object.targetResource = $root.google.cloud.backupdr.v1.TargetResource.toObject(message.targetResource, options); - return object; - }; - - /** - * Converts this RestoreBackupResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @instance - * @returns {Object.} JSON object - */ - RestoreBackupResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RestoreBackupResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RestoreBackupResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupResponse"; - }; - - return RestoreBackupResponse; - })(); - - v1.TargetResource = (function() { - - /** - * Properties of a TargetResource. - * @memberof google.cloud.backupdr.v1 - * @interface ITargetResource - * @property {google.cloud.backupdr.v1.IGcpResource|null} [gcpResource] TargetResource gcpResource - */ - - /** - * Constructs a new TargetResource. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a TargetResource. - * @implements ITargetResource - * @constructor - * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set - */ - function TargetResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TargetResource gcpResource. - * @member {google.cloud.backupdr.v1.IGcpResource|null|undefined} gcpResource - * @memberof google.cloud.backupdr.v1.TargetResource - * @instance - */ - TargetResource.prototype.gcpResource = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TargetResource targetResourceInfo. - * @member {"gcpResource"|undefined} targetResourceInfo - * @memberof google.cloud.backupdr.v1.TargetResource - * @instance - */ - Object.defineProperty(TargetResource.prototype, "targetResourceInfo", { - get: $util.oneOfGetter($oneOfFields = ["gcpResource"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TargetResource instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource instance - */ - TargetResource.create = function create(properties) { - return new TargetResource(properties); - }; - - /** - * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TargetResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcpResource != null && Object.hasOwnProperty.call(message, "gcpResource")) - $root.google.cloud.backupdr.v1.GcpResource.encode(message.gcpResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TargetResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TargetResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetResource.decode = function 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.backupdr.v1.TargetResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TargetResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TargetResource message. - * @function verify - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TargetResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { - properties.targetResourceInfo = 1; - { - var error = $root.google.cloud.backupdr.v1.GcpResource.verify(message.gcpResource); - if (error) - return "gcpResource." + error; - } - } - return null; - }; - - /** - * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource - */ - TargetResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.TargetResource) - return object; - var message = new $root.google.cloud.backupdr.v1.TargetResource(); - if (object.gcpResource != null) { - if (typeof object.gcpResource !== "object") - throw TypeError(".google.cloud.backupdr.v1.TargetResource.gcpResource: object expected"); - message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.fromObject(object.gcpResource); - } - return message; - }; - - /** - * Creates a plain object from a TargetResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {google.cloud.backupdr.v1.TargetResource} message TargetResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TargetResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { - object.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.toObject(message.gcpResource, options); - if (options.oneofs) - object.targetResourceInfo = "gcpResource"; - } - return object; - }; - - /** - * Converts this TargetResource to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.TargetResource - * @instance - * @returns {Object.} JSON object - */ - TargetResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TargetResource - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.TargetResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TargetResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.TargetResource"; - }; - - return TargetResource; - })(); - - v1.GcpResource = (function() { - - /** - * Properties of a GcpResource. - * @memberof google.cloud.backupdr.v1 - * @interface IGcpResource - * @property {string|null} [gcpResourcename] GcpResource gcpResourcename - * @property {string|null} [location] GcpResource location - * @property {string|null} [type] GcpResource type - */ - - /** - * Constructs a new GcpResource. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GcpResource. - * @implements IGcpResource - * @constructor - * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set - */ - function GcpResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GcpResource gcpResourcename. - * @member {string} gcpResourcename - * @memberof google.cloud.backupdr.v1.GcpResource - * @instance - */ - GcpResource.prototype.gcpResourcename = ""; - - /** - * GcpResource location. - * @member {string} location - * @memberof google.cloud.backupdr.v1.GcpResource - * @instance - */ - GcpResource.prototype.location = ""; - - /** - * GcpResource type. - * @member {string} type - * @memberof google.cloud.backupdr.v1.GcpResource - * @instance - */ - GcpResource.prototype.type = ""; - - /** - * Creates a new GcpResource instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource instance - */ - GcpResource.create = function create(properties) { - return new GcpResource(properties); - }; - - /** - * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcpResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - return writer; - }; - - /** - * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GcpResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcpResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcpResource.decode = function 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.backupdr.v1.GcpResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.gcpResourcename = reader.string(); - break; - } - case 2: { - message.location = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcpResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcpResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GcpResource message. - * @function verify - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GcpResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - if (!$util.isString(message.gcpResourcename)) - return "gcpResourcename: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - return null; - }; - - /** - * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource - */ - GcpResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GcpResource) - return object; - var message = new $root.google.cloud.backupdr.v1.GcpResource(); - if (object.gcpResourcename != null) - message.gcpResourcename = String(object.gcpResourcename); - if (object.location != null) - message.location = String(object.location); - if (object.type != null) - message.type = String(object.type); - return message; - }; - - /** - * Creates a plain object from a GcpResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {google.cloud.backupdr.v1.GcpResource} message GcpResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcpResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.gcpResourcename = ""; - object.location = ""; - object.type = ""; - } - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - object.gcpResourcename = message.gcpResourcename; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - return object; - }; - - /** - * Converts this GcpResource to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GcpResource - * @instance - * @returns {Object.} JSON object - */ - GcpResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcpResource - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpResource"; - }; - - return GcpResource; - })(); - - /** - * BackupConfigState enum. - * @name google.cloud.backupdr.v1.BackupConfigState - * @enum {number} - * @property {number} BACKUP_CONFIG_STATE_UNSPECIFIED=0 BACKUP_CONFIG_STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} PASSIVE=2 PASSIVE value - */ - v1.BackupConfigState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_CONFIG_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "PASSIVE"] = 2; - return values; - })(); - - /** - * BackupView enum. - * @name google.cloud.backupdr.v1.BackupView - * @enum {number} - * @property {number} BACKUP_VIEW_UNSPECIFIED=0 BACKUP_VIEW_UNSPECIFIED value - * @property {number} BACKUP_VIEW_BASIC=1 BACKUP_VIEW_BASIC value - * @property {number} BACKUP_VIEW_FULL=2 BACKUP_VIEW_FULL value - */ - v1.BackupView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BACKUP_VIEW_BASIC"] = 1; - values[valuesById[2] = "BACKUP_VIEW_FULL"] = 2; - return values; - })(); - - /** - * BackupVaultView enum. - * @name google.cloud.backupdr.v1.BackupVaultView - * @enum {number} - * @property {number} BACKUP_VAULT_VIEW_UNSPECIFIED=0 BACKUP_VAULT_VIEW_UNSPECIFIED value - * @property {number} BACKUP_VAULT_VIEW_BASIC=1 BACKUP_VAULT_VIEW_BASIC value - * @property {number} BACKUP_VAULT_VIEW_FULL=2 BACKUP_VAULT_VIEW_FULL value - */ - v1.BackupVaultView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_VAULT_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BACKUP_VAULT_VIEW_BASIC"] = 1; - values[valuesById[2] = "BACKUP_VAULT_VIEW_FULL"] = 2; - return values; - })(); - - v1.BackupApplianceBackupProperties = (function() { - - /** - * Properties of a BackupApplianceBackupProperties. - * @memberof google.cloud.backupdr.v1 - * @interface IBackupApplianceBackupProperties - * @property {number|null} [generationId] BackupApplianceBackupProperties generationId - * @property {google.protobuf.ITimestamp|null} [finalizeTime] BackupApplianceBackupProperties finalizeTime - * @property {google.protobuf.ITimestamp|null} [recoveryRangeStartTime] BackupApplianceBackupProperties recoveryRangeStartTime - * @property {google.protobuf.ITimestamp|null} [recoveryRangeEndTime] BackupApplianceBackupProperties recoveryRangeEndTime - */ - - /** - * Constructs a new BackupApplianceBackupProperties. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupApplianceBackupProperties. - * @implements IBackupApplianceBackupProperties - * @constructor - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties=} [properties] Properties to set - */ - function BackupApplianceBackupProperties(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BackupApplianceBackupProperties generationId. - * @member {number|null|undefined} generationId - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - BackupApplianceBackupProperties.prototype.generationId = null; - - /** - * BackupApplianceBackupProperties finalizeTime. - * @member {google.protobuf.ITimestamp|null|undefined} finalizeTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - BackupApplianceBackupProperties.prototype.finalizeTime = null; - - /** - * BackupApplianceBackupProperties recoveryRangeStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeStartTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - BackupApplianceBackupProperties.prototype.recoveryRangeStartTime = null; - - /** - * BackupApplianceBackupProperties recoveryRangeEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeEndTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - BackupApplianceBackupProperties.prototype.recoveryRangeEndTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BackupApplianceBackupProperties _generationId. - * @member {"generationId"|undefined} _generationId - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - Object.defineProperty(BackupApplianceBackupProperties.prototype, "_generationId", { - get: $util.oneOfGetter($oneOfFields = ["generationId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupApplianceBackupProperties _finalizeTime. - * @member {"finalizeTime"|undefined} _finalizeTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - Object.defineProperty(BackupApplianceBackupProperties.prototype, "_finalizeTime", { - get: $util.oneOfGetter($oneOfFields = ["finalizeTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupApplianceBackupProperties _recoveryRangeStartTime. - * @member {"recoveryRangeStartTime"|undefined} _recoveryRangeStartTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - Object.defineProperty(BackupApplianceBackupProperties.prototype, "_recoveryRangeStartTime", { - get: $util.oneOfGetter($oneOfFields = ["recoveryRangeStartTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupApplianceBackupProperties _recoveryRangeEndTime. - * @member {"recoveryRangeEndTime"|undefined} _recoveryRangeEndTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - Object.defineProperty(BackupApplianceBackupProperties.prototype, "_recoveryRangeEndTime", { - get: $util.oneOfGetter($oneOfFields = ["recoveryRangeEndTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BackupApplianceBackupProperties instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties instance - */ - BackupApplianceBackupProperties.create = function create(properties) { - return new BackupApplianceBackupProperties(properties); - }; - - /** - * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties} message BackupApplianceBackupProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupApplianceBackupProperties.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.generationId != null && Object.hasOwnProperty.call(message, "generationId")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.generationId); - if (message.finalizeTime != null && Object.hasOwnProperty.call(message, "finalizeTime")) - $root.google.protobuf.Timestamp.encode(message.finalizeTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.recoveryRangeStartTime != null && Object.hasOwnProperty.call(message, "recoveryRangeStartTime")) - $root.google.protobuf.Timestamp.encode(message.recoveryRangeStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.recoveryRangeEndTime != null && Object.hasOwnProperty.call(message, "recoveryRangeEndTime")) - $root.google.protobuf.Timestamp.encode(message.recoveryRangeEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties} message BackupApplianceBackupProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BackupApplianceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupApplianceBackupProperties.decode = function 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.backupdr.v1.BackupApplianceBackupProperties(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.generationId = reader.int32(); - break; - } - case 2: { - message.finalizeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BackupApplianceBackupProperties.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BackupApplianceBackupProperties message. - * @function verify - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BackupApplianceBackupProperties.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.generationId != null && message.hasOwnProperty("generationId")) { - properties._generationId = 1; - if (!$util.isInteger(message.generationId)) - return "generationId: integer expected"; - } - if (message.finalizeTime != null && message.hasOwnProperty("finalizeTime")) { - properties._finalizeTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.finalizeTime); - if (error) - return "finalizeTime." + error; - } - } - if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { - properties._recoveryRangeStartTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeStartTime); - if (error) - return "recoveryRangeStartTime." + error; - } - } - if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { - properties._recoveryRangeEndTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeEndTime); - if (error) - return "recoveryRangeEndTime." + error; - } - } - return null; - }; - - /** - * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties - */ - BackupApplianceBackupProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties) - return object; - var message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties(); - if (object.generationId != null) - message.generationId = object.generationId | 0; - if (object.finalizeTime != null) { - if (typeof object.finalizeTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.finalizeTime: object expected"); - message.finalizeTime = $root.google.protobuf.Timestamp.fromObject(object.finalizeTime); - } - if (object.recoveryRangeStartTime != null) { - if (typeof object.recoveryRangeStartTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeStartTime: object expected"); - message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeStartTime); - } - if (object.recoveryRangeEndTime != null) { - if (typeof object.recoveryRangeEndTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeEndTime: object expected"); - message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeEndTime); - } - return message; - }; - - /** - * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.BackupApplianceBackupProperties} message BackupApplianceBackupProperties - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BackupApplianceBackupProperties.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.generationId != null && message.hasOwnProperty("generationId")) { - object.generationId = message.generationId; - if (options.oneofs) - object._generationId = "generationId"; - } - if (message.finalizeTime != null && message.hasOwnProperty("finalizeTime")) { - object.finalizeTime = $root.google.protobuf.Timestamp.toObject(message.finalizeTime, options); - if (options.oneofs) - object._finalizeTime = "finalizeTime"; - } - if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { - object.recoveryRangeStartTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeStartTime, options); - if (options.oneofs) - object._recoveryRangeStartTime = "recoveryRangeStartTime"; - } - if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { - object.recoveryRangeEndTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeEndTime, options); - if (options.oneofs) - object._recoveryRangeEndTime = "recoveryRangeEndTime"; - } - return object; - }; - - /** - * Converts this BackupApplianceBackupProperties to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - * @returns {Object.} JSON object - */ - BackupApplianceBackupProperties.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BackupApplianceBackupProperties - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BackupApplianceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceBackupProperties"; - }; - - return BackupApplianceBackupProperties; - })(); - - v1.ComputeInstanceBackupProperties = (function() { - - /** - * Properties of a ComputeInstanceBackupProperties. - * @memberof google.cloud.backupdr.v1 - * @interface IComputeInstanceBackupProperties - * @property {string|null} [description] ComputeInstanceBackupProperties description - * @property {google.cloud.backupdr.v1.ITags|null} [tags] ComputeInstanceBackupProperties tags - * @property {string|null} [machineType] ComputeInstanceBackupProperties machineType - * @property {boolean|null} [canIpForward] ComputeInstanceBackupProperties canIpForward - * @property {Array.|null} [networkInterface] ComputeInstanceBackupProperties networkInterface - * @property {Array.|null} [disk] ComputeInstanceBackupProperties disk - * @property {google.cloud.backupdr.v1.IMetadata|null} [metadata] ComputeInstanceBackupProperties metadata - * @property {Array.|null} [serviceAccount] ComputeInstanceBackupProperties serviceAccount - * @property {google.cloud.backupdr.v1.IScheduling|null} [scheduling] ComputeInstanceBackupProperties scheduling - * @property {Array.|null} [guestAccelerator] ComputeInstanceBackupProperties guestAccelerator - * @property {string|null} [minCpuPlatform] ComputeInstanceBackupProperties minCpuPlatform - * @property {google.cloud.backupdr.v1.KeyRevocationActionType|null} [keyRevocationActionType] ComputeInstanceBackupProperties keyRevocationActionType - * @property {string|null} [sourceInstance] ComputeInstanceBackupProperties sourceInstance - * @property {Object.|null} [labels] ComputeInstanceBackupProperties labels - */ - - /** - * Constructs a new ComputeInstanceBackupProperties. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ComputeInstanceBackupProperties. - * @implements IComputeInstanceBackupProperties - * @constructor - * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties=} [properties] Properties to set - */ - function ComputeInstanceBackupProperties(properties) { - this.networkInterface = []; - this.disk = []; - this.serviceAccount = []; - this.guestAccelerator = []; - 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]]; - } - - /** - * ComputeInstanceBackupProperties description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.description = null; - - /** - * ComputeInstanceBackupProperties tags. - * @member {google.cloud.backupdr.v1.ITags|null|undefined} tags - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.tags = null; - - /** - * ComputeInstanceBackupProperties machineType. - * @member {string|null|undefined} machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.machineType = null; - - /** - * ComputeInstanceBackupProperties canIpForward. - * @member {boolean|null|undefined} canIpForward - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.canIpForward = null; - - /** - * ComputeInstanceBackupProperties networkInterface. - * @member {Array.} networkInterface - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.networkInterface = $util.emptyArray; - - /** - * ComputeInstanceBackupProperties disk. - * @member {Array.} disk - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.disk = $util.emptyArray; - - /** - * ComputeInstanceBackupProperties metadata. - * @member {google.cloud.backupdr.v1.IMetadata|null|undefined} metadata - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.metadata = null; - - /** - * ComputeInstanceBackupProperties serviceAccount. - * @member {Array.} serviceAccount - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.serviceAccount = $util.emptyArray; - - /** - * ComputeInstanceBackupProperties scheduling. - * @member {google.cloud.backupdr.v1.IScheduling|null|undefined} scheduling - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.scheduling = null; - - /** - * ComputeInstanceBackupProperties guestAccelerator. - * @member {Array.} guestAccelerator - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.guestAccelerator = $util.emptyArray; - - /** - * ComputeInstanceBackupProperties minCpuPlatform. - * @member {string|null|undefined} minCpuPlatform - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.minCpuPlatform = null; - - /** - * ComputeInstanceBackupProperties keyRevocationActionType. - * @member {google.cloud.backupdr.v1.KeyRevocationActionType|null|undefined} keyRevocationActionType - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.keyRevocationActionType = null; - - /** - * ComputeInstanceBackupProperties sourceInstance. - * @member {string|null|undefined} sourceInstance - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.sourceInstance = null; - - /** - * ComputeInstanceBackupProperties labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.labels = $util.emptyObject; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ComputeInstanceBackupProperties _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _tags. - * @member {"tags"|undefined} _tags - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_tags", { - get: $util.oneOfGetter($oneOfFields = ["tags"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _machineType. - * @member {"machineType"|undefined} _machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_machineType", { - get: $util.oneOfGetter($oneOfFields = ["machineType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _canIpForward. - * @member {"canIpForward"|undefined} _canIpForward - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_canIpForward", { - get: $util.oneOfGetter($oneOfFields = ["canIpForward"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _metadata. - * @member {"metadata"|undefined} _metadata - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_metadata", { - get: $util.oneOfGetter($oneOfFields = ["metadata"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _scheduling. - * @member {"scheduling"|undefined} _scheduling - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_scheduling", { - get: $util.oneOfGetter($oneOfFields = ["scheduling"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _minCpuPlatform. - * @member {"minCpuPlatform"|undefined} _minCpuPlatform - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_minCpuPlatform", { - get: $util.oneOfGetter($oneOfFields = ["minCpuPlatform"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _keyRevocationActionType. - * @member {"keyRevocationActionType"|undefined} _keyRevocationActionType - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_keyRevocationActionType", { - get: $util.oneOfGetter($oneOfFields = ["keyRevocationActionType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceBackupProperties _sourceInstance. - * @member {"sourceInstance"|undefined} _sourceInstance - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_sourceInstance", { - get: $util.oneOfGetter($oneOfFields = ["sourceInstance"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ComputeInstanceBackupProperties instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties instance - */ - ComputeInstanceBackupProperties.create = function create(properties) { - return new ComputeInstanceBackupProperties(properties); - }; - - /** - * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties} message ComputeInstanceBackupProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceBackupProperties.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.tags != null && Object.hasOwnProperty.call(message, "tags")) - $root.google.cloud.backupdr.v1.Tags.encode(message.tags, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.machineType); - if (message.canIpForward != null && Object.hasOwnProperty.call(message, "canIpForward")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.canIpForward); - if (message.networkInterface != null && message.networkInterface.length) - for (var i = 0; i < message.networkInterface.length; ++i) - $root.google.cloud.backupdr.v1.NetworkInterface.encode(message.networkInterface[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.disk != null && message.disk.length) - for (var i = 0; i < message.disk.length; ++i) - $root.google.cloud.backupdr.v1.AttachedDisk.encode(message.disk[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.backupdr.v1.Metadata.encode(message.metadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.serviceAccount != null && message.serviceAccount.length) - for (var i = 0; i < message.serviceAccount.length; ++i) - $root.google.cloud.backupdr.v1.ServiceAccount.encode(message.serviceAccount[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) - $root.google.cloud.backupdr.v1.Scheduling.encode(message.scheduling, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.guestAccelerator != null && message.guestAccelerator.length) - for (var i = 0; i < message.guestAccelerator.length; ++i) - $root.google.cloud.backupdr.v1.AcceleratorConfig.encode(message.guestAccelerator[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.minCpuPlatform); - if (message.keyRevocationActionType != null && Object.hasOwnProperty.call(message, "keyRevocationActionType")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.keyRevocationActionType); - if (message.sourceInstance != null && Object.hasOwnProperty.call(message, "sourceInstance")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.sourceInstance); - 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 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties} message ComputeInstanceBackupProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceBackupProperties.decode = function 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.backupdr.v1.ComputeInstanceBackupProperties(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.description = reader.string(); - break; - } - case 2: { - message.tags = $root.google.cloud.backupdr.v1.Tags.decode(reader, reader.uint32()); - break; - } - case 3: { - message.machineType = reader.string(); - break; - } - case 4: { - message.canIpForward = reader.bool(); - break; - } - case 5: { - if (!(message.networkInterface && message.networkInterface.length)) - message.networkInterface = []; - message.networkInterface.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.disk && message.disk.length)) - message.disk = []; - message.disk.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader, reader.uint32())); - break; - } - case 7: { - message.metadata = $root.google.cloud.backupdr.v1.Metadata.decode(reader, reader.uint32()); - break; - } - case 8: { - if (!(message.serviceAccount && message.serviceAccount.length)) - message.serviceAccount = []; - message.serviceAccount.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader, reader.uint32())); - break; - } - case 9: { - message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.decode(reader, reader.uint32()); - break; - } - case 10: { - if (!(message.guestAccelerator && message.guestAccelerator.length)) - message.guestAccelerator = []; - message.guestAccelerator.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader, reader.uint32())); - break; - } - case 11: { - message.minCpuPlatform = reader.string(); - break; - } - case 12: { - message.keyRevocationActionType = reader.int32(); - break; - } - case 13: { - message.sourceInstance = reader.string(); - break; - } - case 14: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceBackupProperties.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComputeInstanceBackupProperties message. - * @function verify - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComputeInstanceBackupProperties.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.tags != null && message.hasOwnProperty("tags")) { - properties._tags = 1; - { - var error = $root.google.cloud.backupdr.v1.Tags.verify(message.tags); - if (error) - return "tags." + error; - } - } - if (message.machineType != null && message.hasOwnProperty("machineType")) { - properties._machineType = 1; - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - } - if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { - properties._canIpForward = 1; - if (typeof message.canIpForward !== "boolean") - return "canIpForward: boolean expected"; - } - if (message.networkInterface != null && message.hasOwnProperty("networkInterface")) { - if (!Array.isArray(message.networkInterface)) - return "networkInterface: array expected"; - for (var i = 0; i < message.networkInterface.length; ++i) { - var error = $root.google.cloud.backupdr.v1.NetworkInterface.verify(message.networkInterface[i]); - if (error) - return "networkInterface." + error; - } - } - if (message.disk != null && message.hasOwnProperty("disk")) { - if (!Array.isArray(message.disk)) - return "disk: array expected"; - for (var i = 0; i < message.disk.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AttachedDisk.verify(message.disk[i]); - if (error) - return "disk." + error; - } - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - properties._metadata = 1; - { - var error = $root.google.cloud.backupdr.v1.Metadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) { - if (!Array.isArray(message.serviceAccount)) - return "serviceAccount: array expected"; - for (var i = 0; i < message.serviceAccount.length; ++i) { - var error = $root.google.cloud.backupdr.v1.ServiceAccount.verify(message.serviceAccount[i]); - if (error) - return "serviceAccount." + error; - } - } - if (message.scheduling != null && message.hasOwnProperty("scheduling")) { - properties._scheduling = 1; - { - var error = $root.google.cloud.backupdr.v1.Scheduling.verify(message.scheduling); - if (error) - return "scheduling." + error; - } - } - if (message.guestAccelerator != null && message.hasOwnProperty("guestAccelerator")) { - if (!Array.isArray(message.guestAccelerator)) - return "guestAccelerator: array expected"; - for (var i = 0; i < message.guestAccelerator.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AcceleratorConfig.verify(message.guestAccelerator[i]); - if (error) - return "guestAccelerator." + error; - } - } - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { - properties._minCpuPlatform = 1; - if (!$util.isString(message.minCpuPlatform)) - return "minCpuPlatform: string expected"; - } - if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { - properties._keyRevocationActionType = 1; - switch (message.keyRevocationActionType) { - default: - return "keyRevocationActionType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) { - properties._sourceInstance = 1; - if (!$util.isString(message.sourceInstance)) - return "sourceInstance: string expected"; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties - */ - ComputeInstanceBackupProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties) - return object; - var message = new $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties(); - if (object.description != null) - message.description = String(object.description); - if (object.tags != null) { - if (typeof object.tags !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.tags: object expected"); - message.tags = $root.google.cloud.backupdr.v1.Tags.fromObject(object.tags); - } - if (object.machineType != null) - message.machineType = String(object.machineType); - if (object.canIpForward != null) - message.canIpForward = Boolean(object.canIpForward); - if (object.networkInterface) { - if (!Array.isArray(object.networkInterface)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: array expected"); - message.networkInterface = []; - for (var i = 0; i < object.networkInterface.length; ++i) { - if (typeof object.networkInterface[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: object expected"); - message.networkInterface[i] = $root.google.cloud.backupdr.v1.NetworkInterface.fromObject(object.networkInterface[i]); - } - } - if (object.disk) { - if (!Array.isArray(object.disk)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.disk: array expected"); - message.disk = []; - for (var i = 0; i < object.disk.length; ++i) { - if (typeof object.disk[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.disk: object expected"); - message.disk[i] = $root.google.cloud.backupdr.v1.AttachedDisk.fromObject(object.disk[i]); - } - } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.metadata: object expected"); - message.metadata = $root.google.cloud.backupdr.v1.Metadata.fromObject(object.metadata); - } - if (object.serviceAccount) { - if (!Array.isArray(object.serviceAccount)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.serviceAccount: array expected"); - message.serviceAccount = []; - for (var i = 0; i < object.serviceAccount.length; ++i) { - if (typeof object.serviceAccount[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.serviceAccount: object expected"); - message.serviceAccount[i] = $root.google.cloud.backupdr.v1.ServiceAccount.fromObject(object.serviceAccount[i]); - } - } - if (object.scheduling != null) { - if (typeof object.scheduling !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.scheduling: object expected"); - message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.fromObject(object.scheduling); - } - if (object.guestAccelerator) { - if (!Array.isArray(object.guestAccelerator)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.guestAccelerator: array expected"); - message.guestAccelerator = []; - for (var i = 0; i < object.guestAccelerator.length; ++i) { - if (typeof object.guestAccelerator[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.guestAccelerator: object expected"); - message.guestAccelerator[i] = $root.google.cloud.backupdr.v1.AcceleratorConfig.fromObject(object.guestAccelerator[i]); - } - } - if (object.minCpuPlatform != null) - message.minCpuPlatform = String(object.minCpuPlatform); - switch (object.keyRevocationActionType) { - default: - if (typeof object.keyRevocationActionType === "number") { - message.keyRevocationActionType = object.keyRevocationActionType; - break; - } - break; - case "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": - case 0: - message.keyRevocationActionType = 0; - break; - case "NONE": - case 1: - message.keyRevocationActionType = 1; - break; - case "STOP": - case 2: - message.keyRevocationActionType = 2; - break; - } - if (object.sourceInstance != null) - message.sourceInstance = String(object.sourceInstance); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} message ComputeInstanceBackupProperties - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComputeInstanceBackupProperties.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.networkInterface = []; - object.disk = []; - object.serviceAccount = []; - object.guestAccelerator = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.tags != null && message.hasOwnProperty("tags")) { - object.tags = $root.google.cloud.backupdr.v1.Tags.toObject(message.tags, options); - if (options.oneofs) - object._tags = "tags"; - } - if (message.machineType != null && message.hasOwnProperty("machineType")) { - object.machineType = message.machineType; - if (options.oneofs) - object._machineType = "machineType"; - } - if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { - object.canIpForward = message.canIpForward; - if (options.oneofs) - object._canIpForward = "canIpForward"; - } - if (message.networkInterface && message.networkInterface.length) { - object.networkInterface = []; - for (var j = 0; j < message.networkInterface.length; ++j) - object.networkInterface[j] = $root.google.cloud.backupdr.v1.NetworkInterface.toObject(message.networkInterface[j], options); - } - if (message.disk && message.disk.length) { - object.disk = []; - for (var j = 0; j < message.disk.length; ++j) - object.disk[j] = $root.google.cloud.backupdr.v1.AttachedDisk.toObject(message.disk[j], options); - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - object.metadata = $root.google.cloud.backupdr.v1.Metadata.toObject(message.metadata, options); - if (options.oneofs) - object._metadata = "metadata"; - } - if (message.serviceAccount && message.serviceAccount.length) { - object.serviceAccount = []; - for (var j = 0; j < message.serviceAccount.length; ++j) - object.serviceAccount[j] = $root.google.cloud.backupdr.v1.ServiceAccount.toObject(message.serviceAccount[j], options); - } - if (message.scheduling != null && message.hasOwnProperty("scheduling")) { - object.scheduling = $root.google.cloud.backupdr.v1.Scheduling.toObject(message.scheduling, options); - if (options.oneofs) - object._scheduling = "scheduling"; - } - if (message.guestAccelerator && message.guestAccelerator.length) { - object.guestAccelerator = []; - for (var j = 0; j < message.guestAccelerator.length; ++j) - object.guestAccelerator[j] = $root.google.cloud.backupdr.v1.AcceleratorConfig.toObject(message.guestAccelerator[j], options); - } - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { - object.minCpuPlatform = message.minCpuPlatform; - if (options.oneofs) - object._minCpuPlatform = "minCpuPlatform"; - } - if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { - object.keyRevocationActionType = options.enums === String ? $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] === undefined ? message.keyRevocationActionType : $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] : message.keyRevocationActionType; - if (options.oneofs) - object._keyRevocationActionType = "keyRevocationActionType"; - } - if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) { - object.sourceInstance = message.sourceInstance; - if (options.oneofs) - object._sourceInstance = "sourceInstance"; - } - 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]]; - } - return object; - }; - - /** - * Converts this ComputeInstanceBackupProperties to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - * @returns {Object.} JSON object - */ - ComputeInstanceBackupProperties.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComputeInstanceBackupProperties - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComputeInstanceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceBackupProperties"; - }; - - return ComputeInstanceBackupProperties; - })(); - - v1.ComputeInstanceRestoreProperties = (function() { - - /** - * Properties of a ComputeInstanceRestoreProperties. - * @memberof google.cloud.backupdr.v1 - * @interface IComputeInstanceRestoreProperties - * @property {string|null} [name] ComputeInstanceRestoreProperties name - * @property {google.cloud.backupdr.v1.IAdvancedMachineFeatures|null} [advancedMachineFeatures] ComputeInstanceRestoreProperties advancedMachineFeatures - * @property {boolean|null} [canIpForward] ComputeInstanceRestoreProperties canIpForward - * @property {google.cloud.backupdr.v1.IConfidentialInstanceConfig|null} [confidentialInstanceConfig] ComputeInstanceRestoreProperties confidentialInstanceConfig - * @property {boolean|null} [deletionProtection] ComputeInstanceRestoreProperties deletionProtection - * @property {string|null} [description] ComputeInstanceRestoreProperties description - * @property {Array.|null} [disks] ComputeInstanceRestoreProperties disks - * @property {google.cloud.backupdr.v1.IDisplayDevice|null} [displayDevice] ComputeInstanceRestoreProperties displayDevice - * @property {Array.|null} [guestAccelerators] ComputeInstanceRestoreProperties guestAccelerators - * @property {string|null} [hostname] ComputeInstanceRestoreProperties hostname - * @property {google.cloud.backupdr.v1.ICustomerEncryptionKey|null} [instanceEncryptionKey] ComputeInstanceRestoreProperties instanceEncryptionKey - * @property {google.cloud.backupdr.v1.KeyRevocationActionType|null} [keyRevocationActionType] ComputeInstanceRestoreProperties keyRevocationActionType - * @property {Object.|null} [labels] ComputeInstanceRestoreProperties labels - * @property {string|null} [machineType] ComputeInstanceRestoreProperties machineType - * @property {google.cloud.backupdr.v1.IMetadata|null} [metadata] ComputeInstanceRestoreProperties metadata - * @property {string|null} [minCpuPlatform] ComputeInstanceRestoreProperties minCpuPlatform - * @property {Array.|null} [networkInterfaces] ComputeInstanceRestoreProperties networkInterfaces - * @property {google.cloud.backupdr.v1.INetworkPerformanceConfig|null} [networkPerformanceConfig] ComputeInstanceRestoreProperties networkPerformanceConfig - * @property {google.cloud.backupdr.v1.IInstanceParams|null} [params] ComputeInstanceRestoreProperties params - * @property {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null} [privateIpv6GoogleAccess] ComputeInstanceRestoreProperties privateIpv6GoogleAccess - * @property {google.cloud.backupdr.v1.IAllocationAffinity|null} [allocationAffinity] ComputeInstanceRestoreProperties allocationAffinity - * @property {Array.|null} [resourcePolicies] ComputeInstanceRestoreProperties resourcePolicies - * @property {google.cloud.backupdr.v1.IScheduling|null} [scheduling] ComputeInstanceRestoreProperties scheduling - * @property {Array.|null} [serviceAccounts] ComputeInstanceRestoreProperties serviceAccounts - * @property {google.cloud.backupdr.v1.ITags|null} [tags] ComputeInstanceRestoreProperties tags - */ - - /** - * Constructs a new ComputeInstanceRestoreProperties. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ComputeInstanceRestoreProperties. - * @implements IComputeInstanceRestoreProperties - * @constructor - * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties=} [properties] Properties to set - */ - function ComputeInstanceRestoreProperties(properties) { - this.disks = []; - this.guestAccelerators = []; - this.labels = {}; - this.networkInterfaces = []; - this.resourcePolicies = []; - this.serviceAccounts = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComputeInstanceRestoreProperties name. - * @member {string|null|undefined} name - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.name = null; - - /** - * ComputeInstanceRestoreProperties advancedMachineFeatures. - * @member {google.cloud.backupdr.v1.IAdvancedMachineFeatures|null|undefined} advancedMachineFeatures - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.advancedMachineFeatures = null; - - /** - * ComputeInstanceRestoreProperties canIpForward. - * @member {boolean|null|undefined} canIpForward - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.canIpForward = null; - - /** - * ComputeInstanceRestoreProperties confidentialInstanceConfig. - * @member {google.cloud.backupdr.v1.IConfidentialInstanceConfig|null|undefined} confidentialInstanceConfig - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.confidentialInstanceConfig = null; - - /** - * ComputeInstanceRestoreProperties deletionProtection. - * @member {boolean|null|undefined} deletionProtection - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.deletionProtection = null; - - /** - * ComputeInstanceRestoreProperties description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.description = null; - - /** - * ComputeInstanceRestoreProperties disks. - * @member {Array.} disks - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.disks = $util.emptyArray; - - /** - * ComputeInstanceRestoreProperties displayDevice. - * @member {google.cloud.backupdr.v1.IDisplayDevice|null|undefined} displayDevice - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.displayDevice = null; - - /** - * ComputeInstanceRestoreProperties guestAccelerators. - * @member {Array.} guestAccelerators - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.guestAccelerators = $util.emptyArray; - - /** - * ComputeInstanceRestoreProperties hostname. - * @member {string|null|undefined} hostname - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.hostname = null; - - /** - * ComputeInstanceRestoreProperties instanceEncryptionKey. - * @member {google.cloud.backupdr.v1.ICustomerEncryptionKey|null|undefined} instanceEncryptionKey - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.instanceEncryptionKey = null; - - /** - * ComputeInstanceRestoreProperties keyRevocationActionType. - * @member {google.cloud.backupdr.v1.KeyRevocationActionType|null|undefined} keyRevocationActionType - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.keyRevocationActionType = null; - - /** - * ComputeInstanceRestoreProperties labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.labels = $util.emptyObject; - - /** - * ComputeInstanceRestoreProperties machineType. - * @member {string|null|undefined} machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.machineType = null; - - /** - * ComputeInstanceRestoreProperties metadata. - * @member {google.cloud.backupdr.v1.IMetadata|null|undefined} metadata - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.metadata = null; - - /** - * ComputeInstanceRestoreProperties minCpuPlatform. - * @member {string|null|undefined} minCpuPlatform - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.minCpuPlatform = null; - - /** - * ComputeInstanceRestoreProperties networkInterfaces. - * @member {Array.} networkInterfaces - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.networkInterfaces = $util.emptyArray; - - /** - * ComputeInstanceRestoreProperties networkPerformanceConfig. - * @member {google.cloud.backupdr.v1.INetworkPerformanceConfig|null|undefined} networkPerformanceConfig - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.networkPerformanceConfig = null; - - /** - * ComputeInstanceRestoreProperties params. - * @member {google.cloud.backupdr.v1.IInstanceParams|null|undefined} params - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.params = null; - - /** - * ComputeInstanceRestoreProperties privateIpv6GoogleAccess. - * @member {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null|undefined} privateIpv6GoogleAccess - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.privateIpv6GoogleAccess = null; - - /** - * ComputeInstanceRestoreProperties allocationAffinity. - * @member {google.cloud.backupdr.v1.IAllocationAffinity|null|undefined} allocationAffinity - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.allocationAffinity = null; - - /** - * ComputeInstanceRestoreProperties resourcePolicies. - * @member {Array.} resourcePolicies - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.resourcePolicies = $util.emptyArray; - - /** - * ComputeInstanceRestoreProperties scheduling. - * @member {google.cloud.backupdr.v1.IScheduling|null|undefined} scheduling - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.scheduling = null; - - /** - * ComputeInstanceRestoreProperties serviceAccounts. - * @member {Array.} serviceAccounts - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.serviceAccounts = $util.emptyArray; - - /** - * ComputeInstanceRestoreProperties tags. - * @member {google.cloud.backupdr.v1.ITags|null|undefined} tags - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.tags = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ComputeInstanceRestoreProperties _name. - * @member {"name"|undefined} _name - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _advancedMachineFeatures. - * @member {"advancedMachineFeatures"|undefined} _advancedMachineFeatures - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_advancedMachineFeatures", { - get: $util.oneOfGetter($oneOfFields = ["advancedMachineFeatures"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _canIpForward. - * @member {"canIpForward"|undefined} _canIpForward - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_canIpForward", { - get: $util.oneOfGetter($oneOfFields = ["canIpForward"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _confidentialInstanceConfig. - * @member {"confidentialInstanceConfig"|undefined} _confidentialInstanceConfig - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_confidentialInstanceConfig", { - get: $util.oneOfGetter($oneOfFields = ["confidentialInstanceConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _deletionProtection. - * @member {"deletionProtection"|undefined} _deletionProtection - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_deletionProtection", { - get: $util.oneOfGetter($oneOfFields = ["deletionProtection"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _displayDevice. - * @member {"displayDevice"|undefined} _displayDevice - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_displayDevice", { - get: $util.oneOfGetter($oneOfFields = ["displayDevice"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _hostname. - * @member {"hostname"|undefined} _hostname - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_hostname", { - get: $util.oneOfGetter($oneOfFields = ["hostname"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _instanceEncryptionKey. - * @member {"instanceEncryptionKey"|undefined} _instanceEncryptionKey - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_instanceEncryptionKey", { - get: $util.oneOfGetter($oneOfFields = ["instanceEncryptionKey"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _keyRevocationActionType. - * @member {"keyRevocationActionType"|undefined} _keyRevocationActionType - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_keyRevocationActionType", { - get: $util.oneOfGetter($oneOfFields = ["keyRevocationActionType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _machineType. - * @member {"machineType"|undefined} _machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_machineType", { - get: $util.oneOfGetter($oneOfFields = ["machineType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _metadata. - * @member {"metadata"|undefined} _metadata - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_metadata", { - get: $util.oneOfGetter($oneOfFields = ["metadata"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _minCpuPlatform. - * @member {"minCpuPlatform"|undefined} _minCpuPlatform - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_minCpuPlatform", { - get: $util.oneOfGetter($oneOfFields = ["minCpuPlatform"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _networkPerformanceConfig. - * @member {"networkPerformanceConfig"|undefined} _networkPerformanceConfig - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_networkPerformanceConfig", { - get: $util.oneOfGetter($oneOfFields = ["networkPerformanceConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _params. - * @member {"params"|undefined} _params - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_params", { - get: $util.oneOfGetter($oneOfFields = ["params"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _privateIpv6GoogleAccess. - * @member {"privateIpv6GoogleAccess"|undefined} _privateIpv6GoogleAccess - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_privateIpv6GoogleAccess", { - get: $util.oneOfGetter($oneOfFields = ["privateIpv6GoogleAccess"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _allocationAffinity. - * @member {"allocationAffinity"|undefined} _allocationAffinity - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_allocationAffinity", { - get: $util.oneOfGetter($oneOfFields = ["allocationAffinity"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _scheduling. - * @member {"scheduling"|undefined} _scheduling - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_scheduling", { - get: $util.oneOfGetter($oneOfFields = ["scheduling"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _tags. - * @member {"tags"|undefined} _tags - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_tags", { - get: $util.oneOfGetter($oneOfFields = ["tags"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties instance - */ - ComputeInstanceRestoreProperties.create = function create(properties) { - return new ComputeInstanceRestoreProperties(properties); - }; - - /** - * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceRestoreProperties.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.advancedMachineFeatures != null && Object.hasOwnProperty.call(message, "advancedMachineFeatures")) - $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.encode(message.advancedMachineFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.canIpForward != null && Object.hasOwnProperty.call(message, "canIpForward")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.canIpForward); - if (message.confidentialInstanceConfig != null && Object.hasOwnProperty.call(message, "confidentialInstanceConfig")) - $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.encode(message.confidentialInstanceConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.deletionProtection); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.disks != null && message.disks.length) - for (var i = 0; i < message.disks.length; ++i) - $root.google.cloud.backupdr.v1.AttachedDisk.encode(message.disks[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.displayDevice != null && Object.hasOwnProperty.call(message, "displayDevice")) - $root.google.cloud.backupdr.v1.DisplayDevice.encode(message.displayDevice, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.guestAccelerators != null && message.guestAccelerators.length) - for (var i = 0; i < message.guestAccelerators.length; ++i) - $root.google.cloud.backupdr.v1.AcceleratorConfig.encode(message.guestAccelerators[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.hostname); - if (message.instanceEncryptionKey != null && Object.hasOwnProperty.call(message, "instanceEncryptionKey")) - $root.google.cloud.backupdr.v1.CustomerEncryptionKey.encode(message.instanceEncryptionKey, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.keyRevocationActionType != null && Object.hasOwnProperty.call(message, "keyRevocationActionType")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.keyRevocationActionType); - 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 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.machineType); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.backupdr.v1.Metadata.encode(message.metadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.minCpuPlatform); - if (message.networkInterfaces != null && message.networkInterfaces.length) - for (var i = 0; i < message.networkInterfaces.length; ++i) - $root.google.cloud.backupdr.v1.NetworkInterface.encode(message.networkInterfaces[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.networkPerformanceConfig != null && Object.hasOwnProperty.call(message, "networkPerformanceConfig")) - $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.encode(message.networkPerformanceConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.google.cloud.backupdr.v1.InstanceParams.encode(message.params, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.privateIpv6GoogleAccess != null && Object.hasOwnProperty.call(message, "privateIpv6GoogleAccess")) - writer.uint32(/* id 20, wireType 0 =*/160).int32(message.privateIpv6GoogleAccess); - if (message.allocationAffinity != null && Object.hasOwnProperty.call(message, "allocationAffinity")) - $root.google.cloud.backupdr.v1.AllocationAffinity.encode(message.allocationAffinity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.resourcePolicies != null && message.resourcePolicies.length) - for (var i = 0; i < message.resourcePolicies.length; ++i) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.resourcePolicies[i]); - if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) - $root.google.cloud.backupdr.v1.Scheduling.encode(message.scheduling, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.serviceAccounts != null && message.serviceAccounts.length) - for (var i = 0; i < message.serviceAccounts.length; ++i) - $root.google.cloud.backupdr.v1.ServiceAccount.encode(message.serviceAccounts[i], writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) - $root.google.cloud.backupdr.v1.Tags.encode(message.tags, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceRestoreProperties.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceRestoreProperties.decode = function 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.backupdr.v1.ComputeInstanceRestoreProperties(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.decode(reader, reader.uint32()); - break; - } - case 3: { - message.canIpForward = reader.bool(); - break; - } - case 4: { - message.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.deletionProtection = reader.bool(); - break; - } - case 6: { - message.description = reader.string(); - break; - } - case 7: { - if (!(message.disks && message.disks.length)) - message.disks = []; - message.disks.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader, reader.uint32())); - break; - } - case 8: { - message.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.guestAccelerators && message.guestAccelerators.length)) - message.guestAccelerators = []; - message.guestAccelerators.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader, reader.uint32())); - break; - } - case 10: { - message.hostname = reader.string(); - break; - } - case 11: { - message.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader, reader.uint32()); - break; - } - case 12: { - message.keyRevocationActionType = reader.int32(); - break; - } - case 13: { - 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 14: { - message.machineType = reader.string(); - break; - } - case 15: { - message.metadata = $root.google.cloud.backupdr.v1.Metadata.decode(reader, reader.uint32()); - break; - } - case 16: { - message.minCpuPlatform = reader.string(); - break; - } - case 17: { - if (!(message.networkInterfaces && message.networkInterfaces.length)) - message.networkInterfaces = []; - message.networkInterfaces.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader, reader.uint32())); - break; - } - case 18: { - message.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.decode(reader, reader.uint32()); - break; - } - case 19: { - message.params = $root.google.cloud.backupdr.v1.InstanceParams.decode(reader, reader.uint32()); - break; - } - case 20: { - message.privateIpv6GoogleAccess = reader.int32(); - break; - } - case 21: { - message.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.decode(reader, reader.uint32()); - break; - } - case 22: { - if (!(message.resourcePolicies && message.resourcePolicies.length)) - message.resourcePolicies = []; - message.resourcePolicies.push(reader.string()); - break; - } - case 23: { - message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.decode(reader, reader.uint32()); - break; - } - case 24: { - if (!(message.serviceAccounts && message.serviceAccounts.length)) - message.serviceAccounts = []; - message.serviceAccounts.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader, reader.uint32())); - break; - } - case 26: { - message.tags = $root.google.cloud.backupdr.v1.Tags.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceRestoreProperties.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComputeInstanceRestoreProperties message. - * @function verify - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComputeInstanceRestoreProperties.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { - properties._advancedMachineFeatures = 1; - { - var error = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.verify(message.advancedMachineFeatures); - if (error) - return "advancedMachineFeatures." + error; - } - } - if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { - properties._canIpForward = 1; - if (typeof message.canIpForward !== "boolean") - return "canIpForward: boolean expected"; - } - if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) { - properties._confidentialInstanceConfig = 1; - { - var error = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify(message.confidentialInstanceConfig); - if (error) - return "confidentialInstanceConfig." + error; - } - } - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) { - properties._deletionProtection = 1; - if (typeof message.deletionProtection !== "boolean") - return "deletionProtection: boolean expected"; - } - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.disks != null && message.hasOwnProperty("disks")) { - if (!Array.isArray(message.disks)) - return "disks: array expected"; - for (var i = 0; i < message.disks.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AttachedDisk.verify(message.disks[i]); - if (error) - return "disks." + error; - } - } - if (message.displayDevice != null && message.hasOwnProperty("displayDevice")) { - properties._displayDevice = 1; - { - var error = $root.google.cloud.backupdr.v1.DisplayDevice.verify(message.displayDevice); - if (error) - return "displayDevice." + error; - } - } - if (message.guestAccelerators != null && message.hasOwnProperty("guestAccelerators")) { - if (!Array.isArray(message.guestAccelerators)) - return "guestAccelerators: array expected"; - for (var i = 0; i < message.guestAccelerators.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AcceleratorConfig.verify(message.guestAccelerators[i]); - if (error) - return "guestAccelerators." + error; - } - } - if (message.hostname != null && message.hasOwnProperty("hostname")) { - properties._hostname = 1; - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - } - if (message.instanceEncryptionKey != null && message.hasOwnProperty("instanceEncryptionKey")) { - properties._instanceEncryptionKey = 1; - { - var error = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.verify(message.instanceEncryptionKey); - if (error) - return "instanceEncryptionKey." + error; - } - } - if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { - properties._keyRevocationActionType = 1; - switch (message.keyRevocationActionType) { - default: - return "keyRevocationActionType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - 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.machineType != null && message.hasOwnProperty("machineType")) { - properties._machineType = 1; - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - properties._metadata = 1; - { - var error = $root.google.cloud.backupdr.v1.Metadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - } - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { - properties._minCpuPlatform = 1; - if (!$util.isString(message.minCpuPlatform)) - return "minCpuPlatform: string expected"; - } - if (message.networkInterfaces != null && message.hasOwnProperty("networkInterfaces")) { - if (!Array.isArray(message.networkInterfaces)) - return "networkInterfaces: array expected"; - for (var i = 0; i < message.networkInterfaces.length; ++i) { - var error = $root.google.cloud.backupdr.v1.NetworkInterface.verify(message.networkInterfaces[i]); - if (error) - return "networkInterfaces." + error; - } - } - if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { - properties._networkPerformanceConfig = 1; - { - var error = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.verify(message.networkPerformanceConfig); - if (error) - return "networkPerformanceConfig." + error; - } - } - if (message.params != null && message.hasOwnProperty("params")) { - properties._params = 1; - { - var error = $root.google.cloud.backupdr.v1.InstanceParams.verify(message.params); - if (error) - return "params." + error; - } - } - if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) { - properties._privateIpv6GoogleAccess = 1; - switch (message.privateIpv6GoogleAccess) { - default: - return "privateIpv6GoogleAccess: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.allocationAffinity != null && message.hasOwnProperty("allocationAffinity")) { - properties._allocationAffinity = 1; - { - var error = $root.google.cloud.backupdr.v1.AllocationAffinity.verify(message.allocationAffinity); - if (error) - return "allocationAffinity." + error; - } - } - if (message.resourcePolicies != null && message.hasOwnProperty("resourcePolicies")) { - if (!Array.isArray(message.resourcePolicies)) - return "resourcePolicies: array expected"; - for (var i = 0; i < message.resourcePolicies.length; ++i) - if (!$util.isString(message.resourcePolicies[i])) - return "resourcePolicies: string[] expected"; - } - if (message.scheduling != null && message.hasOwnProperty("scheduling")) { - properties._scheduling = 1; - { - var error = $root.google.cloud.backupdr.v1.Scheduling.verify(message.scheduling); - if (error) - return "scheduling." + error; - } - } - if (message.serviceAccounts != null && message.hasOwnProperty("serviceAccounts")) { - if (!Array.isArray(message.serviceAccounts)) - return "serviceAccounts: array expected"; - for (var i = 0; i < message.serviceAccounts.length; ++i) { - var error = $root.google.cloud.backupdr.v1.ServiceAccount.verify(message.serviceAccounts[i]); - if (error) - return "serviceAccounts." + error; - } - } - if (message.tags != null && message.hasOwnProperty("tags")) { - properties._tags = 1; - { - var error = $root.google.cloud.backupdr.v1.Tags.verify(message.tags); - if (error) - return "tags." + error; - } - } - return null; - }; - - /** - * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties - */ - ComputeInstanceRestoreProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties) - return object; - var message = new $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties(); - if (object.name != null) - message.name = String(object.name); - if (object.advancedMachineFeatures != null) { - if (typeof object.advancedMachineFeatures !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.advancedMachineFeatures: object expected"); - message.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.fromObject(object.advancedMachineFeatures); - } - if (object.canIpForward != null) - message.canIpForward = Boolean(object.canIpForward); - if (object.confidentialInstanceConfig != null) { - if (typeof object.confidentialInstanceConfig !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.confidentialInstanceConfig: object expected"); - message.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.fromObject(object.confidentialInstanceConfig); - } - if (object.deletionProtection != null) - message.deletionProtection = Boolean(object.deletionProtection); - if (object.description != null) - message.description = String(object.description); - if (object.disks) { - if (!Array.isArray(object.disks)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: array expected"); - message.disks = []; - for (var i = 0; i < object.disks.length; ++i) { - if (typeof object.disks[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: object expected"); - message.disks[i] = $root.google.cloud.backupdr.v1.AttachedDisk.fromObject(object.disks[i]); - } - } - if (object.displayDevice != null) { - if (typeof object.displayDevice !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.displayDevice: object expected"); - message.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.fromObject(object.displayDevice); - } - if (object.guestAccelerators) { - if (!Array.isArray(object.guestAccelerators)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.guestAccelerators: array expected"); - message.guestAccelerators = []; - for (var i = 0; i < object.guestAccelerators.length; ++i) { - if (typeof object.guestAccelerators[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.guestAccelerators: object expected"); - message.guestAccelerators[i] = $root.google.cloud.backupdr.v1.AcceleratorConfig.fromObject(object.guestAccelerators[i]); - } - } - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.instanceEncryptionKey != null) { - if (typeof object.instanceEncryptionKey !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.instanceEncryptionKey: object expected"); - message.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.fromObject(object.instanceEncryptionKey); - } - switch (object.keyRevocationActionType) { - default: - if (typeof object.keyRevocationActionType === "number") { - message.keyRevocationActionType = object.keyRevocationActionType; - break; - } - break; - case "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": - case 0: - message.keyRevocationActionType = 0; - break; - case "NONE": - case 1: - message.keyRevocationActionType = 1; - break; - case "STOP": - case 2: - message.keyRevocationActionType = 2; - break; - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.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.machineType != null) - message.machineType = String(object.machineType); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.metadata: object expected"); - message.metadata = $root.google.cloud.backupdr.v1.Metadata.fromObject(object.metadata); - } - if (object.minCpuPlatform != null) - message.minCpuPlatform = String(object.minCpuPlatform); - if (object.networkInterfaces) { - if (!Array.isArray(object.networkInterfaces)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkInterfaces: array expected"); - message.networkInterfaces = []; - for (var i = 0; i < object.networkInterfaces.length; ++i) { - if (typeof object.networkInterfaces[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkInterfaces: object expected"); - message.networkInterfaces[i] = $root.google.cloud.backupdr.v1.NetworkInterface.fromObject(object.networkInterfaces[i]); - } - } - if (object.networkPerformanceConfig != null) { - if (typeof object.networkPerformanceConfig !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkPerformanceConfig: object expected"); - message.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.fromObject(object.networkPerformanceConfig); - } - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.params: object expected"); - message.params = $root.google.cloud.backupdr.v1.InstanceParams.fromObject(object.params); - } - switch (object.privateIpv6GoogleAccess) { - default: - if (typeof object.privateIpv6GoogleAccess === "number") { - message.privateIpv6GoogleAccess = object.privateIpv6GoogleAccess; - break; - } - break; - case "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": - case 0: - message.privateIpv6GoogleAccess = 0; - break; - case "INHERIT_FROM_SUBNETWORK": - case 1: - message.privateIpv6GoogleAccess = 1; - break; - case "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE": - case 2: - message.privateIpv6GoogleAccess = 2; - break; - case "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE": - case 3: - message.privateIpv6GoogleAccess = 3; - break; - } - if (object.allocationAffinity != null) { - if (typeof object.allocationAffinity !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.allocationAffinity: object expected"); - message.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.fromObject(object.allocationAffinity); - } - if (object.resourcePolicies) { - if (!Array.isArray(object.resourcePolicies)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.resourcePolicies: array expected"); - message.resourcePolicies = []; - for (var i = 0; i < object.resourcePolicies.length; ++i) - message.resourcePolicies[i] = String(object.resourcePolicies[i]); - } - if (object.scheduling != null) { - if (typeof object.scheduling !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.scheduling: object expected"); - message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.fromObject(object.scheduling); - } - if (object.serviceAccounts) { - if (!Array.isArray(object.serviceAccounts)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.serviceAccounts: array expected"); - message.serviceAccounts = []; - for (var i = 0; i < object.serviceAccounts.length; ++i) { - if (typeof object.serviceAccounts[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.serviceAccounts: object expected"); - message.serviceAccounts[i] = $root.google.cloud.backupdr.v1.ServiceAccount.fromObject(object.serviceAccounts[i]); - } - } - if (object.tags != null) { - if (typeof object.tags !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.tags: object expected"); - message.tags = $root.google.cloud.backupdr.v1.Tags.fromObject(object.tags); - } - return message; - }; - - /** - * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComputeInstanceRestoreProperties.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.disks = []; - object.guestAccelerators = []; - object.networkInterfaces = []; - object.resourcePolicies = []; - object.serviceAccounts = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { - object.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.toObject(message.advancedMachineFeatures, options); - if (options.oneofs) - object._advancedMachineFeatures = "advancedMachineFeatures"; - } - if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { - object.canIpForward = message.canIpForward; - if (options.oneofs) - object._canIpForward = "canIpForward"; - } - if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) { - object.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.toObject(message.confidentialInstanceConfig, options); - if (options.oneofs) - object._confidentialInstanceConfig = "confidentialInstanceConfig"; - } - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) { - object.deletionProtection = message.deletionProtection; - if (options.oneofs) - object._deletionProtection = "deletionProtection"; - } - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.disks && message.disks.length) { - object.disks = []; - for (var j = 0; j < message.disks.length; ++j) - object.disks[j] = $root.google.cloud.backupdr.v1.AttachedDisk.toObject(message.disks[j], options); - } - if (message.displayDevice != null && message.hasOwnProperty("displayDevice")) { - object.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.toObject(message.displayDevice, options); - if (options.oneofs) - object._displayDevice = "displayDevice"; - } - if (message.guestAccelerators && message.guestAccelerators.length) { - object.guestAccelerators = []; - for (var j = 0; j < message.guestAccelerators.length; ++j) - object.guestAccelerators[j] = $root.google.cloud.backupdr.v1.AcceleratorConfig.toObject(message.guestAccelerators[j], options); - } - if (message.hostname != null && message.hasOwnProperty("hostname")) { - object.hostname = message.hostname; - if (options.oneofs) - object._hostname = "hostname"; - } - if (message.instanceEncryptionKey != null && message.hasOwnProperty("instanceEncryptionKey")) { - object.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.toObject(message.instanceEncryptionKey, options); - if (options.oneofs) - object._instanceEncryptionKey = "instanceEncryptionKey"; - } - if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { - object.keyRevocationActionType = options.enums === String ? $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] === undefined ? message.keyRevocationActionType : $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] : message.keyRevocationActionType; - if (options.oneofs) - object._keyRevocationActionType = "keyRevocationActionType"; - } - 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.machineType != null && message.hasOwnProperty("machineType")) { - object.machineType = message.machineType; - if (options.oneofs) - object._machineType = "machineType"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - object.metadata = $root.google.cloud.backupdr.v1.Metadata.toObject(message.metadata, options); - if (options.oneofs) - object._metadata = "metadata"; - } - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { - object.minCpuPlatform = message.minCpuPlatform; - if (options.oneofs) - object._minCpuPlatform = "minCpuPlatform"; - } - if (message.networkInterfaces && message.networkInterfaces.length) { - object.networkInterfaces = []; - for (var j = 0; j < message.networkInterfaces.length; ++j) - object.networkInterfaces[j] = $root.google.cloud.backupdr.v1.NetworkInterface.toObject(message.networkInterfaces[j], options); - } - if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { - object.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.toObject(message.networkPerformanceConfig, options); - if (options.oneofs) - object._networkPerformanceConfig = "networkPerformanceConfig"; - } - if (message.params != null && message.hasOwnProperty("params")) { - object.params = $root.google.cloud.backupdr.v1.InstanceParams.toObject(message.params, options); - if (options.oneofs) - object._params = "params"; - } - if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) { - object.privateIpv6GoogleAccess = options.enums === String ? $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess[message.privateIpv6GoogleAccess] === undefined ? message.privateIpv6GoogleAccess : $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess[message.privateIpv6GoogleAccess] : message.privateIpv6GoogleAccess; - if (options.oneofs) - object._privateIpv6GoogleAccess = "privateIpv6GoogleAccess"; - } - if (message.allocationAffinity != null && message.hasOwnProperty("allocationAffinity")) { - object.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.toObject(message.allocationAffinity, options); - if (options.oneofs) - object._allocationAffinity = "allocationAffinity"; - } - if (message.resourcePolicies && message.resourcePolicies.length) { - object.resourcePolicies = []; - for (var j = 0; j < message.resourcePolicies.length; ++j) - object.resourcePolicies[j] = message.resourcePolicies[j]; - } - if (message.scheduling != null && message.hasOwnProperty("scheduling")) { - object.scheduling = $root.google.cloud.backupdr.v1.Scheduling.toObject(message.scheduling, options); - if (options.oneofs) - object._scheduling = "scheduling"; - } - if (message.serviceAccounts && message.serviceAccounts.length) { - object.serviceAccounts = []; - for (var j = 0; j < message.serviceAccounts.length; ++j) - object.serviceAccounts[j] = $root.google.cloud.backupdr.v1.ServiceAccount.toObject(message.serviceAccounts[j], options); - } - if (message.tags != null && message.hasOwnProperty("tags")) { - object.tags = $root.google.cloud.backupdr.v1.Tags.toObject(message.tags, options); - if (options.oneofs) - object._tags = "tags"; - } - return object; - }; - - /** - * Converts this ComputeInstanceRestoreProperties to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - * @returns {Object.} JSON object - */ - ComputeInstanceRestoreProperties.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComputeInstanceRestoreProperties - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComputeInstanceRestoreProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceRestoreProperties"; - }; - - /** - * InstancePrivateIpv6GoogleAccess enum. - * @name google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess - * @enum {number} - * @property {number} INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED=0 INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED value - * @property {number} INHERIT_FROM_SUBNETWORK=1 INHERIT_FROM_SUBNETWORK value - * @property {number} ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE=2 ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE value - * @property {number} ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE=3 ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE value - */ - ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED"] = 0; - values[valuesById[1] = "INHERIT_FROM_SUBNETWORK"] = 1; - values[valuesById[2] = "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE"] = 2; - values[valuesById[3] = "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE"] = 3; - return values; - })(); - - return ComputeInstanceRestoreProperties; - })(); - - v1.ComputeInstanceTargetEnvironment = (function() { - - /** - * Properties of a ComputeInstanceTargetEnvironment. - * @memberof google.cloud.backupdr.v1 - * @interface IComputeInstanceTargetEnvironment - * @property {string|null} [project] ComputeInstanceTargetEnvironment project - * @property {string|null} [zone] ComputeInstanceTargetEnvironment zone - */ - - /** - * Constructs a new ComputeInstanceTargetEnvironment. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ComputeInstanceTargetEnvironment. - * @implements IComputeInstanceTargetEnvironment - * @constructor - * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment=} [properties] Properties to set - */ - function ComputeInstanceTargetEnvironment(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComputeInstanceTargetEnvironment project. - * @member {string} project - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @instance - */ - ComputeInstanceTargetEnvironment.prototype.project = ""; - - /** - * ComputeInstanceTargetEnvironment zone. - * @member {string} zone - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @instance - */ - ComputeInstanceTargetEnvironment.prototype.zone = ""; - - /** - * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment instance - */ - ComputeInstanceTargetEnvironment.create = function create(properties) { - return new ComputeInstanceTargetEnvironment(properties); - }; - - /** - * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceTargetEnvironment.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - return writer; - }; - - /** - * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceTargetEnvironment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceTargetEnvironment.decode = function 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.backupdr.v1.ComputeInstanceTargetEnvironment(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.project = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceTargetEnvironment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComputeInstanceTargetEnvironment message. - * @function verify - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComputeInstanceTargetEnvironment.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.project != null && message.hasOwnProperty("project")) - if (!$util.isString(message.project)) - return "project: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - return null; - }; - - /** - * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment - */ - ComputeInstanceTargetEnvironment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment) - return object; - var message = new $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment(); - if (object.project != null) - message.project = String(object.project); - if (object.zone != null) - message.zone = String(object.zone); - return message; - }; - - /** - * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComputeInstanceTargetEnvironment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.project = ""; - object.zone = ""; - } - if (message.project != null && message.hasOwnProperty("project")) - object.project = message.project; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - return object; - }; - - /** - * Converts this ComputeInstanceTargetEnvironment to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @instance - * @returns {Object.} JSON object - */ - ComputeInstanceTargetEnvironment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComputeInstanceTargetEnvironment - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComputeInstanceTargetEnvironment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment"; - }; - - return ComputeInstanceTargetEnvironment; - })(); - - v1.ComputeInstanceDataSourceProperties = (function() { - - /** - * Properties of a ComputeInstanceDataSourceProperties. - * @memberof google.cloud.backupdr.v1 - * @interface IComputeInstanceDataSourceProperties - * @property {string|null} [name] ComputeInstanceDataSourceProperties name - * @property {string|null} [description] ComputeInstanceDataSourceProperties description - * @property {string|null} [machineType] ComputeInstanceDataSourceProperties machineType - * @property {number|Long|null} [totalDiskCount] ComputeInstanceDataSourceProperties totalDiskCount - * @property {number|Long|null} [totalDiskSizeGb] ComputeInstanceDataSourceProperties totalDiskSizeGb - */ - - /** - * Constructs a new ComputeInstanceDataSourceProperties. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ComputeInstanceDataSourceProperties. - * @implements IComputeInstanceDataSourceProperties - * @constructor - * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties=} [properties] Properties to set - */ - function ComputeInstanceDataSourceProperties(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComputeInstanceDataSourceProperties name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @instance - */ - ComputeInstanceDataSourceProperties.prototype.name = ""; - - /** - * ComputeInstanceDataSourceProperties description. - * @member {string} description - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @instance - */ - ComputeInstanceDataSourceProperties.prototype.description = ""; - - /** - * ComputeInstanceDataSourceProperties machineType. - * @member {string} machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @instance - */ - ComputeInstanceDataSourceProperties.prototype.machineType = ""; - - /** - * ComputeInstanceDataSourceProperties totalDiskCount. - * @member {number|Long} totalDiskCount - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @instance - */ - ComputeInstanceDataSourceProperties.prototype.totalDiskCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ComputeInstanceDataSourceProperties totalDiskSizeGb. - * @member {number|Long} totalDiskSizeGb - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @instance - */ - ComputeInstanceDataSourceProperties.prototype.totalDiskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties instance - */ - ComputeInstanceDataSourceProperties.create = function create(properties) { - return new ComputeInstanceDataSourceProperties(properties); - }; - - /** - * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceDataSourceProperties.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.machineType); - if (message.totalDiskCount != null && Object.hasOwnProperty.call(message, "totalDiskCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.totalDiskCount); - if (message.totalDiskSizeGb != null && Object.hasOwnProperty.call(message, "totalDiskSizeGb")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.totalDiskSizeGb); - return writer; - }; - - /** - * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComputeInstanceDataSourceProperties.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceDataSourceProperties.decode = function 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.backupdr.v1.ComputeInstanceDataSourceProperties(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.machineType = reader.string(); - break; - } - case 4: { - message.totalDiskCount = reader.int64(); - break; - } - case 5: { - message.totalDiskSizeGb = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceDataSourceProperties.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComputeInstanceDataSourceProperties message. - * @function verify - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComputeInstanceDataSourceProperties.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.machineType != null && message.hasOwnProperty("machineType")) - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - if (message.totalDiskCount != null && message.hasOwnProperty("totalDiskCount")) - if (!$util.isInteger(message.totalDiskCount) && !(message.totalDiskCount && $util.isInteger(message.totalDiskCount.low) && $util.isInteger(message.totalDiskCount.high))) - return "totalDiskCount: integer|Long expected"; - if (message.totalDiskSizeGb != null && message.hasOwnProperty("totalDiskSizeGb")) - if (!$util.isInteger(message.totalDiskSizeGb) && !(message.totalDiskSizeGb && $util.isInteger(message.totalDiskSizeGb.low) && $util.isInteger(message.totalDiskSizeGb.high))) - return "totalDiskSizeGb: integer|Long expected"; - return null; - }; - - /** - * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties - */ - ComputeInstanceDataSourceProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties) - return object; - var message = new $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.machineType != null) - message.machineType = String(object.machineType); - if (object.totalDiskCount != null) - if ($util.Long) - (message.totalDiskCount = $util.Long.fromValue(object.totalDiskCount)).unsigned = false; - else if (typeof object.totalDiskCount === "string") - message.totalDiskCount = parseInt(object.totalDiskCount, 10); - else if (typeof object.totalDiskCount === "number") - message.totalDiskCount = object.totalDiskCount; - else if (typeof object.totalDiskCount === "object") - message.totalDiskCount = new $util.LongBits(object.totalDiskCount.low >>> 0, object.totalDiskCount.high >>> 0).toNumber(); - if (object.totalDiskSizeGb != null) - if ($util.Long) - (message.totalDiskSizeGb = $util.Long.fromValue(object.totalDiskSizeGb)).unsigned = false; - else if (typeof object.totalDiskSizeGb === "string") - message.totalDiskSizeGb = parseInt(object.totalDiskSizeGb, 10); - else if (typeof object.totalDiskSizeGb === "number") - message.totalDiskSizeGb = object.totalDiskSizeGb; - else if (typeof object.totalDiskSizeGb === "object") - message.totalDiskSizeGb = new $util.LongBits(object.totalDiskSizeGb.low >>> 0, object.totalDiskSizeGb.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComputeInstanceDataSourceProperties.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.machineType = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalDiskCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalDiskCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalDiskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalDiskSizeGb = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.machineType != null && message.hasOwnProperty("machineType")) - object.machineType = message.machineType; - if (message.totalDiskCount != null && message.hasOwnProperty("totalDiskCount")) - if (typeof message.totalDiskCount === "number") - object.totalDiskCount = options.longs === String ? String(message.totalDiskCount) : message.totalDiskCount; - else - object.totalDiskCount = options.longs === String ? $util.Long.prototype.toString.call(message.totalDiskCount) : options.longs === Number ? new $util.LongBits(message.totalDiskCount.low >>> 0, message.totalDiskCount.high >>> 0).toNumber() : message.totalDiskCount; - if (message.totalDiskSizeGb != null && message.hasOwnProperty("totalDiskSizeGb")) - if (typeof message.totalDiskSizeGb === "number") - object.totalDiskSizeGb = options.longs === String ? String(message.totalDiskSizeGb) : message.totalDiskSizeGb; - else - object.totalDiskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.totalDiskSizeGb) : options.longs === Number ? new $util.LongBits(message.totalDiskSizeGb.low >>> 0, message.totalDiskSizeGb.high >>> 0).toNumber() : message.totalDiskSizeGb; - return object; - }; - - /** - * Converts this ComputeInstanceDataSourceProperties to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @instance - * @returns {Object.} JSON object - */ - ComputeInstanceDataSourceProperties.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComputeInstanceDataSourceProperties - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComputeInstanceDataSourceProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties"; - }; - - return ComputeInstanceDataSourceProperties; - })(); - - v1.AdvancedMachineFeatures = (function() { - - /** - * Properties of an AdvancedMachineFeatures. - * @memberof google.cloud.backupdr.v1 - * @interface IAdvancedMachineFeatures - * @property {boolean|null} [enableNestedVirtualization] AdvancedMachineFeatures enableNestedVirtualization - * @property {number|null} [threadsPerCore] AdvancedMachineFeatures threadsPerCore - * @property {number|null} [visibleCoreCount] AdvancedMachineFeatures visibleCoreCount - * @property {boolean|null} [enableUefiNetworking] AdvancedMachineFeatures enableUefiNetworking - */ - - /** - * Constructs a new AdvancedMachineFeatures. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AdvancedMachineFeatures. - * @implements IAdvancedMachineFeatures - * @constructor - * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures=} [properties] Properties to set - */ - function AdvancedMachineFeatures(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AdvancedMachineFeatures enableNestedVirtualization. - * @member {boolean|null|undefined} enableNestedVirtualization - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.enableNestedVirtualization = null; - - /** - * AdvancedMachineFeatures threadsPerCore. - * @member {number|null|undefined} threadsPerCore - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.threadsPerCore = null; - - /** - * AdvancedMachineFeatures visibleCoreCount. - * @member {number|null|undefined} visibleCoreCount - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.visibleCoreCount = null; - - /** - * AdvancedMachineFeatures enableUefiNetworking. - * @member {boolean|null|undefined} enableUefiNetworking - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.enableUefiNetworking = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AdvancedMachineFeatures _enableNestedVirtualization. - * @member {"enableNestedVirtualization"|undefined} _enableNestedVirtualization - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableNestedVirtualization", { - get: $util.oneOfGetter($oneOfFields = ["enableNestedVirtualization"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AdvancedMachineFeatures _threadsPerCore. - * @member {"threadsPerCore"|undefined} _threadsPerCore - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_threadsPerCore", { - get: $util.oneOfGetter($oneOfFields = ["threadsPerCore"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AdvancedMachineFeatures _visibleCoreCount. - * @member {"visibleCoreCount"|undefined} _visibleCoreCount - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_visibleCoreCount", { - get: $util.oneOfGetter($oneOfFields = ["visibleCoreCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AdvancedMachineFeatures _enableUefiNetworking. - * @member {"enableUefiNetworking"|undefined} _enableUefiNetworking - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableUefiNetworking", { - get: $util.oneOfGetter($oneOfFields = ["enableUefiNetworking"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AdvancedMachineFeatures instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures instance - */ - AdvancedMachineFeatures.create = function create(properties) { - return new AdvancedMachineFeatures(properties); - }; - - /** - * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdvancedMachineFeatures.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableNestedVirtualization != null && Object.hasOwnProperty.call(message, "enableNestedVirtualization")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableNestedVirtualization); - if (message.threadsPerCore != null && Object.hasOwnProperty.call(message, "threadsPerCore")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.threadsPerCore); - if (message.visibleCoreCount != null && Object.hasOwnProperty.call(message, "visibleCoreCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.visibleCoreCount); - if (message.enableUefiNetworking != null && Object.hasOwnProperty.call(message, "enableUefiNetworking")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enableUefiNetworking); - return writer; - }; - - /** - * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AdvancedMachineFeatures.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdvancedMachineFeatures.decode = function 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.backupdr.v1.AdvancedMachineFeatures(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableNestedVirtualization = reader.bool(); - break; - } - case 2: { - message.threadsPerCore = reader.int32(); - break; - } - case 3: { - message.visibleCoreCount = reader.int32(); - break; - } - case 4: { - message.enableUefiNetworking = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AdvancedMachineFeatures.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AdvancedMachineFeatures message. - * @function verify - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AdvancedMachineFeatures.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { - properties._enableNestedVirtualization = 1; - if (typeof message.enableNestedVirtualization !== "boolean") - return "enableNestedVirtualization: boolean expected"; - } - if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { - properties._threadsPerCore = 1; - if (!$util.isInteger(message.threadsPerCore)) - return "threadsPerCore: integer expected"; - } - if (message.visibleCoreCount != null && message.hasOwnProperty("visibleCoreCount")) { - properties._visibleCoreCount = 1; - if (!$util.isInteger(message.visibleCoreCount)) - return "visibleCoreCount: integer expected"; - } - if (message.enableUefiNetworking != null && message.hasOwnProperty("enableUefiNetworking")) { - properties._enableUefiNetworking = 1; - if (typeof message.enableUefiNetworking !== "boolean") - return "enableUefiNetworking: boolean expected"; - } - return null; - }; - - /** - * Creates an AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures - */ - AdvancedMachineFeatures.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AdvancedMachineFeatures) - return object; - var message = new $root.google.cloud.backupdr.v1.AdvancedMachineFeatures(); - if (object.enableNestedVirtualization != null) - message.enableNestedVirtualization = Boolean(object.enableNestedVirtualization); - if (object.threadsPerCore != null) - message.threadsPerCore = object.threadsPerCore | 0; - if (object.visibleCoreCount != null) - message.visibleCoreCount = object.visibleCoreCount | 0; - if (object.enableUefiNetworking != null) - message.enableUefiNetworking = Boolean(object.enableUefiNetworking); - return message; - }; - - /** - * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {google.cloud.backupdr.v1.AdvancedMachineFeatures} message AdvancedMachineFeatures - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AdvancedMachineFeatures.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { - object.enableNestedVirtualization = message.enableNestedVirtualization; - if (options.oneofs) - object._enableNestedVirtualization = "enableNestedVirtualization"; - } - if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { - object.threadsPerCore = message.threadsPerCore; - if (options.oneofs) - object._threadsPerCore = "threadsPerCore"; - } - if (message.visibleCoreCount != null && message.hasOwnProperty("visibleCoreCount")) { - object.visibleCoreCount = message.visibleCoreCount; - if (options.oneofs) - object._visibleCoreCount = "visibleCoreCount"; - } - if (message.enableUefiNetworking != null && message.hasOwnProperty("enableUefiNetworking")) { - object.enableUefiNetworking = message.enableUefiNetworking; - if (options.oneofs) - object._enableUefiNetworking = "enableUefiNetworking"; - } - return object; - }; - - /** - * Converts this AdvancedMachineFeatures to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - * @returns {Object.} JSON object - */ - AdvancedMachineFeatures.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AdvancedMachineFeatures - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AdvancedMachineFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AdvancedMachineFeatures"; - }; - - return AdvancedMachineFeatures; - })(); - - v1.ConfidentialInstanceConfig = (function() { - - /** - * Properties of a ConfidentialInstanceConfig. - * @memberof google.cloud.backupdr.v1 - * @interface IConfidentialInstanceConfig - * @property {boolean|null} [enableConfidentialCompute] ConfidentialInstanceConfig enableConfidentialCompute - */ - - /** - * Constructs a new ConfidentialInstanceConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ConfidentialInstanceConfig. - * @implements IConfidentialInstanceConfig - * @constructor - * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig=} [properties] Properties to set - */ - function ConfidentialInstanceConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConfidentialInstanceConfig enableConfidentialCompute. - * @member {boolean|null|undefined} enableConfidentialCompute - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @instance - */ - ConfidentialInstanceConfig.prototype.enableConfidentialCompute = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ConfidentialInstanceConfig _enableConfidentialCompute. - * @member {"enableConfidentialCompute"|undefined} _enableConfidentialCompute - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @instance - */ - Object.defineProperty(ConfidentialInstanceConfig.prototype, "_enableConfidentialCompute", { - get: $util.oneOfGetter($oneOfFields = ["enableConfidentialCompute"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ConfidentialInstanceConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig instance - */ - ConfidentialInstanceConfig.create = function create(properties) { - return new ConfidentialInstanceConfig(properties); - }; - - /** - * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig} message ConfidentialInstanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidentialInstanceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableConfidentialCompute != null && Object.hasOwnProperty.call(message, "enableConfidentialCompute")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableConfidentialCompute); - return writer; - }; - - /** - * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig} message ConfidentialInstanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfidentialInstanceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidentialInstanceConfig.decode = function 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.backupdr.v1.ConfidentialInstanceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableConfidentialCompute = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfidentialInstanceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConfidentialInstanceConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConfidentialInstanceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enableConfidentialCompute != null && message.hasOwnProperty("enableConfidentialCompute")) { - properties._enableConfidentialCompute = 1; - if (typeof message.enableConfidentialCompute !== "boolean") - return "enableConfidentialCompute: boolean expected"; - } - return null; - }; - - /** - * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig - */ - ConfidentialInstanceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig(); - if (object.enableConfidentialCompute != null) - message.enableConfidentialCompute = Boolean(object.enableConfidentialCompute); - return message; - }; - - /** - * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {google.cloud.backupdr.v1.ConfidentialInstanceConfig} message ConfidentialInstanceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfidentialInstanceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.enableConfidentialCompute != null && message.hasOwnProperty("enableConfidentialCompute")) { - object.enableConfidentialCompute = message.enableConfidentialCompute; - if (options.oneofs) - object._enableConfidentialCompute = "enableConfidentialCompute"; - } - return object; - }; - - /** - * Converts this ConfidentialInstanceConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @instance - * @returns {Object.} JSON object - */ - ConfidentialInstanceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConfidentialInstanceConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConfidentialInstanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ConfidentialInstanceConfig"; - }; - - return ConfidentialInstanceConfig; - })(); - - v1.DisplayDevice = (function() { - - /** - * Properties of a DisplayDevice. - * @memberof google.cloud.backupdr.v1 - * @interface IDisplayDevice - * @property {boolean|null} [enableDisplay] DisplayDevice enableDisplay - */ - - /** - * Constructs a new DisplayDevice. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DisplayDevice. - * @implements IDisplayDevice - * @constructor - * @param {google.cloud.backupdr.v1.IDisplayDevice=} [properties] Properties to set - */ - function DisplayDevice(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DisplayDevice enableDisplay. - * @member {boolean|null|undefined} enableDisplay - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @instance - */ - DisplayDevice.prototype.enableDisplay = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DisplayDevice _enableDisplay. - * @member {"enableDisplay"|undefined} _enableDisplay - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @instance - */ - Object.defineProperty(DisplayDevice.prototype, "_enableDisplay", { - get: $util.oneOfGetter($oneOfFields = ["enableDisplay"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new DisplayDevice instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {google.cloud.backupdr.v1.IDisplayDevice=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice instance - */ - DisplayDevice.create = function create(properties) { - return new DisplayDevice(properties); - }; - - /** - * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {google.cloud.backupdr.v1.IDisplayDevice} message DisplayDevice message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DisplayDevice.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enableDisplay != null && Object.hasOwnProperty.call(message, "enableDisplay")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableDisplay); - return writer; - }; - - /** - * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {google.cloud.backupdr.v1.IDisplayDevice} message DisplayDevice message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DisplayDevice.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DisplayDevice message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DisplayDevice.decode = function 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.backupdr.v1.DisplayDevice(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enableDisplay = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DisplayDevice.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DisplayDevice message. - * @function verify - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DisplayDevice.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.enableDisplay != null && message.hasOwnProperty("enableDisplay")) { - properties._enableDisplay = 1; - if (typeof message.enableDisplay !== "boolean") - return "enableDisplay: boolean expected"; - } - return null; - }; - - /** - * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice - */ - DisplayDevice.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DisplayDevice) - return object; - var message = new $root.google.cloud.backupdr.v1.DisplayDevice(); - if (object.enableDisplay != null) - message.enableDisplay = Boolean(object.enableDisplay); - return message; - }; - - /** - * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {google.cloud.backupdr.v1.DisplayDevice} message DisplayDevice - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DisplayDevice.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.enableDisplay != null && message.hasOwnProperty("enableDisplay")) { - object.enableDisplay = message.enableDisplay; - if (options.oneofs) - object._enableDisplay = "enableDisplay"; - } - return object; - }; - - /** - * Converts this DisplayDevice to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @instance - * @returns {Object.} JSON object - */ - DisplayDevice.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DisplayDevice - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DisplayDevice - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DisplayDevice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DisplayDevice"; - }; - - return DisplayDevice; - })(); - - v1.AcceleratorConfig = (function() { - - /** - * Properties of an AcceleratorConfig. - * @memberof google.cloud.backupdr.v1 - * @interface IAcceleratorConfig - * @property {string|null} [acceleratorType] AcceleratorConfig acceleratorType - * @property {number|null} [acceleratorCount] AcceleratorConfig acceleratorCount - */ - - /** - * Constructs a new AcceleratorConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AcceleratorConfig. - * @implements IAcceleratorConfig - * @constructor - * @param {google.cloud.backupdr.v1.IAcceleratorConfig=} [properties] Properties to set - */ - function AcceleratorConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AcceleratorConfig acceleratorType. - * @member {string|null|undefined} acceleratorType - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @instance - */ - AcceleratorConfig.prototype.acceleratorType = null; - - /** - * AcceleratorConfig acceleratorCount. - * @member {number|null|undefined} acceleratorCount - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @instance - */ - AcceleratorConfig.prototype.acceleratorCount = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AcceleratorConfig _acceleratorType. - * @member {"acceleratorType"|undefined} _acceleratorType - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @instance - */ - Object.defineProperty(AcceleratorConfig.prototype, "_acceleratorType", { - get: $util.oneOfGetter($oneOfFields = ["acceleratorType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AcceleratorConfig _acceleratorCount. - * @member {"acceleratorCount"|undefined} _acceleratorCount - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @instance - */ - Object.defineProperty(AcceleratorConfig.prototype, "_acceleratorCount", { - get: $util.oneOfGetter($oneOfFields = ["acceleratorCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AcceleratorConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {google.cloud.backupdr.v1.IAcceleratorConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig instance - */ - AcceleratorConfig.create = function create(properties) { - return new AcceleratorConfig(properties); - }; - - /** - * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {google.cloud.backupdr.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AcceleratorConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.acceleratorType != null && Object.hasOwnProperty.call(message, "acceleratorType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.acceleratorType); - if (message.acceleratorCount != null && Object.hasOwnProperty.call(message, "acceleratorCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.acceleratorCount); - return writer; - }; - - /** - * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {google.cloud.backupdr.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AcceleratorConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AcceleratorConfig.decode = function 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.backupdr.v1.AcceleratorConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.acceleratorType = reader.string(); - break; - } - case 2: { - message.acceleratorCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AcceleratorConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AcceleratorConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AcceleratorConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) { - properties._acceleratorType = 1; - if (!$util.isString(message.acceleratorType)) - return "acceleratorType: string expected"; - } - if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) { - properties._acceleratorCount = 1; - if (!$util.isInteger(message.acceleratorCount)) - return "acceleratorCount: integer expected"; - } - return null; - }; - - /** - * Creates an AcceleratorConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig - */ - AcceleratorConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AcceleratorConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.AcceleratorConfig(); - if (object.acceleratorType != null) - message.acceleratorType = String(object.acceleratorType); - if (object.acceleratorCount != null) - message.acceleratorCount = object.acceleratorCount | 0; - return message; - }; - - /** - * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {google.cloud.backupdr.v1.AcceleratorConfig} message AcceleratorConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AcceleratorConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) { - object.acceleratorType = message.acceleratorType; - if (options.oneofs) - object._acceleratorType = "acceleratorType"; - } - if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) { - object.acceleratorCount = message.acceleratorCount; - if (options.oneofs) - object._acceleratorCount = "acceleratorCount"; - } - return object; - }; - - /** - * Converts this AcceleratorConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @instance - * @returns {Object.} JSON object - */ - AcceleratorConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AcceleratorConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AcceleratorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AcceleratorConfig"; - }; - - return AcceleratorConfig; - })(); - - v1.CustomerEncryptionKey = (function() { - - /** - * Properties of a CustomerEncryptionKey. - * @memberof google.cloud.backupdr.v1 - * @interface ICustomerEncryptionKey - * @property {string|null} [rawKey] CustomerEncryptionKey rawKey - * @property {string|null} [rsaEncryptedKey] CustomerEncryptionKey rsaEncryptedKey - * @property {string|null} [kmsKeyName] CustomerEncryptionKey kmsKeyName - * @property {string|null} [kmsKeyServiceAccount] CustomerEncryptionKey kmsKeyServiceAccount - */ - - /** - * Constructs a new CustomerEncryptionKey. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CustomerEncryptionKey. - * @implements ICustomerEncryptionKey - * @constructor - * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey=} [properties] Properties to set - */ - function CustomerEncryptionKey(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomerEncryptionKey rawKey. - * @member {string|null|undefined} rawKey - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - CustomerEncryptionKey.prototype.rawKey = null; - - /** - * CustomerEncryptionKey rsaEncryptedKey. - * @member {string|null|undefined} rsaEncryptedKey - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - CustomerEncryptionKey.prototype.rsaEncryptedKey = null; - - /** - * CustomerEncryptionKey kmsKeyName. - * @member {string|null|undefined} kmsKeyName - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - CustomerEncryptionKey.prototype.kmsKeyName = null; - - /** - * CustomerEncryptionKey kmsKeyServiceAccount. - * @member {string|null|undefined} kmsKeyServiceAccount - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - CustomerEncryptionKey.prototype.kmsKeyServiceAccount = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CustomerEncryptionKey key. - * @member {"rawKey"|"rsaEncryptedKey"|"kmsKeyName"|undefined} key - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - Object.defineProperty(CustomerEncryptionKey.prototype, "key", { - get: $util.oneOfGetter($oneOfFields = ["rawKey", "rsaEncryptedKey", "kmsKeyName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * CustomerEncryptionKey _kmsKeyServiceAccount. - * @member {"kmsKeyServiceAccount"|undefined} _kmsKeyServiceAccount - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - Object.defineProperty(CustomerEncryptionKey.prototype, "_kmsKeyServiceAccount", { - get: $util.oneOfGetter($oneOfFields = ["kmsKeyServiceAccount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CustomerEncryptionKey instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey instance - */ - CustomerEncryptionKey.create = function create(properties) { - return new CustomerEncryptionKey(properties); - }; - - /** - * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey} message CustomerEncryptionKey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomerEncryptionKey.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rawKey != null && Object.hasOwnProperty.call(message, "rawKey")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.rawKey); - if (message.rsaEncryptedKey != null && Object.hasOwnProperty.call(message, "rsaEncryptedKey")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.rsaEncryptedKey); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyName); - if (message.kmsKeyServiceAccount != null && Object.hasOwnProperty.call(message, "kmsKeyServiceAccount")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.kmsKeyServiceAccount); - return writer; - }; - - /** - * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey} message CustomerEncryptionKey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomerEncryptionKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomerEncryptionKey message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomerEncryptionKey.decode = function 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.backupdr.v1.CustomerEncryptionKey(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.rawKey = reader.string(); - break; - } - case 2: { - message.rsaEncryptedKey = reader.string(); - break; - } - case 3: { - message.kmsKeyName = reader.string(); - break; - } - case 4: { - message.kmsKeyServiceAccount = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomerEncryptionKey.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomerEncryptionKey message. - * @function verify - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomerEncryptionKey.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.rawKey != null && message.hasOwnProperty("rawKey")) { - properties.key = 1; - if (!$util.isString(message.rawKey)) - return "rawKey: string expected"; - } - if (message.rsaEncryptedKey != null && message.hasOwnProperty("rsaEncryptedKey")) { - if (properties.key === 1) - return "key: multiple values"; - properties.key = 1; - if (!$util.isString(message.rsaEncryptedKey)) - return "rsaEncryptedKey: string expected"; - } - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { - if (properties.key === 1) - return "key: multiple values"; - properties.key = 1; - if (!$util.isString(message.kmsKeyName)) - return "kmsKeyName: string expected"; - } - if (message.kmsKeyServiceAccount != null && message.hasOwnProperty("kmsKeyServiceAccount")) { - properties._kmsKeyServiceAccount = 1; - if (!$util.isString(message.kmsKeyServiceAccount)) - return "kmsKeyServiceAccount: string expected"; - } - return null; - }; - - /** - * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey - */ - CustomerEncryptionKey.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CustomerEncryptionKey) - return object; - var message = new $root.google.cloud.backupdr.v1.CustomerEncryptionKey(); - if (object.rawKey != null) - message.rawKey = String(object.rawKey); - if (object.rsaEncryptedKey != null) - message.rsaEncryptedKey = String(object.rsaEncryptedKey); - if (object.kmsKeyName != null) - message.kmsKeyName = String(object.kmsKeyName); - if (object.kmsKeyServiceAccount != null) - message.kmsKeyServiceAccount = String(object.kmsKeyServiceAccount); - return message; - }; - - /** - * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {google.cloud.backupdr.v1.CustomerEncryptionKey} message CustomerEncryptionKey - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomerEncryptionKey.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.rawKey != null && message.hasOwnProperty("rawKey")) { - object.rawKey = message.rawKey; - if (options.oneofs) - object.key = "rawKey"; - } - if (message.rsaEncryptedKey != null && message.hasOwnProperty("rsaEncryptedKey")) { - object.rsaEncryptedKey = message.rsaEncryptedKey; - if (options.oneofs) - object.key = "rsaEncryptedKey"; - } - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { - object.kmsKeyName = message.kmsKeyName; - if (options.oneofs) - object.key = "kmsKeyName"; - } - if (message.kmsKeyServiceAccount != null && message.hasOwnProperty("kmsKeyServiceAccount")) { - object.kmsKeyServiceAccount = message.kmsKeyServiceAccount; - if (options.oneofs) - object._kmsKeyServiceAccount = "kmsKeyServiceAccount"; - } - return object; - }; - - /** - * Converts this CustomerEncryptionKey to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - * @returns {Object.} JSON object - */ - CustomerEncryptionKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomerEncryptionKey - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomerEncryptionKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CustomerEncryptionKey"; - }; - - return CustomerEncryptionKey; - })(); - - v1.Entry = (function() { - - /** - * Properties of an Entry. - * @memberof google.cloud.backupdr.v1 - * @interface IEntry - * @property {string|null} [key] Entry key - * @property {string|null} [value] Entry value - */ - - /** - * Constructs a new Entry. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an Entry. - * @implements IEntry - * @constructor - * @param {google.cloud.backupdr.v1.IEntry=} [properties] Properties to set - */ - function Entry(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Entry key. - * @member {string|null|undefined} key - * @memberof google.cloud.backupdr.v1.Entry - * @instance - */ - Entry.prototype.key = null; - - /** - * Entry value. - * @member {string|null|undefined} value - * @memberof google.cloud.backupdr.v1.Entry - * @instance - */ - Entry.prototype.value = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Entry _key. - * @member {"key"|undefined} _key - * @memberof google.cloud.backupdr.v1.Entry - * @instance - */ - Object.defineProperty(Entry.prototype, "_key", { - get: $util.oneOfGetter($oneOfFields = ["key"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Entry _value. - * @member {"value"|undefined} _value - * @memberof google.cloud.backupdr.v1.Entry - * @instance - */ - Object.defineProperty(Entry.prototype, "_value", { - get: $util.oneOfGetter($oneOfFields = ["value"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Entry instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {google.cloud.backupdr.v1.IEntry=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Entry} Entry instance - */ - Entry.create = function create(properties) { - return new Entry(properties); - }; - - /** - * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {google.cloud.backupdr.v1.IEntry} message Entry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - return writer; - }; - - /** - * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {google.cloud.backupdr.v1.IEntry} message Entry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Entry message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Entry} Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entry.decode = function 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.backupdr.v1.Entry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.key = reader.string(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Entry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Entry} Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Entry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Entry message. - * @function verify - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Entry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.key != null && message.hasOwnProperty("key")) { - properties._key = 1; - if (!$util.isString(message.key)) - return "key: string expected"; - } - if (message.value != null && message.hasOwnProperty("value")) { - properties._value = 1; - if (!$util.isString(message.value)) - return "value: string expected"; - } - return null; - }; - - /** - * Creates an Entry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Entry} Entry - */ - Entry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Entry) - return object; - var message = new $root.google.cloud.backupdr.v1.Entry(); - if (object.key != null) - message.key = String(object.key); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an Entry message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {google.cloud.backupdr.v1.Entry} message Entry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Entry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.key != null && message.hasOwnProperty("key")) { - object.key = message.key; - if (options.oneofs) - object._key = "key"; - } - if (message.value != null && message.hasOwnProperty("value")) { - object.value = message.value; - if (options.oneofs) - object._value = "value"; - } - return object; - }; - - /** - * Converts this Entry to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Entry - * @instance - * @returns {Object.} JSON object - */ - Entry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Entry - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Entry - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Entry"; - }; - - return Entry; - })(); - - v1.Metadata = (function() { - - /** - * Properties of a Metadata. - * @memberof google.cloud.backupdr.v1 - * @interface IMetadata - * @property {Array.|null} [items] Metadata items - */ - - /** - * Constructs a new Metadata. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a Metadata. - * @implements IMetadata - * @constructor - * @param {google.cloud.backupdr.v1.IMetadata=} [properties] Properties to set - */ - function Metadata(properties) { - this.items = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Metadata items. - * @member {Array.} items - * @memberof google.cloud.backupdr.v1.Metadata - * @instance - */ - Metadata.prototype.items = $util.emptyArray; - - /** - * Creates a new Metadata instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {google.cloud.backupdr.v1.IMetadata=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Metadata} Metadata instance - */ - Metadata.create = function create(properties) { - return new Metadata(properties); - }; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {google.cloud.backupdr.v1.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.items != null && message.items.length) - for (var i = 0; i < message.items.length; ++i) - $root.google.cloud.backupdr.v1.Entry.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {google.cloud.backupdr.v1.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decode = function 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.backupdr.v1.Metadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.items && message.items.length)) - message.items = []; - message.items.push($root.google.cloud.backupdr.v1.Entry.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Metadata message. - * @function verify - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.items != null && message.hasOwnProperty("items")) { - if (!Array.isArray(message.items)) - return "items: array expected"; - for (var i = 0; i < message.items.length; ++i) { - var error = $root.google.cloud.backupdr.v1.Entry.verify(message.items[i]); - if (error) - return "items." + error; - } - } - return null; - }; - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Metadata} Metadata - */ - Metadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Metadata) - return object; - var message = new $root.google.cloud.backupdr.v1.Metadata(); - if (object.items) { - if (!Array.isArray(object.items)) - throw TypeError(".google.cloud.backupdr.v1.Metadata.items: array expected"); - message.items = []; - for (var i = 0; i < object.items.length; ++i) { - if (typeof object.items[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.Metadata.items: object expected"); - message.items[i] = $root.google.cloud.backupdr.v1.Entry.fromObject(object.items[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {google.cloud.backupdr.v1.Metadata} message Metadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.items = []; - if (message.items && message.items.length) { - object.items = []; - for (var j = 0; j < message.items.length; ++j) - object.items[j] = $root.google.cloud.backupdr.v1.Entry.toObject(message.items[j], options); - } - return object; - }; - - /** - * Converts this Metadata to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Metadata - * @instance - * @returns {Object.} JSON object - */ - Metadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Metadata - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Metadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Metadata"; - }; - - return Metadata; - })(); - - v1.NetworkInterface = (function() { - - /** - * Properties of a NetworkInterface. - * @memberof google.cloud.backupdr.v1 - * @interface INetworkInterface - * @property {string|null} [network] NetworkInterface network - * @property {string|null} [subnetwork] NetworkInterface subnetwork - * @property {string|null} [ipAddress] NetworkInterface ipAddress - * @property {string|null} [ipv6Address] NetworkInterface ipv6Address - * @property {number|null} [internalIpv6PrefixLength] NetworkInterface internalIpv6PrefixLength - * @property {string|null} [name] NetworkInterface name - * @property {Array.|null} [accessConfigs] NetworkInterface accessConfigs - * @property {Array.|null} [ipv6AccessConfigs] NetworkInterface ipv6AccessConfigs - * @property {Array.|null} [aliasIpRanges] NetworkInterface aliasIpRanges - * @property {google.cloud.backupdr.v1.NetworkInterface.StackType|null} [stackType] NetworkInterface stackType - * @property {google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null} [ipv6AccessType] NetworkInterface ipv6AccessType - * @property {number|null} [queueCount] NetworkInterface queueCount - * @property {google.cloud.backupdr.v1.NetworkInterface.NicType|null} [nicType] NetworkInterface nicType - * @property {string|null} [networkAttachment] NetworkInterface networkAttachment - */ - - /** - * Constructs a new NetworkInterface. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a NetworkInterface. - * @implements INetworkInterface - * @constructor - * @param {google.cloud.backupdr.v1.INetworkInterface=} [properties] Properties to set - */ - function NetworkInterface(properties) { - this.accessConfigs = []; - this.ipv6AccessConfigs = []; - this.aliasIpRanges = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkInterface network. - * @member {string|null|undefined} network - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.network = null; - - /** - * NetworkInterface subnetwork. - * @member {string|null|undefined} subnetwork - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.subnetwork = null; - - /** - * NetworkInterface ipAddress. - * @member {string|null|undefined} ipAddress - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.ipAddress = null; - - /** - * NetworkInterface ipv6Address. - * @member {string|null|undefined} ipv6Address - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.ipv6Address = null; - - /** - * NetworkInterface internalIpv6PrefixLength. - * @member {number|null|undefined} internalIpv6PrefixLength - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.internalIpv6PrefixLength = null; - - /** - * NetworkInterface name. - * @member {string|null|undefined} name - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.name = null; - - /** - * NetworkInterface accessConfigs. - * @member {Array.} accessConfigs - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.accessConfigs = $util.emptyArray; - - /** - * NetworkInterface ipv6AccessConfigs. - * @member {Array.} ipv6AccessConfigs - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.ipv6AccessConfigs = $util.emptyArray; - - /** - * NetworkInterface aliasIpRanges. - * @member {Array.} aliasIpRanges - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.aliasIpRanges = $util.emptyArray; - - /** - * NetworkInterface stackType. - * @member {google.cloud.backupdr.v1.NetworkInterface.StackType|null|undefined} stackType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.stackType = null; - - /** - * NetworkInterface ipv6AccessType. - * @member {google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null|undefined} ipv6AccessType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.ipv6AccessType = null; - - /** - * NetworkInterface queueCount. - * @member {number|null|undefined} queueCount - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.queueCount = null; - - /** - * NetworkInterface nicType. - * @member {google.cloud.backupdr.v1.NetworkInterface.NicType|null|undefined} nicType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.nicType = null; - - /** - * NetworkInterface networkAttachment. - * @member {string|null|undefined} networkAttachment - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.networkAttachment = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NetworkInterface _network. - * @member {"network"|undefined} _network - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_network", { - get: $util.oneOfGetter($oneOfFields = ["network"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _subnetwork. - * @member {"subnetwork"|undefined} _subnetwork - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_subnetwork", { - get: $util.oneOfGetter($oneOfFields = ["subnetwork"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _ipAddress. - * @member {"ipAddress"|undefined} _ipAddress - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_ipAddress", { - get: $util.oneOfGetter($oneOfFields = ["ipAddress"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _ipv6Address. - * @member {"ipv6Address"|undefined} _ipv6Address - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_ipv6Address", { - get: $util.oneOfGetter($oneOfFields = ["ipv6Address"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _internalIpv6PrefixLength. - * @member {"internalIpv6PrefixLength"|undefined} _internalIpv6PrefixLength - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_internalIpv6PrefixLength", { - get: $util.oneOfGetter($oneOfFields = ["internalIpv6PrefixLength"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _name. - * @member {"name"|undefined} _name - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _stackType. - * @member {"stackType"|undefined} _stackType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_stackType", { - get: $util.oneOfGetter($oneOfFields = ["stackType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _ipv6AccessType. - * @member {"ipv6AccessType"|undefined} _ipv6AccessType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_ipv6AccessType", { - get: $util.oneOfGetter($oneOfFields = ["ipv6AccessType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _queueCount. - * @member {"queueCount"|undefined} _queueCount - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_queueCount", { - get: $util.oneOfGetter($oneOfFields = ["queueCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _nicType. - * @member {"nicType"|undefined} _nicType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_nicType", { - get: $util.oneOfGetter($oneOfFields = ["nicType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _networkAttachment. - * @member {"networkAttachment"|undefined} _networkAttachment - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_networkAttachment", { - get: $util.oneOfGetter($oneOfFields = ["networkAttachment"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NetworkInterface instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {google.cloud.backupdr.v1.INetworkInterface=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface instance - */ - NetworkInterface.create = function create(properties) { - return new NetworkInterface(properties); - }; - - /** - * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {google.cloud.backupdr.v1.INetworkInterface} message NetworkInterface message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkInterface.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); - if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetwork); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); - if (message.ipv6Address != null && Object.hasOwnProperty.call(message, "ipv6Address")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipv6Address); - if (message.internalIpv6PrefixLength != null && Object.hasOwnProperty.call(message, "internalIpv6PrefixLength")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.internalIpv6PrefixLength); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - if (message.accessConfigs != null && message.accessConfigs.length) - for (var i = 0; i < message.accessConfigs.length; ++i) - $root.google.cloud.backupdr.v1.AccessConfig.encode(message.accessConfigs[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.ipv6AccessConfigs != null && message.ipv6AccessConfigs.length) - for (var i = 0; i < message.ipv6AccessConfigs.length; ++i) - $root.google.cloud.backupdr.v1.AccessConfig.encode(message.ipv6AccessConfigs[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.aliasIpRanges != null && message.aliasIpRanges.length) - for (var i = 0; i < message.aliasIpRanges.length; ++i) - $root.google.cloud.backupdr.v1.AliasIpRange.encode(message.aliasIpRanges[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.stackType != null && Object.hasOwnProperty.call(message, "stackType")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.stackType); - if (message.ipv6AccessType != null && Object.hasOwnProperty.call(message, "ipv6AccessType")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.ipv6AccessType); - if (message.queueCount != null && Object.hasOwnProperty.call(message, "queueCount")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.queueCount); - if (message.nicType != null && Object.hasOwnProperty.call(message, "nicType")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.nicType); - if (message.networkAttachment != null && Object.hasOwnProperty.call(message, "networkAttachment")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.networkAttachment); - return writer; - }; - - /** - * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {google.cloud.backupdr.v1.INetworkInterface} message NetworkInterface message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkInterface.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkInterface message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkInterface.decode = function 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.backupdr.v1.NetworkInterface(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.network = reader.string(); - break; - } - case 2: { - message.subnetwork = reader.string(); - break; - } - case 3: { - message.ipAddress = reader.string(); - break; - } - case 4: { - message.ipv6Address = reader.string(); - break; - } - case 5: { - message.internalIpv6PrefixLength = reader.int32(); - break; - } - case 6: { - message.name = reader.string(); - break; - } - case 7: { - if (!(message.accessConfigs && message.accessConfigs.length)) - message.accessConfigs = []; - message.accessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.ipv6AccessConfigs && message.ipv6AccessConfigs.length)) - message.ipv6AccessConfigs = []; - message.ipv6AccessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader, reader.uint32())); - break; - } - case 9: { - if (!(message.aliasIpRanges && message.aliasIpRanges.length)) - message.aliasIpRanges = []; - message.aliasIpRanges.push($root.google.cloud.backupdr.v1.AliasIpRange.decode(reader, reader.uint32())); - break; - } - case 10: { - message.stackType = reader.int32(); - break; - } - case 11: { - message.ipv6AccessType = reader.int32(); - break; - } - case 12: { - message.queueCount = reader.int32(); - break; - } - case 13: { - message.nicType = reader.int32(); - break; - } - case 14: { - message.networkAttachment = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkInterface.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkInterface message. - * @function verify - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkInterface.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.network != null && message.hasOwnProperty("network")) { - properties._network = 1; - if (!$util.isString(message.network)) - return "network: string expected"; - } - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { - properties._subnetwork = 1; - if (!$util.isString(message.subnetwork)) - return "subnetwork: string expected"; - } - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) { - properties._ipAddress = 1; - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - } - if (message.ipv6Address != null && message.hasOwnProperty("ipv6Address")) { - properties._ipv6Address = 1; - if (!$util.isString(message.ipv6Address)) - return "ipv6Address: string expected"; - } - if (message.internalIpv6PrefixLength != null && message.hasOwnProperty("internalIpv6PrefixLength")) { - properties._internalIpv6PrefixLength = 1; - if (!$util.isInteger(message.internalIpv6PrefixLength)) - return "internalIpv6PrefixLength: integer expected"; - } - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.accessConfigs != null && message.hasOwnProperty("accessConfigs")) { - if (!Array.isArray(message.accessConfigs)) - return "accessConfigs: array expected"; - for (var i = 0; i < message.accessConfigs.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AccessConfig.verify(message.accessConfigs[i]); - if (error) - return "accessConfigs." + error; - } - } - if (message.ipv6AccessConfigs != null && message.hasOwnProperty("ipv6AccessConfigs")) { - if (!Array.isArray(message.ipv6AccessConfigs)) - return "ipv6AccessConfigs: array expected"; - for (var i = 0; i < message.ipv6AccessConfigs.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AccessConfig.verify(message.ipv6AccessConfigs[i]); - if (error) - return "ipv6AccessConfigs." + error; - } - } - if (message.aliasIpRanges != null && message.hasOwnProperty("aliasIpRanges")) { - if (!Array.isArray(message.aliasIpRanges)) - return "aliasIpRanges: array expected"; - for (var i = 0; i < message.aliasIpRanges.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AliasIpRange.verify(message.aliasIpRanges[i]); - if (error) - return "aliasIpRanges." + error; - } - } - if (message.stackType != null && message.hasOwnProperty("stackType")) { - properties._stackType = 1; - switch (message.stackType) { - default: - return "stackType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { - properties._ipv6AccessType = 1; - switch (message.ipv6AccessType) { - default: - return "ipv6AccessType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.queueCount != null && message.hasOwnProperty("queueCount")) { - properties._queueCount = 1; - if (!$util.isInteger(message.queueCount)) - return "queueCount: integer expected"; - } - if (message.nicType != null && message.hasOwnProperty("nicType")) { - properties._nicType = 1; - switch (message.nicType) { - default: - return "nicType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) { - properties._networkAttachment = 1; - if (!$util.isString(message.networkAttachment)) - return "networkAttachment: string expected"; - } - return null; - }; - - /** - * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface - */ - NetworkInterface.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.NetworkInterface) - return object; - var message = new $root.google.cloud.backupdr.v1.NetworkInterface(); - if (object.network != null) - message.network = String(object.network); - if (object.subnetwork != null) - message.subnetwork = String(object.subnetwork); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.ipv6Address != null) - message.ipv6Address = String(object.ipv6Address); - if (object.internalIpv6PrefixLength != null) - message.internalIpv6PrefixLength = object.internalIpv6PrefixLength | 0; - if (object.name != null) - message.name = String(object.name); - if (object.accessConfigs) { - if (!Array.isArray(object.accessConfigs)) - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: array expected"); - message.accessConfigs = []; - for (var i = 0; i < object.accessConfigs.length; ++i) { - if (typeof object.accessConfigs[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: object expected"); - message.accessConfigs[i] = $root.google.cloud.backupdr.v1.AccessConfig.fromObject(object.accessConfigs[i]); - } - } - if (object.ipv6AccessConfigs) { - if (!Array.isArray(object.ipv6AccessConfigs)) - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.ipv6AccessConfigs: array expected"); - message.ipv6AccessConfigs = []; - for (var i = 0; i < object.ipv6AccessConfigs.length; ++i) { - if (typeof object.ipv6AccessConfigs[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.ipv6AccessConfigs: object expected"); - message.ipv6AccessConfigs[i] = $root.google.cloud.backupdr.v1.AccessConfig.fromObject(object.ipv6AccessConfigs[i]); - } - } - if (object.aliasIpRanges) { - if (!Array.isArray(object.aliasIpRanges)) - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.aliasIpRanges: array expected"); - message.aliasIpRanges = []; - for (var i = 0; i < object.aliasIpRanges.length; ++i) { - if (typeof object.aliasIpRanges[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.aliasIpRanges: object expected"); - message.aliasIpRanges[i] = $root.google.cloud.backupdr.v1.AliasIpRange.fromObject(object.aliasIpRanges[i]); - } - } - switch (object.stackType) { - default: - if (typeof object.stackType === "number") { - message.stackType = object.stackType; - break; - } - break; - case "STACK_TYPE_UNSPECIFIED": - case 0: - message.stackType = 0; - break; - case "IPV4_ONLY": - case 1: - message.stackType = 1; - break; - case "IPV4_IPV6": - case 2: - message.stackType = 2; - break; - } - switch (object.ipv6AccessType) { - default: - if (typeof object.ipv6AccessType === "number") { - message.ipv6AccessType = object.ipv6AccessType; - break; - } - break; - case "UNSPECIFIED_IPV6_ACCESS_TYPE": - case 0: - message.ipv6AccessType = 0; - break; - case "INTERNAL": - case 1: - message.ipv6AccessType = 1; - break; - case "EXTERNAL": - case 2: - message.ipv6AccessType = 2; - break; - } - if (object.queueCount != null) - message.queueCount = object.queueCount | 0; - switch (object.nicType) { - default: - if (typeof object.nicType === "number") { - message.nicType = object.nicType; - break; - } - break; - case "NIC_TYPE_UNSPECIFIED": - case 0: - message.nicType = 0; - break; - case "VIRTIO_NET": - case 1: - message.nicType = 1; - break; - case "GVNIC": - case 2: - message.nicType = 2; - break; - } - if (object.networkAttachment != null) - message.networkAttachment = String(object.networkAttachment); - return message; - }; - - /** - * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {google.cloud.backupdr.v1.NetworkInterface} message NetworkInterface - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkInterface.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.accessConfigs = []; - object.ipv6AccessConfigs = []; - object.aliasIpRanges = []; - } - if (message.network != null && message.hasOwnProperty("network")) { - object.network = message.network; - if (options.oneofs) - object._network = "network"; - } - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { - object.subnetwork = message.subnetwork; - if (options.oneofs) - object._subnetwork = "subnetwork"; - } - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) { - object.ipAddress = message.ipAddress; - if (options.oneofs) - object._ipAddress = "ipAddress"; - } - if (message.ipv6Address != null && message.hasOwnProperty("ipv6Address")) { - object.ipv6Address = message.ipv6Address; - if (options.oneofs) - object._ipv6Address = "ipv6Address"; - } - if (message.internalIpv6PrefixLength != null && message.hasOwnProperty("internalIpv6PrefixLength")) { - object.internalIpv6PrefixLength = message.internalIpv6PrefixLength; - if (options.oneofs) - object._internalIpv6PrefixLength = "internalIpv6PrefixLength"; - } - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.accessConfigs && message.accessConfigs.length) { - object.accessConfigs = []; - for (var j = 0; j < message.accessConfigs.length; ++j) - object.accessConfigs[j] = $root.google.cloud.backupdr.v1.AccessConfig.toObject(message.accessConfigs[j], options); - } - if (message.ipv6AccessConfigs && message.ipv6AccessConfigs.length) { - object.ipv6AccessConfigs = []; - for (var j = 0; j < message.ipv6AccessConfigs.length; ++j) - object.ipv6AccessConfigs[j] = $root.google.cloud.backupdr.v1.AccessConfig.toObject(message.ipv6AccessConfigs[j], options); - } - if (message.aliasIpRanges && message.aliasIpRanges.length) { - object.aliasIpRanges = []; - for (var j = 0; j < message.aliasIpRanges.length; ++j) - object.aliasIpRanges[j] = $root.google.cloud.backupdr.v1.AliasIpRange.toObject(message.aliasIpRanges[j], options); - } - if (message.stackType != null && message.hasOwnProperty("stackType")) { - object.stackType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.StackType[message.stackType] === undefined ? message.stackType : $root.google.cloud.backupdr.v1.NetworkInterface.StackType[message.stackType] : message.stackType; - if (options.oneofs) - object._stackType = "stackType"; - } - if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { - object.ipv6AccessType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType[message.ipv6AccessType] === undefined ? message.ipv6AccessType : $root.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType[message.ipv6AccessType] : message.ipv6AccessType; - if (options.oneofs) - object._ipv6AccessType = "ipv6AccessType"; - } - if (message.queueCount != null && message.hasOwnProperty("queueCount")) { - object.queueCount = message.queueCount; - if (options.oneofs) - object._queueCount = "queueCount"; - } - if (message.nicType != null && message.hasOwnProperty("nicType")) { - object.nicType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.NicType[message.nicType] === undefined ? message.nicType : $root.google.cloud.backupdr.v1.NetworkInterface.NicType[message.nicType] : message.nicType; - if (options.oneofs) - object._nicType = "nicType"; - } - if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) { - object.networkAttachment = message.networkAttachment; - if (options.oneofs) - object._networkAttachment = "networkAttachment"; - } - return object; - }; - - /** - * Converts this NetworkInterface to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - * @returns {Object.} JSON object - */ - NetworkInterface.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkInterface - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkInterface.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkInterface"; - }; - - /** - * StackType enum. - * @name google.cloud.backupdr.v1.NetworkInterface.StackType - * @enum {number} - * @property {number} STACK_TYPE_UNSPECIFIED=0 STACK_TYPE_UNSPECIFIED value - * @property {number} IPV4_ONLY=1 IPV4_ONLY value - * @property {number} IPV4_IPV6=2 IPV4_IPV6 value - */ - NetworkInterface.StackType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STACK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IPV4_ONLY"] = 1; - values[valuesById[2] = "IPV4_IPV6"] = 2; - return values; - })(); - - /** - * Ipv6AccessType enum. - * @name google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType - * @enum {number} - * @property {number} UNSPECIFIED_IPV6_ACCESS_TYPE=0 UNSPECIFIED_IPV6_ACCESS_TYPE value - * @property {number} INTERNAL=1 INTERNAL value - * @property {number} EXTERNAL=2 EXTERNAL value - */ - NetworkInterface.Ipv6AccessType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED_IPV6_ACCESS_TYPE"] = 0; - values[valuesById[1] = "INTERNAL"] = 1; - values[valuesById[2] = "EXTERNAL"] = 2; - return values; - })(); - - /** - * NicType enum. - * @name google.cloud.backupdr.v1.NetworkInterface.NicType - * @enum {number} - * @property {number} NIC_TYPE_UNSPECIFIED=0 NIC_TYPE_UNSPECIFIED value - * @property {number} VIRTIO_NET=1 VIRTIO_NET value - * @property {number} GVNIC=2 GVNIC value - */ - NetworkInterface.NicType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NIC_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "VIRTIO_NET"] = 1; - values[valuesById[2] = "GVNIC"] = 2; - return values; - })(); - - return NetworkInterface; - })(); - - v1.NetworkPerformanceConfig = (function() { - - /** - * Properties of a NetworkPerformanceConfig. - * @memberof google.cloud.backupdr.v1 - * @interface INetworkPerformanceConfig - * @property {google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null} [totalEgressBandwidthTier] NetworkPerformanceConfig totalEgressBandwidthTier - */ - - /** - * Constructs a new NetworkPerformanceConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a NetworkPerformanceConfig. - * @implements INetworkPerformanceConfig - * @constructor - * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig=} [properties] Properties to set - */ - function NetworkPerformanceConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkPerformanceConfig totalEgressBandwidthTier. - * @member {google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null|undefined} totalEgressBandwidthTier - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @instance - */ - NetworkPerformanceConfig.prototype.totalEgressBandwidthTier = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NetworkPerformanceConfig _totalEgressBandwidthTier. - * @member {"totalEgressBandwidthTier"|undefined} _totalEgressBandwidthTier - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @instance - */ - Object.defineProperty(NetworkPerformanceConfig.prototype, "_totalEgressBandwidthTier", { - get: $util.oneOfGetter($oneOfFields = ["totalEgressBandwidthTier"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NetworkPerformanceConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig instance - */ - NetworkPerformanceConfig.create = function create(properties) { - return new NetworkPerformanceConfig(properties); - }; - - /** - * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkPerformanceConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.totalEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "totalEgressBandwidthTier")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalEgressBandwidthTier); - return writer; - }; - - /** - * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkPerformanceConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkPerformanceConfig.decode = function 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.backupdr.v1.NetworkPerformanceConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.totalEgressBandwidthTier = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkPerformanceConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkPerformanceConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkPerformanceConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { - properties._totalEgressBandwidthTier = 1; - switch (message.totalEgressBandwidthTier) { - default: - return "totalEgressBandwidthTier: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig - */ - NetworkPerformanceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.NetworkPerformanceConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.NetworkPerformanceConfig(); - switch (object.totalEgressBandwidthTier) { - default: - if (typeof object.totalEgressBandwidthTier === "number") { - message.totalEgressBandwidthTier = object.totalEgressBandwidthTier; - break; - } - break; - case "TIER_UNSPECIFIED": - case 0: - message.totalEgressBandwidthTier = 0; - break; - case "DEFAULT": - case 1: - message.totalEgressBandwidthTier = 1; - break; - case "TIER_1": - case 2: - message.totalEgressBandwidthTier = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {google.cloud.backupdr.v1.NetworkPerformanceConfig} message NetworkPerformanceConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkPerformanceConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { - object.totalEgressBandwidthTier = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] === undefined ? message.totalEgressBandwidthTier : $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] : message.totalEgressBandwidthTier; - if (options.oneofs) - object._totalEgressBandwidthTier = "totalEgressBandwidthTier"; - } - return object; - }; - - /** - * Converts this NetworkPerformanceConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @instance - * @returns {Object.} JSON object - */ - NetworkPerformanceConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkPerformanceConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkPerformanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkPerformanceConfig"; - }; - - /** - * Tier enum. - * @name google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier - * @enum {number} - * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value - * @property {number} DEFAULT=1 DEFAULT value - * @property {number} TIER_1=2 TIER_1 value - */ - NetworkPerformanceConfig.Tier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEFAULT"] = 1; - values[valuesById[2] = "TIER_1"] = 2; - return values; - })(); - - return NetworkPerformanceConfig; - })(); - - v1.AccessConfig = (function() { - - /** - * Properties of an AccessConfig. - * @memberof google.cloud.backupdr.v1 - * @interface IAccessConfig - * @property {google.cloud.backupdr.v1.AccessConfig.AccessType|null} [type] AccessConfig type - * @property {string|null} [name] AccessConfig name - * @property {string|null} [externalIp] AccessConfig externalIp - * @property {string|null} [externalIpv6] AccessConfig externalIpv6 - * @property {number|null} [externalIpv6PrefixLength] AccessConfig externalIpv6PrefixLength - * @property {boolean|null} [setPublicPtr] AccessConfig setPublicPtr - * @property {string|null} [publicPtrDomainName] AccessConfig publicPtrDomainName - * @property {google.cloud.backupdr.v1.AccessConfig.NetworkTier|null} [networkTier] AccessConfig networkTier - */ - - /** - * Constructs a new AccessConfig. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AccessConfig. - * @implements IAccessConfig - * @constructor - * @param {google.cloud.backupdr.v1.IAccessConfig=} [properties] Properties to set - */ - function AccessConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AccessConfig type. - * @member {google.cloud.backupdr.v1.AccessConfig.AccessType|null|undefined} type - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.type = null; - - /** - * AccessConfig name. - * @member {string|null|undefined} name - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.name = null; - - /** - * AccessConfig externalIp. - * @member {string|null|undefined} externalIp - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.externalIp = null; - - /** - * AccessConfig externalIpv6. - * @member {string|null|undefined} externalIpv6 - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.externalIpv6 = null; - - /** - * AccessConfig externalIpv6PrefixLength. - * @member {number|null|undefined} externalIpv6PrefixLength - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.externalIpv6PrefixLength = null; - - /** - * AccessConfig setPublicPtr. - * @member {boolean|null|undefined} setPublicPtr - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.setPublicPtr = null; - - /** - * AccessConfig publicPtrDomainName. - * @member {string|null|undefined} publicPtrDomainName - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.publicPtrDomainName = null; - - /** - * AccessConfig networkTier. - * @member {google.cloud.backupdr.v1.AccessConfig.NetworkTier|null|undefined} networkTier - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - AccessConfig.prototype.networkTier = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AccessConfig _type. - * @member {"type"|undefined} _type - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_type", { - get: $util.oneOfGetter($oneOfFields = ["type"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _name. - * @member {"name"|undefined} _name - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _externalIp. - * @member {"externalIp"|undefined} _externalIp - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_externalIp", { - get: $util.oneOfGetter($oneOfFields = ["externalIp"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _externalIpv6. - * @member {"externalIpv6"|undefined} _externalIpv6 - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_externalIpv6", { - get: $util.oneOfGetter($oneOfFields = ["externalIpv6"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _externalIpv6PrefixLength. - * @member {"externalIpv6PrefixLength"|undefined} _externalIpv6PrefixLength - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_externalIpv6PrefixLength", { - get: $util.oneOfGetter($oneOfFields = ["externalIpv6PrefixLength"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _setPublicPtr. - * @member {"setPublicPtr"|undefined} _setPublicPtr - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_setPublicPtr", { - get: $util.oneOfGetter($oneOfFields = ["setPublicPtr"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _publicPtrDomainName. - * @member {"publicPtrDomainName"|undefined} _publicPtrDomainName - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_publicPtrDomainName", { - get: $util.oneOfGetter($oneOfFields = ["publicPtrDomainName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AccessConfig _networkTier. - * @member {"networkTier"|undefined} _networkTier - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - */ - Object.defineProperty(AccessConfig.prototype, "_networkTier", { - get: $util.oneOfGetter($oneOfFields = ["networkTier"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AccessConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {google.cloud.backupdr.v1.IAccessConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig instance - */ - AccessConfig.create = function create(properties) { - return new AccessConfig(properties); - }; - - /** - * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {google.cloud.backupdr.v1.IAccessConfig} message AccessConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AccessConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.externalIp); - if (message.externalIpv6 != null && Object.hasOwnProperty.call(message, "externalIpv6")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.externalIpv6); - if (message.externalIpv6PrefixLength != null && Object.hasOwnProperty.call(message, "externalIpv6PrefixLength")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.externalIpv6PrefixLength); - if (message.setPublicPtr != null && Object.hasOwnProperty.call(message, "setPublicPtr")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.setPublicPtr); - if (message.publicPtrDomainName != null && Object.hasOwnProperty.call(message, "publicPtrDomainName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.publicPtrDomainName); - if (message.networkTier != null && Object.hasOwnProperty.call(message, "networkTier")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.networkTier); - return writer; - }; - - /** - * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {google.cloud.backupdr.v1.IAccessConfig} message AccessConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AccessConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AccessConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AccessConfig.decode = function 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.backupdr.v1.AccessConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - message.externalIp = reader.string(); - break; - } - case 4: { - message.externalIpv6 = reader.string(); - break; - } - case 5: { - message.externalIpv6PrefixLength = reader.int32(); - break; - } - case 6: { - message.setPublicPtr = reader.bool(); - break; - } - case 7: { - message.publicPtrDomainName = reader.string(); - break; - } - case 8: { - message.networkTier = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AccessConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AccessConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AccessConfig message. - * @function verify - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AccessConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.type != null && message.hasOwnProperty("type")) { - properties._type = 1; - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.externalIp != null && message.hasOwnProperty("externalIp")) { - properties._externalIp = 1; - if (!$util.isString(message.externalIp)) - return "externalIp: string expected"; - } - if (message.externalIpv6 != null && message.hasOwnProperty("externalIpv6")) { - properties._externalIpv6 = 1; - if (!$util.isString(message.externalIpv6)) - return "externalIpv6: string expected"; - } - if (message.externalIpv6PrefixLength != null && message.hasOwnProperty("externalIpv6PrefixLength")) { - properties._externalIpv6PrefixLength = 1; - if (!$util.isInteger(message.externalIpv6PrefixLength)) - return "externalIpv6PrefixLength: integer expected"; - } - if (message.setPublicPtr != null && message.hasOwnProperty("setPublicPtr")) { - properties._setPublicPtr = 1; - if (typeof message.setPublicPtr !== "boolean") - return "setPublicPtr: boolean expected"; - } - if (message.publicPtrDomainName != null && message.hasOwnProperty("publicPtrDomainName")) { - properties._publicPtrDomainName = 1; - if (!$util.isString(message.publicPtrDomainName)) - return "publicPtrDomainName: string expected"; - } - if (message.networkTier != null && message.hasOwnProperty("networkTier")) { - properties._networkTier = 1; - switch (message.networkTier) { - default: - return "networkTier: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates an AccessConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig - */ - AccessConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AccessConfig) - return object; - var message = new $root.google.cloud.backupdr.v1.AccessConfig(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "ACCESS_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "ONE_TO_ONE_NAT": - case 1: - message.type = 1; - break; - case "DIRECT_IPV6": - case 2: - message.type = 2; - break; - } - if (object.name != null) - message.name = String(object.name); - if (object.externalIp != null) - message.externalIp = String(object.externalIp); - if (object.externalIpv6 != null) - message.externalIpv6 = String(object.externalIpv6); - if (object.externalIpv6PrefixLength != null) - message.externalIpv6PrefixLength = object.externalIpv6PrefixLength | 0; - if (object.setPublicPtr != null) - message.setPublicPtr = Boolean(object.setPublicPtr); - if (object.publicPtrDomainName != null) - message.publicPtrDomainName = String(object.publicPtrDomainName); - switch (object.networkTier) { - default: - if (typeof object.networkTier === "number") { - message.networkTier = object.networkTier; - break; - } - break; - case "NETWORK_TIER_UNSPECIFIED": - case 0: - message.networkTier = 0; - break; - case "PREMIUM": - case 1: - message.networkTier = 1; - break; - case "STANDARD": - case 2: - message.networkTier = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {google.cloud.backupdr.v1.AccessConfig} message AccessConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AccessConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.type != null && message.hasOwnProperty("type")) { - object.type = options.enums === String ? $root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type] : message.type; - if (options.oneofs) - object._type = "type"; - } - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.externalIp != null && message.hasOwnProperty("externalIp")) { - object.externalIp = message.externalIp; - if (options.oneofs) - object._externalIp = "externalIp"; - } - if (message.externalIpv6 != null && message.hasOwnProperty("externalIpv6")) { - object.externalIpv6 = message.externalIpv6; - if (options.oneofs) - object._externalIpv6 = "externalIpv6"; - } - if (message.externalIpv6PrefixLength != null && message.hasOwnProperty("externalIpv6PrefixLength")) { - object.externalIpv6PrefixLength = message.externalIpv6PrefixLength; - if (options.oneofs) - object._externalIpv6PrefixLength = "externalIpv6PrefixLength"; - } - if (message.setPublicPtr != null && message.hasOwnProperty("setPublicPtr")) { - object.setPublicPtr = message.setPublicPtr; - if (options.oneofs) - object._setPublicPtr = "setPublicPtr"; - } - if (message.publicPtrDomainName != null && message.hasOwnProperty("publicPtrDomainName")) { - object.publicPtrDomainName = message.publicPtrDomainName; - if (options.oneofs) - object._publicPtrDomainName = "publicPtrDomainName"; - } - if (message.networkTier != null && message.hasOwnProperty("networkTier")) { - object.networkTier = options.enums === String ? $root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier] === undefined ? message.networkTier : $root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier] : message.networkTier; - if (options.oneofs) - object._networkTier = "networkTier"; - } - return object; - }; - - /** - * Converts this AccessConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - * @returns {Object.} JSON object - */ - AccessConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AccessConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AccessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AccessConfig"; - }; - - /** - * AccessType enum. - * @name google.cloud.backupdr.v1.AccessConfig.AccessType - * @enum {number} - * @property {number} ACCESS_TYPE_UNSPECIFIED=0 ACCESS_TYPE_UNSPECIFIED value - * @property {number} ONE_TO_ONE_NAT=1 ONE_TO_ONE_NAT value - * @property {number} DIRECT_IPV6=2 DIRECT_IPV6 value - */ - AccessConfig.AccessType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACCESS_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ONE_TO_ONE_NAT"] = 1; - values[valuesById[2] = "DIRECT_IPV6"] = 2; - return values; - })(); - - /** - * NetworkTier enum. - * @name google.cloud.backupdr.v1.AccessConfig.NetworkTier - * @enum {number} - * @property {number} NETWORK_TIER_UNSPECIFIED=0 NETWORK_TIER_UNSPECIFIED value - * @property {number} PREMIUM=1 PREMIUM value - * @property {number} STANDARD=2 STANDARD value - */ - AccessConfig.NetworkTier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NETWORK_TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "PREMIUM"] = 1; - values[valuesById[2] = "STANDARD"] = 2; - return values; - })(); - - return AccessConfig; - })(); - - v1.AliasIpRange = (function() { - - /** - * Properties of an AliasIpRange. - * @memberof google.cloud.backupdr.v1 - * @interface IAliasIpRange - * @property {string|null} [ipCidrRange] AliasIpRange ipCidrRange - * @property {string|null} [subnetworkRangeName] AliasIpRange subnetworkRangeName - */ - - /** - * Constructs a new AliasIpRange. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AliasIpRange. - * @implements IAliasIpRange - * @constructor - * @param {google.cloud.backupdr.v1.IAliasIpRange=} [properties] Properties to set - */ - function AliasIpRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AliasIpRange ipCidrRange. - * @member {string|null|undefined} ipCidrRange - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - */ - AliasIpRange.prototype.ipCidrRange = null; - - /** - * AliasIpRange subnetworkRangeName. - * @member {string|null|undefined} subnetworkRangeName - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - */ - AliasIpRange.prototype.subnetworkRangeName = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AliasIpRange _ipCidrRange. - * @member {"ipCidrRange"|undefined} _ipCidrRange - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - */ - Object.defineProperty(AliasIpRange.prototype, "_ipCidrRange", { - get: $util.oneOfGetter($oneOfFields = ["ipCidrRange"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AliasIpRange _subnetworkRangeName. - * @member {"subnetworkRangeName"|undefined} _subnetworkRangeName - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - */ - Object.defineProperty(AliasIpRange.prototype, "_subnetworkRangeName", { - get: $util.oneOfGetter($oneOfFields = ["subnetworkRangeName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AliasIpRange instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {google.cloud.backupdr.v1.IAliasIpRange=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange instance - */ - AliasIpRange.create = function create(properties) { - return new AliasIpRange(properties); - }; - - /** - * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {google.cloud.backupdr.v1.IAliasIpRange} message AliasIpRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AliasIpRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ipCidrRange != null && Object.hasOwnProperty.call(message, "ipCidrRange")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipCidrRange); - if (message.subnetworkRangeName != null && Object.hasOwnProperty.call(message, "subnetworkRangeName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetworkRangeName); - return writer; - }; - - /** - * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {google.cloud.backupdr.v1.IAliasIpRange} message AliasIpRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AliasIpRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AliasIpRange message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AliasIpRange.decode = function 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.backupdr.v1.AliasIpRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ipCidrRange = reader.string(); - break; - } - case 2: { - message.subnetworkRangeName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AliasIpRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AliasIpRange message. - * @function verify - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AliasIpRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) { - properties._ipCidrRange = 1; - if (!$util.isString(message.ipCidrRange)) - return "ipCidrRange: string expected"; - } - if (message.subnetworkRangeName != null && message.hasOwnProperty("subnetworkRangeName")) { - properties._subnetworkRangeName = 1; - if (!$util.isString(message.subnetworkRangeName)) - return "subnetworkRangeName: string expected"; - } - return null; - }; - - /** - * Creates an AliasIpRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange - */ - AliasIpRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AliasIpRange) - return object; - var message = new $root.google.cloud.backupdr.v1.AliasIpRange(); - if (object.ipCidrRange != null) - message.ipCidrRange = String(object.ipCidrRange); - if (object.subnetworkRangeName != null) - message.subnetworkRangeName = String(object.subnetworkRangeName); - return message; - }; - - /** - * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {google.cloud.backupdr.v1.AliasIpRange} message AliasIpRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AliasIpRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) { - object.ipCidrRange = message.ipCidrRange; - if (options.oneofs) - object._ipCidrRange = "ipCidrRange"; - } - if (message.subnetworkRangeName != null && message.hasOwnProperty("subnetworkRangeName")) { - object.subnetworkRangeName = message.subnetworkRangeName; - if (options.oneofs) - object._subnetworkRangeName = "subnetworkRangeName"; - } - return object; - }; - - /** - * Converts this AliasIpRange to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - * @returns {Object.} JSON object - */ - AliasIpRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AliasIpRange - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AliasIpRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AliasIpRange"; - }; - - return AliasIpRange; - })(); - - v1.InstanceParams = (function() { - - /** - * Properties of an InstanceParams. - * @memberof google.cloud.backupdr.v1 - * @interface IInstanceParams - * @property {Object.|null} [resourceManagerTags] InstanceParams resourceManagerTags - */ - - /** - * Constructs a new InstanceParams. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an InstanceParams. - * @implements IInstanceParams - * @constructor - * @param {google.cloud.backupdr.v1.IInstanceParams=} [properties] Properties to set - */ - function InstanceParams(properties) { - this.resourceManagerTags = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InstanceParams resourceManagerTags. - * @member {Object.} resourceManagerTags - * @memberof google.cloud.backupdr.v1.InstanceParams - * @instance - */ - InstanceParams.prototype.resourceManagerTags = $util.emptyObject; - - /** - * Creates a new InstanceParams instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {google.cloud.backupdr.v1.IInstanceParams=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams instance - */ - InstanceParams.create = function create(properties) { - return new InstanceParams(properties); - }; - - /** - * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {google.cloud.backupdr.v1.IInstanceParams} message InstanceParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) - for (var keys = Object.keys(message.resourceManagerTags), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceManagerTags[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {google.cloud.backupdr.v1.IInstanceParams} message InstanceParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InstanceParams message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceParams.decode = function 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.backupdr.v1.InstanceParams(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.resourceManagerTags === $util.emptyObject) - message.resourceManagerTags = {}; - 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.resourceManagerTags[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InstanceParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InstanceParams message. - * @function verify - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InstanceParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { - if (!$util.isObject(message.resourceManagerTags)) - return "resourceManagerTags: object expected"; - var key = Object.keys(message.resourceManagerTags); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.resourceManagerTags[key[i]])) - return "resourceManagerTags: string{k:string} expected"; - } - return null; - }; - - /** - * Creates an InstanceParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams - */ - InstanceParams.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.InstanceParams) - return object; - var message = new $root.google.cloud.backupdr.v1.InstanceParams(); - if (object.resourceManagerTags) { - if (typeof object.resourceManagerTags !== "object") - throw TypeError(".google.cloud.backupdr.v1.InstanceParams.resourceManagerTags: object expected"); - message.resourceManagerTags = {}; - for (var keys = Object.keys(object.resourceManagerTags), i = 0; i < keys.length; ++i) - message.resourceManagerTags[keys[i]] = String(object.resourceManagerTags[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {google.cloud.backupdr.v1.InstanceParams} message InstanceParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InstanceParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.resourceManagerTags = {}; - var keys2; - if (message.resourceManagerTags && (keys2 = Object.keys(message.resourceManagerTags)).length) { - object.resourceManagerTags = {}; - for (var j = 0; j < keys2.length; ++j) - object.resourceManagerTags[keys2[j]] = message.resourceManagerTags[keys2[j]]; - } - return object; - }; - - /** - * Converts this InstanceParams to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.InstanceParams - * @instance - * @returns {Object.} JSON object - */ - InstanceParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InstanceParams - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InstanceParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.InstanceParams"; - }; - - return InstanceParams; - })(); - - v1.AllocationAffinity = (function() { - - /** - * Properties of an AllocationAffinity. - * @memberof google.cloud.backupdr.v1 - * @interface IAllocationAffinity - * @property {google.cloud.backupdr.v1.AllocationAffinity.Type|null} [consumeAllocationType] AllocationAffinity consumeAllocationType - * @property {string|null} [key] AllocationAffinity key - * @property {Array.|null} [values] AllocationAffinity values - */ - - /** - * Constructs a new AllocationAffinity. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AllocationAffinity. - * @implements IAllocationAffinity - * @constructor - * @param {google.cloud.backupdr.v1.IAllocationAffinity=} [properties] Properties to set - */ - function AllocationAffinity(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AllocationAffinity consumeAllocationType. - * @member {google.cloud.backupdr.v1.AllocationAffinity.Type|null|undefined} consumeAllocationType - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - AllocationAffinity.prototype.consumeAllocationType = null; - - /** - * AllocationAffinity key. - * @member {string|null|undefined} key - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - AllocationAffinity.prototype.key = null; - - /** - * AllocationAffinity values. - * @member {Array.} values - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - AllocationAffinity.prototype.values = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AllocationAffinity _consumeAllocationType. - * @member {"consumeAllocationType"|undefined} _consumeAllocationType - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - Object.defineProperty(AllocationAffinity.prototype, "_consumeAllocationType", { - get: $util.oneOfGetter($oneOfFields = ["consumeAllocationType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AllocationAffinity _key. - * @member {"key"|undefined} _key - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - Object.defineProperty(AllocationAffinity.prototype, "_key", { - get: $util.oneOfGetter($oneOfFields = ["key"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AllocationAffinity instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {google.cloud.backupdr.v1.IAllocationAffinity=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity instance - */ - AllocationAffinity.create = function create(properties) { - return new AllocationAffinity(properties); - }; - - /** - * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {google.cloud.backupdr.v1.IAllocationAffinity} message AllocationAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AllocationAffinity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consumeAllocationType != null && Object.hasOwnProperty.call(message, "consumeAllocationType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumeAllocationType); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); - return writer; - }; - - /** - * Encodes the specified AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {google.cloud.backupdr.v1.IAllocationAffinity} message AllocationAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AllocationAffinity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AllocationAffinity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AllocationAffinity.decode = function 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.backupdr.v1.AllocationAffinity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.consumeAllocationType = reader.int32(); - break; - } - case 2: { - message.key = reader.string(); - break; - } - case 3: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AllocationAffinity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AllocationAffinity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AllocationAffinity message. - * @function verify - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AllocationAffinity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.consumeAllocationType != null && message.hasOwnProperty("consumeAllocationType")) { - properties._consumeAllocationType = 1; - switch (message.consumeAllocationType) { - default: - return "consumeAllocationType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.key != null && message.hasOwnProperty("key")) { - properties._key = 1; - if (!$util.isString(message.key)) - return "key: string expected"; - } - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - return null; - }; - - /** - * Creates an AllocationAffinity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity - */ - AllocationAffinity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AllocationAffinity) - return object; - var message = new $root.google.cloud.backupdr.v1.AllocationAffinity(); - switch (object.consumeAllocationType) { - default: - if (typeof object.consumeAllocationType === "number") { - message.consumeAllocationType = object.consumeAllocationType; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.consumeAllocationType = 0; - break; - case "NO_RESERVATION": - case 1: - message.consumeAllocationType = 1; - break; - case "ANY_RESERVATION": - case 2: - message.consumeAllocationType = 2; - break; - case "SPECIFIC_RESERVATION": - case 3: - message.consumeAllocationType = 3; - break; - } - if (object.key != null) - message.key = String(object.key); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.cloud.backupdr.v1.AllocationAffinity.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - return message; - }; - - /** - * Creates a plain object from an AllocationAffinity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {google.cloud.backupdr.v1.AllocationAffinity} message AllocationAffinity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AllocationAffinity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.consumeAllocationType != null && message.hasOwnProperty("consumeAllocationType")) { - object.consumeAllocationType = options.enums === String ? $root.google.cloud.backupdr.v1.AllocationAffinity.Type[message.consumeAllocationType] === undefined ? message.consumeAllocationType : $root.google.cloud.backupdr.v1.AllocationAffinity.Type[message.consumeAllocationType] : message.consumeAllocationType; - if (options.oneofs) - object._consumeAllocationType = "consumeAllocationType"; - } - if (message.key != null && message.hasOwnProperty("key")) { - object.key = message.key; - if (options.oneofs) - object._key = "key"; - } - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - return object; - }; - - /** - * Converts this AllocationAffinity to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - * @returns {Object.} JSON object - */ - AllocationAffinity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AllocationAffinity - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AllocationAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AllocationAffinity"; - }; - - /** - * Type enum. - * @name google.cloud.backupdr.v1.AllocationAffinity.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} NO_RESERVATION=1 NO_RESERVATION value - * @property {number} ANY_RESERVATION=2 ANY_RESERVATION value - * @property {number} SPECIFIC_RESERVATION=3 SPECIFIC_RESERVATION value - */ - AllocationAffinity.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NO_RESERVATION"] = 1; - values[valuesById[2] = "ANY_RESERVATION"] = 2; - values[valuesById[3] = "SPECIFIC_RESERVATION"] = 3; - return values; - })(); - - return AllocationAffinity; - })(); - - v1.Scheduling = (function() { - - /** - * Properties of a Scheduling. - * @memberof google.cloud.backupdr.v1 - * @interface IScheduling - * @property {google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null} [onHostMaintenance] Scheduling onHostMaintenance - * @property {boolean|null} [automaticRestart] Scheduling automaticRestart - * @property {boolean|null} [preemptible] Scheduling preemptible - * @property {Array.|null} [nodeAffinities] Scheduling nodeAffinities - * @property {number|null} [minNodeCpus] Scheduling minNodeCpus - * @property {google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null} [provisioningModel] Scheduling provisioningModel - * @property {google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null} [instanceTerminationAction] Scheduling instanceTerminationAction - * @property {google.cloud.backupdr.v1.ISchedulingDuration|null} [localSsdRecoveryTimeout] Scheduling localSsdRecoveryTimeout - */ - - /** - * Constructs a new Scheduling. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a Scheduling. - * @implements IScheduling - * @constructor - * @param {google.cloud.backupdr.v1.IScheduling=} [properties] Properties to set - */ - function Scheduling(properties) { - this.nodeAffinities = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Scheduling onHostMaintenance. - * @member {google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null|undefined} onHostMaintenance - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.onHostMaintenance = null; - - /** - * Scheduling automaticRestart. - * @member {boolean|null|undefined} automaticRestart - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.automaticRestart = null; - - /** - * Scheduling preemptible. - * @member {boolean|null|undefined} preemptible - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.preemptible = null; - - /** - * Scheduling nodeAffinities. - * @member {Array.} nodeAffinities - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.nodeAffinities = $util.emptyArray; - - /** - * Scheduling minNodeCpus. - * @member {number|null|undefined} minNodeCpus - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.minNodeCpus = null; - - /** - * Scheduling provisioningModel. - * @member {google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null|undefined} provisioningModel - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.provisioningModel = null; - - /** - * Scheduling instanceTerminationAction. - * @member {google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null|undefined} instanceTerminationAction - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.instanceTerminationAction = null; - - /** - * Scheduling localSsdRecoveryTimeout. - * @member {google.cloud.backupdr.v1.ISchedulingDuration|null|undefined} localSsdRecoveryTimeout - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.localSsdRecoveryTimeout = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Scheduling _onHostMaintenance. - * @member {"onHostMaintenance"|undefined} _onHostMaintenance - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_onHostMaintenance", { - get: $util.oneOfGetter($oneOfFields = ["onHostMaintenance"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _automaticRestart. - * @member {"automaticRestart"|undefined} _automaticRestart - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_automaticRestart", { - get: $util.oneOfGetter($oneOfFields = ["automaticRestart"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _preemptible. - * @member {"preemptible"|undefined} _preemptible - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_preemptible", { - get: $util.oneOfGetter($oneOfFields = ["preemptible"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _minNodeCpus. - * @member {"minNodeCpus"|undefined} _minNodeCpus - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_minNodeCpus", { - get: $util.oneOfGetter($oneOfFields = ["minNodeCpus"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _provisioningModel. - * @member {"provisioningModel"|undefined} _provisioningModel - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_provisioningModel", { - get: $util.oneOfGetter($oneOfFields = ["provisioningModel"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _instanceTerminationAction. - * @member {"instanceTerminationAction"|undefined} _instanceTerminationAction - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_instanceTerminationAction", { - get: $util.oneOfGetter($oneOfFields = ["instanceTerminationAction"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _localSsdRecoveryTimeout. - * @member {"localSsdRecoveryTimeout"|undefined} _localSsdRecoveryTimeout - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_localSsdRecoveryTimeout", { - get: $util.oneOfGetter($oneOfFields = ["localSsdRecoveryTimeout"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Scheduling instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {google.cloud.backupdr.v1.IScheduling=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling instance - */ - Scheduling.create = function create(properties) { - return new Scheduling(properties); - }; - - /** - * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {google.cloud.backupdr.v1.IScheduling} message Scheduling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Scheduling.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.onHostMaintenance != null && Object.hasOwnProperty.call(message, "onHostMaintenance")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.onHostMaintenance); - if (message.automaticRestart != null && Object.hasOwnProperty.call(message, "automaticRestart")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.automaticRestart); - if (message.preemptible != null && Object.hasOwnProperty.call(message, "preemptible")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preemptible); - if (message.nodeAffinities != null && message.nodeAffinities.length) - for (var i = 0; i < message.nodeAffinities.length; ++i) - $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.encode(message.nodeAffinities[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.minNodeCpus != null && Object.hasOwnProperty.call(message, "minNodeCpus")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.minNodeCpus); - if (message.provisioningModel != null && Object.hasOwnProperty.call(message, "provisioningModel")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.provisioningModel); - if (message.instanceTerminationAction != null && Object.hasOwnProperty.call(message, "instanceTerminationAction")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.instanceTerminationAction); - if (message.localSsdRecoveryTimeout != null && Object.hasOwnProperty.call(message, "localSsdRecoveryTimeout")) - $root.google.cloud.backupdr.v1.SchedulingDuration.encode(message.localSsdRecoveryTimeout, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {google.cloud.backupdr.v1.IScheduling} message Scheduling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Scheduling.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Scheduling message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Scheduling.decode = function 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.backupdr.v1.Scheduling(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.onHostMaintenance = reader.int32(); - break; - } - case 2: { - message.automaticRestart = reader.bool(); - break; - } - case 3: { - message.preemptible = reader.bool(); - break; - } - case 4: { - if (!(message.nodeAffinities && message.nodeAffinities.length)) - message.nodeAffinities = []; - message.nodeAffinities.push($root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.decode(reader, reader.uint32())); - break; - } - case 5: { - message.minNodeCpus = reader.int32(); - break; - } - case 6: { - message.provisioningModel = reader.int32(); - break; - } - case 7: { - message.instanceTerminationAction = reader.int32(); - break; - } - case 10: { - message.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Scheduling message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Scheduling.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Scheduling message. - * @function verify - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Scheduling.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.onHostMaintenance != null && message.hasOwnProperty("onHostMaintenance")) { - properties._onHostMaintenance = 1; - switch (message.onHostMaintenance) { - default: - return "onHostMaintenance: enum value expected"; - case 0: - case 1: - case 1000: - break; - } - } - if (message.automaticRestart != null && message.hasOwnProperty("automaticRestart")) { - properties._automaticRestart = 1; - if (typeof message.automaticRestart !== "boolean") - return "automaticRestart: boolean expected"; - } - if (message.preemptible != null && message.hasOwnProperty("preemptible")) { - properties._preemptible = 1; - if (typeof message.preemptible !== "boolean") - return "preemptible: boolean expected"; - } - if (message.nodeAffinities != null && message.hasOwnProperty("nodeAffinities")) { - if (!Array.isArray(message.nodeAffinities)) - return "nodeAffinities: array expected"; - for (var i = 0; i < message.nodeAffinities.length; ++i) { - var error = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify(message.nodeAffinities[i]); - if (error) - return "nodeAffinities." + error; - } - } - if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { - properties._minNodeCpus = 1; - if (!$util.isInteger(message.minNodeCpus)) - return "minNodeCpus: integer expected"; - } - if (message.provisioningModel != null && message.hasOwnProperty("provisioningModel")) { - properties._provisioningModel = 1; - switch (message.provisioningModel) { - default: - return "provisioningModel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.instanceTerminationAction != null && message.hasOwnProperty("instanceTerminationAction")) { - properties._instanceTerminationAction = 1; - switch (message.instanceTerminationAction) { - default: - return "instanceTerminationAction: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.localSsdRecoveryTimeout != null && message.hasOwnProperty("localSsdRecoveryTimeout")) { - properties._localSsdRecoveryTimeout = 1; - { - var error = $root.google.cloud.backupdr.v1.SchedulingDuration.verify(message.localSsdRecoveryTimeout); - if (error) - return "localSsdRecoveryTimeout." + error; - } - } - return null; - }; - - /** - * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling - */ - Scheduling.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Scheduling) - return object; - var message = new $root.google.cloud.backupdr.v1.Scheduling(); - switch (object.onHostMaintenance) { - default: - if (typeof object.onHostMaintenance === "number") { - message.onHostMaintenance = object.onHostMaintenance; - break; - } - break; - case "ON_HOST_MAINTENANCE_UNSPECIFIED": - case 0: - message.onHostMaintenance = 0; - break; - case "TERMINATE": - case 1: - message.onHostMaintenance = 1; - break; - case "MIGRATE": - case 1000: - message.onHostMaintenance = 1000; - break; - } - if (object.automaticRestart != null) - message.automaticRestart = Boolean(object.automaticRestart); - if (object.preemptible != null) - message.preemptible = Boolean(object.preemptible); - if (object.nodeAffinities) { - if (!Array.isArray(object.nodeAffinities)) - throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: array expected"); - message.nodeAffinities = []; - for (var i = 0; i < object.nodeAffinities.length; ++i) { - if (typeof object.nodeAffinities[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: object expected"); - message.nodeAffinities[i] = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.fromObject(object.nodeAffinities[i]); - } - } - if (object.minNodeCpus != null) - message.minNodeCpus = object.minNodeCpus | 0; - switch (object.provisioningModel) { - default: - if (typeof object.provisioningModel === "number") { - message.provisioningModel = object.provisioningModel; - break; - } - break; - case "PROVISIONING_MODEL_UNSPECIFIED": - case 0: - message.provisioningModel = 0; - break; - case "STANDARD": - case 1: - message.provisioningModel = 1; - break; - case "SPOT": - case 2: - message.provisioningModel = 2; - break; - } - switch (object.instanceTerminationAction) { - default: - if (typeof object.instanceTerminationAction === "number") { - message.instanceTerminationAction = object.instanceTerminationAction; - break; - } - break; - case "INSTANCE_TERMINATION_ACTION_UNSPECIFIED": - case 0: - message.instanceTerminationAction = 0; - break; - case "DELETE": - case 1: - message.instanceTerminationAction = 1; - break; - case "STOP": - case 2: - message.instanceTerminationAction = 2; - break; - } - if (object.localSsdRecoveryTimeout != null) { - if (typeof object.localSsdRecoveryTimeout !== "object") - throw TypeError(".google.cloud.backupdr.v1.Scheduling.localSsdRecoveryTimeout: object expected"); - message.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.fromObject(object.localSsdRecoveryTimeout); - } - return message; - }; - - /** - * Creates a plain object from a Scheduling message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {google.cloud.backupdr.v1.Scheduling} message Scheduling - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Scheduling.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.nodeAffinities = []; - if (message.onHostMaintenance != null && message.hasOwnProperty("onHostMaintenance")) { - object.onHostMaintenance = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.OnHostMaintenance[message.onHostMaintenance] === undefined ? message.onHostMaintenance : $root.google.cloud.backupdr.v1.Scheduling.OnHostMaintenance[message.onHostMaintenance] : message.onHostMaintenance; - if (options.oneofs) - object._onHostMaintenance = "onHostMaintenance"; - } - if (message.automaticRestart != null && message.hasOwnProperty("automaticRestart")) { - object.automaticRestart = message.automaticRestart; - if (options.oneofs) - object._automaticRestart = "automaticRestart"; - } - if (message.preemptible != null && message.hasOwnProperty("preemptible")) { - object.preemptible = message.preemptible; - if (options.oneofs) - object._preemptible = "preemptible"; - } - if (message.nodeAffinities && message.nodeAffinities.length) { - object.nodeAffinities = []; - for (var j = 0; j < message.nodeAffinities.length; ++j) - object.nodeAffinities[j] = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.toObject(message.nodeAffinities[j], options); - } - if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { - object.minNodeCpus = message.minNodeCpus; - if (options.oneofs) - object._minNodeCpus = "minNodeCpus"; - } - if (message.provisioningModel != null && message.hasOwnProperty("provisioningModel")) { - object.provisioningModel = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.ProvisioningModel[message.provisioningModel] === undefined ? message.provisioningModel : $root.google.cloud.backupdr.v1.Scheduling.ProvisioningModel[message.provisioningModel] : message.provisioningModel; - if (options.oneofs) - object._provisioningModel = "provisioningModel"; - } - if (message.instanceTerminationAction != null && message.hasOwnProperty("instanceTerminationAction")) { - object.instanceTerminationAction = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction[message.instanceTerminationAction] === undefined ? message.instanceTerminationAction : $root.google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction[message.instanceTerminationAction] : message.instanceTerminationAction; - if (options.oneofs) - object._instanceTerminationAction = "instanceTerminationAction"; - } - if (message.localSsdRecoveryTimeout != null && message.hasOwnProperty("localSsdRecoveryTimeout")) { - object.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.toObject(message.localSsdRecoveryTimeout, options); - if (options.oneofs) - object._localSsdRecoveryTimeout = "localSsdRecoveryTimeout"; - } - return object; - }; - - /** - * Converts this Scheduling to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - * @returns {Object.} JSON object - */ - Scheduling.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Scheduling - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Scheduling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Scheduling"; - }; - - /** - * OnHostMaintenance enum. - * @name google.cloud.backupdr.v1.Scheduling.OnHostMaintenance - * @enum {number} - * @property {number} ON_HOST_MAINTENANCE_UNSPECIFIED=0 ON_HOST_MAINTENANCE_UNSPECIFIED value - * @property {number} TERMINATE=1 TERMINATE value - * @property {number} MIGRATE=1000 MIGRATE value - */ - Scheduling.OnHostMaintenance = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ON_HOST_MAINTENANCE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TERMINATE"] = 1; - values[valuesById[1000] = "MIGRATE"] = 1000; - return values; - })(); - - Scheduling.NodeAffinity = (function() { - - /** - * Properties of a NodeAffinity. - * @memberof google.cloud.backupdr.v1.Scheduling - * @interface INodeAffinity - * @property {string|null} [key] NodeAffinity key - * @property {google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null} [operator] NodeAffinity operator - * @property {Array.|null} [values] NodeAffinity values - */ - - /** - * Constructs a new NodeAffinity. - * @memberof google.cloud.backupdr.v1.Scheduling - * @classdesc Represents a NodeAffinity. - * @implements INodeAffinity - * @constructor - * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity=} [properties] Properties to set - */ - function NodeAffinity(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeAffinity key. - * @member {string|null|undefined} key - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - NodeAffinity.prototype.key = null; - - /** - * NodeAffinity operator. - * @member {google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null|undefined} operator - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - NodeAffinity.prototype.operator = null; - - /** - * NodeAffinity values. - * @member {Array.} values - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - NodeAffinity.prototype.values = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NodeAffinity _key. - * @member {"key"|undefined} _key - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - Object.defineProperty(NodeAffinity.prototype, "_key", { - get: $util.oneOfGetter($oneOfFields = ["key"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NodeAffinity _operator. - * @member {"operator"|undefined} _operator - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - Object.defineProperty(NodeAffinity.prototype, "_operator", { - get: $util.oneOfGetter($oneOfFields = ["operator"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NodeAffinity instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity instance - */ - NodeAffinity.create = function create(properties) { - return new NodeAffinity(properties); - }; - - /** - * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity} message NodeAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeAffinity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.operator != null && Object.hasOwnProperty.call(message, "operator")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operator); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); - return writer; - }; - - /** - * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity} message NodeAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeAffinity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeAffinity.decode = function 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.backupdr.v1.Scheduling.NodeAffinity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.key = reader.string(); - break; - } - case 2: { - message.operator = reader.int32(); - break; - } - case 3: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeAffinity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeAffinity message. - * @function verify - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeAffinity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.key != null && message.hasOwnProperty("key")) { - properties._key = 1; - if (!$util.isString(message.key)) - return "key: string expected"; - } - if (message.operator != null && message.hasOwnProperty("operator")) { - properties._operator = 1; - switch (message.operator) { - default: - return "operator: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - return null; - }; - - /** - * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity - */ - NodeAffinity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity) - return object; - var message = new $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity(); - if (object.key != null) - message.key = String(object.key); - switch (object.operator) { - default: - if (typeof object.operator === "number") { - message.operator = object.operator; - break; - } - break; - case "OPERATOR_UNSPECIFIED": - case 0: - message.operator = 0; - break; - case "IN": - case 1: - message.operator = 1; - break; - case "NOT_IN": - case 2: - message.operator = 2; - break; - } - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.cloud.backupdr.v1.Scheduling.NodeAffinity.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - return message; - }; - - /** - * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {google.cloud.backupdr.v1.Scheduling.NodeAffinity} message NodeAffinity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeAffinity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.key != null && message.hasOwnProperty("key")) { - object.key = message.key; - if (options.oneofs) - object._key = "key"; - } - if (message.operator != null && message.hasOwnProperty("operator")) { - object.operator = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator[message.operator] === undefined ? message.operator : $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator[message.operator] : message.operator; - if (options.oneofs) - object._operator = "operator"; - } - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - return object; - }; - - /** - * Converts this NodeAffinity to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - * @returns {Object.} JSON object - */ - NodeAffinity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeAffinity - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Scheduling.NodeAffinity"; - }; - - /** - * Operator enum. - * @name google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator - * @enum {number} - * @property {number} OPERATOR_UNSPECIFIED=0 OPERATOR_UNSPECIFIED value - * @property {number} IN=1 IN value - * @property {number} NOT_IN=2 NOT_IN value - */ - NodeAffinity.Operator = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OPERATOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "IN"] = 1; - values[valuesById[2] = "NOT_IN"] = 2; - return values; - })(); - - return NodeAffinity; - })(); - - /** - * ProvisioningModel enum. - * @name google.cloud.backupdr.v1.Scheduling.ProvisioningModel - * @enum {number} - * @property {number} PROVISIONING_MODEL_UNSPECIFIED=0 PROVISIONING_MODEL_UNSPECIFIED value - * @property {number} STANDARD=1 STANDARD value - * @property {number} SPOT=2 SPOT value - */ - Scheduling.ProvisioningModel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROVISIONING_MODEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "STANDARD"] = 1; - values[valuesById[2] = "SPOT"] = 2; - return values; - })(); - - /** - * InstanceTerminationAction enum. - * @name google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction - * @enum {number} - * @property {number} INSTANCE_TERMINATION_ACTION_UNSPECIFIED=0 INSTANCE_TERMINATION_ACTION_UNSPECIFIED value - * @property {number} DELETE=1 DELETE value - * @property {number} STOP=2 STOP value - */ - Scheduling.InstanceTerminationAction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INSTANCE_TERMINATION_ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "DELETE"] = 1; - values[valuesById[2] = "STOP"] = 2; - return values; - })(); - - return Scheduling; - })(); - - v1.SchedulingDuration = (function() { - - /** - * Properties of a SchedulingDuration. - * @memberof google.cloud.backupdr.v1 - * @interface ISchedulingDuration - * @property {number|Long|null} [seconds] SchedulingDuration seconds - * @property {number|null} [nanos] SchedulingDuration nanos - */ - - /** - * Constructs a new SchedulingDuration. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a SchedulingDuration. - * @implements ISchedulingDuration - * @constructor - * @param {google.cloud.backupdr.v1.ISchedulingDuration=} [properties] Properties to set - */ - function SchedulingDuration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SchedulingDuration seconds. - * @member {number|Long|null|undefined} seconds - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - */ - SchedulingDuration.prototype.seconds = null; - - /** - * SchedulingDuration nanos. - * @member {number|null|undefined} nanos - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - */ - SchedulingDuration.prototype.nanos = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SchedulingDuration _seconds. - * @member {"seconds"|undefined} _seconds - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - */ - Object.defineProperty(SchedulingDuration.prototype, "_seconds", { - get: $util.oneOfGetter($oneOfFields = ["seconds"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * SchedulingDuration _nanos. - * @member {"nanos"|undefined} _nanos - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - */ - Object.defineProperty(SchedulingDuration.prototype, "_nanos", { - get: $util.oneOfGetter($oneOfFields = ["nanos"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SchedulingDuration instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {google.cloud.backupdr.v1.ISchedulingDuration=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration instance - */ - SchedulingDuration.create = function create(properties) { - return new SchedulingDuration(properties); - }; - - /** - * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {google.cloud.backupdr.v1.ISchedulingDuration} message SchedulingDuration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchedulingDuration.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 SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {google.cloud.backupdr.v1.ISchedulingDuration} message SchedulingDuration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchedulingDuration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SchedulingDuration message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchedulingDuration.decode = function 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.backupdr.v1.SchedulingDuration(); - 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 SchedulingDuration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchedulingDuration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SchedulingDuration message. - * @function verify - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SchedulingDuration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.seconds != null && message.hasOwnProperty("seconds")) { - properties._seconds = 1; - 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")) { - properties._nanos = 1; - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - } - return null; - }; - - /** - * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration - */ - SchedulingDuration.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.SchedulingDuration) - return object; - var message = new $root.google.cloud.backupdr.v1.SchedulingDuration(); - 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 SchedulingDuration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {google.cloud.backupdr.v1.SchedulingDuration} message SchedulingDuration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SchedulingDuration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - 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 (options.oneofs) - object._seconds = "seconds"; - } - if (message.nanos != null && message.hasOwnProperty("nanos")) { - object.nanos = message.nanos; - if (options.oneofs) - object._nanos = "nanos"; - } - return object; - }; - - /** - * Converts this SchedulingDuration to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - * @returns {Object.} JSON object - */ - SchedulingDuration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SchedulingDuration - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SchedulingDuration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.SchedulingDuration"; - }; - - return SchedulingDuration; - })(); - - v1.ServiceAccount = (function() { - - /** - * Properties of a ServiceAccount. - * @memberof google.cloud.backupdr.v1 - * @interface IServiceAccount - * @property {string|null} [email] ServiceAccount email - * @property {Array.|null} [scopes] ServiceAccount scopes - */ - - /** - * Constructs a new ServiceAccount. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ServiceAccount. - * @implements IServiceAccount - * @constructor - * @param {google.cloud.backupdr.v1.IServiceAccount=} [properties] Properties to set - */ - function ServiceAccount(properties) { - this.scopes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceAccount email. - * @member {string|null|undefined} email - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @instance - */ - ServiceAccount.prototype.email = null; - - /** - * ServiceAccount scopes. - * @member {Array.} scopes - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @instance - */ - ServiceAccount.prototype.scopes = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ServiceAccount _email. - * @member {"email"|undefined} _email - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @instance - */ - Object.defineProperty(ServiceAccount.prototype, "_email", { - get: $util.oneOfGetter($oneOfFields = ["email"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ServiceAccount instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {google.cloud.backupdr.v1.IServiceAccount=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount instance - */ - ServiceAccount.create = function create(properties) { - return new ServiceAccount(properties); - }; - - /** - * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {google.cloud.backupdr.v1.IServiceAccount} message ServiceAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.email != null && Object.hasOwnProperty.call(message, "email")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.email); - if (message.scopes != null && message.scopes.length) - for (var i = 0; i < message.scopes.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.scopes[i]); - return writer; - }; - - /** - * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {google.cloud.backupdr.v1.IServiceAccount} message ServiceAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceAccount message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceAccount.decode = function 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.backupdr.v1.ServiceAccount(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.email = reader.string(); - break; - } - case 2: { - if (!(message.scopes && message.scopes.length)) - message.scopes = []; - message.scopes.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceAccount message. - * @function verify - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.email != null && message.hasOwnProperty("email")) { - properties._email = 1; - if (!$util.isString(message.email)) - return "email: string expected"; - } - if (message.scopes != null && message.hasOwnProperty("scopes")) { - if (!Array.isArray(message.scopes)) - return "scopes: array expected"; - for (var i = 0; i < message.scopes.length; ++i) - if (!$util.isString(message.scopes[i])) - return "scopes: string[] expected"; - } - return null; - }; - - /** - * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount - */ - ServiceAccount.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ServiceAccount) - return object; - var message = new $root.google.cloud.backupdr.v1.ServiceAccount(); - if (object.email != null) - message.email = String(object.email); - if (object.scopes) { - if (!Array.isArray(object.scopes)) - throw TypeError(".google.cloud.backupdr.v1.ServiceAccount.scopes: array expected"); - message.scopes = []; - for (var i = 0; i < object.scopes.length; ++i) - message.scopes[i] = String(object.scopes[i]); - } - return message; - }; - - /** - * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {google.cloud.backupdr.v1.ServiceAccount} message ServiceAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.scopes = []; - if (message.email != null && message.hasOwnProperty("email")) { - object.email = message.email; - if (options.oneofs) - object._email = "email"; - } - if (message.scopes && message.scopes.length) { - object.scopes = []; - for (var j = 0; j < message.scopes.length; ++j) - object.scopes[j] = message.scopes[j]; - } - return object; - }; - - /** - * Converts this ServiceAccount to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @instance - * @returns {Object.} JSON object - */ - ServiceAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceAccount - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceAccount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ServiceAccount"; - }; - - return ServiceAccount; - })(); - - v1.Tags = (function() { - - /** - * Properties of a Tags. - * @memberof google.cloud.backupdr.v1 - * @interface ITags - * @property {Array.|null} [items] Tags items - */ - - /** - * Constructs a new Tags. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a Tags. - * @implements ITags - * @constructor - * @param {google.cloud.backupdr.v1.ITags=} [properties] Properties to set - */ - function Tags(properties) { - this.items = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Tags items. - * @member {Array.} items - * @memberof google.cloud.backupdr.v1.Tags - * @instance - */ - Tags.prototype.items = $util.emptyArray; - - /** - * Creates a new Tags instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {google.cloud.backupdr.v1.ITags=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Tags} Tags instance - */ - Tags.create = function create(properties) { - return new Tags(properties); - }; - - /** - * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {google.cloud.backupdr.v1.ITags} message Tags message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tags.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.items != null && message.items.length) - for (var i = 0; i < message.items.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.items[i]); - return writer; - }; - - /** - * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {google.cloud.backupdr.v1.ITags} message Tags message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tags.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Tags message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Tags} Tags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tags.decode = function 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.backupdr.v1.Tags(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.items && message.items.length)) - message.items = []; - message.items.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Tags message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Tags} Tags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tags.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Tags message. - * @function verify - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Tags.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.items != null && message.hasOwnProperty("items")) { - if (!Array.isArray(message.items)) - return "items: array expected"; - for (var i = 0; i < message.items.length; ++i) - if (!$util.isString(message.items[i])) - return "items: string[] expected"; - } - return null; - }; - - /** - * Creates a Tags message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Tags} Tags - */ - Tags.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Tags) - return object; - var message = new $root.google.cloud.backupdr.v1.Tags(); - if (object.items) { - if (!Array.isArray(object.items)) - throw TypeError(".google.cloud.backupdr.v1.Tags.items: array expected"); - message.items = []; - for (var i = 0; i < object.items.length; ++i) - message.items[i] = String(object.items[i]); - } - return message; - }; - - /** - * Creates a plain object from a Tags message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {google.cloud.backupdr.v1.Tags} message Tags - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Tags.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.items = []; - if (message.items && message.items.length) { - object.items = []; - for (var j = 0; j < message.items.length; ++j) - object.items[j] = message.items[j]; - } - return object; - }; - - /** - * Converts this Tags to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Tags - * @instance - * @returns {Object.} JSON object - */ - Tags.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Tags - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Tags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Tags"; - }; - - return Tags; - })(); - - v1.AttachedDisk = (function() { - - /** - * Properties of an AttachedDisk. - * @memberof google.cloud.backupdr.v1 - * @interface IAttachedDisk - * @property {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null} [initializeParams] AttachedDisk initializeParams - * @property {string|null} [deviceName] AttachedDisk deviceName - * @property {string|null} [kind] AttachedDisk kind - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskType|null} [diskTypeDeprecated] AttachedDisk diskTypeDeprecated - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskMode|null} [mode] AttachedDisk mode - * @property {string|null} [source] AttachedDisk source - * @property {number|Long|null} [index] AttachedDisk index - * @property {boolean|null} [boot] AttachedDisk boot - * @property {boolean|null} [autoDelete] AttachedDisk autoDelete - * @property {Array.|null} [license] AttachedDisk license - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null} [diskInterface] AttachedDisk diskInterface - * @property {Array.|null} [guestOsFeature] AttachedDisk guestOsFeature - * @property {google.cloud.backupdr.v1.ICustomerEncryptionKey|null} [diskEncryptionKey] AttachedDisk diskEncryptionKey - * @property {number|Long|null} [diskSizeGb] AttachedDisk diskSizeGb - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null} [savedState] AttachedDisk savedState - * @property {string|null} [diskType] AttachedDisk diskType - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskType|null} [type] AttachedDisk type - */ - - /** - * Constructs a new AttachedDisk. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AttachedDisk. - * @implements IAttachedDisk - * @constructor - * @param {google.cloud.backupdr.v1.IAttachedDisk=} [properties] Properties to set - */ - function AttachedDisk(properties) { - this.license = []; - this.guestOsFeature = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AttachedDisk initializeParams. - * @member {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null|undefined} initializeParams - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.initializeParams = null; - - /** - * AttachedDisk deviceName. - * @member {string|null|undefined} deviceName - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.deviceName = null; - - /** - * AttachedDisk kind. - * @member {string|null|undefined} kind - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.kind = null; - - /** - * AttachedDisk diskTypeDeprecated. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskType|null|undefined} diskTypeDeprecated - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskTypeDeprecated = null; - - /** - * AttachedDisk mode. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskMode|null|undefined} mode - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.mode = null; - - /** - * AttachedDisk source. - * @member {string|null|undefined} source - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.source = null; - - /** - * AttachedDisk index. - * @member {number|Long|null|undefined} index - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.index = null; - - /** - * AttachedDisk boot. - * @member {boolean|null|undefined} boot - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.boot = null; - - /** - * AttachedDisk autoDelete. - * @member {boolean|null|undefined} autoDelete - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.autoDelete = null; - - /** - * AttachedDisk license. - * @member {Array.} license - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.license = $util.emptyArray; - - /** - * AttachedDisk diskInterface. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null|undefined} diskInterface - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskInterface = null; - - /** - * AttachedDisk guestOsFeature. - * @member {Array.} guestOsFeature - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.guestOsFeature = $util.emptyArray; - - /** - * AttachedDisk diskEncryptionKey. - * @member {google.cloud.backupdr.v1.ICustomerEncryptionKey|null|undefined} diskEncryptionKey - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskEncryptionKey = null; - - /** - * AttachedDisk diskSizeGb. - * @member {number|Long|null|undefined} diskSizeGb - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskSizeGb = null; - - /** - * AttachedDisk savedState. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null|undefined} savedState - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.savedState = null; - - /** - * AttachedDisk diskType. - * @member {string|null|undefined} diskType - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskType = null; - - /** - * AttachedDisk type. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskType|null|undefined} type - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.type = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AttachedDisk _initializeParams. - * @member {"initializeParams"|undefined} _initializeParams - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_initializeParams", { - get: $util.oneOfGetter($oneOfFields = ["initializeParams"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _deviceName. - * @member {"deviceName"|undefined} _deviceName - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_deviceName", { - get: $util.oneOfGetter($oneOfFields = ["deviceName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _kind. - * @member {"kind"|undefined} _kind - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_kind", { - get: $util.oneOfGetter($oneOfFields = ["kind"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskTypeDeprecated. - * @member {"diskTypeDeprecated"|undefined} _diskTypeDeprecated - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskTypeDeprecated", { - get: $util.oneOfGetter($oneOfFields = ["diskTypeDeprecated"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _mode. - * @member {"mode"|undefined} _mode - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_mode", { - get: $util.oneOfGetter($oneOfFields = ["mode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _source. - * @member {"source"|undefined} _source - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_source", { - get: $util.oneOfGetter($oneOfFields = ["source"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _index. - * @member {"index"|undefined} _index - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_index", { - get: $util.oneOfGetter($oneOfFields = ["index"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _boot. - * @member {"boot"|undefined} _boot - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_boot", { - get: $util.oneOfGetter($oneOfFields = ["boot"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _autoDelete. - * @member {"autoDelete"|undefined} _autoDelete - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_autoDelete", { - get: $util.oneOfGetter($oneOfFields = ["autoDelete"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskInterface. - * @member {"diskInterface"|undefined} _diskInterface - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskInterface", { - get: $util.oneOfGetter($oneOfFields = ["diskInterface"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskEncryptionKey. - * @member {"diskEncryptionKey"|undefined} _diskEncryptionKey - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskEncryptionKey", { - get: $util.oneOfGetter($oneOfFields = ["diskEncryptionKey"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskSizeGb. - * @member {"diskSizeGb"|undefined} _diskSizeGb - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskSizeGb", { - get: $util.oneOfGetter($oneOfFields = ["diskSizeGb"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _savedState. - * @member {"savedState"|undefined} _savedState - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_savedState", { - get: $util.oneOfGetter($oneOfFields = ["savedState"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskType. - * @member {"diskType"|undefined} _diskType - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskType", { - get: $util.oneOfGetter($oneOfFields = ["diskType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _type. - * @member {"type"|undefined} _type - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_type", { - get: $util.oneOfGetter($oneOfFields = ["type"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AttachedDisk instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {google.cloud.backupdr.v1.IAttachedDisk=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk instance - */ - AttachedDisk.create = function create(properties) { - return new AttachedDisk(properties); - }; - - /** - * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {google.cloud.backupdr.v1.IAttachedDisk} message AttachedDisk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AttachedDisk.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initializeParams != null && Object.hasOwnProperty.call(message, "initializeParams")) - $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.encode(message.initializeParams, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.deviceName); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.kind); - if (message.diskTypeDeprecated != null && Object.hasOwnProperty.call(message, "diskTypeDeprecated")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.diskTypeDeprecated); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.mode); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.source); - if (message.index != null && Object.hasOwnProperty.call(message, "index")) - writer.uint32(/* id 9, wireType 0 =*/72).int64(message.index); - if (message.boot != null && Object.hasOwnProperty.call(message, "boot")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.boot); - if (message.autoDelete != null && Object.hasOwnProperty.call(message, "autoDelete")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.autoDelete); - if (message.license != null && message.license.length) - for (var i = 0; i < message.license.length; ++i) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.license[i]); - if (message.diskInterface != null && Object.hasOwnProperty.call(message, "diskInterface")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.diskInterface); - if (message.guestOsFeature != null && message.guestOsFeature.length) - for (var i = 0; i < message.guestOsFeature.length; ++i) - $root.google.cloud.backupdr.v1.GuestOsFeature.encode(message.guestOsFeature[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.diskEncryptionKey != null && Object.hasOwnProperty.call(message, "diskEncryptionKey")) - $root.google.cloud.backupdr.v1.CustomerEncryptionKey.encode(message.diskEncryptionKey, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) - writer.uint32(/* id 16, wireType 0 =*/128).int64(message.diskSizeGb); - if (message.savedState != null && Object.hasOwnProperty.call(message, "savedState")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.savedState); - if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.diskType); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.type); - return writer; - }; - - /** - * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {google.cloud.backupdr.v1.IAttachedDisk} message AttachedDisk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AttachedDisk.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AttachedDisk message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AttachedDisk.decode = function 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.backupdr.v1.AttachedDisk(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.decode(reader, reader.uint32()); - break; - } - case 4: { - message.deviceName = reader.string(); - break; - } - case 5: { - message.kind = reader.string(); - break; - } - case 6: { - message.diskTypeDeprecated = reader.int32(); - break; - } - case 7: { - message.mode = reader.int32(); - break; - } - case 8: { - message.source = reader.string(); - break; - } - case 9: { - message.index = reader.int64(); - break; - } - case 10: { - message.boot = reader.bool(); - break; - } - case 11: { - message.autoDelete = reader.bool(); - break; - } - case 12: { - if (!(message.license && message.license.length)) - message.license = []; - message.license.push(reader.string()); - break; - } - case 13: { - message.diskInterface = reader.int32(); - break; - } - case 14: { - if (!(message.guestOsFeature && message.guestOsFeature.length)) - message.guestOsFeature = []; - message.guestOsFeature.push($root.google.cloud.backupdr.v1.GuestOsFeature.decode(reader, reader.uint32())); - break; - } - case 15: { - message.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader, reader.uint32()); - break; - } - case 16: { - message.diskSizeGb = reader.int64(); - break; - } - case 17: { - message.savedState = reader.int32(); - break; - } - case 18: { - message.diskType = reader.string(); - break; - } - case 19: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AttachedDisk.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AttachedDisk message. - * @function verify - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AttachedDisk.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.initializeParams != null && message.hasOwnProperty("initializeParams")) { - properties._initializeParams = 1; - { - var error = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify(message.initializeParams); - if (error) - return "initializeParams." + error; - } - } - if (message.deviceName != null && message.hasOwnProperty("deviceName")) { - properties._deviceName = 1; - if (!$util.isString(message.deviceName)) - return "deviceName: string expected"; - } - if (message.kind != null && message.hasOwnProperty("kind")) { - properties._kind = 1; - if (!$util.isString(message.kind)) - return "kind: string expected"; - } - if (message.diskTypeDeprecated != null && message.hasOwnProperty("diskTypeDeprecated")) { - properties._diskTypeDeprecated = 1; - switch (message.diskTypeDeprecated) { - default: - return "diskTypeDeprecated: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.mode != null && message.hasOwnProperty("mode")) { - properties._mode = 1; - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.source != null && message.hasOwnProperty("source")) { - properties._source = 1; - if (!$util.isString(message.source)) - return "source: string expected"; - } - if (message.index != null && message.hasOwnProperty("index")) { - properties._index = 1; - if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) - return "index: integer|Long expected"; - } - if (message.boot != null && message.hasOwnProperty("boot")) { - properties._boot = 1; - if (typeof message.boot !== "boolean") - return "boot: boolean expected"; - } - if (message.autoDelete != null && message.hasOwnProperty("autoDelete")) { - properties._autoDelete = 1; - if (typeof message.autoDelete !== "boolean") - return "autoDelete: boolean expected"; - } - if (message.license != null && message.hasOwnProperty("license")) { - if (!Array.isArray(message.license)) - return "license: array expected"; - for (var i = 0; i < message.license.length; ++i) - if (!$util.isString(message.license[i])) - return "license: string[] expected"; - } - if (message.diskInterface != null && message.hasOwnProperty("diskInterface")) { - properties._diskInterface = 1; - switch (message.diskInterface) { - default: - return "diskInterface: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.guestOsFeature != null && message.hasOwnProperty("guestOsFeature")) { - if (!Array.isArray(message.guestOsFeature)) - return "guestOsFeature: array expected"; - for (var i = 0; i < message.guestOsFeature.length; ++i) { - var error = $root.google.cloud.backupdr.v1.GuestOsFeature.verify(message.guestOsFeature[i]); - if (error) - return "guestOsFeature." + error; - } - } - if (message.diskEncryptionKey != null && message.hasOwnProperty("diskEncryptionKey")) { - properties._diskEncryptionKey = 1; - { - var error = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.verify(message.diskEncryptionKey); - if (error) - return "diskEncryptionKey." + error; - } - } - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) { - properties._diskSizeGb = 1; - if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) - return "diskSizeGb: integer|Long expected"; - } - if (message.savedState != null && message.hasOwnProperty("savedState")) { - properties._savedState = 1; - switch (message.savedState) { - default: - return "savedState: enum value expected"; - case 0: - case 1: - break; - } - } - if (message.diskType != null && message.hasOwnProperty("diskType")) { - properties._diskType = 1; - if (!$util.isString(message.diskType)) - return "diskType: string expected"; - } - if (message.type != null && message.hasOwnProperty("type")) { - properties._type = 1; - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates an AttachedDisk message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk - */ - AttachedDisk.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AttachedDisk) - return object; - var message = new $root.google.cloud.backupdr.v1.AttachedDisk(); - if (object.initializeParams != null) { - if (typeof object.initializeParams !== "object") - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.initializeParams: object expected"); - message.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.fromObject(object.initializeParams); - } - if (object.deviceName != null) - message.deviceName = String(object.deviceName); - if (object.kind != null) - message.kind = String(object.kind); - switch (object.diskTypeDeprecated) { - default: - if (typeof object.diskTypeDeprecated === "number") { - message.diskTypeDeprecated = object.diskTypeDeprecated; - break; - } - break; - case "DISK_TYPE_UNSPECIFIED": - case 0: - message.diskTypeDeprecated = 0; - break; - case "SCRATCH": - case 1: - message.diskTypeDeprecated = 1; - break; - case "PERSISTENT": - case 2: - message.diskTypeDeprecated = 2; - break; - } - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "DISK_MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "READ_WRITE": - case 1: - message.mode = 1; - break; - case "READ_ONLY": - case 2: - message.mode = 2; - break; - case "LOCKED": - case 3: - message.mode = 3; - break; - } - if (object.source != null) - message.source = String(object.source); - if (object.index != null) - if ($util.Long) - (message.index = $util.Long.fromValue(object.index)).unsigned = false; - else if (typeof object.index === "string") - message.index = parseInt(object.index, 10); - else if (typeof object.index === "number") - message.index = object.index; - else if (typeof object.index === "object") - message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); - if (object.boot != null) - message.boot = Boolean(object.boot); - if (object.autoDelete != null) - message.autoDelete = Boolean(object.autoDelete); - if (object.license) { - if (!Array.isArray(object.license)) - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.license: array expected"); - message.license = []; - for (var i = 0; i < object.license.length; ++i) - message.license[i] = String(object.license[i]); - } - switch (object.diskInterface) { - default: - if (typeof object.diskInterface === "number") { - message.diskInterface = object.diskInterface; - break; - } - break; - case "DISK_INTERFACE_UNSPECIFIED": - case 0: - message.diskInterface = 0; - break; - case "SCSI": - case 1: - message.diskInterface = 1; - break; - case "NVME": - case 2: - message.diskInterface = 2; - break; - case "NVDIMM": - case 3: - message.diskInterface = 3; - break; - case "ISCSI": - case 4: - message.diskInterface = 4; - break; - } - if (object.guestOsFeature) { - if (!Array.isArray(object.guestOsFeature)) - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.guestOsFeature: array expected"); - message.guestOsFeature = []; - for (var i = 0; i < object.guestOsFeature.length; ++i) { - if (typeof object.guestOsFeature[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.guestOsFeature: object expected"); - message.guestOsFeature[i] = $root.google.cloud.backupdr.v1.GuestOsFeature.fromObject(object.guestOsFeature[i]); - } - } - if (object.diskEncryptionKey != null) { - if (typeof object.diskEncryptionKey !== "object") - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.diskEncryptionKey: object expected"); - message.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.fromObject(object.diskEncryptionKey); - } - if (object.diskSizeGb != null) - if ($util.Long) - (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; - else if (typeof object.diskSizeGb === "string") - message.diskSizeGb = parseInt(object.diskSizeGb, 10); - else if (typeof object.diskSizeGb === "number") - message.diskSizeGb = object.diskSizeGb; - else if (typeof object.diskSizeGb === "object") - message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); - switch (object.savedState) { - default: - if (typeof object.savedState === "number") { - message.savedState = object.savedState; - break; - } - break; - case "DISK_SAVED_STATE_UNSPECIFIED": - case 0: - message.savedState = 0; - break; - case "PRESERVED": - case 1: - message.savedState = 1; - break; - } - if (object.diskType != null) - message.diskType = String(object.diskType); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "DISK_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "SCRATCH": - case 1: - message.type = 1; - break; - case "PERSISTENT": - case 2: - message.type = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk} message AttachedDisk - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AttachedDisk.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.license = []; - object.guestOsFeature = []; - } - if (message.initializeParams != null && message.hasOwnProperty("initializeParams")) { - object.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.toObject(message.initializeParams, options); - if (options.oneofs) - object._initializeParams = "initializeParams"; - } - if (message.deviceName != null && message.hasOwnProperty("deviceName")) { - object.deviceName = message.deviceName; - if (options.oneofs) - object._deviceName = "deviceName"; - } - if (message.kind != null && message.hasOwnProperty("kind")) { - object.kind = message.kind; - if (options.oneofs) - object._kind = "kind"; - } - if (message.diskTypeDeprecated != null && message.hasOwnProperty("diskTypeDeprecated")) { - object.diskTypeDeprecated = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated] === undefined ? message.diskTypeDeprecated : $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated] : message.diskTypeDeprecated; - if (options.oneofs) - object._diskTypeDeprecated = "diskTypeDeprecated"; - } - if (message.mode != null && message.hasOwnProperty("mode")) { - object.mode = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode] === undefined ? message.mode : $root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode] : message.mode; - if (options.oneofs) - object._mode = "mode"; - } - if (message.source != null && message.hasOwnProperty("source")) { - object.source = message.source; - if (options.oneofs) - object._source = "source"; - } - if (message.index != null && message.hasOwnProperty("index")) { - if (typeof message.index === "number") - object.index = options.longs === String ? String(message.index) : message.index; - else - object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; - if (options.oneofs) - object._index = "index"; - } - if (message.boot != null && message.hasOwnProperty("boot")) { - object.boot = message.boot; - if (options.oneofs) - object._boot = "boot"; - } - if (message.autoDelete != null && message.hasOwnProperty("autoDelete")) { - object.autoDelete = message.autoDelete; - if (options.oneofs) - object._autoDelete = "autoDelete"; - } - if (message.license && message.license.length) { - object.license = []; - for (var j = 0; j < message.license.length; ++j) - object.license[j] = message.license[j]; - } - if (message.diskInterface != null && message.hasOwnProperty("diskInterface")) { - object.diskInterface = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskInterface[message.diskInterface] === undefined ? message.diskInterface : $root.google.cloud.backupdr.v1.AttachedDisk.DiskInterface[message.diskInterface] : message.diskInterface; - if (options.oneofs) - object._diskInterface = "diskInterface"; - } - if (message.guestOsFeature && message.guestOsFeature.length) { - object.guestOsFeature = []; - for (var j = 0; j < message.guestOsFeature.length; ++j) - object.guestOsFeature[j] = $root.google.cloud.backupdr.v1.GuestOsFeature.toObject(message.guestOsFeature[j], options); - } - if (message.diskEncryptionKey != null && message.hasOwnProperty("diskEncryptionKey")) { - object.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.toObject(message.diskEncryptionKey, options); - if (options.oneofs) - object._diskEncryptionKey = "diskEncryptionKey"; - } - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) { - if (typeof message.diskSizeGb === "number") - object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; - else - object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; - if (options.oneofs) - object._diskSizeGb = "diskSizeGb"; - } - if (message.savedState != null && message.hasOwnProperty("savedState")) { - object.savedState = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState] === undefined ? message.savedState : $root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState] : message.savedState; - if (options.oneofs) - object._savedState = "savedState"; - } - if (message.diskType != null && message.hasOwnProperty("diskType")) { - object.diskType = message.diskType; - if (options.oneofs) - object._diskType = "diskType"; - } - if (message.type != null && message.hasOwnProperty("type")) { - object.type = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type] : message.type; - if (options.oneofs) - object._type = "type"; - } - return object; - }; - - /** - * Converts this AttachedDisk to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - * @returns {Object.} JSON object - */ - AttachedDisk.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AttachedDisk - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AttachedDisk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AttachedDisk"; - }; - - AttachedDisk.InitializeParams = (function() { - - /** - * Properties of an InitializeParams. - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @interface IInitializeParams - * @property {string|null} [diskName] InitializeParams diskName - * @property {Array.|null} [replicaZones] InitializeParams replicaZones - */ - - /** - * Constructs a new InitializeParams. - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @classdesc Represents an InitializeParams. - * @implements IInitializeParams - * @constructor - * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams=} [properties] Properties to set - */ - function InitializeParams(properties) { - this.replicaZones = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InitializeParams diskName. - * @member {string|null|undefined} diskName - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @instance - */ - InitializeParams.prototype.diskName = null; - - /** - * InitializeParams replicaZones. - * @member {Array.} replicaZones - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @instance - */ - InitializeParams.prototype.replicaZones = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * InitializeParams _diskName. - * @member {"diskName"|undefined} _diskName - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @instance - */ - Object.defineProperty(InitializeParams.prototype, "_diskName", { - get: $util.oneOfGetter($oneOfFields = ["diskName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new InitializeParams instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams instance - */ - InitializeParams.create = function create(properties) { - return new InitializeParams(properties); - }; - - /** - * Encodes the specified InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams} message InitializeParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitializeParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.diskName != null && Object.hasOwnProperty.call(message, "diskName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.diskName); - if (message.replicaZones != null && message.replicaZones.length) - for (var i = 0; i < message.replicaZones.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.replicaZones[i]); - return writer; - }; - - /** - * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams} message InitializeParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitializeParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InitializeParams message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitializeParams.decode = function 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.backupdr.v1.AttachedDisk.InitializeParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.diskName = reader.string(); - break; - } - case 2: { - if (!(message.replicaZones && message.replicaZones.length)) - message.replicaZones = []; - message.replicaZones.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InitializeParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitializeParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InitializeParams message. - * @function verify - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InitializeParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.diskName != null && message.hasOwnProperty("diskName")) { - properties._diskName = 1; - if (!$util.isString(message.diskName)) - return "diskName: string expected"; - } - if (message.replicaZones != null && message.hasOwnProperty("replicaZones")) { - if (!Array.isArray(message.replicaZones)) - return "replicaZones: array expected"; - for (var i = 0; i < message.replicaZones.length; ++i) - if (!$util.isString(message.replicaZones[i])) - return "replicaZones: string[] expected"; - } - return null; - }; - - /** - * Creates an InitializeParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams - */ - InitializeParams.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams) - return object; - var message = new $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams(); - if (object.diskName != null) - message.diskName = String(object.diskName); - if (object.replicaZones) { - if (!Array.isArray(object.replicaZones)) - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.InitializeParams.replicaZones: array expected"); - message.replicaZones = []; - for (var i = 0; i < object.replicaZones.length; ++i) - message.replicaZones[i] = String(object.replicaZones[i]); - } - return message; - }; - - /** - * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} message InitializeParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InitializeParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.replicaZones = []; - if (message.diskName != null && message.hasOwnProperty("diskName")) { - object.diskName = message.diskName; - if (options.oneofs) - object._diskName = "diskName"; - } - if (message.replicaZones && message.replicaZones.length) { - object.replicaZones = []; - for (var j = 0; j < message.replicaZones.length; ++j) - object.replicaZones[j] = message.replicaZones[j]; - } - return object; - }; - - /** - * Converts this InitializeParams to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @instance - * @returns {Object.} JSON object - */ - InitializeParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InitializeParams - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InitializeParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AttachedDisk.InitializeParams"; - }; - - return InitializeParams; - })(); - - /** - * DiskType enum. - * @name google.cloud.backupdr.v1.AttachedDisk.DiskType - * @enum {number} - * @property {number} DISK_TYPE_UNSPECIFIED=0 DISK_TYPE_UNSPECIFIED value - * @property {number} SCRATCH=1 SCRATCH value - * @property {number} PERSISTENT=2 PERSISTENT value - */ - AttachedDisk.DiskType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DISK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCRATCH"] = 1; - values[valuesById[2] = "PERSISTENT"] = 2; - return values; - })(); - - /** - * DiskMode enum. - * @name google.cloud.backupdr.v1.AttachedDisk.DiskMode - * @enum {number} - * @property {number} DISK_MODE_UNSPECIFIED=0 DISK_MODE_UNSPECIFIED value - * @property {number} READ_WRITE=1 READ_WRITE value - * @property {number} READ_ONLY=2 READ_ONLY value - * @property {number} LOCKED=3 LOCKED value - */ - AttachedDisk.DiskMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DISK_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "READ_WRITE"] = 1; - values[valuesById[2] = "READ_ONLY"] = 2; - values[valuesById[3] = "LOCKED"] = 3; - return values; - })(); - - /** - * DiskInterface enum. - * @name google.cloud.backupdr.v1.AttachedDisk.DiskInterface - * @enum {number} - * @property {number} DISK_INTERFACE_UNSPECIFIED=0 DISK_INTERFACE_UNSPECIFIED value - * @property {number} SCSI=1 SCSI value - * @property {number} NVME=2 NVME value - * @property {number} NVDIMM=3 NVDIMM value - * @property {number} ISCSI=4 ISCSI value - */ - AttachedDisk.DiskInterface = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DISK_INTERFACE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCSI"] = 1; - values[valuesById[2] = "NVME"] = 2; - values[valuesById[3] = "NVDIMM"] = 3; - values[valuesById[4] = "ISCSI"] = 4; - return values; - })(); - - /** - * DiskSavedState enum. - * @name google.cloud.backupdr.v1.AttachedDisk.DiskSavedState - * @enum {number} - * @property {number} DISK_SAVED_STATE_UNSPECIFIED=0 DISK_SAVED_STATE_UNSPECIFIED value - * @property {number} PRESERVED=1 PRESERVED value - */ - AttachedDisk.DiskSavedState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DISK_SAVED_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRESERVED"] = 1; - return values; - })(); - - return AttachedDisk; - })(); - - v1.GuestOsFeature = (function() { - - /** - * Properties of a GuestOsFeature. - * @memberof google.cloud.backupdr.v1 - * @interface IGuestOsFeature - * @property {google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null} [type] GuestOsFeature type - */ - - /** - * Constructs a new GuestOsFeature. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GuestOsFeature. - * @implements IGuestOsFeature - * @constructor - * @param {google.cloud.backupdr.v1.IGuestOsFeature=} [properties] Properties to set - */ - function GuestOsFeature(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GuestOsFeature type. - * @member {google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null|undefined} type - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @instance - */ - GuestOsFeature.prototype.type = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * GuestOsFeature _type. - * @member {"type"|undefined} _type - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @instance - */ - Object.defineProperty(GuestOsFeature.prototype, "_type", { - get: $util.oneOfGetter($oneOfFields = ["type"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GuestOsFeature instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {google.cloud.backupdr.v1.IGuestOsFeature=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature instance - */ - GuestOsFeature.create = function create(properties) { - return new GuestOsFeature(properties); - }; - - /** - * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {google.cloud.backupdr.v1.IGuestOsFeature} message GuestOsFeature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GuestOsFeature.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - return writer; - }; - - /** - * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {google.cloud.backupdr.v1.IGuestOsFeature} message GuestOsFeature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GuestOsFeature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GuestOsFeature message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GuestOsFeature.decode = function 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.backupdr.v1.GuestOsFeature(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GuestOsFeature.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GuestOsFeature message. - * @function verify - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GuestOsFeature.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.type != null && message.hasOwnProperty("type")) { - properties._type = 1; - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - break; - } - } - return null; - }; - - /** - * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature - */ - GuestOsFeature.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GuestOsFeature) - return object; - var message = new $root.google.cloud.backupdr.v1.GuestOsFeature(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "FEATURE_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "VIRTIO_SCSI_MULTIQUEUE": - case 1: - message.type = 1; - break; - case "WINDOWS": - case 2: - message.type = 2; - break; - case "MULTI_IP_SUBNET": - case 3: - message.type = 3; - break; - case "UEFI_COMPATIBLE": - case 4: - message.type = 4; - break; - case "SECURE_BOOT": - case 5: - message.type = 5; - break; - case "GVNIC": - case 6: - message.type = 6; - break; - case "SEV_CAPABLE": - case 7: - message.type = 7; - break; - case "BARE_METAL_LINUX_COMPATIBLE": - case 8: - message.type = 8; - break; - case "SUSPEND_RESUME_COMPATIBLE": - case 9: - message.type = 9; - break; - case "SEV_LIVE_MIGRATABLE": - case 10: - message.type = 10; - break; - case "SEV_SNP_CAPABLE": - case 11: - message.type = 11; - break; - case "TDX_CAPABLE": - case 12: - message.type = 12; - break; - case "IDPF": - case 13: - message.type = 13; - break; - case "SEV_LIVE_MIGRATABLE_V2": - case 14: - message.type = 14; - break; - } - return message; - }; - - /** - * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {google.cloud.backupdr.v1.GuestOsFeature} message GuestOsFeature - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GuestOsFeature.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.type != null && message.hasOwnProperty("type")) { - object.type = options.enums === String ? $root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type] : message.type; - if (options.oneofs) - object._type = "type"; - } - return object; - }; - - /** - * Converts this GuestOsFeature to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @instance - * @returns {Object.} JSON object - */ - GuestOsFeature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GuestOsFeature - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GuestOsFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GuestOsFeature"; - }; - - /** - * FeatureType enum. - * @name google.cloud.backupdr.v1.GuestOsFeature.FeatureType - * @enum {number} - * @property {number} FEATURE_TYPE_UNSPECIFIED=0 FEATURE_TYPE_UNSPECIFIED value - * @property {number} VIRTIO_SCSI_MULTIQUEUE=1 VIRTIO_SCSI_MULTIQUEUE value - * @property {number} WINDOWS=2 WINDOWS value - * @property {number} MULTI_IP_SUBNET=3 MULTI_IP_SUBNET value - * @property {number} UEFI_COMPATIBLE=4 UEFI_COMPATIBLE value - * @property {number} SECURE_BOOT=5 SECURE_BOOT value - * @property {number} GVNIC=6 GVNIC value - * @property {number} SEV_CAPABLE=7 SEV_CAPABLE value - * @property {number} BARE_METAL_LINUX_COMPATIBLE=8 BARE_METAL_LINUX_COMPATIBLE value - * @property {number} SUSPEND_RESUME_COMPATIBLE=9 SUSPEND_RESUME_COMPATIBLE value - * @property {number} SEV_LIVE_MIGRATABLE=10 SEV_LIVE_MIGRATABLE value - * @property {number} SEV_SNP_CAPABLE=11 SEV_SNP_CAPABLE value - * @property {number} TDX_CAPABLE=12 TDX_CAPABLE value - * @property {number} IDPF=13 IDPF value - * @property {number} SEV_LIVE_MIGRATABLE_V2=14 SEV_LIVE_MIGRATABLE_V2 value - */ - GuestOsFeature.FeatureType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FEATURE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "VIRTIO_SCSI_MULTIQUEUE"] = 1; - values[valuesById[2] = "WINDOWS"] = 2; - values[valuesById[3] = "MULTI_IP_SUBNET"] = 3; - values[valuesById[4] = "UEFI_COMPATIBLE"] = 4; - values[valuesById[5] = "SECURE_BOOT"] = 5; - values[valuesById[6] = "GVNIC"] = 6; - values[valuesById[7] = "SEV_CAPABLE"] = 7; - values[valuesById[8] = "BARE_METAL_LINUX_COMPATIBLE"] = 8; - values[valuesById[9] = "SUSPEND_RESUME_COMPATIBLE"] = 9; - values[valuesById[10] = "SEV_LIVE_MIGRATABLE"] = 10; - values[valuesById[11] = "SEV_SNP_CAPABLE"] = 11; - values[valuesById[12] = "TDX_CAPABLE"] = 12; - values[valuesById[13] = "IDPF"] = 13; - values[valuesById[14] = "SEV_LIVE_MIGRATABLE_V2"] = 14; - return values; - })(); - - return GuestOsFeature; - })(); - - /** - * KeyRevocationActionType enum. - * @name google.cloud.backupdr.v1.KeyRevocationActionType - * @enum {number} - * @property {number} KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED=0 KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED value - * @property {number} NONE=1 NONE value - * @property {number} STOP=2 STOP value - */ - v1.KeyRevocationActionType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NONE"] = 1; - values[valuesById[2] = "STOP"] = 2; - return values; - })(); - - return v1; - })(); - - return backupdr; - })(); - - 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.FieldInfo = (function() { - - /** - * Properties of a FieldInfo. - * @memberof google.api - * @interface IFieldInfo - * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format - */ - - /** - * Constructs a new FieldInfo. - * @memberof google.api - * @classdesc Represents a FieldInfo. - * @implements IFieldInfo - * @constructor - * @param {google.api.IFieldInfo=} [properties] Properties to set - */ - function FieldInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldInfo format. - * @member {google.api.FieldInfo.Format} format - * @memberof google.api.FieldInfo - * @instance - */ - FieldInfo.prototype.format = 0; - - /** - * Creates a new FieldInfo instance using the specified properties. - * @function create - * @memberof google.api.FieldInfo - * @static - * @param {google.api.IFieldInfo=} [properties] Properties to set - * @returns {google.api.FieldInfo} FieldInfo instance - */ - FieldInfo.create = function create(properties) { - return new FieldInfo(properties); - }; - - /** - * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @function encode - * @memberof google.api.FieldInfo - * @static - * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); - return writer; - }; - - /** - * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.FieldInfo - * @static - * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldInfo message from the specified reader or buffer. - * @function decode - * @memberof google.api.FieldInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.FieldInfo} FieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldInfo.decode = function 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.FieldInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.format = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.FieldInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.FieldInfo} FieldInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldInfo message. - * @function verify - * @memberof google.api.FieldInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.FieldInfo - * @static - * @param {Object.} object Plain object - * @returns {google.api.FieldInfo} FieldInfo - */ - FieldInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.FieldInfo) - return object; - var message = new $root.google.api.FieldInfo(); - switch (object.format) { - default: - if (typeof object.format === "number") { - message.format = object.format; - break; - } - break; - case "FORMAT_UNSPECIFIED": - case 0: - message.format = 0; - break; - case "UUID4": - case 1: - message.format = 1; - break; - case "IPV4": - case 2: - message.format = 2; - break; - case "IPV6": - case 3: - message.format = 3; - break; - case "IPV4_OR_IPV6": - case 4: - message.format = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.FieldInfo - * @static - * @param {google.api.FieldInfo} message FieldInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; - return object; - }; - - /** - * Converts this FieldInfo to JSON. - * @function toJSON - * @memberof google.api.FieldInfo - * @instance - * @returns {Object.} JSON object - */ - FieldInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldInfo - * @function getTypeUrl - * @memberof google.api.FieldInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.FieldInfo"; - }; - - /** - * Format enum. - * @name google.api.FieldInfo.Format - * @enum {number} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} UUID4=1 UUID4 value - * @property {number} IPV4=2 IPV4 value - * @property {number} IPV6=3 IPV6 value - * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value - */ - FieldInfo.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "UUID4"] = 1; - values[valuesById[2] = "IPV4"] = 2; - values[valuesById[3] = "IPV6"] = 3; - values[valuesById[4] = "IPV4_OR_IPV6"] = 4; - return values; - })(); - - return FieldInfo; - })(); - - 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.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo - * @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.fieldInfo. - * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldInfo"] = null; - - /** - * 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(); - if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) - $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).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 291403980: { - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); - 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.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { - var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); - if (error) - return ".google.api.fieldInfo." + error; - } - 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.fieldInfo"] != null) { - if (typeof object[".google.api.fieldInfo"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); - } - 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; - object[".google.api.fieldInfo"] = 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); - if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) - object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], 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.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; - })(); - - 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.DoubleValue = (function() { - - /** - * Properties of a DoubleValue. - * @memberof google.protobuf - * @interface IDoubleValue - * @property {number|null} [value] DoubleValue value - */ - - /** - * Constructs a new DoubleValue. - * @memberof google.protobuf - * @classdesc Represents a DoubleValue. - * @implements IDoubleValue - * @constructor - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set - */ - function DoubleValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DoubleValue value. - * @member {number} value - * @memberof google.protobuf.DoubleValue - * @instance - */ - DoubleValue.prototype.value = 0; - - /** - * Creates a new DoubleValue instance using the specified properties. - * @function create - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set - * @returns {google.protobuf.DoubleValue} DoubleValue instance - */ - DoubleValue.create = function create(properties) { - return new DoubleValue(properties); - }; - - /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DoubleValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); - return writer; - }; - - /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DoubleValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DoubleValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DoubleValue} DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DoubleValue.decode = function 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.DoubleValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DoubleValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DoubleValue} DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DoubleValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DoubleValue message. - * @function verify - * @memberof google.protobuf.DoubleValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DoubleValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - return null; - }; - - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DoubleValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DoubleValue} DoubleValue - */ - DoubleValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DoubleValue) - return object; - var message = new $root.google.protobuf.DoubleValue(); - if (object.value != null) - message.value = Number(object.value); - return message; - }; - - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.DoubleValue} message DoubleValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DoubleValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; - - /** - * Converts this DoubleValue to JSON. - * @function toJSON - * @memberof google.protobuf.DoubleValue - * @instance - * @returns {Object.} JSON object - */ - DoubleValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DoubleValue - * @function getTypeUrl - * @memberof google.protobuf.DoubleValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DoubleValue"; - }; - - return DoubleValue; - })(); - - protobuf.FloatValue = (function() { - - /** - * Properties of a FloatValue. - * @memberof google.protobuf - * @interface IFloatValue - * @property {number|null} [value] FloatValue value - */ - - /** - * Constructs a new FloatValue. - * @memberof google.protobuf - * @classdesc Represents a FloatValue. - * @implements IFloatValue - * @constructor - * @param {google.protobuf.IFloatValue=} [properties] Properties to set - */ - function FloatValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FloatValue value. - * @member {number} value - * @memberof google.protobuf.FloatValue - * @instance - */ - FloatValue.prototype.value = 0; - - /** - * Creates a new FloatValue instance using the specified properties. - * @function create - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue=} [properties] Properties to set - * @returns {google.protobuf.FloatValue} FloatValue instance - */ - FloatValue.create = function create(properties) { - return new FloatValue(properties); - }; - - /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FloatValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); - return writer; - }; - - /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FloatValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FloatValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FloatValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FloatValue} FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FloatValue.decode = function 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.FloatValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FloatValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FloatValue} FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FloatValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FloatValue message. - * @function verify - * @memberof google.protobuf.FloatValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FloatValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - return null; - }; - - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FloatValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FloatValue} FloatValue - */ - FloatValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FloatValue) - return object; - var message = new $root.google.protobuf.FloatValue(); - if (object.value != null) - message.value = Number(object.value); - return message; - }; - - /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.FloatValue} message FloatValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FloatValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; - - /** - * Converts this FloatValue to JSON. - * @function toJSON - * @memberof google.protobuf.FloatValue - * @instance - * @returns {Object.} JSON object - */ - FloatValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FloatValue - * @function getTypeUrl - * @memberof google.protobuf.FloatValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FloatValue"; - }; - - return FloatValue; - })(); - - protobuf.Int64Value = (function() { - - /** - * Properties of an Int64Value. - * @memberof google.protobuf - * @interface IInt64Value - * @property {number|Long|null} [value] Int64Value value - */ - - /** - * Constructs a new Int64Value. - * @memberof google.protobuf - * @classdesc Represents an Int64Value. - * @implements IInt64Value - * @constructor - * @param {google.protobuf.IInt64Value=} [properties] Properties to set - */ - function Int64Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Int64Value value. - * @member {number|Long} value - * @memberof google.protobuf.Int64Value - * @instance - */ - Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new Int64Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value=} [properties] Properties to set - * @returns {google.protobuf.Int64Value} Int64Value instance - */ - Int64Value.create = function create(properties) { - return new Int64Value(properties); - }; - - /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int64Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); - return writer; - }; - - /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Int64Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Int64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Int64Value} Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int64Value.decode = function 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.Int64Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Int64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Int64Value} Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int64Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Int64Value message. - * @function verify - * @memberof google.protobuf.Int64Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Int64Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; - return null; - }; - - /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int64Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int64Value} Int64Value - */ - Int64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int64Value) - return object; - var message = new $root.google.protobuf.Int64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = false; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.Int64Value} message Int64Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Int64Value.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.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; - return object; - }; - - /** - * Converts this Int64Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int64Value - * @instance - * @returns {Object.} JSON object - */ - Int64Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Int64Value - * @function getTypeUrl - * @memberof google.protobuf.Int64Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Int64Value"; - }; - - return Int64Value; - })(); - - protobuf.UInt64Value = (function() { - - /** - * Properties of a UInt64Value. - * @memberof google.protobuf - * @interface IUInt64Value - * @property {number|Long|null} [value] UInt64Value value - */ - - /** - * Constructs a new UInt64Value. - * @memberof google.protobuf - * @classdesc Represents a UInt64Value. - * @implements IUInt64Value - * @constructor - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set - */ - function UInt64Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UInt64Value value. - * @member {number|Long} value - * @memberof google.protobuf.UInt64Value - * @instance - */ - UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new UInt64Value instance using the specified properties. - * @function create - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set - * @returns {google.protobuf.UInt64Value} UInt64Value instance - */ - UInt64Value.create = function create(properties) { - return new UInt64Value(properties); - }; - - /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt64Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); - return writer; - }; - - /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UInt64Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UInt64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UInt64Value} UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt64Value.decode = function 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.UInt64Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.uint64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UInt64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UInt64Value} UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt64Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UInt64Value message. - * @function verify - * @memberof google.protobuf.UInt64Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UInt64Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; - return null; - }; - - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UInt64Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UInt64Value} UInt64Value - */ - UInt64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt64Value) - return object; - var message = new $root.google.protobuf.UInt64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = true; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.UInt64Value} message UInt64Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UInt64Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; - return object; - }; - - /** - * Converts this UInt64Value to JSON. - * @function toJSON - * @memberof google.protobuf.UInt64Value - * @instance - * @returns {Object.} JSON object - */ - UInt64Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UInt64Value - * @function getTypeUrl - * @memberof google.protobuf.UInt64Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UInt64Value"; - }; - - return UInt64Value; - })(); - - protobuf.Int32Value = (function() { - - /** - * Properties of an Int32Value. - * @memberof google.protobuf - * @interface IInt32Value - * @property {number|null} [value] Int32Value value - */ - - /** - * Constructs a new Int32Value. - * @memberof google.protobuf - * @classdesc Represents an Int32Value. - * @implements IInt32Value - * @constructor - * @param {google.protobuf.IInt32Value=} [properties] Properties to set - */ - function Int32Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Int32Value value. - * @member {number} value - * @memberof google.protobuf.Int32Value - * @instance - */ - Int32Value.prototype.value = 0; - - /** - * Creates a new Int32Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value=} [properties] Properties to set - * @returns {google.protobuf.Int32Value} Int32Value instance - */ - Int32Value.create = function create(properties) { - return new Int32Value(properties); - }; - - /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int32Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); - return writer; - }; - - /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Int32Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Int32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Int32Value} Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int32Value.decode = function 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.Int32Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Int32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Int32Value} Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int32Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Int32Value message. - * @function verify - * @memberof google.protobuf.Int32Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Int32Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; - return null; - }; - - /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int32Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int32Value} Int32Value - */ - Int32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int32Value) - return object; - var message = new $root.google.protobuf.Int32Value(); - if (object.value != null) - message.value = object.value | 0; - return message; - }; - - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.Int32Value} message Int32Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Int32Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this Int32Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int32Value - * @instance - * @returns {Object.} JSON object - */ - Int32Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Int32Value - * @function getTypeUrl - * @memberof google.protobuf.Int32Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Int32Value"; - }; - - return Int32Value; - })(); - - protobuf.UInt32Value = (function() { - - /** - * Properties of a UInt32Value. - * @memberof google.protobuf - * @interface IUInt32Value - * @property {number|null} [value] UInt32Value value - */ - - /** - * Constructs a new UInt32Value. - * @memberof google.protobuf - * @classdesc Represents a UInt32Value. - * @implements IUInt32Value - * @constructor - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set - */ - function UInt32Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UInt32Value value. - * @member {number} value - * @memberof google.protobuf.UInt32Value - * @instance - */ - UInt32Value.prototype.value = 0; - - /** - * Creates a new UInt32Value instance using the specified properties. - * @function create - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set - * @returns {google.protobuf.UInt32Value} UInt32Value instance - */ - UInt32Value.create = function create(properties) { - return new UInt32Value(properties); - }; - - /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt32Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); - return writer; - }; - - /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UInt32Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UInt32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UInt32Value} UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt32Value.decode = function 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.UInt32Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.uint32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UInt32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UInt32Value} UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UInt32Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UInt32Value message. - * @function verify - * @memberof google.protobuf.UInt32Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UInt32Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; - return null; - }; - - /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UInt32Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UInt32Value} UInt32Value - */ - UInt32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt32Value) - return object; - var message = new $root.google.protobuf.UInt32Value(); - if (object.value != null) - message.value = object.value >>> 0; - return message; - }; - - /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UInt32Value - * @static - * @param {google.protobuf.UInt32Value} message UInt32Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UInt32Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this UInt32Value to JSON. - * @function toJSON - * @memberof google.protobuf.UInt32Value - * @instance - * @returns {Object.} JSON object - */ - UInt32Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UInt32Value - * @function getTypeUrl - * @memberof google.protobuf.UInt32Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UInt32Value"; - }; - - return UInt32Value; - })(); - - protobuf.BoolValue = (function() { - - /** - * Properties of a BoolValue. - * @memberof google.protobuf - * @interface IBoolValue - * @property {boolean|null} [value] BoolValue value - */ - - /** - * Constructs a new BoolValue. - * @memberof google.protobuf - * @classdesc Represents a BoolValue. - * @implements IBoolValue - * @constructor - * @param {google.protobuf.IBoolValue=} [properties] Properties to set - */ - function BoolValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BoolValue value. - * @member {boolean} value - * @memberof google.protobuf.BoolValue - * @instance - */ - BoolValue.prototype.value = false; - - /** - * Creates a new BoolValue instance using the specified properties. - * @function create - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue=} [properties] Properties to set - * @returns {google.protobuf.BoolValue} BoolValue instance - */ - BoolValue.create = function create(properties) { - return new BoolValue(properties); - }; - - /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BoolValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); - return writer; - }; - - /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BoolValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BoolValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.BoolValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.BoolValue} BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BoolValue.decode = function 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.BoolValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.BoolValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.BoolValue} BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BoolValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BoolValue message. - * @function verify - * @memberof google.protobuf.BoolValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BoolValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "boolean") - return "value: boolean expected"; - return null; - }; - - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.BoolValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.BoolValue} BoolValue - */ - BoolValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BoolValue) - return object; - var message = new $root.google.protobuf.BoolValue(); - if (object.value != null) - message.value = Boolean(object.value); - return message; - }; - - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.BoolValue} message BoolValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BoolValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = false; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this BoolValue to JSON. - * @function toJSON - * @memberof google.protobuf.BoolValue - * @instance - * @returns {Object.} JSON object - */ - BoolValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BoolValue - * @function getTypeUrl - * @memberof google.protobuf.BoolValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.BoolValue"; - }; - - return BoolValue; - })(); - - protobuf.StringValue = (function() { - - /** - * Properties of a StringValue. - * @memberof google.protobuf - * @interface IStringValue - * @property {string|null} [value] StringValue value - */ - - /** - * Constructs a new StringValue. - * @memberof google.protobuf - * @classdesc Represents a StringValue. - * @implements IStringValue - * @constructor - * @param {google.protobuf.IStringValue=} [properties] Properties to set - */ - function StringValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StringValue value. - * @member {string} value - * @memberof google.protobuf.StringValue - * @instance - */ - StringValue.prototype.value = ""; - - /** - * Creates a new StringValue instance using the specified properties. - * @function create - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue=} [properties] Properties to set - * @returns {google.protobuf.StringValue} StringValue instance - */ - StringValue.create = function create(properties) { - return new StringValue(properties); - }; - - /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - return writer; - }; - - /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StringValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StringValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.StringValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.StringValue} StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringValue.decode = function 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.StringValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.StringValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.StringValue} StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StringValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StringValue message. - * @function verify - * @memberof google.protobuf.StringValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StringValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.StringValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.StringValue} StringValue - */ - StringValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.StringValue) - return object; - var message = new $root.google.protobuf.StringValue(); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.StringValue} message StringValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StringValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this StringValue to JSON. - * @function toJSON - * @memberof google.protobuf.StringValue - * @instance - * @returns {Object.} JSON object - */ - StringValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StringValue - * @function getTypeUrl - * @memberof google.protobuf.StringValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.StringValue"; - }; - - return StringValue; - })(); - - protobuf.BytesValue = (function() { - - /** - * Properties of a BytesValue. - * @memberof google.protobuf - * @interface IBytesValue - * @property {Uint8Array|null} [value] BytesValue value - */ - - /** - * Constructs a new BytesValue. - * @memberof google.protobuf - * @classdesc Represents a BytesValue. - * @implements IBytesValue - * @constructor - * @param {google.protobuf.IBytesValue=} [properties] Properties to set - */ - function BytesValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BytesValue value. - * @member {Uint8Array} value - * @memberof google.protobuf.BytesValue - * @instance - */ - BytesValue.prototype.value = $util.newBuffer([]); - - /** - * Creates a new BytesValue instance using the specified properties. - * @function create - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue=} [properties] Properties to set - * @returns {google.protobuf.BytesValue} BytesValue instance - */ - BytesValue.create = function create(properties) { - return new BytesValue(properties); - }; - - /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BytesValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BytesValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BytesValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.BytesValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.BytesValue} BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BytesValue.decode = function 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.BytesValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.BytesValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.BytesValue} BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BytesValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BytesValue message. - * @function verify - * @memberof google.protobuf.BytesValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BytesValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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 a BytesValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.BytesValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.BytesValue} BytesValue - */ - BytesValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BytesValue) - return object; - var message = new $root.google.protobuf.BytesValue(); - 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 a BytesValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.BytesValue} message BytesValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BytesValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - 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 BytesValue to JSON. - * @function toJSON - * @memberof google.protobuf.BytesValue - * @instance - * @returns {Object.} JSON object - */ - BytesValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BytesValue - * @function getTypeUrl - * @memberof google.protobuf.BytesValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.BytesValue"; - }; - - return BytesValue; - })(); - - return protobuf; - })(); - - google.type = (function() { - - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; - - /** - * DayOfWeek enum. - * @name google.type.DayOfWeek - * @enum {number} - * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value - * @property {number} MONDAY=1 MONDAY value - * @property {number} TUESDAY=2 TUESDAY value - * @property {number} WEDNESDAY=3 WEDNESDAY value - * @property {number} THURSDAY=4 THURSDAY value - * @property {number} FRIDAY=5 FRIDAY value - * @property {number} SATURDAY=6 SATURDAY value - * @property {number} SUNDAY=7 SUNDAY value - */ - type.DayOfWeek = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; - values[valuesById[1] = "MONDAY"] = 1; - values[valuesById[2] = "TUESDAY"] = 2; - values[valuesById[3] = "WEDNESDAY"] = 3; - values[valuesById[4] = "THURSDAY"] = 4; - values[valuesById[5] = "FRIDAY"] = 5; - values[valuesById[6] = "SATURDAY"] = 6; - values[valuesById[7] = "SUNDAY"] = 7; - return values; - })(); - - /** - * Month enum. - * @name google.type.Month - * @enum {number} - * @property {number} MONTH_UNSPECIFIED=0 MONTH_UNSPECIFIED value - * @property {number} JANUARY=1 JANUARY value - * @property {number} FEBRUARY=2 FEBRUARY value - * @property {number} MARCH=3 MARCH value - * @property {number} APRIL=4 APRIL value - * @property {number} MAY=5 MAY value - * @property {number} JUNE=6 JUNE value - * @property {number} JULY=7 JULY value - * @property {number} AUGUST=8 AUGUST value - * @property {number} SEPTEMBER=9 SEPTEMBER value - * @property {number} OCTOBER=10 OCTOBER value - * @property {number} NOVEMBER=11 NOVEMBER value - * @property {number} DECEMBER=12 DECEMBER value - */ - type.Month = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MONTH_UNSPECIFIED"] = 0; - values[valuesById[1] = "JANUARY"] = 1; - values[valuesById[2] = "FEBRUARY"] = 2; - values[valuesById[3] = "MARCH"] = 3; - values[valuesById[4] = "APRIL"] = 4; - values[valuesById[5] = "MAY"] = 5; - values[valuesById[6] = "JUNE"] = 6; - values[valuesById[7] = "JULY"] = 7; - values[valuesById[8] = "AUGUST"] = 8; - values[valuesById[9] = "SEPTEMBER"] = 9; - values[valuesById[10] = "OCTOBER"] = 10; - values[valuesById[11] = "NOVEMBER"] = 11; - values[valuesById[12] = "DECEMBER"] = 12; - return values; - })(); - - return type; - })(); - - 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; - })(); - - 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; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json b/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json deleted file mode 100644 index bd9c5f04c63..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/protos/protos.json +++ /dev/null @@ -1,7136 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "backupdr": { - "nested": { - "v1": { - "options": { - "csharp_namespace": "Google.Cloud.BackupDR.V1", - "go_package": "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb", - "java_multiple_files": true, - "java_outer_classname": "BackupvaultGceProto", - "java_package": "com.google.cloud.backupdr.v1", - "php_namespace": "Google\\Cloud\\BackupDR\\V1", - "ruby_package": "Google::Cloud::BackupDR::V1" - }, - "nested": { - "BackupDR": { - "options": { - "(google.api.default_host)": "backupdr.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListManagementServers": { - "requestType": "ListManagementServersRequest", - "responseType": "ListManagementServersResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/managementServers", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/managementServers" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetManagementServer": { - "requestType": "GetManagementServerRequest", - "responseType": "ManagementServer", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/managementServers/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/managementServers/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateManagementServer": { - "requestType": "CreateManagementServerRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/managementServers", - "(google.api.http).body": "management_server", - "(google.api.method_signature)": "parent,management_server,management_server_id", - "(google.longrunning.operation_info).response_type": "ManagementServer", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/managementServers", - "body": "management_server" - } - }, - { - "(google.api.method_signature)": "parent,management_server,management_server_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "ManagementServer", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteManagementServer": { - "requestType": "DeleteManagementServerRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/managementServers/*}", - "(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/*/managementServers/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "CreateBackupVault": { - "requestType": "CreateBackupVaultRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupVaults", - "(google.api.http).body": "backup_vault", - "(google.api.method_signature)": "parent,backup_vault,backup_vault_id", - "(google.longrunning.operation_info).response_type": "BackupVault", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/backupVaults", - "body": "backup_vault" - } - }, - { - "(google.api.method_signature)": "parent,backup_vault,backup_vault_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "BackupVault", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListBackupVaults": { - "requestType": "ListBackupVaultsRequest", - "responseType": "ListBackupVaultsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupVaults", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/backupVaults" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "FetchUsableBackupVaults": { - "requestType": "FetchUsableBackupVaultsRequest", - "responseType": "FetchUsableBackupVaultsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/backupVaults:fetchUsable" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetBackupVault": { - "requestType": "GetBackupVaultRequest", - "responseType": "BackupVault", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/backupVaults/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateBackupVault": { - "requestType": "UpdateBackupVaultRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}", - "(google.api.http).body": "backup_vault", - "(google.api.method_signature)": "backup_vault,update_mask", - "(google.longrunning.operation_info).response_type": "BackupVault", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}", - "body": "backup_vault" - } - }, - { - "(google.api.method_signature)": "backup_vault,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "BackupVault", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteBackupVault": { - "requestType": "DeleteBackupVaultRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupVaults/*}", - "(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/*/backupVaults/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListDataSources": { - "requestType": "ListDataSourcesRequest", - "responseType": "ListDataSourcesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/backupVaults/*}/dataSources" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetDataSource": { - "requestType": "GetDataSourceRequest", - "responseType": "DataSource", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateDataSource": { - "requestType": "UpdateDataSourceRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}", - "(google.api.http).body": "data_source", - "(google.api.method_signature)": "data_source,update_mask", - "(google.longrunning.operation_info).response_type": "DataSource", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{data_source.name=projects/*/locations/*/backupVaults/*/dataSources/*}", - "body": "data_source" - } - }, - { - "(google.api.method_signature)": "data_source,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "DataSource", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "ListBackups": { - "requestType": "ListBackupsRequest", - "responseType": "ListBackupsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/backupVaults/*/dataSources/*}/backups" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetBackup": { - "requestType": "GetBackupRequest", - "responseType": "Backup", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "UpdateBackup": { - "requestType": "UpdateBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", - "(google.api.http).body": "backup", - "(google.api.method_signature)": "backup,update_mask", - "(google.longrunning.operation_info).response_type": "Backup", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{backup.name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", - "body": "backup" - } - }, - { - "(google.api.method_signature)": "backup,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Backup", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteBackup": { - "requestType": "DeleteBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "Backup", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Backup", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "RestoreBackup": { - "requestType": "RestoreBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "RestoreBackupResponse", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*/backups/*}:restore", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "RestoreBackupResponse", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "CreateBackupPlan": { - "requestType": "CreateBackupPlanRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupPlans", - "(google.api.http).body": "backup_plan", - "(google.api.method_signature)": "parent,backup_plan,backup_plan_id", - "(google.longrunning.operation_info).response_type": "BackupPlan", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/backupPlans", - "body": "backup_plan" - } - }, - { - "(google.api.method_signature)": "parent,backup_plan,backup_plan_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "BackupPlan", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "GetBackupPlan": { - "requestType": "GetBackupPlanRequest", - "responseType": "BackupPlan", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupPlans/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/backupPlans/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListBackupPlans": { - "requestType": "ListBackupPlansRequest", - "responseType": "ListBackupPlansResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupPlans", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/backupPlans" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "DeleteBackupPlan": { - "requestType": "DeleteBackupPlanRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupPlans/*}", - "(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/*/backupPlans/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "CreateBackupPlanAssociation": { - "requestType": "CreateBackupPlanAssociationRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", - "(google.api.http).body": "backup_plan_association", - "(google.api.method_signature)": "parent,backup_plan_association,backup_plan_association_id", - "(google.longrunning.operation_info).response_type": "BackupPlanAssociation", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", - "body": "backup_plan_association" - } - }, - { - "(google.api.method_signature)": "parent,backup_plan_association,backup_plan_association_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "BackupPlanAssociation", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "GetBackupPlanAssociation": { - "requestType": "GetBackupPlanAssociationRequest", - "responseType": "BackupPlanAssociation", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListBackupPlanAssociations": { - "requestType": "ListBackupPlanAssociationsRequest", - "responseType": "ListBackupPlanAssociationsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/backupPlanAssociations" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "DeleteBackupPlanAssociation": { - "requestType": "DeleteBackupPlanAssociationRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}", - "(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/*/backupPlanAssociations/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "TriggerBackup": { - "requestType": "TriggerBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name,rule_id", - "(google.longrunning.operation_info).response_type": "BackupPlanAssociation", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/backupPlanAssociations/*}:triggerBackup", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name,rule_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "BackupPlanAssociation", - "metadata_type": "OperationMetadata" - } - } - ] - } - } - }, - "NetworkConfig": { - "fields": { - "network": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "peeringMode": { - "type": "PeeringMode", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "PeeringMode": { - "values": { - "PEERING_MODE_UNSPECIFIED": 0, - "PRIVATE_SERVICE_ACCESS": 1 - } - } - } - }, - "ManagementURI": { - "fields": { - "webUi": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "api": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "WorkforceIdentityBasedManagementURI": { - "fields": { - "firstPartyManagementUri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "thirdPartyManagementUri": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "WorkforceIdentityBasedOAuth2ClientID": { - "fields": { - "firstPartyOauth2ClientId": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "thirdPartyOauth2ClientId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ManagementServer": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/ManagementServer", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/managementServers/{managementserver}", - "(google.api.resource).plural": "managementServers", - "(google.api.resource).singular": "managementServer" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "description": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "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" - } - }, - "type": { - "type": "InstanceType", - "id": 14, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "managementUri": { - "type": "ManagementURI", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "workforceIdentityBasedManagementUri": { - "type": "WorkforceIdentityBasedManagementURI", - "id": 16, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "state": { - "type": "InstanceState", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "networks": { - "rule": "repeated", - "type": "NetworkConfig", - "id": 8, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "etag": { - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "oauth2ClientId": { - "type": "string", - "id": 15, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "workforceIdentityBasedOauth2ClientId": { - "type": "WorkforceIdentityBasedOAuth2ClientID", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "baProxyUri": { - "rule": "repeated", - "type": "string", - "id": 18, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "satisfiesPzs": { - "type": "google.protobuf.BoolValue", - "id": 19, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "satisfiesPzi": { - "type": "bool", - "id": 20, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "InstanceType": { - "values": { - "INSTANCE_TYPE_UNSPECIFIED": 0, - "BACKUP_RESTORE": 1 - } - }, - "InstanceState": { - "values": { - "INSTANCE_STATE_UNSPECIFIED": 0, - "CREATING": 1, - "READY": 2, - "UPDATING": 3, - "DELETING": 4, - "REPAIRING": 5, - "MAINTENANCE": 6, - "ERROR": 7 - } - } - } - }, - "ListManagementServersRequest": { - "oneofs": { - "_filter": { - "oneof": [ - "filter" - ] - }, - "_orderBy": { - "oneof": [ - "orderBy" - ] - } - }, - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "ListManagementServersResponse": { - "fields": { - "managementServers": { - "rule": "repeated", - "type": "ManagementServer", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetManagementServerRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" - } - } - } - }, - "CreateManagementServerRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/ManagementServer" - } - }, - "managementServerId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "managementServer": { - "type": "ManagementServer", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteManagementServerRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/ManagementServer" - } - }, - "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" - } - }, - "additionalInfo": { - "keyType": "string", - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "BackupPlan": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/BackupPlan", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPlans/{backup_plan}", - "(google.api.resource).plural": "backupPlans", - "(google.api.resource).singular": "backupPlan" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backupRules": { - "rule": "repeated", - "type": "BackupRule", - "id": 6, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "state": { - "type": "State", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "resourceType": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "etag": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "backupVault": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" - } - }, - "backupVaultServiceAccount": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "DELETING": 3, - "INACTIVE": 4 - } - } - } - }, - "BackupRule": { - "oneofs": { - "backupScheduleOneof": { - "oneof": [ - "standardSchedule" - ] - } - }, - "fields": { - "ruleId": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "backupRetentionDays": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "standardSchedule": { - "type": "StandardSchedule", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "StandardSchedule": { - "fields": { - "recurrenceType": { - "type": "RecurrenceType", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "hourlyFrequency": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "daysOfWeek": { - "rule": "repeated", - "type": "google.type.DayOfWeek", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "daysOfMonth": { - "rule": "repeated", - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "weekDayOfMonth": { - "type": "WeekDayOfMonth", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "months": { - "rule": "repeated", - "type": "google.type.Month", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "backupWindow": { - "type": "BackupWindow", - "id": 7, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "timeZone": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - }, - "nested": { - "RecurrenceType": { - "values": { - "RECURRENCE_TYPE_UNSPECIFIED": 0, - "HOURLY": 1, - "DAILY": 2, - "WEEKLY": 3, - "MONTHLY": 4, - "YEARLY": 5 - } - } - } - }, - "BackupWindow": { - "fields": { - "startHourOfDay": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "endHourOfDay": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "WeekDayOfMonth": { - "fields": { - "weekOfMonth": { - "type": "WeekOfMonth", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dayOfWeek": { - "type": "google.type.DayOfWeek", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - }, - "nested": { - "WeekOfMonth": { - "values": { - "WEEK_OF_MONTH_UNSPECIFIED": 0, - "FIRST": 1, - "SECOND": 2, - "THIRD": 3, - "FOURTH": 4, - "LAST": 5 - } - } - } - }, - "CreateBackupPlanRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlan" - } - }, - "backupPlanId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupPlan": { - "type": "BackupPlan", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupPlansRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlan" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupPlansResponse": { - "fields": { - "backupPlans": { - "rule": "repeated", - "type": "BackupPlan", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetBackupPlanRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" - } - } - } - }, - "DeleteBackupPlanRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "BackupPlanAssociation": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/BackupPlanAssociation", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}", - "(google.api.resource).plural": "backupPlanAssociations", - "(google.api.resource).singular": "backupPlanAssociation" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "resourceType": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "resource": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupPlan": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "state": { - "type": "State", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "rulesConfigInfo": { - "rule": "repeated", - "type": "RuleConfigInfo", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dataSource": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "DELETING": 3, - "INACTIVE": 4 - } - } - } - }, - "RuleConfigInfo": { - "fields": { - "ruleId": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastBackupState": { - "type": "LastBackupState", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastBackupError": { - "type": "google.rpc.Status", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastSuccessfulBackupConsistencyTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "LastBackupState": { - "values": { - "LAST_BACKUP_STATE_UNSPECIFIED": 0, - "FIRST_BACKUP_PENDING": 1, - "PERMISSION_DENIED": 2, - "SUCCEEDED": 3, - "FAILED": 4 - } - } - } - }, - "CreateBackupPlanAssociationRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlanAssociation" - } - }, - "backupPlanAssociationId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupPlanAssociation": { - "type": "BackupPlanAssociation", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupPlanAssociationsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupPlanAssociation" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupPlanAssociationsResponse": { - "fields": { - "backupPlanAssociations": { - "rule": "repeated", - "type": "BackupPlanAssociation", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetBackupPlanAssociationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" - } - } - } - }, - "DeleteBackupPlanAssociationRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "TriggerBackupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" - } - }, - "ruleId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "BackupVault": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/BackupVault", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}", - "(google.api.resource).plural": "backupVaults", - "(google.api.resource).singular": "backupVault" - }, - "oneofs": { - "_description": { - "oneof": [ - "description" - ] - }, - "_createTime": { - "oneof": [ - "createTime" - ] - }, - "_updateTime": { - "oneof": [ - "updateTime" - ] - }, - "_backupMinimumEnforcedRetentionDuration": { - "oneof": [ - "backupMinimumEnforcedRetentionDuration" - ] - }, - "_deletable": { - "oneof": [ - "deletable" - ] - }, - "_etag": { - "oneof": [ - "etag" - ] - }, - "_effectiveTime": { - "oneof": [ - "effectiveTime" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "backupMinimumEnforcedRetentionDuration": { - "type": "google.protobuf.Duration", - "id": 20, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "proto3_optional": true - } - }, - "deletable": { - "type": "bool", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "etag": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "state": { - "type": "State", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "effectiveTime": { - "type": "google.protobuf.Timestamp", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "backupCount": { - "type": "int64", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "serviceAccount": { - "type": "string", - "id": 18, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "totalStoredBytes": { - "type": "int64", - "id": 19, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "uid": { - "type": "string", - "id": 21, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "annotations": { - "keyType": "string", - "type": "string", - "id": 22, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "accessRestriction": { - "type": "AccessRestriction", - "id": 24, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "DELETING": 3, - "ERROR": 4 - } - }, - "AccessRestriction": { - "values": { - "ACCESS_RESTRICTION_UNSPECIFIED": 0, - "WITHIN_PROJECT": 1, - "WITHIN_ORGANIZATION": 2, - "UNRESTRICTED": 3 - } - } - } - }, - "DataSource": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/DataSource", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}", - "(google.api.resource).plural": "dataSources", - "(google.api.resource).singular": "dataSource" - }, - "oneofs": { - "_createTime": { - "oneof": [ - "createTime" - ] - }, - "_updateTime": { - "oneof": [ - "updateTime" - ] - }, - "_backupCount": { - "oneof": [ - "backupCount" - ] - }, - "_etag": { - "oneof": [ - "etag" - ] - }, - "_totalStoredBytes": { - "oneof": [ - "totalStoredBytes" - ] - }, - "sourceResource": { - "oneof": [ - "dataSourceGcpResource", - "dataSourceBackupApplianceApplication" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "state": { - "type": "State", - "id": 21, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "backupCount": { - "type": "int64", - "id": 7, - "options": { - "proto3_optional": true - } - }, - "etag": { - "type": "string", - "id": 14, - "options": { - "proto3_optional": true - } - }, - "totalStoredBytes": { - "type": "int64", - "id": 23, - "options": { - "proto3_optional": true - } - }, - "configState": { - "type": "BackupConfigState", - "id": 24, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backupConfigInfo": { - "type": "BackupConfigInfo", - "id": 25, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dataSourceGcpResource": { - "type": "DataSourceGcpResource", - "id": 26 - }, - "dataSourceBackupApplianceApplication": { - "type": "DataSourceBackupApplianceApplication", - "id": 27 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "DELETING": 3, - "ERROR": 4 - } - } - } - }, - "BackupConfigInfo": { - "oneofs": { - "backupConfig": { - "oneof": [ - "gcpBackupConfig", - "backupApplianceBackupConfig" - ] - } - }, - "fields": { - "lastBackupState": { - "type": "LastBackupState", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastSuccessfulBackupConsistencyTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastBackupError": { - "type": "google.rpc.Status", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "gcpBackupConfig": { - "type": "GcpBackupConfig", - "id": 4 - }, - "backupApplianceBackupConfig": { - "type": "BackupApplianceBackupConfig", - "id": 5 - } - }, - "nested": { - "LastBackupState": { - "values": { - "LAST_BACKUP_STATE_UNSPECIFIED": 0, - "FIRST_BACKUP_PENDING": 1, - "SUCCEEDED": 2, - "FAILED": 3, - "PERMISSION_DENIED": 4 - } - } - } - }, - "GcpBackupConfig": { - "fields": { - "backupPlan": { - "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" - } - }, - "backupPlanDescription": { - "type": "string", - "id": 2 - }, - "backupPlanAssociation": { - "type": "string", - "id": 3, - "options": { - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlanAssociation" - } - }, - "backupPlanRules": { - "rule": "repeated", - "type": "string", - "id": 4 - } - } - }, - "BackupApplianceBackupConfig": { - "fields": { - "backupApplianceName": { - "type": "string", - "id": 1 - }, - "backupApplianceId": { - "type": "int64", - "id": 2 - }, - "slaId": { - "type": "int64", - "id": 3 - }, - "applicationName": { - "type": "string", - "id": 4 - }, - "hostName": { - "type": "string", - "id": 5 - }, - "sltName": { - "type": "string", - "id": 6 - }, - "slpName": { - "type": "string", - "id": 7 - } - } - }, - "DataSourceGcpResource": { - "oneofs": { - "gcpResourceProperties": { - "oneof": [ - "computeInstanceDatasourceProperties" - ] - } - }, - "fields": { - "gcpResourcename": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "location": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "computeInstanceDatasourceProperties": { - "type": "ComputeInstanceDataSourceProperties", - "id": 4 - } - } - }, - "DataSourceBackupApplianceApplication": { - "fields": { - "applicationName": { - "type": "string", - "id": 1 - }, - "backupAppliance": { - "type": "string", - "id": 2 - }, - "applianceId": { - "type": "int64", - "id": 3 - }, - "type": { - "type": "string", - "id": 4 - }, - "applicationId": { - "type": "int64", - "id": 8 - }, - "hostname": { - "type": "string", - "id": 6 - }, - "hostId": { - "type": "int64", - "id": 7 - } - } - }, - "ServiceLockInfo": { - "fields": { - "operation": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "BackupApplianceLockInfo": { - "oneofs": { - "lockSource": { - "oneof": [ - "jobName", - "backupImage", - "slaId" - ] - } - }, - "fields": { - "backupApplianceId": { - "type": "int64", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupApplianceName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "lockReason": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "jobName": { - "type": "string", - "id": 6 - }, - "backupImage": { - "type": "string", - "id": 7 - }, - "slaId": { - "type": "int64", - "id": 8 - } - } - }, - "BackupLock": { - "oneofs": { - "ClientLockInfo": { - "oneof": [ - "backupApplianceLockInfo", - "serviceLockInfo" - ] - } - }, - "fields": { - "lockUntilTime": { - "type": "google.protobuf.Timestamp", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupApplianceLockInfo": { - "type": "BackupApplianceLockInfo", - "id": 3 - }, - "serviceLockInfo": { - "type": "ServiceLockInfo", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "Backup": { - "options": { - "(google.api.resource).type": "backupdr.googleapis.com/Backup", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}", - "(google.api.resource).plural": "backups", - "(google.api.resource).singular": "backup" - }, - "oneofs": { - "_description": { - "oneof": [ - "description" - ] - }, - "_createTime": { - "oneof": [ - "createTime" - ] - }, - "_updateTime": { - "oneof": [ - "updateTime" - ] - }, - "_enforcedRetentionEndTime": { - "oneof": [ - "enforcedRetentionEndTime" - ] - }, - "_expireTime": { - "oneof": [ - "expireTime" - ] - }, - "_consistencyTime": { - "oneof": [ - "consistencyTime" - ] - }, - "_etag": { - "oneof": [ - "etag" - ] - }, - "backupProperties": { - "oneof": [ - "computeInstanceBackupProperties", - "backupApplianceBackupProperties" - ] - }, - "planInfo": { - "oneof": [ - "gcpBackupPlanInfo" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "enforcedRetentionEndTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "expireTime": { - "type": "google.protobuf.Timestamp", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "consistencyTime": { - "type": "google.protobuf.Timestamp", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "etag": { - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "state": { - "type": "State", - "id": 15, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "serviceLocks": { - "rule": "repeated", - "type": "BackupLock", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backupApplianceLocks": { - "rule": "repeated", - "type": "BackupLock", - "id": 18, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "computeInstanceBackupProperties": { - "type": "ComputeInstanceBackupProperties", - "id": 19, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backupApplianceBackupProperties": { - "type": "BackupApplianceBackupProperties", - "id": 21, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "backupType": { - "type": "BackupType", - "id": 20, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "gcpBackupPlanInfo": { - "type": "GCPBackupPlanInfo", - "id": 22, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "resourceSizeBytes": { - "type": "int64", - "id": 23, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "ACTIVE": 2, - "DELETING": 3, - "ERROR": 4 - } - }, - "BackupType": { - "values": { - "BACKUP_TYPE_UNSPECIFIED": 0, - "SCHEDULED": 1, - "ON_DEMAND": 2 - } - }, - "GCPBackupPlanInfo": { - "fields": { - "backupPlan": { - "type": "string", - "id": 1, - "options": { - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupPlan" - } - }, - "backupPlanRuleId": { - "type": "string", - "id": 2 - } - } - } - } - }, - "CreateBackupVaultRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" - } - }, - "backupVaultId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupVault": { - "type": "BackupVault", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "validateOnly": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupVaultsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "view": { - "type": "BackupVaultView", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupVaultsResponse": { - "fields": { - "backupVaults": { - "rule": "repeated", - "type": "BackupVault", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "FetchUsableBackupVaultsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/BackupVault" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "FetchUsableBackupVaultsResponse": { - "fields": { - "backupVaults": { - "rule": "repeated", - "type": "BackupVault", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetBackupVaultRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" - } - }, - "view": { - "type": "BackupVaultView", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateBackupVaultRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupVault": { - "type": "BackupVault", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "UUID4", - "(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" - } - } - } - }, - "DeleteBackupVaultRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/BackupVault" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "force": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "etag": { - "type": "string", - "id": 4 - }, - "validateOnly": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "allowMissing": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListDataSourcesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/DataSource" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListDataSourcesResponse": { - "fields": { - "dataSources": { - "rule": "repeated", - "type": "DataSource", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetDataSourceRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - } - } - }, - "UpdateDataSourceRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dataSource": { - "type": "DataSource", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "allowMissing": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "backupdr.googleapis.com/Backup" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "view": { - "type": "BackupView", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListBackupsResponse": { - "fields": { - "backups": { - "rule": "repeated", - "type": "Backup", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetBackupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" - } - }, - "view": { - "type": "BackupView", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateBackupRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backup": { - "type": "Backup", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteBackupRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "RestoreBackupRequest": { - "oneofs": { - "targetEnvironment": { - "oneof": [ - "computeInstanceTargetEnvironment" - ] - }, - "instanceProperties": { - "oneof": [ - "computeInstanceRestoreProperties" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/Backup" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "computeInstanceTargetEnvironment": { - "type": "ComputeInstanceTargetEnvironment", - "id": 3 - }, - "computeInstanceRestoreProperties": { - "type": "ComputeInstanceRestoreProperties", - "id": 4 - } - } - }, - "RestoreBackupResponse": { - "fields": { - "targetResource": { - "type": "TargetResource", - "id": 1 - } - } - }, - "TargetResource": { - "oneofs": { - "targetResourceInfo": { - "oneof": [ - "gcpResource" - ] - } - }, - "fields": { - "gcpResource": { - "type": "GcpResource", - "id": 1 - } - } - }, - "GcpResource": { - "fields": { - "gcpResourcename": { - "type": "string", - "id": 1 - }, - "location": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - } - } - }, - "BackupConfigState": { - "values": { - "BACKUP_CONFIG_STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "PASSIVE": 2 - } - }, - "BackupView": { - "values": { - "BACKUP_VIEW_UNSPECIFIED": 0, - "BACKUP_VIEW_BASIC": 1, - "BACKUP_VIEW_FULL": 2 - } - }, - "BackupVaultView": { - "values": { - "BACKUP_VAULT_VIEW_UNSPECIFIED": 0, - "BACKUP_VAULT_VIEW_BASIC": 1, - "BACKUP_VAULT_VIEW_FULL": 2 - } - }, - "BackupApplianceBackupProperties": { - "oneofs": { - "_generationId": { - "oneof": [ - "generationId" - ] - }, - "_finalizeTime": { - "oneof": [ - "finalizeTime" - ] - }, - "_recoveryRangeStartTime": { - "oneof": [ - "recoveryRangeStartTime" - ] - }, - "_recoveryRangeEndTime": { - "oneof": [ - "recoveryRangeEndTime" - ] - } - }, - "fields": { - "generationId": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "finalizeTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "recoveryRangeStartTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "recoveryRangeEndTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "ComputeInstanceBackupProperties": { - "oneofs": { - "_description": { - "oneof": [ - "description" - ] - }, - "_tags": { - "oneof": [ - "tags" - ] - }, - "_machineType": { - "oneof": [ - "machineType" - ] - }, - "_canIpForward": { - "oneof": [ - "canIpForward" - ] - }, - "_metadata": { - "oneof": [ - "metadata" - ] - }, - "_scheduling": { - "oneof": [ - "scheduling" - ] - }, - "_minCpuPlatform": { - "oneof": [ - "minCpuPlatform" - ] - }, - "_keyRevocationActionType": { - "oneof": [ - "keyRevocationActionType" - ] - }, - "_sourceInstance": { - "oneof": [ - "sourceInstance" - ] - } - }, - "fields": { - "description": { - "type": "string", - "id": 1, - "options": { - "proto3_optional": true - } - }, - "tags": { - "type": "Tags", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "machineType": { - "type": "string", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "canIpForward": { - "type": "bool", - "id": 4, - "options": { - "proto3_optional": true - } - }, - "networkInterface": { - "rule": "repeated", - "type": "NetworkInterface", - "id": 5 - }, - "disk": { - "rule": "repeated", - "type": "AttachedDisk", - "id": 6 - }, - "metadata": { - "type": "Metadata", - "id": 7, - "options": { - "proto3_optional": true - } - }, - "serviceAccount": { - "rule": "repeated", - "type": "ServiceAccount", - "id": 8 - }, - "scheduling": { - "type": "Scheduling", - "id": 9, - "options": { - "proto3_optional": true - } - }, - "guestAccelerator": { - "rule": "repeated", - "type": "AcceleratorConfig", - "id": 10 - }, - "minCpuPlatform": { - "type": "string", - "id": 11, - "options": { - "proto3_optional": true - } - }, - "keyRevocationActionType": { - "type": "KeyRevocationActionType", - "id": 12, - "options": { - "proto3_optional": true - } - }, - "sourceInstance": { - "type": "string", - "id": 13, - "options": { - "proto3_optional": true - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 14 - } - } - }, - "ComputeInstanceRestoreProperties": { - "oneofs": { - "_name": { - "oneof": [ - "name" - ] - }, - "_advancedMachineFeatures": { - "oneof": [ - "advancedMachineFeatures" - ] - }, - "_canIpForward": { - "oneof": [ - "canIpForward" - ] - }, - "_confidentialInstanceConfig": { - "oneof": [ - "confidentialInstanceConfig" - ] - }, - "_deletionProtection": { - "oneof": [ - "deletionProtection" - ] - }, - "_description": { - "oneof": [ - "description" - ] - }, - "_displayDevice": { - "oneof": [ - "displayDevice" - ] - }, - "_hostname": { - "oneof": [ - "hostname" - ] - }, - "_instanceEncryptionKey": { - "oneof": [ - "instanceEncryptionKey" - ] - }, - "_keyRevocationActionType": { - "oneof": [ - "keyRevocationActionType" - ] - }, - "_machineType": { - "oneof": [ - "machineType" - ] - }, - "_metadata": { - "oneof": [ - "metadata" - ] - }, - "_minCpuPlatform": { - "oneof": [ - "minCpuPlatform" - ] - }, - "_networkPerformanceConfig": { - "oneof": [ - "networkPerformanceConfig" - ] - }, - "_params": { - "oneof": [ - "params" - ] - }, - "_privateIpv6GoogleAccess": { - "oneof": [ - "privateIpv6GoogleAccess" - ] - }, - "_allocationAffinity": { - "oneof": [ - "allocationAffinity" - ] - }, - "_scheduling": { - "oneof": [ - "scheduling" - ] - }, - "_tags": { - "oneof": [ - "tags" - ] - } - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "proto3_optional": true - } - }, - "advancedMachineFeatures": { - "type": "AdvancedMachineFeatures", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "canIpForward": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "confidentialInstanceConfig": { - "type": "ConfidentialInstanceConfig", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "deletionProtection": { - "type": "bool", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "description": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "disks": { - "rule": "repeated", - "type": "AttachedDisk", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "displayDevice": { - "type": "DisplayDevice", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "guestAccelerators": { - "rule": "repeated", - "type": "AcceleratorConfig", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "hostname": { - "type": "string", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "instanceEncryptionKey": { - "type": "CustomerEncryptionKey", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "keyRevocationActionType": { - "type": "KeyRevocationActionType", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "machineType": { - "type": "string", - "id": 14, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "metadata": { - "type": "Metadata", - "id": 15, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "minCpuPlatform": { - "type": "string", - "id": 16, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "networkInterfaces": { - "rule": "repeated", - "type": "NetworkInterface", - "id": 17, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "networkPerformanceConfig": { - "type": "NetworkPerformanceConfig", - "id": 18, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "params": { - "type": "InstanceParams", - "id": 19, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY", - "proto3_optional": true - } - }, - "privateIpv6GoogleAccess": { - "type": "InstancePrivateIpv6GoogleAccess", - "id": 20, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "allocationAffinity": { - "type": "AllocationAffinity", - "id": 21, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "resourcePolicies": { - "rule": "repeated", - "type": "string", - "id": 22, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "scheduling": { - "type": "Scheduling", - "id": 23, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "serviceAccounts": { - "rule": "repeated", - "type": "ServiceAccount", - "id": 24, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "tags": { - "type": "Tags", - "id": 26, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "InstancePrivateIpv6GoogleAccess": { - "values": { - "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": 0, - "INHERIT_FROM_SUBNETWORK": 1, - "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE": 2, - "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE": 3 - } - } - } - }, - "ComputeInstanceTargetEnvironment": { - "fields": { - "project": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ComputeInstanceDataSourceProperties": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "description": { - "type": "string", - "id": 2 - }, - "machineType": { - "type": "string", - "id": 3 - }, - "totalDiskCount": { - "type": "int64", - "id": 4 - }, - "totalDiskSizeGb": { - "type": "int64", - "id": 5 - } - } - }, - "AdvancedMachineFeatures": { - "oneofs": { - "_enableNestedVirtualization": { - "oneof": [ - "enableNestedVirtualization" - ] - }, - "_threadsPerCore": { - "oneof": [ - "threadsPerCore" - ] - }, - "_visibleCoreCount": { - "oneof": [ - "visibleCoreCount" - ] - }, - "_enableUefiNetworking": { - "oneof": [ - "enableUefiNetworking" - ] - } - }, - "fields": { - "enableNestedVirtualization": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "threadsPerCore": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "visibleCoreCount": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "enableUefiNetworking": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "ConfidentialInstanceConfig": { - "oneofs": { - "_enableConfidentialCompute": { - "oneof": [ - "enableConfidentialCompute" - ] - } - }, - "fields": { - "enableConfidentialCompute": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "DisplayDevice": { - "oneofs": { - "_enableDisplay": { - "oneof": [ - "enableDisplay" - ] - } - }, - "fields": { - "enableDisplay": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "AcceleratorConfig": { - "oneofs": { - "_acceleratorType": { - "oneof": [ - "acceleratorType" - ] - }, - "_acceleratorCount": { - "oneof": [ - "acceleratorCount" - ] - } - }, - "fields": { - "acceleratorType": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "acceleratorCount": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "CustomerEncryptionKey": { - "oneofs": { - "key": { - "oneof": [ - "rawKey", - "rsaEncryptedKey", - "kmsKeyName" - ] - }, - "_kmsKeyServiceAccount": { - "oneof": [ - "kmsKeyServiceAccount" - ] - } - }, - "fields": { - "rawKey": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "rsaEncryptedKey": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "kmsKeyName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "kmsKeyServiceAccount": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "Entry": { - "oneofs": { - "_key": { - "oneof": [ - "key" - ] - }, - "_value": { - "oneof": [ - "value" - ] - } - }, - "fields": { - "key": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "value": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "Metadata": { - "fields": { - "items": { - "rule": "repeated", - "type": "Entry", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "NetworkInterface": { - "oneofs": { - "_network": { - "oneof": [ - "network" - ] - }, - "_subnetwork": { - "oneof": [ - "subnetwork" - ] - }, - "_ipAddress": { - "oneof": [ - "ipAddress" - ] - }, - "_ipv6Address": { - "oneof": [ - "ipv6Address" - ] - }, - "_internalIpv6PrefixLength": { - "oneof": [ - "internalIpv6PrefixLength" - ] - }, - "_name": { - "oneof": [ - "name" - ] - }, - "_stackType": { - "oneof": [ - "stackType" - ] - }, - "_ipv6AccessType": { - "oneof": [ - "ipv6AccessType" - ] - }, - "_queueCount": { - "oneof": [ - "queueCount" - ] - }, - "_nicType": { - "oneof": [ - "nicType" - ] - }, - "_networkAttachment": { - "oneof": [ - "networkAttachment" - ] - } - }, - "fields": { - "network": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "subnetwork": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "ipAddress": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "IPV4", - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "ipv6Address": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "IPV6", - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "internalIpv6PrefixLength": { - "type": "int32", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "name": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "accessConfigs": { - "rule": "repeated", - "type": "AccessConfig", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "ipv6AccessConfigs": { - "rule": "repeated", - "type": "AccessConfig", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "aliasIpRanges": { - "rule": "repeated", - "type": "AliasIpRange", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "stackType": { - "type": "StackType", - "id": 10, - "options": { - "proto3_optional": true - } - }, - "ipv6AccessType": { - "type": "Ipv6AccessType", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "queueCount": { - "type": "int32", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "nicType": { - "type": "NicType", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "networkAttachment": { - "type": "string", - "id": 14, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "StackType": { - "values": { - "STACK_TYPE_UNSPECIFIED": 0, - "IPV4_ONLY": 1, - "IPV4_IPV6": 2 - } - }, - "Ipv6AccessType": { - "values": { - "UNSPECIFIED_IPV6_ACCESS_TYPE": 0, - "INTERNAL": 1, - "EXTERNAL": 2 - } - }, - "NicType": { - "values": { - "NIC_TYPE_UNSPECIFIED": 0, - "VIRTIO_NET": 1, - "GVNIC": 2 - } - } - } - }, - "NetworkPerformanceConfig": { - "oneofs": { - "_totalEgressBandwidthTier": { - "oneof": [ - "totalEgressBandwidthTier" - ] - } - }, - "fields": { - "totalEgressBandwidthTier": { - "type": "Tier", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "Tier": { - "values": { - "TIER_UNSPECIFIED": 0, - "DEFAULT": 1, - "TIER_1": 2 - } - } - } - }, - "AccessConfig": { - "oneofs": { - "_type": { - "oneof": [ - "type" - ] - }, - "_name": { - "oneof": [ - "name" - ] - }, - "_externalIp": { - "oneof": [ - "externalIp" - ] - }, - "_externalIpv6": { - "oneof": [ - "externalIpv6" - ] - }, - "_externalIpv6PrefixLength": { - "oneof": [ - "externalIpv6PrefixLength" - ] - }, - "_setPublicPtr": { - "oneof": [ - "setPublicPtr" - ] - }, - "_publicPtrDomainName": { - "oneof": [ - "publicPtrDomainName" - ] - }, - "_networkTier": { - "oneof": [ - "networkTier" - ] - } - }, - "fields": { - "type": { - "type": "AccessType", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "name": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "externalIp": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "externalIpv6": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "externalIpv6PrefixLength": { - "type": "int32", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "setPublicPtr": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "publicPtrDomainName": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "networkTier": { - "type": "NetworkTier", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "AccessType": { - "values": { - "ACCESS_TYPE_UNSPECIFIED": 0, - "ONE_TO_ONE_NAT": 1, - "DIRECT_IPV6": 2 - } - }, - "NetworkTier": { - "values": { - "NETWORK_TIER_UNSPECIFIED": 0, - "PREMIUM": 1, - "STANDARD": 2 - } - } - } - }, - "AliasIpRange": { - "oneofs": { - "_ipCidrRange": { - "oneof": [ - "ipCidrRange" - ] - }, - "_subnetworkRangeName": { - "oneof": [ - "subnetworkRangeName" - ] - } - }, - "fields": { - "ipCidrRange": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "subnetworkRangeName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "InstanceParams": { - "fields": { - "resourceManagerTags": { - "keyType": "string", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "AllocationAffinity": { - "oneofs": { - "_consumeAllocationType": { - "oneof": [ - "consumeAllocationType" - ] - }, - "_key": { - "oneof": [ - "key" - ] - } - }, - "fields": { - "consumeAllocationType": { - "type": "Type", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "key": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "values": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "NO_RESERVATION": 1, - "ANY_RESERVATION": 2, - "SPECIFIC_RESERVATION": 3 - } - } - } - }, - "Scheduling": { - "oneofs": { - "_onHostMaintenance": { - "oneof": [ - "onHostMaintenance" - ] - }, - "_automaticRestart": { - "oneof": [ - "automaticRestart" - ] - }, - "_preemptible": { - "oneof": [ - "preemptible" - ] - }, - "_minNodeCpus": { - "oneof": [ - "minNodeCpus" - ] - }, - "_provisioningModel": { - "oneof": [ - "provisioningModel" - ] - }, - "_instanceTerminationAction": { - "oneof": [ - "instanceTerminationAction" - ] - }, - "_localSsdRecoveryTimeout": { - "oneof": [ - "localSsdRecoveryTimeout" - ] - } - }, - "fields": { - "onHostMaintenance": { - "type": "OnHostMaintenance", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "automaticRestart": { - "type": "bool", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "preemptible": { - "type": "bool", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "nodeAffinities": { - "rule": "repeated", - "type": "NodeAffinity", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "minNodeCpus": { - "type": "int32", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "provisioningModel": { - "type": "ProvisioningModel", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "instanceTerminationAction": { - "type": "InstanceTerminationAction", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "localSsdRecoveryTimeout": { - "type": "SchedulingDuration", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "OnHostMaintenance": { - "values": { - "ON_HOST_MAINTENANCE_UNSPECIFIED": 0, - "TERMINATE": 1, - "MIGRATE": 1000 - } - }, - "NodeAffinity": { - "oneofs": { - "_key": { - "oneof": [ - "key" - ] - }, - "_operator": { - "oneof": [ - "operator" - ] - } - }, - "fields": { - "key": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "operator": { - "type": "Operator", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "values": { - "rule": "repeated", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "Operator": { - "values": { - "OPERATOR_UNSPECIFIED": 0, - "IN": 1, - "NOT_IN": 2 - } - } - } - }, - "ProvisioningModel": { - "values": { - "PROVISIONING_MODEL_UNSPECIFIED": 0, - "STANDARD": 1, - "SPOT": 2 - } - }, - "InstanceTerminationAction": { - "values": { - "INSTANCE_TERMINATION_ACTION_UNSPECIFIED": 0, - "DELETE": 1, - "STOP": 2 - } - } - } - }, - "SchedulingDuration": { - "oneofs": { - "_seconds": { - "oneof": [ - "seconds" - ] - }, - "_nanos": { - "oneof": [ - "nanos" - ] - } - }, - "fields": { - "seconds": { - "type": "int64", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "nanos": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "ServiceAccount": { - "oneofs": { - "_email": { - "oneof": [ - "email" - ] - } - }, - "fields": { - "email": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "scopes": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "Tags": { - "fields": { - "items": { - "rule": "repeated", - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "AttachedDisk": { - "oneofs": { - "_initializeParams": { - "oneof": [ - "initializeParams" - ] - }, - "_deviceName": { - "oneof": [ - "deviceName" - ] - }, - "_kind": { - "oneof": [ - "kind" - ] - }, - "_diskTypeDeprecated": { - "oneof": [ - "diskTypeDeprecated" - ] - }, - "_mode": { - "oneof": [ - "mode" - ] - }, - "_source": { - "oneof": [ - "source" - ] - }, - "_index": { - "oneof": [ - "index" - ] - }, - "_boot": { - "oneof": [ - "boot" - ] - }, - "_autoDelete": { - "oneof": [ - "autoDelete" - ] - }, - "_diskInterface": { - "oneof": [ - "diskInterface" - ] - }, - "_diskEncryptionKey": { - "oneof": [ - "diskEncryptionKey" - ] - }, - "_diskSizeGb": { - "oneof": [ - "diskSizeGb" - ] - }, - "_savedState": { - "oneof": [ - "savedState" - ] - }, - "_diskType": { - "oneof": [ - "diskType" - ] - }, - "_type": { - "oneof": [ - "type" - ] - } - }, - "fields": { - "initializeParams": { - "type": "InitializeParams", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "deviceName": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "kind": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "diskTypeDeprecated": { - "type": "DiskType", - "id": 6, - "options": { - "deprecated": true, - "proto3_optional": true - } - }, - "mode": { - "type": "DiskMode", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "source": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "index": { - "type": "int64", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "boot": { - "type": "bool", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "autoDelete": { - "type": "bool", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "license": { - "rule": "repeated", - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "diskInterface": { - "type": "DiskInterface", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "guestOsFeature": { - "rule": "repeated", - "type": "GuestOsFeature", - "id": 14, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "diskEncryptionKey": { - "type": "CustomerEncryptionKey", - "id": 15, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "diskSizeGb": { - "type": "int64", - "id": 16, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "savedState": { - "type": "DiskSavedState", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "diskType": { - "type": "string", - "id": 18, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "type": { - "type": "DiskType", - "id": 19, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - }, - "nested": { - "InitializeParams": { - "oneofs": { - "_diskName": { - "oneof": [ - "diskName" - ] - } - }, - "fields": { - "diskName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "replicaZones": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DiskType": { - "values": { - "DISK_TYPE_UNSPECIFIED": 0, - "SCRATCH": 1, - "PERSISTENT": 2 - } - }, - "DiskMode": { - "values": { - "DISK_MODE_UNSPECIFIED": 0, - "READ_WRITE": 1, - "READ_ONLY": 2, - "LOCKED": 3 - } - }, - "DiskInterface": { - "values": { - "DISK_INTERFACE_UNSPECIFIED": 0, - "SCSI": 1, - "NVME": 2, - "NVDIMM": 3, - "ISCSI": 4 - } - }, - "DiskSavedState": { - "values": { - "DISK_SAVED_STATE_UNSPECIFIED": 0, - "PRESERVED": 1 - } - } - } - }, - "GuestOsFeature": { - "oneofs": { - "_type": { - "oneof": [ - "type" - ] - } - }, - "fields": { - "type": { - "type": "FeatureType", - "id": 1, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "FeatureType": { - "values": { - "FEATURE_TYPE_UNSPECIFIED": 0, - "VIRTIO_SCSI_MULTIQUEUE": 1, - "WINDOWS": 2, - "MULTI_IP_SUBNET": 3, - "UEFI_COMPATIBLE": 4, - "SECURE_BOOT": 5, - "GVNIC": 6, - "SEV_CAPABLE": 7, - "BARE_METAL_LINUX_COMPATIBLE": 8, - "SUSPEND_RESUME_COMPATIBLE": 9, - "SEV_LIVE_MIGRATABLE": 10, - "SEV_SNP_CAPABLE": 11, - "TDX_CAPABLE": 12, - "IDPF": 13, - "SEV_LIVE_MIGRATABLE_V2": 14 - } - } - } - }, - "KeyRevocationActionType": { - "values": { - "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": 0, - "NONE": 1, - "STOP": 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 - } - }, - "fieldInfo": { - "type": "google.api.FieldInfo", - "id": 291403980, - "extend": "google.protobuf.FieldOptions" - }, - "FieldInfo": { - "fields": { - "format": { - "type": "Format", - "id": 1 - } - }, - "nested": { - "Format": { - "values": { - "FORMAT_UNSPECIFIED": 0, - "UUID4": 1, - "IPV4": 2, - "IPV6": 3, - "IPV4_OR_IPV6": 4 - } - } - } - }, - "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 - } - } - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "Empty": { - "fields": {} - }, - "DoubleValue": { - "fields": { - "value": { - "type": "double", - "id": 1 - } - } - }, - "FloatValue": { - "fields": { - "value": { - "type": "float", - "id": 1 - } - } - }, - "Int64Value": { - "fields": { - "value": { - "type": "int64", - "id": 1 - } - } - }, - "UInt64Value": { - "fields": { - "value": { - "type": "uint64", - "id": 1 - } - } - }, - "Int32Value": { - "fields": { - "value": { - "type": "int32", - "id": 1 - } - } - }, - "UInt32Value": { - "fields": { - "value": { - "type": "uint32", - "id": 1 - } - } - }, - "BoolValue": { - "fields": { - "value": { - "type": "bool", - "id": 1 - } - } - }, - "StringValue": { - "fields": { - "value": { - "type": "string", - "id": 1 - } - } - }, - "BytesValue": { - "fields": { - "value": { - "type": "bytes", - "id": 1 - } - } - } - } - }, - "type": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/type/month;month", - "java_multiple_files": true, - "java_outer_classname": "MonthProto", - "java_package": "com.google.type", - "objc_class_prefix": "GTP" - }, - "nested": { - "DayOfWeek": { - "values": { - "DAY_OF_WEEK_UNSPECIFIED": 0, - "MONDAY": 1, - "TUESDAY": 2, - "WEDNESDAY": 3, - "THURSDAY": 4, - "FRIDAY": 5, - "SATURDAY": 6, - "SUNDAY": 7 - } - }, - "Month": { - "values": { - "MONTH_UNSPECIFIED": 0, - "JANUARY": 1, - "FEBRUARY": 2, - "MARCH": 3, - "APRIL": 4, - "MAY": 5, - "JUNE": 6, - "JULY": 7, - "AUGUST": 8, - "SEPTEMBER": 9, - "OCTOBER": 10, - "NOVEMBER": 11, - "DECEMBER": 12 - } - } - } - }, - "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 - } - } - } - } - }, - "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 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan.js deleted file mode 100644 index e64200d286e..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan.js +++ /dev/null @@ -1,91 +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 -// -// 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, backupPlanId, backupPlan) { - // [START backupdr_v1_generated_BackupDR_CreateBackupPlan_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 `BackupPlan` project and location in the format - * `projects/{project}/locations/{location}`. In Cloud BackupDR locations - * map to GCP regions, for example **us-central1**. - */ - // const parent = 'abc123' - /** - * Required. The name of the `BackupPlan` to create. The name must be unique - * for the specified project and location.The name must start with a lowercase - * letter followed by up to 62 lowercase letters, numbers, or hyphens. - * Pattern, /[a-z][a-z0-9-]{,62}/. - */ - // const backupPlanId = 'abc123' - /** - * Required. The `BackupPlan` resource object to create. - */ - // const backupPlan = {} - /** - * Optional. An optional 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 t - * he 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 Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callCreateBackupPlan() { - // Construct request - const request = { - parent, - backupPlanId, - backupPlan, - }; - - // Run request - const [operation] = await backupdrClient.createBackupPlan(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateBackupPlan(); - // [END backupdr_v1_generated_BackupDR_CreateBackupPlan_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-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan_association.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan_association.js deleted file mode 100644 index 11a85b7c441..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_plan_association.js +++ /dev/null @@ -1,89 +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 -// -// 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, backupPlanAssociationId, backupPlanAssociation) { - // [START backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_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 backup plan association project and location in the format - * `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations - * map to GCP regions, for example **us-central1**. - */ - // const parent = 'abc123' - /** - * Required. The name of the backup plan association to create. The name must - * be unique for the specified project and location. - */ - // const backupPlanAssociationId = 'abc123' - /** - * Required. The resource being created - */ - // const backupPlanAssociation = {} - /** - * Optional. An optional 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 t - * he 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 Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callCreateBackupPlanAssociation() { - // Construct request - const request = { - parent, - backupPlanAssociationId, - backupPlanAssociation, - }; - - // Run request - const [operation] = await backupdrClient.createBackupPlanAssociation(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateBackupPlanAssociation(); - // [END backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_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-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_vault.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_vault.js deleted file mode 100644 index 2fe111a58f8..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_backup_vault.js +++ /dev/null @@ -1,93 +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 -// -// 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, backupVaultId, backupVault) { - // [START backupdr_v1_generated_BackupDR_CreateBackupVault_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. Value for parent. - */ - // const parent = 'abc123' - /** - * Required. ID of the requesting object - * If auto-generating ID server-side, remove this field and - * backup_vault_id from the method_signature of Create RPC - */ - // const backupVaultId = 'abc123' - /** - * Required. The resource being created - */ - // const backupVault = {} - /** - * Optional. An optional 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 request, but do not perform mutations. - * The default is 'false'. - */ - // const validateOnly = true - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callCreateBackupVault() { - // Construct request - const request = { - parent, - backupVaultId, - backupVault, - }; - - // Run request - const [operation] = await backupdrClient.createBackupVault(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateBackupVault(); - // [END backupdr_v1_generated_BackupDR_CreateBackupVault_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-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js deleted file mode 100644 index f14ca310e86..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.create_management_server.js +++ /dev/null @@ -1,90 +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 -// -// 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, managementServerId, managementServer) { - // [START backupdr_v1_generated_BackupDR_CreateManagementServer_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 management server project and location in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR - * locations map to Google Cloud regions, for example **us-central1**. - */ - // const parent = 'abc123' - /** - * Required. The name of the management server to create. The name must be - * unique for the specified project and location. - */ - // const managementServerId = 'abc123' - /** - * Required. A management server - * resource google.cloud.backupdr.v1.ManagementServer - */ - // const managementServer = {} - /** - * Optional. An optional 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 Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callCreateManagementServer() { - // Construct request - const request = { - parent, - managementServerId, - managementServer, - }; - - // Run request - const [operation] = await backupdrClient.createManagementServer(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateManagementServer(); - // [END backupdr_v1_generated_BackupDR_CreateManagementServer_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-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup.js deleted file mode 100644 index fc987c807df..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup.js +++ /dev/null @@ -1,76 +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 -// -// 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 backupdr_v1_generated_BackupDR_DeleteBackup_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 resource. - */ - // const name = 'abc123' - /** - * Optional. An optional 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 Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callDeleteBackup() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await backupdrClient.deleteBackup(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteBackup(); - // [END backupdr_v1_generated_BackupDR_DeleteBackup_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-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan.js deleted file mode 100644 index 808b705c69b..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan.js +++ /dev/null @@ -1,77 +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 -// -// 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 backupdr_v1_generated_BackupDR_DeleteBackupPlan_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 of the `BackupPlan` to delete. - * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - */ - // const name = 'abc123' - /** - * Optional. An optional 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 Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callDeleteBackupPlan() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await backupdrClient.deleteBackupPlan(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteBackupPlan(); - // [END backupdr_v1_generated_BackupDR_DeleteBackupPlan_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-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan_association.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan_association.js deleted file mode 100644 index 50f03c1829e..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_plan_association.js +++ /dev/null @@ -1,77 +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 -// -// 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 backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_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 backup plan association resource, in the format - * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - */ - // const name = 'abc123' - /** - * Optional. An optional 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 Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callDeleteBackupPlanAssociation() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await backupdrClient.deleteBackupPlanAssociation(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteBackupPlanAssociation(); - // [END backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_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-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_vault.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_vault.js deleted file mode 100644 index 6252bf9d7cf..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_backup_vault.js +++ /dev/null @@ -1,97 +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 -// -// 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 backupdr_v1_generated_BackupDR_DeleteBackupVault_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 resource. - */ - // const name = 'abc123' - /** - * Optional. An optional 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 data source from this backup vault will also - * be deleted. - */ - // const force = true - /** - * The current etag of the backup vault. - * If an etag is provided and does not match the current etag of the - * connection, deletion will be blocked. - */ - // const etag = 'abc123' - /** - * Optional. Only validate the request, but do not perform mutations. - * The default is 'false'. - */ - // const validateOnly = true - /** - * Optional. If true and the BackupVault is not found, the request will - * succeed but no action will be taken. - */ - // const allowMissing = true - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callDeleteBackupVault() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await backupdrClient.deleteBackupVault(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteBackupVault(); - // [END backupdr_v1_generated_BackupDR_DeleteBackupVault_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-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js deleted file mode 100644 index c27febd63fd..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.delete_management_server.js +++ /dev/null @@ -1,76 +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 -// -// 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 backupdr_v1_generated_BackupDR_DeleteManagementServer_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 resource - */ - // const name = 'abc123' - /** - * Optional. An optional 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 Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callDeleteManagementServer() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await backupdrClient.deleteManagementServer(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteManagementServer(); - // [END backupdr_v1_generated_BackupDR_DeleteManagementServer_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-backupdr/v1/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js deleted file mode 100644 index 6b32fe8b894..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.fetch_usable_backup_vaults.js +++ /dev/null @@ -1,85 +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 -// -// 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 backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - */ - // const parent = 'abc123' - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - */ - // const pageSize = 1234 - /** - * Optional. A token identifying a page of results the server should return. - */ - // const pageToken = 'abc123' - /** - * Optional. Filtering results. - */ - // const filter = 'abc123' - /** - * Optional. Hint for how to order the results. - */ - // const orderBy = 'abc123' - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callFetchUsableBackupVaults() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = backupdrClient.fetchUsableBackupVaultsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callFetchUsableBackupVaults(); - // [END backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_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-backupdr/v1/samples/generated/v1/backup_d_r.get_backup.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup.js deleted file mode 100644 index 25d41ba5f59..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup.js +++ /dev/null @@ -1,67 +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 -// -// 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 backupdr_v1_generated_BackupDR_GetBackup_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 data source resource name, in the format - * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' - */ - // const name = 'abc123' - /** - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * resource. - */ - // const view = {} - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callGetBackup() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await backupdrClient.getBackup(request); - console.log(response); - } - - callGetBackup(); - // [END backupdr_v1_generated_BackupDR_GetBackup_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-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan.js deleted file mode 100644 index f7fa54ebe7c..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan.js +++ /dev/null @@ -1,62 +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 -// -// 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 backupdr_v1_generated_BackupDR_GetBackupPlan_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 of the `BackupPlan` to retrieve. - * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - */ - // const name = 'abc123' - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callGetBackupPlan() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await backupdrClient.getBackupPlan(request); - console.log(response); - } - - callGetBackupPlan(); - // [END backupdr_v1_generated_BackupDR_GetBackupPlan_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-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan_association.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan_association.js deleted file mode 100644 index 92f8a9b7ff3..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_plan_association.js +++ /dev/null @@ -1,62 +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 -// -// 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 backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_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 backup plan association resource, in the format - * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - */ - // const name = 'abc123' - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callGetBackupPlanAssociation() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await backupdrClient.getBackupPlanAssociation(request); - console.log(response); - } - - callGetBackupPlanAssociation(); - // [END backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_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-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_vault.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_vault.js deleted file mode 100644 index 1f000c8433e..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_backup_vault.js +++ /dev/null @@ -1,67 +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 -// -// 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 backupdr_v1_generated_BackupDR_GetBackupVault_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 backupvault store resource name, in the format - * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' - */ - // const name = 'abc123' - /** - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * Vault - */ - // const view = {} - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callGetBackupVault() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await backupdrClient.getBackupVault(request); - console.log(response); - } - - callGetBackupVault(); - // [END backupdr_v1_generated_BackupDR_GetBackupVault_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-backupdr/v1/samples/generated/v1/backup_d_r.get_data_source.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_data_source.js deleted file mode 100644 index 7500e457572..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_data_source.js +++ /dev/null @@ -1,62 +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 -// -// 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 backupdr_v1_generated_BackupDR_GetDataSource_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 data source resource name, in the format - * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' - */ - // const name = 'abc123' - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callGetDataSource() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await backupdrClient.getDataSource(request); - console.log(response); - } - - callGetDataSource(); - // [END backupdr_v1_generated_BackupDR_GetDataSource_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-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js deleted file mode 100644 index 11cc5ae277f..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.get_management_server.js +++ /dev/null @@ -1,62 +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 -// -// 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 backupdr_v1_generated_BackupDR_GetManagementServer_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 management server resource name, in the format - * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' - */ - // const name = 'abc123' - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callGetManagementServer() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await backupdrClient.getManagementServer(request); - console.log(response); - } - - callGetManagementServer(); - // [END backupdr_v1_generated_BackupDR_GetManagementServer_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-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plan_associations.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plan_associations.js deleted file mode 100644 index 0f2b5ee7e12..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plan_associations.js +++ /dev/null @@ -1,81 +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 -// -// 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 backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The project and location for which to retrieve backup Plan - * Associations information, in the format - * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations - * map to GCP regions, for example **us-central1**. To retrieve backup plan - * associations for all locations, use "-" for the - * `{location}` value. - */ - // const parent = 'abc123' - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - */ - // const pageSize = 1234 - /** - * Optional. A token identifying a page of results the server should return. - */ - // const pageToken = 'abc123' - /** - * Optional. Filtering results - */ - // const filter = 'abc123' - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callListBackupPlanAssociations() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = backupdrClient.listBackupPlanAssociationsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListBackupPlanAssociations(); - // [END backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_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-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plans.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plans.js deleted file mode 100644 index 2118748eca9..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_plans.js +++ /dev/null @@ -1,93 +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 -// -// 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 backupdr_v1_generated_BackupDR_ListBackupPlans_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The project and location for which to retrieve `BackupPlans` - * information. Format: `projects/{project}/locations/{location}`. In Cloud - * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To - * retrieve backup plans for all locations, use "-" for the - * `{location}` value. - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of `BackupPlans` to return in a single - * response. If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * next_page_token google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token - * to determine if there are more instances left to be queried. - */ - // const pageSize = 1234 - /** - * Optional. The value of - * next_page_token google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token - * received from a previous `ListBackupPlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackupPlans` must match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. Field match expression used to filter the results. - */ - // const filter = 'abc123' - /** - * Optional. Field by which to sort the results. - */ - // const orderBy = 'abc123' - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callListBackupPlans() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = backupdrClient.listBackupPlansAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListBackupPlans(); - // [END backupdr_v1_generated_BackupDR_ListBackupPlans_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-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_vaults.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_vaults.js deleted file mode 100644 index dca6928eade..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backup_vaults.js +++ /dev/null @@ -1,90 +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 -// -// 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 backupdr_v1_generated_BackupDR_ListBackupVaults_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - */ - // const parent = 'abc123' - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - */ - // const pageSize = 1234 - /** - * Optional. A token identifying a page of results the server should return. - */ - // const pageToken = 'abc123' - /** - * Optional. Filtering results. - */ - // const filter = 'abc123' - /** - * Optional. Hint for how to order the results. - */ - // const orderBy = 'abc123' - /** - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * Vault. - */ - // const view = {} - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callListBackupVaults() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = backupdrClient.listBackupVaultsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListBackupVaults(); - // [END backupdr_v1_generated_BackupDR_ListBackupVaults_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-backupdr/v1/samples/generated/v1/backup_d_r.list_backups.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backups.js deleted file mode 100644 index d72a8fd2d9f..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_backups.js +++ /dev/null @@ -1,90 +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 -// -// 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 backupdr_v1_generated_BackupDR_ListBackups_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The project and location for which to retrieve backup - * information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - */ - // const parent = 'abc123' - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - */ - // const pageSize = 1234 - /** - * Optional. A token identifying a page of results the server should return. - */ - // const pageToken = 'abc123' - /** - * Optional. Filtering results. - */ - // const filter = 'abc123' - /** - * Optional. Hint for how to order the results. - */ - // const orderBy = 'abc123' - /** - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * resource. - */ - // const view = {} - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callListBackups() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = backupdrClient.listBackupsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListBackups(); - // [END backupdr_v1_generated_BackupDR_ListBackups_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-backupdr/v1/samples/generated/v1/backup_d_r.list_data_sources.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_data_sources.js deleted file mode 100644 index 3858f996f71..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_data_sources.js +++ /dev/null @@ -1,85 +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 -// -// 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 backupdr_v1_generated_BackupDR_ListDataSources_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The project and location for which to retrieve data - * sources information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - */ - // const parent = 'abc123' - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - */ - // const pageSize = 1234 - /** - * Optional. A token identifying a page of results the server should return. - */ - // const pageToken = 'abc123' - /** - * Optional. Filtering results. - */ - // const filter = 'abc123' - /** - * Optional. Hint for how to order the results. - */ - // const orderBy = 'abc123' - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callListDataSources() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = backupdrClient.listDataSourcesAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListDataSources(); - // [END backupdr_v1_generated_BackupDR_ListDataSources_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-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js deleted file mode 100644 index 262d1a29e3c..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.list_management_servers.js +++ /dev/null @@ -1,85 +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 -// -// 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 backupdr_v1_generated_BackupDR_ListManagementServers_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The project and location for which to retrieve management servers - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud BackupDR, locations map to Google Cloud regions, for example - * **us-central1**. To retrieve management servers for all locations, use "-" - * for the - * '{location}' value. - */ - // const parent = 'abc123' - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - */ - // const pageSize = 1234 - /** - * Optional. A token identifying a page of results the server should return. - */ - // const pageToken = 'abc123' - /** - * Optional. Filtering results. - */ - // const filter = 'abc123' - /** - * Optional. Hint for how to order the results. - */ - // const orderBy = 'abc123' - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callListManagementServers() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = backupdrClient.listManagementServersAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListManagementServers(); - // [END backupdr_v1_generated_BackupDR_ListManagementServers_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-backupdr/v1/samples/generated/v1/backup_d_r.restore_backup.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.restore_backup.js deleted file mode 100644 index 3b156cdc818..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.restore_backup.js +++ /dev/null @@ -1,85 +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 -// -// 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 backupdr_v1_generated_BackupDR_RestoreBackup_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 of the Backup instance, in the format - * 'projects/* /locations/* /backupVaults/* /dataSources/* /backups/'. - */ - // const name = 'abc123' - /** - * Optional. An optional 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' - /** - * Compute Engine target environment to be used during restore. - */ - // const computeInstanceTargetEnvironment = {} - /** - * Compute Engine instance properties to be overridden during restore. - */ - // const computeInstanceRestoreProperties = {} - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callRestoreBackup() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await backupdrClient.restoreBackup(request); - const [response] = await operation.promise(); - console.log(response); - } - - callRestoreBackup(); - // [END backupdr_v1_generated_BackupDR_RestoreBackup_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-backupdr/v1/samples/generated/v1/backup_d_r.trigger_backup.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.trigger_backup.js deleted file mode 100644 index 4d212d1ced7..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.trigger_backup.js +++ /dev/null @@ -1,82 +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 -// -// 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, ruleId) { - // [START backupdr_v1_generated_BackupDR_TriggerBackup_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 backup plan association resource, in the format - * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - */ - // const name = 'abc123' - /** - * Required. backup rule_id for which a backup needs to be triggered. - */ - // const ruleId = 'abc123' - /** - * Optional. An optional 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 Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callTriggerBackup() { - // Construct request - const request = { - name, - ruleId, - }; - - // Run request - const [operation] = await backupdrClient.triggerBackup(request); - const [response] = await operation.promise(); - console.log(response); - } - - callTriggerBackup(); - // [END backupdr_v1_generated_BackupDR_TriggerBackup_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-backupdr/v1/samples/generated/v1/backup_d_r.update_backup.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup.js deleted file mode 100644 index 06b0a51edd7..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup.js +++ /dev/null @@ -1,85 +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 -// -// 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(updateMask, backup) { - // [START backupdr_v1_generated_BackupDR_UpdateBackup_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. Field mask is used to specify the fields to be overwritten in the - * Backup 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 the request will fail. - */ - // const updateMask = {} - /** - * Required. The resource being updated - */ - // const backup = {} - /** - * Optional. An optional 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 Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callUpdateBackup() { - // Construct request - const request = { - updateMask, - backup, - }; - - // Run request - const [operation] = await backupdrClient.updateBackup(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateBackup(); - // [END backupdr_v1_generated_BackupDR_UpdateBackup_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-backupdr/v1/samples/generated/v1/backup_d_r.update_backup_vault.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup_vault.js deleted file mode 100644 index 62444645da6..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_backup_vault.js +++ /dev/null @@ -1,95 +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 -// -// 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(updateMask, backupVault) { - // [START backupdr_v1_generated_BackupDR_UpdateBackupVault_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. Field mask is used to specify the fields to be overwritten in the - * BackupVault 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 the request will fail. - */ - // const updateMask = {} - /** - * Required. The resource being updated - */ - // const backupVault = {} - /** - * Optional. An optional 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 request, but do not perform mutations. - * The default is 'false'. - */ - // const validateOnly = true - /** - * Optional. If set to true, will not check plan duration against backup vault - * enforcement duration. - */ - // const force = true - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callUpdateBackupVault() { - // Construct request - const request = { - updateMask, - backupVault, - }; - - // Run request - const [operation] = await backupdrClient.updateBackupVault(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateBackupVault(); - // [END backupdr_v1_generated_BackupDR_UpdateBackupVault_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-backupdr/v1/samples/generated/v1/backup_d_r.update_data_source.js b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_data_source.js deleted file mode 100644 index 707ff65f27d..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/backup_d_r.update_data_source.js +++ /dev/null @@ -1,89 +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 -// -// 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(updateMask, dataSource) { - // [START backupdr_v1_generated_BackupDR_UpdateDataSource_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. Field mask is used to specify the fields to be overwritten in the - * DataSource 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 the request will fail. - */ - // const updateMask = {} - /** - * Required. The resource being updated - */ - // const dataSource = {} - /** - * Optional. An optional 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. Enable upsert. - */ - // const allowMissing = true - - // Imports the Backupdr library - const {BackupDRClient} = require('@google-cloud/backupdr').v1; - - // Instantiates a client - const backupdrClient = new BackupDRClient(); - - async function callUpdateDataSource() { - // Construct request - const request = { - updateMask, - dataSource, - }; - - // Run request - const [operation] = await backupdrClient.updateDataSource(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateDataSource(); - // [END backupdr_v1_generated_BackupDR_UpdateDataSource_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-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json b/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json deleted file mode 100644 index c84a7c2965c..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json +++ /dev/null @@ -1,1363 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-backupdr", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.backupdr.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "backupdr_v1_generated_BackupDR_ListManagementServers_async", - "title": "BackupDR listManagementServers Sample", - "origin": "API_DEFINITION", - "description": " Lists ManagementServers in a given project and location.", - "canonical": true, - "file": "backup_d_r.list_management_servers.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListManagementServers", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListManagementServers", - "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.backupdr.v1.ListManagementServersResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "ListManagementServers", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListManagementServers", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_GetManagementServer_async", - "title": "BackupDR getManagementServer Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single ManagementServer.", - "canonical": true, - "file": "backup_d_r.get_management_server.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetManagementServer", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetManagementServer", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.backupdr.v1.ManagementServer", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "GetManagementServer", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetManagementServer", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_CreateManagementServer_async", - "title": "BackupDR createManagementServer Sample", - "origin": "API_DEFINITION", - "description": " Creates a new ManagementServer in a given project and location.", - "canonical": true, - "file": "backup_d_r.create_management_server.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateManagementServer", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateManagementServer", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "management_server_id", - "type": "TYPE_STRING" - }, - { - "name": "management_server", - "type": ".google.cloud.backupdr.v1.ManagementServer" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "CreateManagementServer", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateManagementServer", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_DeleteManagementServer_async", - "title": "BackupDR deleteManagementServer Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single ManagementServer.", - "canonical": true, - "file": "backup_d_r.delete_management_server.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteManagementServer", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteManagementServer", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "DeleteManagementServer", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteManagementServer", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupVault_async", - "title": "BackupDR createBackupVault Sample", - "origin": "API_DEFINITION", - "description": " Creates a new BackupVault in a given project and location.", - "canonical": true, - "file": "backup_d_r.create_backup_vault.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "backup_vault_id", - "type": "TYPE_STRING" - }, - { - "name": "backup_vault", - "type": ".google.cloud.backupdr.v1.BackupVault" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "CreateBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupVault", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_ListBackupVaults_async", - "title": "BackupDR listBackupVaults Sample", - "origin": "API_DEFINITION", - "description": " Lists BackupVaults in a given project and location.", - "canonical": true, - "file": "backup_d_r.list_backup_vaults.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBackupVaults", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", - "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" - }, - { - "name": "view", - "type": ".google.cloud.backupdr.v1.BackupVaultView" - } - ], - "resultType": ".google.cloud.backupdr.v1.ListBackupVaultsResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "ListBackupVaults", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupVaults", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_async", - "title": "BackupDR fetchUsableBackupVaults Sample", - "origin": "API_DEFINITION", - "description": " FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.", - "canonical": true, - "file": "backup_d_r.fetch_usable_backup_vaults.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "FetchUsableBackupVaults", - "fullName": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", - "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.backupdr.v1.FetchUsableBackupVaultsResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "FetchUsableBackupVaults", - "fullName": "google.cloud.backupdr.v1.BackupDR.FetchUsableBackupVaults", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_GetBackupVault_async", - "title": "BackupDR getBackupVault Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a BackupVault.", - "canonical": true, - "file": "backup_d_r.get_backup_vault.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.backupdr.v1.BackupVaultView" - } - ], - "resultType": ".google.cloud.backupdr.v1.BackupVault", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "GetBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupVault", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_UpdateBackupVault_async", - "title": "BackupDR updateBackupVault Sample", - "origin": "API_DEFINITION", - "description": " Updates the settings of a BackupVault.", - "canonical": true, - "file": "backup_d_r.update_backup_vault.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "backup_vault", - "type": ".google.cloud.backupdr.v1.BackupVault" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "UpdateBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackupVault", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupVault_async", - "title": "BackupDR deleteBackupVault Sample", - "origin": "API_DEFINITION", - "description": " Deletes a BackupVault.", - "canonical": true, - "file": "backup_d_r.delete_backup_vault.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 89, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - }, - { - "name": "etag", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "DeleteBackupVault", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupVault", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_ListDataSources_async", - "title": "BackupDR listDataSources Sample", - "origin": "API_DEFINITION", - "description": " Lists DataSources in a given project and location.", - "canonical": true, - "file": "backup_d_r.list_data_sources.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListDataSources", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListDataSources", - "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.backupdr.v1.ListDataSourcesResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "ListDataSources", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListDataSources", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_GetDataSource_async", - "title": "BackupDR getDataSource Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a DataSource.", - "canonical": true, - "file": "backup_d_r.get_data_source.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetDataSource", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetDataSource", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.backupdr.v1.DataSource", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "GetDataSource", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetDataSource", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_UpdateDataSource_async", - "title": "BackupDR updateDataSource Sample", - "origin": "API_DEFINITION", - "description": " Updates the settings of a DataSource.", - "canonical": true, - "file": "backup_d_r.update_data_source.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 81, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateDataSource", - "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "data_source", - "type": ".google.cloud.backupdr.v1.DataSource" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "UpdateDataSource", - "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateDataSource", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_ListBackups_async", - "title": "BackupDR listBackups Sample", - "origin": "API_DEFINITION", - "description": " Lists Backups in a given project and location.", - "canonical": true, - "file": "backup_d_r.list_backups.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 82, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBackups", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackups", - "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" - }, - { - "name": "view", - "type": ".google.cloud.backupdr.v1.BackupView" - } - ], - "resultType": ".google.cloud.backupdr.v1.ListBackupsResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "ListBackups", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackups", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_GetBackup_async", - "title": "BackupDR getBackup Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a Backup.", - "canonical": true, - "file": "backup_d_r.get_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "view", - "type": ".google.cloud.backupdr.v1.BackupView" - } - ], - "resultType": ".google.cloud.backupdr.v1.Backup", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "GetBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_UpdateBackup_async", - "title": "BackupDR updateBackup Sample", - "origin": "API_DEFINITION", - "description": " Updates the settings of a Backup.", - "canonical": true, - "file": "backup_d_r.update_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "backup", - "type": ".google.cloud.backupdr.v1.Backup" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "UpdateBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.UpdateBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackup_async", - "title": "BackupDR deleteBackup Sample", - "origin": "API_DEFINITION", - "description": " Deletes a Backup.", - "canonical": true, - "file": "backup_d_r.delete_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "DeleteBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_RestoreBackup_async", - "title": "BackupDR restoreBackup Sample", - "origin": "API_DEFINITION", - "description": " Restore from a Backup", - "canonical": true, - "file": "backup_d_r.restore_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RestoreBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "compute_instance_target_environment", - "type": ".google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment" - }, - { - "name": "compute_instance_restore_properties", - "type": ".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "RestoreBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.RestoreBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupPlan_async", - "title": "BackupDR createBackupPlan Sample", - "origin": "API_DEFINITION", - "description": " Create a BackupPlan", - "canonical": true, - "file": "backup_d_r.create_backup_plan.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 83, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBackupPlan", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "backup_plan_id", - "type": "TYPE_STRING" - }, - { - "name": "backup_plan", - "type": ".google.cloud.backupdr.v1.BackupPlan" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "CreateBackupPlan", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlan", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_GetBackupPlan_async", - "title": "BackupDR getBackupPlan Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single BackupPlan.", - "canonical": true, - "file": "backup_d_r.get_backup_plan.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBackupPlan", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.backupdr.v1.BackupPlan", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "GetBackupPlan", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlan", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_ListBackupPlans_async", - "title": "BackupDR listBackupPlans Sample", - "origin": "API_DEFINITION", - "description": " Lists BackupPlans in a given project and location.", - "canonical": true, - "file": "backup_d_r.list_backup_plans.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 85, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBackupPlans", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", - "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.backupdr.v1.ListBackupPlansResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "ListBackupPlans", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlans", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupPlan_async", - "title": "BackupDR deleteBackupPlan Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single BackupPlan.", - "canonical": true, - "file": "backup_d_r.delete_backup_plan.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBackupPlan", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "DeleteBackupPlan", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlan", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async", - "title": "BackupDR createBackupPlanAssociation Sample", - "origin": "API_DEFINITION", - "description": " Create a BackupPlanAssociation", - "canonical": true, - "file": "backup_d_r.create_backup_plan_association.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 81, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBackupPlanAssociation", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "backup_plan_association_id", - "type": "TYPE_STRING" - }, - { - "name": "backup_plan_association", - "type": ".google.cloud.backupdr.v1.BackupPlanAssociation" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "CreateBackupPlanAssociation", - "fullName": "google.cloud.backupdr.v1.BackupDR.CreateBackupPlanAssociation", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_async", - "title": "BackupDR getBackupPlanAssociation Sample", - "origin": "API_DEFINITION", - "description": " Gets details of a single BackupPlanAssociation.", - "canonical": true, - "file": "backup_d_r.get_backup_plan_association.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBackupPlanAssociation", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.backupdr.v1.BackupPlanAssociation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "GetBackupPlanAssociation", - "fullName": "google.cloud.backupdr.v1.BackupDR.GetBackupPlanAssociation", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_async", - "title": "BackupDR listBackupPlanAssociations Sample", - "origin": "API_DEFINITION", - "description": " Lists BackupPlanAssociations in a given project and location.", - "canonical": true, - "file": "backup_d_r.list_backup_plan_associations.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBackupPlanAssociations", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", - "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" - } - ], - "resultType": ".google.cloud.backupdr.v1.ListBackupPlanAssociationsResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "ListBackupPlanAssociations", - "fullName": "google.cloud.backupdr.v1.BackupDR.ListBackupPlanAssociations", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async", - "title": "BackupDR deleteBackupPlanAssociation Sample", - "origin": "API_DEFINITION", - "description": " Deletes a single BackupPlanAssociation.", - "canonical": true, - "file": "backup_d_r.delete_backup_plan_association.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBackupPlanAssociation", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "DeleteBackupPlanAssociation", - "fullName": "google.cloud.backupdr.v1.BackupDR.DeleteBackupPlanAssociation", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_TriggerBackup_async", - "title": "BackupDR triggerBackup Sample", - "origin": "API_DEFINITION", - "description": " Triggers a new Backup.", - "canonical": true, - "file": "backup_d_r.trigger_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TriggerBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "rule_id", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "TriggerBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.TriggerBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/index.ts b/owl-bot-staging/google-cloud-backupdr/v1/src/index.ts deleted file mode 100644 index 025ea882aeb..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/src/index.ts +++ /dev/null @@ -1,25 +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 -// -// 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 BackupDRClient = v1.BackupDRClient; -type BackupDRClient = v1.BackupDRClient; -export {v1, BackupDRClient}; -export default {v1, BackupDRClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts deleted file mode 100644 index ca94beb6887..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client.ts +++ /dev/null @@ -1,4711 +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 -// -// 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/backup_d_r_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './backup_d_r_client_config.json'; -const version = require('../../../package.json').version; - -/** - * The BackupDR Service - * @class - * @memberof v1 - */ -export class BackupDRClient { - 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; - backupDRStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of BackupDRClient. - * - * @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 BackupDRClient({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 BackupDRClient; - 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 = 'backupdr.' + 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 = { - backupPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup}' - ), - backupPlanPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/backupPlans/{backup_plan}' - ), - backupPlanAssociationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/backupPlanAssociations/{backup_plan_association}' - ), - backupVaultPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/backupVaults/{backupvault}' - ), - dataSourcePathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - managementServerPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/managementServers/{managementserver}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - }; - - // 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 = { - listManagementServers: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'managementServers'), - listBackupVaults: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupVaults'), - fetchUsableBackupVaults: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupVaults'), - listDataSources: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataSources'), - listBackups: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backups'), - listBackupPlans: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupPlans'), - listBackupPlanAssociations: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'backupPlanAssociations') - }; - - 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.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1/{resource=projects/*/locations/*/managementServers/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/*/managementServers/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/*/managementServers/*}:testIamPermissions',body: '*',},{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 createManagementServerResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.ManagementServer') as gax.protobuf.Type; - const createManagementServerMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const deleteManagementServerResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteManagementServerMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const createBackupVaultResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.BackupVault') as gax.protobuf.Type; - const createBackupVaultMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const updateBackupVaultResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.BackupVault') as gax.protobuf.Type; - const updateBackupVaultMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const deleteBackupVaultResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteBackupVaultMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const updateDataSourceResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.DataSource') as gax.protobuf.Type; - const updateDataSourceMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const updateBackupResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.Backup') as gax.protobuf.Type; - const updateBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const deleteBackupResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.Backup') as gax.protobuf.Type; - const deleteBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const restoreBackupResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.RestoreBackupResponse') as gax.protobuf.Type; - const restoreBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const createBackupPlanResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.BackupPlan') as gax.protobuf.Type; - const createBackupPlanMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const deleteBackupPlanResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteBackupPlanMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const createBackupPlanAssociationResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.BackupPlanAssociation') as gax.protobuf.Type; - const createBackupPlanAssociationMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const deleteBackupPlanAssociationResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteBackupPlanAssociationMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - const triggerBackupResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.BackupPlanAssociation') as gax.protobuf.Type; - const triggerBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createManagementServer: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createManagementServerResponse.decode.bind(createManagementServerResponse), - createManagementServerMetadata.decode.bind(createManagementServerMetadata)), - deleteManagementServer: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteManagementServerResponse.decode.bind(deleteManagementServerResponse), - deleteManagementServerMetadata.decode.bind(deleteManagementServerMetadata)), - createBackupVault: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createBackupVaultResponse.decode.bind(createBackupVaultResponse), - createBackupVaultMetadata.decode.bind(createBackupVaultMetadata)), - updateBackupVault: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateBackupVaultResponse.decode.bind(updateBackupVaultResponse), - updateBackupVaultMetadata.decode.bind(updateBackupVaultMetadata)), - deleteBackupVault: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteBackupVaultResponse.decode.bind(deleteBackupVaultResponse), - deleteBackupVaultMetadata.decode.bind(deleteBackupVaultMetadata)), - updateDataSource: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateDataSourceResponse.decode.bind(updateDataSourceResponse), - updateDataSourceMetadata.decode.bind(updateDataSourceMetadata)), - updateBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateBackupResponse.decode.bind(updateBackupResponse), - updateBackupMetadata.decode.bind(updateBackupMetadata)), - deleteBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteBackupResponse.decode.bind(deleteBackupResponse), - deleteBackupMetadata.decode.bind(deleteBackupMetadata)), - restoreBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - restoreBackupResponse.decode.bind(restoreBackupResponse), - restoreBackupMetadata.decode.bind(restoreBackupMetadata)), - createBackupPlan: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createBackupPlanResponse.decode.bind(createBackupPlanResponse), - createBackupPlanMetadata.decode.bind(createBackupPlanMetadata)), - deleteBackupPlan: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteBackupPlanResponse.decode.bind(deleteBackupPlanResponse), - deleteBackupPlanMetadata.decode.bind(deleteBackupPlanMetadata)), - createBackupPlanAssociation: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createBackupPlanAssociationResponse.decode.bind(createBackupPlanAssociationResponse), - createBackupPlanAssociationMetadata.decode.bind(createBackupPlanAssociationMetadata)), - deleteBackupPlanAssociation: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteBackupPlanAssociationResponse.decode.bind(deleteBackupPlanAssociationResponse), - deleteBackupPlanAssociationMetadata.decode.bind(deleteBackupPlanAssociationMetadata)), - triggerBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - triggerBackupResponse.decode.bind(triggerBackupResponse), - triggerBackupMetadata.decode.bind(triggerBackupMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.backupdr.v1.BackupDR', 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.backupDRStub) { - return this.backupDRStub; - } - - // Put together the "service stub" for - // google.cloud.backupdr.v1.BackupDR. - this.backupDRStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.backupdr.v1.BackupDR') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.backupdr.v1.BackupDR, - 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 backupDRStubMethods = - ['listManagementServers', 'getManagementServer', 'createManagementServer', 'deleteManagementServer', 'createBackupVault', 'listBackupVaults', 'fetchUsableBackupVaults', 'getBackupVault', 'updateBackupVault', 'deleteBackupVault', 'listDataSources', 'getDataSource', 'updateDataSource', 'listBackups', 'getBackup', 'updateBackup', 'deleteBackup', 'restoreBackup', 'createBackupPlan', 'getBackupPlan', 'listBackupPlans', 'deleteBackupPlan', 'createBackupPlanAssociation', 'getBackupPlanAssociation', 'listBackupPlanAssociations', 'deleteBackupPlanAssociation', 'triggerBackup']; - for (const methodName of backupDRStubMethods) { - const callPromise = this.backupDRStub.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.backupDRStub; - } - - /** - * 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 'backupdr.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 'backupdr.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 -- - // ------------------- -/** - * Gets details of a single ManagementServer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the management server resource name, in the format - * 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' - * @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.backupdr.v1.ManagementServer|ManagementServer}. - * 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/backup_d_r.get_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_GetManagementServer_async - */ - getManagementServer( - request?: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IGetManagementServerRequest|undefined, {}|undefined - ]>; - getManagementServer( - request: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, - {}|null|undefined>): void; - getManagementServer( - request: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, - {}|null|undefined>): void; - getManagementServer( - request?: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IGetManagementServerRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IGetManagementServerRequest|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.getManagementServer(request, options, callback); - } -/** - * Gets details of a BackupVault. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the backupvault store resource name, in the format - * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' - * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * Vault - * @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.backupdr.v1.BackupVault|BackupVault}. - * 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/backup_d_r.get_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_GetBackupVault_async - */ - getBackupVault( - request?: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|undefined, {}|undefined - ]>; - getBackupVault( - request: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, - {}|null|undefined>): void; - getBackupVault( - request: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, - {}|null|undefined>): void; - getBackupVault( - request?: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IGetBackupVaultRequest|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.getBackupVault(request, options, callback); - } -/** - * Gets details of a DataSource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the data source resource name, in the format - * 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' - * @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.backupdr.v1.DataSource|DataSource}. - * 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/backup_d_r.get_data_source.js - * region_tag:backupdr_v1_generated_BackupDR_GetDataSource_async - */ - getDataSource( - request?: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IDataSource, - protos.google.cloud.backupdr.v1.IGetDataSourceRequest|undefined, {}|undefined - ]>; - getDataSource( - request: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IDataSource, - protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, - {}|null|undefined>): void; - getDataSource( - request: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IDataSource, - protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, - {}|null|undefined>): void; - getDataSource( - request?: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IDataSource, - protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IDataSource, - protos.google.cloud.backupdr.v1.IGetDataSourceRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IDataSource, - protos.google.cloud.backupdr.v1.IGetDataSourceRequest|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.getDataSource(request, options, callback); - } -/** - * Gets details of a Backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the data source resource name, in the format - * 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' - * @param {google.cloud.backupdr.v1.BackupView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * resource. - * @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.backupdr.v1.Backup|Backup}. - * 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/backup_d_r.get_backup.js - * region_tag:backupdr_v1_generated_BackupDR_GetBackup_async - */ - getBackup( - request?: protos.google.cloud.backupdr.v1.IGetBackupRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IGetBackupRequest|undefined, {}|undefined - ]>; - getBackup( - request: protos.google.cloud.backupdr.v1.IGetBackupRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, - {}|null|undefined>): void; - getBackup( - request: protos.google.cloud.backupdr.v1.IGetBackupRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, - {}|null|undefined>): void; - getBackup( - request?: protos.google.cloud.backupdr.v1.IGetBackupRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IGetBackupRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IGetBackupRequest|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.getBackup(request, options, callback); - } -/** - * Gets details of a single BackupPlan. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the `BackupPlan` to retrieve. - * - * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - * @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.backupdr.v1.BackupPlan|BackupPlan}. - * 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/backup_d_r.get_backup_plan.js - * region_tag:backupdr_v1_generated_BackupDR_GetBackupPlan_async - */ - getBackupPlan( - request?: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlan, - protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|undefined, {}|undefined - ]>; - getBackupPlan( - request: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackupPlan, - protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, - {}|null|undefined>): void; - getBackupPlan( - request: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackupPlan, - protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, - {}|null|undefined>): void; - getBackupPlan( - request?: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IBackupPlan, - protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IBackupPlan, - protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlan, - protos.google.cloud.backupdr.v1.IGetBackupPlanRequest|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.getBackupPlan(request, options, callback); - } -/** - * Gets details of a single BackupPlanAssociation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the backup plan association resource, in the format - * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. - * 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/backup_d_r.get_backup_plan_association.js - * region_tag:backupdr_v1_generated_BackupDR_GetBackupPlanAssociation_async - */ - getBackupPlanAssociation( - request?: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlanAssociation, - protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|undefined, {}|undefined - ]>; - getBackupPlanAssociation( - request: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackupPlanAssociation, - protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, - {}|null|undefined>): void; - getBackupPlanAssociation( - request: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IBackupPlanAssociation, - protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, - {}|null|undefined>): void; - getBackupPlanAssociation( - request?: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.backupdr.v1.IBackupPlanAssociation, - protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.backupdr.v1.IBackupPlanAssociation, - protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlanAssociation, - protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest|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.getBackupPlanAssociation(request, options, callback); - } - -/** - * Creates a new ManagementServer in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The management server project and location in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR - * locations map to Google Cloud regions, for example **us-central1**. - * @param {string} request.managementServerId - * Required. The name of the management server to create. The name must be - * unique for the specified project and location. - * @param {google.cloud.backupdr.v1.ManagementServer} request.managementServer - * Required. A [management server - * resource][google.cloud.backupdr.v1.ManagementServer] - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.create_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_CreateManagementServer_async - */ - createManagementServer( - request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createManagementServer( - request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createManagementServer( - request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createManagementServer( - request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, - 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.createManagementServer(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createManagementServer()`. - * @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/backup_d_r.create_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_CreateManagementServer_async - */ - async checkCreateManagementServerProgress(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.createManagementServer, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a single ManagementServer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the resource - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.delete_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteManagementServer_async - */ - deleteManagementServer( - request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteManagementServer( - request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteManagementServer( - request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteManagementServer( - request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, - 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.deleteManagementServer(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteManagementServer()`. - * @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/backup_d_r.delete_management_server.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteManagementServer_async - */ - async checkDeleteManagementServerProgress(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.deleteManagementServer, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a new BackupVault in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. Value for parent. - * @param {string} request.backupVaultId - * Required. ID of the requesting object - * If auto-generating ID server-side, remove this field and - * backup_vault_id from the method_signature of Create RPC - * @param {google.cloud.backupdr.v1.BackupVault} request.backupVault - * Required. The resource being created - * @param {string} [request.requestId] - * Optional. An optional 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 request, but do not perform mutations. - * The default is 'false'. - * @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/backup_d_r.create_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_CreateBackupVault_async - */ - createBackupVault( - request?: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createBackupVault( - request: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupVault( - request: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupVault( - request?: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, - 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.createBackupVault(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createBackupVault()`. - * @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/backup_d_r.create_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_CreateBackupVault_async - */ - async checkCreateBackupVaultProgress(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.createBackupVault, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the settings of a BackupVault. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * BackupVault 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 the request will fail. - * @param {google.cloud.backupdr.v1.BackupVault} request.backupVault - * Required. The resource being updated - * @param {string} [request.requestId] - * Optional. An optional 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 request, but do not perform mutations. - * The default is 'false'. - * @param {boolean} [request.force] - * Optional. If set to true, will not check plan duration against backup vault - * enforcement duration. - * @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/backup_d_r.update_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_UpdateBackupVault_async - */ - updateBackupVault( - request?: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateBackupVault( - request: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateBackupVault( - request: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateBackupVault( - request?: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, - 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({ - 'backup_vault.name': request.backupVault!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateBackupVault(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateBackupVault()`. - * @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/backup_d_r.update_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_UpdateBackupVault_async - */ - async checkUpdateBackupVaultProgress(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.updateBackupVault, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a BackupVault. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the resource. - * @param {string} [request.requestId] - * Optional. An optional 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 data source from this backup vault will also - * be deleted. - * @param {string} request.etag - * The current etag of the backup vault. - * If an etag is provided and does not match the current etag of the - * connection, deletion will be blocked. - * @param {boolean} [request.validateOnly] - * Optional. Only validate the request, but do not perform mutations. - * The default is 'false'. - * @param {boolean} [request.allowMissing] - * Optional. If true and the BackupVault is not found, the request will - * succeed but no action will be taken. - * @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/backup_d_r.delete_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupVault_async - */ - deleteBackupVault( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteBackupVault( - request: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupVault( - request: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupVault( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, - 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.deleteBackupVault(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteBackupVault()`. - * @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/backup_d_r.delete_backup_vault.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupVault_async - */ - async checkDeleteBackupVaultProgress(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.deleteBackupVault, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the settings of a DataSource. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * DataSource 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 the request will fail. - * @param {google.cloud.backupdr.v1.DataSource} request.dataSource - * Required. The resource being updated - * @param {string} [request.requestId] - * Optional. An optional 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.allowMissing] - * Optional. Enable upsert. - * @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/backup_d_r.update_data_source.js - * region_tag:backupdr_v1_generated_BackupDR_UpdateDataSource_async - */ - updateDataSource( - request?: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateDataSource( - request: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateDataSource( - request: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateDataSource( - request?: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, - 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({ - 'data_source.name': request.dataSource!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateDataSource(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateDataSource()`. - * @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/backup_d_r.update_data_source.js - * region_tag:backupdr_v1_generated_BackupDR_UpdateDataSource_async - */ - async checkUpdateDataSourceProgress(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.updateDataSource, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the settings of a Backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Field mask is used to specify the fields to be overwritten in the - * Backup 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 the request will fail. - * @param {google.cloud.backupdr.v1.Backup} request.backup - * Required. The resource being updated - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.update_backup.js - * region_tag:backupdr_v1_generated_BackupDR_UpdateBackup_async - */ - updateBackup( - request?: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateBackup( - request: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateBackup( - request: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateBackup( - request?: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, - 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({ - 'backup.name': request.backup!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateBackup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateBackup()`. - * @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/backup_d_r.update_backup.js - * region_tag:backupdr_v1_generated_BackupDR_UpdateBackup_async - */ - async checkUpdateBackupProgress(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.updateBackup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a Backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the resource. - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.delete_backup.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackup_async - */ - deleteBackup( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteBackup( - request: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackup( - request: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackup( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, - 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.deleteBackup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteBackup()`. - * @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/backup_d_r.delete_backup.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackup_async - */ - async checkDeleteBackupProgress(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.deleteBackup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Restore from a Backup - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the Backup instance, in the format - * 'projects/* /locations/* /backupVaults/* /dataSources/* /backups/'. - * @param {string} [request.requestId] - * Optional. An optional 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 {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} request.computeInstanceTargetEnvironment - * Compute Engine target environment to be used during restore. - * @param {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} request.computeInstanceRestoreProperties - * Compute Engine instance properties to be overridden during restore. - * @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/backup_d_r.restore_backup.js - * region_tag:backupdr_v1_generated_BackupDR_RestoreBackup_async - */ - restoreBackup( - request?: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - restoreBackup( - request: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - restoreBackup( - request: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - restoreBackup( - request?: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, - 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.restoreBackup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `restoreBackup()`. - * @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/backup_d_r.restore_backup.js - * region_tag:backupdr_v1_generated_BackupDR_RestoreBackup_async - */ - async checkRestoreBackupProgress(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.restoreBackup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Create a BackupPlan - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The `BackupPlan` project and location in the format - * `projects/{project}/locations/{location}`. In Cloud BackupDR locations - * map to GCP regions, for example **us-central1**. - * @param {string} request.backupPlanId - * Required. The name of the `BackupPlan` to create. The name must be unique - * for the specified project and location.The name must start with a lowercase - * letter followed by up to 62 lowercase letters, numbers, or hyphens. - * Pattern, /{@link protos.a-z0-9-|a-z}{,62}/. - * @param {google.cloud.backupdr.v1.BackupPlan} request.backupPlan - * Required. The `BackupPlan` resource object to create. - * @param {string} [request.requestId] - * Optional. An optional 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 t - * he 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/backup_d_r.create_backup_plan.js - * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlan_async - */ - createBackupPlan( - request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createBackupPlan( - request: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupPlan( - request: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupPlan( - request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, - 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.createBackupPlan(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createBackupPlan()`. - * @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/backup_d_r.create_backup_plan.js - * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlan_async - */ - async checkCreateBackupPlanProgress(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.createBackupPlan, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a single BackupPlan. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the `BackupPlan` to delete. - * - * Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.delete_backup_plan.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlan_async - */ - deleteBackupPlan( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteBackupPlan( - request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupPlan( - request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupPlan( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, - 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.deleteBackupPlan(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteBackupPlan()`. - * @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/backup_d_r.delete_backup_plan.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlan_async - */ - async checkDeleteBackupPlanProgress(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.deleteBackupPlan, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Create a BackupPlanAssociation - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The backup plan association project and location in the format - * `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations - * map to GCP regions, for example **us-central1**. - * @param {string} request.backupPlanAssociationId - * Required. The name of the backup plan association to create. The name must - * be unique for the specified project and location. - * @param {google.cloud.backupdr.v1.BackupPlanAssociation} request.backupPlanAssociation - * Required. The resource being created - * @param {string} [request.requestId] - * Optional. An optional 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 t - * he 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/backup_d_r.create_backup_plan_association.js - * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async - */ - createBackupPlanAssociation( - request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createBackupPlanAssociation( - request: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupPlanAssociation( - request: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createBackupPlanAssociation( - request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, - 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.createBackupPlanAssociation(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createBackupPlanAssociation()`. - * @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/backup_d_r.create_backup_plan_association.js - * region_tag:backupdr_v1_generated_BackupDR_CreateBackupPlanAssociation_async - */ - async checkCreateBackupPlanAssociationProgress(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.createBackupPlanAssociation, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a single BackupPlanAssociation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the backup plan association resource, in the format - * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.delete_backup_plan_association.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async - */ - deleteBackupPlanAssociation( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteBackupPlanAssociation( - request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupPlanAssociation( - request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteBackupPlanAssociation( - request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, - 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.deleteBackupPlanAssociation(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteBackupPlanAssociation()`. - * @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/backup_d_r.delete_backup_plan_association.js - * region_tag:backupdr_v1_generated_BackupDR_DeleteBackupPlanAssociation_async - */ - async checkDeleteBackupPlanAssociationProgress(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.deleteBackupPlanAssociation, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Triggers a new Backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the backup plan association resource, in the format - * `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}` - * @param {string} request.ruleId - * Required. backup rule_id for which a backup needs to be triggered. - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.trigger_backup.js - * region_tag:backupdr_v1_generated_BackupDR_TriggerBackup_async - */ - triggerBackup( - request?: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - triggerBackup( - request: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - triggerBackup( - request: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - triggerBackup( - request?: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, - 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.triggerBackup(request, options, callback); - } -/** - * Check the status of the long running operation returned by `triggerBackup()`. - * @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/backup_d_r.trigger_backup.js - * region_tag:backupdr_v1_generated_BackupDR_TriggerBackup_async - */ - async checkTriggerBackupProgress(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.triggerBackup, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists ManagementServers in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve management servers - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud BackupDR, locations map to Google Cloud regions, for example - * **us-central1**. To retrieve management servers for all locations, use "-" - * for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.ManagementServer|ManagementServer}. - * 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 `listManagementServersAsync()` - * 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. - */ - listManagementServers( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IManagementServer[], - protos.google.cloud.backupdr.v1.IListManagementServersRequest|null, - protos.google.cloud.backupdr.v1.IListManagementServersResponse - ]>; - listManagementServers( - request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, - protos.google.cloud.backupdr.v1.IManagementServer>): void; - listManagementServers( - request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, - protos.google.cloud.backupdr.v1.IManagementServer>): void; - listManagementServers( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, - protos.google.cloud.backupdr.v1.IManagementServer>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListManagementServersRequest, - protos.google.cloud.backupdr.v1.IListManagementServersResponse|null|undefined, - protos.google.cloud.backupdr.v1.IManagementServer>): - Promise<[ - protos.google.cloud.backupdr.v1.IManagementServer[], - protos.google.cloud.backupdr.v1.IListManagementServersRequest|null, - protos.google.cloud.backupdr.v1.IListManagementServersResponse - ]>|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.listManagementServers(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 project and location for which to retrieve management servers - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud BackupDR, locations map to Google Cloud regions, for example - * **us-central1**. To retrieve management servers for all locations, use "-" - * for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.ManagementServer|ManagementServer} 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 `listManagementServersAsync()` - * 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. - */ - listManagementServersStream( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, - 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['listManagementServers']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listManagementServers.createStream( - this.innerApiCalls.listManagementServers as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listManagementServers`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve management servers - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud BackupDR, locations map to Google Cloud regions, for example - * **us-central1**. To retrieve management servers for all locations, use "-" - * for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.ManagementServer|ManagementServer}. 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/backup_d_r.list_management_servers.js - * region_tag:backupdr_v1_generated_BackupDR_ListManagementServers_async - */ - listManagementServersAsync( - request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, - 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['listManagementServers']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listManagementServers.asyncIterate( - this.innerApiCalls['listManagementServers'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists BackupVaults in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * Vault. - * @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.backupdr.v1.BackupVault|BackupVault}. - * 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 `listBackupVaultsAsync()` - * 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. - */ - listBackupVaults( - request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupVault[], - protos.google.cloud.backupdr.v1.IListBackupVaultsRequest|null, - protos.google.cloud.backupdr.v1.IListBackupVaultsResponse - ]>; - listBackupVaults( - request: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>): void; - listBackupVaults( - request: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>): void; - listBackupVaults( - request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IListBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupVault[], - protos.google.cloud.backupdr.v1.IListBackupVaultsRequest|null, - protos.google.cloud.backupdr.v1.IListBackupVaultsResponse - ]>|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.listBackupVaults(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 project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * Vault. - * @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.backupdr.v1.BackupVault|BackupVault} 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 `listBackupVaultsAsync()` - * 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. - */ - listBackupVaultsStream( - request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - 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['listBackupVaults']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackupVaults.createStream( - this.innerApiCalls.listBackupVaults as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listBackupVaults`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @param {google.cloud.backupdr.v1.BackupVaultView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * Vault. - * @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.backupdr.v1.BackupVault|BackupVault}. 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/backup_d_r.list_backup_vaults.js - * region_tag:backupdr_v1_generated_BackupDR_ListBackupVaults_async - */ - listBackupVaultsAsync( - request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, - 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['listBackupVaults']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackupVaults.asyncIterate( - this.innerApiCalls['listBackupVaults'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * FetchUsableBackupVaults lists usable BackupVaults in a given project and - * location. Usable BackupVault are the ones that user has - * backupdr.backupVaults.get permission. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.BackupVault|BackupVault}. - * 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 `fetchUsableBackupVaultsAsync()` - * 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. - */ - fetchUsableBackupVaults( - request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupVault[], - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest|null, - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse - ]>; - fetchUsableBackupVaults( - request: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>): void; - fetchUsableBackupVaults( - request: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>): void; - fetchUsableBackupVaults( - request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupVault>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupVault[], - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest|null, - protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse - ]>|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.fetchUsableBackupVaults(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 project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.BackupVault|BackupVault} 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 `fetchUsableBackupVaultsAsync()` - * 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. - */ - fetchUsableBackupVaultsStream( - request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - 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['fetchUsableBackupVaults']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.fetchUsableBackupVaults.createStream( - this.innerApiCalls.fetchUsableBackupVaults as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `fetchUsableBackupVaults`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backupvault stores - * information, in the format 'projects/{project_id}/locations/{location}'. In - * Cloud Backup and DR, locations map to Google Cloud regions, for example - * **us-central1**. - * To retrieve backupvault stores for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.BackupVault|BackupVault}. 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/backup_d_r.fetch_usable_backup_vaults.js - * region_tag:backupdr_v1_generated_BackupDR_FetchUsableBackupVaults_async - */ - fetchUsableBackupVaultsAsync( - request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, - 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['fetchUsableBackupVaults']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.fetchUsableBackupVaults.asyncIterate( - this.innerApiCalls['fetchUsableBackupVaults'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists DataSources in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve data - * sources information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.DataSource|DataSource}. - * 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 `listDataSourcesAsync()` - * 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. - */ - listDataSources( - request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IDataSource[], - protos.google.cloud.backupdr.v1.IListDataSourcesRequest|null, - protos.google.cloud.backupdr.v1.IListDataSourcesResponse - ]>; - listDataSources( - request: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, - protos.google.cloud.backupdr.v1.IDataSource>): void; - listDataSources( - request: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, - protos.google.cloud.backupdr.v1.IDataSource>): void; - listDataSources( - request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, - protos.google.cloud.backupdr.v1.IDataSource>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - protos.google.cloud.backupdr.v1.IListDataSourcesResponse|null|undefined, - protos.google.cloud.backupdr.v1.IDataSource>): - Promise<[ - protos.google.cloud.backupdr.v1.IDataSource[], - protos.google.cloud.backupdr.v1.IListDataSourcesRequest|null, - protos.google.cloud.backupdr.v1.IListDataSourcesResponse - ]>|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.listDataSources(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 project and location for which to retrieve data - * sources information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.DataSource|DataSource} 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 `listDataSourcesAsync()` - * 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. - */ - listDataSourcesStream( - request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - 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['listDataSources']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDataSources.createStream( - this.innerApiCalls.listDataSources as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listDataSources`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve data - * sources information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @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.backupdr.v1.DataSource|DataSource}. 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/backup_d_r.list_data_sources.js - * region_tag:backupdr_v1_generated_BackupDR_ListDataSources_async - */ - listDataSourcesAsync( - request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, - 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['listDataSources']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listDataSources.asyncIterate( - this.innerApiCalls['listDataSources'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists Backups in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backup - * information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @param {google.cloud.backupdr.v1.BackupView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * resource. - * @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.backupdr.v1.Backup|Backup}. - * 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 `listBackupsAsync()` - * 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. - */ - listBackups( - request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackup[], - protos.google.cloud.backupdr.v1.IListBackupsRequest|null, - protos.google.cloud.backupdr.v1.IListBackupsResponse - ]>; - listBackups( - request: protos.google.cloud.backupdr.v1.IListBackupsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupsRequest, - protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackup>): void; - listBackups( - request: protos.google.cloud.backupdr.v1.IListBackupsRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupsRequest, - protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackup>): void; - listBackups( - request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupsRequest, - protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackup>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupsRequest, - protos.google.cloud.backupdr.v1.IListBackupsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackup>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackup[], - protos.google.cloud.backupdr.v1.IListBackupsRequest|null, - protos.google.cloud.backupdr.v1.IListBackupsResponse - ]>|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.listBackups(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 project and location for which to retrieve backup - * information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @param {google.cloud.backupdr.v1.BackupView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * resource. - * @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.backupdr.v1.Backup|Backup} 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 `listBackupsAsync()` - * 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. - */ - listBackupsStream( - request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, - 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['listBackups']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackups.createStream( - this.innerApiCalls.listBackups as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listBackups`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backup - * information, in the format - * 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, - * locations map to Google Cloud regions, for example **us-central1**. - * To retrieve data sources for all locations, use "-" for the - * '{location}' value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Hint for how to order the results. - * @param {google.cloud.backupdr.v1.BackupView} [request.view] - * Optional. Reserved for future use to provide a BASIC & FULL view of Backup - * resource. - * @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.backupdr.v1.Backup|Backup}. 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/backup_d_r.list_backups.js - * region_tag:backupdr_v1_generated_BackupDR_ListBackups_async - */ - listBackupsAsync( - request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, - 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['listBackups']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackups.asyncIterate( - this.innerApiCalls['listBackups'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists BackupPlans in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve `BackupPlans` - * information. Format: `projects/{project}/locations/{location}`. In Cloud - * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To - * retrieve backup plans for all locations, use "-" for the - * `{location}` value. - * @param {number} [request.pageSize] - * Optional. The maximum number of `BackupPlans` to return in a single - * response. If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} - * to determine if there are more instances left to be queried. - * @param {string} [request.pageToken] - * Optional. The value of - * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} - * received from a previous `ListBackupPlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackupPlans` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Field match expression used to filter the results. - * @param {string} [request.orderBy] - * Optional. Field by which to sort the results. - * @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.backupdr.v1.BackupPlan|BackupPlan}. - * 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 `listBackupPlansAsync()` - * 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. - */ - listBackupPlans( - request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlan[], - protos.google.cloud.backupdr.v1.IListBackupPlansRequest|null, - protos.google.cloud.backupdr.v1.IListBackupPlansResponse - ]>; - listBackupPlans( - request: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlan>): void; - listBackupPlans( - request: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlan>): void; - listBackupPlans( - request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlan>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - protos.google.cloud.backupdr.v1.IListBackupPlansResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlan>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlan[], - protos.google.cloud.backupdr.v1.IListBackupPlansRequest|null, - protos.google.cloud.backupdr.v1.IListBackupPlansResponse - ]>|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.listBackupPlans(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 project and location for which to retrieve `BackupPlans` - * information. Format: `projects/{project}/locations/{location}`. In Cloud - * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To - * retrieve backup plans for all locations, use "-" for the - * `{location}` value. - * @param {number} [request.pageSize] - * Optional. The maximum number of `BackupPlans` to return in a single - * response. If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} - * to determine if there are more instances left to be queried. - * @param {string} [request.pageToken] - * Optional. The value of - * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} - * received from a previous `ListBackupPlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackupPlans` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Field match expression used to filter the results. - * @param {string} [request.orderBy] - * Optional. Field by which to sort the results. - * @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.backupdr.v1.BackupPlan|BackupPlan} 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 `listBackupPlansAsync()` - * 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. - */ - listBackupPlansStream( - request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - 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['listBackupPlans']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackupPlans.createStream( - this.innerApiCalls.listBackupPlans as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listBackupPlans`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve `BackupPlans` - * information. Format: `projects/{project}/locations/{location}`. In Cloud - * BackupDR, locations map to GCP regions, for e.g. **us-central1**. To - * retrieve backup plans for all locations, use "-" for the - * `{location}` value. - * @param {number} [request.pageSize] - * Optional. The maximum number of `BackupPlans` to return in a single - * response. If not specified, a default value will be chosen by the service. - * Note that the response may include a partial list and a caller should - * only rely on the response's - * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} - * to determine if there are more instances left to be queried. - * @param {string} [request.pageToken] - * Optional. The value of - * {@link protos.google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token|next_page_token} - * received from a previous `ListBackupPlans` call. - * Provide this to retrieve the subsequent page in a multi-page list of - * results. When paginating, all other parameters provided to - * `ListBackupPlans` must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. Field match expression used to filter the results. - * @param {string} [request.orderBy] - * Optional. Field by which to sort the results. - * @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.backupdr.v1.BackupPlan|BackupPlan}. 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/backup_d_r.list_backup_plans.js - * region_tag:backupdr_v1_generated_BackupDR_ListBackupPlans_async - */ - listBackupPlansAsync( - request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, - 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['listBackupPlans']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackupPlans.asyncIterate( - this.innerApiCalls['listBackupPlans'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists BackupPlanAssociations in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backup Plan - * Associations information, in the format - * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations - * map to GCP regions, for example **us-central1**. To retrieve backup plan - * associations for all locations, use "-" for the - * `{location}` value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results - * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. - * 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 `listBackupPlanAssociationsAsync()` - * 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. - */ - listBackupPlanAssociations( - request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlanAssociation[], - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest|null, - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse - ]>; - listBackupPlanAssociations( - request: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): void; - listBackupPlanAssociations( - request: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - callback: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): void; - listBackupPlanAssociations( - request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlanAssociation>, - callback?: PaginationCallback< - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse|null|undefined, - protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): - Promise<[ - protos.google.cloud.backupdr.v1.IBackupPlanAssociation[], - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest|null, - protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse - ]>|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.listBackupPlanAssociations(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 project and location for which to retrieve backup Plan - * Associations information, in the format - * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations - * map to GCP regions, for example **us-central1**. To retrieve backup plan - * associations for all locations, use "-" for the - * `{location}` value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results - * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation} 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 `listBackupPlanAssociationsAsync()` - * 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. - */ - listBackupPlanAssociationsStream( - request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - 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['listBackupPlanAssociations']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackupPlanAssociations.createStream( - this.innerApiCalls.listBackupPlanAssociations as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listBackupPlanAssociations`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve backup Plan - * Associations information, in the format - * `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations - * map to GCP regions, for example **us-central1**. To retrieve backup plan - * associations for all locations, use "-" for the - * `{location}` value. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results - * @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.backupdr.v1.BackupPlanAssociation|BackupPlanAssociation}. 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/backup_d_r.list_backup_plan_associations.js - * region_tag:backupdr_v1_generated_BackupDR_ListBackupPlanAssociations_async - */ - listBackupPlanAssociationsAsync( - request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, - 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['listBackupPlanAssociations']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listBackupPlanAssociations.asyncIterate( - this.innerApiCalls['listBackupPlanAssociations'] 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 backup resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} backupvault - * @param {string} datasource - * @param {string} backup - * @returns {string} Resource name string. - */ - backupPath(project:string,location:string,backupvault:string,datasource:string,backup:string) { - return this.pathTemplates.backupPathTemplate.render({ - project: project, - location: location, - backupvault: backupvault, - datasource: datasource, - backup: backup, - }); - } - - /** - * Parse the project from Backup resource. - * - * @param {string} backupName - * A fully-qualified path representing Backup resource. - * @returns {string} A string representing the project. - */ - matchProjectFromBackupName(backupName: string) { - return this.pathTemplates.backupPathTemplate.match(backupName).project; - } - - /** - * Parse the location from Backup resource. - * - * @param {string} backupName - * A fully-qualified path representing Backup resource. - * @returns {string} A string representing the location. - */ - matchLocationFromBackupName(backupName: string) { - return this.pathTemplates.backupPathTemplate.match(backupName).location; - } - - /** - * Parse the backupvault from Backup resource. - * - * @param {string} backupName - * A fully-qualified path representing Backup resource. - * @returns {string} A string representing the backupvault. - */ - matchBackupvaultFromBackupName(backupName: string) { - return this.pathTemplates.backupPathTemplate.match(backupName).backupvault; - } - - /** - * Parse the datasource from Backup resource. - * - * @param {string} backupName - * A fully-qualified path representing Backup resource. - * @returns {string} A string representing the datasource. - */ - matchDatasourceFromBackupName(backupName: string) { - return this.pathTemplates.backupPathTemplate.match(backupName).datasource; - } - - /** - * Parse the backup from Backup resource. - * - * @param {string} backupName - * A fully-qualified path representing Backup resource. - * @returns {string} A string representing the backup. - */ - matchBackupFromBackupName(backupName: string) { - return this.pathTemplates.backupPathTemplate.match(backupName).backup; - } - - /** - * Return a fully-qualified backupPlan resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} backup_plan - * @returns {string} Resource name string. - */ - backupPlanPath(project:string,location:string,backupPlan:string) { - return this.pathTemplates.backupPlanPathTemplate.render({ - project: project, - location: location, - backup_plan: backupPlan, - }); - } - - /** - * Parse the project from BackupPlan resource. - * - * @param {string} backupPlanName - * A fully-qualified path representing BackupPlan resource. - * @returns {string} A string representing the project. - */ - matchProjectFromBackupPlanName(backupPlanName: string) { - return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName).project; - } - - /** - * Parse the location from BackupPlan resource. - * - * @param {string} backupPlanName - * A fully-qualified path representing BackupPlan resource. - * @returns {string} A string representing the location. - */ - matchLocationFromBackupPlanName(backupPlanName: string) { - return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName).location; - } - - /** - * Parse the backup_plan from BackupPlan resource. - * - * @param {string} backupPlanName - * A fully-qualified path representing BackupPlan resource. - * @returns {string} A string representing the backup_plan. - */ - matchBackupPlanFromBackupPlanName(backupPlanName: string) { - return this.pathTemplates.backupPlanPathTemplate.match(backupPlanName).backup_plan; - } - - /** - * Return a fully-qualified backupPlanAssociation resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} backup_plan_association - * @returns {string} Resource name string. - */ - backupPlanAssociationPath(project:string,location:string,backupPlanAssociation:string) { - return this.pathTemplates.backupPlanAssociationPathTemplate.render({ - project: project, - location: location, - backup_plan_association: backupPlanAssociation, - }); - } - - /** - * Parse the project from BackupPlanAssociation resource. - * - * @param {string} backupPlanAssociationName - * A fully-qualified path representing BackupPlanAssociation resource. - * @returns {string} A string representing the project. - */ - matchProjectFromBackupPlanAssociationName(backupPlanAssociationName: string) { - return this.pathTemplates.backupPlanAssociationPathTemplate.match(backupPlanAssociationName).project; - } - - /** - * Parse the location from BackupPlanAssociation resource. - * - * @param {string} backupPlanAssociationName - * A fully-qualified path representing BackupPlanAssociation resource. - * @returns {string} A string representing the location. - */ - matchLocationFromBackupPlanAssociationName(backupPlanAssociationName: string) { - return this.pathTemplates.backupPlanAssociationPathTemplate.match(backupPlanAssociationName).location; - } - - /** - * Parse the backup_plan_association from BackupPlanAssociation resource. - * - * @param {string} backupPlanAssociationName - * A fully-qualified path representing BackupPlanAssociation resource. - * @returns {string} A string representing the backup_plan_association. - */ - matchBackupPlanAssociationFromBackupPlanAssociationName(backupPlanAssociationName: string) { - return this.pathTemplates.backupPlanAssociationPathTemplate.match(backupPlanAssociationName).backup_plan_association; - } - - /** - * Return a fully-qualified backupVault resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} backupvault - * @returns {string} Resource name string. - */ - backupVaultPath(project:string,location:string,backupvault:string) { - return this.pathTemplates.backupVaultPathTemplate.render({ - project: project, - location: location, - backupvault: backupvault, - }); - } - - /** - * Parse the project from BackupVault resource. - * - * @param {string} backupVaultName - * A fully-qualified path representing BackupVault resource. - * @returns {string} A string representing the project. - */ - matchProjectFromBackupVaultName(backupVaultName: string) { - return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName).project; - } - - /** - * Parse the location from BackupVault resource. - * - * @param {string} backupVaultName - * A fully-qualified path representing BackupVault resource. - * @returns {string} A string representing the location. - */ - matchLocationFromBackupVaultName(backupVaultName: string) { - return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName).location; - } - - /** - * Parse the backupvault from BackupVault resource. - * - * @param {string} backupVaultName - * A fully-qualified path representing BackupVault resource. - * @returns {string} A string representing the backupvault. - */ - matchBackupvaultFromBackupVaultName(backupVaultName: string) { - return this.pathTemplates.backupVaultPathTemplate.match(backupVaultName).backupvault; - } - - /** - * Return a fully-qualified dataSource resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} backupvault - * @param {string} datasource - * @returns {string} Resource name string. - */ - dataSourcePath(project:string,location:string,backupvault:string,datasource:string) { - return this.pathTemplates.dataSourcePathTemplate.render({ - project: project, - location: location, - backupvault: backupvault, - datasource: datasource, - }); - } - - /** - * Parse the project from DataSource resource. - * - * @param {string} dataSourceName - * A fully-qualified path representing DataSource resource. - * @returns {string} A string representing the project. - */ - matchProjectFromDataSourceName(dataSourceName: string) { - return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).project; - } - - /** - * Parse the location from DataSource resource. - * - * @param {string} dataSourceName - * A fully-qualified path representing DataSource resource. - * @returns {string} A string representing the location. - */ - matchLocationFromDataSourceName(dataSourceName: string) { - return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).location; - } - - /** - * Parse the backupvault from DataSource resource. - * - * @param {string} dataSourceName - * A fully-qualified path representing DataSource resource. - * @returns {string} A string representing the backupvault. - */ - matchBackupvaultFromDataSourceName(dataSourceName: string) { - return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).backupvault; - } - - /** - * Parse the datasource from DataSource resource. - * - * @param {string} dataSourceName - * A fully-qualified path representing DataSource resource. - * @returns {string} A string representing the datasource. - */ - matchDatasourceFromDataSourceName(dataSourceName: string) { - return this.pathTemplates.dataSourcePathTemplate.match(dataSourceName).datasource; - } - - /** - * 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 managementServer resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} managementserver - * @returns {string} Resource name string. - */ - managementServerPath(project:string,location:string,managementserver:string) { - return this.pathTemplates.managementServerPathTemplate.render({ - project: project, - location: location, - managementserver: managementserver, - }); - } - - /** - * Parse the project from ManagementServer resource. - * - * @param {string} managementServerName - * A fully-qualified path representing ManagementServer resource. - * @returns {string} A string representing the project. - */ - matchProjectFromManagementServerName(managementServerName: string) { - return this.pathTemplates.managementServerPathTemplate.match(managementServerName).project; - } - - /** - * Parse the location from ManagementServer resource. - * - * @param {string} managementServerName - * A fully-qualified path representing ManagementServer resource. - * @returns {string} A string representing the location. - */ - matchLocationFromManagementServerName(managementServerName: string) { - return this.pathTemplates.managementServerPathTemplate.match(managementServerName).location; - } - - /** - * Parse the managementserver from ManagementServer resource. - * - * @param {string} managementServerName - * A fully-qualified path representing ManagementServer resource. - * @returns {string} A string representing the managementserver. - */ - matchManagementserverFromManagementServerName(managementServerName: string) { - return this.pathTemplates.managementServerPathTemplate.match(managementServerName).managementserver; - } - - /** - * 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; - } - - /** - * 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.backupDRStub && !this._terminated) { - return this.backupDRStub.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-backupdr/v1/src/v1/backup_d_r_client_config.json b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client_config.json deleted file mode 100644 index 38b3cbc1a37..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_client_config.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "interfaces": { - "google.cloud.backupdr.v1.BackupDR": { - "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": { - "ListManagementServers": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetManagementServer": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "CreateManagementServer": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteManagementServer": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateBackupVault": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListBackupVaults": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "FetchUsableBackupVaults": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetBackupVault": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "UpdateBackupVault": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteBackupVault": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListDataSources": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetDataSource": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "UpdateDataSource": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListBackups": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetBackup": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "UpdateBackup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteBackup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RestoreBackup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateBackupPlan": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetBackupPlan": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListBackupPlans": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteBackupPlan": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateBackupPlanAssociation": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetBackupPlanAssociation": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListBackupPlanAssociations": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteBackupPlanAssociation": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "TriggerBackup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json deleted file mode 100644 index 79496ec85e7..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/backup_d_r_proto_list.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - "../../protos/google/cloud/backupdr/v1/backupdr.proto", - "../../protos/google/cloud/backupdr/v1/backupplan.proto", - "../../protos/google/cloud/backupdr/v1/backupplanassociation.proto", - "../../protos/google/cloud/backupdr/v1/backupvault.proto", - "../../protos/google/cloud/backupdr/v1/backupvault_ba.proto", - "../../protos/google/cloud/backupdr/v1/backupvault_gce.proto" -] diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json deleted file mode 100644 index c23b63f10dc..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/gapic_metadata.json +++ /dev/null @@ -1,321 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.backupdr.v1", - "libraryPackage": "@google-cloud/backupdr", - "services": { - "BackupDR": { - "clients": { - "grpc": { - "libraryClient": "BackupDRClient", - "rpcs": { - "GetManagementServer": { - "methods": [ - "getManagementServer" - ] - }, - "GetBackupVault": { - "methods": [ - "getBackupVault" - ] - }, - "GetDataSource": { - "methods": [ - "getDataSource" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetBackupPlan": { - "methods": [ - "getBackupPlan" - ] - }, - "GetBackupPlanAssociation": { - "methods": [ - "getBackupPlanAssociation" - ] - }, - "CreateManagementServer": { - "methods": [ - "createManagementServer" - ] - }, - "DeleteManagementServer": { - "methods": [ - "deleteManagementServer" - ] - }, - "CreateBackupVault": { - "methods": [ - "createBackupVault" - ] - }, - "UpdateBackupVault": { - "methods": [ - "updateBackupVault" - ] - }, - "DeleteBackupVault": { - "methods": [ - "deleteBackupVault" - ] - }, - "UpdateDataSource": { - "methods": [ - "updateDataSource" - ] - }, - "UpdateBackup": { - "methods": [ - "updateBackup" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "RestoreBackup": { - "methods": [ - "restoreBackup" - ] - }, - "CreateBackupPlan": { - "methods": [ - "createBackupPlan" - ] - }, - "DeleteBackupPlan": { - "methods": [ - "deleteBackupPlan" - ] - }, - "CreateBackupPlanAssociation": { - "methods": [ - "createBackupPlanAssociation" - ] - }, - "DeleteBackupPlanAssociation": { - "methods": [ - "deleteBackupPlanAssociation" - ] - }, - "TriggerBackup": { - "methods": [ - "triggerBackup" - ] - }, - "ListManagementServers": { - "methods": [ - "listManagementServers", - "listManagementServersStream", - "listManagementServersAsync" - ] - }, - "ListBackupVaults": { - "methods": [ - "listBackupVaults", - "listBackupVaultsStream", - "listBackupVaultsAsync" - ] - }, - "FetchUsableBackupVaults": { - "methods": [ - "fetchUsableBackupVaults", - "fetchUsableBackupVaultsStream", - "fetchUsableBackupVaultsAsync" - ] - }, - "ListDataSources": { - "methods": [ - "listDataSources", - "listDataSourcesStream", - "listDataSourcesAsync" - ] - }, - "ListBackups": { - "methods": [ - "listBackups", - "listBackupsStream", - "listBackupsAsync" - ] - }, - "ListBackupPlans": { - "methods": [ - "listBackupPlans", - "listBackupPlansStream", - "listBackupPlansAsync" - ] - }, - "ListBackupPlanAssociations": { - "methods": [ - "listBackupPlanAssociations", - "listBackupPlanAssociationsStream", - "listBackupPlanAssociationsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "BackupDRClient", - "rpcs": { - "GetManagementServer": { - "methods": [ - "getManagementServer" - ] - }, - "GetBackupVault": { - "methods": [ - "getBackupVault" - ] - }, - "GetDataSource": { - "methods": [ - "getDataSource" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetBackupPlan": { - "methods": [ - "getBackupPlan" - ] - }, - "GetBackupPlanAssociation": { - "methods": [ - "getBackupPlanAssociation" - ] - }, - "CreateManagementServer": { - "methods": [ - "createManagementServer" - ] - }, - "DeleteManagementServer": { - "methods": [ - "deleteManagementServer" - ] - }, - "CreateBackupVault": { - "methods": [ - "createBackupVault" - ] - }, - "UpdateBackupVault": { - "methods": [ - "updateBackupVault" - ] - }, - "DeleteBackupVault": { - "methods": [ - "deleteBackupVault" - ] - }, - "UpdateDataSource": { - "methods": [ - "updateDataSource" - ] - }, - "UpdateBackup": { - "methods": [ - "updateBackup" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "RestoreBackup": { - "methods": [ - "restoreBackup" - ] - }, - "CreateBackupPlan": { - "methods": [ - "createBackupPlan" - ] - }, - "DeleteBackupPlan": { - "methods": [ - "deleteBackupPlan" - ] - }, - "CreateBackupPlanAssociation": { - "methods": [ - "createBackupPlanAssociation" - ] - }, - "DeleteBackupPlanAssociation": { - "methods": [ - "deleteBackupPlanAssociation" - ] - }, - "TriggerBackup": { - "methods": [ - "triggerBackup" - ] - }, - "ListManagementServers": { - "methods": [ - "listManagementServers", - "listManagementServersStream", - "listManagementServersAsync" - ] - }, - "ListBackupVaults": { - "methods": [ - "listBackupVaults", - "listBackupVaultsStream", - "listBackupVaultsAsync" - ] - }, - "FetchUsableBackupVaults": { - "methods": [ - "fetchUsableBackupVaults", - "fetchUsableBackupVaultsStream", - "fetchUsableBackupVaultsAsync" - ] - }, - "ListDataSources": { - "methods": [ - "listDataSources", - "listDataSourcesStream", - "listDataSourcesAsync" - ] - }, - "ListBackups": { - "methods": [ - "listBackups", - "listBackupsStream", - "listBackupsAsync" - ] - }, - "ListBackupPlans": { - "methods": [ - "listBackupPlans", - "listBackupPlansStream", - "listBackupPlansAsync" - ] - }, - "ListBackupPlanAssociations": { - "methods": [ - "listBackupPlanAssociations", - "listBackupPlanAssociationsStream", - "listBackupPlanAssociationsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts deleted file mode 100644 index ba4dc25d2f3..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/src/v1/index.ts +++ /dev/null @@ -1,19 +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 -// -// 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 {BackupDRClient} from './backup_d_r_client'; diff --git a/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 5c5ec9c7cf0..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,27 +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 -// -// 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 backupdr = require('@google-cloud/backupdr'); - -function main() { - const backupDRClient = new backupdr.BackupDRClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 229588cfd57..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,32 +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 -// -// 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 {BackupDRClient} from '@google-cloud/backupdr'; - -// check that the client class type name can be used -function doStuffWithBackupDRClient(client: BackupDRClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const backupDRClient = new BackupDRClient(); - doStuffWithBackupDRClient(backupDRClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts b/owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts deleted file mode 100644 index fd5bfdc71d5..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/system-test/install.ts +++ /dev/null @@ -1,49 +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 -// -// 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-backupdr/v1/test/gapic_backup_d_r_v1.ts b/owl-bot-staging/google-cloud-backupdr/v1/test/gapic_backup_d_r_v1.ts deleted file mode 100644 index f54cc3f2b12..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/v1/test/gapic_backup_d_r_v1.ts +++ /dev/null @@ -1,5876 +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 -// -// 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 backupdrModule 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.BackupDRClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new backupdrModule.v1.BackupDRClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'backupdr.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new backupdrModule.v1.BackupDRClient(); - 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 = backupdrModule.v1.BackupDRClient.servicePath; - assert.strictEqual(servicePath, 'backupdr.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = backupdrModule.v1.BackupDRClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'backupdr.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new backupdrModule.v1.BackupDRClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'backupdr.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new backupdrModule.v1.BackupDRClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'backupdr.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 backupdrModule.v1.BackupDRClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'backupdr.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 backupdrModule.v1.BackupDRClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'backupdr.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 backupdrModule.v1.BackupDRClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = backupdrModule.v1.BackupDRClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new backupdrModule.v1.BackupDRClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new backupdrModule.v1.BackupDRClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.backupDRStub, undefined); - await client.initialize(); - assert(client.backupDRStub); - }); - - it('has close method for the initialized client', done => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.backupDRStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.backupDRStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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('getManagementServer', () => { - it('invokes getManagementServer without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() - ); - client.innerApiCalls.getManagementServer = stubSimpleCall(expectedResponse); - const [response] = await client.getManagementServer(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getManagementServer without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ManagementServer() - ); - client.innerApiCalls.getManagementServer = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getManagementServer( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IManagementServer|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getManagementServer with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getManagementServer = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getManagementServer(request), expectedError); - const actualRequest = (client.innerApiCalls.getManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getManagementServer with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getManagementServer(request), expectedError); - }); - }); - - describe('getBackupVault', () => { - it('invokes getBackupVault without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupVault() - ); - client.innerApiCalls.getBackupVault = stubSimpleCall(expectedResponse); - const [response] = await client.getBackupVault(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupVault without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupVault() - ); - client.innerApiCalls.getBackupVault = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getBackupVault( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupVault|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupVault with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getBackupVault = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getBackupVault(request), expectedError); - const actualRequest = (client.innerApiCalls.getBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupVault with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getBackupVault(request), expectedError); - }); - }); - - describe('getDataSource', () => { - it('invokes getDataSource without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DataSource() - ); - client.innerApiCalls.getDataSource = stubSimpleCall(expectedResponse); - const [response] = await client.getDataSource(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataSource without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DataSource() - ); - client.innerApiCalls.getDataSource = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getDataSource( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IDataSource|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataSource with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getDataSource = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getDataSource(request), expectedError); - const actualRequest = (client.innerApiCalls.getDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getDataSource with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetDataSourceRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetDataSourceRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getDataSource(request), expectedError); - }); - }); - - describe('getBackup', () => { - it('invokes getBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.Backup() - ); - client.innerApiCalls.getBackup = stubSimpleCall(expectedResponse); - const [response] = await client.getBackup(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.Backup() - ); - client.innerApiCalls.getBackup = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getBackup( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackup|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackup with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getBackup = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.getBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackup with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getBackup(request), expectedError); - }); - }); - - describe('getBackupPlan', () => { - it('invokes getBackupPlan without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupPlan() - ); - client.innerApiCalls.getBackupPlan = stubSimpleCall(expectedResponse); - const [response] = await client.getBackupPlan(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlan without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupPlan() - ); - client.innerApiCalls.getBackupPlan = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getBackupPlan( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlan|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlan with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getBackupPlan = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getBackupPlan(request), expectedError); - const actualRequest = (client.innerApiCalls.getBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlan with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getBackupPlan(request), expectedError); - }); - }); - - describe('getBackupPlanAssociation', () => { - it('invokes getBackupPlanAssociation without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupPlanAssociation() - ); - client.innerApiCalls.getBackupPlanAssociation = stubSimpleCall(expectedResponse); - const [response] = await client.getBackupPlanAssociation(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlanAssociation without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupPlanAssociation() - ); - client.innerApiCalls.getBackupPlanAssociation = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getBackupPlanAssociation( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlanAssociation|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlanAssociation with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getBackupPlanAssociation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getBackupPlanAssociation(request), expectedError); - const actualRequest = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlanAssociation with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getBackupPlanAssociation(request), expectedError); - }); - }); - - describe('createManagementServer', () => { - it('invokes createManagementServer without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createManagementServer = stubLongRunningCall(expectedResponse); - const [operation] = await client.createManagementServer(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createManagementServer without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createManagementServer = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createManagementServer( - 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.createManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createManagementServer with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createManagementServer = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createManagementServer(request), expectedError); - const actualRequest = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createManagementServer with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateManagementServerRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createManagementServer = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createManagementServer(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateManagementServerProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateManagementServerProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateManagementServerProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateManagementServerProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteManagementServer', () => { - it('invokes deleteManagementServer without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteManagementServer = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteManagementServer(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteManagementServer without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteManagementServer = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteManagementServer( - 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.deleteManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteManagementServer with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteManagementServer = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteManagementServer(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteManagementServer with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteManagementServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteManagementServer = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteManagementServer(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteManagementServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteManagementServerProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteManagementServerProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteManagementServerProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteManagementServerProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createBackupVault', () => { - it('invokes createBackupVault without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupVault = stubLongRunningCall(expectedResponse); - const [operation] = await client.createBackupVault(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupVault without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupVault = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createBackupVault( - 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.createBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupVault with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupVault = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createBackupVault(request), expectedError); - const actualRequest = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupVault with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupVaultRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupVault = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createBackupVault(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateBackupVaultProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupVaultProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateBackupVaultProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupVaultProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateBackupVault', () => { - it('invokes updateBackupVault without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); - request.backupVault.name = defaultValue1; - const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateBackupVault = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateBackupVault(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackupVault without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); - request.backupVault.name = defaultValue1; - const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateBackupVault = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateBackupVault( - 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.updateBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackupVault with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); - request.backupVault.name = defaultValue1; - const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateBackupVault = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateBackupVault(request), expectedError); - const actualRequest = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackupVault with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupVaultRequest', ['backupVault', 'name']); - request.backupVault.name = defaultValue1; - const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateBackupVault = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateBackupVault(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateBackupVaultProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateBackupVaultProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateBackupVaultProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateBackupVaultProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteBackupVault', () => { - it('invokes deleteBackupVault without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupVault = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteBackupVault(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupVault without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupVault = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteBackupVault( - 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.deleteBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupVault with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupVault = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteBackupVault(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupVault with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupVaultRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupVault = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteBackupVault(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupVault as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteBackupVaultProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupVaultProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteBackupVaultProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupVaultProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateDataSource', () => { - it('invokes updateDataSource without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() - ); - request.dataSource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); - request.dataSource.name = defaultValue1; - const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateDataSource = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateDataSource(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataSource without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() - ); - request.dataSource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); - request.dataSource.name = defaultValue1; - const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateDataSource = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateDataSource( - 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.updateDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataSource with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() - ); - request.dataSource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); - request.dataSource.name = defaultValue1; - const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDataSource = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateDataSource(request), expectedError); - const actualRequest = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateDataSource with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() - ); - request.dataSource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateDataSourceRequest', ['dataSource', 'name']); - request.dataSource.name = defaultValue1; - const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateDataSource = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateDataSource(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateDataSource as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateDataSourceProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateDataSourceProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateDataSourceProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateDataSourceProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateBackup', () => { - it('invokes updateBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupRequest() - ); - request.backup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); - request.backup.name = defaultValue1; - const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateBackup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupRequest() - ); - request.backup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); - request.backup.name = defaultValue1; - const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateBackup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateBackup( - 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.updateBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackup with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupRequest() - ); - request.backup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); - request.backup.name = defaultValue1; - const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateBackup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackup with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupRequest() - ); - request.backup ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.UpdateBackupRequest', ['backup', 'name']); - request.backup.name = defaultValue1; - const expectedHeaderRequestParams = `backup.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateBackup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateBackup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateBackupProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateBackupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateBackupProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateBackupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteBackup', () => { - it('invokes deleteBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteBackup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteBackup( - 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.deleteBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackup with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackup with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteBackup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteBackupProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteBackupProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('restoreBackup', () => { - it('invokes restoreBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RestoreBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.restoreBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.restoreBackup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes restoreBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RestoreBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.restoreBackup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.restoreBackup( - 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.restoreBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes restoreBackup with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RestoreBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.restoreBackup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.restoreBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes restoreBackup with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RestoreBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.RestoreBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.restoreBackup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.restoreBackup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restoreBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkRestoreBackupProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkRestoreBackupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkRestoreBackupProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkRestoreBackupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createBackupPlan', () => { - it('invokes createBackupPlan without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupPlan = stubLongRunningCall(expectedResponse); - const [operation] = await client.createBackupPlan(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPlan without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupPlan = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createBackupPlan( - 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.createBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPlan with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupPlan = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createBackupPlan(request), expectedError); - const actualRequest = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPlan with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupPlan = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createBackupPlan(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateBackupPlanProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupPlanProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateBackupPlanProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupPlanProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteBackupPlan', () => { - it('invokes deleteBackupPlan without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupPlan = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteBackupPlan(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPlan without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupPlan = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteBackupPlan( - 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.deleteBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPlan with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupPlan = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteBackupPlan(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPlan with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupPlan = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteBackupPlan(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlan as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteBackupPlanProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupPlanProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteBackupPlanProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupPlanProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('createBackupPlanAssociation', () => { - it('invokes createBackupPlanAssociation without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall(expectedResponse); - const [operation] = await client.createBackupPlanAssociation(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPlanAssociation without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createBackupPlanAssociation( - 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.createBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPlanAssociation with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createBackupPlanAssociation(request), expectedError); - const actualRequest = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupPlanAssociation with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.CreateBackupPlanAssociationRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupPlanAssociation = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createBackupPlanAssociation(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateBackupPlanAssociationProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupPlanAssociationProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateBackupPlanAssociationProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupPlanAssociationProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteBackupPlanAssociation', () => { - it('invokes deleteBackupPlanAssociation without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteBackupPlanAssociation(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPlanAssociation without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteBackupPlanAssociation( - 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.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPlanAssociation with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteBackupPlanAssociation(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupPlanAssociation with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.DeleteBackupPlanAssociationRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupPlanAssociation = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteBackupPlanAssociation(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteBackupPlanAssociation as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteBackupPlanAssociationProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupPlanAssociationProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteBackupPlanAssociationProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteBackupPlanAssociationProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('triggerBackup', () => { - it('invokes triggerBackup without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.TriggerBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.triggerBackup = stubLongRunningCall(expectedResponse); - const [operation] = await client.triggerBackup(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes triggerBackup without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.TriggerBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.triggerBackup = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.triggerBackup( - 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.triggerBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes triggerBackup with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.TriggerBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.triggerBackup = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.triggerBackup(request), expectedError); - const actualRequest = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes triggerBackup with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.TriggerBackupRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.TriggerBackupRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.triggerBackup = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.triggerBackup(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.triggerBackup as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkTriggerBackupProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkTriggerBackupProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkTriggerBackupProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkTriggerBackupProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listManagementServers', () => { - it('invokes listManagementServers without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - ]; - client.innerApiCalls.listManagementServers = stubSimpleCall(expectedResponse); - const [response] = await client.listManagementServers(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listManagementServers as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listManagementServers as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listManagementServers without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - ]; - client.innerApiCalls.listManagementServers = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listManagementServers( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IManagementServer[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listManagementServers as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listManagementServers as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listManagementServers with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listManagementServers = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listManagementServers(request), expectedError); - const actualRequest = (client.innerApiCalls.listManagementServers as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listManagementServers as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listManagementServersStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - ]; - client.descriptors.page.listManagementServers.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listManagementServersStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.ManagementServer[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.ManagementServer) => { - 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.listManagementServers.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listManagementServers, request)); - assert( - (client.descriptors.page.listManagementServers.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listManagementServersStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listManagementServers.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listManagementServersStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.ManagementServer[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.ManagementServer) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listManagementServers.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listManagementServers, request)); - assert( - (client.descriptors.page.listManagementServers.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listManagementServers without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.ManagementServer()), - ]; - client.descriptors.page.listManagementServers.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IManagementServer[] = []; - const iterable = client.listManagementServersAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listManagementServers with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListManagementServersRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListManagementServersRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listManagementServers.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listManagementServersAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IManagementServer[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listManagementServers.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listBackupVaults', () => { - it('invokes listBackupVaults without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.innerApiCalls.listBackupVaults = stubSimpleCall(expectedResponse); - const [response] = await client.listBackupVaults(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupVaults as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupVaults as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupVaults without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.innerApiCalls.listBackupVaults = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listBackupVaults( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupVault[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupVaults as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupVaults as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupVaults with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listBackupVaults = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listBackupVaults(request), expectedError); - const actualRequest = (client.innerApiCalls.listBackupVaults as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupVaults as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupVaultsStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.descriptors.page.listBackupVaults.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBackupVaultsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { - 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.listBackupVaults.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupVaults, request)); - assert( - (client.descriptors.page.listBackupVaults.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listBackupVaultsStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupVaults.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listBackupVaultsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listBackupVaults.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupVaults, request)); - assert( - (client.descriptors.page.listBackupVaults.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupVaults without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.descriptors.page.listBackupVaults.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; - const iterable = client.listBackupVaultsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupVaults with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupVaults.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listBackupVaultsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('fetchUsableBackupVaults', () => { - it('invokes fetchUsableBackupVaults without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.innerApiCalls.fetchUsableBackupVaults = stubSimpleCall(expectedResponse); - const [response] = await client.fetchUsableBackupVaults(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchUsableBackupVaults without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.innerApiCalls.fetchUsableBackupVaults = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.fetchUsableBackupVaults( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupVault[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchUsableBackupVaults with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.fetchUsableBackupVaults = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.fetchUsableBackupVaults(request), expectedError); - const actualRequest = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchUsableBackupVaults as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchUsableBackupVaultsStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.descriptors.page.fetchUsableBackupVaults.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.fetchUsableBackupVaultsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { - 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.fetchUsableBackupVaults.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.fetchUsableBackupVaults, request)); - assert( - (client.descriptors.page.fetchUsableBackupVaults.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes fetchUsableBackupVaultsStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.fetchUsableBackupVaults.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.fetchUsableBackupVaultsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupVault[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupVault) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.fetchUsableBackupVaults.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.fetchUsableBackupVaults, request)); - assert( - (client.descriptors.page.fetchUsableBackupVaults.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with fetchUsableBackupVaults without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupVault()), - ]; - client.descriptors.page.fetchUsableBackupVaults.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; - const iterable = client.fetchUsableBackupVaultsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with fetchUsableBackupVaults with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.FetchUsableBackupVaultsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.fetchUsableBackupVaults.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.fetchUsableBackupVaultsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IBackupVault[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.fetchUsableBackupVaults.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listDataSources', () => { - it('invokes listDataSources without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - ]; - client.innerApiCalls.listDataSources = stubSimpleCall(expectedResponse); - const [response] = await client.listDataSources(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDataSources as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataSources as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataSources without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - ]; - client.innerApiCalls.listDataSources = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listDataSources( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IDataSource[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listDataSources as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataSources as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataSources with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listDataSources = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listDataSources(request), expectedError); - const actualRequest = (client.innerApiCalls.listDataSources as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listDataSources as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listDataSourcesStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - ]; - client.descriptors.page.listDataSources.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listDataSourcesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.DataSource[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.DataSource) => { - 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.listDataSources.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDataSources, request)); - assert( - (client.descriptors.page.listDataSources.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listDataSourcesStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDataSources.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listDataSourcesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.DataSource[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.DataSource) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listDataSources.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listDataSources, request)); - assert( - (client.descriptors.page.listDataSources.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDataSources without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.DataSource()), - ]; - client.descriptors.page.listDataSources.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IDataSource[] = []; - const iterable = client.listDataSourcesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listDataSources.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDataSources.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listDataSources with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListDataSourcesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListDataSourcesRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listDataSources.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listDataSourcesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IDataSource[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listDataSources.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listDataSources.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listBackups', () => { - it('invokes listBackups without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - ]; - client.innerApiCalls.listBackups = stubSimpleCall(expectedResponse); - const [response] = await client.listBackups(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackups as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackups as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackups without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - ]; - client.innerApiCalls.listBackups = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listBackups( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackup[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackups as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackups as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackups with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listBackups = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listBackups(request), expectedError); - const actualRequest = (client.innerApiCalls.listBackups as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackups as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupsStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - ]; - client.descriptors.page.listBackups.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBackupsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.Backup[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.Backup) => { - 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.listBackups.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackups, request)); - assert( - (client.descriptors.page.listBackups.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listBackupsStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackups.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listBackupsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.Backup[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.Backup) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listBackups.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackups, request)); - assert( - (client.descriptors.page.listBackups.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackups without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.Backup()), - ]; - client.descriptors.page.listBackups.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IBackup[] = []; - const iterable = client.listBackupsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listBackups.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackups.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackups with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackups.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listBackupsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IBackup[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listBackups.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackups.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listBackupPlans', () => { - it('invokes listBackupPlans without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - ]; - client.innerApiCalls.listBackupPlans = stubSimpleCall(expectedResponse); - const [response] = await client.listBackupPlans(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupPlans as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlans as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPlans without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - ]; - client.innerApiCalls.listBackupPlans = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listBackupPlans( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlan[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupPlans as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlans as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPlans with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listBackupPlans = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listBackupPlans(request), expectedError); - const actualRequest = (client.innerApiCalls.listBackupPlans as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlans as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPlansStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - ]; - client.descriptors.page.listBackupPlans.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBackupPlansStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupPlan[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlan) => { - 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.listBackupPlans.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupPlans, request)); - assert( - (client.descriptors.page.listBackupPlans.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listBackupPlansStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupPlans.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listBackupPlansStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupPlan[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlan) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listBackupPlans.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupPlans, request)); - assert( - (client.descriptors.page.listBackupPlans.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupPlans without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlan()), - ]; - client.descriptors.page.listBackupPlans.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IBackupPlan[] = []; - const iterable = client.listBackupPlansAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupPlans with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlansRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlansRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupPlans.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listBackupPlansAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IBackupPlan[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupPlans.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listBackupPlanAssociations', () => { - it('invokes listBackupPlanAssociations without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - ]; - client.innerApiCalls.listBackupPlanAssociations = stubSimpleCall(expectedResponse); - const [response] = await client.listBackupPlanAssociations(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPlanAssociations without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - ]; - client.innerApiCalls.listBackupPlanAssociations = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listBackupPlanAssociations( - request, - (err?: Error|null, result?: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPlanAssociations with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listBackupPlanAssociations = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listBackupPlanAssociations(request), expectedError); - const actualRequest = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listBackupPlanAssociations as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listBackupPlanAssociationsStream without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - ]; - client.descriptors.page.listBackupPlanAssociations.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBackupPlanAssociationsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupPlanAssociation[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlanAssociation) => { - 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.listBackupPlanAssociations.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupPlanAssociations, request)); - assert( - (client.descriptors.page.listBackupPlanAssociations.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listBackupPlanAssociationsStream with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupPlanAssociations.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listBackupPlanAssociationsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.backupdr.v1.BackupPlanAssociation[] = []; - stream.on('data', (response: protos.google.cloud.backupdr.v1.BackupPlanAssociation) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listBackupPlanAssociations.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listBackupPlanAssociations, request)); - assert( - (client.descriptors.page.listBackupPlanAssociations.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupPlanAssociations without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - generateSampleMessage(new protos.google.cloud.backupdr.v1.BackupPlanAssociation()), - ]; - client.descriptors.page.listBackupPlanAssociations.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[] = []; - const iterable = client.listBackupPlanAssociationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listBackupPlanAssociations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupPlanAssociations.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listBackupPlanAssociations with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.backupdr.v1.ListBackupPlanAssociationsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listBackupPlanAssociations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listBackupPlanAssociationsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.backupdr.v1.IBackupPlanAssociation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listBackupPlanAssociations.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listBackupPlanAssociations.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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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 backupdrModule.v1.BackupDRClient({ - 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('backup', () => { - const fakePath = "/rendered/path/backup"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - backupvault: "backupvaultValue", - datasource: "datasourceValue", - backup: "backupValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.backupPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.backupPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('backupPath', () => { - const result = client.backupPath("projectValue", "locationValue", "backupvaultValue", "datasourceValue", "backupValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.backupPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromBackupName', () => { - const result = client.matchProjectFromBackupName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.backupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromBackupName', () => { - const result = client.matchLocationFromBackupName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.backupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupvaultFromBackupName', () => { - const result = client.matchBackupvaultFromBackupName(fakePath); - assert.strictEqual(result, "backupvaultValue"); - assert((client.pathTemplates.backupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDatasourceFromBackupName', () => { - const result = client.matchDatasourceFromBackupName(fakePath); - assert.strictEqual(result, "datasourceValue"); - assert((client.pathTemplates.backupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupFromBackupName', () => { - const result = client.matchBackupFromBackupName(fakePath); - assert.strictEqual(result, "backupValue"); - assert((client.pathTemplates.backupPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('backupPlan', () => { - const fakePath = "/rendered/path/backupPlan"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - backup_plan: "backupPlanValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.backupPlanPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.backupPlanPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('backupPlanPath', () => { - const result = client.backupPlanPath("projectValue", "locationValue", "backupPlanValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.backupPlanPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromBackupPlanName', () => { - const result = client.matchProjectFromBackupPlanName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.backupPlanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromBackupPlanName', () => { - const result = client.matchLocationFromBackupPlanName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.backupPlanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupPlanFromBackupPlanName', () => { - const result = client.matchBackupPlanFromBackupPlanName(fakePath); - assert.strictEqual(result, "backupPlanValue"); - assert((client.pathTemplates.backupPlanPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('backupPlanAssociation', () => { - const fakePath = "/rendered/path/backupPlanAssociation"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - backup_plan_association: "backupPlanAssociationValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.backupPlanAssociationPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.backupPlanAssociationPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('backupPlanAssociationPath', () => { - const result = client.backupPlanAssociationPath("projectValue", "locationValue", "backupPlanAssociationValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.backupPlanAssociationPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromBackupPlanAssociationName', () => { - const result = client.matchProjectFromBackupPlanAssociationName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.backupPlanAssociationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromBackupPlanAssociationName', () => { - const result = client.matchLocationFromBackupPlanAssociationName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.backupPlanAssociationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupPlanAssociationFromBackupPlanAssociationName', () => { - const result = client.matchBackupPlanAssociationFromBackupPlanAssociationName(fakePath); - assert.strictEqual(result, "backupPlanAssociationValue"); - assert((client.pathTemplates.backupPlanAssociationPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('backupVault', () => { - const fakePath = "/rendered/path/backupVault"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - backupvault: "backupvaultValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.backupVaultPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.backupVaultPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('backupVaultPath', () => { - const result = client.backupVaultPath("projectValue", "locationValue", "backupvaultValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.backupVaultPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromBackupVaultName', () => { - const result = client.matchProjectFromBackupVaultName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.backupVaultPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromBackupVaultName', () => { - const result = client.matchLocationFromBackupVaultName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.backupVaultPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupvaultFromBackupVaultName', () => { - const result = client.matchBackupvaultFromBackupVaultName(fakePath); - assert.strictEqual(result, "backupvaultValue"); - assert((client.pathTemplates.backupVaultPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('dataSource', () => { - const fakePath = "/rendered/path/dataSource"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - backupvault: "backupvaultValue", - datasource: "datasourceValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.dataSourcePathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.dataSourcePathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('dataSourcePath', () => { - const result = client.dataSourcePath("projectValue", "locationValue", "backupvaultValue", "datasourceValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.dataSourcePathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromDataSourceName', () => { - const result = client.matchProjectFromDataSourceName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromDataSourceName', () => { - const result = client.matchLocationFromDataSourceName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchBackupvaultFromDataSourceName', () => { - const result = client.matchBackupvaultFromDataSourceName(fakePath); - assert.strictEqual(result, "backupvaultValue"); - assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchDatasourceFromDataSourceName', () => { - const result = client.matchDatasourceFromDataSourceName(fakePath); - assert.strictEqual(result, "datasourceValue"); - assert((client.pathTemplates.dataSourcePathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - 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('managementServer', () => { - const fakePath = "/rendered/path/managementServer"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - managementserver: "managementserverValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.managementServerPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.managementServerPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('managementServerPath', () => { - const result = client.managementServerPath("projectValue", "locationValue", "managementserverValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.managementServerPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromManagementServerName', () => { - const result = client.matchProjectFromManagementServerName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.managementServerPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromManagementServerName', () => { - const result = client.matchLocationFromManagementServerName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.managementServerPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchManagementserverFromManagementServerName', () => { - const result = client.matchManagementserverFromManagementServerName(fakePath); - assert.strictEqual(result, "managementserverValue"); - assert((client.pathTemplates.managementServerPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('project', () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new backupdrModule.v1.BackupDRClient({ - 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)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-backupdr/v1/tsconfig.json b/owl-bot-staging/google-cloud-backupdr/v1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/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-backupdr/v1/webpack.config.js b/owl-bot-staging/google-cloud-backupdr/v1/webpack.config.js deleted file mode 100644 index 72a35713b8c..00000000000 --- a/owl-bot-staging/google-cloud-backupdr/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: 'BackupDR', - filename: './backup-d-r.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-backupdr/protos/google/cloud/backupdr/v1/backupdr.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupdr.proto index eff6b77e762..d5ae643d6ff 100644 --- a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupdr.proto +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupdr.proto @@ -24,7 +24,6 @@ import "google/api/resource.proto"; import "google/cloud/backupdr/v1/backupplan.proto"; import "google/cloud/backupdr/v1/backupplanassociation.proto"; import "google/cloud/backupdr/v1/backupvault.proto"; -import "google/iam/v1/iam_policy.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; @@ -160,19 +159,6 @@ service BackupDR { }; } - // Returns the caller's permissions on a BackupVault resource. - // - // A caller is not required to have Google IAM permission to make this - // request. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/backupVaults/*}:testIamPermissions" - body: "*" - }; - option (google.api.method_signature) = "resource, permissions"; - } - // Lists DataSources in a given project and location. rpc ListDataSources(ListDataSourcesRequest) returns (ListDataSourcesResponse) { @@ -204,87 +190,6 @@ service BackupDR { }; } - // Deletes a DataSource. This is a custom method instead of a standard delete - // method because external clients will not delete DataSources except for - // BackupDR backup appliances. - rpc RemoveDataSource(RemoveDataSourceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:remove" - body: "*" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Sets the internal status of a DataSource. - rpc SetInternalStatus(SetInternalStatusRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:setInternalStatus" - body: "*" - }; - option (google.api.method_signature) = "data_source"; - option (google.longrunning.operation_info) = { - response_type: "SetInternalStatusResponse" - metadata_type: "OperationMetadata" - }; - } - - // Internal only. - // Initiates a backup. - rpc InitiateBackup(InitiateBackupRequest) returns (InitiateBackupResponse) { - option (google.api.http) = { - post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:initiateBackup" - body: "*" - }; - option (google.api.method_signature) = "data_source"; - } - - // Internal only. - // Abandons a backup. - rpc AbandonBackup(AbandonBackupRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:abandonBackup" - body: "*" - }; - option (google.api.method_signature) = "data_source"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Internal only. - // Finalize a backup that was started by a call to InitiateBackup. - rpc FinalizeBackup(FinalizeBackupRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:finalizeBackup" - body: "*" - }; - option (google.api.method_signature) = "data_source"; - option (google.longrunning.operation_info) = { - response_type: "Backup" - metadata_type: "OperationMetadata" - }; - } - - // Internal only. - // Fetch access token for a given data source. - rpc FetchAccessToken(FetchAccessTokenRequest) - returns (FetchAccessTokenResponse) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - // Lists Backups in a given project and location. rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) { option (google.api.http) = { diff --git a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault.proto b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault.proto index f50ee7ecc4e..f9b46b5bff0 100644 --- a/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault.proto +++ b/packages/google-cloud-backupdr/protos/google/cloud/backupdr/v1/backupvault.proto @@ -912,238 +912,6 @@ message UpdateDataSourceRequest { bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL]; } -// Message for deleting a DataSource. -message RemoveDataSourceRequest { - // Required. Name of the resource. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/DataSource" - } - ]; - - // Optional. An optional 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_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; -} - -// Request message for SetStatusInternal method. -message SetInternalStatusRequest { - // Required. The resource name of the instance, in the format - // 'projects/*/locations/*/backupVaults/*/dataSources/'. - string data_source = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/DataSource" - } - ]; - - // Required. The value required for this method to work. This field must be - // the 32-byte SHA256 hash of the DataSourceID. The DataSourceID used here is - // only the final piece of the fully qualified resource path for this - // DataSource (i.e. the part after '.../dataSources/'). This field exists to - // make this method difficult to call since it is intended for use only by - // Backup Appliances. - bytes value = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. Output only. The new BackupConfigState to set for the DataSource. - BackupConfigState backup_config_state = 3 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - - // Optional. An optional 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. 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_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; -} - -// Response message from SetStatusInternal method. -message SetInternalStatusResponse {} - -// request message for InitiateBackup. -message InitiateBackupRequest { - // Required. The resource name of the instance, in the format - // 'projects/*/locations/*/backupVaults/*/dataSources/'. - string data_source = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/DataSource" - } - ]; - - // Optional. An optional 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 = 2 [ - (google.api.field_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; - - // Required. Resource ID of the Backup resource. - string backup_id = 5 [(google.api.field_behavior) = REQUIRED]; -} - -// Response message for InitiateBackup. -message InitiateBackupResponse { - // The name of the backup that was created. - string backup = 1; - - // The generation id of the new backup. - int32 new_backup_generation_id = 2; - - // The generation id of the base backup. It is needed for the incremental - // backups. - int32 base_backup_generation_id = 3; -} - -// request message for AbandonBackup. -message AbandonBackupRequest { - // Required. The resource name of the instance, in the format - // 'projects/*/locations/*/backupVaults/*/dataSources/'. - string data_source = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/DataSource" - } - ]; - - // Optional. An optional 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 = 2 [ - (google.api.field_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; -} - -// Message for finalizing a Backup. -message FinalizeBackupRequest { - // Required. The resource name of the instance, in the format - // 'projects/*/locations/*/backupVaults/*/dataSources/'. - string data_source = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/DataSource" - } - ]; - - // This will be assigned to the description field of the newly created Backup. - optional string description = 2; - - // The point in time when this backup was captured from the source. This will - // be assigned to the consistency_time field of the newly created Backup. - optional google.protobuf.Timestamp consistency_time = 3; - - // Optional. An optional 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 = 4 [ - (google.api.field_info).format = UUID4, - (google.api.field_behavior) = OPTIONAL - ]; - - // Required. Resource ID of the Backup resource to be finalized. This must be - // the same backup_id that was used in the InitiateBackupRequest. - string backup_id = 5 [(google.api.field_behavior) = REQUIRED]; - - // The earliest timestamp of data available in this Backup. This will set on - // the newly created Backup. - optional google.protobuf.Timestamp recovery_range_start_time = 6; - - // The latest timestamp of data available in this Backup. This will be set on - // the newly created Backup. - optional google.protobuf.Timestamp recovery_range_end_time = 7; - - // The ExpireTime on the backup will be set to FinalizeTime plus this - // duration. If the resulting ExpireTime is less than - // EnforcedRetentionEndTime, then ExpireTime is set to - // EnforcedRetentionEndTime. - optional google.protobuf.Duration retention_duration = 9; -} - -// Request message for FetchAccessToken. -message FetchAccessTokenRequest { - // Required. The resource name for the location for which static IPs should be - // returned. - // Must be in the format - // 'projects/*/locations/*/backupVaults/*/dataSources'. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "backupdr.googleapis.com/DataSource" - } - ]; - - // Required. The generation of the backup to update. - int32 generation_id = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Response message for FetchAccessToken. -message FetchAccessTokenResponse { - // The location in bucket that can be used for reading. - string read_location = 1; - - // The location in bucket that can be used for writing. - string write_location = 2; - - // The downscoped token that was created. - string token = 3; - - // The token is valid until this time. - google.protobuf.Timestamp expire_time = 4; -} - // Request message for listing Backups. message ListBackupsRequest { // Required. The project and location for which to retrieve backup diff --git a/packages/google-cloud-backupdr/protos/protos.d.ts b/packages/google-cloud-backupdr/protos/protos.d.ts index 22fd9adfdfd..03e288c9665 100644 --- a/packages/google-cloud-backupdr/protos/protos.d.ts +++ b/packages/google-cloud-backupdr/protos/protos.d.ts @@ -186,20 +186,6 @@ export namespace google { */ public deleteBackupVault(request: google.cloud.backupdr.v1.IDeleteBackupVaultRequest): Promise; - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.backupdr.v1.BackupDR.TestIamPermissionsCallback): void; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; - /** * Calls ListDataSources. * @param request ListDataSourcesRequest message or plain object @@ -242,90 +228,6 @@ export namespace google { */ public updateDataSource(request: google.cloud.backupdr.v1.IUpdateDataSourceRequest): Promise; - /** - * Calls RemoveDataSource. - * @param request RemoveDataSourceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public removeDataSource(request: google.cloud.backupdr.v1.IRemoveDataSourceRequest, callback: google.cloud.backupdr.v1.BackupDR.RemoveDataSourceCallback): void; - - /** - * Calls RemoveDataSource. - * @param request RemoveDataSourceRequest message or plain object - * @returns Promise - */ - public removeDataSource(request: google.cloud.backupdr.v1.IRemoveDataSourceRequest): Promise; - - /** - * Calls SetInternalStatus. - * @param request SetInternalStatusRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public setInternalStatus(request: google.cloud.backupdr.v1.ISetInternalStatusRequest, callback: google.cloud.backupdr.v1.BackupDR.SetInternalStatusCallback): void; - - /** - * Calls SetInternalStatus. - * @param request SetInternalStatusRequest message or plain object - * @returns Promise - */ - public setInternalStatus(request: google.cloud.backupdr.v1.ISetInternalStatusRequest): Promise; - - /** - * Calls InitiateBackup. - * @param request InitiateBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and InitiateBackupResponse - */ - public initiateBackup(request: google.cloud.backupdr.v1.IInitiateBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.InitiateBackupCallback): void; - - /** - * Calls InitiateBackup. - * @param request InitiateBackupRequest message or plain object - * @returns Promise - */ - public initiateBackup(request: google.cloud.backupdr.v1.IInitiateBackupRequest): Promise; - - /** - * Calls AbandonBackup. - * @param request AbandonBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public abandonBackup(request: google.cloud.backupdr.v1.IAbandonBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.AbandonBackupCallback): void; - - /** - * Calls AbandonBackup. - * @param request AbandonBackupRequest message or plain object - * @returns Promise - */ - public abandonBackup(request: google.cloud.backupdr.v1.IAbandonBackupRequest): Promise; - - /** - * Calls FinalizeBackup. - * @param request FinalizeBackupRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public finalizeBackup(request: google.cloud.backupdr.v1.IFinalizeBackupRequest, callback: google.cloud.backupdr.v1.BackupDR.FinalizeBackupCallback): void; - - /** - * Calls FinalizeBackup. - * @param request FinalizeBackupRequest message or plain object - * @returns Promise - */ - public finalizeBackup(request: google.cloud.backupdr.v1.IFinalizeBackupRequest): Promise; - - /** - * Calls FetchAccessToken. - * @param request FetchAccessTokenRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FetchAccessTokenResponse - */ - public fetchAccessToken(request: google.cloud.backupdr.v1.IFetchAccessTokenRequest, callback: google.cloud.backupdr.v1.BackupDR.FetchAccessTokenCallback): void; - - /** - * Calls FetchAccessToken. - * @param request FetchAccessTokenRequest message or plain object - * @returns Promise - */ - public fetchAccessToken(request: google.cloud.backupdr.v1.IFetchAccessTokenRequest): Promise; - /** * Calls ListBackups. * @param request ListBackupsRequest message or plain object @@ -595,13 +497,6 @@ export namespace google { */ type DeleteBackupVaultCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse - */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; - /** * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listDataSources}. * @param error Error, if any @@ -623,48 +518,6 @@ export namespace google { */ type UpdateDataSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|removeDataSource}. - * @param error Error, if any - * @param [response] Operation - */ - type RemoveDataSourceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|setInternalStatus}. - * @param error Error, if any - * @param [response] Operation - */ - type SetInternalStatusCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|initiateBackup}. - * @param error Error, if any - * @param [response] InitiateBackupResponse - */ - type InitiateBackupCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.InitiateBackupResponse) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|abandonBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type AbandonBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|finalizeBackup}. - * @param error Error, if any - * @param [response] Operation - */ - type FinalizeBackupCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchAccessToken}. - * @param error Error, if any - * @param [response] FetchAccessTokenResponse - */ - type FetchAccessTokenCallback = (error: (Error|null), response?: google.cloud.backupdr.v1.FetchAccessTokenResponse) => void; - /** * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackups}. * @param error Error, if any @@ -7329,11493 +7182,8246 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RemoveDataSourceRequest. */ - interface IRemoveDataSourceRequest { + /** Properties of a ListBackupsRequest. */ + interface IListBackupsRequest { - /** RemoveDataSourceRequest name */ - name?: (string|null); + /** ListBackupsRequest parent */ + parent?: (string|null); - /** RemoveDataSourceRequest requestId */ - requestId?: (string|null); + /** ListBackupsRequest pageSize */ + pageSize?: (number|null); + + /** ListBackupsRequest pageToken */ + pageToken?: (string|null); + + /** ListBackupsRequest filter */ + filter?: (string|null); + + /** ListBackupsRequest orderBy */ + orderBy?: (string|null); + + /** ListBackupsRequest view */ + view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); } - /** Represents a RemoveDataSourceRequest. */ - class RemoveDataSourceRequest implements IRemoveDataSourceRequest { + /** Represents a ListBackupsRequest. */ + class ListBackupsRequest implements IListBackupsRequest { /** - * Constructs a new RemoveDataSourceRequest. + * Constructs a new ListBackupsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IRemoveDataSourceRequest); + constructor(properties?: google.cloud.backupdr.v1.IListBackupsRequest); - /** RemoveDataSourceRequest name. */ - public name: string; + /** ListBackupsRequest parent. */ + public parent: string; - /** RemoveDataSourceRequest requestId. */ - public requestId: string; + /** ListBackupsRequest pageSize. */ + public pageSize: number; + + /** ListBackupsRequest pageToken. */ + public pageToken: string; + + /** ListBackupsRequest filter. */ + public filter: string; + + /** ListBackupsRequest orderBy. */ + public orderBy: string; + + /** ListBackupsRequest view. */ + public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); /** - * Creates a new RemoveDataSourceRequest instance using the specified properties. + * Creates a new ListBackupsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns RemoveDataSourceRequest instance + * @returns ListBackupsRequest instance */ - public static create(properties?: google.cloud.backupdr.v1.IRemoveDataSourceRequest): google.cloud.backupdr.v1.RemoveDataSourceRequest; + public static create(properties?: google.cloud.backupdr.v1.IListBackupsRequest): google.cloud.backupdr.v1.ListBackupsRequest; /** - * Encodes the specified RemoveDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. - * @param message RemoveDataSourceRequest message or plain object to encode + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IRemoveDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RemoveDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. - * @param message RemoveDataSourceRequest message or plain object to encode + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * @param message ListBackupsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IRemoveDataSourceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RemoveDataSourceRequest message from the specified reader or buffer. + * Decodes a ListBackupsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RemoveDataSourceRequest + * @returns ListBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RemoveDataSourceRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupsRequest; /** - * Decodes a RemoveDataSourceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RemoveDataSourceRequest + * @returns ListBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RemoveDataSourceRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupsRequest; /** - * Verifies a RemoveDataSourceRequest message. + * Verifies a ListBackupsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RemoveDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RemoveDataSourceRequest + * @returns ListBackupsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RemoveDataSourceRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupsRequest; /** - * Creates a plain object from a RemoveDataSourceRequest message. Also converts values to other types if specified. - * @param message RemoveDataSourceRequest + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * @param message ListBackupsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.RemoveDataSourceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.ListBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RemoveDataSourceRequest to JSON. + * Converts this ListBackupsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RemoveDataSourceRequest + * Gets the default type url for ListBackupsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SetInternalStatusRequest. */ - interface ISetInternalStatusRequest { - - /** SetInternalStatusRequest dataSource */ - dataSource?: (string|null); + /** Properties of a ListBackupsResponse. */ + interface IListBackupsResponse { - /** SetInternalStatusRequest value */ - value?: (Uint8Array|string|null); + /** ListBackupsResponse backups */ + backups?: (google.cloud.backupdr.v1.IBackup[]|null); - /** SetInternalStatusRequest backupConfigState */ - backupConfigState?: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState|null); + /** ListBackupsResponse nextPageToken */ + nextPageToken?: (string|null); - /** SetInternalStatusRequest requestId */ - requestId?: (string|null); + /** ListBackupsResponse unreachable */ + unreachable?: (string[]|null); } - /** Represents a SetInternalStatusRequest. */ - class SetInternalStatusRequest implements ISetInternalStatusRequest { + /** Represents a ListBackupsResponse. */ + class ListBackupsResponse implements IListBackupsResponse { /** - * Constructs a new SetInternalStatusRequest. + * Constructs a new ListBackupsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.ISetInternalStatusRequest); - - /** SetInternalStatusRequest dataSource. */ - public dataSource: string; + constructor(properties?: google.cloud.backupdr.v1.IListBackupsResponse); - /** SetInternalStatusRequest value. */ - public value: (Uint8Array|string); + /** ListBackupsResponse backups. */ + public backups: google.cloud.backupdr.v1.IBackup[]; - /** SetInternalStatusRequest backupConfigState. */ - public backupConfigState: (google.cloud.backupdr.v1.BackupConfigState|keyof typeof google.cloud.backupdr.v1.BackupConfigState); + /** ListBackupsResponse nextPageToken. */ + public nextPageToken: string; - /** SetInternalStatusRequest requestId. */ - public requestId: string; + /** ListBackupsResponse unreachable. */ + public unreachable: string[]; /** - * Creates a new SetInternalStatusRequest instance using the specified properties. + * Creates a new ListBackupsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns SetInternalStatusRequest instance + * @returns ListBackupsResponse instance */ - public static create(properties?: google.cloud.backupdr.v1.ISetInternalStatusRequest): google.cloud.backupdr.v1.SetInternalStatusRequest; + public static create(properties?: google.cloud.backupdr.v1.IListBackupsResponse): google.cloud.backupdr.v1.ListBackupsResponse; /** - * Encodes the specified SetInternalStatusRequest message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. - * @param message SetInternalStatusRequest message or plain object to encode + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.ISetInternalStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetInternalStatusRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. - * @param message SetInternalStatusRequest message or plain object to encode + * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. + * @param message ListBackupsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ISetInternalStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetInternalStatusRequest message from the specified reader or buffer. + * Decodes a ListBackupsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetInternalStatusRequest + * @returns ListBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SetInternalStatusRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupsResponse; /** - * Decodes a SetInternalStatusRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetInternalStatusRequest + * @returns ListBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SetInternalStatusRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupsResponse; /** - * Verifies a SetInternalStatusRequest message. + * Verifies a ListBackupsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetInternalStatusRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetInternalStatusRequest + * @returns ListBackupsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SetInternalStatusRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupsResponse; /** - * Creates a plain object from a SetInternalStatusRequest message. Also converts values to other types if specified. - * @param message SetInternalStatusRequest + * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. + * @param message ListBackupsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.SetInternalStatusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.ListBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetInternalStatusRequest to JSON. + * Converts this ListBackupsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SetInternalStatusRequest + * Gets the default type url for ListBackupsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SetInternalStatusResponse. */ - interface ISetInternalStatusResponse { + /** Properties of a GetBackupRequest. */ + interface IGetBackupRequest { + + /** GetBackupRequest name */ + name?: (string|null); + + /** GetBackupRequest view */ + view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); } - /** Represents a SetInternalStatusResponse. */ - class SetInternalStatusResponse implements ISetInternalStatusResponse { + /** Represents a GetBackupRequest. */ + class GetBackupRequest implements IGetBackupRequest { /** - * Constructs a new SetInternalStatusResponse. + * Constructs a new GetBackupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.ISetInternalStatusResponse); + constructor(properties?: google.cloud.backupdr.v1.IGetBackupRequest); + + /** GetBackupRequest name. */ + public name: string; + + /** GetBackupRequest view. */ + public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); /** - * Creates a new SetInternalStatusResponse instance using the specified properties. + * Creates a new GetBackupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns SetInternalStatusResponse instance + * @returns GetBackupRequest instance */ - public static create(properties?: google.cloud.backupdr.v1.ISetInternalStatusResponse): google.cloud.backupdr.v1.SetInternalStatusResponse; + public static create(properties?: google.cloud.backupdr.v1.IGetBackupRequest): google.cloud.backupdr.v1.GetBackupRequest; /** - * Encodes the specified SetInternalStatusResponse message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. - * @param message SetInternalStatusResponse message or plain object to encode + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.ISetInternalStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SetInternalStatusResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. - * @param message SetInternalStatusResponse message or plain object to encode + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * @param message GetBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ISetInternalStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SetInternalStatusResponse message from the specified reader or buffer. + * Decodes a GetBackupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SetInternalStatusResponse + * @returns GetBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SetInternalStatusResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupRequest; /** - * Decodes a SetInternalStatusResponse message from the specified reader or buffer, length delimited. + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SetInternalStatusResponse + * @returns GetBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SetInternalStatusResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupRequest; /** - * Verifies a SetInternalStatusResponse message. + * Verifies a GetBackupRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SetInternalStatusResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SetInternalStatusResponse + * @returns GetBackupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SetInternalStatusResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupRequest; /** - * Creates a plain object from a SetInternalStatusResponse message. Also converts values to other types if specified. - * @param message SetInternalStatusResponse + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * @param message GetBackupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.SetInternalStatusResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.GetBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SetInternalStatusResponse to JSON. + * Converts this GetBackupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SetInternalStatusResponse + * Gets the default type url for GetBackupRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an InitiateBackupRequest. */ - interface IInitiateBackupRequest { + /** Properties of an UpdateBackupRequest. */ + interface IUpdateBackupRequest { - /** InitiateBackupRequest dataSource */ - dataSource?: (string|null); + /** UpdateBackupRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); - /** InitiateBackupRequest requestId */ - requestId?: (string|null); + /** UpdateBackupRequest backup */ + backup?: (google.cloud.backupdr.v1.IBackup|null); - /** InitiateBackupRequest backupId */ - backupId?: (string|null); + /** UpdateBackupRequest requestId */ + requestId?: (string|null); } - /** Represents an InitiateBackupRequest. */ - class InitiateBackupRequest implements IInitiateBackupRequest { + /** Represents an UpdateBackupRequest. */ + class UpdateBackupRequest implements IUpdateBackupRequest { /** - * Constructs a new InitiateBackupRequest. + * Constructs a new UpdateBackupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IInitiateBackupRequest); + constructor(properties?: google.cloud.backupdr.v1.IUpdateBackupRequest); - /** InitiateBackupRequest dataSource. */ - public dataSource: string; + /** UpdateBackupRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** InitiateBackupRequest requestId. */ - public requestId: string; + /** UpdateBackupRequest backup. */ + public backup?: (google.cloud.backupdr.v1.IBackup|null); - /** InitiateBackupRequest backupId. */ - public backupId: string; + /** UpdateBackupRequest requestId. */ + public requestId: string; /** - * Creates a new InitiateBackupRequest instance using the specified properties. + * Creates a new UpdateBackupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns InitiateBackupRequest instance + * @returns UpdateBackupRequest instance */ - public static create(properties?: google.cloud.backupdr.v1.IInitiateBackupRequest): google.cloud.backupdr.v1.InitiateBackupRequest; + public static create(properties?: google.cloud.backupdr.v1.IUpdateBackupRequest): google.cloud.backupdr.v1.UpdateBackupRequest; /** - * Encodes the specified InitiateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. - * @param message InitiateBackupRequest message or plain object to encode + * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * @param message UpdateBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IInitiateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InitiateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. - * @param message InitiateBackupRequest message or plain object to encode + * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. + * @param message UpdateBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IInitiateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InitiateBackupRequest message from the specified reader or buffer. + * Decodes an UpdateBackupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InitiateBackupRequest + * @returns UpdateBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InitiateBackupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateBackupRequest; /** - * Decodes an InitiateBackupRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InitiateBackupRequest + * @returns UpdateBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InitiateBackupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateBackupRequest; /** - * Verifies an InitiateBackupRequest message. + * Verifies an UpdateBackupRequest message. * @param message Plain 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 InitiateBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InitiateBackupRequest + * @returns UpdateBackupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InitiateBackupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateBackupRequest; /** - * Creates a plain object from an InitiateBackupRequest message. Also converts values to other types if specified. - * @param message InitiateBackupRequest + * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. + * @param message UpdateBackupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.InitiateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.UpdateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InitiateBackupRequest to JSON. + * Converts this UpdateBackupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for InitiateBackupRequest + * Gets the default type url for UpdateBackupRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an InitiateBackupResponse. */ - interface IInitiateBackupResponse { - - /** InitiateBackupResponse backup */ - backup?: (string|null); + /** Properties of a DeleteBackupRequest. */ + interface IDeleteBackupRequest { - /** InitiateBackupResponse newBackupGenerationId */ - newBackupGenerationId?: (number|null); + /** DeleteBackupRequest name */ + name?: (string|null); - /** InitiateBackupResponse baseBackupGenerationId */ - baseBackupGenerationId?: (number|null); + /** DeleteBackupRequest requestId */ + requestId?: (string|null); } - /** Represents an InitiateBackupResponse. */ - class InitiateBackupResponse implements IInitiateBackupResponse { + /** Represents a DeleteBackupRequest. */ + class DeleteBackupRequest implements IDeleteBackupRequest { /** - * Constructs a new InitiateBackupResponse. + * Constructs a new DeleteBackupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IInitiateBackupResponse); - - /** InitiateBackupResponse backup. */ - public backup: string; + constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupRequest); - /** InitiateBackupResponse newBackupGenerationId. */ - public newBackupGenerationId: number; + /** DeleteBackupRequest name. */ + public name: string; - /** InitiateBackupResponse baseBackupGenerationId. */ - public baseBackupGenerationId: number; + /** DeleteBackupRequest requestId. */ + public requestId: string; /** - * Creates a new InitiateBackupResponse instance using the specified properties. + * Creates a new DeleteBackupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns InitiateBackupResponse instance + * @returns DeleteBackupRequest instance */ - public static create(properties?: google.cloud.backupdr.v1.IInitiateBackupResponse): google.cloud.backupdr.v1.InitiateBackupResponse; + public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupRequest): google.cloud.backupdr.v1.DeleteBackupRequest; /** - * Encodes the specified InitiateBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. - * @param message InitiateBackupResponse message or plain object to encode + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IInitiateBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InitiateBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. - * @param message InitiateBackupResponse message or plain object to encode + * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. + * @param message DeleteBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IInitiateBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InitiateBackupResponse message from the specified reader or buffer. + * Decodes a DeleteBackupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InitiateBackupResponse + * @returns DeleteBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InitiateBackupResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupRequest; /** - * Decodes an InitiateBackupResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InitiateBackupResponse + * @returns DeleteBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InitiateBackupResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupRequest; /** - * Verifies an InitiateBackupResponse message. + * Verifies a DeleteBackupRequest message. * @param message Plain 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 InitiateBackupResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InitiateBackupResponse + * @returns DeleteBackupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InitiateBackupResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupRequest; /** - * Creates a plain object from an InitiateBackupResponse message. Also converts values to other types if specified. - * @param message InitiateBackupResponse + * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. + * @param message DeleteBackupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.InitiateBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.DeleteBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InitiateBackupResponse to JSON. + * Converts this DeleteBackupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for InitiateBackupResponse + * Gets the default type url for DeleteBackupRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AbandonBackupRequest. */ - interface IAbandonBackupRequest { + /** Properties of a RestoreBackupRequest. */ + interface IRestoreBackupRequest { - /** AbandonBackupRequest dataSource */ - dataSource?: (string|null); + /** RestoreBackupRequest name */ + name?: (string|null); - /** AbandonBackupRequest requestId */ + /** RestoreBackupRequest requestId */ requestId?: (string|null); + + /** RestoreBackupRequest computeInstanceTargetEnvironment */ + computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null); + + /** RestoreBackupRequest computeInstanceRestoreProperties */ + computeInstanceRestoreProperties?: (google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null); } - /** Represents an AbandonBackupRequest. */ - class AbandonBackupRequest implements IAbandonBackupRequest { + /** Represents a RestoreBackupRequest. */ + class RestoreBackupRequest implements IRestoreBackupRequest { /** - * Constructs a new AbandonBackupRequest. + * Constructs a new RestoreBackupRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IAbandonBackupRequest); + constructor(properties?: google.cloud.backupdr.v1.IRestoreBackupRequest); - /** AbandonBackupRequest dataSource. */ - public dataSource: string; + /** RestoreBackupRequest name. */ + public name: string; - /** AbandonBackupRequest requestId. */ + /** RestoreBackupRequest requestId. */ public requestId: string; + /** RestoreBackupRequest computeInstanceTargetEnvironment. */ + public computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null); + + /** RestoreBackupRequest computeInstanceRestoreProperties. */ + public computeInstanceRestoreProperties?: (google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null); + + /** RestoreBackupRequest targetEnvironment. */ + public targetEnvironment?: "computeInstanceTargetEnvironment"; + + /** RestoreBackupRequest instanceProperties. */ + public instanceProperties?: "computeInstanceRestoreProperties"; + /** - * Creates a new AbandonBackupRequest instance using the specified properties. + * Creates a new RestoreBackupRequest instance using the specified properties. * @param [properties] Properties to set - * @returns AbandonBackupRequest instance + * @returns RestoreBackupRequest instance */ - public static create(properties?: google.cloud.backupdr.v1.IAbandonBackupRequest): google.cloud.backupdr.v1.AbandonBackupRequest; + public static create(properties?: google.cloud.backupdr.v1.IRestoreBackupRequest): google.cloud.backupdr.v1.RestoreBackupRequest; /** - * Encodes the specified AbandonBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. - * @param message AbandonBackupRequest message or plain object to encode + * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * @param message RestoreBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IAbandonBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AbandonBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. - * @param message AbandonBackupRequest message or plain object to encode + * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * @param message RestoreBackupRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAbandonBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AbandonBackupRequest message from the specified reader or buffer. + * Decodes a RestoreBackupRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AbandonBackupRequest + * @returns RestoreBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AbandonBackupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RestoreBackupRequest; /** - * Decodes an AbandonBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AbandonBackupRequest + * @returns RestoreBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AbandonBackupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RestoreBackupRequest; /** - * Verifies an AbandonBackupRequest message. + * Verifies a RestoreBackupRequest message. * @param message Plain 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 AbandonBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AbandonBackupRequest + * @returns RestoreBackupRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AbandonBackupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RestoreBackupRequest; /** - * Creates a plain object from an AbandonBackupRequest message. Also converts values to other types if specified. - * @param message AbandonBackupRequest + * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. + * @param message RestoreBackupRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.AbandonBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.RestoreBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AbandonBackupRequest to JSON. + * Converts this RestoreBackupRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AbandonBackupRequest + * Gets the default type url for RestoreBackupRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FinalizeBackupRequest. */ - interface IFinalizeBackupRequest { - - /** FinalizeBackupRequest dataSource */ - dataSource?: (string|null); - - /** FinalizeBackupRequest description */ - description?: (string|null); - - /** FinalizeBackupRequest consistencyTime */ - consistencyTime?: (google.protobuf.ITimestamp|null); - - /** FinalizeBackupRequest requestId */ - requestId?: (string|null); - - /** FinalizeBackupRequest backupId */ - backupId?: (string|null); - - /** FinalizeBackupRequest recoveryRangeStartTime */ - recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); - - /** FinalizeBackupRequest recoveryRangeEndTime */ - recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); + /** Properties of a RestoreBackupResponse. */ + interface IRestoreBackupResponse { - /** FinalizeBackupRequest retentionDuration */ - retentionDuration?: (google.protobuf.IDuration|null); + /** RestoreBackupResponse targetResource */ + targetResource?: (google.cloud.backupdr.v1.ITargetResource|null); } - /** Represents a FinalizeBackupRequest. */ - class FinalizeBackupRequest implements IFinalizeBackupRequest { + /** Represents a RestoreBackupResponse. */ + class RestoreBackupResponse implements IRestoreBackupResponse { /** - * Constructs a new FinalizeBackupRequest. + * Constructs a new RestoreBackupResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IFinalizeBackupRequest); - - /** FinalizeBackupRequest dataSource. */ - public dataSource: string; - - /** FinalizeBackupRequest description. */ - public description?: (string|null); - - /** FinalizeBackupRequest consistencyTime. */ - public consistencyTime?: (google.protobuf.ITimestamp|null); - - /** FinalizeBackupRequest requestId. */ - public requestId: string; - - /** FinalizeBackupRequest backupId. */ - public backupId: string; - - /** FinalizeBackupRequest recoveryRangeStartTime. */ - public recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); - - /** FinalizeBackupRequest recoveryRangeEndTime. */ - public recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); - - /** FinalizeBackupRequest retentionDuration. */ - public retentionDuration?: (google.protobuf.IDuration|null); - - /** FinalizeBackupRequest _description. */ - public _description?: "description"; - - /** FinalizeBackupRequest _consistencyTime. */ - public _consistencyTime?: "consistencyTime"; - - /** FinalizeBackupRequest _recoveryRangeStartTime. */ - public _recoveryRangeStartTime?: "recoveryRangeStartTime"; - - /** FinalizeBackupRequest _recoveryRangeEndTime. */ - public _recoveryRangeEndTime?: "recoveryRangeEndTime"; + constructor(properties?: google.cloud.backupdr.v1.IRestoreBackupResponse); - /** FinalizeBackupRequest _retentionDuration. */ - public _retentionDuration?: "retentionDuration"; + /** RestoreBackupResponse targetResource. */ + public targetResource?: (google.cloud.backupdr.v1.ITargetResource|null); /** - * Creates a new FinalizeBackupRequest instance using the specified properties. + * Creates a new RestoreBackupResponse instance using the specified properties. * @param [properties] Properties to set - * @returns FinalizeBackupRequest instance + * @returns RestoreBackupResponse instance */ - public static create(properties?: google.cloud.backupdr.v1.IFinalizeBackupRequest): google.cloud.backupdr.v1.FinalizeBackupRequest; + public static create(properties?: google.cloud.backupdr.v1.IRestoreBackupResponse): google.cloud.backupdr.v1.RestoreBackupResponse; /** - * Encodes the specified FinalizeBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. - * @param message FinalizeBackupRequest message or plain object to encode + * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * @param message RestoreBackupResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IFinalizeBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FinalizeBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. - * @param message FinalizeBackupRequest message or plain object to encode + * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * @param message RestoreBackupResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IFinalizeBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FinalizeBackupRequest message from the specified reader or buffer. + * Decodes a RestoreBackupResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FinalizeBackupRequest + * @returns RestoreBackupResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FinalizeBackupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RestoreBackupResponse; /** - * Decodes a FinalizeBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FinalizeBackupRequest + * @returns RestoreBackupResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FinalizeBackupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RestoreBackupResponse; /** - * Verifies a FinalizeBackupRequest message. + * Verifies a RestoreBackupResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FinalizeBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FinalizeBackupRequest + * @returns RestoreBackupResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FinalizeBackupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RestoreBackupResponse; /** - * Creates a plain object from a FinalizeBackupRequest message. Also converts values to other types if specified. - * @param message FinalizeBackupRequest + * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. + * @param message RestoreBackupResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.FinalizeBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.RestoreBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FinalizeBackupRequest to JSON. + * Converts this RestoreBackupResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FinalizeBackupRequest + * Gets the default type url for RestoreBackupResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FetchAccessTokenRequest. */ - interface IFetchAccessTokenRequest { - - /** FetchAccessTokenRequest name */ - name?: (string|null); + /** Properties of a TargetResource. */ + interface ITargetResource { - /** FetchAccessTokenRequest generationId */ - generationId?: (number|null); + /** TargetResource gcpResource */ + gcpResource?: (google.cloud.backupdr.v1.IGcpResource|null); } - /** Represents a FetchAccessTokenRequest. */ - class FetchAccessTokenRequest implements IFetchAccessTokenRequest { + /** Represents a TargetResource. */ + class TargetResource implements ITargetResource { /** - * Constructs a new FetchAccessTokenRequest. + * Constructs a new TargetResource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IFetchAccessTokenRequest); + constructor(properties?: google.cloud.backupdr.v1.ITargetResource); - /** FetchAccessTokenRequest name. */ - public name: string; + /** TargetResource gcpResource. */ + public gcpResource?: (google.cloud.backupdr.v1.IGcpResource|null); - /** FetchAccessTokenRequest generationId. */ - public generationId: number; + /** TargetResource targetResourceInfo. */ + public targetResourceInfo?: "gcpResource"; /** - * Creates a new FetchAccessTokenRequest instance using the specified properties. + * Creates a new TargetResource instance using the specified properties. * @param [properties] Properties to set - * @returns FetchAccessTokenRequest instance + * @returns TargetResource instance */ - public static create(properties?: google.cloud.backupdr.v1.IFetchAccessTokenRequest): google.cloud.backupdr.v1.FetchAccessTokenRequest; + public static create(properties?: google.cloud.backupdr.v1.ITargetResource): google.cloud.backupdr.v1.TargetResource; /** - * Encodes the specified FetchAccessTokenRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. - * @param message FetchAccessTokenRequest message or plain object to encode + * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * @param message TargetResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IFetchAccessTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FetchAccessTokenRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. - * @param message FetchAccessTokenRequest message or plain object to encode + * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * @param message TargetResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchAccessTokenRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FetchAccessTokenRequest message from the specified reader or buffer. + * Decodes a TargetResource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FetchAccessTokenRequest + * @returns TargetResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchAccessTokenRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.TargetResource; /** - * Decodes a FetchAccessTokenRequest message from the specified reader or buffer, length delimited. + * Decodes a TargetResource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FetchAccessTokenRequest + * @returns TargetResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchAccessTokenRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.TargetResource; /** - * Verifies a FetchAccessTokenRequest message. + * Verifies a TargetResource message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FetchAccessTokenRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FetchAccessTokenRequest + * @returns TargetResource */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchAccessTokenRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.TargetResource; /** - * Creates a plain object from a FetchAccessTokenRequest message. Also converts values to other types if specified. - * @param message FetchAccessTokenRequest + * Creates a plain object from a TargetResource message. Also converts values to other types if specified. + * @param message TargetResource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.FetchAccessTokenRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.TargetResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FetchAccessTokenRequest to JSON. + * Converts this TargetResource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FetchAccessTokenRequest + * Gets the default type url for TargetResource * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FetchAccessTokenResponse. */ - interface IFetchAccessTokenResponse { - - /** FetchAccessTokenResponse readLocation */ - readLocation?: (string|null); + /** Properties of a GcpResource. */ + interface IGcpResource { - /** FetchAccessTokenResponse writeLocation */ - writeLocation?: (string|null); + /** GcpResource gcpResourcename */ + gcpResourcename?: (string|null); - /** FetchAccessTokenResponse token */ - token?: (string|null); + /** GcpResource location */ + location?: (string|null); - /** FetchAccessTokenResponse expireTime */ - expireTime?: (google.protobuf.ITimestamp|null); + /** GcpResource type */ + type?: (string|null); } - /** Represents a FetchAccessTokenResponse. */ - class FetchAccessTokenResponse implements IFetchAccessTokenResponse { + /** Represents a GcpResource. */ + class GcpResource implements IGcpResource { /** - * Constructs a new FetchAccessTokenResponse. + * Constructs a new GcpResource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IFetchAccessTokenResponse); + constructor(properties?: google.cloud.backupdr.v1.IGcpResource); - /** FetchAccessTokenResponse readLocation. */ - public readLocation: string; + /** GcpResource gcpResourcename. */ + public gcpResourcename: string; - /** FetchAccessTokenResponse writeLocation. */ - public writeLocation: string; + /** GcpResource location. */ + public location: string; - /** FetchAccessTokenResponse token. */ - public token: string; - - /** FetchAccessTokenResponse expireTime. */ - public expireTime?: (google.protobuf.ITimestamp|null); + /** GcpResource type. */ + public type: string; /** - * Creates a new FetchAccessTokenResponse instance using the specified properties. + * Creates a new GcpResource instance using the specified properties. * @param [properties] Properties to set - * @returns FetchAccessTokenResponse instance + * @returns GcpResource instance */ - public static create(properties?: google.cloud.backupdr.v1.IFetchAccessTokenResponse): google.cloud.backupdr.v1.FetchAccessTokenResponse; + public static create(properties?: google.cloud.backupdr.v1.IGcpResource): google.cloud.backupdr.v1.GcpResource; /** - * Encodes the specified FetchAccessTokenResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. - * @param message FetchAccessTokenResponse message or plain object to encode + * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * @param message GcpResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IFetchAccessTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FetchAccessTokenResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. - * @param message FetchAccessTokenResponse message or plain object to encode + * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. + * @param message GcpResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IFetchAccessTokenResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FetchAccessTokenResponse message from the specified reader or buffer. + * Decodes a GcpResource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FetchAccessTokenResponse + * @returns GcpResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.FetchAccessTokenResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GcpResource; /** - * Decodes a FetchAccessTokenResponse message from the specified reader or buffer, length delimited. + * Decodes a GcpResource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FetchAccessTokenResponse + * @returns GcpResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.FetchAccessTokenResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GcpResource; /** - * Verifies a FetchAccessTokenResponse message. + * Verifies a GcpResource message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FetchAccessTokenResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FetchAccessTokenResponse + * @returns GcpResource */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.FetchAccessTokenResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GcpResource; /** - * Creates a plain object from a FetchAccessTokenResponse message. Also converts values to other types if specified. - * @param message FetchAccessTokenResponse + * Creates a plain object from a GcpResource message. Also converts values to other types if specified. + * @param message GcpResource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.FetchAccessTokenResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.GcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FetchAccessTokenResponse to JSON. + * Converts this GcpResource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FetchAccessTokenResponse + * Gets the default type url for GcpResource * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListBackupsRequest. */ - interface IListBackupsRequest { + /** BackupConfigState enum. */ + enum BackupConfigState { + BACKUP_CONFIG_STATE_UNSPECIFIED = 0, + ACTIVE = 1, + PASSIVE = 2 + } - /** ListBackupsRequest parent */ - parent?: (string|null); + /** BackupView enum. */ + enum BackupView { + BACKUP_VIEW_UNSPECIFIED = 0, + BACKUP_VIEW_BASIC = 1, + BACKUP_VIEW_FULL = 2 + } - /** ListBackupsRequest pageSize */ - pageSize?: (number|null); + /** BackupVaultView enum. */ + enum BackupVaultView { + BACKUP_VAULT_VIEW_UNSPECIFIED = 0, + BACKUP_VAULT_VIEW_BASIC = 1, + BACKUP_VAULT_VIEW_FULL = 2 + } - /** ListBackupsRequest pageToken */ - pageToken?: (string|null); + /** Properties of a BackupApplianceBackupProperties. */ + interface IBackupApplianceBackupProperties { - /** ListBackupsRequest filter */ - filter?: (string|null); + /** BackupApplianceBackupProperties generationId */ + generationId?: (number|null); - /** ListBackupsRequest orderBy */ - orderBy?: (string|null); + /** BackupApplianceBackupProperties finalizeTime */ + finalizeTime?: (google.protobuf.ITimestamp|null); - /** ListBackupsRequest view */ - view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); + /** BackupApplianceBackupProperties recoveryRangeStartTime */ + recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); + + /** BackupApplianceBackupProperties recoveryRangeEndTime */ + recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); } - /** Represents a ListBackupsRequest. */ - class ListBackupsRequest implements IListBackupsRequest { + /** Represents a BackupApplianceBackupProperties. */ + class BackupApplianceBackupProperties implements IBackupApplianceBackupProperties { /** - * Constructs a new ListBackupsRequest. + * Constructs a new BackupApplianceBackupProperties. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupsRequest); + constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupProperties); - /** ListBackupsRequest parent. */ - public parent: string; + /** BackupApplianceBackupProperties generationId. */ + public generationId?: (number|null); - /** ListBackupsRequest pageSize. */ - public pageSize: number; + /** BackupApplianceBackupProperties finalizeTime. */ + public finalizeTime?: (google.protobuf.ITimestamp|null); - /** ListBackupsRequest pageToken. */ - public pageToken: string; + /** BackupApplianceBackupProperties recoveryRangeStartTime. */ + public recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); - /** ListBackupsRequest filter. */ - public filter: string; + /** BackupApplianceBackupProperties recoveryRangeEndTime. */ + public recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); - /** ListBackupsRequest orderBy. */ - public orderBy: string; + /** BackupApplianceBackupProperties _generationId. */ + public _generationId?: "generationId"; - /** ListBackupsRequest view. */ - public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); + /** BackupApplianceBackupProperties _finalizeTime. */ + public _finalizeTime?: "finalizeTime"; + + /** BackupApplianceBackupProperties _recoveryRangeStartTime. */ + public _recoveryRangeStartTime?: "recoveryRangeStartTime"; + + /** BackupApplianceBackupProperties _recoveryRangeEndTime. */ + public _recoveryRangeEndTime?: "recoveryRangeEndTime"; /** - * Creates a new ListBackupsRequest instance using the specified properties. + * Creates a new BackupApplianceBackupProperties instance using the specified properties. * @param [properties] Properties to set - * @returns ListBackupsRequest instance + * @returns BackupApplianceBackupProperties instance */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupsRequest): google.cloud.backupdr.v1.ListBackupsRequest; + public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupProperties): google.cloud.backupdr.v1.BackupApplianceBackupProperties; /** - * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. - * @param message ListBackupsRequest message or plain object to encode + * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * @param message BackupApplianceBackupProperties message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. - * @param message ListBackupsRequest message or plain object to encode + * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * @param message BackupApplianceBackupProperties message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListBackupsRequest message from the specified reader or buffer. + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListBackupsRequest + * @returns BackupApplianceBackupProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceBackupProperties; /** - * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListBackupsRequest + * @returns BackupApplianceBackupProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceBackupProperties; /** - * Verifies a ListBackupsRequest message. + * Verifies a BackupApplianceBackupProperties message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListBackupsRequest + * @returns BackupApplianceBackupProperties */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceBackupProperties; /** - * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. - * @param message ListBackupsRequest + * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. + * @param message BackupApplianceBackupProperties * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.BackupApplianceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListBackupsRequest to JSON. + * Converts this BackupApplianceBackupProperties to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListBackupsRequest + * Gets the default type url for BackupApplianceBackupProperties * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListBackupsResponse. */ - interface IListBackupsResponse { + /** Properties of a ComputeInstanceBackupProperties. */ + interface IComputeInstanceBackupProperties { - /** ListBackupsResponse backups */ - backups?: (google.cloud.backupdr.v1.IBackup[]|null); + /** ComputeInstanceBackupProperties description */ + description?: (string|null); - /** ListBackupsResponse nextPageToken */ - nextPageToken?: (string|null); + /** ComputeInstanceBackupProperties tags */ + tags?: (google.cloud.backupdr.v1.ITags|null); - /** ListBackupsResponse unreachable */ - unreachable?: (string[]|null); - } + /** ComputeInstanceBackupProperties machineType */ + machineType?: (string|null); - /** Represents a ListBackupsResponse. */ - class ListBackupsResponse implements IListBackupsResponse { + /** ComputeInstanceBackupProperties canIpForward */ + canIpForward?: (boolean|null); - /** - * Constructs a new ListBackupsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IListBackupsResponse); + /** ComputeInstanceBackupProperties networkInterface */ + networkInterface?: (google.cloud.backupdr.v1.INetworkInterface[]|null); - /** ListBackupsResponse backups. */ - public backups: google.cloud.backupdr.v1.IBackup[]; + /** ComputeInstanceBackupProperties disk */ + disk?: (google.cloud.backupdr.v1.IAttachedDisk[]|null); - /** ListBackupsResponse nextPageToken. */ - public nextPageToken: string; + /** ComputeInstanceBackupProperties metadata */ + metadata?: (google.cloud.backupdr.v1.IMetadata|null); - /** ListBackupsResponse unreachable. */ - public unreachable: string[]; + /** ComputeInstanceBackupProperties serviceAccount */ + serviceAccount?: (google.cloud.backupdr.v1.IServiceAccount[]|null); - /** - * Creates a new ListBackupsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListBackupsResponse instance - */ - public static create(properties?: google.cloud.backupdr.v1.IListBackupsResponse): google.cloud.backupdr.v1.ListBackupsResponse; + /** ComputeInstanceBackupProperties scheduling */ + scheduling?: (google.cloud.backupdr.v1.IScheduling|null); - /** - * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. - * @param message ListBackupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** ComputeInstanceBackupProperties guestAccelerator */ + guestAccelerator?: (google.cloud.backupdr.v1.IAcceleratorConfig[]|null); - /** - * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. - * @param message ListBackupsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IListBackupsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** ComputeInstanceBackupProperties minCpuPlatform */ + minCpuPlatform?: (string|null); - /** - * Decodes a ListBackupsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ListBackupsResponse; + /** ComputeInstanceBackupProperties keyRevocationActionType */ + keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); - /** - * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ListBackupsResponse; + /** ComputeInstanceBackupProperties sourceInstance */ + sourceInstance?: (string|null); + + /** ComputeInstanceBackupProperties labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a ComputeInstanceBackupProperties. */ + class ComputeInstanceBackupProperties implements IComputeInstanceBackupProperties { /** - * Verifies a ListBackupsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Constructs a new ComputeInstanceBackupProperties. + * @param [properties] Properties to set */ - public static verify(message: { [k: string]: any }): (string|null); + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceBackupProperties); - /** - * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListBackupsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ListBackupsResponse; - - /** - * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. - * @param message ListBackupsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ListBackupsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListBackupsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListBackupsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetBackupRequest. */ - interface IGetBackupRequest { - - /** GetBackupRequest name */ - name?: (string|null); - - /** GetBackupRequest view */ - view?: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView|null); - } - - /** Represents a GetBackupRequest. */ - class GetBackupRequest implements IGetBackupRequest { + /** ComputeInstanceBackupProperties description. */ + public description?: (string|null); - /** - * Constructs a new GetBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGetBackupRequest); + /** ComputeInstanceBackupProperties tags. */ + public tags?: (google.cloud.backupdr.v1.ITags|null); - /** GetBackupRequest name. */ - public name: string; + /** ComputeInstanceBackupProperties machineType. */ + public machineType?: (string|null); - /** GetBackupRequest view. */ - public view: (google.cloud.backupdr.v1.BackupView|keyof typeof google.cloud.backupdr.v1.BackupView); + /** ComputeInstanceBackupProperties canIpForward. */ + public canIpForward?: (boolean|null); - /** - * Creates a new GetBackupRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetBackupRequest instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGetBackupRequest): google.cloud.backupdr.v1.GetBackupRequest; + /** ComputeInstanceBackupProperties networkInterface. */ + public networkInterface: google.cloud.backupdr.v1.INetworkInterface[]; - /** - * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. - * @param message GetBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** ComputeInstanceBackupProperties disk. */ + public disk: google.cloud.backupdr.v1.IAttachedDisk[]; - /** - * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. - * @param message GetBackupRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGetBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** ComputeInstanceBackupProperties metadata. */ + public metadata?: (google.cloud.backupdr.v1.IMetadata|null); - /** - * Decodes a GetBackupRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GetBackupRequest; + /** ComputeInstanceBackupProperties serviceAccount. */ + public serviceAccount: google.cloud.backupdr.v1.IServiceAccount[]; - /** - * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GetBackupRequest; + /** ComputeInstanceBackupProperties scheduling. */ + public scheduling?: (google.cloud.backupdr.v1.IScheduling|null); - /** - * Verifies a GetBackupRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ComputeInstanceBackupProperties guestAccelerator. */ + public guestAccelerator: google.cloud.backupdr.v1.IAcceleratorConfig[]; - /** - * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetBackupRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GetBackupRequest; + /** ComputeInstanceBackupProperties minCpuPlatform. */ + public minCpuPlatform?: (string|null); - /** - * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. - * @param message GetBackupRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GetBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ComputeInstanceBackupProperties keyRevocationActionType. */ + public keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); - /** - * Converts this GetBackupRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ComputeInstanceBackupProperties sourceInstance. */ + public sourceInstance?: (string|null); - /** - * Gets the default type url for GetBackupRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** ComputeInstanceBackupProperties labels. */ + public labels: { [k: string]: string }; - /** Properties of an UpdateBackupRequest. */ - interface IUpdateBackupRequest { + /** ComputeInstanceBackupProperties _description. */ + public _description?: "description"; - /** UpdateBackupRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ComputeInstanceBackupProperties _tags. */ + public _tags?: "tags"; - /** UpdateBackupRequest backup */ - backup?: (google.cloud.backupdr.v1.IBackup|null); + /** ComputeInstanceBackupProperties _machineType. */ + public _machineType?: "machineType"; - /** UpdateBackupRequest requestId */ - requestId?: (string|null); - } + /** ComputeInstanceBackupProperties _canIpForward. */ + public _canIpForward?: "canIpForward"; - /** Represents an UpdateBackupRequest. */ - class UpdateBackupRequest implements IUpdateBackupRequest { + /** ComputeInstanceBackupProperties _metadata. */ + public _metadata?: "metadata"; - /** - * Constructs a new UpdateBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IUpdateBackupRequest); + /** ComputeInstanceBackupProperties _scheduling. */ + public _scheduling?: "scheduling"; - /** UpdateBackupRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ComputeInstanceBackupProperties _minCpuPlatform. */ + public _minCpuPlatform?: "minCpuPlatform"; - /** UpdateBackupRequest backup. */ - public backup?: (google.cloud.backupdr.v1.IBackup|null); + /** ComputeInstanceBackupProperties _keyRevocationActionType. */ + public _keyRevocationActionType?: "keyRevocationActionType"; - /** UpdateBackupRequest requestId. */ - public requestId: string; + /** ComputeInstanceBackupProperties _sourceInstance. */ + public _sourceInstance?: "sourceInstance"; /** - * Creates a new UpdateBackupRequest instance using the specified properties. + * Creates a new ComputeInstanceBackupProperties instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateBackupRequest instance + * @returns ComputeInstanceBackupProperties instance */ - public static create(properties?: google.cloud.backupdr.v1.IUpdateBackupRequest): google.cloud.backupdr.v1.UpdateBackupRequest; + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceBackupProperties): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; /** - * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. - * @param message UpdateBackupRequest message or plain object to encode + * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * @param message ComputeInstanceBackupProperties message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. - * @param message UpdateBackupRequest message or plain object to encode + * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * @param message ComputeInstanceBackupProperties message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IUpdateBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer. + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateBackupRequest + * @returns ComputeInstanceBackupProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.UpdateBackupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateBackupRequest + * @returns ComputeInstanceBackupProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.UpdateBackupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; /** - * Verifies an UpdateBackupRequest message. + * Verifies a ComputeInstanceBackupProperties message. * @param message Plain 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 UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateBackupRequest + * @returns ComputeInstanceBackupProperties */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.UpdateBackupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; /** - * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. - * @param message UpdateBackupRequest + * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceBackupProperties * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.UpdateBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateBackupRequest to JSON. + * Converts this ComputeInstanceBackupProperties to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateBackupRequest + * Gets the default type url for ComputeInstanceBackupProperties * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteBackupRequest. */ - interface IDeleteBackupRequest { + /** Properties of a ComputeInstanceRestoreProperties. */ + interface IComputeInstanceRestoreProperties { - /** DeleteBackupRequest name */ + /** ComputeInstanceRestoreProperties name */ name?: (string|null); - /** DeleteBackupRequest requestId */ - requestId?: (string|null); - } + /** ComputeInstanceRestoreProperties advancedMachineFeatures */ + advancedMachineFeatures?: (google.cloud.backupdr.v1.IAdvancedMachineFeatures|null); - /** Represents a DeleteBackupRequest. */ - class DeleteBackupRequest implements IDeleteBackupRequest { + /** ComputeInstanceRestoreProperties canIpForward */ + canIpForward?: (boolean|null); - /** - * Constructs a new DeleteBackupRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IDeleteBackupRequest); + /** ComputeInstanceRestoreProperties confidentialInstanceConfig */ + confidentialInstanceConfig?: (google.cloud.backupdr.v1.IConfidentialInstanceConfig|null); - /** DeleteBackupRequest name. */ - public name: string; + /** ComputeInstanceRestoreProperties deletionProtection */ + deletionProtection?: (boolean|null); - /** DeleteBackupRequest requestId. */ - public requestId: string; + /** ComputeInstanceRestoreProperties description */ + description?: (string|null); + + /** ComputeInstanceRestoreProperties disks */ + disks?: (google.cloud.backupdr.v1.IAttachedDisk[]|null); + + /** ComputeInstanceRestoreProperties displayDevice */ + displayDevice?: (google.cloud.backupdr.v1.IDisplayDevice|null); + + /** ComputeInstanceRestoreProperties guestAccelerators */ + guestAccelerators?: (google.cloud.backupdr.v1.IAcceleratorConfig[]|null); + + /** ComputeInstanceRestoreProperties hostname */ + hostname?: (string|null); + + /** ComputeInstanceRestoreProperties instanceEncryptionKey */ + instanceEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** ComputeInstanceRestoreProperties keyRevocationActionType */ + keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + + /** ComputeInstanceRestoreProperties labels */ + labels?: ({ [k: string]: string }|null); + + /** ComputeInstanceRestoreProperties machineType */ + machineType?: (string|null); + + /** ComputeInstanceRestoreProperties metadata */ + metadata?: (google.cloud.backupdr.v1.IMetadata|null); + + /** ComputeInstanceRestoreProperties minCpuPlatform */ + minCpuPlatform?: (string|null); + + /** ComputeInstanceRestoreProperties networkInterfaces */ + networkInterfaces?: (google.cloud.backupdr.v1.INetworkInterface[]|null); + + /** ComputeInstanceRestoreProperties networkPerformanceConfig */ + networkPerformanceConfig?: (google.cloud.backupdr.v1.INetworkPerformanceConfig|null); + + /** ComputeInstanceRestoreProperties params */ + params?: (google.cloud.backupdr.v1.IInstanceParams|null); + + /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess */ + privateIpv6GoogleAccess?: (google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); + + /** ComputeInstanceRestoreProperties allocationAffinity */ + allocationAffinity?: (google.cloud.backupdr.v1.IAllocationAffinity|null); + + /** ComputeInstanceRestoreProperties resourcePolicies */ + resourcePolicies?: (string[]|null); + + /** ComputeInstanceRestoreProperties scheduling */ + scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + + /** ComputeInstanceRestoreProperties serviceAccounts */ + serviceAccounts?: (google.cloud.backupdr.v1.IServiceAccount[]|null); + + /** ComputeInstanceRestoreProperties tags */ + tags?: (google.cloud.backupdr.v1.ITags|null); + } + + /** Represents a ComputeInstanceRestoreProperties. */ + class ComputeInstanceRestoreProperties implements IComputeInstanceRestoreProperties { /** - * Creates a new DeleteBackupRequest instance using the specified properties. + * Constructs a new ComputeInstanceRestoreProperties. * @param [properties] Properties to set - * @returns DeleteBackupRequest instance */ - public static create(properties?: google.cloud.backupdr.v1.IDeleteBackupRequest): google.cloud.backupdr.v1.DeleteBackupRequest; + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties); + + /** ComputeInstanceRestoreProperties name. */ + public name?: (string|null); + + /** ComputeInstanceRestoreProperties advancedMachineFeatures. */ + public advancedMachineFeatures?: (google.cloud.backupdr.v1.IAdvancedMachineFeatures|null); + + /** ComputeInstanceRestoreProperties canIpForward. */ + public canIpForward?: (boolean|null); + + /** ComputeInstanceRestoreProperties confidentialInstanceConfig. */ + public confidentialInstanceConfig?: (google.cloud.backupdr.v1.IConfidentialInstanceConfig|null); + + /** ComputeInstanceRestoreProperties deletionProtection. */ + public deletionProtection?: (boolean|null); + + /** ComputeInstanceRestoreProperties description. */ + public description?: (string|null); + + /** ComputeInstanceRestoreProperties disks. */ + public disks: google.cloud.backupdr.v1.IAttachedDisk[]; + + /** ComputeInstanceRestoreProperties displayDevice. */ + public displayDevice?: (google.cloud.backupdr.v1.IDisplayDevice|null); + + /** ComputeInstanceRestoreProperties guestAccelerators. */ + public guestAccelerators: google.cloud.backupdr.v1.IAcceleratorConfig[]; + + /** ComputeInstanceRestoreProperties hostname. */ + public hostname?: (string|null); + + /** ComputeInstanceRestoreProperties instanceEncryptionKey. */ + public instanceEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** ComputeInstanceRestoreProperties keyRevocationActionType. */ + public keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + + /** ComputeInstanceRestoreProperties labels. */ + public labels: { [k: string]: string }; + + /** ComputeInstanceRestoreProperties machineType. */ + public machineType?: (string|null); + + /** ComputeInstanceRestoreProperties metadata. */ + public metadata?: (google.cloud.backupdr.v1.IMetadata|null); + + /** ComputeInstanceRestoreProperties minCpuPlatform. */ + public minCpuPlatform?: (string|null); + + /** ComputeInstanceRestoreProperties networkInterfaces. */ + public networkInterfaces: google.cloud.backupdr.v1.INetworkInterface[]; + + /** ComputeInstanceRestoreProperties networkPerformanceConfig. */ + public networkPerformanceConfig?: (google.cloud.backupdr.v1.INetworkPerformanceConfig|null); + + /** ComputeInstanceRestoreProperties params. */ + public params?: (google.cloud.backupdr.v1.IInstanceParams|null); + + /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess. */ + public privateIpv6GoogleAccess?: (google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); + + /** ComputeInstanceRestoreProperties allocationAffinity. */ + public allocationAffinity?: (google.cloud.backupdr.v1.IAllocationAffinity|null); + + /** ComputeInstanceRestoreProperties resourcePolicies. */ + public resourcePolicies: string[]; + + /** ComputeInstanceRestoreProperties scheduling. */ + public scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + + /** ComputeInstanceRestoreProperties serviceAccounts. */ + public serviceAccounts: google.cloud.backupdr.v1.IServiceAccount[]; + + /** ComputeInstanceRestoreProperties tags. */ + public tags?: (google.cloud.backupdr.v1.ITags|null); + + /** ComputeInstanceRestoreProperties _name. */ + public _name?: "name"; + + /** ComputeInstanceRestoreProperties _advancedMachineFeatures. */ + public _advancedMachineFeatures?: "advancedMachineFeatures"; + + /** ComputeInstanceRestoreProperties _canIpForward. */ + public _canIpForward?: "canIpForward"; + + /** ComputeInstanceRestoreProperties _confidentialInstanceConfig. */ + public _confidentialInstanceConfig?: "confidentialInstanceConfig"; + + /** ComputeInstanceRestoreProperties _deletionProtection. */ + public _deletionProtection?: "deletionProtection"; + + /** ComputeInstanceRestoreProperties _description. */ + public _description?: "description"; + + /** ComputeInstanceRestoreProperties _displayDevice. */ + public _displayDevice?: "displayDevice"; + + /** ComputeInstanceRestoreProperties _hostname. */ + public _hostname?: "hostname"; + + /** ComputeInstanceRestoreProperties _instanceEncryptionKey. */ + public _instanceEncryptionKey?: "instanceEncryptionKey"; + + /** ComputeInstanceRestoreProperties _keyRevocationActionType. */ + public _keyRevocationActionType?: "keyRevocationActionType"; + + /** ComputeInstanceRestoreProperties _machineType. */ + public _machineType?: "machineType"; + + /** ComputeInstanceRestoreProperties _metadata. */ + public _metadata?: "metadata"; + + /** ComputeInstanceRestoreProperties _minCpuPlatform. */ + public _minCpuPlatform?: "minCpuPlatform"; + + /** ComputeInstanceRestoreProperties _networkPerformanceConfig. */ + public _networkPerformanceConfig?: "networkPerformanceConfig"; + + /** ComputeInstanceRestoreProperties _params. */ + public _params?: "params"; + + /** ComputeInstanceRestoreProperties _privateIpv6GoogleAccess. */ + public _privateIpv6GoogleAccess?: "privateIpv6GoogleAccess"; + + /** ComputeInstanceRestoreProperties _allocationAffinity. */ + public _allocationAffinity?: "allocationAffinity"; + + /** ComputeInstanceRestoreProperties _scheduling. */ + public _scheduling?: "scheduling"; + + /** ComputeInstanceRestoreProperties _tags. */ + public _tags?: "tags"; /** - * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. - * @param message DeleteBackupRequest message or plain object to encode + * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns ComputeInstanceRestoreProperties instance + */ + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + + /** + * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * @param message ComputeInstanceRestoreProperties message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. - * @param message DeleteBackupRequest message or plain object to encode + * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * @param message ComputeInstanceRestoreProperties message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDeleteBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer. + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteBackupRequest + * @returns ComputeInstanceRestoreProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DeleteBackupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteBackupRequest + * @returns ComputeInstanceRestoreProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DeleteBackupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; /** - * Verifies a DeleteBackupRequest message. + * Verifies a ComputeInstanceRestoreProperties message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteBackupRequest + * @returns ComputeInstanceRestoreProperties */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DeleteBackupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; /** - * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. - * @param message DeleteBackupRequest + * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceRestoreProperties * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.DeleteBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceRestoreProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteBackupRequest to JSON. + * Converts this ComputeInstanceRestoreProperties to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteBackupRequest + * Gets the default type url for ComputeInstanceRestoreProperties * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RestoreBackupRequest. */ - interface IRestoreBackupRequest { + namespace ComputeInstanceRestoreProperties { - /** RestoreBackupRequest name */ - name?: (string|null); + /** InstancePrivateIpv6GoogleAccess enum. */ + enum InstancePrivateIpv6GoogleAccess { + INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0, + INHERIT_FROM_SUBNETWORK = 1, + ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2, + ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3 + } + } - /** RestoreBackupRequest requestId */ - requestId?: (string|null); + /** Properties of a ComputeInstanceTargetEnvironment. */ + interface IComputeInstanceTargetEnvironment { - /** RestoreBackupRequest computeInstanceTargetEnvironment */ - computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null); + /** ComputeInstanceTargetEnvironment project */ + project?: (string|null); - /** RestoreBackupRequest computeInstanceRestoreProperties */ - computeInstanceRestoreProperties?: (google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null); + /** ComputeInstanceTargetEnvironment zone */ + zone?: (string|null); } - /** Represents a RestoreBackupRequest. */ - class RestoreBackupRequest implements IRestoreBackupRequest { + /** Represents a ComputeInstanceTargetEnvironment. */ + class ComputeInstanceTargetEnvironment implements IComputeInstanceTargetEnvironment { /** - * Constructs a new RestoreBackupRequest. + * Constructs a new ComputeInstanceTargetEnvironment. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IRestoreBackupRequest); - - /** RestoreBackupRequest name. */ - public name: string; - - /** RestoreBackupRequest requestId. */ - public requestId: string; - - /** RestoreBackupRequest computeInstanceTargetEnvironment. */ - public computeInstanceTargetEnvironment?: (google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null); - - /** RestoreBackupRequest computeInstanceRestoreProperties. */ - public computeInstanceRestoreProperties?: (google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null); + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment); - /** RestoreBackupRequest targetEnvironment. */ - public targetEnvironment?: "computeInstanceTargetEnvironment"; + /** ComputeInstanceTargetEnvironment project. */ + public project: string; - /** RestoreBackupRequest instanceProperties. */ - public instanceProperties?: "computeInstanceRestoreProperties"; + /** ComputeInstanceTargetEnvironment zone. */ + public zone: string; /** - * Creates a new RestoreBackupRequest instance using the specified properties. + * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. * @param [properties] Properties to set - * @returns RestoreBackupRequest instance + * @returns ComputeInstanceTargetEnvironment instance */ - public static create(properties?: google.cloud.backupdr.v1.IRestoreBackupRequest): google.cloud.backupdr.v1.RestoreBackupRequest; + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; /** - * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. - * @param message RestoreBackupRequest message or plain object to encode + * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @param message ComputeInstanceTargetEnvironment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. - * @param message RestoreBackupRequest message or plain object to encode + * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. + * @param message ComputeInstanceTargetEnvironment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IRestoreBackupRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RestoreBackupRequest message from the specified reader or buffer. + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RestoreBackupRequest + * @returns ComputeInstanceTargetEnvironment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RestoreBackupRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; /** - * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RestoreBackupRequest + * @returns ComputeInstanceTargetEnvironment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RestoreBackupRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; /** - * Verifies a RestoreBackupRequest message. + * Verifies a ComputeInstanceTargetEnvironment message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RestoreBackupRequest + * @returns ComputeInstanceTargetEnvironment */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RestoreBackupRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; /** - * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. - * @param message RestoreBackupRequest + * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. + * @param message ComputeInstanceTargetEnvironment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.RestoreBackupRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RestoreBackupRequest to JSON. + * Converts this ComputeInstanceTargetEnvironment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RestoreBackupRequest + * Gets the default type url for ComputeInstanceTargetEnvironment * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a RestoreBackupResponse. */ - interface IRestoreBackupResponse { + /** Properties of a ComputeInstanceDataSourceProperties. */ + interface IComputeInstanceDataSourceProperties { - /** RestoreBackupResponse targetResource */ - targetResource?: (google.cloud.backupdr.v1.ITargetResource|null); + /** ComputeInstanceDataSourceProperties name */ + name?: (string|null); + + /** ComputeInstanceDataSourceProperties description */ + description?: (string|null); + + /** ComputeInstanceDataSourceProperties machineType */ + machineType?: (string|null); + + /** ComputeInstanceDataSourceProperties totalDiskCount */ + totalDiskCount?: (number|Long|string|null); + + /** ComputeInstanceDataSourceProperties totalDiskSizeGb */ + totalDiskSizeGb?: (number|Long|string|null); } - /** Represents a RestoreBackupResponse. */ - class RestoreBackupResponse implements IRestoreBackupResponse { + /** Represents a ComputeInstanceDataSourceProperties. */ + class ComputeInstanceDataSourceProperties implements IComputeInstanceDataSourceProperties { /** - * Constructs a new RestoreBackupResponse. + * Constructs a new ComputeInstanceDataSourceProperties. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IRestoreBackupResponse); + constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties); - /** RestoreBackupResponse targetResource. */ - public targetResource?: (google.cloud.backupdr.v1.ITargetResource|null); + /** ComputeInstanceDataSourceProperties name. */ + public name: string; + + /** ComputeInstanceDataSourceProperties description. */ + public description: string; + + /** ComputeInstanceDataSourceProperties machineType. */ + public machineType: string; + + /** ComputeInstanceDataSourceProperties totalDiskCount. */ + public totalDiskCount: (number|Long|string); + + /** ComputeInstanceDataSourceProperties totalDiskSizeGb. */ + public totalDiskSizeGb: (number|Long|string); /** - * Creates a new RestoreBackupResponse instance using the specified properties. + * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. * @param [properties] Properties to set - * @returns RestoreBackupResponse instance + * @returns ComputeInstanceDataSourceProperties instance */ - public static create(properties?: google.cloud.backupdr.v1.IRestoreBackupResponse): google.cloud.backupdr.v1.RestoreBackupResponse; + public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; /** - * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. - * @param message RestoreBackupResponse message or plain object to encode + * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @param message ComputeInstanceDataSourceProperties message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. - * @param message RestoreBackupResponse message or plain object to encode + * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * @param message ComputeInstanceDataSourceProperties message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IRestoreBackupResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a RestoreBackupResponse message from the specified reader or buffer. + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns RestoreBackupResponse + * @returns ComputeInstanceDataSourceProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.RestoreBackupResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; /** - * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns RestoreBackupResponse + * @returns ComputeInstanceDataSourceProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.RestoreBackupResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; /** - * Verifies a RestoreBackupResponse message. + * Verifies a ComputeInstanceDataSourceProperties message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns RestoreBackupResponse + * @returns ComputeInstanceDataSourceProperties */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.RestoreBackupResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; /** - * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. - * @param message RestoreBackupResponse + * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. + * @param message ComputeInstanceDataSourceProperties * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.RestoreBackupResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this RestoreBackupResponse to JSON. + * Converts this ComputeInstanceDataSourceProperties to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for RestoreBackupResponse + * Gets the default type url for ComputeInstanceDataSourceProperties * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a TargetResource. */ - interface ITargetResource { + /** Properties of an AdvancedMachineFeatures. */ + interface IAdvancedMachineFeatures { - /** TargetResource gcpResource */ - gcpResource?: (google.cloud.backupdr.v1.IGcpResource|null); + /** AdvancedMachineFeatures enableNestedVirtualization */ + enableNestedVirtualization?: (boolean|null); + + /** AdvancedMachineFeatures threadsPerCore */ + threadsPerCore?: (number|null); + + /** AdvancedMachineFeatures visibleCoreCount */ + visibleCoreCount?: (number|null); + + /** AdvancedMachineFeatures enableUefiNetworking */ + enableUefiNetworking?: (boolean|null); } - /** Represents a TargetResource. */ - class TargetResource implements ITargetResource { + /** Represents an AdvancedMachineFeatures. */ + class AdvancedMachineFeatures implements IAdvancedMachineFeatures { /** - * Constructs a new TargetResource. + * Constructs a new AdvancedMachineFeatures. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.ITargetResource); + constructor(properties?: google.cloud.backupdr.v1.IAdvancedMachineFeatures); - /** TargetResource gcpResource. */ - public gcpResource?: (google.cloud.backupdr.v1.IGcpResource|null); + /** AdvancedMachineFeatures enableNestedVirtualization. */ + public enableNestedVirtualization?: (boolean|null); - /** TargetResource targetResourceInfo. */ - public targetResourceInfo?: "gcpResource"; + /** AdvancedMachineFeatures threadsPerCore. */ + public threadsPerCore?: (number|null); + + /** AdvancedMachineFeatures visibleCoreCount. */ + public visibleCoreCount?: (number|null); + + /** AdvancedMachineFeatures enableUefiNetworking. */ + public enableUefiNetworking?: (boolean|null); + + /** AdvancedMachineFeatures _enableNestedVirtualization. */ + public _enableNestedVirtualization?: "enableNestedVirtualization"; + + /** AdvancedMachineFeatures _threadsPerCore. */ + public _threadsPerCore?: "threadsPerCore"; + + /** AdvancedMachineFeatures _visibleCoreCount. */ + public _visibleCoreCount?: "visibleCoreCount"; + + /** AdvancedMachineFeatures _enableUefiNetworking. */ + public _enableUefiNetworking?: "enableUefiNetworking"; /** - * Creates a new TargetResource instance using the specified properties. + * Creates a new AdvancedMachineFeatures instance using the specified properties. * @param [properties] Properties to set - * @returns TargetResource instance + * @returns AdvancedMachineFeatures instance */ - public static create(properties?: google.cloud.backupdr.v1.ITargetResource): google.cloud.backupdr.v1.TargetResource; + public static create(properties?: google.cloud.backupdr.v1.IAdvancedMachineFeatures): google.cloud.backupdr.v1.AdvancedMachineFeatures; /** - * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. - * @param message TargetResource message or plain object to encode + * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @param message AdvancedMachineFeatures message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. - * @param message TargetResource message or plain object to encode + * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @param message AdvancedMachineFeatures message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ITargetResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TargetResource message from the specified reader or buffer. + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TargetResource + * @returns AdvancedMachineFeatures * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.TargetResource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AdvancedMachineFeatures; /** - * Decodes a TargetResource message from the specified reader or buffer, length delimited. + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TargetResource + * @returns AdvancedMachineFeatures * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.TargetResource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AdvancedMachineFeatures; /** - * Verifies a TargetResource message. + * Verifies an AdvancedMachineFeatures message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. + * Creates an AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TargetResource + * @returns AdvancedMachineFeatures */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.TargetResource; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AdvancedMachineFeatures; /** - * Creates a plain object from a TargetResource message. Also converts values to other types if specified. - * @param message TargetResource + * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. + * @param message AdvancedMachineFeatures * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.TargetResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.AdvancedMachineFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TargetResource to JSON. + * Converts this AdvancedMachineFeatures to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TargetResource + * Gets the default type url for AdvancedMachineFeatures * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GcpResource. */ - interface IGcpResource { - - /** GcpResource gcpResourcename */ - gcpResourcename?: (string|null); - - /** GcpResource location */ - location?: (string|null); + /** Properties of a ConfidentialInstanceConfig. */ + interface IConfidentialInstanceConfig { - /** GcpResource type */ - type?: (string|null); + /** ConfidentialInstanceConfig enableConfidentialCompute */ + enableConfidentialCompute?: (boolean|null); } - /** Represents a GcpResource. */ - class GcpResource implements IGcpResource { + /** Represents a ConfidentialInstanceConfig. */ + class ConfidentialInstanceConfig implements IConfidentialInstanceConfig { /** - * Constructs a new GcpResource. + * Constructs a new ConfidentialInstanceConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IGcpResource); - - /** GcpResource gcpResourcename. */ - public gcpResourcename: string; + constructor(properties?: google.cloud.backupdr.v1.IConfidentialInstanceConfig); - /** GcpResource location. */ - public location: string; + /** ConfidentialInstanceConfig enableConfidentialCompute. */ + public enableConfidentialCompute?: (boolean|null); - /** GcpResource type. */ - public type: string; + /** ConfidentialInstanceConfig _enableConfidentialCompute. */ + public _enableConfidentialCompute?: "enableConfidentialCompute"; /** - * Creates a new GcpResource instance using the specified properties. + * Creates a new ConfidentialInstanceConfig instance using the specified properties. * @param [properties] Properties to set - * @returns GcpResource instance + * @returns ConfidentialInstanceConfig instance */ - public static create(properties?: google.cloud.backupdr.v1.IGcpResource): google.cloud.backupdr.v1.GcpResource; + public static create(properties?: google.cloud.backupdr.v1.IConfidentialInstanceConfig): google.cloud.backupdr.v1.ConfidentialInstanceConfig; /** - * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. - * @param message GcpResource message or plain object to encode + * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * @param message ConfidentialInstanceConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. - * @param message GcpResource message or plain object to encode + * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * @param message ConfidentialInstanceConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGcpResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GcpResource message from the specified reader or buffer. + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GcpResource + * @returns ConfidentialInstanceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GcpResource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ConfidentialInstanceConfig; /** - * Decodes a GcpResource message from the specified reader or buffer, length delimited. + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GcpResource + * @returns ConfidentialInstanceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GcpResource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ConfidentialInstanceConfig; /** - * Verifies a GcpResource message. + * Verifies a ConfidentialInstanceConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. + * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GcpResource + * @returns ConfidentialInstanceConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GcpResource; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ConfidentialInstanceConfig; /** - * Creates a plain object from a GcpResource message. Also converts values to other types if specified. - * @param message GcpResource + * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. + * @param message ConfidentialInstanceConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.GcpResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.ConfidentialInstanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GcpResource to JSON. + * Converts this ConfidentialInstanceConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GcpResource + * Gets the default type url for ConfidentialInstanceConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** BackupConfigState enum. */ - enum BackupConfigState { - BACKUP_CONFIG_STATE_UNSPECIFIED = 0, - ACTIVE = 1, - PASSIVE = 2 - } - - /** BackupView enum. */ - enum BackupView { - BACKUP_VIEW_UNSPECIFIED = 0, - BACKUP_VIEW_BASIC = 1, - BACKUP_VIEW_FULL = 2 - } - - /** BackupVaultView enum. */ - enum BackupVaultView { - BACKUP_VAULT_VIEW_UNSPECIFIED = 0, - BACKUP_VAULT_VIEW_BASIC = 1, - BACKUP_VAULT_VIEW_FULL = 2 - } - - /** Properties of a BackupApplianceBackupProperties. */ - interface IBackupApplianceBackupProperties { - - /** BackupApplianceBackupProperties generationId */ - generationId?: (number|null); - - /** BackupApplianceBackupProperties finalizeTime */ - finalizeTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties recoveryRangeStartTime */ - recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); + /** Properties of a DisplayDevice. */ + interface IDisplayDevice { - /** BackupApplianceBackupProperties recoveryRangeEndTime */ - recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); + /** DisplayDevice enableDisplay */ + enableDisplay?: (boolean|null); } - /** Represents a BackupApplianceBackupProperties. */ - class BackupApplianceBackupProperties implements IBackupApplianceBackupProperties { + /** Represents a DisplayDevice. */ + class DisplayDevice implements IDisplayDevice { /** - * Constructs a new BackupApplianceBackupProperties. + * Constructs a new DisplayDevice. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupProperties); - - /** BackupApplianceBackupProperties generationId. */ - public generationId?: (number|null); - - /** BackupApplianceBackupProperties finalizeTime. */ - public finalizeTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties recoveryRangeStartTime. */ - public recoveryRangeStartTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties recoveryRangeEndTime. */ - public recoveryRangeEndTime?: (google.protobuf.ITimestamp|null); - - /** BackupApplianceBackupProperties _generationId. */ - public _generationId?: "generationId"; - - /** BackupApplianceBackupProperties _finalizeTime. */ - public _finalizeTime?: "finalizeTime"; + constructor(properties?: google.cloud.backupdr.v1.IDisplayDevice); - /** BackupApplianceBackupProperties _recoveryRangeStartTime. */ - public _recoveryRangeStartTime?: "recoveryRangeStartTime"; + /** DisplayDevice enableDisplay. */ + public enableDisplay?: (boolean|null); - /** BackupApplianceBackupProperties _recoveryRangeEndTime. */ - public _recoveryRangeEndTime?: "recoveryRangeEndTime"; + /** DisplayDevice _enableDisplay. */ + public _enableDisplay?: "enableDisplay"; /** - * Creates a new BackupApplianceBackupProperties instance using the specified properties. + * Creates a new DisplayDevice instance using the specified properties. * @param [properties] Properties to set - * @returns BackupApplianceBackupProperties instance + * @returns DisplayDevice instance */ - public static create(properties?: google.cloud.backupdr.v1.IBackupApplianceBackupProperties): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + public static create(properties?: google.cloud.backupdr.v1.IDisplayDevice): google.cloud.backupdr.v1.DisplayDevice; /** - * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. - * @param message BackupApplianceBackupProperties message or plain object to encode + * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @param message DisplayDevice message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. - * @param message BackupApplianceBackupProperties message or plain object to encode + * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @param message DisplayDevice message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IBackupApplianceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. + * Decodes a DisplayDevice message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BackupApplianceBackupProperties + * @returns DisplayDevice * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DisplayDevice; /** - * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. + * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BackupApplianceBackupProperties + * @returns DisplayDevice * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DisplayDevice; /** - * Verifies a BackupApplianceBackupProperties message. + * Verifies a DisplayDevice message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. + * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BackupApplianceBackupProperties + * @returns DisplayDevice */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.BackupApplianceBackupProperties; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DisplayDevice; /** - * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. - * @param message BackupApplianceBackupProperties + * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. + * @param message DisplayDevice * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.BackupApplianceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.DisplayDevice, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BackupApplianceBackupProperties to JSON. + * Converts this DisplayDevice to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BackupApplianceBackupProperties + * Gets the default type url for DisplayDevice * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ComputeInstanceBackupProperties. */ - interface IComputeInstanceBackupProperties { - - /** ComputeInstanceBackupProperties description */ - description?: (string|null); + /** Properties of an AcceleratorConfig. */ + interface IAcceleratorConfig { - /** ComputeInstanceBackupProperties tags */ - tags?: (google.cloud.backupdr.v1.ITags|null); + /** AcceleratorConfig acceleratorType */ + acceleratorType?: (string|null); - /** ComputeInstanceBackupProperties machineType */ - machineType?: (string|null); + /** AcceleratorConfig acceleratorCount */ + acceleratorCount?: (number|null); + } - /** ComputeInstanceBackupProperties canIpForward */ - canIpForward?: (boolean|null); + /** Represents an AcceleratorConfig. */ + class AcceleratorConfig implements IAcceleratorConfig { - /** ComputeInstanceBackupProperties networkInterface */ - networkInterface?: (google.cloud.backupdr.v1.INetworkInterface[]|null); - - /** ComputeInstanceBackupProperties disk */ - disk?: (google.cloud.backupdr.v1.IAttachedDisk[]|null); - - /** ComputeInstanceBackupProperties metadata */ - metadata?: (google.cloud.backupdr.v1.IMetadata|null); - - /** ComputeInstanceBackupProperties serviceAccount */ - serviceAccount?: (google.cloud.backupdr.v1.IServiceAccount[]|null); - - /** ComputeInstanceBackupProperties scheduling */ - scheduling?: (google.cloud.backupdr.v1.IScheduling|null); - - /** ComputeInstanceBackupProperties guestAccelerator */ - guestAccelerator?: (google.cloud.backupdr.v1.IAcceleratorConfig[]|null); - - /** ComputeInstanceBackupProperties minCpuPlatform */ - minCpuPlatform?: (string|null); + /** + * Constructs a new AcceleratorConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.IAcceleratorConfig); - /** ComputeInstanceBackupProperties keyRevocationActionType */ - keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + /** AcceleratorConfig acceleratorType. */ + public acceleratorType?: (string|null); - /** ComputeInstanceBackupProperties sourceInstance */ - sourceInstance?: (string|null); + /** AcceleratorConfig acceleratorCount. */ + public acceleratorCount?: (number|null); - /** ComputeInstanceBackupProperties labels */ - labels?: ({ [k: string]: string }|null); - } + /** AcceleratorConfig _acceleratorType. */ + public _acceleratorType?: "acceleratorType"; - /** Represents a ComputeInstanceBackupProperties. */ - class ComputeInstanceBackupProperties implements IComputeInstanceBackupProperties { + /** AcceleratorConfig _acceleratorCount. */ + public _acceleratorCount?: "acceleratorCount"; /** - * Constructs a new ComputeInstanceBackupProperties. + * Creates a new AcceleratorConfig instance using the specified properties. * @param [properties] Properties to set + * @returns AcceleratorConfig instance */ - constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceBackupProperties); - - /** ComputeInstanceBackupProperties description. */ - public description?: (string|null); + public static create(properties?: google.cloud.backupdr.v1.IAcceleratorConfig): google.cloud.backupdr.v1.AcceleratorConfig; - /** ComputeInstanceBackupProperties tags. */ - public tags?: (google.cloud.backupdr.v1.ITags|null); + /** + * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * @param message AcceleratorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** ComputeInstanceBackupProperties machineType. */ - public machineType?: (string|null); + /** + * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * @param message AcceleratorConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** ComputeInstanceBackupProperties canIpForward. */ - public canIpForward?: (boolean|null); + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AcceleratorConfig; - /** ComputeInstanceBackupProperties networkInterface. */ - public networkInterface: google.cloud.backupdr.v1.INetworkInterface[]; + /** + * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcceleratorConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AcceleratorConfig; - /** ComputeInstanceBackupProperties disk. */ - public disk: google.cloud.backupdr.v1.IAttachedDisk[]; + /** + * Verifies an AcceleratorConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ComputeInstanceBackupProperties metadata. */ - public metadata?: (google.cloud.backupdr.v1.IMetadata|null); + /** + * Creates an AcceleratorConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcceleratorConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AcceleratorConfig; - /** ComputeInstanceBackupProperties serviceAccount. */ - public serviceAccount: google.cloud.backupdr.v1.IServiceAccount[]; + /** + * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. + * @param message AcceleratorConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AcceleratorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ComputeInstanceBackupProperties scheduling. */ - public scheduling?: (google.cloud.backupdr.v1.IScheduling|null); + /** + * Converts this AcceleratorConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ComputeInstanceBackupProperties guestAccelerator. */ - public guestAccelerator: google.cloud.backupdr.v1.IAcceleratorConfig[]; + /** + * Gets the default type url for AcceleratorConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ComputeInstanceBackupProperties minCpuPlatform. */ - public minCpuPlatform?: (string|null); + /** Properties of a CustomerEncryptionKey. */ + interface ICustomerEncryptionKey { - /** ComputeInstanceBackupProperties keyRevocationActionType. */ - public keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); + /** CustomerEncryptionKey rawKey */ + rawKey?: (string|null); - /** ComputeInstanceBackupProperties sourceInstance. */ - public sourceInstance?: (string|null); + /** CustomerEncryptionKey rsaEncryptedKey */ + rsaEncryptedKey?: (string|null); - /** ComputeInstanceBackupProperties labels. */ - public labels: { [k: string]: string }; + /** CustomerEncryptionKey kmsKeyName */ + kmsKeyName?: (string|null); - /** ComputeInstanceBackupProperties _description. */ - public _description?: "description"; + /** CustomerEncryptionKey kmsKeyServiceAccount */ + kmsKeyServiceAccount?: (string|null); + } - /** ComputeInstanceBackupProperties _tags. */ - public _tags?: "tags"; + /** Represents a CustomerEncryptionKey. */ + class CustomerEncryptionKey implements ICustomerEncryptionKey { - /** ComputeInstanceBackupProperties _machineType. */ - public _machineType?: "machineType"; + /** + * Constructs a new CustomerEncryptionKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ICustomerEncryptionKey); - /** ComputeInstanceBackupProperties _canIpForward. */ - public _canIpForward?: "canIpForward"; + /** CustomerEncryptionKey rawKey. */ + public rawKey?: (string|null); - /** ComputeInstanceBackupProperties _metadata. */ - public _metadata?: "metadata"; + /** CustomerEncryptionKey rsaEncryptedKey. */ + public rsaEncryptedKey?: (string|null); - /** ComputeInstanceBackupProperties _scheduling. */ - public _scheduling?: "scheduling"; + /** CustomerEncryptionKey kmsKeyName. */ + public kmsKeyName?: (string|null); - /** ComputeInstanceBackupProperties _minCpuPlatform. */ - public _minCpuPlatform?: "minCpuPlatform"; + /** CustomerEncryptionKey kmsKeyServiceAccount. */ + public kmsKeyServiceAccount?: (string|null); - /** ComputeInstanceBackupProperties _keyRevocationActionType. */ - public _keyRevocationActionType?: "keyRevocationActionType"; + /** CustomerEncryptionKey key. */ + public key?: ("rawKey"|"rsaEncryptedKey"|"kmsKeyName"); - /** ComputeInstanceBackupProperties _sourceInstance. */ - public _sourceInstance?: "sourceInstance"; + /** CustomerEncryptionKey _kmsKeyServiceAccount. */ + public _kmsKeyServiceAccount?: "kmsKeyServiceAccount"; /** - * Creates a new ComputeInstanceBackupProperties instance using the specified properties. + * Creates a new CustomerEncryptionKey instance using the specified properties. * @param [properties] Properties to set - * @returns ComputeInstanceBackupProperties instance + * @returns CustomerEncryptionKey instance */ - public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceBackupProperties): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + public static create(properties?: google.cloud.backupdr.v1.ICustomerEncryptionKey): google.cloud.backupdr.v1.CustomerEncryptionKey; /** - * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. - * @param message ComputeInstanceBackupProperties message or plain object to encode + * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @param message CustomerEncryptionKey message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. - * @param message ComputeInstanceBackupProperties message or plain object to encode + * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @param message CustomerEncryptionKey message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceBackupProperties, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. + * Decodes a CustomerEncryptionKey message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ComputeInstanceBackupProperties + * @returns CustomerEncryptionKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CustomerEncryptionKey; /** - * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. + * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ComputeInstanceBackupProperties + * @returns CustomerEncryptionKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CustomerEncryptionKey; /** - * Verifies a ComputeInstanceBackupProperties message. + * Verifies a CustomerEncryptionKey message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. + * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ComputeInstanceBackupProperties + * @returns CustomerEncryptionKey */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceBackupProperties; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CustomerEncryptionKey; /** - * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. - * @param message ComputeInstanceBackupProperties + * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. + * @param message CustomerEncryptionKey * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceBackupProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.CustomerEncryptionKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ComputeInstanceBackupProperties to JSON. + * Converts this CustomerEncryptionKey to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ComputeInstanceBackupProperties + * Gets the default type url for CustomerEncryptionKey * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ComputeInstanceRestoreProperties. */ - interface IComputeInstanceRestoreProperties { - - /** ComputeInstanceRestoreProperties name */ - name?: (string|null); + /** Properties of an Entry. */ + interface IEntry { - /** ComputeInstanceRestoreProperties advancedMachineFeatures */ - advancedMachineFeatures?: (google.cloud.backupdr.v1.IAdvancedMachineFeatures|null); + /** Entry key */ + key?: (string|null); - /** ComputeInstanceRestoreProperties canIpForward */ - canIpForward?: (boolean|null); + /** Entry value */ + value?: (string|null); + } - /** ComputeInstanceRestoreProperties confidentialInstanceConfig */ - confidentialInstanceConfig?: (google.cloud.backupdr.v1.IConfidentialInstanceConfig|null); - - /** ComputeInstanceRestoreProperties deletionProtection */ - deletionProtection?: (boolean|null); - - /** ComputeInstanceRestoreProperties description */ - description?: (string|null); - - /** ComputeInstanceRestoreProperties disks */ - disks?: (google.cloud.backupdr.v1.IAttachedDisk[]|null); - - /** ComputeInstanceRestoreProperties displayDevice */ - displayDevice?: (google.cloud.backupdr.v1.IDisplayDevice|null); - - /** ComputeInstanceRestoreProperties guestAccelerators */ - guestAccelerators?: (google.cloud.backupdr.v1.IAcceleratorConfig[]|null); - - /** ComputeInstanceRestoreProperties hostname */ - hostname?: (string|null); - - /** ComputeInstanceRestoreProperties instanceEncryptionKey */ - instanceEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); - - /** ComputeInstanceRestoreProperties keyRevocationActionType */ - keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); - - /** ComputeInstanceRestoreProperties labels */ - labels?: ({ [k: string]: string }|null); - - /** ComputeInstanceRestoreProperties machineType */ - machineType?: (string|null); - - /** ComputeInstanceRestoreProperties metadata */ - metadata?: (google.cloud.backupdr.v1.IMetadata|null); - - /** ComputeInstanceRestoreProperties minCpuPlatform */ - minCpuPlatform?: (string|null); - - /** ComputeInstanceRestoreProperties networkInterfaces */ - networkInterfaces?: (google.cloud.backupdr.v1.INetworkInterface[]|null); - - /** ComputeInstanceRestoreProperties networkPerformanceConfig */ - networkPerformanceConfig?: (google.cloud.backupdr.v1.INetworkPerformanceConfig|null); - - /** ComputeInstanceRestoreProperties params */ - params?: (google.cloud.backupdr.v1.IInstanceParams|null); - - /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess */ - privateIpv6GoogleAccess?: (google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); - - /** ComputeInstanceRestoreProperties allocationAffinity */ - allocationAffinity?: (google.cloud.backupdr.v1.IAllocationAffinity|null); - - /** ComputeInstanceRestoreProperties resourcePolicies */ - resourcePolicies?: (string[]|null); - - /** ComputeInstanceRestoreProperties scheduling */ - scheduling?: (google.cloud.backupdr.v1.IScheduling|null); - - /** ComputeInstanceRestoreProperties serviceAccounts */ - serviceAccounts?: (google.cloud.backupdr.v1.IServiceAccount[]|null); - - /** ComputeInstanceRestoreProperties tags */ - tags?: (google.cloud.backupdr.v1.ITags|null); - } - - /** Represents a ComputeInstanceRestoreProperties. */ - class ComputeInstanceRestoreProperties implements IComputeInstanceRestoreProperties { + /** Represents an Entry. */ + class Entry implements IEntry { /** - * Constructs a new ComputeInstanceRestoreProperties. + * Constructs a new Entry. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties); - - /** ComputeInstanceRestoreProperties name. */ - public name?: (string|null); - - /** ComputeInstanceRestoreProperties advancedMachineFeatures. */ - public advancedMachineFeatures?: (google.cloud.backupdr.v1.IAdvancedMachineFeatures|null); - - /** ComputeInstanceRestoreProperties canIpForward. */ - public canIpForward?: (boolean|null); - - /** ComputeInstanceRestoreProperties confidentialInstanceConfig. */ - public confidentialInstanceConfig?: (google.cloud.backupdr.v1.IConfidentialInstanceConfig|null); - - /** ComputeInstanceRestoreProperties deletionProtection. */ - public deletionProtection?: (boolean|null); - - /** ComputeInstanceRestoreProperties description. */ - public description?: (string|null); - - /** ComputeInstanceRestoreProperties disks. */ - public disks: google.cloud.backupdr.v1.IAttachedDisk[]; - - /** ComputeInstanceRestoreProperties displayDevice. */ - public displayDevice?: (google.cloud.backupdr.v1.IDisplayDevice|null); - - /** ComputeInstanceRestoreProperties guestAccelerators. */ - public guestAccelerators: google.cloud.backupdr.v1.IAcceleratorConfig[]; - - /** ComputeInstanceRestoreProperties hostname. */ - public hostname?: (string|null); - - /** ComputeInstanceRestoreProperties instanceEncryptionKey. */ - public instanceEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); - - /** ComputeInstanceRestoreProperties keyRevocationActionType. */ - public keyRevocationActionType?: (google.cloud.backupdr.v1.KeyRevocationActionType|keyof typeof google.cloud.backupdr.v1.KeyRevocationActionType|null); - - /** ComputeInstanceRestoreProperties labels. */ - public labels: { [k: string]: string }; - - /** ComputeInstanceRestoreProperties machineType. */ - public machineType?: (string|null); - - /** ComputeInstanceRestoreProperties metadata. */ - public metadata?: (google.cloud.backupdr.v1.IMetadata|null); - - /** ComputeInstanceRestoreProperties minCpuPlatform. */ - public minCpuPlatform?: (string|null); - - /** ComputeInstanceRestoreProperties networkInterfaces. */ - public networkInterfaces: google.cloud.backupdr.v1.INetworkInterface[]; - - /** ComputeInstanceRestoreProperties networkPerformanceConfig. */ - public networkPerformanceConfig?: (google.cloud.backupdr.v1.INetworkPerformanceConfig|null); - - /** ComputeInstanceRestoreProperties params. */ - public params?: (google.cloud.backupdr.v1.IInstanceParams|null); - - /** ComputeInstanceRestoreProperties privateIpv6GoogleAccess. */ - public privateIpv6GoogleAccess?: (google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|keyof typeof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null); - - /** ComputeInstanceRestoreProperties allocationAffinity. */ - public allocationAffinity?: (google.cloud.backupdr.v1.IAllocationAffinity|null); - - /** ComputeInstanceRestoreProperties resourcePolicies. */ - public resourcePolicies: string[]; - - /** ComputeInstanceRestoreProperties scheduling. */ - public scheduling?: (google.cloud.backupdr.v1.IScheduling|null); - - /** ComputeInstanceRestoreProperties serviceAccounts. */ - public serviceAccounts: google.cloud.backupdr.v1.IServiceAccount[]; - - /** ComputeInstanceRestoreProperties tags. */ - public tags?: (google.cloud.backupdr.v1.ITags|null); - - /** ComputeInstanceRestoreProperties _name. */ - public _name?: "name"; - - /** ComputeInstanceRestoreProperties _advancedMachineFeatures. */ - public _advancedMachineFeatures?: "advancedMachineFeatures"; - - /** ComputeInstanceRestoreProperties _canIpForward. */ - public _canIpForward?: "canIpForward"; - - /** ComputeInstanceRestoreProperties _confidentialInstanceConfig. */ - public _confidentialInstanceConfig?: "confidentialInstanceConfig"; - - /** ComputeInstanceRestoreProperties _deletionProtection. */ - public _deletionProtection?: "deletionProtection"; - - /** ComputeInstanceRestoreProperties _description. */ - public _description?: "description"; - - /** ComputeInstanceRestoreProperties _displayDevice. */ - public _displayDevice?: "displayDevice"; - - /** ComputeInstanceRestoreProperties _hostname. */ - public _hostname?: "hostname"; - - /** ComputeInstanceRestoreProperties _instanceEncryptionKey. */ - public _instanceEncryptionKey?: "instanceEncryptionKey"; - - /** ComputeInstanceRestoreProperties _keyRevocationActionType. */ - public _keyRevocationActionType?: "keyRevocationActionType"; - - /** ComputeInstanceRestoreProperties _machineType. */ - public _machineType?: "machineType"; - - /** ComputeInstanceRestoreProperties _metadata. */ - public _metadata?: "metadata"; - - /** ComputeInstanceRestoreProperties _minCpuPlatform. */ - public _minCpuPlatform?: "minCpuPlatform"; - - /** ComputeInstanceRestoreProperties _networkPerformanceConfig. */ - public _networkPerformanceConfig?: "networkPerformanceConfig"; - - /** ComputeInstanceRestoreProperties _params. */ - public _params?: "params"; + constructor(properties?: google.cloud.backupdr.v1.IEntry); - /** ComputeInstanceRestoreProperties _privateIpv6GoogleAccess. */ - public _privateIpv6GoogleAccess?: "privateIpv6GoogleAccess"; + /** Entry key. */ + public key?: (string|null); - /** ComputeInstanceRestoreProperties _allocationAffinity. */ - public _allocationAffinity?: "allocationAffinity"; + /** Entry value. */ + public value?: (string|null); - /** ComputeInstanceRestoreProperties _scheduling. */ - public _scheduling?: "scheduling"; + /** Entry _key. */ + public _key?: "key"; - /** ComputeInstanceRestoreProperties _tags. */ - public _tags?: "tags"; + /** Entry _value. */ + public _value?: "value"; /** - * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. + * Creates a new Entry instance using the specified properties. * @param [properties] Properties to set - * @returns ComputeInstanceRestoreProperties instance + * @returns Entry instance */ - public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + public static create(properties?: google.cloud.backupdr.v1.IEntry): google.cloud.backupdr.v1.Entry; /** - * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. - * @param message ComputeInstanceRestoreProperties message or plain object to encode + * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. - * @param message ComputeInstanceRestoreProperties message or plain object to encode + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @param message Entry message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceRestoreProperties, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. + * Decodes an Entry message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ComputeInstanceRestoreProperties + * @returns Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Entry; /** - * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. + * Decodes an Entry message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ComputeInstanceRestoreProperties + * @returns Entry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Entry; /** - * Verifies a ComputeInstanceRestoreProperties message. + * Verifies an Entry message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. + * Creates an Entry message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ComputeInstanceRestoreProperties + * @returns Entry */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceRestoreProperties; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Entry; /** - * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. - * @param message ComputeInstanceRestoreProperties + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @param message Entry * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceRestoreProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ComputeInstanceRestoreProperties to JSON. + * Converts this Entry to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ComputeInstanceRestoreProperties + * Gets the default type url for Entry * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ComputeInstanceRestoreProperties { + /** Properties of a Metadata. */ + interface IMetadata { - /** InstancePrivateIpv6GoogleAccess enum. */ - enum InstancePrivateIpv6GoogleAccess { - INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED = 0, - INHERIT_FROM_SUBNETWORK = 1, - ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE = 2, - ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE = 3 - } - } - - /** Properties of a ComputeInstanceTargetEnvironment. */ - interface IComputeInstanceTargetEnvironment { - - /** ComputeInstanceTargetEnvironment project */ - project?: (string|null); - - /** ComputeInstanceTargetEnvironment zone */ - zone?: (string|null); + /** Metadata items */ + items?: (google.cloud.backupdr.v1.IEntry[]|null); } - /** Represents a ComputeInstanceTargetEnvironment. */ - class ComputeInstanceTargetEnvironment implements IComputeInstanceTargetEnvironment { + /** Represents a Metadata. */ + class Metadata implements IMetadata { /** - * Constructs a new ComputeInstanceTargetEnvironment. + * Constructs a new Metadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment); - - /** ComputeInstanceTargetEnvironment project. */ - public project: string; + constructor(properties?: google.cloud.backupdr.v1.IMetadata); - /** ComputeInstanceTargetEnvironment zone. */ - public zone: string; + /** Metadata items. */ + public items: google.cloud.backupdr.v1.IEntry[]; /** - * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. + * Creates a new Metadata instance using the specified properties. * @param [properties] Properties to set - * @returns ComputeInstanceTargetEnvironment instance + * @returns Metadata instance */ - public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + public static create(properties?: google.cloud.backupdr.v1.IMetadata): google.cloud.backupdr.v1.Metadata; /** - * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. - * @param message ComputeInstanceTargetEnvironment message or plain object to encode + * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. - * @param message ComputeInstanceTargetEnvironment message or plain object to encode + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * @param message Metadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. + * Decodes a Metadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ComputeInstanceTargetEnvironment + * @returns Metadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Metadata; /** - * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. + * Decodes a Metadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ComputeInstanceTargetEnvironment + * @returns Metadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Metadata; /** - * Verifies a ComputeInstanceTargetEnvironment message. + * Verifies a Metadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ComputeInstanceTargetEnvironment + * @returns Metadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Metadata; /** - * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. - * @param message ComputeInstanceTargetEnvironment + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @param message Metadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ComputeInstanceTargetEnvironment to JSON. + * Converts this Metadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ComputeInstanceTargetEnvironment + * Gets the default type url for Metadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ComputeInstanceDataSourceProperties. */ - interface IComputeInstanceDataSourceProperties { + /** Properties of a NetworkInterface. */ + interface INetworkInterface { - /** ComputeInstanceDataSourceProperties name */ + /** NetworkInterface network */ + network?: (string|null); + + /** NetworkInterface subnetwork */ + subnetwork?: (string|null); + + /** NetworkInterface ipAddress */ + ipAddress?: (string|null); + + /** NetworkInterface ipv6Address */ + ipv6Address?: (string|null); + + /** NetworkInterface internalIpv6PrefixLength */ + internalIpv6PrefixLength?: (number|null); + + /** NetworkInterface name */ name?: (string|null); - /** ComputeInstanceDataSourceProperties description */ - description?: (string|null); + /** NetworkInterface accessConfigs */ + accessConfigs?: (google.cloud.backupdr.v1.IAccessConfig[]|null); - /** ComputeInstanceDataSourceProperties machineType */ - machineType?: (string|null); + /** NetworkInterface ipv6AccessConfigs */ + ipv6AccessConfigs?: (google.cloud.backupdr.v1.IAccessConfig[]|null); - /** ComputeInstanceDataSourceProperties totalDiskCount */ - totalDiskCount?: (number|Long|string|null); + /** NetworkInterface aliasIpRanges */ + aliasIpRanges?: (google.cloud.backupdr.v1.IAliasIpRange[]|null); - /** ComputeInstanceDataSourceProperties totalDiskSizeGb */ - totalDiskSizeGb?: (number|Long|string|null); + /** NetworkInterface stackType */ + stackType?: (google.cloud.backupdr.v1.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.StackType|null); + + /** NetworkInterface ipv6AccessType */ + ipv6AccessType?: (google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null); + + /** NetworkInterface queueCount */ + queueCount?: (number|null); + + /** NetworkInterface nicType */ + nicType?: (google.cloud.backupdr.v1.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.NicType|null); + + /** NetworkInterface networkAttachment */ + networkAttachment?: (string|null); } - /** Represents a ComputeInstanceDataSourceProperties. */ - class ComputeInstanceDataSourceProperties implements IComputeInstanceDataSourceProperties { + /** Represents a NetworkInterface. */ + class NetworkInterface implements INetworkInterface { /** - * Constructs a new ComputeInstanceDataSourceProperties. + * Constructs a new NetworkInterface. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties); + constructor(properties?: google.cloud.backupdr.v1.INetworkInterface); - /** ComputeInstanceDataSourceProperties name. */ - public name: string; + /** NetworkInterface network. */ + public network?: (string|null); - /** ComputeInstanceDataSourceProperties description. */ - public description: string; + /** NetworkInterface subnetwork. */ + public subnetwork?: (string|null); - /** ComputeInstanceDataSourceProperties machineType. */ - public machineType: string; + /** NetworkInterface ipAddress. */ + public ipAddress?: (string|null); - /** ComputeInstanceDataSourceProperties totalDiskCount. */ - public totalDiskCount: (number|Long|string); + /** NetworkInterface ipv6Address. */ + public ipv6Address?: (string|null); - /** ComputeInstanceDataSourceProperties totalDiskSizeGb. */ - public totalDiskSizeGb: (number|Long|string); + /** NetworkInterface internalIpv6PrefixLength. */ + public internalIpv6PrefixLength?: (number|null); + + /** NetworkInterface name. */ + public name?: (string|null); + + /** NetworkInterface accessConfigs. */ + public accessConfigs: google.cloud.backupdr.v1.IAccessConfig[]; + + /** NetworkInterface ipv6AccessConfigs. */ + public ipv6AccessConfigs: google.cloud.backupdr.v1.IAccessConfig[]; + + /** NetworkInterface aliasIpRanges. */ + public aliasIpRanges: google.cloud.backupdr.v1.IAliasIpRange[]; + + /** NetworkInterface stackType. */ + public stackType?: (google.cloud.backupdr.v1.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.StackType|null); + + /** NetworkInterface ipv6AccessType. */ + public ipv6AccessType?: (google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null); + + /** NetworkInterface queueCount. */ + public queueCount?: (number|null); + + /** NetworkInterface nicType. */ + public nicType?: (google.cloud.backupdr.v1.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.NicType|null); + + /** NetworkInterface networkAttachment. */ + public networkAttachment?: (string|null); + + /** NetworkInterface _network. */ + public _network?: "network"; + + /** NetworkInterface _subnetwork. */ + public _subnetwork?: "subnetwork"; + + /** NetworkInterface _ipAddress. */ + public _ipAddress?: "ipAddress"; + + /** NetworkInterface _ipv6Address. */ + public _ipv6Address?: "ipv6Address"; + + /** NetworkInterface _internalIpv6PrefixLength. */ + public _internalIpv6PrefixLength?: "internalIpv6PrefixLength"; + + /** NetworkInterface _name. */ + public _name?: "name"; + + /** NetworkInterface _stackType. */ + public _stackType?: "stackType"; + + /** NetworkInterface _ipv6AccessType. */ + public _ipv6AccessType?: "ipv6AccessType"; + + /** NetworkInterface _queueCount. */ + public _queueCount?: "queueCount"; + + /** NetworkInterface _nicType. */ + public _nicType?: "nicType"; + + /** NetworkInterface _networkAttachment. */ + public _networkAttachment?: "networkAttachment"; /** - * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. + * Creates a new NetworkInterface instance using the specified properties. * @param [properties] Properties to set - * @returns ComputeInstanceDataSourceProperties instance + * @returns NetworkInterface instance */ - public static create(properties?: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + public static create(properties?: google.cloud.backupdr.v1.INetworkInterface): google.cloud.backupdr.v1.NetworkInterface; /** - * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. - * @param message ComputeInstanceDataSourceProperties message or plain object to encode + * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * @param message NetworkInterface message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. - * @param message ComputeInstanceDataSourceProperties message or plain object to encode + * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * @param message NetworkInterface message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. + * Decodes a NetworkInterface message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ComputeInstanceDataSourceProperties + * @returns NetworkInterface * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkInterface; /** - * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. + * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ComputeInstanceDataSourceProperties + * @returns NetworkInterface * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkInterface; /** - * Verifies a ComputeInstanceDataSourceProperties message. + * Verifies a NetworkInterface message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. + * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ComputeInstanceDataSourceProperties + * @returns NetworkInterface */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkInterface; /** - * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. - * @param message ComputeInstanceDataSourceProperties + * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. + * @param message NetworkInterface * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.NetworkInterface, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ComputeInstanceDataSourceProperties to JSON. + * Converts this NetworkInterface to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ComputeInstanceDataSourceProperties + * Gets the default type url for NetworkInterface * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AdvancedMachineFeatures. */ - interface IAdvancedMachineFeatures { + namespace NetworkInterface { - /** AdvancedMachineFeatures enableNestedVirtualization */ - enableNestedVirtualization?: (boolean|null); + /** StackType enum. */ + enum StackType { + STACK_TYPE_UNSPECIFIED = 0, + IPV4_ONLY = 1, + IPV4_IPV6 = 2 + } - /** AdvancedMachineFeatures threadsPerCore */ - threadsPerCore?: (number|null); + /** Ipv6AccessType enum. */ + enum Ipv6AccessType { + UNSPECIFIED_IPV6_ACCESS_TYPE = 0, + INTERNAL = 1, + EXTERNAL = 2 + } - /** AdvancedMachineFeatures visibleCoreCount */ - visibleCoreCount?: (number|null); + /** NicType enum. */ + enum NicType { + NIC_TYPE_UNSPECIFIED = 0, + VIRTIO_NET = 1, + GVNIC = 2 + } + } - /** AdvancedMachineFeatures enableUefiNetworking */ - enableUefiNetworking?: (boolean|null); + /** Properties of a NetworkPerformanceConfig. */ + interface INetworkPerformanceConfig { + + /** NetworkPerformanceConfig totalEgressBandwidthTier */ + totalEgressBandwidthTier?: (google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null); } - /** Represents an AdvancedMachineFeatures. */ - class AdvancedMachineFeatures implements IAdvancedMachineFeatures { + /** Represents a NetworkPerformanceConfig. */ + class NetworkPerformanceConfig implements INetworkPerformanceConfig { /** - * Constructs a new AdvancedMachineFeatures. + * Constructs a new NetworkPerformanceConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IAdvancedMachineFeatures); - - /** AdvancedMachineFeatures enableNestedVirtualization. */ - public enableNestedVirtualization?: (boolean|null); - - /** AdvancedMachineFeatures threadsPerCore. */ - public threadsPerCore?: (number|null); - - /** AdvancedMachineFeatures visibleCoreCount. */ - public visibleCoreCount?: (number|null); - - /** AdvancedMachineFeatures enableUefiNetworking. */ - public enableUefiNetworking?: (boolean|null); - - /** AdvancedMachineFeatures _enableNestedVirtualization. */ - public _enableNestedVirtualization?: "enableNestedVirtualization"; - - /** AdvancedMachineFeatures _threadsPerCore. */ - public _threadsPerCore?: "threadsPerCore"; + constructor(properties?: google.cloud.backupdr.v1.INetworkPerformanceConfig); - /** AdvancedMachineFeatures _visibleCoreCount. */ - public _visibleCoreCount?: "visibleCoreCount"; + /** NetworkPerformanceConfig totalEgressBandwidthTier. */ + public totalEgressBandwidthTier?: (google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null); - /** AdvancedMachineFeatures _enableUefiNetworking. */ - public _enableUefiNetworking?: "enableUefiNetworking"; + /** NetworkPerformanceConfig _totalEgressBandwidthTier. */ + public _totalEgressBandwidthTier?: "totalEgressBandwidthTier"; /** - * Creates a new AdvancedMachineFeatures instance using the specified properties. + * Creates a new NetworkPerformanceConfig instance using the specified properties. * @param [properties] Properties to set - * @returns AdvancedMachineFeatures instance + * @returns NetworkPerformanceConfig instance */ - public static create(properties?: google.cloud.backupdr.v1.IAdvancedMachineFeatures): google.cloud.backupdr.v1.AdvancedMachineFeatures; + public static create(properties?: google.cloud.backupdr.v1.INetworkPerformanceConfig): google.cloud.backupdr.v1.NetworkPerformanceConfig; /** - * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. - * @param message AdvancedMachineFeatures message or plain object to encode + * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * @param message NetworkPerformanceConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. - * @param message AdvancedMachineFeatures message or plain object to encode + * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * @param message NetworkPerformanceConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAdvancedMachineFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AdvancedMachineFeatures + * @returns NetworkPerformanceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AdvancedMachineFeatures; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkPerformanceConfig; /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AdvancedMachineFeatures + * @returns NetworkPerformanceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AdvancedMachineFeatures; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkPerformanceConfig; /** - * Verifies an AdvancedMachineFeatures message. + * Verifies a NetworkPerformanceConfig message. * @param message Plain 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 AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. + * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AdvancedMachineFeatures + * @returns NetworkPerformanceConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AdvancedMachineFeatures; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkPerformanceConfig; /** - * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. - * @param message AdvancedMachineFeatures + * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. + * @param message NetworkPerformanceConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.AdvancedMachineFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.NetworkPerformanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AdvancedMachineFeatures to JSON. + * Converts this NetworkPerformanceConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AdvancedMachineFeatures + * Gets the default type url for NetworkPerformanceConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ConfidentialInstanceConfig. */ - interface IConfidentialInstanceConfig { + namespace NetworkPerformanceConfig { - /** ConfidentialInstanceConfig enableConfidentialCompute */ - enableConfidentialCompute?: (boolean|null); + /** Tier enum. */ + enum Tier { + TIER_UNSPECIFIED = 0, + DEFAULT = 1, + TIER_1 = 2 + } } - /** Represents a ConfidentialInstanceConfig. */ - class ConfidentialInstanceConfig implements IConfidentialInstanceConfig { + /** Properties of an AccessConfig. */ + interface IAccessConfig { + + /** AccessConfig type */ + type?: (google.cloud.backupdr.v1.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1.AccessConfig.AccessType|null); + + /** AccessConfig name */ + name?: (string|null); + + /** AccessConfig externalIp */ + externalIp?: (string|null); + + /** AccessConfig externalIpv6 */ + externalIpv6?: (string|null); + + /** AccessConfig externalIpv6PrefixLength */ + externalIpv6PrefixLength?: (number|null); + + /** AccessConfig setPublicPtr */ + setPublicPtr?: (boolean|null); + + /** AccessConfig publicPtrDomainName */ + publicPtrDomainName?: (string|null); + + /** AccessConfig networkTier */ + networkTier?: (google.cloud.backupdr.v1.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1.AccessConfig.NetworkTier|null); + } + + /** Represents an AccessConfig. */ + class AccessConfig implements IAccessConfig { /** - * Constructs a new ConfidentialInstanceConfig. + * Constructs a new AccessConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IConfidentialInstanceConfig); + constructor(properties?: google.cloud.backupdr.v1.IAccessConfig); - /** ConfidentialInstanceConfig enableConfidentialCompute. */ - public enableConfidentialCompute?: (boolean|null); + /** AccessConfig type. */ + public type?: (google.cloud.backupdr.v1.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1.AccessConfig.AccessType|null); - /** ConfidentialInstanceConfig _enableConfidentialCompute. */ - public _enableConfidentialCompute?: "enableConfidentialCompute"; + /** AccessConfig name. */ + public name?: (string|null); + + /** AccessConfig externalIp. */ + public externalIp?: (string|null); + + /** AccessConfig externalIpv6. */ + public externalIpv6?: (string|null); + + /** AccessConfig externalIpv6PrefixLength. */ + public externalIpv6PrefixLength?: (number|null); + + /** AccessConfig setPublicPtr. */ + public setPublicPtr?: (boolean|null); + + /** AccessConfig publicPtrDomainName. */ + public publicPtrDomainName?: (string|null); + + /** AccessConfig networkTier. */ + public networkTier?: (google.cloud.backupdr.v1.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1.AccessConfig.NetworkTier|null); + + /** AccessConfig _type. */ + public _type?: "type"; + + /** AccessConfig _name. */ + public _name?: "name"; + + /** AccessConfig _externalIp. */ + public _externalIp?: "externalIp"; + + /** AccessConfig _externalIpv6. */ + public _externalIpv6?: "externalIpv6"; + + /** AccessConfig _externalIpv6PrefixLength. */ + public _externalIpv6PrefixLength?: "externalIpv6PrefixLength"; + + /** AccessConfig _setPublicPtr. */ + public _setPublicPtr?: "setPublicPtr"; + + /** AccessConfig _publicPtrDomainName. */ + public _publicPtrDomainName?: "publicPtrDomainName"; + + /** AccessConfig _networkTier. */ + public _networkTier?: "networkTier"; /** - * Creates a new ConfidentialInstanceConfig instance using the specified properties. + * Creates a new AccessConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ConfidentialInstanceConfig instance + * @returns AccessConfig instance */ - public static create(properties?: google.cloud.backupdr.v1.IConfidentialInstanceConfig): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + public static create(properties?: google.cloud.backupdr.v1.IAccessConfig): google.cloud.backupdr.v1.AccessConfig; /** - * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. - * @param message ConfidentialInstanceConfig message or plain object to encode + * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * @param message AccessConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. - * @param message ConfidentialInstanceConfig message or plain object to encode + * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * @param message AccessConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IConfidentialInstanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. + * Decodes an AccessConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConfidentialInstanceConfig + * @returns AccessConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AccessConfig; /** - * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. + * Decodes an AccessConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConfidentialInstanceConfig + * @returns AccessConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AccessConfig; /** - * Verifies a ConfidentialInstanceConfig message. + * Verifies an AccessConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AccessConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConfidentialInstanceConfig + * @returns AccessConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ConfidentialInstanceConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AccessConfig; /** - * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. - * @param message ConfidentialInstanceConfig + * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. + * @param message AccessConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.ConfidentialInstanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.AccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConfidentialInstanceConfig to JSON. + * Converts this AccessConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ConfidentialInstanceConfig + * Gets the default type url for AccessConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DisplayDevice. */ - interface IDisplayDevice { + namespace AccessConfig { - /** DisplayDevice enableDisplay */ - enableDisplay?: (boolean|null); + /** AccessType enum. */ + enum AccessType { + ACCESS_TYPE_UNSPECIFIED = 0, + ONE_TO_ONE_NAT = 1, + DIRECT_IPV6 = 2 + } + + /** NetworkTier enum. */ + enum NetworkTier { + NETWORK_TIER_UNSPECIFIED = 0, + PREMIUM = 1, + STANDARD = 2 + } } - /** Represents a DisplayDevice. */ - class DisplayDevice implements IDisplayDevice { + /** Properties of an AliasIpRange. */ + interface IAliasIpRange { + + /** AliasIpRange ipCidrRange */ + ipCidrRange?: (string|null); + + /** AliasIpRange subnetworkRangeName */ + subnetworkRangeName?: (string|null); + } + + /** Represents an AliasIpRange. */ + class AliasIpRange implements IAliasIpRange { /** - * Constructs a new DisplayDevice. + * Constructs a new AliasIpRange. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IDisplayDevice); + constructor(properties?: google.cloud.backupdr.v1.IAliasIpRange); - /** DisplayDevice enableDisplay. */ - public enableDisplay?: (boolean|null); + /** AliasIpRange ipCidrRange. */ + public ipCidrRange?: (string|null); - /** DisplayDevice _enableDisplay. */ - public _enableDisplay?: "enableDisplay"; + /** AliasIpRange subnetworkRangeName. */ + public subnetworkRangeName?: (string|null); + + /** AliasIpRange _ipCidrRange. */ + public _ipCidrRange?: "ipCidrRange"; + + /** AliasIpRange _subnetworkRangeName. */ + public _subnetworkRangeName?: "subnetworkRangeName"; /** - * Creates a new DisplayDevice instance using the specified properties. + * Creates a new AliasIpRange instance using the specified properties. * @param [properties] Properties to set - * @returns DisplayDevice instance + * @returns AliasIpRange instance */ - public static create(properties?: google.cloud.backupdr.v1.IDisplayDevice): google.cloud.backupdr.v1.DisplayDevice; + public static create(properties?: google.cloud.backupdr.v1.IAliasIpRange): google.cloud.backupdr.v1.AliasIpRange; /** - * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. - * @param message DisplayDevice message or plain object to encode + * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. + * @param message AliasIpRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. - * @param message DisplayDevice message or plain object to encode + * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. + * @param message AliasIpRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IDisplayDevice, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DisplayDevice message from the specified reader or buffer. + * Decodes an AliasIpRange message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DisplayDevice + * @returns AliasIpRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.DisplayDevice; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AliasIpRange; /** - * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. + * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DisplayDevice + * @returns AliasIpRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.DisplayDevice; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AliasIpRange; /** - * Verifies a DisplayDevice message. + * Verifies an AliasIpRange message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. + * Creates an AliasIpRange message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DisplayDevice + * @returns AliasIpRange */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.DisplayDevice; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AliasIpRange; /** - * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. - * @param message DisplayDevice + * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. + * @param message AliasIpRange * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.DisplayDevice, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.AliasIpRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DisplayDevice to JSON. + * Converts this AliasIpRange to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DisplayDevice + * Gets the default type url for AliasIpRange * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AcceleratorConfig. */ - interface IAcceleratorConfig { - - /** AcceleratorConfig acceleratorType */ - acceleratorType?: (string|null); + /** Properties of an InstanceParams. */ + interface IInstanceParams { - /** AcceleratorConfig acceleratorCount */ - acceleratorCount?: (number|null); + /** InstanceParams resourceManagerTags */ + resourceManagerTags?: ({ [k: string]: string }|null); } - /** Represents an AcceleratorConfig. */ - class AcceleratorConfig implements IAcceleratorConfig { + /** Represents an InstanceParams. */ + class InstanceParams implements IInstanceParams { /** - * Constructs a new AcceleratorConfig. + * Constructs a new InstanceParams. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IAcceleratorConfig); - - /** AcceleratorConfig acceleratorType. */ - public acceleratorType?: (string|null); - - /** AcceleratorConfig acceleratorCount. */ - public acceleratorCount?: (number|null); - - /** AcceleratorConfig _acceleratorType. */ - public _acceleratorType?: "acceleratorType"; + constructor(properties?: google.cloud.backupdr.v1.IInstanceParams); - /** AcceleratorConfig _acceleratorCount. */ - public _acceleratorCount?: "acceleratorCount"; + /** InstanceParams resourceManagerTags. */ + public resourceManagerTags: { [k: string]: string }; /** - * Creates a new AcceleratorConfig instance using the specified properties. + * Creates a new InstanceParams instance using the specified properties. * @param [properties] Properties to set - * @returns AcceleratorConfig instance + * @returns InstanceParams instance */ - public static create(properties?: google.cloud.backupdr.v1.IAcceleratorConfig): google.cloud.backupdr.v1.AcceleratorConfig; + public static create(properties?: google.cloud.backupdr.v1.IInstanceParams): google.cloud.backupdr.v1.InstanceParams; /** - * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. - * @param message AcceleratorConfig message or plain object to encode + * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @param message InstanceParams message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. - * @param message AcceleratorConfig message or plain object to encode + * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @param message InstanceParams message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAcceleratorConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AcceleratorConfig message from the specified reader or buffer. + * Decodes an InstanceParams message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AcceleratorConfig + * @returns InstanceParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AcceleratorConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InstanceParams; /** - * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. + * Decodes an InstanceParams message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AcceleratorConfig + * @returns InstanceParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AcceleratorConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InstanceParams; /** - * Verifies an AcceleratorConfig message. + * Verifies an InstanceParams message. * @param message Plain 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 AcceleratorConfig message from a plain object. Also converts values to their respective internal types. + * Creates an InstanceParams message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AcceleratorConfig + * @returns InstanceParams */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AcceleratorConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InstanceParams; /** - * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. - * @param message AcceleratorConfig + * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. + * @param message InstanceParams * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.AcceleratorConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.InstanceParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AcceleratorConfig to JSON. + * Converts this InstanceParams to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AcceleratorConfig + * Gets the default type url for InstanceParams * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CustomerEncryptionKey. */ - interface ICustomerEncryptionKey { - - /** CustomerEncryptionKey rawKey */ - rawKey?: (string|null); + /** Properties of an AllocationAffinity. */ + interface IAllocationAffinity { - /** CustomerEncryptionKey rsaEncryptedKey */ - rsaEncryptedKey?: (string|null); + /** AllocationAffinity consumeAllocationType */ + consumeAllocationType?: (google.cloud.backupdr.v1.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1.AllocationAffinity.Type|null); - /** CustomerEncryptionKey kmsKeyName */ - kmsKeyName?: (string|null); + /** AllocationAffinity key */ + key?: (string|null); - /** CustomerEncryptionKey kmsKeyServiceAccount */ - kmsKeyServiceAccount?: (string|null); + /** AllocationAffinity values */ + values?: (string[]|null); } - /** Represents a CustomerEncryptionKey. */ - class CustomerEncryptionKey implements ICustomerEncryptionKey { + /** Represents an AllocationAffinity. */ + class AllocationAffinity implements IAllocationAffinity { /** - * Constructs a new CustomerEncryptionKey. + * Constructs a new AllocationAffinity. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.ICustomerEncryptionKey); - - /** CustomerEncryptionKey rawKey. */ - public rawKey?: (string|null); + constructor(properties?: google.cloud.backupdr.v1.IAllocationAffinity); - /** CustomerEncryptionKey rsaEncryptedKey. */ - public rsaEncryptedKey?: (string|null); + /** AllocationAffinity consumeAllocationType. */ + public consumeAllocationType?: (google.cloud.backupdr.v1.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1.AllocationAffinity.Type|null); - /** CustomerEncryptionKey kmsKeyName. */ - public kmsKeyName?: (string|null); + /** AllocationAffinity key. */ + public key?: (string|null); - /** CustomerEncryptionKey kmsKeyServiceAccount. */ - public kmsKeyServiceAccount?: (string|null); + /** AllocationAffinity values. */ + public values: string[]; - /** CustomerEncryptionKey key. */ - public key?: ("rawKey"|"rsaEncryptedKey"|"kmsKeyName"); + /** AllocationAffinity _consumeAllocationType. */ + public _consumeAllocationType?: "consumeAllocationType"; - /** CustomerEncryptionKey _kmsKeyServiceAccount. */ - public _kmsKeyServiceAccount?: "kmsKeyServiceAccount"; + /** AllocationAffinity _key. */ + public _key?: "key"; /** - * Creates a new CustomerEncryptionKey instance using the specified properties. + * Creates a new AllocationAffinity instance using the specified properties. * @param [properties] Properties to set - * @returns CustomerEncryptionKey instance + * @returns AllocationAffinity instance */ - public static create(properties?: google.cloud.backupdr.v1.ICustomerEncryptionKey): google.cloud.backupdr.v1.CustomerEncryptionKey; + public static create(properties?: google.cloud.backupdr.v1.IAllocationAffinity): google.cloud.backupdr.v1.AllocationAffinity; /** - * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. - * @param message CustomerEncryptionKey message or plain object to encode + * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. + * @param message AllocationAffinity message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. - * @param message CustomerEncryptionKey message or plain object to encode + * Encodes the specified AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. + * @param message AllocationAffinity message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ICustomerEncryptionKey, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomerEncryptionKey message from the specified reader or buffer. + * Decodes an AllocationAffinity message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CustomerEncryptionKey + * @returns AllocationAffinity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.CustomerEncryptionKey; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AllocationAffinity; /** - * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. + * Decodes an AllocationAffinity message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomerEncryptionKey + * @returns AllocationAffinity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.CustomerEncryptionKey; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AllocationAffinity; /** - * Verifies a CustomerEncryptionKey message. + * Verifies an AllocationAffinity message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. + * Creates an AllocationAffinity message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomerEncryptionKey + * @returns AllocationAffinity */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.CustomerEncryptionKey; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AllocationAffinity; /** - * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. - * @param message CustomerEncryptionKey + * Creates a plain object from an AllocationAffinity message. Also converts values to other types if specified. + * @param message AllocationAffinity * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.CustomerEncryptionKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.AllocationAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomerEncryptionKey to JSON. + * Converts this AllocationAffinity to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CustomerEncryptionKey + * Gets the default type url for AllocationAffinity * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Entry. */ - interface IEntry { - - /** Entry key */ - key?: (string|null); + namespace AllocationAffinity { - /** Entry value */ - value?: (string|null); + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + NO_RESERVATION = 1, + ANY_RESERVATION = 2, + SPECIFIC_RESERVATION = 3 + } } - /** Represents an Entry. */ - class Entry implements IEntry { + /** Properties of a Scheduling. */ + interface IScheduling { - /** - * Constructs a new Entry. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IEntry); + /** Scheduling onHostMaintenance */ + onHostMaintenance?: (google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null); - /** Entry key. */ - public key?: (string|null); + /** Scheduling automaticRestart */ + automaticRestart?: (boolean|null); - /** Entry value. */ - public value?: (string|null); + /** Scheduling preemptible */ + preemptible?: (boolean|null); - /** Entry _key. */ - public _key?: "key"; + /** Scheduling nodeAffinities */ + nodeAffinities?: (google.cloud.backupdr.v1.Scheduling.INodeAffinity[]|null); - /** Entry _value. */ - public _value?: "value"; + /** Scheduling minNodeCpus */ + minNodeCpus?: (number|null); + + /** Scheduling provisioningModel */ + provisioningModel?: (google.cloud.backupdr.v1.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null); + + /** Scheduling instanceTerminationAction */ + instanceTerminationAction?: (google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null); + + /** Scheduling localSsdRecoveryTimeout */ + localSsdRecoveryTimeout?: (google.cloud.backupdr.v1.ISchedulingDuration|null); + } + + /** Represents a Scheduling. */ + class Scheduling implements IScheduling { /** - * Creates a new Entry instance using the specified properties. + * Constructs a new Scheduling. * @param [properties] Properties to set - * @returns Entry instance */ - public static create(properties?: google.cloud.backupdr.v1.IEntry): google.cloud.backupdr.v1.Entry; + constructor(properties?: google.cloud.backupdr.v1.IScheduling); - /** - * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. - * @param message Entry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + /** Scheduling onHostMaintenance. */ + public onHostMaintenance?: (google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null); - /** - * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. - * @param message Entry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IEntry, writer?: $protobuf.Writer): $protobuf.Writer; + /** Scheduling automaticRestart. */ + public automaticRestart?: (boolean|null); - /** - * Decodes an Entry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Entry; + /** Scheduling preemptible. */ + public preemptible?: (boolean|null); - /** - * Decodes an Entry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Entry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Entry; + /** Scheduling nodeAffinities. */ + public nodeAffinities: google.cloud.backupdr.v1.Scheduling.INodeAffinity[]; - /** - * Verifies an Entry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Scheduling minNodeCpus. */ + public minNodeCpus?: (number|null); - /** - * Creates an Entry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Entry - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Entry; + /** Scheduling provisioningModel. */ + public provisioningModel?: (google.cloud.backupdr.v1.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null); - /** - * Creates a plain object from an Entry message. Also converts values to other types if specified. - * @param message Entry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Entry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Scheduling instanceTerminationAction. */ + public instanceTerminationAction?: (google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null); - /** - * Converts this Entry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Scheduling localSsdRecoveryTimeout. */ + public localSsdRecoveryTimeout?: (google.cloud.backupdr.v1.ISchedulingDuration|null); - /** - * Gets the default type url for Entry - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Scheduling _onHostMaintenance. */ + public _onHostMaintenance?: "onHostMaintenance"; - /** Properties of a Metadata. */ - interface IMetadata { + /** Scheduling _automaticRestart. */ + public _automaticRestart?: "automaticRestart"; - /** Metadata items */ - items?: (google.cloud.backupdr.v1.IEntry[]|null); - } + /** Scheduling _preemptible. */ + public _preemptible?: "preemptible"; - /** Represents a Metadata. */ - class Metadata implements IMetadata { + /** Scheduling _minNodeCpus. */ + public _minNodeCpus?: "minNodeCpus"; - /** - * Constructs a new Metadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IMetadata); + /** Scheduling _provisioningModel. */ + public _provisioningModel?: "provisioningModel"; - /** Metadata items. */ - public items: google.cloud.backupdr.v1.IEntry[]; + /** Scheduling _instanceTerminationAction. */ + public _instanceTerminationAction?: "instanceTerminationAction"; + + /** Scheduling _localSsdRecoveryTimeout. */ + public _localSsdRecoveryTimeout?: "localSsdRecoveryTimeout"; /** - * Creates a new Metadata instance using the specified properties. + * Creates a new Scheduling instance using the specified properties. * @param [properties] Properties to set - * @returns Metadata instance + * @returns Scheduling instance */ - public static create(properties?: google.cloud.backupdr.v1.IMetadata): google.cloud.backupdr.v1.Metadata; + public static create(properties?: google.cloud.backupdr.v1.IScheduling): google.cloud.backupdr.v1.Scheduling; /** - * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode + * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. + * @param message Scheduling message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode + * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. + * @param message Scheduling message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Metadata message from the specified reader or buffer. + * Decodes a Scheduling message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Metadata + * @returns Scheduling * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Metadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Scheduling; /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. + * Decodes a Scheduling message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Metadata + * @returns Scheduling * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Metadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Scheduling; /** - * Verifies a Metadata message. + * Verifies a Scheduling message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Metadata + * @returns Scheduling */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Metadata; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Scheduling; /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @param message Metadata + * Creates a plain object from a Scheduling message. Also converts values to other types if specified. + * @param message Scheduling * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.Scheduling, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Metadata to JSON. + * Converts this Scheduling to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Metadata + * Gets the default type url for Scheduling * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a NetworkInterface. */ - interface INetworkInterface { + namespace Scheduling { - /** NetworkInterface network */ - network?: (string|null); - - /** NetworkInterface subnetwork */ - subnetwork?: (string|null); - - /** NetworkInterface ipAddress */ - ipAddress?: (string|null); - - /** NetworkInterface ipv6Address */ - ipv6Address?: (string|null); - - /** NetworkInterface internalIpv6PrefixLength */ - internalIpv6PrefixLength?: (number|null); - - /** NetworkInterface name */ - name?: (string|null); - - /** NetworkInterface accessConfigs */ - accessConfigs?: (google.cloud.backupdr.v1.IAccessConfig[]|null); + /** OnHostMaintenance enum. */ + enum OnHostMaintenance { + ON_HOST_MAINTENANCE_UNSPECIFIED = 0, + TERMINATE = 1, + MIGRATE = 1000 + } - /** NetworkInterface ipv6AccessConfigs */ - ipv6AccessConfigs?: (google.cloud.backupdr.v1.IAccessConfig[]|null); + /** Properties of a NodeAffinity. */ + interface INodeAffinity { - /** NetworkInterface aliasIpRanges */ - aliasIpRanges?: (google.cloud.backupdr.v1.IAliasIpRange[]|null); + /** NodeAffinity key */ + key?: (string|null); - /** NetworkInterface stackType */ - stackType?: (google.cloud.backupdr.v1.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.StackType|null); + /** NodeAffinity operator */ + operator?: (google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null); - /** NetworkInterface ipv6AccessType */ - ipv6AccessType?: (google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null); + /** NodeAffinity values */ + values?: (string[]|null); + } - /** NetworkInterface queueCount */ - queueCount?: (number|null); + /** Represents a NodeAffinity. */ + class NodeAffinity implements INodeAffinity { - /** NetworkInterface nicType */ - nicType?: (google.cloud.backupdr.v1.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.NicType|null); + /** + * Constructs a new NodeAffinity. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.Scheduling.INodeAffinity); - /** NetworkInterface networkAttachment */ - networkAttachment?: (string|null); - } + /** NodeAffinity key. */ + public key?: (string|null); - /** Represents a NetworkInterface. */ - class NetworkInterface implements INetworkInterface { + /** NodeAffinity operator. */ + public operator?: (google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null); - /** - * Constructs a new NetworkInterface. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.INetworkInterface); + /** NodeAffinity values. */ + public values: string[]; - /** NetworkInterface network. */ - public network?: (string|null); + /** NodeAffinity _key. */ + public _key?: "key"; - /** NetworkInterface subnetwork. */ - public subnetwork?: (string|null); + /** NodeAffinity _operator. */ + public _operator?: "operator"; - /** NetworkInterface ipAddress. */ - public ipAddress?: (string|null); + /** + * Creates a new NodeAffinity instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeAffinity instance + */ + public static create(properties?: google.cloud.backupdr.v1.Scheduling.INodeAffinity): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - /** NetworkInterface ipv6Address. */ - public ipv6Address?: (string|null); + /** + * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @param message NodeAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - /** NetworkInterface internalIpv6PrefixLength. */ - public internalIpv6PrefixLength?: (number|null); + /** + * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @param message NodeAffinity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - /** NetworkInterface name. */ - public name?: (string|null); + /** + * Decodes a NodeAffinity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - /** NetworkInterface accessConfigs. */ - public accessConfigs: google.cloud.backupdr.v1.IAccessConfig[]; + /** + * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - /** NetworkInterface ipv6AccessConfigs. */ - public ipv6AccessConfigs: google.cloud.backupdr.v1.IAccessConfig[]; + /** + * Verifies a NodeAffinity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** NetworkInterface aliasIpRanges. */ - public aliasIpRanges: google.cloud.backupdr.v1.IAliasIpRange[]; + /** + * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeAffinity + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - /** NetworkInterface stackType. */ - public stackType?: (google.cloud.backupdr.v1.NetworkInterface.StackType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.StackType|null); + /** + * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. + * @param message NodeAffinity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.Scheduling.NodeAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** NetworkInterface ipv6AccessType. */ - public ipv6AccessType?: (google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null); + /** + * Converts this NodeAffinity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** NetworkInterface queueCount. */ - public queueCount?: (number|null); + /** + * Gets the default type url for NodeAffinity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** NetworkInterface nicType. */ - public nicType?: (google.cloud.backupdr.v1.NetworkInterface.NicType|keyof typeof google.cloud.backupdr.v1.NetworkInterface.NicType|null); + namespace NodeAffinity { - /** NetworkInterface networkAttachment. */ - public networkAttachment?: (string|null); + /** Operator enum. */ + enum Operator { + OPERATOR_UNSPECIFIED = 0, + IN = 1, + NOT_IN = 2 + } + } - /** NetworkInterface _network. */ - public _network?: "network"; + /** ProvisioningModel enum. */ + enum ProvisioningModel { + PROVISIONING_MODEL_UNSPECIFIED = 0, + STANDARD = 1, + SPOT = 2 + } - /** NetworkInterface _subnetwork. */ - public _subnetwork?: "subnetwork"; + /** InstanceTerminationAction enum. */ + enum InstanceTerminationAction { + INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0, + DELETE = 1, + STOP = 2 + } + } - /** NetworkInterface _ipAddress. */ - public _ipAddress?: "ipAddress"; + /** Properties of a SchedulingDuration. */ + interface ISchedulingDuration { - /** NetworkInterface _ipv6Address. */ - public _ipv6Address?: "ipv6Address"; + /** SchedulingDuration seconds */ + seconds?: (number|Long|string|null); - /** NetworkInterface _internalIpv6PrefixLength. */ - public _internalIpv6PrefixLength?: "internalIpv6PrefixLength"; + /** SchedulingDuration nanos */ + nanos?: (number|null); + } - /** NetworkInterface _name. */ - public _name?: "name"; + /** Represents a SchedulingDuration. */ + class SchedulingDuration implements ISchedulingDuration { - /** NetworkInterface _stackType. */ - public _stackType?: "stackType"; + /** + * Constructs a new SchedulingDuration. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.ISchedulingDuration); - /** NetworkInterface _ipv6AccessType. */ - public _ipv6AccessType?: "ipv6AccessType"; + /** SchedulingDuration seconds. */ + public seconds?: (number|Long|string|null); - /** NetworkInterface _queueCount. */ - public _queueCount?: "queueCount"; + /** SchedulingDuration nanos. */ + public nanos?: (number|null); - /** NetworkInterface _nicType. */ - public _nicType?: "nicType"; + /** SchedulingDuration _seconds. */ + public _seconds?: "seconds"; - /** NetworkInterface _networkAttachment. */ - public _networkAttachment?: "networkAttachment"; + /** SchedulingDuration _nanos. */ + public _nanos?: "nanos"; /** - * Creates a new NetworkInterface instance using the specified properties. + * Creates a new SchedulingDuration instance using the specified properties. * @param [properties] Properties to set - * @returns NetworkInterface instance + * @returns SchedulingDuration instance */ - public static create(properties?: google.cloud.backupdr.v1.INetworkInterface): google.cloud.backupdr.v1.NetworkInterface; + public static create(properties?: google.cloud.backupdr.v1.ISchedulingDuration): google.cloud.backupdr.v1.SchedulingDuration; /** - * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. - * @param message NetworkInterface message or plain object to encode + * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. + * @param message SchedulingDuration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. - * @param message NetworkInterface message or plain object to encode + * Encodes the specified SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. + * @param message SchedulingDuration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkInterface, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NetworkInterface message from the specified reader or buffer. + * Decodes a SchedulingDuration message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NetworkInterface + * @returns SchedulingDuration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkInterface; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SchedulingDuration; /** - * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. + * Decodes a SchedulingDuration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NetworkInterface + * @returns SchedulingDuration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkInterface; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SchedulingDuration; /** - * Verifies a NetworkInterface message. + * Verifies a SchedulingDuration message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. + * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NetworkInterface + * @returns SchedulingDuration */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkInterface; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SchedulingDuration; /** - * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. - * @param message NetworkInterface + * Creates a plain object from a SchedulingDuration message. Also converts values to other types if specified. + * @param message SchedulingDuration * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.NetworkInterface, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.SchedulingDuration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NetworkInterface to JSON. + * Converts this SchedulingDuration to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NetworkInterface + * Gets the default type url for SchedulingDuration * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace NetworkInterface { - - /** StackType enum. */ - enum StackType { - STACK_TYPE_UNSPECIFIED = 0, - IPV4_ONLY = 1, - IPV4_IPV6 = 2 - } - - /** Ipv6AccessType enum. */ - enum Ipv6AccessType { - UNSPECIFIED_IPV6_ACCESS_TYPE = 0, - INTERNAL = 1, - EXTERNAL = 2 - } - - /** NicType enum. */ - enum NicType { - NIC_TYPE_UNSPECIFIED = 0, - VIRTIO_NET = 1, - GVNIC = 2 - } - } + /** Properties of a ServiceAccount. */ + interface IServiceAccount { - /** Properties of a NetworkPerformanceConfig. */ - interface INetworkPerformanceConfig { + /** ServiceAccount email */ + email?: (string|null); - /** NetworkPerformanceConfig totalEgressBandwidthTier */ - totalEgressBandwidthTier?: (google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null); + /** ServiceAccount scopes */ + scopes?: (string[]|null); } - /** Represents a NetworkPerformanceConfig. */ - class NetworkPerformanceConfig implements INetworkPerformanceConfig { + /** Represents a ServiceAccount. */ + class ServiceAccount implements IServiceAccount { /** - * Constructs a new NetworkPerformanceConfig. + * Constructs a new ServiceAccount. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.INetworkPerformanceConfig); + constructor(properties?: google.cloud.backupdr.v1.IServiceAccount); - /** NetworkPerformanceConfig totalEgressBandwidthTier. */ - public totalEgressBandwidthTier?: (google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|keyof typeof google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null); + /** ServiceAccount email. */ + public email?: (string|null); - /** NetworkPerformanceConfig _totalEgressBandwidthTier. */ - public _totalEgressBandwidthTier?: "totalEgressBandwidthTier"; + /** ServiceAccount scopes. */ + public scopes: string[]; + + /** ServiceAccount _email. */ + public _email?: "email"; /** - * Creates a new NetworkPerformanceConfig instance using the specified properties. + * Creates a new ServiceAccount instance using the specified properties. * @param [properties] Properties to set - * @returns NetworkPerformanceConfig instance + * @returns ServiceAccount instance */ - public static create(properties?: google.cloud.backupdr.v1.INetworkPerformanceConfig): google.cloud.backupdr.v1.NetworkPerformanceConfig; + public static create(properties?: google.cloud.backupdr.v1.IServiceAccount): google.cloud.backupdr.v1.ServiceAccount; /** - * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. - * @param message NetworkPerformanceConfig message or plain object to encode + * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. + * @param message ServiceAccount message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. - * @param message NetworkPerformanceConfig message or plain object to encode + * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. + * @param message ServiceAccount message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.INetworkPerformanceConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. + * Decodes a ServiceAccount message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NetworkPerformanceConfig + * @returns ServiceAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.NetworkPerformanceConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ServiceAccount; /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NetworkPerformanceConfig + * @returns ServiceAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.NetworkPerformanceConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ServiceAccount; /** - * Verifies a NetworkPerformanceConfig message. + * Verifies a ServiceAccount message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NetworkPerformanceConfig + * @returns ServiceAccount */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.NetworkPerformanceConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ServiceAccount; /** - * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. - * @param message NetworkPerformanceConfig + * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. + * @param message ServiceAccount * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.NetworkPerformanceConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.ServiceAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NetworkPerformanceConfig to JSON. + * Converts this ServiceAccount to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for NetworkPerformanceConfig + * Gets the default type url for ServiceAccount * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace NetworkPerformanceConfig { - - /** Tier enum. */ - enum Tier { - TIER_UNSPECIFIED = 0, - DEFAULT = 1, - TIER_1 = 2 - } - } - - /** Properties of an AccessConfig. */ - interface IAccessConfig { - - /** AccessConfig type */ - type?: (google.cloud.backupdr.v1.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1.AccessConfig.AccessType|null); - - /** AccessConfig name */ - name?: (string|null); - - /** AccessConfig externalIp */ - externalIp?: (string|null); - - /** AccessConfig externalIpv6 */ - externalIpv6?: (string|null); - - /** AccessConfig externalIpv6PrefixLength */ - externalIpv6PrefixLength?: (number|null); - - /** AccessConfig setPublicPtr */ - setPublicPtr?: (boolean|null); - - /** AccessConfig publicPtrDomainName */ - publicPtrDomainName?: (string|null); + /** Properties of a Tags. */ + interface ITags { - /** AccessConfig networkTier */ - networkTier?: (google.cloud.backupdr.v1.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1.AccessConfig.NetworkTier|null); + /** Tags items */ + items?: (string[]|null); } - /** Represents an AccessConfig. */ - class AccessConfig implements IAccessConfig { + /** Represents a Tags. */ + class Tags implements ITags { /** - * Constructs a new AccessConfig. + * Constructs a new Tags. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IAccessConfig); - - /** AccessConfig type. */ - public type?: (google.cloud.backupdr.v1.AccessConfig.AccessType|keyof typeof google.cloud.backupdr.v1.AccessConfig.AccessType|null); - - /** AccessConfig name. */ - public name?: (string|null); - - /** AccessConfig externalIp. */ - public externalIp?: (string|null); - - /** AccessConfig externalIpv6. */ - public externalIpv6?: (string|null); - - /** AccessConfig externalIpv6PrefixLength. */ - public externalIpv6PrefixLength?: (number|null); - - /** AccessConfig setPublicPtr. */ - public setPublicPtr?: (boolean|null); - - /** AccessConfig publicPtrDomainName. */ - public publicPtrDomainName?: (string|null); - - /** AccessConfig networkTier. */ - public networkTier?: (google.cloud.backupdr.v1.AccessConfig.NetworkTier|keyof typeof google.cloud.backupdr.v1.AccessConfig.NetworkTier|null); - - /** AccessConfig _type. */ - public _type?: "type"; - - /** AccessConfig _name. */ - public _name?: "name"; - - /** AccessConfig _externalIp. */ - public _externalIp?: "externalIp"; - - /** AccessConfig _externalIpv6. */ - public _externalIpv6?: "externalIpv6"; - - /** AccessConfig _externalIpv6PrefixLength. */ - public _externalIpv6PrefixLength?: "externalIpv6PrefixLength"; - - /** AccessConfig _setPublicPtr. */ - public _setPublicPtr?: "setPublicPtr"; - - /** AccessConfig _publicPtrDomainName. */ - public _publicPtrDomainName?: "publicPtrDomainName"; + constructor(properties?: google.cloud.backupdr.v1.ITags); - /** AccessConfig _networkTier. */ - public _networkTier?: "networkTier"; + /** Tags items. */ + public items: string[]; /** - * Creates a new AccessConfig instance using the specified properties. + * Creates a new Tags instance using the specified properties. * @param [properties] Properties to set - * @returns AccessConfig instance + * @returns Tags instance */ - public static create(properties?: google.cloud.backupdr.v1.IAccessConfig): google.cloud.backupdr.v1.AccessConfig; + public static create(properties?: google.cloud.backupdr.v1.ITags): google.cloud.backupdr.v1.Tags; /** - * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. - * @param message AccessConfig message or plain object to encode + * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. + * @param message Tags message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.ITags, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. - * @param message AccessConfig message or plain object to encode + * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. + * @param message Tags message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAccessConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.ITags, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AccessConfig message from the specified reader or buffer. + * Decodes a Tags message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AccessConfig + * @returns Tags * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AccessConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Tags; /** - * Decodes an AccessConfig message from the specified reader or buffer, length delimited. + * Decodes a Tags message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AccessConfig + * @returns Tags * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AccessConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Tags; /** - * Verifies an AccessConfig message. + * Verifies a Tags message. * @param message Plain 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 AccessConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Tags message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AccessConfig + * @returns Tags */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AccessConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Tags; /** - * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. - * @param message AccessConfig + * Creates a plain object from a Tags message. Also converts values to other types if specified. + * @param message Tags * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.AccessConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.Tags, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AccessConfig to JSON. + * Converts this Tags to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AccessConfig + * Gets the default type url for Tags * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace AccessConfig { + /** Properties of an AttachedDisk. */ + interface IAttachedDisk { - /** AccessType enum. */ - enum AccessType { - ACCESS_TYPE_UNSPECIFIED = 0, - ONE_TO_ONE_NAT = 1, - DIRECT_IPV6 = 2 - } + /** AttachedDisk initializeParams */ + initializeParams?: (google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null); - /** NetworkTier enum. */ - enum NetworkTier { - NETWORK_TIER_UNSPECIFIED = 0, - PREMIUM = 1, - STANDARD = 2 - } - } + /** AttachedDisk deviceName */ + deviceName?: (string|null); - /** Properties of an AliasIpRange. */ - interface IAliasIpRange { + /** AttachedDisk kind */ + kind?: (string|null); - /** AliasIpRange ipCidrRange */ - ipCidrRange?: (string|null); + /** AttachedDisk diskTypeDeprecated */ + diskTypeDeprecated?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); - /** AliasIpRange subnetworkRangeName */ - subnetworkRangeName?: (string|null); + /** AttachedDisk mode */ + mode?: (google.cloud.backupdr.v1.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskMode|null); + + /** AttachedDisk source */ + source?: (string|null); + + /** AttachedDisk index */ + index?: (number|Long|string|null); + + /** AttachedDisk boot */ + boot?: (boolean|null); + + /** AttachedDisk autoDelete */ + autoDelete?: (boolean|null); + + /** AttachedDisk license */ + license?: (string[]|null); + + /** AttachedDisk diskInterface */ + diskInterface?: (google.cloud.backupdr.v1.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null); + + /** AttachedDisk guestOsFeature */ + guestOsFeature?: (google.cloud.backupdr.v1.IGuestOsFeature[]|null); + + /** AttachedDisk diskEncryptionKey */ + diskEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** AttachedDisk diskSizeGb */ + diskSizeGb?: (number|Long|string|null); + + /** AttachedDisk savedState */ + savedState?: (google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null); + + /** AttachedDisk diskType */ + diskType?: (string|null); + + /** AttachedDisk type */ + type?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); } - /** Represents an AliasIpRange. */ - class AliasIpRange implements IAliasIpRange { + /** Represents an AttachedDisk. */ + class AttachedDisk implements IAttachedDisk { /** - * Constructs a new AliasIpRange. + * Constructs a new AttachedDisk. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.backupdr.v1.IAliasIpRange); + constructor(properties?: google.cloud.backupdr.v1.IAttachedDisk); - /** AliasIpRange ipCidrRange. */ - public ipCidrRange?: (string|null); + /** AttachedDisk initializeParams. */ + public initializeParams?: (google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null); - /** AliasIpRange subnetworkRangeName. */ - public subnetworkRangeName?: (string|null); + /** AttachedDisk deviceName. */ + public deviceName?: (string|null); - /** AliasIpRange _ipCidrRange. */ - public _ipCidrRange?: "ipCidrRange"; + /** AttachedDisk kind. */ + public kind?: (string|null); - /** AliasIpRange _subnetworkRangeName. */ - public _subnetworkRangeName?: "subnetworkRangeName"; + /** AttachedDisk diskTypeDeprecated. */ + public diskTypeDeprecated?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); + + /** AttachedDisk mode. */ + public mode?: (google.cloud.backupdr.v1.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskMode|null); + + /** AttachedDisk source. */ + public source?: (string|null); + + /** AttachedDisk index. */ + public index?: (number|Long|string|null); + + /** AttachedDisk boot. */ + public boot?: (boolean|null); + + /** AttachedDisk autoDelete. */ + public autoDelete?: (boolean|null); + + /** AttachedDisk license. */ + public license: string[]; + + /** AttachedDisk diskInterface. */ + public diskInterface?: (google.cloud.backupdr.v1.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null); + + /** AttachedDisk guestOsFeature. */ + public guestOsFeature: google.cloud.backupdr.v1.IGuestOsFeature[]; + + /** AttachedDisk diskEncryptionKey. */ + public diskEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); + + /** AttachedDisk diskSizeGb. */ + public diskSizeGb?: (number|Long|string|null); + + /** AttachedDisk savedState. */ + public savedState?: (google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null); + + /** AttachedDisk diskType. */ + public diskType?: (string|null); + + /** AttachedDisk type. */ + public type?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); + + /** AttachedDisk _initializeParams. */ + public _initializeParams?: "initializeParams"; + + /** AttachedDisk _deviceName. */ + public _deviceName?: "deviceName"; + + /** AttachedDisk _kind. */ + public _kind?: "kind"; + + /** AttachedDisk _diskTypeDeprecated. */ + public _diskTypeDeprecated?: "diskTypeDeprecated"; + + /** AttachedDisk _mode. */ + public _mode?: "mode"; + + /** AttachedDisk _source. */ + public _source?: "source"; + + /** AttachedDisk _index. */ + public _index?: "index"; + + /** AttachedDisk _boot. */ + public _boot?: "boot"; + + /** AttachedDisk _autoDelete. */ + public _autoDelete?: "autoDelete"; + + /** AttachedDisk _diskInterface. */ + public _diskInterface?: "diskInterface"; + + /** AttachedDisk _diskEncryptionKey. */ + public _diskEncryptionKey?: "diskEncryptionKey"; + + /** AttachedDisk _diskSizeGb. */ + public _diskSizeGb?: "diskSizeGb"; + + /** AttachedDisk _savedState. */ + public _savedState?: "savedState"; + + /** AttachedDisk _diskType. */ + public _diskType?: "diskType"; + + /** AttachedDisk _type. */ + public _type?: "type"; /** - * Creates a new AliasIpRange instance using the specified properties. + * Creates a new AttachedDisk instance using the specified properties. * @param [properties] Properties to set - * @returns AliasIpRange instance + * @returns AttachedDisk instance */ - public static create(properties?: google.cloud.backupdr.v1.IAliasIpRange): google.cloud.backupdr.v1.AliasIpRange; + public static create(properties?: google.cloud.backupdr.v1.IAttachedDisk): google.cloud.backupdr.v1.AttachedDisk; /** - * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. - * @param message AliasIpRange message or plain object to encode + * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. + * @param message AttachedDisk message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. - * @param message AliasIpRange message or plain object to encode + * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. + * @param message AttachedDisk message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAliasIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AliasIpRange message from the specified reader or buffer. + * Decodes an AttachedDisk message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AliasIpRange + * @returns AttachedDisk * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AliasIpRange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AttachedDisk; /** - * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. + * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AliasIpRange + * @returns AttachedDisk * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AliasIpRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AttachedDisk; /** - * Verifies an AliasIpRange message. + * Verifies an AttachedDisk message. * @param message Plain 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 AliasIpRange message from a plain object. Also converts values to their respective internal types. + * Creates an AttachedDisk message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AliasIpRange + * @returns AttachedDisk */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AliasIpRange; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AttachedDisk; /** - * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. - * @param message AliasIpRange + * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. + * @param message AttachedDisk * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.AliasIpRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.AttachedDisk, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AliasIpRange to JSON. + * Converts this AttachedDisk to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for AliasIpRange + * Gets the default type url for AttachedDisk * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an InstanceParams. */ - interface IInstanceParams { - - /** InstanceParams resourceManagerTags */ - resourceManagerTags?: ({ [k: string]: string }|null); - } + namespace AttachedDisk { - /** Represents an InstanceParams. */ - class InstanceParams implements IInstanceParams { + /** Properties of an InitializeParams. */ + interface IInitializeParams { - /** - * Constructs a new InstanceParams. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IInstanceParams); + /** InitializeParams diskName */ + diskName?: (string|null); - /** InstanceParams resourceManagerTags. */ - public resourceManagerTags: { [k: string]: string }; + /** InitializeParams replicaZones */ + replicaZones?: (string[]|null); + } + + /** Represents an InitializeParams. */ + class InitializeParams implements IInitializeParams { + + /** + * Constructs a new InitializeParams. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams); + + /** InitializeParams diskName. */ + public diskName?: (string|null); + + /** InitializeParams replicaZones. */ + public replicaZones: string[]; + + /** InitializeParams _diskName. */ + public _diskName?: "diskName"; + + /** + * Creates a new InitializeParams instance using the specified properties. + * @param [properties] Properties to set + * @returns InitializeParams instance + */ + public static create(properties?: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Encodes the specified InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @param message InitializeParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @param message InitializeParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InitializeParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Decodes an InitializeParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Verifies an InitializeParams message. + * @param message Plain 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 InitializeParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InitializeParams + */ + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; + + /** + * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. + * @param message InitializeParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.backupdr.v1.AttachedDisk.InitializeParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InitializeParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InitializeParams + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** DiskType enum. */ + enum DiskType { + DISK_TYPE_UNSPECIFIED = 0, + SCRATCH = 1, + PERSISTENT = 2 + } + + /** DiskMode enum. */ + enum DiskMode { + DISK_MODE_UNSPECIFIED = 0, + READ_WRITE = 1, + READ_ONLY = 2, + LOCKED = 3 + } + + /** DiskInterface enum. */ + enum DiskInterface { + DISK_INTERFACE_UNSPECIFIED = 0, + SCSI = 1, + NVME = 2, + NVDIMM = 3, + ISCSI = 4 + } + + /** DiskSavedState enum. */ + enum DiskSavedState { + DISK_SAVED_STATE_UNSPECIFIED = 0, + PRESERVED = 1 + } + } + + /** Properties of a GuestOsFeature. */ + interface IGuestOsFeature { + + /** GuestOsFeature type */ + type?: (google.cloud.backupdr.v1.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null); + } + + /** Represents a GuestOsFeature. */ + class GuestOsFeature implements IGuestOsFeature { /** - * Creates a new InstanceParams instance using the specified properties. + * Constructs a new GuestOsFeature. * @param [properties] Properties to set - * @returns InstanceParams instance */ - public static create(properties?: google.cloud.backupdr.v1.IInstanceParams): google.cloud.backupdr.v1.InstanceParams; + constructor(properties?: google.cloud.backupdr.v1.IGuestOsFeature); + + /** GuestOsFeature type. */ + public type?: (google.cloud.backupdr.v1.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null); + + /** GuestOsFeature _type. */ + public _type?: "type"; /** - * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. - * @param message InstanceParams message or plain object to encode + * Creates a new GuestOsFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns GuestOsFeature instance + */ + public static create(properties?: google.cloud.backupdr.v1.IGuestOsFeature): google.cloud.backupdr.v1.GuestOsFeature; + + /** + * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @param message GuestOsFeature message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.backupdr.v1.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.backupdr.v1.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. - * @param message InstanceParams message or plain object to encode + * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @param message GuestOsFeature message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IInstanceParams, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.backupdr.v1.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an InstanceParams message from the specified reader or buffer. + * Decodes a GuestOsFeature message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns InstanceParams + * @returns GuestOsFeature * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.InstanceParams; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GuestOsFeature; /** - * Decodes an InstanceParams message from the specified reader or buffer, length delimited. + * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns InstanceParams + * @returns GuestOsFeature * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.InstanceParams; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GuestOsFeature; /** - * Verifies an InstanceParams message. + * Verifies a GuestOsFeature message. * @param message Plain 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 InstanceParams message from a plain object. Also converts values to their respective internal types. + * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns InstanceParams + * @returns GuestOsFeature */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.InstanceParams; + public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GuestOsFeature; /** - * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. - * @param message InstanceParams + * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. + * @param message GuestOsFeature * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.backupdr.v1.InstanceParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.backupdr.v1.GuestOsFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this InstanceParams to JSON. + * Converts this GuestOsFeature to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for InstanceParams + * Gets the default type url for GuestOsFeature * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an AllocationAffinity. */ - interface IAllocationAffinity { - - /** AllocationAffinity consumeAllocationType */ - consumeAllocationType?: (google.cloud.backupdr.v1.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1.AllocationAffinity.Type|null); + namespace GuestOsFeature { - /** AllocationAffinity key */ - key?: (string|null); + /** FeatureType enum. */ + enum FeatureType { + FEATURE_TYPE_UNSPECIFIED = 0, + VIRTIO_SCSI_MULTIQUEUE = 1, + WINDOWS = 2, + MULTI_IP_SUBNET = 3, + UEFI_COMPATIBLE = 4, + SECURE_BOOT = 5, + GVNIC = 6, + SEV_CAPABLE = 7, + BARE_METAL_LINUX_COMPATIBLE = 8, + SUSPEND_RESUME_COMPATIBLE = 9, + SEV_LIVE_MIGRATABLE = 10, + SEV_SNP_CAPABLE = 11, + TDX_CAPABLE = 12, + IDPF = 13, + SEV_LIVE_MIGRATABLE_V2 = 14 + } + } - /** AllocationAffinity values */ - values?: (string[]|null); + /** KeyRevocationActionType enum. */ + enum KeyRevocationActionType { + KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0, + NONE = 1, + STOP = 2 } + } + } + } - /** Represents an AllocationAffinity. */ - class AllocationAffinity implements IAllocationAffinity { + /** Namespace api. */ + namespace api { - /** - * Constructs a new AllocationAffinity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAllocationAffinity); + /** Properties of a Http. */ + interface IHttp { - /** AllocationAffinity consumeAllocationType. */ - public consumeAllocationType?: (google.cloud.backupdr.v1.AllocationAffinity.Type|keyof typeof google.cloud.backupdr.v1.AllocationAffinity.Type|null); + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); - /** AllocationAffinity key. */ - public key?: (string|null); + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } - /** AllocationAffinity values. */ - public values: string[]; + /** Represents a Http. */ + class Http implements IHttp { - /** AllocationAffinity _consumeAllocationType. */ - public _consumeAllocationType?: "consumeAllocationType"; + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); - /** AllocationAffinity _key. */ - public _key?: "key"; + /** Http rules. */ + public rules: google.api.IHttpRule[]; - /** - * Creates a new AllocationAffinity instance using the specified properties. - * @param [properties] Properties to set - * @returns AllocationAffinity instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAllocationAffinity): google.cloud.backupdr.v1.AllocationAffinity; + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; - /** - * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. - * @param message AllocationAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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 AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. - * @param message AllocationAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAllocationAffinity, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes an AllocationAffinity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AllocationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AllocationAffinity; + /** + * 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 an AllocationAffinity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AllocationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AllocationAffinity; + /** + * 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; - /** - * Verifies an AllocationAffinity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * 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; - /** - * Creates an AllocationAffinity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AllocationAffinity - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AllocationAffinity; + /** + * 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 plain object from an AllocationAffinity message. Also converts values to other types if specified. - * @param message AllocationAffinity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AllocationAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this AllocationAffinity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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 }; - /** - * Gets the default type url for AllocationAffinity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - namespace AllocationAffinity { + /** + * 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; + } - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - NO_RESERVATION = 1, - ANY_RESERVATION = 2, - SPECIFIC_RESERVATION = 3 - } - } + /** Properties of a HttpRule. */ + interface IHttpRule { - /** Properties of a Scheduling. */ - interface IScheduling { + /** HttpRule selector */ + selector?: (string|null); - /** Scheduling onHostMaintenance */ - onHostMaintenance?: (google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null); + /** HttpRule get */ + get?: (string|null); - /** Scheduling automaticRestart */ - automaticRestart?: (boolean|null); + /** HttpRule put */ + put?: (string|null); - /** Scheduling preemptible */ - preemptible?: (boolean|null); + /** HttpRule post */ + post?: (string|null); - /** Scheduling nodeAffinities */ - nodeAffinities?: (google.cloud.backupdr.v1.Scheduling.INodeAffinity[]|null); + /** HttpRule delete */ + "delete"?: (string|null); - /** Scheduling minNodeCpus */ - minNodeCpus?: (number|null); + /** HttpRule patch */ + patch?: (string|null); - /** Scheduling provisioningModel */ - provisioningModel?: (google.cloud.backupdr.v1.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null); + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); - /** Scheduling instanceTerminationAction */ - instanceTerminationAction?: (google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null); + /** HttpRule body */ + body?: (string|null); - /** Scheduling localSsdRecoveryTimeout */ - localSsdRecoveryTimeout?: (google.cloud.backupdr.v1.ISchedulingDuration|null); - } + /** HttpRule responseBody */ + responseBody?: (string|null); - /** Represents a Scheduling. */ - class Scheduling implements IScheduling { + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } - /** - * Constructs a new Scheduling. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IScheduling); + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { - /** Scheduling onHostMaintenance. */ - public onHostMaintenance?: (google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|keyof typeof google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null); + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); - /** Scheduling automaticRestart. */ - public automaticRestart?: (boolean|null); + /** HttpRule selector. */ + public selector: string; - /** Scheduling preemptible. */ - public preemptible?: (boolean|null); + /** HttpRule get. */ + public get?: (string|null); - /** Scheduling nodeAffinities. */ - public nodeAffinities: google.cloud.backupdr.v1.Scheduling.INodeAffinity[]; + /** HttpRule put. */ + public put?: (string|null); - /** Scheduling minNodeCpus. */ - public minNodeCpus?: (number|null); + /** HttpRule post. */ + public post?: (string|null); - /** Scheduling provisioningModel. */ - public provisioningModel?: (google.cloud.backupdr.v1.Scheduling.ProvisioningModel|keyof typeof google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null); + /** HttpRule delete. */ + public delete?: (string|null); - /** Scheduling instanceTerminationAction. */ - public instanceTerminationAction?: (google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|keyof typeof google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null); + /** HttpRule patch. */ + public patch?: (string|null); - /** Scheduling localSsdRecoveryTimeout. */ - public localSsdRecoveryTimeout?: (google.cloud.backupdr.v1.ISchedulingDuration|null); + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); - /** Scheduling _onHostMaintenance. */ - public _onHostMaintenance?: "onHostMaintenance"; + /** HttpRule body. */ + public body: string; - /** Scheduling _automaticRestart. */ - public _automaticRestart?: "automaticRestart"; - - /** Scheduling _preemptible. */ - public _preemptible?: "preemptible"; - - /** Scheduling _minNodeCpus. */ - public _minNodeCpus?: "minNodeCpus"; - - /** Scheduling _provisioningModel. */ - public _provisioningModel?: "provisioningModel"; - - /** Scheduling _instanceTerminationAction. */ - public _instanceTerminationAction?: "instanceTerminationAction"; - - /** Scheduling _localSsdRecoveryTimeout. */ - public _localSsdRecoveryTimeout?: "localSsdRecoveryTimeout"; - - /** - * Creates a new Scheduling instance using the specified properties. - * @param [properties] Properties to set - * @returns Scheduling instance - */ - public static create(properties?: google.cloud.backupdr.v1.IScheduling): google.cloud.backupdr.v1.Scheduling; - - /** - * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. - * @param message Scheduling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. - * @param message Scheduling message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IScheduling, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Scheduling message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Scheduling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Scheduling; - - /** - * Decodes a Scheduling message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Scheduling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Scheduling; - - /** - * Verifies a Scheduling message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Scheduling - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Scheduling; - - /** - * Creates a plain object from a Scheduling message. Also converts values to other types if specified. - * @param message Scheduling - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Scheduling, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Scheduling to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Scheduling - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Scheduling { - - /** OnHostMaintenance enum. */ - enum OnHostMaintenance { - ON_HOST_MAINTENANCE_UNSPECIFIED = 0, - TERMINATE = 1, - MIGRATE = 1000 - } - - /** Properties of a NodeAffinity. */ - interface INodeAffinity { - - /** NodeAffinity key */ - key?: (string|null); - - /** NodeAffinity operator */ - operator?: (google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null); - - /** NodeAffinity values */ - values?: (string[]|null); - } - - /** Represents a NodeAffinity. */ - class NodeAffinity implements INodeAffinity { - - /** - * Constructs a new NodeAffinity. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.Scheduling.INodeAffinity); - - /** NodeAffinity key. */ - public key?: (string|null); - - /** NodeAffinity operator. */ - public operator?: (google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|keyof typeof google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null); - - /** NodeAffinity values. */ - public values: string[]; - - /** NodeAffinity _key. */ - public _key?: "key"; - - /** NodeAffinity _operator. */ - public _operator?: "operator"; - - /** - * Creates a new NodeAffinity instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeAffinity instance - */ - public static create(properties?: google.cloud.backupdr.v1.Scheduling.INodeAffinity): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - - /** - * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. - * @param message NodeAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. - * @param message NodeAffinity message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.Scheduling.INodeAffinity, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - - /** - * Verifies a NodeAffinity message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeAffinity - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Scheduling.NodeAffinity; - - /** - * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. - * @param message NodeAffinity - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Scheduling.NodeAffinity, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeAffinity to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeAffinity - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NodeAffinity { - - /** Operator enum. */ - enum Operator { - OPERATOR_UNSPECIFIED = 0, - IN = 1, - NOT_IN = 2 - } - } - - /** ProvisioningModel enum. */ - enum ProvisioningModel { - PROVISIONING_MODEL_UNSPECIFIED = 0, - STANDARD = 1, - SPOT = 2 - } - - /** InstanceTerminationAction enum. */ - enum InstanceTerminationAction { - INSTANCE_TERMINATION_ACTION_UNSPECIFIED = 0, - DELETE = 1, - STOP = 2 - } - } - - /** Properties of a SchedulingDuration. */ - interface ISchedulingDuration { - - /** SchedulingDuration seconds */ - seconds?: (number|Long|string|null); - - /** SchedulingDuration nanos */ - nanos?: (number|null); - } - - /** Represents a SchedulingDuration. */ - class SchedulingDuration implements ISchedulingDuration { - - /** - * Constructs a new SchedulingDuration. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ISchedulingDuration); - - /** SchedulingDuration seconds. */ - public seconds?: (number|Long|string|null); - - /** SchedulingDuration nanos. */ - public nanos?: (number|null); - - /** SchedulingDuration _seconds. */ - public _seconds?: "seconds"; - - /** SchedulingDuration _nanos. */ - public _nanos?: "nanos"; - - /** - * Creates a new SchedulingDuration instance using the specified properties. - * @param [properties] Properties to set - * @returns SchedulingDuration instance - */ - public static create(properties?: google.cloud.backupdr.v1.ISchedulingDuration): google.cloud.backupdr.v1.SchedulingDuration; - - /** - * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. - * @param message SchedulingDuration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. - * @param message SchedulingDuration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ISchedulingDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SchedulingDuration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SchedulingDuration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.SchedulingDuration; - - /** - * Decodes a SchedulingDuration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SchedulingDuration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.SchedulingDuration; - - /** - * Verifies a SchedulingDuration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SchedulingDuration - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.SchedulingDuration; - - /** - * Creates a plain object from a SchedulingDuration message. Also converts values to other types if specified. - * @param message SchedulingDuration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.SchedulingDuration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SchedulingDuration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SchedulingDuration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceAccount. */ - interface IServiceAccount { - - /** ServiceAccount email */ - email?: (string|null); - - /** ServiceAccount scopes */ - scopes?: (string[]|null); - } - - /** Represents a ServiceAccount. */ - class ServiceAccount implements IServiceAccount { - - /** - * Constructs a new ServiceAccount. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IServiceAccount); - - /** ServiceAccount email. */ - public email?: (string|null); - - /** ServiceAccount scopes. */ - public scopes: string[]; - - /** ServiceAccount _email. */ - public _email?: "email"; - - /** - * Creates a new ServiceAccount instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceAccount instance - */ - public static create(properties?: google.cloud.backupdr.v1.IServiceAccount): google.cloud.backupdr.v1.ServiceAccount; - - /** - * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. - * @param message ServiceAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. - * @param message ServiceAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IServiceAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.ServiceAccount; - - /** - * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.ServiceAccount; - - /** - * Verifies a ServiceAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceAccount - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.ServiceAccount; - - /** - * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. - * @param message ServiceAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.ServiceAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceAccount - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Tags. */ - interface ITags { - - /** Tags items */ - items?: (string[]|null); - } - - /** Represents a Tags. */ - class Tags implements ITags { - - /** - * Constructs a new Tags. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.ITags); - - /** Tags items. */ - public items: string[]; - - /** - * Creates a new Tags instance using the specified properties. - * @param [properties] Properties to set - * @returns Tags instance - */ - public static create(properties?: google.cloud.backupdr.v1.ITags): google.cloud.backupdr.v1.Tags; - - /** - * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. - * @param message Tags message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.ITags, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. - * @param message Tags message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.ITags, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Tags message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Tags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.Tags; - - /** - * Decodes a Tags message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Tags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.Tags; - - /** - * Verifies a Tags message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Tags message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Tags - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.Tags; - - /** - * Creates a plain object from a Tags message. Also converts values to other types if specified. - * @param message Tags - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.Tags, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Tags to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Tags - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AttachedDisk. */ - interface IAttachedDisk { - - /** AttachedDisk initializeParams */ - initializeParams?: (google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null); - - /** AttachedDisk deviceName */ - deviceName?: (string|null); - - /** AttachedDisk kind */ - kind?: (string|null); - - /** AttachedDisk diskTypeDeprecated */ - diskTypeDeprecated?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); - - /** AttachedDisk mode */ - mode?: (google.cloud.backupdr.v1.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskMode|null); - - /** AttachedDisk source */ - source?: (string|null); - - /** AttachedDisk index */ - index?: (number|Long|string|null); - - /** AttachedDisk boot */ - boot?: (boolean|null); - - /** AttachedDisk autoDelete */ - autoDelete?: (boolean|null); - - /** AttachedDisk license */ - license?: (string[]|null); - - /** AttachedDisk diskInterface */ - diskInterface?: (google.cloud.backupdr.v1.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null); - - /** AttachedDisk guestOsFeature */ - guestOsFeature?: (google.cloud.backupdr.v1.IGuestOsFeature[]|null); - - /** AttachedDisk diskEncryptionKey */ - diskEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); - - /** AttachedDisk diskSizeGb */ - diskSizeGb?: (number|Long|string|null); - - /** AttachedDisk savedState */ - savedState?: (google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null); - - /** AttachedDisk diskType */ - diskType?: (string|null); - - /** AttachedDisk type */ - type?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); - } - - /** Represents an AttachedDisk. */ - class AttachedDisk implements IAttachedDisk { - - /** - * Constructs a new AttachedDisk. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IAttachedDisk); - - /** AttachedDisk initializeParams. */ - public initializeParams?: (google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null); - - /** AttachedDisk deviceName. */ - public deviceName?: (string|null); - - /** AttachedDisk kind. */ - public kind?: (string|null); - - /** AttachedDisk diskTypeDeprecated. */ - public diskTypeDeprecated?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); - - /** AttachedDisk mode. */ - public mode?: (google.cloud.backupdr.v1.AttachedDisk.DiskMode|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskMode|null); - - /** AttachedDisk source. */ - public source?: (string|null); - - /** AttachedDisk index. */ - public index?: (number|Long|string|null); - - /** AttachedDisk boot. */ - public boot?: (boolean|null); - - /** AttachedDisk autoDelete. */ - public autoDelete?: (boolean|null); - - /** AttachedDisk license. */ - public license: string[]; - - /** AttachedDisk diskInterface. */ - public diskInterface?: (google.cloud.backupdr.v1.AttachedDisk.DiskInterface|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null); - - /** AttachedDisk guestOsFeature. */ - public guestOsFeature: google.cloud.backupdr.v1.IGuestOsFeature[]; - - /** AttachedDisk diskEncryptionKey. */ - public diskEncryptionKey?: (google.cloud.backupdr.v1.ICustomerEncryptionKey|null); - - /** AttachedDisk diskSizeGb. */ - public diskSizeGb?: (number|Long|string|null); - - /** AttachedDisk savedState. */ - public savedState?: (google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null); - - /** AttachedDisk diskType. */ - public diskType?: (string|null); - - /** AttachedDisk type. */ - public type?: (google.cloud.backupdr.v1.AttachedDisk.DiskType|keyof typeof google.cloud.backupdr.v1.AttachedDisk.DiskType|null); - - /** AttachedDisk _initializeParams. */ - public _initializeParams?: "initializeParams"; - - /** AttachedDisk _deviceName. */ - public _deviceName?: "deviceName"; - - /** AttachedDisk _kind. */ - public _kind?: "kind"; - - /** AttachedDisk _diskTypeDeprecated. */ - public _diskTypeDeprecated?: "diskTypeDeprecated"; - - /** AttachedDisk _mode. */ - public _mode?: "mode"; - - /** AttachedDisk _source. */ - public _source?: "source"; - - /** AttachedDisk _index. */ - public _index?: "index"; - - /** AttachedDisk _boot. */ - public _boot?: "boot"; - - /** AttachedDisk _autoDelete. */ - public _autoDelete?: "autoDelete"; - - /** AttachedDisk _diskInterface. */ - public _diskInterface?: "diskInterface"; - - /** AttachedDisk _diskEncryptionKey. */ - public _diskEncryptionKey?: "diskEncryptionKey"; - - /** AttachedDisk _diskSizeGb. */ - public _diskSizeGb?: "diskSizeGb"; - - /** AttachedDisk _savedState. */ - public _savedState?: "savedState"; - - /** AttachedDisk _diskType. */ - public _diskType?: "diskType"; - - /** AttachedDisk _type. */ - public _type?: "type"; - - /** - * Creates a new AttachedDisk instance using the specified properties. - * @param [properties] Properties to set - * @returns AttachedDisk instance - */ - public static create(properties?: google.cloud.backupdr.v1.IAttachedDisk): google.cloud.backupdr.v1.AttachedDisk; - - /** - * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. - * @param message AttachedDisk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. - * @param message AttachedDisk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IAttachedDisk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AttachedDisk message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AttachedDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AttachedDisk; - - /** - * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AttachedDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AttachedDisk; - - /** - * Verifies an AttachedDisk message. - * @param message Plain 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 AttachedDisk message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AttachedDisk - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AttachedDisk; - - /** - * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. - * @param message AttachedDisk - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AttachedDisk, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AttachedDisk to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AttachedDisk - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AttachedDisk { - - /** Properties of an InitializeParams. */ - interface IInitializeParams { - - /** InitializeParams diskName */ - diskName?: (string|null); - - /** InitializeParams replicaZones */ - replicaZones?: (string[]|null); - } - - /** Represents an InitializeParams. */ - class InitializeParams implements IInitializeParams { - - /** - * Constructs a new InitializeParams. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams); - - /** InitializeParams diskName. */ - public diskName?: (string|null); - - /** InitializeParams replicaZones. */ - public replicaZones: string[]; - - /** InitializeParams _diskName. */ - public _diskName?: "diskName"; - - /** - * Creates a new InitializeParams instance using the specified properties. - * @param [properties] Properties to set - * @returns InitializeParams instance - */ - public static create(properties?: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; - - /** - * Encodes the specified InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. - * @param message InitializeParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. - * @param message InitializeParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.AttachedDisk.IInitializeParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InitializeParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InitializeParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; - - /** - * Decodes an InitializeParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InitializeParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; - - /** - * Verifies an InitializeParams message. - * @param message Plain 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 InitializeParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InitializeParams - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.AttachedDisk.InitializeParams; - - /** - * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. - * @param message InitializeParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.AttachedDisk.InitializeParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InitializeParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InitializeParams - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** DiskType enum. */ - enum DiskType { - DISK_TYPE_UNSPECIFIED = 0, - SCRATCH = 1, - PERSISTENT = 2 - } - - /** DiskMode enum. */ - enum DiskMode { - DISK_MODE_UNSPECIFIED = 0, - READ_WRITE = 1, - READ_ONLY = 2, - LOCKED = 3 - } - - /** DiskInterface enum. */ - enum DiskInterface { - DISK_INTERFACE_UNSPECIFIED = 0, - SCSI = 1, - NVME = 2, - NVDIMM = 3, - ISCSI = 4 - } - - /** DiskSavedState enum. */ - enum DiskSavedState { - DISK_SAVED_STATE_UNSPECIFIED = 0, - PRESERVED = 1 - } - } - - /** Properties of a GuestOsFeature. */ - interface IGuestOsFeature { - - /** GuestOsFeature type */ - type?: (google.cloud.backupdr.v1.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null); - } - - /** Represents a GuestOsFeature. */ - class GuestOsFeature implements IGuestOsFeature { - - /** - * Constructs a new GuestOsFeature. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.backupdr.v1.IGuestOsFeature); - - /** GuestOsFeature type. */ - public type?: (google.cloud.backupdr.v1.GuestOsFeature.FeatureType|keyof typeof google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null); - - /** GuestOsFeature _type. */ - public _type?: "type"; - - /** - * Creates a new GuestOsFeature instance using the specified properties. - * @param [properties] Properties to set - * @returns GuestOsFeature instance - */ - public static create(properties?: google.cloud.backupdr.v1.IGuestOsFeature): google.cloud.backupdr.v1.GuestOsFeature; - - /** - * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. - * @param message GuestOsFeature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.backupdr.v1.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. - * @param message GuestOsFeature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.backupdr.v1.IGuestOsFeature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GuestOsFeature message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GuestOsFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.backupdr.v1.GuestOsFeature; - - /** - * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GuestOsFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.backupdr.v1.GuestOsFeature; - - /** - * Verifies a GuestOsFeature message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GuestOsFeature - */ - public static fromObject(object: { [k: string]: any }): google.cloud.backupdr.v1.GuestOsFeature; - - /** - * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. - * @param message GuestOsFeature - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.backupdr.v1.GuestOsFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GuestOsFeature to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GuestOsFeature - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GuestOsFeature { - - /** FeatureType enum. */ - enum FeatureType { - FEATURE_TYPE_UNSPECIFIED = 0, - VIRTIO_SCSI_MULTIQUEUE = 1, - WINDOWS = 2, - MULTI_IP_SUBNET = 3, - UEFI_COMPATIBLE = 4, - SECURE_BOOT = 5, - GVNIC = 6, - SEV_CAPABLE = 7, - BARE_METAL_LINUX_COMPATIBLE = 8, - SUSPEND_RESUME_COMPATIBLE = 9, - SEV_LIVE_MIGRATABLE = 10, - SEV_SNP_CAPABLE = 11, - TDX_CAPABLE = 12, - IDPF = 13, - SEV_LIVE_MIGRATABLE_V2 = 14 - } - } - - /** KeyRevocationActionType enum. */ - enum KeyRevocationActionType { - KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED = 0, - NONE = 1, - STOP = 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); - } - - /** 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; - - /** - * 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 FieldInfo. */ - interface IFieldInfo { - - /** FieldInfo format */ - format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); - } - - /** Represents a FieldInfo. */ - class FieldInfo implements IFieldInfo { - - /** - * Constructs a new FieldInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IFieldInfo); - - /** FieldInfo format. */ - public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); - - /** - * Creates a new FieldInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldInfo instance - */ - public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; - - /** - * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @param message FieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. - * @param message FieldInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldInfo - * @throws {Error} If the payload is not 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.FieldInfo; - - /** - * Decodes a FieldInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldInfo - * @throws {Error} If the payload 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.FieldInfo; - - /** - * Verifies a FieldInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldInfo - */ - public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; - - /** - * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. - * @param message FieldInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldInfo { - - /** Format enum. */ - enum Format { - FORMAT_UNSPECIFIED = 0, - UUID4 = 1, - IPV4 = 2, - IPV6 = 3, - IPV4_OR_IPV6 = 4 - } - } - - /** 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; + /** HttpRule responseBody. */ + public responseBody: string; - /** ResourceDescriptor singular. */ - public singular: string; + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new HttpRule instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceDescriptor instance + * @returns HttpRule instance */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * 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.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IHttpRule, 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 + * 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.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * 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 ResourceDescriptor + * @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.ResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor + * @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.ResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; /** - * Verifies a ResourceDescriptor message. + * 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceDescriptor + * @returns HttpRule */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor + * 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.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this HttpRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResourceDescriptor + * 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; } - 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 { + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { - /** ResourceReference type */ - type?: (string|null); + /** CustomHttpPattern kind */ + kind?: (string|null); - /** ResourceReference childType */ - childType?: (string|null); + /** CustomHttpPattern path */ + path?: (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; + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { /** - * Creates a new ResourceReference instance using the specified properties. + * Constructs a new CustomHttpPattern. * @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 { + constructor(properties?: google.api.ICustomHttpPattern); - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); + /** CustomHttpPattern kind. */ + public kind: string; - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; + /** CustomHttpPattern path. */ + public path: string; /** - * Creates a new FileDescriptorSet instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @param [properties] Properties to set - * @returns FileDescriptorSet instance + * @returns CustomHttpPattern instance */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode + * 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.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ICustomHttpPattern, 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 + * 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.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. + * 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 FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; /** - * Verifies a FileDescriptorSet message. + * 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileDescriptorSet + * @returns CustomHttpPattern */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet + * 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.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileDescriptorSet to JSON. + * Converts this CustomHttpPattern to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FileDescriptorSet + * 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; } - /** 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); + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { - /** FileDescriptorProto syntax */ - syntax?: (string|null); + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); } - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { /** - * Constructs a new FileDescriptorProto. + * Constructs a new CommonLanguageSettings. * @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); + constructor(properties?: google.api.ICommonLanguageSettings); - /** FileDescriptorProto syntax. */ - public syntax: string; + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; /** - * Creates a new FileDescriptorProto instance using the specified properties. + * Creates a new CommonLanguageSettings instance using the specified properties. * @param [properties] Properties to set - * @returns FileDescriptorProto instance + * @returns CommonLanguageSettings instance */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode + * 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.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ICommonLanguageSettings, 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 + * 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.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. + * 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 FileDescriptorProto + * @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.protobuf.FileDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto + * @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.protobuf.FileDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; /** - * Verifies a FileDescriptorProto message. + * 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileDescriptorProto + * @returns CommonLanguageSettings */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto + * 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.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileDescriptorProto to JSON. + * Converts this CommonLanguageSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FileDescriptorProto + * 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 DescriptorProto. */ - interface IDescriptorProto { + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { - /** DescriptorProto name */ - name?: (string|null); + /** ClientLibrarySettings version */ + version?: (string|null); - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); } - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { /** - * Constructs a new DescriptorProto. + * Constructs a new ClientLibrarySettings. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDescriptorProto); + constructor(properties?: google.api.IClientLibrarySettings); - /** DescriptorProto name. */ - public name: string; + /** ClientLibrarySettings version. */ + public version: string; - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); - /** DescriptorProto reservedName. */ - public reservedName: string[]; + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); /** - * Creates a new DescriptorProto instance using the specified properties. + * Creates a new ClientLibrarySettings instance using the specified properties. * @param [properties] Properties to set - * @returns DescriptorProto instance + * @returns ClientLibrarySettings instance */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode + * 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.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IClientLibrarySettings, 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 + * 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.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DescriptorProto message from the specified reader or buffer. + * 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 DescriptorProto + * @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.protobuf.DescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; /** - * Verifies a DescriptorProto message. + * 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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DescriptorProto + * @returns ClientLibrarySettings */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto + * 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.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DescriptorProto to JSON. + * Converts this ClientLibrarySettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DescriptorProto + * 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; } - namespace DescriptorProto { + /** Properties of a Publishing. */ + interface IPublishing { - /** Properties of an ExtensionRange. */ - interface IExtensionRange { + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); - /** ExtensionRange start */ - start?: (number|null); + /** Publishing newIssueUri */ + newIssueUri?: (string|null); - /** ExtensionRange end */ - end?: (number|null); + /** Publishing documentationUri */ + documentationUri?: (string|null); - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } + /** Publishing apiShortName */ + apiShortName?: (string|null); - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { + /** Publishing githubLabel */ + githubLabel?: (string|null); - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); - /** ExtensionRange start. */ - public start: number; + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); - /** ExtensionRange end. */ - public end: number; + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|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; + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + } - /** - * 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; + /** Represents a Publishing. */ + class Publishing implements IPublishing { - /** - * 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; + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); - /** - * 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; + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; - /** - * 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; + /** Publishing newIssueUri. */ + public newIssueUri: string; - /** - * 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); + /** Publishing documentationUri. */ + public documentationUri: string; - /** - * 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; + /** Publishing apiShortName. */ + public apiShortName: string; - /** - * 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 }; + /** Publishing githubLabel. */ + public githubLabel: string; - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** 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; + + /** + * 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; - /** - * 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; - } + /** + * 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; - /** Properties of a ReservedRange. */ - interface IReservedRange { + /** + * 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; - /** ReservedRange start */ - start?: (number|null); + /** + * 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); - /** ReservedRange end */ - end?: (number|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; - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { + /** + * 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 }; - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ReservedRange start. */ - public start: number; + /** + * 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; + } - /** ReservedRange end. */ - public end: number; + /** Properties of a JavaSettings. */ + interface IJavaSettings { - /** - * 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; + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); - /** - * 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; + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); - /** - * 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; + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } - /** - * 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; + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { - /** - * 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; + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); - /** - * 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); + /** JavaSettings libraryPackage. */ + public libraryPackage: string; - /** - * 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; + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; - /** - * 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 }; + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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; - /** - * 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; - } - } + /** + * 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; - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { + /** + * 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; - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * 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; - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + /** + * 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; - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** + * 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); - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|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; - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { + /** + * 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 }; /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set + * Converts this JavaSettings to JSON. + * @returns JSON object */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); + public toJSON(): { [k: string]: any }; - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * 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; + } - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + /** + * 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 ExtensionRangeOptions instance using the specified properties. + * Creates a new CppSettings instance using the specified properties. * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance + * @returns CppSettings instance */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode + * 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.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ICppSettings, 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 + * 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.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * 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 ExtensionRangeOptions + * @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.protobuf.ExtensionRangeOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * Decodes a CppSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions + * @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.protobuf.ExtensionRangeOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; /** - * Verifies an ExtensionRangeOptions message. + * 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 an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ExtensionRangeOptions + * @returns CppSettings */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions + * 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.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ExtensionRangeOptions to JSON. + * Converts this CppSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ExtensionRangeOptions + * 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; } - 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; + /** Properties of a PhpSettings. */ + interface IPhpSettings { - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } - /** FieldDescriptorProto jsonName. */ - public jsonName: string; + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); /** - * Creates a new FieldDescriptorProto instance using the specified properties. + * Creates a new PhpSettings instance using the specified properties. * @param [properties] Properties to set - * @returns FieldDescriptorProto instance + * @returns PhpSettings instance */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode + * 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.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IPhpSettings, 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 + * 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.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * 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 FieldDescriptorProto + * @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.protobuf.FieldDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto + * @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.protobuf.FieldDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; /** - * Verifies a FieldDescriptorProto message. + * 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldDescriptorProto + * @returns PhpSettings */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto + * 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.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldDescriptorProto to JSON. + * Converts this PhpSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FieldDescriptorProto + * 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; } - 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); + /** Properties of a PythonSettings. */ + interface IPythonSettings { - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); } - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { /** - * Constructs a new OneofDescriptorProto. + * Constructs a new PythonSettings. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; + constructor(properties?: google.api.IPythonSettings); - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); /** - * Creates a new OneofDescriptorProto instance using the specified properties. + * Creates a new PythonSettings instance using the specified properties. * @param [properties] Properties to set - * @returns OneofDescriptorProto instance + * @returns PythonSettings instance */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode + * 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.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IPythonSettings, 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 + * 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.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * 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 OneofDescriptorProto + * @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.protobuf.OneofDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto + * @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.protobuf.OneofDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; /** - * Verifies an OneofDescriptorProto message. + * 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 an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OneofDescriptorProto + * @returns PythonSettings */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto + * 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.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OneofDescriptorProto to JSON. + * Converts this PythonSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OneofDescriptorProto + * 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 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); + /** Properties of a NodeSettings. */ + interface INodeSettings { - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); } - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { /** - * Constructs a new EnumDescriptorProto. + * Constructs a new NodeSettings. * @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[]; + constructor(properties?: google.api.INodeSettings); - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); /** - * Creates a new EnumDescriptorProto instance using the specified properties. + * Creates a new NodeSettings instance using the specified properties. * @param [properties] Properties to set - * @returns EnumDescriptorProto instance + * @returns NodeSettings instance */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode + * 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.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.INodeSettings, 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 + * 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.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * 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 EnumDescriptorProto + * @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.protobuf.EnumDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto + * @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.protobuf.EnumDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; /** - * Verifies an EnumDescriptorProto message. + * 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 an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumDescriptorProto + * @returns NodeSettings */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto + * 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.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumDescriptorProto to JSON. + * Converts this NodeSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumDescriptorProto + * 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; } - 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 }; + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); - /** - * 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; - } - } + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); - /** EnumValueDescriptorProto name */ - name?: (string|null); + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); - /** EnumValueDescriptorProto number */ - number?: (number|null); + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); } - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { /** - * Constructs a new EnumValueDescriptorProto. + * Constructs a new DotnetSettings. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + constructor(properties?: google.api.IDotnetSettings); - /** EnumValueDescriptorProto name. */ - public name: string; + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); - /** EnumValueDescriptorProto number. */ - public number: number; + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); + /** 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 EnumValueDescriptorProto instance using the specified properties. + * Creates a new DotnetSettings instance using the specified properties. * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance + * @returns DotnetSettings instance */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode + * 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.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IDotnetSettings, 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 + * 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.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * 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 EnumValueDescriptorProto + * @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.protobuf.EnumValueDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto + * @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.protobuf.EnumValueDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; /** - * Verifies an EnumValueDescriptorProto message. + * 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 an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumValueDescriptorProto + * @returns DotnetSettings */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto + * 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.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumValueDescriptorProto to JSON. + * Converts this DotnetSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumValueDescriptorProto + * 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 ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); + /** Properties of a RubySettings. */ + interface IRubySettings { - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); } - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { /** - * Constructs a new ServiceDescriptorProto. + * Constructs a new RubySettings. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; + constructor(properties?: google.api.IRubySettings); - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); /** - * Creates a new ServiceDescriptorProto instance using the specified properties. + * Creates a new RubySettings instance using the specified properties. * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance + * @returns RubySettings instance */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode + * 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.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IRubySettings, 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 + * 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.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * 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 ServiceDescriptorProto + * @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.protobuf.ServiceDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a RubySettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto + * @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.protobuf.ServiceDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; /** - * Verifies a ServiceDescriptorProto message. + * 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ServiceDescriptorProto + * @returns RubySettings */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto + * 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.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ServiceDescriptorProto to JSON. + * Converts this RubySettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ServiceDescriptorProto + * 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 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); + /** Properties of a GoSettings. */ + interface IGoSettings { - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); } - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { /** - * Constructs a new MethodDescriptorProto. + * Constructs a new GoSettings. * @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; + constructor(properties?: google.api.IGoSettings); - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); /** - * Creates a new MethodDescriptorProto instance using the specified properties. + * Creates a new GoSettings instance using the specified properties. * @param [properties] Properties to set - * @returns MethodDescriptorProto instance + * @returns GoSettings instance */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode + * 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.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IGoSettings, 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 + * 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.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * 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 MethodDescriptorProto + * @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.protobuf.MethodDescriptorProto; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a GoSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto + * @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.protobuf.MethodDescriptorProto; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; /** - * Verifies a MethodDescriptorProto message. + * 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodDescriptorProto + * @returns GoSettings */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto + * 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.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; + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileOptions deprecated. */ - public deprecated: boolean; + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; + /** + * 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; + } - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; + /** Properties of a MethodSettings. */ + interface IMethodSettings { - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; + /** MethodSettings selector */ + selector?: (string|null); - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } - /** FileOptions phpNamespace. */ - public phpNamespace: string; + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); - /** FileOptions rubyPackage. */ - public rubyPackage: string; + /** MethodSettings selector. */ + public selector: string; - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; /** - * Creates a new FileOptions instance using the specified properties. + * Creates a new MethodSettings instance using the specified properties. * @param [properties] Properties to set - * @returns FileOptions instance + * @returns MethodSettings instance */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode + * 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.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMethodSettings, 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 + * 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.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FileOptions message from the specified reader or buffer. + * 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 FileOptions + * @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.protobuf.FileOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FileOptions + * @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.protobuf.FileOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; /** - * Verifies a FileOptions message. + * 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 FileOptions message from a plain object. Also converts values to their respective internal types. + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileOptions + * @returns MethodSettings */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions + * 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.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileOptions to JSON. + * Converts this MethodSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FileOptions + * 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 FileOptions { + namespace MethodSettings { - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 + /** 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); } - } - /** Properties of a MessageOptions. */ - interface IMessageOptions { + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); - /** MessageOptions deprecated */ - deprecated?: (boolean|null); + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|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 + } - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** 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 + } - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Properties of a FieldInfo. */ + interface IFieldInfo { - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); + /** FieldInfo format */ + format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); } - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { + /** Represents a FieldInfo. */ + class FieldInfo implements IFieldInfo { /** - * Constructs a new MessageOptions. + * Constructs a new FieldInfo. * @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); + constructor(properties?: google.api.IFieldInfo); - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** FieldInfo format. */ + public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); /** - * Creates a new MessageOptions instance using the specified properties. + * Creates a new FieldInfo instance using the specified properties. * @param [properties] Properties to set - * @returns MessageOptions instance + * @returns FieldInfo instance */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo 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; + public static encode(message: google.api.IFieldInfo, 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 + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo 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; + public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MessageOptions message from the specified reader or buffer. + * Decodes a FieldInfo message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MessageOptions + * @returns FieldInfo * @throws {Error} If the payload is not 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; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.FieldInfo; /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MessageOptions + * @returns FieldInfo * @throws {Error} If the payload 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; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.FieldInfo; /** - * Verifies a MessageOptions message. + * Verifies a FieldInfo message. * @param message Plain object 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. + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MessageOptions + * @returns FieldInfo */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @param message FieldInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MessageOptions to JSON. + * Converts this FieldInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MessageOptions + * Gets the default type url for FieldInfo * @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); + namespace FieldInfo { - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + UUID4 = 1, + IPV4 = 2, + IPV6 = 3, + IPV4_OR_IPV6 = 4 + } + } - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + /** ResourceDescriptor type */ + type?: (string|null); - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** ResourceDescriptor nameField */ + nameField?: (string|null); - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + /** ResourceDescriptor plural */ + plural?: (string|null); - /** FieldOptions .google.api.fieldInfo */ - ".google.api.fieldInfo"?: (google.api.IFieldInfo|null); + /** ResourceDescriptor singular */ + singular?: (string|null); - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); } - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { /** - * Constructs a new FieldOptions. + * Constructs a new ResourceDescriptor. * @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; + constructor(properties?: google.api.IResourceDescriptor); - /** FieldOptions weak. */ - public weak: boolean; + /** ResourceDescriptor type. */ + public type: string; - /** FieldOptions debugRedact. */ - public debugRedact: boolean; + /** ResourceDescriptor pattern. */ + public pattern: string[]; - /** FieldOptions retention. */ - public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + /** ResourceDescriptor nameField. */ + public nameField: string; - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + /** ResourceDescriptor plural. */ + public plural: string; - /** FieldOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** ResourceDescriptor singular. */ + public singular: string; - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; /** - * Creates a new FieldOptions instance using the specified properties. + * Creates a new ResourceDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns FieldOptions instance + * @returns ResourceDescriptor instance */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode + * 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.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceDescriptor, 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 + * 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.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldOptions message from the specified reader or buffer. + * 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 FieldOptions + * @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.protobuf.FieldOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldOptions + * @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.protobuf.FieldOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; /** - * Verifies a FieldOptions message. + * 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldOptions + * @returns ResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions + * 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.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldOptions to JSON. + * Converts this ResourceDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FieldOptions + * 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 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); + namespace ResourceDescriptor { - /** EditionDefault value */ - value?: (string|null); + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 } - /** 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; + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 } } - /** Properties of an OneofOptions. */ - interface IOneofOptions { + /** Properties of a ResourceReference. */ + interface IResourceReference { - /** OneofOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** ResourceReference type */ + type?: (string|null); - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** ResourceReference childType */ + childType?: (string|null); } - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { /** - * Constructs a new OneofOptions. + * Constructs a new ResourceReference. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IOneofOptions); + constructor(properties?: google.api.IResourceReference); - /** OneofOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** ResourceReference type. */ + public type: string; - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** ResourceReference childType. */ + public childType: string; /** - * Creates a new OneofOptions instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @param [properties] Properties to set - * @returns OneofOptions instance + * @returns ResourceReference instance */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode + * 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.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceReference, 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 + * 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.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OneofOptions message from the specified reader or buffer. + * 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 OneofOptions + * @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.protobuf.OneofOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OneofOptions + * @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.protobuf.OneofOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; /** - * Verifies an OneofOptions message. + * 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 an OneofOptions message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OneofOptions + * @returns ResourceReference */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions + * 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.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OneofOptions to JSON. + * Converts this ResourceReference to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for OneofOptions + * Gets the default type url for ResourceReference * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + } - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); + /** Namespace protobuf. */ + namespace protobuf { - /** EnumOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); } - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { /** - * Constructs a new EnumOptions. + * Constructs a new FileDescriptorSet. * @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); + constructor(properties?: google.protobuf.IFileDescriptorSet); - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; /** - * Creates a new EnumOptions instance using the specified properties. + * Creates a new FileDescriptorSet instance using the specified properties. * @param [properties] Properties to set - * @returns EnumOptions instance + * @returns FileDescriptorSet instance */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode + * 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.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFileDescriptorSet, 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 + * 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.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumOptions message from the specified reader or buffer. + * 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 EnumOptions + * @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.EnumOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumOptions + * @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.EnumOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; /** - * Verifies an EnumOptions message. + * 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 an EnumOptions message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumOptions + * @returns FileDescriptorSet */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions + * 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.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumOptions to JSON. + * Converts this FileDescriptorSet to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for EnumOptions + * 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; } - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { + /** 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 + } - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { - /** EnumValueOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** FileDescriptorProto name */ + name?: (string|null); - /** EnumValueOptions debugRedact */ - debugRedact?: (boolean|null); + /** FileDescriptorProto package */ + "package"?: (string|null); - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|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 an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { /** - * Constructs a new EnumValueOptions. + * Constructs a new FileDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumValueOptions); + constructor(properties?: google.protobuf.IFileDescriptorProto); - /** EnumValueOptions deprecated. */ - public deprecated: boolean; + /** FileDescriptorProto name. */ + public name: string; - /** EnumValueOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** FileDescriptorProto package. */ + public package: string; - /** EnumValueOptions debugRedact. */ - public debugRedact: boolean; + /** FileDescriptorProto dependency. */ + public dependency: string[]; - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** 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 EnumValueOptions instance using the specified properties. + * Creates a new FileDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns EnumValueOptions instance + * @returns FileDescriptorProto instance */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode + * 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.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFileDescriptorProto, 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 + * 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.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an EnumValueOptions message from the specified reader or buffer. + * 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 EnumValueOptions + * @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.EnumValueOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns EnumValueOptions + * @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.EnumValueOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; /** - * Verifies an EnumValueOptions message. + * 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 an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumValueOptions + * @returns FileDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions + * 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.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumValueOptions to JSON. + * Converts this FileDescriptorProto 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; - } + /** + * 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); - /** Properties of a ServiceOptions. */ - interface IServiceOptions { + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); - /** ServiceOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); } - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { /** - * Constructs a new ServiceOptions. + * Constructs a new DescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IServiceOptions); + constructor(properties?: google.protobuf.IDescriptorProto); - /** ServiceOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** DescriptorProto name. */ + public name: string; - /** ServiceOptions deprecated. */ - public deprecated: boolean; + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** 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 ServiceOptions instance using the specified properties. + * Creates a new DescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns ServiceOptions instance + * @returns DescriptorProto instance */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode + * 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.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDescriptorProto, 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 + * 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.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ServiceOptions message from the specified reader or buffer. + * 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 ServiceOptions + * @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.ServiceOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ServiceOptions + * @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.ServiceOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; /** - * Verifies a ServiceOptions message. + * 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 ServiceOptions message from a plain object. Also converts values to their respective internal types. + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ServiceOptions + * @returns DescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions + * 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.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ServiceOptions to JSON. + * Converts this DescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ServiceOptions + * 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; } - /** Properties of a MethodOptions. */ - interface IMethodOptions { + namespace DescriptorProto { - /** MethodOptions deprecated */ - deprecated?: (boolean|null); + /** Properties of an ExtensionRange. */ + interface IExtensionRange { - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + /** ExtensionRange start */ + start?: (number|null); - /** MethodOptions features */ - features?: (google.protobuf.IFeatureSet|null); + /** ExtensionRange end */ + end?: (number|null); - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - /** MethodOptions .google.longrunning.operationInfo */ - ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); - } + /** ExtensionRange start. */ + public start: number; - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { + /** ExtensionRange end. */ + public end: number; - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); - /** MethodOptions deprecated. */ - public deprecated: boolean; + /** + * 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; - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + /** + * 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; - /** MethodOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** + * 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 { - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** ReservedRange start */ + start?: (number|null); - /** - * 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; + /** ReservedRange end */ + end?: (number|null); + } - /** - * 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; + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { - /** - * 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; + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - /** - * 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; + /** ReservedRange start. */ + public start: number; - /** - * 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; + /** ReservedRange end. */ + public end: number; - /** - * 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 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; - /** - * 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; + /** + * 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; - /** - * 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 }; + /** + * 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; - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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; - /** - * 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; - } + /** + * 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; - namespace MethodOptions { + /** + * 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); - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } + /** + * 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; - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { + /** + * 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 }; - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); + /** + * 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; + } + } - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|string|null); + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); } - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { /** - * Constructs a new UninterpretedOption. + * Constructs a new ExtensionRangeOptions. * @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); + constructor(properties?: google.protobuf.IExtensionRangeOptions); - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** UninterpretedOption doubleValue. */ - public doubleValue: number; + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|string); + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); /** - * Creates a new UninterpretedOption instance using the specified properties. + * Creates a new ExtensionRangeOptions instance using the specified properties. * @param [properties] Properties to set - * @returns UninterpretedOption instance + * @returns ExtensionRangeOptions instance */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode + * 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.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IExtensionRangeOptions, 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 + * 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.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * 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 UninterpretedOption + * @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.UninterpretedOption; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UninterpretedOption + * @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.UninterpretedOption; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; /** - * Verifies an UninterpretedOption message. + * 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 UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UninterpretedOption + * @returns ExtensionRangeOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption + * 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.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UninterpretedOption to JSON. + * Converts this ExtensionRangeOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UninterpretedOption + * 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 UninterpretedOption { + namespace ExtensionRangeOptions { - /** Properties of a NamePart. */ - interface INamePart { + /** Properties of a Declaration. */ + interface IDeclaration { - /** NamePart namePart */ - namePart: string; + /** Declaration number */ + number?: (number|null); - /** NamePart isExtension */ - isExtension: boolean; + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); } - /** Represents a NamePart. */ - class NamePart implements INamePart { + /** Represents a Declaration. */ + class Declaration implements IDeclaration { /** - * Constructs a new NamePart. + * Constructs a new Declaration. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - /** NamePart namePart. */ - public namePart: string; + /** Declaration number. */ + public number: number; - /** NamePart isExtension. */ - public isExtension: boolean; + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; /** - * Creates a new NamePart instance using the specified properties. + * Creates a new Declaration instance using the specified properties. * @param [properties] Properties to set - * @returns NamePart instance + * @returns Declaration instance */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; /** - * 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 + * 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.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, 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 + * 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.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NamePart message from the specified reader or buffer. + * 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 NamePart + * @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.UninterpretedOption.NamePart; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. + * Decodes a Declaration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NamePart + * @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.UninterpretedOption.NamePart; + 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 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); + /** + * 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 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 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 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 }; + /** + * 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 NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this FieldDescriptorProto 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; - } + /** + * 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; } - /** Properties of a FeatureSet. */ - interface IFeatureSet { - - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + namespace FieldDescriptorProto { - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + /** 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 + } - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + /** OneofDescriptorProto name */ + name?: (string|null); - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); } - /** Represents a FeatureSet. */ - class FeatureSet implements IFeatureSet { + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { /** - * Constructs a new FeatureSet. + * Constructs a new OneofDescriptorProto. * @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); + constructor(properties?: google.protobuf.IOneofDescriptorProto); - /** FeatureSet messageEncoding. */ - public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + /** OneofDescriptorProto name. */ + public name: string; - /** FeatureSet jsonFormat. */ - public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); /** - * Creates a new FeatureSet instance using the specified properties. + * Creates a new OneofDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns FeatureSet instance + * @returns OneofDescriptorProto instance */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode + * 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.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IOneofDescriptorProto, 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 + * 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.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FeatureSet message from the specified reader or buffer. + * 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 FeatureSet + * @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.FeatureSet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FeatureSet + * @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.FeatureSet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; /** - * Verifies a FeatureSet message. + * 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 a FeatureSet message from a plain object. Also converts values to their respective internal types. + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FeatureSet + * @returns OneofDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet + * 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.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FeatureSet to JSON. + * Converts this OneofDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FeatureSet + * 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; } - 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 - } + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - } + /** EnumDescriptorProto name */ + name?: (string|null); - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); - /** FeatureSetDefaults minimumEdition */ - minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - /** FeatureSetDefaults maximumEdition */ - maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); } - /** Represents a FeatureSetDefaults. */ - class FeatureSetDefaults implements IFeatureSetDefaults { + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { /** - * Constructs a new FeatureSetDefaults. + * Constructs a new EnumDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); + constructor(properties?: google.protobuf.IEnumDescriptorProto); - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + /** EnumDescriptorProto name. */ + public name: string; - /** FeatureSetDefaults minimumEdition. */ - public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; - /** FeatureSetDefaults maximumEdition. */ - public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; /** - * Creates a new FeatureSetDefaults instance using the specified properties. + * Creates a new EnumDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns FeatureSetDefaults instance + * @returns EnumDescriptorProto instance */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode + * 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.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumDescriptorProto, 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 + * 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.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * 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 FeatureSetDefaults + * @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.FeatureSetDefaults; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults + * @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.FeatureSetDefaults; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; /** - * Verifies a FeatureSetDefaults message. + * 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 a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FeatureSetDefaults + * @returns EnumDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults + * 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.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FeatureSetDefaults to JSON. + * Converts this EnumDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FeatureSetDefaults + * 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 FeatureSetDefaults { + namespace EnumDescriptorProto { - /** Properties of a FeatureSetEditionDefault. */ - interface IFeatureSetEditionDefault { + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + /** EnumReservedRange start */ + start?: (number|null); - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); + /** EnumReservedRange end */ + end?: (number|null); } - /** Represents a FeatureSetEditionDefault. */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { /** - * Constructs a new FeatureSetEditionDefault. + * Constructs a new EnumReservedRange. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - /** FeatureSetEditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + /** EnumReservedRange start. */ + public start: number; - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** EnumReservedRange end. */ + public end: number; /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. + * Creates a new EnumReservedRange instance using the specified properties. * @param [properties] Properties to set - * @returns FeatureSetEditionDefault instance + * @returns EnumReservedRange instance */ - public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; /** - * 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 + * 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.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, 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 + * 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.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * 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 FeatureSetEditionDefault + * @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.FeatureSetDefaults.FeatureSetEditionDefault; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FeatureSetEditionDefault + * @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.FeatureSetDefaults.FeatureSetEditionDefault; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; /** - * Verifies a FeatureSetEditionDefault message. + * 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 a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FeatureSetEditionDefault + * @returns EnumReservedRange */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @param message FeatureSetEditionDefault + * 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.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FeatureSetEditionDefault to JSON. + * Converts this EnumReservedRange to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FeatureSetEditionDefault + * Gets the default type url for EnumReservedRange * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -18823,3485 +15429,4217 @@ export namespace google { } } - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { + /** 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 { - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); } - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { /** - * Constructs a new SourceCodeInfo. + * Constructs a new ServiceDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.ISourceCodeInfo); + constructor(properties?: google.protobuf.IServiceDescriptorProto); - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); /** - * Creates a new SourceCodeInfo instance using the specified properties. + * Creates a new ServiceDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns SourceCodeInfo instance + * @returns ServiceDescriptorProto instance */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode + * 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.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IServiceDescriptorProto, 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 + * 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.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. + * 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 SourceCodeInfo + * @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.SourceCodeInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo + * @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.SourceCodeInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; /** - * Verifies a SourceCodeInfo message. + * 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SourceCodeInfo + * @returns ServiceDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo + * 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.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SourceCodeInfo to JSON. + * Converts this ServiceDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SourceCodeInfo + * 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; } - 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; + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { - /** - * 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; + /** MethodDescriptorProto name */ + name?: (string|null); - /** - * 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; + /** MethodDescriptorProto inputType */ + inputType?: (string|null); - /** - * 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; + /** MethodDescriptorProto outputType */ + outputType?: (string|null); - /** - * 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; + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); - /** - * 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); + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|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; + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } - /** - * 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 }; + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); - /** - * 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; - } - } + /** MethodDescriptorProto name. */ + public name: string; - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { + /** MethodDescriptorProto inputType. */ + public inputType: string; - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } + /** MethodDescriptorProto outputType. */ + public outputType: string; - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * Creates a new MethodDescriptorProto instance using the specified properties. * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance + * @returns MethodDescriptorProto instance */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode + * 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.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMethodDescriptorProto, 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 + * 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.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * 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 GeneratedCodeInfo + * @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.GeneratedCodeInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo + * @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.GeneratedCodeInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; /** - * Verifies a GeneratedCodeInfo message. + * 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GeneratedCodeInfo + * @returns MethodDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo + * 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.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this MethodDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GeneratedCodeInfo + * 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; } - namespace GeneratedCodeInfo { + /** Properties of a FileOptions. */ + interface IFileOptions { - /** Properties of an Annotation. */ - interface IAnnotation { + /** FileOptions javaPackage */ + javaPackage?: (string|null); - /** Annotation path */ - path?: (number[]|null); + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); - /** Annotation sourceFile */ - sourceFile?: (string|null); + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); - /** Annotation begin */ - begin?: (number|null); + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); - /** Annotation end */ - end?: (number|null); + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); - } + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - /** Represents an Annotation. */ - class Annotation implements IAnnotation { + /** FileOptions goPackage */ + goPackage?: (string|null); - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); - /** Annotation path. */ - public path: number[]; + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); - /** Annotation sourceFile. */ - public sourceFile: string; + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); - /** Annotation begin. */ - public begin: number; + /** FileOptions deprecated */ + deprecated?: (boolean|null); - /** Annotation end. */ - public end: number; + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); - /** Annotation semantic. */ - public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); - /** - * 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; + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); - /** - * 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; + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); - /** - * 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; + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); - /** - * 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; + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); - /** - * 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; + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); - /** - * 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); + /** FileOptions rubyPackage */ + rubyPackage?: (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; + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); - /** - * 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 }; + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } - /** - * 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; - } + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { - namespace Annotation { + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); - /** Semantic enum. */ - enum Semantic { - NONE = 0, - SET = 1, - ALIAS = 2 - } - } - } + /** FileOptions javaPackage. */ + public javaPackage: string; - /** Properties of a Duration. */ - interface IDuration { + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; - /** Duration seconds */ - seconds?: (number|Long|string|null); + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; - /** Duration nanos */ - nanos?: (number|null); - } + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; - /** Represents a Duration. */ - class Duration implements IDuration { + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); + /** 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; - /** Duration seconds. */ - public seconds: (number|Long|string); + /** FileOptions rubyPackage. */ + public rubyPackage: string; - /** Duration nanos. */ - public nanos: number; + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new Duration instance using the specified properties. + * Creates a new FileOptions instance using the specified properties. * @param [properties] Properties to set - * @returns Duration instance + * @returns FileOptions instance */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * 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.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFileOptions, 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 + * 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.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Duration message from the specified reader or buffer. + * 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 Duration + * @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.Duration; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a FileOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Duration + * @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.Duration; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; /** - * Verifies a Duration message. + * 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 Duration message from a plain object. Also converts values to their respective internal types. + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Duration + * @returns FileOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration + * 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.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Duration to JSON. + * Converts this FileOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Duration + * 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; } - /** Properties of a Timestamp. */ - interface ITimestamp { + namespace FileOptions { - /** Timestamp seconds */ - seconds?: (number|Long|string|null); + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } - /** Timestamp nanos */ - nanos?: (number|null); + /** 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 Timestamp. */ - class Timestamp implements ITimestamp { + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { /** - * Constructs a new Timestamp. + * Constructs a new MessageOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.ITimestamp); + constructor(properties?: google.protobuf.IMessageOptions); - /** Timestamp seconds. */ - public seconds: (number|Long|string); + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; - /** Timestamp nanos. */ - public nanos: number; + /** 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 Timestamp instance using the specified properties. + * Creates a new MessageOptions instance using the specified properties. * @param [properties] Properties to set - * @returns Timestamp instance + * @returns MessageOptions instance */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode + * 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.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMessageOptions, 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 + * 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.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Timestamp message from the specified reader or buffer. + * 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 Timestamp + * @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.Timestamp; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Timestamp + * @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.Timestamp; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; /** - * Verifies a Timestamp message. + * 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Timestamp + * @returns MessageOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp + * 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.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Timestamp to JSON. + * Converts this MessageOptions 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; - } + /** + * 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.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|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; - /** Properties of an Any. */ - interface IAny { + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; - /** Any type_url */ - type_url?: (string|null); + /** FieldOptions deprecated. */ + public deprecated: boolean; - /** Any value */ - value?: (Uint8Array|string|null); - } + /** FieldOptions weak. */ + public weak: boolean; - /** Represents an Any. */ - class Any implements IAny { + /** FieldOptions debugRedact. */ + public debugRedact: boolean; - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - /** Any type_url. */ - public type_url: string; + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; - /** Any value. */ - public value: (Uint8Array|string); + /** 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 Any instance using the specified properties. + * Creates a new FieldOptions instance using the specified properties. * @param [properties] Properties to set - * @returns Any instance + * @returns FieldOptions instance */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode + * 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.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldOptions, 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 + * 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.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Any message from the specified reader or buffer. + * 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 Any + * @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.Any; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Any + * @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.Any; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; /** - * Verifies an Any message. + * 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 an Any message from a plain object. Also converts values to their respective internal types. + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Any + * @returns FieldOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any + * 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.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Any to JSON. + * Converts this FieldOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for 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; } - /** Properties of a FieldMask. */ - interface IFieldMask { + namespace FieldOptions { - /** FieldMask paths */ - paths?: (string[]|null); - } + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } - /** FieldMask paths. */ - public paths: string[]; + /** 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 + } - /** - * 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; + /** Properties of an EditionDefault. */ + interface IEditionDefault { - /** - * 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; + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - /** - * 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; + /** EditionDefault value */ + value?: (string|null); + } - /** - * 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; + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { - /** - * 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; + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); - /** - * 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); + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** - * 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; + /** 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 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 }; + /** + * 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; - /** - * Converts this FieldMask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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 }; - /** - * 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; + /** + * 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 Empty. */ - interface IEmpty { + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } - /** Represents an Empty. */ - class Empty implements IEmpty { + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { /** - * Constructs a new Empty. + * Constructs a new OneofOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEmpty); + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new Empty instance using the specified properties. + * Creates a new OneofOptions instance using the specified properties. * @param [properties] Properties to set - * @returns Empty instance + * @returns OneofOptions instance */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode + * 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.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IOneofOptions, 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 + * 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.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Empty message from the specified reader or buffer. + * 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 Empty + * @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.Empty; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Empty + * @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.Empty; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; /** - * Verifies an Empty message. + * 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 Empty message from a plain object. Also converts values to their respective internal types. + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Empty + * @returns OneofOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty + * 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.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Empty to JSON. + * Converts this OneofOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Empty + * 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 a DoubleValue. */ - interface IDoubleValue { + /** Properties of an EnumOptions. */ + interface IEnumOptions { - /** DoubleValue value */ - value?: (number|null); + /** 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 a DoubleValue. */ - class DoubleValue implements IDoubleValue { + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { /** - * Constructs a new DoubleValue. + * Constructs a new EnumOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDoubleValue); + constructor(properties?: google.protobuf.IEnumOptions); - /** DoubleValue value. */ - public value: number; + /** 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 DoubleValue instance using the specified properties. + * Creates a new EnumOptions instance using the specified properties. * @param [properties] Properties to set - * @returns DoubleValue instance + * @returns EnumOptions instance */ - public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode + * 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.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode + * 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.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DoubleValue message from the specified reader or buffer. + * 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 DoubleValue + * @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.DoubleValue; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DoubleValue + * @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.DoubleValue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; /** - * Verifies a DoubleValue message. + * 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 a DoubleValue message from a plain object. Also converts values to their respective internal types. + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DoubleValue + * @returns EnumOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @param message DoubleValue + * 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.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DoubleValue to JSON. + * Converts this EnumOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DoubleValue + * 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 a FloatValue. */ - interface IFloatValue { + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { - /** FloatValue value */ - value?: (number|null); + /** 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 a FloatValue. */ - class FloatValue implements IFloatValue { + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { /** - * Constructs a new FloatValue. + * Constructs a new EnumValueOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFloatValue); + constructor(properties?: google.protobuf.IEnumValueOptions); - /** FloatValue value. */ - public value: number; + /** 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 FloatValue instance using the specified properties. + * Creates a new EnumValueOptions instance using the specified properties. * @param [properties] Properties to set - * @returns FloatValue instance + * @returns EnumValueOptions instance */ - public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode + /** + * 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.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode + * 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.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FloatValue message from the specified reader or buffer. + * 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 FloatValue + * @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.FloatValue; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FloatValue + * @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.FloatValue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; /** - * Verifies a FloatValue message. + * 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 a FloatValue message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FloatValue + * @returns EnumValueOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @param message FloatValue + * 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.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FloatValue to JSON. + * Converts this EnumValueOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for FloatValue + * 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 an Int64Value. */ - interface IInt64Value { + /** Properties of a ServiceOptions. */ + interface IServiceOptions { - /** Int64Value value */ - value?: (number|Long|string|null); + /** 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); } - /** Represents an Int64Value. */ - class Int64Value implements IInt64Value { + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { /** - * Constructs a new Int64Value. + * Constructs a new ServiceOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IInt64Value); + constructor(properties?: google.protobuf.IServiceOptions); - /** Int64Value value. */ - public value: (number|Long|string); + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a new Int64Value instance using the specified properties. + * Creates a new ServiceOptions instance using the specified properties. * @param [properties] Properties to set - * @returns Int64Value instance + * @returns ServiceOptions instance */ - public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode + * 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.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode + * 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.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Int64Value message from the specified reader or buffer. + * 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 Int64Value + * @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.Int64Value; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Int64Value + * @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.Int64Value; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; /** - * Verifies an Int64Value message. + * 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 an Int64Value message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Int64Value + * @returns ServiceOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @param message Int64Value + * 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.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Int64Value to JSON. + * Converts this ServiceOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Int64Value + * 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 UInt64Value. */ - interface IUInt64Value { + /** Properties of a MethodOptions. */ + interface IMethodOptions { - /** UInt64Value value */ - value?: (number|Long|string|null); + /** 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 UInt64Value. */ - class UInt64Value implements IUInt64Value { + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { /** - * Constructs a new UInt64Value. + * Constructs a new MethodOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IUInt64Value); + constructor(properties?: google.protobuf.IMethodOptions); - /** UInt64Value value. */ - public value: (number|Long|string); + /** 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 UInt64Value instance using the specified properties. + * Creates a new MethodOptions instance using the specified properties. * @param [properties] Properties to set - * @returns UInt64Value instance + * @returns MethodOptions instance */ - public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode + * 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.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode + * 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.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a UInt64Value message from the specified reader or buffer. + * 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 UInt64Value + * @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.UInt64Value; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UInt64Value + * @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.UInt64Value; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; /** - * Verifies a UInt64Value message. + * 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 UInt64Value message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UInt64Value + * @returns MethodOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @param message UInt64Value + * 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.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UInt64Value to JSON. + * Converts this MethodOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UInt64Value + * 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; } - /** Properties of an Int32Value. */ - interface IInt32Value { + namespace MethodOptions { - /** Int32Value value */ - value?: (number|null); + /** 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 Int32Value. */ - class Int32Value implements IInt32Value { + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { /** - * Constructs a new Int32Value. + * Constructs a new UninterpretedOption. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IInt32Value); + constructor(properties?: google.protobuf.IUninterpretedOption); - /** Int32Value value. */ - public value: number; + /** 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 Int32Value instance using the specified properties. + * Creates a new UninterpretedOption instance using the specified properties. * @param [properties] Properties to set - * @returns Int32Value instance + * @returns UninterpretedOption instance */ - public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode + * 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.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode + * 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.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Int32Value message from the specified reader or buffer. + * 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 Int32Value + * @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.Int32Value; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Int32Value + * @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.Int32Value; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; /** - * Verifies an Int32Value message. + * 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 Int32Value message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Int32Value + * @returns UninterpretedOption */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @param message Int32Value + * 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.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Int32Value to JSON. + * Converts this UninterpretedOption to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Int32Value + * 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; } - /** Properties of a UInt32Value. */ - interface IUInt32Value { + namespace UninterpretedOption { - /** UInt32Value value */ - value?: (number|null); + /** 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; + } } - /** Represents a UInt32Value. */ - class UInt32Value implements IUInt32Value { + /** 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 UInt32Value. + * Constructs a new FeatureSet. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IUInt32Value); + constructor(properties?: google.protobuf.IFeatureSet); - /** UInt32Value value. */ - public value: number; + /** 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 UInt32Value instance using the specified properties. + * Creates a new FeatureSet instance using the specified properties. * @param [properties] Properties to set - * @returns UInt32Value instance + * @returns FeatureSet instance */ - public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode + * 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.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode + * 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.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a UInt32Value message from the specified reader or buffer. + * 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 UInt32Value + * @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.UInt32Value; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UInt32Value + * @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.UInt32Value; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; /** - * Verifies a UInt32Value message. + * 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 UInt32Value message from a plain object. Also converts values to their respective internal types. + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UInt32Value + * @returns FeatureSet */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @param message UInt32Value + * 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.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UInt32Value to JSON. + * Converts this FeatureSet to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UInt32Value + * 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; } - /** Properties of a BoolValue. */ - interface IBoolValue { + namespace FeatureSet { - /** BoolValue value */ - value?: (boolean|null); + /** 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 + } } - /** Represents a BoolValue. */ - class BoolValue implements IBoolValue { + /** 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 BoolValue. + * Constructs a new FeatureSetDefaults. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IBoolValue); + constructor(properties?: google.protobuf.IFeatureSetDefaults); - /** BoolValue value. */ - public value: boolean; + /** 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 BoolValue instance using the specified properties. + * Creates a new FeatureSetDefaults instance using the specified properties. * @param [properties] Properties to set - * @returns BoolValue instance + * @returns FeatureSetDefaults instance */ - public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode + * 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.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode + * 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.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BoolValue message from the specified reader or buffer. + * 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 BoolValue + * @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.BoolValue; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BoolValue + * @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.BoolValue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; /** - * Verifies a BoolValue message. + * 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 BoolValue message from a plain object. Also converts values to their respective internal types. + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BoolValue + * @returns FeatureSetDefaults */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @param message BoolValue + * 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.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BoolValue to JSON. + * Converts this FeatureSetDefaults to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BoolValue + * 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; } - /** Properties of a StringValue. */ - interface IStringValue { + 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 { - /** StringValue value */ - value?: (string|null); + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); } - /** Represents a StringValue. */ - class StringValue implements IStringValue { + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { /** - * Constructs a new StringValue. + * Constructs a new SourceCodeInfo. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IStringValue); + constructor(properties?: google.protobuf.ISourceCodeInfo); - /** StringValue value. */ - public value: string; + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; /** - * Creates a new StringValue instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @param [properties] Properties to set - * @returns StringValue instance + * @returns SourceCodeInfo instance */ - public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode + * 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.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode + * 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.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a StringValue message from the specified reader or buffer. + * 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 StringValue + * @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.StringValue; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns StringValue + * @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.StringValue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; /** - * Verifies a StringValue message. + * 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 StringValue message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StringValue + * @returns SourceCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @param message StringValue + * 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.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StringValue to JSON. + * Converts this SourceCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for StringValue + * 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; } - /** Properties of a BytesValue. */ - interface IBytesValue { + namespace SourceCodeInfo { - /** BytesValue value */ - value?: (Uint8Array|string|null); + /** 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; + } } - /** Represents a BytesValue. */ - class BytesValue implements IBytesValue { + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { /** - * Constructs a new BytesValue. + * Constructs a new GeneratedCodeInfo. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IBytesValue); + constructor(properties?: google.protobuf.IGeneratedCodeInfo); - /** BytesValue value. */ - public value: (Uint8Array|string); + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; /** - * Creates a new BytesValue instance using the specified properties. + * Creates a new GeneratedCodeInfo instance using the specified properties. * @param [properties] Properties to set - * @returns BytesValue instance + * @returns GeneratedCodeInfo instance */ - public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode + * 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.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode + * 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.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BytesValue message from the specified reader or buffer. + * 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 BytesValue + * @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.BytesValue; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BytesValue + * @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.BytesValue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; /** - * Verifies a BytesValue message. + * 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 BytesValue message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BytesValue + * @returns GeneratedCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. - * @param message BytesValue + * 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.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BytesValue to JSON. + * Converts this GeneratedCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for BytesValue + * 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 type. */ - namespace type { + namespace GeneratedCodeInfo { - /** DayOfWeek enum. */ - enum DayOfWeek { - DAY_OF_WEEK_UNSPECIFIED = 0, - MONDAY = 1, - TUESDAY = 2, - WEDNESDAY = 3, - THURSDAY = 4, - FRIDAY = 5, - SATURDAY = 6, - SUNDAY = 7 - } + /** Properties of an Annotation. */ + interface IAnnotation { - /** Month enum. */ - enum Month { - MONTH_UNSPECIFIED = 0, - JANUARY = 1, - FEBRUARY = 2, - MARCH = 3, - APRIL = 4, - MAY = 5, - JUNE = 6, - JULY = 7, - AUGUST = 8, - SEPTEMBER = 9, - OCTOBER = 10, - NOVEMBER = 11, - DECEMBER = 12 - } + /** 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 }; - /** Properties of an Expr. */ - interface IExpr { + /** + * 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 { - /** Expr expression */ - expression?: (string|null); + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } - /** Expr title */ - title?: (string|null); + /** Properties of a Duration. */ + interface IDuration { - /** Expr description */ - description?: (string|null); + /** Duration seconds */ + seconds?: (number|Long|string|null); - /** Expr location */ - location?: (string|null); + /** Duration nanos */ + nanos?: (number|null); } - /** Represents an Expr. */ - class Expr implements IExpr { + /** Represents a Duration. */ + class Duration implements IDuration { /** - * Constructs a new Expr. + * Constructs a new Duration. * @param [properties] Properties to set */ - constructor(properties?: google.type.IExpr); - - /** Expr expression. */ - public expression: string; - - /** Expr title. */ - public title: string; + constructor(properties?: google.protobuf.IDuration); - /** Expr description. */ - public description: string; + /** Duration seconds. */ + public seconds: (number|Long|string); - /** Expr location. */ - public location: string; + /** Duration nanos. */ + public nanos: number; /** - * Creates a new Expr instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @param [properties] Properties to set - * @returns Expr instance + * @returns Duration instance */ - public static create(properties?: google.type.IExpr): google.type.Expr; + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; /** - * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @param message Expr message or plain object to encode + * 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.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. - * @param message Expr message or plain object to encode + * 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.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Expr message from the specified reader or buffer. + * 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 Expr + * @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.type.Expr; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; /** - * Decodes an Expr message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Expr + * @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.type.Expr; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; /** - * Verifies an Expr message. + * 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 an Expr message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Expr + * @returns Duration */ - public static fromObject(object: { [k: string]: any }): google.type.Expr; + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; /** - * Creates a plain object from an Expr message. Also converts values to other types if specified. - * @param message Expr + * 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.type.Expr, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Expr to JSON. + * Converts this Duration to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Expr + * 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; } - } - /** Namespace rpc. */ - namespace rpc { - - /** Properties of a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); + /** Properties of a Timestamp. */ + interface ITimestamp { - /** Status message */ - message?: (string|null); + /** Timestamp seconds */ + seconds?: (number|Long|string|null); - /** Status details */ - details?: (google.protobuf.IAny[]|null); + /** Timestamp nanos */ + nanos?: (number|null); } - /** Represents a Status. */ - class Status implements IStatus { + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { /** - * Constructs a new Status. + * Constructs a new Timestamp. * @param [properties] Properties to set */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; + constructor(properties?: google.protobuf.ITimestamp); - /** Status message. */ - public message: string; + /** Timestamp seconds. */ + public seconds: (number|Long|string); - /** Status details. */ - public details: google.protobuf.IAny[]; + /** Timestamp nanos. */ + public nanos: number; /** - * Creates a new Status instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @param [properties] Properties to set - * @returns Status instance + * @returns Timestamp instance */ - public static create(properties?: google.rpc.IStatus): google.rpc.Status; + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. - * @param message Status message or plain object to encode + * 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.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ITimestamp, 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 + * 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.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Status message from the specified reader or buffer. + * 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 Status + * @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.rpc.Status; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; /** - * Decodes a Status message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Status + * @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.rpc.Status; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; /** - * Verifies a Status message. + * 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 Status message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Status + * @returns Timestamp */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status + * 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.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Status to JSON. + * Converts this Timestamp to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Status + * 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; } - } - - /** Namespace iam. */ - namespace iam { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a IAMPolicy */ - class IAMPolicy extends $protobuf.rpc.Service { - - /** - * Constructs a new IAMPolicy 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 IAMPolicy 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): IAMPolicy; - - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.SetIamPolicyCallback): void; - - /** - * Calls SetIamPolicy. - * @param request SetIamPolicyRequest message or plain object - * @returns Promise - */ - public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; - - /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Policy - */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.iam.v1.IAMPolicy.GetIamPolicyCallback): void; - - /** - * Calls GetIamPolicy. - * @param request GetIamPolicyRequest message or plain object - * @returns Promise - */ - public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.iam.v1.IAMPolicy.TestIamPermissionsCallback): void; - - /** - * Calls TestIamPermissions. - * @param request TestIamPermissionsRequest message or plain object - * @returns Promise - */ - public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; - } - - namespace IAMPolicy { - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. - * @param error Error, if any - * @param [response] Policy - */ - type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. - * @param error Error, if any - * @param [response] TestIamPermissionsResponse - */ - type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; - } - - /** Properties of a SetIamPolicyRequest. */ - interface ISetIamPolicyRequest { - - /** SetIamPolicyRequest resource */ - resource?: (string|null); - - /** SetIamPolicyRequest policy */ - policy?: (google.iam.v1.IPolicy|null); - - /** SetIamPolicyRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents a SetIamPolicyRequest. */ - class SetIamPolicyRequest implements ISetIamPolicyRequest { - - /** - * Constructs a new SetIamPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.ISetIamPolicyRequest); - - /** SetIamPolicyRequest resource. */ - public resource: string; - - /** SetIamPolicyRequest policy. */ - public policy?: (google.iam.v1.IPolicy|null); - - /** SetIamPolicyRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new SetIamPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SetIamPolicyRequest instance - */ - public static create(properties?: google.iam.v1.ISetIamPolicyRequest): google.iam.v1.SetIamPolicyRequest; - - /** - * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @param message SetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @param message SetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.ISetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.SetIamPolicyRequest; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.SetIamPolicyRequest; - - /** - * Verifies a SetIamPolicyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SetIamPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.SetIamPolicyRequest; - - /** - * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. - * @param message SetIamPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.SetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SetIamPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SetIamPolicyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - /** Properties of a GetIamPolicyRequest. */ - interface IGetIamPolicyRequest { - - /** GetIamPolicyRequest resource */ - resource?: (string|null); - - /** GetIamPolicyRequest options */ - options?: (google.iam.v1.IGetPolicyOptions|null); - } - - /** Represents a GetIamPolicyRequest. */ - class GetIamPolicyRequest implements IGetIamPolicyRequest { - - /** - * Constructs a new GetIamPolicyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IGetIamPolicyRequest); + /** Properties of an Any. */ + interface IAny { - /** GetIamPolicyRequest resource. */ - public resource: string; + /** Any type_url */ + type_url?: (string|null); - /** GetIamPolicyRequest options. */ - public options?: (google.iam.v1.IGetPolicyOptions|null); + /** Any value */ + value?: (Uint8Array|string|null); + } - /** - * Creates a new GetIamPolicyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetIamPolicyRequest instance - */ - public static create(properties?: google.iam.v1.IGetIamPolicyRequest): google.iam.v1.GetIamPolicyRequest; + /** Represents an Any. */ + class Any implements IAny { - /** - * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @param message GetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); - /** - * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @param message GetIamPolicyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IGetIamPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** Any type_url. */ + public type_url: string; - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetIamPolicyRequest; + /** Any value. */ + public value: (Uint8Array|string); - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetIamPolicyRequest; + /** + * 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; - /** - * Verifies a GetIamPolicyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * 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; - /** - * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetIamPolicyRequest - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.GetIamPolicyRequest; + /** + * 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; - /** - * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. - * @param message GetIamPolicyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.GetIamPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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; - /** - * Converts this GetIamPolicyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: 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; - /** - * Gets the default type url for GetIamPolicyRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * 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); - /** Properties of a TestIamPermissionsRequest. */ - interface ITestIamPermissionsRequest { + /** + * 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; - /** TestIamPermissionsRequest resource */ - resource?: (string|null); + /** + * 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 }; - /** TestIamPermissionsRequest permissions */ - permissions?: (string[]|null); - } + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a TestIamPermissionsRequest. */ - class TestIamPermissionsRequest implements ITestIamPermissionsRequest { + /** + * 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; + } - /** - * Constructs a new TestIamPermissionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.ITestIamPermissionsRequest); + /** Properties of a FieldMask. */ + interface IFieldMask { - /** TestIamPermissionsRequest resource. */ - public resource: string; + /** FieldMask paths */ + paths?: (string[]|null); + } - /** TestIamPermissionsRequest permissions. */ - public permissions: string[]; + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { - /** - * Creates a new TestIamPermissionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns TestIamPermissionsRequest instance - */ - public static create(properties?: google.iam.v1.ITestIamPermissionsRequest): google.iam.v1.TestIamPermissionsRequest; + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); - /** - * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @param message TestIamPermissionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** FieldMask paths. */ + public paths: string[]; - /** - * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @param message TestIamPermissionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsRequest; + /** + * 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; - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsRequest; + /** + * 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; - /** - * Verifies a TestIamPermissionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * 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; - /** - * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TestIamPermissionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsRequest; + /** + * 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; - /** - * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. - * @param message TestIamPermissionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.TestIamPermissionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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); - /** - * Converts this TestIamPermissionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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; - /** - * Gets the default type url for TestIamPermissionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * 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 }; - /** Properties of a TestIamPermissionsResponse. */ - interface ITestIamPermissionsResponse { + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** TestIamPermissionsResponse permissions */ - permissions?: (string[]|null); - } + /** + * 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; + } - /** Represents a TestIamPermissionsResponse. */ - class TestIamPermissionsResponse implements ITestIamPermissionsResponse { + /** Properties of an Empty. */ + interface IEmpty { + } - /** - * Constructs a new TestIamPermissionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.ITestIamPermissionsResponse); + /** Represents an Empty. */ + class Empty implements IEmpty { - /** TestIamPermissionsResponse permissions. */ - public permissions: string[]; + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); - /** - * Creates a new TestIamPermissionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns TestIamPermissionsResponse instance - */ - public static create(properties?: google.iam.v1.ITestIamPermissionsResponse): google.iam.v1.TestIamPermissionsResponse; + /** + * 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 TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @param message TestIamPermissionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.ITestIamPermissionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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 TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @param message TestIamPermissionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.ITestIamPermissionsResponse, 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 a TestIamPermissionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.TestIamPermissionsResponse; + /** + * 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 a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.TestIamPermissionsResponse; + /** + * 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 a TestIamPermissionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * 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 a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TestIamPermissionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.TestIamPermissionsResponse; + /** + * 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 }; - /** - * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. - * @param message TestIamPermissionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.TestIamPermissionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this TestIamPermissionsResponse 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; + } - /** - * Gets the default type url for TestIamPermissionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Properties of a DoubleValue. */ + interface IDoubleValue { - /** Properties of a GetPolicyOptions. */ - interface IGetPolicyOptions { + /** DoubleValue value */ + value?: (number|null); + } - /** GetPolicyOptions requestedPolicyVersion */ - requestedPolicyVersion?: (number|null); - } + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { - /** Represents a GetPolicyOptions. */ - class GetPolicyOptions implements IGetPolicyOptions { + /** + * Constructs a new DoubleValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDoubleValue); - /** - * Constructs a new GetPolicyOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IGetPolicyOptions); + /** DoubleValue value. */ + public value: number; - /** GetPolicyOptions requestedPolicyVersion. */ - public requestedPolicyVersion: number; + /** + * Creates a new DoubleValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DoubleValue instance + */ + public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; - /** - * Creates a new GetPolicyOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns GetPolicyOptions instance - */ - public static create(properties?: google.iam.v1.IGetPolicyOptions): google.iam.v1.GetPolicyOptions; + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @param message GetPolicyOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @param message GetPolicyOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IGetPolicyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DoubleValue + * @throws {Error} If the payload is not 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.DoubleValue; - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.GetPolicyOptions; + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DoubleValue + * @throws {Error} If the payload 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.DoubleValue; - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.GetPolicyOptions; + /** + * Verifies a DoubleValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies a GetPolicyOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; - /** - * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetPolicyOptions - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.GetPolicyOptions; + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. - * @param message GetPolicyOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.GetPolicyOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this DoubleValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this GetPolicyOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Gets the default type url for DoubleValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Gets the default type url for GetPolicyOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Properties of a FloatValue. */ + interface IFloatValue { - /** Properties of a Policy. */ - interface IPolicy { + /** FloatValue value */ + value?: (number|null); + } - /** Policy version */ - version?: (number|null); + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { - /** Policy bindings */ - bindings?: (google.iam.v1.IBinding[]|null); + /** + * Constructs a new FloatValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFloatValue); - /** Policy auditConfigs */ - auditConfigs?: (google.iam.v1.IAuditConfig[]|null); + /** FloatValue value. */ + public value: number; - /** Policy etag */ - etag?: (Uint8Array|string|null); - } + /** + * Creates a new FloatValue instance using the specified properties. + * @param [properties] Properties to set + * @returns FloatValue instance + */ + public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; - /** Represents a Policy. */ - class Policy implements IPolicy { + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new Policy. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IPolicy); + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FloatValue + * @throws {Error} If the payload is not 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.FloatValue; - /** Policy version. */ - public version: number; + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FloatValue + * @throws {Error} If the payload 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.FloatValue; - /** Policy bindings. */ - public bindings: google.iam.v1.IBinding[]; + /** + * Verifies a FloatValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Policy auditConfigs. */ - public auditConfigs: google.iam.v1.IAuditConfig[]; + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FloatValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; - /** Policy etag. */ - public etag: (Uint8Array|string); + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a new Policy instance using the specified properties. - * @param [properties] Properties to set - * @returns Policy instance - */ - public static create(properties?: google.iam.v1.IPolicy): google.iam.v1.Policy; + /** + * Converts this FloatValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @param message Policy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Gets the default type url for FloatValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @param message Policy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + /** Properties of an Int64Value. */ + interface IInt64Value { - /** - * Decodes a Policy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Policy; + /** Int64Value value */ + value?: (number|Long|string|null); + } - /** - * Decodes a Policy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Policy; + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { - /** - * Verifies a Policy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Constructs a new Int64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt64Value); - /** - * Creates a Policy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Policy - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.Policy; + /** Int64Value value. */ + public value: (number|Long|string); - /** - * Creates a plain object from a Policy message. Also converts values to other types if specified. - * @param message Policy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.Policy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a new Int64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int64Value instance + */ + public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; - /** - * Converts this Policy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Gets the default type url for Policy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a Binding. */ - interface IBinding { + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int64Value + * @throws {Error} If the payload is not 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.Int64Value; - /** Binding role */ - role?: (string|null); + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int64Value + * @throws {Error} If the payload 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.Int64Value; - /** Binding members */ - members?: (string[]|null); + /** + * Verifies an Int64Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** Binding condition */ - condition?: (google.type.IExpr|null); - } + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; - /** Represents a Binding. */ - class Binding implements IBinding { + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new Binding. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IBinding); + /** + * Converts this Int64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Binding role. */ - public role: string; + /** + * Gets the default type url for Int64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Binding members. */ - public members: string[]; + /** Properties of a UInt64Value. */ + interface IUInt64Value { - /** Binding condition. */ - public condition?: (google.type.IExpr|null); + /** UInt64Value value */ + value?: (number|Long|string|null); + } - /** - * Creates a new Binding instance using the specified properties. - * @param [properties] Properties to set - * @returns Binding instance - */ - public static create(properties?: google.iam.v1.IBinding): google.iam.v1.Binding; + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { - /** - * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @param message Binding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Constructs a new UInt64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt64Value); - /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @param message Binding message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IBinding, writer?: $protobuf.Writer): $protobuf.Writer; + /** UInt64Value value. */ + public value: (number|Long|string); - /** - * Decodes a Binding message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.Binding; + /** + * Creates a new UInt64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt64Value instance + */ + public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; - /** - * Decodes a Binding message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.Binding; + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a Binding message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a Binding message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Binding - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.Binding; + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt64Value + * @throws {Error} If the payload is not 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.UInt64Value; - /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. - * @param message Binding - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.Binding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt64Value + * @throws {Error} If the payload 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.UInt64Value; - /** - * Converts this Binding to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Verifies a UInt64Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Gets the default type url for Binding - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; - /** Properties of an AuditConfig. */ - interface IAuditConfig { + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** AuditConfig service */ - service?: (string|null); + /** + * Converts this UInt64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** AuditConfig auditLogConfigs */ - auditLogConfigs?: (google.iam.v1.IAuditLogConfig[]|null); - } + /** + * Gets the default type url for UInt64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Represents an AuditConfig. */ - class AuditConfig implements IAuditConfig { + /** Properties of an Int32Value. */ + interface IInt32Value { - /** - * Constructs a new AuditConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IAuditConfig); + /** Int32Value value */ + value?: (number|null); + } + + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { - /** AuditConfig service. */ - public service: string; + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); - /** AuditConfig auditLogConfigs. */ - public auditLogConfigs: google.iam.v1.IAuditLogConfig[]; + /** Int32Value value. */ + public value: number; - /** - * Creates a new AuditConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditConfig instance - */ - public static create(properties?: google.iam.v1.IAuditConfig): google.iam.v1.AuditConfig; + /** + * Creates a new Int32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int32Value instance + */ + public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; - /** - * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @param message AuditConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @param message AuditConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IAuditConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes an AuditConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfig; + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int32Value + * @throws {Error} If the payload is not 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.Int32Value; - /** - * Decodes an AuditConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfig; + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int32Value + * @throws {Error} If the payload 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.Int32Value; - /** - * Verifies an AuditConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies an Int32Value message. + * @param message Plain 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 AuditConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditConfig - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfig; + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; - /** - * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. - * @param message AuditConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.AuditConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this AuditConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this Int32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for AuditConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for Int32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt32Value. */ + interface IUInt32Value { - /** Properties of an AuditLogConfig. */ - interface IAuditLogConfig { + /** UInt32Value value */ + value?: (number|null); + } - /** AuditLogConfig logType */ - logType?: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType|null); + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { - /** AuditLogConfig exemptedMembers */ - exemptedMembers?: (string[]|null); - } + /** + * Constructs a new UInt32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt32Value); - /** Represents an AuditLogConfig. */ - class AuditLogConfig implements IAuditLogConfig { + /** UInt32Value value. */ + public value: number; - /** - * Constructs a new AuditLogConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IAuditLogConfig); + /** + * Creates a new UInt32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt32Value instance + */ + public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; - /** AuditLogConfig logType. */ - public logType: (google.iam.v1.AuditLogConfig.LogType|keyof typeof google.iam.v1.AuditLogConfig.LogType); + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - /** AuditLogConfig exemptedMembers. */ - public exemptedMembers: string[]; + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a new AuditLogConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditLogConfig instance - */ - public static create(properties?: google.iam.v1.IAuditLogConfig): google.iam.v1.AuditLogConfig; + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt32Value + * @throws {Error} If the payload is not 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.UInt32Value; - /** - * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @param message AuditLogConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt32Value + * @throws {Error} If the payload 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.UInt32Value; - /** - * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @param message AuditLogConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IAuditLogConfig, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a UInt32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes an AuditLogConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditLogConfig; + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; - /** - * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditLogConfig; + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies an AuditLogConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this UInt32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditLogConfig - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditLogConfig; + /** + * Gets the default type url for UInt32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. - * @param message AuditLogConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.AuditLogConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a BoolValue. */ + interface IBoolValue { - /** - * Converts this AuditLogConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** BoolValue value */ + value?: (boolean|null); + } - /** - * Gets the default type url for AuditLogConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { - namespace AuditLogConfig { + /** + * Constructs a new BoolValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBoolValue); - /** LogType enum. */ - enum LogType { - LOG_TYPE_UNSPECIFIED = 0, - ADMIN_READ = 1, - DATA_WRITE = 2, - DATA_READ = 3 - } - } + /** BoolValue value. */ + public value: boolean; - /** Properties of a PolicyDelta. */ - interface IPolicyDelta { + /** + * Creates a new BoolValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BoolValue instance + */ + public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; - /** PolicyDelta bindingDeltas */ - bindingDeltas?: (google.iam.v1.IBindingDelta[]|null); + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** PolicyDelta auditConfigDeltas */ - auditConfigDeltas?: (google.iam.v1.IAuditConfigDelta[]|null); - } + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a PolicyDelta. */ - class PolicyDelta implements IPolicyDelta { + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoolValue + * @throws {Error} If the payload is not 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.BoolValue; - /** - * Constructs a new PolicyDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IPolicyDelta); + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoolValue + * @throws {Error} If the payload 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.BoolValue; - /** PolicyDelta bindingDeltas. */ - public bindingDeltas: google.iam.v1.IBindingDelta[]; + /** + * Verifies a BoolValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** PolicyDelta auditConfigDeltas. */ - public auditConfigDeltas: google.iam.v1.IAuditConfigDelta[]; + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoolValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; - /** - * Creates a new PolicyDelta instance using the specified properties. - * @param [properties] Properties to set - * @returns PolicyDelta instance - */ - public static create(properties?: google.iam.v1.IPolicyDelta): google.iam.v1.PolicyDelta; + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @param message PolicyDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this BoolValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @param message PolicyDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IPolicyDelta, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Gets the default type url for BoolValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Decodes a PolicyDelta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.PolicyDelta; + /** Properties of a StringValue. */ + interface IStringValue { - /** - * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.PolicyDelta; + /** StringValue value */ + value?: (string|null); + } - /** - * Verifies a PolicyDelta message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** Represents a StringValue. */ + class StringValue implements IStringValue { - /** - * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PolicyDelta - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.PolicyDelta; + /** + * Constructs a new StringValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStringValue); - /** - * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. - * @param message PolicyDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.PolicyDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** StringValue value. */ + public value: string; - /** - * Converts this PolicyDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a new StringValue instance using the specified properties. + * @param [properties] Properties to set + * @returns StringValue instance + */ + public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; - /** - * Gets the default type url for PolicyDelta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** Properties of a BindingDelta. */ - interface IBindingDelta { + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** BindingDelta action */ - action?: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action|null); + /** + * Decodes a StringValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringValue + * @throws {Error} If the payload is not 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.StringValue; - /** BindingDelta role */ - role?: (string|null); + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringValue + * @throws {Error} If the payload 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.StringValue; - /** BindingDelta member */ - member?: (string|null); + /** + * Verifies a StringValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** BindingDelta condition */ - condition?: (google.type.IExpr|null); - } + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; - /** Represents a BindingDelta. */ - class BindingDelta implements IBindingDelta { + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new BindingDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IBindingDelta); + /** + * Converts this StringValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** BindingDelta action. */ - public action: (google.iam.v1.BindingDelta.Action|keyof typeof google.iam.v1.BindingDelta.Action); + /** + * Gets the default type url for StringValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** BindingDelta role. */ - public role: string; + /** Properties of a BytesValue. */ + interface IBytesValue { - /** BindingDelta member. */ - public member: string; + /** BytesValue value */ + value?: (Uint8Array|string|null); + } - /** BindingDelta condition. */ - public condition?: (google.type.IExpr|null); + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { - /** - * Creates a new BindingDelta instance using the specified properties. - * @param [properties] Properties to set - * @returns BindingDelta instance - */ - public static create(properties?: google.iam.v1.IBindingDelta): google.iam.v1.BindingDelta; + /** + * Constructs a new BytesValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBytesValue); - /** - * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @param message BindingDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + /** BytesValue value. */ + public value: (Uint8Array|string); - /** - * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @param message BindingDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IBindingDelta, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a new BytesValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BytesValue instance + */ + public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; - /** - * Decodes a BindingDelta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.BindingDelta; + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a BindingDelta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.BindingDelta; + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Verifies a BindingDelta message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BytesValue + * @throws {Error} If the payload is not 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.BytesValue; - /** - * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BindingDelta - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.BindingDelta; + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BytesValue + * @throws {Error} If the payload 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.BytesValue; - /** - * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. - * @param message BindingDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.BindingDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Verifies a BytesValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Converts this BindingDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BytesValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; - /** - * Gets the default type url for BindingDelta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - namespace BindingDelta { + /** + * Converts this BytesValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - ADD = 1, - REMOVE = 2 - } - } + /** + * Gets the default type url for BytesValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** Properties of an AuditConfigDelta. */ - interface IAuditConfigDelta { + /** Namespace type. */ + namespace type { - /** AuditConfigDelta action */ - action?: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action|null); + /** DayOfWeek enum. */ + enum DayOfWeek { + DAY_OF_WEEK_UNSPECIFIED = 0, + MONDAY = 1, + TUESDAY = 2, + WEDNESDAY = 3, + THURSDAY = 4, + FRIDAY = 5, + SATURDAY = 6, + SUNDAY = 7 + } - /** AuditConfigDelta service */ - service?: (string|null); + /** Month enum. */ + enum Month { + MONTH_UNSPECIFIED = 0, + JANUARY = 1, + FEBRUARY = 2, + MARCH = 3, + APRIL = 4, + MAY = 5, + JUNE = 6, + JULY = 7, + AUGUST = 8, + SEPTEMBER = 9, + OCTOBER = 10, + NOVEMBER = 11, + DECEMBER = 12 + } + } - /** AuditConfigDelta exemptedMember */ - exemptedMember?: (string|null); + /** Namespace rpc. */ + namespace rpc { - /** AuditConfigDelta logType */ - logType?: (string|null); - } + /** Properties of a Status. */ + interface IStatus { - /** Represents an AuditConfigDelta. */ - class AuditConfigDelta implements IAuditConfigDelta { + /** Status code */ + code?: (number|null); - /** - * Constructs a new AuditConfigDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.iam.v1.IAuditConfigDelta); + /** Status message */ + message?: (string|null); - /** AuditConfigDelta action. */ - public action: (google.iam.v1.AuditConfigDelta.Action|keyof typeof google.iam.v1.AuditConfigDelta.Action); + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } - /** AuditConfigDelta service. */ - public service: string; + /** Represents a Status. */ + class Status implements IStatus { - /** AuditConfigDelta exemptedMember. */ - public exemptedMember: string; + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); - /** AuditConfigDelta logType. */ - public logType: string; + /** Status code. */ + public code: number; - /** - * Creates a new AuditConfigDelta instance using the specified properties. - * @param [properties] Properties to set - * @returns AuditConfigDelta instance - */ - public static create(properties?: google.iam.v1.IAuditConfigDelta): google.iam.v1.AuditConfigDelta; + /** Status message. */ + public message: string; - /** - * Encodes the specified AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @param message AuditConfigDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + /** Status details. */ + public details: google.protobuf.IAny[]; - /** - * Encodes the specified AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @param message AuditConfigDelta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.iam.v1.IAuditConfigDelta, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * 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; - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.iam.v1.AuditConfigDelta; + /** + * 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; - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.iam.v1.AuditConfigDelta; + /** + * 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; - /** - * Verifies an AuditConfigDelta message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * 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; - /** - * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuditConfigDelta - */ - public static fromObject(object: { [k: string]: any }): google.iam.v1.AuditConfigDelta; + /** + * 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; - /** - * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. - * @param message AuditConfigDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.iam.v1.AuditConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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); - /** - * Converts this AuditConfigDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * 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; - /** - * Gets the default type url for AuditConfigDelta - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * 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 }; - namespace AuditConfigDelta { + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Action enum. */ - enum Action { - ACTION_UNSPECIFIED = 0, - ADD = 1, - REMOVE = 2 - } - } + /** + * 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/packages/google-cloud-backupdr/protos/protos.js b/packages/google-cloud-backupdr/protos/protos.js index ba2ac5f0c52..34c1fd94966 100644 --- a/packages/google-cloud-backupdr/protos/protos.js +++ b/packages/google-cloud-backupdr/protos/protos.js @@ -428,39 +428,6 @@ * @variation 2 */ - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|testIamPermissions}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse - */ - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - /** * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listDataSources}. * @memberof google.cloud.backupdr.v1.BackupDR @@ -560,204 +527,6 @@ * @variation 2 */ - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|removeDataSource}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef RemoveDataSourceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RemoveDataSource. - * @function removeDataSource - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} request RemoveDataSourceRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.RemoveDataSourceCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.removeDataSource = function removeDataSource(request, callback) { - return this.rpcCall(removeDataSource, $root.google.cloud.backupdr.v1.RemoveDataSourceRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RemoveDataSource" }); - - /** - * Calls RemoveDataSource. - * @function removeDataSource - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} request RemoveDataSourceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|setInternalStatus}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef SetInternalStatusCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls SetInternalStatus. - * @function setInternalStatus - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} request SetInternalStatusRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.SetInternalStatusCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.setInternalStatus = function setInternalStatus(request, callback) { - return this.rpcCall(setInternalStatus, $root.google.cloud.backupdr.v1.SetInternalStatusRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "SetInternalStatus" }); - - /** - * Calls SetInternalStatus. - * @function setInternalStatus - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} request SetInternalStatusRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|initiateBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef InitiateBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.InitiateBackupResponse} [response] InitiateBackupResponse - */ - - /** - * Calls InitiateBackup. - * @function initiateBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} request InitiateBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.InitiateBackupCallback} callback Node-style callback called with the error, if any, and InitiateBackupResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.initiateBackup = function initiateBackup(request, callback) { - return this.rpcCall(initiateBackup, $root.google.cloud.backupdr.v1.InitiateBackupRequest, $root.google.cloud.backupdr.v1.InitiateBackupResponse, request, callback); - }, "name", { value: "InitiateBackup" }); - - /** - * Calls InitiateBackup. - * @function initiateBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} request InitiateBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|abandonBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef AbandonBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls AbandonBackup. - * @function abandonBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} request AbandonBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.AbandonBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.abandonBackup = function abandonBackup(request, callback) { - return this.rpcCall(abandonBackup, $root.google.cloud.backupdr.v1.AbandonBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "AbandonBackup" }); - - /** - * Calls AbandonBackup. - * @function abandonBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} request AbandonBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|finalizeBackup}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef FinalizeBackupCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls FinalizeBackup. - * @function finalizeBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} request FinalizeBackupRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.FinalizeBackupCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.finalizeBackup = function finalizeBackup(request, callback) { - return this.rpcCall(finalizeBackup, $root.google.cloud.backupdr.v1.FinalizeBackupRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "FinalizeBackup" }); - - /** - * Calls FinalizeBackup. - * @function finalizeBackup - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} request FinalizeBackupRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|fetchAccessToken}. - * @memberof google.cloud.backupdr.v1.BackupDR - * @typedef FetchAccessTokenCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.backupdr.v1.FetchAccessTokenResponse} [response] FetchAccessTokenResponse - */ - - /** - * Calls FetchAccessToken. - * @function fetchAccessToken - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} request FetchAccessTokenRequest message or plain object - * @param {google.cloud.backupdr.v1.BackupDR.FetchAccessTokenCallback} callback Node-style callback called with the error, if any, and FetchAccessTokenResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(BackupDR.prototype.fetchAccessToken = function fetchAccessToken(request, callback) { - return this.rpcCall(fetchAccessToken, $root.google.cloud.backupdr.v1.FetchAccessTokenRequest, $root.google.cloud.backupdr.v1.FetchAccessTokenResponse, request, callback); - }, "name", { value: "FetchAccessToken" }); - - /** - * Calls FetchAccessToken. - * @function fetchAccessToken - * @memberof google.cloud.backupdr.v1.BackupDR - * @instance - * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} request FetchAccessTokenRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - /** * Callback as used by {@link google.cloud.backupdr.v1.BackupDR|listBackups}. * @memberof google.cloud.backupdr.v1.BackupDR @@ -19164,25 +18933,29 @@ return UpdateDataSourceRequest; })(); - v1.RemoveDataSourceRequest = (function() { + v1.ListBackupsRequest = (function() { /** - * Properties of a RemoveDataSourceRequest. + * Properties of a ListBackupsRequest. * @memberof google.cloud.backupdr.v1 - * @interface IRemoveDataSourceRequest - * @property {string|null} [name] RemoveDataSourceRequest name - * @property {string|null} [requestId] RemoveDataSourceRequest requestId + * @interface IListBackupsRequest + * @property {string|null} [parent] ListBackupsRequest parent + * @property {number|null} [pageSize] ListBackupsRequest pageSize + * @property {string|null} [pageToken] ListBackupsRequest pageToken + * @property {string|null} [filter] ListBackupsRequest filter + * @property {string|null} [orderBy] ListBackupsRequest orderBy + * @property {google.cloud.backupdr.v1.BackupView|null} [view] ListBackupsRequest view */ /** - * Constructs a new RemoveDataSourceRequest. + * Constructs a new ListBackupsRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a RemoveDataSourceRequest. - * @implements IRemoveDataSourceRequest + * @classdesc Represents a ListBackupsRequest. + * @implements IListBackupsRequest * @constructor - * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set */ - function RemoveDataSourceRequest(properties) { + function ListBackupsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19190,89 +18963,145 @@ } /** - * RemoveDataSourceRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * ListBackupsRequest parent. + * @member {string} parent + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.parent = ""; + + /** + * ListBackupsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @instance */ - RemoveDataSourceRequest.prototype.name = ""; + ListBackupsRequest.prototype.pageSize = 0; /** - * RemoveDataSourceRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * ListBackupsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.pageToken = ""; + + /** + * ListBackupsRequest filter. + * @member {string} filter + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.filter = ""; + + /** + * ListBackupsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @instance + */ + ListBackupsRequest.prototype.orderBy = ""; + + /** + * ListBackupsRequest view. + * @member {google.cloud.backupdr.v1.BackupView} view + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @instance */ - RemoveDataSourceRequest.prototype.requestId = ""; + ListBackupsRequest.prototype.view = 0; /** - * Creates a new RemoveDataSourceRequest instance using the specified properties. + * Creates a new ListBackupsRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @static - * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest instance + * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest instance */ - RemoveDataSourceRequest.create = function create(properties) { - return new RemoveDataSourceRequest(properties); + ListBackupsRequest.create = function create(properties) { + return new ListBackupsRequest(properties); }; /** - * Encodes the specified RemoveDataSourceRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. + * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @static - * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} message RemoveDataSourceRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RemoveDataSourceRequest.encode = function encode(message, writer) { + ListBackupsRequest.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.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); + if (message.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); return writer; }; /** - * Encodes the specified RemoveDataSourceRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RemoveDataSourceRequest.verify|verify} messages. + * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @static - * @param {google.cloud.backupdr.v1.IRemoveDataSourceRequest} message RemoveDataSourceRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RemoveDataSourceRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RemoveDataSourceRequest message from the specified reader or buffer. + * Decodes a ListBackupsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RemoveDataSourceRequest.decode = function decode(reader, length) { + ListBackupsRequest.decode = function 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.backupdr.v1.RemoveDataSourceRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ListBackupsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.requestId = reader.string(); + 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; + } + case 6: { + message.view = reader.int32(); break; } default: @@ -19284,134 +19113,191 @@ }; /** - * Decodes a RemoveDataSourceRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RemoveDataSourceRequest.decodeDelimited = function decodeDelimited(reader) { + ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RemoveDataSourceRequest message. + * Verifies a ListBackupsRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RemoveDataSourceRequest.verify = function verify(message) { + ListBackupsRequest.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.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"; + if (message.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a RemoveDataSourceRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.RemoveDataSourceRequest} RemoveDataSourceRequest + * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest */ - RemoveDataSourceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.RemoveDataSourceRequest) + ListBackupsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsRequest) return object; - var message = new $root.google.cloud.backupdr.v1.RemoveDataSourceRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); + var message = new $root.google.cloud.backupdr.v1.ListBackupsRequest(); + 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); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VIEW_FULL": + case 2: + message.view = 2; + break; + } return message; }; /** - * Creates a plain object from a RemoveDataSourceRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @static - * @param {google.cloud.backupdr.v1.RemoveDataSourceRequest} message RemoveDataSourceRequest + * @param {google.cloud.backupdr.v1.ListBackupsRequest} message ListBackupsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RemoveDataSourceRequest.toObject = function toObject(message, options) { + ListBackupsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.requestId = ""; + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + 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; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; return object; }; /** - * Converts this RemoveDataSourceRequest to JSON. + * Converts this ListBackupsRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @instance * @returns {Object.} JSON object */ - RemoveDataSourceRequest.prototype.toJSON = function toJSON() { + ListBackupsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RemoveDataSourceRequest + * Gets the default type url for ListBackupsRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.RemoveDataSourceRequest + * @memberof google.cloud.backupdr.v1.ListBackupsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RemoveDataSourceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.RemoveDataSourceRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsRequest"; }; - return RemoveDataSourceRequest; + return ListBackupsRequest; })(); - v1.SetInternalStatusRequest = (function() { + v1.ListBackupsResponse = (function() { /** - * Properties of a SetInternalStatusRequest. + * Properties of a ListBackupsResponse. * @memberof google.cloud.backupdr.v1 - * @interface ISetInternalStatusRequest - * @property {string|null} [dataSource] SetInternalStatusRequest dataSource - * @property {Uint8Array|null} [value] SetInternalStatusRequest value - * @property {google.cloud.backupdr.v1.BackupConfigState|null} [backupConfigState] SetInternalStatusRequest backupConfigState - * @property {string|null} [requestId] SetInternalStatusRequest requestId + * @interface IListBackupsResponse + * @property {Array.|null} [backups] ListBackupsResponse backups + * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken + * @property {Array.|null} [unreachable] ListBackupsResponse unreachable */ /** - * Constructs a new SetInternalStatusRequest. + * Constructs a new ListBackupsResponse. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a SetInternalStatusRequest. - * @implements ISetInternalStatusRequest + * @classdesc Represents a ListBackupsResponse. + * @implements IListBackupsResponse * @constructor - * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set */ - function SetInternalStatusRequest(properties) { + function ListBackupsResponse(properties) { + this.backups = []; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19419,117 +19305,109 @@ } /** - * SetInternalStatusRequest dataSource. - * @member {string} dataSource - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @instance - */ - SetInternalStatusRequest.prototype.dataSource = ""; - - /** - * SetInternalStatusRequest value. - * @member {Uint8Array} value - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * ListBackupsResponse backups. + * @member {Array.} backups + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @instance */ - SetInternalStatusRequest.prototype.value = $util.newBuffer([]); + ListBackupsResponse.prototype.backups = $util.emptyArray; /** - * SetInternalStatusRequest backupConfigState. - * @member {google.cloud.backupdr.v1.BackupConfigState} backupConfigState - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * ListBackupsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @instance */ - SetInternalStatusRequest.prototype.backupConfigState = 0; + ListBackupsResponse.prototype.nextPageToken = ""; /** - * SetInternalStatusRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * ListBackupsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @instance */ - SetInternalStatusRequest.prototype.requestId = ""; + ListBackupsResponse.prototype.unreachable = $util.emptyArray; /** - * Creates a new SetInternalStatusRequest instance using the specified properties. + * Creates a new ListBackupsResponse instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @static - * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest instance + * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse instance */ - SetInternalStatusRequest.create = function create(properties) { - return new SetInternalStatusRequest(properties); + ListBackupsResponse.create = function create(properties) { + return new ListBackupsResponse(properties); }; /** - * Encodes the specified SetInternalStatusRequest message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. + * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @static - * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} message SetInternalStatusRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetInternalStatusRequest.encode = function encode(message, writer) { + ListBackupsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - if (message.backupConfigState != null && Object.hasOwnProperty.call(message, "backupConfigState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.backupConfigState); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.backups != null && message.backups.length) + for (var i = 0; i < message.backups.length; ++i) + $root.google.cloud.backupdr.v1.Backup.encode(message.backups[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 SetInternalStatusRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusRequest.verify|verify} messages. + * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @static - * @param {google.cloud.backupdr.v1.ISetInternalStatusRequest} message SetInternalStatusRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetInternalStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetInternalStatusRequest message from the specified reader or buffer. + * Decodes a ListBackupsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetInternalStatusRequest.decode = function decode(reader, length) { + ListBackupsResponse.decode = function 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.backupdr.v1.SetInternalStatusRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ListBackupsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.dataSource = reader.string(); + if (!(message.backups && message.backups.length)) + message.backups = []; + message.backups.push($root.google.cloud.backupdr.v1.Backup.decode(reader, reader.uint32())); break; } case 2: { - message.value = reader.bytes(); + message.nextPageToken = reader.string(); break; } case 3: { - message.backupConfigState = reader.int32(); - break; - } - case 4: { - message.requestId = reader.string(); + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); break; } default: @@ -19541,179 +19419,170 @@ }; /** - * Decodes a SetInternalStatusRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetInternalStatusRequest.decodeDelimited = function decodeDelimited(reader) { + ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetInternalStatusRequest message. + * Verifies a ListBackupsResponse message. * @function verify - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetInternalStatusRequest.verify = function verify(message) { + ListBackupsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: 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"; - if (message.backupConfigState != null && message.hasOwnProperty("backupConfigState")) - switch (message.backupConfigState) { - default: - return "backupConfigState: enum value expected"; - case 0: - case 1: - case 2: - break; + if (message.backups != null && message.hasOwnProperty("backups")) { + if (!Array.isArray(message.backups)) + return "backups: array expected"; + for (var i = 0; i < message.backups.length; ++i) { + var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backups[i]); + if (error) + return "backups." + error; } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + } + 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 SetInternalStatusRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.SetInternalStatusRequest} SetInternalStatusRequest + * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse */ - SetInternalStatusRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.SetInternalStatusRequest) + ListBackupsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsResponse) return object; - var message = new $root.google.cloud.backupdr.v1.SetInternalStatusRequest(); - if (object.dataSource != null) - message.dataSource = String(object.dataSource); - 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; - switch (object.backupConfigState) { - default: - if (typeof object.backupConfigState === "number") { - message.backupConfigState = object.backupConfigState; - break; + var message = new $root.google.cloud.backupdr.v1.ListBackupsResponse(); + if (object.backups) { + if (!Array.isArray(object.backups)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: array expected"); + message.backups = []; + for (var i = 0; i < object.backups.length; ++i) { + if (typeof object.backups[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: object expected"); + message.backups[i] = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backups[i]); } - break; - case "BACKUP_CONFIG_STATE_UNSPECIFIED": - case 0: - message.backupConfigState = 0; - break; - case "ACTIVE": - case 1: - message.backupConfigState = 1; - break; - case "PASSIVE": - case 2: - message.backupConfigState = 2; - break; } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a SetInternalStatusRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest - * @static - * @param {google.cloud.backupdr.v1.SetInternalStatusRequest} message SetInternalStatusRequest + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.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 ListBackupsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * @static + * @param {google.cloud.backupdr.v1.ListBackupsResponse} message ListBackupsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetInternalStatusRequest.toObject = function toObject(message, options) { + ListBackupsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.dataSource = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - object.backupConfigState = options.enums === String ? "BACKUP_CONFIG_STATE_UNSPECIFIED" : 0; - object.requestId = ""; + if (options.arrays || options.defaults) { + object.backups = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.backups && message.backups.length) { + object.backups = []; + for (var j = 0; j < message.backups.length; ++j) + object.backups[j] = $root.google.cloud.backupdr.v1.Backup.toObject(message.backups[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]; } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; - 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; - if (message.backupConfigState != null && message.hasOwnProperty("backupConfigState")) - object.backupConfigState = options.enums === String ? $root.google.cloud.backupdr.v1.BackupConfigState[message.backupConfigState] === undefined ? message.backupConfigState : $root.google.cloud.backupdr.v1.BackupConfigState[message.backupConfigState] : message.backupConfigState; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; return object; }; /** - * Converts this SetInternalStatusRequest to JSON. + * Converts this ListBackupsResponse to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @instance * @returns {Object.} JSON object */ - SetInternalStatusRequest.prototype.toJSON = function toJSON() { + ListBackupsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SetInternalStatusRequest + * Gets the default type url for ListBackupsResponse * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.SetInternalStatusRequest + * @memberof google.cloud.backupdr.v1.ListBackupsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SetInternalStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.SetInternalStatusRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsResponse"; }; - return SetInternalStatusRequest; + return ListBackupsResponse; })(); - v1.SetInternalStatusResponse = (function() { + v1.GetBackupRequest = (function() { /** - * Properties of a SetInternalStatusResponse. + * Properties of a GetBackupRequest. * @memberof google.cloud.backupdr.v1 - * @interface ISetInternalStatusResponse + * @interface IGetBackupRequest + * @property {string|null} [name] GetBackupRequest name + * @property {google.cloud.backupdr.v1.BackupView|null} [view] GetBackupRequest view */ /** - * Constructs a new SetInternalStatusResponse. + * Constructs a new GetBackupRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a SetInternalStatusResponse. - * @implements ISetInternalStatusResponse + * @classdesc Represents a GetBackupRequest. + * @implements IGetBackupRequest * @constructor - * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set */ - function SetInternalStatusResponse(properties) { + function GetBackupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19721,63 +19590,91 @@ } /** - * Creates a new SetInternalStatusResponse instance using the specified properties. + * GetBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @instance + */ + GetBackupRequest.prototype.name = ""; + + /** + * GetBackupRequest view. + * @member {google.cloud.backupdr.v1.BackupView} view + * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @instance + */ + GetBackupRequest.prototype.view = 0; + + /** + * Creates a new GetBackupRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @static - * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse instance + * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest instance */ - SetInternalStatusResponse.create = function create(properties) { - return new SetInternalStatusResponse(properties); + GetBackupRequest.create = function create(properties) { + return new GetBackupRequest(properties); }; /** - * Encodes the specified SetInternalStatusResponse message. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. + * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @static - * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse} message SetInternalStatusResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetInternalStatusResponse.encode = function encode(message, writer) { + GetBackupRequest.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.view != null && Object.hasOwnProperty.call(message, "view")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); return writer; }; /** - * Encodes the specified SetInternalStatusResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SetInternalStatusResponse.verify|verify} messages. + * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @static - * @param {google.cloud.backupdr.v1.ISetInternalStatusResponse} message SetInternalStatusResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SetInternalStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SetInternalStatusResponse message from the specified reader or buffer. + * Decodes a GetBackupRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetInternalStatusResponse.decode = function decode(reader, length) { + GetBackupRequest.decode = function 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.backupdr.v1.SetInternalStatusResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.GetBackupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.view = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -19787,111 +19684,157 @@ }; /** - * Decodes a SetInternalStatusResponse message from the specified reader or buffer, length delimited. + * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SetInternalStatusResponse.decodeDelimited = function decodeDelimited(reader) { + GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SetInternalStatusResponse message. + * Verifies a GetBackupRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SetInternalStatusResponse.verify = function verify(message) { + GetBackupRequest.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.view != null && message.hasOwnProperty("view")) + switch (message.view) { + default: + return "view: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a SetInternalStatusResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.SetInternalStatusResponse} SetInternalStatusResponse + * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest */ - SetInternalStatusResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.SetInternalStatusResponse) + GetBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GetBackupRequest) return object; - return new $root.google.cloud.backupdr.v1.SetInternalStatusResponse(); + var message = new $root.google.cloud.backupdr.v1.GetBackupRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.view) { + default: + if (typeof object.view === "number") { + message.view = object.view; + break; + } + break; + case "BACKUP_VIEW_UNSPECIFIED": + case 0: + message.view = 0; + break; + case "BACKUP_VIEW_BASIC": + case 1: + message.view = 1; + break; + case "BACKUP_VIEW_FULL": + case 2: + message.view = 2; + break; + } + return message; }; /** - * Creates a plain object from a SetInternalStatusResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @static - * @param {google.cloud.backupdr.v1.SetInternalStatusResponse} message SetInternalStatusResponse + * @param {google.cloud.backupdr.v1.GetBackupRequest} message GetBackupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SetInternalStatusResponse.toObject = function toObject() { - return {}; + GetBackupRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.view != null && message.hasOwnProperty("view")) + object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; + return object; }; /** - * Converts this SetInternalStatusResponse to JSON. + * Converts this GetBackupRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @instance * @returns {Object.} JSON object */ - SetInternalStatusResponse.prototype.toJSON = function toJSON() { + GetBackupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SetInternalStatusResponse + * Gets the default type url for GetBackupRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.SetInternalStatusResponse + * @memberof google.cloud.backupdr.v1.GetBackupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SetInternalStatusResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.SetInternalStatusResponse"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupRequest"; }; - return SetInternalStatusResponse; + return GetBackupRequest; })(); - v1.InitiateBackupRequest = (function() { + v1.UpdateBackupRequest = (function() { /** - * Properties of an InitiateBackupRequest. + * Properties of an UpdateBackupRequest. * @memberof google.cloud.backupdr.v1 - * @interface IInitiateBackupRequest - * @property {string|null} [dataSource] InitiateBackupRequest dataSource - * @property {string|null} [requestId] InitiateBackupRequest requestId - * @property {string|null} [backupId] InitiateBackupRequest backupId + * @interface IUpdateBackupRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupRequest updateMask + * @property {google.cloud.backupdr.v1.IBackup|null} [backup] UpdateBackupRequest backup + * @property {string|null} [requestId] UpdateBackupRequest requestId */ /** - * Constructs a new InitiateBackupRequest. + * Constructs a new UpdateBackupRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an InitiateBackupRequest. - * @implements IInitiateBackupRequest + * @classdesc Represents an UpdateBackupRequest. + * @implements IUpdateBackupRequest * @constructor - * @param {google.cloud.backupdr.v1.IInitiateBackupRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set */ - function InitiateBackupRequest(properties) { + function UpdateBackupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -19899,103 +19842,103 @@ } /** - * InitiateBackupRequest dataSource. - * @member {string} dataSource - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * UpdateBackupRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @instance */ - InitiateBackupRequest.prototype.dataSource = ""; + UpdateBackupRequest.prototype.updateMask = null; /** - * InitiateBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * UpdateBackupRequest backup. + * @member {google.cloud.backupdr.v1.IBackup|null|undefined} backup + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @instance */ - InitiateBackupRequest.prototype.requestId = ""; + UpdateBackupRequest.prototype.backup = null; /** - * InitiateBackupRequest backupId. - * @member {string} backupId - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * UpdateBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @instance */ - InitiateBackupRequest.prototype.backupId = ""; + UpdateBackupRequest.prototype.requestId = ""; /** - * Creates a new InitiateBackupRequest instance using the specified properties. + * Creates a new UpdateBackupRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @static - * @param {google.cloud.backupdr.v1.IInitiateBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest instance + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest instance */ - InitiateBackupRequest.create = function create(properties) { - return new InitiateBackupRequest(properties); + UpdateBackupRequest.create = function create(properties) { + return new UpdateBackupRequest(properties); }; /** - * Encodes the specified InitiateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. + * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @static - * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} message InitiateBackupRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InitiateBackupRequest.encode = function encode(message, writer) { + UpdateBackupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); + 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.backup != null && Object.hasOwnProperty.call(message, "backup")) + $root.google.cloud.backupdr.v1.Backup.encode(message.backup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - if (message.backupId != null && Object.hasOwnProperty.call(message, "backupId")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.backupId); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); return writer; }; /** - * Encodes the specified InitiateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupRequest.verify|verify} messages. + * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @static - * @param {google.cloud.backupdr.v1.IInitiateBackupRequest} message InitiateBackupRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InitiateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InitiateBackupRequest message from the specified reader or buffer. + * Decodes an UpdateBackupRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InitiateBackupRequest.decode = function decode(reader, length) { + UpdateBackupRequest.decode = function 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.backupdr.v1.InitiateBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.UpdateBackupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.dataSource = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.requestId = reader.string(); + message.backup = $root.google.cloud.backupdr.v1.Backup.decode(reader, reader.uint32()); break; } - case 5: { - message.backupId = reader.string(); + case 3: { + message.requestId = reader.string(); break; } default: @@ -20007,141 +19950,150 @@ }; /** - * Decodes an InitiateBackupRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InitiateBackupRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateBackupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InitiateBackupRequest message. + * Verifies an UpdateBackupRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InitiateBackupRequest.verify = function verify(message) { + UpdateBackupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.backup != null && message.hasOwnProperty("backup")) { + var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backup); + if (error) + return "backup." + error; + } if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isString(message.requestId)) return "requestId: string expected"; - if (message.backupId != null && message.hasOwnProperty("backupId")) - if (!$util.isString(message.backupId)) - return "backupId: string expected"; return null; }; /** - * Creates an InitiateBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.InitiateBackupRequest} InitiateBackupRequest + * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest */ - InitiateBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.InitiateBackupRequest) + UpdateBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupRequest) return object; - var message = new $root.google.cloud.backupdr.v1.InitiateBackupRequest(); - if (object.dataSource != null) - message.dataSource = String(object.dataSource); + var message = new $root.google.cloud.backupdr.v1.UpdateBackupRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.backup != null) { + if (typeof object.backup !== "object") + throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.backup: object expected"); + message.backup = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backup); + } if (object.requestId != null) message.requestId = String(object.requestId); - if (object.backupId != null) - message.backupId = String(object.backupId); return message; }; /** - * Creates a plain object from an InitiateBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @static - * @param {google.cloud.backupdr.v1.InitiateBackupRequest} message InitiateBackupRequest + * @param {google.cloud.backupdr.v1.UpdateBackupRequest} message UpdateBackupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InitiateBackupRequest.toObject = function toObject(message, options) { + UpdateBackupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.dataSource = ""; + object.updateMask = null; + object.backup = null; object.requestId = ""; - object.backupId = ""; } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.backup != null && message.hasOwnProperty("backup")) + object.backup = $root.google.cloud.backupdr.v1.Backup.toObject(message.backup, options); if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; - if (message.backupId != null && message.hasOwnProperty("backupId")) - object.backupId = message.backupId; return object; }; /** - * Converts this InitiateBackupRequest to JSON. + * Converts this UpdateBackupRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @instance * @returns {Object.} JSON object */ - InitiateBackupRequest.prototype.toJSON = function toJSON() { + UpdateBackupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for InitiateBackupRequest + * Gets the default type url for UpdateBackupRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.InitiateBackupRequest + * @memberof google.cloud.backupdr.v1.UpdateBackupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - InitiateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.InitiateBackupRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupRequest"; }; - return InitiateBackupRequest; + return UpdateBackupRequest; })(); - v1.InitiateBackupResponse = (function() { + v1.DeleteBackupRequest = (function() { /** - * Properties of an InitiateBackupResponse. + * Properties of a DeleteBackupRequest. * @memberof google.cloud.backupdr.v1 - * @interface IInitiateBackupResponse - * @property {string|null} [backup] InitiateBackupResponse backup - * @property {number|null} [newBackupGenerationId] InitiateBackupResponse newBackupGenerationId - * @property {number|null} [baseBackupGenerationId] InitiateBackupResponse baseBackupGenerationId + * @interface IDeleteBackupRequest + * @property {string|null} [name] DeleteBackupRequest name + * @property {string|null} [requestId] DeleteBackupRequest requestId */ /** - * Constructs a new InitiateBackupResponse. + * Constructs a new DeleteBackupRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an InitiateBackupResponse. - * @implements IInitiateBackupResponse + * @classdesc Represents a DeleteBackupRequest. + * @implements IDeleteBackupRequest * @constructor - * @param {google.cloud.backupdr.v1.IInitiateBackupResponse=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set */ - function InitiateBackupResponse(properties) { + function DeleteBackupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20149,103 +20101,89 @@ } /** - * InitiateBackupResponse backup. - * @member {string} backup - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse - * @instance - */ - InitiateBackupResponse.prototype.backup = ""; - - /** - * InitiateBackupResponse newBackupGenerationId. - * @member {number} newBackupGenerationId - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * DeleteBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @instance */ - InitiateBackupResponse.prototype.newBackupGenerationId = 0; + DeleteBackupRequest.prototype.name = ""; /** - * InitiateBackupResponse baseBackupGenerationId. - * @member {number} baseBackupGenerationId - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * DeleteBackupRequest requestId. + * @member {string} requestId + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @instance */ - InitiateBackupResponse.prototype.baseBackupGenerationId = 0; + DeleteBackupRequest.prototype.requestId = ""; /** - * Creates a new InitiateBackupResponse instance using the specified properties. + * Creates a new DeleteBackupRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @static - * @param {google.cloud.backupdr.v1.IInitiateBackupResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse instance + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest instance */ - InitiateBackupResponse.create = function create(properties) { - return new InitiateBackupResponse(properties); + DeleteBackupRequest.create = function create(properties) { + return new DeleteBackupRequest(properties); }; /** - * Encodes the specified InitiateBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. + * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @static - * @param {google.cloud.backupdr.v1.IInitiateBackupResponse} message InitiateBackupResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InitiateBackupResponse.encode = function encode(message, writer) { + DeleteBackupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.backup != null && Object.hasOwnProperty.call(message, "backup")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.backup); - if (message.newBackupGenerationId != null && Object.hasOwnProperty.call(message, "newBackupGenerationId")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.newBackupGenerationId); - if (message.baseBackupGenerationId != null && Object.hasOwnProperty.call(message, "baseBackupGenerationId")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.baseBackupGenerationId); + 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 InitiateBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InitiateBackupResponse.verify|verify} messages. + * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @static - * @param {google.cloud.backupdr.v1.IInitiateBackupResponse} message InitiateBackupResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - InitiateBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an InitiateBackupResponse message from the specified reader or buffer. + * Decodes a DeleteBackupRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InitiateBackupResponse.decode = function decode(reader, length) { + DeleteBackupRequest.decode = function 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.backupdr.v1.InitiateBackupResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.DeleteBackupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.backup = reader.string(); + message.name = reader.string(); break; } case 2: { - message.newBackupGenerationId = reader.int32(); - break; - } - case 3: { - message.baseBackupGenerationId = reader.int32(); + message.requestId = reader.string(); break; } default: @@ -20257,140 +20195,134 @@ }; /** - * Decodes an InitiateBackupResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - InitiateBackupResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an InitiateBackupResponse message. + * Verifies a DeleteBackupRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - InitiateBackupResponse.verify = function verify(message) { + DeleteBackupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.backup != null && message.hasOwnProperty("backup")) - if (!$util.isString(message.backup)) - return "backup: string expected"; - if (message.newBackupGenerationId != null && message.hasOwnProperty("newBackupGenerationId")) - if (!$util.isInteger(message.newBackupGenerationId)) - return "newBackupGenerationId: integer expected"; - if (message.baseBackupGenerationId != null && message.hasOwnProperty("baseBackupGenerationId")) - if (!$util.isInteger(message.baseBackupGenerationId)) - return "baseBackupGenerationId: integer 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 an InitiateBackupResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.InitiateBackupResponse} InitiateBackupResponse + * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest */ - InitiateBackupResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.InitiateBackupResponse) + DeleteBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupRequest) return object; - var message = new $root.google.cloud.backupdr.v1.InitiateBackupResponse(); - if (object.backup != null) - message.backup = String(object.backup); - if (object.newBackupGenerationId != null) - message.newBackupGenerationId = object.newBackupGenerationId | 0; - if (object.baseBackupGenerationId != null) - message.baseBackupGenerationId = object.baseBackupGenerationId | 0; + var message = new $root.google.cloud.backupdr.v1.DeleteBackupRequest(); + 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 an InitiateBackupResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @static - * @param {google.cloud.backupdr.v1.InitiateBackupResponse} message InitiateBackupResponse + * @param {google.cloud.backupdr.v1.DeleteBackupRequest} message DeleteBackupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - InitiateBackupResponse.toObject = function toObject(message, options) { + DeleteBackupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.backup = ""; - object.newBackupGenerationId = 0; - object.baseBackupGenerationId = 0; + object.name = ""; + object.requestId = ""; } - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = message.backup; - if (message.newBackupGenerationId != null && message.hasOwnProperty("newBackupGenerationId")) - object.newBackupGenerationId = message.newBackupGenerationId; - if (message.baseBackupGenerationId != null && message.hasOwnProperty("baseBackupGenerationId")) - object.baseBackupGenerationId = message.baseBackupGenerationId; + 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 InitiateBackupResponse to JSON. + * Converts this DeleteBackupRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @instance * @returns {Object.} JSON object */ - InitiateBackupResponse.prototype.toJSON = function toJSON() { + DeleteBackupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for InitiateBackupResponse + * Gets the default type url for DeleteBackupRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.InitiateBackupResponse + * @memberof google.cloud.backupdr.v1.DeleteBackupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - InitiateBackupResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.InitiateBackupResponse"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupRequest"; }; - return InitiateBackupResponse; + return DeleteBackupRequest; })(); - v1.AbandonBackupRequest = (function() { + v1.RestoreBackupRequest = (function() { /** - * Properties of an AbandonBackupRequest. + * Properties of a RestoreBackupRequest. * @memberof google.cloud.backupdr.v1 - * @interface IAbandonBackupRequest - * @property {string|null} [dataSource] AbandonBackupRequest dataSource - * @property {string|null} [requestId] AbandonBackupRequest requestId + * @interface IRestoreBackupRequest + * @property {string|null} [name] RestoreBackupRequest name + * @property {string|null} [requestId] RestoreBackupRequest requestId + * @property {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null} [computeInstanceTargetEnvironment] RestoreBackupRequest computeInstanceTargetEnvironment + * @property {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null} [computeInstanceRestoreProperties] RestoreBackupRequest computeInstanceRestoreProperties */ /** - * Constructs a new AbandonBackupRequest. + * Constructs a new RestoreBackupRequest. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AbandonBackupRequest. - * @implements IAbandonBackupRequest + * @classdesc Represents a RestoreBackupRequest. + * @implements IRestoreBackupRequest * @constructor - * @param {google.cloud.backupdr.v1.IAbandonBackupRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set */ - function AbandonBackupRequest(properties) { + function RestoreBackupRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20398,91 +20330,144 @@ } /** - * AbandonBackupRequest dataSource. - * @member {string} dataSource - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * RestoreBackupRequest name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @instance */ - AbandonBackupRequest.prototype.dataSource = ""; + RestoreBackupRequest.prototype.name = ""; /** - * AbandonBackupRequest requestId. + * RestoreBackupRequest requestId. * @member {string} requestId - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.requestId = ""; + + /** + * RestoreBackupRequest computeInstanceTargetEnvironment. + * @member {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null|undefined} computeInstanceTargetEnvironment + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.computeInstanceTargetEnvironment = null; + + /** + * RestoreBackupRequest computeInstanceRestoreProperties. + * @member {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null|undefined} computeInstanceRestoreProperties + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + RestoreBackupRequest.prototype.computeInstanceRestoreProperties = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RestoreBackupRequest targetEnvironment. + * @member {"computeInstanceTargetEnvironment"|undefined} targetEnvironment + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @instance + */ + Object.defineProperty(RestoreBackupRequest.prototype, "targetEnvironment", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceTargetEnvironment"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RestoreBackupRequest instanceProperties. + * @member {"computeInstanceRestoreProperties"|undefined} instanceProperties + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @instance */ - AbandonBackupRequest.prototype.requestId = ""; + Object.defineProperty(RestoreBackupRequest.prototype, "instanceProperties", { + get: $util.oneOfGetter($oneOfFields = ["computeInstanceRestoreProperties"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new AbandonBackupRequest instance using the specified properties. + * Creates a new RestoreBackupRequest instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @static - * @param {google.cloud.backupdr.v1.IAbandonBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest instance + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest instance */ - AbandonBackupRequest.create = function create(properties) { - return new AbandonBackupRequest(properties); + RestoreBackupRequest.create = function create(properties) { + return new RestoreBackupRequest(properties); }; /** - * Encodes the specified AbandonBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. + * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @static - * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} message AbandonBackupRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AbandonBackupRequest.encode = function encode(message, writer) { + RestoreBackupRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); + 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.computeInstanceTargetEnvironment != null && Object.hasOwnProperty.call(message, "computeInstanceTargetEnvironment")) + $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.encode(message.computeInstanceTargetEnvironment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.computeInstanceRestoreProperties != null && Object.hasOwnProperty.call(message, "computeInstanceRestoreProperties")) + $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.encode(message.computeInstanceRestoreProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified AbandonBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AbandonBackupRequest.verify|verify} messages. + * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @static - * @param {google.cloud.backupdr.v1.IAbandonBackupRequest} message AbandonBackupRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AbandonBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + RestoreBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AbandonBackupRequest message from the specified reader or buffer. + * Decodes a RestoreBackupRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AbandonBackupRequest.decode = function decode(reader, length) { + RestoreBackupRequest.decode = function 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.backupdr.v1.AbandonBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.RestoreBackupRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.dataSource = reader.string(); + message.name = reader.string(); break; } case 2: { message.requestId = reader.string(); break; } + case 3: { + message.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.decode(reader, reader.uint32()); + break; + } + case 4: { + message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -20492,138 +20477,168 @@ }; /** - * Decodes an AbandonBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AbandonBackupRequest.decodeDelimited = function decodeDelimited(reader) { + RestoreBackupRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AbandonBackupRequest message. + * Verifies a RestoreBackupRequest message. * @function verify - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AbandonBackupRequest.verify = function verify(message) { + RestoreBackupRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: string expected"; + var properties = {}; + 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 an AbandonBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AbandonBackupRequest} AbandonBackupRequest - */ - AbandonBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AbandonBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.AbandonBackupRequest(); - if (object.dataSource != null) - message.dataSource = String(object.dataSource); + if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { + properties.targetEnvironment = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify(message.computeInstanceTargetEnvironment); + if (error) + return "computeInstanceTargetEnvironment." + error; + } + } + if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { + properties.instanceProperties = 1; + { + var error = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify(message.computeInstanceRestoreProperties); + if (error) + return "computeInstanceRestoreProperties." + error; + } + } + return null; + }; + + /** + * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest + */ + RestoreBackupRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupRequest) + return object; + var message = new $root.google.cloud.backupdr.v1.RestoreBackupRequest(); + if (object.name != null) + message.name = String(object.name); if (object.requestId != null) message.requestId = String(object.requestId); + if (object.computeInstanceTargetEnvironment != null) { + if (typeof object.computeInstanceTargetEnvironment !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceTargetEnvironment: object expected"); + message.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.fromObject(object.computeInstanceTargetEnvironment); + } + if (object.computeInstanceRestoreProperties != null) { + if (typeof object.computeInstanceRestoreProperties !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceRestoreProperties: object expected"); + message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.fromObject(object.computeInstanceRestoreProperties); + } return message; }; /** - * Creates a plain object from an AbandonBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @static - * @param {google.cloud.backupdr.v1.AbandonBackupRequest} message AbandonBackupRequest + * @param {google.cloud.backupdr.v1.RestoreBackupRequest} message RestoreBackupRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AbandonBackupRequest.toObject = function toObject(message, options) { + RestoreBackupRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.dataSource = ""; + object.name = ""; object.requestId = ""; } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; + if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { + object.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.toObject(message.computeInstanceTargetEnvironment, options); + if (options.oneofs) + object.targetEnvironment = "computeInstanceTargetEnvironment"; + } + if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { + object.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.toObject(message.computeInstanceRestoreProperties, options); + if (options.oneofs) + object.instanceProperties = "computeInstanceRestoreProperties"; + } return object; }; /** - * Converts this AbandonBackupRequest to JSON. + * Converts this RestoreBackupRequest to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @instance * @returns {Object.} JSON object */ - AbandonBackupRequest.prototype.toJSON = function toJSON() { + RestoreBackupRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AbandonBackupRequest + * Gets the default type url for RestoreBackupRequest * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AbandonBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AbandonBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RestoreBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AbandonBackupRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupRequest"; }; - return AbandonBackupRequest; + return RestoreBackupRequest; })(); - v1.FinalizeBackupRequest = (function() { + v1.RestoreBackupResponse = (function() { /** - * Properties of a FinalizeBackupRequest. + * Properties of a RestoreBackupResponse. * @memberof google.cloud.backupdr.v1 - * @interface IFinalizeBackupRequest - * @property {string|null} [dataSource] FinalizeBackupRequest dataSource - * @property {string|null} [description] FinalizeBackupRequest description - * @property {google.protobuf.ITimestamp|null} [consistencyTime] FinalizeBackupRequest consistencyTime - * @property {string|null} [requestId] FinalizeBackupRequest requestId - * @property {string|null} [backupId] FinalizeBackupRequest backupId - * @property {google.protobuf.ITimestamp|null} [recoveryRangeStartTime] FinalizeBackupRequest recoveryRangeStartTime - * @property {google.protobuf.ITimestamp|null} [recoveryRangeEndTime] FinalizeBackupRequest recoveryRangeEndTime - * @property {google.protobuf.IDuration|null} [retentionDuration] FinalizeBackupRequest retentionDuration + * @interface IRestoreBackupResponse + * @property {google.cloud.backupdr.v1.ITargetResource|null} [targetResource] RestoreBackupResponse targetResource */ /** - * Constructs a new FinalizeBackupRequest. + * Constructs a new RestoreBackupResponse. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FinalizeBackupRequest. - * @implements IFinalizeBackupRequest + * @classdesc Represents a RestoreBackupResponse. + * @implements IRestoreBackupResponse * @constructor - * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set */ - function FinalizeBackupRequest(properties) { + function RestoreBackupResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20631,231 +20646,75 @@ } /** - * FinalizeBackupRequest dataSource. - * @member {string} dataSource - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.dataSource = ""; - - /** - * FinalizeBackupRequest description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.description = null; - - /** - * FinalizeBackupRequest consistencyTime. - * @member {google.protobuf.ITimestamp|null|undefined} consistencyTime - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.consistencyTime = null; - - /** - * FinalizeBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.requestId = ""; - - /** - * FinalizeBackupRequest backupId. - * @member {string} backupId - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.backupId = ""; - - /** - * FinalizeBackupRequest recoveryRangeStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeStartTime - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.recoveryRangeStartTime = null; - - /** - * FinalizeBackupRequest recoveryRangeEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeEndTime - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.recoveryRangeEndTime = null; - - /** - * FinalizeBackupRequest retentionDuration. - * @member {google.protobuf.IDuration|null|undefined} retentionDuration - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - FinalizeBackupRequest.prototype.retentionDuration = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FinalizeBackupRequest _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - Object.defineProperty(FinalizeBackupRequest.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FinalizeBackupRequest _consistencyTime. - * @member {"consistencyTime"|undefined} _consistencyTime - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - Object.defineProperty(FinalizeBackupRequest.prototype, "_consistencyTime", { - get: $util.oneOfGetter($oneOfFields = ["consistencyTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FinalizeBackupRequest _recoveryRangeStartTime. - * @member {"recoveryRangeStartTime"|undefined} _recoveryRangeStartTime - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - Object.defineProperty(FinalizeBackupRequest.prototype, "_recoveryRangeStartTime", { - get: $util.oneOfGetter($oneOfFields = ["recoveryRangeStartTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FinalizeBackupRequest _recoveryRangeEndTime. - * @member {"recoveryRangeEndTime"|undefined} _recoveryRangeEndTime - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest - * @instance - */ - Object.defineProperty(FinalizeBackupRequest.prototype, "_recoveryRangeEndTime", { - get: $util.oneOfGetter($oneOfFields = ["recoveryRangeEndTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * FinalizeBackupRequest _retentionDuration. - * @member {"retentionDuration"|undefined} _retentionDuration - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * RestoreBackupResponse targetResource. + * @member {google.cloud.backupdr.v1.ITargetResource|null|undefined} targetResource + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @instance */ - Object.defineProperty(FinalizeBackupRequest.prototype, "_retentionDuration", { - get: $util.oneOfGetter($oneOfFields = ["retentionDuration"]), - set: $util.oneOfSetter($oneOfFields) - }); + RestoreBackupResponse.prototype.targetResource = null; /** - * Creates a new FinalizeBackupRequest instance using the specified properties. + * Creates a new RestoreBackupResponse instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @static - * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest instance + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse instance */ - FinalizeBackupRequest.create = function create(properties) { - return new FinalizeBackupRequest(properties); + RestoreBackupResponse.create = function create(properties) { + return new RestoreBackupResponse(properties); }; /** - * Encodes the specified FinalizeBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. + * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @static - * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} message FinalizeBackupRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FinalizeBackupRequest.encode = function encode(message, writer) { + RestoreBackupResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.consistencyTime != null && Object.hasOwnProperty.call(message, "consistencyTime")) - $root.google.protobuf.Timestamp.encode(message.consistencyTime, 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.backupId != null && Object.hasOwnProperty.call(message, "backupId")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.backupId); - if (message.recoveryRangeStartTime != null && Object.hasOwnProperty.call(message, "recoveryRangeStartTime")) - $root.google.protobuf.Timestamp.encode(message.recoveryRangeStartTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.recoveryRangeEndTime != null && Object.hasOwnProperty.call(message, "recoveryRangeEndTime")) - $root.google.protobuf.Timestamp.encode(message.recoveryRangeEndTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.retentionDuration != null && Object.hasOwnProperty.call(message, "retentionDuration")) - $root.google.protobuf.Duration.encode(message.retentionDuration, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.targetResource != null && Object.hasOwnProperty.call(message, "targetResource")) + $root.google.cloud.backupdr.v1.TargetResource.encode(message.targetResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified FinalizeBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FinalizeBackupRequest.verify|verify} messages. + * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @static - * @param {google.cloud.backupdr.v1.IFinalizeBackupRequest} message FinalizeBackupRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FinalizeBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + RestoreBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FinalizeBackupRequest message from the specified reader or buffer. + * Decodes a RestoreBackupResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FinalizeBackupRequest.decode = function decode(reader, length) { + RestoreBackupResponse.decode = function 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.backupdr.v1.FinalizeBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.RestoreBackupResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.dataSource = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.consistencyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - case 5: { - message.backupId = reader.string(); - break; - } - case 6: { - message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.retentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.decode(reader, reader.uint32()); break; } default: @@ -20867,225 +20726,127 @@ }; /** - * Decodes a FinalizeBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FinalizeBackupRequest.decodeDelimited = function decodeDelimited(reader) { + RestoreBackupResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FinalizeBackupRequest message. + * Verifies a RestoreBackupResponse message. * @function verify - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FinalizeBackupRequest.verify = function verify(message) { + RestoreBackupResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: string expected"; - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { - properties._consistencyTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.consistencyTime); - if (error) - return "consistencyTime." + error; - } - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.backupId != null && message.hasOwnProperty("backupId")) - if (!$util.isString(message.backupId)) - return "backupId: string expected"; - if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { - properties._recoveryRangeStartTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeStartTime); - if (error) - return "recoveryRangeStartTime." + error; - } - } - if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { - properties._recoveryRangeEndTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeEndTime); - if (error) - return "recoveryRangeEndTime." + error; - } - } - if (message.retentionDuration != null && message.hasOwnProperty("retentionDuration")) { - properties._retentionDuration = 1; - { - var error = $root.google.protobuf.Duration.verify(message.retentionDuration); - if (error) - return "retentionDuration." + error; - } + if (message.targetResource != null && message.hasOwnProperty("targetResource")) { + var error = $root.google.cloud.backupdr.v1.TargetResource.verify(message.targetResource); + if (error) + return "targetResource." + error; } return null; }; /** - * Creates a FinalizeBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FinalizeBackupRequest} FinalizeBackupRequest + * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse */ - FinalizeBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FinalizeBackupRequest) + RestoreBackupResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupResponse) return object; - var message = new $root.google.cloud.backupdr.v1.FinalizeBackupRequest(); - if (object.dataSource != null) - message.dataSource = String(object.dataSource); - if (object.description != null) - message.description = String(object.description); - if (object.consistencyTime != null) { - if (typeof object.consistencyTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.consistencyTime: object expected"); - message.consistencyTime = $root.google.protobuf.Timestamp.fromObject(object.consistencyTime); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.backupId != null) - message.backupId = String(object.backupId); - if (object.recoveryRangeStartTime != null) { - if (typeof object.recoveryRangeStartTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.recoveryRangeStartTime: object expected"); - message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeStartTime); - } - if (object.recoveryRangeEndTime != null) { - if (typeof object.recoveryRangeEndTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.recoveryRangeEndTime: object expected"); - message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeEndTime); - } - if (object.retentionDuration != null) { - if (typeof object.retentionDuration !== "object") - throw TypeError(".google.cloud.backupdr.v1.FinalizeBackupRequest.retentionDuration: object expected"); - message.retentionDuration = $root.google.protobuf.Duration.fromObject(object.retentionDuration); + var message = new $root.google.cloud.backupdr.v1.RestoreBackupResponse(); + if (object.targetResource != null) { + if (typeof object.targetResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.RestoreBackupResponse.targetResource: object expected"); + message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.fromObject(object.targetResource); } return message; }; /** - * Creates a plain object from a FinalizeBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @static - * @param {google.cloud.backupdr.v1.FinalizeBackupRequest} message FinalizeBackupRequest + * @param {google.cloud.backupdr.v1.RestoreBackupResponse} message RestoreBackupResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FinalizeBackupRequest.toObject = function toObject(message, options) { + RestoreBackupResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.dataSource = ""; - object.requestId = ""; - object.backupId = ""; - } - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.consistencyTime != null && message.hasOwnProperty("consistencyTime")) { - object.consistencyTime = $root.google.protobuf.Timestamp.toObject(message.consistencyTime, options); - if (options.oneofs) - object._consistencyTime = "consistencyTime"; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.backupId != null && message.hasOwnProperty("backupId")) - object.backupId = message.backupId; - if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { - object.recoveryRangeStartTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeStartTime, options); - if (options.oneofs) - object._recoveryRangeStartTime = "recoveryRangeStartTime"; - } - if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { - object.recoveryRangeEndTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeEndTime, options); - if (options.oneofs) - object._recoveryRangeEndTime = "recoveryRangeEndTime"; - } - if (message.retentionDuration != null && message.hasOwnProperty("retentionDuration")) { - object.retentionDuration = $root.google.protobuf.Duration.toObject(message.retentionDuration, options); - if (options.oneofs) - object._retentionDuration = "retentionDuration"; - } + if (options.defaults) + object.targetResource = null; + if (message.targetResource != null && message.hasOwnProperty("targetResource")) + object.targetResource = $root.google.cloud.backupdr.v1.TargetResource.toObject(message.targetResource, options); return object; }; /** - * Converts this FinalizeBackupRequest to JSON. + * Converts this RestoreBackupResponse to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @instance * @returns {Object.} JSON object */ - FinalizeBackupRequest.prototype.toJSON = function toJSON() { + RestoreBackupResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FinalizeBackupRequest + * Gets the default type url for RestoreBackupResponse * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FinalizeBackupRequest + * @memberof google.cloud.backupdr.v1.RestoreBackupResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FinalizeBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RestoreBackupResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FinalizeBackupRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupResponse"; }; - return FinalizeBackupRequest; + return RestoreBackupResponse; })(); - v1.FetchAccessTokenRequest = (function() { + v1.TargetResource = (function() { /** - * Properties of a FetchAccessTokenRequest. + * Properties of a TargetResource. * @memberof google.cloud.backupdr.v1 - * @interface IFetchAccessTokenRequest - * @property {string|null} [name] FetchAccessTokenRequest name - * @property {number|null} [generationId] FetchAccessTokenRequest generationId + * @interface ITargetResource + * @property {google.cloud.backupdr.v1.IGcpResource|null} [gcpResource] TargetResource gcpResource */ /** - * Constructs a new FetchAccessTokenRequest. + * Constructs a new TargetResource. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FetchAccessTokenRequest. - * @implements IFetchAccessTokenRequest + * @classdesc Represents a TargetResource. + * @implements ITargetResource * @constructor - * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set */ - function FetchAccessTokenRequest(properties) { + function TargetResource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21093,89 +20854,89 @@ } /** - * FetchAccessTokenRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * TargetResource gcpResource. + * @member {google.cloud.backupdr.v1.IGcpResource|null|undefined} gcpResource + * @memberof google.cloud.backupdr.v1.TargetResource * @instance */ - FetchAccessTokenRequest.prototype.name = ""; + TargetResource.prototype.gcpResource = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * FetchAccessTokenRequest generationId. - * @member {number} generationId - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * TargetResource targetResourceInfo. + * @member {"gcpResource"|undefined} targetResourceInfo + * @memberof google.cloud.backupdr.v1.TargetResource * @instance */ - FetchAccessTokenRequest.prototype.generationId = 0; + Object.defineProperty(TargetResource.prototype, "targetResourceInfo", { + get: $util.oneOfGetter($oneOfFields = ["gcpResource"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new FetchAccessTokenRequest instance using the specified properties. + * Creates a new TargetResource instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @memberof google.cloud.backupdr.v1.TargetResource * @static - * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest instance + * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource instance */ - FetchAccessTokenRequest.create = function create(properties) { - return new FetchAccessTokenRequest(properties); + TargetResource.create = function create(properties) { + return new TargetResource(properties); }; /** - * Encodes the specified FetchAccessTokenRequest message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. + * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @memberof google.cloud.backupdr.v1.TargetResource * @static - * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} message FetchAccessTokenRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchAccessTokenRequest.encode = function encode(message, writer) { + TargetResource.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.generationId != null && Object.hasOwnProperty.call(message, "generationId")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.generationId); + if (message.gcpResource != null && Object.hasOwnProperty.call(message, "gcpResource")) + $root.google.cloud.backupdr.v1.GcpResource.encode(message.gcpResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified FetchAccessTokenRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenRequest.verify|verify} messages. + * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @memberof google.cloud.backupdr.v1.TargetResource * @static - * @param {google.cloud.backupdr.v1.IFetchAccessTokenRequest} message FetchAccessTokenRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchAccessTokenRequest.encodeDelimited = function encodeDelimited(message, writer) { + TargetResource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FetchAccessTokenRequest message from the specified reader or buffer. + * Decodes a TargetResource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @memberof google.cloud.backupdr.v1.TargetResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchAccessTokenRequest.decode = function decode(reader, length) { + TargetResource.decode = function 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.backupdr.v1.FetchAccessTokenRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.TargetResource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.generationId = reader.int32(); + message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.decode(reader, reader.uint32()); break; } default: @@ -21187,134 +20948,134 @@ }; /** - * Decodes a FetchAccessTokenRequest message from the specified reader or buffer, length delimited. + * Decodes a TargetResource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @memberof google.cloud.backupdr.v1.TargetResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchAccessTokenRequest.decodeDelimited = function decodeDelimited(reader) { + TargetResource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FetchAccessTokenRequest message. + * Verifies a TargetResource message. * @function verify - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @memberof google.cloud.backupdr.v1.TargetResource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FetchAccessTokenRequest.verify = function verify(message) { + TargetResource.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.generationId != null && message.hasOwnProperty("generationId")) - if (!$util.isInteger(message.generationId)) - return "generationId: integer expected"; + var properties = {}; + if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { + properties.targetResourceInfo = 1; + { + var error = $root.google.cloud.backupdr.v1.GcpResource.verify(message.gcpResource); + if (error) + return "gcpResource." + error; + } + } return null; }; /** - * Creates a FetchAccessTokenRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @memberof google.cloud.backupdr.v1.TargetResource * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FetchAccessTokenRequest} FetchAccessTokenRequest + * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource */ - FetchAccessTokenRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FetchAccessTokenRequest) + TargetResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.TargetResource) return object; - var message = new $root.google.cloud.backupdr.v1.FetchAccessTokenRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.generationId != null) - message.generationId = object.generationId | 0; + var message = new $root.google.cloud.backupdr.v1.TargetResource(); + if (object.gcpResource != null) { + if (typeof object.gcpResource !== "object") + throw TypeError(".google.cloud.backupdr.v1.TargetResource.gcpResource: object expected"); + message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.fromObject(object.gcpResource); + } return message; }; /** - * Creates a plain object from a FetchAccessTokenRequest message. Also converts values to other types if specified. + * Creates a plain object from a TargetResource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @memberof google.cloud.backupdr.v1.TargetResource * @static - * @param {google.cloud.backupdr.v1.FetchAccessTokenRequest} message FetchAccessTokenRequest + * @param {google.cloud.backupdr.v1.TargetResource} message TargetResource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FetchAccessTokenRequest.toObject = function toObject(message, options) { + TargetResource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.generationId = 0; + if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { + object.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.toObject(message.gcpResource, options); + if (options.oneofs) + object.targetResourceInfo = "gcpResource"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.generationId != null && message.hasOwnProperty("generationId")) - object.generationId = message.generationId; return object; }; /** - * Converts this FetchAccessTokenRequest to JSON. + * Converts this TargetResource to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @memberof google.cloud.backupdr.v1.TargetResource * @instance * @returns {Object.} JSON object */ - FetchAccessTokenRequest.prototype.toJSON = function toJSON() { + TargetResource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FetchAccessTokenRequest + * Gets the default type url for TargetResource * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FetchAccessTokenRequest + * @memberof google.cloud.backupdr.v1.TargetResource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FetchAccessTokenRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TargetResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchAccessTokenRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.TargetResource"; }; - return FetchAccessTokenRequest; + return TargetResource; })(); - v1.FetchAccessTokenResponse = (function() { + v1.GcpResource = (function() { /** - * Properties of a FetchAccessTokenResponse. + * Properties of a GcpResource. * @memberof google.cloud.backupdr.v1 - * @interface IFetchAccessTokenResponse - * @property {string|null} [readLocation] FetchAccessTokenResponse readLocation - * @property {string|null} [writeLocation] FetchAccessTokenResponse writeLocation - * @property {string|null} [token] FetchAccessTokenResponse token - * @property {google.protobuf.ITimestamp|null} [expireTime] FetchAccessTokenResponse expireTime + * @interface IGcpResource + * @property {string|null} [gcpResourcename] GcpResource gcpResourcename + * @property {string|null} [location] GcpResource location + * @property {string|null} [type] GcpResource type */ /** - * Constructs a new FetchAccessTokenResponse. + * Constructs a new GcpResource. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a FetchAccessTokenResponse. - * @implements IFetchAccessTokenResponse + * @classdesc Represents a GcpResource. + * @implements IGcpResource * @constructor - * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set */ - function FetchAccessTokenResponse(properties) { + function GcpResource(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21322,117 +21083,103 @@ } /** - * FetchAccessTokenResponse readLocation. - * @member {string} readLocation - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse - * @instance - */ - FetchAccessTokenResponse.prototype.readLocation = ""; - - /** - * FetchAccessTokenResponse writeLocation. - * @member {string} writeLocation - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * GcpResource gcpResourcename. + * @member {string} gcpResourcename + * @memberof google.cloud.backupdr.v1.GcpResource * @instance */ - FetchAccessTokenResponse.prototype.writeLocation = ""; + GcpResource.prototype.gcpResourcename = ""; /** - * FetchAccessTokenResponse token. - * @member {string} token - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * GcpResource location. + * @member {string} location + * @memberof google.cloud.backupdr.v1.GcpResource * @instance */ - FetchAccessTokenResponse.prototype.token = ""; + GcpResource.prototype.location = ""; /** - * FetchAccessTokenResponse expireTime. - * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * GcpResource type. + * @member {string} type + * @memberof google.cloud.backupdr.v1.GcpResource * @instance */ - FetchAccessTokenResponse.prototype.expireTime = null; + GcpResource.prototype.type = ""; /** - * Creates a new FetchAccessTokenResponse instance using the specified properties. + * Creates a new GcpResource instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @memberof google.cloud.backupdr.v1.GcpResource * @static - * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse instance + * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource instance */ - FetchAccessTokenResponse.create = function create(properties) { - return new FetchAccessTokenResponse(properties); + GcpResource.create = function create(properties) { + return new GcpResource(properties); }; /** - * Encodes the specified FetchAccessTokenResponse message. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. + * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @memberof google.cloud.backupdr.v1.GcpResource * @static - * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse} message FetchAccessTokenResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchAccessTokenResponse.encode = function encode(message, writer) { + GcpResource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.readLocation != null && Object.hasOwnProperty.call(message, "readLocation")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.readLocation); - if (message.writeLocation != null && Object.hasOwnProperty.call(message, "writeLocation")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.writeLocation); - if (message.token != null && Object.hasOwnProperty.call(message, "token")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.token); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); return writer; }; /** - * Encodes the specified FetchAccessTokenResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.FetchAccessTokenResponse.verify|verify} messages. + * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @memberof google.cloud.backupdr.v1.GcpResource * @static - * @param {google.cloud.backupdr.v1.IFetchAccessTokenResponse} message FetchAccessTokenResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FetchAccessTokenResponse.encodeDelimited = function encodeDelimited(message, writer) { + GcpResource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FetchAccessTokenResponse message from the specified reader or buffer. + * Decodes a GcpResource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @memberof google.cloud.backupdr.v1.GcpResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchAccessTokenResponse.decode = function decode(reader, length) { + GcpResource.decode = function 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.backupdr.v1.FetchAccessTokenResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.GcpResource(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.readLocation = reader.string(); + message.gcpResourcename = reader.string(); break; } case 2: { - message.writeLocation = reader.string(); + message.location = reader.string(); break; } case 3: { - message.token = reader.string(); - break; - } - case 4: { - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.type = reader.string(); break; } default: @@ -21444,157 +21191,190 @@ }; /** - * Decodes a FetchAccessTokenResponse message from the specified reader or buffer, length delimited. + * Decodes a GcpResource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @memberof google.cloud.backupdr.v1.GcpResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FetchAccessTokenResponse.decodeDelimited = function decodeDelimited(reader) { + GcpResource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FetchAccessTokenResponse message. + * Verifies a GcpResource message. * @function verify - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @memberof google.cloud.backupdr.v1.GcpResource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FetchAccessTokenResponse.verify = function verify(message) { + GcpResource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.readLocation != null && message.hasOwnProperty("readLocation")) - if (!$util.isString(message.readLocation)) - return "readLocation: string expected"; - if (message.writeLocation != null && message.hasOwnProperty("writeLocation")) - if (!$util.isString(message.writeLocation)) - return "writeLocation: string expected"; - if (message.token != null && message.hasOwnProperty("token")) - if (!$util.isString(message.token)) - return "token: string expected"; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime); - if (error) - return "expireTime." + error; - } + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + if (!$util.isString(message.gcpResourcename)) + return "gcpResourcename: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; return null; }; /** - * Creates a FetchAccessTokenResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @memberof google.cloud.backupdr.v1.GcpResource * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.FetchAccessTokenResponse} FetchAccessTokenResponse + * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource */ - FetchAccessTokenResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.FetchAccessTokenResponse) + GcpResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GcpResource) return object; - var message = new $root.google.cloud.backupdr.v1.FetchAccessTokenResponse(); - if (object.readLocation != null) - message.readLocation = String(object.readLocation); - if (object.writeLocation != null) - message.writeLocation = String(object.writeLocation); - if (object.token != null) - message.token = String(object.token); - if (object.expireTime != null) { - if (typeof object.expireTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.FetchAccessTokenResponse.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); - } + var message = new $root.google.cloud.backupdr.v1.GcpResource(); + if (object.gcpResourcename != null) + message.gcpResourcename = String(object.gcpResourcename); + if (object.location != null) + message.location = String(object.location); + if (object.type != null) + message.type = String(object.type); return message; }; /** - * Creates a plain object from a FetchAccessTokenResponse message. Also converts values to other types if specified. + * Creates a plain object from a GcpResource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @memberof google.cloud.backupdr.v1.GcpResource * @static - * @param {google.cloud.backupdr.v1.FetchAccessTokenResponse} message FetchAccessTokenResponse + * @param {google.cloud.backupdr.v1.GcpResource} message GcpResource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FetchAccessTokenResponse.toObject = function toObject(message, options) { + GcpResource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.readLocation = ""; - object.writeLocation = ""; - object.token = ""; - object.expireTime = null; - } - if (message.readLocation != null && message.hasOwnProperty("readLocation")) - object.readLocation = message.readLocation; - if (message.writeLocation != null && message.hasOwnProperty("writeLocation")) - object.writeLocation = message.writeLocation; - if (message.token != null && message.hasOwnProperty("token")) - object.token = message.token; - if (message.expireTime != null && message.hasOwnProperty("expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + object.gcpResourcename = ""; + object.location = ""; + object.type = ""; + } + if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) + object.gcpResourcename = message.gcpResourcename; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; return object; }; /** - * Converts this FetchAccessTokenResponse to JSON. + * Converts this GcpResource to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @memberof google.cloud.backupdr.v1.GcpResource * @instance * @returns {Object.} JSON object */ - FetchAccessTokenResponse.prototype.toJSON = function toJSON() { + GcpResource.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FetchAccessTokenResponse + * Gets the default type url for GcpResource * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.FetchAccessTokenResponse + * @memberof google.cloud.backupdr.v1.GcpResource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FetchAccessTokenResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.FetchAccessTokenResponse"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpResource"; }; - return FetchAccessTokenResponse; + return GcpResource; })(); - v1.ListBackupsRequest = (function() { + /** + * BackupConfigState enum. + * @name google.cloud.backupdr.v1.BackupConfigState + * @enum {number} + * @property {number} BACKUP_CONFIG_STATE_UNSPECIFIED=0 BACKUP_CONFIG_STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} PASSIVE=2 PASSIVE value + */ + v1.BackupConfigState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_CONFIG_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "PASSIVE"] = 2; + return values; + })(); + + /** + * BackupView enum. + * @name google.cloud.backupdr.v1.BackupView + * @enum {number} + * @property {number} BACKUP_VIEW_UNSPECIFIED=0 BACKUP_VIEW_UNSPECIFIED value + * @property {number} BACKUP_VIEW_BASIC=1 BACKUP_VIEW_BASIC value + * @property {number} BACKUP_VIEW_FULL=2 BACKUP_VIEW_FULL value + */ + v1.BackupView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKUP_VIEW_BASIC"] = 1; + values[valuesById[2] = "BACKUP_VIEW_FULL"] = 2; + return values; + })(); + + /** + * BackupVaultView enum. + * @name google.cloud.backupdr.v1.BackupVaultView + * @enum {number} + * @property {number} BACKUP_VAULT_VIEW_UNSPECIFIED=0 BACKUP_VAULT_VIEW_UNSPECIFIED value + * @property {number} BACKUP_VAULT_VIEW_BASIC=1 BACKUP_VAULT_VIEW_BASIC value + * @property {number} BACKUP_VAULT_VIEW_FULL=2 BACKUP_VAULT_VIEW_FULL value + */ + v1.BackupVaultView = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKUP_VAULT_VIEW_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKUP_VAULT_VIEW_BASIC"] = 1; + values[valuesById[2] = "BACKUP_VAULT_VIEW_FULL"] = 2; + return values; + })(); + + v1.BackupApplianceBackupProperties = (function() { /** - * Properties of a ListBackupsRequest. + * Properties of a BackupApplianceBackupProperties. * @memberof google.cloud.backupdr.v1 - * @interface IListBackupsRequest - * @property {string|null} [parent] ListBackupsRequest parent - * @property {number|null} [pageSize] ListBackupsRequest pageSize - * @property {string|null} [pageToken] ListBackupsRequest pageToken - * @property {string|null} [filter] ListBackupsRequest filter - * @property {string|null} [orderBy] ListBackupsRequest orderBy - * @property {google.cloud.backupdr.v1.BackupView|null} [view] ListBackupsRequest view + * @interface IBackupApplianceBackupProperties + * @property {number|null} [generationId] BackupApplianceBackupProperties generationId + * @property {google.protobuf.ITimestamp|null} [finalizeTime] BackupApplianceBackupProperties finalizeTime + * @property {google.protobuf.ITimestamp|null} [recoveryRangeStartTime] BackupApplianceBackupProperties recoveryRangeStartTime + * @property {google.protobuf.ITimestamp|null} [recoveryRangeEndTime] BackupApplianceBackupProperties recoveryRangeEndTime */ /** - * Constructs a new ListBackupsRequest. + * Constructs a new BackupApplianceBackupProperties. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupsRequest. - * @implements IListBackupsRequest + * @classdesc Represents a BackupApplianceBackupProperties. + * @implements IBackupApplianceBackupProperties * @constructor - * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties=} [properties] Properties to set */ - function ListBackupsRequest(properties) { + function BackupApplianceBackupProperties(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21602,145 +21382,164 @@ } /** - * ListBackupsRequest parent. - * @member {string} parent - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * BackupApplianceBackupProperties generationId. + * @member {number|null|undefined} generationId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties * @instance */ - ListBackupsRequest.prototype.parent = ""; + BackupApplianceBackupProperties.prototype.generationId = null; /** - * ListBackupsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * BackupApplianceBackupProperties finalizeTime. + * @member {google.protobuf.ITimestamp|null|undefined} finalizeTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties * @instance */ - ListBackupsRequest.prototype.pageSize = 0; + BackupApplianceBackupProperties.prototype.finalizeTime = null; /** - * ListBackupsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * BackupApplianceBackupProperties recoveryRangeStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeStartTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties * @instance */ - ListBackupsRequest.prototype.pageToken = ""; + BackupApplianceBackupProperties.prototype.recoveryRangeStartTime = null; /** - * ListBackupsRequest filter. - * @member {string} filter - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * BackupApplianceBackupProperties recoveryRangeEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeEndTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties * @instance */ - ListBackupsRequest.prototype.filter = ""; + BackupApplianceBackupProperties.prototype.recoveryRangeEndTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ListBackupsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * BackupApplianceBackupProperties _generationId. + * @member {"generationId"|undefined} _generationId + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties * @instance */ - ListBackupsRequest.prototype.orderBy = ""; + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_generationId", { + get: $util.oneOfGetter($oneOfFields = ["generationId"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * ListBackupsRequest view. - * @member {google.cloud.backupdr.v1.BackupView} view - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * BackupApplianceBackupProperties _finalizeTime. + * @member {"finalizeTime"|undefined} _finalizeTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties * @instance */ - ListBackupsRequest.prototype.view = 0; + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_finalizeTime", { + get: $util.oneOfGetter($oneOfFields = ["finalizeTime"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ListBackupsRequest instance using the specified properties. + * BackupApplianceBackupProperties _recoveryRangeStartTime. + * @member {"recoveryRangeStartTime"|undefined} _recoveryRangeStartTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_recoveryRangeStartTime", { + get: $util.oneOfGetter($oneOfFields = ["recoveryRangeStartTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * BackupApplianceBackupProperties _recoveryRangeEndTime. + * @member {"recoveryRangeEndTime"|undefined} _recoveryRangeEndTime + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @instance + */ + Object.defineProperty(BackupApplianceBackupProperties.prototype, "_recoveryRangeEndTime", { + get: $util.oneOfGetter($oneOfFields = ["recoveryRangeEndTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BackupApplianceBackupProperties instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties * @static - * @param {google.cloud.backupdr.v1.IListBackupsRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest instance + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties instance */ - ListBackupsRequest.create = function create(properties) { - return new ListBackupsRequest(properties); + BackupApplianceBackupProperties.create = function create(properties) { + return new BackupApplianceBackupProperties(properties); }; /** - * Encodes the specified ListBackupsRequest message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties * @static - * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties} message BackupApplianceBackupProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsRequest.encode = function encode(message, writer) { + BackupApplianceBackupProperties.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); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.view); + if (message.generationId != null && Object.hasOwnProperty.call(message, "generationId")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.generationId); + if (message.finalizeTime != null && Object.hasOwnProperty.call(message, "finalizeTime")) + $root.google.protobuf.Timestamp.encode(message.finalizeTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.recoveryRangeStartTime != null && Object.hasOwnProperty.call(message, "recoveryRangeStartTime")) + $root.google.protobuf.Timestamp.encode(message.recoveryRangeStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.recoveryRangeEndTime != null && Object.hasOwnProperty.call(message, "recoveryRangeEndTime")) + $root.google.protobuf.Timestamp.encode(message.recoveryRangeEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListBackupsRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsRequest.verify|verify} messages. + * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties * @static - * @param {google.cloud.backupdr.v1.IListBackupsRequest} message ListBackupsRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties} message BackupApplianceBackupProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBackupsRequest.encodeDelimited = function encodeDelimited(message, writer) { + BackupApplianceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBackupsRequest message from the specified reader or buffer. + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupsRequest.decode = function decode(reader, length) { + BackupApplianceBackupProperties.decode = function 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.backupdr.v1.ListBackupsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.generationId = reader.int32(); break; } case 2: { - message.pageSize = reader.int32(); + message.finalizeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.pageToken = reader.string(); + message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); - break; - } - case 6: { - message.view = reader.int32(); + message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -21752,191 +21551,198 @@ }; /** - * Decodes a ListBackupsRequest message from the specified reader or buffer, length delimited. + * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBackupsRequest.decodeDelimited = function decodeDelimited(reader) { + BackupApplianceBackupProperties.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBackupsRequest message. + * Verifies a BackupApplianceBackupProperties message. * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBackupsRequest.verify = function verify(message) { + BackupApplianceBackupProperties.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"; - if (message.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; + var properties = {}; + if (message.generationId != null && message.hasOwnProperty("generationId")) { + properties._generationId = 1; + if (!$util.isInteger(message.generationId)) + return "generationId: integer expected"; + } + if (message.finalizeTime != null && message.hasOwnProperty("finalizeTime")) { + properties._finalizeTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.finalizeTime); + if (error) + return "finalizeTime." + error; + } + } + if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { + properties._recoveryRangeStartTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeStartTime); + if (error) + return "recoveryRangeStartTime." + error; + } + } + if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { + properties._recoveryRangeEndTime = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeEndTime); + if (error) + return "recoveryRangeEndTime." + error; } + } return null; }; /** - * Creates a ListBackupsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupsRequest} ListBackupsRequest + * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties */ - ListBackupsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsRequest) + BackupApplianceBackupProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties) return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupsRequest(); - 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); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "BACKUP_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BACKUP_VIEW_BASIC": - case 1: - message.view = 1; - break; - case "BACKUP_VIEW_FULL": - case 2: - message.view = 2; - break; + var message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties(); + if (object.generationId != null) + message.generationId = object.generationId | 0; + if (object.finalizeTime != null) { + if (typeof object.finalizeTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.finalizeTime: object expected"); + message.finalizeTime = $root.google.protobuf.Timestamp.fromObject(object.finalizeTime); + } + if (object.recoveryRangeStartTime != null) { + if (typeof object.recoveryRangeStartTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeStartTime: object expected"); + message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeStartTime); + } + if (object.recoveryRangeEndTime != null) { + if (typeof object.recoveryRangeEndTime !== "object") + throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeEndTime: object expected"); + message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeEndTime); } return message; }; /** - * Creates a plain object from a ListBackupsRequest message. Also converts values to other types if specified. + * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties * @static - * @param {google.cloud.backupdr.v1.ListBackupsRequest} message ListBackupsRequest + * @param {google.cloud.backupdr.v1.BackupApplianceBackupProperties} message BackupApplianceBackupProperties * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBackupsRequest.toObject = function toObject(message, options) { + BackupApplianceBackupProperties.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; + if (message.generationId != null && message.hasOwnProperty("generationId")) { + object.generationId = message.generationId; + if (options.oneofs) + object._generationId = "generationId"; + } + if (message.finalizeTime != null && message.hasOwnProperty("finalizeTime")) { + object.finalizeTime = $root.google.protobuf.Timestamp.toObject(message.finalizeTime, options); + if (options.oneofs) + object._finalizeTime = "finalizeTime"; + } + if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { + object.recoveryRangeStartTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeStartTime, options); + if (options.oneofs) + object._recoveryRangeStartTime = "recoveryRangeStartTime"; + } + if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { + object.recoveryRangeEndTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeEndTime, options); + if (options.oneofs) + object._recoveryRangeEndTime = "recoveryRangeEndTime"; } - 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; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; return object; }; /** - * Converts this ListBackupsRequest to JSON. + * Converts this BackupApplianceBackupProperties to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties * @instance * @returns {Object.} JSON object */ - ListBackupsRequest.prototype.toJSON = function toJSON() { + BackupApplianceBackupProperties.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListBackupsRequest + * Gets the default type url for BackupApplianceBackupProperties * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupsRequest + * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListBackupsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BackupApplianceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceBackupProperties"; }; - return ListBackupsRequest; + return BackupApplianceBackupProperties; })(); - v1.ListBackupsResponse = (function() { + v1.ComputeInstanceBackupProperties = (function() { /** - * Properties of a ListBackupsResponse. + * Properties of a ComputeInstanceBackupProperties. * @memberof google.cloud.backupdr.v1 - * @interface IListBackupsResponse - * @property {Array.|null} [backups] ListBackupsResponse backups - * @property {string|null} [nextPageToken] ListBackupsResponse nextPageToken - * @property {Array.|null} [unreachable] ListBackupsResponse unreachable + * @interface IComputeInstanceBackupProperties + * @property {string|null} [description] ComputeInstanceBackupProperties description + * @property {google.cloud.backupdr.v1.ITags|null} [tags] ComputeInstanceBackupProperties tags + * @property {string|null} [machineType] ComputeInstanceBackupProperties machineType + * @property {boolean|null} [canIpForward] ComputeInstanceBackupProperties canIpForward + * @property {Array.|null} [networkInterface] ComputeInstanceBackupProperties networkInterface + * @property {Array.|null} [disk] ComputeInstanceBackupProperties disk + * @property {google.cloud.backupdr.v1.IMetadata|null} [metadata] ComputeInstanceBackupProperties metadata + * @property {Array.|null} [serviceAccount] ComputeInstanceBackupProperties serviceAccount + * @property {google.cloud.backupdr.v1.IScheduling|null} [scheduling] ComputeInstanceBackupProperties scheduling + * @property {Array.|null} [guestAccelerator] ComputeInstanceBackupProperties guestAccelerator + * @property {string|null} [minCpuPlatform] ComputeInstanceBackupProperties minCpuPlatform + * @property {google.cloud.backupdr.v1.KeyRevocationActionType|null} [keyRevocationActionType] ComputeInstanceBackupProperties keyRevocationActionType + * @property {string|null} [sourceInstance] ComputeInstanceBackupProperties sourceInstance + * @property {Object.|null} [labels] ComputeInstanceBackupProperties labels */ /** - * Constructs a new ListBackupsResponse. + * Constructs a new ComputeInstanceBackupProperties. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ListBackupsResponse. - * @implements IListBackupsResponse + * @classdesc Represents a ComputeInstanceBackupProperties. + * @implements IComputeInstanceBackupProperties * @constructor - * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties=} [properties] Properties to set */ - function ListBackupsResponse(properties) { - this.backups = []; - this.unreachable = []; + function ComputeInstanceBackupProperties(properties) { + this.networkInterface = []; + this.disk = []; + this.serviceAccount = []; + this.guestAccelerator = []; + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21944,536 +21750,815 @@ } /** - * ListBackupsResponse backups. - * @member {Array.} backups - * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * ComputeInstanceBackupProperties description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties * @instance */ - ListBackupsResponse.prototype.backups = $util.emptyArray; + ComputeInstanceBackupProperties.prototype.description = null; /** - * ListBackupsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * ComputeInstanceBackupProperties tags. + * @member {google.cloud.backupdr.v1.ITags|null|undefined} tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties * @instance */ - ListBackupsResponse.prototype.nextPageToken = ""; + ComputeInstanceBackupProperties.prototype.tags = null; /** - * ListBackupsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * ComputeInstanceBackupProperties machineType. + * @member {string|null|undefined} machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties * @instance */ - ListBackupsResponse.prototype.unreachable = $util.emptyArray; + ComputeInstanceBackupProperties.prototype.machineType = null; /** - * Creates a new ListBackupsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupsResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse instance + * ComputeInstanceBackupProperties canIpForward. + * @member {boolean|null|undefined} canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance */ - ListBackupsResponse.create = function create(properties) { - return new ListBackupsResponse(properties); - }; + ComputeInstanceBackupProperties.prototype.canIpForward = null; /** - * Encodes the specified ListBackupsResponse message. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * ComputeInstanceBackupProperties networkInterface. + * @member {Array.} networkInterface + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance */ - ListBackupsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.backups != null && message.backups.length) - for (var i = 0; i < message.backups.length; ++i) - $root.google.cloud.backupdr.v1.Backup.encode(message.backups[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; - }; + ComputeInstanceBackupProperties.prototype.networkInterface = $util.emptyArray; /** - * Encodes the specified ListBackupsResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ListBackupsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {google.cloud.backupdr.v1.IListBackupsResponse} message ListBackupsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * ComputeInstanceBackupProperties disk. + * @member {Array.} disk + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance */ - ListBackupsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + ComputeInstanceBackupProperties.prototype.disk = $util.emptyArray; /** - * Decodes a ListBackupsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * ComputeInstanceBackupProperties metadata. + * @member {google.cloud.backupdr.v1.IMetadata|null|undefined} metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance */ - ListBackupsResponse.decode = function 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.backupdr.v1.ListBackupsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.backups && message.backups.length)) - message.backups = []; - message.backups.push($root.google.cloud.backupdr.v1.Backup.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; - }; + ComputeInstanceBackupProperties.prototype.metadata = null; /** - * Decodes a ListBackupsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * ComputeInstanceBackupProperties serviceAccount. + * @member {Array.} serviceAccount + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance */ - ListBackupsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + ComputeInstanceBackupProperties.prototype.serviceAccount = $util.emptyArray; /** - * Verifies a ListBackupsResponse message. - * @function verify - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * ComputeInstanceBackupProperties scheduling. + * @member {google.cloud.backupdr.v1.IScheduling|null|undefined} scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance */ - ListBackupsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.backups != null && message.hasOwnProperty("backups")) { - if (!Array.isArray(message.backups)) - return "backups: array expected"; - for (var i = 0; i < message.backups.length; ++i) { - var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backups[i]); - if (error) - return "backups." + 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; - }; + ComputeInstanceBackupProperties.prototype.scheduling = null; /** - * Creates a ListBackupsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ListBackupsResponse} ListBackupsResponse + * ComputeInstanceBackupProperties guestAccelerator. + * @member {Array.} guestAccelerator + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance */ - ListBackupsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ListBackupsResponse) - return object; - var message = new $root.google.cloud.backupdr.v1.ListBackupsResponse(); - if (object.backups) { - if (!Array.isArray(object.backups)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: array expected"); - message.backups = []; - for (var i = 0; i < object.backups.length; ++i) { - if (typeof object.backups[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.backups: object expected"); - message.backups[i] = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backups[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.backupdr.v1.ListBackupsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); - } - return message; - }; + ComputeInstanceBackupProperties.prototype.guestAccelerator = $util.emptyArray; /** - * Creates a plain object from a ListBackupsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {google.cloud.backupdr.v1.ListBackupsResponse} message ListBackupsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * ComputeInstanceBackupProperties minCpuPlatform. + * @member {string|null|undefined} minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance */ - ListBackupsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.backups = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.backups && message.backups.length) { - object.backups = []; - for (var j = 0; j < message.backups.length; ++j) - object.backups[j] = $root.google.cloud.backupdr.v1.Backup.toObject(message.backups[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; - }; + ComputeInstanceBackupProperties.prototype.minCpuPlatform = null; /** - * Converts this ListBackupsResponse to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ListBackupsResponse + * ComputeInstanceBackupProperties keyRevocationActionType. + * @member {google.cloud.backupdr.v1.KeyRevocationActionType|null|undefined} keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties * @instance - * @returns {Object.} JSON object */ - ListBackupsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + ComputeInstanceBackupProperties.prototype.keyRevocationActionType = null; /** - * Gets the default type url for ListBackupsResponse - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ListBackupsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * ComputeInstanceBackupProperties sourceInstance. + * @member {string|null|undefined} sourceInstance + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance */ - ListBackupsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ListBackupsResponse"; - }; + ComputeInstanceBackupProperties.prototype.sourceInstance = null; - return ListBackupsResponse; - })(); + /** + * ComputeInstanceBackupProperties labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + ComputeInstanceBackupProperties.prototype.labels = $util.emptyObject; - v1.GetBackupRequest = (function() { + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Properties of a GetBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IGetBackupRequest - * @property {string|null} [name] GetBackupRequest name - * @property {google.cloud.backupdr.v1.BackupView|null} [view] GetBackupRequest view + * ComputeInstanceBackupProperties _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Constructs a new GetBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GetBackupRequest. - * @implements IGetBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set + * ComputeInstanceBackupProperties _tags. + * @member {"tags"|undefined} _tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance */ - function GetBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_tags", { + get: $util.oneOfGetter($oneOfFields = ["tags"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * GetBackupRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * ComputeInstanceBackupProperties _machineType. + * @member {"machineType"|undefined} _machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties * @instance */ - GetBackupRequest.prototype.name = ""; + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_machineType", { + get: $util.oneOfGetter($oneOfFields = ["machineType"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * GetBackupRequest view. - * @member {google.cloud.backupdr.v1.BackupView} view - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * ComputeInstanceBackupProperties _canIpForward. + * @member {"canIpForward"|undefined} _canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties * @instance */ - GetBackupRequest.prototype.view = 0; + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_canIpForward", { + get: $util.oneOfGetter($oneOfFields = ["canIpForward"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new GetBackupRequest instance using the specified properties. + * ComputeInstanceBackupProperties _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _scheduling. + * @member {"scheduling"|undefined} _scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_scheduling", { + get: $util.oneOfGetter($oneOfFields = ["scheduling"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _minCpuPlatform. + * @member {"minCpuPlatform"|undefined} _minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_minCpuPlatform", { + get: $util.oneOfGetter($oneOfFields = ["minCpuPlatform"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _keyRevocationActionType. + * @member {"keyRevocationActionType"|undefined} _keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_keyRevocationActionType", { + get: $util.oneOfGetter($oneOfFields = ["keyRevocationActionType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceBackupProperties _sourceInstance. + * @member {"sourceInstance"|undefined} _sourceInstance + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @instance + */ + Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_sourceInstance", { + get: $util.oneOfGetter($oneOfFields = ["sourceInstance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ComputeInstanceBackupProperties instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties * @static - * @param {google.cloud.backupdr.v1.IGetBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest instance + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties instance */ - GetBackupRequest.create = function create(properties) { - return new GetBackupRequest(properties); + ComputeInstanceBackupProperties.create = function create(properties) { + return new ComputeInstanceBackupProperties(properties); }; /** - * Encodes the specified GetBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties * @static - * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties} message ComputeInstanceBackupProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupRequest.encode = function encode(message, writer) { + ComputeInstanceBackupProperties.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.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + $root.google.cloud.backupdr.v1.Tags.encode(message.tags, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.machineType); + if (message.canIpForward != null && Object.hasOwnProperty.call(message, "canIpForward")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.canIpForward); + if (message.networkInterface != null && message.networkInterface.length) + for (var i = 0; i < message.networkInterface.length; ++i) + $root.google.cloud.backupdr.v1.NetworkInterface.encode(message.networkInterface[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.disk != null && message.disk.length) + for (var i = 0; i < message.disk.length; ++i) + $root.google.cloud.backupdr.v1.AttachedDisk.encode(message.disk[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.cloud.backupdr.v1.Metadata.encode(message.metadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.serviceAccount != null && message.serviceAccount.length) + for (var i = 0; i < message.serviceAccount.length; ++i) + $root.google.cloud.backupdr.v1.ServiceAccount.encode(message.serviceAccount[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) + $root.google.cloud.backupdr.v1.Scheduling.encode(message.scheduling, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.guestAccelerator != null && message.guestAccelerator.length) + for (var i = 0; i < message.guestAccelerator.length; ++i) + $root.google.cloud.backupdr.v1.AcceleratorConfig.encode(message.guestAccelerator[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.minCpuPlatform); + if (message.keyRevocationActionType != null && Object.hasOwnProperty.call(message, "keyRevocationActionType")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.keyRevocationActionType); + if (message.sourceInstance != null && Object.hasOwnProperty.call(message, "sourceInstance")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.sourceInstance); + 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 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified GetBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GetBackupRequest.verify|verify} messages. + * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties * @static - * @param {google.cloud.backupdr.v1.IGetBackupRequest} message GetBackupRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties} message ComputeInstanceBackupProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + ComputeInstanceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBackupRequest message from the specified reader or buffer. + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBackupRequest.decode = function decode(reader, length) { + ComputeInstanceBackupProperties.decode = function 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.backupdr.v1.GetBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.description = reader.string(); break; } case 2: { - message.view = reader.int32(); + message.tags = $root.google.cloud.backupdr.v1.Tags.decode(reader, reader.uint32()); + break; + } + case 3: { + message.machineType = reader.string(); + break; + } + case 4: { + message.canIpForward = reader.bool(); + break; + } + case 5: { + if (!(message.networkInterface && message.networkInterface.length)) + message.networkInterface = []; + message.networkInterface.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.disk && message.disk.length)) + message.disk = []; + message.disk.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader, reader.uint32())); + break; + } + case 7: { + message.metadata = $root.google.cloud.backupdr.v1.Metadata.decode(reader, reader.uint32()); + break; + } + case 8: { + if (!(message.serviceAccount && message.serviceAccount.length)) + message.serviceAccount = []; + message.serviceAccount.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader, reader.uint32())); + break; + } + case 9: { + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.decode(reader, reader.uint32()); + break; + } + case 10: { + if (!(message.guestAccelerator && message.guestAccelerator.length)) + message.guestAccelerator = []; + message.guestAccelerator.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader, reader.uint32())); + break; + } + case 11: { + message.minCpuPlatform = reader.string(); + break; + } + case 12: { + message.keyRevocationActionType = reader.int32(); + break; + } + case 13: { + message.sourceInstance = reader.string(); + break; + } + case 14: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; } default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.GetBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetBackupRequest.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.view != null && message.hasOwnProperty("view")) - switch (message.view) { - default: - return "view: enum value expected"; + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComputeInstanceBackupProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComputeInstanceBackupProperties message. + * @function verify + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComputeInstanceBackupProperties.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + properties._tags = 1; + { + var error = $root.google.cloud.backupdr.v1.Tags.verify(message.tags); + if (error) + return "tags." + error; + } + } + if (message.machineType != null && message.hasOwnProperty("machineType")) { + properties._machineType = 1; + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + properties._canIpForward = 1; + if (typeof message.canIpForward !== "boolean") + return "canIpForward: boolean expected"; + } + if (message.networkInterface != null && message.hasOwnProperty("networkInterface")) { + if (!Array.isArray(message.networkInterface)) + return "networkInterface: array expected"; + for (var i = 0; i < message.networkInterface.length; ++i) { + var error = $root.google.cloud.backupdr.v1.NetworkInterface.verify(message.networkInterface[i]); + if (error) + return "networkInterface." + error; + } + } + if (message.disk != null && message.hasOwnProperty("disk")) { + if (!Array.isArray(message.disk)) + return "disk: array expected"; + for (var i = 0; i < message.disk.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AttachedDisk.verify(message.disk[i]); + if (error) + return "disk." + error; + } + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + { + var error = $root.google.cloud.backupdr.v1.Metadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) { + if (!Array.isArray(message.serviceAccount)) + return "serviceAccount: array expected"; + for (var i = 0; i < message.serviceAccount.length; ++i) { + var error = $root.google.cloud.backupdr.v1.ServiceAccount.verify(message.serviceAccount[i]); + if (error) + return "serviceAccount." + error; + } + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + properties._scheduling = 1; + { + var error = $root.google.cloud.backupdr.v1.Scheduling.verify(message.scheduling); + if (error) + return "scheduling." + error; + } + } + if (message.guestAccelerator != null && message.hasOwnProperty("guestAccelerator")) { + if (!Array.isArray(message.guestAccelerator)) + return "guestAccelerator: array expected"; + for (var i = 0; i < message.guestAccelerator.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AcceleratorConfig.verify(message.guestAccelerator[i]); + if (error) + return "guestAccelerator." + error; + } + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + properties._minCpuPlatform = 1; + if (!$util.isString(message.minCpuPlatform)) + return "minCpuPlatform: string expected"; + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + properties._keyRevocationActionType = 1; + switch (message.keyRevocationActionType) { + default: + return "keyRevocationActionType: enum value expected"; case 0: case 1: case 2: break; } + } + if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) { + properties._sourceInstance = 1; + if (!$util.isString(message.sourceInstance)) + return "sourceInstance: string expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } return null; }; /** - * Creates a GetBackupRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GetBackupRequest} GetBackupRequest + * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties */ - GetBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GetBackupRequest) + ComputeInstanceBackupProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties) return object; - var message = new $root.google.cloud.backupdr.v1.GetBackupRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties(); + if (object.description != null) + message.description = String(object.description); + if (object.tags != null) { + if (typeof object.tags !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.tags: object expected"); + message.tags = $root.google.cloud.backupdr.v1.Tags.fromObject(object.tags); + } + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.canIpForward != null) + message.canIpForward = Boolean(object.canIpForward); + if (object.networkInterface) { + if (!Array.isArray(object.networkInterface)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: array expected"); + message.networkInterface = []; + for (var i = 0; i < object.networkInterface.length; ++i) { + if (typeof object.networkInterface[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: object expected"); + message.networkInterface[i] = $root.google.cloud.backupdr.v1.NetworkInterface.fromObject(object.networkInterface[i]); + } + } + if (object.disk) { + if (!Array.isArray(object.disk)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.disk: array expected"); + message.disk = []; + for (var i = 0; i < object.disk.length; ++i) { + if (typeof object.disk[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.disk: object expected"); + message.disk[i] = $root.google.cloud.backupdr.v1.AttachedDisk.fromObject(object.disk[i]); + } + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.metadata: object expected"); + message.metadata = $root.google.cloud.backupdr.v1.Metadata.fromObject(object.metadata); + } + if (object.serviceAccount) { + if (!Array.isArray(object.serviceAccount)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.serviceAccount: array expected"); + message.serviceAccount = []; + for (var i = 0; i < object.serviceAccount.length; ++i) { + if (typeof object.serviceAccount[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.serviceAccount: object expected"); + message.serviceAccount[i] = $root.google.cloud.backupdr.v1.ServiceAccount.fromObject(object.serviceAccount[i]); + } + } + if (object.scheduling != null) { + if (typeof object.scheduling !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.scheduling: object expected"); + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.fromObject(object.scheduling); + } + if (object.guestAccelerator) { + if (!Array.isArray(object.guestAccelerator)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.guestAccelerator: array expected"); + message.guestAccelerator = []; + for (var i = 0; i < object.guestAccelerator.length; ++i) { + if (typeof object.guestAccelerator[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.guestAccelerator: object expected"); + message.guestAccelerator[i] = $root.google.cloud.backupdr.v1.AcceleratorConfig.fromObject(object.guestAccelerator[i]); + } + } + if (object.minCpuPlatform != null) + message.minCpuPlatform = String(object.minCpuPlatform); + switch (object.keyRevocationActionType) { default: - if (typeof object.view === "number") { - message.view = object.view; + if (typeof object.keyRevocationActionType === "number") { + message.keyRevocationActionType = object.keyRevocationActionType; break; } break; - case "BACKUP_VIEW_UNSPECIFIED": + case "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": case 0: - message.view = 0; + message.keyRevocationActionType = 0; break; - case "BACKUP_VIEW_BASIC": + case "NONE": case 1: - message.view = 1; + message.keyRevocationActionType = 1; break; - case "BACKUP_VIEW_FULL": + case "STOP": case 2: - message.view = 2; + message.keyRevocationActionType = 2; break; } + if (object.sourceInstance != null) + message.sourceInstance = String(object.sourceInstance); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } return message; }; /** - * Creates a plain object from a GetBackupRequest message. Also converts values to other types if specified. + * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties * @static - * @param {google.cloud.backupdr.v1.GetBackupRequest} message GetBackupRequest + * @param {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} message ComputeInstanceBackupProperties * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBackupRequest.toObject = function toObject(message, options) { + ComputeInstanceBackupProperties.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "BACKUP_VIEW_UNSPECIFIED" : 0; + if (options.arrays || options.defaults) { + object.networkInterface = []; + object.disk = []; + object.serviceAccount = []; + object.guestAccelerator = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + object.tags = $root.google.cloud.backupdr.v1.Tags.toObject(message.tags, options); + if (options.oneofs) + object._tags = "tags"; + } + if (message.machineType != null && message.hasOwnProperty("machineType")) { + object.machineType = message.machineType; + if (options.oneofs) + object._machineType = "machineType"; + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + object.canIpForward = message.canIpForward; + if (options.oneofs) + object._canIpForward = "canIpForward"; + } + if (message.networkInterface && message.networkInterface.length) { + object.networkInterface = []; + for (var j = 0; j < message.networkInterface.length; ++j) + object.networkInterface[j] = $root.google.cloud.backupdr.v1.NetworkInterface.toObject(message.networkInterface[j], options); + } + if (message.disk && message.disk.length) { + object.disk = []; + for (var j = 0; j < message.disk.length; ++j) + object.disk[j] = $root.google.cloud.backupdr.v1.AttachedDisk.toObject(message.disk[j], options); + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = $root.google.cloud.backupdr.v1.Metadata.toObject(message.metadata, options); + if (options.oneofs) + object._metadata = "metadata"; + } + if (message.serviceAccount && message.serviceAccount.length) { + object.serviceAccount = []; + for (var j = 0; j < message.serviceAccount.length; ++j) + object.serviceAccount[j] = $root.google.cloud.backupdr.v1.ServiceAccount.toObject(message.serviceAccount[j], options); + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + object.scheduling = $root.google.cloud.backupdr.v1.Scheduling.toObject(message.scheduling, options); + if (options.oneofs) + object._scheduling = "scheduling"; + } + if (message.guestAccelerator && message.guestAccelerator.length) { + object.guestAccelerator = []; + for (var j = 0; j < message.guestAccelerator.length; ++j) + object.guestAccelerator[j] = $root.google.cloud.backupdr.v1.AcceleratorConfig.toObject(message.guestAccelerator[j], options); + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + object.minCpuPlatform = message.minCpuPlatform; + if (options.oneofs) + object._minCpuPlatform = "minCpuPlatform"; + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + object.keyRevocationActionType = options.enums === String ? $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] === undefined ? message.keyRevocationActionType : $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] : message.keyRevocationActionType; + if (options.oneofs) + object._keyRevocationActionType = "keyRevocationActionType"; + } + if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) { + object.sourceInstance = message.sourceInstance; + if (options.oneofs) + object._sourceInstance = "sourceInstance"; + } + 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.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.view != null && message.hasOwnProperty("view")) - object.view = options.enums === String ? $root.google.cloud.backupdr.v1.BackupView[message.view] === undefined ? message.view : $root.google.cloud.backupdr.v1.BackupView[message.view] : message.view; return object; }; /** - * Converts this GetBackupRequest to JSON. + * Converts this ComputeInstanceBackupProperties to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties * @instance * @returns {Object.} JSON object */ - GetBackupRequest.prototype.toJSON = function toJSON() { + ComputeInstanceBackupProperties.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetBackupRequest + * Gets the default type url for ComputeInstanceBackupProperties * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GetBackupRequest + * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ComputeInstanceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GetBackupRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceBackupProperties"; }; - return GetBackupRequest; + return ComputeInstanceBackupProperties; })(); - v1.UpdateBackupRequest = (function() { + v1.ComputeInstanceRestoreProperties = (function() { /** - * Properties of an UpdateBackupRequest. + * Properties of a ComputeInstanceRestoreProperties. * @memberof google.cloud.backupdr.v1 - * @interface IUpdateBackupRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupRequest updateMask - * @property {google.cloud.backupdr.v1.IBackup|null} [backup] UpdateBackupRequest backup - * @property {string|null} [requestId] UpdateBackupRequest requestId + * @interface IComputeInstanceRestoreProperties + * @property {string|null} [name] ComputeInstanceRestoreProperties name + * @property {google.cloud.backupdr.v1.IAdvancedMachineFeatures|null} [advancedMachineFeatures] ComputeInstanceRestoreProperties advancedMachineFeatures + * @property {boolean|null} [canIpForward] ComputeInstanceRestoreProperties canIpForward + * @property {google.cloud.backupdr.v1.IConfidentialInstanceConfig|null} [confidentialInstanceConfig] ComputeInstanceRestoreProperties confidentialInstanceConfig + * @property {boolean|null} [deletionProtection] ComputeInstanceRestoreProperties deletionProtection + * @property {string|null} [description] ComputeInstanceRestoreProperties description + * @property {Array.|null} [disks] ComputeInstanceRestoreProperties disks + * @property {google.cloud.backupdr.v1.IDisplayDevice|null} [displayDevice] ComputeInstanceRestoreProperties displayDevice + * @property {Array.|null} [guestAccelerators] ComputeInstanceRestoreProperties guestAccelerators + * @property {string|null} [hostname] ComputeInstanceRestoreProperties hostname + * @property {google.cloud.backupdr.v1.ICustomerEncryptionKey|null} [instanceEncryptionKey] ComputeInstanceRestoreProperties instanceEncryptionKey + * @property {google.cloud.backupdr.v1.KeyRevocationActionType|null} [keyRevocationActionType] ComputeInstanceRestoreProperties keyRevocationActionType + * @property {Object.|null} [labels] ComputeInstanceRestoreProperties labels + * @property {string|null} [machineType] ComputeInstanceRestoreProperties machineType + * @property {google.cloud.backupdr.v1.IMetadata|null} [metadata] ComputeInstanceRestoreProperties metadata + * @property {string|null} [minCpuPlatform] ComputeInstanceRestoreProperties minCpuPlatform + * @property {Array.|null} [networkInterfaces] ComputeInstanceRestoreProperties networkInterfaces + * @property {google.cloud.backupdr.v1.INetworkPerformanceConfig|null} [networkPerformanceConfig] ComputeInstanceRestoreProperties networkPerformanceConfig + * @property {google.cloud.backupdr.v1.IInstanceParams|null} [params] ComputeInstanceRestoreProperties params + * @property {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null} [privateIpv6GoogleAccess] ComputeInstanceRestoreProperties privateIpv6GoogleAccess + * @property {google.cloud.backupdr.v1.IAllocationAffinity|null} [allocationAffinity] ComputeInstanceRestoreProperties allocationAffinity + * @property {Array.|null} [resourcePolicies] ComputeInstanceRestoreProperties resourcePolicies + * @property {google.cloud.backupdr.v1.IScheduling|null} [scheduling] ComputeInstanceRestoreProperties scheduling + * @property {Array.|null} [serviceAccounts] ComputeInstanceRestoreProperties serviceAccounts + * @property {google.cloud.backupdr.v1.ITags|null} [tags] ComputeInstanceRestoreProperties tags */ /** - * Constructs a new UpdateBackupRequest. + * Constructs a new ComputeInstanceRestoreProperties. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an UpdateBackupRequest. - * @implements IUpdateBackupRequest + * @classdesc Represents a ComputeInstanceRestoreProperties. + * @implements IComputeInstanceRestoreProperties * @constructor - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties=} [properties] Properties to set */ - function UpdateBackupRequest(properties) { + function ComputeInstanceRestoreProperties(properties) { + this.disks = []; + this.guestAccelerators = []; + this.labels = {}; + this.networkInterfaces = []; + this.resourcePolicies = []; + this.serviceAccounts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22481,613 +22566,528 @@ } /** - * UpdateBackupRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * ComputeInstanceRestoreProperties name. + * @member {string|null|undefined} name + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @instance */ - UpdateBackupRequest.prototype.updateMask = null; + ComputeInstanceRestoreProperties.prototype.name = null; /** - * UpdateBackupRequest backup. - * @member {google.cloud.backupdr.v1.IBackup|null|undefined} backup - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * ComputeInstanceRestoreProperties advancedMachineFeatures. + * @member {google.cloud.backupdr.v1.IAdvancedMachineFeatures|null|undefined} advancedMachineFeatures + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @instance */ - UpdateBackupRequest.prototype.backup = null; + ComputeInstanceRestoreProperties.prototype.advancedMachineFeatures = null; /** - * UpdateBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * ComputeInstanceRestoreProperties canIpForward. + * @member {boolean|null|undefined} canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @instance */ - UpdateBackupRequest.prototype.requestId = ""; + ComputeInstanceRestoreProperties.prototype.canIpForward = null; /** - * Creates a new UpdateBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest instance + * ComputeInstanceRestoreProperties confidentialInstanceConfig. + * @member {google.cloud.backupdr.v1.IConfidentialInstanceConfig|null|undefined} confidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - UpdateBackupRequest.create = function create(properties) { - return new UpdateBackupRequest(properties); - }; + ComputeInstanceRestoreProperties.prototype.confidentialInstanceConfig = null; /** - * Encodes the specified UpdateBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * ComputeInstanceRestoreProperties deletionProtection. + * @member {boolean|null|undefined} deletionProtection + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - UpdateBackupRequest.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.backup != null && Object.hasOwnProperty.call(message, "backup")) - $root.google.cloud.backupdr.v1.Backup.encode(message.backup, 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; - }; + ComputeInstanceRestoreProperties.prototype.deletionProtection = null; /** - * Encodes the specified UpdateBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.UpdateBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IUpdateBackupRequest} message UpdateBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * ComputeInstanceRestoreProperties description. + * @member {string|null|undefined} description + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - UpdateBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + ComputeInstanceRestoreProperties.prototype.description = null; /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * ComputeInstanceRestoreProperties disks. + * @member {Array.} disks + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - UpdateBackupRequest.decode = function 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.backupdr.v1.UpdateBackupRequest(); - 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.backup = $root.google.cloud.backupdr.v1.Backup.decode(reader, reader.uint32()); - break; - } - case 3: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + ComputeInstanceRestoreProperties.prototype.disks = $util.emptyArray; /** - * Decodes an UpdateBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * ComputeInstanceRestoreProperties displayDevice. + * @member {google.cloud.backupdr.v1.IDisplayDevice|null|undefined} displayDevice + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - UpdateBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + ComputeInstanceRestoreProperties.prototype.displayDevice = null; /** - * Verifies an UpdateBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * ComputeInstanceRestoreProperties guestAccelerators. + * @member {Array.} guestAccelerators + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - UpdateBackupRequest.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.backup != null && message.hasOwnProperty("backup")) { - var error = $root.google.cloud.backupdr.v1.Backup.verify(message.backup); - if (error) - return "backup." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; + ComputeInstanceRestoreProperties.prototype.guestAccelerators = $util.emptyArray; /** - * Creates an UpdateBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.UpdateBackupRequest} UpdateBackupRequest + * ComputeInstanceRestoreProperties hostname. + * @member {string|null|undefined} hostname + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - UpdateBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.UpdateBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.UpdateBackupRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.backup != null) { - if (typeof object.backup !== "object") - throw TypeError(".google.cloud.backupdr.v1.UpdateBackupRequest.backup: object expected"); - message.backup = $root.google.cloud.backupdr.v1.Backup.fromObject(object.backup); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; + ComputeInstanceRestoreProperties.prototype.hostname = null; /** - * Creates a plain object from an UpdateBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {google.cloud.backupdr.v1.UpdateBackupRequest} message UpdateBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * ComputeInstanceRestoreProperties instanceEncryptionKey. + * @member {google.cloud.backupdr.v1.ICustomerEncryptionKey|null|undefined} instanceEncryptionKey + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - UpdateBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.backup = null; - object.requestId = ""; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.backup != null && message.hasOwnProperty("backup")) - object.backup = $root.google.cloud.backupdr.v1.Backup.toObject(message.backup, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; + ComputeInstanceRestoreProperties.prototype.instanceEncryptionKey = null; /** - * Converts this UpdateBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest + * ComputeInstanceRestoreProperties keyRevocationActionType. + * @member {google.cloud.backupdr.v1.KeyRevocationActionType|null|undefined} keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @instance - * @returns {Object.} JSON object */ - UpdateBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + ComputeInstanceRestoreProperties.prototype.keyRevocationActionType = null; /** - * Gets the default type url for UpdateBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.UpdateBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * ComputeInstanceRestoreProperties labels. + * @member {Object.} labels + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - UpdateBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.UpdateBackupRequest"; - }; - - return UpdateBackupRequest; - })(); - - v1.DeleteBackupRequest = (function() { + ComputeInstanceRestoreProperties.prototype.labels = $util.emptyObject; /** - * Properties of a DeleteBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IDeleteBackupRequest - * @property {string|null} [name] DeleteBackupRequest name - * @property {string|null} [requestId] DeleteBackupRequest requestId + * ComputeInstanceRestoreProperties machineType. + * @member {string|null|undefined} machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ + ComputeInstanceRestoreProperties.prototype.machineType = null; /** - * Constructs a new DeleteBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DeleteBackupRequest. - * @implements IDeleteBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set + * ComputeInstanceRestoreProperties metadata. + * @member {google.cloud.backupdr.v1.IMetadata|null|undefined} metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - function DeleteBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + ComputeInstanceRestoreProperties.prototype.metadata = null; /** - * DeleteBackupRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * ComputeInstanceRestoreProperties minCpuPlatform. + * @member {string|null|undefined} minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @instance */ - DeleteBackupRequest.prototype.name = ""; + ComputeInstanceRestoreProperties.prototype.minCpuPlatform = null; /** - * DeleteBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * ComputeInstanceRestoreProperties networkInterfaces. + * @member {Array.} networkInterfaces + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @instance */ - DeleteBackupRequest.prototype.requestId = ""; + ComputeInstanceRestoreProperties.prototype.networkInterfaces = $util.emptyArray; /** - * Creates a new DeleteBackupRequest instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest instance + * ComputeInstanceRestoreProperties networkPerformanceConfig. + * @member {google.cloud.backupdr.v1.INetworkPerformanceConfig|null|undefined} networkPerformanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - DeleteBackupRequest.create = function create(properties) { - return new DeleteBackupRequest(properties); - }; + ComputeInstanceRestoreProperties.prototype.networkPerformanceConfig = null; /** - * Encodes the specified DeleteBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * ComputeInstanceRestoreProperties params. + * @member {google.cloud.backupdr.v1.IInstanceParams|null|undefined} params + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - DeleteBackupRequest.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; - }; + ComputeInstanceRestoreProperties.prototype.params = null; /** - * Encodes the specified DeleteBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DeleteBackupRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {google.cloud.backupdr.v1.IDeleteBackupRequest} message DeleteBackupRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * ComputeInstanceRestoreProperties privateIpv6GoogleAccess. + * @member {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null|undefined} privateIpv6GoogleAccess + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - DeleteBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + ComputeInstanceRestoreProperties.prototype.privateIpv6GoogleAccess = null; /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * ComputeInstanceRestoreProperties allocationAffinity. + * @member {google.cloud.backupdr.v1.IAllocationAffinity|null|undefined} allocationAffinity + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - DeleteBackupRequest.decode = function 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.backupdr.v1.DeleteBackupRequest(); - 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; - }; + ComputeInstanceRestoreProperties.prototype.allocationAffinity = null; /** - * Decodes a DeleteBackupRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * ComputeInstanceRestoreProperties resourcePolicies. + * @member {Array.} resourcePolicies + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - DeleteBackupRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + ComputeInstanceRestoreProperties.prototype.resourcePolicies = $util.emptyArray; /** - * Verifies a DeleteBackupRequest message. - * @function verify - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * ComputeInstanceRestoreProperties scheduling. + * @member {google.cloud.backupdr.v1.IScheduling|null|undefined} scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - DeleteBackupRequest.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; - }; + ComputeInstanceRestoreProperties.prototype.scheduling = null; /** - * Creates a DeleteBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DeleteBackupRequest} DeleteBackupRequest + * ComputeInstanceRestoreProperties serviceAccounts. + * @member {Array.} serviceAccounts + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - DeleteBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DeleteBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.DeleteBackupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; + ComputeInstanceRestoreProperties.prototype.serviceAccounts = $util.emptyArray; /** - * Creates a plain object from a DeleteBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {google.cloud.backupdr.v1.DeleteBackupRequest} message DeleteBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * ComputeInstanceRestoreProperties tags. + * @member {google.cloud.backupdr.v1.ITags|null|undefined} tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - DeleteBackupRequest.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; - }; + ComputeInstanceRestoreProperties.prototype.tags = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Converts this DeleteBackupRequest to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest + * ComputeInstanceRestoreProperties _name. + * @member {"name"|undefined} _name + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @instance - * @returns {Object.} JSON object */ - DeleteBackupRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Gets the default type url for DeleteBackupRequest - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DeleteBackupRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * ComputeInstanceRestoreProperties _advancedMachineFeatures. + * @member {"advancedMachineFeatures"|undefined} _advancedMachineFeatures + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - DeleteBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DeleteBackupRequest"; - }; - - return DeleteBackupRequest; - })(); - - v1.RestoreBackupRequest = (function() { + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_advancedMachineFeatures", { + get: $util.oneOfGetter($oneOfFields = ["advancedMachineFeatures"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Properties of a RestoreBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @interface IRestoreBackupRequest - * @property {string|null} [name] RestoreBackupRequest name - * @property {string|null} [requestId] RestoreBackupRequest requestId - * @property {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null} [computeInstanceTargetEnvironment] RestoreBackupRequest computeInstanceTargetEnvironment - * @property {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null} [computeInstanceRestoreProperties] RestoreBackupRequest computeInstanceRestoreProperties + * ComputeInstanceRestoreProperties _canIpForward. + * @member {"canIpForward"|undefined} _canIpForward + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_canIpForward", { + get: $util.oneOfGetter($oneOfFields = ["canIpForward"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Constructs a new RestoreBackupRequest. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a RestoreBackupRequest. - * @implements IRestoreBackupRequest - * @constructor - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set + * ComputeInstanceRestoreProperties _confidentialInstanceConfig. + * @member {"confidentialInstanceConfig"|undefined} _confidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance */ - function RestoreBackupRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_confidentialInstanceConfig", { + get: $util.oneOfGetter($oneOfFields = ["confidentialInstanceConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * RestoreBackupRequest name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * ComputeInstanceRestoreProperties _deletionProtection. + * @member {"deletionProtection"|undefined} _deletionProtection + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @instance */ - RestoreBackupRequest.prototype.name = ""; + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_deletionProtection", { + get: $util.oneOfGetter($oneOfFields = ["deletionProtection"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * RestoreBackupRequest requestId. - * @member {string} requestId - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * ComputeInstanceRestoreProperties _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @instance */ - RestoreBackupRequest.prototype.requestId = ""; + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * RestoreBackupRequest computeInstanceTargetEnvironment. - * @member {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment|null|undefined} computeInstanceTargetEnvironment - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * ComputeInstanceRestoreProperties _displayDevice. + * @member {"displayDevice"|undefined} _displayDevice + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @instance */ - RestoreBackupRequest.prototype.computeInstanceTargetEnvironment = null; + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_displayDevice", { + get: $util.oneOfGetter($oneOfFields = ["displayDevice"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * RestoreBackupRequest computeInstanceRestoreProperties. - * @member {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties|null|undefined} computeInstanceRestoreProperties - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * ComputeInstanceRestoreProperties _hostname. + * @member {"hostname"|undefined} _hostname + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @instance */ - RestoreBackupRequest.prototype.computeInstanceRestoreProperties = null; + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_hostname", { + get: $util.oneOfGetter($oneOfFields = ["hostname"]), + set: $util.oneOfSetter($oneOfFields) + }); - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * ComputeInstanceRestoreProperties _instanceEncryptionKey. + * @member {"instanceEncryptionKey"|undefined} _instanceEncryptionKey + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_instanceEncryptionKey", { + get: $util.oneOfGetter($oneOfFields = ["instanceEncryptionKey"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * RestoreBackupRequest targetEnvironment. - * @member {"computeInstanceTargetEnvironment"|undefined} targetEnvironment - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * ComputeInstanceRestoreProperties _keyRevocationActionType. + * @member {"keyRevocationActionType"|undefined} _keyRevocationActionType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @instance */ - Object.defineProperty(RestoreBackupRequest.prototype, "targetEnvironment", { - get: $util.oneOfGetter($oneOfFields = ["computeInstanceTargetEnvironment"]), + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_keyRevocationActionType", { + get: $util.oneOfGetter($oneOfFields = ["keyRevocationActionType"]), set: $util.oneOfSetter($oneOfFields) }); /** - * RestoreBackupRequest instanceProperties. - * @member {"computeInstanceRestoreProperties"|undefined} instanceProperties - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * ComputeInstanceRestoreProperties _machineType. + * @member {"machineType"|undefined} _machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @instance */ - Object.defineProperty(RestoreBackupRequest.prototype, "instanceProperties", { - get: $util.oneOfGetter($oneOfFields = ["computeInstanceRestoreProperties"]), + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_machineType", { + get: $util.oneOfGetter($oneOfFields = ["machineType"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new RestoreBackupRequest instance using the specified properties. + * ComputeInstanceRestoreProperties _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _minCpuPlatform. + * @member {"minCpuPlatform"|undefined} _minCpuPlatform + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_minCpuPlatform", { + get: $util.oneOfGetter($oneOfFields = ["minCpuPlatform"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _networkPerformanceConfig. + * @member {"networkPerformanceConfig"|undefined} _networkPerformanceConfig + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_networkPerformanceConfig", { + get: $util.oneOfGetter($oneOfFields = ["networkPerformanceConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _params. + * @member {"params"|undefined} _params + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_params", { + get: $util.oneOfGetter($oneOfFields = ["params"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _privateIpv6GoogleAccess. + * @member {"privateIpv6GoogleAccess"|undefined} _privateIpv6GoogleAccess + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_privateIpv6GoogleAccess", { + get: $util.oneOfGetter($oneOfFields = ["privateIpv6GoogleAccess"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _allocationAffinity. + * @member {"allocationAffinity"|undefined} _allocationAffinity + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_allocationAffinity", { + get: $util.oneOfGetter($oneOfFields = ["allocationAffinity"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _scheduling. + * @member {"scheduling"|undefined} _scheduling + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_scheduling", { + get: $util.oneOfGetter($oneOfFields = ["scheduling"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ComputeInstanceRestoreProperties _tags. + * @member {"tags"|undefined} _tags + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @instance + */ + Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_tags", { + get: $util.oneOfGetter($oneOfFields = ["tags"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest instance + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties instance */ - RestoreBackupRequest.create = function create(properties) { - return new RestoreBackupRequest(properties); + ComputeInstanceRestoreProperties.create = function create(properties) { + return new ComputeInstanceRestoreProperties(properties); }; /** - * Encodes the specified RestoreBackupRequest message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreBackupRequest.encode = function encode(message, writer) { + ComputeInstanceRestoreProperties.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.computeInstanceTargetEnvironment != null && Object.hasOwnProperty.call(message, "computeInstanceTargetEnvironment")) - $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.encode(message.computeInstanceTargetEnvironment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.computeInstanceRestoreProperties != null && Object.hasOwnProperty.call(message, "computeInstanceRestoreProperties")) - $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.encode(message.computeInstanceRestoreProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.advancedMachineFeatures != null && Object.hasOwnProperty.call(message, "advancedMachineFeatures")) + $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.encode(message.advancedMachineFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.canIpForward != null && Object.hasOwnProperty.call(message, "canIpForward")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.canIpForward); + if (message.confidentialInstanceConfig != null && Object.hasOwnProperty.call(message, "confidentialInstanceConfig")) + $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.encode(message.confidentialInstanceConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.deletionProtection); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.disks != null && message.disks.length) + for (var i = 0; i < message.disks.length; ++i) + $root.google.cloud.backupdr.v1.AttachedDisk.encode(message.disks[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.displayDevice != null && Object.hasOwnProperty.call(message, "displayDevice")) + $root.google.cloud.backupdr.v1.DisplayDevice.encode(message.displayDevice, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.guestAccelerators != null && message.guestAccelerators.length) + for (var i = 0; i < message.guestAccelerators.length; ++i) + $root.google.cloud.backupdr.v1.AcceleratorConfig.encode(message.guestAccelerators[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.hostname); + if (message.instanceEncryptionKey != null && Object.hasOwnProperty.call(message, "instanceEncryptionKey")) + $root.google.cloud.backupdr.v1.CustomerEncryptionKey.encode(message.instanceEncryptionKey, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.keyRevocationActionType != null && Object.hasOwnProperty.call(message, "keyRevocationActionType")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.keyRevocationActionType); + 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 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.machineType); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.cloud.backupdr.v1.Metadata.encode(message.metadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.minCpuPlatform); + if (message.networkInterfaces != null && message.networkInterfaces.length) + for (var i = 0; i < message.networkInterfaces.length; ++i) + $root.google.cloud.backupdr.v1.NetworkInterface.encode(message.networkInterfaces[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.networkPerformanceConfig != null && Object.hasOwnProperty.call(message, "networkPerformanceConfig")) + $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.encode(message.networkPerformanceConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.params != null && Object.hasOwnProperty.call(message, "params")) + $root.google.cloud.backupdr.v1.InstanceParams.encode(message.params, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.privateIpv6GoogleAccess != null && Object.hasOwnProperty.call(message, "privateIpv6GoogleAccess")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.privateIpv6GoogleAccess); + if (message.allocationAffinity != null && Object.hasOwnProperty.call(message, "allocationAffinity")) + $root.google.cloud.backupdr.v1.AllocationAffinity.encode(message.allocationAffinity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.resourcePolicies != null && message.resourcePolicies.length) + for (var i = 0; i < message.resourcePolicies.length; ++i) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.resourcePolicies[i]); + if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) + $root.google.cloud.backupdr.v1.Scheduling.encode(message.scheduling, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.serviceAccounts != null && message.serviceAccounts.length) + for (var i = 0; i < message.serviceAccounts.length; ++i) + $root.google.cloud.backupdr.v1.ServiceAccount.encode(message.serviceAccounts[i], writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) + $root.google.cloud.backupdr.v1.Tags.encode(message.tags, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); return writer; }; /** - * Encodes the specified RestoreBackupRequest message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupRequest.verify|verify} messages. + * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupRequest} message RestoreBackupRequest message or plain object to encode + * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreBackupRequest.encodeDelimited = function encodeDelimited(message, writer) { + ComputeInstanceRestoreProperties.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RestoreBackupRequest message from the specified reader or buffer. + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreBackupRequest.decode = function decode(reader, length) { + ComputeInstanceRestoreProperties.decode = function 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.backupdr.v1.RestoreBackupRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -23096,15 +23096,128 @@ break; } case 2: { - message.requestId = reader.string(); + message.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.decode(reader, reader.uint32()); break; } case 3: { - message.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.decode(reader, reader.uint32()); + message.canIpForward = reader.bool(); break; } case 4: { - message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.decode(reader, reader.uint32()); + message.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.deletionProtection = reader.bool(); + break; + } + case 6: { + message.description = reader.string(); + break; + } + case 7: { + if (!(message.disks && message.disks.length)) + message.disks = []; + message.disks.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader, reader.uint32())); + break; + } + case 8: { + message.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.guestAccelerators && message.guestAccelerators.length)) + message.guestAccelerators = []; + message.guestAccelerators.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader, reader.uint32())); + break; + } + case 10: { + message.hostname = reader.string(); + break; + } + case 11: { + message.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader, reader.uint32()); + break; + } + case 12: { + message.keyRevocationActionType = reader.int32(); + break; + } + case 13: { + 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 14: { + message.machineType = reader.string(); + break; + } + case 15: { + message.metadata = $root.google.cloud.backupdr.v1.Metadata.decode(reader, reader.uint32()); + break; + } + case 16: { + message.minCpuPlatform = reader.string(); + break; + } + case 17: { + if (!(message.networkInterfaces && message.networkInterfaces.length)) + message.networkInterfaces = []; + message.networkInterfaces.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader, reader.uint32())); + break; + } + case 18: { + message.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.decode(reader, reader.uint32()); + break; + } + case 19: { + message.params = $root.google.cloud.backupdr.v1.InstanceParams.decode(reader, reader.uint32()); + break; + } + case 20: { + message.privateIpv6GoogleAccess = reader.int32(); + break; + } + case 21: { + message.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.decode(reader, reader.uint32()); + break; + } + case 22: { + if (!(message.resourcePolicies && message.resourcePolicies.length)) + message.resourcePolicies = []; + message.resourcePolicies.push(reader.string()); + break; + } + case 23: { + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.decode(reader, reader.uint32()); + break; + } + case 24: { + if (!(message.serviceAccounts && message.serviceAccounts.length)) + message.serviceAccounts = []; + message.serviceAccounts.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader, reader.uint32())); + break; + } + case 26: { + message.tags = $root.google.cloud.backupdr.v1.Tags.decode(reader, reader.uint32()); break; } default: @@ -23116,168 +23229,619 @@ }; /** - * Decodes a RestoreBackupRequest message from the specified reader or buffer, length delimited. + * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreBackupRequest.decodeDelimited = function decodeDelimited(reader) { + ComputeInstanceRestoreProperties.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RestoreBackupRequest message. + * Verifies a ComputeInstanceRestoreProperties message. * @function verify - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RestoreBackupRequest.verify = function verify(message) { + ComputeInstanceRestoreProperties.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; 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.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { - properties.targetEnvironment = 1; + } + if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { + properties._advancedMachineFeatures = 1; { - var error = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify(message.computeInstanceTargetEnvironment); + var error = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.verify(message.advancedMachineFeatures); if (error) - return "computeInstanceTargetEnvironment." + error; + return "advancedMachineFeatures." + error; } } - if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { - properties.instanceProperties = 1; + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + properties._canIpForward = 1; + if (typeof message.canIpForward !== "boolean") + return "canIpForward: boolean expected"; + } + if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) { + properties._confidentialInstanceConfig = 1; { - var error = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify(message.computeInstanceRestoreProperties); + var error = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify(message.confidentialInstanceConfig); if (error) - return "computeInstanceRestoreProperties." + error; + return "confidentialInstanceConfig." + error; } } - return null; - }; - - /** - * Creates a RestoreBackupRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.RestoreBackupRequest} RestoreBackupRequest - */ - RestoreBackupRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupRequest) - return object; - var message = new $root.google.cloud.backupdr.v1.RestoreBackupRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.computeInstanceTargetEnvironment != null) { - if (typeof object.computeInstanceTargetEnvironment !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceTargetEnvironment: object expected"); - message.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.fromObject(object.computeInstanceTargetEnvironment); + if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) { + properties._deletionProtection = 1; + if (typeof message.deletionProtection !== "boolean") + return "deletionProtection: boolean expected"; } - if (object.computeInstanceRestoreProperties != null) { - if (typeof object.computeInstanceRestoreProperties !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupRequest.computeInstanceRestoreProperties: object expected"); - message.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.fromObject(object.computeInstanceRestoreProperties); + if (message.description != null && message.hasOwnProperty("description")) { + properties._description = 1; + if (!$util.isString(message.description)) + return "description: string expected"; } - return message; - }; - - /** - * Creates a plain object from a RestoreBackupRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest - * @static - * @param {google.cloud.backupdr.v1.RestoreBackupRequest} message RestoreBackupRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RestoreBackupRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.requestId = ""; + if (message.disks != null && message.hasOwnProperty("disks")) { + if (!Array.isArray(message.disks)) + return "disks: array expected"; + for (var i = 0; i < message.disks.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AttachedDisk.verify(message.disks[i]); + if (error) + return "disks." + error; + } } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.computeInstanceTargetEnvironment != null && message.hasOwnProperty("computeInstanceTargetEnvironment")) { - object.computeInstanceTargetEnvironment = $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.toObject(message.computeInstanceTargetEnvironment, options); - if (options.oneofs) - object.targetEnvironment = "computeInstanceTargetEnvironment"; + if (message.displayDevice != null && message.hasOwnProperty("displayDevice")) { + properties._displayDevice = 1; + { + var error = $root.google.cloud.backupdr.v1.DisplayDevice.verify(message.displayDevice); + if (error) + return "displayDevice." + error; + } } - if (message.computeInstanceRestoreProperties != null && message.hasOwnProperty("computeInstanceRestoreProperties")) { - object.computeInstanceRestoreProperties = $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.toObject(message.computeInstanceRestoreProperties, options); - if (options.oneofs) - object.instanceProperties = "computeInstanceRestoreProperties"; + if (message.guestAccelerators != null && message.hasOwnProperty("guestAccelerators")) { + if (!Array.isArray(message.guestAccelerators)) + return "guestAccelerators: array expected"; + for (var i = 0; i < message.guestAccelerators.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AcceleratorConfig.verify(message.guestAccelerators[i]); + if (error) + return "guestAccelerators." + error; + } } - return object; + if (message.hostname != null && message.hasOwnProperty("hostname")) { + properties._hostname = 1; + if (!$util.isString(message.hostname)) + return "hostname: string expected"; + } + if (message.instanceEncryptionKey != null && message.hasOwnProperty("instanceEncryptionKey")) { + properties._instanceEncryptionKey = 1; + { + var error = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.verify(message.instanceEncryptionKey); + if (error) + return "instanceEncryptionKey." + error; + } + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + properties._keyRevocationActionType = 1; + switch (message.keyRevocationActionType) { + default: + return "keyRevocationActionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + 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.machineType != null && message.hasOwnProperty("machineType")) { + properties._machineType = 1; + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + { + var error = $root.google.cloud.backupdr.v1.Metadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + properties._minCpuPlatform = 1; + if (!$util.isString(message.minCpuPlatform)) + return "minCpuPlatform: string expected"; + } + if (message.networkInterfaces != null && message.hasOwnProperty("networkInterfaces")) { + if (!Array.isArray(message.networkInterfaces)) + return "networkInterfaces: array expected"; + for (var i = 0; i < message.networkInterfaces.length; ++i) { + var error = $root.google.cloud.backupdr.v1.NetworkInterface.verify(message.networkInterfaces[i]); + if (error) + return "networkInterfaces." + error; + } + } + if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { + properties._networkPerformanceConfig = 1; + { + var error = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.verify(message.networkPerformanceConfig); + if (error) + return "networkPerformanceConfig." + error; + } + } + if (message.params != null && message.hasOwnProperty("params")) { + properties._params = 1; + { + var error = $root.google.cloud.backupdr.v1.InstanceParams.verify(message.params); + if (error) + return "params." + error; + } + } + if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) { + properties._privateIpv6GoogleAccess = 1; + switch (message.privateIpv6GoogleAccess) { + default: + return "privateIpv6GoogleAccess: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.allocationAffinity != null && message.hasOwnProperty("allocationAffinity")) { + properties._allocationAffinity = 1; + { + var error = $root.google.cloud.backupdr.v1.AllocationAffinity.verify(message.allocationAffinity); + if (error) + return "allocationAffinity." + error; + } + } + if (message.resourcePolicies != null && message.hasOwnProperty("resourcePolicies")) { + if (!Array.isArray(message.resourcePolicies)) + return "resourcePolicies: array expected"; + for (var i = 0; i < message.resourcePolicies.length; ++i) + if (!$util.isString(message.resourcePolicies[i])) + return "resourcePolicies: string[] expected"; + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + properties._scheduling = 1; + { + var error = $root.google.cloud.backupdr.v1.Scheduling.verify(message.scheduling); + if (error) + return "scheduling." + error; + } + } + if (message.serviceAccounts != null && message.hasOwnProperty("serviceAccounts")) { + if (!Array.isArray(message.serviceAccounts)) + return "serviceAccounts: array expected"; + for (var i = 0; i < message.serviceAccounts.length; ++i) { + var error = $root.google.cloud.backupdr.v1.ServiceAccount.verify(message.serviceAccounts[i]); + if (error) + return "serviceAccounts." + error; + } + } + if (message.tags != null && message.hasOwnProperty("tags")) { + properties._tags = 1; + { + var error = $root.google.cloud.backupdr.v1.Tags.verify(message.tags); + if (error) + return "tags." + error; + } + } + return null; }; /** - * Converts this RestoreBackupRequest to JSON. + * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties + */ + ComputeInstanceRestoreProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties) + return object; + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties(); + if (object.name != null) + message.name = String(object.name); + if (object.advancedMachineFeatures != null) { + if (typeof object.advancedMachineFeatures !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.advancedMachineFeatures: object expected"); + message.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.fromObject(object.advancedMachineFeatures); + } + if (object.canIpForward != null) + message.canIpForward = Boolean(object.canIpForward); + if (object.confidentialInstanceConfig != null) { + if (typeof object.confidentialInstanceConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.confidentialInstanceConfig: object expected"); + message.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.fromObject(object.confidentialInstanceConfig); + } + if (object.deletionProtection != null) + message.deletionProtection = Boolean(object.deletionProtection); + if (object.description != null) + message.description = String(object.description); + if (object.disks) { + if (!Array.isArray(object.disks)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: array expected"); + message.disks = []; + for (var i = 0; i < object.disks.length; ++i) { + if (typeof object.disks[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: object expected"); + message.disks[i] = $root.google.cloud.backupdr.v1.AttachedDisk.fromObject(object.disks[i]); + } + } + if (object.displayDevice != null) { + if (typeof object.displayDevice !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.displayDevice: object expected"); + message.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.fromObject(object.displayDevice); + } + if (object.guestAccelerators) { + if (!Array.isArray(object.guestAccelerators)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.guestAccelerators: array expected"); + message.guestAccelerators = []; + for (var i = 0; i < object.guestAccelerators.length; ++i) { + if (typeof object.guestAccelerators[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.guestAccelerators: object expected"); + message.guestAccelerators[i] = $root.google.cloud.backupdr.v1.AcceleratorConfig.fromObject(object.guestAccelerators[i]); + } + } + if (object.hostname != null) + message.hostname = String(object.hostname); + if (object.instanceEncryptionKey != null) { + if (typeof object.instanceEncryptionKey !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.instanceEncryptionKey: object expected"); + message.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.fromObject(object.instanceEncryptionKey); + } + switch (object.keyRevocationActionType) { + default: + if (typeof object.keyRevocationActionType === "number") { + message.keyRevocationActionType = object.keyRevocationActionType; + break; + } + break; + case "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": + case 0: + message.keyRevocationActionType = 0; + break; + case "NONE": + case 1: + message.keyRevocationActionType = 1; + break; + case "STOP": + case 2: + message.keyRevocationActionType = 2; + break; + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.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.machineType != null) + message.machineType = String(object.machineType); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.metadata: object expected"); + message.metadata = $root.google.cloud.backupdr.v1.Metadata.fromObject(object.metadata); + } + if (object.minCpuPlatform != null) + message.minCpuPlatform = String(object.minCpuPlatform); + if (object.networkInterfaces) { + if (!Array.isArray(object.networkInterfaces)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkInterfaces: array expected"); + message.networkInterfaces = []; + for (var i = 0; i < object.networkInterfaces.length; ++i) { + if (typeof object.networkInterfaces[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkInterfaces: object expected"); + message.networkInterfaces[i] = $root.google.cloud.backupdr.v1.NetworkInterface.fromObject(object.networkInterfaces[i]); + } + } + if (object.networkPerformanceConfig != null) { + if (typeof object.networkPerformanceConfig !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkPerformanceConfig: object expected"); + message.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.fromObject(object.networkPerformanceConfig); + } + if (object.params != null) { + if (typeof object.params !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.params: object expected"); + message.params = $root.google.cloud.backupdr.v1.InstanceParams.fromObject(object.params); + } + switch (object.privateIpv6GoogleAccess) { + default: + if (typeof object.privateIpv6GoogleAccess === "number") { + message.privateIpv6GoogleAccess = object.privateIpv6GoogleAccess; + break; + } + break; + case "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": + case 0: + message.privateIpv6GoogleAccess = 0; + break; + case "INHERIT_FROM_SUBNETWORK": + case 1: + message.privateIpv6GoogleAccess = 1; + break; + case "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE": + case 2: + message.privateIpv6GoogleAccess = 2; + break; + case "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE": + case 3: + message.privateIpv6GoogleAccess = 3; + break; + } + if (object.allocationAffinity != null) { + if (typeof object.allocationAffinity !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.allocationAffinity: object expected"); + message.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.fromObject(object.allocationAffinity); + } + if (object.resourcePolicies) { + if (!Array.isArray(object.resourcePolicies)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.resourcePolicies: array expected"); + message.resourcePolicies = []; + for (var i = 0; i < object.resourcePolicies.length; ++i) + message.resourcePolicies[i] = String(object.resourcePolicies[i]); + } + if (object.scheduling != null) { + if (typeof object.scheduling !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.scheduling: object expected"); + message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.fromObject(object.scheduling); + } + if (object.serviceAccounts) { + if (!Array.isArray(object.serviceAccounts)) + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.serviceAccounts: array expected"); + message.serviceAccounts = []; + for (var i = 0; i < object.serviceAccounts.length; ++i) { + if (typeof object.serviceAccounts[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.serviceAccounts: object expected"); + message.serviceAccounts[i] = $root.google.cloud.backupdr.v1.ServiceAccount.fromObject(object.serviceAccounts[i]); + } + } + if (object.tags != null) { + if (typeof object.tags !== "object") + throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.tags: object expected"); + message.tags = $root.google.cloud.backupdr.v1.Tags.fromObject(object.tags); + } + return message; + }; + + /** + * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @static + * @param {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComputeInstanceRestoreProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.disks = []; + object.guestAccelerators = []; + object.networkInterfaces = []; + object.resourcePolicies = []; + object.serviceAccounts = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { + object.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.toObject(message.advancedMachineFeatures, options); + if (options.oneofs) + object._advancedMachineFeatures = "advancedMachineFeatures"; + } + if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { + object.canIpForward = message.canIpForward; + if (options.oneofs) + object._canIpForward = "canIpForward"; + } + if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) { + object.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.toObject(message.confidentialInstanceConfig, options); + if (options.oneofs) + object._confidentialInstanceConfig = "confidentialInstanceConfig"; + } + if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) { + object.deletionProtection = message.deletionProtection; + if (options.oneofs) + object._deletionProtection = "deletionProtection"; + } + if (message.description != null && message.hasOwnProperty("description")) { + object.description = message.description; + if (options.oneofs) + object._description = "description"; + } + if (message.disks && message.disks.length) { + object.disks = []; + for (var j = 0; j < message.disks.length; ++j) + object.disks[j] = $root.google.cloud.backupdr.v1.AttachedDisk.toObject(message.disks[j], options); + } + if (message.displayDevice != null && message.hasOwnProperty("displayDevice")) { + object.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.toObject(message.displayDevice, options); + if (options.oneofs) + object._displayDevice = "displayDevice"; + } + if (message.guestAccelerators && message.guestAccelerators.length) { + object.guestAccelerators = []; + for (var j = 0; j < message.guestAccelerators.length; ++j) + object.guestAccelerators[j] = $root.google.cloud.backupdr.v1.AcceleratorConfig.toObject(message.guestAccelerators[j], options); + } + if (message.hostname != null && message.hasOwnProperty("hostname")) { + object.hostname = message.hostname; + if (options.oneofs) + object._hostname = "hostname"; + } + if (message.instanceEncryptionKey != null && message.hasOwnProperty("instanceEncryptionKey")) { + object.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.toObject(message.instanceEncryptionKey, options); + if (options.oneofs) + object._instanceEncryptionKey = "instanceEncryptionKey"; + } + if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { + object.keyRevocationActionType = options.enums === String ? $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] === undefined ? message.keyRevocationActionType : $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] : message.keyRevocationActionType; + if (options.oneofs) + object._keyRevocationActionType = "keyRevocationActionType"; + } + 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.machineType != null && message.hasOwnProperty("machineType")) { + object.machineType = message.machineType; + if (options.oneofs) + object._machineType = "machineType"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = $root.google.cloud.backupdr.v1.Metadata.toObject(message.metadata, options); + if (options.oneofs) + object._metadata = "metadata"; + } + if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { + object.minCpuPlatform = message.minCpuPlatform; + if (options.oneofs) + object._minCpuPlatform = "minCpuPlatform"; + } + if (message.networkInterfaces && message.networkInterfaces.length) { + object.networkInterfaces = []; + for (var j = 0; j < message.networkInterfaces.length; ++j) + object.networkInterfaces[j] = $root.google.cloud.backupdr.v1.NetworkInterface.toObject(message.networkInterfaces[j], options); + } + if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { + object.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.toObject(message.networkPerformanceConfig, options); + if (options.oneofs) + object._networkPerformanceConfig = "networkPerformanceConfig"; + } + if (message.params != null && message.hasOwnProperty("params")) { + object.params = $root.google.cloud.backupdr.v1.InstanceParams.toObject(message.params, options); + if (options.oneofs) + object._params = "params"; + } + if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) { + object.privateIpv6GoogleAccess = options.enums === String ? $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess[message.privateIpv6GoogleAccess] === undefined ? message.privateIpv6GoogleAccess : $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess[message.privateIpv6GoogleAccess] : message.privateIpv6GoogleAccess; + if (options.oneofs) + object._privateIpv6GoogleAccess = "privateIpv6GoogleAccess"; + } + if (message.allocationAffinity != null && message.hasOwnProperty("allocationAffinity")) { + object.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.toObject(message.allocationAffinity, options); + if (options.oneofs) + object._allocationAffinity = "allocationAffinity"; + } + if (message.resourcePolicies && message.resourcePolicies.length) { + object.resourcePolicies = []; + for (var j = 0; j < message.resourcePolicies.length; ++j) + object.resourcePolicies[j] = message.resourcePolicies[j]; + } + if (message.scheduling != null && message.hasOwnProperty("scheduling")) { + object.scheduling = $root.google.cloud.backupdr.v1.Scheduling.toObject(message.scheduling, options); + if (options.oneofs) + object._scheduling = "scheduling"; + } + if (message.serviceAccounts && message.serviceAccounts.length) { + object.serviceAccounts = []; + for (var j = 0; j < message.serviceAccounts.length; ++j) + object.serviceAccounts[j] = $root.google.cloud.backupdr.v1.ServiceAccount.toObject(message.serviceAccounts[j], options); + } + if (message.tags != null && message.hasOwnProperty("tags")) { + object.tags = $root.google.cloud.backupdr.v1.Tags.toObject(message.tags, options); + if (options.oneofs) + object._tags = "tags"; + } + return object; + }; + + /** + * Converts this ComputeInstanceRestoreProperties to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @instance * @returns {Object.} JSON object */ - RestoreBackupRequest.prototype.toJSON = function toJSON() { + ComputeInstanceRestoreProperties.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RestoreBackupRequest + * Gets the default type url for ComputeInstanceRestoreProperties * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.RestoreBackupRequest + * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RestoreBackupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ComputeInstanceRestoreProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupRequest"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceRestoreProperties"; }; - return RestoreBackupRequest; + /** + * InstancePrivateIpv6GoogleAccess enum. + * @name google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess + * @enum {number} + * @property {number} INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED=0 INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED value + * @property {number} INHERIT_FROM_SUBNETWORK=1 INHERIT_FROM_SUBNETWORK value + * @property {number} ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE=2 ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE value + * @property {number} ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE=3 ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE value + */ + ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED"] = 0; + values[valuesById[1] = "INHERIT_FROM_SUBNETWORK"] = 1; + values[valuesById[2] = "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE"] = 2; + values[valuesById[3] = "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE"] = 3; + return values; + })(); + + return ComputeInstanceRestoreProperties; })(); - v1.RestoreBackupResponse = (function() { + v1.ComputeInstanceTargetEnvironment = (function() { /** - * Properties of a RestoreBackupResponse. + * Properties of a ComputeInstanceTargetEnvironment. * @memberof google.cloud.backupdr.v1 - * @interface IRestoreBackupResponse - * @property {google.cloud.backupdr.v1.ITargetResource|null} [targetResource] RestoreBackupResponse targetResource + * @interface IComputeInstanceTargetEnvironment + * @property {string|null} [project] ComputeInstanceTargetEnvironment project + * @property {string|null} [zone] ComputeInstanceTargetEnvironment zone */ /** - * Constructs a new RestoreBackupResponse. + * Constructs a new ComputeInstanceTargetEnvironment. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a RestoreBackupResponse. - * @implements IRestoreBackupResponse + * @classdesc Represents a ComputeInstanceTargetEnvironment. + * @implements IComputeInstanceTargetEnvironment * @constructor - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment=} [properties] Properties to set */ - function RestoreBackupResponse(properties) { + function ComputeInstanceTargetEnvironment(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23285,75 +23849,89 @@ } /** - * RestoreBackupResponse targetResource. - * @member {google.cloud.backupdr.v1.ITargetResource|null|undefined} targetResource - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * ComputeInstanceTargetEnvironment project. + * @member {string} project + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment * @instance */ - RestoreBackupResponse.prototype.targetResource = null; + ComputeInstanceTargetEnvironment.prototype.project = ""; /** - * Creates a new RestoreBackupResponse instance using the specified properties. + * ComputeInstanceTargetEnvironment zone. + * @member {string} zone + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * @instance + */ + ComputeInstanceTargetEnvironment.prototype.zone = ""; + + /** + * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse instance + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment instance */ - RestoreBackupResponse.create = function create(properties) { - return new RestoreBackupResponse(properties); + ComputeInstanceTargetEnvironment.create = function create(properties) { + return new ComputeInstanceTargetEnvironment(properties); }; /** - * Encodes the specified RestoreBackupResponse message. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreBackupResponse.encode = function encode(message, writer) { + ComputeInstanceTargetEnvironment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.targetResource != null && Object.hasOwnProperty.call(message, "targetResource")) - $root.google.cloud.backupdr.v1.TargetResource.encode(message.targetResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); return writer; }; /** - * Encodes the specified RestoreBackupResponse message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.RestoreBackupResponse.verify|verify} messages. + * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment * @static - * @param {google.cloud.backupdr.v1.IRestoreBackupResponse} message RestoreBackupResponse message or plain object to encode + * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RestoreBackupResponse.encodeDelimited = function encodeDelimited(message, writer) { + ComputeInstanceTargetEnvironment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RestoreBackupResponse message from the specified reader or buffer. + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreBackupResponse.decode = function decode(reader, length) { + ComputeInstanceTargetEnvironment.decode = function 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.backupdr.v1.RestoreBackupResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.decode(reader, reader.uint32()); + message.project = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); break; } default: @@ -23365,127 +23943,135 @@ }; /** - * Decodes a RestoreBackupResponse message from the specified reader or buffer, length delimited. + * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RestoreBackupResponse.decodeDelimited = function decodeDelimited(reader) { + ComputeInstanceTargetEnvironment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RestoreBackupResponse message. + * Verifies a ComputeInstanceTargetEnvironment message. * @function verify - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RestoreBackupResponse.verify = function verify(message) { + ComputeInstanceTargetEnvironment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.targetResource != null && message.hasOwnProperty("targetResource")) { - var error = $root.google.cloud.backupdr.v1.TargetResource.verify(message.targetResource); - if (error) - return "targetResource." + error; - } + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; return null; }; /** - * Creates a RestoreBackupResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.RestoreBackupResponse} RestoreBackupResponse + * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment */ - RestoreBackupResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.RestoreBackupResponse) + ComputeInstanceTargetEnvironment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment) return object; - var message = new $root.google.cloud.backupdr.v1.RestoreBackupResponse(); - if (object.targetResource != null) { - if (typeof object.targetResource !== "object") - throw TypeError(".google.cloud.backupdr.v1.RestoreBackupResponse.targetResource: object expected"); - message.targetResource = $root.google.cloud.backupdr.v1.TargetResource.fromObject(object.targetResource); - } + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment(); + if (object.project != null) + message.project = String(object.project); + if (object.zone != null) + message.zone = String(object.zone); return message; }; /** - * Creates a plain object from a RestoreBackupResponse message. Also converts values to other types if specified. + * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment * @static - * @param {google.cloud.backupdr.v1.RestoreBackupResponse} message RestoreBackupResponse + * @param {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RestoreBackupResponse.toObject = function toObject(message, options) { + ComputeInstanceTargetEnvironment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.targetResource = null; - if (message.targetResource != null && message.hasOwnProperty("targetResource")) - object.targetResource = $root.google.cloud.backupdr.v1.TargetResource.toObject(message.targetResource, options); + if (options.defaults) { + object.project = ""; + object.zone = ""; + } + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; return object; }; /** - * Converts this RestoreBackupResponse to JSON. + * Converts this ComputeInstanceTargetEnvironment to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment * @instance * @returns {Object.} JSON object */ - RestoreBackupResponse.prototype.toJSON = function toJSON() { + ComputeInstanceTargetEnvironment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RestoreBackupResponse + * Gets the default type url for ComputeInstanceTargetEnvironment * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.RestoreBackupResponse + * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RestoreBackupResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ComputeInstanceTargetEnvironment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.RestoreBackupResponse"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment"; }; - return RestoreBackupResponse; + return ComputeInstanceTargetEnvironment; })(); - v1.TargetResource = (function() { + v1.ComputeInstanceDataSourceProperties = (function() { /** - * Properties of a TargetResource. + * Properties of a ComputeInstanceDataSourceProperties. * @memberof google.cloud.backupdr.v1 - * @interface ITargetResource - * @property {google.cloud.backupdr.v1.IGcpResource|null} [gcpResource] TargetResource gcpResource + * @interface IComputeInstanceDataSourceProperties + * @property {string|null} [name] ComputeInstanceDataSourceProperties name + * @property {string|null} [description] ComputeInstanceDataSourceProperties description + * @property {string|null} [machineType] ComputeInstanceDataSourceProperties machineType + * @property {number|Long|null} [totalDiskCount] ComputeInstanceDataSourceProperties totalDiskCount + * @property {number|Long|null} [totalDiskSizeGb] ComputeInstanceDataSourceProperties totalDiskSizeGb */ /** - * Constructs a new TargetResource. + * Constructs a new ComputeInstanceDataSourceProperties. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a TargetResource. - * @implements ITargetResource + * @classdesc Represents a ComputeInstanceDataSourceProperties. + * @implements IComputeInstanceDataSourceProperties * @constructor - * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties=} [properties] Properties to set */ - function TargetResource(properties) { + function ComputeInstanceDataSourceProperties(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23493,89 +24079,131 @@ } /** - * TargetResource gcpResource. - * @member {google.cloud.backupdr.v1.IGcpResource|null|undefined} gcpResource - * @memberof google.cloud.backupdr.v1.TargetResource + * ComputeInstanceDataSourceProperties name. + * @member {string} name + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties * @instance */ - TargetResource.prototype.gcpResource = null; + ComputeInstanceDataSourceProperties.prototype.name = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * ComputeInstanceDataSourceProperties description. + * @member {string} description + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.description = ""; /** - * TargetResource targetResourceInfo. - * @member {"gcpResource"|undefined} targetResourceInfo - * @memberof google.cloud.backupdr.v1.TargetResource + * ComputeInstanceDataSourceProperties machineType. + * @member {string} machineType + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties * @instance */ - Object.defineProperty(TargetResource.prototype, "targetResourceInfo", { - get: $util.oneOfGetter($oneOfFields = ["gcpResource"]), - set: $util.oneOfSetter($oneOfFields) - }); + ComputeInstanceDataSourceProperties.prototype.machineType = ""; /** - * Creates a new TargetResource instance using the specified properties. + * ComputeInstanceDataSourceProperties totalDiskCount. + * @member {number|Long} totalDiskCount + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.totalDiskCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ComputeInstanceDataSourceProperties totalDiskSizeGb. + * @member {number|Long} totalDiskSizeGb + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @instance + */ + ComputeInstanceDataSourceProperties.prototype.totalDiskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties * @static - * @param {google.cloud.backupdr.v1.ITargetResource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource instance + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties instance */ - TargetResource.create = function create(properties) { - return new TargetResource(properties); + ComputeInstanceDataSourceProperties.create = function create(properties) { + return new ComputeInstanceDataSourceProperties(properties); }; /** - * Encodes the specified TargetResource message. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties * @static - * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TargetResource.encode = function encode(message, writer) { + ComputeInstanceDataSourceProperties.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gcpResource != null && Object.hasOwnProperty.call(message, "gcpResource")) - $root.google.cloud.backupdr.v1.GcpResource.encode(message.gcpResource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.machineType); + if (message.totalDiskCount != null && Object.hasOwnProperty.call(message, "totalDiskCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.totalDiskCount); + if (message.totalDiskSizeGb != null && Object.hasOwnProperty.call(message, "totalDiskSizeGb")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.totalDiskSizeGb); return writer; }; /** - * Encodes the specified TargetResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.TargetResource.verify|verify} messages. + * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties * @static - * @param {google.cloud.backupdr.v1.ITargetResource} message TargetResource message or plain object to encode + * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TargetResource.encodeDelimited = function encodeDelimited(message, writer) { + ComputeInstanceDataSourceProperties.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TargetResource message from the specified reader or buffer. + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TargetResource.decode = function decode(reader, length) { + ComputeInstanceDataSourceProperties.decode = function 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.backupdr.v1.TargetResource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.decode(reader, reader.uint32()); + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.machineType = reader.string(); + break; + } + case 4: { + message.totalDiskCount = reader.int64(); + break; + } + case 5: { + message.totalDiskSizeGb = reader.int64(); break; } default: @@ -23587,134 +24215,186 @@ }; /** - * Decodes a TargetResource message from the specified reader or buffer, length delimited. + * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TargetResource.decodeDelimited = function decodeDelimited(reader) { + ComputeInstanceDataSourceProperties.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TargetResource message. + * Verifies a ComputeInstanceDataSourceProperties message. * @function verify - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TargetResource.verify = function verify(message) { + ComputeInstanceDataSourceProperties.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { - properties.targetResourceInfo = 1; - { - var error = $root.google.cloud.backupdr.v1.GcpResource.verify(message.gcpResource); - if (error) - return "gcpResource." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + if (message.totalDiskCount != null && message.hasOwnProperty("totalDiskCount")) + if (!$util.isInteger(message.totalDiskCount) && !(message.totalDiskCount && $util.isInteger(message.totalDiskCount.low) && $util.isInteger(message.totalDiskCount.high))) + return "totalDiskCount: integer|Long expected"; + if (message.totalDiskSizeGb != null && message.hasOwnProperty("totalDiskSizeGb")) + if (!$util.isInteger(message.totalDiskSizeGb) && !(message.totalDiskSizeGb && $util.isInteger(message.totalDiskSizeGb.low) && $util.isInteger(message.totalDiskSizeGb.high))) + return "totalDiskSizeGb: integer|Long expected"; return null; }; /** - * Creates a TargetResource message from a plain object. Also converts values to their respective internal types. + * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.TargetResource} TargetResource + * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties */ - TargetResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.TargetResource) + ComputeInstanceDataSourceProperties.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties) return object; - var message = new $root.google.cloud.backupdr.v1.TargetResource(); - if (object.gcpResource != null) { - if (typeof object.gcpResource !== "object") - throw TypeError(".google.cloud.backupdr.v1.TargetResource.gcpResource: object expected"); - message.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.fromObject(object.gcpResource); - } + var message = new $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.totalDiskCount != null) + if ($util.Long) + (message.totalDiskCount = $util.Long.fromValue(object.totalDiskCount)).unsigned = false; + else if (typeof object.totalDiskCount === "string") + message.totalDiskCount = parseInt(object.totalDiskCount, 10); + else if (typeof object.totalDiskCount === "number") + message.totalDiskCount = object.totalDiskCount; + else if (typeof object.totalDiskCount === "object") + message.totalDiskCount = new $util.LongBits(object.totalDiskCount.low >>> 0, object.totalDiskCount.high >>> 0).toNumber(); + if (object.totalDiskSizeGb != null) + if ($util.Long) + (message.totalDiskSizeGb = $util.Long.fromValue(object.totalDiskSizeGb)).unsigned = false; + else if (typeof object.totalDiskSizeGb === "string") + message.totalDiskSizeGb = parseInt(object.totalDiskSizeGb, 10); + else if (typeof object.totalDiskSizeGb === "number") + message.totalDiskSizeGb = object.totalDiskSizeGb; + else if (typeof object.totalDiskSizeGb === "object") + message.totalDiskSizeGb = new $util.LongBits(object.totalDiskSizeGb.low >>> 0, object.totalDiskSizeGb.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a TargetResource message. Also converts values to other types if specified. + * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties * @static - * @param {google.cloud.backupdr.v1.TargetResource} message TargetResource + * @param {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TargetResource.toObject = function toObject(message, options) { + ComputeInstanceDataSourceProperties.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.gcpResource != null && message.hasOwnProperty("gcpResource")) { - object.gcpResource = $root.google.cloud.backupdr.v1.GcpResource.toObject(message.gcpResource, options); - if (options.oneofs) - object.targetResourceInfo = "gcpResource"; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.machineType = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalDiskCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalDiskCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalDiskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalDiskSizeGb = options.longs === String ? "0" : 0; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + if (message.totalDiskCount != null && message.hasOwnProperty("totalDiskCount")) + if (typeof message.totalDiskCount === "number") + object.totalDiskCount = options.longs === String ? String(message.totalDiskCount) : message.totalDiskCount; + else + object.totalDiskCount = options.longs === String ? $util.Long.prototype.toString.call(message.totalDiskCount) : options.longs === Number ? new $util.LongBits(message.totalDiskCount.low >>> 0, message.totalDiskCount.high >>> 0).toNumber() : message.totalDiskCount; + if (message.totalDiskSizeGb != null && message.hasOwnProperty("totalDiskSizeGb")) + if (typeof message.totalDiskSizeGb === "number") + object.totalDiskSizeGb = options.longs === String ? String(message.totalDiskSizeGb) : message.totalDiskSizeGb; + else + object.totalDiskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.totalDiskSizeGb) : options.longs === Number ? new $util.LongBits(message.totalDiskSizeGb.low >>> 0, message.totalDiskSizeGb.high >>> 0).toNumber() : message.totalDiskSizeGb; return object; }; /** - * Converts this TargetResource to JSON. + * Converts this ComputeInstanceDataSourceProperties to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties * @instance * @returns {Object.} JSON object */ - TargetResource.prototype.toJSON = function toJSON() { + ComputeInstanceDataSourceProperties.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TargetResource + * Gets the default type url for ComputeInstanceDataSourceProperties * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.TargetResource + * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TargetResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ComputeInstanceDataSourceProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.TargetResource"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties"; }; - return TargetResource; + return ComputeInstanceDataSourceProperties; })(); - v1.GcpResource = (function() { + v1.AdvancedMachineFeatures = (function() { /** - * Properties of a GcpResource. + * Properties of an AdvancedMachineFeatures. * @memberof google.cloud.backupdr.v1 - * @interface IGcpResource - * @property {string|null} [gcpResourcename] GcpResource gcpResourcename - * @property {string|null} [location] GcpResource location - * @property {string|null} [type] GcpResource type + * @interface IAdvancedMachineFeatures + * @property {boolean|null} [enableNestedVirtualization] AdvancedMachineFeatures enableNestedVirtualization + * @property {number|null} [threadsPerCore] AdvancedMachineFeatures threadsPerCore + * @property {number|null} [visibleCoreCount] AdvancedMachineFeatures visibleCoreCount + * @property {boolean|null} [enableUefiNetworking] AdvancedMachineFeatures enableUefiNetworking */ /** - * Constructs a new GcpResource. + * Constructs a new AdvancedMachineFeatures. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GcpResource. - * @implements IGcpResource + * @classdesc Represents an AdvancedMachineFeatures. + * @implements IAdvancedMachineFeatures * @constructor - * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures=} [properties] Properties to set */ - function GcpResource(properties) { + function AdvancedMachineFeatures(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -23722,103 +24402,164 @@ } /** - * GcpResource gcpResourcename. - * @member {string} gcpResourcename - * @memberof google.cloud.backupdr.v1.GcpResource + * AdvancedMachineFeatures enableNestedVirtualization. + * @member {boolean|null|undefined} enableNestedVirtualization + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures * @instance */ - GcpResource.prototype.gcpResourcename = ""; + AdvancedMachineFeatures.prototype.enableNestedVirtualization = null; /** - * GcpResource location. - * @member {string} location - * @memberof google.cloud.backupdr.v1.GcpResource + * AdvancedMachineFeatures threadsPerCore. + * @member {number|null|undefined} threadsPerCore + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures * @instance */ - GcpResource.prototype.location = ""; + AdvancedMachineFeatures.prototype.threadsPerCore = null; /** - * GcpResource type. - * @member {string} type - * @memberof google.cloud.backupdr.v1.GcpResource + * AdvancedMachineFeatures visibleCoreCount. + * @member {number|null|undefined} visibleCoreCount + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures * @instance */ - GcpResource.prototype.type = ""; + AdvancedMachineFeatures.prototype.visibleCoreCount = null; /** - * Creates a new GcpResource instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {google.cloud.backupdr.v1.IGcpResource=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource instance + * AdvancedMachineFeatures enableUefiNetworking. + * @member {boolean|null|undefined} enableUefiNetworking + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance */ - GcpResource.create = function create(properties) { - return new GcpResource(properties); - }; + AdvancedMachineFeatures.prototype.enableUefiNetworking = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Encodes the specified GcpResource message. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * AdvancedMachineFeatures _enableNestedVirtualization. + * @member {"enableNestedVirtualization"|undefined} _enableNestedVirtualization + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance */ - GcpResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gcpResourcename != null && Object.hasOwnProperty.call(message, "gcpResourcename")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcpResourcename); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - return writer; - }; + Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableNestedVirtualization", { + get: $util.oneOfGetter($oneOfFields = ["enableNestedVirtualization"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Encodes the specified GcpResource message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GcpResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GcpResource - * @static - * @param {google.cloud.backupdr.v1.IGcpResource} message GcpResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * AdvancedMachineFeatures _threadsPerCore. + * @member {"threadsPerCore"|undefined} _threadsPerCore + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_threadsPerCore", { + get: $util.oneOfGetter($oneOfFields = ["threadsPerCore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AdvancedMachineFeatures _visibleCoreCount. + * @member {"visibleCoreCount"|undefined} _visibleCoreCount + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_visibleCoreCount", { + get: $util.oneOfGetter($oneOfFields = ["visibleCoreCount"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AdvancedMachineFeatures _enableUefiNetworking. + * @member {"enableUefiNetworking"|undefined} _enableUefiNetworking + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @instance + */ + Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableUefiNetworking", { + get: $util.oneOfGetter($oneOfFields = ["enableUefiNetworking"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AdvancedMachineFeatures instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures instance + */ + AdvancedMachineFeatures.create = function create(properties) { + return new AdvancedMachineFeatures(properties); + }; + + /** + * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GcpResource.encodeDelimited = function encodeDelimited(message, writer) { + AdvancedMachineFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableNestedVirtualization != null && Object.hasOwnProperty.call(message, "enableNestedVirtualization")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableNestedVirtualization); + if (message.threadsPerCore != null && Object.hasOwnProperty.call(message, "threadsPerCore")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.threadsPerCore); + if (message.visibleCoreCount != null && Object.hasOwnProperty.call(message, "visibleCoreCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.visibleCoreCount); + if (message.enableUefiNetworking != null && Object.hasOwnProperty.call(message, "enableUefiNetworking")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enableUefiNetworking); + return writer; + }; + + /** + * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @static + * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdvancedMachineFeatures.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GcpResource message from the specified reader or buffer. + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.GcpResource + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcpResource.decode = function decode(reader, length) { + AdvancedMachineFeatures.decode = function 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.backupdr.v1.GcpResource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.AdvancedMachineFeatures(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.gcpResourcename = reader.string(); + message.enableNestedVirtualization = reader.bool(); break; } case 2: { - message.location = reader.string(); + message.threadsPerCore = reader.int32(); break; } case 3: { - message.type = reader.string(); + message.visibleCoreCount = reader.int32(); + break; + } + case 4: { + message.enableUefiNetworking = reader.bool(); break; } default: @@ -23830,190 +24571,162 @@ }; /** - * Decodes a GcpResource message from the specified reader or buffer, length delimited. + * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GcpResource + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GcpResource.decodeDelimited = function decodeDelimited(reader) { + AdvancedMachineFeatures.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GcpResource message. + * Verifies an AdvancedMachineFeatures message. * @function verify - * @memberof google.cloud.backupdr.v1.GcpResource + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GcpResource.verify = function verify(message) { + AdvancedMachineFeatures.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - if (!$util.isString(message.gcpResourcename)) - return "gcpResourcename: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; + var properties = {}; + if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { + properties._enableNestedVirtualization = 1; + if (typeof message.enableNestedVirtualization !== "boolean") + return "enableNestedVirtualization: boolean expected"; + } + if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { + properties._threadsPerCore = 1; + if (!$util.isInteger(message.threadsPerCore)) + return "threadsPerCore: integer expected"; + } + if (message.visibleCoreCount != null && message.hasOwnProperty("visibleCoreCount")) { + properties._visibleCoreCount = 1; + if (!$util.isInteger(message.visibleCoreCount)) + return "visibleCoreCount: integer expected"; + } + if (message.enableUefiNetworking != null && message.hasOwnProperty("enableUefiNetworking")) { + properties._enableUefiNetworking = 1; + if (typeof message.enableUefiNetworking !== "boolean") + return "enableUefiNetworking: boolean expected"; + } return null; }; /** - * Creates a GcpResource message from a plain object. Also converts values to their respective internal types. + * Creates an AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.GcpResource + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GcpResource} GcpResource + * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures */ - GcpResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GcpResource) + AdvancedMachineFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AdvancedMachineFeatures) return object; - var message = new $root.google.cloud.backupdr.v1.GcpResource(); - if (object.gcpResourcename != null) - message.gcpResourcename = String(object.gcpResourcename); - if (object.location != null) - message.location = String(object.location); - if (object.type != null) - message.type = String(object.type); + var message = new $root.google.cloud.backupdr.v1.AdvancedMachineFeatures(); + if (object.enableNestedVirtualization != null) + message.enableNestedVirtualization = Boolean(object.enableNestedVirtualization); + if (object.threadsPerCore != null) + message.threadsPerCore = object.threadsPerCore | 0; + if (object.visibleCoreCount != null) + message.visibleCoreCount = object.visibleCoreCount | 0; + if (object.enableUefiNetworking != null) + message.enableUefiNetworking = Boolean(object.enableUefiNetworking); return message; }; /** - * Creates a plain object from a GcpResource message. Also converts values to other types if specified. + * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.GcpResource + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures * @static - * @param {google.cloud.backupdr.v1.GcpResource} message GcpResource + * @param {google.cloud.backupdr.v1.AdvancedMachineFeatures} message AdvancedMachineFeatures * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GcpResource.toObject = function toObject(message, options) { + AdvancedMachineFeatures.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.gcpResourcename = ""; - object.location = ""; - object.type = ""; + if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { + object.enableNestedVirtualization = message.enableNestedVirtualization; + if (options.oneofs) + object._enableNestedVirtualization = "enableNestedVirtualization"; + } + if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { + object.threadsPerCore = message.threadsPerCore; + if (options.oneofs) + object._threadsPerCore = "threadsPerCore"; + } + if (message.visibleCoreCount != null && message.hasOwnProperty("visibleCoreCount")) { + object.visibleCoreCount = message.visibleCoreCount; + if (options.oneofs) + object._visibleCoreCount = "visibleCoreCount"; + } + if (message.enableUefiNetworking != null && message.hasOwnProperty("enableUefiNetworking")) { + object.enableUefiNetworking = message.enableUefiNetworking; + if (options.oneofs) + object._enableUefiNetworking = "enableUefiNetworking"; } - if (message.gcpResourcename != null && message.hasOwnProperty("gcpResourcename")) - object.gcpResourcename = message.gcpResourcename; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; return object; }; /** - * Converts this GcpResource to JSON. + * Converts this AdvancedMachineFeatures to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.GcpResource + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures * @instance * @returns {Object.} JSON object */ - GcpResource.prototype.toJSON = function toJSON() { + AdvancedMachineFeatures.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GcpResource + * Gets the default type url for AdvancedMachineFeatures * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GcpResource + * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GcpResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AdvancedMachineFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GcpResource"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.AdvancedMachineFeatures"; }; - return GcpResource; - })(); - - /** - * BackupConfigState enum. - * @name google.cloud.backupdr.v1.BackupConfigState - * @enum {number} - * @property {number} BACKUP_CONFIG_STATE_UNSPECIFIED=0 BACKUP_CONFIG_STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} PASSIVE=2 PASSIVE value - */ - v1.BackupConfigState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_CONFIG_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "PASSIVE"] = 2; - return values; - })(); - - /** - * BackupView enum. - * @name google.cloud.backupdr.v1.BackupView - * @enum {number} - * @property {number} BACKUP_VIEW_UNSPECIFIED=0 BACKUP_VIEW_UNSPECIFIED value - * @property {number} BACKUP_VIEW_BASIC=1 BACKUP_VIEW_BASIC value - * @property {number} BACKUP_VIEW_FULL=2 BACKUP_VIEW_FULL value - */ - v1.BackupView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BACKUP_VIEW_BASIC"] = 1; - values[valuesById[2] = "BACKUP_VIEW_FULL"] = 2; - return values; - })(); - - /** - * BackupVaultView enum. - * @name google.cloud.backupdr.v1.BackupVaultView - * @enum {number} - * @property {number} BACKUP_VAULT_VIEW_UNSPECIFIED=0 BACKUP_VAULT_VIEW_UNSPECIFIED value - * @property {number} BACKUP_VAULT_VIEW_BASIC=1 BACKUP_VAULT_VIEW_BASIC value - * @property {number} BACKUP_VAULT_VIEW_FULL=2 BACKUP_VAULT_VIEW_FULL value - */ - v1.BackupVaultView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKUP_VAULT_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BACKUP_VAULT_VIEW_BASIC"] = 1; - values[valuesById[2] = "BACKUP_VAULT_VIEW_FULL"] = 2; - return values; + return AdvancedMachineFeatures; })(); - v1.BackupApplianceBackupProperties = (function() { + v1.ConfidentialInstanceConfig = (function() { /** - * Properties of a BackupApplianceBackupProperties. + * Properties of a ConfidentialInstanceConfig. * @memberof google.cloud.backupdr.v1 - * @interface IBackupApplianceBackupProperties - * @property {number|null} [generationId] BackupApplianceBackupProperties generationId - * @property {google.protobuf.ITimestamp|null} [finalizeTime] BackupApplianceBackupProperties finalizeTime - * @property {google.protobuf.ITimestamp|null} [recoveryRangeStartTime] BackupApplianceBackupProperties recoveryRangeStartTime - * @property {google.protobuf.ITimestamp|null} [recoveryRangeEndTime] BackupApplianceBackupProperties recoveryRangeEndTime + * @interface IConfidentialInstanceConfig + * @property {boolean|null} [enableConfidentialCompute] ConfidentialInstanceConfig enableConfidentialCompute */ /** - * Constructs a new BackupApplianceBackupProperties. + * Constructs a new ConfidentialInstanceConfig. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a BackupApplianceBackupProperties. - * @implements IBackupApplianceBackupProperties + * @classdesc Represents a ConfidentialInstanceConfig. + * @implements IConfidentialInstanceConfig * @constructor - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig=} [properties] Properties to set */ - function BackupApplianceBackupProperties(properties) { + function ConfidentialInstanceConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24021,164 +24734,89 @@ } /** - * BackupApplianceBackupProperties generationId. - * @member {number|null|undefined} generationId - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - BackupApplianceBackupProperties.prototype.generationId = null; - - /** - * BackupApplianceBackupProperties finalizeTime. - * @member {google.protobuf.ITimestamp|null|undefined} finalizeTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - BackupApplianceBackupProperties.prototype.finalizeTime = null; - - /** - * BackupApplianceBackupProperties recoveryRangeStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeStartTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - BackupApplianceBackupProperties.prototype.recoveryRangeStartTime = null; - - /** - * BackupApplianceBackupProperties recoveryRangeEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} recoveryRangeEndTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * ConfidentialInstanceConfig enableConfidentialCompute. + * @member {boolean|null|undefined} enableConfidentialCompute + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig * @instance */ - BackupApplianceBackupProperties.prototype.recoveryRangeEndTime = null; + ConfidentialInstanceConfig.prototype.enableConfidentialCompute = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * BackupApplianceBackupProperties _generationId. - * @member {"generationId"|undefined} _generationId - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - Object.defineProperty(BackupApplianceBackupProperties.prototype, "_generationId", { - get: $util.oneOfGetter($oneOfFields = ["generationId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupApplianceBackupProperties _finalizeTime. - * @member {"finalizeTime"|undefined} _finalizeTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - Object.defineProperty(BackupApplianceBackupProperties.prototype, "_finalizeTime", { - get: $util.oneOfGetter($oneOfFields = ["finalizeTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupApplianceBackupProperties _recoveryRangeStartTime. - * @member {"recoveryRangeStartTime"|undefined} _recoveryRangeStartTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties - * @instance - */ - Object.defineProperty(BackupApplianceBackupProperties.prototype, "_recoveryRangeStartTime", { - get: $util.oneOfGetter($oneOfFields = ["recoveryRangeStartTime"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * BackupApplianceBackupProperties _recoveryRangeEndTime. - * @member {"recoveryRangeEndTime"|undefined} _recoveryRangeEndTime - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * ConfidentialInstanceConfig _enableConfidentialCompute. + * @member {"enableConfidentialCompute"|undefined} _enableConfidentialCompute + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig * @instance */ - Object.defineProperty(BackupApplianceBackupProperties.prototype, "_recoveryRangeEndTime", { - get: $util.oneOfGetter($oneOfFields = ["recoveryRangeEndTime"]), + Object.defineProperty(ConfidentialInstanceConfig.prototype, "_enableConfidentialCompute", { + get: $util.oneOfGetter($oneOfFields = ["enableConfidentialCompute"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new BackupApplianceBackupProperties instance using the specified properties. + * Creates a new ConfidentialInstanceConfig instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties instance + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig instance */ - BackupApplianceBackupProperties.create = function create(properties) { - return new BackupApplianceBackupProperties(properties); + ConfidentialInstanceConfig.create = function create(properties) { + return new ConfidentialInstanceConfig(properties); }; /** - * Encodes the specified BackupApplianceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties} message BackupApplianceBackupProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig} message ConfidentialInstanceConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupApplianceBackupProperties.encode = function encode(message, writer) { + ConfidentialInstanceConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.generationId != null && Object.hasOwnProperty.call(message, "generationId")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.generationId); - if (message.finalizeTime != null && Object.hasOwnProperty.call(message, "finalizeTime")) - $root.google.protobuf.Timestamp.encode(message.finalizeTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.recoveryRangeStartTime != null && Object.hasOwnProperty.call(message, "recoveryRangeStartTime")) - $root.google.protobuf.Timestamp.encode(message.recoveryRangeStartTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.recoveryRangeEndTime != null && Object.hasOwnProperty.call(message, "recoveryRangeEndTime")) - $root.google.protobuf.Timestamp.encode(message.recoveryRangeEndTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enableConfidentialCompute != null && Object.hasOwnProperty.call(message, "enableConfidentialCompute")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableConfidentialCompute); return writer; }; /** - * Encodes the specified BackupApplianceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.BackupApplianceBackupProperties.verify|verify} messages. + * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig * @static - * @param {google.cloud.backupdr.v1.IBackupApplianceBackupProperties} message BackupApplianceBackupProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig} message ConfidentialInstanceConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BackupApplianceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { + ConfidentialInstanceConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer. + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupApplianceBackupProperties.decode = function decode(reader, length) { + ConfidentialInstanceConfig.decode = function 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.backupdr.v1.BackupApplianceBackupProperties(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.generationId = reader.int32(); - break; - } - case 2: { - message.finalizeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.enableConfidentialCompute = reader.bool(); break; } default: @@ -24190,198 +24828,126 @@ }; /** - * Decodes a BackupApplianceBackupProperties message from the specified reader or buffer, length delimited. + * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BackupApplianceBackupProperties.decodeDelimited = function decodeDelimited(reader) { + ConfidentialInstanceConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BackupApplianceBackupProperties message. + * Verifies a ConfidentialInstanceConfig message. * @function verify - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BackupApplianceBackupProperties.verify = function verify(message) { + ConfidentialInstanceConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.generationId != null && message.hasOwnProperty("generationId")) { - properties._generationId = 1; - if (!$util.isInteger(message.generationId)) - return "generationId: integer expected"; - } - if (message.finalizeTime != null && message.hasOwnProperty("finalizeTime")) { - properties._finalizeTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.finalizeTime); - if (error) - return "finalizeTime." + error; - } - } - if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { - properties._recoveryRangeStartTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeStartTime); - if (error) - return "recoveryRangeStartTime." + error; - } - } - if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { - properties._recoveryRangeEndTime = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.recoveryRangeEndTime); - if (error) - return "recoveryRangeEndTime." + error; - } + if (message.enableConfidentialCompute != null && message.hasOwnProperty("enableConfidentialCompute")) { + properties._enableConfidentialCompute = 1; + if (typeof message.enableConfidentialCompute !== "boolean") + return "enableConfidentialCompute: boolean expected"; } return null; }; /** - * Creates a BackupApplianceBackupProperties message from a plain object. Also converts values to their respective internal types. + * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.BackupApplianceBackupProperties} BackupApplianceBackupProperties + * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig */ - BackupApplianceBackupProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties) + ConfidentialInstanceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig) return object; - var message = new $root.google.cloud.backupdr.v1.BackupApplianceBackupProperties(); - if (object.generationId != null) - message.generationId = object.generationId | 0; - if (object.finalizeTime != null) { - if (typeof object.finalizeTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.finalizeTime: object expected"); - message.finalizeTime = $root.google.protobuf.Timestamp.fromObject(object.finalizeTime); - } - if (object.recoveryRangeStartTime != null) { - if (typeof object.recoveryRangeStartTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeStartTime: object expected"); - message.recoveryRangeStartTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeStartTime); - } - if (object.recoveryRangeEndTime != null) { - if (typeof object.recoveryRangeEndTime !== "object") - throw TypeError(".google.cloud.backupdr.v1.BackupApplianceBackupProperties.recoveryRangeEndTime: object expected"); - message.recoveryRangeEndTime = $root.google.protobuf.Timestamp.fromObject(object.recoveryRangeEndTime); - } + var message = new $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig(); + if (object.enableConfidentialCompute != null) + message.enableConfidentialCompute = Boolean(object.enableConfidentialCompute); return message; }; /** - * Creates a plain object from a BackupApplianceBackupProperties message. Also converts values to other types if specified. + * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig * @static - * @param {google.cloud.backupdr.v1.BackupApplianceBackupProperties} message BackupApplianceBackupProperties + * @param {google.cloud.backupdr.v1.ConfidentialInstanceConfig} message ConfidentialInstanceConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BackupApplianceBackupProperties.toObject = function toObject(message, options) { + ConfidentialInstanceConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.generationId != null && message.hasOwnProperty("generationId")) { - object.generationId = message.generationId; - if (options.oneofs) - object._generationId = "generationId"; - } - if (message.finalizeTime != null && message.hasOwnProperty("finalizeTime")) { - object.finalizeTime = $root.google.protobuf.Timestamp.toObject(message.finalizeTime, options); - if (options.oneofs) - object._finalizeTime = "finalizeTime"; - } - if (message.recoveryRangeStartTime != null && message.hasOwnProperty("recoveryRangeStartTime")) { - object.recoveryRangeStartTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeStartTime, options); - if (options.oneofs) - object._recoveryRangeStartTime = "recoveryRangeStartTime"; - } - if (message.recoveryRangeEndTime != null && message.hasOwnProperty("recoveryRangeEndTime")) { - object.recoveryRangeEndTime = $root.google.protobuf.Timestamp.toObject(message.recoveryRangeEndTime, options); + if (message.enableConfidentialCompute != null && message.hasOwnProperty("enableConfidentialCompute")) { + object.enableConfidentialCompute = message.enableConfidentialCompute; if (options.oneofs) - object._recoveryRangeEndTime = "recoveryRangeEndTime"; + object._enableConfidentialCompute = "enableConfidentialCompute"; } return object; }; /** - * Converts this BackupApplianceBackupProperties to JSON. + * Converts this ConfidentialInstanceConfig to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig * @instance * @returns {Object.} JSON object */ - BackupApplianceBackupProperties.prototype.toJSON = function toJSON() { + ConfidentialInstanceConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BackupApplianceBackupProperties + * Gets the default type url for ConfidentialInstanceConfig * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.BackupApplianceBackupProperties + * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BackupApplianceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ConfidentialInstanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.BackupApplianceBackupProperties"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.ConfidentialInstanceConfig"; }; - return BackupApplianceBackupProperties; + return ConfidentialInstanceConfig; })(); - v1.ComputeInstanceBackupProperties = (function() { + v1.DisplayDevice = (function() { /** - * Properties of a ComputeInstanceBackupProperties. + * Properties of a DisplayDevice. * @memberof google.cloud.backupdr.v1 - * @interface IComputeInstanceBackupProperties - * @property {string|null} [description] ComputeInstanceBackupProperties description - * @property {google.cloud.backupdr.v1.ITags|null} [tags] ComputeInstanceBackupProperties tags - * @property {string|null} [machineType] ComputeInstanceBackupProperties machineType - * @property {boolean|null} [canIpForward] ComputeInstanceBackupProperties canIpForward - * @property {Array.|null} [networkInterface] ComputeInstanceBackupProperties networkInterface - * @property {Array.|null} [disk] ComputeInstanceBackupProperties disk - * @property {google.cloud.backupdr.v1.IMetadata|null} [metadata] ComputeInstanceBackupProperties metadata - * @property {Array.|null} [serviceAccount] ComputeInstanceBackupProperties serviceAccount - * @property {google.cloud.backupdr.v1.IScheduling|null} [scheduling] ComputeInstanceBackupProperties scheduling - * @property {Array.|null} [guestAccelerator] ComputeInstanceBackupProperties guestAccelerator - * @property {string|null} [minCpuPlatform] ComputeInstanceBackupProperties minCpuPlatform - * @property {google.cloud.backupdr.v1.KeyRevocationActionType|null} [keyRevocationActionType] ComputeInstanceBackupProperties keyRevocationActionType - * @property {string|null} [sourceInstance] ComputeInstanceBackupProperties sourceInstance - * @property {Object.|null} [labels] ComputeInstanceBackupProperties labels + * @interface IDisplayDevice + * @property {boolean|null} [enableDisplay] DisplayDevice enableDisplay */ /** - * Constructs a new ComputeInstanceBackupProperties. + * Constructs a new DisplayDevice. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ComputeInstanceBackupProperties. - * @implements IComputeInstanceBackupProperties + * @classdesc Represents a DisplayDevice. + * @implements IDisplayDevice * @constructor - * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IDisplayDevice=} [properties] Properties to set */ - function ComputeInstanceBackupProperties(properties) { - this.networkInterface = []; - this.disk = []; - this.serviceAccount = []; - this.guestAccelerator = []; - this.labels = {}; + function DisplayDevice(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24389,391 +24955,336 @@ } /** - * ComputeInstanceBackupProperties description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.description = null; - - /** - * ComputeInstanceBackupProperties tags. - * @member {google.cloud.backupdr.v1.ITags|null|undefined} tags - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * DisplayDevice enableDisplay. + * @member {boolean|null|undefined} enableDisplay + * @memberof google.cloud.backupdr.v1.DisplayDevice * @instance */ - ComputeInstanceBackupProperties.prototype.tags = null; + DisplayDevice.prototype.enableDisplay = null; - /** - * ComputeInstanceBackupProperties machineType. - * @member {string|null|undefined} machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - ComputeInstanceBackupProperties.prototype.machineType = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ComputeInstanceBackupProperties canIpForward. - * @member {boolean|null|undefined} canIpForward - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * DisplayDevice _enableDisplay. + * @member {"enableDisplay"|undefined} _enableDisplay + * @memberof google.cloud.backupdr.v1.DisplayDevice * @instance */ - ComputeInstanceBackupProperties.prototype.canIpForward = null; + Object.defineProperty(DisplayDevice.prototype, "_enableDisplay", { + get: $util.oneOfGetter($oneOfFields = ["enableDisplay"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * ComputeInstanceBackupProperties networkInterface. - * @member {Array.} networkInterface - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance + * Creates a new DisplayDevice instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.IDisplayDevice=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice instance */ - ComputeInstanceBackupProperties.prototype.networkInterface = $util.emptyArray; + DisplayDevice.create = function create(properties) { + return new DisplayDevice(properties); + }; /** - * ComputeInstanceBackupProperties disk. - * @member {Array.} disk - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance + * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.IDisplayDevice} message DisplayDevice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ComputeInstanceBackupProperties.prototype.disk = $util.emptyArray; + DisplayDevice.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enableDisplay != null && Object.hasOwnProperty.call(message, "enableDisplay")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableDisplay); + return writer; + }; /** - * ComputeInstanceBackupProperties metadata. - * @member {google.cloud.backupdr.v1.IMetadata|null|undefined} metadata - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance + * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.IDisplayDevice} message DisplayDevice message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ComputeInstanceBackupProperties.prototype.metadata = null; + DisplayDevice.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * ComputeInstanceBackupProperties serviceAccount. - * @member {Array.} serviceAccount - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance + * Decodes a DisplayDevice message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComputeInstanceBackupProperties.prototype.serviceAccount = $util.emptyArray; + DisplayDevice.decode = function 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.backupdr.v1.DisplayDevice(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enableDisplay = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * ComputeInstanceBackupProperties scheduling. - * @member {google.cloud.backupdr.v1.IScheduling|null|undefined} scheduling - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance + * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComputeInstanceBackupProperties.prototype.scheduling = null; + DisplayDevice.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * ComputeInstanceBackupProperties guestAccelerator. - * @member {Array.} guestAccelerator - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance + * Verifies a DisplayDevice message. + * @function verify + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ComputeInstanceBackupProperties.prototype.guestAccelerator = $util.emptyArray; + DisplayDevice.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enableDisplay != null && message.hasOwnProperty("enableDisplay")) { + properties._enableDisplay = 1; + if (typeof message.enableDisplay !== "boolean") + return "enableDisplay: boolean expected"; + } + return null; + }; /** - * ComputeInstanceBackupProperties minCpuPlatform. - * @member {string|null|undefined} minCpuPlatform - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance + * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice */ - ComputeInstanceBackupProperties.prototype.minCpuPlatform = null; + DisplayDevice.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.DisplayDevice) + return object; + var message = new $root.google.cloud.backupdr.v1.DisplayDevice(); + if (object.enableDisplay != null) + message.enableDisplay = Boolean(object.enableDisplay); + return message; + }; /** - * ComputeInstanceBackupProperties keyRevocationActionType. - * @member {google.cloud.backupdr.v1.KeyRevocationActionType|null|undefined} keyRevocationActionType - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance + * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {google.cloud.backupdr.v1.DisplayDevice} message DisplayDevice + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - ComputeInstanceBackupProperties.prototype.keyRevocationActionType = null; + DisplayDevice.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enableDisplay != null && message.hasOwnProperty("enableDisplay")) { + object.enableDisplay = message.enableDisplay; + if (options.oneofs) + object._enableDisplay = "enableDisplay"; + } + return object; + }; /** - * ComputeInstanceBackupProperties sourceInstance. - * @member {string|null|undefined} sourceInstance - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * Converts this DisplayDevice to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.DisplayDevice * @instance + * @returns {Object.} JSON object */ - ComputeInstanceBackupProperties.prototype.sourceInstance = null; + DisplayDevice.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * ComputeInstanceBackupProperties labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance + * Gets the default type url for DisplayDevice + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.DisplayDevice + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - ComputeInstanceBackupProperties.prototype.labels = $util.emptyObject; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + DisplayDevice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.DisplayDevice"; + }; - /** - * ComputeInstanceBackupProperties _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); + return DisplayDevice; + })(); - /** - * ComputeInstanceBackupProperties _tags. - * @member {"tags"|undefined} _tags - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_tags", { - get: $util.oneOfGetter($oneOfFields = ["tags"]), - set: $util.oneOfSetter($oneOfFields) - }); + v1.AcceleratorConfig = (function() { /** - * ComputeInstanceBackupProperties _machineType. - * @member {"machineType"|undefined} _machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance + * Properties of an AcceleratorConfig. + * @memberof google.cloud.backupdr.v1 + * @interface IAcceleratorConfig + * @property {string|null} [acceleratorType] AcceleratorConfig acceleratorType + * @property {number|null} [acceleratorCount] AcceleratorConfig acceleratorCount */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_machineType", { - get: $util.oneOfGetter($oneOfFields = ["machineType"]), - set: $util.oneOfSetter($oneOfFields) - }); /** - * ComputeInstanceBackupProperties _canIpForward. - * @member {"canIpForward"|undefined} _canIpForward - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance + * Constructs a new AcceleratorConfig. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an AcceleratorConfig. + * @implements IAcceleratorConfig + * @constructor + * @param {google.cloud.backupdr.v1.IAcceleratorConfig=} [properties] Properties to set */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_canIpForward", { - get: $util.oneOfGetter($oneOfFields = ["canIpForward"]), - set: $util.oneOfSetter($oneOfFields) - }); + function AcceleratorConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * ComputeInstanceBackupProperties _metadata. - * @member {"metadata"|undefined} _metadata - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * AcceleratorConfig acceleratorType. + * @member {string|null|undefined} acceleratorType + * @memberof google.cloud.backupdr.v1.AcceleratorConfig * @instance */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_metadata", { - get: $util.oneOfGetter($oneOfFields = ["metadata"]), - set: $util.oneOfSetter($oneOfFields) - }); + AcceleratorConfig.prototype.acceleratorType = null; /** - * ComputeInstanceBackupProperties _scheduling. - * @member {"scheduling"|undefined} _scheduling - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * AcceleratorConfig acceleratorCount. + * @member {number|null|undefined} acceleratorCount + * @memberof google.cloud.backupdr.v1.AcceleratorConfig * @instance */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_scheduling", { - get: $util.oneOfGetter($oneOfFields = ["scheduling"]), - set: $util.oneOfSetter($oneOfFields) - }); + AcceleratorConfig.prototype.acceleratorCount = null; - /** - * ComputeInstanceBackupProperties _minCpuPlatform. - * @member {"minCpuPlatform"|undefined} _minCpuPlatform - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties - * @instance - */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_minCpuPlatform", { - get: $util.oneOfGetter($oneOfFields = ["minCpuPlatform"]), - set: $util.oneOfSetter($oneOfFields) - }); + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ComputeInstanceBackupProperties _keyRevocationActionType. - * @member {"keyRevocationActionType"|undefined} _keyRevocationActionType - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * AcceleratorConfig _acceleratorType. + * @member {"acceleratorType"|undefined} _acceleratorType + * @memberof google.cloud.backupdr.v1.AcceleratorConfig * @instance */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_keyRevocationActionType", { - get: $util.oneOfGetter($oneOfFields = ["keyRevocationActionType"]), + Object.defineProperty(AcceleratorConfig.prototype, "_acceleratorType", { + get: $util.oneOfGetter($oneOfFields = ["acceleratorType"]), set: $util.oneOfSetter($oneOfFields) }); /** - * ComputeInstanceBackupProperties _sourceInstance. - * @member {"sourceInstance"|undefined} _sourceInstance - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * AcceleratorConfig _acceleratorCount. + * @member {"acceleratorCount"|undefined} _acceleratorCount + * @memberof google.cloud.backupdr.v1.AcceleratorConfig * @instance */ - Object.defineProperty(ComputeInstanceBackupProperties.prototype, "_sourceInstance", { - get: $util.oneOfGetter($oneOfFields = ["sourceInstance"]), + Object.defineProperty(AcceleratorConfig.prototype, "_acceleratorCount", { + get: $util.oneOfGetter($oneOfFields = ["acceleratorCount"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new ComputeInstanceBackupProperties instance using the specified properties. + * Creates a new AcceleratorConfig instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AcceleratorConfig * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties instance + * @param {google.cloud.backupdr.v1.IAcceleratorConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig instance */ - ComputeInstanceBackupProperties.create = function create(properties) { - return new ComputeInstanceBackupProperties(properties); + AcceleratorConfig.create = function create(properties) { + return new AcceleratorConfig(properties); }; /** - * Encodes the specified ComputeInstanceBackupProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AcceleratorConfig * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties} message ComputeInstanceBackupProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComputeInstanceBackupProperties.encode = function encode(message, writer) { + AcceleratorConfig.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.tags != null && Object.hasOwnProperty.call(message, "tags")) - $root.google.cloud.backupdr.v1.Tags.encode(message.tags, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.machineType); - if (message.canIpForward != null && Object.hasOwnProperty.call(message, "canIpForward")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.canIpForward); - if (message.networkInterface != null && message.networkInterface.length) - for (var i = 0; i < message.networkInterface.length; ++i) - $root.google.cloud.backupdr.v1.NetworkInterface.encode(message.networkInterface[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.disk != null && message.disk.length) - for (var i = 0; i < message.disk.length; ++i) - $root.google.cloud.backupdr.v1.AttachedDisk.encode(message.disk[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.backupdr.v1.Metadata.encode(message.metadata, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.serviceAccount != null && message.serviceAccount.length) - for (var i = 0; i < message.serviceAccount.length; ++i) - $root.google.cloud.backupdr.v1.ServiceAccount.encode(message.serviceAccount[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) - $root.google.cloud.backupdr.v1.Scheduling.encode(message.scheduling, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.guestAccelerator != null && message.guestAccelerator.length) - for (var i = 0; i < message.guestAccelerator.length; ++i) - $root.google.cloud.backupdr.v1.AcceleratorConfig.encode(message.guestAccelerator[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.minCpuPlatform); - if (message.keyRevocationActionType != null && Object.hasOwnProperty.call(message, "keyRevocationActionType")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.keyRevocationActionType); - if (message.sourceInstance != null && Object.hasOwnProperty.call(message, "sourceInstance")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.sourceInstance); - 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 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.acceleratorType != null && Object.hasOwnProperty.call(message, "acceleratorType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.acceleratorType); + if (message.acceleratorCount != null && Object.hasOwnProperty.call(message, "acceleratorCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.acceleratorCount); return writer; }; /** - * Encodes the specified ComputeInstanceBackupProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceBackupProperties.verify|verify} messages. + * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AcceleratorConfig * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceBackupProperties} message ComputeInstanceBackupProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComputeInstanceBackupProperties.encodeDelimited = function encodeDelimited(message, writer) { + AcceleratorConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer. + * Decodes an AcceleratorConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AcceleratorConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComputeInstanceBackupProperties.decode = function decode(reader, length) { + AcceleratorConfig.decode = function 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.backupdr.v1.ComputeInstanceBackupProperties(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.AcceleratorConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.description = reader.string(); + message.acceleratorType = reader.string(); break; } case 2: { - message.tags = $root.google.cloud.backupdr.v1.Tags.decode(reader, reader.uint32()); - break; - } - case 3: { - message.machineType = reader.string(); - break; - } - case 4: { - message.canIpForward = reader.bool(); - break; - } - case 5: { - if (!(message.networkInterface && message.networkInterface.length)) - message.networkInterface = []; - message.networkInterface.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.disk && message.disk.length)) - message.disk = []; - message.disk.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader, reader.uint32())); - break; - } - case 7: { - message.metadata = $root.google.cloud.backupdr.v1.Metadata.decode(reader, reader.uint32()); - break; - } - case 8: { - if (!(message.serviceAccount && message.serviceAccount.length)) - message.serviceAccount = []; - message.serviceAccount.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader, reader.uint32())); - break; - } - case 9: { - message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.decode(reader, reader.uint32()); - break; - } - case 10: { - if (!(message.guestAccelerator && message.guestAccelerator.length)) - message.guestAccelerator = []; - message.guestAccelerator.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader, reader.uint32())); - break; - } - case 11: { - message.minCpuPlatform = reader.string(); - break; - } - case 12: { - message.keyRevocationActionType = reader.int32(); - break; - } - case 13: { - message.sourceInstance = reader.string(); - break; - } - case 14: { - 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; + message.acceleratorCount = reader.int32(); break; } default: @@ -24785,419 +25296,141 @@ }; /** - * Decodes a ComputeInstanceBackupProperties message from the specified reader or buffer, length delimited. + * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AcceleratorConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComputeInstanceBackupProperties.decodeDelimited = function decodeDelimited(reader) { + AcceleratorConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ComputeInstanceBackupProperties message. + * Verifies an AcceleratorConfig message. * @function verify - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AcceleratorConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ComputeInstanceBackupProperties.verify = function verify(message) { + AcceleratorConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; - } - if (message.tags != null && message.hasOwnProperty("tags")) { - properties._tags = 1; - { - var error = $root.google.cloud.backupdr.v1.Tags.verify(message.tags); - if (error) - return "tags." + error; - } - } - if (message.machineType != null && message.hasOwnProperty("machineType")) { - properties._machineType = 1; - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - } - if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { - properties._canIpForward = 1; - if (typeof message.canIpForward !== "boolean") - return "canIpForward: boolean expected"; - } - if (message.networkInterface != null && message.hasOwnProperty("networkInterface")) { - if (!Array.isArray(message.networkInterface)) - return "networkInterface: array expected"; - for (var i = 0; i < message.networkInterface.length; ++i) { - var error = $root.google.cloud.backupdr.v1.NetworkInterface.verify(message.networkInterface[i]); - if (error) - return "networkInterface." + error; - } - } - if (message.disk != null && message.hasOwnProperty("disk")) { - if (!Array.isArray(message.disk)) - return "disk: array expected"; - for (var i = 0; i < message.disk.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AttachedDisk.verify(message.disk[i]); - if (error) - return "disk." + error; - } - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - properties._metadata = 1; - { - var error = $root.google.cloud.backupdr.v1.Metadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) { - if (!Array.isArray(message.serviceAccount)) - return "serviceAccount: array expected"; - for (var i = 0; i < message.serviceAccount.length; ++i) { - var error = $root.google.cloud.backupdr.v1.ServiceAccount.verify(message.serviceAccount[i]); - if (error) - return "serviceAccount." + error; - } - } - if (message.scheduling != null && message.hasOwnProperty("scheduling")) { - properties._scheduling = 1; - { - var error = $root.google.cloud.backupdr.v1.Scheduling.verify(message.scheduling); - if (error) - return "scheduling." + error; - } - } - if (message.guestAccelerator != null && message.hasOwnProperty("guestAccelerator")) { - if (!Array.isArray(message.guestAccelerator)) - return "guestAccelerator: array expected"; - for (var i = 0; i < message.guestAccelerator.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AcceleratorConfig.verify(message.guestAccelerator[i]); - if (error) - return "guestAccelerator." + error; - } - } - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { - properties._minCpuPlatform = 1; - if (!$util.isString(message.minCpuPlatform)) - return "minCpuPlatform: string expected"; - } - if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { - properties._keyRevocationActionType = 1; - switch (message.keyRevocationActionType) { - default: - return "keyRevocationActionType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) { - properties._sourceInstance = 1; - if (!$util.isString(message.sourceInstance)) - return "sourceInstance: string expected"; + if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) { + properties._acceleratorType = 1; + if (!$util.isString(message.acceleratorType)) + return "acceleratorType: string expected"; } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) { + properties._acceleratorCount = 1; + if (!$util.isInteger(message.acceleratorCount)) + return "acceleratorCount: integer expected"; } return null; }; /** - * Creates a ComputeInstanceBackupProperties message from a plain object. Also converts values to their respective internal types. + * Creates an AcceleratorConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AcceleratorConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} ComputeInstanceBackupProperties + * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig */ - ComputeInstanceBackupProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties) + AcceleratorConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AcceleratorConfig) return object; - var message = new $root.google.cloud.backupdr.v1.ComputeInstanceBackupProperties(); - if (object.description != null) - message.description = String(object.description); - if (object.tags != null) { - if (typeof object.tags !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.tags: object expected"); - message.tags = $root.google.cloud.backupdr.v1.Tags.fromObject(object.tags); - } - if (object.machineType != null) - message.machineType = String(object.machineType); - if (object.canIpForward != null) - message.canIpForward = Boolean(object.canIpForward); - if (object.networkInterface) { - if (!Array.isArray(object.networkInterface)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: array expected"); - message.networkInterface = []; - for (var i = 0; i < object.networkInterface.length; ++i) { - if (typeof object.networkInterface[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.networkInterface: object expected"); - message.networkInterface[i] = $root.google.cloud.backupdr.v1.NetworkInterface.fromObject(object.networkInterface[i]); - } - } - if (object.disk) { - if (!Array.isArray(object.disk)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.disk: array expected"); - message.disk = []; - for (var i = 0; i < object.disk.length; ++i) { - if (typeof object.disk[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.disk: object expected"); - message.disk[i] = $root.google.cloud.backupdr.v1.AttachedDisk.fromObject(object.disk[i]); - } - } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.metadata: object expected"); - message.metadata = $root.google.cloud.backupdr.v1.Metadata.fromObject(object.metadata); - } - if (object.serviceAccount) { - if (!Array.isArray(object.serviceAccount)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.serviceAccount: array expected"); - message.serviceAccount = []; - for (var i = 0; i < object.serviceAccount.length; ++i) { - if (typeof object.serviceAccount[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.serviceAccount: object expected"); - message.serviceAccount[i] = $root.google.cloud.backupdr.v1.ServiceAccount.fromObject(object.serviceAccount[i]); - } - } - if (object.scheduling != null) { - if (typeof object.scheduling !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.scheduling: object expected"); - message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.fromObject(object.scheduling); - } - if (object.guestAccelerator) { - if (!Array.isArray(object.guestAccelerator)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.guestAccelerator: array expected"); - message.guestAccelerator = []; - for (var i = 0; i < object.guestAccelerator.length; ++i) { - if (typeof object.guestAccelerator[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.guestAccelerator: object expected"); - message.guestAccelerator[i] = $root.google.cloud.backupdr.v1.AcceleratorConfig.fromObject(object.guestAccelerator[i]); - } - } - if (object.minCpuPlatform != null) - message.minCpuPlatform = String(object.minCpuPlatform); - switch (object.keyRevocationActionType) { - default: - if (typeof object.keyRevocationActionType === "number") { - message.keyRevocationActionType = object.keyRevocationActionType; - break; - } - break; - case "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": - case 0: - message.keyRevocationActionType = 0; - break; - case "NONE": - case 1: - message.keyRevocationActionType = 1; - break; - case "STOP": - case 2: - message.keyRevocationActionType = 2; - break; - } - if (object.sourceInstance != null) - message.sourceInstance = String(object.sourceInstance); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceBackupProperties.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]]); - } + var message = new $root.google.cloud.backupdr.v1.AcceleratorConfig(); + if (object.acceleratorType != null) + message.acceleratorType = String(object.acceleratorType); + if (object.acceleratorCount != null) + message.acceleratorCount = object.acceleratorCount | 0; return message; }; /** - * Creates a plain object from a ComputeInstanceBackupProperties message. Also converts values to other types if specified. + * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AcceleratorConfig * @static - * @param {google.cloud.backupdr.v1.ComputeInstanceBackupProperties} message ComputeInstanceBackupProperties + * @param {google.cloud.backupdr.v1.AcceleratorConfig} message AcceleratorConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ComputeInstanceBackupProperties.toObject = function toObject(message, options) { + AcceleratorConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.networkInterface = []; - object.disk = []; - object.serviceAccount = []; - object.guestAccelerator = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.tags != null && message.hasOwnProperty("tags")) { - object.tags = $root.google.cloud.backupdr.v1.Tags.toObject(message.tags, options); - if (options.oneofs) - object._tags = "tags"; - } - if (message.machineType != null && message.hasOwnProperty("machineType")) { - object.machineType = message.machineType; - if (options.oneofs) - object._machineType = "machineType"; - } - if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { - object.canIpForward = message.canIpForward; - if (options.oneofs) - object._canIpForward = "canIpForward"; - } - if (message.networkInterface && message.networkInterface.length) { - object.networkInterface = []; - for (var j = 0; j < message.networkInterface.length; ++j) - object.networkInterface[j] = $root.google.cloud.backupdr.v1.NetworkInterface.toObject(message.networkInterface[j], options); - } - if (message.disk && message.disk.length) { - object.disk = []; - for (var j = 0; j < message.disk.length; ++j) - object.disk[j] = $root.google.cloud.backupdr.v1.AttachedDisk.toObject(message.disk[j], options); - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - object.metadata = $root.google.cloud.backupdr.v1.Metadata.toObject(message.metadata, options); - if (options.oneofs) - object._metadata = "metadata"; - } - if (message.serviceAccount && message.serviceAccount.length) { - object.serviceAccount = []; - for (var j = 0; j < message.serviceAccount.length; ++j) - object.serviceAccount[j] = $root.google.cloud.backupdr.v1.ServiceAccount.toObject(message.serviceAccount[j], options); - } - if (message.scheduling != null && message.hasOwnProperty("scheduling")) { - object.scheduling = $root.google.cloud.backupdr.v1.Scheduling.toObject(message.scheduling, options); - if (options.oneofs) - object._scheduling = "scheduling"; - } - if (message.guestAccelerator && message.guestAccelerator.length) { - object.guestAccelerator = []; - for (var j = 0; j < message.guestAccelerator.length; ++j) - object.guestAccelerator[j] = $root.google.cloud.backupdr.v1.AcceleratorConfig.toObject(message.guestAccelerator[j], options); - } - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { - object.minCpuPlatform = message.minCpuPlatform; - if (options.oneofs) - object._minCpuPlatform = "minCpuPlatform"; - } - if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { - object.keyRevocationActionType = options.enums === String ? $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] === undefined ? message.keyRevocationActionType : $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] : message.keyRevocationActionType; + if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) { + object.acceleratorType = message.acceleratorType; if (options.oneofs) - object._keyRevocationActionType = "keyRevocationActionType"; + object._acceleratorType = "acceleratorType"; } - if (message.sourceInstance != null && message.hasOwnProperty("sourceInstance")) { - object.sourceInstance = message.sourceInstance; + if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) { + object.acceleratorCount = message.acceleratorCount; if (options.oneofs) - object._sourceInstance = "sourceInstance"; - } - 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]]; + object._acceleratorCount = "acceleratorCount"; } return object; }; /** - * Converts this ComputeInstanceBackupProperties to JSON. + * Converts this AcceleratorConfig to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AcceleratorConfig * @instance * @returns {Object.} JSON object */ - ComputeInstanceBackupProperties.prototype.toJSON = function toJSON() { + AcceleratorConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ComputeInstanceBackupProperties + * Gets the default type url for AcceleratorConfig * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ComputeInstanceBackupProperties + * @memberof google.cloud.backupdr.v1.AcceleratorConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ComputeInstanceBackupProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AcceleratorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceBackupProperties"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.AcceleratorConfig"; }; - return ComputeInstanceBackupProperties; + return AcceleratorConfig; })(); - v1.ComputeInstanceRestoreProperties = (function() { + v1.CustomerEncryptionKey = (function() { /** - * Properties of a ComputeInstanceRestoreProperties. + * Properties of a CustomerEncryptionKey. * @memberof google.cloud.backupdr.v1 - * @interface IComputeInstanceRestoreProperties - * @property {string|null} [name] ComputeInstanceRestoreProperties name - * @property {google.cloud.backupdr.v1.IAdvancedMachineFeatures|null} [advancedMachineFeatures] ComputeInstanceRestoreProperties advancedMachineFeatures - * @property {boolean|null} [canIpForward] ComputeInstanceRestoreProperties canIpForward - * @property {google.cloud.backupdr.v1.IConfidentialInstanceConfig|null} [confidentialInstanceConfig] ComputeInstanceRestoreProperties confidentialInstanceConfig - * @property {boolean|null} [deletionProtection] ComputeInstanceRestoreProperties deletionProtection - * @property {string|null} [description] ComputeInstanceRestoreProperties description - * @property {Array.|null} [disks] ComputeInstanceRestoreProperties disks - * @property {google.cloud.backupdr.v1.IDisplayDevice|null} [displayDevice] ComputeInstanceRestoreProperties displayDevice - * @property {Array.|null} [guestAccelerators] ComputeInstanceRestoreProperties guestAccelerators - * @property {string|null} [hostname] ComputeInstanceRestoreProperties hostname - * @property {google.cloud.backupdr.v1.ICustomerEncryptionKey|null} [instanceEncryptionKey] ComputeInstanceRestoreProperties instanceEncryptionKey - * @property {google.cloud.backupdr.v1.KeyRevocationActionType|null} [keyRevocationActionType] ComputeInstanceRestoreProperties keyRevocationActionType - * @property {Object.|null} [labels] ComputeInstanceRestoreProperties labels - * @property {string|null} [machineType] ComputeInstanceRestoreProperties machineType - * @property {google.cloud.backupdr.v1.IMetadata|null} [metadata] ComputeInstanceRestoreProperties metadata - * @property {string|null} [minCpuPlatform] ComputeInstanceRestoreProperties minCpuPlatform - * @property {Array.|null} [networkInterfaces] ComputeInstanceRestoreProperties networkInterfaces - * @property {google.cloud.backupdr.v1.INetworkPerformanceConfig|null} [networkPerformanceConfig] ComputeInstanceRestoreProperties networkPerformanceConfig - * @property {google.cloud.backupdr.v1.IInstanceParams|null} [params] ComputeInstanceRestoreProperties params - * @property {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null} [privateIpv6GoogleAccess] ComputeInstanceRestoreProperties privateIpv6GoogleAccess - * @property {google.cloud.backupdr.v1.IAllocationAffinity|null} [allocationAffinity] ComputeInstanceRestoreProperties allocationAffinity - * @property {Array.|null} [resourcePolicies] ComputeInstanceRestoreProperties resourcePolicies - * @property {google.cloud.backupdr.v1.IScheduling|null} [scheduling] ComputeInstanceRestoreProperties scheduling - * @property {Array.|null} [serviceAccounts] ComputeInstanceRestoreProperties serviceAccounts - * @property {google.cloud.backupdr.v1.ITags|null} [tags] ComputeInstanceRestoreProperties tags + * @interface ICustomerEncryptionKey + * @property {string|null} [rawKey] CustomerEncryptionKey rawKey + * @property {string|null} [rsaEncryptedKey] CustomerEncryptionKey rsaEncryptedKey + * @property {string|null} [kmsKeyName] CustomerEncryptionKey kmsKeyName + * @property {string|null} [kmsKeyServiceAccount] CustomerEncryptionKey kmsKeyServiceAccount */ /** - * Constructs a new ComputeInstanceRestoreProperties. + * Constructs a new CustomerEncryptionKey. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ComputeInstanceRestoreProperties. - * @implements IComputeInstanceRestoreProperties + * @classdesc Represents a CustomerEncryptionKey. + * @implements ICustomerEncryptionKey * @constructor - * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey=} [properties] Properties to set */ - function ComputeInstanceRestoreProperties(properties) { - this.disks = []; - this.guestAccelerators = []; - this.labels = {}; - this.networkInterfaces = []; - this.resourcePolicies = []; - this.serviceAccounts = []; + function CustomerEncryptionKey(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25205,658 +25438,652 @@ } /** - * ComputeInstanceRestoreProperties name. - * @member {string|null|undefined} name - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * CustomerEncryptionKey rawKey. + * @member {string|null|undefined} rawKey + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey * @instance */ - ComputeInstanceRestoreProperties.prototype.name = null; + CustomerEncryptionKey.prototype.rawKey = null; /** - * ComputeInstanceRestoreProperties advancedMachineFeatures. - * @member {google.cloud.backupdr.v1.IAdvancedMachineFeatures|null|undefined} advancedMachineFeatures - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * CustomerEncryptionKey rsaEncryptedKey. + * @member {string|null|undefined} rsaEncryptedKey + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey * @instance */ - ComputeInstanceRestoreProperties.prototype.advancedMachineFeatures = null; + CustomerEncryptionKey.prototype.rsaEncryptedKey = null; /** - * ComputeInstanceRestoreProperties canIpForward. - * @member {boolean|null|undefined} canIpForward - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * CustomerEncryptionKey kmsKeyName. + * @member {string|null|undefined} kmsKeyName + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey * @instance */ - ComputeInstanceRestoreProperties.prototype.canIpForward = null; + CustomerEncryptionKey.prototype.kmsKeyName = null; /** - * ComputeInstanceRestoreProperties confidentialInstanceConfig. - * @member {google.cloud.backupdr.v1.IConfidentialInstanceConfig|null|undefined} confidentialInstanceConfig - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * CustomerEncryptionKey kmsKeyServiceAccount. + * @member {string|null|undefined} kmsKeyServiceAccount + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey * @instance */ - ComputeInstanceRestoreProperties.prototype.confidentialInstanceConfig = null; + CustomerEncryptionKey.prototype.kmsKeyServiceAccount = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ComputeInstanceRestoreProperties deletionProtection. - * @member {boolean|null|undefined} deletionProtection - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * CustomerEncryptionKey key. + * @member {"rawKey"|"rsaEncryptedKey"|"kmsKeyName"|undefined} key + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey * @instance */ - ComputeInstanceRestoreProperties.prototype.deletionProtection = null; + Object.defineProperty(CustomerEncryptionKey.prototype, "key", { + get: $util.oneOfGetter($oneOfFields = ["rawKey", "rsaEncryptedKey", "kmsKeyName"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * ComputeInstanceRestoreProperties description. - * @member {string|null|undefined} description - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * CustomerEncryptionKey _kmsKeyServiceAccount. + * @member {"kmsKeyServiceAccount"|undefined} _kmsKeyServiceAccount + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey * @instance */ - ComputeInstanceRestoreProperties.prototype.description = null; + Object.defineProperty(CustomerEncryptionKey.prototype, "_kmsKeyServiceAccount", { + get: $util.oneOfGetter($oneOfFields = ["kmsKeyServiceAccount"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * ComputeInstanceRestoreProperties disks. - * @member {Array.} disks - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Creates a new CustomerEncryptionKey instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey instance */ - ComputeInstanceRestoreProperties.prototype.disks = $util.emptyArray; + CustomerEncryptionKey.create = function create(properties) { + return new CustomerEncryptionKey(properties); + }; /** - * ComputeInstanceRestoreProperties displayDevice. - * @member {google.cloud.backupdr.v1.IDisplayDevice|null|undefined} displayDevice - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.displayDevice = null; - - /** - * ComputeInstanceRestoreProperties guestAccelerators. - * @member {Array.} guestAccelerators - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.guestAccelerators = $util.emptyArray; - - /** - * ComputeInstanceRestoreProperties hostname. - * @member {string|null|undefined} hostname - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.hostname = null; - - /** - * ComputeInstanceRestoreProperties instanceEncryptionKey. - * @member {google.cloud.backupdr.v1.ICustomerEncryptionKey|null|undefined} instanceEncryptionKey - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey} message CustomerEncryptionKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ComputeInstanceRestoreProperties.prototype.instanceEncryptionKey = null; + CustomerEncryptionKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rawKey != null && Object.hasOwnProperty.call(message, "rawKey")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rawKey); + if (message.rsaEncryptedKey != null && Object.hasOwnProperty.call(message, "rsaEncryptedKey")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rsaEncryptedKey); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyName); + if (message.kmsKeyServiceAccount != null && Object.hasOwnProperty.call(message, "kmsKeyServiceAccount")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kmsKeyServiceAccount); + return writer; + }; /** - * ComputeInstanceRestoreProperties keyRevocationActionType. - * @member {google.cloud.backupdr.v1.KeyRevocationActionType|null|undefined} keyRevocationActionType - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey} message CustomerEncryptionKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - ComputeInstanceRestoreProperties.prototype.keyRevocationActionType = null; + CustomerEncryptionKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * ComputeInstanceRestoreProperties labels. - * @member {Object.} labels - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Decodes a CustomerEncryptionKey message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComputeInstanceRestoreProperties.prototype.labels = $util.emptyObject; + CustomerEncryptionKey.decode = function 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.backupdr.v1.CustomerEncryptionKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rawKey = reader.string(); + break; + } + case 2: { + message.rsaEncryptedKey = reader.string(); + break; + } + case 3: { + message.kmsKeyName = reader.string(); + break; + } + case 4: { + message.kmsKeyServiceAccount = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * ComputeInstanceRestoreProperties machineType. - * @member {string|null|undefined} machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComputeInstanceRestoreProperties.prototype.machineType = null; + CustomerEncryptionKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * ComputeInstanceRestoreProperties metadata. - * @member {google.cloud.backupdr.v1.IMetadata|null|undefined} metadata - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Verifies a CustomerEncryptionKey message. + * @function verify + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ComputeInstanceRestoreProperties.prototype.metadata = null; + CustomerEncryptionKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rawKey != null && message.hasOwnProperty("rawKey")) { + properties.key = 1; + if (!$util.isString(message.rawKey)) + return "rawKey: string expected"; + } + if (message.rsaEncryptedKey != null && message.hasOwnProperty("rsaEncryptedKey")) { + if (properties.key === 1) + return "key: multiple values"; + properties.key = 1; + if (!$util.isString(message.rsaEncryptedKey)) + return "rsaEncryptedKey: string expected"; + } + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { + if (properties.key === 1) + return "key: multiple values"; + properties.key = 1; + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + } + if (message.kmsKeyServiceAccount != null && message.hasOwnProperty("kmsKeyServiceAccount")) { + properties._kmsKeyServiceAccount = 1; + if (!$util.isString(message.kmsKeyServiceAccount)) + return "kmsKeyServiceAccount: string expected"; + } + return null; + }; /** - * ComputeInstanceRestoreProperties minCpuPlatform. - * @member {string|null|undefined} minCpuPlatform - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey */ - ComputeInstanceRestoreProperties.prototype.minCpuPlatform = null; + CustomerEncryptionKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.CustomerEncryptionKey) + return object; + var message = new $root.google.cloud.backupdr.v1.CustomerEncryptionKey(); + if (object.rawKey != null) + message.rawKey = String(object.rawKey); + if (object.rsaEncryptedKey != null) + message.rsaEncryptedKey = String(object.rsaEncryptedKey); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + if (object.kmsKeyServiceAccount != null) + message.kmsKeyServiceAccount = String(object.kmsKeyServiceAccount); + return message; + }; /** - * ComputeInstanceRestoreProperties networkInterfaces. - * @member {Array.} networkInterfaces - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {google.cloud.backupdr.v1.CustomerEncryptionKey} message CustomerEncryptionKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - ComputeInstanceRestoreProperties.prototype.networkInterfaces = $util.emptyArray; + CustomerEncryptionKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.rawKey != null && message.hasOwnProperty("rawKey")) { + object.rawKey = message.rawKey; + if (options.oneofs) + object.key = "rawKey"; + } + if (message.rsaEncryptedKey != null && message.hasOwnProperty("rsaEncryptedKey")) { + object.rsaEncryptedKey = message.rsaEncryptedKey; + if (options.oneofs) + object.key = "rsaEncryptedKey"; + } + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { + object.kmsKeyName = message.kmsKeyName; + if (options.oneofs) + object.key = "kmsKeyName"; + } + if (message.kmsKeyServiceAccount != null && message.hasOwnProperty("kmsKeyServiceAccount")) { + object.kmsKeyServiceAccount = message.kmsKeyServiceAccount; + if (options.oneofs) + object._kmsKeyServiceAccount = "kmsKeyServiceAccount"; + } + return object; + }; /** - * ComputeInstanceRestoreProperties networkPerformanceConfig. - * @member {google.cloud.backupdr.v1.INetworkPerformanceConfig|null|undefined} networkPerformanceConfig - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * Converts this CustomerEncryptionKey to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey * @instance + * @returns {Object.} JSON object */ - ComputeInstanceRestoreProperties.prototype.networkPerformanceConfig = null; + CustomerEncryptionKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * ComputeInstanceRestoreProperties params. - * @member {google.cloud.backupdr.v1.IInstanceParams|null|undefined} params - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Gets the default type url for CustomerEncryptionKey + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - ComputeInstanceRestoreProperties.prototype.params = null; + CustomerEncryptionKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.CustomerEncryptionKey"; + }; - /** - * ComputeInstanceRestoreProperties privateIpv6GoogleAccess. - * @member {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess|null|undefined} privateIpv6GoogleAccess - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.privateIpv6GoogleAccess = null; + return CustomerEncryptionKey; + })(); - /** - * ComputeInstanceRestoreProperties allocationAffinity. - * @member {google.cloud.backupdr.v1.IAllocationAffinity|null|undefined} allocationAffinity - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - ComputeInstanceRestoreProperties.prototype.allocationAffinity = null; + v1.Entry = (function() { /** - * ComputeInstanceRestoreProperties resourcePolicies. - * @member {Array.} resourcePolicies - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Properties of an Entry. + * @memberof google.cloud.backupdr.v1 + * @interface IEntry + * @property {string|null} [key] Entry key + * @property {string|null} [value] Entry value */ - ComputeInstanceRestoreProperties.prototype.resourcePolicies = $util.emptyArray; /** - * ComputeInstanceRestoreProperties scheduling. - * @member {google.cloud.backupdr.v1.IScheduling|null|undefined} scheduling - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Constructs a new Entry. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents an Entry. + * @implements IEntry + * @constructor + * @param {google.cloud.backupdr.v1.IEntry=} [properties] Properties to set */ - ComputeInstanceRestoreProperties.prototype.scheduling = null; + function Entry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * ComputeInstanceRestoreProperties serviceAccounts. - * @member {Array.} serviceAccounts - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * Entry key. + * @member {string|null|undefined} key + * @memberof google.cloud.backupdr.v1.Entry * @instance */ - ComputeInstanceRestoreProperties.prototype.serviceAccounts = $util.emptyArray; + Entry.prototype.key = null; /** - * ComputeInstanceRestoreProperties tags. - * @member {google.cloud.backupdr.v1.ITags|null|undefined} tags - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * Entry value. + * @member {string|null|undefined} value + * @memberof google.cloud.backupdr.v1.Entry * @instance */ - ComputeInstanceRestoreProperties.prototype.tags = null; + Entry.prototype.value = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * ComputeInstanceRestoreProperties _name. - * @member {"name"|undefined} _name - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * Entry _key. + * @member {"key"|undefined} _key + * @memberof google.cloud.backupdr.v1.Entry * @instance */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), + Object.defineProperty(Entry.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), set: $util.oneOfSetter($oneOfFields) }); /** - * ComputeInstanceRestoreProperties _advancedMachineFeatures. - * @member {"advancedMachineFeatures"|undefined} _advancedMachineFeatures - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * Entry _value. + * @member {"value"|undefined} _value + * @memberof google.cloud.backupdr.v1.Entry * @instance */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_advancedMachineFeatures", { - get: $util.oneOfGetter($oneOfFields = ["advancedMachineFeatures"]), + Object.defineProperty(Entry.prototype, "_value", { + get: $util.oneOfGetter($oneOfFields = ["value"]), set: $util.oneOfSetter($oneOfFields) }); /** - * ComputeInstanceRestoreProperties _canIpForward. - * @member {"canIpForward"|undefined} _canIpForward - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Creates a new Entry instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.IEntry=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Entry} Entry instance */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_canIpForward", { - get: $util.oneOfGetter($oneOfFields = ["canIpForward"]), - set: $util.oneOfSetter($oneOfFields) - }); + Entry.create = function create(properties) { + return new Entry(properties); + }; /** - * ComputeInstanceRestoreProperties _confidentialInstanceConfig. - * @member {"confidentialInstanceConfig"|undefined} _confidentialInstanceConfig - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_confidentialInstanceConfig", { - get: $util.oneOfGetter($oneOfFields = ["confidentialInstanceConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); + Entry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; /** - * ComputeInstanceRestoreProperties _deletionProtection. - * @member {"deletionProtection"|undefined} _deletionProtection - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.IEntry} message Entry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_deletionProtection", { - get: $util.oneOfGetter($oneOfFields = ["deletionProtection"]), - set: $util.oneOfSetter($oneOfFields) - }); + Entry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * ComputeInstanceRestoreProperties _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Decodes an Entry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); + Entry.decode = function 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.backupdr.v1.Entry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * ComputeInstanceRestoreProperties _displayDevice. - * @member {"displayDevice"|undefined} _displayDevice - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Decodes an Entry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Entry} Entry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_displayDevice", { - get: $util.oneOfGetter($oneOfFields = ["displayDevice"]), - set: $util.oneOfSetter($oneOfFields) - }); + Entry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * ComputeInstanceRestoreProperties _hostname. - * @member {"hostname"|undefined} _hostname - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Verifies an Entry message. + * @function verify + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_hostname", { - get: $util.oneOfGetter($oneOfFields = ["hostname"]), - set: $util.oneOfSetter($oneOfFields) - }); + Entry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; + } + if (message.value != null && message.hasOwnProperty("value")) { + properties._value = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + return null; + }; /** - * ComputeInstanceRestoreProperties _instanceEncryptionKey. - * @member {"instanceEncryptionKey"|undefined} _instanceEncryptionKey - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Entry} Entry */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_instanceEncryptionKey", { - get: $util.oneOfGetter($oneOfFields = ["instanceEncryptionKey"]), - set: $util.oneOfSetter($oneOfFields) - }); + Entry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Entry) + return object; + var message = new $root.google.cloud.backupdr.v1.Entry(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + message.value = String(object.value); + return message; + }; /** - * ComputeInstanceRestoreProperties _keyRevocationActionType. - * @member {"keyRevocationActionType"|undefined} _keyRevocationActionType - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_keyRevocationActionType", { - get: $util.oneOfGetter($oneOfFields = ["keyRevocationActionType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _machineType. - * @member {"machineType"|undefined} _machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_machineType", { - get: $util.oneOfGetter($oneOfFields = ["machineType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * ComputeInstanceRestoreProperties _metadata. - * @member {"metadata"|undefined} _metadata - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Creates a plain object from an Entry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {google.cloud.backupdr.v1.Entry} message Entry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_metadata", { - get: $util.oneOfGetter($oneOfFields = ["metadata"]), - set: $util.oneOfSetter($oneOfFields) - }); + Entry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) + object._key = "key"; + } + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object._value = "value"; + } + return object; + }; /** - * ComputeInstanceRestoreProperties _minCpuPlatform. - * @member {"minCpuPlatform"|undefined} _minCpuPlatform - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * Converts this Entry to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Entry * @instance + * @returns {Object.} JSON object */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_minCpuPlatform", { - get: $util.oneOfGetter($oneOfFields = ["minCpuPlatform"]), - set: $util.oneOfSetter($oneOfFields) - }); + Entry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * ComputeInstanceRestoreProperties _networkPerformanceConfig. - * @member {"networkPerformanceConfig"|undefined} _networkPerformanceConfig - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Gets the default type url for Entry + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Entry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_networkPerformanceConfig", { - get: $util.oneOfGetter($oneOfFields = ["networkPerformanceConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); + Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Entry"; + }; - /** - * ComputeInstanceRestoreProperties _params. - * @member {"params"|undefined} _params - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_params", { - get: $util.oneOfGetter($oneOfFields = ["params"]), - set: $util.oneOfSetter($oneOfFields) - }); + return Entry; + })(); - /** - * ComputeInstanceRestoreProperties _privateIpv6GoogleAccess. - * @member {"privateIpv6GoogleAccess"|undefined} _privateIpv6GoogleAccess - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance - */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_privateIpv6GoogleAccess", { - get: $util.oneOfGetter($oneOfFields = ["privateIpv6GoogleAccess"]), - set: $util.oneOfSetter($oneOfFields) - }); + v1.Metadata = (function() { /** - * ComputeInstanceRestoreProperties _allocationAffinity. - * @member {"allocationAffinity"|undefined} _allocationAffinity - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Properties of a Metadata. + * @memberof google.cloud.backupdr.v1 + * @interface IMetadata + * @property {Array.|null} [items] Metadata items */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_allocationAffinity", { - get: $util.oneOfGetter($oneOfFields = ["allocationAffinity"]), - set: $util.oneOfSetter($oneOfFields) - }); /** - * ComputeInstanceRestoreProperties _scheduling. - * @member {"scheduling"|undefined} _scheduling - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @instance + * Constructs a new Metadata. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {google.cloud.backupdr.v1.IMetadata=} [properties] Properties to set */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_scheduling", { - get: $util.oneOfGetter($oneOfFields = ["scheduling"]), - set: $util.oneOfSetter($oneOfFields) - }); + function Metadata(properties) { + this.items = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * ComputeInstanceRestoreProperties _tags. - * @member {"tags"|undefined} _tags - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * Metadata items. + * @member {Array.} items + * @memberof google.cloud.backupdr.v1.Metadata * @instance */ - Object.defineProperty(ComputeInstanceRestoreProperties.prototype, "_tags", { - get: $util.oneOfGetter($oneOfFields = ["tags"]), - set: $util.oneOfSetter($oneOfFields) - }); + Metadata.prototype.items = $util.emptyArray; /** - * Creates a new ComputeInstanceRestoreProperties instance using the specified properties. + * Creates a new Metadata instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @memberof google.cloud.backupdr.v1.Metadata * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties instance + * @param {google.cloud.backupdr.v1.IMetadata=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Metadata} Metadata instance */ - ComputeInstanceRestoreProperties.create = function create(properties) { - return new ComputeInstanceRestoreProperties(properties); + Metadata.create = function create(properties) { + return new Metadata(properties); }; /** - * Encodes the specified ComputeInstanceRestoreProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @memberof google.cloud.backupdr.v1.Metadata * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.IMetadata} message Metadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComputeInstanceRestoreProperties.encode = function encode(message, writer) { + Metadata.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.advancedMachineFeatures != null && Object.hasOwnProperty.call(message, "advancedMachineFeatures")) - $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.encode(message.advancedMachineFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.canIpForward != null && Object.hasOwnProperty.call(message, "canIpForward")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.canIpForward); - if (message.confidentialInstanceConfig != null && Object.hasOwnProperty.call(message, "confidentialInstanceConfig")) - $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.encode(message.confidentialInstanceConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.deletionProtection != null && Object.hasOwnProperty.call(message, "deletionProtection")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.deletionProtection); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.disks != null && message.disks.length) - for (var i = 0; i < message.disks.length; ++i) - $root.google.cloud.backupdr.v1.AttachedDisk.encode(message.disks[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.displayDevice != null && Object.hasOwnProperty.call(message, "displayDevice")) - $root.google.cloud.backupdr.v1.DisplayDevice.encode(message.displayDevice, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.guestAccelerators != null && message.guestAccelerators.length) - for (var i = 0; i < message.guestAccelerators.length; ++i) - $root.google.cloud.backupdr.v1.AcceleratorConfig.encode(message.guestAccelerators[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.hostname != null && Object.hasOwnProperty.call(message, "hostname")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.hostname); - if (message.instanceEncryptionKey != null && Object.hasOwnProperty.call(message, "instanceEncryptionKey")) - $root.google.cloud.backupdr.v1.CustomerEncryptionKey.encode(message.instanceEncryptionKey, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.keyRevocationActionType != null && Object.hasOwnProperty.call(message, "keyRevocationActionType")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.keyRevocationActionType); - 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 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.machineType); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.cloud.backupdr.v1.Metadata.encode(message.metadata, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.minCpuPlatform != null && Object.hasOwnProperty.call(message, "minCpuPlatform")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.minCpuPlatform); - if (message.networkInterfaces != null && message.networkInterfaces.length) - for (var i = 0; i < message.networkInterfaces.length; ++i) - $root.google.cloud.backupdr.v1.NetworkInterface.encode(message.networkInterfaces[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.networkPerformanceConfig != null && Object.hasOwnProperty.call(message, "networkPerformanceConfig")) - $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.encode(message.networkPerformanceConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.google.cloud.backupdr.v1.InstanceParams.encode(message.params, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.privateIpv6GoogleAccess != null && Object.hasOwnProperty.call(message, "privateIpv6GoogleAccess")) - writer.uint32(/* id 20, wireType 0 =*/160).int32(message.privateIpv6GoogleAccess); - if (message.allocationAffinity != null && Object.hasOwnProperty.call(message, "allocationAffinity")) - $root.google.cloud.backupdr.v1.AllocationAffinity.encode(message.allocationAffinity, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.resourcePolicies != null && message.resourcePolicies.length) - for (var i = 0; i < message.resourcePolicies.length; ++i) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.resourcePolicies[i]); - if (message.scheduling != null && Object.hasOwnProperty.call(message, "scheduling")) - $root.google.cloud.backupdr.v1.Scheduling.encode(message.scheduling, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.serviceAccounts != null && message.serviceAccounts.length) - for (var i = 0; i < message.serviceAccounts.length; ++i) - $root.google.cloud.backupdr.v1.ServiceAccount.encode(message.serviceAccounts[i], writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) - $root.google.cloud.backupdr.v1.Tags.encode(message.tags, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + $root.google.cloud.backupdr.v1.Entry.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ComputeInstanceRestoreProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.verify|verify} messages. + * Encodes the specified Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @memberof google.cloud.backupdr.v1.Metadata * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.IMetadata} message Metadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComputeInstanceRestoreProperties.encodeDelimited = function encodeDelimited(message, writer) { + Metadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer. + * Decodes a Metadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @memberof google.cloud.backupdr.v1.Metadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties + * @returns {google.cloud.backupdr.v1.Metadata} Metadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComputeInstanceRestoreProperties.decode = function decode(reader, length) { + Metadata.decode = function 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.backupdr.v1.ComputeInstanceRestoreProperties(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.Metadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.decode(reader, reader.uint32()); - break; - } - case 3: { - message.canIpForward = reader.bool(); - break; - } - case 4: { - message.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.deletionProtection = reader.bool(); - break; - } - case 6: { - message.description = reader.string(); - break; - } - case 7: { - if (!(message.disks && message.disks.length)) - message.disks = []; - message.disks.push($root.google.cloud.backupdr.v1.AttachedDisk.decode(reader, reader.uint32())); - break; - } - case 8: { - message.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.guestAccelerators && message.guestAccelerators.length)) - message.guestAccelerators = []; - message.guestAccelerators.push($root.google.cloud.backupdr.v1.AcceleratorConfig.decode(reader, reader.uint32())); - break; - } - case 10: { - message.hostname = reader.string(); - break; - } - case 11: { - message.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader, reader.uint32()); - break; - } - case 12: { - message.keyRevocationActionType = reader.int32(); - break; - } - case 13: { - 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 14: { - message.machineType = reader.string(); - break; - } - case 15: { - message.metadata = $root.google.cloud.backupdr.v1.Metadata.decode(reader, reader.uint32()); - break; - } - case 16: { - message.minCpuPlatform = reader.string(); - break; - } - case 17: { - if (!(message.networkInterfaces && message.networkInterfaces.length)) - message.networkInterfaces = []; - message.networkInterfaces.push($root.google.cloud.backupdr.v1.NetworkInterface.decode(reader, reader.uint32())); - break; - } - case 18: { - message.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.decode(reader, reader.uint32()); - break; - } - case 19: { - message.params = $root.google.cloud.backupdr.v1.InstanceParams.decode(reader, reader.uint32()); - break; - } - case 20: { - message.privateIpv6GoogleAccess = reader.int32(); - break; - } - case 21: { - message.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.decode(reader, reader.uint32()); - break; - } - case 22: { - if (!(message.resourcePolicies && message.resourcePolicies.length)) - message.resourcePolicies = []; - message.resourcePolicies.push(reader.string()); - break; - } - case 23: { - message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.decode(reader, reader.uint32()); - break; - } - case 24: { - if (!(message.serviceAccounts && message.serviceAccounts.length)) - message.serviceAccounts = []; - message.serviceAccounts.push($root.google.cloud.backupdr.v1.ServiceAccount.decode(reader, reader.uint32())); - break; - } - case 26: { - message.tags = $root.google.cloud.backupdr.v1.Tags.decode(reader, reader.uint32()); + if (!(message.items && message.items.length)) + message.items = []; + message.items.push($root.google.cloud.backupdr.v1.Entry.decode(reader, reader.uint32())); break; } default: @@ -25868,1172 +26095,994 @@ }; /** - * Decodes a ComputeInstanceRestoreProperties message from the specified reader or buffer, length delimited. + * Decodes a Metadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @memberof google.cloud.backupdr.v1.Metadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties + * @returns {google.cloud.backupdr.v1.Metadata} Metadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComputeInstanceRestoreProperties.decodeDelimited = function decodeDelimited(reader) { + Metadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ComputeInstanceRestoreProperties message. + * Verifies a Metadata message. * @function verify - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * @memberof google.cloud.backupdr.v1.Metadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ComputeInstanceRestoreProperties.verify = function verify(message) { + Metadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { - properties._advancedMachineFeatures = 1; - { - var error = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.verify(message.advancedMachineFeatures); + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) { + var error = $root.google.cloud.backupdr.v1.Entry.verify(message.items[i]); if (error) - return "advancedMachineFeatures." + error; + return "items." + error; } } - if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { - properties._canIpForward = 1; - if (typeof message.canIpForward !== "boolean") - return "canIpForward: boolean expected"; - } - if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) { - properties._confidentialInstanceConfig = 1; - { - var error = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify(message.confidentialInstanceConfig); - if (error) - return "confidentialInstanceConfig." + error; + return null; + }; + + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Metadata} Metadata + */ + Metadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Metadata) + return object; + var message = new $root.google.cloud.backupdr.v1.Metadata(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".google.cloud.backupdr.v1.Metadata.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) { + if (typeof object.items[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Metadata.items: object expected"); + message.items[i] = $root.google.cloud.backupdr.v1.Entry.fromObject(object.items[i]); } } - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) { - properties._deletionProtection = 1; - if (typeof message.deletionProtection !== "boolean") - return "deletionProtection: boolean expected"; - } - if (message.description != null && message.hasOwnProperty("description")) { - properties._description = 1; - if (!$util.isString(message.description)) - return "description: string expected"; + return message; + }; + + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {google.cloud.backupdr.v1.Metadata} message Metadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = $root.google.cloud.backupdr.v1.Entry.toObject(message.items[j], options); } - if (message.disks != null && message.hasOwnProperty("disks")) { - if (!Array.isArray(message.disks)) - return "disks: array expected"; - for (var i = 0; i < message.disks.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AttachedDisk.verify(message.disks[i]); - if (error) - return "disks." + error; - } + return object; + }; + + /** + * Converts this Metadata to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Metadata + * @instance + * @returns {Object.} JSON object + */ + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metadata + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Metadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (message.displayDevice != null && message.hasOwnProperty("displayDevice")) { - properties._displayDevice = 1; - { - var error = $root.google.cloud.backupdr.v1.DisplayDevice.verify(message.displayDevice); - if (error) - return "displayDevice." + error; - } - } - if (message.guestAccelerators != null && message.hasOwnProperty("guestAccelerators")) { - if (!Array.isArray(message.guestAccelerators)) - return "guestAccelerators: array expected"; - for (var i = 0; i < message.guestAccelerators.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AcceleratorConfig.verify(message.guestAccelerators[i]); - if (error) - return "guestAccelerators." + error; - } - } - if (message.hostname != null && message.hasOwnProperty("hostname")) { - properties._hostname = 1; - if (!$util.isString(message.hostname)) - return "hostname: string expected"; - } - if (message.instanceEncryptionKey != null && message.hasOwnProperty("instanceEncryptionKey")) { - properties._instanceEncryptionKey = 1; - { - var error = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.verify(message.instanceEncryptionKey); - if (error) - return "instanceEncryptionKey." + error; - } - } - if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { - properties._keyRevocationActionType = 1; - switch (message.keyRevocationActionType) { - default: - return "keyRevocationActionType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - 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.machineType != null && message.hasOwnProperty("machineType")) { - properties._machineType = 1; - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - properties._metadata = 1; - { - var error = $root.google.cloud.backupdr.v1.Metadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - } - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { - properties._minCpuPlatform = 1; - if (!$util.isString(message.minCpuPlatform)) - return "minCpuPlatform: string expected"; - } - if (message.networkInterfaces != null && message.hasOwnProperty("networkInterfaces")) { - if (!Array.isArray(message.networkInterfaces)) - return "networkInterfaces: array expected"; - for (var i = 0; i < message.networkInterfaces.length; ++i) { - var error = $root.google.cloud.backupdr.v1.NetworkInterface.verify(message.networkInterfaces[i]); - if (error) - return "networkInterfaces." + error; - } - } - if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { - properties._networkPerformanceConfig = 1; - { - var error = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.verify(message.networkPerformanceConfig); - if (error) - return "networkPerformanceConfig." + error; - } - } - if (message.params != null && message.hasOwnProperty("params")) { - properties._params = 1; - { - var error = $root.google.cloud.backupdr.v1.InstanceParams.verify(message.params); - if (error) - return "params." + error; - } - } - if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) { - properties._privateIpv6GoogleAccess = 1; - switch (message.privateIpv6GoogleAccess) { - default: - return "privateIpv6GoogleAccess: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.allocationAffinity != null && message.hasOwnProperty("allocationAffinity")) { - properties._allocationAffinity = 1; - { - var error = $root.google.cloud.backupdr.v1.AllocationAffinity.verify(message.allocationAffinity); - if (error) - return "allocationAffinity." + error; - } - } - if (message.resourcePolicies != null && message.hasOwnProperty("resourcePolicies")) { - if (!Array.isArray(message.resourcePolicies)) - return "resourcePolicies: array expected"; - for (var i = 0; i < message.resourcePolicies.length; ++i) - if (!$util.isString(message.resourcePolicies[i])) - return "resourcePolicies: string[] expected"; - } - if (message.scheduling != null && message.hasOwnProperty("scheduling")) { - properties._scheduling = 1; - { - var error = $root.google.cloud.backupdr.v1.Scheduling.verify(message.scheduling); - if (error) - return "scheduling." + error; - } - } - if (message.serviceAccounts != null && message.hasOwnProperty("serviceAccounts")) { - if (!Array.isArray(message.serviceAccounts)) - return "serviceAccounts: array expected"; - for (var i = 0; i < message.serviceAccounts.length; ++i) { - var error = $root.google.cloud.backupdr.v1.ServiceAccount.verify(message.serviceAccounts[i]); - if (error) - return "serviceAccounts." + error; - } - } - if (message.tags != null && message.hasOwnProperty("tags")) { - properties._tags = 1; - { - var error = $root.google.cloud.backupdr.v1.Tags.verify(message.tags); - if (error) - return "tags." + error; - } - } - return null; + return typeUrlPrefix + "/google.cloud.backupdr.v1.Metadata"; }; + return Metadata; + })(); + + v1.NetworkInterface = (function() { + /** - * Creates a ComputeInstanceRestoreProperties message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} ComputeInstanceRestoreProperties + * Properties of a NetworkInterface. + * @memberof google.cloud.backupdr.v1 + * @interface INetworkInterface + * @property {string|null} [network] NetworkInterface network + * @property {string|null} [subnetwork] NetworkInterface subnetwork + * @property {string|null} [ipAddress] NetworkInterface ipAddress + * @property {string|null} [ipv6Address] NetworkInterface ipv6Address + * @property {number|null} [internalIpv6PrefixLength] NetworkInterface internalIpv6PrefixLength + * @property {string|null} [name] NetworkInterface name + * @property {Array.|null} [accessConfigs] NetworkInterface accessConfigs + * @property {Array.|null} [ipv6AccessConfigs] NetworkInterface ipv6AccessConfigs + * @property {Array.|null} [aliasIpRanges] NetworkInterface aliasIpRanges + * @property {google.cloud.backupdr.v1.NetworkInterface.StackType|null} [stackType] NetworkInterface stackType + * @property {google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null} [ipv6AccessType] NetworkInterface ipv6AccessType + * @property {number|null} [queueCount] NetworkInterface queueCount + * @property {google.cloud.backupdr.v1.NetworkInterface.NicType|null} [nicType] NetworkInterface nicType + * @property {string|null} [networkAttachment] NetworkInterface networkAttachment */ - ComputeInstanceRestoreProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties) - return object; - var message = new $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties(); - if (object.name != null) - message.name = String(object.name); - if (object.advancedMachineFeatures != null) { - if (typeof object.advancedMachineFeatures !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.advancedMachineFeatures: object expected"); - message.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.fromObject(object.advancedMachineFeatures); - } - if (object.canIpForward != null) - message.canIpForward = Boolean(object.canIpForward); - if (object.confidentialInstanceConfig != null) { - if (typeof object.confidentialInstanceConfig !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.confidentialInstanceConfig: object expected"); - message.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.fromObject(object.confidentialInstanceConfig); - } - if (object.deletionProtection != null) - message.deletionProtection = Boolean(object.deletionProtection); - if (object.description != null) - message.description = String(object.description); - if (object.disks) { - if (!Array.isArray(object.disks)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: array expected"); - message.disks = []; - for (var i = 0; i < object.disks.length; ++i) { - if (typeof object.disks[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.disks: object expected"); - message.disks[i] = $root.google.cloud.backupdr.v1.AttachedDisk.fromObject(object.disks[i]); - } - } - if (object.displayDevice != null) { - if (typeof object.displayDevice !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.displayDevice: object expected"); - message.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.fromObject(object.displayDevice); - } - if (object.guestAccelerators) { - if (!Array.isArray(object.guestAccelerators)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.guestAccelerators: array expected"); - message.guestAccelerators = []; - for (var i = 0; i < object.guestAccelerators.length; ++i) { - if (typeof object.guestAccelerators[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.guestAccelerators: object expected"); - message.guestAccelerators[i] = $root.google.cloud.backupdr.v1.AcceleratorConfig.fromObject(object.guestAccelerators[i]); - } - } - if (object.hostname != null) - message.hostname = String(object.hostname); - if (object.instanceEncryptionKey != null) { - if (typeof object.instanceEncryptionKey !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.instanceEncryptionKey: object expected"); - message.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.fromObject(object.instanceEncryptionKey); - } - switch (object.keyRevocationActionType) { - default: - if (typeof object.keyRevocationActionType === "number") { - message.keyRevocationActionType = object.keyRevocationActionType; - break; - } - break; - case "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED": - case 0: - message.keyRevocationActionType = 0; - break; - case "NONE": - case 1: - message.keyRevocationActionType = 1; - break; - case "STOP": - case 2: - message.keyRevocationActionType = 2; - break; - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.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.machineType != null) - message.machineType = String(object.machineType); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.metadata: object expected"); - message.metadata = $root.google.cloud.backupdr.v1.Metadata.fromObject(object.metadata); - } - if (object.minCpuPlatform != null) - message.minCpuPlatform = String(object.minCpuPlatform); - if (object.networkInterfaces) { - if (!Array.isArray(object.networkInterfaces)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkInterfaces: array expected"); - message.networkInterfaces = []; - for (var i = 0; i < object.networkInterfaces.length; ++i) { - if (typeof object.networkInterfaces[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkInterfaces: object expected"); - message.networkInterfaces[i] = $root.google.cloud.backupdr.v1.NetworkInterface.fromObject(object.networkInterfaces[i]); - } - } - if (object.networkPerformanceConfig != null) { - if (typeof object.networkPerformanceConfig !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.networkPerformanceConfig: object expected"); - message.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.fromObject(object.networkPerformanceConfig); - } - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.params: object expected"); - message.params = $root.google.cloud.backupdr.v1.InstanceParams.fromObject(object.params); - } - switch (object.privateIpv6GoogleAccess) { - default: - if (typeof object.privateIpv6GoogleAccess === "number") { - message.privateIpv6GoogleAccess = object.privateIpv6GoogleAccess; - break; - } - break; - case "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED": - case 0: - message.privateIpv6GoogleAccess = 0; - break; - case "INHERIT_FROM_SUBNETWORK": - case 1: - message.privateIpv6GoogleAccess = 1; - break; - case "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE": - case 2: - message.privateIpv6GoogleAccess = 2; - break; - case "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE": - case 3: - message.privateIpv6GoogleAccess = 3; - break; - } - if (object.allocationAffinity != null) { - if (typeof object.allocationAffinity !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.allocationAffinity: object expected"); - message.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.fromObject(object.allocationAffinity); - } - if (object.resourcePolicies) { - if (!Array.isArray(object.resourcePolicies)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.resourcePolicies: array expected"); - message.resourcePolicies = []; - for (var i = 0; i < object.resourcePolicies.length; ++i) - message.resourcePolicies[i] = String(object.resourcePolicies[i]); - } - if (object.scheduling != null) { - if (typeof object.scheduling !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.scheduling: object expected"); - message.scheduling = $root.google.cloud.backupdr.v1.Scheduling.fromObject(object.scheduling); - } - if (object.serviceAccounts) { - if (!Array.isArray(object.serviceAccounts)) - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.serviceAccounts: array expected"); - message.serviceAccounts = []; - for (var i = 0; i < object.serviceAccounts.length; ++i) { - if (typeof object.serviceAccounts[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.serviceAccounts: object expected"); - message.serviceAccounts[i] = $root.google.cloud.backupdr.v1.ServiceAccount.fromObject(object.serviceAccounts[i]); - } - } - if (object.tags != null) { - if (typeof object.tags !== "object") - throw TypeError(".google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.tags: object expected"); - message.tags = $root.google.cloud.backupdr.v1.Tags.fromObject(object.tags); - } - return message; - }; /** - * Creates a plain object from a ComputeInstanceRestoreProperties message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {google.cloud.backupdr.v1.ComputeInstanceRestoreProperties} message ComputeInstanceRestoreProperties - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Constructs a new NetworkInterface. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a NetworkInterface. + * @implements INetworkInterface + * @constructor + * @param {google.cloud.backupdr.v1.INetworkInterface=} [properties] Properties to set */ - ComputeInstanceRestoreProperties.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.disks = []; - object.guestAccelerators = []; - object.networkInterfaces = []; - object.resourcePolicies = []; - object.serviceAccounts = []; - } - if (options.objects || options.defaults) - object.labels = {}; - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.advancedMachineFeatures != null && message.hasOwnProperty("advancedMachineFeatures")) { - object.advancedMachineFeatures = $root.google.cloud.backupdr.v1.AdvancedMachineFeatures.toObject(message.advancedMachineFeatures, options); - if (options.oneofs) - object._advancedMachineFeatures = "advancedMachineFeatures"; - } - if (message.canIpForward != null && message.hasOwnProperty("canIpForward")) { - object.canIpForward = message.canIpForward; - if (options.oneofs) - object._canIpForward = "canIpForward"; - } - if (message.confidentialInstanceConfig != null && message.hasOwnProperty("confidentialInstanceConfig")) { - object.confidentialInstanceConfig = $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig.toObject(message.confidentialInstanceConfig, options); - if (options.oneofs) - object._confidentialInstanceConfig = "confidentialInstanceConfig"; - } - if (message.deletionProtection != null && message.hasOwnProperty("deletionProtection")) { - object.deletionProtection = message.deletionProtection; - if (options.oneofs) - object._deletionProtection = "deletionProtection"; - } - if (message.description != null && message.hasOwnProperty("description")) { - object.description = message.description; - if (options.oneofs) - object._description = "description"; - } - if (message.disks && message.disks.length) { - object.disks = []; - for (var j = 0; j < message.disks.length; ++j) - object.disks[j] = $root.google.cloud.backupdr.v1.AttachedDisk.toObject(message.disks[j], options); - } - if (message.displayDevice != null && message.hasOwnProperty("displayDevice")) { - object.displayDevice = $root.google.cloud.backupdr.v1.DisplayDevice.toObject(message.displayDevice, options); - if (options.oneofs) - object._displayDevice = "displayDevice"; - } - if (message.guestAccelerators && message.guestAccelerators.length) { - object.guestAccelerators = []; - for (var j = 0; j < message.guestAccelerators.length; ++j) - object.guestAccelerators[j] = $root.google.cloud.backupdr.v1.AcceleratorConfig.toObject(message.guestAccelerators[j], options); - } - if (message.hostname != null && message.hasOwnProperty("hostname")) { - object.hostname = message.hostname; - if (options.oneofs) - object._hostname = "hostname"; - } - if (message.instanceEncryptionKey != null && message.hasOwnProperty("instanceEncryptionKey")) { - object.instanceEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.toObject(message.instanceEncryptionKey, options); - if (options.oneofs) - object._instanceEncryptionKey = "instanceEncryptionKey"; - } - if (message.keyRevocationActionType != null && message.hasOwnProperty("keyRevocationActionType")) { - object.keyRevocationActionType = options.enums === String ? $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] === undefined ? message.keyRevocationActionType : $root.google.cloud.backupdr.v1.KeyRevocationActionType[message.keyRevocationActionType] : message.keyRevocationActionType; - if (options.oneofs) - object._keyRevocationActionType = "keyRevocationActionType"; - } - 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.machineType != null && message.hasOwnProperty("machineType")) { - object.machineType = message.machineType; - if (options.oneofs) - object._machineType = "machineType"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - object.metadata = $root.google.cloud.backupdr.v1.Metadata.toObject(message.metadata, options); - if (options.oneofs) - object._metadata = "metadata"; - } - if (message.minCpuPlatform != null && message.hasOwnProperty("minCpuPlatform")) { - object.minCpuPlatform = message.minCpuPlatform; - if (options.oneofs) - object._minCpuPlatform = "minCpuPlatform"; - } - if (message.networkInterfaces && message.networkInterfaces.length) { - object.networkInterfaces = []; - for (var j = 0; j < message.networkInterfaces.length; ++j) - object.networkInterfaces[j] = $root.google.cloud.backupdr.v1.NetworkInterface.toObject(message.networkInterfaces[j], options); - } - if (message.networkPerformanceConfig != null && message.hasOwnProperty("networkPerformanceConfig")) { - object.networkPerformanceConfig = $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.toObject(message.networkPerformanceConfig, options); - if (options.oneofs) - object._networkPerformanceConfig = "networkPerformanceConfig"; - } - if (message.params != null && message.hasOwnProperty("params")) { - object.params = $root.google.cloud.backupdr.v1.InstanceParams.toObject(message.params, options); - if (options.oneofs) - object._params = "params"; - } - if (message.privateIpv6GoogleAccess != null && message.hasOwnProperty("privateIpv6GoogleAccess")) { - object.privateIpv6GoogleAccess = options.enums === String ? $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess[message.privateIpv6GoogleAccess] === undefined ? message.privateIpv6GoogleAccess : $root.google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess[message.privateIpv6GoogleAccess] : message.privateIpv6GoogleAccess; - if (options.oneofs) - object._privateIpv6GoogleAccess = "privateIpv6GoogleAccess"; - } - if (message.allocationAffinity != null && message.hasOwnProperty("allocationAffinity")) { - object.allocationAffinity = $root.google.cloud.backupdr.v1.AllocationAffinity.toObject(message.allocationAffinity, options); - if (options.oneofs) - object._allocationAffinity = "allocationAffinity"; - } - if (message.resourcePolicies && message.resourcePolicies.length) { - object.resourcePolicies = []; - for (var j = 0; j < message.resourcePolicies.length; ++j) - object.resourcePolicies[j] = message.resourcePolicies[j]; - } - if (message.scheduling != null && message.hasOwnProperty("scheduling")) { - object.scheduling = $root.google.cloud.backupdr.v1.Scheduling.toObject(message.scheduling, options); - if (options.oneofs) - object._scheduling = "scheduling"; - } - if (message.serviceAccounts && message.serviceAccounts.length) { - object.serviceAccounts = []; - for (var j = 0; j < message.serviceAccounts.length; ++j) - object.serviceAccounts[j] = $root.google.cloud.backupdr.v1.ServiceAccount.toObject(message.serviceAccounts[j], options); - } - if (message.tags != null && message.hasOwnProperty("tags")) { - object.tags = $root.google.cloud.backupdr.v1.Tags.toObject(message.tags, options); - if (options.oneofs) - object._tags = "tags"; - } - return object; - }; + function NetworkInterface(properties) { + this.accessConfigs = []; + this.ipv6AccessConfigs = []; + this.aliasIpRanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Converts this ComputeInstanceRestoreProperties to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties + * NetworkInterface network. + * @member {string|null|undefined} network + * @memberof google.cloud.backupdr.v1.NetworkInterface * @instance - * @returns {Object.} JSON object */ - ComputeInstanceRestoreProperties.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + NetworkInterface.prototype.network = null; /** - * Gets the default type url for ComputeInstanceRestoreProperties - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ComputeInstanceRestoreProperties - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * NetworkInterface subnetwork. + * @member {string|null|undefined} subnetwork + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance */ - ComputeInstanceRestoreProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceRestoreProperties"; - }; + NetworkInterface.prototype.subnetwork = null; /** - * InstancePrivateIpv6GoogleAccess enum. - * @name google.cloud.backupdr.v1.ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess - * @enum {number} - * @property {number} INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED=0 INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED value - * @property {number} INHERIT_FROM_SUBNETWORK=1 INHERIT_FROM_SUBNETWORK value - * @property {number} ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE=2 ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE value - * @property {number} ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE=3 ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE value + * NetworkInterface ipAddress. + * @member {string|null|undefined} ipAddress + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance */ - ComputeInstanceRestoreProperties.InstancePrivateIpv6GoogleAccess = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INSTANCE_PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED"] = 0; - values[valuesById[1] = "INHERIT_FROM_SUBNETWORK"] = 1; - values[valuesById[2] = "ENABLE_OUTBOUND_VM_ACCESS_TO_GOOGLE"] = 2; - values[valuesById[3] = "ENABLE_BIDIRECTIONAL_ACCESS_TO_GOOGLE"] = 3; - return values; - })(); - - return ComputeInstanceRestoreProperties; - })(); - - v1.ComputeInstanceTargetEnvironment = (function() { + NetworkInterface.prototype.ipAddress = null; /** - * Properties of a ComputeInstanceTargetEnvironment. - * @memberof google.cloud.backupdr.v1 - * @interface IComputeInstanceTargetEnvironment - * @property {string|null} [project] ComputeInstanceTargetEnvironment project - * @property {string|null} [zone] ComputeInstanceTargetEnvironment zone + * NetworkInterface ipv6Address. + * @member {string|null|undefined} ipv6Address + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance */ + NetworkInterface.prototype.ipv6Address = null; /** - * Constructs a new ComputeInstanceTargetEnvironment. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ComputeInstanceTargetEnvironment. - * @implements IComputeInstanceTargetEnvironment - * @constructor - * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment=} [properties] Properties to set + * NetworkInterface internalIpv6PrefixLength. + * @member {number|null|undefined} internalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance */ - function ComputeInstanceTargetEnvironment(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + NetworkInterface.prototype.internalIpv6PrefixLength = null; /** - * ComputeInstanceTargetEnvironment project. - * @member {string} project - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * NetworkInterface name. + * @member {string|null|undefined} name + * @memberof google.cloud.backupdr.v1.NetworkInterface * @instance */ - ComputeInstanceTargetEnvironment.prototype.project = ""; + NetworkInterface.prototype.name = null; /** - * ComputeInstanceTargetEnvironment zone. - * @member {string} zone - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * NetworkInterface accessConfigs. + * @member {Array.} accessConfigs + * @memberof google.cloud.backupdr.v1.NetworkInterface * @instance */ - ComputeInstanceTargetEnvironment.prototype.zone = ""; + NetworkInterface.prototype.accessConfigs = $util.emptyArray; /** - * Creates a new ComputeInstanceTargetEnvironment instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment instance + * NetworkInterface ipv6AccessConfigs. + * @member {Array.} ipv6AccessConfigs + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance */ - ComputeInstanceTargetEnvironment.create = function create(properties) { - return new ComputeInstanceTargetEnvironment(properties); - }; + NetworkInterface.prototype.ipv6AccessConfigs = $util.emptyArray; /** - * Encodes the specified ComputeInstanceTargetEnvironment message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * NetworkInterface aliasIpRanges. + * @member {Array.} aliasIpRanges + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance */ - ComputeInstanceTargetEnvironment.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - return writer; - }; + NetworkInterface.prototype.aliasIpRanges = $util.emptyArray; /** - * Encodes the specified ComputeInstanceTargetEnvironment message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * NetworkInterface stackType. + * @member {google.cloud.backupdr.v1.NetworkInterface.StackType|null|undefined} stackType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance */ - ComputeInstanceTargetEnvironment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + NetworkInterface.prototype.stackType = null; /** - * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * NetworkInterface ipv6AccessType. + * @member {google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null|undefined} ipv6AccessType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance */ - ComputeInstanceTargetEnvironment.decode = function 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.backupdr.v1.ComputeInstanceTargetEnvironment(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.project = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + NetworkInterface.prototype.ipv6AccessType = null; /** - * Decodes a ComputeInstanceTargetEnvironment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * NetworkInterface queueCount. + * @member {number|null|undefined} queueCount + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance */ - ComputeInstanceTargetEnvironment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + NetworkInterface.prototype.queueCount = null; /** - * Verifies a ComputeInstanceTargetEnvironment message. - * @function verify - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * NetworkInterface nicType. + * @member {google.cloud.backupdr.v1.NetworkInterface.NicType|null|undefined} nicType + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance */ - ComputeInstanceTargetEnvironment.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.project != null && message.hasOwnProperty("project")) - if (!$util.isString(message.project)) - return "project: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - return null; - }; + NetworkInterface.prototype.nicType = null; /** - * Creates a ComputeInstanceTargetEnvironment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} ComputeInstanceTargetEnvironment + * NetworkInterface networkAttachment. + * @member {string|null|undefined} networkAttachment + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance */ - ComputeInstanceTargetEnvironment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment) - return object; - var message = new $root.google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment(); - if (object.project != null) - message.project = String(object.project); - if (object.zone != null) - message.zone = String(object.zone); - return message; - }; + NetworkInterface.prototype.networkAttachment = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a plain object from a ComputeInstanceTargetEnvironment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment} message ComputeInstanceTargetEnvironment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * NetworkInterface _network. + * @member {"network"|undefined} _network + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance */ - ComputeInstanceTargetEnvironment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.project = ""; - object.zone = ""; - } - if (message.project != null && message.hasOwnProperty("project")) - object.project = message.project; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - return object; - }; + Object.defineProperty(NetworkInterface.prototype, "_network", { + get: $util.oneOfGetter($oneOfFields = ["network"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Converts this ComputeInstanceTargetEnvironment to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment + * NetworkInterface _subnetwork. + * @member {"subnetwork"|undefined} _subnetwork + * @memberof google.cloud.backupdr.v1.NetworkInterface * @instance - * @returns {Object.} JSON object */ - ComputeInstanceTargetEnvironment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(NetworkInterface.prototype, "_subnetwork", { + get: $util.oneOfGetter($oneOfFields = ["subnetwork"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Gets the default type url for ComputeInstanceTargetEnvironment - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * NetworkInterface _ipAddress. + * @member {"ipAddress"|undefined} _ipAddress + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance */ - ComputeInstanceTargetEnvironment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceTargetEnvironment"; - }; - - return ComputeInstanceTargetEnvironment; - })(); + Object.defineProperty(NetworkInterface.prototype, "_ipAddress", { + get: $util.oneOfGetter($oneOfFields = ["ipAddress"]), + set: $util.oneOfSetter($oneOfFields) + }); - v1.ComputeInstanceDataSourceProperties = (function() { + /** + * NetworkInterface _ipv6Address. + * @member {"ipv6Address"|undefined} _ipv6Address + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance + */ + Object.defineProperty(NetworkInterface.prototype, "_ipv6Address", { + get: $util.oneOfGetter($oneOfFields = ["ipv6Address"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Properties of a ComputeInstanceDataSourceProperties. - * @memberof google.cloud.backupdr.v1 - * @interface IComputeInstanceDataSourceProperties - * @property {string|null} [name] ComputeInstanceDataSourceProperties name - * @property {string|null} [description] ComputeInstanceDataSourceProperties description - * @property {string|null} [machineType] ComputeInstanceDataSourceProperties machineType - * @property {number|Long|null} [totalDiskCount] ComputeInstanceDataSourceProperties totalDiskCount - * @property {number|Long|null} [totalDiskSizeGb] ComputeInstanceDataSourceProperties totalDiskSizeGb + * NetworkInterface _internalIpv6PrefixLength. + * @member {"internalIpv6PrefixLength"|undefined} _internalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance */ + Object.defineProperty(NetworkInterface.prototype, "_internalIpv6PrefixLength", { + get: $util.oneOfGetter($oneOfFields = ["internalIpv6PrefixLength"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Constructs a new ComputeInstanceDataSourceProperties. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ComputeInstanceDataSourceProperties. - * @implements IComputeInstanceDataSourceProperties - * @constructor - * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties=} [properties] Properties to set + * NetworkInterface _name. + * @member {"name"|undefined} _name + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @instance */ - function ComputeInstanceDataSourceProperties(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Object.defineProperty(NetworkInterface.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * ComputeInstanceDataSourceProperties name. - * @member {string} name - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * NetworkInterface _stackType. + * @member {"stackType"|undefined} _stackType + * @memberof google.cloud.backupdr.v1.NetworkInterface * @instance */ - ComputeInstanceDataSourceProperties.prototype.name = ""; + Object.defineProperty(NetworkInterface.prototype, "_stackType", { + get: $util.oneOfGetter($oneOfFields = ["stackType"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * ComputeInstanceDataSourceProperties description. - * @member {string} description - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * NetworkInterface _ipv6AccessType. + * @member {"ipv6AccessType"|undefined} _ipv6AccessType + * @memberof google.cloud.backupdr.v1.NetworkInterface * @instance */ - ComputeInstanceDataSourceProperties.prototype.description = ""; + Object.defineProperty(NetworkInterface.prototype, "_ipv6AccessType", { + get: $util.oneOfGetter($oneOfFields = ["ipv6AccessType"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * ComputeInstanceDataSourceProperties machineType. - * @member {string} machineType - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * NetworkInterface _queueCount. + * @member {"queueCount"|undefined} _queueCount + * @memberof google.cloud.backupdr.v1.NetworkInterface * @instance */ - ComputeInstanceDataSourceProperties.prototype.machineType = ""; + Object.defineProperty(NetworkInterface.prototype, "_queueCount", { + get: $util.oneOfGetter($oneOfFields = ["queueCount"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * ComputeInstanceDataSourceProperties totalDiskCount. - * @member {number|Long} totalDiskCount - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * NetworkInterface _nicType. + * @member {"nicType"|undefined} _nicType + * @memberof google.cloud.backupdr.v1.NetworkInterface * @instance */ - ComputeInstanceDataSourceProperties.prototype.totalDiskCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Object.defineProperty(NetworkInterface.prototype, "_nicType", { + get: $util.oneOfGetter($oneOfFields = ["nicType"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * ComputeInstanceDataSourceProperties totalDiskSizeGb. - * @member {number|Long} totalDiskSizeGb - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * NetworkInterface _networkAttachment. + * @member {"networkAttachment"|undefined} _networkAttachment + * @memberof google.cloud.backupdr.v1.NetworkInterface * @instance */ - ComputeInstanceDataSourceProperties.prototype.totalDiskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Object.defineProperty(NetworkInterface.prototype, "_networkAttachment", { + get: $util.oneOfGetter($oneOfFields = ["networkAttachment"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ComputeInstanceDataSourceProperties instance using the specified properties. + * Creates a new NetworkInterface instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.NetworkInterface * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties instance + * @param {google.cloud.backupdr.v1.INetworkInterface=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface instance */ - ComputeInstanceDataSourceProperties.create = function create(properties) { - return new ComputeInstanceDataSourceProperties(properties); + NetworkInterface.create = function create(properties) { + return new NetworkInterface(properties); }; /** - * Encodes the specified ComputeInstanceDataSourceProperties message. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.NetworkInterface * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.INetworkInterface} message NetworkInterface message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComputeInstanceDataSourceProperties.encode = function encode(message, writer) { + NetworkInterface.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetwork); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); + if (message.ipv6Address != null && Object.hasOwnProperty.call(message, "ipv6Address")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipv6Address); + if (message.internalIpv6PrefixLength != null && Object.hasOwnProperty.call(message, "internalIpv6PrefixLength")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.internalIpv6PrefixLength); if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.machineType); - if (message.totalDiskCount != null && Object.hasOwnProperty.call(message, "totalDiskCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.totalDiskCount); - if (message.totalDiskSizeGb != null && Object.hasOwnProperty.call(message, "totalDiskSizeGb")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.totalDiskSizeGb); + writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); + if (message.accessConfigs != null && message.accessConfigs.length) + for (var i = 0; i < message.accessConfigs.length; ++i) + $root.google.cloud.backupdr.v1.AccessConfig.encode(message.accessConfigs[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.ipv6AccessConfigs != null && message.ipv6AccessConfigs.length) + for (var i = 0; i < message.ipv6AccessConfigs.length; ++i) + $root.google.cloud.backupdr.v1.AccessConfig.encode(message.ipv6AccessConfigs[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.aliasIpRanges != null && message.aliasIpRanges.length) + for (var i = 0; i < message.aliasIpRanges.length; ++i) + $root.google.cloud.backupdr.v1.AliasIpRange.encode(message.aliasIpRanges[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.stackType != null && Object.hasOwnProperty.call(message, "stackType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.stackType); + if (message.ipv6AccessType != null && Object.hasOwnProperty.call(message, "ipv6AccessType")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.ipv6AccessType); + if (message.queueCount != null && Object.hasOwnProperty.call(message, "queueCount")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.queueCount); + if (message.nicType != null && Object.hasOwnProperty.call(message, "nicType")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.nicType); + if (message.networkAttachment != null && Object.hasOwnProperty.call(message, "networkAttachment")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.networkAttachment); return writer; }; /** - * Encodes the specified ComputeInstanceDataSourceProperties message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties.verify|verify} messages. + * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.NetworkInterface * @static - * @param {google.cloud.backupdr.v1.IComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties message or plain object to encode + * @param {google.cloud.backupdr.v1.INetworkInterface} message NetworkInterface message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ComputeInstanceDataSourceProperties.encodeDelimited = function encodeDelimited(message, writer) { + NetworkInterface.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer. + * Decodes a NetworkInterface message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.NetworkInterface * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ComputeInstanceDataSourceProperties.decode = function decode(reader, length) { + NetworkInterface.decode = function 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.backupdr.v1.ComputeInstanceDataSourceProperties(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.NetworkInterface(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.network = reader.string(); break; } case 2: { - message.description = reader.string(); + message.subnetwork = reader.string(); break; } case 3: { - message.machineType = reader.string(); + message.ipAddress = reader.string(); break; } case 4: { - message.totalDiskCount = reader.int64(); + message.ipv6Address = reader.string(); break; } case 5: { - message.totalDiskSizeGb = reader.int64(); + message.internalIpv6PrefixLength = reader.int32(); break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComputeInstanceDataSourceProperties message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComputeInstanceDataSourceProperties.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + case 6: { + message.name = reader.string(); + break; + } + case 7: { + if (!(message.accessConfigs && message.accessConfigs.length)) + message.accessConfigs = []; + message.accessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.ipv6AccessConfigs && message.ipv6AccessConfigs.length)) + message.ipv6AccessConfigs = []; + message.ipv6AccessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader, reader.uint32())); + break; + } + case 9: { + if (!(message.aliasIpRanges && message.aliasIpRanges.length)) + message.aliasIpRanges = []; + message.aliasIpRanges.push($root.google.cloud.backupdr.v1.AliasIpRange.decode(reader, reader.uint32())); + break; + } + case 10: { + message.stackType = reader.int32(); + break; + } + case 11: { + message.ipv6AccessType = reader.int32(); + break; + } + case 12: { + message.queueCount = reader.int32(); + break; + } + case 13: { + message.nicType = reader.int32(); + break; + } + case 14: { + message.networkAttachment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Verifies a ComputeInstanceDataSourceProperties message. + * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.NetworkInterface + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkInterface.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkInterface message. * @function verify - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.NetworkInterface * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ComputeInstanceDataSourceProperties.verify = function verify(message) { + NetworkInterface.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) + var properties = {}; + if (message.network != null && message.hasOwnProperty("network")) { + properties._network = 1; + if (!$util.isString(message.network)) + return "network: string expected"; + } + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { + properties._subnetwork = 1; + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + } + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) { + properties._ipAddress = 1; + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + } + if (message.ipv6Address != null && message.hasOwnProperty("ipv6Address")) { + properties._ipv6Address = 1; + if (!$util.isString(message.ipv6Address)) + return "ipv6Address: string expected"; + } + if (message.internalIpv6PrefixLength != null && message.hasOwnProperty("internalIpv6PrefixLength")) { + properties._internalIpv6PrefixLength = 1; + if (!$util.isInteger(message.internalIpv6PrefixLength)) + return "internalIpv6PrefixLength: integer expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; if (!$util.isString(message.name)) return "name: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.machineType != null && message.hasOwnProperty("machineType")) - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - if (message.totalDiskCount != null && message.hasOwnProperty("totalDiskCount")) - if (!$util.isInteger(message.totalDiskCount) && !(message.totalDiskCount && $util.isInteger(message.totalDiskCount.low) && $util.isInteger(message.totalDiskCount.high))) - return "totalDiskCount: integer|Long expected"; - if (message.totalDiskSizeGb != null && message.hasOwnProperty("totalDiskSizeGb")) - if (!$util.isInteger(message.totalDiskSizeGb) && !(message.totalDiskSizeGb && $util.isInteger(message.totalDiskSizeGb.low) && $util.isInteger(message.totalDiskSizeGb.high))) - return "totalDiskSizeGb: integer|Long expected"; + } + if (message.accessConfigs != null && message.hasOwnProperty("accessConfigs")) { + if (!Array.isArray(message.accessConfigs)) + return "accessConfigs: array expected"; + for (var i = 0; i < message.accessConfigs.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AccessConfig.verify(message.accessConfigs[i]); + if (error) + return "accessConfigs." + error; + } + } + if (message.ipv6AccessConfigs != null && message.hasOwnProperty("ipv6AccessConfigs")) { + if (!Array.isArray(message.ipv6AccessConfigs)) + return "ipv6AccessConfigs: array expected"; + for (var i = 0; i < message.ipv6AccessConfigs.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AccessConfig.verify(message.ipv6AccessConfigs[i]); + if (error) + return "ipv6AccessConfigs." + error; + } + } + if (message.aliasIpRanges != null && message.hasOwnProperty("aliasIpRanges")) { + if (!Array.isArray(message.aliasIpRanges)) + return "aliasIpRanges: array expected"; + for (var i = 0; i < message.aliasIpRanges.length; ++i) { + var error = $root.google.cloud.backupdr.v1.AliasIpRange.verify(message.aliasIpRanges[i]); + if (error) + return "aliasIpRanges." + error; + } + } + if (message.stackType != null && message.hasOwnProperty("stackType")) { + properties._stackType = 1; + switch (message.stackType) { + default: + return "stackType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { + properties._ipv6AccessType = 1; + switch (message.ipv6AccessType) { + default: + return "ipv6AccessType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.queueCount != null && message.hasOwnProperty("queueCount")) { + properties._queueCount = 1; + if (!$util.isInteger(message.queueCount)) + return "queueCount: integer expected"; + } + if (message.nicType != null && message.hasOwnProperty("nicType")) { + properties._nicType = 1; + switch (message.nicType) { + default: + return "nicType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) { + properties._networkAttachment = 1; + if (!$util.isString(message.networkAttachment)) + return "networkAttachment: string expected"; + } return null; }; /** - * Creates a ComputeInstanceDataSourceProperties message from a plain object. Also converts values to their respective internal types. + * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.NetworkInterface * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} ComputeInstanceDataSourceProperties + * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface */ - ComputeInstanceDataSourceProperties.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties) + NetworkInterface.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.NetworkInterface) return object; - var message = new $root.google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties(); + var message = new $root.google.cloud.backupdr.v1.NetworkInterface(); + if (object.network != null) + message.network = String(object.network); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.ipv6Address != null) + message.ipv6Address = String(object.ipv6Address); + if (object.internalIpv6PrefixLength != null) + message.internalIpv6PrefixLength = object.internalIpv6PrefixLength | 0; if (object.name != null) message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.machineType != null) - message.machineType = String(object.machineType); - if (object.totalDiskCount != null) - if ($util.Long) - (message.totalDiskCount = $util.Long.fromValue(object.totalDiskCount)).unsigned = false; - else if (typeof object.totalDiskCount === "string") - message.totalDiskCount = parseInt(object.totalDiskCount, 10); - else if (typeof object.totalDiskCount === "number") - message.totalDiskCount = object.totalDiskCount; - else if (typeof object.totalDiskCount === "object") - message.totalDiskCount = new $util.LongBits(object.totalDiskCount.low >>> 0, object.totalDiskCount.high >>> 0).toNumber(); - if (object.totalDiskSizeGb != null) - if ($util.Long) - (message.totalDiskSizeGb = $util.Long.fromValue(object.totalDiskSizeGb)).unsigned = false; - else if (typeof object.totalDiskSizeGb === "string") - message.totalDiskSizeGb = parseInt(object.totalDiskSizeGb, 10); - else if (typeof object.totalDiskSizeGb === "number") - message.totalDiskSizeGb = object.totalDiskSizeGb; - else if (typeof object.totalDiskSizeGb === "object") - message.totalDiskSizeGb = new $util.LongBits(object.totalDiskSizeGb.low >>> 0, object.totalDiskSizeGb.high >>> 0).toNumber(); + if (object.accessConfigs) { + if (!Array.isArray(object.accessConfigs)) + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: array expected"); + message.accessConfigs = []; + for (var i = 0; i < object.accessConfigs.length; ++i) { + if (typeof object.accessConfigs[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: object expected"); + message.accessConfigs[i] = $root.google.cloud.backupdr.v1.AccessConfig.fromObject(object.accessConfigs[i]); + } + } + if (object.ipv6AccessConfigs) { + if (!Array.isArray(object.ipv6AccessConfigs)) + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.ipv6AccessConfigs: array expected"); + message.ipv6AccessConfigs = []; + for (var i = 0; i < object.ipv6AccessConfigs.length; ++i) { + if (typeof object.ipv6AccessConfigs[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.ipv6AccessConfigs: object expected"); + message.ipv6AccessConfigs[i] = $root.google.cloud.backupdr.v1.AccessConfig.fromObject(object.ipv6AccessConfigs[i]); + } + } + if (object.aliasIpRanges) { + if (!Array.isArray(object.aliasIpRanges)) + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.aliasIpRanges: array expected"); + message.aliasIpRanges = []; + for (var i = 0; i < object.aliasIpRanges.length; ++i) { + if (typeof object.aliasIpRanges[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.aliasIpRanges: object expected"); + message.aliasIpRanges[i] = $root.google.cloud.backupdr.v1.AliasIpRange.fromObject(object.aliasIpRanges[i]); + } + } + switch (object.stackType) { + default: + if (typeof object.stackType === "number") { + message.stackType = object.stackType; + break; + } + break; + case "STACK_TYPE_UNSPECIFIED": + case 0: + message.stackType = 0; + break; + case "IPV4_ONLY": + case 1: + message.stackType = 1; + break; + case "IPV4_IPV6": + case 2: + message.stackType = 2; + break; + } + switch (object.ipv6AccessType) { + default: + if (typeof object.ipv6AccessType === "number") { + message.ipv6AccessType = object.ipv6AccessType; + break; + } + break; + case "UNSPECIFIED_IPV6_ACCESS_TYPE": + case 0: + message.ipv6AccessType = 0; + break; + case "INTERNAL": + case 1: + message.ipv6AccessType = 1; + break; + case "EXTERNAL": + case 2: + message.ipv6AccessType = 2; + break; + } + if (object.queueCount != null) + message.queueCount = object.queueCount | 0; + switch (object.nicType) { + default: + if (typeof object.nicType === "number") { + message.nicType = object.nicType; + break; + } + break; + case "NIC_TYPE_UNSPECIFIED": + case 0: + message.nicType = 0; + break; + case "VIRTIO_NET": + case 1: + message.nicType = 1; + break; + case "GVNIC": + case 2: + message.nicType = 2; + break; + } + if (object.networkAttachment != null) + message.networkAttachment = String(object.networkAttachment); return message; }; /** - * Creates a plain object from a ComputeInstanceDataSourceProperties message. Also converts values to other types if specified. + * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.NetworkInterface * @static - * @param {google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties} message ComputeInstanceDataSourceProperties + * @param {google.cloud.backupdr.v1.NetworkInterface} message NetworkInterface * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ComputeInstanceDataSourceProperties.toObject = function toObject(message, options) { + NetworkInterface.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.machineType = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalDiskCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalDiskCount = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalDiskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalDiskSizeGb = options.longs === String ? "0" : 0; + if (options.arrays || options.defaults) { + object.accessConfigs = []; + object.ipv6AccessConfigs = []; + object.aliasIpRanges = []; } - if (message.name != null && message.hasOwnProperty("name")) + if (message.network != null && message.hasOwnProperty("network")) { + object.network = message.network; + if (options.oneofs) + object._network = "network"; + } + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { + object.subnetwork = message.subnetwork; + if (options.oneofs) + object._subnetwork = "subnetwork"; + } + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) { + object.ipAddress = message.ipAddress; + if (options.oneofs) + object._ipAddress = "ipAddress"; + } + if (message.ipv6Address != null && message.hasOwnProperty("ipv6Address")) { + object.ipv6Address = message.ipv6Address; + if (options.oneofs) + object._ipv6Address = "ipv6Address"; + } + if (message.internalIpv6PrefixLength != null && message.hasOwnProperty("internalIpv6PrefixLength")) { + object.internalIpv6PrefixLength = message.internalIpv6PrefixLength; + if (options.oneofs) + object._internalIpv6PrefixLength = "internalIpv6PrefixLength"; + } + if (message.name != null && message.hasOwnProperty("name")) { object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.machineType != null && message.hasOwnProperty("machineType")) - object.machineType = message.machineType; - if (message.totalDiskCount != null && message.hasOwnProperty("totalDiskCount")) - if (typeof message.totalDiskCount === "number") - object.totalDiskCount = options.longs === String ? String(message.totalDiskCount) : message.totalDiskCount; - else - object.totalDiskCount = options.longs === String ? $util.Long.prototype.toString.call(message.totalDiskCount) : options.longs === Number ? new $util.LongBits(message.totalDiskCount.low >>> 0, message.totalDiskCount.high >>> 0).toNumber() : message.totalDiskCount; - if (message.totalDiskSizeGb != null && message.hasOwnProperty("totalDiskSizeGb")) - if (typeof message.totalDiskSizeGb === "number") - object.totalDiskSizeGb = options.longs === String ? String(message.totalDiskSizeGb) : message.totalDiskSizeGb; - else - object.totalDiskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.totalDiskSizeGb) : options.longs === Number ? new $util.LongBits(message.totalDiskSizeGb.low >>> 0, message.totalDiskSizeGb.high >>> 0).toNumber() : message.totalDiskSizeGb; + if (options.oneofs) + object._name = "name"; + } + if (message.accessConfigs && message.accessConfigs.length) { + object.accessConfigs = []; + for (var j = 0; j < message.accessConfigs.length; ++j) + object.accessConfigs[j] = $root.google.cloud.backupdr.v1.AccessConfig.toObject(message.accessConfigs[j], options); + } + if (message.ipv6AccessConfigs && message.ipv6AccessConfigs.length) { + object.ipv6AccessConfigs = []; + for (var j = 0; j < message.ipv6AccessConfigs.length; ++j) + object.ipv6AccessConfigs[j] = $root.google.cloud.backupdr.v1.AccessConfig.toObject(message.ipv6AccessConfigs[j], options); + } + if (message.aliasIpRanges && message.aliasIpRanges.length) { + object.aliasIpRanges = []; + for (var j = 0; j < message.aliasIpRanges.length; ++j) + object.aliasIpRanges[j] = $root.google.cloud.backupdr.v1.AliasIpRange.toObject(message.aliasIpRanges[j], options); + } + if (message.stackType != null && message.hasOwnProperty("stackType")) { + object.stackType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.StackType[message.stackType] === undefined ? message.stackType : $root.google.cloud.backupdr.v1.NetworkInterface.StackType[message.stackType] : message.stackType; + if (options.oneofs) + object._stackType = "stackType"; + } + if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { + object.ipv6AccessType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType[message.ipv6AccessType] === undefined ? message.ipv6AccessType : $root.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType[message.ipv6AccessType] : message.ipv6AccessType; + if (options.oneofs) + object._ipv6AccessType = "ipv6AccessType"; + } + if (message.queueCount != null && message.hasOwnProperty("queueCount")) { + object.queueCount = message.queueCount; + if (options.oneofs) + object._queueCount = "queueCount"; + } + if (message.nicType != null && message.hasOwnProperty("nicType")) { + object.nicType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.NicType[message.nicType] === undefined ? message.nicType : $root.google.cloud.backupdr.v1.NetworkInterface.NicType[message.nicType] : message.nicType; + if (options.oneofs) + object._nicType = "nicType"; + } + if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) { + object.networkAttachment = message.networkAttachment; + if (options.oneofs) + object._networkAttachment = "networkAttachment"; + } return object; }; /** - * Converts this ComputeInstanceDataSourceProperties to JSON. + * Converts this NetworkInterface to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.NetworkInterface * @instance * @returns {Object.} JSON object */ - ComputeInstanceDataSourceProperties.prototype.toJSON = function toJSON() { + NetworkInterface.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ComputeInstanceDataSourceProperties + * Gets the default type url for NetworkInterface * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties + * @memberof google.cloud.backupdr.v1.NetworkInterface * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ComputeInstanceDataSourceProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NetworkInterface.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ComputeInstanceDataSourceProperties"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkInterface"; }; - return ComputeInstanceDataSourceProperties; + /** + * StackType enum. + * @name google.cloud.backupdr.v1.NetworkInterface.StackType + * @enum {number} + * @property {number} STACK_TYPE_UNSPECIFIED=0 STACK_TYPE_UNSPECIFIED value + * @property {number} IPV4_ONLY=1 IPV4_ONLY value + * @property {number} IPV4_IPV6=2 IPV4_IPV6 value + */ + NetworkInterface.StackType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STACK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IPV4_ONLY"] = 1; + values[valuesById[2] = "IPV4_IPV6"] = 2; + return values; + })(); + + /** + * Ipv6AccessType enum. + * @name google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType + * @enum {number} + * @property {number} UNSPECIFIED_IPV6_ACCESS_TYPE=0 UNSPECIFIED_IPV6_ACCESS_TYPE value + * @property {number} INTERNAL=1 INTERNAL value + * @property {number} EXTERNAL=2 EXTERNAL value + */ + NetworkInterface.Ipv6AccessType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED_IPV6_ACCESS_TYPE"] = 0; + values[valuesById[1] = "INTERNAL"] = 1; + values[valuesById[2] = "EXTERNAL"] = 2; + return values; + })(); + + /** + * NicType enum. + * @name google.cloud.backupdr.v1.NetworkInterface.NicType + * @enum {number} + * @property {number} NIC_TYPE_UNSPECIFIED=0 NIC_TYPE_UNSPECIFIED value + * @property {number} VIRTIO_NET=1 VIRTIO_NET value + * @property {number} GVNIC=2 GVNIC value + */ + NetworkInterface.NicType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VIRTIO_NET"] = 1; + values[valuesById[2] = "GVNIC"] = 2; + return values; + })(); + + return NetworkInterface; })(); - v1.AdvancedMachineFeatures = (function() { + v1.NetworkPerformanceConfig = (function() { /** - * Properties of an AdvancedMachineFeatures. + * Properties of a NetworkPerformanceConfig. * @memberof google.cloud.backupdr.v1 - * @interface IAdvancedMachineFeatures - * @property {boolean|null} [enableNestedVirtualization] AdvancedMachineFeatures enableNestedVirtualization - * @property {number|null} [threadsPerCore] AdvancedMachineFeatures threadsPerCore - * @property {number|null} [visibleCoreCount] AdvancedMachineFeatures visibleCoreCount - * @property {boolean|null} [enableUefiNetworking] AdvancedMachineFeatures enableUefiNetworking + * @interface INetworkPerformanceConfig + * @property {google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null} [totalEgressBandwidthTier] NetworkPerformanceConfig totalEgressBandwidthTier */ /** - * Constructs a new AdvancedMachineFeatures. + * Constructs a new NetworkPerformanceConfig. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AdvancedMachineFeatures. - * @implements IAdvancedMachineFeatures + * @classdesc Represents a NetworkPerformanceConfig. + * @implements INetworkPerformanceConfig * @constructor - * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig=} [properties] Properties to set */ - function AdvancedMachineFeatures(properties) { + function NetworkPerformanceConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27041,164 +27090,89 @@ } /** - * AdvancedMachineFeatures enableNestedVirtualization. - * @member {boolean|null|undefined} enableNestedVirtualization - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.enableNestedVirtualization = null; - - /** - * AdvancedMachineFeatures threadsPerCore. - * @member {number|null|undefined} threadsPerCore - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.threadsPerCore = null; - - /** - * AdvancedMachineFeatures visibleCoreCount. - * @member {number|null|undefined} visibleCoreCount - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - AdvancedMachineFeatures.prototype.visibleCoreCount = null; - - /** - * AdvancedMachineFeatures enableUefiNetworking. - * @member {boolean|null|undefined} enableUefiNetworking - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * NetworkPerformanceConfig totalEgressBandwidthTier. + * @member {google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null|undefined} totalEgressBandwidthTier + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig * @instance */ - AdvancedMachineFeatures.prototype.enableUefiNetworking = null; + NetworkPerformanceConfig.prototype.totalEgressBandwidthTier = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * AdvancedMachineFeatures _enableNestedVirtualization. - * @member {"enableNestedVirtualization"|undefined} _enableNestedVirtualization - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableNestedVirtualization", { - get: $util.oneOfGetter($oneOfFields = ["enableNestedVirtualization"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AdvancedMachineFeatures _threadsPerCore. - * @member {"threadsPerCore"|undefined} _threadsPerCore - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_threadsPerCore", { - get: $util.oneOfGetter($oneOfFields = ["threadsPerCore"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AdvancedMachineFeatures _visibleCoreCount. - * @member {"visibleCoreCount"|undefined} _visibleCoreCount - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures - * @instance - */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_visibleCoreCount", { - get: $util.oneOfGetter($oneOfFields = ["visibleCoreCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AdvancedMachineFeatures _enableUefiNetworking. - * @member {"enableUefiNetworking"|undefined} _enableUefiNetworking - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * NetworkPerformanceConfig _totalEgressBandwidthTier. + * @member {"totalEgressBandwidthTier"|undefined} _totalEgressBandwidthTier + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig * @instance */ - Object.defineProperty(AdvancedMachineFeatures.prototype, "_enableUefiNetworking", { - get: $util.oneOfGetter($oneOfFields = ["enableUefiNetworking"]), + Object.defineProperty(NetworkPerformanceConfig.prototype, "_totalEgressBandwidthTier", { + get: $util.oneOfGetter($oneOfFields = ["totalEgressBandwidthTier"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new AdvancedMachineFeatures instance using the specified properties. + * Creates a new NetworkPerformanceConfig instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig * @static - * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures instance + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig instance */ - AdvancedMachineFeatures.create = function create(properties) { - return new AdvancedMachineFeatures(properties); + NetworkPerformanceConfig.create = function create(properties) { + return new NetworkPerformanceConfig(properties); }; /** - * Encodes the specified AdvancedMachineFeatures message. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig * @static - * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdvancedMachineFeatures.encode = function encode(message, writer) { + NetworkPerformanceConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.enableNestedVirtualization != null && Object.hasOwnProperty.call(message, "enableNestedVirtualization")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableNestedVirtualization); - if (message.threadsPerCore != null && Object.hasOwnProperty.call(message, "threadsPerCore")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.threadsPerCore); - if (message.visibleCoreCount != null && Object.hasOwnProperty.call(message, "visibleCoreCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.visibleCoreCount); - if (message.enableUefiNetworking != null && Object.hasOwnProperty.call(message, "enableUefiNetworking")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enableUefiNetworking); + if (message.totalEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "totalEgressBandwidthTier")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalEgressBandwidthTier); return writer; }; /** - * Encodes the specified AdvancedMachineFeatures message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AdvancedMachineFeatures.verify|verify} messages. + * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig * @static - * @param {google.cloud.backupdr.v1.IAdvancedMachineFeatures} message AdvancedMachineFeatures message or plain object to encode + * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AdvancedMachineFeatures.encodeDelimited = function encodeDelimited(message, writer) { + NetworkPerformanceConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer. + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdvancedMachineFeatures.decode = function decode(reader, length) { + NetworkPerformanceConfig.decode = function 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.backupdr.v1.AdvancedMachineFeatures(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.NetworkPerformanceConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.enableNestedVirtualization = reader.bool(); - break; - } - case 2: { - message.threadsPerCore = reader.int32(); - break; - } - case 3: { - message.visibleCoreCount = reader.int32(); - break; - } - case 4: { - message.enableUefiNetworking = reader.bool(); + message.totalEgressBandwidthTier = reader.int32(); break; } default: @@ -27210,162 +27184,173 @@ }; /** - * Decodes an AdvancedMachineFeatures message from the specified reader or buffer, length delimited. + * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AdvancedMachineFeatures.decodeDelimited = function decodeDelimited(reader) { + NetworkPerformanceConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AdvancedMachineFeatures message. + * Verifies a NetworkPerformanceConfig message. * @function verify - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AdvancedMachineFeatures.verify = function verify(message) { + NetworkPerformanceConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { - properties._enableNestedVirtualization = 1; - if (typeof message.enableNestedVirtualization !== "boolean") - return "enableNestedVirtualization: boolean expected"; - } - if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { - properties._threadsPerCore = 1; - if (!$util.isInteger(message.threadsPerCore)) - return "threadsPerCore: integer expected"; - } - if (message.visibleCoreCount != null && message.hasOwnProperty("visibleCoreCount")) { - properties._visibleCoreCount = 1; - if (!$util.isInteger(message.visibleCoreCount)) - return "visibleCoreCount: integer expected"; - } - if (message.enableUefiNetworking != null && message.hasOwnProperty("enableUefiNetworking")) { - properties._enableUefiNetworking = 1; - if (typeof message.enableUefiNetworking !== "boolean") - return "enableUefiNetworking: boolean expected"; + if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { + properties._totalEgressBandwidthTier = 1; + switch (message.totalEgressBandwidthTier) { + default: + return "totalEgressBandwidthTier: enum value expected"; + case 0: + case 1: + case 2: + break; + } } return null; }; /** - * Creates an AdvancedMachineFeatures message from a plain object. Also converts values to their respective internal types. + * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AdvancedMachineFeatures} AdvancedMachineFeatures + * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig */ - AdvancedMachineFeatures.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AdvancedMachineFeatures) + NetworkPerformanceConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.NetworkPerformanceConfig) return object; - var message = new $root.google.cloud.backupdr.v1.AdvancedMachineFeatures(); - if (object.enableNestedVirtualization != null) - message.enableNestedVirtualization = Boolean(object.enableNestedVirtualization); - if (object.threadsPerCore != null) - message.threadsPerCore = object.threadsPerCore | 0; - if (object.visibleCoreCount != null) - message.visibleCoreCount = object.visibleCoreCount | 0; - if (object.enableUefiNetworking != null) - message.enableUefiNetworking = Boolean(object.enableUefiNetworking); + var message = new $root.google.cloud.backupdr.v1.NetworkPerformanceConfig(); + switch (object.totalEgressBandwidthTier) { + default: + if (typeof object.totalEgressBandwidthTier === "number") { + message.totalEgressBandwidthTier = object.totalEgressBandwidthTier; + break; + } + break; + case "TIER_UNSPECIFIED": + case 0: + message.totalEgressBandwidthTier = 0; + break; + case "DEFAULT": + case 1: + message.totalEgressBandwidthTier = 1; + break; + case "TIER_1": + case 2: + message.totalEgressBandwidthTier = 2; + break; + } return message; }; /** - * Creates a plain object from an AdvancedMachineFeatures message. Also converts values to other types if specified. + * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig * @static - * @param {google.cloud.backupdr.v1.AdvancedMachineFeatures} message AdvancedMachineFeatures + * @param {google.cloud.backupdr.v1.NetworkPerformanceConfig} message NetworkPerformanceConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AdvancedMachineFeatures.toObject = function toObject(message, options) { + NetworkPerformanceConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.enableNestedVirtualization != null && message.hasOwnProperty("enableNestedVirtualization")) { - object.enableNestedVirtualization = message.enableNestedVirtualization; - if (options.oneofs) - object._enableNestedVirtualization = "enableNestedVirtualization"; - } - if (message.threadsPerCore != null && message.hasOwnProperty("threadsPerCore")) { - object.threadsPerCore = message.threadsPerCore; - if (options.oneofs) - object._threadsPerCore = "threadsPerCore"; - } - if (message.visibleCoreCount != null && message.hasOwnProperty("visibleCoreCount")) { - object.visibleCoreCount = message.visibleCoreCount; - if (options.oneofs) - object._visibleCoreCount = "visibleCoreCount"; - } - if (message.enableUefiNetworking != null && message.hasOwnProperty("enableUefiNetworking")) { - object.enableUefiNetworking = message.enableUefiNetworking; + if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { + object.totalEgressBandwidthTier = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] === undefined ? message.totalEgressBandwidthTier : $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] : message.totalEgressBandwidthTier; if (options.oneofs) - object._enableUefiNetworking = "enableUefiNetworking"; + object._totalEgressBandwidthTier = "totalEgressBandwidthTier"; } return object; }; /** - * Converts this AdvancedMachineFeatures to JSON. + * Converts this NetworkPerformanceConfig to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig * @instance * @returns {Object.} JSON object */ - AdvancedMachineFeatures.prototype.toJSON = function toJSON() { + NetworkPerformanceConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AdvancedMachineFeatures + * Gets the default type url for NetworkPerformanceConfig * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AdvancedMachineFeatures + * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AdvancedMachineFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NetworkPerformanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AdvancedMachineFeatures"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkPerformanceConfig"; }; - return AdvancedMachineFeatures; + /** + * Tier enum. + * @name google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier + * @enum {number} + * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value + * @property {number} DEFAULT=1 DEFAULT value + * @property {number} TIER_1=2 TIER_1 value + */ + NetworkPerformanceConfig.Tier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEFAULT"] = 1; + values[valuesById[2] = "TIER_1"] = 2; + return values; + })(); + + return NetworkPerformanceConfig; })(); - v1.ConfidentialInstanceConfig = (function() { + v1.AccessConfig = (function() { /** - * Properties of a ConfidentialInstanceConfig. + * Properties of an AccessConfig. * @memberof google.cloud.backupdr.v1 - * @interface IConfidentialInstanceConfig - * @property {boolean|null} [enableConfidentialCompute] ConfidentialInstanceConfig enableConfidentialCompute + * @interface IAccessConfig + * @property {google.cloud.backupdr.v1.AccessConfig.AccessType|null} [type] AccessConfig type + * @property {string|null} [name] AccessConfig name + * @property {string|null} [externalIp] AccessConfig externalIp + * @property {string|null} [externalIpv6] AccessConfig externalIpv6 + * @property {number|null} [externalIpv6PrefixLength] AccessConfig externalIpv6PrefixLength + * @property {boolean|null} [setPublicPtr] AccessConfig setPublicPtr + * @property {string|null} [publicPtrDomainName] AccessConfig publicPtrDomainName + * @property {google.cloud.backupdr.v1.AccessConfig.NetworkTier|null} [networkTier] AccessConfig networkTier */ /** - * Constructs a new ConfidentialInstanceConfig. + * Constructs a new AccessConfig. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ConfidentialInstanceConfig. - * @implements IConfidentialInstanceConfig + * @classdesc Represents an AccessConfig. + * @implements IAccessConfig * @constructor - * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IAccessConfig=} [properties] Properties to set */ - function ConfidentialInstanceConfig(properties) { + function AccessConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27373,89 +27358,264 @@ } /** - * ConfidentialInstanceConfig enableConfidentialCompute. - * @member {boolean|null|undefined} enableConfidentialCompute - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * AccessConfig type. + * @member {google.cloud.backupdr.v1.AccessConfig.AccessType|null|undefined} type + * @memberof google.cloud.backupdr.v1.AccessConfig * @instance */ - ConfidentialInstanceConfig.prototype.enableConfidentialCompute = null; + AccessConfig.prototype.type = null; + + /** + * AccessConfig name. + * @member {string|null|undefined} name + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.name = null; + + /** + * AccessConfig externalIp. + * @member {string|null|undefined} externalIp + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.externalIp = null; + + /** + * AccessConfig externalIpv6. + * @member {string|null|undefined} externalIpv6 + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.externalIpv6 = null; + + /** + * AccessConfig externalIpv6PrefixLength. + * @member {number|null|undefined} externalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.externalIpv6PrefixLength = null; + + /** + * AccessConfig setPublicPtr. + * @member {boolean|null|undefined} setPublicPtr + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.setPublicPtr = null; + + /** + * AccessConfig publicPtrDomainName. + * @member {string|null|undefined} publicPtrDomainName + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.publicPtrDomainName = null; + + /** + * AccessConfig networkTier. + * @member {google.cloud.backupdr.v1.AccessConfig.NetworkTier|null|undefined} networkTier + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + AccessConfig.prototype.networkTier = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * ConfidentialInstanceConfig _enableConfidentialCompute. - * @member {"enableConfidentialCompute"|undefined} _enableConfidentialCompute - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * AccessConfig _type. + * @member {"type"|undefined} _type + * @memberof google.cloud.backupdr.v1.AccessConfig * @instance */ - Object.defineProperty(ConfidentialInstanceConfig.prototype, "_enableConfidentialCompute", { - get: $util.oneOfGetter($oneOfFields = ["enableConfidentialCompute"]), + Object.defineProperty(AccessConfig.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new ConfidentialInstanceConfig instance using the specified properties. + * AccessConfig _name. + * @member {"name"|undefined} _name + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_name", { + get: $util.oneOfGetter($oneOfFields = ["name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _externalIp. + * @member {"externalIp"|undefined} _externalIp + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_externalIp", { + get: $util.oneOfGetter($oneOfFields = ["externalIp"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _externalIpv6. + * @member {"externalIpv6"|undefined} _externalIpv6 + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_externalIpv6", { + get: $util.oneOfGetter($oneOfFields = ["externalIpv6"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _externalIpv6PrefixLength. + * @member {"externalIpv6PrefixLength"|undefined} _externalIpv6PrefixLength + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_externalIpv6PrefixLength", { + get: $util.oneOfGetter($oneOfFields = ["externalIpv6PrefixLength"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _setPublicPtr. + * @member {"setPublicPtr"|undefined} _setPublicPtr + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_setPublicPtr", { + get: $util.oneOfGetter($oneOfFields = ["setPublicPtr"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _publicPtrDomainName. + * @member {"publicPtrDomainName"|undefined} _publicPtrDomainName + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_publicPtrDomainName", { + get: $util.oneOfGetter($oneOfFields = ["publicPtrDomainName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AccessConfig _networkTier. + * @member {"networkTier"|undefined} _networkTier + * @memberof google.cloud.backupdr.v1.AccessConfig + * @instance + */ + Object.defineProperty(AccessConfig.prototype, "_networkTier", { + get: $util.oneOfGetter($oneOfFields = ["networkTier"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AccessConfig instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.AccessConfig * @static - * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig instance + * @param {google.cloud.backupdr.v1.IAccessConfig=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig instance */ - ConfidentialInstanceConfig.create = function create(properties) { - return new ConfidentialInstanceConfig(properties); + AccessConfig.create = function create(properties) { + return new AccessConfig(properties); }; /** - * Encodes the specified ConfidentialInstanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.AccessConfig * @static - * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig} message ConfidentialInstanceConfig message or plain object to encode + * @param {google.cloud.backupdr.v1.IAccessConfig} message AccessConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConfidentialInstanceConfig.encode = function encode(message, writer) { + AccessConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.enableConfidentialCompute != null && Object.hasOwnProperty.call(message, "enableConfidentialCompute")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableConfidentialCompute); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.externalIp); + if (message.externalIpv6 != null && Object.hasOwnProperty.call(message, "externalIpv6")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.externalIpv6); + if (message.externalIpv6PrefixLength != null && Object.hasOwnProperty.call(message, "externalIpv6PrefixLength")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.externalIpv6PrefixLength); + if (message.setPublicPtr != null && Object.hasOwnProperty.call(message, "setPublicPtr")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.setPublicPtr); + if (message.publicPtrDomainName != null && Object.hasOwnProperty.call(message, "publicPtrDomainName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.publicPtrDomainName); + if (message.networkTier != null && Object.hasOwnProperty.call(message, "networkTier")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.networkTier); return writer; }; /** - * Encodes the specified ConfidentialInstanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ConfidentialInstanceConfig.verify|verify} messages. + * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.AccessConfig * @static - * @param {google.cloud.backupdr.v1.IConfidentialInstanceConfig} message ConfidentialInstanceConfig message or plain object to encode + * @param {google.cloud.backupdr.v1.IAccessConfig} message AccessConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConfidentialInstanceConfig.encodeDelimited = function encodeDelimited(message, writer) { + AccessConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer. + * Decodes an AccessConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.AccessConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConfidentialInstanceConfig.decode = function decode(reader, length) { + AccessConfig.decode = function 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.backupdr.v1.ConfidentialInstanceConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.AccessConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.enableConfidentialCompute = reader.bool(); + message.type = reader.int32(); + break; + } + case 2: { + message.name = reader.string(); + break; + } + case 3: { + message.externalIp = reader.string(); + break; + } + case 4: { + message.externalIpv6 = reader.string(); + break; + } + case 5: { + message.externalIpv6PrefixLength = reader.int32(); + break; + } + case 6: { + message.setPublicPtr = reader.bool(); + break; + } + case 7: { + message.publicPtrDomainName = reader.string(); + break; + } + case 8: { + message.networkTier = reader.int32(); break; } default: @@ -27467,126 +27627,291 @@ }; /** - * Decodes a ConfidentialInstanceConfig message from the specified reader or buffer, length delimited. + * Decodes an AccessConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.AccessConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConfidentialInstanceConfig.decodeDelimited = function decodeDelimited(reader) { + AccessConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConfidentialInstanceConfig message. + * Verifies an AccessConfig message. * @function verify - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.AccessConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConfidentialInstanceConfig.verify = function verify(message) { + AccessConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.enableConfidentialCompute != null && message.hasOwnProperty("enableConfidentialCompute")) { - properties._enableConfidentialCompute = 1; - if (typeof message.enableConfidentialCompute !== "boolean") - return "enableConfidentialCompute: boolean expected"; + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.name != null && message.hasOwnProperty("name")) { + properties._name = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + if (message.externalIp != null && message.hasOwnProperty("externalIp")) { + properties._externalIp = 1; + if (!$util.isString(message.externalIp)) + return "externalIp: string expected"; + } + if (message.externalIpv6 != null && message.hasOwnProperty("externalIpv6")) { + properties._externalIpv6 = 1; + if (!$util.isString(message.externalIpv6)) + return "externalIpv6: string expected"; + } + if (message.externalIpv6PrefixLength != null && message.hasOwnProperty("externalIpv6PrefixLength")) { + properties._externalIpv6PrefixLength = 1; + if (!$util.isInteger(message.externalIpv6PrefixLength)) + return "externalIpv6PrefixLength: integer expected"; + } + if (message.setPublicPtr != null && message.hasOwnProperty("setPublicPtr")) { + properties._setPublicPtr = 1; + if (typeof message.setPublicPtr !== "boolean") + return "setPublicPtr: boolean expected"; + } + if (message.publicPtrDomainName != null && message.hasOwnProperty("publicPtrDomainName")) { + properties._publicPtrDomainName = 1; + if (!$util.isString(message.publicPtrDomainName)) + return "publicPtrDomainName: string expected"; + } + if (message.networkTier != null && message.hasOwnProperty("networkTier")) { + properties._networkTier = 1; + switch (message.networkTier) { + default: + return "networkTier: enum value expected"; + case 0: + case 1: + case 2: + break; + } } return null; }; /** - * Creates a ConfidentialInstanceConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AccessConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.AccessConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ConfidentialInstanceConfig} ConfidentialInstanceConfig + * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig */ - ConfidentialInstanceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig) + AccessConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AccessConfig) return object; - var message = new $root.google.cloud.backupdr.v1.ConfidentialInstanceConfig(); - if (object.enableConfidentialCompute != null) - message.enableConfidentialCompute = Boolean(object.enableConfidentialCompute); + var message = new $root.google.cloud.backupdr.v1.AccessConfig(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "ACCESS_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "ONE_TO_ONE_NAT": + case 1: + message.type = 1; + break; + case "DIRECT_IPV6": + case 2: + message.type = 2; + break; + } + if (object.name != null) + message.name = String(object.name); + if (object.externalIp != null) + message.externalIp = String(object.externalIp); + if (object.externalIpv6 != null) + message.externalIpv6 = String(object.externalIpv6); + if (object.externalIpv6PrefixLength != null) + message.externalIpv6PrefixLength = object.externalIpv6PrefixLength | 0; + if (object.setPublicPtr != null) + message.setPublicPtr = Boolean(object.setPublicPtr); + if (object.publicPtrDomainName != null) + message.publicPtrDomainName = String(object.publicPtrDomainName); + switch (object.networkTier) { + default: + if (typeof object.networkTier === "number") { + message.networkTier = object.networkTier; + break; + } + break; + case "NETWORK_TIER_UNSPECIFIED": + case 0: + message.networkTier = 0; + break; + case "PREMIUM": + case 1: + message.networkTier = 1; + break; + case "STANDARD": + case 2: + message.networkTier = 2; + break; + } return message; }; /** - * Creates a plain object from a ConfidentialInstanceConfig message. Also converts values to other types if specified. + * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.AccessConfig * @static - * @param {google.cloud.backupdr.v1.ConfidentialInstanceConfig} message ConfidentialInstanceConfig + * @param {google.cloud.backupdr.v1.AccessConfig} message AccessConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConfidentialInstanceConfig.toObject = function toObject(message, options) { + AccessConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.enableConfidentialCompute != null && message.hasOwnProperty("enableConfidentialCompute")) { - object.enableConfidentialCompute = message.enableConfidentialCompute; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type] : message.type; if (options.oneofs) - object._enableConfidentialCompute = "enableConfidentialCompute"; + object._type = "type"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object._name = "name"; + } + if (message.externalIp != null && message.hasOwnProperty("externalIp")) { + object.externalIp = message.externalIp; + if (options.oneofs) + object._externalIp = "externalIp"; + } + if (message.externalIpv6 != null && message.hasOwnProperty("externalIpv6")) { + object.externalIpv6 = message.externalIpv6; + if (options.oneofs) + object._externalIpv6 = "externalIpv6"; + } + if (message.externalIpv6PrefixLength != null && message.hasOwnProperty("externalIpv6PrefixLength")) { + object.externalIpv6PrefixLength = message.externalIpv6PrefixLength; + if (options.oneofs) + object._externalIpv6PrefixLength = "externalIpv6PrefixLength"; + } + if (message.setPublicPtr != null && message.hasOwnProperty("setPublicPtr")) { + object.setPublicPtr = message.setPublicPtr; + if (options.oneofs) + object._setPublicPtr = "setPublicPtr"; + } + if (message.publicPtrDomainName != null && message.hasOwnProperty("publicPtrDomainName")) { + object.publicPtrDomainName = message.publicPtrDomainName; + if (options.oneofs) + object._publicPtrDomainName = "publicPtrDomainName"; + } + if (message.networkTier != null && message.hasOwnProperty("networkTier")) { + object.networkTier = options.enums === String ? $root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier] === undefined ? message.networkTier : $root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier] : message.networkTier; + if (options.oneofs) + object._networkTier = "networkTier"; } return object; }; /** - * Converts this ConfidentialInstanceConfig to JSON. + * Converts this AccessConfig to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.AccessConfig * @instance * @returns {Object.} JSON object */ - ConfidentialInstanceConfig.prototype.toJSON = function toJSON() { + AccessConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConfidentialInstanceConfig + * Gets the default type url for AccessConfig * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ConfidentialInstanceConfig + * @memberof google.cloud.backupdr.v1.AccessConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConfidentialInstanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AccessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ConfidentialInstanceConfig"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.AccessConfig"; }; - return ConfidentialInstanceConfig; + /** + * AccessType enum. + * @name google.cloud.backupdr.v1.AccessConfig.AccessType + * @enum {number} + * @property {number} ACCESS_TYPE_UNSPECIFIED=0 ACCESS_TYPE_UNSPECIFIED value + * @property {number} ONE_TO_ONE_NAT=1 ONE_TO_ONE_NAT value + * @property {number} DIRECT_IPV6=2 DIRECT_IPV6 value + */ + AccessConfig.AccessType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACCESS_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ONE_TO_ONE_NAT"] = 1; + values[valuesById[2] = "DIRECT_IPV6"] = 2; + return values; + })(); + + /** + * NetworkTier enum. + * @name google.cloud.backupdr.v1.AccessConfig.NetworkTier + * @enum {number} + * @property {number} NETWORK_TIER_UNSPECIFIED=0 NETWORK_TIER_UNSPECIFIED value + * @property {number} PREMIUM=1 PREMIUM value + * @property {number} STANDARD=2 STANDARD value + */ + AccessConfig.NetworkTier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NETWORK_TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "PREMIUM"] = 1; + values[valuesById[2] = "STANDARD"] = 2; + return values; + })(); + + return AccessConfig; })(); - v1.DisplayDevice = (function() { + v1.AliasIpRange = (function() { /** - * Properties of a DisplayDevice. + * Properties of an AliasIpRange. * @memberof google.cloud.backupdr.v1 - * @interface IDisplayDevice - * @property {boolean|null} [enableDisplay] DisplayDevice enableDisplay + * @interface IAliasIpRange + * @property {string|null} [ipCidrRange] AliasIpRange ipCidrRange + * @property {string|null} [subnetworkRangeName] AliasIpRange subnetworkRangeName */ /** - * Constructs a new DisplayDevice. + * Constructs a new AliasIpRange. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a DisplayDevice. - * @implements IDisplayDevice + * @classdesc Represents an AliasIpRange. + * @implements IAliasIpRange * @constructor - * @param {google.cloud.backupdr.v1.IDisplayDevice=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IAliasIpRange=} [properties] Properties to set */ - function DisplayDevice(properties) { + function AliasIpRange(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27594,89 +27919,114 @@ } /** - * DisplayDevice enableDisplay. - * @member {boolean|null|undefined} enableDisplay - * @memberof google.cloud.backupdr.v1.DisplayDevice + * AliasIpRange ipCidrRange. + * @member {string|null|undefined} ipCidrRange + * @memberof google.cloud.backupdr.v1.AliasIpRange * @instance */ - DisplayDevice.prototype.enableDisplay = null; + AliasIpRange.prototype.ipCidrRange = null; + + /** + * AliasIpRange subnetworkRangeName. + * @member {string|null|undefined} subnetworkRangeName + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + */ + AliasIpRange.prototype.subnetworkRangeName = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * DisplayDevice _enableDisplay. - * @member {"enableDisplay"|undefined} _enableDisplay - * @memberof google.cloud.backupdr.v1.DisplayDevice + * AliasIpRange _ipCidrRange. + * @member {"ipCidrRange"|undefined} _ipCidrRange + * @memberof google.cloud.backupdr.v1.AliasIpRange * @instance */ - Object.defineProperty(DisplayDevice.prototype, "_enableDisplay", { - get: $util.oneOfGetter($oneOfFields = ["enableDisplay"]), + Object.defineProperty(AliasIpRange.prototype, "_ipCidrRange", { + get: $util.oneOfGetter($oneOfFields = ["ipCidrRange"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new DisplayDevice instance using the specified properties. + * AliasIpRange _subnetworkRangeName. + * @member {"subnetworkRangeName"|undefined} _subnetworkRangeName + * @memberof google.cloud.backupdr.v1.AliasIpRange + * @instance + */ + Object.defineProperty(AliasIpRange.prototype, "_subnetworkRangeName", { + get: $util.oneOfGetter($oneOfFields = ["subnetworkRangeName"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AliasIpRange instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.DisplayDevice + * @memberof google.cloud.backupdr.v1.AliasIpRange * @static - * @param {google.cloud.backupdr.v1.IDisplayDevice=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice instance + * @param {google.cloud.backupdr.v1.IAliasIpRange=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange instance */ - DisplayDevice.create = function create(properties) { - return new DisplayDevice(properties); + AliasIpRange.create = function create(properties) { + return new AliasIpRange(properties); }; /** - * Encodes the specified DisplayDevice message. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.DisplayDevice + * @memberof google.cloud.backupdr.v1.AliasIpRange * @static - * @param {google.cloud.backupdr.v1.IDisplayDevice} message DisplayDevice message or plain object to encode + * @param {google.cloud.backupdr.v1.IAliasIpRange} message AliasIpRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DisplayDevice.encode = function encode(message, writer) { + AliasIpRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.enableDisplay != null && Object.hasOwnProperty.call(message, "enableDisplay")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableDisplay); + if (message.ipCidrRange != null && Object.hasOwnProperty.call(message, "ipCidrRange")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipCidrRange); + if (message.subnetworkRangeName != null && Object.hasOwnProperty.call(message, "subnetworkRangeName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetworkRangeName); return writer; }; /** - * Encodes the specified DisplayDevice message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.DisplayDevice.verify|verify} messages. + * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.DisplayDevice + * @memberof google.cloud.backupdr.v1.AliasIpRange * @static - * @param {google.cloud.backupdr.v1.IDisplayDevice} message DisplayDevice message or plain object to encode + * @param {google.cloud.backupdr.v1.IAliasIpRange} message AliasIpRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DisplayDevice.encodeDelimited = function encodeDelimited(message, writer) { + AliasIpRange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DisplayDevice message from the specified reader or buffer. + * Decodes an AliasIpRange message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.DisplayDevice + * @memberof google.cloud.backupdr.v1.AliasIpRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DisplayDevice.decode = function decode(reader, length) { + AliasIpRange.decode = function 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.backupdr.v1.DisplayDevice(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.AliasIpRange(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.enableDisplay = reader.bool(); + message.ipCidrRange = reader.string(); + break; + } + case 2: { + message.subnetworkRangeName = reader.string(); break; } default: @@ -27688,127 +28038,139 @@ }; /** - * Decodes a DisplayDevice message from the specified reader or buffer, length delimited. + * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.DisplayDevice + * @memberof google.cloud.backupdr.v1.AliasIpRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DisplayDevice.decodeDelimited = function decodeDelimited(reader) { + AliasIpRange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DisplayDevice message. + * Verifies an AliasIpRange message. * @function verify - * @memberof google.cloud.backupdr.v1.DisplayDevice + * @memberof google.cloud.backupdr.v1.AliasIpRange * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DisplayDevice.verify = function verify(message) { + AliasIpRange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.enableDisplay != null && message.hasOwnProperty("enableDisplay")) { - properties._enableDisplay = 1; - if (typeof message.enableDisplay !== "boolean") - return "enableDisplay: boolean expected"; + if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) { + properties._ipCidrRange = 1; + if (!$util.isString(message.ipCidrRange)) + return "ipCidrRange: string expected"; + } + if (message.subnetworkRangeName != null && message.hasOwnProperty("subnetworkRangeName")) { + properties._subnetworkRangeName = 1; + if (!$util.isString(message.subnetworkRangeName)) + return "subnetworkRangeName: string expected"; } return null; }; /** - * Creates a DisplayDevice message from a plain object. Also converts values to their respective internal types. + * Creates an AliasIpRange message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.DisplayDevice + * @memberof google.cloud.backupdr.v1.AliasIpRange * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.DisplayDevice} DisplayDevice + * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange */ - DisplayDevice.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.DisplayDevice) + AliasIpRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AliasIpRange) return object; - var message = new $root.google.cloud.backupdr.v1.DisplayDevice(); - if (object.enableDisplay != null) - message.enableDisplay = Boolean(object.enableDisplay); + var message = new $root.google.cloud.backupdr.v1.AliasIpRange(); + if (object.ipCidrRange != null) + message.ipCidrRange = String(object.ipCidrRange); + if (object.subnetworkRangeName != null) + message.subnetworkRangeName = String(object.subnetworkRangeName); return message; }; /** - * Creates a plain object from a DisplayDevice message. Also converts values to other types if specified. + * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.DisplayDevice + * @memberof google.cloud.backupdr.v1.AliasIpRange * @static - * @param {google.cloud.backupdr.v1.DisplayDevice} message DisplayDevice + * @param {google.cloud.backupdr.v1.AliasIpRange} message AliasIpRange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DisplayDevice.toObject = function toObject(message, options) { + AliasIpRange.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.enableDisplay != null && message.hasOwnProperty("enableDisplay")) { - object.enableDisplay = message.enableDisplay; + if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) { + object.ipCidrRange = message.ipCidrRange; if (options.oneofs) - object._enableDisplay = "enableDisplay"; + object._ipCidrRange = "ipCidrRange"; + } + if (message.subnetworkRangeName != null && message.hasOwnProperty("subnetworkRangeName")) { + object.subnetworkRangeName = message.subnetworkRangeName; + if (options.oneofs) + object._subnetworkRangeName = "subnetworkRangeName"; } return object; }; /** - * Converts this DisplayDevice to JSON. + * Converts this AliasIpRange to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.DisplayDevice + * @memberof google.cloud.backupdr.v1.AliasIpRange * @instance * @returns {Object.} JSON object */ - DisplayDevice.prototype.toJSON = function toJSON() { + AliasIpRange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DisplayDevice + * Gets the default type url for AliasIpRange * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.DisplayDevice + * @memberof google.cloud.backupdr.v1.AliasIpRange * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DisplayDevice.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AliasIpRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.DisplayDevice"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.AliasIpRange"; }; - return DisplayDevice; + return AliasIpRange; })(); - v1.AcceleratorConfig = (function() { + v1.InstanceParams = (function() { /** - * Properties of an AcceleratorConfig. + * Properties of an InstanceParams. * @memberof google.cloud.backupdr.v1 - * @interface IAcceleratorConfig - * @property {string|null} [acceleratorType] AcceleratorConfig acceleratorType - * @property {number|null} [acceleratorCount] AcceleratorConfig acceleratorCount + * @interface IInstanceParams + * @property {Object.|null} [resourceManagerTags] InstanceParams resourceManagerTags */ /** - * Constructs a new AcceleratorConfig. + * Constructs a new InstanceParams. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AcceleratorConfig. - * @implements IAcceleratorConfig + * @classdesc Represents an InstanceParams. + * @implements IInstanceParams * @constructor - * @param {google.cloud.backupdr.v1.IAcceleratorConfig=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IInstanceParams=} [properties] Properties to set */ - function AcceleratorConfig(properties) { + function InstanceParams(properties) { + this.resourceManagerTags = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27816,114 +28178,95 @@ } /** - * AcceleratorConfig acceleratorType. - * @member {string|null|undefined} acceleratorType - * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * InstanceParams resourceManagerTags. + * @member {Object.} resourceManagerTags + * @memberof google.cloud.backupdr.v1.InstanceParams * @instance */ - AcceleratorConfig.prototype.acceleratorType = null; + InstanceParams.prototype.resourceManagerTags = $util.emptyObject; /** - * AcceleratorConfig acceleratorCount. - * @member {number|null|undefined} acceleratorCount - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @instance + * Creates a new InstanceParams instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {google.cloud.backupdr.v1.IInstanceParams=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams instance */ - AcceleratorConfig.prototype.acceleratorCount = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + InstanceParams.create = function create(properties) { + return new InstanceParams(properties); + }; /** - * AcceleratorConfig _acceleratorType. - * @member {"acceleratorType"|undefined} _acceleratorType - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @instance + * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.InstanceParams + * @static + * @param {google.cloud.backupdr.v1.IInstanceParams} message InstanceParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(AcceleratorConfig.prototype, "_acceleratorType", { - get: $util.oneOfGetter($oneOfFields = ["acceleratorType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AcceleratorConfig _acceleratorCount. - * @member {"acceleratorCount"|undefined} _acceleratorCount - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @instance - */ - Object.defineProperty(AcceleratorConfig.prototype, "_acceleratorCount", { - get: $util.oneOfGetter($oneOfFields = ["acceleratorCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AcceleratorConfig instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {google.cloud.backupdr.v1.IAcceleratorConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig instance - */ - AcceleratorConfig.create = function create(properties) { - return new AcceleratorConfig(properties); - }; - - /** - * Encodes the specified AcceleratorConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AcceleratorConfig - * @static - * @param {google.cloud.backupdr.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AcceleratorConfig.encode = function encode(message, writer) { + InstanceParams.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.acceleratorType != null && Object.hasOwnProperty.call(message, "acceleratorType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.acceleratorType); - if (message.acceleratorCount != null && Object.hasOwnProperty.call(message, "acceleratorCount")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.acceleratorCount); + if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) + for (var keys = Object.keys(message.resourceManagerTags), i = 0; i < keys.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceManagerTags[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified AcceleratorConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AcceleratorConfig.verify|verify} messages. + * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @memberof google.cloud.backupdr.v1.InstanceParams * @static - * @param {google.cloud.backupdr.v1.IAcceleratorConfig} message AcceleratorConfig message or plain object to encode + * @param {google.cloud.backupdr.v1.IInstanceParams} message InstanceParams message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AcceleratorConfig.encodeDelimited = function encodeDelimited(message, writer) { + InstanceParams.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AcceleratorConfig message from the specified reader or buffer. + * Decodes an InstanceParams message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @memberof google.cloud.backupdr.v1.InstanceParams * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AcceleratorConfig.decode = function decode(reader, length) { + InstanceParams.decode = function 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.backupdr.v1.AcceleratorConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.InstanceParams(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.acceleratorType = reader.string(); - break; - } - case 2: { - message.acceleratorCount = reader.int32(); + if (message.resourceManagerTags === $util.emptyObject) + message.resourceManagerTags = {}; + 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.resourceManagerTags[key] = value; break; } default: @@ -27935,141 +28278,139 @@ }; /** - * Decodes an AcceleratorConfig message from the specified reader or buffer, length delimited. + * Decodes an InstanceParams message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @memberof google.cloud.backupdr.v1.InstanceParams * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AcceleratorConfig.decodeDelimited = function decodeDelimited(reader) { + InstanceParams.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AcceleratorConfig message. + * Verifies an InstanceParams message. * @function verify - * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @memberof google.cloud.backupdr.v1.InstanceParams * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AcceleratorConfig.verify = function verify(message) { + InstanceParams.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) { - properties._acceleratorType = 1; - if (!$util.isString(message.acceleratorType)) - return "acceleratorType: string expected"; - } - if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) { - properties._acceleratorCount = 1; - if (!$util.isInteger(message.acceleratorCount)) - return "acceleratorCount: integer expected"; + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { + if (!$util.isObject(message.resourceManagerTags)) + return "resourceManagerTags: object expected"; + var key = Object.keys(message.resourceManagerTags); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.resourceManagerTags[key[i]])) + return "resourceManagerTags: string{k:string} expected"; } return null; }; /** - * Creates an AcceleratorConfig message from a plain object. Also converts values to their respective internal types. + * Creates an InstanceParams message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @memberof google.cloud.backupdr.v1.InstanceParams * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AcceleratorConfig} AcceleratorConfig + * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams */ - AcceleratorConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AcceleratorConfig) + InstanceParams.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.InstanceParams) return object; - var message = new $root.google.cloud.backupdr.v1.AcceleratorConfig(); - if (object.acceleratorType != null) - message.acceleratorType = String(object.acceleratorType); - if (object.acceleratorCount != null) - message.acceleratorCount = object.acceleratorCount | 0; + var message = new $root.google.cloud.backupdr.v1.InstanceParams(); + if (object.resourceManagerTags) { + if (typeof object.resourceManagerTags !== "object") + throw TypeError(".google.cloud.backupdr.v1.InstanceParams.resourceManagerTags: object expected"); + message.resourceManagerTags = {}; + for (var keys = Object.keys(object.resourceManagerTags), i = 0; i < keys.length; ++i) + message.resourceManagerTags[keys[i]] = String(object.resourceManagerTags[keys[i]]); + } return message; }; /** - * Creates a plain object from an AcceleratorConfig message. Also converts values to other types if specified. + * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @memberof google.cloud.backupdr.v1.InstanceParams * @static - * @param {google.cloud.backupdr.v1.AcceleratorConfig} message AcceleratorConfig + * @param {google.cloud.backupdr.v1.InstanceParams} message InstanceParams * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AcceleratorConfig.toObject = function toObject(message, options) { + InstanceParams.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.acceleratorType != null && message.hasOwnProperty("acceleratorType")) { - object.acceleratorType = message.acceleratorType; - if (options.oneofs) - object._acceleratorType = "acceleratorType"; - } - if (message.acceleratorCount != null && message.hasOwnProperty("acceleratorCount")) { - object.acceleratorCount = message.acceleratorCount; - if (options.oneofs) - object._acceleratorCount = "acceleratorCount"; + if (options.objects || options.defaults) + object.resourceManagerTags = {}; + var keys2; + if (message.resourceManagerTags && (keys2 = Object.keys(message.resourceManagerTags)).length) { + object.resourceManagerTags = {}; + for (var j = 0; j < keys2.length; ++j) + object.resourceManagerTags[keys2[j]] = message.resourceManagerTags[keys2[j]]; } return object; }; /** - * Converts this AcceleratorConfig to JSON. + * Converts this InstanceParams to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @memberof google.cloud.backupdr.v1.InstanceParams * @instance * @returns {Object.} JSON object */ - AcceleratorConfig.prototype.toJSON = function toJSON() { + InstanceParams.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AcceleratorConfig + * Gets the default type url for InstanceParams * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AcceleratorConfig + * @memberof google.cloud.backupdr.v1.InstanceParams * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AcceleratorConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + InstanceParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AcceleratorConfig"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.InstanceParams"; }; - return AcceleratorConfig; + return InstanceParams; })(); - v1.CustomerEncryptionKey = (function() { + v1.AllocationAffinity = (function() { /** - * Properties of a CustomerEncryptionKey. + * Properties of an AllocationAffinity. * @memberof google.cloud.backupdr.v1 - * @interface ICustomerEncryptionKey - * @property {string|null} [rawKey] CustomerEncryptionKey rawKey - * @property {string|null} [rsaEncryptedKey] CustomerEncryptionKey rsaEncryptedKey - * @property {string|null} [kmsKeyName] CustomerEncryptionKey kmsKeyName - * @property {string|null} [kmsKeyServiceAccount] CustomerEncryptionKey kmsKeyServiceAccount + * @interface IAllocationAffinity + * @property {google.cloud.backupdr.v1.AllocationAffinity.Type|null} [consumeAllocationType] AllocationAffinity consumeAllocationType + * @property {string|null} [key] AllocationAffinity key + * @property {Array.|null} [values] AllocationAffinity values */ /** - * Constructs a new CustomerEncryptionKey. + * Constructs a new AllocationAffinity. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a CustomerEncryptionKey. - * @implements ICustomerEncryptionKey + * @classdesc Represents an AllocationAffinity. + * @implements IAllocationAffinity * @constructor - * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IAllocationAffinity=} [properties] Properties to set */ - function CustomerEncryptionKey(properties) { + function AllocationAffinity(properties) { + this.values = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28077,142 +28418,131 @@ } /** - * CustomerEncryptionKey rawKey. - * @member {string|null|undefined} rawKey - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey - * @instance - */ - CustomerEncryptionKey.prototype.rawKey = null; - - /** - * CustomerEncryptionKey rsaEncryptedKey. - * @member {string|null|undefined} rsaEncryptedKey - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * AllocationAffinity consumeAllocationType. + * @member {google.cloud.backupdr.v1.AllocationAffinity.Type|null|undefined} consumeAllocationType + * @memberof google.cloud.backupdr.v1.AllocationAffinity * @instance */ - CustomerEncryptionKey.prototype.rsaEncryptedKey = null; + AllocationAffinity.prototype.consumeAllocationType = null; /** - * CustomerEncryptionKey kmsKeyName. - * @member {string|null|undefined} kmsKeyName - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * AllocationAffinity key. + * @member {string|null|undefined} key + * @memberof google.cloud.backupdr.v1.AllocationAffinity * @instance */ - CustomerEncryptionKey.prototype.kmsKeyName = null; + AllocationAffinity.prototype.key = null; /** - * CustomerEncryptionKey kmsKeyServiceAccount. - * @member {string|null|undefined} kmsKeyServiceAccount - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * AllocationAffinity values. + * @member {Array.} values + * @memberof google.cloud.backupdr.v1.AllocationAffinity * @instance */ - CustomerEncryptionKey.prototype.kmsKeyServiceAccount = null; + AllocationAffinity.prototype.values = $util.emptyArray; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * CustomerEncryptionKey key. - * @member {"rawKey"|"rsaEncryptedKey"|"kmsKeyName"|undefined} key - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * AllocationAffinity _consumeAllocationType. + * @member {"consumeAllocationType"|undefined} _consumeAllocationType + * @memberof google.cloud.backupdr.v1.AllocationAffinity * @instance */ - Object.defineProperty(CustomerEncryptionKey.prototype, "key", { - get: $util.oneOfGetter($oneOfFields = ["rawKey", "rsaEncryptedKey", "kmsKeyName"]), + Object.defineProperty(AllocationAffinity.prototype, "_consumeAllocationType", { + get: $util.oneOfGetter($oneOfFields = ["consumeAllocationType"]), set: $util.oneOfSetter($oneOfFields) }); /** - * CustomerEncryptionKey _kmsKeyServiceAccount. - * @member {"kmsKeyServiceAccount"|undefined} _kmsKeyServiceAccount - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * AllocationAffinity _key. + * @member {"key"|undefined} _key + * @memberof google.cloud.backupdr.v1.AllocationAffinity * @instance */ - Object.defineProperty(CustomerEncryptionKey.prototype, "_kmsKeyServiceAccount", { - get: $util.oneOfGetter($oneOfFields = ["kmsKeyServiceAccount"]), + Object.defineProperty(AllocationAffinity.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new CustomerEncryptionKey instance using the specified properties. + * Creates a new AllocationAffinity instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @memberof google.cloud.backupdr.v1.AllocationAffinity * @static - * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey instance + * @param {google.cloud.backupdr.v1.IAllocationAffinity=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity instance */ - CustomerEncryptionKey.create = function create(properties) { - return new CustomerEncryptionKey(properties); + AllocationAffinity.create = function create(properties) { + return new AllocationAffinity(properties); }; /** - * Encodes the specified CustomerEncryptionKey message. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @memberof google.cloud.backupdr.v1.AllocationAffinity * @static - * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey} message CustomerEncryptionKey message or plain object to encode + * @param {google.cloud.backupdr.v1.IAllocationAffinity} message AllocationAffinity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomerEncryptionKey.encode = function encode(message, writer) { + AllocationAffinity.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rawKey != null && Object.hasOwnProperty.call(message, "rawKey")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.rawKey); - if (message.rsaEncryptedKey != null && Object.hasOwnProperty.call(message, "rsaEncryptedKey")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.rsaEncryptedKey); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyName); - if (message.kmsKeyServiceAccount != null && Object.hasOwnProperty.call(message, "kmsKeyServiceAccount")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.kmsKeyServiceAccount); + if (message.consumeAllocationType != null && Object.hasOwnProperty.call(message, "consumeAllocationType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumeAllocationType); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); return writer; }; /** - * Encodes the specified CustomerEncryptionKey message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.CustomerEncryptionKey.verify|verify} messages. + * Encodes the specified AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @memberof google.cloud.backupdr.v1.AllocationAffinity * @static - * @param {google.cloud.backupdr.v1.ICustomerEncryptionKey} message CustomerEncryptionKey message or plain object to encode + * @param {google.cloud.backupdr.v1.IAllocationAffinity} message AllocationAffinity message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomerEncryptionKey.encodeDelimited = function encodeDelimited(message, writer) { + AllocationAffinity.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomerEncryptionKey message from the specified reader or buffer. + * Decodes an AllocationAffinity message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @memberof google.cloud.backupdr.v1.AllocationAffinity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomerEncryptionKey.decode = function decode(reader, length) { + AllocationAffinity.decode = function 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.backupdr.v1.CustomerEncryptionKey(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.AllocationAffinity(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.rawKey = reader.string(); + message.consumeAllocationType = reader.int32(); break; } case 2: { - message.rsaEncryptedKey = reader.string(); + message.key = reader.string(); break; } case 3: { - message.kmsKeyName = reader.string(); - break; - } - case 4: { - message.kmsKeyServiceAccount = reader.string(); + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); break; } default: @@ -28224,167 +28554,214 @@ }; /** - * Decodes a CustomerEncryptionKey message from the specified reader or buffer, length delimited. + * Decodes an AllocationAffinity message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @memberof google.cloud.backupdr.v1.AllocationAffinity * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CustomerEncryptionKey.decodeDelimited = function decodeDelimited(reader) { + AllocationAffinity.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomerEncryptionKey message. + * Verifies an AllocationAffinity message. * @function verify - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @memberof google.cloud.backupdr.v1.AllocationAffinity * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CustomerEncryptionKey.verify = function verify(message) { + AllocationAffinity.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.rawKey != null && message.hasOwnProperty("rawKey")) { - properties.key = 1; - if (!$util.isString(message.rawKey)) - return "rawKey: string expected"; - } - if (message.rsaEncryptedKey != null && message.hasOwnProperty("rsaEncryptedKey")) { - if (properties.key === 1) - return "key: multiple values"; - properties.key = 1; - if (!$util.isString(message.rsaEncryptedKey)) - return "rsaEncryptedKey: string expected"; + if (message.consumeAllocationType != null && message.hasOwnProperty("consumeAllocationType")) { + properties._consumeAllocationType = 1; + switch (message.consumeAllocationType) { + default: + return "consumeAllocationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } } - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { - if (properties.key === 1) - return "key: multiple values"; - properties.key = 1; - if (!$util.isString(message.kmsKeyName)) - return "kmsKeyName: string expected"; + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; } - if (message.kmsKeyServiceAccount != null && message.hasOwnProperty("kmsKeyServiceAccount")) { - properties._kmsKeyServiceAccount = 1; - if (!$util.isString(message.kmsKeyServiceAccount)) - return "kmsKeyServiceAccount: string expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; } return null; }; /** - * Creates a CustomerEncryptionKey message from a plain object. Also converts values to their respective internal types. + * Creates an AllocationAffinity message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @memberof google.cloud.backupdr.v1.AllocationAffinity * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.CustomerEncryptionKey} CustomerEncryptionKey + * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity */ - CustomerEncryptionKey.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.CustomerEncryptionKey) + AllocationAffinity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AllocationAffinity) return object; - var message = new $root.google.cloud.backupdr.v1.CustomerEncryptionKey(); - if (object.rawKey != null) - message.rawKey = String(object.rawKey); - if (object.rsaEncryptedKey != null) - message.rsaEncryptedKey = String(object.rsaEncryptedKey); - if (object.kmsKeyName != null) - message.kmsKeyName = String(object.kmsKeyName); - if (object.kmsKeyServiceAccount != null) - message.kmsKeyServiceAccount = String(object.kmsKeyServiceAccount); + var message = new $root.google.cloud.backupdr.v1.AllocationAffinity(); + switch (object.consumeAllocationType) { + default: + if (typeof object.consumeAllocationType === "number") { + message.consumeAllocationType = object.consumeAllocationType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.consumeAllocationType = 0; + break; + case "NO_RESERVATION": + case 1: + message.consumeAllocationType = 1; + break; + case "ANY_RESERVATION": + case 2: + message.consumeAllocationType = 2; + break; + case "SPECIFIC_RESERVATION": + case 3: + message.consumeAllocationType = 3; + break; + } + if (object.key != null) + message.key = String(object.key); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.backupdr.v1.AllocationAffinity.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } return message; }; /** - * Creates a plain object from a CustomerEncryptionKey message. Also converts values to other types if specified. + * Creates a plain object from an AllocationAffinity message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @memberof google.cloud.backupdr.v1.AllocationAffinity * @static - * @param {google.cloud.backupdr.v1.CustomerEncryptionKey} message CustomerEncryptionKey + * @param {google.cloud.backupdr.v1.AllocationAffinity} message AllocationAffinity * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomerEncryptionKey.toObject = function toObject(message, options) { + AllocationAffinity.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.rawKey != null && message.hasOwnProperty("rawKey")) { - object.rawKey = message.rawKey; - if (options.oneofs) - object.key = "rawKey"; - } - if (message.rsaEncryptedKey != null && message.hasOwnProperty("rsaEncryptedKey")) { - object.rsaEncryptedKey = message.rsaEncryptedKey; + if (options.arrays || options.defaults) + object.values = []; + if (message.consumeAllocationType != null && message.hasOwnProperty("consumeAllocationType")) { + object.consumeAllocationType = options.enums === String ? $root.google.cloud.backupdr.v1.AllocationAffinity.Type[message.consumeAllocationType] === undefined ? message.consumeAllocationType : $root.google.cloud.backupdr.v1.AllocationAffinity.Type[message.consumeAllocationType] : message.consumeAllocationType; if (options.oneofs) - object.key = "rsaEncryptedKey"; + object._consumeAllocationType = "consumeAllocationType"; } - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) { - object.kmsKeyName = message.kmsKeyName; + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; if (options.oneofs) - object.key = "kmsKeyName"; + object._key = "key"; } - if (message.kmsKeyServiceAccount != null && message.hasOwnProperty("kmsKeyServiceAccount")) { - object.kmsKeyServiceAccount = message.kmsKeyServiceAccount; - if (options.oneofs) - object._kmsKeyServiceAccount = "kmsKeyServiceAccount"; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; } return object; }; /** - * Converts this CustomerEncryptionKey to JSON. + * Converts this AllocationAffinity to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @memberof google.cloud.backupdr.v1.AllocationAffinity * @instance * @returns {Object.} JSON object */ - CustomerEncryptionKey.prototype.toJSON = function toJSON() { + AllocationAffinity.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomerEncryptionKey + * Gets the default type url for AllocationAffinity * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.CustomerEncryptionKey + * @memberof google.cloud.backupdr.v1.AllocationAffinity * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomerEncryptionKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AllocationAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.CustomerEncryptionKey"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.AllocationAffinity"; }; - return CustomerEncryptionKey; - })(); - - v1.Entry = (function() { - /** - * Properties of an Entry. - * @memberof google.cloud.backupdr.v1 - * @interface IEntry - * @property {string|null} [key] Entry key - * @property {string|null} [value] Entry value + * Type enum. + * @name google.cloud.backupdr.v1.AllocationAffinity.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} NO_RESERVATION=1 NO_RESERVATION value + * @property {number} ANY_RESERVATION=2 ANY_RESERVATION value + * @property {number} SPECIFIC_RESERVATION=3 SPECIFIC_RESERVATION value */ + AllocationAffinity.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NO_RESERVATION"] = 1; + values[valuesById[2] = "ANY_RESERVATION"] = 2; + values[valuesById[3] = "SPECIFIC_RESERVATION"] = 3; + return values; + })(); + + return AllocationAffinity; + })(); + + v1.Scheduling = (function() { /** - * Constructs a new Entry. + * Properties of a Scheduling. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an Entry. - * @implements IEntry + * @interface IScheduling + * @property {google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null} [onHostMaintenance] Scheduling onHostMaintenance + * @property {boolean|null} [automaticRestart] Scheduling automaticRestart + * @property {boolean|null} [preemptible] Scheduling preemptible + * @property {Array.|null} [nodeAffinities] Scheduling nodeAffinities + * @property {number|null} [minNodeCpus] Scheduling minNodeCpus + * @property {google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null} [provisioningModel] Scheduling provisioningModel + * @property {google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null} [instanceTerminationAction] Scheduling instanceTerminationAction + * @property {google.cloud.backupdr.v1.ISchedulingDuration|null} [localSsdRecoveryTimeout] Scheduling localSsdRecoveryTimeout + */ + + /** + * Constructs a new Scheduling. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a Scheduling. + * @implements IScheduling * @constructor - * @param {google.cloud.backupdr.v1.IEntry=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IScheduling=} [properties] Properties to set */ - function Entry(properties) { + function Scheduling(properties) { + this.nodeAffinities = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28392,114 +28769,256 @@ } /** - * Entry key. - * @member {string|null|undefined} key - * @memberof google.cloud.backupdr.v1.Entry + * Scheduling onHostMaintenance. + * @member {google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null|undefined} onHostMaintenance + * @memberof google.cloud.backupdr.v1.Scheduling * @instance */ - Entry.prototype.key = null; + Scheduling.prototype.onHostMaintenance = null; /** - * Entry value. - * @member {string|null|undefined} value - * @memberof google.cloud.backupdr.v1.Entry + * Scheduling automaticRestart. + * @member {boolean|null|undefined} automaticRestart + * @memberof google.cloud.backupdr.v1.Scheduling * @instance */ - Entry.prototype.value = null; + Scheduling.prototype.automaticRestart = null; + + /** + * Scheduling preemptible. + * @member {boolean|null|undefined} preemptible + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.preemptible = null; + + /** + * Scheduling nodeAffinities. + * @member {Array.} nodeAffinities + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.nodeAffinities = $util.emptyArray; + + /** + * Scheduling minNodeCpus. + * @member {number|null|undefined} minNodeCpus + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.minNodeCpus = null; + + /** + * Scheduling provisioningModel. + * @member {google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null|undefined} provisioningModel + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.provisioningModel = null; + + /** + * Scheduling instanceTerminationAction. + * @member {google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null|undefined} instanceTerminationAction + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.instanceTerminationAction = null; + + /** + * Scheduling localSsdRecoveryTimeout. + * @member {google.cloud.backupdr.v1.ISchedulingDuration|null|undefined} localSsdRecoveryTimeout + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Scheduling.prototype.localSsdRecoveryTimeout = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * Entry _key. - * @member {"key"|undefined} _key - * @memberof google.cloud.backupdr.v1.Entry + * Scheduling _onHostMaintenance. + * @member {"onHostMaintenance"|undefined} _onHostMaintenance + * @memberof google.cloud.backupdr.v1.Scheduling * @instance */ - Object.defineProperty(Entry.prototype, "_key", { - get: $util.oneOfGetter($oneOfFields = ["key"]), + Object.defineProperty(Scheduling.prototype, "_onHostMaintenance", { + get: $util.oneOfGetter($oneOfFields = ["onHostMaintenance"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Entry _value. - * @member {"value"|undefined} _value - * @memberof google.cloud.backupdr.v1.Entry + * Scheduling _automaticRestart. + * @member {"automaticRestart"|undefined} _automaticRestart + * @memberof google.cloud.backupdr.v1.Scheduling * @instance */ - Object.defineProperty(Entry.prototype, "_value", { - get: $util.oneOfGetter($oneOfFields = ["value"]), + Object.defineProperty(Scheduling.prototype, "_automaticRestart", { + get: $util.oneOfGetter($oneOfFields = ["automaticRestart"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new Entry instance using the specified properties. + * Scheduling _preemptible. + * @member {"preemptible"|undefined} _preemptible + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_preemptible", { + get: $util.oneOfGetter($oneOfFields = ["preemptible"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _minNodeCpus. + * @member {"minNodeCpus"|undefined} _minNodeCpus + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_minNodeCpus", { + get: $util.oneOfGetter($oneOfFields = ["minNodeCpus"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _provisioningModel. + * @member {"provisioningModel"|undefined} _provisioningModel + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_provisioningModel", { + get: $util.oneOfGetter($oneOfFields = ["provisioningModel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _instanceTerminationAction. + * @member {"instanceTerminationAction"|undefined} _instanceTerminationAction + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_instanceTerminationAction", { + get: $util.oneOfGetter($oneOfFields = ["instanceTerminationAction"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Scheduling _localSsdRecoveryTimeout. + * @member {"localSsdRecoveryTimeout"|undefined} _localSsdRecoveryTimeout + * @memberof google.cloud.backupdr.v1.Scheduling + * @instance + */ + Object.defineProperty(Scheduling.prototype, "_localSsdRecoveryTimeout", { + get: $util.oneOfGetter($oneOfFields = ["localSsdRecoveryTimeout"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Scheduling instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.Entry + * @memberof google.cloud.backupdr.v1.Scheduling * @static - * @param {google.cloud.backupdr.v1.IEntry=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Entry} Entry instance + * @param {google.cloud.backupdr.v1.IScheduling=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling instance */ - Entry.create = function create(properties) { - return new Entry(properties); + Scheduling.create = function create(properties) { + return new Scheduling(properties); }; /** - * Encodes the specified Entry message. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.Entry + * @memberof google.cloud.backupdr.v1.Scheduling * @static - * @param {google.cloud.backupdr.v1.IEntry} message Entry message or plain object to encode + * @param {google.cloud.backupdr.v1.IScheduling} message Scheduling message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encode = function encode(message, writer) { + Scheduling.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.onHostMaintenance != null && Object.hasOwnProperty.call(message, "onHostMaintenance")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.onHostMaintenance); + if (message.automaticRestart != null && Object.hasOwnProperty.call(message, "automaticRestart")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.automaticRestart); + if (message.preemptible != null && Object.hasOwnProperty.call(message, "preemptible")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preemptible); + if (message.nodeAffinities != null && message.nodeAffinities.length) + for (var i = 0; i < message.nodeAffinities.length; ++i) + $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.encode(message.nodeAffinities[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.minNodeCpus != null && Object.hasOwnProperty.call(message, "minNodeCpus")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.minNodeCpus); + if (message.provisioningModel != null && Object.hasOwnProperty.call(message, "provisioningModel")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.provisioningModel); + if (message.instanceTerminationAction != null && Object.hasOwnProperty.call(message, "instanceTerminationAction")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.instanceTerminationAction); + if (message.localSsdRecoveryTimeout != null && Object.hasOwnProperty.call(message, "localSsdRecoveryTimeout")) + $root.google.cloud.backupdr.v1.SchedulingDuration.encode(message.localSsdRecoveryTimeout, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified Entry message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Entry.verify|verify} messages. + * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Entry + * @memberof google.cloud.backupdr.v1.Scheduling * @static - * @param {google.cloud.backupdr.v1.IEntry} message Entry message or plain object to encode + * @param {google.cloud.backupdr.v1.IScheduling} message Scheduling message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Entry.encodeDelimited = function encodeDelimited(message, writer) { + Scheduling.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Entry message from the specified reader or buffer. + * Decodes a Scheduling message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.Entry + * @memberof google.cloud.backupdr.v1.Scheduling * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Entry} Entry + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decode = function decode(reader, length) { + Scheduling.decode = function 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.backupdr.v1.Entry(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.Scheduling(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.key = reader.string(); + message.onHostMaintenance = reader.int32(); break; } case 2: { - message.value = reader.string(); + message.automaticRestart = reader.bool(); + break; + } + case 3: { + message.preemptible = reader.bool(); + break; + } + case 4: { + if (!(message.nodeAffinities && message.nodeAffinities.length)) + message.nodeAffinities = []; + message.nodeAffinities.push($root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.decode(reader, reader.uint32())); + break; + } + case 5: { + message.minNodeCpus = reader.int32(); + break; + } + case 6: { + message.provisioningModel = reader.int32(); + break; + } + case 7: { + message.instanceTerminationAction = reader.int32(); + break; + } + case 10: { + message.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.decode(reader, reader.uint32()); break; } default: @@ -28511,139 +29030,690 @@ }; /** - * Decodes an Entry message from the specified reader or buffer, length delimited. + * Decodes a Scheduling message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Entry + * @memberof google.cloud.backupdr.v1.Scheduling * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Entry} Entry + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Entry.decodeDelimited = function decodeDelimited(reader) { + Scheduling.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Entry message. + * Verifies a Scheduling message. * @function verify - * @memberof google.cloud.backupdr.v1.Entry + * @memberof google.cloud.backupdr.v1.Scheduling * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Entry.verify = function verify(message) { + Scheduling.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.key != null && message.hasOwnProperty("key")) { - properties._key = 1; - if (!$util.isString(message.key)) - return "key: string expected"; + if (message.onHostMaintenance != null && message.hasOwnProperty("onHostMaintenance")) { + properties._onHostMaintenance = 1; + switch (message.onHostMaintenance) { + default: + return "onHostMaintenance: enum value expected"; + case 0: + case 1: + case 1000: + break; + } } - if (message.value != null && message.hasOwnProperty("value")) { - properties._value = 1; - if (!$util.isString(message.value)) - return "value: string expected"; + if (message.automaticRestart != null && message.hasOwnProperty("automaticRestart")) { + properties._automaticRestart = 1; + if (typeof message.automaticRestart !== "boolean") + return "automaticRestart: boolean expected"; + } + if (message.preemptible != null && message.hasOwnProperty("preemptible")) { + properties._preemptible = 1; + if (typeof message.preemptible !== "boolean") + return "preemptible: boolean expected"; + } + if (message.nodeAffinities != null && message.hasOwnProperty("nodeAffinities")) { + if (!Array.isArray(message.nodeAffinities)) + return "nodeAffinities: array expected"; + for (var i = 0; i < message.nodeAffinities.length; ++i) { + var error = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify(message.nodeAffinities[i]); + if (error) + return "nodeAffinities." + error; + } + } + if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { + properties._minNodeCpus = 1; + if (!$util.isInteger(message.minNodeCpus)) + return "minNodeCpus: integer expected"; + } + if (message.provisioningModel != null && message.hasOwnProperty("provisioningModel")) { + properties._provisioningModel = 1; + switch (message.provisioningModel) { + default: + return "provisioningModel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.instanceTerminationAction != null && message.hasOwnProperty("instanceTerminationAction")) { + properties._instanceTerminationAction = 1; + switch (message.instanceTerminationAction) { + default: + return "instanceTerminationAction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.localSsdRecoveryTimeout != null && message.hasOwnProperty("localSsdRecoveryTimeout")) { + properties._localSsdRecoveryTimeout = 1; + { + var error = $root.google.cloud.backupdr.v1.SchedulingDuration.verify(message.localSsdRecoveryTimeout); + if (error) + return "localSsdRecoveryTimeout." + error; + } } return null; }; /** - * Creates an Entry message from a plain object. Also converts values to their respective internal types. + * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.Entry + * @memberof google.cloud.backupdr.v1.Scheduling * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Entry} Entry + * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling */ - Entry.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Entry) + Scheduling.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Scheduling) return object; - var message = new $root.google.cloud.backupdr.v1.Entry(); - if (object.key != null) - message.key = String(object.key); - if (object.value != null) - message.value = String(object.value); + var message = new $root.google.cloud.backupdr.v1.Scheduling(); + switch (object.onHostMaintenance) { + default: + if (typeof object.onHostMaintenance === "number") { + message.onHostMaintenance = object.onHostMaintenance; + break; + } + break; + case "ON_HOST_MAINTENANCE_UNSPECIFIED": + case 0: + message.onHostMaintenance = 0; + break; + case "TERMINATE": + case 1: + message.onHostMaintenance = 1; + break; + case "MIGRATE": + case 1000: + message.onHostMaintenance = 1000; + break; + } + if (object.automaticRestart != null) + message.automaticRestart = Boolean(object.automaticRestart); + if (object.preemptible != null) + message.preemptible = Boolean(object.preemptible); + if (object.nodeAffinities) { + if (!Array.isArray(object.nodeAffinities)) + throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: array expected"); + message.nodeAffinities = []; + for (var i = 0; i < object.nodeAffinities.length; ++i) { + if (typeof object.nodeAffinities[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: object expected"); + message.nodeAffinities[i] = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.fromObject(object.nodeAffinities[i]); + } + } + if (object.minNodeCpus != null) + message.minNodeCpus = object.minNodeCpus | 0; + switch (object.provisioningModel) { + default: + if (typeof object.provisioningModel === "number") { + message.provisioningModel = object.provisioningModel; + break; + } + break; + case "PROVISIONING_MODEL_UNSPECIFIED": + case 0: + message.provisioningModel = 0; + break; + case "STANDARD": + case 1: + message.provisioningModel = 1; + break; + case "SPOT": + case 2: + message.provisioningModel = 2; + break; + } + switch (object.instanceTerminationAction) { + default: + if (typeof object.instanceTerminationAction === "number") { + message.instanceTerminationAction = object.instanceTerminationAction; + break; + } + break; + case "INSTANCE_TERMINATION_ACTION_UNSPECIFIED": + case 0: + message.instanceTerminationAction = 0; + break; + case "DELETE": + case 1: + message.instanceTerminationAction = 1; + break; + case "STOP": + case 2: + message.instanceTerminationAction = 2; + break; + } + if (object.localSsdRecoveryTimeout != null) { + if (typeof object.localSsdRecoveryTimeout !== "object") + throw TypeError(".google.cloud.backupdr.v1.Scheduling.localSsdRecoveryTimeout: object expected"); + message.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.fromObject(object.localSsdRecoveryTimeout); + } return message; }; /** - * Creates a plain object from an Entry message. Also converts values to other types if specified. + * Creates a plain object from a Scheduling message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.Entry + * @memberof google.cloud.backupdr.v1.Scheduling * @static - * @param {google.cloud.backupdr.v1.Entry} message Entry + * @param {google.cloud.backupdr.v1.Scheduling} message Scheduling * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Entry.toObject = function toObject(message, options) { + Scheduling.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.key != null && message.hasOwnProperty("key")) { - object.key = message.key; + if (options.arrays || options.defaults) + object.nodeAffinities = []; + if (message.onHostMaintenance != null && message.hasOwnProperty("onHostMaintenance")) { + object.onHostMaintenance = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.OnHostMaintenance[message.onHostMaintenance] === undefined ? message.onHostMaintenance : $root.google.cloud.backupdr.v1.Scheduling.OnHostMaintenance[message.onHostMaintenance] : message.onHostMaintenance; if (options.oneofs) - object._key = "key"; + object._onHostMaintenance = "onHostMaintenance"; } - if (message.value != null && message.hasOwnProperty("value")) { - object.value = message.value; + if (message.automaticRestart != null && message.hasOwnProperty("automaticRestart")) { + object.automaticRestart = message.automaticRestart; if (options.oneofs) - object._value = "value"; + object._automaticRestart = "automaticRestart"; + } + if (message.preemptible != null && message.hasOwnProperty("preemptible")) { + object.preemptible = message.preemptible; + if (options.oneofs) + object._preemptible = "preemptible"; + } + if (message.nodeAffinities && message.nodeAffinities.length) { + object.nodeAffinities = []; + for (var j = 0; j < message.nodeAffinities.length; ++j) + object.nodeAffinities[j] = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.toObject(message.nodeAffinities[j], options); + } + if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { + object.minNodeCpus = message.minNodeCpus; + if (options.oneofs) + object._minNodeCpus = "minNodeCpus"; + } + if (message.provisioningModel != null && message.hasOwnProperty("provisioningModel")) { + object.provisioningModel = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.ProvisioningModel[message.provisioningModel] === undefined ? message.provisioningModel : $root.google.cloud.backupdr.v1.Scheduling.ProvisioningModel[message.provisioningModel] : message.provisioningModel; + if (options.oneofs) + object._provisioningModel = "provisioningModel"; + } + if (message.instanceTerminationAction != null && message.hasOwnProperty("instanceTerminationAction")) { + object.instanceTerminationAction = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction[message.instanceTerminationAction] === undefined ? message.instanceTerminationAction : $root.google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction[message.instanceTerminationAction] : message.instanceTerminationAction; + if (options.oneofs) + object._instanceTerminationAction = "instanceTerminationAction"; + } + if (message.localSsdRecoveryTimeout != null && message.hasOwnProperty("localSsdRecoveryTimeout")) { + object.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.toObject(message.localSsdRecoveryTimeout, options); + if (options.oneofs) + object._localSsdRecoveryTimeout = "localSsdRecoveryTimeout"; } return object; }; /** - * Converts this Entry to JSON. + * Converts this Scheduling to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.Entry + * @memberof google.cloud.backupdr.v1.Scheduling * @instance * @returns {Object.} JSON object */ - Entry.prototype.toJSON = function toJSON() { + Scheduling.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Entry + * Gets the default type url for Scheduling * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Entry + * @memberof google.cloud.backupdr.v1.Scheduling * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Entry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Scheduling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Entry"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.Scheduling"; }; - return Entry; - })(); - - v1.Metadata = (function() { - - /** - * Properties of a Metadata. - * @memberof google.cloud.backupdr.v1 - * @interface IMetadata - * @property {Array.|null} [items] Metadata items - */ - /** - * Constructs a new Metadata. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a Metadata. - * @implements IMetadata + * OnHostMaintenance enum. + * @name google.cloud.backupdr.v1.Scheduling.OnHostMaintenance + * @enum {number} + * @property {number} ON_HOST_MAINTENANCE_UNSPECIFIED=0 ON_HOST_MAINTENANCE_UNSPECIFIED value + * @property {number} TERMINATE=1 TERMINATE value + * @property {number} MIGRATE=1000 MIGRATE value + */ + Scheduling.OnHostMaintenance = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ON_HOST_MAINTENANCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TERMINATE"] = 1; + values[valuesById[1000] = "MIGRATE"] = 1000; + return values; + })(); + + Scheduling.NodeAffinity = (function() { + + /** + * Properties of a NodeAffinity. + * @memberof google.cloud.backupdr.v1.Scheduling + * @interface INodeAffinity + * @property {string|null} [key] NodeAffinity key + * @property {google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null} [operator] NodeAffinity operator + * @property {Array.|null} [values] NodeAffinity values + */ + + /** + * Constructs a new NodeAffinity. + * @memberof google.cloud.backupdr.v1.Scheduling + * @classdesc Represents a NodeAffinity. + * @implements INodeAffinity + * @constructor + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity=} [properties] Properties to set + */ + function NodeAffinity(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeAffinity key. + * @member {string|null|undefined} key + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + NodeAffinity.prototype.key = null; + + /** + * NodeAffinity operator. + * @member {google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null|undefined} operator + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + NodeAffinity.prototype.operator = null; + + /** + * NodeAffinity values. + * @member {Array.} values + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + NodeAffinity.prototype.values = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NodeAffinity _key. + * @member {"key"|undefined} _key + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + Object.defineProperty(NodeAffinity.prototype, "_key", { + get: $util.oneOfGetter($oneOfFields = ["key"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * NodeAffinity _operator. + * @member {"operator"|undefined} _operator + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + */ + Object.defineProperty(NodeAffinity.prototype, "_operator", { + get: $util.oneOfGetter($oneOfFields = ["operator"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NodeAffinity instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity instance + */ + NodeAffinity.create = function create(properties) { + return new NodeAffinity(properties); + }; + + /** + * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity} message NodeAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeAffinity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.operator != null && Object.hasOwnProperty.call(message, "operator")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operator); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity} message NodeAffinity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeAffinity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeAffinity.decode = function 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.backupdr.v1.Scheduling.NodeAffinity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.operator = reader.int32(); + break; + } + case 3: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeAffinity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeAffinity message. + * @function verify + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeAffinity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) { + properties._key = 1; + if (!$util.isString(message.key)) + return "key: string expected"; + } + if (message.operator != null && message.hasOwnProperty("operator")) { + properties._operator = 1; + switch (message.operator) { + default: + return "operator: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity + */ + NodeAffinity.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity) + return object; + var message = new $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity(); + if (object.key != null) + message.key = String(object.key); + switch (object.operator) { + default: + if (typeof object.operator === "number") { + message.operator = object.operator; + break; + } + break; + case "OPERATOR_UNSPECIFIED": + case 0: + message.operator = 0; + break; + case "IN": + case 1: + message.operator = 1; + break; + case "NOT_IN": + case 2: + message.operator = 2; + break; + } + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.cloud.backupdr.v1.Scheduling.NodeAffinity.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {google.cloud.backupdr.v1.Scheduling.NodeAffinity} message NodeAffinity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeAffinity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.key != null && message.hasOwnProperty("key")) { + object.key = message.key; + if (options.oneofs) + object._key = "key"; + } + if (message.operator != null && message.hasOwnProperty("operator")) { + object.operator = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator[message.operator] === undefined ? message.operator : $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator[message.operator] : message.operator; + if (options.oneofs) + object._operator = "operator"; + } + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + return object; + }; + + /** + * Converts this NodeAffinity to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @instance + * @returns {Object.} JSON object + */ + NodeAffinity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeAffinity + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.Scheduling.NodeAffinity"; + }; + + /** + * Operator enum. + * @name google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator + * @enum {number} + * @property {number} OPERATOR_UNSPECIFIED=0 OPERATOR_UNSPECIFIED value + * @property {number} IN=1 IN value + * @property {number} NOT_IN=2 NOT_IN value + */ + NodeAffinity.Operator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "IN"] = 1; + values[valuesById[2] = "NOT_IN"] = 2; + return values; + })(); + + return NodeAffinity; + })(); + + /** + * ProvisioningModel enum. + * @name google.cloud.backupdr.v1.Scheduling.ProvisioningModel + * @enum {number} + * @property {number} PROVISIONING_MODEL_UNSPECIFIED=0 PROVISIONING_MODEL_UNSPECIFIED value + * @property {number} STANDARD=1 STANDARD value + * @property {number} SPOT=2 SPOT value + */ + Scheduling.ProvisioningModel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROVISIONING_MODEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD"] = 1; + values[valuesById[2] = "SPOT"] = 2; + return values; + })(); + + /** + * InstanceTerminationAction enum. + * @name google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction + * @enum {number} + * @property {number} INSTANCE_TERMINATION_ACTION_UNSPECIFIED=0 INSTANCE_TERMINATION_ACTION_UNSPECIFIED value + * @property {number} DELETE=1 DELETE value + * @property {number} STOP=2 STOP value + */ + Scheduling.InstanceTerminationAction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INSTANCE_TERMINATION_ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "DELETE"] = 1; + values[valuesById[2] = "STOP"] = 2; + return values; + })(); + + return Scheduling; + })(); + + v1.SchedulingDuration = (function() { + + /** + * Properties of a SchedulingDuration. + * @memberof google.cloud.backupdr.v1 + * @interface ISchedulingDuration + * @property {number|Long|null} [seconds] SchedulingDuration seconds + * @property {number|null} [nanos] SchedulingDuration nanos + */ + + /** + * Constructs a new SchedulingDuration. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a SchedulingDuration. + * @implements ISchedulingDuration * @constructor - * @param {google.cloud.backupdr.v1.IMetadata=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.ISchedulingDuration=} [properties] Properties to set */ - function Metadata(properties) { - this.items = []; + function SchedulingDuration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28651,78 +29721,114 @@ } /** - * Metadata items. - * @member {Array.} items - * @memberof google.cloud.backupdr.v1.Metadata + * SchedulingDuration seconds. + * @member {number|Long|null|undefined} seconds + * @memberof google.cloud.backupdr.v1.SchedulingDuration * @instance */ - Metadata.prototype.items = $util.emptyArray; + SchedulingDuration.prototype.seconds = null; /** - * Creates a new Metadata instance using the specified properties. + * SchedulingDuration nanos. + * @member {number|null|undefined} nanos + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + SchedulingDuration.prototype.nanos = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SchedulingDuration _seconds. + * @member {"seconds"|undefined} _seconds + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + Object.defineProperty(SchedulingDuration.prototype, "_seconds", { + get: $util.oneOfGetter($oneOfFields = ["seconds"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SchedulingDuration _nanos. + * @member {"nanos"|undefined} _nanos + * @memberof google.cloud.backupdr.v1.SchedulingDuration + * @instance + */ + Object.defineProperty(SchedulingDuration.prototype, "_nanos", { + get: $util.oneOfGetter($oneOfFields = ["nanos"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SchedulingDuration instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.Metadata + * @memberof google.cloud.backupdr.v1.SchedulingDuration * @static - * @param {google.cloud.backupdr.v1.IMetadata=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Metadata} Metadata instance + * @param {google.cloud.backupdr.v1.ISchedulingDuration=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration instance */ - Metadata.create = function create(properties) { - return new Metadata(properties); + SchedulingDuration.create = function create(properties) { + return new SchedulingDuration(properties); }; /** - * Encodes the specified Metadata message. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.Metadata + * @memberof google.cloud.backupdr.v1.SchedulingDuration * @static - * @param {google.cloud.backupdr.v1.IMetadata} message Metadata message or plain object to encode + * @param {google.cloud.backupdr.v1.ISchedulingDuration} message SchedulingDuration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Metadata.encode = function encode(message, writer) { + SchedulingDuration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.items != null && message.items.length) - for (var i = 0; i < message.items.length; ++i) - $root.google.cloud.backupdr.v1.Entry.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + 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 Metadata message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Metadata.verify|verify} messages. + * Encodes the specified SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Metadata + * @memberof google.cloud.backupdr.v1.SchedulingDuration * @static - * @param {google.cloud.backupdr.v1.IMetadata} message Metadata message or plain object to encode + * @param {google.cloud.backupdr.v1.ISchedulingDuration} message SchedulingDuration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Metadata.encodeDelimited = function encodeDelimited(message, writer) { + SchedulingDuration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Metadata message from the specified reader or buffer. + * Decodes a SchedulingDuration message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.Metadata + * @memberof google.cloud.backupdr.v1.SchedulingDuration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Metadata} Metadata + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metadata.decode = function decode(reader, length) { + SchedulingDuration.decode = function 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.backupdr.v1.Metadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.SchedulingDuration(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.items && message.items.length)) - message.items = []; - message.items.push($root.google.cloud.backupdr.v1.Entry.decode(reader, reader.uint32())); + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); break; } default: @@ -28734,155 +29840,150 @@ }; /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. + * Decodes a SchedulingDuration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Metadata + * @memberof google.cloud.backupdr.v1.SchedulingDuration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Metadata} Metadata + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Metadata.decodeDelimited = function decodeDelimited(reader) { + SchedulingDuration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Metadata message. + * Verifies a SchedulingDuration message. * @function verify - * @memberof google.cloud.backupdr.v1.Metadata + * @memberof google.cloud.backupdr.v1.SchedulingDuration * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Metadata.verify = function verify(message) { + SchedulingDuration.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.items != null && message.hasOwnProperty("items")) { - if (!Array.isArray(message.items)) - return "items: array expected"; - for (var i = 0; i < message.items.length; ++i) { - var error = $root.google.cloud.backupdr.v1.Entry.verify(message.items[i]); - if (error) - return "items." + error; - } + var properties = {}; + if (message.seconds != null && message.hasOwnProperty("seconds")) { + properties._seconds = 1; + 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")) { + properties._nanos = 1; + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; } return null; }; /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.Metadata + * @memberof google.cloud.backupdr.v1.SchedulingDuration * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Metadata} Metadata + * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration */ - Metadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Metadata) + SchedulingDuration.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.SchedulingDuration) return object; - var message = new $root.google.cloud.backupdr.v1.Metadata(); - if (object.items) { - if (!Array.isArray(object.items)) - throw TypeError(".google.cloud.backupdr.v1.Metadata.items: array expected"); - message.items = []; - for (var i = 0; i < object.items.length; ++i) { - if (typeof object.items[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.Metadata.items: object expected"); - message.items[i] = $root.google.cloud.backupdr.v1.Entry.fromObject(object.items[i]); - } - } + var message = new $root.google.cloud.backupdr.v1.SchedulingDuration(); + 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 Metadata message. Also converts values to other types if specified. + * Creates a plain object from a SchedulingDuration message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.Metadata + * @memberof google.cloud.backupdr.v1.SchedulingDuration * @static - * @param {google.cloud.backupdr.v1.Metadata} message Metadata + * @param {google.cloud.backupdr.v1.SchedulingDuration} message SchedulingDuration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Metadata.toObject = function toObject(message, options) { + SchedulingDuration.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.items = []; - if (message.items && message.items.length) { - object.items = []; - for (var j = 0; j < message.items.length; ++j) - object.items[j] = $root.google.cloud.backupdr.v1.Entry.toObject(message.items[j], options); + 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 (options.oneofs) + object._seconds = "seconds"; + } + if (message.nanos != null && message.hasOwnProperty("nanos")) { + object.nanos = message.nanos; + if (options.oneofs) + object._nanos = "nanos"; } return object; }; /** - * Converts this Metadata to JSON. + * Converts this SchedulingDuration to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.Metadata + * @memberof google.cloud.backupdr.v1.SchedulingDuration * @instance * @returns {Object.} JSON object */ - Metadata.prototype.toJSON = function toJSON() { + SchedulingDuration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Metadata + * Gets the default type url for SchedulingDuration * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Metadata + * @memberof google.cloud.backupdr.v1.SchedulingDuration * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Metadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SchedulingDuration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Metadata"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.SchedulingDuration"; }; - return Metadata; + return SchedulingDuration; })(); - v1.NetworkInterface = (function() { + v1.ServiceAccount = (function() { /** - * Properties of a NetworkInterface. + * Properties of a ServiceAccount. * @memberof google.cloud.backupdr.v1 - * @interface INetworkInterface - * @property {string|null} [network] NetworkInterface network - * @property {string|null} [subnetwork] NetworkInterface subnetwork - * @property {string|null} [ipAddress] NetworkInterface ipAddress - * @property {string|null} [ipv6Address] NetworkInterface ipv6Address - * @property {number|null} [internalIpv6PrefixLength] NetworkInterface internalIpv6PrefixLength - * @property {string|null} [name] NetworkInterface name - * @property {Array.|null} [accessConfigs] NetworkInterface accessConfigs - * @property {Array.|null} [ipv6AccessConfigs] NetworkInterface ipv6AccessConfigs - * @property {Array.|null} [aliasIpRanges] NetworkInterface aliasIpRanges - * @property {google.cloud.backupdr.v1.NetworkInterface.StackType|null} [stackType] NetworkInterface stackType - * @property {google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null} [ipv6AccessType] NetworkInterface ipv6AccessType - * @property {number|null} [queueCount] NetworkInterface queueCount - * @property {google.cloud.backupdr.v1.NetworkInterface.NicType|null} [nicType] NetworkInterface nicType - * @property {string|null} [networkAttachment] NetworkInterface networkAttachment + * @interface IServiceAccount + * @property {string|null} [email] ServiceAccount email + * @property {Array.|null} [scopes] ServiceAccount scopes */ /** - * Constructs a new NetworkInterface. + * Constructs a new ServiceAccount. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a NetworkInterface. - * @implements INetworkInterface + * @classdesc Represents a ServiceAccount. + * @implements IServiceAccount * @constructor - * @param {google.cloud.backupdr.v1.INetworkInterface=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IServiceAccount=} [properties] Properties to set */ - function NetworkInterface(properties) { - this.accessConfigs = []; - this.ipv6AccessConfigs = []; - this.aliasIpRanges = []; + function ServiceAccount(properties) { + this.scopes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28890,390 +29991,106 @@ } /** - * NetworkInterface network. - * @member {string|null|undefined} network - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.network = null; - - /** - * NetworkInterface subnetwork. - * @member {string|null|undefined} subnetwork - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.subnetwork = null; - - /** - * NetworkInterface ipAddress. - * @member {string|null|undefined} ipAddress - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.ipAddress = null; - - /** - * NetworkInterface ipv6Address. - * @member {string|null|undefined} ipv6Address - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.ipv6Address = null; - - /** - * NetworkInterface internalIpv6PrefixLength. - * @member {number|null|undefined} internalIpv6PrefixLength - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.internalIpv6PrefixLength = null; - - /** - * NetworkInterface name. - * @member {string|null|undefined} name - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.name = null; - - /** - * NetworkInterface accessConfigs. - * @member {Array.} accessConfigs - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.accessConfigs = $util.emptyArray; - - /** - * NetworkInterface ipv6AccessConfigs. - * @member {Array.} ipv6AccessConfigs - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.ipv6AccessConfigs = $util.emptyArray; - - /** - * NetworkInterface aliasIpRanges. - * @member {Array.} aliasIpRanges - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.aliasIpRanges = $util.emptyArray; - - /** - * NetworkInterface stackType. - * @member {google.cloud.backupdr.v1.NetworkInterface.StackType|null|undefined} stackType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.stackType = null; - - /** - * NetworkInterface ipv6AccessType. - * @member {google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType|null|undefined} ipv6AccessType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.ipv6AccessType = null; - - /** - * NetworkInterface queueCount. - * @member {number|null|undefined} queueCount - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - NetworkInterface.prototype.queueCount = null; - - /** - * NetworkInterface nicType. - * @member {google.cloud.backupdr.v1.NetworkInterface.NicType|null|undefined} nicType - * @memberof google.cloud.backupdr.v1.NetworkInterface + * ServiceAccount email. + * @member {string|null|undefined} email + * @memberof google.cloud.backupdr.v1.ServiceAccount * @instance */ - NetworkInterface.prototype.nicType = null; + ServiceAccount.prototype.email = null; /** - * NetworkInterface networkAttachment. - * @member {string|null|undefined} networkAttachment - * @memberof google.cloud.backupdr.v1.NetworkInterface + * ServiceAccount scopes. + * @member {Array.} scopes + * @memberof google.cloud.backupdr.v1.ServiceAccount * @instance */ - NetworkInterface.prototype.networkAttachment = null; + ServiceAccount.prototype.scopes = $util.emptyArray; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * NetworkInterface _network. - * @member {"network"|undefined} _network - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_network", { - get: $util.oneOfGetter($oneOfFields = ["network"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _subnetwork. - * @member {"subnetwork"|undefined} _subnetwork - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_subnetwork", { - get: $util.oneOfGetter($oneOfFields = ["subnetwork"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _ipAddress. - * @member {"ipAddress"|undefined} _ipAddress - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_ipAddress", { - get: $util.oneOfGetter($oneOfFields = ["ipAddress"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _ipv6Address. - * @member {"ipv6Address"|undefined} _ipv6Address - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_ipv6Address", { - get: $util.oneOfGetter($oneOfFields = ["ipv6Address"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _internalIpv6PrefixLength. - * @member {"internalIpv6PrefixLength"|undefined} _internalIpv6PrefixLength - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_internalIpv6PrefixLength", { - get: $util.oneOfGetter($oneOfFields = ["internalIpv6PrefixLength"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _name. - * @member {"name"|undefined} _name - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _stackType. - * @member {"stackType"|undefined} _stackType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_stackType", { - get: $util.oneOfGetter($oneOfFields = ["stackType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _ipv6AccessType. - * @member {"ipv6AccessType"|undefined} _ipv6AccessType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_ipv6AccessType", { - get: $util.oneOfGetter($oneOfFields = ["ipv6AccessType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _queueCount. - * @member {"queueCount"|undefined} _queueCount - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_queueCount", { - get: $util.oneOfGetter($oneOfFields = ["queueCount"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _nicType. - * @member {"nicType"|undefined} _nicType - * @memberof google.cloud.backupdr.v1.NetworkInterface - * @instance - */ - Object.defineProperty(NetworkInterface.prototype, "_nicType", { - get: $util.oneOfGetter($oneOfFields = ["nicType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NetworkInterface _networkAttachment. - * @member {"networkAttachment"|undefined} _networkAttachment - * @memberof google.cloud.backupdr.v1.NetworkInterface + * ServiceAccount _email. + * @member {"email"|undefined} _email + * @memberof google.cloud.backupdr.v1.ServiceAccount * @instance */ - Object.defineProperty(NetworkInterface.prototype, "_networkAttachment", { - get: $util.oneOfGetter($oneOfFields = ["networkAttachment"]), + Object.defineProperty(ServiceAccount.prototype, "_email", { + get: $util.oneOfGetter($oneOfFields = ["email"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new NetworkInterface instance using the specified properties. + * Creates a new ServiceAccount instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.NetworkInterface + * @memberof google.cloud.backupdr.v1.ServiceAccount * @static - * @param {google.cloud.backupdr.v1.INetworkInterface=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface instance + * @param {google.cloud.backupdr.v1.IServiceAccount=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount instance */ - NetworkInterface.create = function create(properties) { - return new NetworkInterface(properties); + ServiceAccount.create = function create(properties) { + return new ServiceAccount(properties); }; /** - * Encodes the specified NetworkInterface message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.NetworkInterface + * @memberof google.cloud.backupdr.v1.ServiceAccount * @static - * @param {google.cloud.backupdr.v1.INetworkInterface} message NetworkInterface message or plain object to encode + * @param {google.cloud.backupdr.v1.IServiceAccount} message ServiceAccount message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NetworkInterface.encode = function encode(message, writer) { + ServiceAccount.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.network); - if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetwork); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); - if (message.ipv6Address != null && Object.hasOwnProperty.call(message, "ipv6Address")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipv6Address); - if (message.internalIpv6PrefixLength != null && Object.hasOwnProperty.call(message, "internalIpv6PrefixLength")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.internalIpv6PrefixLength); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.name); - if (message.accessConfigs != null && message.accessConfigs.length) - for (var i = 0; i < message.accessConfigs.length; ++i) - $root.google.cloud.backupdr.v1.AccessConfig.encode(message.accessConfigs[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.ipv6AccessConfigs != null && message.ipv6AccessConfigs.length) - for (var i = 0; i < message.ipv6AccessConfigs.length; ++i) - $root.google.cloud.backupdr.v1.AccessConfig.encode(message.ipv6AccessConfigs[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.aliasIpRanges != null && message.aliasIpRanges.length) - for (var i = 0; i < message.aliasIpRanges.length; ++i) - $root.google.cloud.backupdr.v1.AliasIpRange.encode(message.aliasIpRanges[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.stackType != null && Object.hasOwnProperty.call(message, "stackType")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.stackType); - if (message.ipv6AccessType != null && Object.hasOwnProperty.call(message, "ipv6AccessType")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.ipv6AccessType); - if (message.queueCount != null && Object.hasOwnProperty.call(message, "queueCount")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.queueCount); - if (message.nicType != null && Object.hasOwnProperty.call(message, "nicType")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.nicType); - if (message.networkAttachment != null && Object.hasOwnProperty.call(message, "networkAttachment")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.networkAttachment); + if (message.email != null && Object.hasOwnProperty.call(message, "email")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.email); + if (message.scopes != null && message.scopes.length) + for (var i = 0; i < message.scopes.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.scopes[i]); return writer; }; /** - * Encodes the specified NetworkInterface message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkInterface.verify|verify} messages. + * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkInterface + * @memberof google.cloud.backupdr.v1.ServiceAccount * @static - * @param {google.cloud.backupdr.v1.INetworkInterface} message NetworkInterface message or plain object to encode + * @param {google.cloud.backupdr.v1.IServiceAccount} message ServiceAccount message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NetworkInterface.encodeDelimited = function encodeDelimited(message, writer) { + ServiceAccount.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NetworkInterface message from the specified reader or buffer. + * Decodes a ServiceAccount message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.NetworkInterface + * @memberof google.cloud.backupdr.v1.ServiceAccount * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NetworkInterface.decode = function decode(reader, length) { + ServiceAccount.decode = function 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.backupdr.v1.NetworkInterface(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.ServiceAccount(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.network = reader.string(); + message.email = reader.string(); break; } case 2: { - message.subnetwork = reader.string(); - break; - } - case 3: { - message.ipAddress = reader.string(); - break; - } - case 4: { - message.ipv6Address = reader.string(); - break; - } - case 5: { - message.internalIpv6PrefixLength = reader.int32(); - break; - } - case 6: { - message.name = reader.string(); - break; - } - case 7: { - if (!(message.accessConfigs && message.accessConfigs.length)) - message.accessConfigs = []; - message.accessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.ipv6AccessConfigs && message.ipv6AccessConfigs.length)) - message.ipv6AccessConfigs = []; - message.ipv6AccessConfigs.push($root.google.cloud.backupdr.v1.AccessConfig.decode(reader, reader.uint32())); - break; - } - case 9: { - if (!(message.aliasIpRanges && message.aliasIpRanges.length)) - message.aliasIpRanges = []; - message.aliasIpRanges.push($root.google.cloud.backupdr.v1.AliasIpRange.decode(reader, reader.uint32())); - break; - } - case 10: { - message.stackType = reader.int32(); - break; - } - case 11: { - message.ipv6AccessType = reader.int32(); - break; - } - case 12: { - message.queueCount = reader.int32(); - break; - } - case 13: { - message.nicType = reader.int32(); - break; - } - case 14: { - message.networkAttachment = reader.string(); + if (!(message.scopes && message.scopes.length)) + message.scopes = []; + message.scopes.push(reader.string()); break; } default: @@ -29285,443 +30102,148 @@ }; /** - * Decodes a NetworkInterface message from the specified reader or buffer, length delimited. + * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkInterface + * @memberof google.cloud.backupdr.v1.ServiceAccount * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NetworkInterface.decodeDelimited = function decodeDelimited(reader) { + ServiceAccount.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NetworkInterface message. + * Verifies a ServiceAccount message. * @function verify - * @memberof google.cloud.backupdr.v1.NetworkInterface + * @memberof google.cloud.backupdr.v1.ServiceAccount * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NetworkInterface.verify = function verify(message) { + ServiceAccount.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.network != null && message.hasOwnProperty("network")) { - properties._network = 1; - if (!$util.isString(message.network)) - return "network: string expected"; - } - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { - properties._subnetwork = 1; - if (!$util.isString(message.subnetwork)) - return "subnetwork: string expected"; - } - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) { - properties._ipAddress = 1; - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - } - if (message.ipv6Address != null && message.hasOwnProperty("ipv6Address")) { - properties._ipv6Address = 1; - if (!$util.isString(message.ipv6Address)) - return "ipv6Address: string expected"; - } - if (message.internalIpv6PrefixLength != null && message.hasOwnProperty("internalIpv6PrefixLength")) { - properties._internalIpv6PrefixLength = 1; - if (!$util.isInteger(message.internalIpv6PrefixLength)) - return "internalIpv6PrefixLength: integer expected"; - } - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.accessConfigs != null && message.hasOwnProperty("accessConfigs")) { - if (!Array.isArray(message.accessConfigs)) - return "accessConfigs: array expected"; - for (var i = 0; i < message.accessConfigs.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AccessConfig.verify(message.accessConfigs[i]); - if (error) - return "accessConfigs." + error; - } - } - if (message.ipv6AccessConfigs != null && message.hasOwnProperty("ipv6AccessConfigs")) { - if (!Array.isArray(message.ipv6AccessConfigs)) - return "ipv6AccessConfigs: array expected"; - for (var i = 0; i < message.ipv6AccessConfigs.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AccessConfig.verify(message.ipv6AccessConfigs[i]); - if (error) - return "ipv6AccessConfigs." + error; - } - } - if (message.aliasIpRanges != null && message.hasOwnProperty("aliasIpRanges")) { - if (!Array.isArray(message.aliasIpRanges)) - return "aliasIpRanges: array expected"; - for (var i = 0; i < message.aliasIpRanges.length; ++i) { - var error = $root.google.cloud.backupdr.v1.AliasIpRange.verify(message.aliasIpRanges[i]); - if (error) - return "aliasIpRanges." + error; - } - } - if (message.stackType != null && message.hasOwnProperty("stackType")) { - properties._stackType = 1; - switch (message.stackType) { - default: - return "stackType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { - properties._ipv6AccessType = 1; - switch (message.ipv6AccessType) { - default: - return "ipv6AccessType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.queueCount != null && message.hasOwnProperty("queueCount")) { - properties._queueCount = 1; - if (!$util.isInteger(message.queueCount)) - return "queueCount: integer expected"; - } - if (message.nicType != null && message.hasOwnProperty("nicType")) { - properties._nicType = 1; - switch (message.nicType) { - default: - return "nicType: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.email != null && message.hasOwnProperty("email")) { + properties._email = 1; + if (!$util.isString(message.email)) + return "email: string expected"; } - if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) { - properties._networkAttachment = 1; - if (!$util.isString(message.networkAttachment)) - return "networkAttachment: string expected"; + if (message.scopes != null && message.hasOwnProperty("scopes")) { + if (!Array.isArray(message.scopes)) + return "scopes: array expected"; + for (var i = 0; i < message.scopes.length; ++i) + if (!$util.isString(message.scopes[i])) + return "scopes: string[] expected"; } return null; }; /** - * Creates a NetworkInterface message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.NetworkInterface + * @memberof google.cloud.backupdr.v1.ServiceAccount * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.NetworkInterface} NetworkInterface + * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount */ - NetworkInterface.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.NetworkInterface) + ServiceAccount.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.ServiceAccount) return object; - var message = new $root.google.cloud.backupdr.v1.NetworkInterface(); - if (object.network != null) - message.network = String(object.network); - if (object.subnetwork != null) - message.subnetwork = String(object.subnetwork); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.ipv6Address != null) - message.ipv6Address = String(object.ipv6Address); - if (object.internalIpv6PrefixLength != null) - message.internalIpv6PrefixLength = object.internalIpv6PrefixLength | 0; - if (object.name != null) - message.name = String(object.name); - if (object.accessConfigs) { - if (!Array.isArray(object.accessConfigs)) - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: array expected"); - message.accessConfigs = []; - for (var i = 0; i < object.accessConfigs.length; ++i) { - if (typeof object.accessConfigs[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.accessConfigs: object expected"); - message.accessConfigs[i] = $root.google.cloud.backupdr.v1.AccessConfig.fromObject(object.accessConfigs[i]); - } - } - if (object.ipv6AccessConfigs) { - if (!Array.isArray(object.ipv6AccessConfigs)) - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.ipv6AccessConfigs: array expected"); - message.ipv6AccessConfigs = []; - for (var i = 0; i < object.ipv6AccessConfigs.length; ++i) { - if (typeof object.ipv6AccessConfigs[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.ipv6AccessConfigs: object expected"); - message.ipv6AccessConfigs[i] = $root.google.cloud.backupdr.v1.AccessConfig.fromObject(object.ipv6AccessConfigs[i]); - } - } - if (object.aliasIpRanges) { - if (!Array.isArray(object.aliasIpRanges)) - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.aliasIpRanges: array expected"); - message.aliasIpRanges = []; - for (var i = 0; i < object.aliasIpRanges.length; ++i) { - if (typeof object.aliasIpRanges[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.NetworkInterface.aliasIpRanges: object expected"); - message.aliasIpRanges[i] = $root.google.cloud.backupdr.v1.AliasIpRange.fromObject(object.aliasIpRanges[i]); - } - } - switch (object.stackType) { - default: - if (typeof object.stackType === "number") { - message.stackType = object.stackType; - break; - } - break; - case "STACK_TYPE_UNSPECIFIED": - case 0: - message.stackType = 0; - break; - case "IPV4_ONLY": - case 1: - message.stackType = 1; - break; - case "IPV4_IPV6": - case 2: - message.stackType = 2; - break; - } - switch (object.ipv6AccessType) { - default: - if (typeof object.ipv6AccessType === "number") { - message.ipv6AccessType = object.ipv6AccessType; - break; - } - break; - case "UNSPECIFIED_IPV6_ACCESS_TYPE": - case 0: - message.ipv6AccessType = 0; - break; - case "INTERNAL": - case 1: - message.ipv6AccessType = 1; - break; - case "EXTERNAL": - case 2: - message.ipv6AccessType = 2; - break; - } - if (object.queueCount != null) - message.queueCount = object.queueCount | 0; - switch (object.nicType) { - default: - if (typeof object.nicType === "number") { - message.nicType = object.nicType; - break; - } - break; - case "NIC_TYPE_UNSPECIFIED": - case 0: - message.nicType = 0; - break; - case "VIRTIO_NET": - case 1: - message.nicType = 1; - break; - case "GVNIC": - case 2: - message.nicType = 2; - break; + var message = new $root.google.cloud.backupdr.v1.ServiceAccount(); + if (object.email != null) + message.email = String(object.email); + if (object.scopes) { + if (!Array.isArray(object.scopes)) + throw TypeError(".google.cloud.backupdr.v1.ServiceAccount.scopes: array expected"); + message.scopes = []; + for (var i = 0; i < object.scopes.length; ++i) + message.scopes[i] = String(object.scopes[i]); } - if (object.networkAttachment != null) - message.networkAttachment = String(object.networkAttachment); return message; }; /** - * Creates a plain object from a NetworkInterface message. Also converts values to other types if specified. + * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.NetworkInterface + * @memberof google.cloud.backupdr.v1.ServiceAccount * @static - * @param {google.cloud.backupdr.v1.NetworkInterface} message NetworkInterface + * @param {google.cloud.backupdr.v1.ServiceAccount} message ServiceAccount * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NetworkInterface.toObject = function toObject(message, options) { + ServiceAccount.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.accessConfigs = []; - object.ipv6AccessConfigs = []; - object.aliasIpRanges = []; - } - if (message.network != null && message.hasOwnProperty("network")) { - object.network = message.network; - if (options.oneofs) - object._network = "network"; - } - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) { - object.subnetwork = message.subnetwork; - if (options.oneofs) - object._subnetwork = "subnetwork"; - } - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) { - object.ipAddress = message.ipAddress; - if (options.oneofs) - object._ipAddress = "ipAddress"; - } - if (message.ipv6Address != null && message.hasOwnProperty("ipv6Address")) { - object.ipv6Address = message.ipv6Address; - if (options.oneofs) - object._ipv6Address = "ipv6Address"; - } - if (message.internalIpv6PrefixLength != null && message.hasOwnProperty("internalIpv6PrefixLength")) { - object.internalIpv6PrefixLength = message.internalIpv6PrefixLength; - if (options.oneofs) - object._internalIpv6PrefixLength = "internalIpv6PrefixLength"; - } - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; - if (options.oneofs) - object._name = "name"; - } - if (message.accessConfigs && message.accessConfigs.length) { - object.accessConfigs = []; - for (var j = 0; j < message.accessConfigs.length; ++j) - object.accessConfigs[j] = $root.google.cloud.backupdr.v1.AccessConfig.toObject(message.accessConfigs[j], options); - } - if (message.ipv6AccessConfigs && message.ipv6AccessConfigs.length) { - object.ipv6AccessConfigs = []; - for (var j = 0; j < message.ipv6AccessConfigs.length; ++j) - object.ipv6AccessConfigs[j] = $root.google.cloud.backupdr.v1.AccessConfig.toObject(message.ipv6AccessConfigs[j], options); - } - if (message.aliasIpRanges && message.aliasIpRanges.length) { - object.aliasIpRanges = []; - for (var j = 0; j < message.aliasIpRanges.length; ++j) - object.aliasIpRanges[j] = $root.google.cloud.backupdr.v1.AliasIpRange.toObject(message.aliasIpRanges[j], options); - } - if (message.stackType != null && message.hasOwnProperty("stackType")) { - object.stackType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.StackType[message.stackType] === undefined ? message.stackType : $root.google.cloud.backupdr.v1.NetworkInterface.StackType[message.stackType] : message.stackType; - if (options.oneofs) - object._stackType = "stackType"; - } - if (message.ipv6AccessType != null && message.hasOwnProperty("ipv6AccessType")) { - object.ipv6AccessType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType[message.ipv6AccessType] === undefined ? message.ipv6AccessType : $root.google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType[message.ipv6AccessType] : message.ipv6AccessType; - if (options.oneofs) - object._ipv6AccessType = "ipv6AccessType"; - } - if (message.queueCount != null && message.hasOwnProperty("queueCount")) { - object.queueCount = message.queueCount; - if (options.oneofs) - object._queueCount = "queueCount"; - } - if (message.nicType != null && message.hasOwnProperty("nicType")) { - object.nicType = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkInterface.NicType[message.nicType] === undefined ? message.nicType : $root.google.cloud.backupdr.v1.NetworkInterface.NicType[message.nicType] : message.nicType; + if (options.arrays || options.defaults) + object.scopes = []; + if (message.email != null && message.hasOwnProperty("email")) { + object.email = message.email; if (options.oneofs) - object._nicType = "nicType"; + object._email = "email"; } - if (message.networkAttachment != null && message.hasOwnProperty("networkAttachment")) { - object.networkAttachment = message.networkAttachment; - if (options.oneofs) - object._networkAttachment = "networkAttachment"; + if (message.scopes && message.scopes.length) { + object.scopes = []; + for (var j = 0; j < message.scopes.length; ++j) + object.scopes[j] = message.scopes[j]; } return object; }; /** - * Converts this NetworkInterface to JSON. + * Converts this ServiceAccount to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.NetworkInterface + * @memberof google.cloud.backupdr.v1.ServiceAccount * @instance * @returns {Object.} JSON object */ - NetworkInterface.prototype.toJSON = function toJSON() { + ServiceAccount.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NetworkInterface + * Gets the default type url for ServiceAccount * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.NetworkInterface + * @memberof google.cloud.backupdr.v1.ServiceAccount * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NetworkInterface.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ServiceAccount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkInterface"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.ServiceAccount"; }; - /** - * StackType enum. - * @name google.cloud.backupdr.v1.NetworkInterface.StackType - * @enum {number} - * @property {number} STACK_TYPE_UNSPECIFIED=0 STACK_TYPE_UNSPECIFIED value - * @property {number} IPV4_ONLY=1 IPV4_ONLY value - * @property {number} IPV4_IPV6=2 IPV4_IPV6 value - */ - NetworkInterface.StackType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STACK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IPV4_ONLY"] = 1; - values[valuesById[2] = "IPV4_IPV6"] = 2; - return values; - })(); - - /** - * Ipv6AccessType enum. - * @name google.cloud.backupdr.v1.NetworkInterface.Ipv6AccessType - * @enum {number} - * @property {number} UNSPECIFIED_IPV6_ACCESS_TYPE=0 UNSPECIFIED_IPV6_ACCESS_TYPE value - * @property {number} INTERNAL=1 INTERNAL value - * @property {number} EXTERNAL=2 EXTERNAL value - */ - NetworkInterface.Ipv6AccessType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED_IPV6_ACCESS_TYPE"] = 0; - values[valuesById[1] = "INTERNAL"] = 1; - values[valuesById[2] = "EXTERNAL"] = 2; - return values; - })(); - - /** - * NicType enum. - * @name google.cloud.backupdr.v1.NetworkInterface.NicType - * @enum {number} - * @property {number} NIC_TYPE_UNSPECIFIED=0 NIC_TYPE_UNSPECIFIED value - * @property {number} VIRTIO_NET=1 VIRTIO_NET value - * @property {number} GVNIC=2 GVNIC value - */ - NetworkInterface.NicType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NIC_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "VIRTIO_NET"] = 1; - values[valuesById[2] = "GVNIC"] = 2; - return values; - })(); - - return NetworkInterface; + return ServiceAccount; })(); - v1.NetworkPerformanceConfig = (function() { + v1.Tags = (function() { /** - * Properties of a NetworkPerformanceConfig. + * Properties of a Tags. * @memberof google.cloud.backupdr.v1 - * @interface INetworkPerformanceConfig - * @property {google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null} [totalEgressBandwidthTier] NetworkPerformanceConfig totalEgressBandwidthTier + * @interface ITags + * @property {Array.|null} [items] Tags items */ /** - * Constructs a new NetworkPerformanceConfig. + * Constructs a new Tags. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a NetworkPerformanceConfig. - * @implements INetworkPerformanceConfig + * @classdesc Represents a Tags. + * @implements ITags * @constructor - * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.ITags=} [properties] Properties to set */ - function NetworkPerformanceConfig(properties) { + function Tags(properties) { + this.items = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29729,89 +30251,78 @@ } /** - * NetworkPerformanceConfig totalEgressBandwidthTier. - * @member {google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier|null|undefined} totalEgressBandwidthTier - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig - * @instance - */ - NetworkPerformanceConfig.prototype.totalEgressBandwidthTier = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NetworkPerformanceConfig _totalEgressBandwidthTier. - * @member {"totalEgressBandwidthTier"|undefined} _totalEgressBandwidthTier - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * Tags items. + * @member {Array.} items + * @memberof google.cloud.backupdr.v1.Tags * @instance */ - Object.defineProperty(NetworkPerformanceConfig.prototype, "_totalEgressBandwidthTier", { - get: $util.oneOfGetter($oneOfFields = ["totalEgressBandwidthTier"]), - set: $util.oneOfSetter($oneOfFields) - }); + Tags.prototype.items = $util.emptyArray; /** - * Creates a new NetworkPerformanceConfig instance using the specified properties. + * Creates a new Tags instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @memberof google.cloud.backupdr.v1.Tags * @static - * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig instance + * @param {google.cloud.backupdr.v1.ITags=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.Tags} Tags instance */ - NetworkPerformanceConfig.create = function create(properties) { - return new NetworkPerformanceConfig(properties); + Tags.create = function create(properties) { + return new Tags(properties); }; /** - * Encodes the specified NetworkPerformanceConfig message. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @memberof google.cloud.backupdr.v1.Tags * @static - * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode + * @param {google.cloud.backupdr.v1.ITags} message Tags message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NetworkPerformanceConfig.encode = function encode(message, writer) { + Tags.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.totalEgressBandwidthTier != null && Object.hasOwnProperty.call(message, "totalEgressBandwidthTier")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.totalEgressBandwidthTier); + if (message.items != null && message.items.length) + for (var i = 0; i < message.items.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.items[i]); return writer; }; /** - * Encodes the specified NetworkPerformanceConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.NetworkPerformanceConfig.verify|verify} messages. + * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @memberof google.cloud.backupdr.v1.Tags * @static - * @param {google.cloud.backupdr.v1.INetworkPerformanceConfig} message NetworkPerformanceConfig message or plain object to encode + * @param {google.cloud.backupdr.v1.ITags} message Tags message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NetworkPerformanceConfig.encodeDelimited = function encodeDelimited(message, writer) { + Tags.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer. + * Decodes a Tags message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @memberof google.cloud.backupdr.v1.Tags * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig + * @returns {google.cloud.backupdr.v1.Tags} Tags * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NetworkPerformanceConfig.decode = function decode(reader, length) { + Tags.decode = function 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.backupdr.v1.NetworkPerformanceConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.Tags(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.totalEgressBandwidthTier = reader.int32(); + if (!(message.items && message.items.length)) + message.items = []; + message.items.push(reader.string()); break; } default: @@ -29823,173 +30334,152 @@ }; /** - * Decodes a NetworkPerformanceConfig message from the specified reader or buffer, length delimited. + * Decodes a Tags message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @memberof google.cloud.backupdr.v1.Tags * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig + * @returns {google.cloud.backupdr.v1.Tags} Tags * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NetworkPerformanceConfig.decodeDelimited = function decodeDelimited(reader) { + Tags.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NetworkPerformanceConfig message. + * Verifies a Tags message. * @function verify - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @memberof google.cloud.backupdr.v1.Tags * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NetworkPerformanceConfig.verify = function verify(message) { + Tags.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { - properties._totalEgressBandwidthTier = 1; - switch (message.totalEgressBandwidthTier) { - default: - return "totalEgressBandwidthTier: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.items != null && message.hasOwnProperty("items")) { + if (!Array.isArray(message.items)) + return "items: array expected"; + for (var i = 0; i < message.items.length; ++i) + if (!$util.isString(message.items[i])) + return "items: string[] expected"; } return null; }; /** - * Creates a NetworkPerformanceConfig message from a plain object. Also converts values to their respective internal types. + * Creates a Tags message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @memberof google.cloud.backupdr.v1.Tags * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.NetworkPerformanceConfig} NetworkPerformanceConfig + * @returns {google.cloud.backupdr.v1.Tags} Tags */ - NetworkPerformanceConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.NetworkPerformanceConfig) + Tags.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.Tags) return object; - var message = new $root.google.cloud.backupdr.v1.NetworkPerformanceConfig(); - switch (object.totalEgressBandwidthTier) { - default: - if (typeof object.totalEgressBandwidthTier === "number") { - message.totalEgressBandwidthTier = object.totalEgressBandwidthTier; - break; - } - break; - case "TIER_UNSPECIFIED": - case 0: - message.totalEgressBandwidthTier = 0; - break; - case "DEFAULT": - case 1: - message.totalEgressBandwidthTier = 1; - break; - case "TIER_1": - case 2: - message.totalEgressBandwidthTier = 2; - break; + var message = new $root.google.cloud.backupdr.v1.Tags(); + if (object.items) { + if (!Array.isArray(object.items)) + throw TypeError(".google.cloud.backupdr.v1.Tags.items: array expected"); + message.items = []; + for (var i = 0; i < object.items.length; ++i) + message.items[i] = String(object.items[i]); } return message; }; /** - * Creates a plain object from a NetworkPerformanceConfig message. Also converts values to other types if specified. + * Creates a plain object from a Tags message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @memberof google.cloud.backupdr.v1.Tags * @static - * @param {google.cloud.backupdr.v1.NetworkPerformanceConfig} message NetworkPerformanceConfig + * @param {google.cloud.backupdr.v1.Tags} message Tags * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NetworkPerformanceConfig.toObject = function toObject(message, options) { + Tags.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.totalEgressBandwidthTier != null && message.hasOwnProperty("totalEgressBandwidthTier")) { - object.totalEgressBandwidthTier = options.enums === String ? $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] === undefined ? message.totalEgressBandwidthTier : $root.google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier[message.totalEgressBandwidthTier] : message.totalEgressBandwidthTier; - if (options.oneofs) - object._totalEgressBandwidthTier = "totalEgressBandwidthTier"; + if (options.arrays || options.defaults) + object.items = []; + if (message.items && message.items.length) { + object.items = []; + for (var j = 0; j < message.items.length; ++j) + object.items[j] = message.items[j]; } return object; }; /** - * Converts this NetworkPerformanceConfig to JSON. + * Converts this Tags to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @memberof google.cloud.backupdr.v1.Tags * @instance * @returns {Object.} JSON object */ - NetworkPerformanceConfig.prototype.toJSON = function toJSON() { + Tags.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NetworkPerformanceConfig + * Gets the default type url for Tags * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.NetworkPerformanceConfig + * @memberof google.cloud.backupdr.v1.Tags * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NetworkPerformanceConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Tags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.NetworkPerformanceConfig"; + return typeUrlPrefix + "/google.cloud.backupdr.v1.Tags"; }; - /** - * Tier enum. - * @name google.cloud.backupdr.v1.NetworkPerformanceConfig.Tier - * @enum {number} - * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value - * @property {number} DEFAULT=1 DEFAULT value - * @property {number} TIER_1=2 TIER_1 value - */ - NetworkPerformanceConfig.Tier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "DEFAULT"] = 1; - values[valuesById[2] = "TIER_1"] = 2; - return values; - })(); - - return NetworkPerformanceConfig; + return Tags; })(); - v1.AccessConfig = (function() { + v1.AttachedDisk = (function() { /** - * Properties of an AccessConfig. + * Properties of an AttachedDisk. * @memberof google.cloud.backupdr.v1 - * @interface IAccessConfig - * @property {google.cloud.backupdr.v1.AccessConfig.AccessType|null} [type] AccessConfig type - * @property {string|null} [name] AccessConfig name - * @property {string|null} [externalIp] AccessConfig externalIp - * @property {string|null} [externalIpv6] AccessConfig externalIpv6 - * @property {number|null} [externalIpv6PrefixLength] AccessConfig externalIpv6PrefixLength - * @property {boolean|null} [setPublicPtr] AccessConfig setPublicPtr - * @property {string|null} [publicPtrDomainName] AccessConfig publicPtrDomainName - * @property {google.cloud.backupdr.v1.AccessConfig.NetworkTier|null} [networkTier] AccessConfig networkTier + * @interface IAttachedDisk + * @property {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null} [initializeParams] AttachedDisk initializeParams + * @property {string|null} [deviceName] AttachedDisk deviceName + * @property {string|null} [kind] AttachedDisk kind + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskType|null} [diskTypeDeprecated] AttachedDisk diskTypeDeprecated + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskMode|null} [mode] AttachedDisk mode + * @property {string|null} [source] AttachedDisk source + * @property {number|Long|null} [index] AttachedDisk index + * @property {boolean|null} [boot] AttachedDisk boot + * @property {boolean|null} [autoDelete] AttachedDisk autoDelete + * @property {Array.|null} [license] AttachedDisk license + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null} [diskInterface] AttachedDisk diskInterface + * @property {Array.|null} [guestOsFeature] AttachedDisk guestOsFeature + * @property {google.cloud.backupdr.v1.ICustomerEncryptionKey|null} [diskEncryptionKey] AttachedDisk diskEncryptionKey + * @property {number|Long|null} [diskSizeGb] AttachedDisk diskSizeGb + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null} [savedState] AttachedDisk savedState + * @property {string|null} [diskType] AttachedDisk diskType + * @property {google.cloud.backupdr.v1.AttachedDisk.DiskType|null} [type] AttachedDisk type */ /** - * Constructs a new AccessConfig. + * Constructs a new AttachedDisk. * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AccessConfig. - * @implements IAccessConfig + * @classdesc Represents an AttachedDisk. + * @implements IAttachedDisk * @constructor - * @param {google.cloud.backupdr.v1.IAccessConfig=} [properties] Properties to set + * @param {google.cloud.backupdr.v1.IAttachedDisk=} [properties] Properties to set */ - function AccessConfig(properties) { + function AttachedDisk(properties) { + this.license = []; + this.guestOsFeature = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29997,264 +30487,473 @@ } /** - * AccessConfig type. - * @member {google.cloud.backupdr.v1.AccessConfig.AccessType|null|undefined} type - * @memberof google.cloud.backupdr.v1.AccessConfig + * AttachedDisk initializeParams. + * @member {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null|undefined} initializeParams + * @memberof google.cloud.backupdr.v1.AttachedDisk * @instance */ - AccessConfig.prototype.type = null; + AttachedDisk.prototype.initializeParams = null; /** - * AccessConfig name. - * @member {string|null|undefined} name - * @memberof google.cloud.backupdr.v1.AccessConfig + * AttachedDisk deviceName. + * @member {string|null|undefined} deviceName + * @memberof google.cloud.backupdr.v1.AttachedDisk * @instance */ - AccessConfig.prototype.name = null; + AttachedDisk.prototype.deviceName = null; /** - * AccessConfig externalIp. - * @member {string|null|undefined} externalIp - * @memberof google.cloud.backupdr.v1.AccessConfig + * AttachedDisk kind. + * @member {string|null|undefined} kind + * @memberof google.cloud.backupdr.v1.AttachedDisk * @instance */ - AccessConfig.prototype.externalIp = null; + AttachedDisk.prototype.kind = null; /** - * AccessConfig externalIpv6. - * @member {string|null|undefined} externalIpv6 - * @memberof google.cloud.backupdr.v1.AccessConfig + * AttachedDisk diskTypeDeprecated. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskType|null|undefined} diskTypeDeprecated + * @memberof google.cloud.backupdr.v1.AttachedDisk * @instance */ - AccessConfig.prototype.externalIpv6 = null; + AttachedDisk.prototype.diskTypeDeprecated = null; /** - * AccessConfig externalIpv6PrefixLength. - * @member {number|null|undefined} externalIpv6PrefixLength - * @memberof google.cloud.backupdr.v1.AccessConfig + * AttachedDisk mode. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskMode|null|undefined} mode + * @memberof google.cloud.backupdr.v1.AttachedDisk * @instance */ - AccessConfig.prototype.externalIpv6PrefixLength = null; + AttachedDisk.prototype.mode = null; /** - * AccessConfig setPublicPtr. - * @member {boolean|null|undefined} setPublicPtr - * @memberof google.cloud.backupdr.v1.AccessConfig + * AttachedDisk source. + * @member {string|null|undefined} source + * @memberof google.cloud.backupdr.v1.AttachedDisk * @instance */ - AccessConfig.prototype.setPublicPtr = null; + AttachedDisk.prototype.source = null; /** - * AccessConfig publicPtrDomainName. - * @member {string|null|undefined} publicPtrDomainName - * @memberof google.cloud.backupdr.v1.AccessConfig + * AttachedDisk index. + * @member {number|Long|null|undefined} index + * @memberof google.cloud.backupdr.v1.AttachedDisk * @instance */ - AccessConfig.prototype.publicPtrDomainName = null; + AttachedDisk.prototype.index = null; /** - * AccessConfig networkTier. - * @member {google.cloud.backupdr.v1.AccessConfig.NetworkTier|null|undefined} networkTier - * @memberof google.cloud.backupdr.v1.AccessConfig + * AttachedDisk boot. + * @member {boolean|null|undefined} boot + * @memberof google.cloud.backupdr.v1.AttachedDisk * @instance */ - AccessConfig.prototype.networkTier = null; + AttachedDisk.prototype.boot = null; + + /** + * AttachedDisk autoDelete. + * @member {boolean|null|undefined} autoDelete + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.autoDelete = null; + + /** + * AttachedDisk license. + * @member {Array.} license + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.license = $util.emptyArray; + + /** + * AttachedDisk diskInterface. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null|undefined} diskInterface + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskInterface = null; + + /** + * AttachedDisk guestOsFeature. + * @member {Array.} guestOsFeature + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.guestOsFeature = $util.emptyArray; + + /** + * AttachedDisk diskEncryptionKey. + * @member {google.cloud.backupdr.v1.ICustomerEncryptionKey|null|undefined} diskEncryptionKey + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskEncryptionKey = null; + + /** + * AttachedDisk diskSizeGb. + * @member {number|Long|null|undefined} diskSizeGb + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskSizeGb = null; + + /** + * AttachedDisk savedState. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null|undefined} savedState + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.savedState = null; + + /** + * AttachedDisk diskType. + * @member {string|null|undefined} diskType + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.diskType = null; + + /** + * AttachedDisk type. + * @member {google.cloud.backupdr.v1.AttachedDisk.DiskType|null|undefined} type + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + AttachedDisk.prototype.type = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * AccessConfig _type. - * @member {"type"|undefined} _type - * @memberof google.cloud.backupdr.v1.AccessConfig + * AttachedDisk _initializeParams. + * @member {"initializeParams"|undefined} _initializeParams + * @memberof google.cloud.backupdr.v1.AttachedDisk * @instance */ - Object.defineProperty(AccessConfig.prototype, "_type", { - get: $util.oneOfGetter($oneOfFields = ["type"]), + Object.defineProperty(AttachedDisk.prototype, "_initializeParams", { + get: $util.oneOfGetter($oneOfFields = ["initializeParams"]), set: $util.oneOfSetter($oneOfFields) }); /** - * AccessConfig _name. - * @member {"name"|undefined} _name - * @memberof google.cloud.backupdr.v1.AccessConfig + * AttachedDisk _deviceName. + * @member {"deviceName"|undefined} _deviceName + * @memberof google.cloud.backupdr.v1.AttachedDisk * @instance */ - Object.defineProperty(AccessConfig.prototype, "_name", { - get: $util.oneOfGetter($oneOfFields = ["name"]), + Object.defineProperty(AttachedDisk.prototype, "_deviceName", { + get: $util.oneOfGetter($oneOfFields = ["deviceName"]), set: $util.oneOfSetter($oneOfFields) }); /** - * AccessConfig _externalIp. - * @member {"externalIp"|undefined} _externalIp - * @memberof google.cloud.backupdr.v1.AccessConfig + * AttachedDisk _kind. + * @member {"kind"|undefined} _kind + * @memberof google.cloud.backupdr.v1.AttachedDisk * @instance */ - Object.defineProperty(AccessConfig.prototype, "_externalIp", { - get: $util.oneOfGetter($oneOfFields = ["externalIp"]), + Object.defineProperty(AttachedDisk.prototype, "_kind", { + get: $util.oneOfGetter($oneOfFields = ["kind"]), set: $util.oneOfSetter($oneOfFields) }); /** - * AccessConfig _externalIpv6. - * @member {"externalIpv6"|undefined} _externalIpv6 - * @memberof google.cloud.backupdr.v1.AccessConfig + * AttachedDisk _diskTypeDeprecated. + * @member {"diskTypeDeprecated"|undefined} _diskTypeDeprecated + * @memberof google.cloud.backupdr.v1.AttachedDisk * @instance */ - Object.defineProperty(AccessConfig.prototype, "_externalIpv6", { - get: $util.oneOfGetter($oneOfFields = ["externalIpv6"]), + Object.defineProperty(AttachedDisk.prototype, "_diskTypeDeprecated", { + get: $util.oneOfGetter($oneOfFields = ["diskTypeDeprecated"]), set: $util.oneOfSetter($oneOfFields) }); /** - * AccessConfig _externalIpv6PrefixLength. - * @member {"externalIpv6PrefixLength"|undefined} _externalIpv6PrefixLength - * @memberof google.cloud.backupdr.v1.AccessConfig + * AttachedDisk _mode. + * @member {"mode"|undefined} _mode + * @memberof google.cloud.backupdr.v1.AttachedDisk * @instance */ - Object.defineProperty(AccessConfig.prototype, "_externalIpv6PrefixLength", { - get: $util.oneOfGetter($oneOfFields = ["externalIpv6PrefixLength"]), + Object.defineProperty(AttachedDisk.prototype, "_mode", { + get: $util.oneOfGetter($oneOfFields = ["mode"]), set: $util.oneOfSetter($oneOfFields) }); /** - * AccessConfig _setPublicPtr. - * @member {"setPublicPtr"|undefined} _setPublicPtr - * @memberof google.cloud.backupdr.v1.AccessConfig + * AttachedDisk _source. + * @member {"source"|undefined} _source + * @memberof google.cloud.backupdr.v1.AttachedDisk * @instance */ - Object.defineProperty(AccessConfig.prototype, "_setPublicPtr", { - get: $util.oneOfGetter($oneOfFields = ["setPublicPtr"]), + Object.defineProperty(AttachedDisk.prototype, "_source", { + get: $util.oneOfGetter($oneOfFields = ["source"]), set: $util.oneOfSetter($oneOfFields) }); /** - * AccessConfig _publicPtrDomainName. - * @member {"publicPtrDomainName"|undefined} _publicPtrDomainName - * @memberof google.cloud.backupdr.v1.AccessConfig + * AttachedDisk _index. + * @member {"index"|undefined} _index + * @memberof google.cloud.backupdr.v1.AttachedDisk * @instance */ - Object.defineProperty(AccessConfig.prototype, "_publicPtrDomainName", { - get: $util.oneOfGetter($oneOfFields = ["publicPtrDomainName"]), + Object.defineProperty(AttachedDisk.prototype, "_index", { + get: $util.oneOfGetter($oneOfFields = ["index"]), set: $util.oneOfSetter($oneOfFields) }); /** - * AccessConfig _networkTier. - * @member {"networkTier"|undefined} _networkTier - * @memberof google.cloud.backupdr.v1.AccessConfig + * AttachedDisk _boot. + * @member {"boot"|undefined} _boot + * @memberof google.cloud.backupdr.v1.AttachedDisk * @instance */ - Object.defineProperty(AccessConfig.prototype, "_networkTier", { - get: $util.oneOfGetter($oneOfFields = ["networkTier"]), + Object.defineProperty(AttachedDisk.prototype, "_boot", { + get: $util.oneOfGetter($oneOfFields = ["boot"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new AccessConfig instance using the specified properties. + * AttachedDisk _autoDelete. + * @member {"autoDelete"|undefined} _autoDelete + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_autoDelete", { + get: $util.oneOfGetter($oneOfFields = ["autoDelete"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskInterface. + * @member {"diskInterface"|undefined} _diskInterface + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskInterface", { + get: $util.oneOfGetter($oneOfFields = ["diskInterface"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskEncryptionKey. + * @member {"diskEncryptionKey"|undefined} _diskEncryptionKey + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskEncryptionKey", { + get: $util.oneOfGetter($oneOfFields = ["diskEncryptionKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskSizeGb. + * @member {"diskSizeGb"|undefined} _diskSizeGb + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskSizeGb", { + get: $util.oneOfGetter($oneOfFields = ["diskSizeGb"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _savedState. + * @member {"savedState"|undefined} _savedState + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_savedState", { + get: $util.oneOfGetter($oneOfFields = ["savedState"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _diskType. + * @member {"diskType"|undefined} _diskType + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_diskType", { + get: $util.oneOfGetter($oneOfFields = ["diskType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * AttachedDisk _type. + * @member {"type"|undefined} _type + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @instance + */ + Object.defineProperty(AttachedDisk.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AttachedDisk instance using the specified properties. * @function create - * @memberof google.cloud.backupdr.v1.AccessConfig + * @memberof google.cloud.backupdr.v1.AttachedDisk * @static - * @param {google.cloud.backupdr.v1.IAccessConfig=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig instance + * @param {google.cloud.backupdr.v1.IAttachedDisk=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk instance */ - AccessConfig.create = function create(properties) { - return new AccessConfig(properties); + AttachedDisk.create = function create(properties) { + return new AttachedDisk(properties); }; /** - * Encodes the specified AccessConfig message. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. * @function encode - * @memberof google.cloud.backupdr.v1.AccessConfig + * @memberof google.cloud.backupdr.v1.AttachedDisk * @static - * @param {google.cloud.backupdr.v1.IAccessConfig} message AccessConfig message or plain object to encode + * @param {google.cloud.backupdr.v1.IAttachedDisk} message AttachedDisk message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AccessConfig.encode = function encode(message, writer) { + AttachedDisk.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.initializeParams != null && Object.hasOwnProperty.call(message, "initializeParams")) + $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.encode(message.initializeParams, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.deviceName); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.kind); + if (message.diskTypeDeprecated != null && Object.hasOwnProperty.call(message, "diskTypeDeprecated")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.diskTypeDeprecated); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.mode); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.source); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.index); + if (message.boot != null && Object.hasOwnProperty.call(message, "boot")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.boot); + if (message.autoDelete != null && Object.hasOwnProperty.call(message, "autoDelete")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.autoDelete); + if (message.license != null && message.license.length) + for (var i = 0; i < message.license.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.license[i]); + if (message.diskInterface != null && Object.hasOwnProperty.call(message, "diskInterface")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.diskInterface); + if (message.guestOsFeature != null && message.guestOsFeature.length) + for (var i = 0; i < message.guestOsFeature.length; ++i) + $root.google.cloud.backupdr.v1.GuestOsFeature.encode(message.guestOsFeature[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.diskEncryptionKey != null && Object.hasOwnProperty.call(message, "diskEncryptionKey")) + $root.google.cloud.backupdr.v1.CustomerEncryptionKey.encode(message.diskEncryptionKey, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 16, wireType 0 =*/128).int64(message.diskSizeGb); + if (message.savedState != null && Object.hasOwnProperty.call(message, "savedState")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.savedState); + if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.diskType); if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.externalIp); - if (message.externalIpv6 != null && Object.hasOwnProperty.call(message, "externalIpv6")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.externalIpv6); - if (message.externalIpv6PrefixLength != null && Object.hasOwnProperty.call(message, "externalIpv6PrefixLength")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.externalIpv6PrefixLength); - if (message.setPublicPtr != null && Object.hasOwnProperty.call(message, "setPublicPtr")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.setPublicPtr); - if (message.publicPtrDomainName != null && Object.hasOwnProperty.call(message, "publicPtrDomainName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.publicPtrDomainName); - if (message.networkTier != null && Object.hasOwnProperty.call(message, "networkTier")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.networkTier); + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.type); return writer; }; /** - * Encodes the specified AccessConfig message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AccessConfig.verify|verify} messages. + * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AccessConfig + * @memberof google.cloud.backupdr.v1.AttachedDisk * @static - * @param {google.cloud.backupdr.v1.IAccessConfig} message AccessConfig message or plain object to encode + * @param {google.cloud.backupdr.v1.IAttachedDisk} message AttachedDisk message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AccessConfig.encodeDelimited = function encodeDelimited(message, writer) { + AttachedDisk.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AccessConfig message from the specified reader or buffer. + * Decodes an AttachedDisk message from the specified reader or buffer. * @function decode - * @memberof google.cloud.backupdr.v1.AccessConfig + * @memberof google.cloud.backupdr.v1.AttachedDisk * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AccessConfig.decode = function decode(reader, length) { + AttachedDisk.decode = function 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.backupdr.v1.AccessConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.backupdr.v1.AttachedDisk(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type = reader.int32(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - message.externalIp = reader.string(); + message.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.decode(reader, reader.uint32()); break; } case 4: { - message.externalIpv6 = reader.string(); + message.deviceName = reader.string(); break; } case 5: { - message.externalIpv6PrefixLength = reader.int32(); + message.kind = reader.string(); break; } case 6: { - message.setPublicPtr = reader.bool(); + message.diskTypeDeprecated = reader.int32(); break; } case 7: { - message.publicPtrDomainName = reader.string(); + message.mode = reader.int32(); break; } case 8: { - message.networkTier = reader.int32(); + message.source = reader.string(); + break; + } + case 9: { + message.index = reader.int64(); + break; + } + case 10: { + message.boot = reader.bool(); + break; + } + case 11: { + message.autoDelete = reader.bool(); + break; + } + case 12: { + if (!(message.license && message.license.length)) + message.license = []; + message.license.push(reader.string()); + break; + } + case 13: { + message.diskInterface = reader.int32(); + break; + } + case 14: { + if (!(message.guestOsFeature && message.guestOsFeature.length)) + message.guestOsFeature = []; + message.guestOsFeature.push($root.google.cloud.backupdr.v1.GuestOsFeature.decode(reader, reader.uint32())); + break; + } + case 15: { + message.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader, reader.uint32()); + break; + } + case 16: { + message.diskSizeGb = reader.int64(); + break; + } + case 17: { + message.savedState = reader.int32(); + break; + } + case 18: { + message.diskType = reader.string(); + break; + } + case 19: { + message.type = reader.int32(); break; } default: @@ -30266,79 +30965,156 @@ }; /** - * Decodes an AccessConfig message from the specified reader or buffer, length delimited. + * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AccessConfig + * @memberof google.cloud.backupdr.v1.AttachedDisk * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AccessConfig.decodeDelimited = function decodeDelimited(reader) { + AttachedDisk.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AccessConfig message. + * Verifies an AttachedDisk message. * @function verify - * @memberof google.cloud.backupdr.v1.AccessConfig + * @memberof google.cloud.backupdr.v1.AttachedDisk * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AccessConfig.verify = function verify(message) { + AttachedDisk.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.type != null && message.hasOwnProperty("type")) { - properties._type = 1; - switch (message.type) { + if (message.initializeParams != null && message.hasOwnProperty("initializeParams")) { + properties._initializeParams = 1; + { + var error = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify(message.initializeParams); + if (error) + return "initializeParams." + error; + } + } + if (message.deviceName != null && message.hasOwnProperty("deviceName")) { + properties._deviceName = 1; + if (!$util.isString(message.deviceName)) + return "deviceName: string expected"; + } + if (message.kind != null && message.hasOwnProperty("kind")) { + properties._kind = 1; + if (!$util.isString(message.kind)) + return "kind: string expected"; + } + if (message.diskTypeDeprecated != null && message.hasOwnProperty("diskTypeDeprecated")) { + properties._diskTypeDeprecated = 1; + switch (message.diskTypeDeprecated) { default: - return "type: enum value expected"; + return "diskTypeDeprecated: enum value expected"; case 0: case 1: case 2: break; } } - if (message.name != null && message.hasOwnProperty("name")) { - properties._name = 1; - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.mode != null && message.hasOwnProperty("mode")) { + properties._mode = 1; + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } } - if (message.externalIp != null && message.hasOwnProperty("externalIp")) { - properties._externalIp = 1; - if (!$util.isString(message.externalIp)) - return "externalIp: string expected"; + if (message.source != null && message.hasOwnProperty("source")) { + properties._source = 1; + if (!$util.isString(message.source)) + return "source: string expected"; } - if (message.externalIpv6 != null && message.hasOwnProperty("externalIpv6")) { - properties._externalIpv6 = 1; - if (!$util.isString(message.externalIpv6)) - return "externalIpv6: string expected"; + if (message.index != null && message.hasOwnProperty("index")) { + properties._index = 1; + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; } - if (message.externalIpv6PrefixLength != null && message.hasOwnProperty("externalIpv6PrefixLength")) { - properties._externalIpv6PrefixLength = 1; - if (!$util.isInteger(message.externalIpv6PrefixLength)) - return "externalIpv6PrefixLength: integer expected"; + if (message.boot != null && message.hasOwnProperty("boot")) { + properties._boot = 1; + if (typeof message.boot !== "boolean") + return "boot: boolean expected"; } - if (message.setPublicPtr != null && message.hasOwnProperty("setPublicPtr")) { - properties._setPublicPtr = 1; - if (typeof message.setPublicPtr !== "boolean") - return "setPublicPtr: boolean expected"; + if (message.autoDelete != null && message.hasOwnProperty("autoDelete")) { + properties._autoDelete = 1; + if (typeof message.autoDelete !== "boolean") + return "autoDelete: boolean expected"; } - if (message.publicPtrDomainName != null && message.hasOwnProperty("publicPtrDomainName")) { - properties._publicPtrDomainName = 1; - if (!$util.isString(message.publicPtrDomainName)) - return "publicPtrDomainName: string expected"; + if (message.license != null && message.hasOwnProperty("license")) { + if (!Array.isArray(message.license)) + return "license: array expected"; + for (var i = 0; i < message.license.length; ++i) + if (!$util.isString(message.license[i])) + return "license: string[] expected"; } - if (message.networkTier != null && message.hasOwnProperty("networkTier")) { - properties._networkTier = 1; - switch (message.networkTier) { + if (message.diskInterface != null && message.hasOwnProperty("diskInterface")) { + properties._diskInterface = 1; + switch (message.diskInterface) { default: - return "networkTier: enum value expected"; + return "diskInterface: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.guestOsFeature != null && message.hasOwnProperty("guestOsFeature")) { + if (!Array.isArray(message.guestOsFeature)) + return "guestOsFeature: array expected"; + for (var i = 0; i < message.guestOsFeature.length; ++i) { + var error = $root.google.cloud.backupdr.v1.GuestOsFeature.verify(message.guestOsFeature[i]); + if (error) + return "guestOsFeature." + error; + } + } + if (message.diskEncryptionKey != null && message.hasOwnProperty("diskEncryptionKey")) { + properties._diskEncryptionKey = 1; + { + var error = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.verify(message.diskEncryptionKey); + if (error) + return "diskEncryptionKey." + error; + } + } + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) { + properties._diskSizeGb = 1; + if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) + return "diskSizeGb: integer|Long expected"; + } + if (message.savedState != null && message.hasOwnProperty("savedState")) { + properties._savedState = 1; + switch (message.savedState) { + default: + return "savedState: enum value expected"; + case 0: + case 1: + break; + } + } + if (message.diskType != null && message.hasOwnProperty("diskType")) { + properties._diskType = 1; + if (!$util.isString(message.diskType)) + return "diskType: string expected"; + } + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; case 0: case 1: case 2: @@ -30349,8733 +31125,1053 @@ }; /** - * Creates an AccessConfig message from a plain object. Also converts values to their respective internal types. + * Creates an AttachedDisk message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.backupdr.v1.AccessConfig + * @memberof google.cloud.backupdr.v1.AttachedDisk * @static * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AccessConfig} AccessConfig + * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk */ - AccessConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AccessConfig) + AttachedDisk.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AttachedDisk) return object; - var message = new $root.google.cloud.backupdr.v1.AccessConfig(); - switch (object.type) { + var message = new $root.google.cloud.backupdr.v1.AttachedDisk(); + if (object.initializeParams != null) { + if (typeof object.initializeParams !== "object") + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.initializeParams: object expected"); + message.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.fromObject(object.initializeParams); + } + if (object.deviceName != null) + message.deviceName = String(object.deviceName); + if (object.kind != null) + message.kind = String(object.kind); + switch (object.diskTypeDeprecated) { default: - if (typeof object.type === "number") { - message.type = object.type; + if (typeof object.diskTypeDeprecated === "number") { + message.diskTypeDeprecated = object.diskTypeDeprecated; break; } break; - case "ACCESS_TYPE_UNSPECIFIED": + case "DISK_TYPE_UNSPECIFIED": case 0: - message.type = 0; + message.diskTypeDeprecated = 0; break; - case "ONE_TO_ONE_NAT": + case "SCRATCH": case 1: - message.type = 1; + message.diskTypeDeprecated = 1; break; - case "DIRECT_IPV6": + case "PERSISTENT": case 2: - message.type = 2; + message.diskTypeDeprecated = 2; break; } - if (object.name != null) - message.name = String(object.name); - if (object.externalIp != null) - message.externalIp = String(object.externalIp); - if (object.externalIpv6 != null) - message.externalIpv6 = String(object.externalIpv6); - if (object.externalIpv6PrefixLength != null) - message.externalIpv6PrefixLength = object.externalIpv6PrefixLength | 0; - if (object.setPublicPtr != null) - message.setPublicPtr = Boolean(object.setPublicPtr); - if (object.publicPtrDomainName != null) - message.publicPtrDomainName = String(object.publicPtrDomainName); - switch (object.networkTier) { + switch (object.mode) { default: - if (typeof object.networkTier === "number") { - message.networkTier = object.networkTier; + if (typeof object.mode === "number") { + message.mode = object.mode; break; } break; - case "NETWORK_TIER_UNSPECIFIED": + case "DISK_MODE_UNSPECIFIED": case 0: - message.networkTier = 0; + message.mode = 0; break; - case "PREMIUM": + case "READ_WRITE": case 1: - message.networkTier = 1; + message.mode = 1; break; - case "STANDARD": + case "READ_ONLY": case 2: - message.networkTier = 2; + message.mode = 2; + break; + case "LOCKED": + case 3: + message.mode = 3; + break; + } + if (object.source != null) + message.source = String(object.source); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = false; + else if (typeof object.index === "string") + message.index = parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); + if (object.boot != null) + message.boot = Boolean(object.boot); + if (object.autoDelete != null) + message.autoDelete = Boolean(object.autoDelete); + if (object.license) { + if (!Array.isArray(object.license)) + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.license: array expected"); + message.license = []; + for (var i = 0; i < object.license.length; ++i) + message.license[i] = String(object.license[i]); + } + switch (object.diskInterface) { + default: + if (typeof object.diskInterface === "number") { + message.diskInterface = object.diskInterface; + break; + } + break; + case "DISK_INTERFACE_UNSPECIFIED": + case 0: + message.diskInterface = 0; + break; + case "SCSI": + case 1: + message.diskInterface = 1; + break; + case "NVME": + case 2: + message.diskInterface = 2; + break; + case "NVDIMM": + case 3: + message.diskInterface = 3; + break; + case "ISCSI": + case 4: + message.diskInterface = 4; + break; + } + if (object.guestOsFeature) { + if (!Array.isArray(object.guestOsFeature)) + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.guestOsFeature: array expected"); + message.guestOsFeature = []; + for (var i = 0; i < object.guestOsFeature.length; ++i) { + if (typeof object.guestOsFeature[i] !== "object") + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.guestOsFeature: object expected"); + message.guestOsFeature[i] = $root.google.cloud.backupdr.v1.GuestOsFeature.fromObject(object.guestOsFeature[i]); + } + } + if (object.diskEncryptionKey != null) { + if (typeof object.diskEncryptionKey !== "object") + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.diskEncryptionKey: object expected"); + message.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.fromObject(object.diskEncryptionKey); + } + if (object.diskSizeGb != null) + if ($util.Long) + (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; + else if (typeof object.diskSizeGb === "string") + message.diskSizeGb = parseInt(object.diskSizeGb, 10); + else if (typeof object.diskSizeGb === "number") + message.diskSizeGb = object.diskSizeGb; + else if (typeof object.diskSizeGb === "object") + message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); + switch (object.savedState) { + default: + if (typeof object.savedState === "number") { + message.savedState = object.savedState; + break; + } + break; + case "DISK_SAVED_STATE_UNSPECIFIED": + case 0: + message.savedState = 0; + break; + case "PRESERVED": + case 1: + message.savedState = 1; + break; + } + if (object.diskType != null) + message.diskType = String(object.diskType); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DISK_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "SCRATCH": + case 1: + message.type = 1; + break; + case "PERSISTENT": + case 2: + message.type = 2; break; } return message; }; /** - * Creates a plain object from an AccessConfig message. Also converts values to other types if specified. + * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.backupdr.v1.AccessConfig + * @memberof google.cloud.backupdr.v1.AttachedDisk * @static - * @param {google.cloud.backupdr.v1.AccessConfig} message AccessConfig + * @param {google.cloud.backupdr.v1.AttachedDisk} message AttachedDisk * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AccessConfig.toObject = function toObject(message, options) { + AttachedDisk.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.type != null && message.hasOwnProperty("type")) { - object.type = options.enums === String ? $root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.AccessConfig.AccessType[message.type] : message.type; + if (options.arrays || options.defaults) { + object.license = []; + object.guestOsFeature = []; + } + if (message.initializeParams != null && message.hasOwnProperty("initializeParams")) { + object.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.toObject(message.initializeParams, options); if (options.oneofs) - object._type = "type"; + object._initializeParams = "initializeParams"; } - if (message.name != null && message.hasOwnProperty("name")) { - object.name = message.name; + if (message.deviceName != null && message.hasOwnProperty("deviceName")) { + object.deviceName = message.deviceName; if (options.oneofs) - object._name = "name"; + object._deviceName = "deviceName"; } - if (message.externalIp != null && message.hasOwnProperty("externalIp")) { - object.externalIp = message.externalIp; + if (message.kind != null && message.hasOwnProperty("kind")) { + object.kind = message.kind; if (options.oneofs) - object._externalIp = "externalIp"; + object._kind = "kind"; } - if (message.externalIpv6 != null && message.hasOwnProperty("externalIpv6")) { - object.externalIpv6 = message.externalIpv6; + if (message.diskTypeDeprecated != null && message.hasOwnProperty("diskTypeDeprecated")) { + object.diskTypeDeprecated = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated] === undefined ? message.diskTypeDeprecated : $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated] : message.diskTypeDeprecated; if (options.oneofs) - object._externalIpv6 = "externalIpv6"; + object._diskTypeDeprecated = "diskTypeDeprecated"; } - if (message.externalIpv6PrefixLength != null && message.hasOwnProperty("externalIpv6PrefixLength")) { - object.externalIpv6PrefixLength = message.externalIpv6PrefixLength; + if (message.mode != null && message.hasOwnProperty("mode")) { + object.mode = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode] === undefined ? message.mode : $root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode] : message.mode; if (options.oneofs) - object._externalIpv6PrefixLength = "externalIpv6PrefixLength"; + object._mode = "mode"; } - if (message.setPublicPtr != null && message.hasOwnProperty("setPublicPtr")) { - object.setPublicPtr = message.setPublicPtr; + if (message.source != null && message.hasOwnProperty("source")) { + object.source = message.source; if (options.oneofs) - object._setPublicPtr = "setPublicPtr"; + object._source = "source"; } - if (message.publicPtrDomainName != null && message.hasOwnProperty("publicPtrDomainName")) { - object.publicPtrDomainName = message.publicPtrDomainName; + if (message.index != null && message.hasOwnProperty("index")) { + if (typeof message.index === "number") + object.index = options.longs === String ? String(message.index) : message.index; + else + object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; if (options.oneofs) - object._publicPtrDomainName = "publicPtrDomainName"; + object._index = "index"; } - if (message.networkTier != null && message.hasOwnProperty("networkTier")) { - object.networkTier = options.enums === String ? $root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier] === undefined ? message.networkTier : $root.google.cloud.backupdr.v1.AccessConfig.NetworkTier[message.networkTier] : message.networkTier; + if (message.boot != null && message.hasOwnProperty("boot")) { + object.boot = message.boot; if (options.oneofs) - object._networkTier = "networkTier"; + object._boot = "boot"; } - return object; - }; - - /** - * Converts this AccessConfig to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AccessConfig - * @instance - * @returns {Object.} JSON object - */ - AccessConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AccessConfig - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AccessConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AccessConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + if (message.autoDelete != null && message.hasOwnProperty("autoDelete")) { + object.autoDelete = message.autoDelete; + if (options.oneofs) + object._autoDelete = "autoDelete"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AccessConfig"; - }; - - /** - * AccessType enum. - * @name google.cloud.backupdr.v1.AccessConfig.AccessType - * @enum {number} - * @property {number} ACCESS_TYPE_UNSPECIFIED=0 ACCESS_TYPE_UNSPECIFIED value - * @property {number} ONE_TO_ONE_NAT=1 ONE_TO_ONE_NAT value - * @property {number} DIRECT_IPV6=2 DIRECT_IPV6 value - */ - AccessConfig.AccessType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACCESS_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ONE_TO_ONE_NAT"] = 1; - values[valuesById[2] = "DIRECT_IPV6"] = 2; - return values; - })(); - - /** - * NetworkTier enum. - * @name google.cloud.backupdr.v1.AccessConfig.NetworkTier - * @enum {number} - * @property {number} NETWORK_TIER_UNSPECIFIED=0 NETWORK_TIER_UNSPECIFIED value - * @property {number} PREMIUM=1 PREMIUM value - * @property {number} STANDARD=2 STANDARD value - */ - AccessConfig.NetworkTier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NETWORK_TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "PREMIUM"] = 1; - values[valuesById[2] = "STANDARD"] = 2; - return values; - })(); - - return AccessConfig; - })(); - - v1.AliasIpRange = (function() { - - /** - * Properties of an AliasIpRange. - * @memberof google.cloud.backupdr.v1 - * @interface IAliasIpRange - * @property {string|null} [ipCidrRange] AliasIpRange ipCidrRange - * @property {string|null} [subnetworkRangeName] AliasIpRange subnetworkRangeName - */ - - /** - * Constructs a new AliasIpRange. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AliasIpRange. - * @implements IAliasIpRange - * @constructor - * @param {google.cloud.backupdr.v1.IAliasIpRange=} [properties] Properties to set - */ - function AliasIpRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AliasIpRange ipCidrRange. - * @member {string|null|undefined} ipCidrRange - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - */ - AliasIpRange.prototype.ipCidrRange = null; - - /** - * AliasIpRange subnetworkRangeName. - * @member {string|null|undefined} subnetworkRangeName - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - */ - AliasIpRange.prototype.subnetworkRangeName = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AliasIpRange _ipCidrRange. - * @member {"ipCidrRange"|undefined} _ipCidrRange - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - */ - Object.defineProperty(AliasIpRange.prototype, "_ipCidrRange", { - get: $util.oneOfGetter($oneOfFields = ["ipCidrRange"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AliasIpRange _subnetworkRangeName. - * @member {"subnetworkRangeName"|undefined} _subnetworkRangeName - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @instance - */ - Object.defineProperty(AliasIpRange.prototype, "_subnetworkRangeName", { - get: $util.oneOfGetter($oneOfFields = ["subnetworkRangeName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AliasIpRange instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {google.cloud.backupdr.v1.IAliasIpRange=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange instance - */ - AliasIpRange.create = function create(properties) { - return new AliasIpRange(properties); - }; - - /** - * Encodes the specified AliasIpRange message. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {google.cloud.backupdr.v1.IAliasIpRange} message AliasIpRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AliasIpRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ipCidrRange != null && Object.hasOwnProperty.call(message, "ipCidrRange")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipCidrRange); - if (message.subnetworkRangeName != null && Object.hasOwnProperty.call(message, "subnetworkRangeName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subnetworkRangeName); - return writer; - }; - - /** - * Encodes the specified AliasIpRange message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AliasIpRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {google.cloud.backupdr.v1.IAliasIpRange} message AliasIpRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AliasIpRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AliasIpRange message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AliasIpRange.decode = function 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.backupdr.v1.AliasIpRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ipCidrRange = reader.string(); - break; - } - case 2: { - message.subnetworkRangeName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } + if (message.license && message.license.length) { + object.license = []; + for (var j = 0; j < message.license.length; ++j) + object.license[j] = message.license[j]; } - return message; - }; - - /** - * Decodes an AliasIpRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AliasIpRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AliasIpRange message. - * @function verify - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AliasIpRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) { - properties._ipCidrRange = 1; - if (!$util.isString(message.ipCidrRange)) - return "ipCidrRange: string expected"; + if (message.diskInterface != null && message.hasOwnProperty("diskInterface")) { + object.diskInterface = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskInterface[message.diskInterface] === undefined ? message.diskInterface : $root.google.cloud.backupdr.v1.AttachedDisk.DiskInterface[message.diskInterface] : message.diskInterface; + if (options.oneofs) + object._diskInterface = "diskInterface"; } - if (message.subnetworkRangeName != null && message.hasOwnProperty("subnetworkRangeName")) { - properties._subnetworkRangeName = 1; - if (!$util.isString(message.subnetworkRangeName)) - return "subnetworkRangeName: string expected"; + if (message.guestOsFeature && message.guestOsFeature.length) { + object.guestOsFeature = []; + for (var j = 0; j < message.guestOsFeature.length; ++j) + object.guestOsFeature[j] = $root.google.cloud.backupdr.v1.GuestOsFeature.toObject(message.guestOsFeature[j], options); } - return null; - }; - - /** - * Creates an AliasIpRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AliasIpRange} AliasIpRange - */ - AliasIpRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AliasIpRange) - return object; - var message = new $root.google.cloud.backupdr.v1.AliasIpRange(); - if (object.ipCidrRange != null) - message.ipCidrRange = String(object.ipCidrRange); - if (object.subnetworkRangeName != null) - message.subnetworkRangeName = String(object.subnetworkRangeName); - return message; - }; - - /** - * Creates a plain object from an AliasIpRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AliasIpRange - * @static - * @param {google.cloud.backupdr.v1.AliasIpRange} message AliasIpRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AliasIpRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.ipCidrRange != null && message.hasOwnProperty("ipCidrRange")) { - object.ipCidrRange = message.ipCidrRange; + if (message.diskEncryptionKey != null && message.hasOwnProperty("diskEncryptionKey")) { + object.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.toObject(message.diskEncryptionKey, options); if (options.oneofs) - object._ipCidrRange = "ipCidrRange"; + object._diskEncryptionKey = "diskEncryptionKey"; } - if (message.subnetworkRangeName != null && message.hasOwnProperty("subnetworkRangeName")) { - object.subnetworkRangeName = message.subnetworkRangeName; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) { + if (typeof message.diskSizeGb === "number") + object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; + else + object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; if (options.oneofs) - object._subnetworkRangeName = "subnetworkRangeName"; + object._diskSizeGb = "diskSizeGb"; + } + if (message.savedState != null && message.hasOwnProperty("savedState")) { + object.savedState = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState] === undefined ? message.savedState : $root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState] : message.savedState; + if (options.oneofs) + object._savedState = "savedState"; + } + if (message.diskType != null && message.hasOwnProperty("diskType")) { + object.diskType = message.diskType; + if (options.oneofs) + object._diskType = "diskType"; + } + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; } return object; }; /** - * Converts this AliasIpRange to JSON. + * Converts this AttachedDisk to JSON. * @function toJSON - * @memberof google.cloud.backupdr.v1.AliasIpRange + * @memberof google.cloud.backupdr.v1.AttachedDisk * @instance * @returns {Object.} JSON object */ - AliasIpRange.prototype.toJSON = function toJSON() { + AttachedDisk.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AliasIpRange + * Gets the default type url for AttachedDisk * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AliasIpRange + * @memberof google.cloud.backupdr.v1.AttachedDisk * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AliasIpRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AttachedDisk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AliasIpRange"; - }; - - return AliasIpRange; - })(); - - v1.InstanceParams = (function() { - - /** - * Properties of an InstanceParams. - * @memberof google.cloud.backupdr.v1 - * @interface IInstanceParams - * @property {Object.|null} [resourceManagerTags] InstanceParams resourceManagerTags - */ - - /** - * Constructs a new InstanceParams. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an InstanceParams. - * @implements IInstanceParams - * @constructor - * @param {google.cloud.backupdr.v1.IInstanceParams=} [properties] Properties to set - */ - function InstanceParams(properties) { - this.resourceManagerTags = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InstanceParams resourceManagerTags. - * @member {Object.} resourceManagerTags - * @memberof google.cloud.backupdr.v1.InstanceParams - * @instance - */ - InstanceParams.prototype.resourceManagerTags = $util.emptyObject; - - /** - * Creates a new InstanceParams instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {google.cloud.backupdr.v1.IInstanceParams=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams instance - */ - InstanceParams.create = function create(properties) { - return new InstanceParams(properties); - }; - - /** - * Encodes the specified InstanceParams message. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {google.cloud.backupdr.v1.IInstanceParams} message InstanceParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) - for (var keys = Object.keys(message.resourceManagerTags), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceManagerTags[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified InstanceParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.InstanceParams.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {google.cloud.backupdr.v1.IInstanceParams} message InstanceParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InstanceParams message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceParams.decode = function 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.backupdr.v1.InstanceParams(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (message.resourceManagerTags === $util.emptyObject) - message.resourceManagerTags = {}; - 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.resourceManagerTags[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InstanceParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InstanceParams message. - * @function verify - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InstanceParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { - if (!$util.isObject(message.resourceManagerTags)) - return "resourceManagerTags: object expected"; - var key = Object.keys(message.resourceManagerTags); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.resourceManagerTags[key[i]])) - return "resourceManagerTags: string{k:string} expected"; - } - return null; - }; - - /** - * Creates an InstanceParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.InstanceParams} InstanceParams - */ - InstanceParams.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.InstanceParams) - return object; - var message = new $root.google.cloud.backupdr.v1.InstanceParams(); - if (object.resourceManagerTags) { - if (typeof object.resourceManagerTags !== "object") - throw TypeError(".google.cloud.backupdr.v1.InstanceParams.resourceManagerTags: object expected"); - message.resourceManagerTags = {}; - for (var keys = Object.keys(object.resourceManagerTags), i = 0; i < keys.length; ++i) - message.resourceManagerTags[keys[i]] = String(object.resourceManagerTags[keys[i]]); - } - return message; + return typeUrlPrefix + "/google.cloud.backupdr.v1.AttachedDisk"; }; - /** - * Creates a plain object from an InstanceParams message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {google.cloud.backupdr.v1.InstanceParams} message InstanceParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InstanceParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.resourceManagerTags = {}; - var keys2; - if (message.resourceManagerTags && (keys2 = Object.keys(message.resourceManagerTags)).length) { - object.resourceManagerTags = {}; - for (var j = 0; j < keys2.length; ++j) - object.resourceManagerTags[keys2[j]] = message.resourceManagerTags[keys2[j]]; - } - return object; - }; + AttachedDisk.InitializeParams = (function() { - /** - * Converts this InstanceParams to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.InstanceParams - * @instance - * @returns {Object.} JSON object - */ - InstanceParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InstanceParams - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.InstanceParams - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InstanceParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.InstanceParams"; - }; - - return InstanceParams; - })(); - - v1.AllocationAffinity = (function() { - - /** - * Properties of an AllocationAffinity. - * @memberof google.cloud.backupdr.v1 - * @interface IAllocationAffinity - * @property {google.cloud.backupdr.v1.AllocationAffinity.Type|null} [consumeAllocationType] AllocationAffinity consumeAllocationType - * @property {string|null} [key] AllocationAffinity key - * @property {Array.|null} [values] AllocationAffinity values - */ - - /** - * Constructs a new AllocationAffinity. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AllocationAffinity. - * @implements IAllocationAffinity - * @constructor - * @param {google.cloud.backupdr.v1.IAllocationAffinity=} [properties] Properties to set - */ - function AllocationAffinity(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AllocationAffinity consumeAllocationType. - * @member {google.cloud.backupdr.v1.AllocationAffinity.Type|null|undefined} consumeAllocationType - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - AllocationAffinity.prototype.consumeAllocationType = null; - - /** - * AllocationAffinity key. - * @member {string|null|undefined} key - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - AllocationAffinity.prototype.key = null; - - /** - * AllocationAffinity values. - * @member {Array.} values - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - AllocationAffinity.prototype.values = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AllocationAffinity _consumeAllocationType. - * @member {"consumeAllocationType"|undefined} _consumeAllocationType - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - Object.defineProperty(AllocationAffinity.prototype, "_consumeAllocationType", { - get: $util.oneOfGetter($oneOfFields = ["consumeAllocationType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AllocationAffinity _key. - * @member {"key"|undefined} _key - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - */ - Object.defineProperty(AllocationAffinity.prototype, "_key", { - get: $util.oneOfGetter($oneOfFields = ["key"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AllocationAffinity instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {google.cloud.backupdr.v1.IAllocationAffinity=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity instance - */ - AllocationAffinity.create = function create(properties) { - return new AllocationAffinity(properties); - }; - - /** - * Encodes the specified AllocationAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {google.cloud.backupdr.v1.IAllocationAffinity} message AllocationAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AllocationAffinity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consumeAllocationType != null && Object.hasOwnProperty.call(message, "consumeAllocationType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumeAllocationType); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); - return writer; - }; - - /** - * Encodes the specified AllocationAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AllocationAffinity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {google.cloud.backupdr.v1.IAllocationAffinity} message AllocationAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AllocationAffinity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AllocationAffinity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AllocationAffinity.decode = function 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.backupdr.v1.AllocationAffinity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.consumeAllocationType = reader.int32(); - break; - } - case 2: { - message.key = reader.string(); - break; - } - case 3: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AllocationAffinity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AllocationAffinity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AllocationAffinity message. - * @function verify - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AllocationAffinity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.consumeAllocationType != null && message.hasOwnProperty("consumeAllocationType")) { - properties._consumeAllocationType = 1; - switch (message.consumeAllocationType) { - default: - return "consumeAllocationType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.key != null && message.hasOwnProperty("key")) { - properties._key = 1; - if (!$util.isString(message.key)) - return "key: string expected"; - } - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - return null; - }; - - /** - * Creates an AllocationAffinity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AllocationAffinity} AllocationAffinity - */ - AllocationAffinity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AllocationAffinity) - return object; - var message = new $root.google.cloud.backupdr.v1.AllocationAffinity(); - switch (object.consumeAllocationType) { - default: - if (typeof object.consumeAllocationType === "number") { - message.consumeAllocationType = object.consumeAllocationType; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.consumeAllocationType = 0; - break; - case "NO_RESERVATION": - case 1: - message.consumeAllocationType = 1; - break; - case "ANY_RESERVATION": - case 2: - message.consumeAllocationType = 2; - break; - case "SPECIFIC_RESERVATION": - case 3: - message.consumeAllocationType = 3; - break; - } - if (object.key != null) - message.key = String(object.key); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.cloud.backupdr.v1.AllocationAffinity.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - return message; - }; - - /** - * Creates a plain object from an AllocationAffinity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {google.cloud.backupdr.v1.AllocationAffinity} message AllocationAffinity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AllocationAffinity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.consumeAllocationType != null && message.hasOwnProperty("consumeAllocationType")) { - object.consumeAllocationType = options.enums === String ? $root.google.cloud.backupdr.v1.AllocationAffinity.Type[message.consumeAllocationType] === undefined ? message.consumeAllocationType : $root.google.cloud.backupdr.v1.AllocationAffinity.Type[message.consumeAllocationType] : message.consumeAllocationType; - if (options.oneofs) - object._consumeAllocationType = "consumeAllocationType"; - } - if (message.key != null && message.hasOwnProperty("key")) { - object.key = message.key; - if (options.oneofs) - object._key = "key"; - } - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - return object; - }; - - /** - * Converts this AllocationAffinity to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @instance - * @returns {Object.} JSON object - */ - AllocationAffinity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AllocationAffinity - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AllocationAffinity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AllocationAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AllocationAffinity"; - }; - - /** - * Type enum. - * @name google.cloud.backupdr.v1.AllocationAffinity.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} NO_RESERVATION=1 NO_RESERVATION value - * @property {number} ANY_RESERVATION=2 ANY_RESERVATION value - * @property {number} SPECIFIC_RESERVATION=3 SPECIFIC_RESERVATION value - */ - AllocationAffinity.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NO_RESERVATION"] = 1; - values[valuesById[2] = "ANY_RESERVATION"] = 2; - values[valuesById[3] = "SPECIFIC_RESERVATION"] = 3; - return values; - })(); - - return AllocationAffinity; - })(); - - v1.Scheduling = (function() { - - /** - * Properties of a Scheduling. - * @memberof google.cloud.backupdr.v1 - * @interface IScheduling - * @property {google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null} [onHostMaintenance] Scheduling onHostMaintenance - * @property {boolean|null} [automaticRestart] Scheduling automaticRestart - * @property {boolean|null} [preemptible] Scheduling preemptible - * @property {Array.|null} [nodeAffinities] Scheduling nodeAffinities - * @property {number|null} [minNodeCpus] Scheduling minNodeCpus - * @property {google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null} [provisioningModel] Scheduling provisioningModel - * @property {google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null} [instanceTerminationAction] Scheduling instanceTerminationAction - * @property {google.cloud.backupdr.v1.ISchedulingDuration|null} [localSsdRecoveryTimeout] Scheduling localSsdRecoveryTimeout - */ - - /** - * Constructs a new Scheduling. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a Scheduling. - * @implements IScheduling - * @constructor - * @param {google.cloud.backupdr.v1.IScheduling=} [properties] Properties to set - */ - function Scheduling(properties) { - this.nodeAffinities = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Scheduling onHostMaintenance. - * @member {google.cloud.backupdr.v1.Scheduling.OnHostMaintenance|null|undefined} onHostMaintenance - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.onHostMaintenance = null; - - /** - * Scheduling automaticRestart. - * @member {boolean|null|undefined} automaticRestart - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.automaticRestart = null; - - /** - * Scheduling preemptible. - * @member {boolean|null|undefined} preemptible - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.preemptible = null; - - /** - * Scheduling nodeAffinities. - * @member {Array.} nodeAffinities - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.nodeAffinities = $util.emptyArray; - - /** - * Scheduling minNodeCpus. - * @member {number|null|undefined} minNodeCpus - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.minNodeCpus = null; - - /** - * Scheduling provisioningModel. - * @member {google.cloud.backupdr.v1.Scheduling.ProvisioningModel|null|undefined} provisioningModel - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.provisioningModel = null; - - /** - * Scheduling instanceTerminationAction. - * @member {google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction|null|undefined} instanceTerminationAction - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.instanceTerminationAction = null; - - /** - * Scheduling localSsdRecoveryTimeout. - * @member {google.cloud.backupdr.v1.ISchedulingDuration|null|undefined} localSsdRecoveryTimeout - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Scheduling.prototype.localSsdRecoveryTimeout = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Scheduling _onHostMaintenance. - * @member {"onHostMaintenance"|undefined} _onHostMaintenance - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_onHostMaintenance", { - get: $util.oneOfGetter($oneOfFields = ["onHostMaintenance"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _automaticRestart. - * @member {"automaticRestart"|undefined} _automaticRestart - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_automaticRestart", { - get: $util.oneOfGetter($oneOfFields = ["automaticRestart"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _preemptible. - * @member {"preemptible"|undefined} _preemptible - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_preemptible", { - get: $util.oneOfGetter($oneOfFields = ["preemptible"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _minNodeCpus. - * @member {"minNodeCpus"|undefined} _minNodeCpus - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_minNodeCpus", { - get: $util.oneOfGetter($oneOfFields = ["minNodeCpus"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _provisioningModel. - * @member {"provisioningModel"|undefined} _provisioningModel - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_provisioningModel", { - get: $util.oneOfGetter($oneOfFields = ["provisioningModel"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _instanceTerminationAction. - * @member {"instanceTerminationAction"|undefined} _instanceTerminationAction - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_instanceTerminationAction", { - get: $util.oneOfGetter($oneOfFields = ["instanceTerminationAction"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Scheduling _localSsdRecoveryTimeout. - * @member {"localSsdRecoveryTimeout"|undefined} _localSsdRecoveryTimeout - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - */ - Object.defineProperty(Scheduling.prototype, "_localSsdRecoveryTimeout", { - get: $util.oneOfGetter($oneOfFields = ["localSsdRecoveryTimeout"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Scheduling instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {google.cloud.backupdr.v1.IScheduling=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling instance - */ - Scheduling.create = function create(properties) { - return new Scheduling(properties); - }; - - /** - * Encodes the specified Scheduling message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {google.cloud.backupdr.v1.IScheduling} message Scheduling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Scheduling.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.onHostMaintenance != null && Object.hasOwnProperty.call(message, "onHostMaintenance")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.onHostMaintenance); - if (message.automaticRestart != null && Object.hasOwnProperty.call(message, "automaticRestart")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.automaticRestart); - if (message.preemptible != null && Object.hasOwnProperty.call(message, "preemptible")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preemptible); - if (message.nodeAffinities != null && message.nodeAffinities.length) - for (var i = 0; i < message.nodeAffinities.length; ++i) - $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.encode(message.nodeAffinities[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.minNodeCpus != null && Object.hasOwnProperty.call(message, "minNodeCpus")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.minNodeCpus); - if (message.provisioningModel != null && Object.hasOwnProperty.call(message, "provisioningModel")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.provisioningModel); - if (message.instanceTerminationAction != null && Object.hasOwnProperty.call(message, "instanceTerminationAction")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.instanceTerminationAction); - if (message.localSsdRecoveryTimeout != null && Object.hasOwnProperty.call(message, "localSsdRecoveryTimeout")) - $root.google.cloud.backupdr.v1.SchedulingDuration.encode(message.localSsdRecoveryTimeout, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Scheduling message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {google.cloud.backupdr.v1.IScheduling} message Scheduling message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Scheduling.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Scheduling message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Scheduling.decode = function 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.backupdr.v1.Scheduling(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.onHostMaintenance = reader.int32(); - break; - } - case 2: { - message.automaticRestart = reader.bool(); - break; - } - case 3: { - message.preemptible = reader.bool(); - break; - } - case 4: { - if (!(message.nodeAffinities && message.nodeAffinities.length)) - message.nodeAffinities = []; - message.nodeAffinities.push($root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.decode(reader, reader.uint32())); - break; - } - case 5: { - message.minNodeCpus = reader.int32(); - break; - } - case 6: { - message.provisioningModel = reader.int32(); - break; - } - case 7: { - message.instanceTerminationAction = reader.int32(); - break; - } - case 10: { - message.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Scheduling message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Scheduling.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Scheduling message. - * @function verify - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Scheduling.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.onHostMaintenance != null && message.hasOwnProperty("onHostMaintenance")) { - properties._onHostMaintenance = 1; - switch (message.onHostMaintenance) { - default: - return "onHostMaintenance: enum value expected"; - case 0: - case 1: - case 1000: - break; - } - } - if (message.automaticRestart != null && message.hasOwnProperty("automaticRestart")) { - properties._automaticRestart = 1; - if (typeof message.automaticRestart !== "boolean") - return "automaticRestart: boolean expected"; - } - if (message.preemptible != null && message.hasOwnProperty("preemptible")) { - properties._preemptible = 1; - if (typeof message.preemptible !== "boolean") - return "preemptible: boolean expected"; - } - if (message.nodeAffinities != null && message.hasOwnProperty("nodeAffinities")) { - if (!Array.isArray(message.nodeAffinities)) - return "nodeAffinities: array expected"; - for (var i = 0; i < message.nodeAffinities.length; ++i) { - var error = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify(message.nodeAffinities[i]); - if (error) - return "nodeAffinities." + error; - } - } - if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { - properties._minNodeCpus = 1; - if (!$util.isInteger(message.minNodeCpus)) - return "minNodeCpus: integer expected"; - } - if (message.provisioningModel != null && message.hasOwnProperty("provisioningModel")) { - properties._provisioningModel = 1; - switch (message.provisioningModel) { - default: - return "provisioningModel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.instanceTerminationAction != null && message.hasOwnProperty("instanceTerminationAction")) { - properties._instanceTerminationAction = 1; - switch (message.instanceTerminationAction) { - default: - return "instanceTerminationAction: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.localSsdRecoveryTimeout != null && message.hasOwnProperty("localSsdRecoveryTimeout")) { - properties._localSsdRecoveryTimeout = 1; - { - var error = $root.google.cloud.backupdr.v1.SchedulingDuration.verify(message.localSsdRecoveryTimeout); - if (error) - return "localSsdRecoveryTimeout." + error; - } - } - return null; - }; - - /** - * Creates a Scheduling message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Scheduling} Scheduling - */ - Scheduling.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Scheduling) - return object; - var message = new $root.google.cloud.backupdr.v1.Scheduling(); - switch (object.onHostMaintenance) { - default: - if (typeof object.onHostMaintenance === "number") { - message.onHostMaintenance = object.onHostMaintenance; - break; - } - break; - case "ON_HOST_MAINTENANCE_UNSPECIFIED": - case 0: - message.onHostMaintenance = 0; - break; - case "TERMINATE": - case 1: - message.onHostMaintenance = 1; - break; - case "MIGRATE": - case 1000: - message.onHostMaintenance = 1000; - break; - } - if (object.automaticRestart != null) - message.automaticRestart = Boolean(object.automaticRestart); - if (object.preemptible != null) - message.preemptible = Boolean(object.preemptible); - if (object.nodeAffinities) { - if (!Array.isArray(object.nodeAffinities)) - throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: array expected"); - message.nodeAffinities = []; - for (var i = 0; i < object.nodeAffinities.length; ++i) { - if (typeof object.nodeAffinities[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.Scheduling.nodeAffinities: object expected"); - message.nodeAffinities[i] = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.fromObject(object.nodeAffinities[i]); - } - } - if (object.minNodeCpus != null) - message.minNodeCpus = object.minNodeCpus | 0; - switch (object.provisioningModel) { - default: - if (typeof object.provisioningModel === "number") { - message.provisioningModel = object.provisioningModel; - break; - } - break; - case "PROVISIONING_MODEL_UNSPECIFIED": - case 0: - message.provisioningModel = 0; - break; - case "STANDARD": - case 1: - message.provisioningModel = 1; - break; - case "SPOT": - case 2: - message.provisioningModel = 2; - break; - } - switch (object.instanceTerminationAction) { - default: - if (typeof object.instanceTerminationAction === "number") { - message.instanceTerminationAction = object.instanceTerminationAction; - break; - } - break; - case "INSTANCE_TERMINATION_ACTION_UNSPECIFIED": - case 0: - message.instanceTerminationAction = 0; - break; - case "DELETE": - case 1: - message.instanceTerminationAction = 1; - break; - case "STOP": - case 2: - message.instanceTerminationAction = 2; - break; - } - if (object.localSsdRecoveryTimeout != null) { - if (typeof object.localSsdRecoveryTimeout !== "object") - throw TypeError(".google.cloud.backupdr.v1.Scheduling.localSsdRecoveryTimeout: object expected"); - message.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.fromObject(object.localSsdRecoveryTimeout); - } - return message; - }; - - /** - * Creates a plain object from a Scheduling message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {google.cloud.backupdr.v1.Scheduling} message Scheduling - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Scheduling.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.nodeAffinities = []; - if (message.onHostMaintenance != null && message.hasOwnProperty("onHostMaintenance")) { - object.onHostMaintenance = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.OnHostMaintenance[message.onHostMaintenance] === undefined ? message.onHostMaintenance : $root.google.cloud.backupdr.v1.Scheduling.OnHostMaintenance[message.onHostMaintenance] : message.onHostMaintenance; - if (options.oneofs) - object._onHostMaintenance = "onHostMaintenance"; - } - if (message.automaticRestart != null && message.hasOwnProperty("automaticRestart")) { - object.automaticRestart = message.automaticRestart; - if (options.oneofs) - object._automaticRestart = "automaticRestart"; - } - if (message.preemptible != null && message.hasOwnProperty("preemptible")) { - object.preemptible = message.preemptible; - if (options.oneofs) - object._preemptible = "preemptible"; - } - if (message.nodeAffinities && message.nodeAffinities.length) { - object.nodeAffinities = []; - for (var j = 0; j < message.nodeAffinities.length; ++j) - object.nodeAffinities[j] = $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.toObject(message.nodeAffinities[j], options); - } - if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { - object.minNodeCpus = message.minNodeCpus; - if (options.oneofs) - object._minNodeCpus = "minNodeCpus"; - } - if (message.provisioningModel != null && message.hasOwnProperty("provisioningModel")) { - object.provisioningModel = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.ProvisioningModel[message.provisioningModel] === undefined ? message.provisioningModel : $root.google.cloud.backupdr.v1.Scheduling.ProvisioningModel[message.provisioningModel] : message.provisioningModel; - if (options.oneofs) - object._provisioningModel = "provisioningModel"; - } - if (message.instanceTerminationAction != null && message.hasOwnProperty("instanceTerminationAction")) { - object.instanceTerminationAction = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction[message.instanceTerminationAction] === undefined ? message.instanceTerminationAction : $root.google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction[message.instanceTerminationAction] : message.instanceTerminationAction; - if (options.oneofs) - object._instanceTerminationAction = "instanceTerminationAction"; - } - if (message.localSsdRecoveryTimeout != null && message.hasOwnProperty("localSsdRecoveryTimeout")) { - object.localSsdRecoveryTimeout = $root.google.cloud.backupdr.v1.SchedulingDuration.toObject(message.localSsdRecoveryTimeout, options); - if (options.oneofs) - object._localSsdRecoveryTimeout = "localSsdRecoveryTimeout"; - } - return object; - }; - - /** - * Converts this Scheduling to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Scheduling - * @instance - * @returns {Object.} JSON object - */ - Scheduling.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Scheduling - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Scheduling - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Scheduling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Scheduling"; - }; - - /** - * OnHostMaintenance enum. - * @name google.cloud.backupdr.v1.Scheduling.OnHostMaintenance - * @enum {number} - * @property {number} ON_HOST_MAINTENANCE_UNSPECIFIED=0 ON_HOST_MAINTENANCE_UNSPECIFIED value - * @property {number} TERMINATE=1 TERMINATE value - * @property {number} MIGRATE=1000 MIGRATE value - */ - Scheduling.OnHostMaintenance = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ON_HOST_MAINTENANCE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TERMINATE"] = 1; - values[valuesById[1000] = "MIGRATE"] = 1000; - return values; - })(); - - Scheduling.NodeAffinity = (function() { - - /** - * Properties of a NodeAffinity. - * @memberof google.cloud.backupdr.v1.Scheduling - * @interface INodeAffinity - * @property {string|null} [key] NodeAffinity key - * @property {google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null} [operator] NodeAffinity operator - * @property {Array.|null} [values] NodeAffinity values - */ - - /** - * Constructs a new NodeAffinity. - * @memberof google.cloud.backupdr.v1.Scheduling - * @classdesc Represents a NodeAffinity. - * @implements INodeAffinity - * @constructor - * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity=} [properties] Properties to set - */ - function NodeAffinity(properties) { - this.values = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeAffinity key. - * @member {string|null|undefined} key - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - NodeAffinity.prototype.key = null; - - /** - * NodeAffinity operator. - * @member {google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator|null|undefined} operator - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - NodeAffinity.prototype.operator = null; - - /** - * NodeAffinity values. - * @member {Array.} values - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - NodeAffinity.prototype.values = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * NodeAffinity _key. - * @member {"key"|undefined} _key - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - Object.defineProperty(NodeAffinity.prototype, "_key", { - get: $util.oneOfGetter($oneOfFields = ["key"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * NodeAffinity _operator. - * @member {"operator"|undefined} _operator - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - */ - Object.defineProperty(NodeAffinity.prototype, "_operator", { - get: $util.oneOfGetter($oneOfFields = ["operator"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new NodeAffinity instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity instance - */ - NodeAffinity.create = function create(properties) { - return new NodeAffinity(properties); - }; - - /** - * Encodes the specified NodeAffinity message. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity} message NodeAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeAffinity.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.operator != null && Object.hasOwnProperty.call(message, "operator")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operator); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.values[i]); - return writer; - }; - - /** - * Encodes the specified NodeAffinity message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Scheduling.NodeAffinity.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {google.cloud.backupdr.v1.Scheduling.INodeAffinity} message NodeAffinity message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeAffinity.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeAffinity.decode = function 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.backupdr.v1.Scheduling.NodeAffinity(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.key = reader.string(); - break; - } - case 2: { - message.operator = reader.int32(); - break; - } - case 3: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeAffinity message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeAffinity.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeAffinity message. - * @function verify - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeAffinity.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.key != null && message.hasOwnProperty("key")) { - properties._key = 1; - if (!$util.isString(message.key)) - return "key: string expected"; - } - if (message.operator != null && message.hasOwnProperty("operator")) { - properties._operator = 1; - switch (message.operator) { - default: - return "operator: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) - if (!$util.isString(message.values[i])) - return "values: string[] expected"; - } - return null; - }; - - /** - * Creates a NodeAffinity message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Scheduling.NodeAffinity} NodeAffinity - */ - NodeAffinity.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity) - return object; - var message = new $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity(); - if (object.key != null) - message.key = String(object.key); - switch (object.operator) { - default: - if (typeof object.operator === "number") { - message.operator = object.operator; - break; - } - break; - case "OPERATOR_UNSPECIFIED": - case 0: - message.operator = 0; - break; - case "IN": - case 1: - message.operator = 1; - break; - case "NOT_IN": - case 2: - message.operator = 2; - break; - } - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.cloud.backupdr.v1.Scheduling.NodeAffinity.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) - message.values[i] = String(object.values[i]); - } - return message; - }; - - /** - * Creates a plain object from a NodeAffinity message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {google.cloud.backupdr.v1.Scheduling.NodeAffinity} message NodeAffinity - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeAffinity.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.key != null && message.hasOwnProperty("key")) { - object.key = message.key; - if (options.oneofs) - object._key = "key"; - } - if (message.operator != null && message.hasOwnProperty("operator")) { - object.operator = options.enums === String ? $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator[message.operator] === undefined ? message.operator : $root.google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator[message.operator] : message.operator; - if (options.oneofs) - object._operator = "operator"; - } - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = message.values[j]; - } - return object; - }; - - /** - * Converts this NodeAffinity to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @instance - * @returns {Object.} JSON object - */ - NodeAffinity.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeAffinity - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Scheduling.NodeAffinity - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeAffinity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Scheduling.NodeAffinity"; - }; - - /** - * Operator enum. - * @name google.cloud.backupdr.v1.Scheduling.NodeAffinity.Operator - * @enum {number} - * @property {number} OPERATOR_UNSPECIFIED=0 OPERATOR_UNSPECIFIED value - * @property {number} IN=1 IN value - * @property {number} NOT_IN=2 NOT_IN value - */ - NodeAffinity.Operator = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OPERATOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "IN"] = 1; - values[valuesById[2] = "NOT_IN"] = 2; - return values; - })(); - - return NodeAffinity; - })(); - - /** - * ProvisioningModel enum. - * @name google.cloud.backupdr.v1.Scheduling.ProvisioningModel - * @enum {number} - * @property {number} PROVISIONING_MODEL_UNSPECIFIED=0 PROVISIONING_MODEL_UNSPECIFIED value - * @property {number} STANDARD=1 STANDARD value - * @property {number} SPOT=2 SPOT value - */ - Scheduling.ProvisioningModel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROVISIONING_MODEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "STANDARD"] = 1; - values[valuesById[2] = "SPOT"] = 2; - return values; - })(); - - /** - * InstanceTerminationAction enum. - * @name google.cloud.backupdr.v1.Scheduling.InstanceTerminationAction - * @enum {number} - * @property {number} INSTANCE_TERMINATION_ACTION_UNSPECIFIED=0 INSTANCE_TERMINATION_ACTION_UNSPECIFIED value - * @property {number} DELETE=1 DELETE value - * @property {number} STOP=2 STOP value - */ - Scheduling.InstanceTerminationAction = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "INSTANCE_TERMINATION_ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "DELETE"] = 1; - values[valuesById[2] = "STOP"] = 2; - return values; - })(); - - return Scheduling; - })(); - - v1.SchedulingDuration = (function() { - - /** - * Properties of a SchedulingDuration. - * @memberof google.cloud.backupdr.v1 - * @interface ISchedulingDuration - * @property {number|Long|null} [seconds] SchedulingDuration seconds - * @property {number|null} [nanos] SchedulingDuration nanos - */ - - /** - * Constructs a new SchedulingDuration. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a SchedulingDuration. - * @implements ISchedulingDuration - * @constructor - * @param {google.cloud.backupdr.v1.ISchedulingDuration=} [properties] Properties to set - */ - function SchedulingDuration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SchedulingDuration seconds. - * @member {number|Long|null|undefined} seconds - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - */ - SchedulingDuration.prototype.seconds = null; - - /** - * SchedulingDuration nanos. - * @member {number|null|undefined} nanos - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - */ - SchedulingDuration.prototype.nanos = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SchedulingDuration _seconds. - * @member {"seconds"|undefined} _seconds - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - */ - Object.defineProperty(SchedulingDuration.prototype, "_seconds", { - get: $util.oneOfGetter($oneOfFields = ["seconds"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * SchedulingDuration _nanos. - * @member {"nanos"|undefined} _nanos - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - */ - Object.defineProperty(SchedulingDuration.prototype, "_nanos", { - get: $util.oneOfGetter($oneOfFields = ["nanos"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SchedulingDuration instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {google.cloud.backupdr.v1.ISchedulingDuration=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration instance - */ - SchedulingDuration.create = function create(properties) { - return new SchedulingDuration(properties); - }; - - /** - * Encodes the specified SchedulingDuration message. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {google.cloud.backupdr.v1.ISchedulingDuration} message SchedulingDuration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchedulingDuration.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 SchedulingDuration message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.SchedulingDuration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {google.cloud.backupdr.v1.ISchedulingDuration} message SchedulingDuration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchedulingDuration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SchedulingDuration message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchedulingDuration.decode = function 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.backupdr.v1.SchedulingDuration(); - 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 SchedulingDuration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchedulingDuration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SchedulingDuration message. - * @function verify - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SchedulingDuration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.seconds != null && message.hasOwnProperty("seconds")) { - properties._seconds = 1; - 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")) { - properties._nanos = 1; - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - } - return null; - }; - - /** - * Creates a SchedulingDuration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.SchedulingDuration} SchedulingDuration - */ - SchedulingDuration.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.SchedulingDuration) - return object; - var message = new $root.google.cloud.backupdr.v1.SchedulingDuration(); - 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 SchedulingDuration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {google.cloud.backupdr.v1.SchedulingDuration} message SchedulingDuration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SchedulingDuration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - 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 (options.oneofs) - object._seconds = "seconds"; - } - if (message.nanos != null && message.hasOwnProperty("nanos")) { - object.nanos = message.nanos; - if (options.oneofs) - object._nanos = "nanos"; - } - return object; - }; - - /** - * Converts this SchedulingDuration to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @instance - * @returns {Object.} JSON object - */ - SchedulingDuration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SchedulingDuration - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.SchedulingDuration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SchedulingDuration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.SchedulingDuration"; - }; - - return SchedulingDuration; - })(); - - v1.ServiceAccount = (function() { - - /** - * Properties of a ServiceAccount. - * @memberof google.cloud.backupdr.v1 - * @interface IServiceAccount - * @property {string|null} [email] ServiceAccount email - * @property {Array.|null} [scopes] ServiceAccount scopes - */ - - /** - * Constructs a new ServiceAccount. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a ServiceAccount. - * @implements IServiceAccount - * @constructor - * @param {google.cloud.backupdr.v1.IServiceAccount=} [properties] Properties to set - */ - function ServiceAccount(properties) { - this.scopes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceAccount email. - * @member {string|null|undefined} email - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @instance - */ - ServiceAccount.prototype.email = null; - - /** - * ServiceAccount scopes. - * @member {Array.} scopes - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @instance - */ - ServiceAccount.prototype.scopes = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ServiceAccount _email. - * @member {"email"|undefined} _email - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @instance - */ - Object.defineProperty(ServiceAccount.prototype, "_email", { - get: $util.oneOfGetter($oneOfFields = ["email"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ServiceAccount instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {google.cloud.backupdr.v1.IServiceAccount=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount instance - */ - ServiceAccount.create = function create(properties) { - return new ServiceAccount(properties); - }; - - /** - * Encodes the specified ServiceAccount message. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {google.cloud.backupdr.v1.IServiceAccount} message ServiceAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.email != null && Object.hasOwnProperty.call(message, "email")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.email); - if (message.scopes != null && message.scopes.length) - for (var i = 0; i < message.scopes.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.scopes[i]); - return writer; - }; - - /** - * Encodes the specified ServiceAccount message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.ServiceAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {google.cloud.backupdr.v1.IServiceAccount} message ServiceAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceAccount message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceAccount.decode = function 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.backupdr.v1.ServiceAccount(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.email = reader.string(); - break; - } - case 2: { - if (!(message.scopes && message.scopes.length)) - message.scopes = []; - message.scopes.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceAccount message. - * @function verify - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.email != null && message.hasOwnProperty("email")) { - properties._email = 1; - if (!$util.isString(message.email)) - return "email: string expected"; - } - if (message.scopes != null && message.hasOwnProperty("scopes")) { - if (!Array.isArray(message.scopes)) - return "scopes: array expected"; - for (var i = 0; i < message.scopes.length; ++i) - if (!$util.isString(message.scopes[i])) - return "scopes: string[] expected"; - } - return null; - }; - - /** - * Creates a ServiceAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.ServiceAccount} ServiceAccount - */ - ServiceAccount.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.ServiceAccount) - return object; - var message = new $root.google.cloud.backupdr.v1.ServiceAccount(); - if (object.email != null) - message.email = String(object.email); - if (object.scopes) { - if (!Array.isArray(object.scopes)) - throw TypeError(".google.cloud.backupdr.v1.ServiceAccount.scopes: array expected"); - message.scopes = []; - for (var i = 0; i < object.scopes.length; ++i) - message.scopes[i] = String(object.scopes[i]); - } - return message; - }; - - /** - * Creates a plain object from a ServiceAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {google.cloud.backupdr.v1.ServiceAccount} message ServiceAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.scopes = []; - if (message.email != null && message.hasOwnProperty("email")) { - object.email = message.email; - if (options.oneofs) - object._email = "email"; - } - if (message.scopes && message.scopes.length) { - object.scopes = []; - for (var j = 0; j < message.scopes.length; ++j) - object.scopes[j] = message.scopes[j]; - } - return object; - }; - - /** - * Converts this ServiceAccount to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @instance - * @returns {Object.} JSON object - */ - ServiceAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceAccount - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.ServiceAccount - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceAccount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.ServiceAccount"; - }; - - return ServiceAccount; - })(); - - v1.Tags = (function() { - - /** - * Properties of a Tags. - * @memberof google.cloud.backupdr.v1 - * @interface ITags - * @property {Array.|null} [items] Tags items - */ - - /** - * Constructs a new Tags. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a Tags. - * @implements ITags - * @constructor - * @param {google.cloud.backupdr.v1.ITags=} [properties] Properties to set - */ - function Tags(properties) { - this.items = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Tags items. - * @member {Array.} items - * @memberof google.cloud.backupdr.v1.Tags - * @instance - */ - Tags.prototype.items = $util.emptyArray; - - /** - * Creates a new Tags instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {google.cloud.backupdr.v1.ITags=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.Tags} Tags instance - */ - Tags.create = function create(properties) { - return new Tags(properties); - }; - - /** - * Encodes the specified Tags message. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {google.cloud.backupdr.v1.ITags} message Tags message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tags.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.items != null && message.items.length) - for (var i = 0; i < message.items.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.items[i]); - return writer; - }; - - /** - * Encodes the specified Tags message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.Tags.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {google.cloud.backupdr.v1.ITags} message Tags message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tags.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Tags message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.Tags} Tags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tags.decode = function 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.backupdr.v1.Tags(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.items && message.items.length)) - message.items = []; - message.items.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Tags message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.Tags} Tags - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tags.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Tags message. - * @function verify - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Tags.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.items != null && message.hasOwnProperty("items")) { - if (!Array.isArray(message.items)) - return "items: array expected"; - for (var i = 0; i < message.items.length; ++i) - if (!$util.isString(message.items[i])) - return "items: string[] expected"; - } - return null; - }; - - /** - * Creates a Tags message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.Tags} Tags - */ - Tags.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.Tags) - return object; - var message = new $root.google.cloud.backupdr.v1.Tags(); - if (object.items) { - if (!Array.isArray(object.items)) - throw TypeError(".google.cloud.backupdr.v1.Tags.items: array expected"); - message.items = []; - for (var i = 0; i < object.items.length; ++i) - message.items[i] = String(object.items[i]); - } - return message; - }; - - /** - * Creates a plain object from a Tags message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {google.cloud.backupdr.v1.Tags} message Tags - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Tags.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.items = []; - if (message.items && message.items.length) { - object.items = []; - for (var j = 0; j < message.items.length; ++j) - object.items[j] = message.items[j]; - } - return object; - }; - - /** - * Converts this Tags to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.Tags - * @instance - * @returns {Object.} JSON object - */ - Tags.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Tags - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.Tags - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Tags.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.Tags"; - }; - - return Tags; - })(); - - v1.AttachedDisk = (function() { - - /** - * Properties of an AttachedDisk. - * @memberof google.cloud.backupdr.v1 - * @interface IAttachedDisk - * @property {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null} [initializeParams] AttachedDisk initializeParams - * @property {string|null} [deviceName] AttachedDisk deviceName - * @property {string|null} [kind] AttachedDisk kind - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskType|null} [diskTypeDeprecated] AttachedDisk diskTypeDeprecated - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskMode|null} [mode] AttachedDisk mode - * @property {string|null} [source] AttachedDisk source - * @property {number|Long|null} [index] AttachedDisk index - * @property {boolean|null} [boot] AttachedDisk boot - * @property {boolean|null} [autoDelete] AttachedDisk autoDelete - * @property {Array.|null} [license] AttachedDisk license - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null} [diskInterface] AttachedDisk diskInterface - * @property {Array.|null} [guestOsFeature] AttachedDisk guestOsFeature - * @property {google.cloud.backupdr.v1.ICustomerEncryptionKey|null} [diskEncryptionKey] AttachedDisk diskEncryptionKey - * @property {number|Long|null} [diskSizeGb] AttachedDisk diskSizeGb - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null} [savedState] AttachedDisk savedState - * @property {string|null} [diskType] AttachedDisk diskType - * @property {google.cloud.backupdr.v1.AttachedDisk.DiskType|null} [type] AttachedDisk type - */ - - /** - * Constructs a new AttachedDisk. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents an AttachedDisk. - * @implements IAttachedDisk - * @constructor - * @param {google.cloud.backupdr.v1.IAttachedDisk=} [properties] Properties to set - */ - function AttachedDisk(properties) { - this.license = []; - this.guestOsFeature = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AttachedDisk initializeParams. - * @member {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams|null|undefined} initializeParams - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.initializeParams = null; - - /** - * AttachedDisk deviceName. - * @member {string|null|undefined} deviceName - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.deviceName = null; - - /** - * AttachedDisk kind. - * @member {string|null|undefined} kind - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.kind = null; - - /** - * AttachedDisk diskTypeDeprecated. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskType|null|undefined} diskTypeDeprecated - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskTypeDeprecated = null; - - /** - * AttachedDisk mode. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskMode|null|undefined} mode - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.mode = null; - - /** - * AttachedDisk source. - * @member {string|null|undefined} source - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.source = null; - - /** - * AttachedDisk index. - * @member {number|Long|null|undefined} index - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.index = null; - - /** - * AttachedDisk boot. - * @member {boolean|null|undefined} boot - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.boot = null; - - /** - * AttachedDisk autoDelete. - * @member {boolean|null|undefined} autoDelete - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.autoDelete = null; - - /** - * AttachedDisk license. - * @member {Array.} license - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.license = $util.emptyArray; - - /** - * AttachedDisk diskInterface. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskInterface|null|undefined} diskInterface - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskInterface = null; - - /** - * AttachedDisk guestOsFeature. - * @member {Array.} guestOsFeature - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.guestOsFeature = $util.emptyArray; - - /** - * AttachedDisk diskEncryptionKey. - * @member {google.cloud.backupdr.v1.ICustomerEncryptionKey|null|undefined} diskEncryptionKey - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskEncryptionKey = null; - - /** - * AttachedDisk diskSizeGb. - * @member {number|Long|null|undefined} diskSizeGb - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskSizeGb = null; - - /** - * AttachedDisk savedState. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskSavedState|null|undefined} savedState - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.savedState = null; - - /** - * AttachedDisk diskType. - * @member {string|null|undefined} diskType - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.diskType = null; - - /** - * AttachedDisk type. - * @member {google.cloud.backupdr.v1.AttachedDisk.DiskType|null|undefined} type - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - AttachedDisk.prototype.type = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AttachedDisk _initializeParams. - * @member {"initializeParams"|undefined} _initializeParams - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_initializeParams", { - get: $util.oneOfGetter($oneOfFields = ["initializeParams"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _deviceName. - * @member {"deviceName"|undefined} _deviceName - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_deviceName", { - get: $util.oneOfGetter($oneOfFields = ["deviceName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _kind. - * @member {"kind"|undefined} _kind - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_kind", { - get: $util.oneOfGetter($oneOfFields = ["kind"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskTypeDeprecated. - * @member {"diskTypeDeprecated"|undefined} _diskTypeDeprecated - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskTypeDeprecated", { - get: $util.oneOfGetter($oneOfFields = ["diskTypeDeprecated"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _mode. - * @member {"mode"|undefined} _mode - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_mode", { - get: $util.oneOfGetter($oneOfFields = ["mode"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _source. - * @member {"source"|undefined} _source - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_source", { - get: $util.oneOfGetter($oneOfFields = ["source"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _index. - * @member {"index"|undefined} _index - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_index", { - get: $util.oneOfGetter($oneOfFields = ["index"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _boot. - * @member {"boot"|undefined} _boot - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_boot", { - get: $util.oneOfGetter($oneOfFields = ["boot"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _autoDelete. - * @member {"autoDelete"|undefined} _autoDelete - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_autoDelete", { - get: $util.oneOfGetter($oneOfFields = ["autoDelete"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskInterface. - * @member {"diskInterface"|undefined} _diskInterface - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskInterface", { - get: $util.oneOfGetter($oneOfFields = ["diskInterface"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskEncryptionKey. - * @member {"diskEncryptionKey"|undefined} _diskEncryptionKey - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskEncryptionKey", { - get: $util.oneOfGetter($oneOfFields = ["diskEncryptionKey"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskSizeGb. - * @member {"diskSizeGb"|undefined} _diskSizeGb - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskSizeGb", { - get: $util.oneOfGetter($oneOfFields = ["diskSizeGb"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _savedState. - * @member {"savedState"|undefined} _savedState - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_savedState", { - get: $util.oneOfGetter($oneOfFields = ["savedState"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _diskType. - * @member {"diskType"|undefined} _diskType - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_diskType", { - get: $util.oneOfGetter($oneOfFields = ["diskType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * AttachedDisk _type. - * @member {"type"|undefined} _type - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - */ - Object.defineProperty(AttachedDisk.prototype, "_type", { - get: $util.oneOfGetter($oneOfFields = ["type"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AttachedDisk instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {google.cloud.backupdr.v1.IAttachedDisk=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk instance - */ - AttachedDisk.create = function create(properties) { - return new AttachedDisk(properties); - }; - - /** - * Encodes the specified AttachedDisk message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {google.cloud.backupdr.v1.IAttachedDisk} message AttachedDisk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AttachedDisk.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initializeParams != null && Object.hasOwnProperty.call(message, "initializeParams")) - $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.encode(message.initializeParams, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.deviceName != null && Object.hasOwnProperty.call(message, "deviceName")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.deviceName); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.kind); - if (message.diskTypeDeprecated != null && Object.hasOwnProperty.call(message, "diskTypeDeprecated")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.diskTypeDeprecated); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.mode); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.source); - if (message.index != null && Object.hasOwnProperty.call(message, "index")) - writer.uint32(/* id 9, wireType 0 =*/72).int64(message.index); - if (message.boot != null && Object.hasOwnProperty.call(message, "boot")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.boot); - if (message.autoDelete != null && Object.hasOwnProperty.call(message, "autoDelete")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.autoDelete); - if (message.license != null && message.license.length) - for (var i = 0; i < message.license.length; ++i) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.license[i]); - if (message.diskInterface != null && Object.hasOwnProperty.call(message, "diskInterface")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.diskInterface); - if (message.guestOsFeature != null && message.guestOsFeature.length) - for (var i = 0; i < message.guestOsFeature.length; ++i) - $root.google.cloud.backupdr.v1.GuestOsFeature.encode(message.guestOsFeature[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.diskEncryptionKey != null && Object.hasOwnProperty.call(message, "diskEncryptionKey")) - $root.google.cloud.backupdr.v1.CustomerEncryptionKey.encode(message.diskEncryptionKey, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) - writer.uint32(/* id 16, wireType 0 =*/128).int64(message.diskSizeGb); - if (message.savedState != null && Object.hasOwnProperty.call(message, "savedState")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.savedState); - if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.diskType); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.type); - return writer; - }; - - /** - * Encodes the specified AttachedDisk message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {google.cloud.backupdr.v1.IAttachedDisk} message AttachedDisk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AttachedDisk.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AttachedDisk message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AttachedDisk.decode = function 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.backupdr.v1.AttachedDisk(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.decode(reader, reader.uint32()); - break; - } - case 4: { - message.deviceName = reader.string(); - break; - } - case 5: { - message.kind = reader.string(); - break; - } - case 6: { - message.diskTypeDeprecated = reader.int32(); - break; - } - case 7: { - message.mode = reader.int32(); - break; - } - case 8: { - message.source = reader.string(); - break; - } - case 9: { - message.index = reader.int64(); - break; - } - case 10: { - message.boot = reader.bool(); - break; - } - case 11: { - message.autoDelete = reader.bool(); - break; - } - case 12: { - if (!(message.license && message.license.length)) - message.license = []; - message.license.push(reader.string()); - break; - } - case 13: { - message.diskInterface = reader.int32(); - break; - } - case 14: { - if (!(message.guestOsFeature && message.guestOsFeature.length)) - message.guestOsFeature = []; - message.guestOsFeature.push($root.google.cloud.backupdr.v1.GuestOsFeature.decode(reader, reader.uint32())); - break; - } - case 15: { - message.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.decode(reader, reader.uint32()); - break; - } - case 16: { - message.diskSizeGb = reader.int64(); - break; - } - case 17: { - message.savedState = reader.int32(); - break; - } - case 18: { - message.diskType = reader.string(); - break; - } - case 19: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AttachedDisk message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AttachedDisk.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AttachedDisk message. - * @function verify - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AttachedDisk.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.initializeParams != null && message.hasOwnProperty("initializeParams")) { - properties._initializeParams = 1; - { - var error = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify(message.initializeParams); - if (error) - return "initializeParams." + error; - } - } - if (message.deviceName != null && message.hasOwnProperty("deviceName")) { - properties._deviceName = 1; - if (!$util.isString(message.deviceName)) - return "deviceName: string expected"; - } - if (message.kind != null && message.hasOwnProperty("kind")) { - properties._kind = 1; - if (!$util.isString(message.kind)) - return "kind: string expected"; - } - if (message.diskTypeDeprecated != null && message.hasOwnProperty("diskTypeDeprecated")) { - properties._diskTypeDeprecated = 1; - switch (message.diskTypeDeprecated) { - default: - return "diskTypeDeprecated: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.mode != null && message.hasOwnProperty("mode")) { - properties._mode = 1; - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.source != null && message.hasOwnProperty("source")) { - properties._source = 1; - if (!$util.isString(message.source)) - return "source: string expected"; - } - if (message.index != null && message.hasOwnProperty("index")) { - properties._index = 1; - if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) - return "index: integer|Long expected"; - } - if (message.boot != null && message.hasOwnProperty("boot")) { - properties._boot = 1; - if (typeof message.boot !== "boolean") - return "boot: boolean expected"; - } - if (message.autoDelete != null && message.hasOwnProperty("autoDelete")) { - properties._autoDelete = 1; - if (typeof message.autoDelete !== "boolean") - return "autoDelete: boolean expected"; - } - if (message.license != null && message.hasOwnProperty("license")) { - if (!Array.isArray(message.license)) - return "license: array expected"; - for (var i = 0; i < message.license.length; ++i) - if (!$util.isString(message.license[i])) - return "license: string[] expected"; - } - if (message.diskInterface != null && message.hasOwnProperty("diskInterface")) { - properties._diskInterface = 1; - switch (message.diskInterface) { - default: - return "diskInterface: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.guestOsFeature != null && message.hasOwnProperty("guestOsFeature")) { - if (!Array.isArray(message.guestOsFeature)) - return "guestOsFeature: array expected"; - for (var i = 0; i < message.guestOsFeature.length; ++i) { - var error = $root.google.cloud.backupdr.v1.GuestOsFeature.verify(message.guestOsFeature[i]); - if (error) - return "guestOsFeature." + error; - } - } - if (message.diskEncryptionKey != null && message.hasOwnProperty("diskEncryptionKey")) { - properties._diskEncryptionKey = 1; - { - var error = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.verify(message.diskEncryptionKey); - if (error) - return "diskEncryptionKey." + error; - } - } - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) { - properties._diskSizeGb = 1; - if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) - return "diskSizeGb: integer|Long expected"; - } - if (message.savedState != null && message.hasOwnProperty("savedState")) { - properties._savedState = 1; - switch (message.savedState) { - default: - return "savedState: enum value expected"; - case 0: - case 1: - break; - } - } - if (message.diskType != null && message.hasOwnProperty("diskType")) { - properties._diskType = 1; - if (!$util.isString(message.diskType)) - return "diskType: string expected"; - } - if (message.type != null && message.hasOwnProperty("type")) { - properties._type = 1; - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates an AttachedDisk message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AttachedDisk} AttachedDisk - */ - AttachedDisk.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AttachedDisk) - return object; - var message = new $root.google.cloud.backupdr.v1.AttachedDisk(); - if (object.initializeParams != null) { - if (typeof object.initializeParams !== "object") - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.initializeParams: object expected"); - message.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.fromObject(object.initializeParams); - } - if (object.deviceName != null) - message.deviceName = String(object.deviceName); - if (object.kind != null) - message.kind = String(object.kind); - switch (object.diskTypeDeprecated) { - default: - if (typeof object.diskTypeDeprecated === "number") { - message.diskTypeDeprecated = object.diskTypeDeprecated; - break; - } - break; - case "DISK_TYPE_UNSPECIFIED": - case 0: - message.diskTypeDeprecated = 0; - break; - case "SCRATCH": - case 1: - message.diskTypeDeprecated = 1; - break; - case "PERSISTENT": - case 2: - message.diskTypeDeprecated = 2; - break; - } - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "DISK_MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "READ_WRITE": - case 1: - message.mode = 1; - break; - case "READ_ONLY": - case 2: - message.mode = 2; - break; - case "LOCKED": - case 3: - message.mode = 3; - break; - } - if (object.source != null) - message.source = String(object.source); - if (object.index != null) - if ($util.Long) - (message.index = $util.Long.fromValue(object.index)).unsigned = false; - else if (typeof object.index === "string") - message.index = parseInt(object.index, 10); - else if (typeof object.index === "number") - message.index = object.index; - else if (typeof object.index === "object") - message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); - if (object.boot != null) - message.boot = Boolean(object.boot); - if (object.autoDelete != null) - message.autoDelete = Boolean(object.autoDelete); - if (object.license) { - if (!Array.isArray(object.license)) - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.license: array expected"); - message.license = []; - for (var i = 0; i < object.license.length; ++i) - message.license[i] = String(object.license[i]); - } - switch (object.diskInterface) { - default: - if (typeof object.diskInterface === "number") { - message.diskInterface = object.diskInterface; - break; - } - break; - case "DISK_INTERFACE_UNSPECIFIED": - case 0: - message.diskInterface = 0; - break; - case "SCSI": - case 1: - message.diskInterface = 1; - break; - case "NVME": - case 2: - message.diskInterface = 2; - break; - case "NVDIMM": - case 3: - message.diskInterface = 3; - break; - case "ISCSI": - case 4: - message.diskInterface = 4; - break; - } - if (object.guestOsFeature) { - if (!Array.isArray(object.guestOsFeature)) - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.guestOsFeature: array expected"); - message.guestOsFeature = []; - for (var i = 0; i < object.guestOsFeature.length; ++i) { - if (typeof object.guestOsFeature[i] !== "object") - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.guestOsFeature: object expected"); - message.guestOsFeature[i] = $root.google.cloud.backupdr.v1.GuestOsFeature.fromObject(object.guestOsFeature[i]); - } - } - if (object.diskEncryptionKey != null) { - if (typeof object.diskEncryptionKey !== "object") - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.diskEncryptionKey: object expected"); - message.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.fromObject(object.diskEncryptionKey); - } - if (object.diskSizeGb != null) - if ($util.Long) - (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; - else if (typeof object.diskSizeGb === "string") - message.diskSizeGb = parseInt(object.diskSizeGb, 10); - else if (typeof object.diskSizeGb === "number") - message.diskSizeGb = object.diskSizeGb; - else if (typeof object.diskSizeGb === "object") - message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); - switch (object.savedState) { - default: - if (typeof object.savedState === "number") { - message.savedState = object.savedState; - break; - } - break; - case "DISK_SAVED_STATE_UNSPECIFIED": - case 0: - message.savedState = 0; - break; - case "PRESERVED": - case 1: - message.savedState = 1; - break; - } - if (object.diskType != null) - message.diskType = String(object.diskType); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "DISK_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "SCRATCH": - case 1: - message.type = 1; - break; - case "PERSISTENT": - case 2: - message.type = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an AttachedDisk message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk} message AttachedDisk - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AttachedDisk.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.license = []; - object.guestOsFeature = []; - } - if (message.initializeParams != null && message.hasOwnProperty("initializeParams")) { - object.initializeParams = $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams.toObject(message.initializeParams, options); - if (options.oneofs) - object._initializeParams = "initializeParams"; - } - if (message.deviceName != null && message.hasOwnProperty("deviceName")) { - object.deviceName = message.deviceName; - if (options.oneofs) - object._deviceName = "deviceName"; - } - if (message.kind != null && message.hasOwnProperty("kind")) { - object.kind = message.kind; - if (options.oneofs) - object._kind = "kind"; - } - if (message.diskTypeDeprecated != null && message.hasOwnProperty("diskTypeDeprecated")) { - object.diskTypeDeprecated = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated] === undefined ? message.diskTypeDeprecated : $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.diskTypeDeprecated] : message.diskTypeDeprecated; - if (options.oneofs) - object._diskTypeDeprecated = "diskTypeDeprecated"; - } - if (message.mode != null && message.hasOwnProperty("mode")) { - object.mode = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode] === undefined ? message.mode : $root.google.cloud.backupdr.v1.AttachedDisk.DiskMode[message.mode] : message.mode; - if (options.oneofs) - object._mode = "mode"; - } - if (message.source != null && message.hasOwnProperty("source")) { - object.source = message.source; - if (options.oneofs) - object._source = "source"; - } - if (message.index != null && message.hasOwnProperty("index")) { - if (typeof message.index === "number") - object.index = options.longs === String ? String(message.index) : message.index; - else - object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; - if (options.oneofs) - object._index = "index"; - } - if (message.boot != null && message.hasOwnProperty("boot")) { - object.boot = message.boot; - if (options.oneofs) - object._boot = "boot"; - } - if (message.autoDelete != null && message.hasOwnProperty("autoDelete")) { - object.autoDelete = message.autoDelete; - if (options.oneofs) - object._autoDelete = "autoDelete"; - } - if (message.license && message.license.length) { - object.license = []; - for (var j = 0; j < message.license.length; ++j) - object.license[j] = message.license[j]; - } - if (message.diskInterface != null && message.hasOwnProperty("diskInterface")) { - object.diskInterface = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskInterface[message.diskInterface] === undefined ? message.diskInterface : $root.google.cloud.backupdr.v1.AttachedDisk.DiskInterface[message.diskInterface] : message.diskInterface; - if (options.oneofs) - object._diskInterface = "diskInterface"; - } - if (message.guestOsFeature && message.guestOsFeature.length) { - object.guestOsFeature = []; - for (var j = 0; j < message.guestOsFeature.length; ++j) - object.guestOsFeature[j] = $root.google.cloud.backupdr.v1.GuestOsFeature.toObject(message.guestOsFeature[j], options); - } - if (message.diskEncryptionKey != null && message.hasOwnProperty("diskEncryptionKey")) { - object.diskEncryptionKey = $root.google.cloud.backupdr.v1.CustomerEncryptionKey.toObject(message.diskEncryptionKey, options); - if (options.oneofs) - object._diskEncryptionKey = "diskEncryptionKey"; - } - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) { - if (typeof message.diskSizeGb === "number") - object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; - else - object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; - if (options.oneofs) - object._diskSizeGb = "diskSizeGb"; - } - if (message.savedState != null && message.hasOwnProperty("savedState")) { - object.savedState = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState] === undefined ? message.savedState : $root.google.cloud.backupdr.v1.AttachedDisk.DiskSavedState[message.savedState] : message.savedState; - if (options.oneofs) - object._savedState = "savedState"; - } - if (message.diskType != null && message.hasOwnProperty("diskType")) { - object.diskType = message.diskType; - if (options.oneofs) - object._diskType = "diskType"; - } - if (message.type != null && message.hasOwnProperty("type")) { - object.type = options.enums === String ? $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.AttachedDisk.DiskType[message.type] : message.type; - if (options.oneofs) - object._type = "type"; - } - return object; - }; - - /** - * Converts this AttachedDisk to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @instance - * @returns {Object.} JSON object - */ - AttachedDisk.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AttachedDisk - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AttachedDisk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AttachedDisk"; - }; - - AttachedDisk.InitializeParams = (function() { - - /** - * Properties of an InitializeParams. - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @interface IInitializeParams - * @property {string|null} [diskName] InitializeParams diskName - * @property {Array.|null} [replicaZones] InitializeParams replicaZones - */ - - /** - * Constructs a new InitializeParams. - * @memberof google.cloud.backupdr.v1.AttachedDisk - * @classdesc Represents an InitializeParams. - * @implements IInitializeParams - * @constructor - * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams=} [properties] Properties to set - */ - function InitializeParams(properties) { - this.replicaZones = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InitializeParams diskName. - * @member {string|null|undefined} diskName - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @instance - */ - InitializeParams.prototype.diskName = null; - - /** - * InitializeParams replicaZones. - * @member {Array.} replicaZones - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @instance - */ - InitializeParams.prototype.replicaZones = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * InitializeParams _diskName. - * @member {"diskName"|undefined} _diskName - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @instance - */ - Object.defineProperty(InitializeParams.prototype, "_diskName", { - get: $util.oneOfGetter($oneOfFields = ["diskName"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new InitializeParams instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams instance - */ - InitializeParams.create = function create(properties) { - return new InitializeParams(properties); - }; - - /** - * Encodes the specified InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams} message InitializeParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitializeParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.diskName != null && Object.hasOwnProperty.call(message, "diskName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.diskName); - if (message.replicaZones != null && message.replicaZones.length) - for (var i = 0; i < message.replicaZones.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.replicaZones[i]); - return writer; - }; - - /** - * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams} message InitializeParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InitializeParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InitializeParams message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitializeParams.decode = function 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.backupdr.v1.AttachedDisk.InitializeParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.diskName = reader.string(); - break; - } - case 2: { - if (!(message.replicaZones && message.replicaZones.length)) - message.replicaZones = []; - message.replicaZones.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InitializeParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InitializeParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InitializeParams message. - * @function verify - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InitializeParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.diskName != null && message.hasOwnProperty("diskName")) { - properties._diskName = 1; - if (!$util.isString(message.diskName)) - return "diskName: string expected"; - } - if (message.replicaZones != null && message.hasOwnProperty("replicaZones")) { - if (!Array.isArray(message.replicaZones)) - return "replicaZones: array expected"; - for (var i = 0; i < message.replicaZones.length; ++i) - if (!$util.isString(message.replicaZones[i])) - return "replicaZones: string[] expected"; - } - return null; - }; - - /** - * Creates an InitializeParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams - */ - InitializeParams.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams) - return object; - var message = new $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams(); - if (object.diskName != null) - message.diskName = String(object.diskName); - if (object.replicaZones) { - if (!Array.isArray(object.replicaZones)) - throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.InitializeParams.replicaZones: array expected"); - message.replicaZones = []; - for (var i = 0; i < object.replicaZones.length; ++i) - message.replicaZones[i] = String(object.replicaZones[i]); - } - return message; - }; - - /** - * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} message InitializeParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InitializeParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.replicaZones = []; - if (message.diskName != null && message.hasOwnProperty("diskName")) { - object.diskName = message.diskName; - if (options.oneofs) - object._diskName = "diskName"; - } - if (message.replicaZones && message.replicaZones.length) { - object.replicaZones = []; - for (var j = 0; j < message.replicaZones.length; ++j) - object.replicaZones[j] = message.replicaZones[j]; - } - return object; - }; - - /** - * Converts this InitializeParams to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @instance - * @returns {Object.} JSON object - */ - InitializeParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InitializeParams - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InitializeParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.AttachedDisk.InitializeParams"; - }; - - return InitializeParams; - })(); - - /** - * DiskType enum. - * @name google.cloud.backupdr.v1.AttachedDisk.DiskType - * @enum {number} - * @property {number} DISK_TYPE_UNSPECIFIED=0 DISK_TYPE_UNSPECIFIED value - * @property {number} SCRATCH=1 SCRATCH value - * @property {number} PERSISTENT=2 PERSISTENT value - */ - AttachedDisk.DiskType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DISK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCRATCH"] = 1; - values[valuesById[2] = "PERSISTENT"] = 2; - return values; - })(); - - /** - * DiskMode enum. - * @name google.cloud.backupdr.v1.AttachedDisk.DiskMode - * @enum {number} - * @property {number} DISK_MODE_UNSPECIFIED=0 DISK_MODE_UNSPECIFIED value - * @property {number} READ_WRITE=1 READ_WRITE value - * @property {number} READ_ONLY=2 READ_ONLY value - * @property {number} LOCKED=3 LOCKED value - */ - AttachedDisk.DiskMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DISK_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "READ_WRITE"] = 1; - values[valuesById[2] = "READ_ONLY"] = 2; - values[valuesById[3] = "LOCKED"] = 3; - return values; - })(); - - /** - * DiskInterface enum. - * @name google.cloud.backupdr.v1.AttachedDisk.DiskInterface - * @enum {number} - * @property {number} DISK_INTERFACE_UNSPECIFIED=0 DISK_INTERFACE_UNSPECIFIED value - * @property {number} SCSI=1 SCSI value - * @property {number} NVME=2 NVME value - * @property {number} NVDIMM=3 NVDIMM value - * @property {number} ISCSI=4 ISCSI value - */ - AttachedDisk.DiskInterface = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DISK_INTERFACE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCSI"] = 1; - values[valuesById[2] = "NVME"] = 2; - values[valuesById[3] = "NVDIMM"] = 3; - values[valuesById[4] = "ISCSI"] = 4; - return values; - })(); - - /** - * DiskSavedState enum. - * @name google.cloud.backupdr.v1.AttachedDisk.DiskSavedState - * @enum {number} - * @property {number} DISK_SAVED_STATE_UNSPECIFIED=0 DISK_SAVED_STATE_UNSPECIFIED value - * @property {number} PRESERVED=1 PRESERVED value - */ - AttachedDisk.DiskSavedState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DISK_SAVED_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRESERVED"] = 1; - return values; - })(); - - return AttachedDisk; - })(); - - v1.GuestOsFeature = (function() { - - /** - * Properties of a GuestOsFeature. - * @memberof google.cloud.backupdr.v1 - * @interface IGuestOsFeature - * @property {google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null} [type] GuestOsFeature type - */ - - /** - * Constructs a new GuestOsFeature. - * @memberof google.cloud.backupdr.v1 - * @classdesc Represents a GuestOsFeature. - * @implements IGuestOsFeature - * @constructor - * @param {google.cloud.backupdr.v1.IGuestOsFeature=} [properties] Properties to set - */ - function GuestOsFeature(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GuestOsFeature type. - * @member {google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null|undefined} type - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @instance - */ - GuestOsFeature.prototype.type = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * GuestOsFeature _type. - * @member {"type"|undefined} _type - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @instance - */ - Object.defineProperty(GuestOsFeature.prototype, "_type", { - get: $util.oneOfGetter($oneOfFields = ["type"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new GuestOsFeature instance using the specified properties. - * @function create - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {google.cloud.backupdr.v1.IGuestOsFeature=} [properties] Properties to set - * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature instance - */ - GuestOsFeature.create = function create(properties) { - return new GuestOsFeature(properties); - }; - - /** - * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. - * @function encode - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {google.cloud.backupdr.v1.IGuestOsFeature} message GuestOsFeature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GuestOsFeature.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - return writer; - }; - - /** - * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {google.cloud.backupdr.v1.IGuestOsFeature} message GuestOsFeature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GuestOsFeature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GuestOsFeature message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GuestOsFeature.decode = function 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.backupdr.v1.GuestOsFeature(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GuestOsFeature.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GuestOsFeature message. - * @function verify - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GuestOsFeature.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.type != null && message.hasOwnProperty("type")) { - properties._type = 1; - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - break; - } - } - return null; - }; - - /** - * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature - */ - GuestOsFeature.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.backupdr.v1.GuestOsFeature) - return object; - var message = new $root.google.cloud.backupdr.v1.GuestOsFeature(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "FEATURE_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "VIRTIO_SCSI_MULTIQUEUE": - case 1: - message.type = 1; - break; - case "WINDOWS": - case 2: - message.type = 2; - break; - case "MULTI_IP_SUBNET": - case 3: - message.type = 3; - break; - case "UEFI_COMPATIBLE": - case 4: - message.type = 4; - break; - case "SECURE_BOOT": - case 5: - message.type = 5; - break; - case "GVNIC": - case 6: - message.type = 6; - break; - case "SEV_CAPABLE": - case 7: - message.type = 7; - break; - case "BARE_METAL_LINUX_COMPATIBLE": - case 8: - message.type = 8; - break; - case "SUSPEND_RESUME_COMPATIBLE": - case 9: - message.type = 9; - break; - case "SEV_LIVE_MIGRATABLE": - case 10: - message.type = 10; - break; - case "SEV_SNP_CAPABLE": - case 11: - message.type = 11; - break; - case "TDX_CAPABLE": - case 12: - message.type = 12; - break; - case "IDPF": - case 13: - message.type = 13; - break; - case "SEV_LIVE_MIGRATABLE_V2": - case 14: - message.type = 14; - break; - } - return message; - }; - - /** - * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {google.cloud.backupdr.v1.GuestOsFeature} message GuestOsFeature - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GuestOsFeature.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.type != null && message.hasOwnProperty("type")) { - object.type = options.enums === String ? $root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type] : message.type; - if (options.oneofs) - object._type = "type"; - } - return object; - }; - - /** - * Converts this GuestOsFeature to JSON. - * @function toJSON - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @instance - * @returns {Object.} JSON object - */ - GuestOsFeature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GuestOsFeature - * @function getTypeUrl - * @memberof google.cloud.backupdr.v1.GuestOsFeature - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GuestOsFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.backupdr.v1.GuestOsFeature"; - }; - - /** - * FeatureType enum. - * @name google.cloud.backupdr.v1.GuestOsFeature.FeatureType - * @enum {number} - * @property {number} FEATURE_TYPE_UNSPECIFIED=0 FEATURE_TYPE_UNSPECIFIED value - * @property {number} VIRTIO_SCSI_MULTIQUEUE=1 VIRTIO_SCSI_MULTIQUEUE value - * @property {number} WINDOWS=2 WINDOWS value - * @property {number} MULTI_IP_SUBNET=3 MULTI_IP_SUBNET value - * @property {number} UEFI_COMPATIBLE=4 UEFI_COMPATIBLE value - * @property {number} SECURE_BOOT=5 SECURE_BOOT value - * @property {number} GVNIC=6 GVNIC value - * @property {number} SEV_CAPABLE=7 SEV_CAPABLE value - * @property {number} BARE_METAL_LINUX_COMPATIBLE=8 BARE_METAL_LINUX_COMPATIBLE value - * @property {number} SUSPEND_RESUME_COMPATIBLE=9 SUSPEND_RESUME_COMPATIBLE value - * @property {number} SEV_LIVE_MIGRATABLE=10 SEV_LIVE_MIGRATABLE value - * @property {number} SEV_SNP_CAPABLE=11 SEV_SNP_CAPABLE value - * @property {number} TDX_CAPABLE=12 TDX_CAPABLE value - * @property {number} IDPF=13 IDPF value - * @property {number} SEV_LIVE_MIGRATABLE_V2=14 SEV_LIVE_MIGRATABLE_V2 value - */ - GuestOsFeature.FeatureType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FEATURE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "VIRTIO_SCSI_MULTIQUEUE"] = 1; - values[valuesById[2] = "WINDOWS"] = 2; - values[valuesById[3] = "MULTI_IP_SUBNET"] = 3; - values[valuesById[4] = "UEFI_COMPATIBLE"] = 4; - values[valuesById[5] = "SECURE_BOOT"] = 5; - values[valuesById[6] = "GVNIC"] = 6; - values[valuesById[7] = "SEV_CAPABLE"] = 7; - values[valuesById[8] = "BARE_METAL_LINUX_COMPATIBLE"] = 8; - values[valuesById[9] = "SUSPEND_RESUME_COMPATIBLE"] = 9; - values[valuesById[10] = "SEV_LIVE_MIGRATABLE"] = 10; - values[valuesById[11] = "SEV_SNP_CAPABLE"] = 11; - values[valuesById[12] = "TDX_CAPABLE"] = 12; - values[valuesById[13] = "IDPF"] = 13; - values[valuesById[14] = "SEV_LIVE_MIGRATABLE_V2"] = 14; - return values; - })(); - - return GuestOsFeature; - })(); - - /** - * KeyRevocationActionType enum. - * @name google.cloud.backupdr.v1.KeyRevocationActionType - * @enum {number} - * @property {number} KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED=0 KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED value - * @property {number} NONE=1 NONE value - * @property {number} STOP=2 STOP value - */ - v1.KeyRevocationActionType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NONE"] = 1; - values[valuesById[2] = "STOP"] = 2; - return values; - })(); - - return v1; - })(); - - return backupdr; - })(); - - 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 - */ - - /** - * 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 = ""; - - /** - * 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); - 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; - } - 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"; - 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); - 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 = ""; - } - 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; - 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; + /** + * Properties of an InitializeParams. + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @interface IInitializeParams + * @property {string|null} [diskName] InitializeParams diskName + * @property {Array.|null} [replicaZones] InitializeParams replicaZones + */ - /** - * DotnetSettings renamedServices. - * @member {Object.} renamedServices - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedServices = $util.emptyObject; + /** + * Constructs a new InitializeParams. + * @memberof google.cloud.backupdr.v1.AttachedDisk + * @classdesc Represents an InitializeParams. + * @implements IInitializeParams + * @constructor + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams=} [properties] Properties to set + */ + function InitializeParams(properties) { + this.replicaZones = []; + if (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 renamedResources. - * @member {Object.} renamedResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedResources = $util.emptyObject; + /** + * InitializeParams diskName. + * @member {string|null|undefined} diskName + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + */ + InitializeParams.prototype.diskName = null; - /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; + /** + * InitializeParams replicaZones. + * @member {Array.} replicaZones + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + */ + InitializeParams.prototype.replicaZones = $util.emptyArray; - /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + /** + * InitializeParams _diskName. + * @member {"diskName"|undefined} _diskName + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + */ + Object.defineProperty(InitializeParams.prototype, "_diskName", { + get: $util.oneOfGetter($oneOfFields = ["diskName"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * 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); - }; + /** + * Creates a new InitializeParams instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams instance + */ + InitializeParams.create = function create(properties) { + return new InitializeParams(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 InitializeParams message. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams} message InitializeParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitializeParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.diskName != null && Object.hasOwnProperty.call(message, "diskName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.diskName); + if (message.replicaZones != null && message.replicaZones.length) + for (var i = 0; i < message.replicaZones.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.replicaZones[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(); - }; + /** + * Encodes the specified InitializeParams message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.AttachedDisk.InitializeParams.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.IInitializeParams} message InitializeParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InitializeParams.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; + /** + * Decodes an InitializeParams message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitializeParams.decode = function 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.backupdr.v1.AttachedDisk.InitializeParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.diskName = reader.string(); + break; + } + case 2: { + if (!(message.replicaZones && message.replicaZones.length)) + message.replicaZones = []; + message.replicaZones.push(reader.string()); + break; + } default: - reader.skipType(tag2 & 7); + reader.skipType(tag & 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); - }; + return message; + }; - /** - * 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"; - }; + /** + * Decodes an InitializeParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InitializeParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return DotnetSettings; - })(); + /** + * Verifies an InitializeParams message. + * @function verify + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InitializeParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.diskName != null && message.hasOwnProperty("diskName")) { + properties._diskName = 1; + if (!$util.isString(message.diskName)) + return "diskName: string expected"; + } + if (message.replicaZones != null && message.hasOwnProperty("replicaZones")) { + if (!Array.isArray(message.replicaZones)) + return "replicaZones: array expected"; + for (var i = 0; i < message.replicaZones.length; ++i) + if (!$util.isString(message.replicaZones[i])) + return "replicaZones: string[] expected"; + } + return null; + }; - api.RubySettings = (function() { + /** + * Creates an InitializeParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} InitializeParams + */ + InitializeParams.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams) + return object; + var message = new $root.google.cloud.backupdr.v1.AttachedDisk.InitializeParams(); + if (object.diskName != null) + message.diskName = String(object.diskName); + if (object.replicaZones) { + if (!Array.isArray(object.replicaZones)) + throw TypeError(".google.cloud.backupdr.v1.AttachedDisk.InitializeParams.replicaZones: array expected"); + message.replicaZones = []; + for (var i = 0; i < object.replicaZones.length; ++i) + message.replicaZones[i] = String(object.replicaZones[i]); + } + return message; + }; - /** - * Properties of a RubySettings. - * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common - */ + /** + * Creates a plain object from an InitializeParams message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {google.cloud.backupdr.v1.AttachedDisk.InitializeParams} message InitializeParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InitializeParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.replicaZones = []; + if (message.diskName != null && message.hasOwnProperty("diskName")) { + object.diskName = message.diskName; + if (options.oneofs) + object._diskName = "diskName"; + } + if (message.replicaZones && message.replicaZones.length) { + object.replicaZones = []; + for (var j = 0; j < message.replicaZones.length; ++j) + object.replicaZones[j] = message.replicaZones[j]; + } + return object; + }; - /** - * 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]]; - } + /** + * Converts this InitializeParams to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @instance + * @returns {Object.} JSON object + */ + InitializeParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings - * @instance - */ - RubySettings.prototype.common = null; + /** + * Gets the default type url for InitializeParams + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.AttachedDisk.InitializeParams + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InitializeParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.AttachedDisk.InitializeParams"; + }; - /** - * 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); - }; + return InitializeParams; + })(); - /** - * 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; - }; + /** + * DiskType enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskType + * @enum {number} + * @property {number} DISK_TYPE_UNSPECIFIED=0 DISK_TYPE_UNSPECIFIED value + * @property {number} SCRATCH=1 SCRATCH value + * @property {number} PERSISTENT=2 PERSISTENT value + */ + AttachedDisk.DiskType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCRATCH"] = 1; + values[valuesById[2] = "PERSISTENT"] = 2; + return values; + })(); - /** - * 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(); - }; + /** + * DiskMode enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskMode + * @enum {number} + * @property {number} DISK_MODE_UNSPECIFIED=0 DISK_MODE_UNSPECIFIED value + * @property {number} READ_WRITE=1 READ_WRITE value + * @property {number} READ_ONLY=2 READ_ONLY value + * @property {number} LOCKED=3 LOCKED value + */ + AttachedDisk.DiskMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "READ_WRITE"] = 1; + values[valuesById[2] = "READ_ONLY"] = 2; + values[valuesById[3] = "LOCKED"] = 3; + return values; + })(); - /** - * 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; - }; + /** + * DiskInterface enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskInterface + * @enum {number} + * @property {number} DISK_INTERFACE_UNSPECIFIED=0 DISK_INTERFACE_UNSPECIFIED value + * @property {number} SCSI=1 SCSI value + * @property {number} NVME=2 NVME value + * @property {number} NVDIMM=3 NVDIMM value + * @property {number} ISCSI=4 ISCSI value + */ + AttachedDisk.DiskInterface = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_INTERFACE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCSI"] = 1; + values[valuesById[2] = "NVME"] = 2; + values[valuesById[3] = "NVDIMM"] = 3; + values[valuesById[4] = "ISCSI"] = 4; + return values; + })(); - /** - * 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()); - }; + /** + * DiskSavedState enum. + * @name google.cloud.backupdr.v1.AttachedDisk.DiskSavedState + * @enum {number} + * @property {number} DISK_SAVED_STATE_UNSPECIFIED=0 DISK_SAVED_STATE_UNSPECIFIED value + * @property {number} PRESERVED=1 PRESERVED value + */ + AttachedDisk.DiskSavedState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DISK_SAVED_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRESERVED"] = 1; + return values; + })(); - /** - * 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; - }; + return AttachedDisk; + })(); - /** - * 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; - }; + v1.GuestOsFeature = (function() { - /** - * 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; - }; + /** + * Properties of a GuestOsFeature. + * @memberof google.cloud.backupdr.v1 + * @interface IGuestOsFeature + * @property {google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null} [type] GuestOsFeature type + */ - /** - * 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); - }; + /** + * Constructs a new GuestOsFeature. + * @memberof google.cloud.backupdr.v1 + * @classdesc Represents a GuestOsFeature. + * @implements IGuestOsFeature + * @constructor + * @param {google.cloud.backupdr.v1.IGuestOsFeature=} [properties] Properties to set + */ + function GuestOsFeature(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * 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"; - }; + /** + * GuestOsFeature type. + * @member {google.cloud.backupdr.v1.GuestOsFeature.FeatureType|null|undefined} type + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @instance + */ + GuestOsFeature.prototype.type = null; - return RubySettings; - })(); + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - api.GoSettings = (function() { + /** + * GuestOsFeature _type. + * @member {"type"|undefined} _type + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @instance + */ + Object.defineProperty(GuestOsFeature.prototype, "_type", { + get: $util.oneOfGetter($oneOfFields = ["type"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common - */ + /** + * Creates a new GuestOsFeature instance using the specified properties. + * @function create + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.IGuestOsFeature=} [properties] Properties to set + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature instance + */ + GuestOsFeature.create = function create(properties) { + return new GuestOsFeature(properties); + }; - /** - * 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]]; - } + /** + * Encodes the specified GuestOsFeature message. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @function encode + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.IGuestOsFeature} message GuestOsFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GuestOsFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + return writer; + }; - /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.common = null; + /** + * Encodes the specified GuestOsFeature message, length delimited. Does not implicitly {@link google.cloud.backupdr.v1.GuestOsFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.IGuestOsFeature} message GuestOsFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GuestOsFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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); - }; + /** + * Decodes a GuestOsFeature message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GuestOsFeature.decode = function 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.backupdr.v1.GuestOsFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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; - }; + /** + * Decodes a GuestOsFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GuestOsFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * 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(); - }; + /** + * Verifies a GuestOsFeature message. + * @function verify + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GuestOsFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) { + properties._type = 1; + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + break; + } + } + return null; + }; - /** - * 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()); + /** + * Creates a GuestOsFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.backupdr.v1.GuestOsFeature} GuestOsFeature + */ + GuestOsFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.backupdr.v1.GuestOsFeature) + return object; + var message = new $root.google.cloud.backupdr.v1.GuestOsFeature(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "FEATURE_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "VIRTIO_SCSI_MULTIQUEUE": + case 1: + message.type = 1; + break; + case "WINDOWS": + case 2: + message.type = 2; + break; + case "MULTI_IP_SUBNET": + case 3: + message.type = 3; + break; + case "UEFI_COMPATIBLE": + case 4: + message.type = 4; + break; + case "SECURE_BOOT": + case 5: + message.type = 5; + break; + case "GVNIC": + case 6: + message.type = 6; + break; + case "SEV_CAPABLE": + case 7: + message.type = 7; + break; + case "BARE_METAL_LINUX_COMPATIBLE": + case 8: + message.type = 8; + break; + case "SUSPEND_RESUME_COMPATIBLE": + case 9: + message.type = 9; + break; + case "SEV_LIVE_MIGRATABLE": + case 10: + message.type = 10; + break; + case "SEV_SNP_CAPABLE": + case 11: + message.type = 11; + break; + case "TDX_CAPABLE": + case 12: + message.type = 12; + break; + case "IDPF": + case 13: + message.type = 13; + break; + case "SEV_LIVE_MIGRATABLE_V2": + case 14: + message.type = 14; break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + 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()); - }; + /** + * Creates a plain object from a GuestOsFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {google.cloud.backupdr.v1.GuestOsFeature} message GuestOsFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GuestOsFeature.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.type != null && message.hasOwnProperty("type")) { + object.type = options.enums === String ? $root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type] === undefined ? message.type : $root.google.cloud.backupdr.v1.GuestOsFeature.FeatureType[message.type] : message.type; + if (options.oneofs) + object._type = "type"; + } + return object; + }; - /** - * 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; - }; + /** + * Converts this GuestOsFeature to JSON. + * @function toJSON + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @instance + * @returns {Object.} JSON object + */ + GuestOsFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - }; + /** + * Gets the default type url for GuestOsFeature + * @function getTypeUrl + * @memberof google.cloud.backupdr.v1.GuestOsFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GuestOsFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.backupdr.v1.GuestOsFeature"; + }; - /** - * 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; - }; + /** + * FeatureType enum. + * @name google.cloud.backupdr.v1.GuestOsFeature.FeatureType + * @enum {number} + * @property {number} FEATURE_TYPE_UNSPECIFIED=0 FEATURE_TYPE_UNSPECIFIED value + * @property {number} VIRTIO_SCSI_MULTIQUEUE=1 VIRTIO_SCSI_MULTIQUEUE value + * @property {number} WINDOWS=2 WINDOWS value + * @property {number} MULTI_IP_SUBNET=3 MULTI_IP_SUBNET value + * @property {number} UEFI_COMPATIBLE=4 UEFI_COMPATIBLE value + * @property {number} SECURE_BOOT=5 SECURE_BOOT value + * @property {number} GVNIC=6 GVNIC value + * @property {number} SEV_CAPABLE=7 SEV_CAPABLE value + * @property {number} BARE_METAL_LINUX_COMPATIBLE=8 BARE_METAL_LINUX_COMPATIBLE value + * @property {number} SUSPEND_RESUME_COMPATIBLE=9 SUSPEND_RESUME_COMPATIBLE value + * @property {number} SEV_LIVE_MIGRATABLE=10 SEV_LIVE_MIGRATABLE value + * @property {number} SEV_SNP_CAPABLE=11 SEV_SNP_CAPABLE value + * @property {number} TDX_CAPABLE=12 TDX_CAPABLE value + * @property {number} IDPF=13 IDPF value + * @property {number} SEV_LIVE_MIGRATABLE_V2=14 SEV_LIVE_MIGRATABLE_V2 value + */ + GuestOsFeature.FeatureType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FEATURE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VIRTIO_SCSI_MULTIQUEUE"] = 1; + values[valuesById[2] = "WINDOWS"] = 2; + values[valuesById[3] = "MULTI_IP_SUBNET"] = 3; + values[valuesById[4] = "UEFI_COMPATIBLE"] = 4; + values[valuesById[5] = "SECURE_BOOT"] = 5; + values[valuesById[6] = "GVNIC"] = 6; + values[valuesById[7] = "SEV_CAPABLE"] = 7; + values[valuesById[8] = "BARE_METAL_LINUX_COMPATIBLE"] = 8; + values[valuesById[9] = "SUSPEND_RESUME_COMPATIBLE"] = 9; + values[valuesById[10] = "SEV_LIVE_MIGRATABLE"] = 10; + values[valuesById[11] = "SEV_SNP_CAPABLE"] = 11; + values[valuesById[12] = "TDX_CAPABLE"] = 12; + values[valuesById[13] = "IDPF"] = 13; + values[valuesById[14] = "SEV_LIVE_MIGRATABLE_V2"] = 14; + return values; + })(); - /** - * 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); - }; + return GuestOsFeature; + })(); - /** - * 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"; - }; + /** + * KeyRevocationActionType enum. + * @name google.cloud.backupdr.v1.KeyRevocationActionType + * @enum {number} + * @property {number} KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED=0 KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} STOP=2 STOP value + */ + v1.KeyRevocationActionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KEY_REVOCATION_ACTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "STOP"] = 2; + return values; + })(); - return GoSettings; + return v1; + })(); + + return backupdr; })(); - api.MethodSettings = (function() { + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { /** - * Properties of a MethodSettings. + * Properties of a Http. * @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 + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new MethodSettings. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function MethodSettings(properties) { - this.autoPopulatedFields = []; + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39083,106 +32179,92 @@ } /** - * 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 + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - MethodSettings.prototype.longRunning = null; + Http.prototype.rules = $util.emptyArray; /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new MethodSettings instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.MethodSettings + * @memberof google.api.Http * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.MethodSettings + * @memberof google.api.Http * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodSettings.encode = function encode(message, writer) { + Http.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]); + 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 MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MethodSettings + * @memberof google.api.Http * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodSettings message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.MethodSettings + * @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.MethodSettings} MethodSettings + * @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 */ - MethodSettings.decode = function decode(reader, length) { + 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.MethodSettings(); + 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: { - message.selector = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); 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()); + message.fullyDecodeReservedExpansion = reader.bool(); break; } default: @@ -39194,541 +32276,158 @@ }; /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MethodSettings + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings + * @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 */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodSettings message. + * Verifies a Http message. * @function verify - * @memberof google.api.MethodSettings + * @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 */ - MethodSettings.verify = function verify(message) { + Http.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"; + 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 MethodSettings message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MethodSettings + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings + * @returns {google.api.Http} Http */ - MethodSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) 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]); + 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 MethodSettings message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MethodSettings + * @memberof google.api.Http * @static - * @param {google.api.MethodSettings} message MethodSettings + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodSettings.toObject = function toObject(message, options) { + Http.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]; + 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 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; + * 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.FieldInfo = (function() { + api.HttpRule = (function() { /** - * Properties of a FieldInfo. + * Properties of a HttpRule. * @memberof google.api - * @interface IFieldInfo - * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format + * @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 FieldInfo. + * Constructs a new HttpRule. * @memberof google.api - * @classdesc Represents a FieldInfo. - * @implements IFieldInfo + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.api.IFieldInfo=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function FieldInfo(properties) { + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39736,75 +32435,218 @@ } /** - * FieldInfo format. - * @member {google.api.FieldInfo.Format} format - * @memberof google.api.FieldInfo + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule * @instance */ - FieldInfo.prototype.format = 0; + HttpRule.prototype.selector = ""; /** - * Creates a new FieldInfo instance using the specified properties. + * 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.FieldInfo + * @memberof google.api.HttpRule * @static - * @param {google.api.IFieldInfo=} [properties] Properties to set - * @returns {google.api.FieldInfo} FieldInfo instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - FieldInfo.create = function create(properties) { - return new FieldInfo(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.FieldInfo + * @memberof google.api.HttpRule * @static - * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldInfo.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + 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 FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.FieldInfo + * @memberof google.api.HttpRule * @static - * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldInfo message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.FieldInfo + * @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.FieldInfo} FieldInfo + * @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 */ - FieldInfo.decode = function decode(reader, length) { + 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.FieldInfo(); + 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.format = reader.int32(); + 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: @@ -39816,184 +32658,255 @@ }; /** - * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.FieldInfo + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.FieldInfo} FieldInfo + * @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 */ - FieldInfo.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldInfo message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.FieldInfo + * @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 */ - FieldInfo.verify = function verify(message) { + HttpRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.format != null && message.hasOwnProperty("format")) - switch (message.format) { - default: - return "format: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; + 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 FieldInfo message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.FieldInfo + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.FieldInfo} FieldInfo + * @returns {google.api.HttpRule} HttpRule */ - FieldInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.FieldInfo) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.FieldInfo(); - switch (object.format) { - default: - if (typeof object.format === "number") { - message.format = object.format; - break; + 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]); } - break; - case "FORMAT_UNSPECIFIED": - case 0: - message.format = 0; - break; - case "UUID4": - case 1: - message.format = 1; - break; - case "IPV4": - case 2: - message.format = 2; - break; - case "IPV6": - case 3: - message.format = 3; - break; - case "IPV4_OR_IPV6": - case 4: - message.format = 4; - break; } return message; }; /** - * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.FieldInfo + * @memberof google.api.HttpRule * @static - * @param {google.api.FieldInfo} message FieldInfo + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldInfo.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; - if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; + 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 FieldInfo to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.FieldInfo + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - FieldInfo.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FieldInfo + * Gets the default type url for HttpRule * @function getTypeUrl - * @memberof google.api.FieldInfo + * @memberof google.api.HttpRule * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.FieldInfo"; + return typeUrlPrefix + "/google.api.HttpRule"; }; - /** - * Format enum. - * @name google.api.FieldInfo.Format - * @enum {number} - * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value - * @property {number} UUID4=1 UUID4 value - * @property {number} IPV4=2 IPV4 value - * @property {number} IPV6=3 IPV6 value - * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value - */ - FieldInfo.Format = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; - values[valuesById[1] = "UUID4"] = 1; - values[valuesById[2] = "IPV4"] = 2; - values[valuesById[3] = "IPV6"] = 3; - values[valuesById[4] = "IPV4_OR_IPV6"] = 4; - return values; - })(); - - return FieldInfo; + return HttpRule; })(); - api.ResourceDescriptor = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a CustomHttpPattern. * @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 + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new ResourceDescriptor. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40001,173 +32914,89 @@ } /** - * 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 + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceDescriptor.prototype.singular = ""; + CustomHttpPattern.prototype.kind = ""; /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceDescriptor.prototype.style = $util.emptyArray; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + CustomHttpPattern.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(); - } + 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 ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @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.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.decode = function decode(reader, length) { + 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.ResourceDescriptor(); + 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.type = reader.string(); + message.kind = 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()); + message.path = reader.string(); break; } default: @@ -40179,271 +33008,133 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.ResourceDescriptor + * @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 */ - ResourceDescriptor.verify = function verify(message) { + CustomHttpPattern.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; - } - } + 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) 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; - } - } + 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 ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + CustomHttpPattern.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]; + 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 ResourceDescriptor to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceDescriptor + * Gets the default type url for CustomHttpPattern * @function getTypeUrl - * @memberof google.api.ResourceDescriptor + * @memberof google.api.CustomHttpPattern * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; + return typeUrlPrefix + "/google.api.CustomHttpPattern"; }; - /** - * 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; + return CustomHttpPattern; })(); - api.ResourceReference = (function() { + api.CommonLanguageSettings = (function() { /** - * Properties of a ResourceReference. + * Properties of a CommonLanguageSettings. * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations */ /** - * Constructs a new ResourceReference. + * Constructs a new CommonLanguageSettings. * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set */ - function ResourceReference(properties) { + function CommonLanguageSettings(properties) { + this.destinations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40451,89 +33142,100 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings * @instance */ - ResourceReference.prototype.type = ""; + CommonLanguageSettings.prototype.referenceDocsUri = ""; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings * @instance */ - ResourceReference.prototype.childType = ""; + CommonLanguageSettings.prototype.destinations = $util.emptyArray; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new CommonLanguageSettings instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.api.CommonLanguageSettings * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.api.CommonLanguageSettings * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + CommonLanguageSettings.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); + 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 ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.CommonLanguageSettings * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a CommonLanguageSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @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.ResourceReference} ResourceReference + * @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 */ - ResourceReference.decode = function decode(reader, length) { + 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.ResourceReference(); + 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.type = reader.string(); + message.referenceDocsUri = reader.string(); break; } case 2: { - message.childType = reader.string(); + 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: @@ -40545,144 +33247,177 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.CommonLanguageSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @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 */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a CommonLanguageSettings message. * @function verify - * @memberof google.api.ResourceReference + * @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 */ - ResourceReference.verify = function verify(message) { + CommonLanguageSettings.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"; + 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.api.CommonLanguageSettings * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) 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); + 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 ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.api.CommonLanguageSettings * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + CommonLanguageSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; + 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]; } - 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. + * Converts this CommonLanguageSettings to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.CommonLanguageSettings * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + CommonLanguageSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceReference + * Gets the default type url for CommonLanguageSettings * @function getTypeUrl - * @memberof google.api.ResourceReference + * @memberof google.api.CommonLanguageSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ResourceReference"; + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; }; - return ResourceReference; + return CommonLanguageSettings; })(); - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { + api.ClientLibrarySettings = (function() { /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file + * 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 FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set */ - function FileDescriptorSet(properties) { - this.file = []; + function ClientLibrarySettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40690,78 +33425,215 @@ } /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings * @instance */ - FileDescriptorSet.prototype.file = $util.emptyArray; + ClientLibrarySettings.prototype.version = ""; /** - * Creates a new FileDescriptorSet instance using the specified properties. + * 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.protobuf.FileDescriptorSet + * @memberof google.api.ClientLibrarySettings * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); }; /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ClientLibrarySettings * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encode = function encode(message, writer) { + ClientLibrarySettings.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(); + 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 FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ClientLibrarySettings * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. + * Decodes a ClientLibrarySettings message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileDescriptorSet + * @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.protobuf.FileDescriptorSet} FileDescriptorSet + * @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 */ - FileDescriptorSet.decode = function decode(reader, length) { + 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.protobuf.FileDescriptorSet(); + 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: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + 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: @@ -40773,190 +33645,304 @@ }; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ClientLibrarySettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @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 */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileDescriptorSet message. + * Verifies a ClientLibrarySettings message. * @function verify - * @memberof google.protobuf.FileDescriptorSet + * @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 */ - FileDescriptorSet.verify = function verify(message) { + ClientLibrarySettings.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; + 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ClientLibrarySettings * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) 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]); + 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 FileDescriptorSet message. Also converts values to other types if specified. + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ClientLibrarySettings * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options) { + ClientLibrarySettings.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); + 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 FileDescriptorSet to JSON. + * Converts this ClientLibrarySettings to JSON. * @function toJSON - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ClientLibrarySettings * @instance * @returns {Object.} JSON object */ - FileDescriptorSet.prototype.toJSON = function toJSON() { + ClientLibrarySettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FileDescriptorSet + * Gets the default type url for ClientLibrarySettings * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ClientLibrarySettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; }; - 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; + return ClientLibrarySettings; })(); - protobuf.FileDescriptorProto = (function() { + api.Publishing = (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 + * 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 */ /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.api.IPublishing=} [properties] Properties to set */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; + 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) @@ -40964,274 +33950,210 @@ } /** - * 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 + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing * @instance */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + Publishing.prototype.methodSettings = $util.emptyArray; /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing * @instance */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + Publishing.prototype.newIssueUri = ""; /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing * @instance */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; + Publishing.prototype.documentationUri = ""; /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing * @instance */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; + Publishing.prototype.apiShortName = ""; /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing * @instance */ - FileDescriptorProto.prototype.service = $util.emptyArray; + Publishing.prototype.githubLabel = ""; /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing * @instance */ - FileDescriptorProto.prototype.extension = $util.emptyArray; + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing * @instance */ - FileDescriptorProto.prototype.options = null; + Publishing.prototype.docTagPrefix = ""; /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing * @instance */ - FileDescriptorProto.prototype.sourceCodeInfo = null; + Publishing.prototype.organization = 0; /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing * @instance */ - FileDescriptorProto.prototype.syntax = ""; + Publishing.prototype.librarySettings = $util.emptyArray; /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing * @instance */ - FileDescriptorProto.prototype.edition = 0; + Publishing.prototype.protoReferenceDocumentationUri = ""; /** - * Creates a new FileDescriptorProto instance using the specified properties. + * Creates a new Publishing instance using the specified properties. * @function create - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.api.Publishing * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); + Publishing.create = function create(properties) { + return new Publishing(properties); }; /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.api.Publishing * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.api.IPublishing} message Publishing message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encode = function encode(message, writer) { + Publishing.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + if (message.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); return writer; }; /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.api.Publishing * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {google.api.IPublishing} message Publishing message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + Publishing.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. + * Decodes a Publishing message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileDescriptorProto + * @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.protobuf.FileDescriptorProto} FileDescriptorProto + * @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 */ - FileDescriptorProto.decode = function decode(reader, length) { + 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.protobuf.FileDescriptorProto(); + 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 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()); + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); 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()); + case 101: { + message.newIssueUri = reader.string(); break; } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + case 102: { + message.documentationUri = reader.string(); break; } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + case 103: { + message.apiShortName = reader.string(); break; } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + case 104: { + message.githubLabel = reader.string(); break; } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); break; } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + case 106: { + message.docTagPrefix = reader.string(); break; } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + case 107: { + message.organization = reader.int32(); break; } - case 12: { - message.syntax = reader.string(); + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); break; } - case 14: { - message.edition = reader.int32(); + case 110: { + message.protoReferenceDocumentationUri = reader.string(); break; } default: @@ -41241,418 +34163,297 @@ } 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]); + + /** + * 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 "extension." + error; + return "methodSettings." + 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.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.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { + 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 "edition: enum value expected"; + return "organization: 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: + 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"; return null; }; /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.api.Publishing * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.api.Publishing} Publishing */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) 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]); + 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.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.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.syntax != null) - message.syntax = String(object.syntax); - switch (object.edition) { + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { default: - if (typeof object.edition === "number") { - message.edition = object.edition; + if (typeof object.organization === "number") { + message.organization = object.organization; break; } break; - case "EDITION_UNKNOWN": + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 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; + message.organization = 0; break; - case "EDITION_1_TEST_ONLY": + case "CLOUD": case 1: - message.edition = 1; + message.organization = 1; break; - case "EDITION_2_TEST_ONLY": + case "ADS": case 2: - message.edition = 2; + message.organization = 2; break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; + case "PHOTOS": + case 3: + message.organization = 3; break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; + case "STREET_VIEW": + case 4: + message.organization = 4; break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; + case "SHOPPING": + case 5: + message.organization = 5; break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; + 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); return message; }; /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a Publishing message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.api.Publishing * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {google.api.Publishing} message Publishing * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorProto.toObject = function toObject(message, options) { + Publishing.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; } 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); + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; } - 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.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.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.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.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[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.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; return object; }; /** - * Converts this FileDescriptorProto to JSON. + * Converts this Publishing to JSON. * @function toJSON - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.api.Publishing * @instance * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.toJSON = function toJSON() { + Publishing.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FileDescriptorProto + * Gets the default type url for Publishing * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.api.Publishing * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + return typeUrlPrefix + "/google.api.Publishing"; }; - return FileDescriptorProto; + return Publishing; })(); - protobuf.DescriptorProto = (function() { + api.JavaSettings = (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 + * 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 DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.api.IJavaSettings=} [properties] Properties to set */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; + function JavaSettings(properties) { + this.serviceClassNames = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41660,225 +34461,123 @@ } /** - * 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 + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings * @instance */ - DescriptorProto.prototype.options = null; + JavaSettings.prototype.libraryPackage = ""; /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings * @instance */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; + JavaSettings.prototype.serviceClassNames = $util.emptyObject; /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings * @instance */ - DescriptorProto.prototype.reservedName = $util.emptyArray; + JavaSettings.prototype.common = null; /** - * Creates a new DescriptorProto instance using the specified properties. + * Creates a new JavaSettings instance using the specified properties. * @function create - * @memberof google.protobuf.DescriptorProto + * @memberof google.api.JavaSettings * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); }; /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. * @function encode - * @memberof google.protobuf.DescriptorProto + * @memberof google.api.JavaSettings * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encode = function encode(message, writer) { + JavaSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + if (message.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 DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto + * @memberof google.api.JavaSettings * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DescriptorProto message from the specified reader or buffer. + * Decodes a JavaSettings message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.DescriptorProto + * @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.protobuf.DescriptorProto} DescriptorProto + * @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 */ - DescriptorProto.decode = function decode(reader, length) { + 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.protobuf.DescriptorProto(); + 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.name = reader.string(); + message.libraryPackage = 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())); + 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: { - 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()); + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } default: @@ -41890,820 +34589,575 @@ }; /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto + * @memberof google.api.JavaSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @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 */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + JavaSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DescriptorProto message. + * Verifies a JavaSettings message. * @function verify - * @memberof google.protobuf.DescriptorProto + * @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 */ - DescriptorProto.verify = function verify(message) { + JavaSettings.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.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.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); 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 "common." + error; } return null; }; /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.api.JavaSettings * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.api.JavaSettings} JavaSettings */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) 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]); - } + 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.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.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } - 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]); - } + 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 (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 (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 (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 (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"; } - 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]); + 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; } } - 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]); - } + 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; } - 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 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 DescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.api.CppSettings * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {google.api.CppSettings} message CppSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options) { + CppSettings.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]; - } + 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 DescriptorProto to JSON. + * Converts this CppSettings to JSON. * @function toJSON - * @memberof google.protobuf.DescriptorProto + * @memberof google.api.CppSettings * @instance * @returns {Object.} JSON object */ - DescriptorProto.prototype.toJSON = function toJSON() { + CppSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DescriptorProto + * Gets the default type url for CppSettings * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto + * @memberof google.api.CppSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + return typeUrlPrefix + "/google.api.CppSettings"; }; - 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() { + return CppSettings; + })(); - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ + api.PhpSettings = (function() { - /** - * 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]]; - } + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; + /** + * 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]]; + } - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; - /** - * 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); - }; + /** + * 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 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 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 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(); - }; + /** + * 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 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); + /** + * 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 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()); - }; + } + return message; + }; - /** - * 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; - }; + /** + * 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()); + }; - /** - * 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; - }; + /** + * 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 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; + /** + * 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; + }; - /** - * 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); - }; + /** + * 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; + }; - /** - * 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"; - }; + /** + * 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); + }; - return ReservedRange; - })(); + /** + * 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 DescriptorProto; + return PhpSettings; })(); - protobuf.ExtensionRangeOptions = (function() { + api.PythonSettings = (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 + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common */ /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @param {google.api.IPythonSettings=} [properties] Properties to set */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - this.declaration = []; + function PythonSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42711,123 +35165,283 @@ } /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings * @instance */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + PythonSettings.prototype.common = null; /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance + * 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 */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions + * 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 */ - ExtensionRangeOptions.prototype.features = null; + 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]]; + } /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings * @instance */ - ExtensionRangeOptions.prototype.verification = 1; + NodeSettings.prototype.common = null; /** - * Creates a new ExtensionRangeOptions instance using the specified properties. + * Creates a new NodeSettings instance using the specified properties. * @function create - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.api.NodeSettings * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); }; /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. * @function encode - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.api.NodeSettings * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRangeOptions.encode = function encode(message, writer) { + NodeSettings.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(); + 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 ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.api.NodeSettings * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * Decodes a NodeSettings message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ExtensionRangeOptions + * @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.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @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 */ - ExtensionRangeOptions.decode = function decode(reader, length) { + 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.protobuf.ExtensionRangeOptions(); + 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 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(); + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } default: @@ -42839,527 +35453,137 @@ }; /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.api.NodeSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @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 */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + NodeSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ExtensionRangeOptions message. + * Verifies a NodeSettings message. * @function verify - * @memberof google.protobuf.ExtensionRangeOptions + * @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 */ - ExtensionRangeOptions.verify = function verify(message) { + NodeSettings.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 (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); if (error) - return "features." + error; + return "common." + 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. + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions + * @memberof google.api.NodeSettings * @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 + * @returns {google.api.NodeSettings} NodeSettings */ - 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; + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) 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); - }; + 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; + }; - /** - * 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"; - }; + /** + * 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; + }; - return Declaration; - })(); + /** + * 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); + }; /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value + * 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 */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; - return ExtensionRangeOptions; + return NodeSettings; })(); - protobuf.FieldDescriptorProto = (function() { + api.DotnetSettings = (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 + * 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 FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.api.IDotnetSettings=} [properties] Properties to set */ - function FieldDescriptorProto(properties) { + 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) @@ -43367,215 +35591,509 @@ } /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings * @instance */ - FieldDescriptorProto.prototype.name = ""; + DotnetSettings.prototype.common = null; /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings * @instance */ - FieldDescriptorProto.prototype.number = 0; + DotnetSettings.prototype.renamedServices = $util.emptyObject; /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings * @instance */ - FieldDescriptorProto.prototype.label = 1; + DotnetSettings.prototype.renamedResources = $util.emptyObject; /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings * @instance */ - FieldDescriptorProto.prototype.type = 1; + DotnetSettings.prototype.ignoredResources = $util.emptyArray; /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings * @instance */ - FieldDescriptorProto.prototype.typeName = ""; + 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; + }; /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings * @instance + * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.extendee = ""; + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * 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 */ - FieldDescriptorProto.prototype.defaultValue = ""; + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; + return DotnetSettings; + })(); + + api.RubySettings = (function() { /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common */ - FieldDescriptorProto.prototype.jsonName = ""; /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set */ - FieldDescriptorProto.prototype.options = null; + 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]]; + } /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings * @instance */ - FieldDescriptorProto.prototype.proto3Optional = false; + RubySettings.prototype.common = null; /** - * Creates a new FieldDescriptorProto instance using the specified properties. + * Creates a new RubySettings instance using the specified properties. * @function create - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.api.RubySettings * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); + RubySettings.create = function create(properties) { + return new RubySettings(properties); }; /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.api.RubySettings * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encode = function encode(message, writer) { + RubySettings.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); + 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 FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.api.RubySettings * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * Decodes a RubySettings message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldDescriptorProto + * @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.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @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 */ - FieldDescriptorProto.decode = function decode(reader, length) { + 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.protobuf.FieldDescriptorProto(); + 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.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(); + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } default: @@ -43587,394 +36105,127 @@ }; /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a RubySettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.api.RubySettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @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 */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + RubySettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldDescriptorProto message. + * Verifies a RubySettings message. * @function verify - * @memberof google.protobuf.FieldDescriptorProto + * @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 */ - FieldDescriptorProto.verify = function verify(message) { + RubySettings.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 (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); if (error) - return "options." + error; + return "common." + 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. + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.api.RubySettings * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.api.RubySettings} RubySettings */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) 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); + 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); } - 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. + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.api.RubySettings * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {google.api.RubySettings} message RubySettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldDescriptorProto.toObject = function toObject(message, options) { + RubySettings.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; + 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 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 + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object */ - 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; - })(); + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return FieldDescriptorProto; + /** + * 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; })(); - protobuf.OneofDescriptorProto = (function() { + api.GoSettings = (function() { /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common */ /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @param {google.api.IGoSettings=} [properties] Properties to set */ - function OneofDescriptorProto(properties) { + function GoSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43982,89 +36233,75 @@ } /** - * 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 + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings * @instance */ - OneofDescriptorProto.prototype.options = null; + GoSettings.prototype.common = null; /** - * Creates a new OneofDescriptorProto instance using the specified properties. + * Creates a new GoSettings instance using the specified properties. * @function create - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.api.GoSettings * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); + GoSettings.create = function create(properties) { + return new GoSettings(properties); }; /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. * @function encode - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.api.GoSettings * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofDescriptorProto.encode = function encode(message, writer) { + GoSettings.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(); + 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 OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.api.GoSettings * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * Decodes a GoSettings message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.OneofDescriptorProto + * @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.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @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 */ - OneofDescriptorProto.decode = function decode(reader, length) { + 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.protobuf.OneofDescriptorProto(); + 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.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } default: @@ -44076,143 +36313,130 @@ }; /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a GoSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.api.GoSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @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 */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + GoSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OneofDescriptorProto message. + * Verifies a GoSettings message. * @function verify - * @memberof google.protobuf.OneofDescriptorProto + * @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 */ - OneofDescriptorProto.verify = function verify(message) { + GoSettings.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 (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); if (error) - return "options." + error; + return "common." + error; } return null; }; /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.api.GoSettings * @static * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @returns {google.api.GoSettings} GoSettings */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) 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); + 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 an OneofDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.api.GoSettings * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {google.api.GoSettings} message GoSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofDescriptorProto.toObject = function toObject(message, options) { + GoSettings.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); + 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 OneofDescriptorProto to JSON. + * Converts this GoSettings to JSON. * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.api.GoSettings * @instance * @returns {Object.} JSON object */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { + GoSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OneofDescriptorProto + * Gets the default type url for GoSettings * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.api.GoSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + return typeUrlPrefix + "/google.api.GoSettings"; }; - return OneofDescriptorProto; + return GoSettings; })(); - protobuf.EnumDescriptorProto = (function() { + api.MethodSettings = (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 + * 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 EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.api.IMethodSettings=} [properties] Properties to set */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; + function MethodSettings(properties) { + this.autoPopulatedFields = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44220,140 +36444,106 @@ } /** - * 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 + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings * @instance */ - EnumDescriptorProto.prototype.options = null; + MethodSettings.prototype.selector = ""; /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings * @instance */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + MethodSettings.prototype.longRunning = null; /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings * @instance */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; /** - * Creates a new EnumDescriptorProto instance using the specified properties. + * Creates a new MethodSettings instance using the specified properties. * @function create - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.api.MethodSettings * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); }; /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.api.MethodSettings * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encode = function encode(message, writer) { + MethodSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + if (message.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 EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.api.MethodSettings * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * Decodes a MethodSettings message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumDescriptorProto + * @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.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @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 */ - EnumDescriptorProto.decode = function decode(reader, length) { + 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.protobuf.EnumDescriptorProto(); + 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.name = reader.string(); + message.selector = reader.string(); break; } case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + message.longRunning = $root.google.api.MethodSettings.LongRunning.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()); + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); break; } default: @@ -44365,206 +36555,157 @@ }; /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.api.MethodSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @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 */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + MethodSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumDescriptorProto message. + * Verifies a MethodSettings message. * @function verify - * @memberof google.protobuf.EnumDescriptorProto + * @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 */ - EnumDescriptorProto.verify = function verify(message) { + MethodSettings.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 (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 "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; - } + return "longRunning." + error; } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; + if (message.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 an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.api.MethodSettings * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.api.MethodSettings} MethodSettings */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) 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]); - } + 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.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]); + 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 an EnumDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.api.MethodSettings * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {google.api.MethodSettings} message MethodSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumDescriptorProto.toObject = function toObject(message, options) { + MethodSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; 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); + object.selector = ""; + object.longRunning = null; } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; + if (message.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 EnumDescriptorProto to JSON. + * Converts this MethodSettings to JSON. * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.api.MethodSettings * @instance * @returns {Object.} JSON object */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { + MethodSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumDescriptorProto + * Gets the default type url for MethodSettings * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.api.MethodSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + return typeUrlPrefix + "/google.api.MethodSettings"; }; - EnumDescriptorProto.EnumReservedRange = (function() { + MethodSettings.LongRunning = (function() { /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end + * 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 EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set */ - function EnumReservedRange(properties) { + function LongRunning(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44572,89 +36713,117 @@ } /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning * @instance */ - EnumReservedRange.prototype.start = 0; + LongRunning.prototype.initialPollDelay = null; /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning * @instance */ - EnumReservedRange.prototype.end = 0; + LongRunning.prototype.pollDelayMultiplier = 0; /** - * Creates a new EnumReservedRange instance using the specified properties. + * 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.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.api.MethodSettings.LongRunning * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); + LongRunning.create = function create(properties) { + return new LongRunning(properties); }; /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.api.MethodSettings.LongRunning * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @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 */ - EnumReservedRange.encode = function encode(message, writer) { + LongRunning.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.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 EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.api.MethodSettings.LongRunning * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @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 */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumReservedRange message from the specified reader or buffer. + * Decodes a LongRunning message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @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 */ - EnumReservedRange.decode = function decode(reader, length) { + 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.protobuf.EnumDescriptorProto.EnumReservedRange(); + 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.start = reader.int32(); + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } case 2: { - message.end = reader.int32(); + 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: @@ -44666,392 +36835,261 @@ }; /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * Decodes a LongRunning message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.api.MethodSettings.LongRunning * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @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 */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + LongRunning.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumReservedRange message. + * Verifies a LongRunning message. * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @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 */ - EnumReservedRange.verify = function verify(message) { + LongRunning.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.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 an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.api.MethodSettings.LongRunning * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @returns {google.api.MethodSettings.LongRunning} LongRunning */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) 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; + 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 an EnumReservedRange message. Also converts values to other types if specified. + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.api.MethodSettings.LongRunning * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {google.api.MethodSettings.LongRunning} message LongRunning * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumReservedRange.toObject = function toObject(message, options) { + LongRunning.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.start = 0; - object.end = 0; + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = 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.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 EnumReservedRange to JSON. + * Converts this LongRunning to JSON. * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.api.MethodSettings.LongRunning * @instance * @returns {Object.} JSON object */ - EnumReservedRange.prototype.toJSON = function toJSON() { + LongRunning.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumReservedRange + * Gets the default type url for LongRunning * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @memberof google.api.MethodSettings.LongRunning * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; }; - return EnumReservedRange; + return LongRunning; })(); - return EnumDescriptorProto; + return MethodSettings; })(); - 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); - }; + /** + * 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; + })(); - /** - * 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"; - }; + /** + * 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; + })(); - return EnumValueDescriptorProto; + /** + * 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; })(); - protobuf.ServiceDescriptorProto = (function() { + /** + * 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.FieldInfo = (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 + * Properties of a FieldInfo. + * @memberof google.api + * @interface IFieldInfo + * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format */ /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto + * Constructs a new FieldInfo. + * @memberof google.api + * @classdesc Represents a FieldInfo. + * @implements IFieldInfo * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.api.IFieldInfo=} [properties] Properties to set */ - function ServiceDescriptorProto(properties) { - this.method = []; + function FieldInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45059,106 +37097,75 @@ } /** - * 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 + * FieldInfo format. + * @member {google.api.FieldInfo.Format} format + * @memberof google.api.FieldInfo * @instance */ - ServiceDescriptorProto.prototype.options = null; + FieldInfo.prototype.format = 0; /** - * Creates a new ServiceDescriptorProto instance using the specified properties. + * Creates a new FieldInfo instance using the specified properties. * @function create - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.api.FieldInfo * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + * @param {google.api.IFieldInfo=} [properties] Properties to set + * @returns {google.api.FieldInfo} FieldInfo instance */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); + FieldInfo.create = function create(properties) { + return new FieldInfo(properties); }; /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.api.FieldInfo * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encode = function encode(message, writer) { + FieldInfo.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(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); return writer; }; /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.api.FieldInfo * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * Decodes a FieldInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.api.FieldInfo * @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 + * @returns {google.api.FieldInfo} FieldInfo * @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) { + FieldInfo.decode = function 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(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.FieldInfo(); 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()); + message.format = reader.int32(); break; } default: @@ -45170,167 +37177,184 @@ }; /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.api.FieldInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.api.FieldInfo} FieldInfo * @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) { + FieldInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceDescriptorProto message. + * Verifies a FieldInfo message. * @function verify - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.api.FieldInfo * @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) { + FieldInfo.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.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; } - } - 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. + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.api.FieldInfo * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.api.FieldInfo} FieldInfo */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + FieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.FieldInfo) 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]); + var message = new $root.google.api.FieldInfo(); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; } - } - 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); + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "UUID4": + case 1: + message.format = 1; + break; + case "IPV4": + case 2: + message.format = 2; + break; + case "IPV6": + case 3: + message.format = 3; + break; + case "IPV4_OR_IPV6": + case 4: + message.format = 4; + break; } return message; }; /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.api.FieldInfo * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {google.api.FieldInfo} message FieldInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceDescriptorProto.toObject = function toObject(message, options) { + FieldInfo.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); + if (options.defaults) + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; return object; }; /** - * Converts this ServiceDescriptorProto to JSON. + * Converts this FieldInfo to JSON. * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.api.FieldInfo * @instance * @returns {Object.} JSON object */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { + FieldInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ServiceDescriptorProto + * Gets the default type url for FieldInfo * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.api.FieldInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + return typeUrlPrefix + "/google.api.FieldInfo"; }; - return ServiceDescriptorProto; + /** + * Format enum. + * @name google.api.FieldInfo.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} UUID4=1 UUID4 value + * @property {number} IPV4=2 IPV4 value + * @property {number} IPV6=3 IPV6 value + * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value + */ + FieldInfo.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "UUID4"] = 1; + values[valuesById[2] = "IPV4"] = 2; + values[valuesById[3] = "IPV6"] = 3; + values[valuesById[4] = "IPV4_OR_IPV6"] = 4; + return values; + })(); + + return FieldInfo; })(); - protobuf.MethodDescriptorProto = (function() { + api.ResourceDescriptor = (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 + * 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 MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function MethodDescriptorProto(properties) { + 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) @@ -45338,145 +37362,173 @@ } /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - MethodDescriptorProto.prototype.name = ""; + ResourceDescriptor.prototype.type = ""; /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - MethodDescriptorProto.prototype.inputType = ""; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor * @instance */ - MethodDescriptorProto.prototype.outputType = ""; + ResourceDescriptor.prototype.nameField = ""; /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor * @instance */ - MethodDescriptorProto.prototype.options = null; + ResourceDescriptor.prototype.history = 0; /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor * @instance */ - MethodDescriptorProto.prototype.clientStreaming = false; + ResourceDescriptor.prototype.plural = ""; /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor * @instance */ - MethodDescriptorProto.prototype.serverStreaming = false; + ResourceDescriptor.prototype.singular = ""; /** - * Creates a new MethodDescriptorProto instance using the specified properties. + * 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.protobuf.MethodDescriptorProto + * @memberof google.api.ResourceDescriptor * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.api.ResourceDescriptor * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encode = function encode(message, writer) { + ResourceDescriptor.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); + 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 MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.api.ResourceDescriptor * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MethodDescriptorProto + * @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.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @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 */ - MethodDescriptorProto.decode = function decode(reader, length) { + 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.protobuf.MethodDescriptorProto(); + 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.name = reader.string(); + message.type = reader.string(); break; } case 2: { - message.inputType = reader.string(); + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); break; } case 3: { - message.outputType = reader.string(); + message.nameField = reader.string(); break; } case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + message.history = reader.int32(); break; } case 5: { - message.clientStreaming = reader.bool(); + message.plural = reader.string(); break; } case 6: { - message.serverStreaming = reader.bool(); + 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: @@ -45488,191 +37540,271 @@ }; /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @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 */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodDescriptorProto message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.protobuf.MethodDescriptorProto + * @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 */ - MethodDescriptorProto.verify = function verify(message) { + ResourceDescriptor.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.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; + } } - 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. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) 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); + 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; + } } - 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. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.api.ResourceDescriptor * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodDescriptorProto.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; + 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]; } - 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. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MethodDescriptorProto + * Gets the default type url for ResourceDescriptor * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.api.ResourceDescriptor * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + return typeUrlPrefix + "/google.api.ResourceDescriptor"; }; - return MethodDescriptorProto; + /** + * 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; })(); - protobuf.FileOptions = (function() { + api.ResourceReference = (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 + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.api.IResourceReference=} [properties] Properties to set */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; + function ResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45680,375 +37812,89 @@ } /** - * 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 + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; + ResourceReference.prototype.type = ""; /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + ResourceReference.prototype.childType = ""; /** - * Creates a new FileOptions instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.protobuf.FileOptions + * @memberof google.api.ResourceReference * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileOptions + * @memberof google.api.ResourceReference * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encode = function encode(message, writer) { + ResourceReference.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(); + 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 FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileOptions + * @memberof google.api.ResourceReference * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileOptions message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileOptions + * @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.protobuf.FileOptions} FileOptions + * @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 */ - FileOptions.decode = function decode(reader, length) { + 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.protobuf.FileOptions(); + 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.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())); + message.type = reader.string(); 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())); + case 2: { + message.childType = reader.string(); break; } default: @@ -46060,380 +37906,418 @@ }; /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileOptions + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions + * @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 */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { + ResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileOptions message. + * Verifies a ResourceReference message. * @function verify - * @memberof google.protobuf.FileOptions + * @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 */ - FileOptions.verify = function verify(message) { + ResourceReference.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; - } - } + 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 FileOptions message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileOptions + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.api.ResourceReference} ResourceReference */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) 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; + 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 (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 (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; + } } - 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]); + 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; } } - 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 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 FileOptions message. Also converts values to other types if specified. + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.FileOptions} message FileOptions + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileOptions.toObject = function toObject(message, options) { + FileDescriptorSet.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); + 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 FileOptions to JSON. + * Converts this FileDescriptorSet to JSON. * @function toJSON - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.FileDescriptorSet * @instance * @returns {Object.} JSON object */ - FileOptions.prototype.toJSON = function toJSON() { + FileDescriptorSet.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FileOptions + * Gets the default type url for FileDescriptorSet * @function getTypeUrl - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.FileDescriptorSet * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FileOptions"; + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; }; - /** - * 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 FileDescriptorSet; + })(); - return FileOptions; + /** + * 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.MessageOptions = (function() { + protobuf.FileDescriptorProto = (function() { /** - * Properties of a MessageOptions. + * Properties of a FileDescriptorProto. * @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 + * @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 MessageOptions. + * Constructs a new FileDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set */ - function MessageOptions(properties) { - this.uninterpretedOption = []; + 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) @@ -46441,176 +38325,274 @@ } /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto * @instance */ - MessageOptions.prototype.messageSetWireFormat = false; + FileDescriptorProto.prototype.name = ""; /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto * @instance */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; + FileDescriptorProto.prototype["package"] = ""; /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto * @instance */ - MessageOptions.prototype.deprecated = false; + FileDescriptorProto.prototype.dependency = $util.emptyArray; /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto * @instance */ - MessageOptions.prototype.mapEntry = false; + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto * @instance */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto * @instance */ - MessageOptions.prototype.features = null; + FileDescriptorProto.prototype.messageType = $util.emptyArray; /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto * @instance */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + FileDescriptorProto.prototype.enumType = $util.emptyArray; /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto * @instance */ - MessageOptions.prototype[".google.api.resource"] = null; + FileDescriptorProto.prototype.service = $util.emptyArray; /** - * Creates a new MessageOptions instance using the specified properties. + * 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.MessageOptions + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); }; /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encode = function encode(message, writer) { + FileDescriptorProto.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(); + 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 MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MessageOptions message from the specified reader or buffer. + * Decodes a FileDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MessageOptions + * @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.MessageOptions} MessageOptions + * @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 */ - MessageOptions.decode = function decode(reader, length) { + 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.MessageOptions(); + 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.messageSetWireFormat = reader.bool(); + message.name = reader.string(); break; } case 2: { - message.noStandardDescriptorAccessor = reader.bool(); + message["package"] = reader.string(); break; } case 3: { - message.deprecated = reader.bool(); + 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: { - message.mapEntry = reader.bool(); + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); break; } - case 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); break; } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.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())); + case 12: { + message.syntax = reader.string(); break; } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + case 14: { + message.edition = reader.int32(); break; } default: @@ -46622,537 +38604,642 @@ }; /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.FileDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions + * @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 */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MessageOptions message. + * Verifies a FileDescriptorProto message. * @function verify - * @memberof google.protobuf.MessageOptions + * @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 */ - MessageOptions.verify = function verify(message) { + FileDescriptorProto.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.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.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 (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 "uninterpretedOption." + error; + return "messageType." + error; } } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + 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 ".google.api.resource." + 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 MessageOptions message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.FileDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) 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); + 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.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.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[".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"]); + 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 MessageOptions message. Also converts values to other types if specified. + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageOptions.toObject = function toObject(message, options) { + FileDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } 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; + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - 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.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[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + 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 MessageOptions to JSON. + * Converts this FileDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.FileDescriptorProto * @instance * @returns {Object.} JSON object */ - MessageOptions.prototype.toJSON = function toJSON() { + FileDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MessageOptions + * Gets the default type url for FileDescriptorProto * @function getTypeUrl - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.FileDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; }; - return MessageOptions; + return FileDescriptorProto; })(); - 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.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - */ + protobuf.DescriptorProto = (function() { /** - * Constructs a new FieldOptions. + * Properties of a DescriptorProto. * @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 + * @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 */ - FieldOptions.prototype.unverifiedLazy = false; /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set */ - FieldOptions.prototype.deprecated = false; + 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]]; + } /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto * @instance */ - FieldOptions.prototype.weak = false; + DescriptorProto.prototype.name = ""; /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto * @instance */ - FieldOptions.prototype.debugRedact = false; + DescriptorProto.prototype.field = $util.emptyArray; /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto * @instance */ - FieldOptions.prototype.retention = 0; + DescriptorProto.prototype.extension = $util.emptyArray; /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto * @instance */ - FieldOptions.prototype.targets = $util.emptyArray; + DescriptorProto.prototype.nestedType = $util.emptyArray; /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto * @instance */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; + DescriptorProto.prototype.enumType = $util.emptyArray; /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto * @instance */ - FieldOptions.prototype.features = null; + DescriptorProto.prototype.extensionRange = $util.emptyArray; /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto * @instance */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + DescriptorProto.prototype.oneofDecl = $util.emptyArray; /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto * @instance */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + DescriptorProto.prototype.options = null; /** - * FieldOptions .google.api.fieldInfo. - * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo - * @memberof google.protobuf.FieldOptions + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto * @instance */ - FieldOptions.prototype[".google.api.fieldInfo"] = null; + DescriptorProto.prototype.reservedRange = $util.emptyArray; /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto * @instance */ - FieldOptions.prototype[".google.api.resourceReference"] = null; + DescriptorProto.prototype.reservedName = $util.emptyArray; /** - * Creates a new FieldOptions instance using the specified properties. + * Creates a new DescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); }; /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encode = function encode(message, writer) { + DescriptorProto.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) { - writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.int32(message[".google.api.fieldBehavior"][i]); - writer.ldelim(); - } - 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(); - if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) - $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); + 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 FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldOptions message from the specified reader or buffer. + * Decodes a DescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldOptions + * @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.FieldOptions} FieldOptions + * @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 */ - FieldOptions.decode = function decode(reader, length) { + 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.FieldOptions(); + 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.ctype = reader.int32(); + message.name = reader.string(); break; } case 2: { - message.packed = reader.bool(); + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); break; } case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); 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()); + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); break; } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); break; } - case 21: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.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())); + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.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()); + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); break; } - case 291403980: { - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); break; } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); break; } default: @@ -47164,579 +39251,586 @@ }; /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.DescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions + * @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 */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldOptions message. + * Verifies a DescriptorProto message. * @function verify - * @memberof google.protobuf.FieldOptions + * @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 */ - FieldOptions.verify = function verify(message) { + DescriptorProto.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.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.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.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.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 (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 "editionDefaults." + error; + return "nestedType." + error; } } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + 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.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 (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 "uninterpretedOption." + error; + return "extensionRange." + 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.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[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { - var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); if (error) - return ".google.api.fieldInfo." + error; + return "options." + error; } - 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; + 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.DescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.DescriptorProto} DescriptorProto */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; + 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]); } - 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; + 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]); } - 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; + 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]); } - 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.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.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.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.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.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[".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.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[".google.api.fieldInfo"] != null) { - if (typeof object[".google.api.fieldInfo"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); + 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[".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"]); + 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 FieldOptions message. Also converts values to other types if specified. + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {google.protobuf.DescriptorProto} message DescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldOptions.toObject = function toObject(message, options) { + DescriptorProto.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"] = []; + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; } 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; - object[".google.api.fieldInfo"] = null; + object.name = ""; + object.options = 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.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.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.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.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.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[".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.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) - object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], 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); - }; + /** + * 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()); + }; - /** - * 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"; - }; + /** + * 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; + }; - /** - * 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; - })(); + /** + * 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; + }; - /** - * 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; - })(); + /** + * 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; + }; - /** - * 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; - })(); + /** + * 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); + }; - /** - * 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; + /** + * 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; })(); - FieldOptions.EditionDefault = (function() { + DescriptorProto.ReservedRange = (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 + * 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 EditionDefault. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set */ - function EditionDefault(properties) { + function ReservedRange(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -47744,89 +39838,89 @@ } /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange * @instance */ - EditionDefault.prototype.edition = 0; + ReservedRange.prototype.start = 0; /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange * @instance */ - EditionDefault.prototype.value = ""; + ReservedRange.prototype.end = 0; /** - * Creates a new EditionDefault instance using the specified properties. + * Creates a new ReservedRange instance using the specified properties. * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); }; /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @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 */ - EditionDefault.encode = function encode(message, writer) { + ReservedRange.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); + 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 EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @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 */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EditionDefault message from the specified reader or buffer. + * Decodes a ReservedRange message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault + * @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.FieldOptions.EditionDefault} EditionDefault + * @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 */ - EditionDefault.decode = function decode(reader, length) { + 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.FieldOptions.EditionDefault(); + 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 3: { - message.edition = reader.int32(); + case 1: { + message.start = reader.int32(); break; } case 2: { - message.value = reader.string(); + message.end = reader.int32(); break; } default: @@ -47838,200 +39932,139 @@ }; /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @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 */ - EditionDefault.decodeDelimited = function decodeDelimited(reader) { + ReservedRange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EditionDefault message. + * Verifies a ReservedRange message. * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault + * @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 */ - EditionDefault.verify = function verify(message) { + ReservedRange.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"; + 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 EditionDefault message from a plain object. Also converts values to their respective internal types. + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) 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); + 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 an EditionDefault message. Also converts values to other types if specified. + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EditionDefault.toObject = function toObject(message, options) { + ReservedRange.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.value = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.start = 0; + object.end = 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; + 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 EditionDefault to JSON. + * Converts this ReservedRange to JSON. * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.DescriptorProto.ReservedRange * @instance * @returns {Object.} JSON object */ - EditionDefault.prototype.toJSON = function toJSON() { + ReservedRange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EditionDefault + * Gets the default type url for ReservedRange * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.DescriptorProto.ReservedRange * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; }; - return EditionDefault; + return ReservedRange; })(); - return FieldOptions; + return DescriptorProto; })(); - protobuf.OneofOptions = (function() { + protobuf.ExtensionRangeOptions = (function() { /** - * Properties of an OneofOptions. + * Properties of an ExtensionRangeOptions. * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + * @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 OneofOptions. + * Constructs a new ExtensionRangeOptions. * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set */ - function OneofOptions(properties) { + 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) @@ -48039,47 +40072,68 @@ } /** - * OneofOptions features. + * 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.OneofOptions + * @memberof google.protobuf.ExtensionRangeOptions * @instance */ - OneofOptions.prototype.features = null; + ExtensionRangeOptions.prototype.features = null; /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions * @instance */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + ExtensionRangeOptions.prototype.verification = 1; /** - * Creates a new OneofOptions instance using the specified properties. + * Creates a new ExtensionRangeOptions instance using the specified properties. * @function create - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); }; /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofOptions.encode = function encode(message, 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 1, wireType 2 =*/10).fork()).ldelim(); + $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(); @@ -48087,46 +40141,56 @@ }; /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OneofOptions message from the specified reader or buffer. + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.OneofOptions + * @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.OneofOptions} OneofOptions + * @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 */ - OneofOptions.decode = function decode(reader, length) { + 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.OneofOptions(); + 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 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; } + 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; @@ -48136,37 +40200,32 @@ }; /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.ExtensionRangeOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions + * @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 */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OneofOptions message. + * Verifies an ExtensionRangeOptions message. * @function verify - * @memberof google.protobuf.OneofOptions + * @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 */ - OneofOptions.verify = function verify(message) { + ExtensionRangeOptions.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"; @@ -48176,56 +40235,115 @@ 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.ExtensionRangeOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) 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); - } + var message = new $root.google.protobuf.ExtensionRangeOptions(); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + 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.OneofOptions.uninterpretedOption: object expected"); + 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 OneofOptions message. Also converts values to other types if specified. + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofOptions.toObject = function toObject(message, options) { + ExtensionRangeOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { + object.declaration = []; object.uninterpretedOption = []; - if (options.defaults) + } + 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) { @@ -48237,57 +40355,372 @@ }; /** - * Converts this OneofOptions to JSON. + * Converts this ExtensionRangeOptions to JSON. * @function toJSON - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.ExtensionRangeOptions * @instance * @returns {Object.} JSON object */ - OneofOptions.prototype.toJSON = function toJSON() { + ExtensionRangeOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OneofOptions + * Gets the default type url for ExtensionRangeOptions * @function getTypeUrl - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.ExtensionRangeOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; }; - return OneofOptions; + 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.EnumOptions = (function() { + protobuf.FieldDescriptorProto = (function() { /** - * Properties of an EnumOptions. + * Properties of a FieldDescriptorProto. * @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 + * @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 EnumOptions. + * Constructs a new FieldDescriptorProto. * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set */ - function EnumOptions(properties) { - this.uninterpretedOption = []; + function FieldDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48295,134 +40728,215 @@ } /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - EnumOptions.prototype.allowAlias = false; + FieldDescriptorProto.prototype.name = ""; /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - EnumOptions.prototype.deprecated = false; + FieldDescriptorProto.prototype.number = 0; /** - * EnumOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.EnumOptions + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + FieldDescriptorProto.prototype.label = 1; /** - * EnumOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumOptions + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - EnumOptions.prototype.features = null; + FieldDescriptorProto.prototype.type = 1; /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + FieldDescriptorProto.prototype.typeName = ""; /** - * Creates a new EnumOptions instance using the specified properties. + * 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.EnumOptions + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); }; /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encode = function encode(message, writer) { + FieldDescriptorProto.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(); + 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 EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumOptions message from the specified reader or buffer. + * Decodes a FieldDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumOptions + * @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.EnumOptions} EnumOptions + * @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 */ - EnumOptions.decode = function decode(reader, length) { + 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.EnumOptions(); + 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 2: { - message.allowAlias = reader.bool(); + case 1: { + message.name = reader.string(); break; } case 3: { - message.deprecated = reader.bool(); + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); break; } case 6: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); break; } case 7: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + message.defaultValue = reader.string(); break; } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + 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: @@ -48434,182 +40948,394 @@ }; /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions + * @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 */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumOptions message. + * Verifies a FieldDescriptorProto message. * @function verify - * @memberof google.protobuf.EnumOptions + * @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 */ - EnumOptions.verify = function verify(message) { + FieldDescriptorProto.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; + 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 an EnumOptions message from a plain object. Also converts values to their respective internal types. + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) 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); + 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; } - 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]); + 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 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); + + /** + * 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 EnumOptions to JSON. + * Converts this FieldDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldDescriptorProto * @instance * @returns {Object.} JSON object */ - EnumOptions.prototype.toJSON = function toJSON() { + FieldDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumOptions + * Gets the default type url for FieldDescriptorProto * @function getTypeUrl - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; }; - return EnumOptions; + /** + * 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.EnumValueOptions = (function() { + protobuf.OneofDescriptorProto = (function() { /** - * Properties of an EnumValueOptions. + * Properties of an OneofDescriptorProto. * @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 + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options */ /** - * Constructs a new EnumValueOptions. + * Constructs a new OneofDescriptorProto. * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; + function OneofDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48617,120 +41343,89 @@ } /** - * 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 + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto * @instance */ - EnumValueOptions.prototype.debugRedact = false; + OneofDescriptorProto.prototype.name = ""; /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto * @instance */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + OneofDescriptorProto.prototype.options = null; /** - * Creates a new EnumValueOptions instance using the specified properties. + * Creates a new OneofDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); }; /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer) { + OneofDescriptorProto.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(); + 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 EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer. + * Decodes an OneofDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.EnumValueOptions + * @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.EnumValueOptions} EnumValueOptions + * @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 */ - EnumValueOptions.decode = function decode(reader, length) { + 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.EnumValueOptions(); + 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.deprecated = reader.bool(); + message.name = reader.string(); 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())); + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); break; } default: @@ -48742,175 +41437,143 @@ }; /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.OneofDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @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 */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EnumValueOptions message. + * Verifies an OneofDescriptorProto message. * @function verify - * @memberof google.protobuf.EnumValueOptions + * @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 */ - EnumValueOptions.verify = function verify(message) { + OneofDescriptorProto.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 (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 "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 "options." + error; } return null; }; /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.OneofDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) 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]); - } + 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 EnumValueOptions message. Also converts values to other types if specified. + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueOptions.toObject = function toObject(message, options) { + OneofDescriptorProto.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); + 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 EnumValueOptions to JSON. + * Converts this OneofDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.OneofDescriptorProto * @instance * @returns {Object.} JSON object */ - EnumValueOptions.prototype.toJSON = function toJSON() { + OneofDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EnumValueOptions + * Gets the default type url for OneofDescriptorProto * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.OneofDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; }; - return EnumValueOptions; + return OneofDescriptorProto; })(); - protobuf.ServiceOptions = (function() { + protobuf.EnumDescriptorProto = (function() { /** - * Properties of a ServiceOptions. + * Properties of an EnumDescriptorProto. * @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 + * @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 ServiceOptions. + * Constructs a new EnumDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; + 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) @@ -48918,134 +41581,140 @@ } /** - * ServiceOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ServiceOptions + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - ServiceOptions.prototype.features = null; + EnumDescriptorProto.prototype.name = ""; /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - ServiceOptions.prototype.deprecated = false; + EnumDescriptorProto.prototype.value = $util.emptyArray; /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + EnumDescriptorProto.prototype.options = null; /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; /** - * Creates a new ServiceOptions instance using the specified properties. + * Creates a new EnumDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); }; /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encode = function encode(message, writer) { + EnumDescriptorProto.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.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 ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServiceOptions message from the specified reader or buffer. + * Decodes an EnumDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.ServiceOptions + * @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.ServiceOptions} ServiceOptions + * @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 */ - ServiceOptions.decode = function decode(reader, length) { + 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.ServiceOptions(); + 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 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case 1: { + message.name = reader.string(); break; } - case 33: { - message.deprecated = reader.bool(); + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.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())); + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); break; } - case 1049: { - message[".google.api.defaultHost"] = reader.string(); + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); break; } - case 1050: { - message[".google.api.oauthScopes"] = reader.string(); + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); break; } default: @@ -49057,186 +41726,437 @@ }; /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @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 */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServiceOptions message. + * Verifies an EnumDescriptorProto message. * @function verify - * @memberof google.protobuf.ServiceOptions + * @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 */ - ServiceOptions.verify = function verify(message) { + EnumDescriptorProto.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 (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 "features." + error; + return "options." + 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 (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 "uninterpretedOption." + error; + return "reservedRange." + 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.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 ServiceOptions message from a plain object. Also converts values to their respective internal types. + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) 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); + 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.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.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[".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.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 a ServiceOptions message. Also converts values to other types if specified. + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + EnumDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } if (options.defaults) { - object.deprecated = false; - object.features = null; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; + object.name = ""; + object.options = null; } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.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.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; } - if (message[".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"]; return object; }; /** - * Converts this ServiceOptions to JSON. + * Converts this EnumDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.EnumDescriptorProto * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { + EnumDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ServiceOptions + * Gets the default type url for EnumDescriptorProto * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; }; - return ServiceOptions; + 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.MethodOptions = (function() { + protobuf.EnumValueDescriptorProto = (function() { /** - * Properties of a MethodOptions. + * Properties of an EnumValueDescriptorProto. * @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 + * @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 MethodOptions. + * Constructs a new EnumValueDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; + function EnumValueDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49244,165 +42164,103 @@ } /** - * 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 + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ - MethodOptions.prototype[".google.api.http"] = null; + EnumValueDescriptorProto.prototype.name = ""; /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + EnumValueDescriptorProto.prototype.number = 0; /** - * MethodOptions .google.longrunning.operationInfo. - * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo - * @memberof google.protobuf.MethodOptions + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ - MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + EnumValueDescriptorProto.prototype.options = null; /** - * Creates a new MethodOptions instance using the specified properties. + * Creates a new EnumValueDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); }; /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encode = function encode(message, writer) { + EnumValueDescriptorProto.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(); + 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 MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodOptions message from the specified reader or buffer. + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.MethodOptions + * @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.MethodOptions} MethodOptions + * @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 */ - MethodOptions.decode = function decode(reader, length) { + 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.MethodOptions(); + 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 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()); + case 1: { + message.name = reader.string(); break; } - case 1051: { - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); + case 2: { + message.number = reader.int32(); break; } - case 1049: { - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); break; } default: @@ -49414,264 +42272,147 @@ }; /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions + * @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 */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodOptions message. + * Verifies an EnumValueDescriptorProto message. * @function verify - * @memberof google.protobuf.MethodOptions + * @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 */ - MethodOptions.verify = function verify(message) { + EnumValueDescriptorProto.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 (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 ".google.longrunning.operationInfo." + error; + return "options." + error; } return null; }; /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) 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"]); + 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 a MethodOptions message. Also converts values to other types if specified. + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + EnumValueDescriptorProto.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]; + object.name = ""; + object.number = 0; + object.options = null; } - 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); + 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 MethodOptions to JSON. + * Converts this EnumValueDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.EnumValueDescriptorProto * @instance * @returns {Object.} JSON object */ - MethodOptions.prototype.toJSON = function toJSON() { + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MethodOptions + * Gets the default type url for EnumValueDescriptorProto * @function getTypeUrl - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; }; - /** - * 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; + return EnumValueDescriptorProto; })(); - protobuf.UninterpretedOption = (function() { + protobuf.ServiceDescriptorProto = (function() { /** - * Properties of an UninterpretedOption. + * Properties of a ServiceDescriptorProto. * @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 + * @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 UninterpretedOption. + * Constructs a new ServiceDescriptorProto. * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set */ - function UninterpretedOption(properties) { - this.name = []; + function ServiceDescriptorProto(properties) { + this.method = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -49679,162 +42420,106 @@ } /** - * 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 + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto * @instance */ - UninterpretedOption.prototype.doubleValue = 0; + ServiceDescriptorProto.prototype.name = ""; /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto * @instance */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + ServiceDescriptorProto.prototype.method = $util.emptyArray; /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto * @instance */ - UninterpretedOption.prototype.aggregateValue = ""; + ServiceDescriptorProto.prototype.options = null; /** - * Creates a new UninterpretedOption instance using the specified properties. + * Creates a new ServiceDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); }; /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encode = function encode(message, writer) { + ServiceDescriptorProto.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); + 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 UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UninterpretedOption + * @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.UninterpretedOption} UninterpretedOption + * @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 */ - UninterpretedOption.decode = function decode(reader, length) { + 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.UninterpretedOption(); + 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 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(); + case 1: { + message.name = reader.string(); break; } - case 7: { - message.stringValue = reader.bytes(); + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); break; } - case 8: { - message.aggregateValue = reader.string(); + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); break; } default: @@ -49846,458 +42531,167 @@ }; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @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 */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UninterpretedOption message. + * Verifies a ServiceDescriptorProto message. * @function verify - * @memberof google.protobuf.UninterpretedOption + * @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 */ - UninterpretedOption.verify = function verify(message) { + ServiceDescriptorProto.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 (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 "name." + error; + return "method." + 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"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } return null; }; /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) 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]); + 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.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); + 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 an UninterpretedOption message. Also converts values to other types if specified. + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + ServiceDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.name = []; + object.method = []; 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 = ""; + object.name = ""; + object.options = null; } - 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.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.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; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); return object; }; /** - * Converts this UninterpretedOption to JSON. + * Converts this ServiceDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.ServiceDescriptorProto * @instance * @returns {Object.} JSON object */ - UninterpretedOption.prototype.toJSON = function toJSON() { + ServiceDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UninterpretedOption + * Gets the default type url for ServiceDescriptorProto * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; }; - 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; + return ServiceDescriptorProto; })(); - protobuf.FeatureSet = (function() { + protobuf.MethodDescriptorProto = (function() { /** - * Properties of a FeatureSet. + * Properties of a MethodDescriptorProto. * @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 + * @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 FeatureSet. + * Constructs a new MethodDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set */ - function FeatureSet(properties) { + function MethodDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -50305,145 +42699,145 @@ } /** - * FeatureSet fieldPresence. - * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence - * @memberof google.protobuf.FeatureSet + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - FeatureSet.prototype.fieldPresence = 0; + MethodDescriptorProto.prototype.name = ""; /** - * FeatureSet enumType. - * @member {google.protobuf.FeatureSet.EnumType} enumType - * @memberof google.protobuf.FeatureSet + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - FeatureSet.prototype.enumType = 0; + MethodDescriptorProto.prototype.inputType = ""; /** - * FeatureSet repeatedFieldEncoding. - * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding - * @memberof google.protobuf.FeatureSet + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - FeatureSet.prototype.repeatedFieldEncoding = 0; + MethodDescriptorProto.prototype.outputType = ""; /** - * FeatureSet utf8Validation. - * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation - * @memberof google.protobuf.FeatureSet + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - FeatureSet.prototype.utf8Validation = 0; + MethodDescriptorProto.prototype.options = null; /** - * FeatureSet messageEncoding. - * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding - * @memberof google.protobuf.FeatureSet + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - FeatureSet.prototype.messageEncoding = 0; + MethodDescriptorProto.prototype.clientStreaming = false; /** - * FeatureSet jsonFormat. - * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat - * @memberof google.protobuf.FeatureSet + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - FeatureSet.prototype.jsonFormat = 0; + MethodDescriptorProto.prototype.serverStreaming = false; /** - * Creates a new FeatureSet instance using the specified properties. + * Creates a new MethodDescriptorProto instance using the specified properties. * @function create - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); }; /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. * @function encode - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSet.encode = function encode(message, writer) { + MethodDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + if (message.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 FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FeatureSet message from the specified reader or buffer. + * Decodes a MethodDescriptorProto message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FeatureSet + * @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.FeatureSet} FeatureSet + * @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 */ - FeatureSet.decode = function decode(reader, length) { + 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.FeatureSet(); + 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.fieldPresence = reader.int32(); + message.name = reader.string(); break; } case 2: { - message.enumType = reader.int32(); + message.inputType = reader.string(); break; } case 3: { - message.repeatedFieldEncoding = reader.int32(); + message.outputType = reader.string(); break; } case 4: { - message.utf8Validation = reader.int32(); + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); break; } case 5: { - message.messageEncoding = reader.int32(); + message.clientStreaming = reader.bool(); break; } case 6: { - message.jsonFormat = reader.int32(); + message.serverStreaming = reader.bool(); break; } default: @@ -50455,520 +42849,567 @@ }; /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.MethodDescriptorProto * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet + * @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 */ - FeatureSet.decodeDelimited = function decodeDelimited(reader) { + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FeatureSet message. + * Verifies a MethodDescriptorProto message. * @function verify - * @memberof google.protobuf.FeatureSet + * @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 */ - FeatureSet.verify = function verify(message) { + MethodDescriptorProto.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.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 FeatureSet message from a plain object. Also converts values to their respective internal types. + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.MethodDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto */ - FeatureSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet) + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) 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; + 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 FeatureSet message. Also converts values to other types if specified. + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSet.toObject = function toObject(message, options) { + MethodDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; - object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; - object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; - object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; - object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; - object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; } - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && message.hasOwnProperty("enumType")) - object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + if (message.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 FeatureSet to JSON. + * Converts this MethodDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.MethodDescriptorProto * @instance * @returns {Object.} JSON object */ - FeatureSet.prototype.toJSON = function toJSON() { + MethodDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FeatureSet + * Gets the default type url for MethodDescriptorProto * @function getTypeUrl - * @memberof google.protobuf.FeatureSet + * @memberof google.protobuf.MethodDescriptorProto * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; }; + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + /** - * 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 + * 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 */ - 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 + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set */ - 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; - })(); + 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]]; + } /** - * 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 + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance */ - 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; - })(); + FileOptions.prototype.javaPackage = ""; /** - * 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 + * 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 */ - 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; - })(); + FileOptions.prototype.objcClassPrefix = ""; /** - * 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 + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance */ - 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; - })(); + FileOptions.prototype.csharpNamespace = ""; /** - * 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 + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance */ - 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; - })(); + FileOptions.prototype.swiftPrefix = ""; - return FeatureSet; - })(); + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; - protobuf.FeatureSetDefaults = (function() { + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; /** - * 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 + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance */ + FileOptions.prototype.phpMetadataNamespace = ""; /** - * Constructs a new FeatureSetDefaults. - * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults - * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance */ - 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]]; - } + FileOptions.prototype.rubyPackage = ""; /** - * FeatureSetDefaults defaults. - * @member {Array.} defaults - * @memberof google.protobuf.FeatureSetDefaults + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions * @instance */ - FeatureSetDefaults.prototype.defaults = $util.emptyArray; + FileOptions.prototype.features = null; /** - * FeatureSetDefaults minimumEdition. - * @member {google.protobuf.Edition} minimumEdition - * @memberof google.protobuf.FeatureSetDefaults + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions * @instance */ - FeatureSetDefaults.prototype.minimumEdition = 0; + FileOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * FeatureSetDefaults maximumEdition. - * @member {google.protobuf.Edition} maximumEdition - * @memberof google.protobuf.FeatureSetDefaults + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions * @instance */ - FeatureSetDefaults.prototype.maximumEdition = 0; + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; /** - * Creates a new FeatureSetDefaults instance using the specified properties. + * Creates a new FileOptions instance using the specified properties. * @function create - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); + FileOptions.create = function create(properties) { + return new FileOptions(properties); }; /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSetDefaults.encode = function encode(message, writer) { + FileOptions.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); + 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 FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * Decodes a FileOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FeatureSetDefaults + * @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.FeatureSetDefaults} FeatureSetDefaults + * @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 */ - FeatureSetDefaults.decode = function decode(reader, length) { + 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.FeatureSetDefaults(); + 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: { - if (!(message.defaults && message.defaults.length)) - message.defaults = []; - message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + message.javaPackage = reader.string(); break; } - case 4: { - message.minimumEdition = reader.int32(); + case 8: { + message.javaOuterClassname = reader.string(); break; } - case 5: { - message.maximumEdition = reader.int32(); + 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: @@ -50980,582 +43421,380 @@ }; /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * Decodes a FileOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.FileOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @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 */ - FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + FileOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FeatureSetDefaults message. + * Verifies a FileOptions message. * @function verify - * @memberof google.protobuf.FeatureSetDefaults + * @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 */ - FeatureSetDefaults.verify = function verify(message) { + FileOptions.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) { + 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 "minimumEdition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: + return "optimizeFor: enum value expected"; case 1: case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: + case 3: 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; + 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 FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.FileOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @returns {google.protobuf.FileOptions} FileOptions */ - FeatureSetDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) 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) { + 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.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; 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 "SPEED": case 1: - message.maximumEdition = 1; + message.optimizeFor = 1; break; - case "EDITION_2_TEST_ONLY": + case "CODE_SIZE": 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; + message.optimizeFor = 2; break; - case "EDITION_MAX": - case 2147483647: - message.maximumEdition = 2147483647; + 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 FeatureSetDefaults message. Also converts values to other types if specified. + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {google.protobuf.FileOptions} message FileOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSetDefaults.toObject = function toObject(message, options) { + FileOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.defaults = []; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } if (options.defaults) { - object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + 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.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.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); } - 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. + * Converts this FileOptions to JSON. * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults + * @memberof google.protobuf.FileOptions * @instance * @returns {Object.} JSON object */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { + FileOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FeatureSetDefaults + * Gets the default type url for FileOptions * @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"; - }; + * @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"; + }; - return FeatureSetEditionDefault; + /** + * 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 FeatureSetDefaults; + return FileOptions; })(); - protobuf.SourceCodeInfo = (function() { + protobuf.MessageOptions = (function() { /** - * Properties of a SourceCodeInfo. + * Properties of a MessageOptions. * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location + * @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 SourceCodeInfo. + * Constructs a new MessageOptions. * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set */ - function SourceCodeInfo(properties) { - this.location = []; + function MessageOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51563,585 +43802,407 @@ } /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions * @instance */ - SourceCodeInfo.prototype.location = $util.emptyArray; + MessageOptions.prototype.messageSetWireFormat = false; /** - * Creates a new SourceCodeInfo instance using the specified properties. + * 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.SourceCodeInfo + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); }; /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encode = function encode(message, writer) { + MessageOptions.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(); + 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 SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. + * Decodes a MessageOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.SourceCodeInfo + * @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.SourceCodeInfo} SourceCodeInfo + * @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 */ - SourceCodeInfo.decode = function decode(reader, length) { + 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.SourceCodeInfo(); + 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: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + message.messageSetWireFormat = reader.bool(); 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); + 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 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()); - }; + } + return message; + }; - /** - * 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; - }; + /** + * 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()); + }; - /** - * 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]); + /** + * 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; } - return message; - }; + } + 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 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]; - } + /** + * 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; + }; - /** - * 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); - }; + /** + * 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; + }; - /** - * 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"; - }; + /** + * 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); + }; - return Location; - })(); + /** + * 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 SourceCodeInfo; + return MessageOptions; })(); - protobuf.GeneratedCodeInfo = (function() { + protobuf.FieldOptions = (function() { /** - * Properties of a GeneratedCodeInfo. + * Properties of a FieldOptions. * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + * @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.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference */ /** - * Constructs a new GeneratedCodeInfo. + * Constructs a new FieldOptions. * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set */ - function GeneratedCodeInfo(properties) { - this.annotation = []; + 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) @@ -52149,78 +44210,310 @@ } /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo + * 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.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = null; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions * @instance */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + FieldOptions.prototype[".google.api.resourceReference"] = null; /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * Creates a new FieldOptions instance using the specified properties. * @function create - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); }; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encode = function encode(message, writer) { + FieldOptions.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(); + 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) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + 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(); + if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) + $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); return writer; }; /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * Decodes a FieldOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.GeneratedCodeInfo + * @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.GeneratedCodeInfo} GeneratedCodeInfo + * @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 */ - GeneratedCodeInfo.decode = function decode(reader, length) { + 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.GeneratedCodeInfo(); + 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: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + 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 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); break; } default: @@ -52232,141 +44525,579 @@ }; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @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 */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + FieldOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GeneratedCodeInfo message. + * Verifies a FieldOptions message. * @function verify - * @memberof google.protobuf.GeneratedCodeInfo + * @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 */ - GeneratedCodeInfo.verify = function verify(message) { + FieldOptions.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 (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 "annotation." + 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.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { + var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); + if (error) + return ".google.api.fieldInfo." + error; + } + 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]); } } - 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]); - } + 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.fieldInfo"] != null) { + if (typeof object[".google.api.fieldInfo"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); + } + 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 GeneratedCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {google.protobuf.FieldOptions} message FieldOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GeneratedCodeInfo.toObject = function toObject(message, options) { + FieldOptions.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); + 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; + object[".google.api.fieldInfo"] = 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); + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) + object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); return object; }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this FieldOptions to JSON. * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.FieldOptions * @instance * @returns {Object.} JSON object */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { + FieldOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GeneratedCodeInfo + * Gets the default type url for FieldOptions * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.FieldOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + return typeUrlPrefix + "/google.protobuf.FieldOptions"; }; - GeneratedCodeInfo.Annotation = (function() { + /** + * 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 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 + * 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 Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set */ - function Annotation(properties) { - this.path = []; + function EditionDefault(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52374,142 +45105,89 @@ } /** - * 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 + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault * @instance */ - Annotation.prototype.end = 0; + EditionDefault.prototype.edition = 0; /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault * @instance */ - Annotation.prototype.semantic = 0; + EditionDefault.prototype.value = ""; /** - * Creates a new Annotation instance using the specified properties. + * Creates a new EditionDefault instance using the specified properties. * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.protobuf.FieldOptions.EditionDefault * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance */ - Annotation.create = function create(properties) { - return new Annotation(properties); + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); }; /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.protobuf.FieldOptions.EditionDefault * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @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 */ - Annotation.encode = function encode(message, writer) { + EditionDefault.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); + 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 Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.protobuf.FieldOptions.EditionDefault * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @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 */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Annotation message from the specified reader or buffer. + * Decodes an EditionDefault message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @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.GeneratedCodeInfo.Annotation} Annotation + * @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 */ - Annotation.decode = function decode(reader, length) { + 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.GeneratedCodeInfo.Annotation(); + 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 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(); + message.edition = reader.int32(); break; } - case 5: { - message.semantic = reader.int32(); + case 2: { + message.value = reader.string(); break; } default: @@ -52521,212 +45199,200 @@ }; /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.protobuf.FieldOptions.EditionDefault * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @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 */ - Annotation.decodeDelimited = function decodeDelimited(reader) { + EditionDefault.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Annotation message. + * Verifies an EditionDefault message. * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @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 */ - Annotation.verify = function verify(message) { + EditionDefault.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) { + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { default: - return "semantic: enum value expected"; + 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 Annotation message from a plain object. Also converts values to their respective internal types. + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.protobuf.FieldOptions.EditionDefault * @static * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) 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) { + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; + if (typeof object.edition === "number") { + message.edition = object.edition; break; } break; - case "NONE": + case "EDITION_UNKNOWN": case 0: - message.semantic = 0; + message.edition = 0; break; - case "SET": + 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.semantic = 1; + message.edition = 1; break; - case "ALIAS": + case "EDITION_2_TEST_ONLY": case 2: - message.semantic = 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 Annotation message. Also converts values to other types if specified. + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.protobuf.FieldOptions.EditionDefault * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Annotation.toObject = function toObject(message, options) { + EditionDefault.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]; + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; } - 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; + 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 Annotation to JSON. + * Converts this EditionDefault to JSON. * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.protobuf.FieldOptions.EditionDefault * @instance * @returns {Object.} JSON object */ - Annotation.prototype.toJSON = function toJSON() { + EditionDefault.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Annotation + * Gets the default type url for EditionDefault * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @memberof google.protobuf.FieldOptions.EditionDefault * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; }; - /** - * 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 EditionDefault; })(); - return GeneratedCodeInfo; + return FieldOptions; })(); - protobuf.Duration = (function() { + protobuf.OneofOptions = (function() { /** - * Properties of a Duration. + * Properties of an OneofOptions. * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption */ /** - * Constructs a new Duration. + * Constructs a new OneofOptions. * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set */ - function Duration(properties) { + function OneofOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52734,89 +45400,92 @@ } /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions * @instance */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + OneofOptions.prototype.features = null; /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions * @instance */ - Duration.prototype.nanos = 0; + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a new Duration instance using the specified properties. + * Creates a new OneofOptions instance using the specified properties. * @function create - * @memberof google.protobuf.Duration + * @memberof google.protobuf.OneofOptions * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance */ - Duration.create = function create(properties) { - return new Duration(properties); + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); }; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.Duration + * @memberof google.protobuf.OneofOptions * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encode = function encode(message, writer) { + OneofOptions.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); + 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 Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.OneofOptions * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes an OneofOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Duration + * @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.Duration} Duration + * @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 */ - Duration.decode = function decode(reader, length) { + 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.Duration(); + 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.seconds = reader.int64(); + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } - case 2: { - message.nanos = reader.int32(); + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); break; } default: @@ -52828,146 +45497,158 @@ }; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.OneofOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration + * @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 */ - Duration.decodeDelimited = function decodeDelimited(reader) { + OneofOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Duration message. + * Verifies an OneofOptions message. * @function verify - * @memberof google.protobuf.Duration + * @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 */ - Duration.verify = function verify(message) { + OneofOptions.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"; + 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 a Duration message from a plain object. Also converts values to their respective internal types. + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.OneofOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.OneofOptions} OneofOptions */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) 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; + 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 a Duration message. Also converts values to other types if specified. + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.OneofOptions * @static - * @param {google.protobuf.Duration} message Duration + * @param {google.protobuf.OneofOptions} message OneofOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options) { + OneofOptions.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 (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); } - 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. + * Converts this OneofOptions to JSON. * @function toJSON - * @memberof google.protobuf.Duration + * @memberof google.protobuf.OneofOptions * @instance * @returns {Object.} JSON object */ - Duration.prototype.toJSON = function toJSON() { + OneofOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Duration + * Gets the default type url for OneofOptions * @function getTypeUrl - * @memberof google.protobuf.Duration + * @memberof google.protobuf.OneofOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Duration"; + return typeUrlPrefix + "/google.protobuf.OneofOptions"; }; - return Duration; + return OneofOptions; })(); - protobuf.Timestamp = (function() { + protobuf.EnumOptions = (function() { /** - * Properties of a Timestamp. + * Properties of an EnumOptions. * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos + * @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 Timestamp. + * Constructs a new EnumOptions. * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set */ - function Timestamp(properties) { + function EnumOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52975,89 +45656,134 @@ } /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions * @instance */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + EnumOptions.prototype.allowAlias = false; /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions * @instance */ - Timestamp.prototype.nanos = 0; + EnumOptions.prototype.deprecated = false; /** - * Creates a new Timestamp instance using the specified properties. + * 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.Timestamp + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); }; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { + EnumOptions.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); + 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 Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes an EnumOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Timestamp + * @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.Timestamp} Timestamp + * @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 */ - Timestamp.decode = function decode(reader, length) { + 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.Timestamp(); + 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 1: { - message.seconds = reader.int64(); + case 2: { + message.allowAlias = reader.bool(); break; } - case 2: { - message.nanos = reader.int32(); + 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: @@ -53069,146 +45795,182 @@ }; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.EnumOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp + * @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 */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { + EnumOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Timestamp message. + * Verifies an EnumOptions message. * @function verify - * @memberof google.protobuf.Timestamp + * @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 */ - Timestamp.verify = function verify(message) { + EnumOptions.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"; + 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 a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.EnumOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.EnumOptions} EnumOptions */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) 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; + 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 a Timestamp message. Also converts values to other types if specified. + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.Timestamp} message Timestamp + * @param {google.protobuf.EnumOptions} message EnumOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { + EnumOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; 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; + 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); } - 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. + * Converts this EnumOptions to JSON. * @function toJSON - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.EnumOptions * @instance * @returns {Object.} JSON object */ - Timestamp.prototype.toJSON = function toJSON() { + EnumOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Timestamp + * Gets the default type url for EnumOptions * @function getTypeUrl - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.EnumOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Timestamp"; + return typeUrlPrefix + "/google.protobuf.EnumOptions"; }; - return Timestamp; + return EnumOptions; })(); - protobuf.Any = (function() { + protobuf.EnumValueOptions = (function() { /** - * Properties of an Any. + * Properties of an EnumValueOptions. * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value + * @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 Any. + * Constructs a new EnumValueOptions. * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set */ - function Any(properties) { + function EnumValueOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53216,89 +45978,120 @@ } /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions * @instance */ - Any.prototype.type_url = ""; + EnumValueOptions.prototype.deprecated = false; /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions * @instance */ - Any.prototype.value = $util.newBuffer([]); + EnumValueOptions.prototype.features = null; /** - * Creates a new Any instance using the specified properties. + * 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.Any + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance */ - Any.create = function create(properties) { - return new Any(properties); + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); }; /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.Any + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encode = function encode(message, writer) { + EnumValueOptions.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); + 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 Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encodeDelimited = function encodeDelimited(message, writer) { + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Any message from the specified reader or buffer. + * Decodes an EnumValueOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Any + * @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.Any} Any + * @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 */ - Any.decode = function decode(reader, length) { + 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.Any(); + 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.type_url = reader.string(); + message.deprecated = reader.bool(); break; } case 2: { - message.value = reader.bytes(); + 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: @@ -53310,141 +46103,175 @@ }; /** - * Decodes an Any message from the specified reader or buffer, length delimited. + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Any + * @memberof google.protobuf.EnumValueOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any + * @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 */ - Any.decodeDelimited = function decodeDelimited(reader) { + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Any message. + * Verifies an EnumValueOptions message. * @function verify - * @memberof google.protobuf.Any + * @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 */ - Any.verify = function verify(message) { + EnumValueOptions.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"; + 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 Any message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.EnumValueOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) 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; + 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 Any message. Also converts values to other types if specified. + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.Any} message Any + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Any.toObject = function toObject(message, options) { + EnumValueOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; 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); - } + 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); } - 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. + * Converts this EnumValueOptions to JSON. * @function toJSON - * @memberof google.protobuf.Any + * @memberof google.protobuf.EnumValueOptions * @instance * @returns {Object.} JSON object */ - Any.prototype.toJSON = function toJSON() { + EnumValueOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Any + * Gets the default type url for EnumValueOptions * @function getTypeUrl - * @memberof google.protobuf.Any + * @memberof google.protobuf.EnumValueOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Any"; + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; }; - return Any; + return EnumValueOptions; })(); - protobuf.FieldMask = (function() { + protobuf.ServiceOptions = (function() { /** - * Properties of a FieldMask. + * Properties of a ServiceOptions. * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths + * @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 */ /** - * Constructs a new FieldMask. + * Constructs a new ServiceOptions. * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set */ - function FieldMask(properties) { - this.paths = []; + function ServiceOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53452,78 +46279,134 @@ } /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions * @instance */ - FieldMask.prototype.paths = $util.emptyArray; + ServiceOptions.prototype.features = null; /** - * Creates a new FieldMask instance using the specified properties. + * 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"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. * @function create - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); }; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encode = function encode(message, writer) { + ServiceOptions.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]); + 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"]); return writer; }; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes a ServiceOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldMask + * @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.FieldMask} FieldMask + * @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 */ - FieldMask.decode = function decode(reader, length) { + 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.FieldMask(); + 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 1: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); + 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; } default: @@ -53535,133 +46418,186 @@ }; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ServiceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask + * @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 */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldMask message. + * Verifies a ServiceOptions message. * @function verify - * @memberof google.protobuf.FieldMask + * @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 */ - FieldMask.verify = function verify(message) { + ServiceOptions.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"; + 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"; return null; }; /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) 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]); + 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"]); return message; }; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.FieldMask} message FieldMask + * @param {google.protobuf.ServiceOptions} message ServiceOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldMask.toObject = function toObject(message, options) { + ServiceOptions.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]; + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + 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"]; return object; }; /** - * Converts this FieldMask to JSON. + * Converts this ServiceOptions to JSON. * @function toJSON - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ServiceOptions * @instance * @returns {Object.} JSON object */ - FieldMask.prototype.toJSON = function toJSON() { + ServiceOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FieldMask + * Gets the default type url for ServiceOptions * @function getTypeUrl - * @memberof google.protobuf.FieldMask + * @memberof google.protobuf.ServiceOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldMask"; + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; }; - return FieldMask; + return ServiceOptions; })(); - protobuf.Empty = (function() { + protobuf.MethodOptions = (function() { /** - * Properties of an Empty. + * Properties of a MethodOptions. * @memberof google.protobuf - * @interface IEmpty + * @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 Empty. + * Constructs a new MethodOptions. * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set */ - function Empty(properties) { + 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) @@ -53669,63 +46605,167 @@ } /** - * Creates a new Empty instance using the specified properties. + * 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.Empty + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance */ - Empty.create = function create(properties) { - return new Empty(properties); + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); }; /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encode - * @memberof google.protobuf.Empty + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encode = function encode(message, 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 Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Empty + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Empty message from the specified reader or buffer. + * Decodes a MethodOptions message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Empty + * @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.Empty} Empty + * @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 */ - Empty.decode = function decode(reader, length) { + 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.Empty(); + 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; @@ -53735,109 +46775,264 @@ }; /** - * Decodes an Empty message from the specified reader or buffer, length delimited. + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Empty + * @memberof google.protobuf.MethodOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty + * @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 */ - Empty.decodeDelimited = function decodeDelimited(reader) { + MethodOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Empty message. + * Verifies a MethodOptions message. * @function verify - * @memberof google.protobuf.Empty + * @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 */ - Empty.verify = function verify(message) { + 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 an Empty message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Empty + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.MethodOptions} MethodOptions */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) return object; - return new $root.google.protobuf.Empty(); + 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 an Empty message. Also converts values to other types if specified. + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Empty + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.Empty} message Empty + * @param {google.protobuf.MethodOptions} message MethodOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Empty.toObject = function toObject() { - return {}; + 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 Empty to JSON. + * Converts this MethodOptions to JSON. * @function toJSON - * @memberof google.protobuf.Empty + * @memberof google.protobuf.MethodOptions * @instance * @returns {Object.} JSON object */ - Empty.prototype.toJSON = function toJSON() { + MethodOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Empty + * Gets the default type url for MethodOptions * @function getTypeUrl - * @memberof google.protobuf.Empty + * @memberof google.protobuf.MethodOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Empty"; + return typeUrlPrefix + "/google.protobuf.MethodOptions"; }; - return Empty; + /** + * 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.DoubleValue = (function() { + protobuf.UninterpretedOption = (function() { /** - * Properties of a DoubleValue. + * Properties of an UninterpretedOption. * @memberof google.protobuf - * @interface IDoubleValue - * @property {number|null} [value] DoubleValue value + * @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 DoubleValue. + * Constructs a new UninterpretedOption. * @memberof google.protobuf - * @classdesc Represents a DoubleValue. - * @implements IDoubleValue + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption * @constructor - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set */ - function DoubleValue(properties) { + function UninterpretedOption(properties) { + this.name = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53845,75 +47040,162 @@ } /** - * DoubleValue value. - * @member {number} value - * @memberof google.protobuf.DoubleValue + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption * @instance */ - DoubleValue.prototype.value = 0; + UninterpretedOption.prototype.name = $util.emptyArray; /** - * Creates a new DoubleValue instance using the specified properties. + * 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.DoubleValue + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set - * @returns {google.protobuf.DoubleValue} DoubleValue instance + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance */ - DoubleValue.create = function create(properties) { - return new DoubleValue(properties); + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); }; /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encode - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DoubleValue.encode = function encode(message, writer) { + UninterpretedOption.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + if (message.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 DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DoubleValue message from the specified reader or buffer. + * Decodes an UninterpretedOption message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.DoubleValue + * @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.DoubleValue} DoubleValue + * @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 */ - DoubleValue.decode = function decode(reader, length) { + 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.DoubleValue(); + 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 1: { - message.value = reader.double(); + 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: @@ -53925,122 +47207,458 @@ }; /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.UninterpretedOption * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DoubleValue} DoubleValue + * @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 */ - DoubleValue.decodeDelimited = function decodeDelimited(reader) { + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DoubleValue message. + * Verifies an UninterpretedOption message. * @function verify - * @memberof google.protobuf.DoubleValue + * @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 */ - DoubleValue.verify = function verify(message) { + UninterpretedOption.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; + if (message.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 a DoubleValue message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DoubleValue} DoubleValue + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ - DoubleValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DoubleValue) + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) return object; - var message = new $root.google.protobuf.DoubleValue(); - if (object.value != null) - message.value = Number(object.value); + 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 a DoubleValue message. Also converts values to other types if specified. + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DoubleValue.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + 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 DoubleValue to JSON. + * Converts this UninterpretedOption to JSON. * @function toJSON - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.UninterpretedOption * @instance * @returns {Object.} JSON object */ - DoubleValue.prototype.toJSON = function toJSON() { + UninterpretedOption.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DoubleValue + * Gets the default type url for UninterpretedOption * @function getTypeUrl - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.UninterpretedOption * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.DoubleValue"; + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; }; - return DoubleValue; + 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.FloatValue = (function() { + protobuf.FeatureSet = (function() { /** - * Properties of a FloatValue. + * Properties of a FeatureSet. * @memberof google.protobuf - * @interface IFloatValue - * @property {number|null} [value] FloatValue value + * @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 FloatValue. + * Constructs a new FeatureSet. * @memberof google.protobuf - * @classdesc Represents a FloatValue. - * @implements IFloatValue + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet * @constructor - * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set */ - function FloatValue(properties) { + function FeatureSet(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54048,75 +47666,145 @@ } /** - * FloatValue value. - * @member {number} value - * @memberof google.protobuf.FloatValue + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet * @instance */ - FloatValue.prototype.value = 0; + FeatureSet.prototype.fieldPresence = 0; /** - * Creates a new FloatValue instance using the specified properties. + * 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.FloatValue + * @memberof google.protobuf.FeatureSet * @static - * @param {google.protobuf.IFloatValue=} [properties] Properties to set - * @returns {google.protobuf.FloatValue} FloatValue instance + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance */ - FloatValue.create = function create(properties) { - return new FloatValue(properties); + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); }; /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. * @function encode - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.FeatureSet * @static - * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FloatValue.encode = function encode(message, writer) { + FeatureSet.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); + 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 FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.FeatureSet * @static - * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FloatValue.encodeDelimited = function encodeDelimited(message, writer) { + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FloatValue message from the specified reader or buffer. + * Decodes a FeatureSet message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FloatValue + * @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.FloatValue} FloatValue + * @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 */ - FloatValue.decode = function decode(reader, length) { + 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.FloatValue(); + 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.value = reader.float(); + 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: @@ -54128,339 +47816,413 @@ }; /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.FeatureSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FloatValue} FloatValue + * @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 */ - FloatValue.decodeDelimited = function decodeDelimited(reader) { + FeatureSet.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FloatValue message. + * Verifies a FeatureSet message. * @function verify - * @memberof google.protobuf.FloatValue + * @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 */ - FloatValue.verify = function verify(message) { + FeatureSet.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; + if (message.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 FloatValue message from a plain object. Also converts values to their respective internal types. + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.FeatureSet * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FloatValue} FloatValue + * @returns {google.protobuf.FeatureSet} FeatureSet */ - FloatValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FloatValue) + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) return object; - var message = new $root.google.protobuf.FloatValue(); - if (object.value != null) - message.value = Number(object.value); + 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 FloatValue message. Also converts values to other types if specified. + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.FeatureSet * @static - * @param {google.protobuf.FloatValue} message FloatValue + * @param {google.protobuf.FeatureSet} message FeatureSet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FloatValue.toObject = function toObject(message, options) { + FeatureSet.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + 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 FloatValue to JSON. + * Converts this FeatureSet to JSON. * @function toJSON - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.FeatureSet * @instance * @returns {Object.} JSON object */ - FloatValue.prototype.toJSON = function toJSON() { + FeatureSet.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FloatValue + * Gets the default type url for FeatureSet * @function getTypeUrl - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.FeatureSet * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FloatValue"; - }; - - return FloatValue; - })(); - - protobuf.Int64Value = (function() { - - /** - * Properties of an Int64Value. - * @memberof google.protobuf - * @interface IInt64Value - * @property {number|Long|null} [value] Int64Value value - */ - - /** - * Constructs a new Int64Value. - * @memberof google.protobuf - * @classdesc Represents an Int64Value. - * @implements IInt64Value - * @constructor - * @param {google.protobuf.IInt64Value=} [properties] Properties to set - */ - function Int64Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Int64Value value. - * @member {number|Long} value - * @memberof google.protobuf.Int64Value - * @instance - */ - Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new Int64Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value=} [properties] Properties to set - * @returns {google.protobuf.Int64Value} Int64Value instance - */ - Int64Value.create = function create(properties) { - return new Int64Value(properties); - }; - - /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int64Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); - return writer; - }; - - /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int64Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Int64Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Int64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Int64Value} Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int64Value.decode = function 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.Int64Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Int64Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Int64Value} Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int64Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); + return typeUrlPrefix + "/google.protobuf.FeatureSet"; }; /** - * Verifies an Int64Value message. - * @function verify - * @memberof google.protobuf.Int64Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * 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 */ - Int64Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; - return null; - }; + 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; + })(); /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int64Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int64Value} Int64Value + * 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 */ - Int64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int64Value) - return object; - var message = new $root.google.protobuf.Int64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = false; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); - return message; - }; + 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; + })(); /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.Int64Value} message Int64Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * 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 */ - Int64Value.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.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; - return object; - }; + 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; + })(); /** - * Converts this Int64Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int64Value - * @instance - * @returns {Object.} JSON object + * 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 */ - Int64Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + 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; + })(); /** - * Gets the default type url for Int64Value - * @function getTypeUrl - * @memberof google.protobuf.Int64Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * 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 */ - Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Int64Value"; - }; + 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; + })(); - return Int64Value; + /** + * 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.UInt64Value = (function() { + protobuf.FeatureSetDefaults = (function() { /** - * Properties of a UInt64Value. + * Properties of a FeatureSetDefaults. * @memberof google.protobuf - * @interface IUInt64Value - * @property {number|Long|null} [value] UInt64Value value + * @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 UInt64Value. + * Constructs a new FeatureSetDefaults. * @memberof google.protobuf - * @classdesc Represents a UInt64Value. - * @implements IUInt64Value + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults * @constructor - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set */ - function UInt64Value(properties) { + function FeatureSetDefaults(properties) { + this.defaults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54468,75 +48230,106 @@ } /** - * UInt64Value value. - * @member {number|Long} value - * @memberof google.protobuf.UInt64Value + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults * @instance */ - UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + FeatureSetDefaults.prototype.defaults = $util.emptyArray; /** - * Creates a new UInt64Value instance using the specified properties. + * 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.UInt64Value + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set - * @returns {google.protobuf.UInt64Value} UInt64Value instance + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance */ - UInt64Value.create = function create(properties) { - return new UInt64Value(properties); + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); }; /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. * @function encode - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UInt64Value.encode = function encode(message, writer) { + FeatureSetDefaults.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); + 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 UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UInt64Value message from the specified reader or buffer. + * Decodes a FeatureSetDefaults message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UInt64Value + * @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.UInt64Value} UInt64Value + * @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 */ - UInt64Value.decode = function decode(reader, length) { + 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.UInt64Value(); + 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: { - message.value = reader.uint64(); + 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: @@ -54548,339 +48341,582 @@ }; /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.FeatureSetDefaults * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UInt64Value} UInt64Value + * @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 */ - UInt64Value.decodeDelimited = function decodeDelimited(reader) { + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UInt64Value message. + * Verifies a FeatureSetDefaults message. * @function verify - * @memberof google.protobuf.UInt64Value + * @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 */ - UInt64Value.verify = function verify(message) { + FeatureSetDefaults.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long 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 UInt64Value message from a plain object. Also converts values to their respective internal types. + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.FeatureSetDefaults * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UInt64Value} UInt64Value + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults */ - UInt64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt64Value) + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) return object; - var message = new $root.google.protobuf.UInt64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = true; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UInt64Value - * @static - * @param {google.protobuf.UInt64Value} message UInt64Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UInt64Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; - return object; - }; - - /** - * Converts this UInt64Value to JSON. - * @function toJSON - * @memberof google.protobuf.UInt64Value - * @instance - * @returns {Object.} JSON object - */ - UInt64Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UInt64Value - * @function getTypeUrl - * @memberof google.protobuf.UInt64Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + 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]); + } } - return typeUrlPrefix + "/google.protobuf.UInt64Value"; - }; - - return UInt64Value; - })(); - - protobuf.Int32Value = (function() { - - /** - * Properties of an Int32Value. - * @memberof google.protobuf - * @interface IInt32Value - * @property {number|null} [value] Int32Value value - */ - - /** - * Constructs a new Int32Value. - * @memberof google.protobuf - * @classdesc Represents an Int32Value. - * @implements IInt32Value - * @constructor - * @param {google.protobuf.IInt32Value=} [properties] Properties to set - */ - function Int32Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Int32Value value. - * @member {number} value - * @memberof google.protobuf.Int32Value - * @instance - */ - Int32Value.prototype.value = 0; - - /** - * Creates a new Int32Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value=} [properties] Properties to set - * @returns {google.protobuf.Int32Value} Int32Value instance - */ - Int32Value.create = function create(properties) { - return new Int32Value(properties); - }; - - /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int32Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); - return writer; - }; - - /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Int32Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Int32Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Int32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Int32Value} Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int32Value.decode = function 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.Int32Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); + 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; }; /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Int32Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Int32Value} Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Int32Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Int32Value message. - * @function verify - * @memberof google.protobuf.Int32Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Int32Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer expected"; - return null; - }; - - /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int32Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int32Value} Int32Value - */ - Int32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int32Value) - return object; - var message = new $root.google.protobuf.Int32Value(); - if (object.value != null) - message.value = object.value | 0; - return message; - }; - - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Int32Value + * @memberof google.protobuf.FeatureSetDefaults * @static - * @param {google.protobuf.Int32Value} message Int32Value + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Int32Value.toObject = function toObject(message, options) { + FeatureSetDefaults.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; + 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 Int32Value to JSON. + * Converts this FeatureSetDefaults to JSON. * @function toJSON - * @memberof google.protobuf.Int32Value + * @memberof google.protobuf.FeatureSetDefaults * @instance * @returns {Object.} JSON object */ - Int32Value.prototype.toJSON = function toJSON() { + FeatureSetDefaults.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Int32Value + * Gets the default type url for FeatureSetDefaults * @function getTypeUrl - * @memberof google.protobuf.Int32Value + * @memberof google.protobuf.FeatureSetDefaults * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Int32Value"; + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; }; - return Int32Value; + 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.UInt32Value = (function() { + protobuf.SourceCodeInfo = (function() { /** - * Properties of a UInt32Value. + * Properties of a SourceCodeInfo. * @memberof google.protobuf - * @interface IUInt32Value - * @property {number|null} [value] UInt32Value value + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location */ /** - * Constructs a new UInt32Value. + * Constructs a new SourceCodeInfo. * @memberof google.protobuf - * @classdesc Represents a UInt32Value. - * @implements IUInt32Value + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo * @constructor - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set */ - function UInt32Value(properties) { + function SourceCodeInfo(properties) { + this.location = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54888,75 +48924,78 @@ } /** - * UInt32Value value. - * @member {number} value - * @memberof google.protobuf.UInt32Value + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo * @instance */ - UInt32Value.prototype.value = 0; + SourceCodeInfo.prototype.location = $util.emptyArray; /** - * Creates a new UInt32Value instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @function create - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set - * @returns {google.protobuf.UInt32Value} UInt32Value instance + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance */ - UInt32Value.create = function create(properties) { - return new UInt32Value(properties); + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); }; /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UInt32Value.encode = function encode(message, writer) { + SourceCodeInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); + 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 UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a UInt32Value message from the specified reader or buffer. + * Decodes a SourceCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.UInt32Value + * @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.UInt32Value} UInt32Value + * @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 */ - UInt32Value.decode = function decode(reader, length) { + 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.UInt32Value(); + 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: { - message.value = reader.uint32(); + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); break; } default: @@ -54968,122 +49007,502 @@ }; /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.SourceCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UInt32Value} UInt32Value + * @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 */ - UInt32Value.decodeDelimited = function decodeDelimited(reader) { + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a UInt32Value message. + * Verifies a SourceCodeInfo message. * @function verify - * @memberof google.protobuf.UInt32Value + * @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 */ - UInt32Value.verify = function verify(message) { + SourceCodeInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value)) - return "value: integer 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 UInt32Value message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UInt32Value} UInt32Value + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - UInt32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt32Value) + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; - var message = new $root.google.protobuf.UInt32Value(); - if (object.value != null) - message.value = object.value >>> 0; + 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 UInt32Value message. Also converts values to other types if specified. + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UInt32Value.toObject = function toObject(message, options) { + SourceCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; + 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 UInt32Value to JSON. + * Converts this SourceCodeInfo to JSON. * @function toJSON - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.SourceCodeInfo * @instance * @returns {Object.} JSON object */ - UInt32Value.prototype.toJSON = function toJSON() { + SourceCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UInt32Value + * Gets the default type url for SourceCodeInfo * @function getTypeUrl - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.SourceCodeInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.UInt32Value"; + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; }; - return UInt32Value; + 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.BoolValue = (function() { + protobuf.GeneratedCodeInfo = (function() { /** - * Properties of a BoolValue. + * Properties of a GeneratedCodeInfo. * @memberof google.protobuf - * @interface IBoolValue - * @property {boolean|null} [value] BoolValue value + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation */ /** - * Constructs a new BoolValue. + * Constructs a new GeneratedCodeInfo. * @memberof google.protobuf - * @classdesc Represents a BoolValue. - * @implements IBoolValue + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo * @constructor - * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set */ - function BoolValue(properties) { + function GeneratedCodeInfo(properties) { + this.annotation = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55091,75 +49510,78 @@ } /** - * BoolValue value. - * @member {boolean} value - * @memberof google.protobuf.BoolValue + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo * @instance */ - BoolValue.prototype.value = false; + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; /** - * Creates a new BoolValue instance using the specified properties. + * Creates a new GeneratedCodeInfo instance using the specified properties. * @function create - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.IBoolValue=} [properties] Properties to set - * @returns {google.protobuf.BoolValue} BoolValue instance + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance */ - BoolValue.create = function create(properties) { - return new BoolValue(properties); + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); }; /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encode - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoolValue.encode = function encode(message, writer) { + GeneratedCodeInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); + 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 BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoolValue.encodeDelimited = function encodeDelimited(message, writer) { + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BoolValue message from the specified reader or buffer. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.BoolValue + * @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.BoolValue} BoolValue + * @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 */ - BoolValue.decode = function decode(reader, length) { + 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.BoolValue(); + 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: { - message.value = reader.bool(); + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); break; } default: @@ -55171,122 +49593,501 @@ }; /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.BoolValue} BoolValue + * @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 */ - BoolValue.decodeDelimited = function decodeDelimited(reader) { + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BoolValue message. + * Verifies a GeneratedCodeInfo message. * @function verify - * @memberof google.protobuf.BoolValue + * @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 */ - BoolValue.verify = function verify(message) { + GeneratedCodeInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "boolean") - return "value: boolean 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 BoolValue message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.protobuf.BoolValue} BoolValue + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo */ - BoolValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BoolValue) + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) return object; - var message = new $root.google.protobuf.BoolValue(); - if (object.value != null) - message.value = Boolean(object.value); + 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 BoolValue message. Also converts values to other types if specified. + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.BoolValue} message BoolValue + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BoolValue.toObject = function toObject(message, options) { + GeneratedCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.value = false; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; + 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 BoolValue to JSON. + * Converts this GeneratedCodeInfo to JSON. * @function toJSON - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.GeneratedCodeInfo * @instance * @returns {Object.} JSON object */ - BoolValue.prototype.toJSON = function toJSON() { + GeneratedCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BoolValue + * Gets the default type url for GeneratedCodeInfo * @function getTypeUrl - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.BoolValue"; + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; }; - return BoolValue; + 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.StringValue = (function() { + protobuf.Duration = (function() { /** - * Properties of a StringValue. + * Properties of a Duration. * @memberof google.protobuf - * @interface IStringValue - * @property {string|null} [value] StringValue value + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos */ /** - * Constructs a new StringValue. + * Constructs a new Duration. * @memberof google.protobuf - * @classdesc Represents a StringValue. - * @implements IStringValue + * @classdesc Represents a Duration. + * @implements IDuration * @constructor - * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @param {google.protobuf.IDuration=} [properties] Properties to set */ - function StringValue(properties) { + function Duration(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55294,75 +50095,89 @@ } /** - * StringValue value. - * @member {string} value - * @memberof google.protobuf.StringValue + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration * @instance */ - StringValue.prototype.value = ""; + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new StringValue instance using the specified properties. + * 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.StringValue + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IStringValue=} [properties] Properties to set - * @returns {google.protobuf.StringValue} StringValue instance + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance */ - StringValue.create = function create(properties) { - return new StringValue(properties); + Duration.create = function create(properties) { + return new Duration(properties); }; /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encode - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StringValue.encode = function encode(message, writer) { + Duration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + 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 StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {google.protobuf.IDuration} message Duration message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - StringValue.encodeDelimited = function encodeDelimited(message, writer) { + Duration.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a StringValue message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.StringValue + * @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.StringValue} StringValue + * @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 */ - StringValue.decode = function decode(reader, length) { + 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.StringValue(); + 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.value = reader.string(); + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); break; } default: @@ -55374,122 +50189,146 @@ }; /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.Duration * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.StringValue} StringValue + * @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 */ - StringValue.decodeDelimited = function decodeDelimited(reader) { + Duration.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a StringValue message. + * Verifies a Duration message. * @function verify - * @memberof google.protobuf.StringValue + * @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 */ - StringValue.verify = function verify(message) { + Duration.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string 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 StringValue message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.Duration * @static * @param {Object.} object Plain object - * @returns {google.protobuf.StringValue} StringValue + * @returns {google.protobuf.Duration} Duration */ - StringValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.StringValue) + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) return object; - var message = new $root.google.protobuf.StringValue(); - if (object.value != null) - message.value = String(object.value); + 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 StringValue message. Also converts values to other types if specified. + * Creates a plain object from a Duration message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.StringValue} message StringValue + * @param {google.protobuf.Duration} message Duration * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StringValue.toObject = function toObject(message, options) { + Duration.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; + 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 StringValue to JSON. + * Converts this Duration to JSON. * @function toJSON - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.Duration * @instance * @returns {Object.} JSON object */ - StringValue.prototype.toJSON = function toJSON() { + Duration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for StringValue + * Gets the default type url for Duration * @function getTypeUrl - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.Duration * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.StringValue"; + return typeUrlPrefix + "/google.protobuf.Duration"; }; - return StringValue; + return Duration; })(); - protobuf.BytesValue = (function() { + protobuf.Timestamp = (function() { /** - * Properties of a BytesValue. + * Properties of a Timestamp. * @memberof google.protobuf - * @interface IBytesValue - * @property {Uint8Array|null} [value] BytesValue value + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos */ /** - * Constructs a new BytesValue. + * Constructs a new Timestamp. * @memberof google.protobuf - * @classdesc Represents a BytesValue. - * @implements IBytesValue + * @classdesc Represents a Timestamp. + * @implements ITimestamp * @constructor - * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ - function BytesValue(properties) { + function Timestamp(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55497,75 +50336,89 @@ } /** - * BytesValue value. - * @member {Uint8Array} value - * @memberof google.protobuf.BytesValue + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp * @instance */ - BytesValue.prototype.value = $util.newBuffer([]); + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a new BytesValue instance using the specified properties. + * 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.BytesValue + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IBytesValue=} [properties] Properties to set - * @returns {google.protobuf.BytesValue} BytesValue instance + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance */ - BytesValue.create = function create(properties) { - return new BytesValue(properties); + Timestamp.create = function create(properties) { + return new Timestamp(properties); }; /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encode - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BytesValue.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); + 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 BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BytesValue.encodeDelimited = function encodeDelimited(message, writer) { + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BytesValue message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.BytesValue + * @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.BytesValue} BytesValue + * @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 */ - BytesValue.decode = function decode(reader, length) { + 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.BytesValue(); + 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.value = reader.bytes(); + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); break; } default: @@ -55577,208 +50430,146 @@ }; /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.BytesValue} BytesValue + * @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 */ - BytesValue.decodeDelimited = function decodeDelimited(reader) { + Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BytesValue message. + * Verifies a Timestamp message. * @function verify - * @memberof google.protobuf.BytesValue + * @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 */ - BytesValue.verify = function verify(message) { + Timestamp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer 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 BytesValue message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.Timestamp * @static * @param {Object.} object Plain object - * @returns {google.protobuf.BytesValue} BytesValue + * @returns {google.protobuf.Timestamp} Timestamp */ - BytesValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BytesValue) + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; - var message = new $root.google.protobuf.BytesValue(); - 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; + 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 BytesValue message. Also converts values to other types if specified. + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.BytesValue} message BytesValue + * @param {google.protobuf.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BytesValue.toObject = function toObject(message, options) { + Timestamp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - 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; + 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 BytesValue to JSON. + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ - BytesValue.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BytesValue + * Gets the default type url for Timestamp * @function getTypeUrl - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.Timestamp * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.BytesValue"; + return typeUrlPrefix + "/google.protobuf.Timestamp"; }; - return BytesValue; - })(); - - return protobuf; - })(); - - google.type = (function() { - - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; - - /** - * DayOfWeek enum. - * @name google.type.DayOfWeek - * @enum {number} - * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value - * @property {number} MONDAY=1 MONDAY value - * @property {number} TUESDAY=2 TUESDAY value - * @property {number} WEDNESDAY=3 WEDNESDAY value - * @property {number} THURSDAY=4 THURSDAY value - * @property {number} FRIDAY=5 FRIDAY value - * @property {number} SATURDAY=6 SATURDAY value - * @property {number} SUNDAY=7 SUNDAY value - */ - type.DayOfWeek = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; - values[valuesById[1] = "MONDAY"] = 1; - values[valuesById[2] = "TUESDAY"] = 2; - values[valuesById[3] = "WEDNESDAY"] = 3; - values[valuesById[4] = "THURSDAY"] = 4; - values[valuesById[5] = "FRIDAY"] = 5; - values[valuesById[6] = "SATURDAY"] = 6; - values[valuesById[7] = "SUNDAY"] = 7; - return values; - })(); - - /** - * Month enum. - * @name google.type.Month - * @enum {number} - * @property {number} MONTH_UNSPECIFIED=0 MONTH_UNSPECIFIED value - * @property {number} JANUARY=1 JANUARY value - * @property {number} FEBRUARY=2 FEBRUARY value - * @property {number} MARCH=3 MARCH value - * @property {number} APRIL=4 APRIL value - * @property {number} MAY=5 MAY value - * @property {number} JUNE=6 JUNE value - * @property {number} JULY=7 JULY value - * @property {number} AUGUST=8 AUGUST value - * @property {number} SEPTEMBER=9 SEPTEMBER value - * @property {number} OCTOBER=10 OCTOBER value - * @property {number} NOVEMBER=11 NOVEMBER value - * @property {number} DECEMBER=12 DECEMBER value - */ - type.Month = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MONTH_UNSPECIFIED"] = 0; - values[valuesById[1] = "JANUARY"] = 1; - values[valuesById[2] = "FEBRUARY"] = 2; - values[valuesById[3] = "MARCH"] = 3; - values[valuesById[4] = "APRIL"] = 4; - values[valuesById[5] = "MAY"] = 5; - values[valuesById[6] = "JUNE"] = 6; - values[valuesById[7] = "JULY"] = 7; - values[valuesById[8] = "AUGUST"] = 8; - values[valuesById[9] = "SEPTEMBER"] = 9; - values[valuesById[10] = "OCTOBER"] = 10; - values[valuesById[11] = "NOVEMBER"] = 11; - values[valuesById[12] = "DECEMBER"] = 12; - return values; + return Timestamp; })(); - type.Expr = (function() { + protobuf.Any = (function() { /** - * Properties of an Expr. - * @memberof google.type - * @interface IExpr - * @property {string|null} [expression] Expr expression - * @property {string|null} [title] Expr title - * @property {string|null} [description] Expr description - * @property {string|null} [location] Expr location + * 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 Expr. - * @memberof google.type - * @classdesc Represents an Expr. - * @implements IExpr + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny * @constructor - * @param {google.type.IExpr=} [properties] Properties to set + * @param {google.protobuf.IAny=} [properties] Properties to set */ - function Expr(properties) { + function Any(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55786,117 +50577,89 @@ } /** - * Expr expression. - * @member {string} expression - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.expression = ""; - - /** - * Expr title. - * @member {string} title - * @memberof google.type.Expr - * @instance - */ - Expr.prototype.title = ""; - - /** - * Expr description. - * @member {string} description - * @memberof google.type.Expr + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any * @instance */ - Expr.prototype.description = ""; + Any.prototype.type_url = ""; /** - * Expr location. - * @member {string} location - * @memberof google.type.Expr + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any * @instance */ - Expr.prototype.location = ""; + Any.prototype.value = $util.newBuffer([]); /** - * Creates a new Expr instance using the specified properties. + * Creates a new Any instance using the specified properties. * @function create - * @memberof google.type.Expr + * @memberof google.protobuf.Any * @static - * @param {google.type.IExpr=} [properties] Properties to set - * @returns {google.type.Expr} Expr instance + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance */ - Expr.create = function create(properties) { - return new Expr(properties); + Any.create = function create(properties) { + return new Any(properties); }; /** - * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encode - * @memberof google.type.Expr + * @memberof google.protobuf.Any * @static - * @param {google.type.IExpr} message Expr message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Expr.encode = function encode(message, writer) { + Any.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); + 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 Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encodeDelimited - * @memberof google.type.Expr + * @memberof google.protobuf.Any * @static - * @param {google.type.IExpr} message Expr message or plain object to encode + * @param {google.protobuf.IAny} message Any message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Expr.encodeDelimited = function encodeDelimited(message, writer) { + Any.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Expr message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @function decode - * @memberof google.type.Expr + * @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.type.Expr} Expr + * @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 */ - Expr.decode = function decode(reader, length) { + 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.type.Expr(); + 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.expression = reader.string(); + message.type_url = reader.string(); break; } case 2: { - message.title = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 4: { - message.location = reader.string(); + message.value = reader.bytes(); break; } default: @@ -55908,162 +50671,141 @@ }; /** - * Decodes an Expr message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.type.Expr + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.Expr} Expr + * @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 */ - Expr.decodeDelimited = function decodeDelimited(reader) { + Any.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Expr message. + * Verifies an Any message. * @function verify - * @memberof google.type.Expr + * @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 */ - Expr.verify = function verify(message) { + Any.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.expression != null && message.hasOwnProperty("expression")) - if (!$util.isString(message.expression)) - return "expression: string expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string 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 Expr message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.type.Expr + * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object - * @returns {google.type.Expr} Expr + * @returns {google.protobuf.Any} Any */ - Expr.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.Expr) + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) return object; - var message = new $root.google.type.Expr(); - if (object.expression != null) - message.expression = String(object.expression); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.location != null) - message.location = String(object.location); + 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 Expr message. Also converts values to other types if specified. + * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject - * @memberof google.type.Expr + * @memberof google.protobuf.Any * @static - * @param {google.type.Expr} message Expr + * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Expr.toObject = function toObject(message, options) { + Any.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.expression = ""; - object.title = ""; - object.description = ""; - object.location = ""; - } - if (message.expression != null && message.hasOwnProperty("expression")) - object.expression = message.expression; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; + 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 Expr to JSON. + * Converts this Any to JSON. * @function toJSON - * @memberof google.type.Expr + * @memberof google.protobuf.Any * @instance * @returns {Object.} JSON object */ - Expr.prototype.toJSON = function toJSON() { + Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Expr + * Gets the default type url for Any * @function getTypeUrl - * @memberof google.type.Expr + * @memberof google.protobuf.Any * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Expr.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.type.Expr"; + return typeUrlPrefix + "/google.protobuf.Any"; }; - return Expr; + return Any; })(); - return type; - })(); - - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - rpc.Status = (function() { + protobuf.FieldMask = (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 + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths */ /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set + * @param {google.protobuf.IFieldMask=} [properties] Properties to set */ - function Status(properties) { - this.details = []; + function FieldMask(properties) { + this.paths = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56071,106 +50813,78 @@ } /** - * 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 + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask * @instance */ - Status.prototype.details = $util.emptyArray; + FieldMask.prototype.paths = $util.emptyArray; /** - * Creates a new Status instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @function create - * @memberof google.rpc.Status + * @memberof google.protobuf.FieldMask * @static - * @param {google.rpc.IStatus=} [properties] Properties to set - * @returns {google.rpc.Status} Status instance + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance */ - Status.create = function create(properties) { - return new Status(properties); + FieldMask.create = function create(properties) { + return new FieldMask(properties); }; /** - * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encode - * @memberof google.rpc.Status + * @memberof google.protobuf.FieldMask * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Status.encode = function encode(message, writer) { + FieldMask.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(); + 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 Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encodeDelimited - * @memberof google.rpc.Status + * @memberof google.protobuf.FieldMask * @static - * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Status.encodeDelimited = function encodeDelimited(message, writer) { + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Status message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @function decode - * @memberof google.rpc.Status + * @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.rpc.Status} Status + * @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 */ - Status.decode = function decode(reader, length) { + 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.rpc.Status(); + 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: { - 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())); + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); break; } default: @@ -56182,3491 +50896,2514 @@ }; /** - * Decodes a Status message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.rpc.Status + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Status} Status + * @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 */ - Status.decodeDelimited = function decodeDelimited(reader) { + FieldMask.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Status message. + * Verifies a FieldMask message. * @function verify - * @memberof google.rpc.Status + * @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 */ - Status.verify = function verify(message) { + FieldMask.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; - } + 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 Status message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.rpc.Status + * @memberof google.protobuf.FieldMask * @static * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status + * @returns {google.protobuf.FieldMask} FieldMask */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) 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]); - } + 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 Status message. Also converts values to other types if specified. + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. * @function toObject - * @memberof google.rpc.Status + * @memberof google.protobuf.FieldMask * @static - * @param {google.rpc.Status} message Status + * @param {google.protobuf.FieldMask} message FieldMask * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Status.toObject = function toObject(message, options) { + FieldMask.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); + 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 Status to JSON. + * Converts this FieldMask to JSON. * @function toJSON - * @memberof google.rpc.Status + * @memberof google.protobuf.FieldMask * @instance * @returns {Object.} JSON object */ - Status.prototype.toJSON = function toJSON() { + FieldMask.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Status + * Gets the default type url for FieldMask * @function getTypeUrl - * @memberof google.rpc.Status + * @memberof google.protobuf.FieldMask * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.rpc.Status"; + return typeUrlPrefix + "/google.protobuf.FieldMask"; }; - return Status; + return FieldMask; })(); - return rpc; - })(); - - google.iam = (function() { - - /** - * Namespace iam. - * @memberof google - * @namespace - */ - var iam = {}; - - iam.v1 = (function() { + protobuf.Empty = (function() { /** - * Namespace v1. - * @memberof google.iam - * @namespace + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty */ - var v1 = {}; - - v1.IAMPolicy = (function() { - - /** - * Constructs a new IAMPolicy service. - * @memberof google.iam.v1 - * @classdesc Represents a IAMPolicy - * @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 IAMPolicy(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (IAMPolicy.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = IAMPolicy; - - /** - * Creates new IAMPolicy service using the specified rpc implementation. - * @function create - * @memberof google.iam.v1.IAMPolicy - * @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 {IAMPolicy} RPC service. Useful where requests and/or responses are streamed. - */ - IAMPolicy.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|setIamPolicy}. - * @memberof google.iam.v1.IAMPolicy - * @typedef SetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @param {google.iam.v1.IAMPolicy.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IAMPolicy.prototype.setIamPolicy = function setIamPolicy(request, callback) { - return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "SetIamPolicy" }); - - /** - * Calls SetIamPolicy. - * @function setIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|getIamPolicy}. - * @memberof google.iam.v1.IAMPolicy - * @typedef GetIamPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.Policy} [response] Policy - */ - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @param {google.iam.v1.IAMPolicy.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IAMPolicy.prototype.getIamPolicy = function getIamPolicy(request, callback) { - return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); - }, "name", { value: "GetIamPolicy" }); - - /** - * Calls GetIamPolicy. - * @function getIamPolicy - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.iam.v1.IAMPolicy|testIamPermissions}. - * @memberof google.iam.v1.IAMPolicy - * @typedef TestIamPermissionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse - */ - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @param {google.iam.v1.IAMPolicy.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(IAMPolicy.prototype.testIamPermissions = function testIamPermissions(request, callback) { - return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); - }, "name", { value: "TestIamPermissions" }); - - /** - * Calls TestIamPermissions. - * @function testIamPermissions - * @memberof google.iam.v1.IAMPolicy - * @instance - * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return IAMPolicy; - })(); - - v1.SetIamPolicyRequest = (function() { - - /** - * Properties of a SetIamPolicyRequest. - * @memberof google.iam.v1 - * @interface ISetIamPolicyRequest - * @property {string|null} [resource] SetIamPolicyRequest resource - * @property {google.iam.v1.IPolicy|null} [policy] SetIamPolicyRequest policy - * @property {google.protobuf.IFieldMask|null} [updateMask] SetIamPolicyRequest updateMask - */ - - /** - * Constructs a new SetIamPolicyRequest. - * @memberof google.iam.v1 - * @classdesc Represents a SetIamPolicyRequest. - * @implements ISetIamPolicyRequest - * @constructor - * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set - */ - function SetIamPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SetIamPolicyRequest resource. - * @member {string} resource - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - */ - SetIamPolicyRequest.prototype.resource = ""; - - /** - * SetIamPolicyRequest policy. - * @member {google.iam.v1.IPolicy|null|undefined} policy - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - */ - SetIamPolicyRequest.prototype.policy = null; - - /** - * SetIamPolicyRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - */ - SetIamPolicyRequest.prototype.updateMask = null; - - /** - * Creates a new SetIamPolicyRequest instance using the specified properties. - * @function create - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.ISetIamPolicyRequest=} [properties] Properties to set - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest instance - */ - SetIamPolicyRequest.create = function create(properties) { - return new SetIamPolicyRequest(properties); - }; - - /** - * Encodes the specified SetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetIamPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) - $root.google.iam.v1.Policy.encode(message.policy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.SetIamPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.ISetIamPolicyRequest} message SetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetIamPolicyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.SetIamPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - message.policy = $root.google.iam.v1.Policy.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SetIamPolicyRequest message. - * @function verify - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SetIamPolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.policy != null && message.hasOwnProperty("policy")) { - var error = $root.google.iam.v1.Policy.verify(message.policy); - if (error) - return "policy." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - return null; - }; - - /** - * Creates a SetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.SetIamPolicyRequest} SetIamPolicyRequest - */ - SetIamPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.SetIamPolicyRequest) - return object; - var message = new $root.google.iam.v1.SetIamPolicyRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.policy != null) { - if (typeof object.policy !== "object") - throw TypeError(".google.iam.v1.SetIamPolicyRequest.policy: object expected"); - message.policy = $root.google.iam.v1.Policy.fromObject(object.policy); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.iam.v1.SetIamPolicyRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from a SetIamPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {google.iam.v1.SetIamPolicyRequest} message SetIamPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SetIamPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resource = ""; - object.policy = null; - object.updateMask = null; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.policy != null && message.hasOwnProperty("policy")) - object.policy = $root.google.iam.v1.Policy.toObject(message.policy, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this SetIamPolicyRequest to JSON. - * @function toJSON - * @memberof google.iam.v1.SetIamPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - SetIamPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SetIamPolicyRequest - * @function getTypeUrl - * @memberof google.iam.v1.SetIamPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.SetIamPolicyRequest"; - }; - - return SetIamPolicyRequest; - })(); - - v1.GetIamPolicyRequest = (function() { - - /** - * Properties of a GetIamPolicyRequest. - * @memberof google.iam.v1 - * @interface IGetIamPolicyRequest - * @property {string|null} [resource] GetIamPolicyRequest resource - * @property {google.iam.v1.IGetPolicyOptions|null} [options] GetIamPolicyRequest options - */ - - /** - * Constructs a new GetIamPolicyRequest. - * @memberof google.iam.v1 - * @classdesc Represents a GetIamPolicyRequest. - * @implements IGetIamPolicyRequest - * @constructor - * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set - */ - function GetIamPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetIamPolicyRequest resource. - * @member {string} resource - * @memberof google.iam.v1.GetIamPolicyRequest - * @instance - */ - GetIamPolicyRequest.prototype.resource = ""; - - /** - * GetIamPolicyRequest options. - * @member {google.iam.v1.IGetPolicyOptions|null|undefined} options - * @memberof google.iam.v1.GetIamPolicyRequest - * @instance - */ - GetIamPolicyRequest.prototype.options = null; - - /** - * Creates a new GetIamPolicyRequest instance using the specified properties. - * @function create - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.IGetIamPolicyRequest=} [properties] Properties to set - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest instance - */ - GetIamPolicyRequest.create = function create(properties) { - return new GetIamPolicyRequest(properties); - }; - /** - * Encodes the specified GetIamPolicyRequest message. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetIamPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.iam.v1.GetPolicyOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * 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]]; + } - /** - * Encodes the specified GetIamPolicyRequest message, length delimited. Does not implicitly {@link google.iam.v1.GetIamPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.IGetIamPolicyRequest} message GetIamPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetIamPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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); + }; - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetIamPolicyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetIamPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - message.options = $root.google.iam.v1.GetPolicyOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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; + }; - /** - * Decodes a GetIamPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetIamPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * 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(); + }; - /** - * Verifies a GetIamPolicyRequest message. - * @function verify - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetIamPolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.iam.v1.GetPolicyOptions.verify(message.options); - if (error) - return "options." + error; + /** + * 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 null; - }; + } + return message; + }; - /** - * Creates a GetIamPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.GetIamPolicyRequest} GetIamPolicyRequest - */ - GetIamPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.GetIamPolicyRequest) - return object; - var message = new $root.google.iam.v1.GetIamPolicyRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.iam.v1.GetIamPolicyRequest.options: object expected"); - message.options = $root.google.iam.v1.GetPolicyOptions.fromObject(object.options); - } - 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()); + }; - /** - * Creates a plain object from a GetIamPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {google.iam.v1.GetIamPolicyRequest} message GetIamPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetIamPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resource = ""; - object.options = null; - } - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.iam.v1.GetPolicyOptions.toObject(message.options, options); + /** + * 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(); + }; - /** - * Converts this GetIamPolicyRequest to JSON. - * @function toJSON - * @memberof google.iam.v1.GetIamPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - GetIamPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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 {}; + }; - /** - * Gets the default type url for GetIamPolicyRequest - * @function getTypeUrl - * @memberof google.iam.v1.GetIamPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetIamPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.GetIamPolicyRequest"; - }; + /** + * 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); + }; - return GetIamPolicyRequest; - })(); + /** + * 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"; + }; - v1.TestIamPermissionsRequest = (function() { + return Empty; + })(); - /** - * Properties of a TestIamPermissionsRequest. - * @memberof google.iam.v1 - * @interface ITestIamPermissionsRequest - * @property {string|null} [resource] TestIamPermissionsRequest resource - * @property {Array.|null} [permissions] TestIamPermissionsRequest permissions - */ + protobuf.DoubleValue = (function() { - /** - * Constructs a new TestIamPermissionsRequest. - * @memberof google.iam.v1 - * @classdesc Represents a TestIamPermissionsRequest. - * @implements ITestIamPermissionsRequest - * @constructor - * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set - */ - function TestIamPermissionsRequest(properties) { - this.permissions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a DoubleValue. + * @memberof google.protobuf + * @interface IDoubleValue + * @property {number|null} [value] DoubleValue value + */ - /** - * TestIamPermissionsRequest resource. - * @member {string} resource - * @memberof google.iam.v1.TestIamPermissionsRequest - * @instance - */ - TestIamPermissionsRequest.prototype.resource = ""; + /** + * Constructs a new DoubleValue. + * @memberof google.protobuf + * @classdesc Represents a DoubleValue. + * @implements IDoubleValue + * @constructor + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + */ + function DoubleValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * TestIamPermissionsRequest permissions. - * @member {Array.} permissions - * @memberof google.iam.v1.TestIamPermissionsRequest - * @instance - */ - TestIamPermissionsRequest.prototype.permissions = $util.emptyArray; + /** + * DoubleValue value. + * @member {number} value + * @memberof google.protobuf.DoubleValue + * @instance + */ + DoubleValue.prototype.value = 0; - /** - * Creates a new TestIamPermissionsRequest instance using the specified properties. - * @function create - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.ITestIamPermissionsRequest=} [properties] Properties to set - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest instance - */ - TestIamPermissionsRequest.create = function create(properties) { - return new TestIamPermissionsRequest(properties); - }; + /** + * Creates a new DoubleValue instance using the specified properties. + * @function create + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * @returns {google.protobuf.DoubleValue} DoubleValue instance + */ + DoubleValue.create = function create(properties) { + return new DoubleValue(properties); + }; - /** - * Encodes the specified TestIamPermissionsRequest message. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); - if (message.permissions != null && message.permissions.length) - for (var i = 0; i < message.permissions.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.permissions[i]); - return writer; - }; + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + return writer; + }; - /** - * Encodes the specified TestIamPermissionsRequest message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.ITestIamPermissionsRequest} message TestIamPermissionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.resource = reader.string(); - break; - } - case 2: { - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decode = function 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.DoubleValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.double(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a TestIamPermissionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a TestIamPermissionsRequest message. - * @function verify - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TestIamPermissionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - if (!Array.isArray(message.permissions)) - return "permissions: array expected"; - for (var i = 0; i < message.permissions.length; ++i) - if (!$util.isString(message.permissions[i])) - return "permissions: string[] expected"; - } - return null; - }; + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a TestIamPermissionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.TestIamPermissionsRequest} TestIamPermissionsRequest - */ - TestIamPermissionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.TestIamPermissionsRequest) - return object; - var message = new $root.google.iam.v1.TestIamPermissionsRequest(); - if (object.resource != null) - message.resource = String(object.resource); - if (object.permissions) { - if (!Array.isArray(object.permissions)) - throw TypeError(".google.iam.v1.TestIamPermissionsRequest.permissions: array expected"); - message.permissions = []; - for (var i = 0; i < object.permissions.length; ++i) - message.permissions[i] = String(object.permissions[i]); - } - return message; - }; + /** + * Verifies a DoubleValue message. + * @function verify + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DoubleValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; - /** - * Creates a plain object from a TestIamPermissionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {google.iam.v1.TestIamPermissionsRequest} message TestIamPermissionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TestIamPermissionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.permissions = []; - if (options.defaults) - object.resource = ""; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.permissions && message.permissions.length) { - object.permissions = []; - for (var j = 0; j < message.permissions.length; ++j) - object.permissions[j] = message.permissions[j]; - } + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DoubleValue} DoubleValue + */ + DoubleValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DoubleValue) return object; - }; + var message = new $root.google.protobuf.DoubleValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; - /** - * Converts this TestIamPermissionsRequest to JSON. - * @function toJSON - * @memberof google.iam.v1.TestIamPermissionsRequest - * @instance - * @returns {Object.} JSON object - */ - TestIamPermissionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DoubleValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; - /** - * Gets the default type url for TestIamPermissionsRequest - * @function getTypeUrl - * @memberof google.iam.v1.TestIamPermissionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TestIamPermissionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsRequest"; - }; + /** + * Converts this DoubleValue to JSON. + * @function toJSON + * @memberof google.protobuf.DoubleValue + * @instance + * @returns {Object.} JSON object + */ + DoubleValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return TestIamPermissionsRequest; - })(); + /** + * Gets the default type url for DoubleValue + * @function getTypeUrl + * @memberof google.protobuf.DoubleValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DoubleValue"; + }; - v1.TestIamPermissionsResponse = (function() { + return DoubleValue; + })(); - /** - * Properties of a TestIamPermissionsResponse. - * @memberof google.iam.v1 - * @interface ITestIamPermissionsResponse - * @property {Array.|null} [permissions] TestIamPermissionsResponse permissions - */ + protobuf.FloatValue = (function() { + + /** + * Properties of a FloatValue. + * @memberof google.protobuf + * @interface IFloatValue + * @property {number|null} [value] FloatValue value + */ - /** - * Constructs a new TestIamPermissionsResponse. - * @memberof google.iam.v1 - * @classdesc Represents a TestIamPermissionsResponse. - * @implements ITestIamPermissionsResponse - * @constructor - * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set - */ - function TestIamPermissionsResponse(properties) { - this.permissions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new FloatValue. + * @memberof google.protobuf + * @classdesc Represents a FloatValue. + * @implements IFloatValue + * @constructor + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + */ + function FloatValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * TestIamPermissionsResponse permissions. - * @member {Array.} permissions - * @memberof google.iam.v1.TestIamPermissionsResponse - * @instance - */ - TestIamPermissionsResponse.prototype.permissions = $util.emptyArray; + /** + * FloatValue value. + * @member {number} value + * @memberof google.protobuf.FloatValue + * @instance + */ + FloatValue.prototype.value = 0; - /** - * Creates a new TestIamPermissionsResponse instance using the specified properties. - * @function create - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.ITestIamPermissionsResponse=} [properties] Properties to set - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse instance - */ - TestIamPermissionsResponse.create = function create(properties) { - return new TestIamPermissionsResponse(properties); - }; + /** + * Creates a new FloatValue instance using the specified properties. + * @function create + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @returns {google.protobuf.FloatValue} FloatValue instance + */ + FloatValue.create = function create(properties) { + return new FloatValue(properties); + }; - /** - * Encodes the specified TestIamPermissionsResponse message. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.permissions != null && message.permissions.length) - for (var i = 0; i < message.permissions.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.permissions[i]); - return writer; - }; + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); + return writer; + }; - /** - * Encodes the specified TestIamPermissionsResponse message, length delimited. Does not implicitly {@link google.iam.v1.TestIamPermissionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.ITestIamPermissionsResponse} message TestIamPermissionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TestIamPermissionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.TestIamPermissionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decode = function 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.FloatValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.float(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a TestIamPermissionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TestIamPermissionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a TestIamPermissionsResponse message. - * @function verify - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TestIamPermissionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - if (!Array.isArray(message.permissions)) - return "permissions: array expected"; - for (var i = 0; i < message.permissions.length; ++i) - if (!$util.isString(message.permissions[i])) - return "permissions: string[] expected"; - } - return null; - }; + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a TestIamPermissionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.TestIamPermissionsResponse} TestIamPermissionsResponse - */ - TestIamPermissionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.TestIamPermissionsResponse) - return object; - var message = new $root.google.iam.v1.TestIamPermissionsResponse(); - if (object.permissions) { - if (!Array.isArray(object.permissions)) - throw TypeError(".google.iam.v1.TestIamPermissionsResponse.permissions: array expected"); - message.permissions = []; - for (var i = 0; i < object.permissions.length; ++i) - message.permissions[i] = String(object.permissions[i]); - } - return message; - }; + /** + * Verifies a FloatValue message. + * @function verify + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FloatValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; - /** - * Creates a plain object from a TestIamPermissionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {google.iam.v1.TestIamPermissionsResponse} message TestIamPermissionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TestIamPermissionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.permissions = []; - if (message.permissions && message.permissions.length) { - object.permissions = []; - for (var j = 0; j < message.permissions.length; ++j) - object.permissions[j] = message.permissions[j]; - } + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FloatValue} FloatValue + */ + FloatValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FloatValue) return object; - }; + var message = new $root.google.protobuf.FloatValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; - /** - * Converts this TestIamPermissionsResponse to JSON. - * @function toJSON - * @memberof google.iam.v1.TestIamPermissionsResponse - * @instance - * @returns {Object.} JSON object - */ - TestIamPermissionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.FloatValue} message FloatValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FloatValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; - /** - * Gets the default type url for TestIamPermissionsResponse - * @function getTypeUrl - * @memberof google.iam.v1.TestIamPermissionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TestIamPermissionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.TestIamPermissionsResponse"; - }; + /** + * Converts this FloatValue to JSON. + * @function toJSON + * @memberof google.protobuf.FloatValue + * @instance + * @returns {Object.} JSON object + */ + FloatValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return TestIamPermissionsResponse; - })(); + /** + * Gets the default type url for FloatValue + * @function getTypeUrl + * @memberof google.protobuf.FloatValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FloatValue"; + }; - v1.GetPolicyOptions = (function() { + return FloatValue; + })(); - /** - * Properties of a GetPolicyOptions. - * @memberof google.iam.v1 - * @interface IGetPolicyOptions - * @property {number|null} [requestedPolicyVersion] GetPolicyOptions requestedPolicyVersion - */ + protobuf.Int64Value = (function() { - /** - * Constructs a new GetPolicyOptions. - * @memberof google.iam.v1 - * @classdesc Represents a GetPolicyOptions. - * @implements IGetPolicyOptions - * @constructor - * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set - */ - function GetPolicyOptions(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of an Int64Value. + * @memberof google.protobuf + * @interface IInt64Value + * @property {number|Long|null} [value] Int64Value value + */ - /** - * GetPolicyOptions requestedPolicyVersion. - * @member {number} requestedPolicyVersion - * @memberof google.iam.v1.GetPolicyOptions - * @instance - */ - GetPolicyOptions.prototype.requestedPolicyVersion = 0; + /** + * Constructs a new Int64Value. + * @memberof google.protobuf + * @classdesc Represents an Int64Value. + * @implements IInt64Value + * @constructor + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + */ + function Int64Value(properties) { + if (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 GetPolicyOptions instance using the specified properties. - * @function create - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.IGetPolicyOptions=} [properties] Properties to set - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions instance - */ - GetPolicyOptions.create = function create(properties) { - return new GetPolicyOptions(properties); - }; + /** + * Int64Value value. + * @member {number|Long} value + * @memberof google.protobuf.Int64Value + * @instance + */ + Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Encodes the specified GetPolicyOptions message. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPolicyOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.requestedPolicyVersion != null && Object.hasOwnProperty.call(message, "requestedPolicyVersion")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.requestedPolicyVersion); - return writer; - }; + /** + * Creates a new Int64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + * @returns {google.protobuf.Int64Value} Int64Value instance + */ + Int64Value.create = function create(properties) { + return new Int64Value(properties); + }; - /** - * Encodes the specified GetPolicyOptions message, length delimited. Does not implicitly {@link google.iam.v1.GetPolicyOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.IGetPolicyOptions} message GetPolicyOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetPolicyOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); + return writer; + }; - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPolicyOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.GetPolicyOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.requestedPolicyVersion = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decode = function 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.Int64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int64(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a GetPolicyOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetPolicyOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetPolicyOptions message. - * @function verify - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetPolicyOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) - if (!$util.isInteger(message.requestedPolicyVersion)) - return "requestedPolicyVersion: integer expected"; - return null; - }; - - /** - * Creates a GetPolicyOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.GetPolicyOptions} GetPolicyOptions - */ - GetPolicyOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.GetPolicyOptions) - return object; - var message = new $root.google.iam.v1.GetPolicyOptions(); - if (object.requestedPolicyVersion != null) - message.requestedPolicyVersion = object.requestedPolicyVersion | 0; - return message; - }; - - /** - * Creates a plain object from a GetPolicyOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {google.iam.v1.GetPolicyOptions} message GetPolicyOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetPolicyOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.requestedPolicyVersion = 0; - if (message.requestedPolicyVersion != null && message.hasOwnProperty("requestedPolicyVersion")) - object.requestedPolicyVersion = message.requestedPolicyVersion; - return object; - }; - - /** - * Converts this GetPolicyOptions to JSON. - * @function toJSON - * @memberof google.iam.v1.GetPolicyOptions - * @instance - * @returns {Object.} JSON object - */ - GetPolicyOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + } + return message; + }; - /** - * Gets the default type url for GetPolicyOptions - * @function getTypeUrl - * @memberof google.iam.v1.GetPolicyOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetPolicyOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.GetPolicyOptions"; - }; + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - return GetPolicyOptions; - })(); + /** + * Verifies an Int64Value message. + * @function verify + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; - v1.Policy = (function() { + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int64Value} Int64Value + */ + Int64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int64Value) + return object; + var message = new $root.google.protobuf.Int64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + return message; + }; - /** - * Properties of a Policy. - * @memberof google.iam.v1 - * @interface IPolicy - * @property {number|null} [version] Policy version - * @property {Array.|null} [bindings] Policy bindings - * @property {Array.|null} [auditConfigs] Policy auditConfigs - * @property {Uint8Array|null} [etag] Policy etag - */ + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.Int64Value} message Int64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int64Value.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.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + return object; + }; - /** - * Constructs a new Policy. - * @memberof google.iam.v1 - * @classdesc Represents a Policy. - * @implements IPolicy - * @constructor - * @param {google.iam.v1.IPolicy=} [properties] Properties to set - */ - function Policy(properties) { - this.bindings = []; - this.auditConfigs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Converts this Int64Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int64Value + * @instance + * @returns {Object.} JSON object + */ + Int64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int64Value + * @function getTypeUrl + * @memberof google.protobuf.Int64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.protobuf.Int64Value"; + }; - /** - * Policy version. - * @member {number} version - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.version = 0; + return Int64Value; + })(); - /** - * Policy bindings. - * @member {Array.} bindings - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.bindings = $util.emptyArray; + protobuf.UInt64Value = (function() { - /** - * Policy auditConfigs. - * @member {Array.} auditConfigs - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.auditConfigs = $util.emptyArray; + /** + * Properties of a UInt64Value. + * @memberof google.protobuf + * @interface IUInt64Value + * @property {number|Long|null} [value] UInt64Value value + */ - /** - * Policy etag. - * @member {Uint8Array} etag - * @memberof google.iam.v1.Policy - * @instance - */ - Policy.prototype.etag = $util.newBuffer([]); + /** + * Constructs a new UInt64Value. + * @memberof google.protobuf + * @classdesc Represents a UInt64Value. + * @implements IUInt64Value + * @constructor + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + */ + function UInt64Value(properties) { + if (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 Policy instance using the specified properties. - * @function create - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.IPolicy=} [properties] Properties to set - * @returns {google.iam.v1.Policy} Policy instance - */ - Policy.create = function create(properties) { - return new Policy(properties); - }; + /** + * UInt64Value value. + * @member {number|Long} value + * @memberof google.protobuf.UInt64Value + * @instance + */ + UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - /** - * Encodes the specified Policy message. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Policy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.etag); - if (message.bindings != null && message.bindings.length) - for (var i = 0; i < message.bindings.length; ++i) - $root.google.iam.v1.Binding.encode(message.bindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.auditConfigs != null && message.auditConfigs.length) - for (var i = 0; i < message.auditConfigs.length; ++i) - $root.google.iam.v1.AuditConfig.encode(message.auditConfigs[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; + /** + * Creates a new UInt64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @returns {google.protobuf.UInt64Value} UInt64Value instance + */ + UInt64Value.create = function create(properties) { + return new UInt64Value(properties); + }; - /** - * Encodes the specified Policy message, length delimited. Does not implicitly {@link google.iam.v1.Policy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.IPolicy} message Policy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Policy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); + return writer; + }; - /** - * Decodes a Policy message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.Policy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.Policy} Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Policy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Policy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.version = reader.int32(); - break; - } - case 4: { - if (!(message.bindings && message.bindings.length)) - message.bindings = []; - message.bindings.push($root.google.iam.v1.Binding.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.auditConfigs && message.auditConfigs.length)) - message.auditConfigs = []; - message.auditConfigs.push($root.google.iam.v1.AuditConfig.decode(reader, reader.uint32())); - break; - } - case 3: { - message.etag = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decode = function 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.UInt64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.uint64(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a Policy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.Policy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.Policy} Policy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Policy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a Policy message. - * @function verify - * @memberof google.iam.v1.Policy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Policy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isInteger(message.version)) - return "version: integer expected"; - if (message.bindings != null && message.hasOwnProperty("bindings")) { - if (!Array.isArray(message.bindings)) - return "bindings: array expected"; - for (var i = 0; i < message.bindings.length; ++i) { - var error = $root.google.iam.v1.Binding.verify(message.bindings[i]); - if (error) - return "bindings." + error; - } - } - if (message.auditConfigs != null && message.hasOwnProperty("auditConfigs")) { - if (!Array.isArray(message.auditConfigs)) - return "auditConfigs: array expected"; - for (var i = 0; i < message.auditConfigs.length; ++i) { - var error = $root.google.iam.v1.AuditConfig.verify(message.auditConfigs[i]); - if (error) - return "auditConfigs." + error; - } - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!(message.etag && typeof message.etag.length === "number" || $util.isString(message.etag))) - return "etag: buffer expected"; - return null; - }; + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a Policy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.Policy - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.Policy} Policy - */ - Policy.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.Policy) - return object; - var message = new $root.google.iam.v1.Policy(); - if (object.version != null) - message.version = object.version | 0; - if (object.bindings) { - if (!Array.isArray(object.bindings)) - throw TypeError(".google.iam.v1.Policy.bindings: array expected"); - message.bindings = []; - for (var i = 0; i < object.bindings.length; ++i) { - if (typeof object.bindings[i] !== "object") - throw TypeError(".google.iam.v1.Policy.bindings: object expected"); - message.bindings[i] = $root.google.iam.v1.Binding.fromObject(object.bindings[i]); - } - } - if (object.auditConfigs) { - if (!Array.isArray(object.auditConfigs)) - throw TypeError(".google.iam.v1.Policy.auditConfigs: array expected"); - message.auditConfigs = []; - for (var i = 0; i < object.auditConfigs.length; ++i) { - if (typeof object.auditConfigs[i] !== "object") - throw TypeError(".google.iam.v1.Policy.auditConfigs: object expected"); - message.auditConfigs[i] = $root.google.iam.v1.AuditConfig.fromObject(object.auditConfigs[i]); - } - } - if (object.etag != null) - if (typeof object.etag === "string") - $util.base64.decode(object.etag, message.etag = $util.newBuffer($util.base64.length(object.etag)), 0); - else if (object.etag.length >= 0) - message.etag = object.etag; - return message; - }; + /** + * Verifies a UInt64Value message. + * @function verify + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; - /** - * Creates a plain object from a Policy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.Policy - * @static - * @param {google.iam.v1.Policy} message Policy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Policy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.bindings = []; - object.auditConfigs = []; - } - if (options.defaults) { - object.version = 0; - if (options.bytes === String) - object.etag = ""; - else { - object.etag = []; - if (options.bytes !== Array) - object.etag = $util.newBuffer(object.etag); - } - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = options.bytes === String ? $util.base64.encode(message.etag, 0, message.etag.length) : options.bytes === Array ? Array.prototype.slice.call(message.etag) : message.etag; - if (message.bindings && message.bindings.length) { - object.bindings = []; - for (var j = 0; j < message.bindings.length; ++j) - object.bindings[j] = $root.google.iam.v1.Binding.toObject(message.bindings[j], options); - } - if (message.auditConfigs && message.auditConfigs.length) { - object.auditConfigs = []; - for (var j = 0; j < message.auditConfigs.length; ++j) - object.auditConfigs[j] = $root.google.iam.v1.AuditConfig.toObject(message.auditConfigs[j], options); - } + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt64Value} UInt64Value + */ + UInt64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt64Value) return object; - }; - - /** - * Converts this Policy to JSON. - * @function toJSON - * @memberof google.iam.v1.Policy - * @instance - * @returns {Object.} JSON object - */ - Policy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Policy - * @function getTypeUrl - * @memberof google.iam.v1.Policy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Policy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.Policy"; - }; - - return Policy; - })(); + var message = new $root.google.protobuf.UInt64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = true; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + return message; + }; - v1.Binding = (function() { + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.UInt64Value} message UInt64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt64Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + return object; + }; - /** - * Properties of a Binding. - * @memberof google.iam.v1 - * @interface IBinding - * @property {string|null} [role] Binding role - * @property {Array.|null} [members] Binding members - * @property {google.type.IExpr|null} [condition] Binding condition - */ + /** + * Converts this UInt64Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt64Value + * @instance + * @returns {Object.} JSON object + */ + UInt64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new Binding. - * @memberof google.iam.v1 - * @classdesc Represents a Binding. - * @implements IBinding - * @constructor - * @param {google.iam.v1.IBinding=} [properties] Properties to set - */ - function Binding(properties) { - this.members = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for UInt64Value + * @function getTypeUrl + * @memberof google.protobuf.UInt64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.protobuf.UInt64Value"; + }; - /** - * Binding role. - * @member {string} role - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.role = ""; + return UInt64Value; + })(); - /** - * Binding members. - * @member {Array.} members - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.members = $util.emptyArray; + protobuf.Int32Value = (function() { - /** - * Binding condition. - * @member {google.type.IExpr|null|undefined} condition - * @memberof google.iam.v1.Binding - * @instance - */ - Binding.prototype.condition = null; + /** + * Properties of an Int32Value. + * @memberof google.protobuf + * @interface IInt32Value + * @property {number|null} [value] Int32Value value + */ - /** - * Creates a new Binding instance using the specified properties. - * @function create - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.IBinding=} [properties] Properties to set - * @returns {google.iam.v1.Binding} Binding instance - */ - Binding.create = function create(properties) { - return new Binding(properties); - }; + /** + * Constructs a new Int32Value. + * @memberof google.protobuf + * @classdesc Represents an Int32Value. + * @implements IInt32Value + * @constructor + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + */ + function Int32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified Binding message. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.IBinding} message Binding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Binding.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.role); - if (message.members != null && message.members.length) - for (var i = 0; i < message.members.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.members[i]); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Int32Value value. + * @member {number} value + * @memberof google.protobuf.Int32Value + * @instance + */ + Int32Value.prototype.value = 0; + + /** + * Creates a new Int32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @returns {google.protobuf.Int32Value} Int32Value instance + */ + Int32Value.create = function create(properties) { + return new Int32Value(properties); + }; - /** - * Encodes the specified Binding message, length delimited. Does not implicitly {@link google.iam.v1.Binding.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.IBinding} message Binding message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Binding.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); + return writer; + }; - /** - * Decodes a Binding message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.Binding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.Binding} Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Binding.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.Binding(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.role = reader.string(); - break; - } - case 2: { - if (!(message.members && message.members.length)) - message.members = []; - message.members.push(reader.string()); - break; - } - case 3: { - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decode = function 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.Int32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int32(); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a Binding message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.Binding - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.Binding} Binding - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Binding.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a Binding message. - * @function verify - * @memberof google.iam.v1.Binding - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Binding.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string expected"; - if (message.members != null && message.hasOwnProperty("members")) { - if (!Array.isArray(message.members)) - return "members: array expected"; - for (var i = 0; i < message.members.length; ++i) - if (!$util.isString(message.members[i])) - return "members: string[] expected"; - } - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.google.type.Expr.verify(message.condition); - if (error) - return "condition." + error; - } - return null; - }; + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a Binding message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.Binding - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.Binding} Binding - */ - Binding.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.Binding) - return object; - var message = new $root.google.iam.v1.Binding(); - if (object.role != null) - message.role = String(object.role); - if (object.members) { - if (!Array.isArray(object.members)) - throw TypeError(".google.iam.v1.Binding.members: array expected"); - message.members = []; - for (var i = 0; i < object.members.length; ++i) - message.members[i] = String(object.members[i]); - } - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.iam.v1.Binding.condition: object expected"); - message.condition = $root.google.type.Expr.fromObject(object.condition); - } - return message; - }; + /** + * Verifies an Int32Value message. + * @function verify + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; - /** - * Creates a plain object from a Binding message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.Binding - * @static - * @param {google.iam.v1.Binding} message Binding - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Binding.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.members = []; - if (options.defaults) { - object.role = ""; - object.condition = null; - } - if (message.role != null && message.hasOwnProperty("role")) - object.role = message.role; - if (message.members && message.members.length) { - object.members = []; - for (var j = 0; j < message.members.length; ++j) - object.members[j] = message.members[j]; - } - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int32Value} Int32Value + */ + Int32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int32Value) return object; - }; - - /** - * Converts this Binding to JSON. - * @function toJSON - * @memberof google.iam.v1.Binding - * @instance - * @returns {Object.} JSON object - */ - Binding.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Binding - * @function getTypeUrl - * @memberof google.iam.v1.Binding - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Binding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.Binding"; - }; - - return Binding; - })(); + var message = new $root.google.protobuf.Int32Value(); + if (object.value != null) + message.value = object.value | 0; + return message; + }; - v1.AuditConfig = (function() { + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.Int32Value} message Int32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; - /** - * Properties of an AuditConfig. - * @memberof google.iam.v1 - * @interface IAuditConfig - * @property {string|null} [service] AuditConfig service - * @property {Array.|null} [auditLogConfigs] AuditConfig auditLogConfigs - */ + /** + * Converts this Int32Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int32Value + * @instance + * @returns {Object.} JSON object + */ + Int32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new AuditConfig. - * @memberof google.iam.v1 - * @classdesc Represents an AuditConfig. - * @implements IAuditConfig - * @constructor - * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set - */ - function AuditConfig(properties) { - this.auditLogConfigs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for Int32Value + * @function getTypeUrl + * @memberof google.protobuf.Int32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.protobuf.Int32Value"; + }; - /** - * AuditConfig service. - * @member {string} service - * @memberof google.iam.v1.AuditConfig - * @instance - */ - AuditConfig.prototype.service = ""; + return Int32Value; + })(); - /** - * AuditConfig auditLogConfigs. - * @member {Array.} auditLogConfigs - * @memberof google.iam.v1.AuditConfig - * @instance - */ - AuditConfig.prototype.auditLogConfigs = $util.emptyArray; + protobuf.UInt32Value = (function() { - /** - * Creates a new AuditConfig instance using the specified properties. - * @function create - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.IAuditConfig=} [properties] Properties to set - * @returns {google.iam.v1.AuditConfig} AuditConfig instance - */ - AuditConfig.create = function create(properties) { - return new AuditConfig(properties); - }; + /** + * Properties of a UInt32Value. + * @memberof google.protobuf + * @interface IUInt32Value + * @property {number|null} [value] UInt32Value value + */ - /** - * Encodes the specified AuditConfig message. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.service); - if (message.auditLogConfigs != null && message.auditLogConfigs.length) - for (var i = 0; i < message.auditLogConfigs.length; ++i) - $root.google.iam.v1.AuditLogConfig.encode(message.auditLogConfigs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Constructs a new UInt32Value. + * @memberof google.protobuf + * @classdesc Represents a UInt32Value. + * @implements IUInt32Value + * @constructor + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + */ + function UInt32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified AuditConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.IAuditConfig} message AuditConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * UInt32Value value. + * @member {number} value + * @memberof google.protobuf.UInt32Value + * @instance + */ + UInt32Value.prototype.value = 0; - /** - * Decodes an AuditConfig message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.AuditConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditConfig} AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.service = reader.string(); - break; - } - case 3: { - if (!(message.auditLogConfigs && message.auditLogConfigs.length)) - message.auditLogConfigs = []; - message.auditLogConfigs.push($root.google.iam.v1.AuditLogConfig.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new UInt32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * @returns {google.protobuf.UInt32Value} UInt32Value instance + */ + UInt32Value.create = function create(properties) { + return new UInt32Value(properties); + }; - /** - * Decodes an AuditConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.AuditConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditConfig} AuditConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); + return writer; + }; - /** - * Verifies an AuditConfig message. - * @function verify - * @memberof google.iam.v1.AuditConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.auditLogConfigs != null && message.hasOwnProperty("auditLogConfigs")) { - if (!Array.isArray(message.auditLogConfigs)) - return "auditLogConfigs: array expected"; - for (var i = 0; i < message.auditLogConfigs.length; ++i) { - var error = $root.google.iam.v1.AuditLogConfig.verify(message.auditLogConfigs[i]); - if (error) - return "auditLogConfigs." + error; - } - } - return null; - }; + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates an AuditConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.AuditConfig - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditConfig} AuditConfig - */ - AuditConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditConfig) - return object; - var message = new $root.google.iam.v1.AuditConfig(); - if (object.service != null) - message.service = String(object.service); - if (object.auditLogConfigs) { - if (!Array.isArray(object.auditLogConfigs)) - throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: array expected"); - message.auditLogConfigs = []; - for (var i = 0; i < object.auditLogConfigs.length; ++i) { - if (typeof object.auditLogConfigs[i] !== "object") - throw TypeError(".google.iam.v1.AuditConfig.auditLogConfigs: object expected"); - message.auditLogConfigs[i] = $root.google.iam.v1.AuditLogConfig.fromObject(object.auditLogConfigs[i]); + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decode = function 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.UInt32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.uint32(); + break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Creates a plain object from an AuditConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.AuditConfig - * @static - * @param {google.iam.v1.AuditConfig} message AuditConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.auditLogConfigs = []; - if (options.defaults) - object.service = ""; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.auditLogConfigs && message.auditLogConfigs.length) { - object.auditLogConfigs = []; - for (var j = 0; j < message.auditLogConfigs.length; ++j) - object.auditLogConfigs[j] = $root.google.iam.v1.AuditLogConfig.toObject(message.auditLogConfigs[j], options); - } - return object; - }; + } + return message; + }; - /** - * Converts this AuditConfig to JSON. - * @function toJSON - * @memberof google.iam.v1.AuditConfig - * @instance - * @returns {Object.} JSON object - */ - AuditConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for AuditConfig - * @function getTypeUrl - * @memberof google.iam.v1.AuditConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.AuditConfig"; - }; + /** + * Verifies a UInt32Value message. + * @function verify + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; - return AuditConfig; - })(); + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt32Value} UInt32Value + */ + UInt32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt32Value) + return object; + var message = new $root.google.protobuf.UInt32Value(); + if (object.value != null) + message.value = object.value >>> 0; + return message; + }; - v1.AuditLogConfig = (function() { + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; - /** - * Properties of an AuditLogConfig. - * @memberof google.iam.v1 - * @interface IAuditLogConfig - * @property {google.iam.v1.AuditLogConfig.LogType|null} [logType] AuditLogConfig logType - * @property {Array.|null} [exemptedMembers] AuditLogConfig exemptedMembers - */ + /** + * Converts this UInt32Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt32Value + * @instance + * @returns {Object.} JSON object + */ + UInt32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new AuditLogConfig. - * @memberof google.iam.v1 - * @classdesc Represents an AuditLogConfig. - * @implements IAuditLogConfig - * @constructor - * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set - */ - function AuditLogConfig(properties) { - this.exemptedMembers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for UInt32Value + * @function getTypeUrl + * @memberof google.protobuf.UInt32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.protobuf.UInt32Value"; + }; - /** - * AuditLogConfig logType. - * @member {google.iam.v1.AuditLogConfig.LogType} logType - * @memberof google.iam.v1.AuditLogConfig - * @instance - */ - AuditLogConfig.prototype.logType = 0; + return UInt32Value; + })(); - /** - * AuditLogConfig exemptedMembers. - * @member {Array.} exemptedMembers - * @memberof google.iam.v1.AuditLogConfig - * @instance - */ - AuditLogConfig.prototype.exemptedMembers = $util.emptyArray; + protobuf.BoolValue = (function() { - /** - * Creates a new AuditLogConfig instance using the specified properties. - * @function create - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.IAuditLogConfig=} [properties] Properties to set - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig instance - */ - AuditLogConfig.create = function create(properties) { - return new AuditLogConfig(properties); - }; + /** + * Properties of a BoolValue. + * @memberof google.protobuf + * @interface IBoolValue + * @property {boolean|null} [value] BoolValue value + */ - /** - * Encodes the specified AuditLogConfig message. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditLogConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logType); - if (message.exemptedMembers != null && message.exemptedMembers.length) - for (var i = 0; i < message.exemptedMembers.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.exemptedMembers[i]); - return writer; - }; + /** + * Constructs a new BoolValue. + * @memberof google.protobuf + * @classdesc Represents a BoolValue. + * @implements IBoolValue + * @constructor + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + */ + function BoolValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified AuditLogConfig message, length delimited. Does not implicitly {@link google.iam.v1.AuditLogConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.IAuditLogConfig} message AuditLogConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditLogConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * BoolValue value. + * @member {boolean} value + * @memberof google.protobuf.BoolValue + * @instance + */ + BoolValue.prototype.value = false; - /** - * Decodes an AuditLogConfig message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditLogConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditLogConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.logType = reader.int32(); - break; - } - case 2: { - if (!(message.exemptedMembers && message.exemptedMembers.length)) - message.exemptedMembers = []; - message.exemptedMembers.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new BoolValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @returns {google.protobuf.BoolValue} BoolValue instance + */ + BoolValue.create = function create(properties) { + return new BoolValue(properties); + }; - /** - * Decodes an AuditLogConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditLogConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); + return writer; + }; - /** - * Verifies an AuditLogConfig message. - * @function verify - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditLogConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.logType != null && message.hasOwnProperty("logType")) - switch (message.logType) { - default: - return "logType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.exemptedMembers != null && message.hasOwnProperty("exemptedMembers")) { - if (!Array.isArray(message.exemptedMembers)) - return "exemptedMembers: array expected"; - for (var i = 0; i < message.exemptedMembers.length; ++i) - if (!$util.isString(message.exemptedMembers[i])) - return "exemptedMembers: string[] expected"; - } - return null; - }; + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates an AuditLogConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditLogConfig} AuditLogConfig - */ - AuditLogConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditLogConfig) - return object; - var message = new $root.google.iam.v1.AuditLogConfig(); - switch (object.logType) { - default: - if (typeof object.logType === "number") { - message.logType = object.logType; + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decode = function 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.BoolValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.bool(); break; } + default: + reader.skipType(tag & 7); break; - case "LOG_TYPE_UNSPECIFIED": - case 0: - message.logType = 0; - break; - case "ADMIN_READ": - case 1: - message.logType = 1; - break; - case "DATA_WRITE": - case 2: - message.logType = 2; - break; - case "DATA_READ": - case 3: - message.logType = 3; - break; - } - if (object.exemptedMembers) { - if (!Array.isArray(object.exemptedMembers)) - throw TypeError(".google.iam.v1.AuditLogConfig.exemptedMembers: array expected"); - message.exemptedMembers = []; - for (var i = 0; i < object.exemptedMembers.length; ++i) - message.exemptedMembers[i] = String(object.exemptedMembers[i]); - } - return message; - }; - - /** - * Creates a plain object from an AuditLogConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {google.iam.v1.AuditLogConfig} message AuditLogConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditLogConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.exemptedMembers = []; - if (options.defaults) - object.logType = options.enums === String ? "LOG_TYPE_UNSPECIFIED" : 0; - if (message.logType != null && message.hasOwnProperty("logType")) - object.logType = options.enums === String ? $root.google.iam.v1.AuditLogConfig.LogType[message.logType] === undefined ? message.logType : $root.google.iam.v1.AuditLogConfig.LogType[message.logType] : message.logType; - if (message.exemptedMembers && message.exemptedMembers.length) { - object.exemptedMembers = []; - for (var j = 0; j < message.exemptedMembers.length; ++j) - object.exemptedMembers[j] = message.exemptedMembers[j]; } - return object; - }; - - /** - * Converts this AuditLogConfig to JSON. - * @function toJSON - * @memberof google.iam.v1.AuditLogConfig - * @instance - * @returns {Object.} JSON object - */ - AuditLogConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + } + return message; + }; - /** - * Gets the default type url for AuditLogConfig - * @function getTypeUrl - * @memberof google.iam.v1.AuditLogConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditLogConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.AuditLogConfig"; - }; + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * LogType enum. - * @name google.iam.v1.AuditLogConfig.LogType - * @enum {number} - * @property {number} LOG_TYPE_UNSPECIFIED=0 LOG_TYPE_UNSPECIFIED value - * @property {number} ADMIN_READ=1 ADMIN_READ value - * @property {number} DATA_WRITE=2 DATA_WRITE value - * @property {number} DATA_READ=3 DATA_READ value - */ - AuditLogConfig.LogType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOG_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADMIN_READ"] = 1; - values[valuesById[2] = "DATA_WRITE"] = 2; - values[valuesById[3] = "DATA_READ"] = 3; - return values; - })(); + /** + * Verifies a BoolValue message. + * @function verify + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BoolValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "boolean") + return "value: boolean expected"; + return null; + }; - return AuditLogConfig; - })(); + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BoolValue} BoolValue + */ + BoolValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BoolValue) + return object; + var message = new $root.google.protobuf.BoolValue(); + if (object.value != null) + message.value = Boolean(object.value); + return message; + }; - v1.PolicyDelta = (function() { + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.BoolValue} message BoolValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BoolValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = false; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; - /** - * Properties of a PolicyDelta. - * @memberof google.iam.v1 - * @interface IPolicyDelta - * @property {Array.|null} [bindingDeltas] PolicyDelta bindingDeltas - * @property {Array.|null} [auditConfigDeltas] PolicyDelta auditConfigDeltas - */ + /** + * Converts this BoolValue to JSON. + * @function toJSON + * @memberof google.protobuf.BoolValue + * @instance + * @returns {Object.} JSON object + */ + BoolValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new PolicyDelta. - * @memberof google.iam.v1 - * @classdesc Represents a PolicyDelta. - * @implements IPolicyDelta - * @constructor - * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set - */ - function PolicyDelta(properties) { - this.bindingDeltas = []; - this.auditConfigDeltas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for BoolValue + * @function getTypeUrl + * @memberof google.protobuf.BoolValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.protobuf.BoolValue"; + }; - /** - * PolicyDelta bindingDeltas. - * @member {Array.} bindingDeltas - * @memberof google.iam.v1.PolicyDelta - * @instance - */ - PolicyDelta.prototype.bindingDeltas = $util.emptyArray; + return BoolValue; + })(); - /** - * PolicyDelta auditConfigDeltas. - * @member {Array.} auditConfigDeltas - * @memberof google.iam.v1.PolicyDelta - * @instance - */ - PolicyDelta.prototype.auditConfigDeltas = $util.emptyArray; + protobuf.StringValue = (function() { - /** - * Creates a new PolicyDelta instance using the specified properties. - * @function create - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.IPolicyDelta=} [properties] Properties to set - * @returns {google.iam.v1.PolicyDelta} PolicyDelta instance - */ - PolicyDelta.create = function create(properties) { - return new PolicyDelta(properties); - }; + /** + * Properties of a StringValue. + * @memberof google.protobuf + * @interface IStringValue + * @property {string|null} [value] StringValue value + */ - /** - * Encodes the specified PolicyDelta message. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyDelta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bindingDeltas != null && message.bindingDeltas.length) - for (var i = 0; i < message.bindingDeltas.length; ++i) - $root.google.iam.v1.BindingDelta.encode(message.bindingDeltas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.auditConfigDeltas != null && message.auditConfigDeltas.length) - for (var i = 0; i < message.auditConfigDeltas.length; ++i) - $root.google.iam.v1.AuditConfigDelta.encode(message.auditConfigDeltas[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Constructs a new StringValue. + * @memberof google.protobuf + * @classdesc Represents a StringValue. + * @implements IStringValue + * @constructor + * @param {google.protobuf.IStringValue=} [properties] Properties to set + */ + function StringValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified PolicyDelta message, length delimited. Does not implicitly {@link google.iam.v1.PolicyDelta.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.IPolicyDelta} message PolicyDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PolicyDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * StringValue value. + * @member {string} value + * @memberof google.protobuf.StringValue + * @instance + */ + StringValue.prototype.value = ""; - /** - * Decodes a PolicyDelta message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.PolicyDelta} PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyDelta.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.PolicyDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.bindingDeltas && message.bindingDeltas.length)) - message.bindingDeltas = []; - message.bindingDeltas.push($root.google.iam.v1.BindingDelta.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.auditConfigDeltas && message.auditConfigDeltas.length)) - message.auditConfigDeltas = []; - message.auditConfigDeltas.push($root.google.iam.v1.AuditConfigDelta.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new StringValue instance using the specified properties. + * @function create + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @returns {google.protobuf.StringValue} StringValue instance + */ + StringValue.create = function create(properties) { + return new StringValue(properties); + }; - /** - * Decodes a PolicyDelta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.PolicyDelta} PolicyDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PolicyDelta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; - /** - * Verifies a PolicyDelta message. - * @function verify - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PolicyDelta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bindingDeltas != null && message.hasOwnProperty("bindingDeltas")) { - if (!Array.isArray(message.bindingDeltas)) - return "bindingDeltas: array expected"; - for (var i = 0; i < message.bindingDeltas.length; ++i) { - var error = $root.google.iam.v1.BindingDelta.verify(message.bindingDeltas[i]); - if (error) - return "bindingDeltas." + error; - } - } - if (message.auditConfigDeltas != null && message.hasOwnProperty("auditConfigDeltas")) { - if (!Array.isArray(message.auditConfigDeltas)) - return "auditConfigDeltas: array expected"; - for (var i = 0; i < message.auditConfigDeltas.length; ++i) { - var error = $root.google.iam.v1.AuditConfigDelta.verify(message.auditConfigDeltas[i]); - if (error) - return "auditConfigDeltas." + error; - } - } - return null; - }; + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a PolicyDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.PolicyDelta} PolicyDelta - */ - PolicyDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.PolicyDelta) - return object; - var message = new $root.google.iam.v1.PolicyDelta(); - if (object.bindingDeltas) { - if (!Array.isArray(object.bindingDeltas)) - throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: array expected"); - message.bindingDeltas = []; - for (var i = 0; i < object.bindingDeltas.length; ++i) { - if (typeof object.bindingDeltas[i] !== "object") - throw TypeError(".google.iam.v1.PolicyDelta.bindingDeltas: object expected"); - message.bindingDeltas[i] = $root.google.iam.v1.BindingDelta.fromObject(object.bindingDeltas[i]); - } - } - if (object.auditConfigDeltas) { - if (!Array.isArray(object.auditConfigDeltas)) - throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: array expected"); - message.auditConfigDeltas = []; - for (var i = 0; i < object.auditConfigDeltas.length; ++i) { - if (typeof object.auditConfigDeltas[i] !== "object") - throw TypeError(".google.iam.v1.PolicyDelta.auditConfigDeltas: object expected"); - message.auditConfigDeltas[i] = $root.google.iam.v1.AuditConfigDelta.fromObject(object.auditConfigDeltas[i]); + /** + * Decodes a StringValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decode = function 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.StringValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Creates a plain object from a PolicyDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {google.iam.v1.PolicyDelta} message PolicyDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PolicyDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.bindingDeltas = []; - object.auditConfigDeltas = []; - } - if (message.bindingDeltas && message.bindingDeltas.length) { - object.bindingDeltas = []; - for (var j = 0; j < message.bindingDeltas.length; ++j) - object.bindingDeltas[j] = $root.google.iam.v1.BindingDelta.toObject(message.bindingDeltas[j], options); - } - if (message.auditConfigDeltas && message.auditConfigDeltas.length) { - object.auditConfigDeltas = []; - for (var j = 0; j < message.auditConfigDeltas.length; ++j) - object.auditConfigDeltas[j] = $root.google.iam.v1.AuditConfigDelta.toObject(message.auditConfigDeltas[j], options); - } - return object; - }; + } + return message; + }; - /** - * Converts this PolicyDelta to JSON. - * @function toJSON - * @memberof google.iam.v1.PolicyDelta - * @instance - * @returns {Object.} JSON object - */ - PolicyDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for PolicyDelta - * @function getTypeUrl - * @memberof google.iam.v1.PolicyDelta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PolicyDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.PolicyDelta"; - }; + /** + * Verifies a StringValue message. + * @function verify + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; - return PolicyDelta; - })(); + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.StringValue} StringValue + */ + StringValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.StringValue) + return object; + var message = new $root.google.protobuf.StringValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; - v1.BindingDelta = (function() { + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.StringValue} message StringValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; - /** - * Properties of a BindingDelta. - * @memberof google.iam.v1 - * @interface IBindingDelta - * @property {google.iam.v1.BindingDelta.Action|null} [action] BindingDelta action - * @property {string|null} [role] BindingDelta role - * @property {string|null} [member] BindingDelta member - * @property {google.type.IExpr|null} [condition] BindingDelta condition - */ + /** + * Converts this StringValue to JSON. + * @function toJSON + * @memberof google.protobuf.StringValue + * @instance + * @returns {Object.} JSON object + */ + StringValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new BindingDelta. - * @memberof google.iam.v1 - * @classdesc Represents a BindingDelta. - * @implements IBindingDelta - * @constructor - * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set - */ - function BindingDelta(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Gets the default type url for StringValue + * @function getTypeUrl + * @memberof google.protobuf.StringValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.protobuf.StringValue"; + }; - /** - * BindingDelta action. - * @member {google.iam.v1.BindingDelta.Action} action - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.action = 0; - - /** - * BindingDelta role. - * @member {string} role - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.role = ""; + return StringValue; + })(); - /** - * BindingDelta member. - * @member {string} member - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.member = ""; + protobuf.BytesValue = (function() { - /** - * BindingDelta condition. - * @member {google.type.IExpr|null|undefined} condition - * @memberof google.iam.v1.BindingDelta - * @instance - */ - BindingDelta.prototype.condition = null; + /** + * Properties of a BytesValue. + * @memberof google.protobuf + * @interface IBytesValue + * @property {Uint8Array|null} [value] BytesValue value + */ - /** - * Creates a new BindingDelta instance using the specified properties. - * @function create - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.IBindingDelta=} [properties] Properties to set - * @returns {google.iam.v1.BindingDelta} BindingDelta instance - */ - BindingDelta.create = function create(properties) { - return new BindingDelta(properties); - }; + /** + * Constructs a new BytesValue. + * @memberof google.protobuf + * @classdesc Represents a BytesValue. + * @implements IBytesValue + * @constructor + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + */ + function BytesValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified BindingDelta message. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BindingDelta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); - if (message.role != null && Object.hasOwnProperty.call(message, "role")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.role); - if (message.member != null && Object.hasOwnProperty.call(message, "member")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.member); - if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) - $root.google.type.Expr.encode(message.condition, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; + /** + * BytesValue value. + * @member {Uint8Array} value + * @memberof google.protobuf.BytesValue + * @instance + */ + BytesValue.prototype.value = $util.newBuffer([]); - /** - * Encodes the specified BindingDelta message, length delimited. Does not implicitly {@link google.iam.v1.BindingDelta.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.IBindingDelta} message BindingDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BindingDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new BytesValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * @returns {google.protobuf.BytesValue} BytesValue instance + */ + BytesValue.create = function create(properties) { + return new BytesValue(properties); + }; - /** - * Decodes a BindingDelta message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.BindingDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.BindingDelta} BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BindingDelta.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.BindingDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.action = reader.int32(); - break; - } - case 2: { - message.role = reader.string(); - break; - } - case 3: { - message.member = reader.string(); - break; - } - case 4: { - message.condition = $root.google.type.Expr.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); + return writer; + }; - /** - * Decodes a BindingDelta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.BindingDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.BindingDelta} BindingDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BindingDelta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a BindingDelta message. - * @function verify - * @memberof google.iam.v1.BindingDelta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BindingDelta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decode = function 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.BytesValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.bytes(); break; } - if (message.role != null && message.hasOwnProperty("role")) - if (!$util.isString(message.role)) - return "role: string expected"; - if (message.member != null && message.hasOwnProperty("member")) - if (!$util.isString(message.member)) - return "member: string expected"; - if (message.condition != null && message.hasOwnProperty("condition")) { - var error = $root.google.type.Expr.verify(message.condition); - if (error) - return "condition." + error; - } - return null; - }; - - /** - * Creates a BindingDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.BindingDelta - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.BindingDelta} BindingDelta - */ - BindingDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.BindingDelta) - return object; - var message = new $root.google.iam.v1.BindingDelta(); - switch (object.action) { default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "ADD": - case 1: - message.action = 1; - break; - case "REMOVE": - case 2: - message.action = 2; + reader.skipType(tag & 7); break; } - if (object.role != null) - message.role = String(object.role); - if (object.member != null) - message.member = String(object.member); - if (object.condition != null) { - if (typeof object.condition !== "object") - throw TypeError(".google.iam.v1.BindingDelta.condition: object expected"); - message.condition = $root.google.type.Expr.fromObject(object.condition); + } + return message; + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BytesValue message. + * @function verify + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BytesValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 a BytesValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BytesValue} BytesValue + */ + BytesValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BytesValue) + return object; + var message = new $root.google.protobuf.BytesValue(); + 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 a BytesValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.BytesValue} message BytesValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BytesValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); } - return message; - }; + 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 BytesValue to JSON. + * @function toJSON + * @memberof google.protobuf.BytesValue + * @instance + * @returns {Object.} JSON object + */ + BytesValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BytesValue + * @function getTypeUrl + * @memberof google.protobuf.BytesValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BytesValue"; + }; + + return BytesValue; + })(); + + return protobuf; + })(); + + google.type = (function() { - /** - * Creates a plain object from a BindingDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.BindingDelta - * @static - * @param {google.iam.v1.BindingDelta} message BindingDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BindingDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.role = ""; - object.member = ""; - object.condition = null; - } - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.iam.v1.BindingDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.BindingDelta.Action[message.action] : message.action; - if (message.role != null && message.hasOwnProperty("role")) - object.role = message.role; - if (message.member != null && message.hasOwnProperty("member")) - object.member = message.member; - if (message.condition != null && message.hasOwnProperty("condition")) - object.condition = $root.google.type.Expr.toObject(message.condition, options); - return object; - }; + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; - /** - * Converts this BindingDelta to JSON. - * @function toJSON - * @memberof google.iam.v1.BindingDelta - * @instance - * @returns {Object.} JSON object - */ - BindingDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * DayOfWeek enum. + * @name google.type.DayOfWeek + * @enum {number} + * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value + * @property {number} MONDAY=1 MONDAY value + * @property {number} TUESDAY=2 TUESDAY value + * @property {number} WEDNESDAY=3 WEDNESDAY value + * @property {number} THURSDAY=4 THURSDAY value + * @property {number} FRIDAY=5 FRIDAY value + * @property {number} SATURDAY=6 SATURDAY value + * @property {number} SUNDAY=7 SUNDAY value + */ + type.DayOfWeek = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; + values[valuesById[1] = "MONDAY"] = 1; + values[valuesById[2] = "TUESDAY"] = 2; + values[valuesById[3] = "WEDNESDAY"] = 3; + values[valuesById[4] = "THURSDAY"] = 4; + values[valuesById[5] = "FRIDAY"] = 5; + values[valuesById[6] = "SATURDAY"] = 6; + values[valuesById[7] = "SUNDAY"] = 7; + return values; + })(); - /** - * Gets the default type url for BindingDelta - * @function getTypeUrl - * @memberof google.iam.v1.BindingDelta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BindingDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.iam.v1.BindingDelta"; - }; + /** + * Month enum. + * @name google.type.Month + * @enum {number} + * @property {number} MONTH_UNSPECIFIED=0 MONTH_UNSPECIFIED value + * @property {number} JANUARY=1 JANUARY value + * @property {number} FEBRUARY=2 FEBRUARY value + * @property {number} MARCH=3 MARCH value + * @property {number} APRIL=4 APRIL value + * @property {number} MAY=5 MAY value + * @property {number} JUNE=6 JUNE value + * @property {number} JULY=7 JULY value + * @property {number} AUGUST=8 AUGUST value + * @property {number} SEPTEMBER=9 SEPTEMBER value + * @property {number} OCTOBER=10 OCTOBER value + * @property {number} NOVEMBER=11 NOVEMBER value + * @property {number} DECEMBER=12 DECEMBER value + */ + type.Month = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MONTH_UNSPECIFIED"] = 0; + values[valuesById[1] = "JANUARY"] = 1; + values[valuesById[2] = "FEBRUARY"] = 2; + values[valuesById[3] = "MARCH"] = 3; + values[valuesById[4] = "APRIL"] = 4; + values[valuesById[5] = "MAY"] = 5; + values[valuesById[6] = "JUNE"] = 6; + values[valuesById[7] = "JULY"] = 7; + values[valuesById[8] = "AUGUST"] = 8; + values[valuesById[9] = "SEPTEMBER"] = 9; + values[valuesById[10] = "OCTOBER"] = 10; + values[valuesById[11] = "NOVEMBER"] = 11; + values[valuesById[12] = "DECEMBER"] = 12; + return values; + })(); - /** - * Action enum. - * @name google.iam.v1.BindingDelta.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} ADD=1 ADD value - * @property {number} REMOVE=2 REMOVE value - */ - BindingDelta.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADD"] = 1; - values[valuesById[2] = "REMOVE"] = 2; - return values; - })(); + return type; + })(); - return BindingDelta; - })(); + google.rpc = (function() { - v1.AuditConfigDelta = (function() { + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; - /** - * Properties of an AuditConfigDelta. - * @memberof google.iam.v1 - * @interface IAuditConfigDelta - * @property {google.iam.v1.AuditConfigDelta.Action|null} [action] AuditConfigDelta action - * @property {string|null} [service] AuditConfigDelta service - * @property {string|null} [exemptedMember] AuditConfigDelta exemptedMember - * @property {string|null} [logType] AuditConfigDelta logType - */ + rpc.Status = (function() { - /** - * Constructs a new AuditConfigDelta. - * @memberof google.iam.v1 - * @classdesc Represents an AuditConfigDelta. - * @implements IAuditConfigDelta - * @constructor - * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set - */ - function AuditConfigDelta(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * 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 + */ - /** - * AuditConfigDelta action. - * @member {google.iam.v1.AuditConfigDelta.Action} action - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.action = 0; + /** + * 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]]; + } - /** - * AuditConfigDelta service. - * @member {string} service - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.service = ""; + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; - /** - * AuditConfigDelta exemptedMember. - * @member {string} exemptedMember - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.exemptedMember = ""; + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; - /** - * AuditConfigDelta logType. - * @member {string} logType - * @memberof google.iam.v1.AuditConfigDelta - * @instance - */ - AuditConfigDelta.prototype.logType = ""; + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; - /** - * Creates a new AuditConfigDelta instance using the specified properties. - * @function create - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.IAuditConfigDelta=} [properties] Properties to set - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta instance - */ - AuditConfigDelta.create = function create(properties) { - return new AuditConfigDelta(properties); - }; + /** + * 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 AuditConfigDelta message. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @function encode - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfigDelta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.action); - if (message.service != null && Object.hasOwnProperty.call(message, "service")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.service); - if (message.exemptedMember != null && Object.hasOwnProperty.call(message, "exemptedMember")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.exemptedMember); - if (message.logType != null && Object.hasOwnProperty.call(message, "logType")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.logType); - return writer; - }; + /** + * 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 AuditConfigDelta message, length delimited. Does not implicitly {@link google.iam.v1.AuditConfigDelta.verify|verify} messages. - * @function encodeDelimited - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.IAuditConfigDelta} message AuditConfigDelta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuditConfigDelta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * 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 an AuditConfigDelta message from the specified reader or buffer. - * @function decode - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfigDelta.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.iam.v1.AuditConfigDelta(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.action = reader.int32(); - break; - } - case 2: { - message.service = reader.string(); - break; - } - case 3: { - message.exemptedMember = reader.string(); - break; - } - case 4: { - message.logType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * 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; } - } - return message; - }; - - /** - * Decodes an AuditConfigDelta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuditConfigDelta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuditConfigDelta message. - * @function verify - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuditConfigDelta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: + case 2: { + message.message = reader.string(); break; } - if (message.service != null && message.hasOwnProperty("service")) - if (!$util.isString(message.service)) - return "service: string expected"; - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) - if (!$util.isString(message.exemptedMember)) - return "exemptedMember: string expected"; - if (message.logType != null && message.hasOwnProperty("logType")) - if (!$util.isString(message.logType)) - return "logType: string expected"; - return null; - }; - - /** - * Creates an AuditConfigDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {Object.} object Plain object - * @returns {google.iam.v1.AuditConfigDelta} AuditConfigDelta - */ - AuditConfigDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.iam.v1.AuditConfigDelta) - return object; - var message = new $root.google.iam.v1.AuditConfigDelta(); - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); break; } - break; - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "ADD": - case 1: - message.action = 1; - break; - case "REMOVE": - case 2: - message.action = 2; + default: + reader.skipType(tag & 7); break; } - if (object.service != null) - message.service = String(object.service); - if (object.exemptedMember != null) - message.exemptedMember = String(object.exemptedMember); - if (object.logType != null) - message.logType = String(object.logType); - return message; - }; + } + return message; + }; - /** - * Creates a plain object from an AuditConfigDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {google.iam.v1.AuditConfigDelta} message AuditConfigDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuditConfigDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; - object.service = ""; - object.exemptedMember = ""; - object.logType = ""; - } - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.iam.v1.AuditConfigDelta.Action[message.action] === undefined ? message.action : $root.google.iam.v1.AuditConfigDelta.Action[message.action] : message.action; - if (message.service != null && message.hasOwnProperty("service")) - object.service = message.service; - if (message.exemptedMember != null && message.hasOwnProperty("exemptedMember")) - object.exemptedMember = message.exemptedMember; - if (message.logType != null && message.hasOwnProperty("logType")) - object.logType = message.logType; - return object; - }; + /** + * 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()); + }; - /** - * Converts this AuditConfigDelta to JSON. - * @function toJSON - * @memberof google.iam.v1.AuditConfigDelta - * @instance - * @returns {Object.} JSON object - */ - AuditConfigDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * 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; + }; - /** - * Gets the default type url for AuditConfigDelta - * @function getTypeUrl - * @memberof google.iam.v1.AuditConfigDelta - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AuditConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * 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 typeUrlPrefix + "/google.iam.v1.AuditConfigDelta"; - }; + } + return message; + }; - /** - * Action enum. - * @name google.iam.v1.AuditConfigDelta.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} ADD=1 ADD value - * @property {number} REMOVE=2 REMOVE value - */ - AuditConfigDelta.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ADD"] = 1; - values[valuesById[2] = "REMOVE"] = 2; - return values; - })(); + /** + * 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; + }; - return AuditConfigDelta; - })(); + /** + * 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 v1; + return Status; })(); - return iam; + return rpc; })(); google.longrunning = (function() { diff --git a/packages/google-cloud-backupdr/protos/protos.json b/packages/google-cloud-backupdr/protos/protos.json index f9f1f1014e7..6a5fd26891d 100644 --- a/packages/google-cloud-backupdr/protos/protos.json +++ b/packages/google-cloud-backupdr/protos/protos.json @@ -252,26 +252,6 @@ } ] }, - "TestIamPermissions": { - "requestType": "google.iam.v1.TestIamPermissionsRequest", - "responseType": "google.iam.v1.TestIamPermissionsResponse", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/locations/*/backupVaults/*}:testIamPermissions", - "(google.api.http).body": "*", - "(google.api.method_signature)": "resource, permissions" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=projects/*/locations/*/backupVaults/*}:testIamPermissions", - "body": "*" - } - }, - { - "(google.api.method_signature)": "resource, permissions" - } - ] - }, "ListDataSources": { "requestType": "ListDataSourcesRequest", "responseType": "ListDataSourcesResponse", @@ -336,158 +316,6 @@ } ] }, - "RemoveDataSource": { - "requestType": "RemoveDataSourceRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:remove", - "(google.api.http).body": "*", - "(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)": { - "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:remove", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "SetInternalStatus": { - "requestType": "SetInternalStatusRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:setInternalStatus", - "(google.api.http).body": "*", - "(google.api.method_signature)": "data_source", - "(google.longrunning.operation_info).response_type": "SetInternalStatusResponse", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:setInternalStatus", - "body": "*" - } - }, - { - "(google.api.method_signature)": "data_source" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "SetInternalStatusResponse", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "InitiateBackup": { - "requestType": "InitiateBackupRequest", - "responseType": "InitiateBackupResponse", - "options": { - "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:initiateBackup", - "(google.api.http).body": "*", - "(google.api.method_signature)": "data_source" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:initiateBackup", - "body": "*" - } - }, - { - "(google.api.method_signature)": "data_source" - } - ] - }, - "AbandonBackup": { - "requestType": "AbandonBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:abandonBackup", - "(google.api.http).body": "*", - "(google.api.method_signature)": "data_source", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:abandonBackup", - "body": "*" - } - }, - { - "(google.api.method_signature)": "data_source" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "FinalizeBackup": { - "requestType": "FinalizeBackupRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:finalizeBackup", - "(google.api.http).body": "*", - "(google.api.method_signature)": "data_source", - "(google.longrunning.operation_info).response_type": "Backup", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{data_source=projects/*/locations/*/backupVaults/*/dataSources/*}:finalizeBackup", - "body": "*" - } - }, - { - "(google.api.method_signature)": "data_source" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Backup", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "FetchAccessToken": { - "requestType": "FetchAccessTokenRequest", - "responseType": "FetchAccessTokenResponse", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/*/backupVaults/*/dataSources/*}:fetchAccessToken", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, "ListBackups": { "requestType": "ListBackupsRequest", "responseType": "ListBackupsResponse", @@ -2986,295 +2814,41 @@ "(google.api.field_behavior)": "OPTIONAL" } }, - "filter": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "orderBy": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListDataSourcesResponse": { - "fields": { - "dataSources": { - "rule": "repeated", - "type": "DataSource", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetDataSourceRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - } - } - }, - "UpdateDataSourceRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "dataSource": { - "type": "DataSource", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "allowMissing": { - "type": "bool", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "RemoveDataSourceRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "SetInternalStatusRequest": { - "fields": { - "dataSource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - }, - "value": { - "type": "bytes", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "backupConfigState": { - "type": "BackupConfigState", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "SetInternalStatusResponse": { - "fields": {} - }, - "InitiateBackupRequest": { - "fields": { - "dataSource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "backupId": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "InitiateBackupResponse": { - "fields": { - "backup": { - "type": "string", - "id": 1 - }, - "newBackupGenerationId": { - "type": "int32", - "id": 2 - }, - "baseBackupGenerationId": { - "type": "int32", - "id": 3 - } - } - }, - "AbandonBackupRequest": { - "fields": { - "dataSource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "FinalizeBackupRequest": { - "oneofs": { - "_description": { - "oneof": [ - "description" - ] - }, - "_consistencyTime": { - "oneof": [ - "consistencyTime" - ] - }, - "_recoveryRangeStartTime": { - "oneof": [ - "recoveryRangeStartTime" - ] - }, - "_recoveryRangeEndTime": { - "oneof": [ - "recoveryRangeEndTime" - ] - }, - "_retentionDuration": { - "oneof": [ - "retentionDuration" - ] - } - }, - "fields": { - "dataSource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" - } - }, - "description": { - "type": "string", - "id": 2, - "options": { - "proto3_optional": true - } - }, - "consistencyTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "proto3_optional": true - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "backupId": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "recoveryRangeStartTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "proto3_optional": true - } - }, - "recoveryRangeEndTime": { - "type": "google.protobuf.Timestamp", - "id": 7, + "filter": { + "type": "string", + "id": 4, "options": { - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } }, - "retentionDuration": { - "type": "google.protobuf.Duration", - "id": 9, + "orderBy": { + "type": "string", + "id": 5, "options": { - "proto3_optional": true + "(google.api.field_behavior)": "OPTIONAL" } } } }, - "FetchAccessTokenRequest": { + "ListDataSourcesResponse": { + "fields": { + "dataSources": { + "rule": "repeated", + "type": "DataSource", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetDataSourceRequest": { "fields": { "name": { "type": "string", @@ -3283,33 +2857,39 @@ "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).type": "backupdr.googleapis.com/DataSource" } - }, - "generationId": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } } } }, - "FetchAccessTokenResponse": { + "UpdateDataSourceRequest": { "fields": { - "readLocation": { - "type": "string", - "id": 1 + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "writeLocation": { - "type": "string", - "id": 2 + "dataSource": { + "type": "DataSource", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } }, - "token": { + "requestId": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } }, - "expireTime": { - "type": "google.protobuf.Timestamp", - "id": 4 + "allowMissing": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -7246,9 +6826,9 @@ }, "type": { "options": { - "go_package": "google.golang.org/genproto/googleapis/type/expr;expr", + "go_package": "google.golang.org/genproto/googleapis/type/month;month", "java_multiple_files": true, - "java_outer_classname": "ExprProto", + "java_outer_classname": "MonthProto", "java_package": "com.google.type", "objc_class_prefix": "GTP" }, @@ -7281,26 +6861,6 @@ "NOVEMBER": 11, "DECEMBER": 12 } - }, - "Expr": { - "fields": { - "expression": { - "type": "string", - "id": 1 - }, - "title": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - }, - "location": { - "type": "string", - "id": 4 - } - } } } }, @@ -7333,301 +6893,6 @@ } } }, - "iam": { - "nested": { - "v1": { - "options": { - "cc_enable_arenas": true, - "csharp_namespace": "Google.Cloud.Iam.V1", - "go_package": "cloud.google.com/go/iam/apiv1/iampb;iampb", - "java_multiple_files": true, - "java_outer_classname": "PolicyProto", - "java_package": "com.google.iam.v1", - "php_namespace": "Google\\Cloud\\Iam\\V1" - }, - "nested": { - "IAMPolicy": { - "options": { - "(google.api.default_host)": "iam-meta-api.googleapis.com" - }, - "methods": { - "SetIamPolicy": { - "requestType": "SetIamPolicyRequest", - "responseType": "Policy", - "options": { - "(google.api.http).post": "/v1/{resource=**}:setIamPolicy", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=**}:setIamPolicy", - "body": "*" - } - } - ] - }, - "GetIamPolicy": { - "requestType": "GetIamPolicyRequest", - "responseType": "Policy", - "options": { - "(google.api.http).post": "/v1/{resource=**}:getIamPolicy", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=**}:getIamPolicy", - "body": "*" - } - } - ] - }, - "TestIamPermissions": { - "requestType": "TestIamPermissionsRequest", - "responseType": "TestIamPermissionsResponse", - "options": { - "(google.api.http).post": "/v1/{resource=**}:testIamPermissions", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{resource=**}:testIamPermissions", - "body": "*" - } - } - ] - } - } - }, - "SetIamPolicyRequest": { - "fields": { - "resource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "*" - } - }, - "policy": { - "type": "Policy", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 3 - } - } - }, - "GetIamPolicyRequest": { - "fields": { - "resource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "*" - } - }, - "options": { - "type": "GetPolicyOptions", - "id": 2 - } - } - }, - "TestIamPermissionsRequest": { - "fields": { - "resource": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "*" - } - }, - "permissions": { - "rule": "repeated", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "TestIamPermissionsResponse": { - "fields": { - "permissions": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "GetPolicyOptions": { - "fields": { - "requestedPolicyVersion": { - "type": "int32", - "id": 1 - } - } - }, - "Policy": { - "fields": { - "version": { - "type": "int32", - "id": 1 - }, - "bindings": { - "rule": "repeated", - "type": "Binding", - "id": 4 - }, - "auditConfigs": { - "rule": "repeated", - "type": "AuditConfig", - "id": 6 - }, - "etag": { - "type": "bytes", - "id": 3 - } - } - }, - "Binding": { - "fields": { - "role": { - "type": "string", - "id": 1 - }, - "members": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "condition": { - "type": "google.type.Expr", - "id": 3 - } - } - }, - "AuditConfig": { - "fields": { - "service": { - "type": "string", - "id": 1 - }, - "auditLogConfigs": { - "rule": "repeated", - "type": "AuditLogConfig", - "id": 3 - } - } - }, - "AuditLogConfig": { - "fields": { - "logType": { - "type": "LogType", - "id": 1 - }, - "exemptedMembers": { - "rule": "repeated", - "type": "string", - "id": 2 - } - }, - "nested": { - "LogType": { - "values": { - "LOG_TYPE_UNSPECIFIED": 0, - "ADMIN_READ": 1, - "DATA_WRITE": 2, - "DATA_READ": 3 - } - } - } - }, - "PolicyDelta": { - "fields": { - "bindingDeltas": { - "rule": "repeated", - "type": "BindingDelta", - "id": 1 - }, - "auditConfigDeltas": { - "rule": "repeated", - "type": "AuditConfigDelta", - "id": 2 - } - } - }, - "BindingDelta": { - "fields": { - "action": { - "type": "Action", - "id": 1 - }, - "role": { - "type": "string", - "id": 2 - }, - "member": { - "type": "string", - "id": 3 - }, - "condition": { - "type": "google.type.Expr", - "id": 4 - } - }, - "nested": { - "Action": { - "values": { - "ACTION_UNSPECIFIED": 0, - "ADD": 1, - "REMOVE": 2 - } - } - } - }, - "AuditConfigDelta": { - "fields": { - "action": { - "type": "Action", - "id": 1 - }, - "service": { - "type": "string", - "id": 2 - }, - "exemptedMember": { - "type": "string", - "id": 3 - }, - "logType": { - "type": "string", - "id": 4 - } - }, - "nested": { - "Action": { - "values": { - "ACTION_UNSPECIFIED": 0, - "ADD": 1, - "REMOVE": 2 - } - } - } - } - } - } - } - }, "longrunning": { "options": { "cc_enable_arenas": true, diff --git a/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json b/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json index 582d6b86ec2..9774bcfa0db 100644 --- a/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json +++ b/packages/google-cloud-backupdr/samples/generated/v1/snippet_metadata_google.cloud.backupdr.v1.json @@ -535,50 +535,6 @@ } } }, - { - "regionTag": "backupdr_v1_generated_BackupDR_TestIamPermissions_async", - "title": "BackupDR testIamPermissions Sample", - "origin": "API_DEFINITION", - "description": " Returns the caller's permissions on a BackupVault resource. A caller is not required to have Google IAM permission to make this request.", - "canonical": true, - "file": "backup_d_r.test_iam_permissions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TestIamPermissions", - "fullName": "google.cloud.backupdr.v1.BackupDR.TestIamPermissions", - "async": true, - "parameters": [ - { - "name": "resource", - "type": "TYPE_STRING" - }, - { - "name": "permissions", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.iam.v1.TestIamPermissionsResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "TestIamPermissions", - "fullName": "google.cloud.backupdr.v1.BackupDR.TestIamPermissions", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, { "regionTag": "backupdr_v1_generated_BackupDR_ListDataSources_async", "title": "BackupDR listDataSources Sample", @@ -727,306 +683,6 @@ } } }, - { - "regionTag": "backupdr_v1_generated_BackupDR_RemoveDataSource_async", - "title": "BackupDR removeDataSource Sample", - "origin": "API_DEFINITION", - "description": " Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.", - "canonical": true, - "file": "backup_d_r.remove_data_source.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RemoveDataSource", - "fullName": "google.cloud.backupdr.v1.BackupDR.RemoveDataSource", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "RemoveDataSource", - "fullName": "google.cloud.backupdr.v1.BackupDR.RemoveDataSource", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_SetInternalStatus_async", - "title": "BackupDR setInternalStatus Sample", - "origin": "API_DEFINITION", - "description": " Sets the internal status of a DataSource.", - "canonical": true, - "file": "backup_d_r.set_internal_status.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SetInternalStatus", - "fullName": "google.cloud.backupdr.v1.BackupDR.SetInternalStatus", - "async": true, - "parameters": [ - { - "name": "data_source", - "type": "TYPE_STRING" - }, - { - "name": "value", - "type": "TYPE_BYTES" - }, - { - "name": "backup_config_state", - "type": ".google.cloud.backupdr.v1.BackupConfigState" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "SetInternalStatus", - "fullName": "google.cloud.backupdr.v1.BackupDR.SetInternalStatus", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_InitiateBackup_async", - "title": "BackupDR initiateBackup Sample", - "origin": "API_DEFINITION", - "description": " Internal only. Initiates a backup.", - "canonical": true, - "file": "backup_d_r.initiate_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 73, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "InitiateBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.InitiateBackup", - "async": true, - "parameters": [ - { - "name": "data_source", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "backup_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.backupdr.v1.InitiateBackupResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "InitiateBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.InitiateBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_AbandonBackup_async", - "title": "BackupDR abandonBackup Sample", - "origin": "API_DEFINITION", - "description": " Internal only. Abandons a backup.", - "canonical": true, - "file": "backup_d_r.abandon_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "AbandonBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.AbandonBackup", - "async": true, - "parameters": [ - { - "name": "data_source", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "AbandonBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.AbandonBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_FinalizeBackup_async", - "title": "BackupDR finalizeBackup Sample", - "origin": "API_DEFINITION", - "description": " Internal only. Finalize a backup that was started by a call to InitiateBackup.", - "canonical": true, - "file": "backup_d_r.finalize_backup.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 101, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "FinalizeBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.FinalizeBackup", - "async": true, - "parameters": [ - { - "name": "data_source", - "type": "TYPE_STRING" - }, - { - "name": "description", - "type": "TYPE_STRING" - }, - { - "name": "consistency_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "backup_id", - "type": "TYPE_STRING" - }, - { - "name": "recovery_range_start_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "recovery_range_end_time", - "type": ".google.protobuf.Timestamp" - }, - { - "name": "retention_duration", - "type": ".google.protobuf.Duration" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "FinalizeBackup", - "fullName": "google.cloud.backupdr.v1.BackupDR.FinalizeBackup", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, - { - "regionTag": "backupdr_v1_generated_BackupDR_FetchAccessToken_async", - "title": "BackupDR fetchAccessToken Sample", - "origin": "API_DEFINITION", - "description": " Internal only. Fetch access token for a given data source.", - "canonical": true, - "file": "backup_d_r.fetch_access_token.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "FetchAccessToken", - "fullName": "google.cloud.backupdr.v1.BackupDR.FetchAccessToken", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "generation_id", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.cloud.backupdr.v1.FetchAccessTokenResponse", - "client": { - "shortName": "BackupDRClient", - "fullName": "google.cloud.backupdr.v1.BackupDRClient" - }, - "method": { - "shortName": "FetchAccessToken", - "fullName": "google.cloud.backupdr.v1.BackupDR.FetchAccessToken", - "service": { - "shortName": "BackupDR", - "fullName": "google.cloud.backupdr.v1.BackupDR" - } - } - } - }, { "regionTag": "backupdr_v1_generated_BackupDR_ListBackups_async", "title": "BackupDR listBackups Sample", diff --git a/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts b/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts index bab75752904..2e2d2ae78bf 100644 --- a/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts +++ b/packages/google-cloud-backupdr/src/v1/backup_d_r_client.ts @@ -372,30 +372,6 @@ export class BackupDRClient { const updateDataSourceMetadata = protoFilesRoot.lookup( '.google.cloud.backupdr.v1.OperationMetadata' ) as gax.protobuf.Type; - const removeDataSourceResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty' - ) as gax.protobuf.Type; - const removeDataSourceMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata' - ) as gax.protobuf.Type; - const setInternalStatusResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.SetInternalStatusResponse' - ) as gax.protobuf.Type; - const setInternalStatusMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata' - ) as gax.protobuf.Type; - const abandonBackupResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty' - ) as gax.protobuf.Type; - const abandonBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata' - ) as gax.protobuf.Type; - const finalizeBackupResponse = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.Backup' - ) as gax.protobuf.Type; - const finalizeBackupMetadata = protoFilesRoot.lookup( - '.google.cloud.backupdr.v1.OperationMetadata' - ) as gax.protobuf.Type; const updateBackupResponse = protoFilesRoot.lookup( '.google.cloud.backupdr.v1.Backup' ) as gax.protobuf.Type; @@ -484,26 +460,6 @@ export class BackupDRClient { updateDataSourceResponse.decode.bind(updateDataSourceResponse), updateDataSourceMetadata.decode.bind(updateDataSourceMetadata) ), - removeDataSource: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - removeDataSourceResponse.decode.bind(removeDataSourceResponse), - removeDataSourceMetadata.decode.bind(removeDataSourceMetadata) - ), - setInternalStatus: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - setInternalStatusResponse.decode.bind(setInternalStatusResponse), - setInternalStatusMetadata.decode.bind(setInternalStatusMetadata) - ), - abandonBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - abandonBackupResponse.decode.bind(abandonBackupResponse), - abandonBackupMetadata.decode.bind(abandonBackupMetadata) - ), - finalizeBackup: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - finalizeBackupResponse.decode.bind(finalizeBackupResponse), - finalizeBackupMetadata.decode.bind(finalizeBackupMetadata) - ), updateBackup: new this._gaxModule.LongrunningDescriptor( this.operationsClient, updateBackupResponse.decode.bind(updateBackupResponse), @@ -614,16 +570,9 @@ export class BackupDRClient { 'getBackupVault', 'updateBackupVault', 'deleteBackupVault', - 'testIamPermissions', 'listDataSources', 'getDataSource', 'updateDataSource', - 'removeDataSource', - 'setInternalStatus', - 'initiateBackup', - 'abandonBackup', - 'finalizeBackup', - 'fetchAccessToken', 'listBackups', 'getBackup', 'updateBackup', @@ -934,97 +883,6 @@ export class BackupDRClient { this.initialize(); return this.innerApiCalls.getBackupVault(request, options, callback); } - /** - * Returns the caller's permissions on a BackupVault resource. - * - * A caller is not required to have Google IAM permission to make this - * request. - * - * @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 - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @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.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. - * 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/backup_d_r.test_iam_permissions.js - * region_tag:backupdr_v1_generated_BackupDR_TestIamPermissions_async - */ - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | undefined, - {} | undefined, - ] - >; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): void; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): void; - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | 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({ - resource: request.resource ?? '', - }); - this.initialize(); - return this.innerApiCalls.testIamPermissions(request, options, callback); - } /** * Gets details of a DataSource. * @@ -1110,204 +968,6 @@ export class BackupDRClient { this.initialize(); return this.innerApiCalls.getDataSource(request, options, callback); } - /** - * Internal only. - * Initiates a backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.dataSource - * Required. The resource name of the instance, in the format - * 'projects/* /locations/* /backupVaults/* /dataSources/'. - * @param {string} [request.requestId] - * Optional. An optional 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 {string} request.backupId - * Required. Resource ID of the Backup resource. - * @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.backupdr.v1.InitiateBackupResponse|InitiateBackupResponse}. - * 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/backup_d_r.initiate_backup.js - * region_tag:backupdr_v1_generated_BackupDR_InitiateBackup_async - */ - initiateBackup( - request?: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.backupdr.v1.IInitiateBackupResponse, - protos.google.cloud.backupdr.v1.IInitiateBackupRequest | undefined, - {} | undefined, - ] - >; - initiateBackup( - request: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IInitiateBackupResponse, - protos.google.cloud.backupdr.v1.IInitiateBackupRequest | null | undefined, - {} | null | undefined - > - ): void; - initiateBackup( - request: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IInitiateBackupResponse, - protos.google.cloud.backupdr.v1.IInitiateBackupRequest | null | undefined, - {} | null | undefined - > - ): void; - initiateBackup( - request?: protos.google.cloud.backupdr.v1.IInitiateBackupRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.backupdr.v1.IInitiateBackupResponse, - | protos.google.cloud.backupdr.v1.IInitiateBackupRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.backupdr.v1.IInitiateBackupResponse, - protos.google.cloud.backupdr.v1.IInitiateBackupRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.backupdr.v1.IInitiateBackupResponse, - protos.google.cloud.backupdr.v1.IInitiateBackupRequest | 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({ - data_source: request.dataSource ?? '', - }); - this.initialize(); - return this.innerApiCalls.initiateBackup(request, options, callback); - } - /** - * Internal only. - * Fetch access token for a given data source. - * - * @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/* /backupVaults/* /dataSources'. - * @param {number} request.generationId - * Required. The generation of the backup to update. - * @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.backupdr.v1.FetchAccessTokenResponse|FetchAccessTokenResponse}. - * 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/backup_d_r.fetch_access_token.js - * region_tag:backupdr_v1_generated_BackupDR_FetchAccessToken_async - */ - fetchAccessToken( - request?: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, - protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest | undefined, - {} | undefined, - ] - >; - fetchAccessToken( - request: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, - | protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest - | null - | undefined, - {} | null | undefined - > - ): void; - fetchAccessToken( - request: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, - callback: Callback< - protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, - | protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest - | null - | undefined, - {} | null | undefined - > - ): void; - fetchAccessToken( - request?: protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, - | protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, - | protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse, - protos.google.cloud.backupdr.v1.IFetchAccessTokenRequest | 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.fetchAccessToken(request, options, callback); - } /** * Gets details of a Backup. * @@ -2540,634 +2200,6 @@ export class BackupDRClient { protos.google.cloud.backupdr.v1.OperationMetadata >; } - /** - * Deletes a DataSource. This is a custom method instead of a standard delete - * method because external clients will not delete DataSources except for - * BackupDR backup appliances. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the resource. - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.remove_data_source.js - * region_tag:backupdr_v1_generated_BackupDR_RemoveDataSource_async - */ - removeDataSource( - request?: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ] - >; - removeDataSource( - request: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - removeDataSource( - request: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, - callback: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - removeDataSource( - request?: protos.google.cloud.backupdr.v1.IRemoveDataSourceRequest, - optionsOrCallback?: - | CallOptions - | Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): Promise< - [ - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - 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.removeDataSource(request, options, callback); - } - /** - * Check the status of the long running operation returned by `removeDataSource()`. - * @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/backup_d_r.remove_data_source.js - * region_tag:backupdr_v1_generated_BackupDR_RemoveDataSource_async - */ - async checkRemoveDataSourceProgress( - name: string - ): Promise< - LROperation< - protos.google.protobuf.Empty, - protos.google.cloud.backupdr.v1.OperationMetadata - > - > { - 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.removeDataSource, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.protobuf.Empty, - protos.google.cloud.backupdr.v1.OperationMetadata - >; - } - /** - * Sets the internal status of a DataSource. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.dataSource - * Required. The resource name of the instance, in the format - * 'projects/* /locations/* /backupVaults/* /dataSources/'. - * @param {Buffer} request.value - * Required. The value required for this method to work. This field must be - * the 32-byte SHA256 hash of the DataSourceID. The DataSourceID used here is - * only the final piece of the fully qualified resource path for this - * DataSource (i.e. the part after '.../dataSources/'). This field exists to - * make this method difficult to call since it is intended for use only by - * Backup Appliances. - * @param {google.cloud.backupdr.v1.BackupConfigState} request.backupConfigState - * Required. Output only. The new BackupConfigState to set for the DataSource. - * @param {string} [request.requestId] - * Optional. An optional 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. 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/backup_d_r.set_internal_status.js - * region_tag:backupdr_v1_generated_BackupDR_SetInternalStatus_async - */ - setInternalStatus( - request?: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ] - >; - setInternalStatus( - request: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - setInternalStatus( - request: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, - callback: Callback< - LROperation< - protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - setInternalStatus( - request?: protos.google.cloud.backupdr.v1.ISetInternalStatusRequest, - optionsOrCallback?: - | CallOptions - | Callback< - LROperation< - protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): Promise< - [ - LROperation< - protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - 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({ - data_source: request.dataSource ?? '', - }); - this.initialize(); - return this.innerApiCalls.setInternalStatus(request, options, callback); - } - /** - * Check the status of the long running operation returned by `setInternalStatus()`. - * @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/backup_d_r.set_internal_status.js - * region_tag:backupdr_v1_generated_BackupDR_SetInternalStatus_async - */ - async checkSetInternalStatusProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.backupdr.v1.SetInternalStatusResponse, - protos.google.cloud.backupdr.v1.OperationMetadata - > - > { - 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.setInternalStatus, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.backupdr.v1.SetInternalStatusResponse, - protos.google.cloud.backupdr.v1.OperationMetadata - >; - } - /** - * Internal only. - * Abandons a backup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.dataSource - * Required. The resource name of the instance, in the format - * 'projects/* /locations/* /backupVaults/* /dataSources/'. - * @param {string} [request.requestId] - * Optional. An optional 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/backup_d_r.abandon_backup.js - * region_tag:backupdr_v1_generated_BackupDR_AbandonBackup_async - */ - abandonBackup( - request?: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ] - >; - abandonBackup( - request: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - abandonBackup( - request: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, - callback: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - abandonBackup( - request?: protos.google.cloud.backupdr.v1.IAbandonBackupRequest, - optionsOrCallback?: - | CallOptions - | Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): Promise< - [ - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - 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({ - data_source: request.dataSource ?? '', - }); - this.initialize(); - return this.innerApiCalls.abandonBackup(request, options, callback); - } - /** - * Check the status of the long running operation returned by `abandonBackup()`. - * @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/backup_d_r.abandon_backup.js - * region_tag:backupdr_v1_generated_BackupDR_AbandonBackup_async - */ - async checkAbandonBackupProgress( - name: string - ): Promise< - LROperation< - protos.google.protobuf.Empty, - protos.google.cloud.backupdr.v1.OperationMetadata - > - > { - 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.abandonBackup, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.protobuf.Empty, - protos.google.cloud.backupdr.v1.OperationMetadata - >; - } - /** - * Internal only. - * Finalize a backup that was started by a call to InitiateBackup. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.dataSource - * Required. The resource name of the instance, in the format - * 'projects/* /locations/* /backupVaults/* /dataSources/'. - * @param {string} request.description - * This will be assigned to the description field of the newly created Backup. - * @param {google.protobuf.Timestamp} request.consistencyTime - * The point in time when this backup was captured from the source. This will - * be assigned to the consistency_time field of the newly created Backup. - * @param {string} [request.requestId] - * Optional. An optional 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 {string} request.backupId - * Required. Resource ID of the Backup resource to be finalized. This must be - * the same backup_id that was used in the InitiateBackupRequest. - * @param {google.protobuf.Timestamp} request.recoveryRangeStartTime - * The earliest timestamp of data available in this Backup. This will set on - * the newly created Backup. - * @param {google.protobuf.Timestamp} request.recoveryRangeEndTime - * The latest timestamp of data available in this Backup. This will be set on - * the newly created Backup. - * @param {google.protobuf.Duration} request.retentionDuration - * The ExpireTime on the backup will be set to FinalizeTime plus this - * duration. If the resulting ExpireTime is less than - * EnforcedRetentionEndTime, then ExpireTime is set to - * EnforcedRetentionEndTime. - * @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/backup_d_r.finalize_backup.js - * region_tag:backupdr_v1_generated_BackupDR_FinalizeBackup_async - */ - finalizeBackup( - request?: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ] - >; - finalizeBackup( - request: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - finalizeBackup( - request: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, - callback: Callback< - LROperation< - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - finalizeBackup( - request?: protos.google.cloud.backupdr.v1.IFinalizeBackupRequest, - optionsOrCallback?: - | CallOptions - | Callback< - LROperation< - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): Promise< - [ - LROperation< - protos.google.cloud.backupdr.v1.IBackup, - protos.google.cloud.backupdr.v1.IOperationMetadata - >, - 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({ - data_source: request.dataSource ?? '', - }); - this.initialize(); - return this.innerApiCalls.finalizeBackup(request, options, callback); - } - /** - * Check the status of the long running operation returned by `finalizeBackup()`. - * @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/backup_d_r.finalize_backup.js - * region_tag:backupdr_v1_generated_BackupDR_FinalizeBackup_async - */ - async checkFinalizeBackupProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.backupdr.v1.Backup, - protos.google.cloud.backupdr.v1.OperationMetadata - > - > { - 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.finalizeBackup, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.backupdr.v1.Backup, - protos.google.cloud.backupdr.v1.OperationMetadata - >; - } /** * Updates the settings of a Backup. * diff --git a/packages/google-cloud-backupdr/src/v1/backup_d_r_client_config.json b/packages/google-cloud-backupdr/src/v1/backup_d_r_client_config.json index 8b29881f031..38b3cbc1a37 100644 --- a/packages/google-cloud-backupdr/src/v1/backup_d_r_client_config.json +++ b/packages/google-cloud-backupdr/src/v1/backup_d_r_client_config.json @@ -82,10 +82,6 @@ "retry_codes_name": "unavailable", "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" }, - "TestIamPermissions": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, "ListDataSources": { "timeout_millis": 60000, "retry_codes_name": "unavailable", @@ -101,30 +97,6 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, - "RemoveDataSource": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetInternalStatus": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "InitiateBackup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "AbandonBackup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "FinalizeBackup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "FetchAccessToken": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, "ListBackups": { "timeout_millis": 60000, "retry_codes_name": "unavailable", diff --git a/packages/google-cloud-backupdr/src/v1/gapic_metadata.json b/packages/google-cloud-backupdr/src/v1/gapic_metadata.json index 0407284a357..c23b63f10dc 100644 --- a/packages/google-cloud-backupdr/src/v1/gapic_metadata.json +++ b/packages/google-cloud-backupdr/src/v1/gapic_metadata.json @@ -20,26 +20,11 @@ "getBackupVault" ] }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, "GetDataSource": { "methods": [ "getDataSource" ] }, - "InitiateBackup": { - "methods": [ - "initiateBackup" - ] - }, - "FetchAccessToken": { - "methods": [ - "fetchAccessToken" - ] - }, "GetBackup": { "methods": [ "getBackup" @@ -85,26 +70,6 @@ "updateDataSource" ] }, - "RemoveDataSource": { - "methods": [ - "removeDataSource" - ] - }, - "SetInternalStatus": { - "methods": [ - "setInternalStatus" - ] - }, - "AbandonBackup": { - "methods": [ - "abandonBackup" - ] - }, - "FinalizeBackup": { - "methods": [ - "finalizeBackup" - ] - }, "UpdateBackup": { "methods": [ "updateBackup" @@ -209,26 +174,11 @@ "getBackupVault" ] }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, "GetDataSource": { "methods": [ "getDataSource" ] }, - "InitiateBackup": { - "methods": [ - "initiateBackup" - ] - }, - "FetchAccessToken": { - "methods": [ - "fetchAccessToken" - ] - }, "GetBackup": { "methods": [ "getBackup" @@ -274,26 +224,6 @@ "updateDataSource" ] }, - "RemoveDataSource": { - "methods": [ - "removeDataSource" - ] - }, - "SetInternalStatus": { - "methods": [ - "setInternalStatus" - ] - }, - "AbandonBackup": { - "methods": [ - "abandonBackup" - ] - }, - "FinalizeBackup": { - "methods": [ - "finalizeBackup" - ] - }, "UpdateBackup": { "methods": [ "updateBackup" diff --git a/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts b/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts index ca86dd90686..198fdb633df 100644 --- a/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts +++ b/packages/google-cloud-backupdr/test/gapic_backup_d_r_v1.ts @@ -602,65 +602,64 @@ describe('v1.BackupDRClient', () => { }); }); - describe('testIamPermissions', () => { - it('invokes testIamPermissions without error', async () => { + describe('getDataSource', () => { + it('invokes getDataSource without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] + '.google.cloud.backupdr.v1.GetDataSourceRequest', + ['name'] ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() + new protos.google.cloud.backupdr.v1.DataSource() ); - client.innerApiCalls.testIamPermissions = - stubSimpleCall(expectedResponse); - const [response] = await client.testIamPermissions(request); + client.innerApiCalls.getDataSource = stubSimpleCall(expectedResponse); + const [response] = await client.getDataSource(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.testIamPermissions as SinonStub + client.innerApiCalls.getDataSource as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.testIamPermissions as SinonStub + client.innerApiCalls.getDataSource as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes testIamPermissions without error using callback', async () => { + it('invokes getDataSource without error using callback', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] + '.google.cloud.backupdr.v1.GetDataSourceRequest', + ['name'] ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsResponse() + new protos.google.cloud.backupdr.v1.DataSource() ); - client.innerApiCalls.testIamPermissions = + client.innerApiCalls.getDataSource = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.testIamPermissions( + client.getDataSource( request, ( err?: Error | null, - result?: protos.google.iam.v1.ITestIamPermissionsResponse | null + result?: protos.google.cloud.backupdr.v1.IDataSource | null ) => { if (err) { reject(err); @@ -673,124 +672,124 @@ describe('v1.BackupDRClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.testIamPermissions as SinonStub + client.innerApiCalls.getDataSource as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.testIamPermissions as SinonStub + client.innerApiCalls.getDataSource as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes testIamPermissions with error', async () => { + it('invokes getDataSource with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] + '.google.cloud.backupdr.v1.GetDataSourceRequest', + ['name'] ); - request.resource = defaultValue1; - const expectedHeaderRequestParams = `resource=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.testIamPermissions = stubSimpleCall( + client.innerApiCalls.getDataSource = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.testIamPermissions(request), expectedError); + await assert.rejects(client.getDataSource(request), expectedError); const actualRequest = ( - client.innerApiCalls.testIamPermissions as SinonStub + client.innerApiCalls.getDataSource as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.testIamPermissions as SinonStub + client.innerApiCalls.getDataSource as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes testIamPermissions with closed client', async () => { + it('invokes getDataSource with closed client', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.iam.v1.TestIamPermissionsRequest() + new protos.google.cloud.backupdr.v1.GetDataSourceRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.iam.v1.TestIamPermissionsRequest', - ['resource'] + '.google.cloud.backupdr.v1.GetDataSourceRequest', + ['name'] ); - request.resource = defaultValue1; + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.testIamPermissions(request), expectedError); + await assert.rejects(client.getDataSource(request), expectedError); }); }); - describe('getDataSource', () => { - it('invokes getDataSource without error', async () => { + describe('getBackup', () => { + it('invokes getBackup without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetDataSourceRequest() + new protos.google.cloud.backupdr.v1.GetBackupRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.GetDataSourceRequest', + '.google.cloud.backupdr.v1.GetBackupRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DataSource() + new protos.google.cloud.backupdr.v1.Backup() ); - client.innerApiCalls.getDataSource = stubSimpleCall(expectedResponse); - const [response] = await client.getDataSource(request); + client.innerApiCalls.getBackup = stubSimpleCall(expectedResponse); + const [response] = await client.getBackup(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getDataSource as SinonStub + client.innerApiCalls.getBackup as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getDataSource as SinonStub + client.innerApiCalls.getBackup as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getDataSource without error using callback', async () => { + it('invokes getBackup without error using callback', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetDataSourceRequest() + new protos.google.cloud.backupdr.v1.GetBackupRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.GetDataSourceRequest', + '.google.cloud.backupdr.v1.GetBackupRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DataSource() + new protos.google.cloud.backupdr.v1.Backup() ); - client.innerApiCalls.getDataSource = + client.innerApiCalls.getBackup = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getDataSource( + client.getBackup( request, ( err?: Error | null, - result?: protos.google.cloud.backupdr.v1.IDataSource | null + result?: protos.google.cloud.backupdr.v1.IBackup | null ) => { if (err) { reject(err); @@ -803,124 +802,121 @@ describe('v1.BackupDRClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getDataSource as SinonStub + client.innerApiCalls.getBackup as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getDataSource as SinonStub + client.innerApiCalls.getBackup as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getDataSource with error', async () => { + it('invokes getBackup with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetDataSourceRequest() + new protos.google.cloud.backupdr.v1.GetBackupRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.GetDataSourceRequest', + '.google.cloud.backupdr.v1.GetBackupRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.getDataSource = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getDataSource(request), expectedError); + client.innerApiCalls.getBackup = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getBackup(request), expectedError); const actualRequest = ( - client.innerApiCalls.getDataSource as SinonStub + client.innerApiCalls.getBackup as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getDataSource as SinonStub + client.innerApiCalls.getBackup as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getDataSource with closed client', async () => { + it('invokes getBackup with closed client', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetDataSourceRequest() + new protos.google.cloud.backupdr.v1.GetBackupRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.GetDataSourceRequest', + '.google.cloud.backupdr.v1.GetBackupRequest', ['name'] ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.getDataSource(request), expectedError); + await assert.rejects(client.getBackup(request), expectedError); }); }); - describe('initiateBackup', () => { - it('invokes initiateBackup without error', async () => { + describe('getBackupPlan', () => { + it('invokes getBackupPlan without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.InitiateBackupRequest() + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.InitiateBackupRequest', - ['dataSource'] + '.google.cloud.backupdr.v1.GetBackupPlanRequest', + ['name'] ); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.InitiateBackupResponse() + new protos.google.cloud.backupdr.v1.BackupPlan() ); - client.innerApiCalls.initiateBackup = stubSimpleCall(expectedResponse); - const [response] = await client.initiateBackup(request); + client.innerApiCalls.getBackupPlan = stubSimpleCall(expectedResponse); + const [response] = await client.getBackupPlan(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.initiateBackup as SinonStub + client.innerApiCalls.getBackupPlan as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.initiateBackup as SinonStub + client.innerApiCalls.getBackupPlan as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes initiateBackup without error using callback', async () => { + it('invokes getBackupPlan without error using callback', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.InitiateBackupRequest() + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.InitiateBackupRequest', - ['dataSource'] + '.google.cloud.backupdr.v1.GetBackupPlanRequest', + ['name'] ); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.InitiateBackupResponse() + new protos.google.cloud.backupdr.v1.BackupPlan() ); - client.innerApiCalls.initiateBackup = + client.innerApiCalls.getBackupPlan = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.initiateBackup( + client.getBackupPlan( request, ( err?: Error | null, - result?: protos.google.cloud.backupdr.v1.IInitiateBackupResponse | null + result?: protos.google.cloud.backupdr.v1.IBackupPlan | null ) => { if (err) { reject(err); @@ -933,124 +929,125 @@ describe('v1.BackupDRClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.initiateBackup as SinonStub + client.innerApiCalls.getBackupPlan as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.initiateBackup as SinonStub + client.innerApiCalls.getBackupPlan as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes initiateBackup with error', async () => { + it('invokes getBackupPlan with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.InitiateBackupRequest() + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.InitiateBackupRequest', - ['dataSource'] + '.google.cloud.backupdr.v1.GetBackupPlanRequest', + ['name'] ); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.initiateBackup = stubSimpleCall( + client.innerApiCalls.getBackupPlan = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.initiateBackup(request), expectedError); + await assert.rejects(client.getBackupPlan(request), expectedError); const actualRequest = ( - client.innerApiCalls.initiateBackup as SinonStub + client.innerApiCalls.getBackupPlan as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.initiateBackup as SinonStub + client.innerApiCalls.getBackupPlan as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes initiateBackup with closed client', async () => { + it('invokes getBackupPlan with closed client', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.InitiateBackupRequest() + new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.InitiateBackupRequest', - ['dataSource'] + '.google.cloud.backupdr.v1.GetBackupPlanRequest', + ['name'] ); - request.dataSource = defaultValue1; + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.initiateBackup(request), expectedError); + await assert.rejects(client.getBackupPlan(request), expectedError); }); }); - describe('fetchAccessToken', () => { - it('invokes fetchAccessToken without error', async () => { + describe('getBackupPlanAssociation', () => { + it('invokes getBackupPlanAssociation without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.FetchAccessTokenRequest', + '.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchAccessTokenResponse() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ); - client.innerApiCalls.fetchAccessToken = stubSimpleCall(expectedResponse); - const [response] = await client.fetchAccessToken(request); + client.innerApiCalls.getBackupPlanAssociation = + stubSimpleCall(expectedResponse); + const [response] = await client.getBackupPlanAssociation(request); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.fetchAccessToken as SinonStub + client.innerApiCalls.getBackupPlanAssociation as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.fetchAccessToken as SinonStub + client.innerApiCalls.getBackupPlanAssociation as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes fetchAccessToken without error using callback', async () => { + it('invokes getBackupPlanAssociation without error using callback', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.FetchAccessTokenRequest', + '.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchAccessTokenResponse() + new protos.google.cloud.backupdr.v1.BackupPlanAssociation() ); - client.innerApiCalls.fetchAccessToken = + client.innerApiCalls.getBackupPlanAssociation = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.fetchAccessToken( + client.getBackupPlanAssociation( request, ( err?: Error | null, - result?: protos.google.cloud.backupdr.v1.IFetchAccessTokenResponse | null + result?: protos.google.cloud.backupdr.v1.IBackupPlanAssociation | null ) => { if (err) { reject(err); @@ -1063,124 +1060,135 @@ describe('v1.BackupDRClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.fetchAccessToken as SinonStub + client.innerApiCalls.getBackupPlanAssociation as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.fetchAccessToken as SinonStub + client.innerApiCalls.getBackupPlanAssociation as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes fetchAccessToken with error', async () => { + it('invokes getBackupPlanAssociation with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.FetchAccessTokenRequest', + '.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name'] ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.fetchAccessToken = stubSimpleCall( + client.innerApiCalls.getBackupPlanAssociation = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.fetchAccessToken(request), expectedError); + await assert.rejects( + client.getBackupPlanAssociation(request), + expectedError + ); const actualRequest = ( - client.innerApiCalls.fetchAccessToken as SinonStub + client.innerApiCalls.getBackupPlanAssociation as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.fetchAccessToken as SinonStub + client.innerApiCalls.getBackupPlanAssociation as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes fetchAccessToken with closed client', async () => { + it('invokes getBackupPlanAssociation with closed client', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FetchAccessTokenRequest() + new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.FetchAccessTokenRequest', + '.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', ['name'] ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); - await assert.rejects(client.fetchAccessToken(request), expectedError); + await assert.rejects( + client.getBackupPlanAssociation(request), + expectedError + ); }); }); - describe('getBackup', () => { - it('invokes getBackup without error', async () => { + describe('createManagementServer', () => { + it('invokes createManagementServer without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupRequest() + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.GetBackupRequest', - ['name'] + '.google.cloud.backupdr.v1.CreateManagementServerRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.Backup() + new protos.google.longrunning.Operation() ); - client.innerApiCalls.getBackup = stubSimpleCall(expectedResponse); - const [response] = await client.getBackup(request); + client.innerApiCalls.createManagementServer = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createManagementServer(request); + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getBackup as SinonStub + client.innerApiCalls.createManagementServer as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getBackup as SinonStub + client.innerApiCalls.createManagementServer as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getBackup without error using callback', async () => { + it('invokes createManagementServer without error using callback', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupRequest() + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.GetBackupRequest', - ['name'] + '.google.cloud.backupdr.v1.CreateManagementServerRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.Backup() + new protos.google.longrunning.Operation() ); - client.innerApiCalls.getBackup = - stubSimpleCallWithCallback(expectedResponse); + client.innerApiCalls.createManagementServer = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getBackup( + client.createManagementServer( request, ( err?: Error | null, - result?: protos.google.cloud.backupdr.v1.IBackup | null + result?: LROperation< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IOperationMetadata + > | null ) => { if (err) { reject(err); @@ -1190,1272 +1198,90 @@ describe('v1.BackupDRClient', () => { } ); }); - const response = await promise; + const operation = (await promise) as LROperation< + protos.google.cloud.backupdr.v1.IManagementServer, + protos.google.cloud.backupdr.v1.IOperationMetadata + >; + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.getBackup as SinonStub + client.innerApiCalls.createManagementServer as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.getBackup as SinonStub + client.innerApiCalls.createManagementServer as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getBackup with error', async () => { + it('invokes createManagementServer with call error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupRequest() + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.GetBackupRequest', - ['name'] + '.google.cloud.backupdr.v1.CreateManagementServerRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.getBackup = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getBackup(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getBackup as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getBackup as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackup with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.GetBackupRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getBackup(request), expectedError); - }); - }); - - describe('getBackupPlan', () => { - it('invokes getBackupPlan without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.GetBackupPlanRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupPlan() - ); - client.innerApiCalls.getBackupPlan = stubSimpleCall(expectedResponse); - const [response] = await client.getBackupPlan(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getBackupPlan as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getBackupPlan as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlan without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.GetBackupPlanRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupPlan() - ); - client.innerApiCalls.getBackupPlan = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getBackupPlan( - request, - ( - err?: Error | null, - result?: protos.google.cloud.backupdr.v1.IBackupPlan | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getBackupPlan as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getBackupPlan as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlan with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.GetBackupPlanRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getBackupPlan = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getBackupPlan(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getBackupPlan as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getBackupPlan as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlan with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.GetBackupPlanRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getBackupPlan(request), expectedError); - }); - }); - - describe('getBackupPlanAssociation', () => { - it('invokes getBackupPlanAssociation without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupPlanAssociation() - ); - client.innerApiCalls.getBackupPlanAssociation = - stubSimpleCall(expectedResponse); - const [response] = await client.getBackupPlanAssociation(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getBackupPlanAssociation as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getBackupPlanAssociation as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlanAssociation without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.backupdr.v1.BackupPlanAssociation() - ); - client.innerApiCalls.getBackupPlanAssociation = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getBackupPlanAssociation( - request, - ( - err?: Error | null, - result?: protos.google.cloud.backupdr.v1.IBackupPlanAssociation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getBackupPlanAssociation as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getBackupPlanAssociation as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlanAssociation with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getBackupPlanAssociation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.getBackupPlanAssociation(request), - expectedError - ); - const actualRequest = ( - client.innerApiCalls.getBackupPlanAssociation as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getBackupPlanAssociation as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getBackupPlanAssociation with closed client', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.GetBackupPlanAssociationRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects( - client.getBackupPlanAssociation(request), - expectedError - ); - }); - }); - - describe('createManagementServer', () => { - it('invokes createManagementServer without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.CreateManagementServerRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createManagementServer = - stubLongRunningCall(expectedResponse); - const [operation] = await client.createManagementServer(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createManagementServer as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createManagementServer as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createManagementServer without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.CreateManagementServerRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createManagementServer = - stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createManagementServer( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IOperationMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.cloud.backupdr.v1.IManagementServer, - protos.google.cloud.backupdr.v1.IOperationMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createManagementServer as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createManagementServer as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createManagementServer with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.CreateManagementServerRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createManagementServer = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects( - client.createManagementServer(request), - expectedError - ); - const actualRequest = ( - client.innerApiCalls.createManagementServer as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createManagementServer as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createManagementServer with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.CreateManagementServerRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createManagementServer = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.createManagementServer(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.createManagementServer as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createManagementServer as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateManagementServerProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateManagementServerProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateManagementServerProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateManagementServerProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('deleteManagementServer', () => { - it('invokes deleteManagementServer without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.DeleteManagementServerRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteManagementServer = - stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteManagementServer(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteManagementServer as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteManagementServer as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteManagementServer without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.DeleteManagementServerRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteManagementServer = - stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteManagementServer( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteManagementServer as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteManagementServer as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteManagementServer with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.DeleteManagementServerRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteManagementServer = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects( - client.deleteManagementServer(request), - expectedError - ); - const actualRequest = ( - client.innerApiCalls.deleteManagementServer as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteManagementServer as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteManagementServer with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.DeleteManagementServerRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteManagementServer = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.deleteManagementServer(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteManagementServer as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteManagementServer as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteManagementServerProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteManagementServerProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteManagementServerProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkDeleteManagementServerProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('createBackupVault', () => { - it('invokes createBackupVault without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.CreateBackupVaultRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupVault = - stubLongRunningCall(expectedResponse); - const [operation] = await client.createBackupVault(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createBackupVault as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createBackupVault as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupVault without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.CreateBackupVaultRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createBackupVault = - stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createBackupVault( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IOperationMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IOperationMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createBackupVault as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createBackupVault as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupVault with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.CreateBackupVaultRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupVault = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.createBackupVault(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createBackupVault as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createBackupVault as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createBackupVault with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.CreateBackupVaultRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createBackupVault = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.createBackupVault(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.createBackupVault as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createBackupVault as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateBackupVaultProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupVaultProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateBackupVaultProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkCreateBackupVaultProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('updateBackupVault', () => { - it('invokes updateBackupVault without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.UpdateBackupVaultRequest', - ['backupVault', 'name'] - ); - request.backupVault.name = defaultValue1; - const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateBackupVault = - stubLongRunningCall(expectedResponse); - const [operation] = await client.updateBackupVault(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateBackupVault as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateBackupVault as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackupVault without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.UpdateBackupVaultRequest', - ['backupVault', 'name'] - ); - request.backupVault.name = defaultValue1; - const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateBackupVault = - stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateBackupVault( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IOperationMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.cloud.backupdr.v1.IBackupVault, - protos.google.cloud.backupdr.v1.IOperationMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateBackupVault as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateBackupVault as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackupVault with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.UpdateBackupVaultRequest', - ['backupVault', 'name'] - ); - request.backupVault.name = defaultValue1; - const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateBackupVault = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.updateBackupVault(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updateBackupVault as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateBackupVault as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateBackupVault with LRO error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() - ); - request.backupVault ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.UpdateBackupVaultRequest', - ['backupVault', 'name'] - ); - request.backupVault.name = defaultValue1; - const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateBackupVault = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.updateBackupVault(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.updateBackupVault as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateBackupVault as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateBackupVaultProgress without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - 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.checkUpdateBackupVaultProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateBackupVaultProgress with error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( + client.innerApiCalls.createManagementServer = stubLongRunningCall( undefined, expectedError ); await assert.rejects( - client.checkUpdateBackupVaultProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('deleteBackupVault', () => { - it('invokes deleteBackupVault without error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.DeleteBackupVaultRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupVault = - stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteBackupVault(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteBackupVault as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteBackupVault as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupVault without error using callback', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.DeleteBackupVaultRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteBackupVault = - stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteBackupVault( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.backupdr.v1.IOperationMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteBackupVault as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteBackupVault as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteBackupVault with call error', async () => { - const client = new backupdrModule.v1.BackupDRClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.DeleteBackupVaultRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupVault = stubLongRunningCall( - undefined, + client.createManagementServer(request), expectedError ); - await assert.rejects(client.deleteBackupVault(request), expectedError); const actualRequest = ( - client.innerApiCalls.deleteBackupVault as SinonStub + client.innerApiCalls.createManagementServer as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteBackupVault as SinonStub + client.innerApiCalls.createManagementServer as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteBackupVault with LRO error', async () => { + it('invokes createManagementServer with LRO error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() + new protos.google.cloud.backupdr.v1.CreateManagementServerRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.DeleteBackupVaultRequest', - ['name'] + '.google.cloud.backupdr.v1.CreateManagementServerRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteBackupVault = stubLongRunningCall( + client.innerApiCalls.createManagementServer = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.deleteBackupVault(request); + const [operation] = await client.createManagementServer(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.deleteBackupVault as SinonStub + client.innerApiCalls.createManagementServer as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.deleteBackupVault as SinonStub + client.innerApiCalls.createManagementServer as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkDeleteBackupVaultProgress without error', async () => { + it('invokes checkCreateManagementServerProgress without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2469,7 +1295,7 @@ describe('v1.BackupDRClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteBackupVaultProgress( + const decodedOperation = await client.checkCreateManagementServerProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -2477,7 +1303,7 @@ describe('v1.BackupDRClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkDeleteBackupVaultProgress with error', async () => { + it('invokes checkCreateManagementServerProgress with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2490,76 +1316,74 @@ describe('v1.BackupDRClient', () => { expectedError ); await assert.rejects( - client.checkDeleteBackupVaultProgress(''), + client.checkCreateManagementServerProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('updateDataSource', () => { - it('invokes updateDataSource without error', async () => { + describe('deleteManagementServer', () => { + it('invokes deleteManagementServer without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() ); - request.dataSource ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.UpdateDataSourceRequest', - ['dataSource', 'name'] + '.google.cloud.backupdr.v1.DeleteManagementServerRequest', + ['name'] ); - request.dataSource.name = defaultValue1; - const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateDataSource = + client.innerApiCalls.deleteManagementServer = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateDataSource(request); + const [operation] = await client.deleteManagementServer(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateDataSource as SinonStub + client.innerApiCalls.deleteManagementServer as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateDataSource as SinonStub + client.innerApiCalls.deleteManagementServer as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateDataSource without error using callback', async () => { + it('invokes deleteManagementServer without error using callback', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() ); - request.dataSource ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.UpdateDataSourceRequest', - ['dataSource', 'name'] + '.google.cloud.backupdr.v1.DeleteManagementServerRequest', + ['name'] ); - request.dataSource.name = defaultValue1; - const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateDataSource = + client.innerApiCalls.deleteManagementServer = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.updateDataSource( + client.deleteManagementServer( request, ( err?: Error | null, result?: LROperation< - protos.google.cloud.backupdr.v1.IDataSource, + protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata > | null ) => { @@ -2572,88 +1396,89 @@ describe('v1.BackupDRClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.cloud.backupdr.v1.IDataSource, + protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.updateDataSource as SinonStub + client.innerApiCalls.deleteManagementServer as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateDataSource as SinonStub + client.innerApiCalls.deleteManagementServer as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateDataSource with call error', async () => { + it('invokes deleteManagementServer with call error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() ); - request.dataSource ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.UpdateDataSourceRequest', - ['dataSource', 'name'] + '.google.cloud.backupdr.v1.DeleteManagementServerRequest', + ['name'] ); - request.dataSource.name = defaultValue1; - const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.updateDataSource = stubLongRunningCall( + client.innerApiCalls.deleteManagementServer = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.updateDataSource(request), expectedError); + await assert.rejects( + client.deleteManagementServer(request), + expectedError + ); const actualRequest = ( - client.innerApiCalls.updateDataSource as SinonStub + client.innerApiCalls.deleteManagementServer as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateDataSource as SinonStub + client.innerApiCalls.deleteManagementServer as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateDataSource with LRO error', async () => { + it('invokes deleteManagementServer with LRO error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() + new protos.google.cloud.backupdr.v1.DeleteManagementServerRequest() ); - request.dataSource ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.UpdateDataSourceRequest', - ['dataSource', 'name'] + '.google.cloud.backupdr.v1.DeleteManagementServerRequest', + ['name'] ); - request.dataSource.name = defaultValue1; - const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.updateDataSource = stubLongRunningCall( + client.innerApiCalls.deleteManagementServer = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.updateDataSource(request); + const [operation] = await client.deleteManagementServer(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.updateDataSource as SinonStub + client.innerApiCalls.deleteManagementServer as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.updateDataSource as SinonStub + client.innerApiCalls.deleteManagementServer as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkUpdateDataSourceProgress without error', async () => { + it('invokes checkDeleteManagementServerProgress without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2667,7 +1492,7 @@ describe('v1.BackupDRClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateDataSourceProgress( + const decodedOperation = await client.checkDeleteManagementServerProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -2675,7 +1500,7 @@ describe('v1.BackupDRClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkUpdateDataSourceProgress with error', async () => { + it('invokes checkDeleteManagementServerProgress with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2688,74 +1513,74 @@ describe('v1.BackupDRClient', () => { expectedError ); await assert.rejects( - client.checkUpdateDataSourceProgress(''), + client.checkDeleteManagementServerProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('removeDataSource', () => { - it('invokes removeDataSource without error', async () => { + describe('createBackupVault', () => { + it('invokes createBackupVault without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.RemoveDataSourceRequest', - ['name'] + '.google.cloud.backupdr.v1.CreateBackupVaultRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.removeDataSource = + client.innerApiCalls.createBackupVault = stubLongRunningCall(expectedResponse); - const [operation] = await client.removeDataSource(request); + const [operation] = await client.createBackupVault(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.removeDataSource as SinonStub + client.innerApiCalls.createBackupVault as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.removeDataSource as SinonStub + client.innerApiCalls.createBackupVault as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes removeDataSource without error using callback', async () => { + it('invokes createBackupVault without error using callback', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.RemoveDataSourceRequest', - ['name'] + '.google.cloud.backupdr.v1.CreateBackupVaultRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.removeDataSource = + client.innerApiCalls.createBackupVault = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.removeDataSource( + client.createBackupVault( request, ( err?: Error | null, result?: LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IOperationMetadata > | null ) => { @@ -2768,86 +1593,86 @@ describe('v1.BackupDRClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.protobuf.IEmpty, + protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.removeDataSource as SinonStub + client.innerApiCalls.createBackupVault as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.removeDataSource as SinonStub + client.innerApiCalls.createBackupVault as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes removeDataSource with call error', async () => { + it('invokes createBackupVault with call error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.RemoveDataSourceRequest', - ['name'] + '.google.cloud.backupdr.v1.CreateBackupVaultRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.removeDataSource = stubLongRunningCall( + client.innerApiCalls.createBackupVault = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.removeDataSource(request), expectedError); + await assert.rejects(client.createBackupVault(request), expectedError); const actualRequest = ( - client.innerApiCalls.removeDataSource as SinonStub + client.innerApiCalls.createBackupVault as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.removeDataSource as SinonStub + client.innerApiCalls.createBackupVault as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes removeDataSource with LRO error', async () => { + it('invokes createBackupVault with LRO error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.RemoveDataSourceRequest() + new protos.google.cloud.backupdr.v1.CreateBackupVaultRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.RemoveDataSourceRequest', - ['name'] + '.google.cloud.backupdr.v1.CreateBackupVaultRequest', + ['parent'] ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.removeDataSource = stubLongRunningCall( + client.innerApiCalls.createBackupVault = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.removeDataSource(request); + const [operation] = await client.createBackupVault(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.removeDataSource as SinonStub + client.innerApiCalls.createBackupVault as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.removeDataSource as SinonStub + client.innerApiCalls.createBackupVault as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkRemoveDataSourceProgress without error', async () => { + it('invokes checkCreateBackupVaultProgress without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2861,7 +1686,7 @@ describe('v1.BackupDRClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkRemoveDataSourceProgress( + const decodedOperation = await client.checkCreateBackupVaultProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -2869,7 +1694,7 @@ describe('v1.BackupDRClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkRemoveDataSourceProgress with error', async () => { + it('invokes checkCreateBackupVaultProgress with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2882,74 +1707,76 @@ describe('v1.BackupDRClient', () => { expectedError ); await assert.rejects( - client.checkRemoveDataSourceProgress(''), + client.checkCreateBackupVaultProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('setInternalStatus', () => { - it('invokes setInternalStatus without error', async () => { + describe('updateBackupVault', () => { + it('invokes updateBackupVault without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() ); + request.backupVault ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.SetInternalStatusRequest', - ['dataSource'] + '.google.cloud.backupdr.v1.UpdateBackupVaultRequest', + ['backupVault', 'name'] ); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.setInternalStatus = + client.innerApiCalls.updateBackupVault = stubLongRunningCall(expectedResponse); - const [operation] = await client.setInternalStatus(request); + const [operation] = await client.updateBackupVault(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.setInternalStatus as SinonStub + client.innerApiCalls.updateBackupVault as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.setInternalStatus as SinonStub + client.innerApiCalls.updateBackupVault as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes setInternalStatus without error using callback', async () => { + it('invokes updateBackupVault without error using callback', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() ); + request.backupVault ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.SetInternalStatusRequest', - ['dataSource'] + '.google.cloud.backupdr.v1.UpdateBackupVaultRequest', + ['backupVault', 'name'] ); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.setInternalStatus = + client.innerApiCalls.updateBackupVault = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.setInternalStatus( + client.updateBackupVault( request, ( err?: Error | null, result?: LROperation< - protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, + protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IOperationMetadata > | null ) => { @@ -2962,86 +1789,88 @@ describe('v1.BackupDRClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.cloud.backupdr.v1.ISetInternalStatusResponse, + protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.setInternalStatus as SinonStub + client.innerApiCalls.updateBackupVault as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.setInternalStatus as SinonStub + client.innerApiCalls.updateBackupVault as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes setInternalStatus with call error', async () => { + it('invokes updateBackupVault with call error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() ); + request.backupVault ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.SetInternalStatusRequest', - ['dataSource'] + '.google.cloud.backupdr.v1.UpdateBackupVaultRequest', + ['backupVault', 'name'] ); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.setInternalStatus = stubLongRunningCall( + client.innerApiCalls.updateBackupVault = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.setInternalStatus(request), expectedError); + await assert.rejects(client.updateBackupVault(request), expectedError); const actualRequest = ( - client.innerApiCalls.setInternalStatus as SinonStub + client.innerApiCalls.updateBackupVault as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.setInternalStatus as SinonStub + client.innerApiCalls.updateBackupVault as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes setInternalStatus with LRO error', async () => { + it('invokes updateBackupVault with LRO error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.SetInternalStatusRequest() + new protos.google.cloud.backupdr.v1.UpdateBackupVaultRequest() ); + request.backupVault ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.SetInternalStatusRequest', - ['dataSource'] + '.google.cloud.backupdr.v1.UpdateBackupVaultRequest', + ['backupVault', 'name'] ); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + request.backupVault.name = defaultValue1; + const expectedHeaderRequestParams = `backup_vault.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.setInternalStatus = stubLongRunningCall( + client.innerApiCalls.updateBackupVault = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.setInternalStatus(request); + const [operation] = await client.updateBackupVault(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.setInternalStatus as SinonStub + client.innerApiCalls.updateBackupVault as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.setInternalStatus as SinonStub + client.innerApiCalls.updateBackupVault as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkSetInternalStatusProgress without error', async () => { + it('invokes checkUpdateBackupVaultProgress without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3055,7 +1884,7 @@ describe('v1.BackupDRClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkSetInternalStatusProgress( + const decodedOperation = await client.checkUpdateBackupVaultProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -3063,7 +1892,7 @@ describe('v1.BackupDRClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkSetInternalStatusProgress with error', async () => { + it('invokes checkUpdateBackupVaultProgress with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3076,69 +1905,69 @@ describe('v1.BackupDRClient', () => { expectedError ); await assert.rejects( - client.checkSetInternalStatusProgress(''), + client.checkUpdateBackupVaultProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('abandonBackup', () => { - it('invokes abandonBackup without error', async () => { + describe('deleteBackupVault', () => { + it('invokes deleteBackupVault without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.AbandonBackupRequest() + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.AbandonBackupRequest', - ['dataSource'] + '.google.cloud.backupdr.v1.DeleteBackupVaultRequest', + ['name'] ); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.abandonBackup = + client.innerApiCalls.deleteBackupVault = stubLongRunningCall(expectedResponse); - const [operation] = await client.abandonBackup(request); + const [operation] = await client.deleteBackupVault(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.abandonBackup as SinonStub + client.innerApiCalls.deleteBackupVault as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.abandonBackup as SinonStub + client.innerApiCalls.deleteBackupVault as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes abandonBackup without error using callback', async () => { + it('invokes deleteBackupVault without error using callback', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.AbandonBackupRequest() + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.AbandonBackupRequest', - ['dataSource'] + '.google.cloud.backupdr.v1.DeleteBackupVaultRequest', + ['name'] ); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.abandonBackup = + client.innerApiCalls.deleteBackupVault = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.abandonBackup( + client.deleteBackupVault( request, ( err?: Error | null, @@ -3162,80 +1991,80 @@ describe('v1.BackupDRClient', () => { const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.abandonBackup as SinonStub + client.innerApiCalls.deleteBackupVault as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.abandonBackup as SinonStub + client.innerApiCalls.deleteBackupVault as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes abandonBackup with call error', async () => { + it('invokes deleteBackupVault with call error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.AbandonBackupRequest() + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.AbandonBackupRequest', - ['dataSource'] + '.google.cloud.backupdr.v1.DeleteBackupVaultRequest', + ['name'] ); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.abandonBackup = stubLongRunningCall( + client.innerApiCalls.deleteBackupVault = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.abandonBackup(request), expectedError); + await assert.rejects(client.deleteBackupVault(request), expectedError); const actualRequest = ( - client.innerApiCalls.abandonBackup as SinonStub + client.innerApiCalls.deleteBackupVault as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.abandonBackup as SinonStub + client.innerApiCalls.deleteBackupVault as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes abandonBackup with LRO error', async () => { + it('invokes deleteBackupVault with LRO error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.AbandonBackupRequest() + new protos.google.cloud.backupdr.v1.DeleteBackupVaultRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.AbandonBackupRequest', - ['dataSource'] + '.google.cloud.backupdr.v1.DeleteBackupVaultRequest', + ['name'] ); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.abandonBackup = stubLongRunningCall( + client.innerApiCalls.deleteBackupVault = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.abandonBackup(request); + const [operation] = await client.deleteBackupVault(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.abandonBackup as SinonStub + client.innerApiCalls.deleteBackupVault as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.abandonBackup as SinonStub + client.innerApiCalls.deleteBackupVault as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkAbandonBackupProgress without error', async () => { + it('invokes checkDeleteBackupVaultProgress without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3249,7 +2078,7 @@ describe('v1.BackupDRClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkAbandonBackupProgress( + const decodedOperation = await client.checkDeleteBackupVaultProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -3257,7 +2086,7 @@ describe('v1.BackupDRClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkAbandonBackupProgress with error', async () => { + it('invokes checkDeleteBackupVaultProgress with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3270,74 +2099,76 @@ describe('v1.BackupDRClient', () => { expectedError ); await assert.rejects( - client.checkAbandonBackupProgress(''), + client.checkDeleteBackupVaultProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('finalizeBackup', () => { - it('invokes finalizeBackup without error', async () => { + describe('updateDataSource', () => { + it('invokes updateDataSource without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() ); + request.dataSource ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.FinalizeBackupRequest', - ['dataSource'] + '.google.cloud.backupdr.v1.UpdateDataSourceRequest', + ['dataSource', 'name'] ); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.finalizeBackup = + client.innerApiCalls.updateDataSource = stubLongRunningCall(expectedResponse); - const [operation] = await client.finalizeBackup(request); + const [operation] = await client.updateDataSource(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.finalizeBackup as SinonStub + client.innerApiCalls.updateDataSource as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.finalizeBackup as SinonStub + client.innerApiCalls.updateDataSource as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes finalizeBackup without error using callback', async () => { + it('invokes updateDataSource without error using callback', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() ); + request.dataSource ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.FinalizeBackupRequest', - ['dataSource'] + '.google.cloud.backupdr.v1.UpdateDataSourceRequest', + ['dataSource', 'name'] ); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.finalizeBackup = + client.innerApiCalls.updateDataSource = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.finalizeBackup( + client.updateDataSource( request, ( err?: Error | null, result?: LROperation< - protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IDataSource, protos.google.cloud.backupdr.v1.IOperationMetadata > | null ) => { @@ -3350,86 +2181,88 @@ describe('v1.BackupDRClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.cloud.backupdr.v1.IBackup, + protos.google.cloud.backupdr.v1.IDataSource, protos.google.cloud.backupdr.v1.IOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.finalizeBackup as SinonStub + client.innerApiCalls.updateDataSource as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.finalizeBackup as SinonStub + client.innerApiCalls.updateDataSource as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes finalizeBackup with call error', async () => { + it('invokes updateDataSource with call error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() ); + request.dataSource ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.FinalizeBackupRequest', - ['dataSource'] + '.google.cloud.backupdr.v1.UpdateDataSourceRequest', + ['dataSource', 'name'] ); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.finalizeBackup = stubLongRunningCall( + client.innerApiCalls.updateDataSource = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.finalizeBackup(request), expectedError); + await assert.rejects(client.updateDataSource(request), expectedError); const actualRequest = ( - client.innerApiCalls.finalizeBackup as SinonStub + client.innerApiCalls.updateDataSource as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.finalizeBackup as SinonStub + client.innerApiCalls.updateDataSource as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes finalizeBackup with LRO error', async () => { + it('invokes updateDataSource with LRO error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.backupdr.v1.FinalizeBackupRequest() + new protos.google.cloud.backupdr.v1.UpdateDataSourceRequest() ); + request.dataSource ??= {}; const defaultValue1 = getTypeDefaultValue( - '.google.cloud.backupdr.v1.FinalizeBackupRequest', - ['dataSource'] + '.google.cloud.backupdr.v1.UpdateDataSourceRequest', + ['dataSource', 'name'] ); - request.dataSource = defaultValue1; - const expectedHeaderRequestParams = `data_source=${defaultValue1}`; + request.dataSource.name = defaultValue1; + const expectedHeaderRequestParams = `data_source.name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.finalizeBackup = stubLongRunningCall( + client.innerApiCalls.updateDataSource = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.finalizeBackup(request); + const [operation] = await client.updateDataSource(request); await assert.rejects(operation.promise(), expectedError); const actualRequest = ( - client.innerApiCalls.finalizeBackup as SinonStub + client.innerApiCalls.updateDataSource as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.finalizeBackup as SinonStub + client.innerApiCalls.updateDataSource as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkFinalizeBackupProgress without error', async () => { + it('invokes checkUpdateDataSourceProgress without error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3443,7 +2276,7 @@ describe('v1.BackupDRClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkFinalizeBackupProgress( + const decodedOperation = await client.checkUpdateDataSourceProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -3451,7 +2284,7 @@ describe('v1.BackupDRClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkFinalizeBackupProgress with error', async () => { + it('invokes checkUpdateDataSourceProgress with error', async () => { const client = new backupdrModule.v1.BackupDRClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -3464,7 +2297,7 @@ describe('v1.BackupDRClient', () => { expectedError ); await assert.rejects( - client.checkFinalizeBackupProgress(''), + client.checkUpdateDataSourceProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0));